deep-clone-test-decks
/deep-clone-test-decks
Przygotowuje zestawy testów funkcji dla odzyskanego kodu, dzieląc metody i gałęzie parametrów na przypadki brzegowe.
- Autor
- mormork ↗
- Repozytorium
- deep-clone ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 28.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 9
Brak sygnałów. Repozytorium zmienione 28.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Przygotowuje zestawy testów funkcji dla odzyskanego kodu, dzieląc metody i gałęzie parametrów na przypadki brzegowe.
Oryginalny opis (EN)
Build or extend native feature test decks for recovery: decompose methods and parameter branches, design minimal inputs, single-factor variants and extreme cases, and confirm actual vendor paths. Use for new features or reducing complex failures; not a substitute for general unit tests.
Jak działa
- Definition and purpose
- Establish target, feature, and completion scope
- Use native input
- Control supporting dependencies
- Minimal seed and single-factor families
- Test-design examples
- Run and compare
- Deliverables and conclusion scope
Podgląd SKILL.md
--- name: deep-clone-test-decks description: "Build or extend native feature test decks for recovery: decompose methods and parameter branches, design minimal inputs, single-factor variants and extreme cases, and confirm actual vendor paths. Use for new features or reducing complex failures; not a substitute for general unit tests." --- # Feature test decks Build an initial test suite for a feature being cloned. See the [method](../deep-clone/references/method.md) for task and acceptance definitions. ## Definition and purpose A test deck is a **minimal input case** for cloning a vendor feature. It makes vendor and Hybrid version / Cloned software trigger the relevant code in the same controlled problem, with comparable behavior. It may have no practical application, but must satisfy the target path's input conditions. Positive cases must support successful execution; error-handling tests declare expected failure rather than disguising it as success. It should be the first case used to run a newly cloned feature. Use it in more complex cases only after the minimal deck and necessary parameter variants agree with vendor. **Keep supporting features simple, controlled, and predictable, preferably already recovered and verified.** Minimization should make differences attributable, not merely shorten an input file. ## Establish target, feature, and completion scope Read user requirements, project rules, existing inputs, execution entry points, and recovery state. Resolve what existing material establishes; ask only for missing information that affects valid test design. Confirm: - Vendor and version, with corresponding Hybrid version / Cloned software. - Target feature, method, parameter branches, and exclusions. - Launch methods, native input syntax, units, and actual result formats. - Minimal trigger conditions and evidence that the target executes. - Whether delivery means an initial suite or an already recovered feature. - Comparator, complete result inventory, and acceptance standard. Do not treat a whole application mode as one undivided feature. Decompose methods, data layouts, parameters, and switches. For example: - Linear sparse systems: direct and iterative methods, then toggleable iterative parameters. - One-dimensional and multidimensional transforms separately. - Real and complex arithmetic separately. - Pattern matching and text replacement separately. Features and cases are many-to-many. Record actual feature and parameter coverage for each case; one passing application case is not acceptance of every feature. Separate input declarations, actual execution, and comparisons. Keywords establish declarations; call evidence establishes paths; reports establish agreement scope. Keyword labels are not recovery passes. ## Use native input ### Deck form and coverage Use the target software's native input. This may be a project, script, media, or repeatable interaction with supporting resources. `.m` and `.ctl` are examples for particular interfaces, not universal formats. For the bundled workbench, `config/decks.json` stores: | Content | Requirement | | --- | --- | | Input identity | Paths and hashes for main input and necessary includes, data, models, or media; declare unresolved dependencies. | | Origin | Original, adapted, or self-built case, with evidence; explain adaptations. | | Intent | Feature, method, parameters, expected path, and observable behavior. | | Variants | Family seed, independent changed factor, necessary accompanying edits, and dependencies. | | Conditions | Native runner, environment, repeatability controls, expected results, and comparison rules. | | Completion scope | Component, feature, or application case; uncovered branches and combinations. | Do not repeatedly ask the target when already established. If unknown, do not infer software from names such as interpolation, filtering, or search. | Example target | Native input | Note | | --- | --- | --- | | [MATLAB](https://www.mathworks.com/help/matlab/matlab_prog/create-scripts.html) | `.m` | Native script or function syntax for the target version. | | [Meep, Scheme interface](https://meep.readthedocs.io/en/stable/Scheme_Tutorials/Basics/) | `.ctl` | Scheme control script, not an arbitrary configuration file. | | Other software | Its native format | Check project examples or documentation for the actual version. | Changing extensions is insufficient. Do not mix product syntax or substitute pseudocode or generic JSON for a real deck. Keep only necessary auxiliary input. Unchecked syntax cannot be called runnable. ## Control supporting dependencies Classify supporting input decoding, data construction, numerical routines, state handling, and output: - **Verified:** corresponding version/configuration has execution and comparison evidence. - **Controllable, not yet verified:** independently checkable but not verified. - **Unknown:** insufficient evidence. Unknown dependencies are not assumed correct, and their failures cannot automatically be attributed to the target feature. Simplify or replace them where possible; otherwise add smaller prerequisite tests or include them explicitly in this recovery scope. For example, a test of image interpolation can use a verified in-memory pixel array without also introducing unverified JPEG decoding, color conversion, and display rendering. If JPEG decoding is the target, do not replace it with an already decoded array. ## Minimal seed and single-factor families 1. **Minimal seed.** Reduce records, array dimensions, samples, channels, operations, and steps to what triggers the target and gives meaningful output. Size is not just line count. 2. **Simple non-target features.** Use the simplest verified supporting configuration. Text-search testing need not introduce document layout, embedded media, or network synchronization. 3. **Control cases.** Where a valid switch exists, turn the target OFF with other conditions held fixed. Otherwise use the nearest verified configuration or an analytical relationship for diagnosis, not an invalid forced OFF case. These aids do not replace vendor comparison. 4. **One independent change.** Record each parameter/value and unavoidable accompanying input changes. Updating a time vector to match a changed sample count is not another independent factor; do not also change sample rate, signal definition, or processing method. 5. **Relevant branches.** Cover normal configurations, branches, and boundaries. Add negative cases when illegal-input behavior is relevant. Do not default to the full Cartesian product. Test feature combinations separately after controlling basic features. 6. **Sensitivity.** Confirm in vendor that disabling the target, changing key parameters, or falling back to defaults produces distinguishable observations. Unchanged results may indicate an untriggered or insensitive test. ## Test-design examples Each MATLAB example illustrates a specific test-design problem: - **Decomposing branches — [`A\b`](https://www.mathworks.com/help/matlab/ref/double.mldivide.html):** build separate dense/sparse and real/complex decks. Change one factor at a time and inspect the actual calls. A passing branch establishes only that branch. - **Minimal size and limited coverage — [`fft`](https://www.mathworks.com/help/matlab/ref/fft.html):** `fft([1 2 4 8])` needs only four numbers. It covers a length-4 real vector, not complex input, other lengths, or dimensions; add separate decks for those. - **Branches within one feature — [`log`](https://www.mathworks.com/help/matlab/ref/double.log.html):** for CPU double calculations, test `log(2)`, `log(0)`, `log(-1)`, `log(realmin)`, `log(realmin/2)`, `log(realmax)`, `log(Inf)`, `log(NaN)`, and `log([])` separately. These examine ordinary values, zero, negative-to-complex behavior, extremes, special values, and empty input. One normal input is insufficient. Use actual vendor branches to assess coverage and add decks for paths not yet entered. ### Interpolation: separate input families and check sensitivity Build separate **1-D real, 1-D complex, 2-D real, and 2-D complex** interpolation families. A square sample array is one shape of a 2-D grid, not a separate interpolation method. | Family | Minimal configuration | Comparison and checks | | --- | --- | --- | | 1-D real | Short real sample vector | Selected method, sample/query positions, actual calls, and returned values. | | 1-D complex | Short complex sample vector | Corresponding vendor/clone paths and both real and imaginary results. | | 2-D real | Small real sample grid | Actual interpolation dimensions and required sample layout. | | 2-D complex | Small complex sample grid | Supported method and full complex output for this layout. | Use the target version's supported methods and minimum sample counts; [MATLAB's `interp1`](https://www.mathworks.com/help/matlab/ref/double.interp1.html) and [`interp2`](https://www.mathworks.com/help/matlab/ref/interp2.html) illustrate these families. Keep sample values, precision, and query intent simple within each family. Changing both dimensions and data type is not one single-factor variation; methods need not share sample requirements or evaluation rules. Selecting a method or generating more samples does not establish recovery of interpolation. Queries only at original samples, or data on which two methods agree, may hide a missing method; check sensitivity to the target path. Sample/grid generation alone establishes only input setup. This example addresses family design and sensitivity, not complete interpolation coverage. ### Pattern matching: exercise branches within one feature Use verified text inputs and a simple pattern to build a minimal matching case. If the target is a repetition operator, keep that operator and enough text to exercise it; shortening the input must not remove the feature. For example, hold the pattern `ab+` fixed and vary text across no match (`'ac'`), one repetition (`'ab'`), several repetitions (`'abbb'`), multiple matches (`'ab abbb'`), and a long near-match. Check actual calls, matched spans, returned text, and relevant search iterations. [MATLAB's `regexp`](https://www.mathworks.com/help/matlab/ref/regexp.html) provides one native interface for these tests. Inputs that never match cannot establish recovery of the successful-match or repetition paths just because a search was requested. Match count alone can miss wrong spans. Later capture-group recovery can use verified matching without groups as a controlled dependency and test captures separately. This example addresses same-feature branches and extremes, not every regular-expression operator. ### Matrix eigenanalysis: keep the minimal problem valid The first matrix-eigenanalysis deck can use **a small 2 × 2 matrix**, provided vendor supports that input and it retains the structure needed to enter the target path. A scalar or diagonal special case may bypass the general algorithm. Use verified matrix construction and confirmed shape, data type, and precision. Incorrect dimensions or unintended conversions may cause failures unrelated to eigensolver recovery. Confirm actual eigenanalysis and identify which arrays hold eigenvalues and eigenvectors; singular values are different results. Eigenvector signs, ordering, normalization, and repeated-eigenvalue subspaces aid diagnosis; equivalent vectors/subspaces do not replace byte-exact results under deep-cloning acceptance. [MATLAB's `eig`](https://www.mathworks.com/help/matlab/ref/eig.html) illustrates ordinary and generalized matrix inputs. For `eig(A,B)`, if construction of `A` is verified but construction of `B` is unknown, verify `B` first or include it explicitly in scope rather than assigning every difference to eigenanalysis. This example addresses minimum valid inputs and prerequisites, not all eigensolver branches. ## Run and compare Run vendor first to establish legal input, actual triggering, and sensitivity, then Hybrid version / Cloned software. Use identical problem definitions, inputs, and settings. Preserve original input and separate output directories to avoid reading old files after failure. Declare any necessary adaptation and establish unchanged problem meaning. Use the project's runner and comparator. Keep inputs, parameters, source/uncommitted changes, executable identity, commands, and evidence. Do not stack heavy runs; long commands need timing, logs, and progress. Use the [verifier](../deep-clone-verifier/SKILL.md#compare-all-results-and-runtime-behavior) for results and behavior. Illegal-input tests compare vendor's corresponding failure behavior. Diagnose differences through the [difference skill](../deep-clone-difference/SKILL.md). ## Deliverables and conclusion scope An initial suite includes: - Minimal native seed and necessary input dependencies. - Parameter variants or a repeatable generator. - Each variant's independent change, size, target branch, and dependency state. - Vendor/Hybrid/clone run and comparison entry points. - Complete result inventory, comparator version, exclusion evidence, and current conclusions. - Feature-to-case coverage relationships. Keep large input datasets, binary results, and full logs in the project's evidence/cache layout rather than generic skill attachments. Size or extension alone cannot justify deleting inputs, references, or evidence. | State | Meaning | | --- | --- | | Generated | Input exists; execution is not established. | | Vendor verified | Vendor ran and target triggering is confirmed. | | Clone unsupported / failed | The suite may be valid while clone functionality fails. | | Comparison pending | Some outputs exist, but comparisons or evidence are incomplete. | | Verified agreement | Declared versions, configurations, and coverage meet byte-exact and behavior requirements. | **Building a suite and verifying recovered functionality are different completion states.** A vendor-verified suite with an explicitly failing unimplemented clone can be a valid initial development suite. Crashes, inactive target paths, old files, exit codes alone, file generation alone, or component-only passes cannot establish a complete feature. Only passing minimal decks and necessary branches establish configuration scope ready for more complex cases.
Wersje
W bazie nie ma innych skilli o nazwie deep-clone-test-decks.
Migawka bazy z 13.11.2026 · wersja paczki 5e49be7f050a (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 95deep-clone
Odtwarza implementację cudzego oprogramowania przez wersję hybrydową, testy funkcji i weryfikator, sięgając głębiej niż sam interfejs. - 100generating-unit-tests
Generuje testy jednostkowe z kodu źródłowego, obejmujące ścieżki typowe, przypadki brzegowe i warunki błędów, dla funkcji, klas i modułów. - 100generating-unit-tests
Generuje testy jednostkowe z kodu źródłowego, obejmujące ścieżki typowe, przypadki brzegowe i warunki błędów, dla funkcji, klas i modułów. - 100test-writer
Pisze testy jednostkowe dla dowolnej funkcji: ścieżka szczęśliwa, przypadki brzegowe i błędy, także w praktyce TDD. - 95write-tests
Pisze testy jednostkowe w Vitest i testy E2E w Playwright według praktyk doświadczonych inżynierów testów, w tym pokrycie, przypadki brzegowe i brakujące asercje. - 100test-harness
Generuje zestawy testów pytest: ścieżkę szczęśliwą, przypadki brzegowe, błędy, fixtury, mocki i wzorce asynchroniczne.