create-anpunkit 2.0.1 → 2.1.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 CHANGED
@@ -61,7 +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'];
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'];
65
66
  const argv = process.argv.slice(2);
66
67
  // Git Bash is happiest with forward slashes; Windows APIs accept them too.
67
68
  const fwd = p => p.split(path.sep).join('/');
@@ -70,7 +71,7 @@ for (let i = 0; i < argv.length; i++) {
70
71
  const a = argv[i];
71
72
  if (passthrough.includes(a)) {
72
73
  args.push(a);
73
- if (a === '--kb-path' || a === '--kb-remote') { args.push(argv[++i]); }
74
+ if (valueFlags.includes(a)) { args.push(argv[++i]); }
74
75
  } else {
75
76
  console.error(`create-anpunkit: unknown flag '${a}'. Allowed: ${passthrough.join(' ')}`);
76
77
  process.exit(2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-anpunkit",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "Scaffold the anpunkit AI-coding workflow (Claude Code + Cursor) into a project. Upgrade-safe, non-destructive.",
5
5
  "bin": {
6
6
  "create-anpunkit": "bin/cli.js"
@@ -24,6 +24,12 @@ CRITICAL constraint: you are BLIND to the implementation. Read only:
24
24
 
25
25
  2. Read docs/ENDPOINTS.md for the known API surface.
26
26
 
27
+ UI-EXISTENCE CHECK (v2.1): the acceptance spec MUST name at least one
28
+ user-visible interactive element this phase introduces (a button, a route
29
+ landing, a form control) — not merely "page renders 200". If it does not,
30
+ return UNDERSPEC so the orchestrator can sharpen the spec. "Page renders" can
31
+ pass while the signin button is missing; that is the exact gap this closes.
32
+
27
33
  3. Write Playwright specs under `e2e/` from the phase's acceptance criteria.
28
34
  Test observable user-visible behavior only. No internals.
29
35
 
@@ -32,6 +38,12 @@ CRITICAL constraint: you are BLIND to the implementation. Read only:
32
38
  - `npx playwright test`
33
39
  - `scripts/e2e-stack.sh down` when done
34
40
 
41
+ EVIDENCE (v2.1, mandatory): at EACH UI-existence assertion, capture a
42
+ screenshot REGARDLESS of pass/fail (override Playwright's failure-only
43
+ default) to `docs/evidence/e2e-phase-<n>/<element-slug>.png`. One shot per
44
+ asserted element — evidence maps 1:1 to an acceptance criterion. This is the
45
+ proof the element was actually on screen, captured on green as well as red.
46
+
35
47
  5. FAILURE CLASSIFICATION — for every failure:
36
48
  - **LOGIC FAIL** — app behavior is wrong. Reaches the debugger.
37
49
  - **AZURE UNAVAILABLE** — Azure outage/throttle/auth expired.
@@ -54,10 +66,12 @@ Append one line to `docs/research/INDEX.md`.
54
66
  E2E DONE: phase <n>
55
67
 
56
68
  - target: <azure-deployed | local-docker> at <URL>
69
+ - ui-existence asserted: <named element(s) | UNDERSPEC if none>
57
70
  - specs: <files written>
58
71
  - result: <X pass / Y fail>
72
+ - evidence: docs/evidence/e2e-phase-<n>/ (<count> screenshots, one per assertion)
59
73
  - failures: <step + classification>
60
- - PHASE GATE: PASS | FAIL (LOGIC FAIL present) | BLOCKED (<reason>)
74
+ - PHASE GATE: PASS | FAIL (LOGIC FAIL present) | BLOCKED (<reason>) | UNDERSPEC
61
75
  - full detail: docs/research/e2e-<phase-slug>.md
62
76
 
63
77
  ```
@@ -1,6 +1,6 @@
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. Never applies without orchestrator confirming human approval.
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.
4
4
  tools: Read, Write, Edit, Bash, Grep, Glob
5
5
  model: opus
6
6
  ---
@@ -18,6 +18,8 @@ apply only after human approval, write the manifest.
18
18
  - VERIFY: check existing infra matches docs/INFRA.md. Report drift.
19
19
  - UPDATE <what changed>: add/remove/change a resource. Produce a delta Bicep.
20
20
  - REGENERATE-ENV: re-read docs/INFRA.md and rewrite .env.test only.
21
+ - AUTH-PROOF: prove every credential the project's real tests use is reusable
22
+ headlessly (see Step 8). Run after PROVISION and on demand.
21
23
 
22
24
  ---
23
25
 
@@ -104,6 +106,14 @@ Run: `az deployment group create --resource-group <rg> --template-file infra/mai
104
106
  - Test user: <upn or "not yet created">
105
107
  - Conditional Access MFA exclusion: <yes/pending>
106
108
 
109
+ ## AUTH PROOF
110
+ - status: <PASS | FAIL | not-yet-run> (Phase 0 incomplete until PASS)
111
+ - last run: <ISO timestamp>
112
+ - credentials proven reusable (headless, twice in a row):
113
+ - Entra/MSAL app login: <pass/fail>
114
+ - <datasource name> (<type>): <pass/fail>
115
+
116
+
107
117
  ## Cost summary
108
118
  | Resource | SKU | Est. THB/month |
109
119
  |---|---|---|
@@ -150,10 +160,31 @@ INFRA VERIFY DONE
150
160
  - recommendation: <"all good" | "run /infra UPDATE <description>">
151
161
  ```
152
162
 
163
+ ### Step 8 — AUTH PROOF (v2.1, mode AUTH-PROOF; also runs after APPLY)
164
+
165
+ Prove every credential the project's real tests will use is REUSABLE without
166
+ interaction. "Reusable" = obtainable headlessly TWICE IN A ROW with zero prompts.
167
+
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.).
172
+ 2. For each credential: obtain it headlessly (prime), then obtain it AGAIN — the
173
+ second obtain must succeed from cache/refresh with no prompt. A prompt or a
174
+ second-obtain failure means NOT reusable.
175
+ 3. Write the result to docs/INFRA.md `## AUTH PROOF` (PASS only if every
176
+ credential passed twice). Return:
177
+ ```
178
+ AUTH PROOF: PASS | FAIL
179
+ - proven reusable: <list>
180
+ - failed: <credential + reason, or "none">
181
+ ```
182
+ A FAIL means Phase 0 is not complete; the orchestrator stops until it passes.
183
+
153
184
  -----
154
185
 
155
186
  ## RETURN FORMAT
156
187
 
157
- WHAT-IF READY | APPLIED | VERIFY DONE | UNDERSPEC | ERROR
188
+ WHAT-IF READY | APPLIED | VERIFY DONE | AUTH PROOF: PASS/FAIL | UNDERSPEC | ERROR
158
189
  Full detail always in docs/research/infra-<slug>-<timestamp>.md.
159
190
  Keep return terse — file path for detail.
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: planner
3
- description: Turns research findings and OVERVIEW into a vertical-slice phase plan. Phase 0 always first. Last code phase always includes deployment. Writes docs/PLAN.md.
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.
4
4
  tools: Read, Grep, Glob, Write
5
5
  model: opus
6
6
  ---
7
7
 
8
8
  You are the PLANNER. Caveman ULTRA mode.
9
9
 
10
- Job: convert FINDINGS + OVERVIEW.md into an ordered phase plan. You only write docs/PLAN.md.
10
+ Job: convert FINDINGS + OVERVIEW.md + DATAFLOW.md into an ordered phase plan. You only write docs/PLAN.md.
11
11
 
12
12
  Hard rules:
13
13
  - PHASE 0 IS ALWAYS FIRST. Every plan starts with Phase 0: infra setup:
@@ -27,6 +27,15 @@ testable, ships a real user-visible behavior.
27
27
  window. If a phase feels big, split it.
28
28
  - Each phase declares its acceptance test in plain language BEFORE code exists.
29
29
  - If a phase touches an external service, note it — its test must hit the real service.
30
+ - FRONTEND phases (changes touch the OVERVIEW.md frontend root): the acceptance
31
+ MUST include ≥1 UI-EXISTENCE criterion that NAMES the specific user-visible
32
+ interactive element the phase introduces (e.g. "the Sign in button is present
33
+ and clickable on /login") — never just "page renders". (Hard rule 13; the
34
+ e2e-runner returns UNDERSPEC if this is missing.)
35
+ - DATAFLOW: for each phase, list the docs/DATAFLOW.md transitions it makes
36
+ reachable in a `- dataflow:` line. Every transition in DATAFLOW.md must become
37
+ reachable by some phase; none may be stranded (hard rule 14, "no PENDING at
38
+ final phase").
30
39
 
31
40
  LAST PHASE RULE — the final code phase (the highest-numbered phase you write)
32
41
  MUST contain a deployment task block:
@@ -35,7 +44,7 @@ MUST contain a deployment task block:
35
44
  - deploy task:
36
45
  - deploy app to Azure (az deployment or container push per INFRA.md)
37
46
  - smoke-test the deployed base URL: GET /health (or equivalent) returns 200
38
- - write the confirmed deployed base URL back to docs/INFRA.md under Deployed base URL
47
+ - write the confirmed deployed base URL back to docs/INFRA.md under "Deployed base URL"
39
48
  - update docs/ENDPOINTS.md with the final deployed base URL
40
49
 
41
50
  ```
@@ -58,8 +67,9 @@ docs/PLAN.md format:
58
67
 
59
68
  - slice: <what works end-to-end after this phase>
60
69
  - changes: <files/areas, high level>
61
- - acceptance: <observable behavior the test must verify>
62
- - external: <service name, or none”>
70
+ - acceptance: <observable behavior the test must verify; if frontend, NAME the UI element>
71
+ - external: <service name, or "none">
72
+ - dataflow: <DATAFLOW.md transitions this phase makes reachable, or "none">
63
73
 
64
74
 
65
75
  ## Phase N: <name — final code phase> [status: pending]
@@ -52,8 +52,18 @@ Before any web search or local investigation:
52
52
  - Unknowns that the grill-me questions raised but did not answer.
53
53
  3. Use WebSearch/WebFetch to get REAL, current documentation — not assumptions.
54
54
  Skip web search for a topic if KB step 0 returned a fresh (non-stale) hit.
55
- 4. Write FULL findings to `docs/research/design-<topic-slug>.md`.
56
- 5. Append one line per topic to docs/research/INDEX.md:
55
+ 4. EXTERNAL DATASOURCE DATA UNDERSTANDING (v2.1): for every external datasource
56
+ in scope, write `docs/research/datasource-<name>.md` proposing a FALSIFIABLE
57
+ understanding the human can confirm or correct in the RESEARCH REVIEW:
58
+ - grain (one row = what?)
59
+ - the fields likely under test, each with its meaning + real-world
60
+ nullability/range (not just the declared type)
61
+ - a sample-fixture shape (so a wrong understanding shows up as an obviously
62
+ wrong sample)
63
+ - the ASSUMPTION that, if wrong, makes a test meaningless (stated explicitly)
64
+ Do NOT invent values you cannot ground; mark them as the human's to confirm.
65
+ 5. Write FULL findings to `docs/research/design-<topic-slug>.md`.
66
+ 6. Append one line per topic to docs/research/INDEX.md:
57
67
  `YYYY-MM-DD | design-<slug> | <one-sentence conclusion> | docs/research/design-<slug>.md`
58
68
 
59
69
  RETURN (terse — orchestrator reads the file only if needed):
@@ -62,11 +72,12 @@ RETURN (terse — orchestrator reads the file only if needed):
62
72
  DESIGN RESEARCH DONE: <slug>
63
73
 
64
74
  - topics covered: <list>
65
- - kb hits: <slugs that matched from KB snapshot, or none”>
66
- - stale kb entries: <slugs that were stale and re-researched, or none”>
75
+ - kb hits: <slugs that matched from KB snapshot, or "none">
76
+ - stale kb entries: <slugs that were stale and re-researched, or "none">
67
77
  - key findings: <3-5 bullets — constraints, limits, surprises>
68
78
  - new questions raised: <questions the research surfaced that grill-me should probe>
69
- - unknowns: <what could not be confirmed, or none”>
79
+ - datasource understanding: <datasource-<name>.md drafted for confirm, or "none">
80
+ - unknowns: <what could not be confirmed, or "none">
70
81
  - full detail: docs/research/design-<slug>.md
71
82
 
72
83
  ```
@@ -92,11 +103,11 @@ RETURN (terse):
92
103
 
93
104
  RESEARCH DONE: <topic-slug>
94
105
 
95
- - kb hits: <slugs that matched, or none”>
96
- - stale kb entries: <slugs that were stale and re-researched, or none”>
106
+ - kb hits: <slugs that matched, or "none">
107
+ - stale kb entries: <slugs that were stale and re-researched, or "none">
97
108
  - summary: <3-5 bullet conclusions>
98
109
  - hypothesis (bugs only): <root cause + key evidence, 1-2 lines>
99
- - unknowns: <what still needs checking, or none”>
110
+ - unknowns: <what still needs checking, or "none">
100
111
  - full detail: docs/research/<topic-slug>.md
101
112
 
102
113
  ```
@@ -39,9 +39,29 @@ peek at, your blindness is STRUCTURAL, not honor-system.
39
39
 
40
40
  - Public-contract / ENDPOINTS-surface tests -> `tests/regression/` (the
41
41
  cross-phase corpus). A regression test must NOT depend on phase-local fixtures.
42
+ - DATAFLOW transition tests (one per `docs/DATAFLOW.md` transition this phase makes
43
+ reachable) -> also `tests/regression/`. Name them so the transition is obvious
44
+ (e.g. `test_order_draft_to_submitted`).
42
45
  - Phase-local tests -> `tests/phase-<n>/`.
43
46
  - mock vs real is a fixture/env FLAG on the SAME test, not duplicated files.
44
47
 
48
+ ## TEST PLAN — the TEST REVIEW artifact (v2.1)
49
+
50
+ Always emit `docs/test-plan-phase-<n>.md` so the orchestrator can gate GREEN on a
51
+ human review. It must map each acceptance criterion to the test name(s) covering
52
+ it, list the ENDPOINTS and DATAFLOW transitions covered, and — MANDATORY — a
53
+ "## NOT covered / assumptions" section stating what you deliberately did not test
54
+ and every assumption that, if wrong, makes a test meaningless. The NOT-covered
55
+ section is where silent-gap bugs hide; an empty one is almost always a defect.
56
+
57
+ ## DATASOURCE DELTA (v2.1)
58
+
59
+ If a phase tests against an external datasource, you are given the confirmed
60
+ BASELINE (`docs/research/datasource-<name>.md`). If your tests touch a table/column
61
+ BEYOND the baseline, do NOT invent its meaning — return DATA-UNDERSTANDING-DELTA
62
+ with the specific new field(s) so the orchestrator can get a human confirm before
63
+ the real suite runs. Real-suite tests against unconfirmed data are blocked.
64
+
45
65
  ## Rules
46
66
 
47
67
  - Test observable behavior from `acceptance`. Cover happy path + edge + failure.
@@ -61,11 +81,14 @@ TESTS WRITTEN: phase <n>
61
81
 
62
82
  - red-first: <yes (TDD) | n/a (non-TDD)>
63
83
  - files: <mock suite files> | <real suite files> (note regression vs phase-local)
84
+ - test plan: docs/test-plan-phase-<n>.md (incl. NOT-covered/assumptions)
85
+ - dataflow transitions covered: <list, or none>
64
86
  - RED gate: <COLLECTS+FAILS as required | passed-on-stubs=BAD | n/a>
65
87
  - mock result: <X pass / Y fail>
66
- - real API result: <X pass / Y fail>
88
+ - real API result: <X pass / Y fail | BLOCKED (datasource unconfirmed)>
89
+ - datasource delta: <none | DATA-UNDERSTANDING-DELTA: field(s) needing confirm>
67
90
  - failures: <behavior, expected vs actual, + LOGIC FAIL or SERVICE UNAVAILABLE>
68
91
  - external service hit: <name / none>
69
- - PHASE GATE: PASS | FAIL | BLOCKED (service unavailable)
92
+ - PHASE GATE: PASS | FAIL | BLOCKED (service unavailable / datasource unconfirmed)
70
93
 
71
94
  ```
@@ -1,9 +1,9 @@
1
1
  {
2
- "version": "2.0.1",
2
+ "version": "2.1.0",
3
3
  "files": [
4
4
  {
5
5
  "path": "AGENTS.md",
6
- "sha256": "638d0c19fbc614e162d83b8b5e315c9f38180eaec8d8a88c825d36d6d9ec416b"
6
+ "sha256": "e33c8290f6a5aa15a744721d435944d49552b08428c91f83be4cf02b2a4fbda4"
7
7
  },
8
8
  {
9
9
  "path": "CLAUDE.md",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  {
13
13
  "path": "README.md",
14
- "sha256": "56a76a3fefacbf5ffc37d5b1f43748a628e0e4a8142ce2d6058957f8a22781a0"
14
+ "sha256": "bd33dd8be4b1b20ab4ea9444f60094a8ee125681e6f1073e3ed7f06c1f5a5f4c"
15
15
  },
16
16
  {
17
17
  "path": ".gitattributes",
@@ -19,7 +19,7 @@
19
19
  },
20
20
  {
21
21
  "path": "setup.sh",
22
- "sha256": "b6b2f2adbff866f8ed0398006ab2eefb346d9a81b50dc9bccbb3a8a22f6a1b04"
22
+ "sha256": "77e994cbd6db69dde57fbdd8ce1460bc61cd24ad338e816303f7243165001e32"
23
23
  },
24
24
  {
25
25
  "path": ".claude/agents/debugger.md",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  {
29
29
  "path": ".claude/agents/e2e-runner.md",
30
- "sha256": "9d1f1134092abc28a23a3e48a2fda3aa74b7644267692edad464498e776445f7"
30
+ "sha256": "4e914d20022be58f3915526f91ac6df54cb5efd4836c12b97fd042cce90e8ddc"
31
31
  },
32
32
  {
33
33
  "path": ".claude/agents/implementer.md",
@@ -35,15 +35,15 @@
35
35
  },
36
36
  {
37
37
  "path": ".claude/agents/infra-provisioner.md",
38
- "sha256": "56fa8dd1a6bc526a8d73f71b8e0b5980aec71ca6610070f222cbb77d348c66fb"
38
+ "sha256": "52a54a2aaaf7e53d28e261f5e01f2693fd0a4883fd93f844a112a742a91f9149"
39
39
  },
40
40
  {
41
41
  "path": ".claude/agents/planner.md",
42
- "sha256": "3ba23521d9f1190a16402ad900d90932519517711fc3ec783eee21ff920a0042"
42
+ "sha256": "b74951f53ddfebba5d2255d164ef4b1b6fa8544f3e8d9ae3ff7d23e2f3198650"
43
43
  },
44
44
  {
45
45
  "path": ".claude/agents/researcher.md",
46
- "sha256": "01b25384b6b6743c60e79e1cc9a2997895c86a6b509375b527a1aa8b70be4306"
46
+ "sha256": "aa54503f8c9998d3aa97aa322c0ba47d23cae8aea6236530ddc2dfc44e7c4658"
47
47
  },
48
48
  {
49
49
  "path": ".claude/agents/synthesizer.md",
@@ -51,7 +51,7 @@
51
51
  },
52
52
  {
53
53
  "path": ".claude/agents/test-author.md",
54
- "sha256": "9af796a9d8e7302847e57fb61e484d0e3f26325586ebbb7e1a79ba20ead1057b"
54
+ "sha256": "d8ccd98ced9a77c7da6c40c12b7b3108f302f4cc5956ea8b516f6384203c9c13"
55
55
  },
56
56
  {
57
57
  "path": ".claude/hooks/cursor-session-start.sh",
@@ -83,7 +83,7 @@
83
83
  },
84
84
  {
85
85
  "path": "commands.src/infra.md",
86
- "sha256": "ca4e826889bd0a1bcf5298d3da5d453c3eecdb514bc50ba0d735b7f024a58dc0"
86
+ "sha256": "fe0e6ba6cf0c2fc3826ab67cd882752e9450677b1ffef440388349f0ba3c4fb6"
87
87
  },
88
88
  {
89
89
  "path": "commands.src/log-decision.md",
@@ -95,11 +95,11 @@
95
95
  },
96
96
  {
97
97
  "path": "commands.src/overview.md",
98
- "sha256": "522a091e3e0513dbc15d7f856aca77e18ff70304ac3689f312a3f578e9f3e684"
98
+ "sha256": "841dad7d2765f4240900d18cd57a6c5a4cbc6c1f19f0568f5e14d4e098f60ab8"
99
99
  },
100
100
  {
101
101
  "path": "commands.src/phase.md",
102
- "sha256": "6cd48c2bbc87e01175594682d22cd7cf652cee84790b8a5677fd4d774679d6f3"
102
+ "sha256": "de910c499acf6f3d27353b2594a4ff8d7b650ee90b35ceb8dabf1e3244f4851b"
103
103
  },
104
104
  {
105
105
  "path": "commands.src/quick.md",
@@ -107,7 +107,7 @@
107
107
  },
108
108
  {
109
109
  "path": "commands.src/replan.md",
110
- "sha256": "0a599f7c223a8c82cf3f3296ed5d60e5feb97396960e959190d5872f51a602a2"
110
+ "sha256": "57597623a2118e5867963aa61a04cff7808eb5ce8e2aed5bebb5247cff6be8ad"
111
111
  },
112
112
  {
113
113
  "path": "commands.src/store-wisdom.md",
@@ -123,7 +123,7 @@
123
123
  },
124
124
  {
125
125
  "path": ".claude/commands/infra.md",
126
- "sha256": "ca4e826889bd0a1bcf5298d3da5d453c3eecdb514bc50ba0d735b7f024a58dc0"
126
+ "sha256": "fe0e6ba6cf0c2fc3826ab67cd882752e9450677b1ffef440388349f0ba3c4fb6"
127
127
  },
128
128
  {
129
129
  "path": ".claude/commands/log-decision.md",
@@ -135,11 +135,11 @@
135
135
  },
136
136
  {
137
137
  "path": ".claude/commands/overview.md",
138
- "sha256": "522a091e3e0513dbc15d7f856aca77e18ff70304ac3689f312a3f578e9f3e684"
138
+ "sha256": "841dad7d2765f4240900d18cd57a6c5a4cbc6c1f19f0568f5e14d4e098f60ab8"
139
139
  },
140
140
  {
141
141
  "path": ".claude/commands/phase.md",
142
- "sha256": "6cd48c2bbc87e01175594682d22cd7cf652cee84790b8a5677fd4d774679d6f3"
142
+ "sha256": "de910c499acf6f3d27353b2594a4ff8d7b650ee90b35ceb8dabf1e3244f4851b"
143
143
  },
144
144
  {
145
145
  "path": ".claude/commands/quick.md",
@@ -147,7 +147,7 @@
147
147
  },
148
148
  {
149
149
  "path": ".claude/commands/replan.md",
150
- "sha256": "0a599f7c223a8c82cf3f3296ed5d60e5feb97396960e959190d5872f51a602a2"
150
+ "sha256": "57597623a2118e5867963aa61a04cff7808eb5ce8e2aed5bebb5247cff6be8ad"
151
151
  },
152
152
  {
153
153
  "path": ".claude/commands/store-wisdom.md",
@@ -163,7 +163,7 @@
163
163
  },
164
164
  {
165
165
  "path": ".cursor/commands/infra.md",
166
- "sha256": "24a6290a0905e744cc3d0adaf6f0d385b859e99eb8326367b6d55c7bcd66d559"
166
+ "sha256": "d6f7a7ee93f76a4d68aeb74c1f43aa76b969043ac59fbc22b02675e05a6dfee5"
167
167
  },
168
168
  {
169
169
  "path": ".cursor/commands/log-decision.md",
@@ -175,11 +175,11 @@
175
175
  },
176
176
  {
177
177
  "path": ".cursor/commands/overview.md",
178
- "sha256": "33710e166d3fb4e9894df709708cd5dec997dfd7fb293931e3f9212567ee06cf"
178
+ "sha256": "8cd54af27fa63ccfa714c7ecfa48476664fa3407b46cb708ddbc4ad2ebbb0a58"
179
179
  },
180
180
  {
181
181
  "path": ".cursor/commands/phase.md",
182
- "sha256": "759d2d5946a9c05ade60dd5e8e47d8d94b7ab6b923be214eb5f5a9979ea6e94e"
182
+ "sha256": "693e4edca20374441c876ac58994863949fb8f364e72e8a0dc32670d4550fc69"
183
183
  },
184
184
  {
185
185
  "path": ".cursor/commands/quick.md",
@@ -187,7 +187,7 @@
187
187
  },
188
188
  {
189
189
  "path": ".cursor/commands/replan.md",
190
- "sha256": "36b47315ba813702f71530402a6ffa7c4c404bbc946c0cda571ead61ddc28874"
190
+ "sha256": "3ad268b74c0218ae3530e3e7b86b75d9fd26bd98a79a74760efe767a63c251a2"
191
191
  },
192
192
  {
193
193
  "path": ".cursor/commands/store-wisdom.md",
@@ -231,7 +231,7 @@
231
231
  },
232
232
  {
233
233
  "path": "create-anpunkit/package.json",
234
- "sha256": "3fa34141b9698d4ceb6a17d036e86d115de8cd5371c63df3f25705fe2b518d14"
234
+ "sha256": "4b16cdfd4d9a22379147338664530fd7ce7f0e7566bf63d097f7b8f8f76dcdd8"
235
235
  },
236
236
  {
237
237
  "path": "create-anpunkit/bin/cli.js",
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: Provision or verify Azure infrastructure. Generates Bicep, shows what-if diff for your review, applies only after your approval, writes docs/INFRA.md and .env.test.
3
- argument-hint: [provision | verify | update <what changed> | regenerate-env]
2
+ description: Provision or verify Azure infrastructure. Generates Bicep, shows what-if diff for your review, applies only after your approval, writes docs/INFRA.md and .env.test. Runs the one-time AUTH PROOF.
3
+ argument-hint: [provision | verify | update <what changed> | regenerate-env | auth-proof]
4
4
  ---
5
5
 
6
6
  Caveman ULTRA mode. You are the ORCHESTRATOR.
@@ -36,6 +36,31 @@ Action: $ARGUMENTS (default: "provision" if INFRA.md missing, "verify" if presen
36
36
  4. On "make changes": dispatch UPDATE with feedback. Loop to step 2.
37
37
 
38
38
  5. On APPLIED: tell me INFRA.md ✓, .env.test ✓, and any manual steps remaining.
39
+ Then run AUTH PROOF (below) before declaring Phase 0 complete.
40
+
41
+ ---
42
+
43
+ ## AUTH PROOF (one-time, hard rule 16)
44
+
45
+ Runs after a successful PROVISION (and on demand via `/infra auth-proof`). Proves
46
+ every credential the project's real tests will use is reusable WITHOUT interaction.
47
+ "Reusable" is defined falsifiably: obtainable headlessly TWICE IN A ROW.
48
+
49
+ 1. Enumerate the credentials in scope: the Entra/MSAL app login, plus every
50
+ external datasource credential referenced in docs/DATAFLOW.md (external rows)
51
+ and docs/ENDPOINTS.md (auth column) — Azure SQL, Tableau, etc.
52
+
53
+ 2. Dispatch `infra-provisioner` to run, for EACH credential, a headless obtain
54
+ twice in a row: first call primes (token fetch / connect), second call must
55
+ succeed from cache/refresh with ZERO prompts. The Microsoft login UI is never
56
+ driven (ROPC + dedicated MFA-excluded test account; hard rule 8).
57
+
58
+ 3. Result:
59
+ - All credentials pass twice headlessly -> write `AUTH PROOF: PASS <timestamp>`
60
+ to docs/INFRA.md with the per-credential list. Phase 0 may complete.
61
+ - Any credential prompts or fails the second obtain -> NOT reusable. Write
62
+ `AUTH PROOF: FAIL` + which credential, STOP, tell me what to fix. Phase 0 is
63
+ not complete until the proof passes.
39
64
 
40
65
  ---
41
66
 
@@ -43,7 +68,7 @@ Action: $ARGUMENTS (default: "provision" if INFRA.md missing, "verify" if presen
43
68
 
44
69
  1. Check INFRA.md exists. If missing: tell me to run `/infra provision` first.
45
70
  2. Dispatch `infra-provisioner` VERIFY mode.
46
- 3. Return drift report.
71
+ 3. Return drift report. If the AUTH PROOF marker is missing or stale, re-run AUTH PROOF.
47
72
 
48
73
  ---
49
74
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Bootstrap a new project. Runs design-research, double grill, and planning. Run once per project.
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
  Caveman ULTRA mode.
@@ -18,7 +18,9 @@ Goal: stand up a fresh project workspace with a well-grounded plan.
18
18
  1. Run the `grill-me` skill to interrogate me. Goal: understand initial scope.
19
19
  Cover: project purpose, success criteria, external services, Azure services
20
20
  needed (type + sizing), region, deployment target (Azure or local for E2E),
21
- known constraints, unknowns.
21
+ known constraints, unknowns. ALSO establish:
22
+ - **has_frontend**: is there a browser-facing UI? If yes, what is the frontend
23
+ root path (e.g. `src/web/`, `app/`)? This drives the mandatory-E2E path match.
22
24
  Do not stop early. Do not write OVERVIEW.md yet.
23
25
 
24
26
  Store the round-1 answers as working context — do NOT write OVERVIEW.md yet.
@@ -33,74 +35,115 @@ Store the round-1 answers as working context — do NOT write OVERVIEW.md yet.
33
35
  Quotas, rate limits, known gaps?
34
36
  - Azure services: any sizing or SKU constraints relevant to the use case?
35
37
  - Auth patterns: any MSAL/Entra constraints for this scenario?
38
+ - Each external DATASOURCE: its DATA UNDERSTANDING (see step 4).
36
39
  - Any other architectural assumption in the round-1 answers worth verifying.
37
40
 
38
41
  3. Dispatch `researcher` in DESIGN mode with the DESIGN TOPICS list.
39
- It returns a terse summary + file paths. Read the design-<slug>.md files
40
- only if needed.
42
+ It returns a terse summary + file paths. For every external datasource it
43
+ drafts a DATA UNDERSTANDING to `docs/research/datasource-<name>.md`:
44
+ grain (one row = what?), the fields likely under test with their meaning and
45
+ real-world nullability/range, a sample-fixture shape, and the assumption that
46
+ if wrong makes a test meaningless. Read the design-<slug>.md files only if needed.
47
+
48
+ ---
49
+
50
+ ### RESEARCH REVIEW (v2.1 — read-and-confirm, not a grill)
51
+
52
+ 4. Surface the design-research findings to me DIRECTLY, phrased as FALSIFIABLE
53
+ CLAIMS about my systems — not a passive findings dump. For example:
54
+ "I understand your Tableau extract refreshes nightly and the API is read-only;
55
+ the `orders` grain is one row per line-item; `status` is never null in practice."
56
+ For each external datasource, present its drafted DATA UNDERSTANDING for me to
57
+ confirm or correct. Then:
58
+ - Minor corrections -> fold forward as seed context for round-2 grill.
59
+ - A MATERIAL error (wrong service tier, wrong data model, wrong grain) ->
60
+ re-dispatch `researcher` with the correction, then re-present. Do not carry
61
+ a known-wrong research file into grill or OVERVIEW.md.
62
+ A confirmed datasource understanding is recorded as the BASELINE in its
63
+ `datasource-<name>.md`. (Per-phase delta-confirms happen later in `/phase`.)
41
64
 
42
65
  ---
43
66
 
44
67
  ### Round 2 — Research-informed re-grill
45
68
 
46
- 4. Run `grill-me` again — a second focused pass. Seed it with:
69
+ 5. Run `grill-me` again — a second focused pass. Seed it with:
47
70
  - The round-1 answers (already established — do not re-ask these)
48
71
  - The design-research key findings and new questions raised
72
+ - The RESEARCH REVIEW corrections
49
73
 
50
- The re-grill asks whatever it needs to build complete understanding. It is
51
- not limited to "gaps from research" research context makes new questions
52
- relevant even if it found no blockers. Do not re-ask what round 1 already
53
- established clearly.
74
+ This pass MUST explicitly cover DATA STRUCTURE and DATAFLOW, especially the
75
+ STATE FLOW of each key object: what are the core entities, what states does
76
+ each move through, what transition triggers each change, who writes it, and
77
+ does any state map to an external system. The re-grill asks whatever else it
78
+ needs for complete understanding. Do not re-ask what round 1 established.
54
79
 
55
80
  ---
56
81
 
57
- ### Write OVERVIEW.md
82
+ ### Write OVERVIEW.md + DATAFLOW.md
58
83
 
59
- 5. Write docs/OVERVIEW.md from the COMBINED output of round-1 + design-research
60
- + round-2. Include:
84
+ 6. Write docs/OVERVIEW.md from the COMBINED output of round-1 + design-research
85
+ + research review + round-2. Include:
61
86
  - Project purpose and success criteria
62
87
  - Scope and constraints (informed by research findings)
63
88
  - External services with confirmed capabilities/limits
64
89
  - "Azure services" section: every service with expected SKU
65
90
  - Deployment target (azure-deployed or local-docker for E2E)
91
+ - `has_frontend: true|false` and, if true, the frontend root path
66
92
  - Known risks / open questions (if any remain)
67
93
 
68
94
  OVERVIEW.md is written HERE — after the re-grill, not before.
69
95
 
96
+ 7. Write docs/DATAFLOW.md — a state-transition table per key object, driven by the
97
+ round-2 data/state-flow grill. The data-side analogue of ENDPOINTS.md. Columns:
98
+ ```
99
+ # Dataflow — <project name>
100
+ > Maintained from /overview; updated each phase that changes an object lifecycle.
101
+ > Each transition row is one testable unit (drives the CLOSE coverage gate).
102
+
103
+ | object | states | transition (from→to) | trigger | who writes | external system |
104
+ |--------|--------|----------------------|---------|------------|-----------------|
105
+ | Order | draft,submitted,fulfilled | draft→submitted | POST /orders/submit | order-svc | — |
106
+ ```
107
+ Any row whose `external system` is populated ties to a `datasource-<name>.md`.
108
+
70
109
  ---
71
110
 
72
111
  ### Plan
73
112
 
74
- 6. Hand OVERVIEW.md + design-research findings to the `planner` subagent.
75
- PLAN.md MUST:
113
+ 8. Hand OVERVIEW.md + DATAFLOW.md + design-research findings to the `planner`
114
+ subagent. PLAN.md MUST:
76
115
  - Start with Phase 0 (infra setup) as the first entry (always).
77
116
  - End with a final code phase that contains the deploy task block.
117
+ - For any phase whose `changes` touch the frontend root: include ≥1
118
+ UI-existence acceptance criterion naming the specific user-visible
119
+ interactive element the phase introduces (not "page renders 200").
120
+ - Map each phase to the DATAFLOW transitions it is expected to make reachable.
78
121
 
79
- 7. Create docs/STATE.md:
122
+ 9. Create docs/STATE.md:
80
123
  ```
81
124
 
82
125
  # STATE
83
126
 
84
127
  phase: 0 (pending)
85
- completed: project bootstrapped — design research done, double grill done
128
+ completed: project bootstrapped — design research, research review, double grill (incl. data/state flow) done
86
129
  next: run /infra to provision Azure infrastructure
87
130
  blocker: none
88
131
 
89
132
  ```
90
- 8. Create docs/ISSUES.md with header `# Issues` and `## Archived` section.
133
+ 10. Create docs/ISSUES.md with header `# Issues` and `## Archived` section.
91
134
 
92
- 9. Create empty docs/HISTORY.md.
135
+ 11. Create empty docs/HISTORY.md.
93
136
 
94
- 10. Create docs/INFRA.md from the template (populated by /infra).
137
+ 12. Create docs/INFRA.md from the template (populated by /infra).
95
138
 
96
- 11. Create docs/ENDPOINTS.md:
139
+ 13. Create docs/ENDPOINTS.md:
97
140
  ```
98
141
  # Endpoints — <project name>
99
142
  > Maintained by implementer. Updated each phase.
100
143
  > Base URL: (populated after deployment phase)
101
144
  ```
102
145
 
103
- Then stop and show me PLAN.md for approval before any phase starts.
146
+ Then stop and show me PLAN.md + DATAFLOW.md for approval before any phase starts.
104
147
 
105
- Remind me: "Run `/infra` next to provision the Azure environment (Phase 0)
106
- before starting Phase 1."
148
+ Remind me: "Run `/infra` next to provision the Azure environment (Phase 0) and
149
+ run the one-time AUTH PROOF before starting Phase 1."