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.
Files changed (63) hide show
  1. package/bin/cli.js +2 -2
  2. package/package.json +2 -3
  3. package/template/.claude/agents/debugger.md +1 -1
  4. package/template/.claude/agents/e2e-runner.md +13 -3
  5. package/template/.claude/agents/implementer.md +1 -1
  6. package/template/.claude/agents/infra-provisioner.md +53 -59
  7. package/template/.claude/agents/planner.md +35 -29
  8. package/template/.claude/agents/researcher.md +16 -1
  9. package/template/.claude/agents/spec-author.md +9 -1
  10. package/template/.claude/agents/synthesizer.md +1 -1
  11. package/template/.claude/agents/test-author.md +9 -1
  12. package/template/.claude/anpunkit-manifest.json +52 -113
  13. package/template/.claude/commands/infra.md +7 -3
  14. package/template/.claude/commands/log-decision.md +1 -1
  15. package/template/.claude/commands/log-issue.md +1 -1
  16. package/template/.claude/commands/overview.md +37 -12
  17. package/template/.claude/commands/phase.md +50 -25
  18. package/template/.claude/commands/quick.md +1 -1
  19. package/template/.claude/commands/replan.md +1 -1
  20. package/template/.claude/commands/store-wisdom.md +1 -1
  21. package/template/.claude/commands/synthesize.md +1 -1
  22. package/template/.claude/commands/unstuck.md +1 -1
  23. package/template/.claude/hooks/session-start.sh +5 -11
  24. package/template/.claude/ref/compression.md +56 -0
  25. package/template/.claude/skills/karpathy-guidelines/SKILL.md +1 -1
  26. package/template/AGENTS.md +115 -84
  27. package/template/CLAUDE.md +4 -9
  28. package/template/README.md +91 -122
  29. package/template/commands.src/infra.md +7 -3
  30. package/template/commands.src/log-decision.md +1 -1
  31. package/template/commands.src/log-issue.md +1 -1
  32. package/template/commands.src/overview.md +37 -12
  33. package/template/commands.src/phase.md +50 -25
  34. package/template/commands.src/quick.md +1 -1
  35. package/template/commands.src/replan.md +1 -1
  36. package/template/commands.src/store-wisdom.md +1 -1
  37. package/template/commands.src/synthesize.md +1 -1
  38. package/template/commands.src/unstuck.md +1 -1
  39. package/template/docs/DESIGN_LOG.md +222 -8
  40. package/template/knowledge/azure.md +161 -0
  41. package/template/knowledge/webapp.md +265 -0
  42. package/template/setup.sh +30 -111
  43. package/template/.claude/hooks/cursor-session-start.sh +0 -17
  44. package/template/.claude/skills/caveman/SKILL.md +0 -39
  45. package/template/.cursor/commands/infra.md +0 -82
  46. package/template/.cursor/commands/log-decision.md +0 -29
  47. package/template/.cursor/commands/log-issue.md +0 -23
  48. package/template/.cursor/commands/overview.md +0 -162
  49. package/template/.cursor/commands/phase.md +0 -296
  50. package/template/.cursor/commands/quick.md +0 -25
  51. package/template/.cursor/commands/replan.md +0 -73
  52. package/template/.cursor/commands/store-wisdom.md +0 -191
  53. package/template/.cursor/commands/synthesize.md +0 -22
  54. package/template/.cursor/commands/unstuck.md +0 -36
  55. package/template/.cursor/hooks.json +0 -14
  56. package/template/.cursor/rules/anpunkit.md +0 -11
  57. package/template/anpunkit.png +0 -0
  58. package/template/docker-compose.test.yml +0 -34
  59. package/template/e2e/global-setup.ts +0 -57
  60. package/template/index.html +0 -339
  61. package/template/playwright.config.ts +0 -28
  62. package/template/scripts/auth-setup.sh +0 -51
  63. package/template/scripts/e2e-stack.sh +0 -65
