@ecc-hgy/ae 0.4.0 → 0.6.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.
Files changed (49) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +168 -138
  3. package/bin/ae.js +2 -2
  4. package/package.json +43 -43
  5. package/skills/brainstorming/SKILL.md +133 -133
  6. package/skills/diagnose/SKILL.md +146 -146
  7. package/skills/diagnose/assets/issue-7-sections.md +35 -35
  8. package/skills/diagnose/scripts/hitl-loop.template.sh +41 -41
  9. package/skills/grill-me/SKILL.md +10 -10
  10. package/skills/handoff/SKILL.md +19 -19
  11. package/skills/improve-codebase-architecture/DEEPENING.md +37 -37
  12. package/skills/improve-codebase-architecture/HTML-REPORT.md +123 -123
  13. package/skills/improve-codebase-architecture/INTERFACE-DESIGN.md +44 -44
  14. package/skills/improve-codebase-architecture/LANGUAGE.md +53 -53
  15. package/skills/improve-codebase-architecture/SKILL.md +101 -101
  16. package/skills/karpathy-guidelines/SKILL.md +63 -63
  17. package/skills/powerautomate-email-to-sharepoint-excel/powerautomate-email-to-sharepoint-excel-skill.md +496 -0
  18. package/skills/review/SKILL.md +119 -119
  19. package/skills/tdd/SKILL.md +157 -157
  20. package/skills/tdd/deep-modules.md +33 -33
  21. package/skills/tdd/interface-design.md +31 -31
  22. package/skills/tdd/mocking.md +59 -59
  23. package/skills/tdd/refactoring.md +10 -10
  24. package/skills/tdd/tests.md +61 -61
  25. package/skills/to-issues/SKILL.md +79 -79
  26. package/skills/to-issues/todo-template.md +25 -25
  27. package/skills/to-prd/SKILL.md +108 -108
  28. package/skills/using-agentic-engineering/SKILL.md +62 -62
  29. package/skills/verification-before-completion/SKILL.md +153 -153
  30. package/skills/writing-plans/SKILL.md +115 -115
  31. package/skills/zoom-out/SKILL.md +7 -7
  32. package/src/cli.js +61 -61
  33. package/src/commands/init.js +137 -134
  34. package/src/commands/setup.js +162 -103
  35. package/src/platforms.js +132 -0
  36. package/src/skeleton.js +134 -99
  37. package/src/utils/copy.js +100 -100
  38. package/src/utils/paths.js +60 -60
  39. package/src/utils/report.js +30 -30
  40. package/templates/entries/AGENTS.md +2 -0
  41. package/templates/entries/CLAUDE.md +5 -5
  42. package/templates/entries/README.md +33 -31
  43. package/templates/entries/handoff.md +1 -1
  44. package/templates/entries/spec/ADR/AGENTS.md +30 -30
  45. package/templates/entries/spec/ADR/CLAUDE.md +5 -5
  46. package/templates/entries/spec/AGENTS.md +34 -34
  47. package/templates/entries/spec/CLAUDE.md +5 -5
  48. package/templates/entries/spec/INDEX.md +28 -28
  49. package/templates/entries/spec/README.md +23 -23
