create-issflow 1.0.2 → 1.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.
Files changed (42) hide show
  1. package/README.md +61 -56
  2. package/bin/cli.js +269 -259
  3. package/package.json +32 -28
  4. package/template/.claude/agents/debugger.md +47 -47
  5. package/template/.claude/agents/e2e-runner.md +66 -66
  6. package/template/.claude/agents/implementer.md +79 -75
  7. package/template/.claude/agents/planner.md +93 -71
  8. package/template/.claude/agents/researcher.md +103 -103
  9. package/template/.claude/agents/synthesizer.md +78 -72
  10. package/template/.claude/agents/test-author.md +70 -70
  11. package/template/.claude/commands/change-request.md +53 -0
  12. package/template/.claude/commands/log-decision.md +33 -33
  13. package/template/.claude/commands/log-issue.md +28 -28
  14. package/template/.claude/commands/overview.md +114 -99
  15. package/template/.claude/commands/phase.md +230 -202
  16. package/template/.claude/commands/propose.md +71 -0
  17. package/template/.claude/commands/quick.md +30 -30
  18. package/template/.claude/commands/replan.md +68 -63
  19. package/template/.claude/commands/store-wisdom.md +195 -195
  20. package/template/.claude/commands/synthesize.md +26 -26
  21. package/template/.claude/commands/unstuck.md +40 -40
  22. package/template/.claude/hooks/pre-compact.js +42 -0
  23. package/template/.claude/hooks/session-start.js +137 -0
  24. package/template/.claude/hooks/subagent-stop.js +18 -0
  25. package/template/.claude/istartsoft-flow/METHODOLOGY.md +403 -229
  26. package/template/.claude/skills/caveman/SKILL.md +39 -39
  27. package/template/.claude/skills/code-standards/SKILL.md +61 -0
  28. package/template/.claude/skills/code-standards/references/architecture.md +61 -0
  29. package/template/.claude/skills/code-standards/references/naming.md +60 -0
  30. package/template/.claude/skills/grill-me/SKILL.md +31 -10
  31. package/template/.claude/skills/karpathy-guidelines/SKILL.md +34 -34
  32. package/template/.claude/skills/security/SKILL.md +70 -0
  33. package/template/.claude/skills/security/references/pentest-checklist.md +46 -0
  34. package/template/.claude/skills/security/references/secure-coding.md +50 -0
  35. package/template/.claude/skills/security/references/standards.md +60 -0
  36. package/template/.claude/skills/security/references/threat-modeling.md +36 -0
  37. package/template/.claude/skills/ux-design/SKILL.md +113 -99
  38. package/template/.claude/skills/ux-design/{wireframe-template.md → references/wireframe-template.md} +95 -95
  39. package/template/.claude/templates/proposal.html +126 -0
  40. package/template/.claude/hooks/pre-compact.sh +0 -25
  41. package/template/.claude/hooks/session-start.sh +0 -120
  42. package/template/.claude/hooks/subagent-stop.sh +0 -11