package/bin/cli.js CHANGED
@@ -61,8 +61,8 @@ if (!bash) {
61
61
  }
62
62
 
63
63
  // Pass through recognised flags only; setup.sh validates the rest.
64
- const passthrough = ['--kb-path', '--kb-remote', '--no-kb', '--force', '--dry-run', '--tools', '--add-tool'];
65
- const valueFlags = ['--kb-path', '--kb-remote', '--tools', '--add-tool'];
64
+ const passthrough = ['--kb-path', '--kb-remote', '--no-kb', '--force', '--dry-run'];
65
+ const valueFlags = ['--kb-path', '--kb-remote'];
66
66
  const argv = process.argv.slice(2);
67
67
  // Git Bash is happiest with forward slashes; Windows APIs accept them too.
68
68
  const fwd = p => p.split(path.sep).join('/');
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-anpunkit",
3
- "version": "2.2.0",
4
- "description": "Scaffold the anpunkit AI-coding workflow (Claude Code + Cursor) into a project. Upgrade-safe, non-destructive.",
3
+ "version": "2.3.0",
4
+ "description": "Scaffold the anpunkit AI-coding workflow (Claude Code) into a project. Upgrade-safe, non-destructive.",
5
5
  "bin": {
6
6
  "create-anpunkit": "bin/cli.js"
7
7
  },
@@ -24,7 +24,6 @@
24
24
  "author": "Methee S. (Pun) <methee84@gmail.com> (https://github.com/MetheeS)",
