@shadowclone/cli 0.0.9 → 0.0.11
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 +167 -66
- package/bin/shadowclone.mjs +5 -0
- package/dist/_.._/web/client/index.html +150 -0
- package/dist/shadowclone.js +909 -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 +43 -48
- 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
package/evals.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Evaluation results
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
These small studies measure adherence to stated engineering preferences. They do not establish productivity gains or general superiority. Both used the earlier profile-based system; the current [skills environment protocol](docs/architecture/09-evaluation.md#skills-environment-protocol) evaluates maintained skills separately.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Early profile comparison
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
GPT-5.6 Sol, at medium reasoning effort, completed four TypeScript tasks in three setups. One implementation per task and setup produced twelve graded implementations, with three judge votes per preference check.
|
|
8
8
|
|
|
9
9
|
| Setup | Repository guidance | Personal skills and context | Shadowclone profile |
|
|
10
10
|
| --- | --- | --- | --- |
|
|
@@ -12,17 +12,9 @@ Four small TypeScript tasks were completed across three setups using GPT-5.6 Sol
|
|
|
12
12
|
| Skills | The same | Yes | No |
|
|
13
13
|
| Clone | The same | The same as Skills | Yes |
|
|
14
14
|
|
|
15
|
-
Bare
|
|
15
|
+
Bare already had useful repository instructions. Skills added existing user-written or user-guided instructions, including frozen personal memory where available. Their freshness was not assessed. Clone added the scoped Markdown profile; it did not change model weights.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Clone received that same frozen personal context plus the scoped Markdown profile compiled by Shadowclone. The profile provides additional guidance learned or recorded through Shadowclone; it does not change the model's weights. Skills versus Clone is the comparison that isolates the added profile within this setup.
|
|
20
|
-
|
|
21
|
-
Native Shadowclone injection was removed from the repository snapshots to keep the setups separate. All three agents received the same task, starting repository state, model settings, and execution constraints. They could choose their public APIs, names, and file organization.
|
|
22
|
-
|
|
23
|
-
## Tasks
|
|
24
|
-
|
|
25
|
-
All tasks required a self-contained new module and focused tests, with no changes to existing files or project wiring.
|
|
17
|
+
All setups used the same task, starting state, model settings, and execution constraints. Native Shadowclone injections were removed from snapshots. Each task required a new self-contained module and focused tests, without changing existing files or project wiring.
|
|
26
18
|
|
|
27
19
|
| Task | Assignment |
|
|
28
20
|
| --- | --- |
|
|
@@ -31,59 +23,62 @@ All tasks required a self-contained new module and focused tests, with no change
|
|
|
31
23
|
| 3. Ordered query parameters | Parse and serialize query strings using URLSearchParams semantics while preserving order, duplicates, and empty keys or values. Replace a key's values at its first occurrence, append when absent, and remove it for an empty replacement list. Preserve inputs and test encoding, ordering, and round trips. |
|
|
32
24
|
| 4. Bounded undo/redo | Implement immutable generic history with a positive safe-integer undo capacity, recording, undo, redo, and availability queries. Trim old history, clear redo on branching, and preserve state and redo for Object.is-equal recordings. Test capacity, identity, no-op behavior, and immutability. |
|
|
33
25
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
## How preference scoring worked
|
|
37
|
-
|
|
38
|
-
A versioned code-only rubric was frozen before execution. Each criterion retained a stable identifier, its source quotation, scope, and any explicit task exception. The same rubric was applied to every setup. Workflow instructions that could not be judged from the generated code were excluded.
|
|
26
|
+
The byte-quantity pilot was regraded after clarifying that PascalCase types and readable error messages were valid. The other tasks used that clarified rubric. Regrading did not add another implementation or repetition.
|
|
39
27
|
|
|
40
|
-
|
|
28
|
+
### Scoring
|
|
41
29
|
|
|
42
|
-
|
|
30
|
+
A frozen code-only rubric retained each criterion's source quotation, scope, and task exceptions. Its 17 checks covered type safety, options-object arguments, promises, full names, file length, public module boundaries, suppressions, comments, identifier casing, abbreviation casing, all-caps names, generic names, module-local names, feature organization, colocated tests, composition, and test-local setup.
|
|
43
31
|
|
|
44
|
-
|
|
32
|
+
These are one user's preferences. Workflow instructions that could not be judged from code were excluded. A task-required signature overrode a conflicting preference only for that public API.
|
|
45
33
|
|
|
46
|
-
|
|
34
|
+
Anonymous candidates received three model votes per criterion, with a majority result. These were separate calls, not three different models or human reviewers. Requests contained at most eight criteria per batch, and validated batches were saved for recovery. Each pass earned one point; the fixed denominator allowed a rule to pass when the task never exercised the prohibited construct. Some naming checks overlapped.
|
|
47
35
|
|
|
48
|
-
|
|
36
|
+
### Recorded results
|
|
49
37
|
|
|
50
38
|
| Task | Bare | Skills | Clone |
|
|
51
39
|
| --- | ---: | ---: | ---: |
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
|
|
|
40
|
+
| Byte quantities | 11/17 | 14/17 | 15/17 |
|
|
41
|
+
| Integer ranges | 15/17 | 14/17 | 16/17 |
|
|
42
|
+
| Ordered query parameters | 15/17 | 16/17 | 16/17 |
|
|
43
|
+
| Bounded undo/redo | 14/17 | 15/17 | 15/17 |
|
|
56
44
|
| Total | 55/68 (80.9%) | 59/68 (86.8%) | 62/68 (91.2%) |
|
|
57
45
|
|
|
58
|
-
Clone
|
|
46
|
+
Clone exceeded Skills on two tasks and tied on two. The aggregate differences were 10.3 percentage points over Bare and 4.4 over Skills. Those are observations from this sample, not expected gains on other work.
|
|
59
47
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
These summaries explain the recorded verdicts; they are not additional grading.
|
|
48
|
+
The recorded deductions show where guidance helped and where it did not:
|
|
63
49
|
|
|
64
50
|
| Task | Bare | Skills | Clone |
|
|
65
51
|
| --- | --- | --- | --- |
|
|
66
|
-
| Byte quantities |
|
|
67
|
-
| Integer ranges |
|
|
68
|
-
| Ordered query parameters |
|
|
69
|
-
| Bounded undo/redo |
|
|
52
|
+
| Byte quantities | Cast, positional arguments, comments, uppercase constants under two rules, redundant module context | Two uppercase-constant checks and redundant module context | Redundant module context and mutable test setup |
|
|
53
|
+
| Integer ranges | Positional arguments and redundant module context | The same, plus a forbidden documentation comment | Redundant module context |
|
|
54
|
+
| Ordered query parameters | Positional arguments and redundant module context | Redundant module context | Redundant module context |
|
|
55
|
+
| Bounded undo/redo | Non-null assertions, positional arguments, redundant module context | Redundant module context and setup after assertions | Redundant module context and reassigned test variables |
|
|
56
|
+
|
|
57
|
+
### Correctness and judging limits
|
|
58
|
+
|
|
59
|
+
Model-reviewed correctness scores were 5/5 for Tasks 1, 2, and 4, and 4/5 for Task 3 in every setup. Candidate tests were not executed, and the criteria did not cover every requested behavior.
|
|
60
|
+
|
|
61
|
+
Task 3's deduction came from a rubric defect: it demanded separate assertions for empty keys and values, although combined assertions satisfied the task. Judges acknowledged that the behavior was preserved. The deduction does not demonstrate a functional failure.
|
|
62
|
+
|
|
63
|
+
The test-setup rule was also inconsistent in Task 4: Skills lost a point for setup after assertions while similar Bare code passed two votes to one. The recorded scores remain unchanged.
|
|
70
64
|
|
|
71
|
-
|
|
65
|
+
Four tasks with one implementation per setup do not meet the harness's repeated-run threshold. Correlated judge errors, overlapping criteria, and an unoptimized personal-context baseline further limit the result. It does not establish runtime correctness, unrestricted execution safety, or time saved.
|
|
72
66
|
|
|
73
|
-
##
|
|
67
|
+
## Repository harness pilot (2026-09-26)
|
|
74
68
|
|
|
75
|
-
|
|
69
|
+
Two synthetic repositories in `src/harness/fixtures/` each ran once with existing guidance and once after repository setup. Claude Code used `--model sonnet`, `acceptEdits`, a $1.50 cap per run, and no permission bypass. Both arms received the same task; held-out acceptance tests were added after execution.
|
|
76
70
|
|
|
77
|
-
|
|
71
|
+
Setup was then named `shadowclone harness init`, now `shadowclone init --repo`. The harness arm used a four-rule profile: no TypeScript comments, files under 200 lines, a failing test for new behavior, and no commit.
|
|
78
72
|
|
|
79
|
-
|
|
73
|
+
| Repository | Arm | Held-out acceptance | Gate | Tests added | Agent committed | Cost |
|
|
74
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
75
|
+
| Bun task list | baseline | 3 of 3 | pass | yes | no | $0.29 |
|
|
76
|
+
| Bun task list | harness | 3 of 3 | pass | yes | no | $0.22 |
|
|
77
|
+
| Python config | baseline | pass | pass | no | no | $0.29 |
|
|
78
|
+
| Python config | harness | pass | pass | yes | no | $0.22 |
|
|
80
79
|
|
|
81
|
-
|
|
82
|
-
- The test-setup rule was applied inconsistently in Task 4. Skills lost a point for setup after assertions, while similar Bare code passed by a two-to-one vote. The recorded scores have not been silently corrected.
|
|
83
|
-
- Model judges can make correlated mistakes. Three votes improve inspectability but do not replace human review or executable checks.
|
|
84
|
-
- Bare had useful repository guidance, and some checks were easy for every setup to pass. Skills may be stale; the comparison does not show what a carefully revised skill library would achieve.
|
|
85
|
-
- The results show preference adherence under this rubric. They do not establish correctness, safety in unrestricted execution, time saved, or better performance across users, repositories, providers, and task sizes.
|
|
80
|
+
Both arms solved both tasks. The Python baseline skipped a test while the harness arm added one. One run per arm on two small tasks shows that setup carried a working practice in this sample, without establishing a general improvement.
|
|
86
81
|
|
|
87
|
-
##
|
|
82
|
+
## Further evaluation
|
|
88
83
|
|
|
89
|
-
|
|
84
|
+
The [guidance and memory record](docs/design/021-guidance-evaluation.md#recorded-comparisons) preserves later profile comparisons and their measurement problems. See [evaluation architecture](docs/architecture/09-evaluation.md) for current protocols, isolation, budgets, and recovery.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shadowclone/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"module": "src/cli/index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "bun@1.3.3",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"prepack": "bun run build"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@biomejs/biome": "2.5.
|
|
22
|
+
"@biomejs/biome": "2.5.14",
|
|
23
23
|
"@types/bun": "latest",
|
|
24
24
|
"typescript": "~5.9"
|
|
25
25
|
},
|
|
@@ -10,33 +10,23 @@ metadata:
|
|
|
10
10
|
|
|
11
11
|
## Use when
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
A module is any implementation presented through an interface. Depth means the caller learns a small interface and receives substantial coherent behavior. A seam is the place where one implementation can be replaced without editing its callers.
|
|
13
|
+
Callers coordinate too many steps, an abstraction only forwards arguments, or tests must reach through layers to observe behavior. A deep module provides substantial behavior through a small interface.
|
|
16
14
|
|
|
17
15
|
## Process
|
|
18
16
|
|
|
19
|
-
1.
|
|
20
|
-
2.
|
|
21
|
-
3.
|
|
22
|
-
4.
|
|
23
|
-
5.
|
|
24
|
-
6.
|
|
25
|
-
7. Move orchestration behind the interface and remove pass-through layers that add no decision or isolation.
|
|
26
|
-
8. Test behavior through the chosen interface with dependencies replaced only at real external seams.
|
|
27
|
-
9. Read every caller again and remove knowledge that now belongs inside the module.
|
|
17
|
+
1. Read the callers and identify the state, ordering, and policy they currently coordinate.
|
|
18
|
+
2. Put related state and decisions under one owner. Define an operation that expresses the caller's intent.
|
|
19
|
+
3. When the boundary is unclear, compare two placements by caller burden, error handling, and testability.
|
|
20
|
+
4. Move internal sequencing behind the interface. Remove forwarding layers that provide no useful variation or isolation.
|
|
21
|
+
5. Test through the public interface, replacing dependencies only at real external boundaries.
|
|
22
|
+
6. Revisit callers and remove knowledge now owned by the module.
|
|
28
23
|
|
|
29
24
|
## Guardrails
|
|
30
25
|
|
|
31
|
-
|
|
32
|
-
- Keep invariants, ordering, error modes, and configuration inside the interface contract.
|
|
33
|
-
- Prefer one options object over sequences of primitive arguments that callers must correlate.
|
|
34
|
-
- Return results when callers need outcomes; contain side effects behind the owning interface.
|
|
35
|
-
- Avoid wrappers whose public surface repeats the implementation beneath them.
|
|
36
|
-
- Keep repository and domain terms in names so the interface matches the system users recognize.
|
|
26
|
+
Keep invariants and error behavior in the interface contract. Use an options object when callers would otherwise correlate primitive arguments. Return outcomes callers need, and contain side effects within their owner.
|
|
37
27
|
|
|
38
|
-
|
|
28
|
+
Add an abstraction for a concrete variation or isolation need. A short interface still imposes complexity if callers must know a hidden sequence of calls.
|
|
39
29
|
|
|
40
30
|
## Completion
|
|
41
31
|
|
|
42
|
-
|
|
32
|
+
Callers express intent without coordinating internal steps, and tests exercise behavior without depending on that sequence.
|
|
@@ -10,37 +10,26 @@ metadata:
|
|
|
10
10
|
|
|
11
11
|
## Use when
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
A defect or performance regression has no demonstrated cause yet.
|
|
14
14
|
|
|
15
15
|
## Process
|
|
16
16
|
|
|
17
|
-
1.
|
|
18
|
-
2.
|
|
19
|
-
3.
|
|
20
|
-
4.
|
|
21
|
-
5.
|
|
22
|
-
6.
|
|
23
|
-
7.
|
|
24
|
-
8. Remove disproved causes. Stop when one cause predicts the observed failure and a controlled change removes it.
|
|
25
|
-
9. Turn the reduced reproduction into a regression test at the public seam when that seam can express the defect.
|
|
26
|
-
10. Apply the smallest fix at the point where the invalid state originates.
|
|
27
|
-
11. Re-run the reduced test and the original reproduction, then remove diagnostic artifacts.
|
|
17
|
+
1. State the input, actual result, and expected result. Find the fastest repeatable command that reaches the failing path.
|
|
18
|
+
2. Reproduce the reported failure, then remove inputs or steps while preserving it.
|
|
19
|
+
3. Trace where correct state first becomes incorrect. List plausible causes and an observation that would disprove each.
|
|
20
|
+
4. Probe one cause at a time with a debugger, targeted instrumentation, timings, or controlled inputs.
|
|
21
|
+
5. Stop when a cause predicts the symptom and a controlled change removes it.
|
|
22
|
+
6. Preserve the reproduction as a regression test through a stable public interface where practical. Fix the cause at its origin.
|
|
23
|
+
7. Run the reduced and original reproductions, then remove temporary diagnostics.
|
|
28
24
|
|
|
29
|
-
For
|
|
30
|
-
|
|
31
|
-
For a performance regression, establish a baseline measurement before forming a theory. Use profiling, timings, or query plans that separate the suspected cost from unrelated work.
|
|
25
|
+
For flaky behavior, measure the reproduction rate and control clocks, randomness, concurrency, or external responses. For performance work, establish a baseline and measure the suspected cost before changing it.
|
|
32
26
|
|
|
33
27
|
## Guardrails
|
|
34
28
|
|
|
35
|
-
|
|
36
|
-
- Instrument only boundaries that distinguish current hypotheses.
|
|
37
|
-
- Change one causal variable per probe.
|
|
38
|
-
- Treat a nearby error as a separate defect unless it explains the reported symptom.
|
|
39
|
-
- Fix the origin of invalid state rather than adding a downstream fallback that hides it.
|
|
40
|
-
- Preserve a reduced reproduction as a test only when it exercises the real failure through a stable seam.
|
|
29
|
+
Redact sensitive traces and paths before reporting them. Change one causal variable per probe. Keep unrelated defects out of the fix and avoid fallbacks that merely hide invalid state.
|
|
41
30
|
|
|
42
|
-
If
|
|
31
|
+
If reproduction fails, report what was tried and the missing evidence. Do not turn an unverified theory into a production change.
|
|
43
32
|
|
|
44
33
|
## Completion
|
|
45
34
|
|
|
46
|
-
|
|
35
|
+
The cause explains the original symptom, the fix passes both reproductions and affected checks, and temporary instrumentation is gone.
|
|
@@ -10,31 +10,22 @@ metadata:
|
|
|
10
10
|
|
|
11
11
|
## Use when
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
A confirmed defect has a focused test and a fix. Verify that the test can detect the original failure.
|
|
14
14
|
|
|
15
15
|
## Process
|
|
16
16
|
|
|
17
|
-
1. Identify the smallest production
|
|
18
|
-
2.
|
|
19
|
-
3.
|
|
20
|
-
4.
|
|
21
|
-
5.
|
|
22
|
-
6. Reject the test if it passes, fails during setup, or fails for an unrelated reason. Improve the seam or assertion before continuing.
|
|
23
|
-
7. Restore the enforcing line exactly.
|
|
24
|
-
8. Print the restored lines and run the same test again.
|
|
25
|
-
9. Run the affected suite to ensure the proof mutation left no residue.
|
|
17
|
+
1. Identify the smallest production change that enforces the fix.
|
|
18
|
+
2. Temporarily invert it to restore the defect while keeping the code compilable.
|
|
19
|
+
3. Print the changed lines with file and line numbers. Run the narrow test and confirm its assertion fails on the original symptom.
|
|
20
|
+
4. If it passes or fails for another reason, improve the test before claiming coverage.
|
|
21
|
+
5. Restore and display the enforcing lines, then rerun the same test and affected suite.
|
|
26
22
|
|
|
27
23
|
## Guardrails
|
|
28
24
|
|
|
29
|
-
|
|
30
|
-
- Mutate production behavior rather than weakening the test.
|
|
31
|
-
- Preserve a clean working tree outside the lines involved in the proof.
|
|
32
|
-
- Avoid destructive history commands to simulate the regression.
|
|
33
|
-
- Treat a setup error, compiler error, timeout, or different assertion as a failed proof.
|
|
34
|
-
- Restore before changing anything else so later failures cannot inherit the mutation.
|
|
25
|
+
Keep the mutation local and reversible. Preserve unrelated work and avoid destructive Git operations. Mutate production behavior, not the assertion.
|
|
35
26
|
|
|
36
|
-
|
|
27
|
+
A setup error, compilation failure, timeout, or unrelated assertion does not prove the regression. Restore the code before starting other work. Broaden the proof only when the fix covers distinct public behaviors.
|
|
37
28
|
|
|
38
29
|
## Completion
|
|
39
30
|
|
|
40
|
-
The
|
|
31
|
+
The visible inverse fails the intended assertion, restoration passes, and the final diff contains no proof mutation.
|
|
@@ -10,31 +10,22 @@ metadata:
|
|
|
10
10
|
|
|
11
11
|
## Use when
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
An implementation decision depends on external facts or behavior that varies by version.
|
|
14
14
|
|
|
15
15
|
## Process
|
|
16
16
|
|
|
17
|
-
1.
|
|
18
|
-
2.
|
|
19
|
-
3.
|
|
20
|
-
4.
|
|
21
|
-
5.
|
|
22
|
-
6. Compare the evidence with the repository's installed version and current code path.
|
|
23
|
-
7. Resolve disagreements by authority and applicability. State when the sources describe different versions or environments.
|
|
24
|
-
8. Write the conclusion beside links that directly support each consequential claim.
|
|
25
|
-
9. Translate the conclusion into the smallest implementation constraint the code needs.
|
|
17
|
+
1. State the decision as an answerable question. Record the project's relevant version, runtime, platform, and constraints.
|
|
18
|
+
2. Find the specification, official documentation, implementation, release note, or first-party issue that defines the behavior.
|
|
19
|
+
3. Open the exact source and check its version and date. Trace consequential claims back from summaries.
|
|
20
|
+
4. Compare the evidence with the installed version and code path. Explain disagreements caused by different environments or versions.
|
|
21
|
+
5. Give the conclusion with direct supporting links and the implementation constraint it creates.
|
|
26
22
|
|
|
27
23
|
## Guardrails
|
|
28
24
|
|
|
29
|
-
|
|
30
|
-
- Prefer current first-party sources for changing APIs and compatibility claims.
|
|
31
|
-
- Distinguish a documented guarantee from behavior inferred from source code.
|
|
32
|
-
- Mark an inference as an inference and name the observations it connects.
|
|
33
|
-
- Quote only the minimum words needed to preserve exact terminology.
|
|
34
|
-
- Keep credentials, private URLs, and captured user data out of research notes.
|
|
25
|
+
Search snippets are leads; read the underlying source. Distinguish documented guarantees from inferences and identify the observations supporting an inference.
|
|
35
26
|
|
|
36
|
-
|
|
27
|
+
Quote sparingly and keep credentials, private URLs, and captured user data out of research notes. If authoritative evidence is unavailable, state the unknown and contain it behind a reversible implementation choice.
|
|
37
28
|
|
|
38
29
|
## Completion
|
|
39
30
|
|
|
40
|
-
|
|
31
|
+
The question has a supported answer or an explicit unknown, and the resulting constraint is clear enough to implement.
|
|
@@ -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.
|