create-issflow 1.10.1 → 1.12.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 (44) hide show
  1. package/bin/cli.js +49 -22
  2. package/package.json +1 -1
  3. package/template/.issflow/README.md +8 -2
  4. package/template/.issflow/agents/planner.md +13 -3
  5. package/template/.issflow/agents/synthesizer.md +17 -8
  6. package/template/.issflow/commands/change-request.md +10 -2
  7. package/template/.issflow/commands/design.md +35 -20
  8. package/template/.issflow/commands/feature.md +33 -13
  9. package/template/.issflow/commands/goal.md +17 -8
  10. package/template/.issflow/commands/overview.md +46 -7
  11. package/template/.issflow/commands/phase.md +99 -32
  12. package/template/.issflow/commands/propose.md +25 -7
  13. package/template/.issflow/commands/quick.md +16 -4
  14. package/template/.issflow/commands/sprint.md +21 -12
  15. package/template/.issflow/commands/synthesize.md +10 -6
  16. package/template/.issflow/flow-config.json +11 -4
  17. package/template/.issflow/hooks/pre-compact.js +4 -0
  18. package/template/.issflow/hooks/session-start.js +84 -123
  19. package/template/.issflow/istartsoft-flow/METHODOLOGY.md +186 -46
  20. package/template/.issflow/models/MODEL-MATRIX.md +33 -0
  21. package/template/.issflow/routing/model-router.js +66 -0
  22. package/template/.issflow/routing/package.json +1 -0
  23. package/template/.issflow/routing/policy.json +69 -0
  24. package/template/.issflow/runtime/HOSTS.md +41 -0
  25. package/template/.issflow/runtime/README.md +150 -0
  26. package/template/.issflow/runtime/package.json +1 -0
  27. package/template/.issflow/runtime/workflow.js +187 -0
  28. package/template/.issflow/scripts/entry-notice.js +20 -0
  29. package/template/.issflow/scripts/package.json +1 -0
  30. package/template/.issflow/scripts/token-lint.js +58 -0
  31. package/template/.issflow/skills/ui-ux-pro-max/SKILL.md +7 -2
  32. package/template/.issflow/skills/ux-design/SKILL.md +4 -0
  33. package/template/.issflow/templates/ARCHITECTURE-template.md +7 -3
  34. package/template/.issflow/templates/PLAN-SCOPED.md +12 -0
  35. package/template/.issflow/templates/UX-PACK-template.md +19 -8
  36. package/template/.issflow/templates/design/DIRECTION.md +22 -0
  37. package/template/.issflow/templates/design/inventory.md +18 -0
  38. package/template/.issflow/templates/design/picker.html +165 -0
  39. package/template/.issflow/templates/design/platforms/line-oa.md +16 -0
  40. package/template/.issflow/templates/design/platforms/mobile-app.md +10 -0
  41. package/template/.issflow/templates/design/platforms/pwa.md +11 -0
  42. package/template/.issflow/templates/design/platforms/web-responsive.md +9 -0
  43. package/template/.issflow/templates/design/screens/SCREEN.md +19 -0
  44. package/template/.issflow/templates/design/tokens.css +47 -0
package/bin/cli.js CHANGED
@@ -22,7 +22,7 @@ const toolArg = (argv.find(a => a.startsWith('--tool=')) || '').split('=')[1];
22
22
 