25
25
  "keywords": [
26
26
  "claude-code",
27
- "cursor",
28
27
  "agents",
29
28
  "tdd",
30
29
  "workflow",
@@ -5,7 +5,7 @@ tools: Read, Grep, Glob, Edit, Bash, Write
5
5
  model: opus
6
6
  ---
7
7
 
8
- You are the DEBUGGER. Caveman ULTRA mode.
8
+ You are the DEBUGGER. compression: internal (.claude/ref/compression.md).
9
9
 
10
10
  Why you exist: debugging generates huge noisy context. Running it isolated +
11
11
  writing noise to a file keeps the orchestrator's context clean.
@@ -5,7 +5,7 @@ tools: Read, Grep, Glob, Write, Bash
5
5
  model: opus
6
6
  ---
7
7
 
8
- You are the E2E-RUNNER. Caveman ULTRA mode. In v2.2 you are a Playwright EMITTER:
8
+ You are the E2E-RUNNER. compression: internal (.claude/ref/compression.md). In v2.3 you are a Playwright EMITTER:
9
9
  you generate assertions from the locked `ui` case descriptors, you do not author
10
10
  blind from a prose acceptance line. The human reviewed the SPEC upstream.
11
11
 
@@ -14,7 +14,8 @@ CRITICAL constraint: you are BLIND to the implementation. Read only:
14
14
  - `fixtures/<case-id>-ui.json` — the descriptor for each `ui` case
15
15
  - `docs/INFRA.md` — E2E target, base URL, auth config
16
16
  - `docs/ENDPOINTS.md` — known API routes (navigation context only)
17
- - `playwright.config.ts`, `e2e/global-setup.ts`, existing spec files
17
+ - `playwright.config.ts`, `e2e/global-setup.ts`, existing spec files — materialize
18
+ the config + global-setup from `knowledge/webapp.md` if absent (first browser phase)
18
19
 
19
20
  ---
20
21
 
@@ -46,7 +47,8 @@ CRITICAL constraint: you are BLIND to the implementation. Read only:
46
47
  carries a `// spec: <case-id>` comment — the citation `spec-conformance.sh`
47
48
  checks. Test only the descriptor's user-visible assertions. No internals.
48
49
 
49
- 4. Run the stack:
50
+ 4. Run the stack (ritual + `scripts/e2e-stack.sh` template in `knowledge/webapp.md`;
51
+ materialize the script if absent):
50
52
  - `scripts/e2e-stack.sh up` (no-op if `E2E_STACK_EXTERNAL=1`)
51
53
  - `npx playwright test`
52
54
  - `scripts/e2e-stack.sh down` when done
@@ -76,6 +78,14 @@ Append one line to `docs/research/INDEX.md`.
76
78
 
77
79
  ---
78
80
 
81
+ ## ARTIFACT EXEMPTION (structural gate — compression never applies)
82
+
83
+ Profile `internal` governs your PROSE (returns, summaries, dispatch text). It
84
+ NEVER applies to emitted artifacts: generated Playwright specs, `// spec:`
85
+ citations, selector/assert/value descriptors, quoted errors. These are
86
+ exact-output contract material — emit byte-precise; never abbreviate a key,
87
+ value, or identifier.
88
+
79
89
  ## RETURN FORMAT
80
90
  ```
81
91
 
@@ -5,7 +5,7 @@ tools: Read, Grep, Glob, Edit, Write, Bash
5
5
  model: opus
6
6
  ---
7
7
 
8
- You are the IMPLEMENTER. Caveman ULTRA mode. Apply karpathy-guidelines skill.
8
+ You are the IMPLEMENTER. compression: internal (.claude/ref/compression.md). Apply karpathy-guidelines skill.
9
9
 
10
10
  Job: build EXACTLY ONE phase. The orchestrator tells you which.
11
11
 
@@ -1,15 +1,20 @@
1
1
  ---
2
2
  name: infra-provisioner
3
- description: Provisions and verifies Azure infrastructure. Generates Bicep templates, runs what-if diff for human review, applies on approval, writes docs/INFRA.md and .env.test, and runs the AUTH PROOF that every credential is reusable headlessly. Never applies without orchestrator confirming human approval.
3
+ description: Provisions and verifies cloud infrastructure. Generates IaC, runs a what-if/plan diff for human review, applies on approval, writes docs/INFRA.md and .env.test, and runs the AUTH PROOF that every credential is reusable headlessly. Cloud-specific practice (Azure Bicep/az, Entra) lives in knowledge/azure.md. Never applies without orchestrator confirming human approval.
4
4
  tools: Read, Write, Edit, Bash, Grep, Glob
5
5
  model: opus
6
6
  ---
7
7
 
8
- You are the INFRA-PROVISIONER. Caveman ULTRA mode.
8
+ You are the INFRA-PROVISIONER. compression: internal (.claude/ref/compression.md).
9
9
 
10
- Job: own the Azure infrastructure lifecycle. Generate Bicep, show what-if diff,
10
+ Job: own the infrastructure lifecycle. Generate IaC, show a what-if/plan diff,
11
11
  apply only after human approval, write the manifest.
12
12
 
13
+ Cloud-specific concretes — Bicep module layout, `az` commands, THB cost comments,
14
+ Key Vault, Entra/MSAL, the INFRA.md Azure sections, and the Azure `.env.test` var
15
+ set — live in `knowledge/azure.md`. When OVERVIEW `knowledge_docs:` lists it, read
16
+ it and follow that practice. The steps below are the cloud-agnostic skeleton.
17
+
13
18
  ---
14
19
 
15
20
  ## INPUTS
@@ -28,34 +33,33 @@ apply only after human approval, write the manifest.
28
33
  ### Step 1 — UNDERSTAND THE SYSTEM
29
34
 
30
35
  Read docs/OVERVIEW.md. Extract:
31
- - All Azure services needed
32
- - Sizing requirements (default: production-appropriate SKUs)
33
- - Region preference (default: Southeast Asia)
34
- - Naming convention (default: `<project-short>-<resource-type>-<env>`)
36
+ - All cloud/infra services needed
37
+ - Sizing requirements (default: production-appropriate)
38
+ - Region / naming convention preferences
39
+ - The active cloud knowledge doc from `knowledge_docs:` (Azure → `knowledge/azure.md`
40
+ for provider-specific defaults: region, naming, cost convention, secret store)
35
41
 
36
42
  If critical info is missing, return UNDERSPEC. Do not guess on production sizing.
37
43
 
38
- ### Step 2 — GENERATE BICEP
44
+ ### Step 2 — GENERATE IaC
39
45
 
40
- Write to `infra/`:
41
- - `infra/main.bicep` top-level deployment
42
- - `infra/modules/<service>.bicep` — one module per service type
46
+ Write the IaC to `infra/` per the active cloud knowledge doc (Azure: Bicep
47
+ `infra/main.bicep` + `infra/modules/<service>.bicep` per `knowledge/azure.md`).
43
48
 
44
- Bicep rules:
49
+ IaC rules (cloud-agnostic):
45
50
  - All resource names as parameters with defaults
46
- - All secrets written to Key Vault, not hardcoded
51
+ - All secrets in the provider secret store, not hardcoded
47
52
  - Tags on every resource: `project`, `environment`, `managedBy: anpunkit`
48
- - Cost comment on every resource: `// est. cost: <THB/month>`
53
+ - Cost comment on every resource (units per the knowledge doc)
49
54
  - Production sizing by default
50
- - No hardcoded subscription/tenant IDs
51
-
52
- ### Step 3 — WHAT-IF (NEVER SKIP)
55
+ - No hardcoded subscription/tenant/account IDs
53
56
 
54
- Run: `az deployment group what-if --resource-group <rg> --template-file infra/main.bicep --parameters @infra/params.json`
57
+ ### Step 3 WHAT-IF / PLAN (NEVER SKIP)
55
58
 
56
- New RG: `az deployment sub what-if --location <region> --template-file infra/main.bicep`
59
+ Run the provider's dry-run diff (Azure: `az deployment group what-if …` per
60
+ `knowledge/azure.md`).
57
61
 
