@ai-agent-lead/skills 1.3.0 → 1.5.0
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 +30 -0
- package/package.json +1 -1
- package/skills/README.md +29 -20
- package/skills/SKILL-TEMPLATE.md +9 -3
- package/skills/TRIGGERS.md +3 -3
- package/skills/WORKFLOWS.md +17 -16
- package/skills/bench/SKILL.md +20 -4
- package/skills/bootstrap/SKILL.md +24 -15
- package/skills/caveman/SKILL.md +1 -3
- package/skills/debug/SKILL.md +0 -2
- package/skills/design/ILLEGAL-STATES.md +12 -1
- package/skills/design/SKILL.md +10 -3
- package/skills/design/templates/design-note.md +47 -0
- package/skills/feature-doc/SKILL.md +12 -20
- package/skills/{code-hygiene/SKILL.md → formats/CODE-HYGIENE.md} +24 -29
- package/skills/formats/CONTEXT-FORMAT.md +5 -5
- package/skills/formats/CONTEXT-MAP-FORMAT.md +14 -3
- package/skills/formats/CONVENTION-FORMAT.md +40 -0
- package/skills/formats/DOC-DRIFT-AUDIT.md +56 -0
- package/skills/formats/OKF.md +13 -9
- package/skills/formats/{STYLE-comments.md → STYLE-COMMENTS.md} +1 -1
- package/skills/grill-plan/SKILL.md +5 -3
- package/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +1 -1
- package/skills/improve-codebase-architecture/SKILL.md +7 -18
- package/skills/investigate/SKILL.md +14 -2
- package/skills/pr-review/SKILL.md +7 -22
- package/skills/prod-ready/SKILL.md +16 -17
- package/skills/security-review/SKILL.md +12 -4
- package/skills/simplify/SKILL.md +6 -15
- package/skills/system-design/SKILL.md +29 -19
- package/skills/tdd/SKILL.md +5 -6
- package/skills/tdd-rounds/COMMITS.md +4 -4
- package/skills/tdd-rounds/SKILL.md +33 -9
- package/skills/tdd-rounds/templates/builder-brief.md +4 -4
- package/skills/verify-real-deps/SKILL.md +16 -4
- package/skills/verify-real-deps/templates/known-issues.md +33 -28
- package/skills/zoom-out/SKILL.md +1 -3
- package/skills/sync-check/SKILL.md +0 -69
- /package/skills/{design → formats}/OBSERVABILITY.md +0 -0
- /package/skills/{design → formats}/PERSONAS.md +0 -0
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: security-review
|
|
3
3
|
description: Threat-model + control-review pass for surface-changing work — runs alongside `tdd` and as a heavier gate than `prod-ready` Section 3 when the change introduces or alters trust boundaries, authentication, authorization, sensitive data flows, or external surfaces. Use when the user mentions "security review", "threat model", "STRIDE", "auth flow", "permissions", "secrets", "PII", "public API", "external surface", "abuse", "hardening", or whenever a feature doc / PR adds a new entry point, identity flow, or sensitive-data path. Skip for pure-internal refactors with no surface change, dependency bumps that don't change runtime behavior, or doc-only changes. Pairs with `feature-doc` (informs the threat model) and `prod-ready` (which has the lighter operational-security checklist for every change).
|
|
4
|
-
complexity: high
|
|
5
|
-
expected_duration: 30 minutes
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
# Security Review
|
|
@@ -118,7 +116,17 @@ Most reviews produce a **`## Security review` section appended to the feature do
|
|
|
118
116
|
- <risk> — accepted because <reason>; tracked at <link or follow-up>
|
|
119
117
|
```
|
|
120
118
|
|
|
121
|
-
For high-stakes changes (new auth flow, new external surface, regulated data), promote to `docs/security/<feature>.md` with a fuller threat-model section
|
|
119
|
+
For high-stakes changes (new auth flow, new external surface, regulated data), promote to a dedicated `docs/security/<feature>.md` with a fuller threat-model section — same shape, just longer. As a standalone produced doc it opens with OKF frontmatter (`type: security`, per [`../formats/OKF.md`](../formats/OKF.md) §2); the `## Security review` section appended to a feature doc needs none, since the feature doc already carries its own:
|
|
120
|
+
|
|
121
|
+
```yaml
|
|
122
|
+
---
|
|
123
|
+
type: security
|
|
124
|
+
title: <Feature> security review
|
|
125
|
+
description: Threat model and verified controls for <feature>'s surface change.
|
|
126
|
+
tags: [security, threat-model]
|
|
127
|
+
timestamp: YYYY-MM-DD
|
|
128
|
+
---
|
|
129
|
+
```
|
|
122
130
|
|
|
123
131
|
## Anti-patterns
|
|
124
132
|
|
|
@@ -141,5 +149,5 @@ For high-stakes changes (new auth flow, new external surface, regulated data), p
|
|
|
141
149
|
- The security surface (entry points + trust zones + data flows) is named, not assumed.
|
|
142
150
|
- Each plausible threat has a verified control or an explicit deferral with rationale.
|
|
143
151
|
- High-impact threats have two independent layers of control where feasible.
|
|
144
|
-
- The artifact
|
|
152
|
+
- The artifact is in the repo — a `## Security review` feature-doc section, or a standalone `docs/security/<feature>.md` opening with `type: security` OKF frontmatter.
|
|
145
153
|
- The PR description references the review so the reviewer can audit it.
|
package/skills/simplify/SKILL.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: simplify
|
|
3
|
-
description: Single end-of-round sweep that tightens what `tdd` just left green — review every changed file for reuse, quality, efficiency,
|
|
4
|
-
complexity: low
|
|
5
|
-
expected_duration: 10 minutes
|
|
3
|
+
description: Single end-of-round sweep that tightens what `tdd` just left green — review every changed file for reuse, quality, efficiency, test relevance, and telemetry. Use after `tdd` reaches green and before opening a PR (or before a Builder closes a round in `tdd-rounds`). Triggered by phrases like "simplify pass", "tighten this", "clean up before commit", "end-of-round sweep", or appearing as a step in a Builder brief. Skip for trivial diffs (typo, dep bump, doc-only). Pairs with `tdd` (runs immediately after green), the `code-hygiene` lens (`formats/CODE-HYGIENE.md`, applied during the sweep), and `pr-review` (a self-check after this).
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
# Simplify
|
|
@@ -34,7 +32,7 @@ The simplify pass catches these once, deliberately, before the diff lands. Witho
|
|
|
34
32
|
- Slices where the diff is one or two lines and there's nothing to sweep.
|
|
35
33
|
- During red phase — never refactor while red. See [`tdd/SKILL.md`](../tdd/SKILL.md).
|
|
36
34
|
|
|
37
|
-
## The
|
|
35
|
+
## The five lenses
|
|
38
36
|
|
|
39
37
|
Walk every changed file. Apply each lens in order. Fix what you find inline.
|
|
40
38
|
|
|
@@ -49,14 +47,7 @@ Walk every changed file. Apply each lens in order. Fix what you find inline.
|
|
|
49
47
|
- Names that read clearly out of context — would a stranger guess what `result`, `data`, `value` referred to? If not, rename.
|
|
50
48
|
- Error messages that name the failing input — `"could not parse: <value>"` beats `"parse error"`.
|
|
51
49
|
- Abstractions that haven't earned their keep — a base class with one subclass, an interface with one implementation. Inline.
|
|
52
|
-
- Comments — **default during the sweep is DELETE
|
|
53
|
-
- Delete WHAT-comments (the code already says it).
|
|
54
|
-
- Delete docstrings on exports whose contract is obvious from the signature.
|
|
55
|
-
- Delete "used by X" / "added for Y" caller references — these rot; use grep.
|
|
56
|
-
- Delete commented-out code (git has it).
|
|
57
|
-
- Delete banner / ASCII-art dividers and in-function section headers (`// validate`, `// build response`).
|
|
58
|
-
- KEEP only why-comments — constraint, invariant, trade-off, provenance — and only when the next reader would otherwise reattempt the rejected alternative.
|
|
59
|
-
- If a kept comment cites a round / ADR / AC / snapshot, normalize to [`skills/formats/STYLE-comments.md`](../formats/STYLE-comments.md) §3 (`ADR-007 §7`, `R6 AC-3`, `v0.3 R1b2`, `snapshot §"Invariants"`).
|
|
50
|
+
- Comments — **default during the sweep is DELETE.** Apply [`CODE-HYGIENE.md`](../formats/CODE-HYGIENE.md) Principle 6 and the bar in [`STYLE-COMMENTS.md`](../formats/STYLE-COMMENTS.md): delete WHAT-comments, obvious-from-signature docstrings, "used by X" caller references, commented-out code, banners, and in-function section headers (`// validate`, `// build response`); keep only why-comments the next reader would otherwise reattempt. Normalize any kept citation (`ADR-007 §7`, `R6 AC-3`, `v0.3 R1b2`) to [`STYLE-COMMENTS.md`](../formats/STYLE-COMMENTS.md) §3.
|
|
60
51
|
|
|
61
52
|
### 3. Efficiency — dead code, redundant work, premature defensive checks
|
|
62
53
|
|
|
@@ -76,7 +67,7 @@ For each test added in the slice:
|
|
|
76
67
|
|
|
77
68
|
### 5. Telemetry — the observability pass
|
|
78
69
|
|
|
79
|
-
Apply the lens from [`skills/
|
|
70
|
+
Apply the lens from [`skills/formats/OBSERVABILITY.md`](../formats/OBSERVABILITY.md):
|
|
80
71
|
|
|
81
72
|
- [ ] Does every error message name the failing input?
|
|
82
73
|
- [ ] Are there any "catch-all" blocks that swallow errors?
|
|
@@ -100,13 +91,13 @@ In single-feature flow (no rounds), the sweep can land as a separate commit befo
|
|
|
100
91
|
## Pairing with other skills
|
|
101
92
|
|
|
102
93
|
- **`tdd`** runs first. Simplify runs after green. Never simplify while red.
|
|
103
|
-
-
|
|
94
|
+
- **[`code-hygiene`](../formats/CODE-HYGIENE.md)** is the lens — its seven principles (boring code, naming, YAGNI, rule of 3, locality, comments, constants placement) are what you apply during the sweep. Read it once; apply it many times.
|
|
104
95
|
- **`pr-review`** comes after — a self-check against the diff. Some of the same lenses, applied as a reviewer rather than an author.
|
|
105
96
|
- **`improve-codebase-architecture`** is the escalation — when simplify surfaces structural issues bigger than a sweep can fix.
|
|
106
97
|
|
|
107
98
|
## Done when
|
|
108
99
|
|
|
109
|
-
- Every changed file walked once with the
|
|
100
|
+
- Every changed file walked once with the five lenses.
|
|
110
101
|
- Each finding either fixed inline (small) or surfaced as a follow-up (large).
|
|
111
102
|
- Tests still green after the sweep — re-run them.
|
|
112
103
|
- A separate `simplify` commit exists (in `tdd-rounds`) or the sweep is captured in the final commit message (in single-feature flow).
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: system-design
|
|
3
3
|
description: System-level architecture for greenfield work — name the modules, define responsibilities, set dependency direction, identify seams. Use when starting a new multi-module system or service from scratch, when defining topology before code lands, or when the user mentions "system architecture", "module boundaries", "service boundaries", "how should I structure this system", "draw the architecture", "topology". Skip for single-module work — use `design` instead. Skip for reorganizing an existing codebase — use `improve-codebase-architecture`. Pairs with `investigate` (comes before, surveying options) and `design` (comes after, shaping each module's interface).
|
|
4
|
-
complexity: high
|
|
5
|
-
expected_duration: 30 minutes
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
# System Design
|
|
@@ -38,7 +36,7 @@ Before drawing anything, read what already exists:
|
|
|
38
36
|
- `docs/adr/` — decisions already taken.
|
|
39
37
|
- The feature set — what the system has to do.
|
|
40
38
|
|
|
41
|
-
If `CONTEXT.md` doesn't exist yet, **resolve the core domain terms first** — defer to [`grill-plan` bootstrap mode](../
|
|
39
|
+
If `CONTEXT.md` doesn't exist yet, **resolve the core domain terms first** — defer to [`grill-plan` bootstrap mode](../bootstrap/BOOTSTRAP.md) (single source of truth for the lazy-creation rules). Module names without domain terms are placeholders.
|
|
42
40
|
|
|
43
41
|
### 2. List the modules
|
|
44
42
|
|
|
@@ -80,7 +78,19 @@ Each seam is a potential test boundary AND a potential failure point. Naming the
|
|
|
80
78
|
|
|
81
79
|
### 5. Draw the system map
|
|
82
80
|
|
|
83
|
-
Output an ASCII diagram + a module table + a seam list
|
|
81
|
+
Output an ASCII diagram + a module table + a seam list, saved to `docs/architecture.md` (create lazily on first use). It's a produced doc, so it opens with OKF frontmatter (`type: architecture`, per [`../formats/OKF.md`](../formats/OKF.md) §2):
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
---
|
|
85
|
+
type: architecture
|
|
86
|
+
title: <System> architecture
|
|
87
|
+
description: Module topology, dependency direction, and seams for <system>.
|
|
88
|
+
tags: [architecture, topology]
|
|
89
|
+
timestamp: YYYY-MM-DD
|
|
90
|
+
---
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Below the frontmatter, the body — ASCII map, module table, seam list:
|
|
84
94
|
|
|
85
95
|
```
|
|
86
96
|
┌──────────────┐
|
|
@@ -127,14 +137,6 @@ Before declaring the design done, check each item:
|
|
|
127
137
|
|
|
128
138
|
Failures here are not "warnings" — they're "stop and rework". The system map is load-bearing for everything downstream.
|
|
129
139
|
|
|
130
|
-
## Done when
|
|
131
|
-
|
|
132
|
-
- `docs/architecture.md` exists with: module table, dependency direction, seam list, ASCII map.
|
|
133
|
-
- Each module name comes from `CONTEXT.md` vocabulary (not framework conventions).
|
|
134
|
-
- The dependency graph is acyclic and explicitly reviewed.
|
|
135
|
-
- Every cross-module boundary has a named seam + adapter location.
|
|
136
|
-
- For any decision you're least sure about, you've raised it as an open question to the user before locking in.
|
|
137
|
-
|
|
138
140
|
## Anti-patterns
|
|
139
141
|
|
|
140
142
|
- **Layering instead of slicing.** Naming modules `controllers`, `services`, `repositories` is layering — a category split, not a responsibility split. Prefer feature slicing (`ordering/`, `billing/`).
|
|
@@ -142,6 +144,21 @@ Failures here are not "warnings" — they're "stop and rework". The system map i
|
|
|
142
144
|
- **Premature service extraction.** Splitting modules into separate processes / deployments without a real reason (scale, team, fault isolation) adds operational cost without clarity benefit. Prefer in-process modules first; extract later if needed.
|
|
143
145
|
- **Cycles "for now".** A cyclic dependency is a sign the modules aren't really separate. Don't accept it; merge them or insert a third module to break the cycle.
|
|
144
146
|
|
|
147
|
+
## Pairing with other skills
|
|
148
|
+
|
|
149
|
+
- **`investigate`** runs *before*. Investigates the problem and chooses the direction. `system-design` then operationalizes the chosen direction into a topology.
|
|
150
|
+
- **`design`** runs *after*, per module. `system-design` says what modules should exist; `design` says what shape each module has.
|
|
151
|
+
- **`grill-plan`** runs alongside or after, to stress-test high-stakes topology decisions.
|
|
152
|
+
- **`improve-codebase-architecture`** is the *opposite* skill: given an existing codebase, find what to deepen. `system-design` is greenfield; that one is brownfield.
|
|
153
|
+
|
|
154
|
+
## Done when
|
|
155
|
+
|
|
156
|
+
- `docs/architecture.md` exists, opening with `type: architecture` OKF frontmatter, and contains: module table, dependency direction, seam list, ASCII map.
|
|
157
|
+
- Each module name comes from `CONTEXT.md` vocabulary (not framework conventions).
|
|
158
|
+
- The dependency graph is acyclic and explicitly reviewed.
|
|
159
|
+
- Every cross-module boundary has a named seam + adapter location.
|
|
160
|
+
- For any decision you're least sure about, you've raised it as an open question to the user before locking in.
|
|
161
|
+
|
|
145
162
|
## Handoff
|
|
146
163
|
|
|
147
164
|
Once the system map is stable:
|
|
@@ -151,10 +168,3 @@ Once the system map is stable:
|
|
|
151
168
|
- Then proceed to `feature-doc` for the first feature using the topology.
|
|
152
169
|
|
|
153
170
|
If the system map needs to evolve later (new module, changed boundaries, removed seam), come back to this skill — don't drift the map silently.
|
|
154
|
-
|
|
155
|
-
## Pairing with other skills
|
|
156
|
-
|
|
157
|
-
- **`investigate`** runs *before*. Investigates the problem and chooses the direction. `system-design` then operationalizes the chosen direction into a topology.
|
|
158
|
-
- **`design`** runs *after*, per module. `system-design` says what modules should exist; `design` says what shape each module has.
|
|
159
|
-
- **`grill-plan`** runs alongside or after, to stress-test high-stakes topology decisions.
|
|
160
|
-
- **`improve-codebase-architecture`** is the *opposite* skill: given an existing codebase, find what to deepen. `system-design` is greenfield; that one is brownfield.
|
package/skills/tdd/SKILL.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tdd
|
|
3
|
-
description: Test-driven development with the red-green-refactor loop. Use when implementing a feature, fixing a bug, changing core logic, or when the user mentions "TDD", "test-first", "red-green-refactor", or "integration tests". Skip for trivial UI glue, config changes, or pure docs edits.
|
|
4
|
-
complexity: medium
|
|
5
|
-
expected_duration: 20 minutes
|
|
3
|
+
description: Test-driven development with the red-green-refactor loop. Use when implementing a feature, fixing a bug, changing core logic, or when the user mentions "TDD", "test-first", "red-green-refactor", or "integration tests". Skip for trivial UI glue, config changes, or pure docs edits. Pairs with `feature-doc` (its ACs become the test list), `debug` (run first when the root cause isn't yet known), and `simplify` (the end-of-round sweep after green).
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
# Test-Driven Development
|
|
@@ -33,9 +31,9 @@ Tests verify **behavior through public interfaces**, not implementation details.
|
|
|
33
31
|
|
|
34
32
|
See [TESTS.md](TESTS.md) for concrete good/bad examples and a pre-commit checklist.
|
|
35
33
|
|
|
36
|
-
##
|
|
34
|
+
## Slice vertically, one test at a time
|
|
37
35
|
|
|
38
|
-
**Do not write all tests first, then all implementation.** This is the most common TDD failure mode for AI agents — you write five tests in one shot, then five matching functions. The tests describe *imagined* behavior, become insensitive to real bugs, and lock in the wrong shape.
|
|
36
|
+
The principle that drives the workflow below. **Do not write all tests first, then all implementation.** This is the most common TDD failure mode for AI agents — you write five tests in one shot, then five matching functions. The tests describe *imagined* behavior, become insensitive to real bugs, and lock in the wrong shape.
|
|
39
37
|
|
|
40
38
|
```
|
|
41
39
|
WRONG (horizontal):
|
|
@@ -74,7 +72,7 @@ One test → minimum code to pass → next test. Each cycle informs the next.
|
|
|
74
72
|
|
|
75
73
|
### 4. Simplify pass — end-of-round, after green
|
|
76
74
|
|
|
77
|
-
Before declaring the round done, run the [`simplify`](../simplify/SKILL.md) skill. It walks every changed file with
|
|
75
|
+
Before declaring the round done, run the [`simplify`](../simplify/SKILL.md) skill. It walks every changed file with five lenses — reuse, quality, efficiency, test relevance, telemetry — and is a single sweep, not a license to refactor everything. If you find structural issues that need a dedicated round, surface them as `Open questions for parent` instead.
|
|
78
76
|
|
|
79
77
|
## Rules
|
|
80
78
|
|
|
@@ -92,6 +90,7 @@ Before declaring the round done, run the [`simplify`](../simplify/SKILL.md) skil
|
|
|
92
90
|
|
|
93
91
|
## Anti-patterns
|
|
94
92
|
|
|
93
|
+
- Horizontal slicing — all tests first, then all implementation. See *Slice vertically, one test at a time* above; it's the failure mode this skill most guards against.
|
|
95
94
|
- Writing tests after the code "to get coverage" — defeats the design feedback loop.
|
|
96
95
|
- Mocking everything — tests pass but the system is broken. Mock at boundaries only (external APIs, time, randomness).
|
|
97
96
|
- One giant test asserting many things — failures become hard to diagnose.
|
|
@@ -38,10 +38,10 @@ End-of-round refactoring (extracting helpers, removing dead branches, tightening
|
|
|
38
38
|
|
|
39
39
|
### 5. Doc-only commits stay separate from code
|
|
40
40
|
|
|
41
|
-
`docs/
|
|
41
|
+
`docs/features/<name>.state.md`, `docs/known-issues.md`, ADR patches — never bundle into a code commit. Mixing makes both diffs harder to read. Doc-only commits get a `docs:` prefix (no `R<N>:`):
|
|
42
42
|
|
|
43
43
|
```
|
|
44
|
-
docs: append actual R14 entry to
|
|
44
|
+
docs: append actual R14 entry to <name>.state.md
|
|
45
45
|
docs: add public README
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -55,7 +55,7 @@ If you can't justify it, don't lump it.
|
|
|
55
55
|
|
|
56
56
|
### 7. Commit messages are honest
|
|
57
57
|
|
|
58
|
-
The commit message states what the commit actually does, not what you wished it did. The lesson from this skill's source project: an R14 commit message claimed "
|
|
58
|
+
The commit message states what the commit actually does, not what you wished it did. The lesson from this skill's source project: an R14 commit message claimed "state file updated" but the Builder had forgotten that file — a follow-up commit was needed to restore truth. **Cost of an honest message: one extra line of typing. Cost of a lying message: a follow-up commit, a smudged history, and a lost minute the next time someone wonders why the round entry is missing.**
|
|
59
59
|
|
|
60
60
|
If a step you described in the brief didn't actually land, say so in `Deviations`. If a commit's diff doesn't match its message, fix the message before committing — or split into two commits if the message's intent really was two things.
|
|
61
61
|
|
|
@@ -109,7 +109,7 @@ Use whatever model line matches the actual driver. Match exactly the convention
|
|
|
109
109
|
## Anti-patterns
|
|
110
110
|
|
|
111
111
|
- **Mono-commit at end of round.** "R<N>: round done." Defeats the per-slice review story.
|
|
112
|
-
- **Bundling docs with code.**
|
|
112
|
+
- **Bundling docs with code.** State-file updates ride along with the code change. Diffs become harder to read.
|
|
113
113
|
- **Imperative-mood squashing.** Four sequential "wip" commits eventually amended into one. The journey isn't the commit; the destination is. Don't force-amend; commit cleanly the first time.
|
|
114
114
|
- **Empty bodies on non-trivial commits.** "fix bug" with no body. The body is where the *why* lives.
|
|
115
115
|
- **Lying about scope.** A commit message saying "also updates X" when the diff has no X. Worse than no message.
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: tdd-rounds
|
|
3
|
-
description: Multi-round TDD orchestration. Use when delivering a feature larger than one TDD slice — typically 5-15 acceptance criteria across multiple packages — by dispatching Builder sub-agents per round, with the parent maintaining state and verifying. Triggered when the user mentions "drive the sub-agent team", "multi-round TDD", "orchestrate rounds", "Builder agents", or when a plan from `feature-doc` lists more ACs than one agent should reasonably tackle in a single invocation. Pairs with `tdd` (Builders invoke that skill per round) and `prod-ready` (final round before tag).
|
|
4
|
-
complexity: high
|
|
5
|
-
expected_duration: 1 hour
|
|
3
|
+
description: Multi-round TDD orchestration. Use when delivering a feature larger than one TDD slice — typically 5-15 acceptance criteria across multiple packages — by dispatching Builder sub-agents per round, with the parent maintaining state and verifying. Triggered when the user mentions "drive the sub-agent team", "multi-round TDD", "orchestrate rounds", "Builder agents", or when a plan from `feature-doc` lists more ACs than one agent should reasonably tackle in a single invocation. Skip for a single-AC bug fix or single-package feature — invoke `tdd` directly, with no round overhead. Pairs with `tdd` (Builders invoke that skill per round) and `prod-ready` (final round before tag).
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
# Multi-Round TDD Orchestration
|
|
@@ -25,8 +23,8 @@ Distills the pattern of a parent agent driving Builder sub-agents through a feat
|
|
|
25
23
|
- **Dispatch on a feature branch, never `main`.** Verify the current branch before dispatching the first Builder; if it's `main` / `master`, create `feat/<short-name>` first. The whole multi-round delivery lives on one feature branch (or a stack of feature branches), merged to `main` only at the end.
|
|
26
24
|
- **Plan once.** The plan file lists rounds, each round's ACs, the dependency order, and the skills cadence per round (which rounds need `design`; when to invoke `improve-codebase-architecture` mid-project; when to invoke `prod-ready`).
|
|
27
25
|
- **Brief per round.** A self-contained brief — the Builder shouldn't need conversation history.
|
|
28
|
-
- **Briefing Sub-agent**: For complex rounds, invoke a sub-agent to autonomously generate the brief by analyzing `docs/
|
|
29
|
-
- **Verify after each round.** Run the test command independently (don't trust the Builder's pasted output), read the diff, tick AC checkboxes in the feature doc with the test name, append a round summary to `docs/
|
|
26
|
+
- **Briefing Sub-agent**: For complex rounds, invoke a sub-agent to autonomously generate the brief by analyzing the feature's `docs/features/<name>.state.md`, the `feature-doc`, and the results of the previous round. See `templates/builder-brief.md` for the schema.
|
|
27
|
+
- **Verify after each round.** Run the test command independently (don't trust the Builder's pasted output), read the diff, tick AC checkboxes in the feature doc with the test name, append a round summary to `docs/features/<name>.state.md`.
|
|
30
28
|
- **Never write code yourself.** If you find yourself doing it directly under time pressure, that's a signal the round was misscoped — split it.
|
|
31
29
|
|
|
32
30
|
## The Builder's contract
|
|
@@ -34,7 +32,7 @@ Distills the pattern of a parent agent driving Builder sub-agents through a feat
|
|
|
34
32
|
When dispatched for a round, the Builder:
|
|
35
33
|
|
|
36
34
|
0. **Pre-flight.** Verifies the current branch is **not** `main` / `master`. If it is, refuses immediately and returns a blocking report — does not proceed to step 1.
|
|
37
|
-
1. Reads the brief, the plan file, `docs/
|
|
35
|
+
1. Reads the brief, the plan file, the feature's `docs/features/<name>.state.md`, and any ADRs / feature docs the brief cites.
|
|
38
36
|
2. **Executes the listed skills sequentially in this single invocation.** When a brief says "Skills (in order): design, tdd, simplify" — that means run all three in this run, not return to the parent between them. This rule is non-obvious; the brief template makes it explicit.
|
|
39
37
|
3. Commits per AC slice (or per behavior slice for refactor rounds), prefix `R<N>:`. **Read [`COMMITS.md`](COMMITS.md) before the first commit** — it captures the seven rules (`R<N>:` prefix, `#<X>` for bug fixes, per-AC slicing, separate simplify-pass commit, separate doc commits, single-commit-with-justification, honest messages) and the message-body shape. The parent reads commits as the review surface; a clean sequence is reviewable one diff at a time, a mono-commit isn't.
|
|
40
38
|
4. Returns the structured report from `templates/builder-report.md`.
|
|
@@ -46,18 +44,28 @@ When dispatched for a round, the Builder:
|
|
|
46
44
|
|---|---|---|
|
|
47
45
|
| [`design`](../design/SKILL.md) | Builder | Rounds introducing a new package or non-trivial interface. Skip on rounds that only extend existing modules. |
|
|
48
46
|
| [`tdd`](../tdd/SKILL.md) | Builder | **Every** code-writing round. Mandatory. |
|
|
49
|
-
| [`simplify`](../simplify/SKILL.md) | Builder | End of every round, after green. Single sweep — reuse / quality / efficiency / test relevance. Lands as its own commit ([COMMITS.md rule 4](COMMITS.md)). |
|
|
47
|
+
| [`simplify`](../simplify/SKILL.md) | Builder | End of every round, after green. Single sweep — reuse / quality / efficiency / test relevance / telemetry. Lands as its own commit ([COMMITS.md rule 4](COMMITS.md)). |
|
|
50
48
|
| [`improve-codebase-architecture`](../improve-codebase-architecture/SKILL.md) | **Parent** | Once mid-project, after the load-bearing seams exist. Surfaced opportunities become dedicated refactor rounds (no behavior change; ACs are "all existing tests still green"). |
|
|
51
49
|
| [`prod-ready`](../prod-ready/SKILL.md) | Builder, final round only | Pre-tag operational checklist. Output the filled checklist verbatim in the Builder's report. |
|
|
52
50
|
| [`verify-real-deps`](../verify-real-deps/SKILL.md) | **Parent** | After `prod-ready` clean, before tagging. Catches what unit/integration tests can't see — wire-shape mismatches against real third-party APIs. |
|
|
53
51
|
|
|
54
52
|
## State tracking
|
|
55
53
|
|
|
56
|
-
`docs/
|
|
54
|
+
Each feature has one state file, `docs/features/<name>.state.md` — a sibling to its contract (`<name>.md`) and design note (`<name>.design.md`). It is the parent-maintained running summary, append-only, ~one `## Round N` section per round. The Builder reads it as pre-flight context for the round; the parent appends after each round closes. Single source of truth for "what we have so far" between Builder invocations. There is no global `docs/STATE.md`; `docs/index.md` is the feature manifest (per [ADR-0001](../../docs/adr/0001-distributed-state.md)).
|
|
57
55
|
|
|
58
|
-
|
|
56
|
+
It is a produced doc, so it opens with OKF frontmatter (`type: state`, per [`../formats/OKF.md`](../formats/OKF.md) §2), then one section per round:
|
|
59
57
|
|
|
60
58
|
```
|
|
59
|
+
---
|
|
60
|
+
type: state
|
|
61
|
+
title: <Feature Name> — state
|
|
62
|
+
description: Round-by-round state for the <name> feature.
|
|
63
|
+
tags: [<name>, state]
|
|
64
|
+
timestamp: YYYY-MM-DD
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
# <Feature Name> — state
|
|
68
|
+
|
|
61
69
|
## Round N — <title> (DONE YYYY-MM-DD)
|
|
62
70
|
Delivered: AC-NN, AC-NN
|
|
63
71
|
New packages: <list>
|
|
@@ -89,6 +97,22 @@ Known follow-ups: <one line>
|
|
|
89
97
|
|
|
90
98
|
- [`COMMITS.md`](COMMITS.md) — commit cadence and message style (per-AC slicing, `R<N>:` prefix, when single-commit is OK, honesty rule). Builders read this before the first commit.
|
|
91
99
|
|
|
100
|
+
## Pairing with other skills
|
|
101
|
+
|
|
102
|
+
- **[`feature-doc`](../feature-doc/SKILL.md)** — runs *before*. Its AC list is what splits into rounds.
|
|
103
|
+
- **[`tdd`](../tdd/SKILL.md)** — *invoked* by every code-writing round (mandatory).
|
|
104
|
+
- **[`design`](../design/SKILL.md)**, **[`simplify`](../simplify/SKILL.md)**, **[`prod-ready`](../prod-ready/SKILL.md)**, **[`verify-real-deps`](../verify-real-deps/SKILL.md)** — *invoked* per the Skills-cadence table above.
|
|
105
|
+
- **[`improve-codebase-architecture`](../improve-codebase-architecture/SKILL.md)** — run *once by the parent* mid-project, after the load-bearing seams exist.
|
|
106
|
+
- **[`grill-plan`](../grill-plan/SKILL.md)** — *escalation* when an ADR wobbles mid-round.
|
|
107
|
+
|
|
108
|
+
## Done when
|
|
109
|
+
|
|
110
|
+
- Every AC in the feature doc is ticked with the name of the test that proves it.
|
|
111
|
+
- `docs/features/<name>.state.md` has one append-only `## Round N` section per round.
|
|
112
|
+
- The test suite was green at the end of **every** round (parent-verified independently), not only at the end.
|
|
113
|
+
- The final round ran `prod-ready`; `verify-real-deps` ran before the tag; `docs/known-issues.md` has zero `Open` entries (or explicit deferred-by-design ones).
|
|
114
|
+
- The whole delivery lived on a feature branch and merged to `main` only at the end.
|
|
115
|
+
|
|
92
116
|
## Handoff
|
|
93
117
|
|
|
94
118
|
When the final round completes:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# ROUND N — <title>
|
|
2
2
|
|
|
3
|
-
You are a Builder sub-agent in a multi-round TDD project. Read the orchestration plan and `docs/
|
|
3
|
+
You are a Builder sub-agent in a multi-round TDD project. Read the orchestration plan and the feature's `docs/features/<name>.state.md` first. **Execute design + tdd + simplify in THIS invocation. Do not stop after design.**
|
|
4
4
|
|
|
5
5
|
## Scope
|
|
6
6
|
|
|
@@ -34,18 +34,18 @@ You are a Builder sub-agent in a multi-round TDD project. Read the orchestration
|
|
|
34
34
|
## Files you must NOT touch
|
|
35
35
|
|
|
36
36
|
- closed packages: `<list>`
|
|
37
|
-
- `cli/`, `creds/`, `.claude/`, `docs/
|
|
37
|
+
- `cli/`, `creds/`, `.claude/`, `docs/features/<name>.state.md` (parent owns)
|
|
38
38
|
- ...
|
|
39
39
|
|
|
40
40
|
## Skills (in order — execute ALL in this invocation)
|
|
41
41
|
|
|
42
42
|
1. **`design`** — REQUIRED if introducing a new package or non-trivial interface. Decisions to make: <list>.
|
|
43
43
|
2. **`tdd`** — REQUIRED. Vertical slicing per AC; commit prefix `R<N>:`. Read [`tdd-rounds/COMMITS.md`](../COMMITS.md) before the first commit — it captures the per-AC slicing rule, the simplify-pass-gets-its-own-commit rule, the doc-commits-stay-separate rule, when single-commit is justified, and the message-body shape.
|
|
44
|
-
3. **[`simplify`](../../simplify/SKILL.md)** — REQUIRED end-of-round. Walk every changed file with
|
|
44
|
+
3. **[`simplify`](../../simplify/SKILL.md)** — REQUIRED end-of-round. Walk every changed file with five lenses: reuse, quality, efficiency, test relevance, telemetry. Land as its own commit (`R<N>: simplify — <summary>`).
|
|
45
45
|
|
|
46
46
|
## Pre-flight reading (in order)
|
|
47
47
|
|
|
48
|
-
1. `docs/
|
|
48
|
+
1. `docs/features/<name>.state.md` — what previous rounds delivered.
|
|
49
49
|
2. `docs/features/<feature>.md` — the AC contract.
|
|
50
50
|
3. The ADRs cited above.
|
|
51
51
|
4. <specific files the Builder needs to read before starting>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verify-real-deps
|
|
3
|
-
description: Pre-tag smoke test against real third-party APIs. Use after `prod-ready` is clean, before tagging vN.0 — the gate that catches wire-shape mismatches that fakes accept but real upstreams reject. Triggered when the user mentions "smoke test", "real API", "live verify", "before tag", or "end-to-end against actual <vendor>". Pairs with `prod-ready` (which catches ops/infra issues tests miss) and `tdd-rounds` (the orchestration that feeds into this gate).
|
|
4
|
-
complexity: high
|
|
5
|
-
expected_duration: 45 minutes
|
|
3
|
+
description: Pre-tag smoke test against real third-party APIs. Use after `prod-ready` is clean, before tagging vN.0 — the gate that catches wire-shape mismatches that fakes accept but real upstreams reject. Triggered when the user mentions "smoke test", "real API", "live verify", "before tag", or "end-to-end against actual <vendor>". Skip when there's no third-party API integration, or the "real" upstream is a staging service you fully control. Pairs with `prod-ready` (which catches ops/infra issues tests miss) and `tdd-rounds` (the orchestration that feeds into this gate).
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
# Verify Against Real Dependencies
|
|
@@ -109,10 +107,24 @@ git push --tags
|
|
|
109
107
|
|
|
110
108
|
- [`templates/known-issues.md`](templates/known-issues.md) — the bug-ledger format.
|
|
111
109
|
|
|
110
|
+
## Pairing with other skills
|
|
111
|
+
|
|
112
|
+
- **[`prod-ready`](../prod-ready/SKILL.md)** — runs *before*. This gate fires only once `prod-ready` is clean; it catches the wire-shape class `prod-ready` can't see.
|
|
113
|
+
- **[`tdd-rounds`](../tdd-rounds/SKILL.md)** — the *orchestration* that feeds this gate; each ledger entry becomes a fix-round brief the parent dispatches.
|
|
114
|
+
- **[`tdd`](../tdd/SKILL.md)** — *invoked* inside each fix-round: reproduce the surprise as a failing test before fixing.
|
|
115
|
+
|
|
116
|
+
## Done when
|
|
117
|
+
|
|
118
|
+
- The representative end-to-end flow ran against the **real** upstream with real credentials.
|
|
119
|
+
- Every surprise is captured in `docs/known-issues.md` with all six fields.
|
|
120
|
+
- The bug ledger has zero `Open` entries (or only explicit deferred-by-design ones with a tracking line).
|
|
121
|
+
- For each fixed bug, the fake / mock was tightened to reject the wrong shape too.
|
|
122
|
+
- A verification entry was appended to `docs/features/<name>.state.md`, and the release is tagged.
|
|
123
|
+
|
|
112
124
|
## Handoff
|
|
113
125
|
|
|
114
126
|
When the bug ledger is clean and the same end-to-end flow runs without surprise:
|
|
115
127
|
|
|
116
|
-
- Append a verification entry to `docs/
|
|
128
|
+
- Append a verification entry to the feature's `docs/features/<name>.state.md`: `## End-to-end smoke test (DONE YYYY-MM-DD)` with what was run and what was found.
|
|
117
129
|
- Tag the release.
|
|
118
130
|
- The bug ledger stays in `docs/known-issues.md` as a permanent post-mortem record. Future contributors read it to understand "what surprises lurk in this codebase that the test suite doesn't show."
|
|
@@ -1,56 +1,61 @@
|
|
|
1
1
|
---
|
|
2
2
|
type: known-issues
|
|
3
|
-
title: "Known issues
|
|
4
|
-
description:
|
|
5
|
-
tags: [
|
|
3
|
+
title: "Known issues"
|
|
4
|
+
description: <one sentence — what this ledger tracks>
|
|
5
|
+
tags: [known-issues]
|
|
6
6
|
timestamp: YYYY-MM-DD
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
<!-- Frontmatter is OKF per skills/formats/OKF.md (`type: known-issues`).
|
|
10
|
-
`timestamp` tracks the last edit; the Discovered line below pins the first run. -->
|
|
9
|
+
<!-- Frontmatter is OKF per skills/formats/OKF.md (`type: known-issues`). One per repo: docs/known-issues.md. -->
|
|
11
10
|
|
|
12
|
-
# Known issues
|
|
11
|
+
# Known issues
|
|
13
12
|
|
|
14
|
-
**
|
|
15
|
-
**Status:** <N> open / <M> closed.
|
|
13
|
+
This file has **two modes** — use whichever fits (a repo may use both, under separate headings). Delete the mode you don't need.
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
- **A — Smoke-test bug ledger** (`verify-real-deps`): bugs the first real-upstream run surfaced that tests missed. Each entry doubles as the brief for its fix-round.
|
|
16
|
+
- **B — Accepted-but-unimplemented follow-ups** (`tdd-rounds`, deferrals): work that's agreed but not done yet — e.g. an ADR accepted but not implemented. Each entry names the artifact that *claims* it's done, the real state, and the next step.
|
|
18
17
|
|
|
19
18
|
---
|
|
20
19
|
|
|
21
|
-
##
|
|
20
|
+
## A — Smoke-test bug ledger
|
|
21
|
+
|
|
22
|
+
**Discovered:** YYYY-MM-DD (first end-to-end run against real <upstream>).
|
|
23
|
+
**Status:** <N> open / <M> closed.
|
|
24
|
+
|
|
25
|
+
### #N — <one-line title>
|
|
22
26
|
|
|
23
27
|
**Severity:** High | Medium | Low — <one-line reason based on user impact>.
|
|
24
|
-
**Status:** Open | Closed in R<N> (commit <hash>). Tests:
|
|
25
|
-
`TestNameOne`,
|
|
26
|
-
`TestNameTwo`.
|
|
28
|
+
**Status:** Open | Closed in R<N> (commit <hash>). Tests: `TestOne`, `TestTwo`.
|
|
27
29
|
|
|
28
30
|
**Reproduction:**
|
|
29
31
|
1. <numbered step a stranger could follow>
|
|
30
|
-
2. <
|
|
31
|
-
3. <expected vs observed>
|
|
32
|
+
2. <expected vs observed>
|
|
32
33
|
|
|
33
|
-
**Root cause:** <one paragraph — why the test passed but the real API didn't
|
|
34
|
+
**Root cause:** <one paragraph — why the test passed but the real API didn't: the harness's permissive behavior, the real contract, the gap between them.>
|
|
34
35
|
|
|
35
36
|
**Files:**
|
|
36
|
-
- `<package>/<file
|
|
37
|
-
- `<
|
|
37
|
+
- `<package>/<file>` — the function that mishandled the shape.
|
|
38
|
+
- `<harness>/<fake>` — the fake that accepted the wrong shape (fix this too, or the test layer regresses).
|
|
38
39
|
|
|
39
|
-
**Fix sketch:**
|
|
40
|
-
<one paragraph specific enough to scope a Builder brief. Mention the precise wire shape change, the function signature change if any, and the new test that pins the real-API contract.>
|
|
40
|
+
**Fix sketch:** <one paragraph specific enough to scope a Builder brief.>
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
## B — Accepted-but-unimplemented follow-ups
|
|
45
|
+
|
|
46
|
+
### <short title>
|
|
47
|
+
|
|
48
|
+
- **Claimed done by:** <artifact — e.g. ADR-NNNN, a feature doc>.
|
|
49
|
+
- **Actual state:** <what's really true — e.g. "decided, not yet implemented">.
|
|
50
|
+
- **Next step:** <the concrete action, and what unblocks it>.
|
|
51
|
+
|
|
52
|
+
_Write `_No open follow-ups._` when the list is empty._
|
|
45
53
|
|
|
46
54
|
---
|
|
47
55
|
|
|
48
|
-
## Fix plan
|
|
56
|
+
## Fix plan (mode A)
|
|
49
57
|
|
|
50
|
-
**R<N>
|
|
51
|
-
**R<N+1>
|
|
58
|
+
**R<N> (DONE YYYY-MM-DD):** issues #X–#Y closed in <K> commits + a simplify pass.
|
|
59
|
+
**R<N+1> (PENDING):** issue #Z.
|
|
52
60
|
|
|
53
|
-
After all open issues
|
|
54
|
-
- Append an end-to-end verification entry to `docs/STATE.md`.
|
|
55
|
-
- Tag vN.0.
|
|
56
|
-
- Leave this file in place as a permanent post-mortem record.
|
|
61
|
+
After all open issues close: append an end-to-end verification entry to `docs/features/<name>.state.md`, tag vN.0, and leave this file as a permanent post-mortem record.
|
package/skills/zoom-out/SKILL.md
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: zoom-out
|
|
3
|
-
description: User-invoked utility — pulls the agent up an abstraction layer when the user is lost in unfamiliar code. Produces a map of relevant modules, callers, and seams in `docs/CONTEXT.md` vocabulary. Use when the user says "I'm lost", "zoom out", "give me higher-level context", "I don't know this area", "what depends on what here", or invokes the slash command. Does not change which workflow the user is in — interrupts to orient, then hands back. Skip when the user already has the map and just needs to read code.
|
|
3
|
+
description: User-invoked utility — pulls the agent up an abstraction layer when the user is lost in unfamiliar code. Produces a map of relevant modules, callers, and seams in `docs/CONTEXT.md` vocabulary. Use when the user says "I'm lost", "zoom out", "give me higher-level context", "I don't know this area", "what depends on what here", or invokes the slash command. Does not change which workflow the user is in — interrupts to orient, then hands back. Skip when the user already has the map and just needs to read code. Runs before `debug` or `improve-codebase-architecture` when the area is unfamiliar.
|
|
4
4
|
disable-model-invocation: true
|
|
5
|
-
complexity: low
|
|
6
|
-
expected_duration: 5 minutes
|
|
7
5
|
---
|
|
8
6
|
|
|
9
7
|
# Zoom Out
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: sync-check
|
|
3
|
-
description: Diagnostic "Context Auditor" that scans code changes for terminology drift against `CONTEXT.md` and architectural contradictions against `docs/adr/`. Use before `pr-review`, after significant refactors, or when names feel "off." Prevents term collisions (e.g., "Account" vs "Customer") and silent deviations from established architectural decisions. Pairs with `grill-plan` (to resolve contradictions found) and `pr-review` (downstream gate).
|
|
4
|
-
complexity: low
|
|
5
|
-
expected_duration: 10 minutes
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Sync Check (Context Auditor)
|
|
9
|
-
|
|
10
|
-
The discipline of ensuring that the code's implementation matches the project's **Domain Language** and **Architectural History**.
|
|
11
|
-
|
|
12
|
-
## Why this skill exists
|
|
13
|
-
|
|
14
|
-
As a codebase grows, it is easy for synonyms ("User", "Account", "Profile") to bleed into the code, diluting the domain model. Similarly, architectural decisions recorded in ADRs are often forgotten by developers (or LLMs) focused on local implementation. `sync-check` is the background auditor that surfaces these drifts before they calcify.
|
|
15
|
-
|
|
16
|
-
## When to use
|
|
17
|
-
|
|
18
|
-
- Before starting a `pr-review` (as a primary step).
|
|
19
|
-
- After a large refactor round in `tdd-rounds`.
|
|
20
|
-
- When you encounter a term in the code that isn't in `CONTEXT.md`.
|
|
21
|
-
- When the user asks "is this consistent with our model?" or "are we following our ADRs?"
|
|
22
|
-
|
|
23
|
-
## When to skip
|
|
24
|
-
|
|
25
|
-
- Initial project setup (pre-vocabulary).
|
|
26
|
-
- Pure doc/comment changes.
|
|
27
|
-
- Trivial typo/config fixes.
|
|
28
|
-
|
|
29
|
-
## Process
|
|
30
|
-
|
|
31
|
-
### 1. Identify the Scope
|
|
32
|
-
|
|
33
|
-
Map the files changed in the current branch or round to their corresponding domain contexts.
|
|
34
|
-
- Use `CONTEXT-MAP.md` if it exists.
|
|
35
|
-
- Otherwise, use the root `CONTEXT.md`.
|
|
36
|
-
|
|
37
|
-
### 2. Terminology Audit
|
|
38
|
-
|
|
39
|
-
Scan the `git diff` for new or changed public identifiers (classes, functions, types, variables).
|
|
40
|
-
|
|
41
|
-
- **Term Collision**: Check if a new term is listed as an `_Avoid_:` alias in `CONTEXT.md`.
|
|
42
|
-
- **Fuzzy Mapping**: Check if a term exists in the code but is missing from the glossary.
|
|
43
|
-
- **Synonym Drift**: Check if the code uses two different words for the same domain concept.
|
|
44
|
-
|
|
45
|
-
### 3. ADR Consistency Check
|
|
46
|
-
|
|
47
|
-
Read the `docs/adr/` entries relevant to the changed packages.
|
|
48
|
-
|
|
49
|
-
- **Direct Contradiction**: Does the change perform an action explicitly forbidden by an ADR (e.g., using an ORM when an ADR mandates manual SQL)?
|
|
50
|
-
- **Surprise Deviation**: Does the change introduce a pattern that warrants a new ADR (hard to reverse, surprising, real trade-off)?
|
|
51
|
-
|
|
52
|
-
### 4. Report Drifts
|
|
53
|
-
|
|
54
|
-
Output a numbered list of findings. For each:
|
|
55
|
-
- **Location**: `file:line` or `ADR-NNNN`.
|
|
56
|
-
- **Severity**: `Blocker` (direct contradiction/collision) or `Suggestion` (fuzzy mapping).
|
|
57
|
-
- **Finding**: "Code uses 'Account', but `CONTEXT.md` specifies 'Customer'."
|
|
58
|
-
- **Recommended Action**: "Rename to 'Customer' or update `CONTEXT.md` if the concept is genuinely new."
|
|
59
|
-
|
|
60
|
-
## Done when
|
|
61
|
-
|
|
62
|
-
- All changed files have been cross-referenced with the glossary and relevant ADRs.
|
|
63
|
-
- Every "Avoid" alias found in the diff has been flagged.
|
|
64
|
-
- Every architectural deviation from active ADRs has been surfaced.
|
|
65
|
-
|
|
66
|
-
## Handoff
|
|
67
|
-
|
|
68
|
-
- If contradictions are found → run `grill-plan` to resolve the terminology or architectural mismatch.
|
|
69
|
-
- If clean → proceed to `pr-review`.
|
|
File without changes
|
|
File without changes
|