@shadowclone/cli 0.0.9 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +50 -76
- package/bin/shadowclone.mjs +5 -0
- package/dist/_.._/web/client/index.html +150 -0
- package/dist/shadowclone.js +922 -254
- package/dist/web/index-174jt7gq.css +1 -0
- package/dist/web/index-1ezbn24z.js +133 -0
- package/dist/web/shadowclone-mark-w6a76wqy.svg +42 -0
- package/evals.md +230 -57
- package/package.json +2 -2
- package/skills/design-deep-modules/SKILL.md +10 -20
- package/skills/diagnose-before-editing/SKILL.md +12 -23
- package/skills/prove-regression-tests/SKILL.md +9 -18
- package/skills/research-primary-sources/SKILL.md +9 -18
- package/skills/resolve-conflicts-by-intent/SKILL.md +10 -19
- package/skills/scope-confirmed-changes/SKILL.md +9 -19
- package/skills/testing-first/SKILL.md +10 -21
- package/skills/testing-risk-based/SKILL.md +9 -16
- package/skills/typescript-type-safety/SKILL.md +12 -18
- package/skills/verify-and-review/SKILL.md +10 -19
|
@@ -10,32 +10,23 @@ metadata:
|
|
|
10
10
|
|
|
11
11
|
## Use when
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
A merge or rebase is in progress and Git reports conflicts.
|
|
14
14
|
|
|
15
15
|
## Process
|
|
16
16
|
|
|
17
|
-
1. Inspect the
|
|
18
|
-
2. Read
|
|
19
|
-
3.
|
|
20
|
-
4.
|
|
21
|
-
5.
|
|
22
|
-
6.
|
|
23
|
-
7. Search the full file for related names and assumptions that Git did not mark as conflicts.
|
|
24
|
-
8. Run focused checks after each coherent file group, then the repository's merge gate.
|
|
25
|
-
9. Stage resolved files and continue the Git operation until no conflicts remain.
|
|
26
|
-
10. Inspect the combined diff against both original intents before reporting completion.
|
|
17
|
+
1. Inspect the operation, conflicting paths, and commits being combined.
|
|
18
|
+
2. Read surrounding code and the commits, design records, tests, or review discussions explaining each side.
|
|
19
|
+
3. Identify both intended behaviors. Preserve compatible requirements; ask about incompatible outcomes when the merge goal does not settle them.
|
|
20
|
+
4. Resolve each hunk in the current architecture. Check related names and assumptions outside Git's conflict markers.
|
|
21
|
+
5. Run focused checks and the repository's merge gate. Separate new failures from failures present on either parent.
|
|
22
|
+
6. Stage resolutions and finish the authorized operation. Review the combined diff against both original intents.
|
|
27
23
|
|
|
28
24
|
## Guardrails
|
|
29
25
|
|
|
30
|
-
|
|
31
|
-
- Preserve schema changes, migrations, generated artifacts, and tests as one coherent set.
|
|
32
|
-
- Treat rename and delete conflicts as behavior decisions rather than path cleanup.
|
|
33
|
-
- Keep conflict markers out of the staged tree.
|
|
34
|
-
- Separate failures introduced by the merge from failures already present on either parent.
|
|
35
|
-
- Finish the requested merge or rebase after resolution unless a destructive or irreversible choice needs user input.
|
|
26
|
+
Use whole-file ours or theirs only when that entire side is intentionally obsolete. Keep schema changes, migrations, generated artifacts, and tests coherent. Rename and delete conflicts can change behavior.
|
|
36
27
|
|
|
37
|
-
|
|
28
|
+
Avoid introducing an unrelated third design. Remove all conflict markers and preserve unrelated user edits. Follow the repository's approval requirements for Git operations.
|
|
38
29
|
|
|
39
30
|
## Completion
|
|
40
31
|
|
|
41
|
-
|
|
32
|
+
No unmerged paths remain, compatible requirements survive, checks cover the combined behavior, and the authorized operation is finished.
|
|
@@ -10,32 +10,22 @@ metadata:
|
|
|
10
10
|
|
|
11
11
|
## Use when
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Fixing a defect or review finding, or making a change whose scope should stay narrow.
|
|
14
14
|
|
|
15
15
|
## Process
|
|
16
16
|
|
|
17
|
-
1. State the
|
|
18
|
-
2. Trace the path
|
|
19
|
-
3.
|
|
20
|
-
4.
|
|
21
|
-
5.
|
|
22
|
-
6. Leave unrelated cleanup, speculative guards, and style changes outside the diff.
|
|
23
|
-
7. Add or update the narrow test that expresses the confirmed behavior through its public seam.
|
|
24
|
-
8. Read every final hunk and map it back to the stated defect, outcome, or necessary verification.
|
|
25
|
-
9. Commit each later review round separately so reviewers retain a stable history.
|
|
17
|
+
1. State the reachable input and incorrect behavior, or the requested outcome.
|
|
18
|
+
2. Trace the current path and verify the finding against the working branch.
|
|
19
|
+
3. Keep edits that correct the outcome, plus supporting changes required for correctness or verification.
|
|
20
|
+
4. Leave unrelated cleanup and speculative guards outside the diff.
|
|
21
|
+
5. Verify the behavior through a stable public interface and map each final hunk back to the request.
|
|
26
22
|
|
|
27
23
|
## Guardrails
|
|
28
24
|
|
|
29
|
-
|
|
30
|
-
- Reject cases that cannot occur under the validated input and type boundaries.
|
|
31
|
-
- Avoid widening public contracts to accommodate an internal implementation shortcut.
|
|
32
|
-
- Keep refactors only when they create the seam required to fix or test the behavior.
|
|
33
|
-
- Preserve unrelated user edits and existing style.
|
|
34
|
-
- Use a separate proposal for improvements that do not affect the confirmed outcome.
|
|
35
|
-
- Never rewrite pushed history to make a correction look like the first attempt.
|
|
25
|
+
Preserve unrelated user edits and existing style. Do not widen a public contract to accommodate an internal shortcut. Refactor only when the requested fix or its verification needs it.
|
|
36
26
|
|
|
37
|
-
|
|
27
|
+
If an approach causes another regression, remove that approach and reconsider the cause. Avoid layering compensating changes onto a wrong fix. Keep later review rounds in separate commits when authorized; never rewrite pushed history.
|
|
38
28
|
|
|
39
29
|
## Completion
|
|
40
30
|
|
|
41
|
-
The
|
|
31
|
+
The requested outcome works, focused verification passes, and every hunk has a reason within scope.
|
|
@@ -11,34 +11,23 @@ metadata:
|
|
|
11
11
|
|
|
12
12
|
## Use when
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
Before writing a test, identify the observable result and the seam where a real caller sees it. If the seam is unclear, settle the interface before committing to test structure.
|
|
14
|
+
Following a test-first workflow for behavior that a caller can observe. Settle the intended interface before choosing test structure.
|
|
17
15
|
|
|
18
16
|
## Process
|
|
19
17
|
|
|
20
|
-
1. State one behavior as concrete input and observable output.
|
|
21
|
-
2.
|
|
22
|
-
3.
|
|
23
|
-
4.
|
|
24
|
-
5.
|
|
25
|
-
6. Run
|
|
26
|
-
7. Repeat with the next behavior only after the previous slice is green.
|
|
27
|
-
8. Run the broader checks affected by the completed slices and review the final diff for speculative code.
|
|
18
|
+
1. State one behavior as concrete input and observable output.
|
|
19
|
+
2. Write a test through the narrowest stable caller interface, using an expected result obtained independently of the implementation.
|
|
20
|
+
3. Run it and confirm it fails because the behavior is missing or wrong.
|
|
21
|
+
4. Implement the smallest complete slice that makes it pass, including every required layer.
|
|
22
|
+
5. Repeat for the next behavior once the current test is green.
|
|
23
|
+
6. Run affected checks and remove code justified only by an unwritten future test.
|
|
28
24
|
|
|
29
25
|
## Guardrails
|
|
30
26
|
|
|
31
|
-
|
|
32
|
-
- Keep each cycle to one new claim. Multiple assertions may support that claim when they observe one outcome.
|
|
33
|
-
- Use literals, specifications, recorded fixtures, or another independent source for expected results.
|
|
34
|
-
- Prefer real collaborators inside the tested module. Replace a dependency only at an established external seam.
|
|
35
|
-
- Keep the failing output long enough to prove the test can detect the missing behavior.
|
|
36
|
-
- Remove implementation added for a future test that has not been written.
|
|
37
|
-
|
|
38
|
-
A test is coupled to implementation when a harmless refactor breaks it while public behavior stays the same. Move that test outward to the stable seam.
|
|
27
|
+
Keep each cycle to one behavioral claim; several assertions can describe that outcome. Prefer real collaborators inside the module and replace dependencies only at established external boundaries.
|
|
39
28
|
|
|
40
|
-
|
|
29
|
+
Do not weaken an assertion to make a failing implementation pass. If harmless refactoring breaks a test without changing behavior, move it to a more stable interface. Avoid recreating the production calculation to derive expected values.
|
|
41
30
|
|
|
42
31
|
## Completion
|
|
43
32
|
|
|
44
|
-
|
|
33
|
+
Requested behaviors have tests observed failing first, implementation passes through public interfaces, and affected checks pass.
|
|
@@ -11,29 +11,22 @@ metadata:
|
|
|
11
11
|
|
|
12
12
|
## Use when
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Choosing coverage in proportion to a change's possible consequences.
|
|
15
15
|
|
|
16
16
|
## Process
|
|
17
17
|
|
|
18
|
-
1.
|
|
19
|
-
2.
|
|
20
|
-
3.
|
|
21
|
-
4.
|
|
22
|
-
5.
|
|
23
|
-
6. Run the focused tests, then the repository checks that cover affected consumers.
|
|
24
|
-
7. Inspect the final diff and explain any material risk left to manual verification.
|
|
18
|
+
1. Identify affected behavior and callers. Rank risks by consequence, likelihood, and existing coverage.
|
|
19
|
+
2. Read nearby tests for the established public interface and fixture style.
|
|
20
|
+
3. Cover material gaps with the smallest fixture that crosses the real failure boundary.
|
|
21
|
+
4. Run focused tests and the repository checks covering affected consumers.
|
|
22
|
+
5. Define any necessary manual check with its setup, action, and expected result, then report what remains unverified.
|
|
25
23
|
|
|
26
24
|
## Guardrails
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
- Prefer an existing integration seam when a unit test would only mirror private branches.
|
|
30
|
-
- Skip a new test when an existing test already fails under the proposed regression and clearly names the behavior.
|
|
31
|
-
- Skip tests that assert static text, styling, or reversible wiring unless those details are a supported contract.
|
|
32
|
-
- Keep expected results independent from the code that computes them.
|
|
33
|
-
- Do not inflate test count with cases that exercise the same branch and consequence.
|
|
26
|
+
Prioritize state changes, permissions, persistence, parsing, routing, and public contracts. Reuse existing coverage when it already detects the regression.
|
|
34
27
|
|
|
35
|
-
|
|
28
|
+
Skip tests that mirror private branches or assert reversible text and styling changes unless those details are a supported contract. Keep expected results independent of production calculations and avoid redundant cases for the same risk.
|
|
36
29
|
|
|
37
30
|
## Completion
|
|
38
31
|
|
|
39
|
-
|
|
32
|
+
Each material risk has a meaningful automated or manual check, selected checks have run, and remaining uncertainty is explicit.
|
|
@@ -10,31 +10,25 @@ metadata:
|
|
|
10
10
|
|
|
11
11
|
## Use when
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Values change together, optional fields hide distinct states, external input enters typed code, or an assertion is needed to satisfy the compiler.
|
|
14
14
|
|
|
15
15
|
## Process
|
|
16
16
|
|
|
17
|
-
1. Name
|
|
18
|
-
2.
|
|
19
|
-
3.
|
|
20
|
-
4.
|
|
21
|
-
5.
|
|
22
|
-
6.
|
|
23
|
-
7. Return a result type that forces callers to handle meaningful failure modes.
|
|
24
|
-
8. Run the type checker and tests that exercise runtime validation at the boundary.
|
|
17
|
+
1. Name valid states and transitions. Use discriminated unions when only certain field combinations are valid.
|
|
18
|
+
2. Preserve key-value relationships with generics, mapped types, or a typed setter.
|
|
19
|
+
3. Accept external input as `unknown` and validate it at the boundary.
|
|
20
|
+
4. Narrow through control flow, predicates, schemas, or destructuring. Make valid absence explicit.
|
|
21
|
+
5. Return types that require callers to handle meaningful failures.
|
|
22
|
+
6. Run type checks and tests for runtime validation.
|
|
25
23
|
|
|
26
24
|
## Guardrails
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
- Prefer exhaustive switches where every union member requires behavior.
|
|
30
|
-
- Preserve literal relationships instead of widening values to `string` or `number` too early.
|
|
31
|
-
- Use runtime validation for files, network responses, environment values, and parsed JSON or YAML.
|
|
32
|
-
- Treat `any`, non-null assertions, and broad type assertions as evidence that a boundary or relationship is missing.
|
|
33
|
-
- Use a narrow assertion only when the runtime invariant is established outside TypeScript and cannot be expressed through validation or control flow.
|
|
34
|
-
- Avoid generic abstractions that make a local relationship harder to read than explicit types would.
|
|
26
|
+
Keep one source of truth for each discriminator and handle every union member where behavior must be exhaustive. Preserve literals instead of widening them prematurely.
|
|
35
27
|
|
|
36
|
-
|
|
28
|
+
Treat `any`, non-null assertions, and broad casts as signs of a missing relationship or boundary. A narrow assertion is appropriate only when an externally established runtime invariant cannot be expressed through validation or control flow. Follow stricter repository rules where they apply.
|
|
29
|
+
|
|
30
|
+
Contain imprecise library types in one adapter returning a precise project type. Avoid generic abstractions that obscure a simple relationship.
|
|
37
31
|
|
|
38
32
|
## Completion
|
|
39
33
|
|
|
40
|
-
|
|
34
|
+
Valid states are constructible, invalid combinations are rejected, relationships survive the call path, and type and boundary checks pass.
|
|
@@ -10,32 +10,23 @@ metadata:
|
|
|
10
10
|
|
|
11
11
|
## Use when
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Code or documentation changes are ready for handoff. Answers to questions do not need this workflow; answer them directly.
|
|
14
14
|
|
|
15
15
|
## Process
|
|
16
16
|
|
|
17
|
-
1.
|
|
18
|
-
2.
|
|
19
|
-
3.
|
|
20
|
-
4.
|
|
21
|
-
5.
|
|
22
|
-
6.
|
|
23
|
-
7. Compare public documentation and architecture diagrams with the implemented behavior.
|
|
24
|
-
8. Check the working tree for generated files, debug artifacts, secrets, and unrelated edits.
|
|
25
|
-
9. Report the exact commands run, their results, and any behavior that still depends on manual or external verification.
|
|
17
|
+
1. Identify changed behavior, data paths, interfaces, and public claims. Read the repository's required checks.
|
|
18
|
+
2. Run focused verification, then the required gate. Repeat broad checks only when later changes or failures justify it.
|
|
19
|
+
3. Review the full diff with surrounding context, including untracked files. Check for generated output, diagnostics, secrets, and unrelated edits.
|
|
20
|
+
4. For changed data paths, trace logs, errors, writes, and network requests to their source and required redaction boundary.
|
|
21
|
+
5. Compare affected docs and diagrams with the implementation. Exercise changed interfaces and inspect their rendered state.
|
|
22
|
+
6. Report checks and results, separating pre-existing failures and unverified behavior from regressions.
|
|
26
23
|
|
|
27
24
|
## Guardrails
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
- Distinguish a failing pre-existing check from one caused by the change and provide evidence for that distinction.
|
|
31
|
-
- Re-run a broad gate only after a later edit can affect its result.
|
|
32
|
-
- Inspect indentation, scope, and neighboring declarations rather than relying only on compilation.
|
|
33
|
-
- Keep captured user content out of logs and review text unless it has passed the required redaction boundary.
|
|
34
|
-
- Do not present a build artifact as proof of runtime behavior when the changed path was never exercised.
|
|
35
|
-
- Preserve material limitations in the handoff so a reviewer knows what remains uncertain.
|
|
26
|
+
Match claims to checks or direct observations. A successful build does not prove an unexercised runtime path works. Keep captured user content out of reports unless it has crossed the required redaction boundary.
|
|
36
27
|
|
|
37
|
-
|
|
28
|
+
Preserve unrelated work. An existing dirty worktree is not a reason to delete another contributor's changes or claim that the whole tree is clean.
|
|
38
29
|
|
|
39
30
|
## Completion
|
|
40
31
|
|
|
41
|
-
|
|
32
|
+
The final diff has been reviewed, required checks have run, and the handoff states the evidence and material limitations.
|