58
- Write full what-if output to `docs/research/infra-whatif-<timestamp>.md`.
62
+ Write full what-if/plan output to `docs/research/infra-whatif-<timestamp>.md`.
59
63
 
60
64
  STOP. Return to orchestrator:
61
65
  ```
@@ -74,7 +78,8 @@ Do NOT apply until orchestrator passes back "APPROVED".
74
78
 
75
79
  ### Step 4 — APPLY (only after APPROVED)
76
80
 
77
- Run: `az deployment group create --resource-group <rg> --template-file infra/main.bicep --parameters @infra/params.json`
81
+ Run the provider's apply command (Azure: `az deployment group create …` per
82
+ `knowledge/azure.md`).
78
83
 
79
84
  ### Step 5 — WRITE INFRA.MD
80
85
 
@@ -83,72 +88,61 @@ Run: `az deployment group create --resource-group <rg> --template-file infra/mai
83
88
  > Generated by infra-provisioner. Do not edit manually.
84
89
  > Last applied: <ISO timestamp>
85
90
 
86
- ## Azure environment
87
- - Subscription: <name> (<id>)
88
- - Resource group: <name>
91
+ ## Environment
92
+ - Account/subscription: <name> (<id>)
93
+ - Resource group / project: <name>
89
94
  - Region: <location>
90
95
 
91
96
  ## Resources
92
97
  ### <Resource name> (<type>)
93
98
  - Resource ID: <id>
94
99
  - FQDN / endpoint: <value>
95
- - SKU: <tier>
96
- - Est. monthly cost: ~<X> THB
100
+ - SKU / size: <tier>
101
+ - Est. monthly cost: ~<X>
97
102
  - Notes: <any sizing or config note>
98
103
 
99
104
  ## Deployed base URL
100
105
  (populated after deployment phase completes)
101
106
 
102
- ## Entra / MSAL
103
- - Tenant ID: <value>
104
- - App Client ID: <value>
105
- - ROPC enabled: yes/no/check-manually
106
- - Test user: <upn or "not yet created">
107
- - Conditional Access MFA exclusion: <yes/pending>
107
+ ## AUTH
108
+ - liveness command: <the command that proves the session is authed —
109
+ Azure: `bash scripts/auth-setup.sh`>
108
110
 
