create-anpunkit 2.2.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 +13 -3
- package/template/.claude/agents/implementer.md +1 -1
- package/template/.claude/agents/infra-provisioner.md +53 -59
- package/template/.claude/agents/planner.md +35 -29
- package/template/.claude/agents/researcher.md +16 -1
- package/template/.claude/agents/spec-author.md +9 -1
- package/template/.claude/agents/synthesizer.md +1 -1
- package/template/.claude/agents/test-author.md +9 -1
- package/template/.claude/anpunkit-manifest.json +52 -113
- 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 +37 -12
- package/template/.claude/commands/phase.md +50 -25
- 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/AGENTS.md +115 -84
- package/template/CLAUDE.md +4 -9
- package/template/README.md +91 -122
- 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 +37 -12
- package/template/commands.src/phase.md +50 -25
- 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 +222 -8
- package/template/knowledge/azure.md +161 -0
- package/template/knowledge/webapp.md +265 -0
- package/template/setup.sh +30 -111
- 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 -162
- package/template/.cursor/commands/phase.md +0 -296
- 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 -339
- package/template/playwright.config.ts +0 -28
- package/template/scripts/auth-setup.sh +0 -51
- package/template/scripts/e2e-stack.sh +0 -65
package/template/README.md
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
# anpunkit — AI-coding system development workflow
|
|
2
2
|
|
|
3
|
-
A reusable, self-navigating workflow for **Claude Code
|
|
4
|
-
|
|
3
|
+
A reusable, self-navigating workflow for **Claude Code**. Install with one `npx`
|
|
4
|
+
command, or clone it directly into your project.
|
|
5
5
|
|
|
6
6
|
## Why
|
|
7
7
|
|
|
8
8
|
Codifies a `design-research -> grill -> plan -> implement -> test -> deploy` loop
|
|
9
|
-
with vertical-slice phases, blind testing, agent orchestration, automatic
|
|
10
|
-
hygiene
|
|
11
|
-
|
|
9
|
+
with vertical-slice phases, blind testing, agent orchestration, and automatic
|
|
10
|
+
context hygiene — so the workflow runs itself instead of being hand-steered every
|
|
11
|
+
session. The invariant core (loop, gates, doc system, commands) is use-case
|
|
12
|
+
agnostic; web/Azure practice ships as **preinstalled knowledge docs**
|
|
13
|
+
(`knowledge/webapp.md`, `knowledge/azure.md`) that the researcher consults only
|
|
14
|
+
when your declared project type calls for them. Works for web apps, desktop apps,
|
|
15
|
+
scripts, and libraries alike.
|
|
12
16
|
|
|
13
17
|
## The core idea
|
|
14
18
|
|
|
@@ -22,20 +26,22 @@ Putting "read the issue log" in a hook is why it stops getting skipped.
|
|
|
22
26
|
```bash
|
|
23
27
|
cd my-project
|
|
24
28
|
npx create-anpunkit # non-destructive: never clobbers your files
|
|
25
|
-
# then open Claude Code
|
|
26
|
-
/overview # bootstrap the project (
|
|
29
|
+
# then open Claude Code — the session-start hook fires automatically
|
|
30
|
+
/overview # bootstrap the project (declares project type + flags)
|
|
27
31
|
```
|
|
28
|
-
Useful flags: `--dry-run` (print the
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
`--add-tool <name>` (lay down an additional tool's files into an existing
|
|
32
|
-
project), `--kb-path <dir>` (your pre-cloned KB repo; remote auto-recorded from
|
|
33
|
-
its origin) / `--no-kb`.
|
|
32
|
+
Useful flags: `--dry-run` (print the plan, write nothing), `--force` (overwrite
|
|
33
|
+
user-modified kit files), `--kb-path <dir>` (your pre-cloned KB repo; remote
|
|
34
|
+
auto-recorded from its origin) / `--no-kb`.
|
|
34
35
|
|
|
35
36
|
Upgrading an existing anpunkit project? Re-run `npx create-anpunkit`. It refreshes
|
|
36
37
|
kit-owned files, preserves anything you modified as `<file>.anpunkit-new`, merges
|
|
37
|
-
hook config into your existing
|
|
38
|
-
|
|
38
|
+
hook config into your existing `.claude/settings.json`, and writes a timestamped
|
|
39
|
+
`.anpunkit-backup-*/` first.
|
|
40
|
+
|
|
41
|
+
> **Upgrading from v2.2 (Cursor dropped):** v2.3 is Claude Code only. After
|
|
42
|
+
> upgrading you may safely delete the now-orphaned `.cursor/`,
|
|
43
|
+
> `.claude/hooks/cursor-session-start.sh`, and `.claude/anpunkit-tools.json` —
|
|
44
|
+
> setup.sh no longer manages them.
|
|
39
45
|
|
|
40
46
|
**Kit developers — clone + `setup.sh`:**
|
|
41
47
|
```bash
|
|
@@ -50,8 +56,8 @@ cd my-project && bash setup.sh
|
|
|
50
56
|
|
|
51
57
|
|Command |Does |
|
|
52
58
|
|-----------------|------------------------------------------------------------------------------|
|
|
53
|
-
|`/overview` |design-research → RESEARCH REVIEW → grill (×2, incl. data/state flow) → OVERVIEW + DATAFLOW → PLAN
|
|
54
|
-
|`/infra` |provision
|
|
59
|
+
|`/overview` |design-research → RESEARCH REVIEW → grill (×2, incl. data/state flow) → OVERVIEW (+ project flags) + DATAFLOW → PLAN → STATE|
|
|
60
|
+
|`/infra` |provision infra (when `infra_needed`): IaC → what-if → review → apply → INFRA.md + .env.test → AUTH PROOF|
|
|
55
61
|
|`/phase [n]` |run one phase: research → SPEC fill → SPEC REVIEW → SCAFFOLD → RED → conformance → GREEN → boundary/E2E, with circuit breaker|
|
|
56
62
|
|`/quick [change]`|small obvious change, direct, no agent chain |
|
|
57
63
|
|`/unstuck` |deep re-research after a circuit breaker (you trigger it) |
|
|
@@ -70,7 +76,16 @@ cd my-project && bash setup.sh
|
|
|
70
76
|
|
|
71
77
|
The main session is the orchestrator — it routes, it does not implement.
|
|
72
78
|
|
|
73
|
-
## The loop (v2.
|
|
79
|
+
## The loop (v2.3: adaptive to project type + spec-driven contract + upstream human gate)
|
|
80
|
+
|
|
81
|
+
**Project flags (declared at `/overview`).** The grill asks your `project_type`
|
|
82
|
+
(web app / desktop app / script / library / other) and what "shipped" means. From
|
|
83
|
+
that it derives `infra_needed`, `e2e_kind` (browser / cli / http / library-api),
|
|
84
|
+
`deploy_kind` (cloud-deploy / package-publish / install-run-verified / none), and
|
|
85
|
+
which `knowledge_docs` to consult — all recorded in `docs/OVERVIEW.md`, never
|
|
86
|
+
inferred mid-phase. Phase 0 (infra) exists only when `infra_needed`; the boundary
|
|
87
|
+
run is selected by `e2e_kind`; the final phase completes `deploy_kind`.
|
|
88
|
+
|
|
74
89
|
|
|
75
90
|
Phases that add a public callable surface run spec-first:
|
|
76
91
|
`RESEARCH -> SPEC fill -> spec-staleness -> SPEC REVIEW -> SCAFFOLD -> RED -> spec-conformance -> GREEN -> boundary/E2E -> FIX -> CLOSE`.
|
|
@@ -115,37 +130,22 @@ Methodology lives in one place: the portable **`AGENTS.md`** at the repo root.
|
|
|
115
130
|
|
|
116
131
|
|Tool |What you get |
|
|
117
132
|
|--------------|------------------------------------------------------------------------------------------------------|
|
|
118
|
-
|**Claude Code** (
|
|
119
|
-
|**
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
`inherit`/a compatible model.
|
|
135
|
-
- **Hook path resolution: project hooks run from the project root** (not
|
|
136
|
-
`.cursor/`), so the shipped wiring uses `bash .claude/hooks/<script>.sh`. Cursor
|
|
137
|
-
sets `CLAUDE_PROJECT_DIR` as a compatibility alias, so the shared scripts run
|
|
138
|
-
unchanged.
|
|
139
|
-
- **preCompact is observational** in Cursor (cannot modify compaction); the
|
|
140
|
-
snapshot side-effect still runs, which is all the COMPRESS ritual needs.
|
|
141
|
-
|
|
142
|
-
> Note: Cursor can also load `.claude/settings.json` hooks directly ("Third-party
|
|
143
|
-
> skills" toggle). anpunkit does not rely on this — it requires a manual settings
|
|
144
|
-
> toggle (silent no-op if forgotten) and would double-fire hooks alongside
|
|
145
|
-
> `.cursor/hooks.json`. The explicit native wiring is the supported path.
|
|
146
|
-
|
|
147
|
-
Codex is **not** a target in v2.0 (its repo-committed command path is deprecated
|
|
148
|
-
home-dir custom-prompts with a divergent UX).
|
|
133
|
+
|**Claude Code** (the supported target)|commands, all 3 lifecycle hooks **with context injection**, named subagents, shared KB, `@AGENTS.md` import|
|
|
134
|
+
|**Other tools**|read `AGENTS.md` if they support the open standard; no generated adapters, no support claim|
|
|
135
|
+
|
|
136
|
+
The canonical command bodies live in `commands.src/<name>.md`, copied to
|
|
137
|
+
`.claude/commands/` at install. **Cursor support was dropped in v2.3** (§5.69) —
|
|
138
|
+
the maintenance cost exceeded demand. v2.3 is Claude Code only.
|
|
139
|
+
|
|
140
|
+
## Compression
|
|
141
|
+
|
|
142
|
+
Output compression is a kit-native, always-on facility (`.claude/ref/compression.md`),
|
|
143
|
+
not a skill and never model-invoked. Two profiles: `user` (human-facing, keeps the
|
|
144
|
+
Auto-Clarity exception for security warnings, irreversible-action confirmations,
|
|
145
|
+
multi-step sequences, and clarification requests) and `internal` (agent↔agent,
|
|
146
|
+
harder). `AGENTS.md` declares `user`; every subagent prompt points at `internal`.
|
|
147
|
+
Exact-output artifacts (fixtures, spec rows, generated tests) are exempted by
|
|
148
|
+
structural gates in the emitter prompts.
|
|
149
149
|
|
|
150
150
|
## How each problem is solved
|
|
151
151
|
|
|
@@ -157,10 +157,10 @@ home-dir custom-prompts with a divergent UX).
|
|
|
157
157
|
|Context rot during debugging |`researcher` + `debugger` write full output to `docs/research/`, return only a summary + path|
|
|
158
158
|
|Want orchestration |8 scoped subagents; `/phase` is the orchestrator routing them |
|
|
159
159
|
|Handoff / memory keeps growing |`synthesizer` + PreCompact hook compress and dedup |
|
|
160
|
-
|
|
|
161
|
-
|Infra created ad-hoc mid-phase |`infra-provisioner` + Phase 0 — provisioned once, reviewed before apply
|
|
162
|
-
|Planning without domain knowledge |design-researcher runs before planning; double grill absorbs findings
|
|
163
|
-
|Deployment not in the plan |planner always puts
|
|
160
|
+
|Cloud auth friction per session |liveness ritual recorded in INFRA.md `## AUTH` (Azure: `knowledge/azure.md`) — one check per session|
|
|
161
|
+
|Infra created ad-hoc mid-phase |`infra-provisioner` + Phase 0 when `infra_needed` — provisioned once, reviewed before apply |
|
|
162
|
+
|Planning without domain knowledge |design-researcher runs before planning; consults matching `knowledge/*.md`; double grill absorbs findings|
|
|
163
|
+
|Deployment not in the plan |planner always puts the `deploy_kind` completion task in the last phase |
|
|
164
164
|
|No endpoint summary at project end |final-phase close shows usage endpoints from docs/ENDPOINTS.md |
|
|
165
165
|
|Re-discovering same gotchas across projects|`/store-wisdom` promotes findings to shared KB; researcher checks KB before web |
|
|
166
166
|
|
|
@@ -168,17 +168,19 @@ home-dir custom-prompts with a divergent UX).
|
|
|
168
168
|
|
|
169
169
|
- `docs/STATE.md` — current position, kept small (rewritten each phase)
|
|
170
170
|
- `docs/ISSUES.md` — error log, deduped by synthesizer
|
|
171
|
-
- `docs/PLAN.md` — vertical-slice phase plan (Phase 0
|
|
171
|
+
- `docs/PLAN.md` — vertical-slice phase plan (Phase 0 first when `infra_needed`)
|
|
172
172
|
- `docs/HISTORY.md` — one line per finished phase
|
|
173
173
|
- `docs/OVERVIEW.md` — project scope, written after double-grill
|
|
174
174
|
- `docs/DATAFLOW.md` — state-transition table per key object (grilled at /overview; drives CLOSE coverage gate)
|
|
175
175
|
- `docs/spec-phase-<n>.md` — per-phase behavioral contract (skeleton at /overview, filled by spec-author; human-reviewed at SPEC REVIEW)
|
|
176
176
|
- `fixtures/<case-id>-{input,expected,ui}.json` — shared by the spec row and the generated test harness (committed; part of the contract)
|
|
177
177
|
- `tests/helpers/spec-assert.{py,ts}` — kit-versioned matcher-aware comparator (honors `<UUID>`, `<ISO8601>`, … tokens)
|
|
178
|
-
- `docs/INFRA.md` —
|
|
178
|
+
- `docs/INFRA.md` — infra resource manifest + cost estimates (when `infra_needed`; written by infra-provisioner)
|
|
179
179
|
- `docs/ENDPOINTS.md` — API/service endpoint catalogue (maintained by implementer)
|
|
180
180
|
- `docs/.snapshots/` — pre-compact recovery markers (auto-pruned, gitignored)
|
|
181
|
-
- `
|
|
181
|
+
- `knowledge/webapp.md`, `knowledge/azure.md` — preinstalled matured practice + materializable templates
|
|
182
|
+
- `.claude/ref/compression.md` — kit-native compression profiles (`user`, `internal`)
|
|
183
|
+
- `infra/` — IaC templates (generated by infra-provisioner, committed to git)
|
|
182
184
|
|
|
183
185
|
## Shared Knowledge Base (optional)
|
|
184
186
|
|
|
@@ -216,8 +218,8 @@ See `docs/KB_GUIDE.md` in the anpunkit-kb repo (created by first `/store-wisdom`
|
|
|
216
218
|
|
|
217
219
|
```
|
|
218
220
|
/overview once per project (design-research + double grill)
|
|
219
|
-
/infra once per project (Phase 0) —
|
|
220
|
-
|
|
221
|
+
/infra once per project (Phase 0) — only when infra_needed
|
|
222
|
+
<INFRA.md AUTH command> once per session (infra projects; Azure: scripts/auth-setup.sh)
|
|
221
223
|
/phase 1 -> /synthesize -> /clear
|
|
222
224
|
/phase 2 -> /synthesize -> /clear
|
|
223
225
|
...
|
|
@@ -227,83 +229,50 @@ scripts/auth-setup.sh once per session (Azure projects)
|
|
|
227
229
|
# learned something worth keeping? -> /store-wisdom
|
|
228
230
|
```
|
|
229
231
|
|
|
230
|
-
##
|
|
232
|
+
## Use-case knowledge (infra, E2E, deploy)
|
|
233
|
+
|
|
234
|
+
The invariant core ships nothing use-case specific. Matured web/Azure practice
|
|
235
|
+
lives in **preinstalled knowledge docs** that the `researcher` consults at RESEARCH
|
|
236
|
+
when your declared `project_type` matches (recorded in OVERVIEW `knowledge_docs`):
|
|
231
237
|
|
|
232
|
-
|
|
233
|
-
|
|
238
|
+
- **`knowledge/webapp.md`** — browser E2E practice (Playwright, closed assert
|
|
239
|
+
vocabulary, screenshot evidence) plus the E2E stack ritual and the
|
|
240
|
+
`playwright.config.ts` / `e2e/global-setup.ts` / `docker-compose.test.yml` /
|
|
241
|
+
`scripts/e2e-stack.sh` templates, materialized into your project on demand.
|
|
242
|
+
- **`knowledge/azure.md`** — the once-per-session auth ritual (`scripts/auth-setup.sh`
|
|
243
|
+
template), Entra/MSAL ROPC + MFA-excluded test account practice, and the Bicep /
|
|
244
|
+
`az` provisioning patterns (Key Vault, THB cost annotations, SEA region default).
|
|
234
245
|
|
|
235
|
-
### Phase 0
|
|
246
|
+
### Infra (Phase 0, when `infra_needed`)
|
|
247
|
+
|
|
248
|
+
Application project types (web app, desktop app, service) set `infra_needed: true`;
|
|
249
|
+
scripts and libraries set it false and skip Phase 0 entirely. When present, Phase 0
|
|
250
|
+
is provisioned once before any code phase, owned by `infra-provisioner`:
|
|
236
251
|
|
|
237
252
|
```
|
|
238
|
-
/overview # includes Phase 0 in PLAN.md
|
|
239
|
-
/infra # generates
|
|
240
|
-
# writes docs/INFRA.md (resource manifest + cost estimates)
|
|
253
|
+
/overview # declares infra_needed; includes Phase 0 in PLAN.md when true
|
|
254
|
+
/infra # generates IaC -> what-if diff -> you review -> "go" -> apply
|
|
255
|
+
# writes docs/INFRA.md (resource manifest + cost estimates + ## AUTH)
|
|
241
256
|
# writes .env.test (generated, never fill manually)
|
|
242
257
|
# runs AUTH PROOF (every credential proven reusable headlessly)
|
|
243
258
|
/phase 1 # PRE-FLIGHT checks Phase 0 is done before starting
|
|
244
259
|
```
|
|
245
260
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
Run once per session before any Azure work:
|
|
249
|
-
|
|
250
|
-
```bash
|
|
251
|
-
scripts/auth-setup.sh
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
Checks your `az` token is fresh and the right subscription is active.
|
|
255
|
-
Prompts `az login` only if stale. No credential storage — your account only.
|
|
256
|
-
|
|
257
|
-
### What /infra does
|
|
258
|
-
|
|
259
|
-
1. `infra-provisioner` reads `docs/OVERVIEW.md` for the system design
|
|
260
|
-
1. Generates `infra/main.bicep` + per-service modules under `infra/modules/`
|
|
261
|
-
1. Runs `az deployment what-if` — shows exactly what will be created
|
|
262
|
-
1. **Stops and waits for your "go"** — nothing applied without your review
|
|
263
|
-
1. Applies the deployment
|
|
264
|
-
1. Writes `docs/INFRA.md` — resource IDs, endpoints, cost estimates (THB, SEA region)
|
|
265
|
-
1. Generates `.env.test` from the manifest
|
|
266
|
-
1. Runs the **AUTH PROOF** — proves every credential (Entra/MSAL + datasources) is obtainable headlessly twice in a row
|
|
267
|
-
|
|
268
|
-
Re-run `/infra` any time infra drifts or a new resource is needed.
|
|
269
|
-
Re-run `/infra regenerate-env` to refresh `.env.test` only.
|
|
270
|
-
Re-run `/infra auth-proof` to re-prove credentials on demand.
|
|
271
|
-
|
|
272
|
-
### Cost awareness
|
|
273
|
-
|
|
274
|
-
`infra-provisioner` annotates every resource in `INFRA.md` with an estimated
|
|
275
|
-
monthly cost. It uses production-appropriate SKUs by default — not artificially
|
|
276
|
-
cheap dev tiers that need resizing before go-live.
|
|
277
|
-
|
|
278
|
-
### E2E target
|
|
279
|
-
|
|
280
|
-
`infra-provisioner` determines the E2E target from the system design:
|
|
281
|
-
|
|
282
|
-
- **azure-deployed**: `E2E_STACK_EXTERNAL=1` — Playwright hits your deployed Azure app.
|
|
283
|
-
- **local-docker**: Containers run the app, pointed at real Azure services.
|
|
284
|
-
|
|
285
|
-
### Test data
|
|
286
|
-
|
|
287
|
-
Seeding and cleanup are **deployment phase** concerns, not E2E concerns.
|
|
288
|
-
`e2e-stack.sh` has no seed/cleanup commands.
|
|
289
|
-
|
|
290
|
-
## End-to-end testing
|
|
291
|
-
|
|
292
|
-
Three layers: unit/integration (mock suite), real API (`test-author`), and
|
|
293
|
-
functional browser E2E (`e2e-runner`, Playwright).
|
|
261
|
+
Cloud specifics (Azure `az`/Bicep commands, region/cost conventions, the session
|
|
262
|
+
auth ritual) live in `knowledge/azure.md`, consulted by `infra-provisioner`.
|
|
294
263
|
|
|
295
|
-
|
|
296
|
-
AND the browser E2E suite pass with screenshot evidence. Mock-green alone never closes a phase.
|
|
264
|
+
### Boundary testing (per `e2e_kind`)
|
|
297
265
|
|
|
298
|
-
|
|
299
|
-
`e2e/global-setup.ts` uses ROPC flow with a dedicated test account (MFA excluded
|
|
300
|
-
via Conditional Access) to fetch a real token and inject it into the MSAL cache.
|
|
266
|
+
The boundary run is selected by the phase's bound `e2e_kind`:
|
|
301
267
|
|
|
302
|
-
**
|
|
268
|
+
- **browser** (frontend phases): `e2e-runner` emits Playwright from each `ui` case's
|
|
269
|
+
descriptor and captures a screenshot at every UI-existence assertion — on success
|
|
270
|
+
too — to a gitignored `docs/evidence/` dir. Stack ritual + templates:
|
|
271
|
+
`knowledge/webapp.md`.
|
|
272
|
+
- **cli / http / library-api**: the phase's real-mode boundary suite runs against
|
|
273
|
+
the shipped outer surface, transcript captured as evidence.
|
|
303
274
|
|
|
304
|
-
|
|
305
|
-
1. Provision the Entra test user + Conditional Access MFA exclusion.
|
|
306
|
-
1. `npm i -D @playwright/test && npx playwright install chromium`
|
|
275
|
+
Mock-green alone never closes a phase.
|
|
307
276
|
|
|
308
277
|
## Windows / Git Bash
|
|
309
278
|
|
|
@@ -3,16 +3,20 @@ description: Provision or verify Azure infrastructure. Generates Bicep, shows wh
|
|
|
3
3
|
argument-hint: [provision | verify | update <what changed> | regenerate-env | auth-proof]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
compression: user (.claude/ref/compression.md). You are the ORCHESTRATOR.
|
|
7
7
|
|
|
8
8
|
Action: $ARGUMENTS (default: "provision" if INFRA.md missing, "verify" if present)
|
|
9
9
|
|
|
10
|
+
Only meaningful when docs/OVERVIEW.md has `infra_needed: true`. If
|
|
11
|
+
`infra_needed: false`, tell me this project has no infra phase and STOP.
|
|
12
|
+
|
|
10
13
|
---
|
|
11
14
|
|
|
12
15
|
## PRE-FLIGHT
|
|
13
16
|
|
|
14
|
-
1.
|
|
15
|
-
|
|
17
|
+
1. Confirm cloud CLI auth per the project's knowledge doc (Azure:
|
|
18
|
+
`knowledge/azure.md` ritual — `bash scripts/auth-setup.sh`; materialize it if
|
|
19
|
+
absent). If it fails, STOP and tell me the exact command to run.
|
|
16
20
|
|
|
17
21
|
2. Determine mode from $ARGUMENTS or default logic.
|
|
18
22
|
|
|
@@ -3,7 +3,7 @@ description: Record an architectural decision in docs/DESIGN_LOG.md. Use only wh
|
|
|
3
3
|
argument-hint: [what changed]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
compression: user (.claude/ref/compression.md).
|
|
7
7
|
|
|
8
8
|
Append an architectural decision to docs/DESIGN_LOG.md. Change: $ARGUMENTS
|
|
9
9
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
description: Bootstrap a new project. Runs design-research, research review, double grill (incl. data/state flow), datasource-understanding baseline, and planning. Run once per project.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
compression: user (.claude/ref/compression.md).
|
|
6
6
|
|
|
7
7
|
Recommended: run from plan mode (Shift+Tab). Planning agents are read-only by
|
|
8
8
|
tool grant; plan mode adds a read-only gate on the main session too. Optional.
|
|
@@ -16,11 +16,17 @@ Goal: stand up a fresh project workspace with a well-grounded plan.
|
|
|
16
16
|
### Round 1 — Initial grill
|
|
17
17
|
|
|
18
18
|
1. Run the `grill-me` skill to interrogate me. Goal: understand initial scope.
|
|
19
|
-
Cover: project purpose, success criteria, external services,
|
|
20
|
-
needed (type + sizing), region,
|
|
21
|
-
|
|
19
|
+
Cover: project purpose, success criteria, external services, cloud/infra
|
|
20
|
+
services needed (type + sizing, if any), region, known constraints, unknowns.
|
|
21
|
+
ALSO establish:
|
|
22
|
+
- **project_type**: web app / desktop app / script / library / other. This
|
|
23
|
+
drives the deterministic flag derivation (step 6) and knowledge-doc
|
|
24
|
+
selection.
|
|
22
25
|
- **has_frontend**: is there a browser-facing UI? If yes, what is the frontend
|
|
23
26
|
root path (e.g. `src/web/`, `app/`)? This drives the mandatory-E2E path match.
|
|
27
|
+
- **deploy meaning**: what does "done and shipped" mean for this project —
|
|
28
|
+
cloud deploy (where?), package publish (which registry?), verified
|
|
29
|
+
install/run instructions, or none (why)? This sets `deploy_kind`.
|
|
24
30
|
Do not stop early. Do not write OVERVIEW.md yet.
|
|
25
31
|
|
|
26
32
|
Store the round-1 answers as working context — do NOT write OVERVIEW.md yet.
|
|
@@ -86,11 +92,23 @@ Store the round-1 answers as working context — do NOT write OVERVIEW.md yet.
|
|
|
86
92
|
- Project purpose and success criteria
|
|
87
93
|
- Scope and constraints (informed by research findings)
|
|
88
94
|
- External services with confirmed capabilities/limits
|
|
89
|
-
-
|
|
90
|
-
- Deployment target (azure-deployed or local-docker for E2E)
|
|
95
|
+
- Cloud/infra services section: every service with expected SKU (if any)
|
|
91
96
|
- `has_frontend: true|false` and, if true, the frontend root path
|
|
92
97
|
- Known risks / open questions (if any remain)
|
|
93
98
|
|
|
99
|
+
PROJECT FLAGS (hard rule 10 — declared once here, recorded verbatim, never
|
|
100
|
+
re-derived later):
|
|
101
|
+
- `project_type: web app|desktop app|script|library|other` (declared in round 1)
|
|
102
|
+
- `infra_needed: true|false` — derived: application types (web app, desktop
|
|
103
|
+
app, service) → true; script / library → false. Overridable here with a
|
|
104
|
+
stated reason.
|
|
105
|
+
- `e2e_kind: browser|cli|http|library-api` — derived: has_frontend → browser;
|
|
106
|
+
backend/API service → http; script → cli; library → library-api.
|
|
107
|
+
- `deploy_kind: cloud-deploy|package-publish|install-run-verified|none(<reason>)`
|
|
108
|
+
(from the round-1 "deploy meaning" answer).
|
|
109
|
+
- `knowledge_docs:` — derived list: web app or has_frontend → `knowledge/webapp.md`;
|
|
110
|
+
Azure services declared OR Azure cloud-deploy → `knowledge/azure.md`; else empty.
|
|
111
|
+
|
|
94
112
|
OVERVIEW.md is written HERE — after the re-grill, not before.
|
|
95
113
|
|
|
96
114
|
7. Write docs/DATAFLOW.md — a state-transition table per key object, driven by the
|
|
@@ -112,8 +130,10 @@ Store the round-1 answers as working context — do NOT write OVERVIEW.md yet.
|
|
|
112
130
|
|
|
113
131
|
8. Hand OVERVIEW.md + DATAFLOW.md + design-research findings to the `planner`
|
|
114
132
|
subagent. PLAN.md MUST:
|
|
115
|
-
- Start with Phase 0 (infra setup) as the first entry
|
|
116
|
-
|
|
133
|
+
- Start with Phase 0 (infra setup) as the first entry IFF `infra_needed: true`;
|
|
134
|
+
when `infra_needed: false` there is no Phase 0 — Phase 1 is the first entry.
|
|
135
|
+
- End with a final code phase whose deploy task completes `deploy_kind`
|
|
136
|
+
(cloud deploy / package publish / verified install-run / none-with-reason).
|
|
117
137
|
- For any phase whose `changes` touch the frontend root: include ≥1
|
|
118
138
|
UI-existence acceptance criterion naming the specific user-visible
|
|
119
139
|
interactive element the phase introduces (not "page renders 200").
|
|
@@ -138,15 +158,18 @@ Store the round-1 answers as working context — do NOT write OVERVIEW.md yet.
|
|
|
138
158
|
|
|
139
159
|
phase: 0 (pending)
|
|
140
160
|
completed: project bootstrapped — design research, research review, double grill (incl. data/state flow) done
|
|
141
|
-
next: run /infra to provision
|
|
161
|
+
next: <if infra_needed: "run /infra to provision infrastructure (Phase 0)"; else "run /phase 1">
|
|
142
162
|
blocker: none
|
|
143
163
|
|
|
144
164
|
```
|
|
165
|
+
When `infra_needed: false`, set `phase: 1 (pending)` and the next line to
|
|
166
|
+
"run /phase 1".
|
|
145
167
|
10. Create docs/ISSUES.md with header `# Issues` and `## Archived` section.
|
|
146
168
|
|
|
147
169
|
11. Create empty docs/HISTORY.md.
|
|
148
170
|
|
|
149
|
-
12. Create docs/INFRA.md from the template (populated by /infra).
|
|
171
|
+
12. Create docs/INFRA.md from the template (populated by /infra). Skip when
|
|
172
|
+
`infra_needed: false`.
|
|
150
173
|
|
|
151
174
|
13. Create docs/ENDPOINTS.md:
|
|
152
175
|
```
|
|
@@ -162,5 +185,7 @@ case NAMES (no values). I confirm the case-name set is COMPLETE here — these n
|
|
|
162
185
|
are the up-front behavioral contract; values get filled + reviewed per phase at
|
|
163
186
|
`/phase` SPEC REVIEW.
|
|
164
187
|
|
|
165
|
-
Remind me
|
|
166
|
-
|
|
188
|
+
Remind me of the next step per `infra_needed`:
|
|
189
|
+
- `infra_needed: true` → "Run `/infra` next to provision the environment (Phase 0)
|
|
190
|
+
and run the one-time AUTH PROOF before starting Phase 1."
|
|
191
|
+
- `infra_needed: false` → "No infra phase — run `/phase 1` to start."
|
|
@@ -3,7 +3,7 @@ description: Run one phase end-to-end. TDD phases run SPEC fill -> SPEC REVIEW -
|
|
|
3
3
|
argument-hint: [phase number]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
compression: user (.claude/ref/compression.md). You are the ORCHESTRATOR. Route work to subagents —
|
|
7
7
|
you do NOT implement, fill specs, or debug yourself.
|
|
8
8
|
|
|
9
9
|
Note: subagents cannot talk to the user. Only YOU can.
|
|
@@ -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,13 +30,14 @@ 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): if this phase
|
|
33
|
-
|
|
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
|
-
|
|
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
|
|
39
41
|
headlessly. Any failure -> boundary/E2E is BLOCKED; tell me what to run; the
|
|
40
42
|
MOCK suite may still proceed.
|
|
41
43
|
|
|
@@ -45,6 +47,10 @@ e. FRONTEND TRIGGER (hard rule 13): read docs/OVERVIEW.md `has_frontend` + the
|
|
|
45
47
|
This is a PATH MATCH, not a judgment call. Record FRONTEND_PHASE — it gates the
|
|
46
48
|
`ui` boundary run + evidence at CLOSE.
|
|
47
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.
|
|
53
|
+
|
|
48
54
|
---
|
|
49
55
|
|
|
50
56
|
## 1. RESEARCH + TDD APPLICABILITY
|
|
@@ -75,6 +81,11 @@ Then classify the phase:
|
|
|
75
81
|
to me, so I can override to non-TDD BEFORE SPEC fill fires. (Hard rule 11: never
|
|
76
82
|
downgrade a TDD phase just to dodge the gates.)
|
|
77
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.
|
|
88
|
+
|
|
78
89
|
=====================================================================
|
|
79
90
|
## TDD PATH (TDD_PHASE=true)
|
|
80
91
|
=====================================================================
|
|
@@ -160,11 +171,16 @@ fixtures + research + the generated test file paths (it MAY read the tests — f
|
|
|
160
171
|
before logic, no overfit — but must NOT edit tests, spec, or fixtures). Fill to
|
|
161
172
|
green against the spec. Budget 3, WARN@2, STUCK@3.
|
|
162
173
|
|
|
163
|
-
Run the BOUNDARY suite (real HTTP/CLI/message; `TEST_MODE=real`)
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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.
|
|
168
184
|
|
|
169
185
|
PHASE GATE (rule 5) -> go to §8/§9/§10 (see GATE below).
|
|
170
186
|
|
|
@@ -177,7 +193,8 @@ PHASE GATE (rule 5) -> go to §8/§9/§10 (see GATE below).
|
|
|
177
193
|
Dispatch `implementer` (legacy mode) with phase spec + research summary.
|
|
178
194
|
Returns STUCK -> go to ESCALATE.
|
|
179
195
|
If IS_FINAL_PHASE: phase spec includes the deploy task; confirm the return
|
|
180
|
-
|
|
196
|
+
realizes `deploy_kind` (deployed URL / published version / verified install-run)
|
|
197
|
+
before proceeding.
|
|
181
198
|
|
|
182
199
|
## 3N. TEST (blind)
|
|
183
200
|
|
|
@@ -237,8 +254,11 @@ REGRESSION + COVERAGE GATES (before closing — all FAIL HARD, do not close):
|
|
|
237
254
|
IS_FINAL_PHASE: any transition still PENDING -> FAIL HARD. (The case→test half is
|
|
238
255
|
already enforced by `spec-conformance.sh` at §6 — every case-id is cited by a
|
|
239
256
|
boundary test, which by placement lands in tests/regression/.)
|
|
240
|
-
- EVIDENCE (
|
|
241
|
-
|
|
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.
|
|
242
262
|
- IF IS_FINAL_PHASE: additionally run `bash scripts/regression.sh --real` (full real
|
|
243
263
|
corpus). A failure blocks close.
|
|
244
264
|
|
|
@@ -256,24 +276,28 @@ IF IS_FINAL_PHASE — FINAL CLOSE sequence:
|
|
|
256
276
|
a. Run `/synthesize` — pass the signal that this is the final phase so the
|
|
257
277
|
synthesizer runs the extended pass (OVERVIEW.md + README.md update).
|
|
258
278
|
|
|
259
|
-
b.
|
|
279
|
+
b. Surface a "READY TO USE" summary to me, shaped by `deploy_kind`:
|
|
260
280
|
```
|
|
261
281
|
✅ PROJECT COMPLETE
|
|
262
282
|
|
|
263
|
-
|
|
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>>
|
|
264
288
|
|
|
265
|
-
##
|
|
266
|
-
<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>
|
|
267
292
|
|
|
268
293
|
## Quick start
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
- 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>
|
|
272
296
|
|
|
273
297
|
## Docs
|
|
274
|
-
- Full
|
|
298
|
+
- Full interface catalogue: docs/ENDPOINTS.md
|
|
275
299
|
- Object/state flow: docs/DATAFLOW.md
|
|
276
|
-
- Infrastructure: docs/INFRA.md
|
|
300
|
+
- Infrastructure: docs/INFRA.md (if infra_needed)
|
|
277
301
|
- Project history: docs/HISTORY.md
|
|
278
302
|
```
|
|
279
303
|
Tell me the project is complete and ready to use.
|
|
@@ -293,6 +317,7 @@ After each step, update docs/STATE.md:
|
|
|
293
317
|
phase: <n> (in progress)
|
|
294
318
|
tdd: <true|false>
|
|
295
319
|
frontend_phase: <true|false>
|
|
320
|
+
e2e_kind: <browser|cli|http|library-api — the bound value>
|
|
296
321
|
completed: <steps done so far>
|
|
297
322
|
next: <exact next step>
|
|
298
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.
|