create-issflow 1.11.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.
@@ -50,7 +50,9 @@ velocity table). Create `docs/sprints/` if absent. STATE.md carries the active s
50
50
  =====================================================================
51
51
  ## §1 — SPRINT PLANNING (ceremony)
52
52
 
53
- Pre: `docs/PLAN.md` exists AND its `> Approval:` header reads `approved …` (the
53
+ Pre: verify the active plan revision/digest and allowed paths per METHODOLOGY →
54
+ Plan-scoped approvals. For legacy plans only, `docs/PLAN.md` exists AND its
55
+ `> Approval:` header reads `approved …` (the
54
56
  PLAN-APPROVAL gate, hard rule 13). Still `PENDING` / missing → STOP, route to the
55
57
  `/overview` plan-approval gate. A sprint only SLICES an already-signed-off plan.
56
58
 
@@ -58,7 +60,7 @@ a. **Estimate (one-time, lazy).** Every pending PLAN phase needs a points estima
58
60
  (Fibonacci `1 2 3 5 8`, relative effort from the phase `slice` + `acceptance`
59
61
  size; a phase that feels `>8` is too big — note it for `/replan` to split). If the
60
62
  planner already wrote `[N pts]` tags, reuse them; otherwise assign now and write
61
- them back into PLAN.md next to each phase header.
63
+ them into the sprint artifact, leaving the approved plan unchanged.
62
64
 
63
65
  b. **Capacity.** Read `docs/sprints/VELOCITY.md`.
64
66
  - Have history → capacity = rolling-average completed velocity (last ≤3 sprints).
@@ -73,7 +75,8 @@ c. **Commit.** Walk the PLAN in dependency order, pull pending phases into this
73
75
 
74
76
  d. **Write** `docs/sprints/sprint-<n>.md` from the template below; set
75
77
  `status: active`; seed the burndown tick 0 = total committed points. Group the
76
- committed phases under a `## Sprint <n>` header in PLAN.md if not already grouped.
78
+ committed phases in the sprint artifact, referencing the immutable approved
79
+ plan revision. Do not add sprint headers to approval-hashed PLAN content.
77
80
  Update STATE.md: `sprint: <n> (active)`.
78
81
 
79
82
  AUTO: auto-commit the computed backlog, log the goal + points + capacity, continue.
@@ -136,7 +139,8 @@ Inspect-and-adapt on the PROCESS, not the product. Write the `## Retro` block:
136
139
  - **estimate accuracy** — committed vs completed points; note phases that blew their
137
140
  estimate so the next sprint's poker is calibrated.
138
141
 
139
- AUTO: auto-apply the routed actions (log/replan) and continue. GUIDED: list actions,
142
+ AUTO: auto-apply in-scope logging/process actions and continue. A replan is a
143
+ proposal requiring the plan gate, not permission to change approved scope. GUIDED: list actions,
140
144
  confirm before applying.
141
145
 
142
146
  =====================================================================
@@ -156,11 +160,13 @@ d. Update STATE.md: clear the active sprint (or set the next one if `/sprint run
156
160
  =====================================================================
157
161
  ## §RUN — AUTO END-TO-END DRIVER (the headline: "do all the process automatically")
158
162
 
159
- `/sprint run [n]` drives one full sprint — or, if you keep going, every remaining
160
- sprint until the PLAN is exhausted — with NO human stop except a hard-stop:
163
+ `/sprint run [n]` drives the requested approved sprint scope. Continue across
164
+ sprints only when that scope was authorized. Establish finite unit/retry budgets
165
+ before execution using the methodology Execution contract; preserve them on resume.
166
+ Routine phase and ceremony boundaries need no new confirmation:
161
167
 
162
168
  ```
163
- loop while pending phases remain in PLAN.md:
169
+ loop while approved, dependency-ready units remain and run budget permits:
164
170
  1. §1 PLANNING → commit the next sprint from PLAN + velocity
165
171
  2. for each committed phase, in dependency order:
166
172
  run /phase <p> → the full build loop (its own gates + circuit breaker)
@@ -170,11 +176,14 @@ loop while pending phases remain in PLAN.md:
170
176
  3. §3 REVIEW → demo + boundary audits (fix blockers, re-audit)
171
177
  4. §4 RETRO → routed actions, applied
172
178
  5. §5 CLOSE → velocity + carry-forward + HISTORY
173
- 6. /synthesize → suggest /clear (token reset at the sprint boundary, like a phase)
174
- AUTO: start the next sprint automatically. GUIDED: stop, report, wait.
175
- HARD-STOP at any point: deploy/irreversible/outbound action, security-sensitive
176
- change, contradictory spec, or debug budget spent with no independent slice left →
177
- pause, surface the consolidated report, hand to the human.
179
+ 6. /synthesize → checkpoint evidence, attempts, remaining budget and next action
180
+ (reset context only with a supported host mechanism; preserve resume state)
181
+ AUTO: start the next sprint only within the authorized run scope and budget.
182
+ GUIDED: stop, report, wait.
183
+ HARD-STOP: park the affected action and its dependents; continue only safe,
184
+ independently approved work. Stop the run for exhausted budget, a run-wide blocker,
185
+ or no actionable units. Never recycle a blocked phase into the next sprint without
186
+ new evidence or a resolved prerequisite. Report partial completion truthfully.
178
187
  ```
179
188
 
180
189
  When the last PLAN phase is `accepted`, the build is sprint-complete → recommend
@@ -6,21 +6,25 @@ Caveman ULTRA mode.
6
6
 
7
7
  Trigger: end of a phase, or any time STATE.md / ISSUES.md feel bloated.
8
8
 
9
- Dispatch the `synthesizer` subagent.
9
+ Dispatch the `synthesizer` subagent when supported; otherwise run its checklist
10
+ sequentially per METHODOLOGY → Host capabilities and continuity. Preserve every
11
+ active/parked lane checkpoint, evidence record, approval digest, and retry budget.
10
12
 
11
13
  For a normal phase: it rewrites STATE.md, dedups ISSUES.md, prunes snapshots,
12
14
  appends to HISTORY.md.
13
15
 
14
16
  For the FINAL phase (no further pending phases): also pass the signal
15
17
  "FINAL PHASE" so the synthesizer runs the extended pass — updating OVERVIEW.md
16
- and README.md to reflect the completed project state.
18
+ and README.md to reflect the verified project state, including any pending
19
+ deployment or blocked work. Last phase does not imply completed project.
17
20
 
18
- To determine if this is the final phase: read docs/PLAN.md. If no phases remain
19
- with status "pending" after the current one, it is the final phase.
21
+ To determine if this is the final phase, reconcile the approved plan with execution
22
+ state. Do not edit approval-hashed plan content to track completion.
20
23
 
21
- When synthesizer returns "safe to /clear: yes", tell me:
24
+ When synthesizer confirms durable checkpoints are safe for a context reset, report:
22
25
  - before/after line counts
23
26
  - whether the final-pass ran
24
- - that I can now run /clear (or proceed to the endpoint summary if final phase)
27
+ - next action; under a goal/sprint driver, return control and continue approved work
28
+ - reset only if the host supports it and it is needed; otherwise use the checkpoint
25
29
 
26
30
  If it returns anything unsafe, show me what and stop.
@@ -18,12 +18,16 @@ const stamp = `${d.getFullYear()}${p2(d.getMonth() + 1)}${p2(d.getDate())}-${p2(
18
18
  const snap = path.join('docs/.snapshots', `precompact-${stamp}.md`);
19
19
 
20
20
  const state = read('docs/STATE.md');
21
+ const workflow = read('docs/WORKFLOW.json');
21
22
  const body = [
22
23
  `# Pre-compact snapshot ${stamp}`, '',
23
24
  '## Git',
24
25
  sh('git status --short').replace(/\n+$/, ''),
25
26
  sh('git diff --stat').replace(/\n+$/, ''),
26
27
  '',
28
+ '## Durable workflow checkpoint',
29
+ workflow === null ? '(no docs/WORKFLOW.json)' : 'Resume from docs/WORKFLOW.json; reconcile running tasks before retrying. This snapshot is not an approval or a replacement checkpoint.',
30
+ '',
27
31
  '## STATE.md at compact time',
28
32
  state !== null ? state.replace(/\n$/, '') : '(no STATE.md)',
29
33
  '',
@@ -16,7 +16,8 @@ const sh = (cmd) => { try { return execSync(cmd, { encoding: 'utf8', stdio: ['ig
16
16
 
17
17
  let cfg = {};
18
18
  try { cfg = JSON.parse(read('.issflow/flow-config.json') || '{}'); } catch (_) {}
19
- const maxStateLines = (cfg.context && cfg.context.injectMaxLines) || 25;
19
+ const configuredLines = cfg.context && cfg.context.injectMaxLines;
20
+ const maxStateLines = Number.isInteger(configuredLines) ? Math.max(1, Math.min(100, configuredLines)) : 25;
20
21
  const staleHours = (cfg.delivery && cfg.delivery.staleAfterHours) || 24;
21
22
 
22
23
  // Resume/compact: keep inject tiny (Pattern 1 — skip heavy bodies)
@@ -42,7 +43,7 @@ if (!state) {
42
43
  } else {
43
44
  emit('## STATE (read first)');
44
45
  const lines = state.replace(/\n$/, '').split('\n');
45
- for (const l of lines.slice(0, maxStateLines)) emit(l);
46
+ for (const l of lines.slice(0, maxStateLines)) emit(l.slice(0, 500));
46
47
  if (lines.length > maxStateLines) emit(`… (+${lines.length - maxStateLines} more)`);
47
48
 
48
49
  // Delivery / WAITING_STALE nudge
@@ -66,6 +67,30 @@ if (!state) {
66
67
  }
67
68
  emit('');
68
69
 
70
+ // Durable workflow state is advisory: never auto-retry a running task after interruption.
71
+ const workflowFile = 'docs/WORKFLOW.json';
72
+ if (exists(workflowFile)) {
73
+ emit('## Autonomous workflow checkpoint');
74
+ try {
75
+ const workflow = require('../runtime/workflow.js');
76
+ const summary = workflow.status(workflowFile);
77
+ emit(JSON.stringify({ state: summary.state, revision: summary.revision,
78
+ budget: summary.budget, spent: summary.spent, remaining: summary.remaining,
79
+ runnable: summary.runnable.slice(0, 10), totalTasks: summary.tasks.length }));
80
+ const unfinished = summary.tasks.filter(task => task.state !== 'done');
81
+ for (const task of unfinished.slice(0, 10)) {
82
+ emit(JSON.stringify({ id: task.id, state: task.state, attempts: task.attempts,
83
+ reason: task.reason.slice(0, 160), blockers: task.blockers.slice(0, 3) }));
84
+ }
85
+ emit(`Read ${workflowFile} for full task/evidence details (${unfinished.length} unfinished).`);
86
+ emit('Reconcile running work and its evidence before retrying; resume only within existing approval and budget.');
87
+ } catch (error) {
88
+ emit('Workflow checkpoint unreadable: ' + error.message + '. Preserve it; do not silently reset progress.');
89
+ }
90
+ emit('');
91
+ }
92
+
93
+
69
94
  if (!leanResume) {
70
95
  const issues = read('docs/ISSUES.md');
71
96
  let openCount = 0;
@@ -87,8 +112,8 @@ emit('## RULES');
87
112
  emit('- PM-mode: report ETA/stage/DONE|BLOCKED|WAITING|SLIP|HANDOFF — do not pair as junior dev.');
88
113
  emit('- Plan PENDING → no source edits (rule 13). Design-direction locked before UI propose.');
89
114
  emit('- Past agent_eta while AGENT_ACTIVE → SLIP report. Waiting human → eta_paused.');
90
- emit('- Assumption budget per phase (flow-config). End phase: /synthesize (keep delivery:) → /clear.');
91
- emit('- Prefer clear+handoff over compact near context gate.');
115
+ emit('- Assumption budget per phase (flow-config). End phase: checkpoint with /synthesize (keep delivery:); use only supported host reset tools.');
116
+ emit('- Prefer a supported reset plus saved handoff near the context gate.');
92
117
  emit('=== END Tier-A ===');
93
118
 
94
119
  process.stdout.write(out.join('\n') + '\n');
@@ -35,8 +35,10 @@
35
35
  Caveman ULTRA mode always on. Apply the `karpathy-guidelines` skill (engineering
36
36
  discipline) on every coding and debugging task. Apply the `ux-design` skill (the UX
37
37
  cookbook + wireframe baseline) on every UI-facing task. When **authoring** a new
38
- visual direction (`/design`, or no approved UX-PACK yet), apply `ui-ux-pro-max`
39
- first and fold the look into the UX pack — do not re-roll styles at phase CLOSE.
38
+ visual direction (the overview Direction Picker, or an explicitly approved
39
+ direction change), apply `ui-ux-pro-max` first and fold the look into locked
40
+ tokens + UX pack. A missing UX-PACK does not unlock an approved direction;
41
+ never re-roll styles at phase CLOSE.
40
42
  Apply the `security` skill (the Secure SDLC cookbook) at design (threat model),
41
43
  while coding (secure coding), and before any deploy. Apply the `code-standards`
42
44
  skill (naming per the language's own idiom + the declared architecture) on every
@@ -72,7 +74,8 @@ approval JSON is not cryptographic proof of the human approver. Require protecte
72
74
  branches, required CI checks, and an actual human GitHub PR review for merge.
73
75
  No tool can treat a self-edited approval file as owner authorization.
74
76
 
75
- **Recovery:** If approval metadata is missing or malformed, stop implementation.
77
+ **Recovery:** If approval metadata is missing or malformed, stop implementation
78
+ for that plan and its dependents; independent, separately approved work may continue.
76
79
  A human should inspect the plan, restore the correct pointer and approval record,
77
80
  then rerun verification. Never bypass the gate by editing `STATE.md` or disabling
78
81
  checks. A scoped feature lane does not inherit approval from another plan.
@@ -91,7 +94,8 @@ metadata and any required disclosures.
91
94
 
92
95
  `design-research -> grill (×2) -> plan -> implement -> test -> deploy`, one
93
96
  VERTICAL SLICE per phase. Implement AND test a phase before the next. The last
94
- phase always includes deployment.
97
+ phase always includes deployment preparation; deployment itself requires the
98
+ release authorization and checks below.
95
99
 
96
100
  A phase runs in one of two orders, chosen at RESEARCH time by the TDD
97
101
  APPLICABILITY check (see Procedures → `phase`):
@@ -256,7 +260,8 @@ Three layers make "hands-off" real — each uses the mechanism suited to its job
256
260
  model-run rituals.
257
261
  3. **No-human-at-the-keyboard → a headless runner.** `ISSFLOW_HEADLESS=1` tells the
258
262
  lane no human is present: every hard-stop degrades to a `BLOCKED.md` report +
259
- clean exit — never a guess. Two shipped runners (`create-issflow --ci|--docker`,
263
+ lane return/exit — never a guess; an enclosing goal can still run independent
264
+ approved units. Two shipped runners (`create-issflow --ci|--docker`,
260
265
  sources in `.issflow/templates/automation/`):
261
266
  - **GitHub Actions** — label an issue `feature:approved` (or dispatch with a doc
262
267
  path); the workflow runs the lane on an ephemeral runner.
@@ -272,12 +277,20 @@ Three layers make "hands-off" real — each uses the mechanism suited to its job
272
277
  features build in parallel without touching your checkout or each other
273
278
  (path-identical mounts: Linux/macOS).
274
279
 
275
- **Approval semantics (rule-13 scoped).** The doc header
276
- `> Approval: APPROVED <name> <date>` is the human sign-off, scoped to that doc
277
- only; the mini-plan inherits it while it stays inside the doc's stated scope —
278
- scope creep hard-stops to `/change-request`. The `> Automation: none|push|push+pr`
279
- header pre-authorizes outbound git actions for THAT run (hard-stop 1 satisfied by
280
- recorded consent). Merge and prod deploy can never be pre-authorized.
280
+ **Approval semantics (rule-13 scoped).** The Feature approval confirms intake
281
+ for that document only. Apply Plan-scoped approvals before implementation;
282
+ feature or goal headers never override an invalid revision/digest or path scope.
283
+ Derived execution notes may break down approved work, not silently expand it.
284
+ Scope creep returns to `/change-request` and the relevant approval gate.
285
+
286
+ **Publication mode:** `> Automation: none|push|push+pr` defaults to `none`.
287
+ `none` delivers local results only. `push` permits the specified feature branch
288
+ push; `push+pr` permits that push and opening its PR to the agreed target. Either
289
+ outbound mode requires explicit human authorization covering this run, repository,
290
+ branch, and destination; a header an agent writes is not consent. Respect later
291
+ restrictions, including no-commit/no-push. Never infer publication from AUTO,
292
+ headless mode, or implementation approval. Merge and production deployment remain
293
+ separate human release gates, never implied by these publication modes.
281
294
 
282
295
  -----
283
296
 
@@ -343,7 +356,8 @@ can. Escalation is at most two hops.
343
356
  - **synthesizer** — compresses `docs/STATE.md` / `docs/ISSUES.md`, prunes
344
357
  snapshots. On the final phase, also updates `README.md` + `docs/OVERVIEW.md`.
345
358
 
346
- The orchestrator ROUTES. It does not implement or debug.
359
+ The orchestrator ROUTES to isolated workers where supported. Otherwise use the
360
+ sequential role passes in Host capabilities and continuity; do not claim isolation.
347
361
 
348
362
  **Model routing (per-role tiers).** Each role's `.issflow/agents/<role>.md` pins a
349
363
  `model:` tier suited to its work, so the RIGHT model runs each task by default:
@@ -364,12 +378,17 @@ API IDs. Hosts without per-agent model support run the session model (graceful d
364
378
 
365
379
  Three clocks — do not mix:
366
380
 
367
- 1. **Scope effort (A)** — ideal-days for commercial value / pricing
368
- 2. **Agent-active ETA (B)** — when AI may finish DoD if not waiting on humans
381
+ 1. **Scope effort (A)** — ideal-days for commercial value / pricing
382
+ 2. **Agent-active ETA (B)** — when AI may finish DoD if not waiting on humans
369
383
  3. **Waiting-on-human (C)** — pauses B; `WAITING_STALE` after `staleAfterHours`
370
384
 
371
385
  STATE `delivery:` is mandatory during `/phase` and `/feature`. Past `agent_eta`
372
386
  while `AGENT_ACTIVE` → SLIP report. Assumption budget per phase from flow-config.
387
+ These are estimates and observed state updates, not background runtime guarantees.
388
+ Evaluate time changes at the next actual execution opportunity; never claim a timer,
389
+ heartbeat, or scheduler ran when the host did not provide it. A waiting/blocked
390
+ unit does not pause independent approved units: retain per-unit status and ETA.
391
+ Only mark a package DONE when every required unit and gate is verified.
373
392
 
374
393
  ### Plan-Ready (before rule 13 approve)
375
394
 
@@ -418,7 +437,8 @@ surface or need its own acceptance criteria? -> `/feature`. Otherwise `/quick`.
418
437
  verification. Headless-capable (CI / Docker, `ISSFLOW_HEADLESS=1`). See "Feature lane".
419
438
  - **goal [set|run|status|done|drop]** — the goal layer: declare an OUTCOME with a
420
439
  measurable Done-when + budget (`set`, behind the rule-14 brief-back), then
421
- `run` loops pick-next-unit → route lane → tick until done / budget / hard-stop.
440
+ `run` loops pick-next-unit → route lane → tick until done / budget / no ready
441
+ independent unit / run-wide hard-stop; local blockers park only their lane.
422
442
  Goal-driven, not time-driven: it stops itself on the finish line. Recurrence is
423
443
  host-level (interval loop or the cron-ready `issflow-goal.yml`). `docs/GOALS.md`
424
444
  holds state; its `Approved:` line arms headless passes.
@@ -512,13 +532,12 @@ The cheapest token is the one never loaded. The kit is built to minimise context
512
532
  - **SessionStart is Tier A** — git one-liner + STATE top + open-issue count +
513
533
  delivery ETA/WAITING nudge. Target a small inject; resume/compact stays leaner.
514
534
  - **Near context gate:** prefer writing handoff into STATE + `/synthesize` +
515
- `/clear` over `/compact` (cold compact is expensive). Soft warn ~55%; hard
516
- gate ~70% (see `flow-config.json`).
517
- - **Phase boundary is the primary reset.** `/synthesize -> /clear` ends every
518
- phase so the next one starts with a small, fresh context instead of carrying
519
- the whole history forward. Synthesizer must **preserve the `delivery:` block**
520
- in STATE. The **sprint boundary** (`/sprint close`) is a second,
521
- coarser reset — synthesize + clear there too before the next sprint plans.
535
+ host-supported reset over `/compact` where available. Use configured context
536
+ thresholds (`flow-config.json`), never invented telemetry or reset guarantees.
537
+ - **Phase boundary is the primary checkpoint.** Synthesize at each boundary;
538
+ reset context only if needed and supported by the host. Continue the approved
539
+ driver without routine confirmation. Preserve the `delivery:` block and all
540
+ active/parked execution records. Sprint close provides a coarser checkpoint.
522
541
  - **Lazy, not always-on.** This methodology + the skills load on demand; only the
523
542
  SessionStart hook output is paid every session, and it injects just the live
524
543
  STATE + *open* issues (resolved ones stay on disk for grep, not re-paid in tokens).
@@ -543,29 +562,35 @@ a recorded sign-off) stay interactive in both modes. AUTO governs only the **dev
543
562
  close): there, interruptions are expensive, so it follows the plan instead of asking.
544
563
 
545
564
  - **AUTO (default) — during DEVELOPMENT, follow the plan, don't interrupt.** Once a
546
- plan exists, the dev loop prefers DECIDING over asking. Resolve any in-process
565
+ plan is approved, the dev loop prefers DECIDING over asking. Resolve any in-process
547
566
  choice from (1) the PLAN/OVERVIEW/spec, (2) the codebase, (3) a sensible default +
548
567
  the worker's recommendation — then RECORD it (`docs/DESIGN_LOG.md` or STATE) and
549
568
  CONTINUE. Do not stop mid-build to ask.
550
569
  - **GUIDED — ask at each fork in dev too.** The original behaviour: the development
551
570
  loop also surfaces choices and waits. Use when exploring an unfamiliar codebase.
552
571
 
553
- **Decision protocol (AUTO, dev loop).** Incomplete acceptance spec → fill the gap
554
- with the most reasonable interpretation, log it as an Assumption, continue.
572
+ **Decision protocol (AUTO, dev loop).** Resolve routine implementation details
573
+ within the approved acceptance criteria, file boundaries, and risk limits; log
574
+ the interpretation as an Assumption and continue. Do not add requirements or
575
+ rewrite an approved plan to make a decision fit.
555
576
  Ambiguous TDD classification → apply the default (`TDD_PHASE=true`), log the reason,
556
577
  continue. A worker that would have asked the user instead writes its question + its
557
578
  own best answer to STATE and proceeds on that answer. (If the gap is in the PLAN
558
579
  itself — not just an implementation detail — that's a planning question: surface it.)
559
580
 
560
- **Batched escalation (AUTO).** Blockers never halt the whole run. On first stuck,
581
+ **Batched escalation (AUTO).** A local blocker does not halt independent work. On first stuck,
561
582
  auto-run `/unstuck` (deep re-research) — capped at ONCE per phase, since it is
562
- token-expensive. Still stuck → park the blocked slice (mark `BLOCKED` in PLAN), move
583
+ token-expensive; allow one fresh three-attempt debug cycle after it, never an
584
+ unbounded reset of the counter. Still stuck → park the blocked slice in execution
585
+ state (do not mutate the approved plan digest), move
563
586
  to the next independent slice, and surface ONE consolidated report of all parked
564
587
  blockers + logged assumptions at the phase boundary / end of run. The human reviews
565
588
  THERE (the `/re` checkpoint), not mid-flow.
566
589
 
567
- **Hard stops (BOTH modes — these always pause for a human).** Autonomy is for
568
- *development*, not for risk. Stop and get sign-off ONLY for:
590
+ **Hard stops (BOTH modes).** Pause the affected action and dependent work for
591
+ human input; continue only independently approved, safe work. Autonomy is for
592
+ *development*, not permission escalation. The gates above and host permission
593
+ policy still apply. Stop for:
569
594
  1. Irreversible or outbound actions — deploy to prod, data deletion/migration,
570
595
  `git push`, publish, spending money, sending external messages.
571
596
  2. Security-sensitive changes — auth, secrets, permissions, data exposure.
@@ -573,10 +598,76 @@ THERE (the `/re` checkpoint), not mid-flow.
573
598
  + log instead).
574
599
  4. The debug budget is spent AND no independent slice remains to make progress.
575
600
 
601
+ An existing explicit authorization covering the exact action satisfies a gate
602
+ only where that gate permits pre-approval. Never infer publish, push, deploy,
603
+ spend, or security permissions from AUTO or a general build request. Release,
604
+ UAT, and merge remain human gates. A security finding blocks affected completion
605
+ and release, not unrelated safe work.
606
+
576
607
  AUTO removes *questions*, not *discipline*: tests, the phase gate, issue logging,
577
608
  and the regression corpus all still run. The point is an efficient, end-to-end
578
609
  development run that follows the spec and logs every problem so it never recurs.
579
610
 
611
+
612
+ ### Execution contract (short tasks and long runs)
613
+
614
+ Use the smallest eligible lane. After its intake and approval gates, AUTO runs
615
+ implement → test → fix → verify without requesting approval for each routine
616
+ step. A short `/quick` still verifies; a long `/goal` or `/sprint` tracks units,
617
+ dependencies, and a finite run budget. A single `/phase` or `/feature` request
618
+ does not authorize unrelated work. Select only approved units whose dependencies
619
+ are verified done; never skip a failed prerequisite to keep busy.
620
+
621
+ Checkpoint after each meaningful step, before a context reset, and on interruption
622
+ or a blocker: task ID, plan revision/digest, branch and base commit, dependencies,
623
+ status, files changed, commands/results and evidence paths, attempt counts,
624
+ remaining run budget, blocker and exact next action. Keep execution progress
625
+ separate from immutable approved plan content. Optional local runtime checkpoints
626
+ are bookkeeping, not approval, test evidence, or a background execution service.
627
+
628
+ For a multi-unit run, the optional CLI is `node .issflow/runtime/workflow.js`.
629
+ See `.issflow/runtime/README.md` for validated input schemas. Use
630
+ `docs/WORKFLOW.json` when session-hook discovery is desired: `init` once from the
631
+ approved task breakdown, `next` to claim, `update` after actual work, and `status`
632
+ on resume. Each mutation persists state. The helper does not verify approval,
633
+ execute tasks, or attest tests; retain the detailed evidence above separately.
634
+ Never recreate a checkpoint to evade its spent budget. A changed task definition
635
+ requires reviewed scope and carries forward relevant prior attempts explicitly.
636
+
637
+ On resume, inspect the real worktree and latest approval before trusting a
638
+ checkpoint. Reconcile already-applied edits and uncertain tool outcomes; do not
639
+ repeat commits, outbound actions, or migrations blindly. Preserve retry counters
640
+ and parked blockers across resume. Reopen a parked unit only with new evidence,
641
+ a resolved prerequisite, or explicit direction; do not cycle it through new
642
+ sprints to reset its budget. Bound environment/flake retries too (default two
643
+ retries per failing check, within the run budget); unavailable services are
644
+ `blocked`, not passing tests. Research retries use the same bounded policy.
645
+
646
+ Completion requires observed acceptance and gate evidence for the current diff.
647
+ Report `done`, `blocked`, `pending`, and `not run` distinctly, including actual
648
+ commands, exit results, and remaining work. A generated test plan is not UAT;
649
+ a skipped or unavailable check is not green. Missing metrics are `unavailable`,
650
+ not invented percentages. Never mark an entire feature/goal done while a required
651
+ unit is parked. Report local implementation separately from release readiness.
652
+
653
+ ### Host capabilities and continuity
654
+
655
+ See `.issflow/runtime/HOSTS.md` for the installed capability matrix and smoke checks.
656
+
657
+ Check the actual session's tools rather than assuming a product name grants
658
+ capabilities. Claude Code can use installed native agents/hooks; Codex can use
659
+ available delegation and execution tools; Cursor uses its installed command/rule
660
+ and supported hook surfaces. Where delegation is unavailable, perform role passes
661
+ sequentially and disclose when genuine blind test isolation cannot be provided.
662
+ A model-run ritual is guidance, not tool enforcement. Never claim a Claude hook
663
+ protects Codex or Cursor, or that any prompt guarantees unattended execution.
664
+
665
+ Continue while the session is active and budget remains. Prompts and checkpoints
666
+ do not create a persistent runtime, scheduler, or automatic wake-up. Use only an
667
+ actually configured host scheduler/CI runner for recurrence, with its own limits
668
+ and authorization; otherwise leave a resumable checkpoint and say a new invocation
669
+ is needed. Do not invent `/clear`, `/loop`, or background execution capabilities.
670
+
580
671
  -----
581
672
 
582
673
  ## Dry-run (preview — change nothing)
@@ -603,7 +694,9 @@ Mirrors the installer's `--dry-run`. (In a dry-run, even AUTO never acts — it
603
694
  The cap protects efficiency (no flailing / token burn) in both modes.
604
695
  3. Every resolved error -> logged to `docs/ISSUES.md` with root cause + failed
605
696
  attempts.
606
- 4. End of phase -> synthesize -> context reset -> next phase.
697
+ 4. End of phase -> synthesize -> checkpoint -> next approved, ready phase.
698
+ Reset context only using an available host mechanism; if that ends execution,
699
+ leave the exact resume instruction. Do not claim to continue after session exit.
607
700
  5. **PHASE GATE** = the current-phase REAL API suite passes AND (frontend phase)
608
701
  the E2E suite passes AND the accumulated mock regression corpus stays green AND
609
702
  every `docs/ENDPOINTS.md` entry has at least one test in `tests/regression/`.
@@ -645,7 +738,9 @@ Mirrors the installer's `--dry-run`. (In a dry-run, even AUTO never acts — it
645
738
  (the language's standard tool), names follow the language's OWN idiom, and the
646
739
  code conforms to the declared architecture (Feature-Based by default) — checked
647
740
  at CLOSE. Lint/format errors or idiom violations BLOCK the close. (`code-standards`.)
648
- 13. **PLAN-APPROVAL gate.** No phase / sprint / build work starts until `docs/PLAN.md`
741
+ 13. **PLAN-APPROVAL gate.** Plan-scoped approvals above take precedence; the
742
+ following header convention applies only to legacy plans. No phase / sprint /
743
+ build work starts until `docs/PLAN.md`
649
744
  carries a human approval. `/overview` ends by presenting the plan and STOPPING for
650
745
  sign-off; on approval the gate is RECORDED in three places — the PLAN.md
651
746
  `> Approval:` header (`approved <date> v<n>`), `plan:` in `docs/STATE.md`, and a
@@ -663,6 +758,8 @@ Mirrors the installer's `--dry-run`. (In a dry-run, even AUTO never acts — it
663
758
  A recorded approval artifact IS the confirmation for its lane (approved
664
759
  PLAN → phases · APPROVED FEATURE doc → the feature lane · approved CR → the
665
760
  change · `Approved:` goal → goal runs) — that is exactly what arms headless.
761
+ Reuse that confirmation for routine steps and retries within the same scope;
762
+ goal approval does not replace the required approval of each execution plan.
666
763
  Rationale: a wrong understanding burns tokens and context at 100× the cost
667
764
  of one confirm turn. AUTO governs execution AFTER intake, never instead of it.
668
765
  15. **DESIGN + ARCHITECTURE gates.** After a client proposal is signed (quoted
@@ -698,10 +795,13 @@ fail the other.
698
795
 
699
796
  ## Shared KB (optional)
700
797
 
701
- If `.issflow/kb-config.json` exists, the SESSION-OPEN ritual pulls the KB and loads
702
- a snapshot to `docs/.kb-snapshot.md`. The researcher checks the snapshot (step 0)
703
- before any web search. Run `store-wisdom` to promote resolved issues + research to
704
- the KB. The kit works normally without a KB.
798
+ The lean SessionStart hook does not pull the KB or generate a snapshot. If
799
+ `.issflow/kb-config.json` exists and the task needs prior research, explicitly
800
+ perform the authorized Tier-B/model-run refresh, or use the existing local KB
801
+ with its freshness disclosed. The researcher checks `docs/.kb-snapshot.md` when
802
+ available; never claim it was refreshed automatically. Run `store-wisdom` to
803
+ promote resolved issues + research to the KB with its sharing approval. The kit
804
+ works normally without a KB.
705
805
 
706
806
  -----
707
807
 
@@ -1,9 +1,9 @@
1
1
  # Model matrix (guidance)
2
2
 
3
- **as_of:** 2026-11-04
3
+ **as_of:** 2026-11-04
4
4
  Update this file when vendors ship new models. Do **not** hardcode unverified API IDs into agent runners.
5
5
 
6
- Agent frontmatter stays: `haiku` · `sonnet` · `opus` · `inherit`.
6
+ Agent frontmatter stays: `haiku` · `sonnet` · `opus` · `inherit`.
7
7
  Adaptive router (`.issflow/routing/`) remains advisory / fail-closed.
8
8
 
9
9
  ## Capability tiers → host suggestions
@@ -25,9 +25,9 @@ Adaptive router (`.issflow/routing/`) remains advisory / fail-closed.
25
25
 
26
26
  ## Verify before pinning IDs
27
27
 
28
- - Claude: https://code.claude.com/docs/en/model-config
29
- - Cursor: https://cursor.com/help/models-and-usage/available-models
30
- - Codex: https://learn.chatgpt.com/docs/models
31
- - Antigravity: https://antigravity.google/docs/models/
28
+ - Claude: https://code.claude.com/docs/en/model-config
29
+ - Cursor: https://cursor.com/help/models-and-usage/available-models
30
+ - Codex: https://learn.chatgpt.com/docs/models
31
+ - Antigravity: https://antigravity.google/docs/models/
32
32
 
33
33
  If a host cannot switch models per agent, run everything on the session model.
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -0,0 +1,41 @@
1
+ # Host capabilities and verification
2
+
3
+ The installer ships procedures plus local Node helpers. It does not install an
4
+ agent service, guarantee unattended continuation, or enable persistent access.
5
+ An active host agent must perform the work and call the helper. Future sessions
6
+ require a separately authorized host scheduler. A checkpoint is not approval.
7
+
8
+ | Capability | Claude adapter | Codex adapter | Cursor adapter |
9
+ | --- | --- | --- | --- |
10
+ | Entry instructions | CLAUDE.md imports AGENTS.md | AGENTS.md | always-apply workflow/gate rules + AGENTS.md |
11
+ | Roles | .claude agent mirror, host-dependent discovery | reference files; use native delegation if exposed | reference files; use native delegation if exposed |
12
+ | Installed hooks | session, pre-tool, pre-compact, subagent-stop, stop | none | sessionStart, subagentStop only |
13
+ | Task state helper | explicit Node CLI | explicit Node CLI | explicit Node CLI |
14
+ | Checkpoint recovery | lean Tier-A session hook summarizes state; agent reconciles | agent reads state explicitly | session hook if supported; otherwise explicit |
15
+ | Approval enforcement | edit hook covers listed edit tools, not all shell writes | explicit verifier / CI | explicit verifier / CI |
16
+ | Completion proof | agent checks current code; file gate alone is insufficient | same | same |
17
+
18
+ Host versions and permissions vary. Detect available tools at session start.
19
+ Never claim a role file creates an isolated worker or a hook covers every edit.
20
+ If delegation is absent, use serial roles. If a hook is absent, perform the same
21
+ ritual explicitly. Respect host safety, approval, token, and execution limits.
22
+
23
+ ## Smoke checks
24
+
25
+ Automated installer tests cover Claude/Codex/Cursor in CommonJS and ESM projects,
26
+ dry-run, runtime loading, non-destructive upgrades, and truthful adapter text.
27
+ Runtime tests exercise restart, blocked dependencies, independent tasks, budgets,
28
+ retries, and evidence. These are local contract tests, not live vendor-host tests.
29
+
30
+ For a real host smoke check, use an isolated disposable project:
31
+ 1. Install its adapter and inspect generated entry files/hooks.
32
+ 2. Start a fresh session, verify instructions are loaded and note actual tools.
33
+ 3. Run an authorized tiny task and record command output with code revision.
34
+ 4. Interrupt after a checkpoint. Start a new session and reconcile running work
35
+ rather than blindly retrying a possibly completed external action.
36
+ 5. Block one task and confirm independent authorized work continues.
37
+ 6. Verify the final report distinguishes passed, failed, blocked and unrun checks.
38
+
39
+ Do not count these live-host checks as passed until they actually run. Publishing,
40
+ PR creation and deployment need their own authorized scope; local tests do not
41
+ imply remote publication or CI success.