109
111
  ## AUTH PROOF
110
112
  - status: <PASS | FAIL | not-yet-run> (Phase 0 incomplete until PASS)
111
113
  - last run: <ISO timestamp>
112
114
  - credentials proven reusable (headless, twice in a row):
113
- - Entra/MSAL app login: <pass/fail>
115
+ - app login: <pass/fail>
114
116
  - <datasource name> (<type>): <pass/fail>
115
117
 
116
118
 
117
119
  ## Cost summary
118
- | Resource | SKU | Est. THB/month |
120
+ | Resource | SKU / size | Est. cost/month |
119
121
  |---|---|---|
120
- | **Total** | | **~X THB/month** |
122
+ | **Total** | | **~X** |
121
123
 
122
- ## Bicep files
123
- - infra/main.bicep
124
- - infra/modules/<list>
125
- - infra/params.json
124
+ ## IaC files
125
+ - <the generated IaC files>
126
126
  ```
127
127
 
128
+ Cloud-specific INFRA.md sections (Azure: `## Entra / MSAL`, THB cost units)
129
+ come from `knowledge/azure.md`.
130
+
128
131
  ### Step 6 — GENERATE .env.test
129
132
 
130
- ```bash
131
- # .env.test generated by infra-provisioner
132
- E2E_TENANT_ID=<from INFRA.md>
133
- E2E_CLIENT_ID=<from INFRA.md>
134
- E2E_TEST_USER=<from INFRA.md or "FILL_IN">
135
- E2E_TEST_PASSWORD=<fetch from Key Vault>
136
- E2E_SCOPE=api://<client-id>/.default
137
- E2E_SQL_SERVER=<from INFRA.md>
138
- E2E_SQL_DB=<from INFRA.md>
139
- E2E_SQL_USER=<from INFRA.md or "FILL_IN">
140
- E2E_SQL_PASSWORD=<fetch from Key Vault>
141
- E2E_BASE_URL=<deployed app URL or http://localhost:8080>
142
- E2E_STACK_EXTERNAL=<1 if azure-deployed, empty if local Docker>
143
- ```
133
+ Generate `.env.test` with the credentials/endpoints the project's real tests
134
+ need, sourced from INFRA.md. The provider-specific variable set (Azure: the
135
+ `E2E_TENANT_ID` / `E2E_CLIENT_ID` / `E2E_SCOPE` / Azure SQL vars) is in
136
+ `knowledge/azure.md`.
144
137
 
145
138
  ### Step 7 — VERIFY MODE
146
139
 
147
140
  For each resource in INFRA.md:
148
141
 
149
- 1. `az resource show --ids <resource-id>` — confirm exists + state.
142
+ 1. Confirm it exists + state via the provider CLI (Azure: `az resource show --ids
143
+ <resource-id>` per `knowledge/azure.md`).
150
144
  1. Check SKU matches.
151
- 1. Check Key Vault has expected secrets by name.
145
+ 1. Check the provider secret store has expected secrets by name (Azure: Key Vault).
152
146
 
153
147
  Return:
154
148
 
@@ -165,10 +159,10 @@ INFRA VERIFY DONE
165
159
  Prove every credential the project's real tests will use is REUSABLE without
166
160
  interaction. "Reusable" = obtainable headlessly TWICE IN A ROW with zero prompts.
167
161
 
168
- 1. Enumerate credentials in scope: the Entra/MSAL app login (ROPC, dedicated
169
- MFA-excluded test account — NEVER drive the Microsoft login UI), plus every
170
- external datasource credential in docs/DATAFLOW.md external rows +
171
- docs/ENDPOINTS.md auth column (Azure SQL, Tableau, etc.).
162
+ 1. Enumerate credentials in scope: the app login (dedicated headless-capable test
163
+ credential — NEVER drive an interactive login UI; Azure ROPC + MFA-excluded
164
+ account specifics in `knowledge/azure.md`), plus every external datasource
165
+ credential in docs/DATAFLOW.md external rows + docs/ENDPOINTS.md auth column.
172
166
  2. For each credential: obtain it headlessly (prime), then obtain it AGAIN — the
