@runecraft/grimoire 1.0.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/LICENSE +21 -0
- package/README.md +21 -0
- package/catalog.json +9 -0
- package/dist/grimoire.js +1758 -0
- package/package.json +54 -0
- package/references/definition-of-done.md +67 -0
- package/references/testing-patterns.md +260 -0
- package/skills/code-review-and-quality/README.md +13 -0
- package/skills/code-review-and-quality/SKILL.md +389 -0
- package/skills/code-simplification/README.md +13 -0
- package/skills/code-simplification/SKILL.md +338 -0
- package/skills/debugging-and-error-recovery/README.md +13 -0
- package/skills/debugging-and-error-recovery/SKILL.md +343 -0
- package/skills/debugging-and-error-recovery/scripts/__pycache__/triage_state.cpython-314.pyc +0 -0
- package/skills/debugging-and-error-recovery/scripts/triage_state.py +206 -0
- package/skills/deprecation-and-migration/README.md +13 -0
- package/skills/deprecation-and-migration/SKILL.md +248 -0
- package/skills/deprecation-and-migration/scripts/__pycache__/migration_tracker.cpython-314.pyc +0 -0
- package/skills/deprecation-and-migration/scripts/migration_tracker.py +237 -0
- package/skills/doubt-driven-development/README.md +13 -0
- package/skills/doubt-driven-development/SKILL.md +251 -0
- package/skills/git-commit-learning/.skill-meta.json +14 -0
- package/skills/git-commit-learning/README.md +205 -0
- package/skills/git-commit-learning/SKILL.md +435 -0
- package/skills/git-commit-learning/references/commit-patterns.md +595 -0
- package/skills/git-worktree/README.md +13 -0
- package/skills/git-worktree/SKILL.md +220 -0
- package/skills/idea-refine/README.md +13 -0
- package/skills/idea-refine/SKILL.md +186 -0
- package/skills/interview-me/README.md +13 -0
- package/skills/interview-me/SKILL.md +233 -0
- package/skills/linkedin-audit/SKILL.md +98 -0
- package/skills/linkedin-audit/references/dashboard-spec.md +43 -0
- package/skills/memory-management/README.md +13 -0
- package/skills/memory-management/SKILL.md +198 -0
- package/skills/security-and-hardening/README.md +13 -0
- package/skills/security-and-hardening/SKILL.md +472 -0
- package/skills/shipping-and-launch/README.md +13 -0
- package/skills/shipping-and-launch/SKILL.md +317 -0
- package/skills/skill-forge/README.md +153 -0
- package/skills/skill-forge/SKILL.md +291 -0
- package/skills/skill-forge/assets/SKILL.template.md +73 -0
- package/skills/skill-forge/references/authoring-patterns.md +249 -0
- package/skills/skill-forge/references/description-optimization.md +171 -0
- package/skills/skill-forge/references/output-evaluation.md +276 -0
- package/skills/skill-forge/references/scripts-guide.md +232 -0
- package/skills/skill-forge/references/spec.md +175 -0
- package/skills/skill-forge/scripts/validate.py +536 -0
- package/skills/spec-driven/.skill-meta.json +14 -0
- package/skills/spec-driven/README.md +335 -0
- package/skills/spec-driven/SKILL.md +174 -0
- package/skills/spec-driven/references/code-analysis.md +98 -0
- package/skills/spec-driven/references/coding-principles.md +56 -0
- package/skills/spec-driven/references/context-limits.md +31 -0
- package/skills/spec-driven/references/design.md +199 -0
- package/skills/spec-driven/references/discuss.md +136 -0
- package/skills/spec-driven/references/implement.md +425 -0
- package/skills/spec-driven/references/lessons.md +113 -0
- package/skills/spec-driven/references/memory.md +126 -0
- package/skills/spec-driven/references/specify.md +210 -0
- package/skills/spec-driven/references/sub-agents.md +96 -0
- package/skills/spec-driven/references/tasks.md +484 -0
- package/skills/spec-driven/references/validate.md +350 -0
- package/skills/spec-driven/scripts/__pycache__/lessons.cpython-314.pyc +0 -0
- package/skills/spec-driven/scripts/lessons.py +370 -0
- package/skills/spec-loop/README.md +36 -0
- package/skills/spec-loop/SKILL.md +61 -0
- package/skills/test-driven-development/README.md +13 -0
- package/skills/test-driven-development/SKILL.md +388 -0
- package/skills/typescript-patterns/README.md +13 -0
- package/skills/typescript-patterns/SKILL.md +346 -0
- package/skills/using-agent-skills/README.md +13 -0
- package/skills/using-agent-skills/SKILL.md +187 -0
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# Specify
|
|
2
|
+
|
|
3
|
+
**Goal**: Capture WHAT to build with testable, traceable requirements.
|
|
4
|
+
|
|
5
|
+
If the feature has ambiguous gray areas (multiple valid approaches for user-facing behavior), the agent will automatically trigger the [discuss gray areas](discuss.md) process within this phase. For clear, well-defined features, it goes straight to the next phase.
|
|
6
|
+
|
|
7
|
+
## Implicit-Requirement Dimensions
|
|
8
|
+
|
|
9
|
+
The canonical rubric for requirements that are easy to miss. Referenced by [discuss.md](discuss.md) — defined here, not duplicated.
|
|
10
|
+
|
|
11
|
+
| Dimension | What to cover |
|
|
12
|
+
| --------- | ------------- |
|
|
13
|
+
| Input validation & bounds | Limits, formats, sanitization |
|
|
14
|
+
| Failure / partial-failure states | Timeouts, partial saves, rollbacks |
|
|
15
|
+
| Idempotency / retry / duplicate handling | Safe retries, dedup keys |
|
|
16
|
+
| Auth boundaries & rate limits | Who can call what, throttle rules |
|
|
17
|
+
| Concurrency / ordering | Race conditions, ordering guarantees |
|
|
18
|
+
| Data lifecycle / expiry | TTL, archival, deletion |
|
|
19
|
+
| Observability | Logging, metrics, tracing hooks |
|
|
20
|
+
| External-dependency failure | Circuit breakers, fallbacks |
|
|
21
|
+
| State-transition integrity | Valid transitions, guards |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Process
|
|
26
|
+
|
|
27
|
+
### 1. Clarify Requirements
|
|
28
|
+
|
|
29
|
+
**Load confirmed lessons first:** Before clarifying, load the project's confirmed lessons so past verification failures shape this spec instead of repeating. Run `python3 scripts/lessons.py list --status confirmed` (optionally `--scope [area]` or `--query [term]` for the area this feature touches) and apply what comes back as guidance. Load only `confirmed` — never `candidate` or `quarantined`. If no store exists yet or no code tool is available, skip silently. See [lessons.md](lessons.md).
|
|
30
|
+
|
|
31
|
+
**Lightweight context scan first (Knowledge Verification Chain Step 1):** Before asking questions, briefly scan existing code, patterns, and neighboring features relevant to this feature. Use what you find to ground your clarifying questions in reality — not to constrain the spec to current implementation. Keep it lightweight (stay within the <40k token budget; reuse the chain, no new machinery). The spec captures WHAT is needed, not only what exists.
|
|
32
|
+
|
|
33
|
+
You are a thinking partner, not an interviewer. Start open — let the user dump their mental model. Follow the energy: whatever they emphasize, dig into that.
|
|
34
|
+
|
|
35
|
+
Ask conversationally (not as a checklist):
|
|
36
|
+
|
|
37
|
+
- "What problem are you solving?"
|
|
38
|
+
- "Who is the user and what's their pain?"
|
|
39
|
+
- "What does success look like?"
|
|
40
|
+
|
|
41
|
+
If needed:
|
|
42
|
+
|
|
43
|
+
- "What are the constraints (time, tech, resources)?"
|
|
44
|
+
- "What is explicitly out of scope?"
|
|
45
|
+
|
|
46
|
+
**Challenge vagueness.** Never accept fuzzy answers. "Good" means what? "Users" means who? "Simple" means how? Make the abstract concrete: "Walk me through using this." "What does that actually look like?"
|
|
47
|
+
|
|
48
|
+
**Know when to stop — then run the dimensions sweep.** When you understand what they're building, why, who it's for, and what done looks like, run a closing **implicit-requirement dimensions sweep** before offering to proceed:
|
|
49
|
+
|
|
50
|
+
- **Large / Complex:** Cover every dimension above — each must resolve to a requirement OR an explicit `N/A because [reason]`. No blank entries allowed.
|
|
51
|
+
- **Medium:** Cover only dimensions obviously present for this feature's domain; collapse the rest to a single `remaining dimensions N/A for this scope`.
|
|
52
|
+
- **Small:** Skip the sweep entirely.
|
|
53
|
+
|
|
54
|
+
The `N/A because...` escape is mandatory — it prevents inventing requirements to fill the checklist. Bound the sweep to THIS feature's scope; never add requirements outside the feature boundary.
|
|
55
|
+
|
|
56
|
+
### 2. Capture User Stories with Priorities
|
|
57
|
+
|
|
58
|
+
**P1 = MVP** (must ship), **P2** (should have), **P3** (nice to have)
|
|
59
|
+
|
|
60
|
+
Each story MUST be **independently testable** - you can implement and demo just that story.
|
|
61
|
+
|
|
62
|
+
### 3. Write Acceptance Criteria
|
|
63
|
+
|
|
64
|
+
Use **WHEN/THEN/SHALL** format - it's precise and testable:
|
|
65
|
+
|
|
66
|
+
- WHEN [event/action] THEN [system] SHALL [response/behavior]
|
|
67
|
+
|
|
68
|
+
### 4. Requirement Closure Gate (before confirm)
|
|
69
|
+
|
|
70
|
+
Before presenting the spec for confirmation, run the three checks below. The spec is not presentable for confirmation until every item is resolved or assumption-logged — this is the guarantee that no requirement leaves the spec silently unclear.
|
|
71
|
+
|
|
72
|
+
**Scope-tiered:** Large/Complex = full gate; Medium = resolve obvious ambiguities, log the rest as assumptions; Small = skip entirely (consistent with skipping the sweep).
|
|
73
|
+
|
|
74
|
+
1. **Unambiguity + precision (hard).** Every AC must (a) have a single interpretation and (b) define a precise, spec-defined expected outcome. Any AC that fails either check: resolve with the user, split it, or log it as an explicit assumption with the chosen interpretation and rationale. No AC proceeds readable two ways or with an undefined outcome.
|
|
75
|
+
|
|
76
|
+
2. **Open-questions / assumptions closure.** Enumerate every unresolved decision that surfaced during clarification. Each must be either (a) resolved with the user OR (b) recorded as an **assumption** (chosen default + rationale) in the spec's Assumptions & Open Questions section. Nothing proceeds unmarked.
|
|
77
|
+
|
|
78
|
+
3. **Declined gray areas become assumptions.** Any gray area the user declined to discuss or that went undiscussed is written to the spec's Assumptions & Open Questions section (agent's chosen default + rationale) — never silently dropped. See [discuss.md](discuss.md).
|
|
79
|
+
|
|
80
|
+
Fix inline. This gate is bounded to THIS feature's stated dimensions and actual behavior — never to "anything imaginable." The Out of Scope table and anti-scope-creep rules remain the counterweights: the gate clarifies existing requirements, it never invents new ones.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Template: `.specs/features/[feature]/spec.md`
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
# [Feature Name] Specification
|
|
88
|
+
|
|
89
|
+
## Problem Statement
|
|
90
|
+
|
|
91
|
+
[Describe the problem in 2-3 sentences. What pain point are we solving? Why now?]
|
|
92
|
+
|
|
93
|
+
## Goals
|
|
94
|
+
|
|
95
|
+
- [ ] [Primary goal with measurable outcome]
|
|
96
|
+
- [ ] [Secondary goal with measurable outcome]
|
|
97
|
+
|
|
98
|
+
## Out of Scope
|
|
99
|
+
|
|
100
|
+
Explicitly excluded. Documented to prevent scope creep.
|
|
101
|
+
|
|
102
|
+
| Feature | Reason |
|
|
103
|
+
| ----------- | -------------- |
|
|
104
|
+
| [Feature X] | [Why excluded] |
|
|
105
|
+
| [Feature Y] | [Why excluded] |
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Assumptions & Open Questions
|
|
110
|
+
|
|
111
|
+
Every ambiguity is resolved or recorded here — nothing is left silently unclear.
|
|
112
|
+
|
|
113
|
+
| Assumption / decision | Chosen default | Rationale | Confirmed? |
|
|
114
|
+
| --------------------- | --------------- | --------- | ---------- |
|
|
115
|
+
| [ambiguity] | [what we'll do] | [why] | [y/n] |
|
|
116
|
+
|
|
117
|
+
**Open questions:** none — all resolved or logged above (required before the spec is confirmed).
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## User Stories
|
|
122
|
+
|
|
123
|
+
### P1: [Story Title] ⭐ MVP
|
|
124
|
+
|
|
125
|
+
**User Story**: As a [role], I want [capability] so that [benefit].
|
|
126
|
+
|
|
127
|
+
**Why P1**: [Why this is critical for MVP]
|
|
128
|
+
|
|
129
|
+
**Acceptance Criteria**:
|
|
130
|
+
|
|
131
|
+
1. WHEN [user action/event] THEN system SHALL [expected behavior]
|
|
132
|
+
2. WHEN [user action/event] THEN system SHALL [expected behavior]
|
|
133
|
+
3. WHEN [edge case] THEN system SHALL [graceful handling]
|
|
134
|
+
|
|
135
|
+
**Independent Test**: [How to verify this story works alone - e.g., "Can demo by doing X and seeing Y"]
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
### P2: [Story Title]
|
|
140
|
+
|
|
141
|
+
**User Story**: As a [role], I want [capability] so that [benefit].
|
|
142
|
+
|
|
143
|
+
**Why P2**: [Why this isn't MVP but important]
|
|
144
|
+
|
|
145
|
+
**Acceptance Criteria**:
|
|
146
|
+
|
|
147
|
+
1. WHEN [event] THEN system SHALL [behavior]
|
|
148
|
+
2. WHEN [event] THEN system SHALL [behavior]
|
|
149
|
+
|
|
150
|
+
**Independent Test**: [How to verify]
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
### P3: [Story Title]
|
|
155
|
+
|
|
156
|
+
**User Story**: As a [role], I want [capability] so that [benefit].
|
|
157
|
+
|
|
158
|
+
**Why P3**: [Why this is nice-to-have]
|
|
159
|
+
|
|
160
|
+
**Acceptance Criteria**:
|
|
161
|
+
|
|
162
|
+
1. WHEN [event] THEN system SHALL [behavior]
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Edge Cases
|
|
167
|
+
|
|
168
|
+
- WHEN [boundary condition] THEN system SHALL [behavior]
|
|
169
|
+
- WHEN [error scenario] THEN system SHALL [graceful handling]
|
|
170
|
+
- WHEN [unexpected input] THEN system SHALL [validation response]
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Requirement Traceability
|
|
175
|
+
|
|
176
|
+
Each requirement gets a unique ID for tracking across design, tasks, and validation.
|
|
177
|
+
|
|
178
|
+
| Requirement ID | Story | Phase | Status |
|
|
179
|
+
| -------------- | ----------- | ------ | ------- |
|
|
180
|
+
| [FEAT]-01 | P1: [Story] | Design | Pending |
|
|
181
|
+
| [FEAT]-02 | P1: [Story] | Design | Pending |
|
|
182
|
+
| [FEAT]-03 | P2: [Story] | - | Pending |
|
|
183
|
+
|
|
184
|
+
**ID format:** `[CATEGORY]-[NUMBER]` (e.g., `AUTH-01`, `CART-03`, `NOTIF-02`)
|
|
185
|
+
|
|
186
|
+
**Status values:** Pending → In Design → In Tasks → Implementing → Verified
|
|
187
|
+
|
|
188
|
+
**Coverage:** X total, Y mapped to tasks, Z unmapped ⚠️
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Success Criteria
|
|
193
|
+
|
|
194
|
+
How we know the feature is successful:
|
|
195
|
+
|
|
196
|
+
- [ ] [Measurable outcome - e.g., "User can complete X in < 2 minutes"]
|
|
197
|
+
- [ ] [Measurable outcome - e.g., "Zero errors in Y scenario"]
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Tips
|
|
203
|
+
|
|
204
|
+
- **P1 = Vertical Slice** — A complete, demo-able feature, not just backend or frontend
|
|
205
|
+
- **WHEN/THEN is code** — If you can't write it as a test, rewrite it
|
|
206
|
+
- **Requirement IDs are mandatory** — Every story maps to trackable IDs
|
|
207
|
+
- **Edge cases matter** — What breaks? What's empty? What's huge?
|
|
208
|
+
- **Out of Scope prevents creep** — If it's not here, it doesn't get built
|
|
209
|
+
- **Closure gate before confirm** — Three checks: unambiguity + precision, open-questions/assumptions closure, declined gray areas logged; scope-tiered; bounded to stated dimensions; never invents requirements
|
|
210
|
+
- **Confirm after the gate passes** — Present the spec for user confirmation only after the closure gate passes (no unresolved-and-unmarked items remain); user approves spec before moving to discuss phase
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Sub-Agent Delegation
|
|
2
|
+
|
|
3
|
+
Full mechanics for phase workers and the Verifier sub-agent used during Execute.
|
|
4
|
+
|
|
5
|
+
## Phase Workers
|
|
6
|
+
|
|
7
|
+
**Trigger:** When the execution plan has **more than 3 phases**, offer the user per-phase sub-agents before starting Execute. For 3 or fewer phases, execute inline in the main window — no sub-agents spawned.
|
|
8
|
+
|
|
9
|
+
**Offer-then-confirm (never auto-spawn):**
|
|
10
|
+
|
|
11
|
+
> "This feature has [N] phases. I can run one sub-agent per phase — each worker executes its full phase in order, reports a compact summary, and the orchestrator advances. This keeps the main window lean. Want to proceed that way?"
|
|
12
|
+
|
|
13
|
+
The user must explicitly accept. If they decline (or if the feature has ≤3 phases), execute inline.
|
|
14
|
+
|
|
15
|
+
**Execution model — one worker per phase, sequential:**
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Phase 1 ──→ Phase Worker 1 ──→ compact summary ──→ orchestrator updates tasks.md
|
|
19
|
+
Phase 2 ──→ Phase Worker 2 ──→ compact summary ──→ orchestrator updates tasks.md
|
|
20
|
+
...
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
**What a phase worker receives:**
|
|
24
|
+
|
|
25
|
+
- The phase's task definitions (from `tasks.md`)
|
|
26
|
+
- The Test Coverage Matrix and Gate Check Commands (from `tasks.md`)
|
|
27
|
+
- `references/coding-principles.md`
|
|
28
|
+
- Relevant `spec.md` and `design.md` context for the feature (not all specs)
|
|
29
|
+
|
|
30
|
+
**What a phase worker does:**
|
|
31
|
+
|
|
32
|
+
Executes ALL tasks in its assigned phase **in order**, following the `implement.md` cycle for each task (implement → gate → atomic commit). It does NOT spawn further sub-agents for individual tasks — `[P]` marks tasks with no inter-task dependency (order-free within the phase) and is informational only; it is not a spawn directive. After completing all tasks in the phase, the worker reports a **compact summary** to the orchestrator:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
Phase [N] complete:
|
|
36
|
+
- Tasks done: [list with commit hashes]
|
|
37
|
+
- Tests: [N passed, 0 failed]
|
|
38
|
+
- Deviations/blockers: [none | description]
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
No raw logs, no full test output — only the above fields keep the main context clean.
|
|
42
|
+
|
|
43
|
+
**No intra-phase nesting:** Phase workers execute their tasks themselves. They never spawn sub-sub-agents. Intra-phase parallelism is explicitly dropped for simplicity.
|
|
44
|
+
|
|
45
|
+
**The orchestrating agent's role during Execute:**
|
|
46
|
+
|
|
47
|
+
1. Assess phase count — offer sub-agents if >3 phases and user accepts
|
|
48
|
+
2. Dispatch the next phase to a worker (or execute inline if not using sub-agents)
|
|
49
|
+
3. Receive the compact summary
|
|
50
|
+
4. Update `tasks.md` with results
|
|
51
|
+
5. If all tasks in the summary show complete: proceed to the next phase
|
|
52
|
+
6. If a task failed: the worker has already stopped; decide fix/escalate before dispatching the next phase
|
|
53
|
+
|
|
54
|
+
**Failure handling:** If a task in a phase fails (gate does not pass, blocker hit), the worker stops and includes the failure in its summary. The next phase does not start until the current phase's summary shows all tasks complete. The orchestrator decides: fix and re-run, or escalate to the user.
|
|
55
|
+
|
|
56
|
+
**Context sizing signal:** If a single phase's task list would likely push the worker's context beyond ~40k tokens, that signals the phase should be split into smaller phases — use the granularity guidance in `references/tasks.md`.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Verifier Sub-Agent
|
|
61
|
+
|
|
62
|
+
**Always-on, never prompted — one per feature completion.** The Verifier is a separate role from the phase worker. It runs once — after the last task of the feature is committed — as an independent quality gate, dispatched automatically by the orchestrator. It is **not** gated behind the >3-phase offer; it always runs. Do NOT ask the user whether to run validation; it is mandatory.
|
|
63
|
+
|
|
64
|
+
**Author ≠ verifier:** The agent (or phase worker) that wrote the code and tests is the author. The Verifier is a fresh sub-agent dispatched by the orchestrator after the final commit. It does not inherit the author's context, mental model, or assumptions. This separation is what makes the gate trustworthy.
|
|
65
|
+
|
|
66
|
+
**What the Verifier receives:**
|
|
67
|
+
- `spec.md` for the feature (ACs = source of truth)
|
|
68
|
+
- The git diff surface for the feature (scoped to the feature branch or commit range)
|
|
69
|
+
- The test files in scope
|
|
70
|
+
- `references/validate.md` as its operating checklist
|
|
71
|
+
|
|
72
|
+
**What the Verifier does (full process in `validate.md`):**
|
|
73
|
+
1. **Spec-anchored coverage check** — re-derives coverage evidence-or-zero: every AC traced to `file:line` + assertion expression. For each covered criterion, confirms the test's asserted value matches the **spec-defined expected outcome** (not just that an assertion exists). Where the spec does not define a precise outcome, flags a **spec-precision gap** rather than passing silently.
|
|
74
|
+
2. **Discrimination sensor** — injects a small behavior-level fault (flip a condition, change a return value, off-by-one, remove a required side effect) in a **scratch/throwaway state** (git stash or temp copy), runs the relevant tests, confirms they FAIL (kill the mutant), then discards the mutation. Tiered by risk: lightweight (1–3 mutations) for standard features; expanded (≥5 mutations or full mutation tooling) for P0/critical paths. Surviving mutants become fix tasks.
|
|
75
|
+
3. Applies the **payload/conjunction rule**: checks payload fields are asserted on value/state, not just that the call occurred.
|
|
76
|
+
4. **Writes the persisted report** to `.specs/features/[feature]/validation.md` — PASS/FAIL, per-AC evidence (`file:line` + assertion + spec outcome), sensor result (killed/survived per mutation), gate exit results, diff/commit range.
|
|
77
|
+
5. **Returns a compact verdict in chat** to the orchestrator.
|
|
78
|
+
6. Does **NOT** write, modify, or fix any code or tests — the real working tree is never mutated (sensor mutations run in scratch state only).
|
|
79
|
+
|
|
80
|
+
**What the Verifier reports back (compact chat format):**
|
|
81
|
+
```
|
|
82
|
+
## Validation: [feature name] — [PASS ✅ | FAIL ❌]
|
|
83
|
+
|
|
84
|
+
**Spec-anchored check**: [N/N ACs matched spec outcome | M spec-precision gaps flagged]
|
|
85
|
+
**Gate**: [X passed, 0 failed]
|
|
86
|
+
**Sensor**: [N mutations injected, N killed, N survived]
|
|
87
|
+
**Report**: `.specs/features/[feature]/validation.md`
|
|
88
|
+
|
|
89
|
+
**Ranked gaps** (if FAIL):
|
|
90
|
+
1. [Gap description] — [AC or criterion] — [file:line or "no evidence"]
|
|
91
|
+
2. ...
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Failure handling:** The orchestrator routes the ranked gaps to an implementer as fix tasks, then re-dispatches the Verifier. This fix→re-verify loop is bounded to a maximum of **3 iterations**. If gaps remain after 3 iterations, escalate to the user.
|
|
95
|
+
|
|
96
|
+
**Standalone fallback:** When running without sub-agents (a single agent executing the full feature), run `validate.md` as an independent fresh-eyes pass — re-read `spec.md` and the diff from scratch, apply evidence-or-zero, run the spec-anchored check and discrimination sensor, write the report file, and report PASS/FAIL before marking the feature done.
|