create-anpunkit 2.1.0 → 2.3.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/bin/cli.js +2 -2
- package/package.json +2 -3
- package/template/.claude/agents/debugger.md +1 -1
- package/template/.claude/agents/e2e-runner.md +56 -29
- package/template/.claude/agents/implementer.md +14 -8
- package/template/.claude/agents/infra-provisioner.md +53 -59
- package/template/.claude/agents/planner.md +99 -30
- package/template/.claude/agents/researcher.md +16 -1
- package/template/.claude/agents/spec-author.md +126 -0
- package/template/.claude/agents/synthesizer.md +1 -1
- package/template/.claude/agents/test-author.md +81 -63
- package/template/.claude/anpunkit-manifest.json +66 -107
- package/template/.claude/commands/infra.md +7 -3
- package/template/.claude/commands/log-decision.md +1 -1
- package/template/.claude/commands/log-issue.md +1 -1
- package/template/.claude/commands/overview.md +55 -13
- package/template/.claude/commands/phase.md +153 -81
- package/template/.claude/commands/quick.md +1 -1
- package/template/.claude/commands/replan.md +1 -1
- package/template/.claude/commands/store-wisdom.md +1 -1
- package/template/.claude/commands/synthesize.md +1 -1
- package/template/.claude/commands/unstuck.md +1 -1
- package/template/.claude/hooks/session-start.sh +5 -11
- package/template/.claude/ref/compression.md +56 -0
- package/template/.claude/skills/karpathy-guidelines/SKILL.md +1 -1
- package/template/.gitattributes +1 -0
- package/template/AGENTS.md +264 -130
- package/template/CLAUDE.md +5 -9
- package/template/README.md +116 -136
- package/template/commands.src/infra.md +7 -3
- package/template/commands.src/log-decision.md +1 -1
- package/template/commands.src/log-issue.md +1 -1
- package/template/commands.src/overview.md +55 -13
- package/template/commands.src/phase.md +153 -81
- package/template/commands.src/quick.md +1 -1
- package/template/commands.src/replan.md +1 -1
- package/template/commands.src/store-wisdom.md +1 -1
- package/template/commands.src/synthesize.md +1 -1
- package/template/commands.src/unstuck.md +1 -1
- package/template/docs/DESIGN_LOG.md +414 -9
- package/template/knowledge/azure.md +161 -0
- package/template/knowledge/webapp.md +265 -0
- package/template/scripts/spec-conformance.sh +93 -0
- package/template/scripts/spec-staleness.sh +115 -0
- package/template/setup.sh +30 -111
- package/template/tests/helpers/spec-assert.py +162 -0
- package/template/tests/helpers/spec-assert.ts +158 -0
- package/template/.claude/hooks/cursor-session-start.sh +0 -17
- package/template/.claude/skills/caveman/SKILL.md +0 -39
- package/template/.cursor/commands/infra.md +0 -82
- package/template/.cursor/commands/log-decision.md +0 -29
- package/template/.cursor/commands/log-issue.md +0 -23
- package/template/.cursor/commands/overview.md +0 -145
- package/template/.cursor/commands/phase.md +0 -249
- package/template/.cursor/commands/quick.md +0 -25
- package/template/.cursor/commands/replan.md +0 -73
- package/template/.cursor/commands/store-wisdom.md +0 -191
- package/template/.cursor/commands/synthesize.md +0 -22
- package/template/.cursor/commands/unstuck.md +0 -36
- package/template/.cursor/hooks.json +0 -14
- package/template/.cursor/rules/anpunkit.md +0 -11
- package/template/anpunkit.png +0 -0
- package/template/docker-compose.test.yml +0 -34
- package/template/e2e/global-setup.ts +0 -57
- package/template/index.html +0 -340
- package/template/playwright.config.ts +0 -28
- package/template/scripts/auth-setup.sh +0 -51
- package/template/scripts/e2e-stack.sh +0 -65
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Run one phase end-to-end. TDD phases run SCAFFOLD -> RED ->
|
|
2
|
+
description: Run one phase end-to-end. TDD phases run SPEC fill -> SPEC REVIEW -> SCAFFOLD -> RED -> conformance -> GREEN -> boundary/E2E; non-TDD phases run IMPLEMENT -> TEST. Both with the debug circuit breaker and the regression + dataflow + evidence guards at CLOSE.
|
|
3
3
|
argument-hint: [phase number]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
you do NOT implement or debug yourself.
|
|
6
|
+
compression: user (.claude/ref/compression.md). You are the ORCHESTRATOR. Route work to subagents —
|
|
7
|
+
you do NOT implement, fill specs, or debug yourself.
|
|
8
8
|
|
|
9
9
|
Note: subagents cannot talk to the user. Only YOU can.
|
|
10
10
|
|
|
@@ -14,8 +14,9 @@ Target phase: $ARGUMENTS (default: the phase marked pending in docs/PLAN.md)
|
|
|
14
14
|
|
|
15
15
|
## 0. PRE-FLIGHT
|
|
16
16
|
|
|
17
|
-
a. INFRA CHECK (phases > 0):
|
|
18
|
-
-
|
|
17
|
+
a. INFRA CHECK (phases > 0): read docs/OVERVIEW.md `infra_needed`.
|
|
18
|
+
- `infra_needed: false` -> no Phase 0 exists; SKIP this check entirely.
|
|
19
|
+
- `infra_needed: true`: read docs/INFRA.md. If Phase 0 not done -> STOP.
|
|
19
20
|
Tell me: "Phase 0 (infra) not complete. Run `/infra` first."
|
|
20
21
|
- Exception: if $ARGUMENTS is "0", tell me to run `/infra` directly.
|
|
21
22
|
|
|
@@ -29,20 +30,26 @@ b. PHASE STATE CHECK: Read docs/STATE.md and docs/PLAN.md.
|
|
|
29
30
|
c. FINAL PHASE CHECK: Read docs/PLAN.md. Is this the last phase (no further
|
|
30
31
|
pending phases after this one)? Record this as IS_FINAL_PHASE=true/false.
|
|
31
32
|
|
|
32
|
-
d. AUTH LIVENESS GATE (hard rule 16
|
|
33
|
-
will run a
|
|
33
|
+
d. AUTH LIVENESS GATE (hard rule 16): only if this phase touches a credentialed
|
|
34
|
+
external service and will run a boundary/E2E suite. Skip otherwise.
|
|
34
35
|
- If INFRA.md has no `AUTH PROOF: PASS` marker -> STOP: "Auth never proven
|
|
35
36
|
reusable. Run `/infra` first."
|
|
36
|
-
- Run
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
- Run the liveness command recorded in docs/INFRA.md `## AUTH` (Azure projects:
|
|
38
|
+
the ritual per `knowledge/azure.md`, i.e. `bash scripts/auth-setup.sh`) and,
|
|
39
|
+
for each external system this phase touches (docs/DATAFLOW.md external rows +
|
|
40
|
+
docs/ENDPOINTS.md auth column), confirm its credential is obtainable
|
|
41
|
+
headlessly. Any failure -> boundary/E2E is BLOCKED; tell me what to run; the
|
|
40
42
|
MOCK suite may still proceed.
|
|
41
43
|
|
|
42
44
|
e. FRONTEND TRIGGER (hard rule 13): read docs/OVERVIEW.md `has_frontend` + the
|
|
43
45
|
frontend root. Set FRONTEND_PHASE=true iff `has_frontend: true` AND this
|
|
44
46
|
phase's `changes` (docs/PLAN.md) include any path under the frontend root.
|
|
45
|
-
This is a PATH MATCH, not a judgment call. Record FRONTEND_PHASE
|
|
47
|
+
This is a PATH MATCH, not a judgment call. Record FRONTEND_PHASE — it gates the
|
|
48
|
+
`ui` boundary run + evidence at CLOSE.
|
|
49
|
+
|
|
50
|
+
f. FLAG BASELINES: read docs/OVERVIEW.md `e2e_kind` + `deploy_kind`. These are the
|
|
51
|
+
project baselines; §1 binds this phase's effective E2E_KIND and (final phase)
|
|
52
|
+
confirms DEPLOY_KIND.
|
|
46
53
|
|
|
47
54
|
---
|
|
48
55
|
|
|
@@ -57,8 +64,9 @@ datasource, compare what it touches to the confirmed BASELINE in
|
|
|
57
64
|
docs/research/datasource-<name>.md. If it touches a NEW table/column beyond the
|
|
58
65
|
baseline -> surface my understanding of just that delta as a falsifiable claim;
|
|
59
66
|
WAIT for confirm; append it to datasource-<name>.md. If it touches only confirmed
|
|
60
|
-
data -> proceed with a one-line note, no stop.
|
|
61
|
-
datasource is HARD-BLOCKED (mock still runs).
|
|
67
|
+
data -> proceed with a one-line note, no stop. Boundary/E2E against an UNCONFIRMED
|
|
68
|
+
datasource is HARD-BLOCKED (mock still runs). The confirmed baseline is what
|
|
69
|
+
`spec-author` grounds fixtures in.
|
|
62
70
|
|
|
63
71
|
Then classify the phase:
|
|
64
72
|
|
|
@@ -66,63 +74,115 @@ Then classify the phase:
|
|
|
66
74
|
exported function/class, CLI command, message contract) assertable from the
|
|
67
75
|
acceptance spec. Size is NOT the criterion.
|
|
68
76
|
|
|
69
|
-
- Clear public surface -> `TDD_PHASE=true` -> run the TDD path (§2 → §
|
|
77
|
+
- Clear public surface -> `TDD_PHASE=true` -> run the TDD path (§2 → §3 → §4 → §5 → §6 → §7).
|
|
70
78
|
- Pure infra/config/doc, no public surface -> `TDD_PHASE=false` -> run the
|
|
71
79
|
non-TDD path (§2N → §3N).
|
|
72
80
|
- AMBIGUOUS -> default `TDD_PHASE=true`, but STATE the classification + the reason
|
|
73
|
-
to me, so I can override to non-TDD BEFORE
|
|
74
|
-
downgrade a TDD phase just to dodge the
|
|
81
|
+
to me, so I can override to non-TDD BEFORE SPEC fill fires. (Hard rule 11: never
|
|
82
|
+
downgrade a TDD phase just to dodge the gates.)
|
|
83
|
+
|
|
84
|
+
FLAG BINDING (hard rule 10): bind this phase's effective E2E_KIND — `browser` iff
|
|
85
|
+
FRONTEND_PHASE, else the OVERVIEW `e2e_kind` baseline. If IS_FINAL_PHASE, restate
|
|
86
|
+
`deploy_kind` and confirm the final phase's deploy task realizes it. STATE both
|
|
87
|
+
bindings. Divergence from OVERVIEW is mine to resolve — never silently re-derived.
|
|
75
88
|
|
|
76
89
|
=====================================================================
|
|
77
90
|
## TDD PATH (TDD_PHASE=true)
|
|
78
91
|
=====================================================================
|
|
79
92
|
|
|
80
|
-
## 2.
|
|
93
|
+
## 2. SPEC FILL + STALENESS
|
|
94
|
+
|
|
95
|
+
a. SKELETON CHECK: confirm docs/spec-phase-<n>.md exists (planner generated it at
|
|
96
|
+
/overview). If MISSING (planner classified it non-TDD, or it's a new phase from
|
|
97
|
+
/replan): generate the skeleton NOW from this phase's PLAN.md `acceptance` +
|
|
98
|
+
`dataflow:` transitions in the planner skeleton format (generated header + named
|
|
99
|
+
`TBD` rows), then `bash scripts/spec-staleness.sh stamp <n>` to stamp its hash.
|
|
100
|
+
|
|
101
|
+
b. Dispatch `spec-author`. It fills each case row with a real input payload
|
|
102
|
+
(`fixtures/<case-id>-input.json`), concrete expected output
|
|
103
|
+
(`fixtures/<case-id>-expected.json`), matcher tokens for volatile fields,
|
|
104
|
+
`error-code` for failures, and `selector/assert/value` `ui` descriptors —
|
|
105
|
+
grounded in the RESEARCH findings + the confirmed datasource baseline.
|
|
106
|
+
|
|
107
|
+
c. CASE-SET-DIVERGENCE (hard re-entry, hard rule 12 / §5.52): if `spec-author`
|
|
108
|
+
returns `CASE-SET-DIVERGENCE` (a required case can't be filled from real facts,
|
|
109
|
+
or research revealed an unlisted/contradicted case) -> STOP. Surface the finding.
|
|
110
|
+
I amend the up-front case-name contract in the skeleton; you re-stamp
|
|
111
|
+
(`bash scripts/spec-staleness.sh stamp <n>`); then re-dispatch `spec-author` to
|
|
112
|
+
re-fill from scratch. AI never amends the case-name set — I own the contract.
|
|
113
|
+
|
|
114
|
+
d. STALENESS (hard rule 17): run `bash scripts/spec-staleness.sh <n>`. Nonzero
|
|
115
|
+
(upstream PLAN acceptance line / DATAFLOW rows drifted since the skeleton was
|
|
116
|
+
stamped, e.g. via /replan) -> regenerate the skeleton header from current
|
|
117
|
+
PLAN/DATAFLOW, re-stamp, re-dispatch `spec-author`. Do NOT hand-edit the hash.
|
|
118
|
+
|
|
119
|
+
## 3. SPEC REVIEW — human gate (hard rule 12)
|
|
120
|
+
|
|
121
|
+
STOP. Surface the FILLED cases to me as FALSIFIABLE CLAIMS in plain language, e.g.:
|
|
122
|
+
- "POST /orders/submit with an empty line-item list → 422 EMPTY_ORDER."
|
|
123
|
+
- "Successful submit of a 3-line order → 201; order.id is a UUID; order.status is
|
|
124
|
+
'submitted'."
|
|
125
|
+
Re-run `bash scripts/spec-staleness.sh <n>` at entry (nonzero -> back to §2d).
|
|
126
|
+
SCAFFOLD cannot begin until I confirm. Classify any rejection WITH me (§5.50):
|
|
127
|
+
- WRONG EXPECTED -> fix the case row + `fixtures/<case-id>-expected.json`; no
|
|
128
|
+
re-research. (You may patch the fixture directly per my correction.)
|
|
129
|
+
- WRONG INPUT SHAPE -> re-dispatch `spec-author` with the correction.
|
|
130
|
+
- NEW CASE or CONTRADICTED CASE -> hard re-entry (§2c): I amend the skeleton, you
|
|
131
|
+
re-stamp, re-confirm the amended case(s) + any case sharing their `covers` id
|
|
132
|
+
(the staleness hash certifies the unchanged remainder — not re-read), re-fill.
|
|
133
|
+
Loop until I approve. Unskippable on TDD phases.
|
|
134
|
+
|
|
135
|
+
## 4. SCAFFOLD
|
|
81
136
|
|
|
82
137
|
Dispatch `implementer` in SCAFFOLD mode: interface stubs only (signatures +
|
|
83
|
-
types; bodies raise NotImplementedError / return 501); NO logic, NO tests
|
|
84
|
-
Returns the stub files + the interface surface.
|
|
138
|
+
types; bodies raise NotImplementedError / return 501); NO logic, NO tests, NO
|
|
139
|
+
edits to the spec or fixtures. Returns the stub files + the interface surface.
|
|
140
|
+
|
|
141
|
+
## 5. RED
|
|
85
142
|
|
|
86
|
-
|
|
143
|
+
Dispatch `test-author` to EMIT the boundary harness from the locked spec `data`
|
|
144
|
+
rows: one deep-equality assertion per case against `fixtures/<case-id>-expected.json`
|
|
145
|
+
via the kit comparator `tests/helpers/spec-assert.*`, each citing its case with a
|
|
146
|
+
`# spec: <case-id>` comment. It does NOT author assertions — it generates them from
|
|
147
|
+
the spec. Place contract/ENDPOINTS/transition tests in `tests/regression/`,
|
|
148
|
+
phase-local in `tests/phase-<n>/`.
|
|
87
149
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
contract/ENDPOINTS/DATAFLOW-transition tests in `tests/regression/`, phase-local
|
|
92
|
-
tests in `tests/phase-<n>/`. Run the suite.
|
|
150
|
+
If FRONTEND_PHASE (and the phase has `ui` cases): also dispatch `e2e-runner` to EMIT
|
|
151
|
+
Playwright assertions from each `ui` case's `fixtures/<case-id>-ui.json` descriptor,
|
|
152
|
+
each citing `// spec: <case-id>`. Run the suites.
|
|
93
153
|
|
|
94
|
-
RED GATE = every
|
|
95
|
-
|
|
96
|
-
- Any test PASSES on stubs -> STOP (spec trivial or test wrong); show me.
|
|
154
|
+
RED GATE = every case test COLLECTS cleanly AND FAILS (assertion / NotImplemented).
|
|
155
|
+
- Any test PASSES on stubs -> STOP (spec trivial or emitter wrong); show me.
|
|
97
156
|
- Collection / import / syntax error -> stub mismatch; re-dispatch SCAFFOLD to
|
|
98
157
|
fix SIGNATURES (not logic); re-run.
|
|
99
|
-
- UNDERSPEC -> STOP; ask me to sharpen the acceptance spec.
|
|
100
158
|
|
|
101
|
-
##
|
|
159
|
+
## 6. CONFORMANCE GATE (hard rule 18) — replaces the v2.1 human TEST REVIEW
|
|
102
160
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
- UNDERSPEC (the acceptance spec itself is too vague) -> sharpen the acceptance
|
|
109
|
-
spec in docs/PLAN.md, then re-dispatch `test-author` fresh.
|
|
110
|
-
Loop until I approve. This gate is unskippable on TDD phases.
|
|
161
|
+
Run `bash scripts/spec-conformance.sh <n>`. It loud-fails (and BLOCKS GREEN) if:
|
|
162
|
+
- any `TBD` marker remains in docs/spec-phase-<n>.md or a referenced fixture, OR
|
|
163
|
+
- any case-id in the spec table has no boundary test citing it (`# spec: <case-id>`).
|
|
164
|
+
Nonzero -> fix the gap (re-dispatch `spec-author` for a stray TBD, or `test-author`/
|
|
165
|
+
`e2e-runner` for a missing citation) and re-run. GREEN cannot start until it passes.
|
|
111
166
|
|
|
112
|
-
##
|
|
167
|
+
## 7. GREEN + BOUNDARY/E2E
|
|
113
168
|
|
|
114
|
-
Dispatch `implementer` in FILL mode with the
|
|
115
|
-
file paths (it MAY read the tests — frozen
|
|
116
|
-
|
|
169
|
+
Dispatch `implementer` in FILL mode with the FILLED docs/spec-phase-<n>.md + its
|
|
170
|
+
fixtures + research + the generated test file paths (it MAY read the tests — frozen
|
|
171
|
+
before logic, no overfit — but must NOT edit tests, spec, or fixtures). Fill to
|
|
172
|
+
green against the spec. Budget 3, WARN@2, STUCK@3.
|
|
117
173
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
174
|
+
Run the BOUNDARY suite (real HTTP/CLI/message; `TEST_MODE=real`) — the outer surface
|
|
175
|
+
per this phase's bound E2E_KIND. Capture evidence (hard rule 13):
|
|
176
|
+
- `browser` (FRONTEND_PHASE): dispatch `e2e-runner` to run its emitted `ui` specs —
|
|
177
|
+
MANDATORY — reads INFRA.md target, runs the stack ritual per `knowledge/webapp.md`
|
|
178
|
+
(`scripts/e2e-stack.sh up` / Playwright / `down`), captures a screenshot at EACH
|
|
179
|
+
UI-existence assertion regardless of pass/fail to docs/evidence/e2e-phase-<n>/,
|
|
180
|
+
with a summary in docs/research/e2e-<slug>.md.
|
|
181
|
+
- `cli` / `http` / `library-api`: the real-mode boundary suite IS the outer run;
|
|
182
|
+
capture its transcript (invocation + result) to docs/evidence/e2e-phase-<n>/.
|
|
183
|
+
No separate emitter is dispatched.
|
|
124
184
|
|
|
125
|
-
PHASE GATE (rule 5) -> go to §
|
|
185
|
+
PHASE GATE (rule 5) -> go to §8/§9/§10 (see GATE below).
|
|
126
186
|
|
|
127
187
|
=====================================================================
|
|
128
188
|
## NON-TDD PATH (TDD_PHASE=false)
|
|
@@ -133,22 +193,24 @@ PHASE GATE (rule 5) -> go to §4/§5/§6 (see GATE below).
|
|
|
133
193
|
Dispatch `implementer` (legacy mode) with phase spec + research summary.
|
|
134
194
|
Returns STUCK -> go to ESCALATE.
|
|
135
195
|
If IS_FINAL_PHASE: phase spec includes the deploy task; confirm the return
|
|
136
|
-
|
|
196
|
+
realizes `deploy_kind` (deployed URL / published version / verified install-run)
|
|
197
|
+
before proceeding.
|
|
137
198
|
|
|
138
199
|
## 3N. TEST (blind)
|
|
139
200
|
|
|
140
|
-
Dispatch `test-author`. It writes MOCK +
|
|
141
|
-
spec — never reads the logic. (No
|
|
142
|
-
public surface to
|
|
201
|
+
Dispatch `test-author`. It writes MOCK + boundary suites from the acceptance
|
|
202
|
+
spec — never reads the logic. (No spec file, SPEC REVIEW, or conformance gate on
|
|
203
|
+
the non-TDD path — no public surface to contract. e2e-runner only if FRONTEND_PHASE.)
|
|
143
204
|
|
|
144
205
|
=====================================================================
|
|
145
206
|
|
|
146
207
|
## GATE (both paths)
|
|
147
208
|
|
|
148
|
-
PHASE GATE = current-phase
|
|
149
|
-
WITH evidence captured AND the accumulated mock regression corpus
|
|
150
|
-
every docs/ENDPOINTS.md entry has a regression test AND
|
|
151
|
-
docs/DATAFLOW.md transition has a
|
|
209
|
+
PHASE GATE = current-phase BOUNDARY suite passes AND (FRONTEND_PHASE) the `ui`
|
|
210
|
+
boundary passes WITH evidence captured AND the accumulated mock regression corpus
|
|
211
|
+
stays green AND every docs/ENDPOINTS.md entry has a regression test AND (TDD)
|
|
212
|
+
`spec-conformance.sh` passed AND every REACHABLE docs/DATAFLOW.md transition has a
|
|
213
|
+
filled case in the phase spec (all checked at CLOSE).
|
|
152
214
|
- GATE PASS -> go to CLOSE.
|
|
153
215
|
- GATE BLOCKED (SERVICE UNAVAILABLE, STACK NOT READY, AZURE UNAVAILABLE, FLAKE)
|
|
154
216
|
-> tell me, wait. Not a code bug. For AZURE UNAVAILABLE: suggest `/infra verify`.
|
|
@@ -156,17 +218,17 @@ docs/DATAFLOW.md transition has a regression test (all checked at CLOSE).
|
|
|
156
218
|
|
|
157
219
|
---
|
|
158
220
|
|
|
159
|
-
##
|
|
221
|
+
## 8. FIX
|
|
160
222
|
|
|
161
223
|
Dispatch `debugger` (isolated context) on the specific failure.
|
|
162
|
-
- FIXED -> re-run
|
|
224
|
+
- FIXED -> re-run the boundary suite (and the regression corpus).
|
|
163
225
|
- SERVICE UNAVAILABLE -> tell me, wait. Suggest `/infra verify` if Azure.
|
|
164
226
|
- WARN (2 attempts failed) -> relay immediately, then let debugger finish attempt 3.
|
|
165
227
|
- STUCK -> go to ESCALATE.
|
|
166
228
|
|
|
167
229
|
---
|
|
168
230
|
|
|
169
|
-
##
|
|
231
|
+
## 9. ESCALATE — circuit breaker. Mode B.
|
|
170
232
|
|
|
171
233
|
FIRST STUCK: STOP. Present to me: the problem, 3 failed hypotheses, the
|
|
172
234
|
debugger's recommendation, the debug file path. Ask what to do. Wait. Options:
|
|
@@ -179,20 +241,25 @@ what to try next. Hand control to me.
|
|
|
179
241
|
|
|
180
242
|
---
|
|
181
243
|
|
|
182
|
-
##
|
|
244
|
+
## 10. CLOSE
|
|
183
245
|
|
|
184
246
|
REGRESSION + COVERAGE GATES (before closing — all FAIL HARD, do not close):
|
|
185
|
-
- Run `scripts/regression.sh` (mock corpus). A failure BLOCKS close -> route to FIX.
|
|
247
|
+
- Run `bash scripts/regression.sh` (mock corpus). A failure BLOCKS close -> route to FIX.
|
|
186
248
|
- ENDPOINTS COVERAGE: every `docs/ENDPOINTS.md` entry MUST have >=1 test in
|
|
187
249
|
`tests/regression/`. Zero coverage -> FAIL HARD.
|
|
188
|
-
- DATAFLOW COVERAGE (hard rule 14): every `docs/DATAFLOW.md`
|
|
189
|
-
trigger is REACHABLE in the code shipped so far MUST have >=1
|
|
190
|
-
|
|
191
|
-
Unreachable transitions list as PENDING (not failed). IF
|
|
192
|
-
transition still PENDING -> FAIL HARD (
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
-
|
|
250
|
+
- DATAFLOW COVERAGE (hard rule 14, re-seamed v2.2): every `docs/DATAFLOW.md`
|
|
251
|
+
transition whose trigger is REACHABLE in the code shipped so far MUST have >=1
|
|
252
|
+
FILLED CASE in docs/spec-phase-<n>.md. Zero coverage on a reachable transition ->
|
|
253
|
+
FAIL HARD. Unreachable transitions list as PENDING (not failed). IF
|
|
254
|
+
IS_FINAL_PHASE: any transition still PENDING -> FAIL HARD. (The case→test half is
|
|
255
|
+
already enforced by `spec-conformance.sh` at §6 — every case-id is cited by a
|
|
256
|
+
boundary test, which by placement lands in tests/regression/.)
|
|
257
|
+
- EVIDENCE (hard rule 13): docs/evidence/e2e-phase-<n>/ must contain the boundary
|
|
258
|
+
run's evidence — per-UI-existence-assertion screenshots for `browser`, or the
|
|
259
|
+
captured boundary-run transcript for `cli`/`http`/`library-api`. Required whenever
|
|
260
|
+
this phase closes an E2E_KIND boundary (browser: FRONTEND_PHASE; others: the phase
|
|
261
|
+
ships/changes the outer surface). Empty when required -> FAIL HARD.
|
|
262
|
+
- IF IS_FINAL_PHASE: additionally run `bash scripts/regression.sh --real` (full real
|
|
196
263
|
corpus). A failure blocks close.
|
|
197
264
|
|
|
198
265
|
Mark phase `done` in docs/PLAN.md.
|
|
@@ -202,31 +269,35 @@ ARCHITECTURE / DATAFLOW SELF-CHECK:
|
|
|
202
269
|
workflow rule? YES -> run `/log-decision`. NO -> state why not.
|
|
203
270
|
- Did this phase add/change an object's STATE LIFECYCLE? YES -> update
|
|
204
271
|
docs/DATAFLOW.md (hard rule 9) in this CLOSE, and confirm new reachable
|
|
205
|
-
transitions are covered. NO -> state why not.
|
|
272
|
+
transitions are covered by a filled case. NO -> state why not.
|
|
206
273
|
|
|
207
274
|
IF IS_FINAL_PHASE — FINAL CLOSE sequence:
|
|
208
275
|
|
|
209
276
|
a. Run `/synthesize` — pass the signal that this is the final phase so the
|
|
210
277
|
synthesizer runs the extended pass (OVERVIEW.md + README.md update).
|
|
211
278
|
|
|
212
|
-
b.
|
|
279
|
+
b. Surface a "READY TO USE" summary to me, shaped by `deploy_kind`:
|
|
213
280
|
```
|
|
214
281
|
✅ PROJECT COMPLETE
|
|
215
282
|
|
|
216
|
-
|
|
283
|
+
<deploy_kind line:
|
|
284
|
+
cloud-deploy -> Deployed at: <base URL from docs/INFRA.md "Deployed base URL">
|
|
285
|
+
package-publish -> Published: <package name> @ <version> to <registry>
|
|
286
|
+
install-run-verified -> Verified install/run: <the exact commands, confirmed working>
|
|
287
|
+
none(<reason>) -> Not shipped: <reason>>
|
|
217
288
|
|
|
218
|
-
##
|
|
219
|
-
<paste the full docs/ENDPOINTS.md table
|
|
289
|
+
## Interface
|
|
290
|
+
<web/http: paste the full docs/ENDPOINTS.md table; cli: the command surface;
|
|
291
|
+
library: the public API surface>
|
|
220
292
|
|
|
221
293
|
## Quick start
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
- Health check: GET <base URL>/health
|
|
294
|
+
<how to use it, per deploy_kind — base URL + auth + health check for a service;
|
|
295
|
+
install + invoke for a CLI; import + call for a library>
|
|
225
296
|
|
|
226
297
|
## Docs
|
|
227
|
-
- Full
|
|
298
|
+
- Full interface catalogue: docs/ENDPOINTS.md
|
|
228
299
|
- Object/state flow: docs/DATAFLOW.md
|
|
229
|
-
- Infrastructure: docs/INFRA.md
|
|
300
|
+
- Infrastructure: docs/INFRA.md (if infra_needed)
|
|
230
301
|
- Project history: docs/HISTORY.md
|
|
231
302
|
```
|
|
232
303
|
Tell me the project is complete and ready to use.
|
|
@@ -246,6 +317,7 @@ After each step, update docs/STATE.md:
|
|
|
246
317
|
phase: <n> (in progress)
|
|
247
318
|
tdd: <true|false>
|
|
248
319
|
frontend_phase: <true|false>
|
|
320
|
+
e2e_kind: <browser|cli|http|library-api — the bound value>
|
|
249
321
|
completed: <steps done so far>
|
|
250
322
|
next: <exact next step>
|
|
251
323
|
blocker: <none or open issue>
|
|
@@ -3,7 +3,7 @@ description: Make a small, obvious change directly — no agent chain, no phase
|
|
|
3
3
|
argument-hint: [what to change]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
compression: user (.claude/ref/compression.md). Apply `karpathy-guidelines` skill.
|
|
7
7
|
|
|
8
8
|
Purpose: skip the orchestration tax for a 5-line fix.
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@ description: Revise docs/PLAN.md when it no longer matches reality — add, cut,
|
|
|
3
3
|
argument-hint: [what changed about the plan]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
compression: user (.claude/ref/compression.md).
|
|
7
7
|
|
|
8
8
|
Recommended: run from plan mode (Shift+Tab). Optional; the command stops for
|
|
9
9
|
your approval regardless.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: Promote resolved issues and research findings from this project to the shared anpunkit-kb repo. Analyzes, proposes candidates for your review, then pushes approved entries.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
compression: user (.claude/ref/compression.md). You are the ORCHESTRATOR.
|
|
6
6
|
|
|
7
7
|
Purpose: share what this project learned with all future projects.
|
|
8
8
|
Only resolved issues and completed research qualify. Open issues do NOT.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: Forced re-research after a circuit breaker. Stops flailing, re-routes to deep research with full memory of dead ends.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
compression: user (.claude/ref/compression.md).
|
|
6
6
|
|
|
7
7
|
Trigger: I chose "re-research" at a circuit breaker (see /phase step 5).
|
|
8
8
|
|