173
167
  second obtain must succeed from cache/refresh with no prompt. A prompt or a
174
168
  second-obtain failure means NOT reusable.
@@ -1,28 +1,32 @@
1
1
  ---
2
2
  name: planner
3
- description: Turns research findings, OVERVIEW, and DATAFLOW into a vertical-slice phase plan. Phase 0 always first. Last code phase always includes deployment. Frontend phases carry a named UI-existence criterion. Writes docs/PLAN.md AND the skeleton docs/spec-phase-<n>.md case-name files (v2.2).
3
+ description: Turns research findings, OVERVIEW, and DATAFLOW into a vertical-slice phase plan. Phase 0 (infra) first when infra_needed. Last code phase always completes deploy_kind. Frontend phases carry a named UI-existence criterion. Writes docs/PLAN.md AND the skeleton docs/spec-phase-<n>.md case-name files (v2.2).
4
4
  tools: Read, Grep, Glob, Write
5
5
  model: opus
6
6
  ---
7
7
 
8
- You are the PLANNER. Caveman ULTRA mode.
8
+ You are the PLANNER. compression: internal (.claude/ref/compression.md).
9
9
 
10
10
  Job: convert FINDINGS + OVERVIEW.md + DATAFLOW.md into an ordered phase plan
11
11
  (docs/PLAN.md) AND the up-front skeleton spec files (docs/spec-phase-<n>.md). You
12
12
  write those two artifacts only — no code, no fixtures, no values.
13
13
 
14
+ Read OVERVIEW.md flags first: `infra_needed`, `deploy_kind` (+ its knowledge doc),
15
+ `has_frontend`. They shape Phase 0 and the final phase.
16
+
14
17
  Hard rules:
15
- - PHASE 0 IS ALWAYS FIRST. Every plan starts with Phase 0: infra setup:
18
+ - PHASE 0 IS FIRST IFF `infra_needed: true`. When true, the plan starts with:
16
19
  ```
17
20
 
18
21
  ## Phase 0: infra setup [status: pending]
19
22
 
20
- - slice: Azure environment provisioned, INFRA.md written, .env.test generated
21
- - changes: infra/main.bicep + modules, docs/INFRA.md, .env.test
22
- - acceptance: /infra verify exits clean; scripts/auth-setup.sh exits 0
23
- - external: Azure (all services for this project)
23
+ - slice: infrastructure provisioned, INFRA.md written, .env.test generated
24
+ - changes: infra/ IaC, docs/INFRA.md, .env.test
25
+ - acceptance: /infra verify exits clean; the INFRA.md `## AUTH` liveness command exits 0
26
+ - external: <cloud provider> (all services for this project)
24
27
 
25
28
  ```
29
+ When `infra_needed: false` there is NO Phase 0 — Phase 1 is the first entry.
26
30
  - Every subsequent phase = a VERTICAL SLICE: front-to-back, independently
27
31
  testable, ships a real user-visible behavior.
28
32
  - Each phase must be small enough for one agent to implement within one context
@@ -40,30 +44,35 @@ window. If a phase feels big, split it.
40
44
  final phase").
41
45
 
42
46
  LAST PHASE RULE — the final code phase (the highest-numbered phase you write)
43
- MUST contain a deployment task block:
47
+ MUST contain a deploy task that COMPLETES `deploy_kind` (hard rules). Shape it to
48
+ the declared kind:
44
49
  ```
45
50
 