23
23
  const TOOLS = {
24
24
  claude: 'Claude Code (Anthropic) — full: subagents, lifecycle hooks, skills',
25
- codex: 'OpenAI Codex CLI — AGENTS.md native; subagents/skills as readable files',
25
+ codex: 'OpenAI Codex — AGENTS.md; use native tools only when available',
26
26
  cursor: 'Cursor — .cursor/rules + commands + hooks; kit stays in .issflow/ (no .claude/)',
27
27
  gemini: 'Google Gemini CLI — GEMINI.md pointer; commands/skills as readable files',
28
28
  aider: 'Aider — .aider.conf.yml loads the methodology as conventions',
@@ -124,7 +124,7 @@ function adapterClaude() {
124
124
  if (conflicts > c0) warnings.push('claude: you already keep a CLAUDE.md — ours was written as CLAUDE.md.issflow-new. Add a line `@AGENTS.md` to your CLAUDE.md so the methodology auto-loads.');
125
125
  materializeClaudeMirror();
126
126
  const HOOKS = {
127
- SessionStart: [{ matcher: 'startup|clear|compact', hooks: [{ type: 'command', command: 'node .issflow/hooks/session-start.js' }] }],
127
+ SessionStart: [{ matcher: 'startup|resume|clear|compact', hooks: [{ type: 'command', command: 'node .issflow/hooks/session-start.js' }] }],
128
128
  PreToolUse: [{ matcher: '*', hooks: [{ type: 'command', command: 'node .issflow/hooks/context-guard.js' }] },
129
129
  { matcher: 'Edit|Write|MultiEdit|NotebookEdit', hooks: [{ type: 'command', command: 'node .issflow/hooks/plan-gate.js' }] }],
130
130
  PreCompact: [{ matcher: 'auto|manual', hooks: [{ type: 'command', command: 'node .issflow/hooks/pre-compact.js' }] }],
@@ -144,7 +144,7 @@ function adapterClaude() {
144
144
  }
145
145
 
146
146
  function adapterCodex() {
147
- warnings.push('codex: AGENTS.md is read natively. Lifecycle hooks unsupported (rituals model-run); subagents in .issflow/agents/ are read as reference, not isolated contexts.');
147
+ warnings.push('codex: this installer configures AGENTS.md, not lifecycle hooks or subagent registration. Detect native delegation in the current host; otherwise run roles serially. Run checkpoint and verification commands explicitly.');
148
148
  }
149
149
 
150
150
  function adapterCursor() {
@@ -152,10 +152,23 @@ function adapterCursor() {
152
152
  '---', 'description: iStartSoftFlow workflow — always apply', 'alwaysApply: true', '---', '',
153
153
  'Run the **iStartSoftFlow** workflow. The full, single-source methodology is',
154
154
  '`.issflow/istartsoft-flow/METHODOLOGY.md` — read it before acting. Roles live in',
155
- '`.issflow/agents/` (Cursor reads them natively); procedures in `.cursor/commands/`',
155
+ '`.issflow/agents/` (role references, not registered native agents); procedures in `.cursor/commands/`',
156
156
  '(mirror of `.issflow/commands/`). Caveman ULTRA mode; apply the `karpathy-guidelines`',
157
157
  'and `ux-design` skills. See `AGENTS.md` for the role/command/skill map.', '',
158
158
  ].join('\n'));
159
+ writeFile('.cursor/rules/issflow-gates.mdc', [
160
+ '---', 'description: iStartSoftFlow gates — STATE delivery + plan lock', 'alwaysApply: true', '---', '',
161
+ 'Before any source Edit/Write:',
162
+ '1. Read `docs/STATE.md` — respect `delivery:` (ETA · WAITING · SLIP · DONE).',
163
+ '2. If PLAN approval is PENDING → do not edit source (rule 13).',
164
+ '3. Past `agent_eta` while AGENT_ACTIVE → report SLIP; do not silent-continue.',
165
+ '4. WAITING_ON_HUMAN / WAITING_STALE → do not pretend the agent is still building.',
166
+ '5. UI work: locked `design-direction` / `docs/design/tokens.css` — no freehand palette.',
167
+ '6. Near context gate → checkpoint with `/synthesize` (keep delivery:); use only reset capabilities the host exposes.',
168
+ '',
169
+ 'Talk to the human as PM/SA. Subagents never address the user.',
170
+ '',
171
+ ].join('\n'));
159
172
  copyTemplateCommands('.cursor/commands');
160
173
  writeFile('.cursor/hooks.json', JSON.stringify({
161
174
  version: 1,
@@ -164,7 +177,7 @@ function adapterCursor() {
164
177
  subagentStop: [{ command: 'node .issflow/hooks/subagent-stop.js' }],
165
178
  },
166
179
  }, null, 2) + '\n');
167
- warnings.push('cursor: PreCompact has no Cursor equivalent (snapshot ritual degrades to model-run); verify hooks.json against cursor.com/docs/hooks — the schema evolves.');
180
+ warnings.push('cursor: only sessionStart and subagentStop hooks are configured here; no edit/stop approval enforcement. Verify host hook support. Run checkpoint and verification commands explicitly; role files do not register subagents.');
168
181
  }
169
182
 
170
183
  function adapterGemini() {
@@ -230,15 +243,21 @@ function agentsMd() {
230
243
  'caveman · grill-me · karpathy-guidelines · ux-design · ui-ux-pro-max · security ·',
231
244
  'code-standards · support-triage', '',
232
245
  '## Autonomy', '',
233
- 'Planning (`/overview` grill + plan approval) always asks — that input is cheap.',
246
+ 'Use existing approval for the same scope; ask only for missing approval or material changes.',
234
247
  '**AUTO (default)** governs the DEV loop: follow the plan, decide + log + continue,',
235
248
  'do NOT stop to ask. Hard-stops only: security · irreversible/outbound actions · a',
236
249
  'contradictory spec. Blockers are parked + reported at the phase boundary, not',
237
250
  'mid-flow. **GUIDED** asks at each fork in dev too. Declare the mode in',
238
- '`docs/OVERVIEW.md`. See METHODOLOGY → Autonomy.', '',
251
+ '`docs/OVERVIEW.md`. See METHODOLOGY → Autonomy.',
252
+ 'Optional durable task state: `.issflow/runtime/workflow.js` (see `.issflow/runtime/README.md`).',
253
+ 'This local state helper does not execute agents or schedule future sessions.', '',
239
254
  '## Hard-rule index (full text in METHODOLOGY.md)', '',
240
255
  '1–12 as in METHODOLOGY · 13 PLAN-APPROVAL · 14 UNDERSTAND-FIRST ·',
241
256
  '15 DESIGN + ARCHITECTURE gates (after proposal, before `/phase`; internal may n/a).', '',
257
+ '## Host capability', '',
258
+ 'See `.issflow/runtime/HOSTS.md` for actual adapter enforcement and fallbacks.',
259
+ 'Cursor gate rules are model-run guidance, not lifecycle enforcement.',
260
+ 'Model guidance: `.issflow/models/MODEL-MATRIX.md`; delivery ETA: `docs/STATE.md`.', '',
242
261
  '## Your stack', '',
243
262
  'Declare your stack (language, framework, infra, auth, test + E2E runner,',
244
263
  'planning source) once in `docs/OVERVIEW.md`. Every rule references *your declared',
@@ -265,22 +284,25 @@ function flowConfig() {
265
284
  return JSON.stringify({
266
285
  context: {
267
286
  window: 0,
268
- warnPct: 60,
269
- gatePct: 78,
287
+ warnPct: 55,
288
+ gatePct: 70,
289
+ injectMaxLines: 25,
270
290
  _note: 'Context-budget watchdog (.issflow/hooks/context-guard.js, PreToolUse hook). '
271
291
  + 'window 0 = auto-detect from the model id (200000 for standard models). '
272
- + 'Some 1M-context models report their id WITHOUT a [1m] tag, so auto-detect '
273
- + 'assumes 200000 and may false-gate around 156k — if you run a 1M model, set '
274
- + 'window:1000000 here by hand. warnPct = soft non-blocking nudge; gatePct = hard '
275
- + 'block on NEW build work (Edit/Write to SOURCE files). Checkpoint paths '
276
- + '(docs/**, STATE/ISSUES/snapshots) and all Bash are never blocked; Task '
277
- + 'delegation is never gated (a subagent isolates noise and shrinks context).',
292
+ + 'warnPct soft nudge; gatePct hard block on NEW source Edit/Write. Prefer '
293
+ + '/synthesize + /clear (keep delivery:) over compact near gate. Checkpoint '
294
+ + 'docs/** never gated.',
295
+ },
296
+ delivery: {
297
+ staleAfterHours: 24,
298
+ phaseHours: { S: 2, M: 4, L: 8, XL: 16 },
299
+ assumptionBudgetPerPhase: 3,
300
+ _note: 'Agent-active ETA uses phaseHours by size. Waiting-on-human pauses ETA; '
301
+ + 'after staleAfterHours → WAITING_STALE.',
278
302
  },
279
303
  sprint: {
280
304
  defaultCapacity: 8,
281
- _note: 'Sprint layer (/sprint). defaultCapacity = points committed to the FIRST '
282
- + 'sprint before any velocity history exists; later sprints size to the rolling '
283
- + 'completed-velocity average. Optional — /sprint falls back to 8 if absent.',
305
+ _note: 'Sprint layer (/sprint). defaultCapacity = points for first sprint.',
284
306
  },
285
307
  }, null, 2) + '\n';
286
308
  }
@@ -331,10 +353,15 @@ function main() {
331
353
  const gi = path.join(CWD, '.gitignore');
332
354
  if (fs.existsSync(gi)) {
333
355
  const txt = fs.readFileSync(gi, 'utf8');
334
- if (/^\.issflow\/\*\s*$/m.test(txt) && !txt.includes('!.issflow/agents/')) {
335
- const block = '\n# iStartSoftFlow workflow — track as project config\n!.issflow/agents/\n!.issflow/commands/\n!.issflow/skills/\n!.issflow/hooks/\n!.issflow/istartsoft-flow/\n';
336
- log(' + .gitignore: un-ignore .issflow workflow dirs');
337
- if (!DRY) fs.appendFileSync(gi, block);
356
+ if (/^\.issflow\/\*\s*$/m.test(txt)) {
357
+ const tracked = ['agents', 'commands', 'skills', 'hooks', 'runtime', 'routing', 'models', 'scripts', 'templates', 'istartsoft-flow'];
358
+ const lines = new Set(txt.split(/\r?\n/).map(line => line.trim()));
359
+ const missing = tracked.map(dir => `!.issflow/${dir}/`).filter(line => !lines.has(line));
360
+ if (missing.length) {
361
+ const block = '\n# iStartSoftFlow workflow — track as project config\n' + missing.join('\n') + '\n';
362
+ log(' + .gitignore: un-ignore missing .issflow workflow dirs');
363
+ if (!DRY) fs.appendFileSync(gi, block);
364
+ }
338
365
  }
339
366
  }
340
367
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-issflow",
3
- "version": "1.10.1",
3
+ "version": "1.12.0",
4
4
  "description": "Scaffold the iStartSoftFlow AI-coding workflow into a project. Stack-agnostic, tool-agnostic (Claude Code, Codex, Cursor, Gemini, Aider), non-destructive.",
5
5
  "bin": {
6
6
  "create-issflow": "bin/cli.js"
@@ -12,12 +12,15 @@ This directory is the **portable workflow kit** (tool-agnostic). Every
12
12
 
13
13
  | Path | What |
14
14
  |------|------|
15
- | `agents/` | Fresh-context workers (planner, researcher, implementer, …) |
15
+ | `agents/` | Role definitions (isolated workers only where the host supports them) |
16
16
  | `commands/` | Procedures — Default: `/overview` `/feature` `/quick`; Advanced: `/propose` `/design` `/support` … |
17
17
  | `skills/` | On-demand cookbooks (ux-design, ui-ux-pro-max, security, support-triage, …) |
18
18
  | `hooks/` | Lifecycle enforcement scripts |
19
19
  | `istartsoft-flow/` | METHODOLOGY.md — every hard rule lives here once |
20
- | `templates/` | Proposal / UX pack / architecture / CR / FEATURE / automation |
20
+ | `templates/` | Proposal / UX pack / architecture / CR / FEATURE / design picker · platforms |
21
+ | `models/` | MODEL-MATRIX.md — cross-host model guidance (aliases stay haiku/sonnet/opus) |
22
+ | `routing/` | Advisory model router (fail-closed) |
23
+ | `scripts/` | Portable helpers (e.g. token-lint.js) |
21
24
 
22
25
  ## Claude Code only
23
26
 
@@ -34,3 +37,6 @@ Do **not** duplicate METHODOLOGY rules into other files (anti-drift).
34
37
  Do **not** put personal rate cards in this kit.
35
38
 
36
39
  Installer: `npx create-issflow` (omit `--tool` = all adapters).
40
+
41
+ Local task checkpoints: [runtime/README.md](runtime/README.md).
42
+ Host capabilities and smoke checks: [runtime/HOSTS.md](runtime/HOSTS.md).
@@ -7,7 +7,10 @@ model: inherit
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 into an ordered phase plan. Write only the
11
+ assigned plan artifact: `docs/plans/PLAN-<id>.md` for new scoped work, or
12
+ `docs/PLAN.md` for a deliberate legacy workflow. Follow Plan-scoped approvals;
13
+ never mutate an approved revision for execution progress or self-approve it.
11
14
 
12
15
  Hard rules:
13
16
  - PHASE 0 = INFRA, and it is CONDITIONAL on the infra declared in OVERVIEW.md:
@@ -60,7 +63,9 @@ MUST contain a deployment task block:
60
63
 
61
64
  ```
62
65
  This is non-negotiable. Deployment is always in the last phase, never a separate
63
- phase of its own, and never omitted.
66
+ phase of its own, and never omitted. This plans deployment; it does not authorize
67
+ execution. Explicit release authorization and required checks must precede deploy.
68
+ Until then, record deployment pending in execution state, never invent success.
64
69
 
65
70
  docs/PLAN.md format:
66
71
  ```
@@ -79,7 +84,7 @@ token unambiguously. Do not put prose containing the word `approved` after a
79
84
 
80
85
  ## Sprint 1: <name> [goal: <one-line user-visible increment>] ← sprint headers optional; group a few phases
81
86
 
82
- ## Phase 1: <name> [5 pts] [status: pending]
87
+ ## Phase 1: <name> [5 pts] [size: S|M|L|XL] [lane: lite|full] [status: pending]
83
88
 
84
89
  - slice: <what works end-to-end after this phase>
85
90
  - rationale: <why this slice, why now — the user / business value (from the PRD)>
@@ -88,11 +93,16 @@ token unambiguously. Do not put prose containing the word `approved` after a
88
93
  - acceptance (sharp, testable):
89
94
  - GIVEN <state> WHEN <action with concrete input> THEN <exact observable output>
90
95
  - edge/negative: <input> -> <expected handling>
96
+ - (UI) task check: primary user completes the job without guessing
91
97
  - impl notes: <constraints, gotchas, patterns to follow — so the implementer needs no extra digging>
92
98
  - qa focus: <what the tests must especially probe — abuse / edge cases>
93
99
  - external: <service name, or “none”>
94
100
  …
95
101
 
102
+ Plan-Ready (orchestrator checks before human approve): every phase has testable
103
+ acceptance · no TBD on auth/money/PII/primary surfaces · size+lane set · UI phases
104
+ reference screen IDs or locked direction · dependencies clear.
105
+
96
106
  ## Phase N: <name — final code phase> [status: pending]
97
107
 
98
108
  - slice: <what works + app is deployed and reachable>
@@ -17,14 +17,19 @@ Do NOT touch docs/ENDPOINTS.md — owned by implementer.
17
17
  ## Standard tasks (every phase — do all, in order)
18
18
 
19
19
  1. STATE.md — rewrite, do not append. Keep ONLY:
20
- - current phase + status
20
+ - current phase + status + stage
21
21
  - what was just completed (1-3 bullets)
22
22
  - the immediate next action
23
23
  - any open blocker
24
24
  PRESERVE verbatim (never blank on rewrite): the `plan:` line (the PLAN-APPROVAL
25
- sign-off record, hard rule 13) and the `sprint:` line (active-sprint marker) if
26
- present — load-bearing gate/standup state, not transient progress.
27
- Target: under 25 lines.
25
+ sign-off record, hard rule 13), the `sprint:` line if present, **and the entire
26
+ `delivery:` block** (agent_eta / status / waiting_* / slip) — load-bearing for
27
+ finish-date honesty. Also preserve `design-direction:`, `design:`, `architecture:`,
28
+ `surfaces:`, `timezone:` when present.
29
+ Preserve all active and parked lane checkpoints, approval digests, branch/base,
30
+ evidence paths/results, attempt counts and remaining budgets, or verified links
31
+ to their durable execution records. Never reset counters or erase blocked lanes.
32
+ Target: under ~30 lines including delivery; correctness beats this size target.
28
33
 
29
34
  2. ISSUES.md — dedup + compress:
30
35
  - merge duplicate / near-duplicate issues.
@@ -35,14 +40,17 @@ Do NOT touch docs/ENDPOINTS.md — owned by implementer.
35
40
  3. docs/.snapshots/ — delete precompact snapshots older than the newest 3.
36
41
 
37
42
  4. Append a single dated line to docs/HISTORY.md:
38
- `YYYY-MM-DD phase <n> done - <one line>`
43
+ `YYYY-MM-DD phase <n> <verified status> - <one line>`
44
+ Use done only when all required gates and deployment obligations are verified.
39
45
 
40
46
  ---
41
47
 
42
48
  ## Final-phase extended pass
43
49
 
44
50
  The orchestrator will tell you when this is the final phase (no further pending
45
- phases remain in PLAN.md). When told, ALSO do:
51
+ phases remain in the reconciled execution state). When told, ALSO do:
52
+ Never infer completion from being the last phase. If required gates or deployment
53
+ remain pending/blocked, describe that actual status instead of the done template.
46
54
 
47
55
  5. Update docs/OVERVIEW.md — append a "## Final state" section:
48
56
  ```
@@ -62,7 +70,8 @@ vs the original estimate (PROPOSAL.md v1 total → final total after approved CR
62
70
  This is the client closeout — the one-page record of the whole engagement.
63
71
  6. Update README.md (the project-level README, not the iStartSoftFlow README) — if a
64
72
  project README exists at the repo root, update or append:
65
- - Current status: "Production — deployed at <URL>"
73
+ - Current status: verified implementation/release status. Use "Production — deployed
74
+ at <URL>" only with observed successful deployment evidence; never invent a URL.
66
75
  - Brief description of what was built (from OVERVIEW.md summary)
67
76
  - Link to docs/ENDPOINTS.md for the API surface
68
77
  If no project README exists, note this in the return and skip.
@@ -76,6 +85,6 @@ SYNTHESIZED
76
85
  - ISSUES.md: <old> -> <new>, merged <k>, archived <m>
77
86
  - snapshots pruned: <count>
78
87
  - final pass: <yes — OVERVIEW.md + README.md updated | no>
79
- - safe to /clear: yes
88
+ - safe to reset context: <yes only if all checkpoints are durable | no — reason>
80
89
 
81
90
  ```
@@ -38,12 +38,18 @@ Also classify commercial lane:
38
38
  `/support` or `/quick` — not a billable CR unless the client expands scope.
39
39
  - **Billable CR** → continue below.
40
40
 
41
+ **No full grill-me.** If the change hits surfaces / auth / UX / architecture:
42
+ ask **1–3 mini questions** (brief-back with recommended answers), then continue.
43
+ Deep design re-lock happens later via `/design` if rule 15 reopens.
44
+
41
45
  ## STEP 2 — IMPACT ANALYSIS
42
46
  Determine:
43
47
  - phases affected — **done phases are frozen** (their cost is already spent and
44
48
  counts); new / changed phases; cut phases (credit back the un-started effort).
45
49
  - knock-on effects — architecture, **UX pack**, **security (re-threat-model?)**,
46
- tests, timeline. If UX or arch artifacts change, those gates re-open (rule 15).
50
+ tests, timeline, **design-direction / tokens**. If UX or arch artifacts change,
51
+ those gates re-open (rule 15). If direction must change, reset
52
+ `design-direction:` to PENDING (re-picker).
47
53
  - dispatch `researcher` (DESIGN or IMPL) if the change needs grounding in facts.
48
54
 
49
55
  ## STEP 3 — RE-ESTIMATE (the DELTA only)
@@ -52,10 +58,12 @@ Determine:
52
58
  estimate memo or chat-recorded answers.
53
59
  - If rate / contingency is missing → **ASK once** (same rule as `/propose`). Never
54
60
  invent a kit default rate; never commit personal rates into public kit files.
61
+ - Report **two deltas** in chat: scope_effort Δ (axis A, drives money) and
62
+ agent_delivery Δ (axis B, calendar when AI may work). Price uses A only.
55
63
  - added effort × rate = added cost; cut effort = credit.
56
64
  - **net cost Δ** + **new total** vs the approved baseline — as a range.
57
65
  - Show rate math **in chat to the human only**.
58
- - **timeline Δ**. State what stays the SAME so the client sees the price is fair.
66
+ - **timeline Δ** (B agent_delivery + human-gate buffer + new `demo_by`). Refresh STATE `delivery:` if mid-build. State what stays the SAME so the client sees the price is fair.
59
67
 
60
68
  ### CLIENT-DOC RULE
61
69
  Anything the client sees (CR summary, updated PROPOSAL.md / proposal.html) shows
@@ -1,5 +1,5 @@
1
1
  ---
2
- description: Post-proposal DESIGN + ARCHITECTURE gates — produce UX pack and architecture note, stop for human approve before /phase (hard rule 15).
2
+ description: Post-proposal DESIGN + ARCHITECTURE gates — upgrade locked direction into UX pack + architecture, stop for human approve before /phase (hard rule 15).
3
3
  argument-hint: [optional: "ux" | "arch" | "both" · "dry-run"]
4
4
  ---
5
5
 
@@ -14,44 +14,59 @@ DRY-RUN: if `$ARGUMENTS` contains `dry-run`/`--dry-run`, outline what you'd writ
14
14
  and STOP. Write nothing.
15
15
 
16
16
  ## PRE-FLIGHT
17
- - Read `docs/OVERVIEW.md`, `docs/PLAN.md`, `docs/PROPOSAL.md` (if any), `docs/STATE.md`.
17
+ - Read `docs/OVERVIEW.md`, `docs/PLAN.md`, `docs/PROPOSAL.md` (if any), `docs/STATE.md`,
18
+ `docs/design/DIRECTION.md`, `docs/design/tokens.css`.
18
19
  - PLAN must be approved (rule 13). If a proposal exists for quoted work, it should
19
20
  be signed off first (`/propose`) — otherwise warn and confirm they want design
20
21
  gates without a commercial proposal (internal projects may skip `/propose` and
21
22
  still run `/design`, or skip rule 15 entirely when STATE has `design: n/a` and
22
23
  `architecture: n/a` set deliberately for non-quoted work).
24
+ - **Direction:** if UI in scope and `design-direction` is not locked → STOP; run
25
+ overview Direction Picker first. If locked → **do not** re-run `ui-ux-pro-max`
26
+ restyle unless the human explicitly asks to change look (then re-approve).
23
27
 
24
28
  Target: `$ARGUMENTS` → `ux` | `arch` | `both` (default **both**).
25
29
 
30
+ ## Design scale (pick one; say it out loud)
31
+
32
+ | Scale | When | Artifact depth |
33
+ |-------|------|----------------|
34
+ | Spike | Feasibility only | Short answer — no UX-PACK |
35
+ | Bounded | Small change to existing UI | Short design in chat or thin UX-PACK + approve |
36
+ | Architectural | New product / subsystem / auth boundary / multi-surface | Full UX-PACK(s) + ARCHITECTURE |
37
+
26
38
  ## STEP 1 — UX PACK (if ux|both)
27
- 1. Apply `ui-ux-pro-max` (visual direction): run the kit engine
28
- `.issflow/skills/ui-ux-pro-max/scripts/search.py --design-system` from
29
- OVERVIEW product + industry. Fold into UX-PACK tokens — do not create a
30
- parallel `design-system/` SoT. If Python 3 is missing, ask me to install it
31
- (do not install tools yourself).
32
- 2. Apply `ux-design` skill (authoring mode): wireframe baseline + cookbook direction.
33
- Catalogue output must still pass the cookbook (tokens, a11y, no emoji icons).
34
- 3. Scaffold or update `docs/UX-PACK.md` from `.issflow/templates/UX-PACK-template.md`.
35
- 4. Fill flows, screen inventory, tokens/frame, a11y notes from OVERVIEW + PLAN.
36
- 5. SHOW me UX-PACK.md. **STOP for approval.**
37
- 6. On approve: stamp `> Approval: approved <date> v<n>`; set `design: approved <date>`
39
+ 1. Scaffold or update `docs/UX-PACK.md` from `.issflow/templates/UX-PACK-template.md`.
40
+ 2. Fold **locked** DIRECTION + tokens — do not invent a second palette.
41
+ 3. Apply `ux-design` skill (authoring): wireframe baseline + cookbook. Screen inventory
42
+ must use stable IDs from propose appendix when present.
43
+ 4. Per primary screen: goal, primary CTA, empty/loading/error, <SM and ≥MD notes.
44
+ 5. If `surfaces` includes more than web: add `docs/design/<surface>/` notes (PWA /
45
+ line-oa / mobile packs — see templates under `.issflow/templates/design/platforms/`).
46
+ 6. Update `docs/design/inventory.md` — reuse only listed components.
47
+ 7. SHOW me UX-PACK.md. **STOP for approval.**
48
+ 8. On approve: stamp `> Approval: approved <date> v<n>`; set `design: approved <date>`
38
49
  in STATE.md; HISTORY line `design v<n> approved`.
39
- 7. On change request: revise and re-show; header stays PENDING.
50
+ 9. On change request: revise and re-show; header stays PENDING.
51
+ 10. Quoted + UI: after approve, **regenerate** `docs/proposal.html` screen sheets from
52
+ the same screen IDs + tokens so the PDF matches what will be built.
40
53
 
41
54
  ## STEP 2 — ARCHITECTURE (if arch|both)
42
55
  1. Dispatch `researcher` (DESIGN) only if open unknowns remain; else use OVERVIEW.
43
56
  2. Scaffold or update `docs/ARCHITECTURE.md` from
44
57
  `.issflow/templates/ARCHITECTURE-template.md`.
45
- 3. Apply `code-standards` architecture guidance; security trust boundaries via
58
+ 3. Include **Auth decision record** when users/login exist (provider, session model,
59
+ identity linking, roles) — grill briefly if still open.
60
+ 4. Apply `code-standards` architecture guidance; security trust boundaries via
46
61
  `security` skill when relevant.
47
- 4. SHOW me ARCHITECTURE.md. **STOP for approval.**
48
- 5. On approve: stamp header; set `architecture: approved <date>` in STATE.md;
62
+ 5. SHOW me ARCHITECTURE.md. **STOP for approval.**
63
+ 6. On approve: stamp header; set `architecture: approved <date>` in STATE.md;
49
64
  HISTORY line `architecture v<n> approved`. Optionally `/log-decision` for
50
65
  material pattern choices.
51
- 6. On change request: revise and re-show.
66
+ 7. On change request: revise and re-show.
52
67
 
53
68
  ## STEP 3 — HANDOFF
54
69
  When both required gates are approved (or N/A for internal skip):
55
70
  - Tell me `/phase` is unblocked for rule 15.
56
- - Reminder: frontend phases still run the `ux-design` CLOSE check (rule 9);
57
- architecture drift still needs `/log-decision` (rule 8).
71
+ - Reminder: frontend phases still run the `ux-design` CLOSE check (rule 9) + task
72
+ check; architecture drift still needs `/log-decision` (rule 8).
@@ -4,7 +4,13 @@ argument-hint: [path to Feature doc, e.g. docs/features/<slug>/FEATURE.md · "dr
4
4
  ---
5
5
 
6
6
  Caveman ULTRA mode. You are the ORCHESTRATOR. Route work to subagents —
7
- you do NOT implement or debug yourself. Subagents cannot talk to the user; only YOU can.
7
+ use native isolated workers when available; otherwise use sequential role passes
8
+ per METHODOLOGY → Host capabilities and continuity. Only YOU report to the user.
9
+ Speak PM-style (ETA / stage / WAITING / DONE).
10
+
11
+ Before build slices: set STATE `delivery:` agent_eta from phase sizes; update
12
+ stage lines; on human gates set WAITING_ON_HUMAN + waiting_since + stale_after.
13
+ UI work must respect `docs/design/tokens.css` + inventory when present.
8
14
 
9
15
  Target doc: $ARGUMENTS (default: the single `docs/features/*/FEATURE.md` whose
10
16
  `> Status:` reads `approved, pending` — zero or multiple candidates -> STOP and list them.)
@@ -28,7 +34,8 @@ Target doc: $ARGUMENTS (default: the single `docs/features/*/FEATURE.md` whose
28
34
  HEADLESS DETECT: env `ISSFLOW_HEADLESS=1` (set by the CI workflow / Docker runner)
29
35
  means NO human is available this run. Every hard-stop below then degrades to:
30
36
  write the blocker to `docs/features/<slug>/BLOCKED.md` + mark the gate `parked`
31
- + EXIT cleanly with a report. Never guess through a hard-stop.
37
+ + return this lane as blocked with a report. A goal driver may continue independent
38
+ approved units; a standalone feature run exits. Never guess through a hard-stop.
32
39
 
33
40
  ---
34
41
 
@@ -51,12 +58,16 @@ b. APPROVAL GATE (the ONE human gate at entry): the Feature doc must carry a hea
51
58
  ```
52
59
  Missing/PENDING -> HARD-STOP: a human approves the DOC, not the run (need a doc?
53
60
  `/feature new <name>` scaffolds `.issflow/templates/FEATURE-template.md`). Doc approval
54
- is the rule-13 sign-off *scoped to this doc only* — the mini-plan it produces
55
- inherits approval as long as it stays inside the doc's stated scope.
61
+ confirms intake *scoped to this doc only*. Also apply METHODOLOGY → Plan-scoped
62
+ approvals: verify the active plan revision/digest and file boundaries before
63
+ implementation. A feature header does not override a missing or invalid plan
64
+ approval. Routine breakdown within the approved plan needs no new confirmation.
56
65
 
57
66
  c. WORKSPACE: slug = kebab-case of the doc's title. Ensure
58
67
  `docs/features/<slug>/FEATURE.md` (move the doc there if given elsewhere).
59
- Write `docs/features/<slug>/GATES.md` — the gate checklist, all unchecked:
68
+ On a new run, write `docs/features/<slug>/GATES.md`, all unchecked. On resume,
69
+ reconcile the existing checklist with actual diff/test evidence, approval,
70
+ and saved attempts; do not erase progress or trust stale checkmarks:
60
71
  ```
61
72
  # GATES — <slug>
62
73
  - [ ] spec-complete
@@ -86,9 +97,10 @@ d. STATE + BRANCH: `docs/STATE.md` gets `feature: <slug> (active)`. Work on
86
97
 
87
98
  Dispatch `researcher` (IMPL mode) scoped to the doc: which modules/files the
88
99
  feature touches, which dependencies + versions are involved, what the doc leaves
89
- unstated. Fill every gap with the most reasonable interpretation and log each one
90
- under `## Assumptions` in FEATURE.md (AUTO decision protocol — decide + log +
91
- continue). Check gate `spec-complete`.
100
+ unstated. Resolve routine details within approved scope and record assumptions
101
+ in execution notes (not an approval-hashed artifact). Material requirement gaps
102
+ require approval. Continue without re-confirming routine choices. Check gate
103
+ `spec-complete` only when the specification is sufficient.
92
104
 
93
105
  ## 2. ADVERSARIAL DOC-REVIEW (before planning)
94
106
 
@@ -99,7 +111,8 @@ Dispatch TWO reviewers in parallel, each told to ATTACK the doc, not summarize i
99
111
  data store, money, PII)? If yes, threat-model it now (`security` skill) and fold
100
112
  abuse cases into the acceptance criteria as negative cases.
101
113
 
102
- Merge findings into FEATURE.md `## Acceptance criteria` (positive + negative).
114
+ Record findings and derived test cases in execution notes. Do not silently
115
+ rewrite approved acceptance criteria; material changes require renewed approval.
103
116
  Internally CONTRADICTORY spec -> HARD-STOP (methodology hard-stop 3). Merely
104
117
  incomplete -> fill + log. Check gate `adversarial-doc-review`.
105
118
 
@@ -130,13 +143,16 @@ For each slice in `docs/features/<slug>/PLAN.md`, in order:
130
143
  implementation) -> GREEN (`implementer`) -> e2e (`e2e-runner`) when the slice has
131
144
  a user-facing flow. Non-TDD slice: IMPLEMENT -> TEST.
132
145
  - Debug circuit breaker: WARN at 2, cap 3, `/unstuck` once per slice; still stuck
133
- -> park the slice (BLOCKED in the feature PLAN) + continue to the next
146
+ -> park the slice (BLOCKED in execution state) + continue to the next
134
147
  independent slice. Blockers batch-report at the end, never mid-flow.
135
148
  - Rule 11 (secure coding + SAST/SCA/secrets) and rule 12 (lint/format/naming/
136
149
  architecture) apply per slice as in `/phase`.
137
150
  - `implementer` updates `docs/ENDPOINTS.md` as surfaces land.
138
151
 
139
152
  All slices done + full feature suite green -> check gate `build-green`.
153
+ If required slices remain blocked, keep this gate unchecked. Independent review,
154
+ documentation, and test-plan preparation may continue, but delivery and done status
155
+ remain blocked. Checkpoint evidence, attempts, and next actions after each step.
140
156
 
141
157
  ## 6. REVIEW & HARDEN (adversarial + self-review)
142
158
 
@@ -169,7 +185,7 @@ a. Documentation update: `docs/ENDPOINTS.md` final pass; README/docs deltas the
169
185
  b. Token stamp — append to FEATURE.md:
170
186
  ```
171
187
  ## Token stamp
172
- context: ~<pct>% of window · subagents: <n> · slices: <n> · debug rounds: <n>
188
+ context: <observed value or unavailable> · subagents: <actual n> · slices: <n> · debug rounds: <n>
173
189
  ```
174
190
  Check gate `token-stamp`.
175
191
  c. Summary — append to FEATURE.md `## Summary`: what shipped, assumptions made,
@@ -179,11 +195,15 @@ d. Memory update — append wisdom candidates (resolved issues, reusable finding
179
195
  to `docs/WISDOM-QUEUE.md`. The QUEUE is local + automatic; pushing to the
180
196
  shared KB stays human (`/store-wisdom` reads the queue). Check gate `memory-queued`.
181
197
 
182
- Then: STATE.md -> `feature: <slug> (done)`.
198
+ Only when every required gate is verified: STATE.md -> `feature: <slug> (done)`.
199
+ Otherwise preserve parked/pending status and report exactly what remains unverified.
183
200
 
184
201
  ## 9. DELIVERY
185
202
 
186
- Commit the feature branch (clear message per slice or one squashed commit).
203
+ Only deliver after required gates pass. Commit the feature branch only when
204
+ allowed by the user's scope (clear message per slice or one squashed commit).
205
+ A no-commit/no-push instruction overrides delivery defaults. An Automation header
206
+ must reflect actual human consent, never an agent-authored permission upgrade.
187
207
  Then by the doc's `> Automation:` header:
188
208
  - `none` (default) -> STOP here. Show the human: branch name, summary, TEST-PLAN
189
209
  path. Push is theirs (methodology hard-stop 1).
@@ -38,25 +38,34 @@ and STOPS. `/goal set` always stops at the confirmation gate anyway.
38
38
 
39
39
  LOOP — repeat until a stop condition:
40
40
  1. PICK the next actionable unit, in this order:
41
- a. an in-progress unit in STATE (finish what is started)
41
+ a. an in-progress, unblocked unit in STATE (finish what is started)
42
42
  b. an APPROVED, pending `docs/features/*/FEATURE.md` that advances the goal
43
43
  c. the next pending PLAN phase that advances the goal (plan must be approved — rule 13)
44
44
  d. an open ISSUES.md item inside the goal's scope (route `/quick` or `/feature`)
45
- Nothing actionable -> report + stop.
45
+ Select only units with verified dependencies and applicable plan approval.
46
+ Skip parked units and their dependents; do not re-pick them without new evidence.
47
+ Nothing actionable -> report + checkpoint + stop.
46
48
  2. ROUTE it through the lane-routing table (`/feature` · `/phase` · `/quick`).
47
49
  The lane runs with ALL its own gates — the goal layer never bypasses one.
48
- 3. TICK: append one line under the goal (`- [x] <unit> — <lane> — <result>`),
49
- decrement budget, update STATE (`goal: G<n> (active — <units left>)`).
50
+ 3. TICK: record status + evidence under the goal. Use `[x]` only for verified done;
51
+ record blocked/pending/not-run explicitly. Each attempted unit consumes budget,
52
+ including a parked unit. Persist remaining budget and retry counts; resuming
53
+ the same run does not reset them. Update STATE with the exact next action.
50
54
  4. CHECK "Done when". Met -> mark `[done]`, STATE `goal: G<n> (done)`, final
51
55
  report (units shipped · parked blockers · budget used). Not met -> loop.
52
56
 
53
- STOP conditions (whichever first): Done-when met · budget spent · a lane
54
- hard-stop (surface it; headless: `BLOCKED.md` + clean exit) · nothing actionable.
57
+ STOP conditions (whichever first): verified Done-when met · budget spent ·
58
+ no independent approved unit actionable · a run-wide safety/approval blocker.
59
+ A lane hard-stop parks that unit and its dependents; record its blocker (headless:
60
+ `BLOCKED.md`), then continue independent authorized units within budget.
61
+ On resume, reconcile checkpoints, approvals, and the worktree per the methodology.
62
+ A blocked required unit prevents claiming the goal complete.
55
63
  Every stop produces ONE consolidated report — never a silent end.
56
64
 
57
65
  ## /goal status · /goal done <id> · /goal drop <id>
58
66
 
59
- Show goals + progress ticks · force-close (human says it's done) · abandon
67
+ Show goals + progress ticks · administratively close (record the human request,
68
+ not fabricated passing evidence) · abandon
60
69
  (log why). Both edits keep the history lines — GOALS.md is append-style memory.
61
70
 
62
71
  ---
@@ -65,7 +74,7 @@ Show goals + progress ticks · force-close (human says it's done) · abandon
65
74
 
66
75
  `/goal run` is one pass: it works until done/blocked/budget. To keep pressure on
67
76
  a long goal, re-fire the pass on a schedule — host-level, not kit-level:
68
- - **Claude Code web/desktop**: `/loop 30m /goal run` — the host's interval loop
77
+ - **Claude hosts with a verified `/loop` capability**: `/loop 30m /goal run` — the host's interval loop
69
78
  re-invokes the pass; the goal layer supplies the state + finish line that a
70
79
  bare interval loop lacks (it stops itself when Done-when is met).
71
80
  - **CI (headless)**: `create-issflow --ci` also installs