@@ -1,202 +1,230 @@
1
- ---
2
- description: Run one phase end-to-end. TDD phases run SCAFFOLD -> RED -> GREEN; non-TDD phases run IMPLEMENT -> TEST. Both with the debug circuit breaker and the regression guard at CLOSE.
3
- argument-hint: [phase number]
4
- ---
5
-
6
- Caveman ULTRA mode. You are the ORCHESTRATOR. Route work to subagents —
7
- you do NOT implement or debug yourself.
8
-
9
- Note: subagents cannot talk to the user. Only YOU can.
10
-
11
- Target phase: $ARGUMENTS (default: the phase marked pending in docs/PLAN.md)
12
-
13
- ---
14
-
15
- ## 0. PRE-FLIGHT
16
-
17
- a. INFRA CHECK (phases > 0): Read the declared infra in docs/OVERVIEW.md.
18
- - Managed infra -> confirm it is reachable; no provisioning step is needed.
19
- - Self-managed infra -> confirm Phase 0 (infra) ran and is healthy.
20
- Surface infra + auth status before any work. Blocked infra -> STOP.
21
-
22
- b. PHASE STATE CHECK: Read docs/STATE.md and docs/PLAN.md.
23
- - No phase in progress, requested is next pending -> START at step 1.
24
- - Same phase in-progress -> RESUME from STATE.md "next action".
25
- - Different phase in-progress -> STOP. Tell me which phase is open.
26
- - Out of dependency order -> STOP. Warn, proceed only if I confirm.
27
- - Phase not in PLAN.md -> STOP. Suggest /overview or /replan.
28
-
29
- c. FINAL PHASE CHECK: Read docs/PLAN.md. Is this the last phase (no further
30
- pending phases after this one)? Record this as IS_FINAL_PHASE=true/false.
31
-
32
-
33
- ---
34
-
35
- ## 1. RESEARCH + TDD APPLICABILITY
36
-
37
- Dispatch `researcher` in IMPL mode scoped to this phase.
38
- Returns terse summary + path. Read the file only if needed.
39
- Unknowns block the phase -> re-dispatch narrowed. No guessing.
40
-
41
- Then classify the phase:
42
-
43
- `TDD_PHASE` = the phase adds or changes a PUBLIC CALLABLE SURFACE (endpoint,
44
- exported function/class, CLI command, message contract) assertable from the
45
- acceptance spec. Size is NOT the criterion.
46
-
47
- - Clear public surface -> `TDD_PHASE=true` -> run the TDD path (§2 → §3a → §3b).
48
- - Pure infra/config/doc, no public surface -> `TDD_PHASE=false` -> run the
49
- non-TDD path (§2N §3N).
50
- - AMBIGUOUS -> default `TDD_PHASE=true`, but STATE the classification + the reason
51
- to me, so I can override to non-TDD BEFORE SCAFFOLD fires. (Hard rule 11: never
52
- downgrade a TDD phase just to dodge the RED gate.)
53
-
54
- =====================================================================
55
- ## TDD PATH (TDD_PHASE=true)
56
- =====================================================================
57
-
58
- ## 2. SCAFFOLD
59
-
60
- Dispatch `implementer` in SCAFFOLD mode: interface stubs only (signatures +
61
- types; bodies raise NotImplementedError / return 501); NO logic, NO tests.
62
- Returns the stub files + the interface surface.
63
-
64
- ## 3a. RED
65
-
66
- Dispatch `test-author` to write the REAL API suite (+ mock) BLIND against the
67
- stubs + acceptance. Place contract/ENDPOINTS tests in `tests/regression/`,
68
- phase-local tests in `tests/phase-<n>/`. Run the suite.
69
-
70
- RED GATE = every acceptance test COLLECTS cleanly AND FAILS (assertion /
71
- NotImplemented).
72
- - Any test PASSES on stubs -> STOP (spec trivial or test wrong); show me.
73
- - Collection / import / syntax error -> stub mismatch; re-dispatch SCAFFOLD to
74
- fix SIGNATURES (not logic); re-run.
75
- - UNDERSPEC -> STOP; ask me to sharpen the acceptance spec.
76
-
77
- ## 3b. GREEN
78
-
79
- Dispatch `implementer` in FILL mode with the phase spec + research + the test
80
- file paths (it MAY read the tests — frozen before logic, no overfit — but must
81
- NOT edit them). Fill to green. Budget 3, WARN@2, STUCK@3.
82
-
83
- ## 3c. TEST (e2e) — FRONTEND phases only
84
-
85
- If this phase ships UI: dispatch `e2e-runner` (BLIND) to write + run browser E2E
86
- for the slice using the declared E2E runner (it brings the test stack up/down
87
- itself). Then run the `ux-design` cookbook + wireframe check on the new UI
88
- (hard rule 9): the UI must match the wireframe frame and pass the cookbook
89
- (tokens, a11y/WCAG AA, states, breakpoints). A `ux-design` BLOCK is a GATE FAIL.
90
- Non-frontend phase -> skip §3c.
91
-
92
- PHASE GATE (rule 5) -> go to §4/§5/§6 (see GATE below).
93
-
94
- =====================================================================
95
- ## NON-TDD PATH (TDD_PHASE=false)
96
- =====================================================================
97
-
98
- ## 2N. IMPLEMENT
99
-
100
- Dispatch `implementer` (legacy mode) with phase spec + research summary.
101
- Returns STUCK -> go to ESCALATE.
102
- If IS_FINAL_PHASE: phase spec includes the deploy task; confirm the return
103
- includes "deployed URL" before proceeding.
104
-
105
- ## 3N. TEST (blind)
106
-
107
- Dispatch `test-author`. It writes MOCK + REAL API suites from the acceptance
108
- spec never reads the logic. (e2e-runner only if frontend.)
109
-
110
- =====================================================================
111
-
112
- ## GATE (both paths)
113
-
114
- PHASE GATE = current-phase REAL API suite passes AND (if frontend) E2E passes AND
115
- (if frontend) the `ux-design` cookbook + wireframe check passes AND the
116
- accumulated mock regression corpus stays green AND every docs/ENDPOINTS.md
117
- entry has a regression test (checked at CLOSE).
118
- - GATE PASS -> go to CLOSE.
119
- - GATE FAIL (LOGIC FAIL) -> go to FIX.
120
-
121
- ---
122
-
123
- ## 4. FIX
124
-
125
- Dispatch `debugger` (isolated context) on the specific failure.
126
- - FIXED -> re-run TEST (and the regression corpus).
127
- - WARN (2 attempts failed) -> relay immediately, then let debugger finish attempt 3.
128
- - STUCK -> go to ESCALATE.
129
-
130
- ---
131
-
132
- ## 5. ESCALATE circuit breaker. Mode B.
133
-
134
- FIRST STUCK: STOP. Present to me: the problem, 3 failed hypotheses, the
135
- debugger's recommendation, the debug file path. Ask what to do. Wait. Options:
136
- (a) "re-research" -> /unstuck
137
- (b) hint -> re-dispatch debugger with hint, budget 3
138
- (c) "skip" / "re-slice" -> mark blocked, dispatch planner
139
-
140
- SECOND STUCK: STOP completely. Full summary — every hypothesis, current state,
141
- what to try next. Hand control to me.
142
-
143
- ---
144
-
145
- ## 6. CLOSE
146
-
147
- REGRESSION GATE (before closing Feature 3):
148
- - Run `scripts/regression.sh` (mock corpus). A failure BLOCKS close -> route to FIX.
149
- - ENDPOINTS COVERAGE: every `docs/ENDPOINTS.md` entry MUST have >=1 test in
150
- `tests/regression/`. Zero coverage -> FAIL HARD; do not close.
151
- - IF IS_FINAL_PHASE: additionally run `scripts/regression.sh --real` (full real
152
- corpus). A failure blocks close.
153
-
154
- Mark phase `done` in docs/PLAN.md.
155
-
156
- ARCHITECTURE SELF-CHECK: did this phase add/remove/rename an agent, hook, or
157
- command, or change a workflow rule? YES -> run `/log-decision`. NO -> state why not.
158
-
159
- IF IS_FINAL_PHASE — FINAL CLOSE sequence:
160
-
161
- a. Run `/synthesize` — pass the signal that this is the final phase so the
162
- synthesizer runs the extended pass (OVERVIEW.md + README.md update).
163
-
164
- b. Read docs/ENDPOINTS.md. Surface a "READY TO USE" summary to me:
165
- ```
166
- PROJECT COMPLETE
167
-
168
-
169
- ## Endpoints
170
- <paste the full docs/ENDPOINTS.md table>
171
-
172
- ## Quick start
173
- - Base URL: <URL>
174
- - Auth: <Bearer token / API key / none — from ENDPOINTS.md>
175
- - Health check: GET <base URL>/health
176
-
177
- ## Docs
178
- - Full endpoint catalogue: docs/ENDPOINTS.md
179
- - Project history: docs/HISTORY.md
180
- ```
181
- Tell me the project is complete and ready to use.
182
-
183
- ELSE (not final phase):
184
-
185
- Run `/synthesize`.
186
- Tell me phase done + the next phase. Recommend `/clear` then `/phase` next.
187
-
188
- ---
189
-
190
- ## STATE CHECKPOINTING
191
-
192
- After each step, update docs/STATE.md:
193
- ```
194
-
195
- phase: <n> (in progress)
196
- tdd: <true|false>
197
- completed: <steps done so far>
198
- next: <exact next step>
199
- blocker: <none or open issue>
200
-
201
- ```
202
- Keep STATE.md small overwrite, do not append.
1
+ ---
2
+ description: Run one phase end-to-end. TDD phases run SCAFFOLD -> RED -> GREEN; non-TDD phases run IMPLEMENT -> TEST. Both with the debug circuit breaker and the regression guard at CLOSE.
3
+ argument-hint: [phase number]
4
+ ---
5
+
6
+ Caveman ULTRA mode. You are the ORCHESTRATOR. Route work to subagents —
7
+ you do NOT implement or debug yourself.
8
+
9
+ Note: subagents cannot talk to the user. Only YOU can.
10
+
11
+ Target phase: $ARGUMENTS (default: the phase marked pending in docs/PLAN.md)
12
+
13
+ ---
14
+
15
+ ## 0. PRE-FLIGHT
16
+
17
+ a. INFRA CHECK (phases > 0): Read the declared infra in docs/OVERVIEW.md.
18
+ - Managed infra -> confirm it is reachable; no provisioning step is needed.
19
+ - Self-managed infra -> confirm Phase 0 (infra) ran and is healthy.
20
+ Surface infra + auth status before any work. Blocked infra -> STOP.
21
+
22
+ b. PHASE STATE CHECK: Read docs/STATE.md and docs/PLAN.md.
23
+ - No phase in progress, requested is next pending -> START at step 1.
24
+ - Same phase in-progress -> RESUME from STATE.md "next action".
25
+ - Different phase in-progress -> STOP. Tell me which phase is open.
26
+ - Out of dependency order -> AUTO: ignore the request and run the next pending
27
+ phase in PLAN order. GUIDED: STOP, warn, proceed only if I confirm.
28
+ - Phase not in PLAN.md -> STOP. Suggest /overview or /replan.
29
+
30
+ c. FINAL PHASE CHECK: Read docs/PLAN.md. Is this the last phase (no further
31
+ pending phases after this one)? Record this as IS_FINAL_PHASE=true/false.
32
+
33
+
34
+ ---
35
+
36
+ ## 1. RESEARCH + TDD APPLICABILITY
37
+
38
+ Dispatch `researcher` in IMPL mode scoped to this phase.
39
+ Returns terse summary + path. Read the file only if needed.
40
+ Unknowns block the phase -> re-dispatch narrowed. No guessing.
41
+
42
+ SECURE SDLC (design): if this phase touches a TRUST BOUNDARY (auth, untrusted input,
43
+ data store, money, PII), threat-model it now (`security` skill) and fold the abuse
44
+ cases into the acceptance criteria as negative cases BEFORE SCAFFOLD.
45
+
46
+ Then classify the phase:
47
+
48
+ `TDD_PHASE` = the phase adds or changes a PUBLIC CALLABLE SURFACE (endpoint,
49
+ exported function/class, CLI command, message contract) assertable from the
50
+ acceptance spec. Size is NOT the criterion.
51
+
52
+ - Clear public surface -> `TDD_PHASE=true` -> run the TDD path (§2 → §3a → §3b).
53
+ - Pure infra/config/doc, no public surface -> `TDD_PHASE=false` -> run the
54
+ non-TDD path (§2N → §3N).
55
+ - AMBIGUOUS -> default `TDD_PHASE=true`. AUTO: log the classification + reason to
56
+ STATE and proceed. GUIDED: surface it so I can override to non-TDD BEFORE SCAFFOLD
57
+ fires. (Hard rule 10: never downgrade a TDD phase just to dodge the RED gate.)
58
+
59
+ =====================================================================
60
+ ## TDD PATH (TDD_PHASE=true)
61
+ =====================================================================
62
+
63
+ ## 2. SCAFFOLD
64
+
65
+ Dispatch `implementer` in SCAFFOLD mode: interface stubs only (signatures +
66
+ types; bodies raise NotImplementedError / return 501); NO logic, NO tests.
67
+ Returns the stub files + the interface surface.
68
+
69
+ ## 3a. RED
70
+
71
+ Dispatch `test-author` to write the REAL API suite (+ mock) BLIND against the
72
+ stubs + acceptance. Place contract/ENDPOINTS tests in `tests/regression/`,
73
+ phase-local tests in `tests/phase-<n>/`. Run the suite.
74
+
75
+ RED GATE = every acceptance test COLLECTS cleanly AND FAILS (assertion /
76
+ NotImplemented).
77
+ - Any test PASSES on stubs -> spec trivial or test wrong. AUTO: re-dispatch
78
+ test-author to tighten it (within budget) + log the cause; GUIDED: STOP, show me.
79
+ - Collection / import / syntax error -> stub mismatch; re-dispatch SCAFFOLD to
80
+ fix SIGNATURES (not logic); re-run.
81
+ - UNDERSPEC -> AUTO: sharpen the acceptance spec yourself from the BMAD/iSSM story,
82
+ log the interpretation as an Assumption, continue. GUIDED: STOP; ask me to sharpen it.
83
+
84
+ ## 3b. GREEN
85
+
86
+ Dispatch `implementer` in FILL mode with the phase spec + research + the test
87
+ file paths (it MAY read the tests frozen before logic, no overfit but must
88
+ NOT edit them). Fill to green. Budget 3, WARN@2, STUCK@3.
89
+
90
+ ## 3c. TEST (e2e) — FRONTEND phases only
91
+
92
+ If this phase ships UI: dispatch `e2e-runner` (BLIND) to write + run browser E2E
93
+ for the slice using the declared E2E runner (it brings the test stack up/down
94
+ itself). Then run the `ux-design` cookbook + wireframe check on the new UI
95
+ (hard rule 9): the UI must match the wireframe frame and pass the cookbook
96
+ (tokens, a11y/WCAG AA, states, breakpoints). A `ux-design` BLOCK is a GATE FAIL.
97
+ Non-frontend phase -> skip §3c.
98
+
99
+ PHASE GATE (rule 5) -> go to §4/§5/§6 (see GATE below).
100
+
101
+ =====================================================================
102
+ ## NON-TDD PATH (TDD_PHASE=false)
103
+ =====================================================================
104
+
105
+ ## 2N. IMPLEMENT
106
+
107
+ Dispatch `implementer` (legacy mode) with phase spec + research summary.
108
+ Returns STUCK -> go to ESCALATE.
109
+ If IS_FINAL_PHASE: phase spec includes the deploy task; confirm the return
110
+ includes "deployed URL" before proceeding.
111
+
112
+ ## 3N. TEST (blind)
113
+
114
+ Dispatch `test-author`. It writes MOCK + REAL API suites from the acceptance
115
+ spec never reads the logic. (e2e-runner only if frontend.)
116
+
117
+ =====================================================================
118
+
119
+ ## GATE (both paths)
120
+
121
+ PHASE GATE = current-phase REAL API suite passes AND (if frontend) E2E passes AND
122
+ (if frontend) the `ux-design` cookbook + wireframe check passes AND the
123
+ accumulated mock regression corpus stays green AND every docs/ENDPOINTS.md
124
+ entry has a regression test (checked at CLOSE).
125
+ - GATE PASS -> go to CLOSE.
126
+ - GATE FAIL (LOGIC FAIL) -> go to FIX.
127
+
128
+ ---
129
+
130
+ ## 4. FIX
131
+
132
+ Dispatch `debugger` (isolated context) on the specific failure.
133
+ - FIXED -> re-run TEST (and the regression corpus).
134
+ - WARN (2 attempts failed) -> relay immediately, then let debugger finish attempt 3.
135
+ - STUCK -> go to ESCALATE.
136
+
137
+ ---
138
+
139
+ ## 5. ESCALATE — circuit breaker (mode-aware; see METHODOLOGY → Autonomy)
140
+
141
+ **AUTO (default) do NOT stop the run:**
142
+ FIRST STUCK: auto-run `/unstuck` (deep re-research) — CAP: at most ONCE per phase
143
+ (it is token-expensive); re-dispatch `debugger` with the findings, budget 3.
144
+ STILL STUCK (or already spent this phase's unstuck): log the issue (root cause +
145
+ every failed hypothesis) to ISSUES.md,
146
+ mark the slice `BLOCKED` in PLAN, and move to the next INDEPENDENT slice/phase.
147
+ Add it to the batched end-of-run report. HARD-STOP (pause for me) ONLY if no
148
+ independent work remains, or the blocker is on the hard-stop list
149
+ (security / irreversible / contradictory spec).
150
+
151
+ **GUIDED:**
152
+ FIRST STUCK: STOP. Present the problem, 3 failed hypotheses, the debugger's
153
+ recommendation, the debug file path. Wait. Options:
154
+ (a) "re-research" -> /unstuck (b) hint -> re-dispatch debugger, budget 3
155
+ (c) "skip" / "re-slice" -> mark blocked, dispatch planner
156
+ SECOND STUCK: STOP completely. Full summary. Hand control to me.
157
+
158
+ ---
159
+
160
+ ## 6. CLOSE
161
+
162
+ REGRESSION GATE (before closing Feature 3):
163
+ - Run `scripts/regression.sh` (mock corpus). A failure BLOCKS close -> route to FIX.
164
+ - ENDPOINTS COVERAGE: every `docs/ENDPOINTS.md` entry MUST have >=1 test in
165
+ `tests/regression/`. Zero coverage -> FAIL HARD; do not close.
166
+ - IF IS_FINAL_PHASE: additionally run `scripts/regression.sh --real` (full real
167
+ corpus). A failure blocks close.
168
+
169
+ CODE-STANDARDS GATE (rule 12): the formatter + linter are clean (the language's
170
+ standard tool); names follow the language's own idiom; the code conforms to the
171
+ declared architecture (Feature-Based by default). Lint/format errors or idiom
172
+ violations BLOCK the close -> route to FIX. (`code-standards` skill.)
173
+
174
+ SECURITY GATE (rule 11 Secure SDLC build stage):
175
+ - Security-touching OR deploy phase -> run the `security` cookbook. Build gates:
176
+ secrets scan + SCA (dependency CVEs) + SAST must be clean.
177
+ - IS_FINAL_PHASE / deploy -> also run the pentest checklist (WSTG) + a security
178
+ review of the diff; sign artifacts (SLSA L2+).
179
+ - Open HIGH/CRITICAL findings BLOCK the close -> route to FIX. Deploying to prod
180
+ with open high/critical findings is a hard-stop (human sign-off).
181
+
182
+ Mark phase `done` in docs/PLAN.md.
183
+
184
+ ARCHITECTURE SELF-CHECK: did this phase add/remove/rename an agent, hook, or
185
+ command, or change a workflow rule? YES -> run `/log-decision`. NO -> state why not.
186
+
187
+ IF IS_FINAL_PHASE — FINAL CLOSE sequence:
188
+
189
+ a. Run `/synthesize` — pass the signal that this is the final phase so the
190
+ synthesizer runs the extended pass (OVERVIEW.md + README.md update).
191
+
192
+ b. Read docs/ENDPOINTS.md. Surface a "READY TO USE" summary to me:
193
+ ```
194
+ ✅ PROJECT COMPLETE
195
+
196
+
197
+ ## Endpoints
198
+ <paste the full docs/ENDPOINTS.md table>
199
+
200
+ ## Quick start
201
+ - Base URL: <URL>
202
+ - Auth: <Bearer token / API key / none — from ENDPOINTS.md>
203
+ - Health check: GET <base URL>/health
204
+
205
+ ## Docs
206
+ - Full endpoint catalogue: docs/ENDPOINTS.md
207
+ - Project history: docs/HISTORY.md
208
+ ```
209
+ Tell me the project is complete and ready to use.
210
+
211
+ ELSE (not final phase):
212
+
213
+ Run `/synthesize`.
214
+ Tell me phase done + the next phase. Recommend `/clear` then `/phase` next.
215
+
216
+ ---
217
+
218
+ ## STATE CHECKPOINTING
219
+
220
+ After each step, update docs/STATE.md:
221
+ ```
222
+
223
+ phase: <n> (in progress)
224
+ tdd: <true|false>
225
+ completed: <steps done so far>
226
+ next: <exact next step>
227
+ blocker: <none or open issue>
228
+
229
+ ```
230
+ Keep STATE.md small — overwrite, do not append.
@@ -0,0 +1,71 @@
1
+ ---
2
+ description: Turn approved requirements + tech stack into a client proposal — scope, phase breakdown, effort + cost estimate, timeline, assumptions, and a sign-off gate. Run after /overview, before building.
3
+ argument-hint: [optional: rate / budget / constraints]
4
+ ---
5
+
6
+ Caveman ULTRA mode. You are the ORCHESTRATOR.
7
+
8
+ Purpose: produce `docs/PROPOSAL.md` — WHAT we build, in what phases, how long, how
9
+ much, and on what assumptions — for the client to approve BEFORE any build starts.
10
+ A proposal is a commercial gate: always interactive (both AUTO and GUIDED).
11
+
12
+ ## PRE-FLIGHT
13
+ Read `docs/OVERVIEW.md` (scope, stack, success criteria) and `docs/PRD.md` if
14
+ present (else the PRD in your BMAD/iSSM). No OVERVIEW -> run `/overview` first.
15
+
16
+ ## STEP 1 — SCOPE
17
+ List the deliverables (features / epics) from OVERVIEW / PRD. Mark each
18
+ **in-scope** or **out-of-scope** explicitly — naming out-of-scope items now is what
19
+ prevents silent scope creep (and grounds change-order re-pricing later).
20
+
21
+ ## STEP 2 — PHASE BREAKDOWN
22
+ Derive the vertical-slice phases (or read `docs/PLAN.md` if it exists). Size each:
23
+ - complexity: **S | M | L | XL**
24
+ - effort: an ideal-days RANGE (e.g. 2–3d), + story points if your team uses them
25
+ - risk / unknowns: what could move the estimate
26
+
27
+ ## STEP 3 — ESTIMATE (flexible, transparent — no false precision)
28
+ Read the **estimation config** from OVERVIEW (or ask once — a commercial/planning
29
+ input, allowed). Everything is configurable; use sensible defaults if unset:
30
+ - **unit:** ideal-days (default) | story-points | both.
31
+ - **rate card:** a single blended rate, OR per-role rates (e.g. senior / mid /
32
+ junior). Cost = Σ(effort per role × that role's rate).
33
+ - **currency:** as declared (THB default for a Thai project).
34
+ - **contingency:** a % buffer for unknowns (default 10–15%).
35
+ - **payment milestones:** by-phase, or a split (e.g. 30/40/30), or none.
36
+ - **language:** the rendered doc's language (default = the project language).
37
+ Compute cost per phase, then a **Total as a RANGE (low–high)** incl. contingency —
38
+ show the math. **Timeline:** phases in dependency order → calendar estimate (note parallelism).
39
+
40
+ ## STEP 4 — ASSUMPTIONS & EXCLUSIONS
41
+ List every assumption the estimate rests on (infra provided, third-party/licence
42
+ costs excluded, content/design provided, etc.). These are the baseline that
43
+ change-orders re-price against.
44
+
45
+ ## STEP 5 — WRITE + RENDER
46
+ 1. Write `docs/PROPOSAL.md` — the SOURCE OF TRUTH (versioned v1 + date). This is
47
+ what `CHANGES.md` re-prices against. Template:
48
+ ```
49
+ # Proposal — <project> (v1, <date>)
50
+ ## Scope — in-scope: … | out-of-scope: …
51
+ ## Phases — table: phase | complexity | effort (range) | cost
52
+ ## Total — <low>–<high> (incl. <buffer>% contingency)
53
+ ## Timeline — <estimate>, dependency order
54
+ ## Assumptions — …
55
+ ## Exclusions — …
56
+ ## Payment — milestones (if any)
57
+ ## Sign-off — approved by: ___ date: ___ version: v1
58
+ ```
59
+ 2. RENDER a client-facing `docs/proposal.html` from `.claude/templates/proposal.html`:
60
+ copy it, replace every `{{PLACEHOLDER}}`, and LOCALISE all labels + content to the
61
+ declared language (natural Thai for Thai projects; keep tech terms in English).
62
+ Fill `{{COMPANY}}` / `{{LOGO}}` from the ISSUING company's brand declared in
63
+ OVERVIEW (or ask once) — the template is white-label, never hardcode the kit's
64
+ name. It is print-ready (Save as PDF). Keep PROPOSAL.md and proposal.html in sync —
65
+ the markdown is the source, the HTML is the deliverable you send the client.
66
+
67
+ ## STEP 6 — SIGN-OFF GATE
68
+ Show me the proposal. **STOP for approval** (commercial gate — always interactive).
69
+ On approval: record the approved version + date in PROPOSAL.md and STATE.md, and
70
+ append a HISTORY line `proposal v<n> approved (<total>)`. Building starts only after
71
+ sign-off. On rejection: revise per feedback and re-show.
@@ -1,30 +1,30 @@
1
- ---
2
- description: Make a small, obvious change directly — no agent chain, no phase overhead.
3
- argument-hint: [what to change]
4
- ---
5
-
6
- Caveman ULTRA mode. Apply `karpathy-guidelines` skill.
7
-
8
- Purpose: skip the orchestration tax for a 5-line fix.
9
-
10
- Use `/quick` when ALL hold:
11
- - change is small (under 30 lines) and obvious
12
- - no new vertical slice
13
- - no external service contract change
14
- - not mid-phase
15
-
16
- If any fail -> STOP, tell me, recommend `/phase`.
17
- (Hard rule 11: never route phase-worthy work through `/quick` to dodge the RED gate.)
18
-
19
- Steps:
20
- 1. grep docs/ISSUES.md for anything related.
21
- 2. Make the change. Smallest diff that works.
22
- 3. Run it — lint/typecheck/smoke. Show me result.
23
- 4. REGRESSION GUARD: run `scripts/regression.sh` (mock corpus). A break BLOCKS the
24
- `/quick` — surface it to me and stop. No agent chain is added.
25
- 5. Error you cannot fix in 2 tries -> STOP. Recommend `/phase`.
26
- 6. Change revealed a bug -> `/log-issue`.
27
- 7. ARCHITECTURE SELF-CHECK: touched an agent, hook, command, or workflow rule?
28
- YES -> `/log-decision`.
29
-
30
- No STATE.md rewrite, no synthesize, no /clear needed.
1
+ ---
2
+ description: Make a small, obvious change directly — no agent chain, no phase overhead.
3
+ argument-hint: [what to change]
4
+ ---
5
+
6
+ Caveman ULTRA mode. Apply `karpathy-guidelines` skill.
7
+
8
+ Purpose: skip the orchestration tax for a 5-line fix.
9
+
10
+ Use `/quick` when ALL hold:
11
+ - change is small (under 30 lines) and obvious
12
+ - no new vertical slice
13
+ - no external service contract change
14
+ - not mid-phase
15
+
16
+ If any fail -> STOP, tell me, recommend `/phase`.
17
+ (Hard rule 11: never route phase-worthy work through `/quick` to dodge the RED gate.)
18
+
19
+ Steps:
20
+ 1. grep docs/ISSUES.md for anything related.
21
+ 2. Make the change. Smallest diff that works.
22
+ 3. Run it — lint/typecheck/smoke. Show me result.
23
+ 4. REGRESSION GUARD: run `scripts/regression.sh` (mock corpus). A break BLOCKS the
24
+ `/quick` — surface it to me and stop. No agent chain is added.
25
+ 5. Error you cannot fix in 2 tries -> STOP. Recommend `/phase`.
26
+ 6. Change revealed a bug -> `/log-issue`.
27
+ 7. ARCHITECTURE SELF-CHECK: touched an agent, hook, command, or workflow rule?
28
+ YES -> `/log-decision`.
29
+
30
+ No STATE.md rewrite, no synthesize, no /clear needed.