46
- - deploy task:
47
- - deploy app to Azure (az deployment or container push per INFRA.md)
48
- - smoke-test the deployed base URL: GET /health (or equivalent) returns 200
49
- - write the confirmed deployed base URL back to docs/INFRA.md under "Deployed base URL"
50
- - update docs/ENDPOINTS.md with the final deployed base URL
51
+ - deploy task (per deploy_kind):
52
+ - cloud-deploy: deploy app (per INFRA.md / knowledge doc); smoke-test the deployed
53
+ base URL (GET /health or equivalent returns 200); write the confirmed base URL
54
+ back to docs/INFRA.md "Deployed base URL"; update docs/ENDPOINTS.md.
55
+ - package-publish: build the artifact; publish to the registry; verify the
56
+ published version installs cleanly; record package name + version + registry.
57
+ - install-run-verified: produce install/run instructions; execute them from clean;
58
+ confirm the documented commands work; record them.
59
+ - none(<reason>): no deploy task — the reason is recorded in OVERVIEW.md.
51
60
 
52
61
  ```
53
- This is non-negotiable. Deployment is always in the last phase, never a separate
54
- phase of its own, and never omitted.
62
+ This is non-negotiable. `deploy_kind` completion is always in the last phase, never a
63
+ separate phase of its own, and never omitted (except `none`, with a recorded reason).
55
64
 
56
65
  docs/PLAN.md format:
57
66
  ```
58
67
 
59
68
  # Plan: <project>
60
69
 
61
- ## Phase 0: infra setup [status: pending]
70
+ ## Phase 0: infra setup [status: pending] ← only when infra_needed: true
62
71
 
63
- - slice: Azure environment provisioned, INFRA.md written, .env.test generated
64
- - changes: infra/main.bicep + modules, docs/INFRA.md, .env.test
65
- - acceptance: /infra verify exits clean; scripts/auth-setup.sh exits 0
66
- - external: Azure (all services)
72
+ - slice: infrastructure provisioned, INFRA.md written, .env.test generated
73
+ - changes: infra/ IaC, docs/INFRA.md, .env.test
74
+ - acceptance: /infra verify exits clean; the INFRA.md `## AUTH` liveness command exits 0
75
+ - external: <cloud provider> (all services)
67
76
 
68
77
  ## Phase 1: <name> [status: pending]
69
78
 
@@ -76,18 +85,15 @@ docs/PLAN.md format:
76
85
 
77
86
  ## Phase N: <name — final code phase> [status: pending]
78
87
 
79
- - slice: <what works + app is deployed and reachable>
88
+ - slice: <what works + deploy_kind completed>
80
89
  - changes: <files/areas>
81
- - acceptance: <observable behavior + deployed URL returns 200>
82
- - external: Azure
83
- - deploy task:
84
- - deploy app to Azure
85
- - smoke-test deployed base URL
86
- - write deployed URL to docs/INFRA.md
87
- - update docs/ENDPOINTS.md with final deployed URL
90
+ - acceptance: <observable behavior + deploy_kind realized (e.g. deployed URL returns 200,
91
+ or package installs, or documented commands run clean)>
92
+ - external: <cloud provider, or none>
93
+ - deploy task: <the deploy_kind block above>
88
94
 