@@ -1,108 +1,108 @@
1
- ---
2
- name: to-prd
3
- description: Turn the current conversation context into a PRD and save it to `spec/needs/<need-name>/prd.md` with frontmatter. Use when user wants to create a PRD from the current context (S1 node A2).
4
- ---
5
-
6
- This skill takes the current conversation context and codebase understanding and produces a PRD. Do NOT interview the user — just synthesize what you already know.
7
-
8
- ## Process
9
-
10
- 1. Explore the repo to understand the current state of the codebase, if you haven't already. Use vocabulary from `spec/INDEX.md` and existing `spec/needs/*/prd.md` throughout the PRD, and respect ADRs under `spec/ADR/`.
11
-
12
- 2. Sketch out the seams at which you're going to test the feature. Existing seams should be preferred to new ones. Use the highest seam possible. If new seams are needed, propose them at the highest point you can.
13
-
14
- Check with the user that these seams match their expectations.
15
-
16
- 2.5. Align the `need-name` (kebab-case) with the user. This is the slug used to create `spec/needs/<need-name>/`. Surface a concrete suggestion derived from the PRD topic and confirm before writing.
17
-
18
- 3. Write the PRD using the template below. Save it to `spec/needs/<need-name>/prd.md` with the frontmatter block shown below the template. After saving, update `spec/INDEX.md` (add or update the row for this need) — or run `ae index-rebuild` to recompute.
19
-
20
- <prd-template>
21
-
22
- ## Problem Statement
23
-
24
- The problem that the user is facing, from the user's perspective.
25
-
26
- ## Solution
27
-
28
- The solution to the problem, from the user's perspective.
29
-
30
- ## User Stories
31
-
32
- A LONG, numbered list of user stories. Each user story should be in the format of:
33
-
34
- 1. As an <actor>, I want a <feature>, so that <benefit>
35
-
36
- <user-story-example>
37
- 1. As a mobile bank customer, I want to see balance on my accounts, so that I can make better informed decisions about my spending
38
- </user-story-example>
39
-
40
- This list of user stories should be extremely extensive and cover all aspects of the feature.
41
-
42
- ## Implementation Decisions
43
-
44
- A list of implementation decisions that were made. This can include:
45
-
46
- - The modules that will be built/modified
47
- - The interfaces of those modules that will be modified
48
- - Technical clarifications from the developer
49
- - Architectural decisions
50
- - Schema changes
51
- - API contracts
52
- - Specific interactions
53
-
54
- Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.
55
-
56
- Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it within the relevant decision and note briefly that it came from a prototype. Trim to the decision-rich parts — not a working demo, just the important bits.
57
-
58
- ## Testing Decisions
59
-
60
- A list of testing decisions that were made. Include:
61
-
62
- - A description of what makes a good test (only test external behavior, not implementation details)
63
- - Which modules will be tested
64
- - Prior art for the tests (i.e. similar types of tests in the codebase)
65
-
66
- ## Out of Scope
67
-
68
- A description of the things that are out of scope for this PRD.
69
-
70
- ## Further Notes
71
-
72
- Any further notes about the feature.
73
-
74
- </prd-template>
75
-
76
- ## Frontmatter (prepend to `prd.md`)
77
-
78
- Every `prd.md` MUST start with this frontmatter block:
79
-
80
- ```yaml
81
- ---
82
- status: draft # draft | active | archived
83
- last-aligned: YYYY-MM-DD # ISO date of the most recent alignment with the user
84
- related-needs: [] # other need-names that share scope; omit if none
85
- ---
86
- ```
87
-
88
- State transitions:
89
-
90
- - `draft` → `active` when the user has explicitly approved the PRD content (A1 alignment confirmed)
91
- - `active` → `archived` when superseded or the need is dropped (do not delete the file)
92
-
93
- `last-aligned` MUST be updated every time the PRD is edited after user re-alignment.
94
-
95
- ## After Saving
96
-
97
- 1. Update `spec/INDEX.md`:
98
- - If the need is new: add a row under `## 需求`
99
- - If updating: set the `prd` column to `active`
100
- - Recompute the `当前节点` column per the rules in `spec/AGENTS.md` §INDEX 推导规则
101
- - If unsure, run `ae index-rebuild` for an idempotent rescan
102
- 2. Hand off to the next S1 node: A3 `writing-plans` will read this `prd.md` and produce `spec/needs/<need-name>/design.md`. Tell the user the PRD is ready and recommend invoking `writing-plans` next.
103
-
104
- ## Boundaries
105
-
106
- - This skill writes ONLY `spec/needs/<need-name>/prd.md` (plus the INDEX row). It does NOT write `design.md` or `todo.md`.
107
- - The PRD captures WHAT and WHY (business / product language). It does NOT capture HOW (technical decisions, file paths, code) — those belong in `design.md` (A3).
108
- - If the alignment surfaces a decision that affects MULTIPLE needs (e.g. "globally use Postgres"), flag it for promotion to `spec/ADR/` rather than embedding it in this PRD.
1
+ ---
2
+ name: to-prd
3
+ description: Turn the current conversation context into a PRD and save it to `spec/needs/<need-name>/prd.md` with frontmatter. Use when user wants to create a PRD from the current context (S1 node A2).
4
+ ---
5
+
6
+ This skill takes the current conversation context and codebase understanding and produces a PRD. Do NOT interview the user — just synthesize what you already know.
7
+
8
+ ## Process
9
+
10
+ 1. Explore the repo to understand the current state of the codebase, if you haven't already. Use vocabulary from `spec/INDEX.md` and existing `spec/needs/*/prd.md` throughout the PRD, and respect ADRs under `spec/ADR/`.
11
+
12
+ 2. Sketch out the seams at which you're going to test the feature. Existing seams should be preferred to new ones. Use the highest seam possible. If new seams are needed, propose them at the highest point you can.
13
+
14
+ Check with the user that these seams match their expectations.
15
+
16
+ 2.5. Align the `need-name` (kebab-case) with the user. This is the slug used to create `spec/needs/<need-name>/`. Surface a concrete suggestion derived from the PRD topic and confirm before writing.
17
+
18
+ 3. Write the PRD using the template below. Save it to `spec/needs/<need-name>/prd.md` with the frontmatter block shown below the template. After saving, update `spec/INDEX.md` (add or update the row for this need) — or run `ae index-rebuild` to recompute.
19
+
20
+ <prd-template>
21
+
22
+ ## Problem Statement
23
+
24
+ The problem that the user is facing, from the user's perspective.
25
+
26
+ ## Solution
27
+
28
+ The solution to the problem, from the user's perspective.
29
+
30
+ ## User Stories
31
+
32
+ A LONG, numbered list of user stories. Each user story should be in the format of:
33
+
34
+ 1. As an <actor>, I want a <feature>, so that <benefit>
35
+
36
+ <user-story-example>
37
+ 1. As a mobile bank customer, I want to see balance on my accounts, so that I can make better informed decisions about my spending
38
+ </user-story-example>
39
+
40
+ This list of user stories should be extremely extensive and cover all aspects of the feature.
41
+
42
+ ## Implementation Decisions
43
+
44
+ A list of implementation decisions that were made. This can include:
45
+
46
+ - The modules that will be built/modified
47
+ - The interfaces of those modules that will be modified
48
+ - Technical clarifications from the developer
49
+ - Architectural decisions
50
+ - Schema changes
51
+ - API contracts
52
+ - Specific interactions
53
+
54
+ Do NOT include specific file paths or code snippets. They may end up being outdated very quickly.
55
+
56
+ Exception: if a prototype produced a snippet that encodes a decision more precisely than prose can (state machine, reducer, schema, type shape), inline it within the relevant decision and note briefly that it came from a prototype. Trim to the decision-rich parts — not a working demo, just the important bits.
57
+
58
+ ## Testing Decisions
59
+
60
+ A list of testing decisions that were made. Include:
61
+
62
+ - A description of what makes a good test (only test external behavior, not implementation details)
63
+ - Which modules will be tested
64
+ - Prior art for the tests (i.e. similar types of tests in the codebase)
65
+
66
+ ## Out of Scope
67
+
68
+ A description of the things that are out of scope for this PRD.
69
+
70
+ ## Further Notes
71
+
72
+ Any further notes about the feature.
73
+
74
+ </prd-template>
75
+
76
+ ## Frontmatter (prepend to `prd.md`)
77
+
78
+ Every `prd.md` MUST start with this frontmatter block:
79
+
80
+ ```yaml
81
+ ---
82
+ status: draft # draft | active | archived
83
+ last-aligned: YYYY-MM-DD # ISO date of the most recent alignment with the user
84
+ related-needs: [] # other need-names that share scope; omit if none
85
+ ---
86
+ ```
87
+
88
+ State transitions:
89
+
90
+ - `draft` → `active` when the user has explicitly approved the PRD content (A1 alignment confirmed)
91
+ - `active` → `archived` when superseded or the need is dropped (do not delete the file)
92
+
93
+ `last-aligned` MUST be updated every time the PRD is edited after user re-alignment.
94
+
95
+ ## After Saving
96
+
97
+ 1. Update `spec/INDEX.md`:
98
+ - If the need is new: add a row under `## 需求`
99
+ - If updating: set the `prd` column to `active`
100
+ - Recompute the `当前节点` column per the rules in `spec/AGENTS.md` §INDEX 推导规则
101
+ - If unsure, run `ae index-rebuild` for an idempotent rescan
102
+ 2. Hand off to the next S1 node: A3 `writing-plans` will read this `prd.md` and produce `spec/needs/<need-name>/design.md`. Tell the user the PRD is ready and recommend invoking `writing-plans` next.
103
+
104
+ ## Boundaries
105
+
106
+ - This skill writes ONLY `spec/needs/<need-name>/prd.md` (plus the INDEX row). It does NOT write `design.md` or `todo.md`.
107
+ - The PRD captures WHAT and WHY (business / product language). It does NOT capture HOW (technical decisions, file paths, code) — those belong in `design.md` (A3).
108
+ - If the alignment surfaces a decision that affects MULTIPLE needs (e.g. "globally use Postgres"), flag it for promotion to `spec/ADR/` rather than embedding it in this PRD.
@@ -1,62 +1,62 @@
1
- ---
2
- name: using-agentic-engineering
3
- description: Router for projects that use Agentic Engineering. Use at the start of a feature, bug fix, or other non-trivial change to decide whether it should enter the SDD+TDD loop and which node/skill to start from. Skip for quick fixes, questions, and throwaway scripts.
4
- ---
5
-
6
- # Using Agentic Engineering
7
-
8
- This project follows the **Agentic Engineering** method: SDD records *what to build* (in `spec/`), TDD proves *it works*. This skill is a **router** — it decides whether the current request enters that loop and, if so, hands off to the right node skill. It does not carry the method itself; each node has its own skill.
9
-
10
- ## Instruction priority
11
-
12
- 1. **The user's explicit request this turn** — highest. If they say "just do X" / "skip the process," do exactly that.
13
- 2. **`AGENTS.md`** — the project's own rules (whatever the project declares there).
14
- 3. **Agentic Engineering defaults (below)** — lowest.
15
-
16
- AE never blocks something you were explicitly asked to do. These are defaults, not laws.
17
-
18
- ## Step 0 — Orient (only when needed)
19
-
20
- Read `handoff.md` (latest session snapshot) and `spec/INDEX.md` (needs + current node) **only when you lack context** — at the start of a fresh session, or when you can't tell whether this request continues existing work or starts something new. If you already have that context from the conversation, skip straight to routing. Don't re-read them every turn.
21
-
22
- ## Step 1 — Route: is this a *need*?
23
-
24
- The one question: **does this request create or change a *need* — durable, product-facing behavior worth recording in `spec/`?**
25
-
26
- **Does NOT enter the loop — just do it, no ceremony:**
27
- - Questions / explanations ("what does this do?", "why is it slow?")
28
- - Quick fixes, one-line changes, typos
29
- - Throwaway / one-off scripts, spikes, experiments
30
- - Chores: rename, format, dependency bump, run tests, git
31
- - Anything the user explicitly asked to do directly
32
-
33
- **Enters the loop:**
34
- - A new feature or non-trivial capability → go to **A1**
35
- - A bug / wrong behavior on an existing need → go to **B2**
36
- - Continuing an existing need → resume at its **current node** (from `spec/INDEX.md`)
37
-
38
- **Unsure?** Default to *not* entering: do what was asked, then add one line — "This looks like it might be a need; want me to capture it in `spec/` / align first?" — and hand the decision back to the user. Don't gate.
39
-
40
- ## Step 2 — Dispatch (only when it enters the loop)
41
-
42
- Hand off to the node skill below. Two hard gates are rigid:
43
- - **A1 not aligned → do not write `prd.md`.**
44
- - **B2 expected behavior not aligned → do not start fixing.**
45
-
46
- | Node | Purpose | Skill |
47
- |------|---------|-------|
48
- | A1 | Align the requirement | `brainstorming` (+ `grill-me` for detail) |
49
- | A2 | Write `prd.md` | `to-prd` |
50
- | A3 | Write `design.md` | `writing-plans` |
51
- | A4 | Write `todo.md` | `to-issues` |
52
- | A5 | Implement (TDD) | `tdd` |
53
- | A6 | Verify on the real path | `verification-before-completion` |
54
- | B2 | Align expected behavior | `grill-me` |
55
- | B3 | Find root cause | `diagnose` |
56
- | B4 | Write the issue file | (7-section format) |
57
- | B5 | Fix (TDD) | `tdd` |
58
- | B7 | Review & sediment findings | `review` |
59
-
60
- `karpathy-guidelines` is always-on whenever you write or change code (no node).
61
-
62
- Spec file mechanics — INDEX derivation, frontmatter, state machine, R1 — live in `spec/AGENTS.md`.
1
+ ---
2
+ name: using-agentic-engineering
3
+ description: Router for projects that use Agentic Engineering. Use at the start of a feature, bug fix, or other non-trivial change to decide whether it should enter the SDD+TDD loop and which node/skill to start from. Skip for quick fixes, questions, and throwaway scripts.
4
+ ---
5
+
6
+ # Using Agentic Engineering
7
+
8
+ This project follows the **Agentic Engineering** method: SDD records *what to build* (in `spec/`), TDD proves *it works*. This skill is a **router** — it decides whether the current request enters that loop and, if so, hands off to the right node skill. It does not carry the method itself; each node has its own skill.
9
+
10
+ ## Instruction priority
11
+
12
+ 1. **The user's explicit request this turn** — highest. If they say "just do X" / "skip the process," do exactly that.
13
+ 2. **`AGENTS.md`** — the project's own rules (whatever the project declares there).
14
+ 3. **Agentic Engineering defaults (below)** — lowest.
15
+
16
+ AE never blocks something you were explicitly asked to do. These are defaults, not laws.
17
+
18
+ ## Step 0 — Orient (only when needed)
19
+
20
+ Read `handoff.md` (latest session snapshot) and `spec/INDEX.md` (needs + current node) **only when you lack context** — at the start of a fresh session, or when you can't tell whether this request continues existing work or starts something new. If you already have that context from the conversation, skip straight to routing. Don't re-read them every turn.
21
+
22
+ ## Step 1 — Route: is this a *need*?
23
+
24
+ The one question: **does this request create or change a *need* — durable, product-facing behavior worth recording in `spec/`?**
25
+
26
+ **Does NOT enter the loop — just do it, no ceremony:**
27
+ - Questions / explanations ("what does this do?", "why is it slow?")
28
+ - Quick fixes, one-line changes, typos
29
+ - Throwaway / one-off scripts, spikes, experiments
30
+ - Chores: rename, format, dependency bump, run tests, git
31
+ - Anything the user explicitly asked to do directly
32
+
33
+ **Enters the loop:**
34
+ - A new feature or non-trivial capability → go to **A1**
35
+ - A bug / wrong behavior on an existing need → go to **B2**
36
+ - Continuing an existing need → resume at its **current node** (from `spec/INDEX.md`)
37
+
38
+ **Unsure?** Default to *not* entering: do what was asked, then add one line — "This looks like it might be a need; want me to capture it in `spec/` / align first?" — and hand the decision back to the user. Don't gate.
39
+
40
+ ## Step 2 — Dispatch (only when it enters the loop)
41
+
42
+ Hand off to the node skill below. Two hard gates are rigid:
43
+ - **A1 not aligned → do not write `prd.md`.**
44
+ - **B2 expected behavior not aligned → do not start fixing.**
45
+
46
+ | Node | Purpose | Skill |
47
+ |------|---------|-------|
48
+ | A1 | Align the requirement | `brainstorming` (+ `grill-me` for detail) |
49
+ | A2 | Write `prd.md` | `to-prd` |
50
+ | A3 | Write `design.md` | `writing-plans` |
51
+ | A4 | Write `todo.md` | `to-issues` |
52
+ | A5 | Implement (TDD) | `tdd` |
53
+ | A6 | Verify on the real path | `verification-before-completion` |
54
+ | B2 | Align expected behavior | `grill-me` |
55
+ | B3 | Find root cause | `diagnose` |
56
+ | B4 | Write the issue file | (7-section format) |
57
+ | B5 | Fix (TDD) | `tdd` |
58
+ | B7 | Review & sediment findings | `review` |
59
+
60
+ `karpathy-guidelines` is always-on whenever you write or change code (no node).
61
+
62
+ Spec file mechanics — INDEX derivation, frontmatter, state machine, R1 — live in `spec/AGENTS.md`.
@@ -1,153 +1,153 @@
1
- ---
2
- name: verification-before-completion
3
- description: Use at S1 node A6 - end-to-end verification on the real user path before claiming the need is complete, and before A -> B user acceptance. Requires running real-path verification (NOT mocked) and confirming output before any success claim. Evidence before assertions always. Failing this is the most common A-loop self-deception.
4
- ---
5
-
6
- # Verification Before Completion
7
-
8
- ## Overview
9
-
10
- Claiming work is complete without verification is dishonesty, not efficiency.
11
-
12
- **Core principle:** Evidence before claims, always.
13
-
14
- **Violating the letter of this rule is violating the spirit of this rule.**
15
-
16
- ## The Iron Law
17
-
18
- ```
19
- NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
20
- ```
21
-
22
- If you haven't run the verification command in this message, you cannot claim it passes.
23
-
24
- ## The Gate Function
25
-
26
- ```
27
- BEFORE claiming any status or expressing satisfaction:
28
-
29
- 1. IDENTIFY: What command proves this claim?
30
- 2. RUN: Execute the FULL command (fresh, complete)
31
- 3. READ: Full output, check exit code, count failures
32
- 4. VERIFY: Does output confirm the claim?
33
- - If NO: State actual status with evidence
34
- - If YES: State claim WITH evidence
35
- 5. ONLY THEN: Make the claim
36
-
37
- Skip any step = lying, not verifying
38
- ```
39
-
40
- ## Common Failures
41
-
42
- | Claim | Requires | Not Sufficient |
43
- |-------|----------|----------------|
44
- | Tests pass | Test command output: 0 failures | Previous run, "should pass" |
45
- | Linter clean | Linter output: 0 errors | Partial check, extrapolation |
46
- | Build succeeds | Build command: exit 0 | Linter passing, logs look good |
47
- | Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
48
- | Regression test works | Red-green cycle verified | Test passes once |
49
- | Agent completed | VCS diff shows changes | Agent reports "success" |
50
- | Requirements met | Line-by-line checklist | Tests passing |
51
- | **Need complete (A6)** | **End-to-end run of the real user path described in `prd.md` Solution / User Stories - observe expected outputs at every step** | Unit + integration tests green; lint clean; mocked end-to-end pass |
52
-
53
- ## Red Flags - STOP
54
-
55
- - Using "should", "probably", "seems to"
56
- - Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
57
- - About to commit/push/PR without verification
58
- - Trusting agent success reports
59
- - Relying on partial verification
60
- - Thinking "just this once"
61
- - Tired and wanting work over
62
- - **ANY wording implying success without having run verification**
63
-
64
- ## Rationalization Prevention
65
-
66
- | Excuse | Reality |
67
- |--------|---------|
68
- | "Should work now" | RUN the verification |
69
- | "I'm confident" | Confidence ≠ evidence |
70
- | "Just this once" | No exceptions |
71
- | "Linter passed" | Linter ≠ compiler |
72
- | "Agent said success" | Verify independently |
73
- | "I'm tired" | Exhaustion ≠ excuse |
74
- | "Partial check is enough" | Partial proves nothing |
75
- | "Different words so rule doesn't apply" | Spirit over letter |
76
-
77
- ## Key Patterns
78
-
79
- **Tests:**
80
- ```
81
- ✅ [Run test command] [See: 34/34 pass] "All tests pass"
82
- ❌ "Should pass now" / "Looks correct"
83
- ```
84
-
85
- **Regression tests (TDD Red-Green):**
86
- ```
87
- ✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
88
- ❌ "I've written a regression test" (without red-green verification)
89
- ```
90
-
91
- **Build:**
92
- ```
93
- ✅ [Run build] [See: exit 0] "Build passes"
94
- ❌ "Linter passed" (linter doesn't check compilation)
95
- ```
96
-
97
- **Requirements:**
98
- ```
99
- ✅ Re-read plan → Create checklist → Verify each → Report gaps or completion
100
- ❌ "Tests pass, phase complete"
101
- ```
102
-
103
- **Agent delegation:**
104
- ```
105
- ✅ Agent reports success → Check VCS diff → Verify changes → Report actual state
106
- ❌ Trust agent report
107
- ```
108
-
109
- ## When To Apply
110
-
111
- **ALWAYS before:**
112
- - ANY variation of success/completion claims
113
- - ANY expression of satisfaction
114
- - ANY positive statement about work state
115
- - Committing, PR creation, task completion
116
- - Moving to next task
117
- - Delegating to agents
118
-
119
- **Rule applies to:**
120
- - Exact phrases
121
- - Paraphrases and synonyms
122
- - Implications of success
123
- - ANY communication suggesting completion/correctness
124
-
125
- ## The Bottom Line
126
-
127
- **No shortcuts for verification.**
128
-
129
- Run the command. Read the output. THEN claim the result.
130
-
131
- This is non-negotiable.
132
-
133
- ## After Verification (S1 node A6)
134
-
135
- If verification passes:
136
-
137
- 1. Update `spec/INDEX.md`:
138
- - Recompute `当前节点` per `spec/AGENTS.md` INDEX rules - for a fresh need this becomes "B1 user acceptance" (the next node is user-driven, not skill-driven)
139
- - If unsure, run `ae index-rebuild`
140
- 2. Hand off to B1: tell the user the need is ready for their hands-on acceptance test. Do NOT mark anything `archived` - `archived` is reserved for needs that get superseded, not completed.
141
-
142
- If verification fails:
143
-
144
- 1. Do NOT update INDEX.
145
- 2. Return to A5 `tdd` with the failing evidence; if the failure reveals a design gap, escalate to A3 `writing-plans` to patch `design.md`.
146
-
147
- ## Distinction from B-side verification
148
-
149
- - **A6 (this skill)** = developer self-verification on the real user path; runs BEFORE handing the need to the user
150
- - **B1** = user-driven hands-on verification; user uses the product per `prd.md`, reports back
151
- - **B6** = user re-verification after a B5 fix; same nature as B1, just post-fix
152
-
153
- A6 passing does NOT mean the need is done. Only B1 (or B6 in a B-loop) closes the need.
1
+ ---
2
+ name: verification-before-completion
3
+ description: Use at S1 node A6 - end-to-end verification on the real user path before claiming the need is complete, and before A -> B user acceptance. Requires running real-path verification (NOT mocked) and confirming output before any success claim. Evidence before assertions always. Failing this is the most common A-loop self-deception.
4
+ ---
5
+
6
+ # Verification Before Completion
7
+
8
+ ## Overview
9
+
10
+ Claiming work is complete without verification is dishonesty, not efficiency.
11
+
12
+ **Core principle:** Evidence before claims, always.
13
+
14
+ **Violating the letter of this rule is violating the spirit of this rule.**
15
+
16
+ ## The Iron Law
17
+
18
+ ```
19
+ NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
20
+ ```
21
+
22
+ If you haven't run the verification command in this message, you cannot claim it passes.
23
+
24
+ ## The Gate Function
25
+
26
+ ```
27
+ BEFORE claiming any status or expressing satisfaction:
28
+
29
+ 1. IDENTIFY: What command proves this claim?
30
+ 2. RUN: Execute the FULL command (fresh, complete)
31
+ 3. READ: Full output, check exit code, count failures
32
+ 4. VERIFY: Does output confirm the claim?
33
+ - If NO: State actual status with evidence
34
+ - If YES: State claim WITH evidence
35
+ 5. ONLY THEN: Make the claim
36
+
37
+ Skip any step = lying, not verifying
38
+ ```
39
+
40
+ ## Common Failures
41
+
42
+ | Claim | Requires | Not Sufficient |
43
+ |-------|----------|----------------|
44
+ | Tests pass | Test command output: 0 failures | Previous run, "should pass" |
45
+ | Linter clean | Linter output: 0 errors | Partial check, extrapolation |
46
+ | Build succeeds | Build command: exit 0 | Linter passing, logs look good |
47
+ | Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
48
+ | Regression test works | Red-green cycle verified | Test passes once |
49
+ | Agent completed | VCS diff shows changes | Agent reports "success" |
50
+ | Requirements met | Line-by-line checklist | Tests passing |
51
+ | **Need complete (A6)** | **End-to-end run of the real user path described in `prd.md` Solution / User Stories - observe expected outputs at every step** | Unit + integration tests green; lint clean; mocked end-to-end pass |
52
+
53
+ ## Red Flags - STOP
54
+
55
+ - Using "should", "probably", "seems to"
56
+ - Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
57
+ - About to commit/push/PR without verification
58
+ - Trusting agent success reports
59
+ - Relying on partial verification
60
+ - Thinking "just this once"
61
+ - Tired and wanting work over
62
+ - **ANY wording implying success without having run verification**
63
+
64
+ ## Rationalization Prevention
65
+
66
+ | Excuse | Reality |
67
+ |--------|---------|
68
+ | "Should work now" | RUN the verification |
69
+ | "I'm confident" | Confidence ≠ evidence |
70
+ | "Just this once" | No exceptions |
71
+ | "Linter passed" | Linter ≠ compiler |
72
+ | "Agent said success" | Verify independently |
73
+ | "I'm tired" | Exhaustion ≠ excuse |
74
+ | "Partial check is enough" | Partial proves nothing |
75
+ | "Different words so rule doesn't apply" | Spirit over letter |
76
+
77
+ ## Key Patterns
78
+
79
+ **Tests:**
80
+ ```
81
+ ✅ [Run test command] [See: 34/34 pass] "All tests pass"
82
+ ❌ "Should pass now" / "Looks correct"
83
+ ```
84
+
85
+ **Regression tests (TDD Red-Green):**
86
+ ```
87
+ ✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
88
+ ❌ "I've written a regression test" (without red-green verification)
89
+ ```
90
+
91
+ **Build:**
92
+ ```
93
+ ✅ [Run build] [See: exit 0] "Build passes"
94
+ ❌ "Linter passed" (linter doesn't check compilation)
95
+ ```
96
+
97
+ **Requirements:**
98
+ ```
99
+ ✅ Re-read plan → Create checklist → Verify each → Report gaps or completion
100
+ ❌ "Tests pass, phase complete"
101
+ ```
102
+
103
+ **Agent delegation:**
104
+ ```
105
+ ✅ Agent reports success → Check VCS diff → Verify changes → Report actual state
106
+ ❌ Trust agent report
107
+ ```
108
+
109
+ ## When To Apply
110
+
111
+ **ALWAYS before:**
112
+ - ANY variation of success/completion claims
113
+ - ANY expression of satisfaction
114
+ - ANY positive statement about work state
115
+ - Committing, PR creation, task completion
116
+ - Moving to next task
117
+ - Delegating to agents
118
+
119
+ **Rule applies to:**
120
+ - Exact phrases
121
+ - Paraphrases and synonyms
122
+ - Implications of success
123
+ - ANY communication suggesting completion/correctness
124
+
125
+ ## The Bottom Line
126
+
127
+ **No shortcuts for verification.**
128
+
129
+ Run the command. Read the output. THEN claim the result.
130
+
131
+ This is non-negotiable.
132
+
133
+ ## After Verification (S1 node A6)
134
+
135
+ If verification passes:
136
+
137
+ 1. Update `spec/INDEX.md`:
138
+ - Recompute `当前节点` per `spec/AGENTS.md` INDEX rules - for a fresh need this becomes "B1 user acceptance" (the next node is user-driven, not skill-driven)
139
+ - If unsure, run `ae index-rebuild`
140
+ 2. Hand off to B1: tell the user the need is ready for their hands-on acceptance test. Do NOT mark anything `archived` - `archived` is reserved for needs that get superseded, not completed.
141
+
142
+ If verification fails:
143
+
144
+ 1. Do NOT update INDEX.
145
+ 2. Return to A5 `tdd` with the failing evidence; if the failure reveals a design gap, escalate to A3 `writing-plans` to patch `design.md`.
146
+
147
+ ## Distinction from B-side verification
148
+
149
+ - **A6 (this skill)** = developer self-verification on the real user path; runs BEFORE handing the need to the user
150
+ - **B1** = user-driven hands-on verification; user uses the product per `prd.md`, reports back
151
+ - **B6** = user re-verification after a B5 fix; same nature as B1, just post-fix
152
+
153
+ A6 passing does NOT mean the need is done. Only B1 (or B6 in a B-loop) closes the need.