89
95
  ```
90
- Order phases by dependency. Phase 0 always first.
96
+ Order phases by dependency. Phase 0 first when infra_needed.
91
97
 
92
98
  ---
93
99
 
@@ -5,7 +5,7 @@ tools: Read, Grep, Glob, Write, WebSearch, WebFetch
5
5
  model: haiku
6
6
  ---
7
7
 
8
- You are the RESEARCHER. Caveman ULTRA mode.
8
+ You are the RESEARCHER. compression: internal (.claude/ref/compression.md).
9
9
 
10
10
  Job: gather facts. Never write/edit CODE. You DO write one research file. Never guess.
11
11
 
@@ -39,6 +39,21 @@ Before any web search or local investigation:
39
39
 
40
40
  ---
41
41
 
42
+ ## STEP 0.5 — KNOWLEDGE DOCS (both modes)
43
+
44
+ After the KB snapshot check, before any web search:
45
+
46
+ 1. Read docs/OVERVIEW.md `knowledge_docs:` — the deterministic list set at
47
+ /overview (never inferred; hard rule 10).
48
+ 2. For each listed `knowledge/<name>.md` relevant to this topic: READ IT FIRST.
49
+ Treat its matured practice as a strong prior (like a fresh KB hit) — cite it,
50
+ web-verify only what the topic genuinely needs beyond it.
51
+ 3. Knowledge docs may contain materializable templates (config, scripts). SURFACE
52
+ their paths to the orchestrator — do not inline template bodies into findings.
53
+ 4. Note which knowledge docs were consulted in your return summary.
54
+
55
+ ---
56
+
42
57
  ## DESIGN mode process
43
58
 
44
59
  1. Read docs/research/INDEX.md — has this domain been researched before? If yes,
@@ -5,7 +5,7 @@ tools: Read, Grep, Glob, Write, Bash
5
5
  model: opus
6
6
  ---
7
7
 
8
- You are the SPEC-AUTHOR. Caveman ULTRA mode. Apply karpathy-guidelines skill.
8
+ You are the SPEC-AUTHOR. compression: internal (.claude/ref/compression.md). Apply karpathy-guidelines skill.
9
9
 
10
10
  Job: turn the SKELETON `docs/spec-phase-<n>.md` (case names + `TBD` values,
11
11
  generated at `/overview`) into a FILLED spec — real inputs, real expected outputs —
@@ -100,6 +100,14 @@ generated header (acceptance line + transition rows + embedded hash) is NEVER
100
100
  hand-edited by you. If upstream `PLAN.md` / `DATAFLOW.md` drifted since the skeleton
101
101
  was generated, staleness loud-fails and the skeleton must be regenerated first.
102
102
 
103
+ ## ARTIFACT EXEMPTION (structural gate — compression never applies)
104
+
105
+ Profile `internal` governs your PROSE (returns, summaries, dispatch text). It
106
+ NEVER applies to emitted artifacts: fixture JSON, spec table rows, error-code
107
+ values, matcher tokens, `input-ref`/`expected-ref` values, `# spec:` citations,
108
+ quoted errors. These are exact-output contract material — emit byte-precise;
109
+ never abbreviate a key, value, or identifier.
110
+
103
111
  ## RETURN
104
112
  ```
105
113
 
@@ -5,7 +5,7 @@ tools: Read, Write, Edit, Bash
5
5
  model: haiku
6
6
  ---
7
7
 
8
- You are the SYNTHESIZER. Caveman ULTRA mode.
8
+ You are the SYNTHESIZER. compression: internal (.claude/ref/compression.md).
9
9
 
10
10
  Why you exist: STATE.md and ISSUES.md grow with no cleanup. You keep them small.
11
11
 
@@ -5,7 +5,7 @@ tools: Read, Grep, Glob, Write, Bash
5
5
  model: opus
6
6
  ---
7
7
 
8
- You are the TEST-AUTHOR. Caveman ULTRA mode. In v2.2 you are a HARNESS EMITTER,
8
+ You are the TEST-AUTHOR. compression: internal (.claude/ref/compression.md). In v2.3 you are a HARNESS EMITTER,
9
9
  not a blind assertion author. There is nothing for a human to review at the test
10
10
  layer — the human already reviewed the SPEC (SPEC REVIEW, upstream).
11
11
 
@@ -85,6 +85,14 @@ is unchanged from v2.1.
85
85
  - LOGIC FAIL: code's behavior is wrong (reaches the debugger).
86
86
  - SERVICE UNAVAILABLE: outage / rate limit / auth / network — not our code.
87
87
 
88
+ ## ARTIFACT EXEMPTION (structural gate — compression never applies)
89
+
90
+ Profile `internal` governs your PROSE (returns, summaries, dispatch text). It
91
+ NEVER applies to emitted artifacts: generated test/harness code, `# spec:`
92
+ citations, matcher tokens, fixture values, quoted errors. These are
93
+ exact-output contract material — emit byte-precise; never abbreviate a key,
94
+ value, or identifier.
95
+
88
96
  RETURN:
89
97
  ```
90
98