its-magic 0.1.2-49 → 0.1.2-55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,38 +2,78 @@
2
2
 
3
3
  [GitHub Repository](https://github.com/fl0wm0ti0n/its-magic)
4
4
 
5
- Happy coding! Build something awesome.
6
-
7
- Drop-in template repo that implements a structured its-magic workflow in Cursor:
8
- intake -> discovery -> architecture -> sprint plan -> execute -> QA -> release,
9
- with pause/resume, decision gates, and persistent artifacts.
5
+ You bring the idea; its-magic is your structured **AI dev team** in Cursor — PO, Tech
6
+ Lead, Dev, QA, Release, and Curator — that turns ideas into shipped software through
7
+ explicit phases and handoff artifacts.
8
+
9
+ State lives in repo files (`docs/product`, `handoffs`, `sprints`, `decisions`) not
10
+ chat-only memory. Run `/intake` with your idea, then follow intake → discovery →
11
+ architecture → sprint plan → execute → QA → release; pause/resume and decision gates
12
+ keep you in control when you want to steer. Implementers: see `docs/developer/README.md`
13
+ for the DEV shard.
14
+
15
+ When you want hands-off delivery, enable **`AUTO_FLOW_MODE=full_autonomy`**
16
+ (default-off), run **`/auto` once in Cursor**, and let the native in-chat auto-chain
17
+ drain your backlog — self-verify UAT, bounded block retry, and advance to the next OPEN
18
+ story or bug without re-invoking each phase manually. The outer driver is **optional**
19
+ (**fallback** for headless/CI or when native chain is unavailable). Guided and
20
+ decision-gated modes remain the default.
10
21
 
11
22
  ## Features (what its-magic can do)
12
23
 
13
- - Structured phase workflow with explicit artifacts.
14
- - Artifact-first memory (state in files, not chat only).
15
- - Decision gate + escalation (`decisions/DEC-xxxx.md`).
16
- - Pause/resume with checkpoints (`handoffs/resume_brief.md`).
17
- - Automated execute/QA loop with safety caps (optional).
18
- - 3-layer quality chain: AI loop local validate-and-push → CI auto-fix.
19
- - User-visible metadata guard for operator-facing scripts/CLI (`US-0071` / `DEC-0053`):
20
- `python scripts/check-user-visible-metadata.py` (see `docs/engineering/runbook.md`).
21
- - CI/CD templates driven by `docs/engineering/runbook.md`.
22
- - Team-friendly local overrides (`scratchpad.local.md`).
23
- - Optional remote/docker execution and autonomous installs.
24
- - Built-in benchmarks (live, prompted, headless).
25
- - Multiplatform distribution (npm, Chocolatey, Homebrew).
24
+ ### Autonomous AI workflow
25
+
26
+ - Run `/intake` through `/release` with explicit phase handoffs and fresh subagent contexts.
27
+ - Use `/pause` and `/resume` with checkpoints when you want to steer; escalate blocking
28
+ choices to `decisions/DEC-xxxx.md`.
29
+ - Enable **`AUTO_FLOW_MODE=full_autonomy`** (default-off), run **`/auto` once in Cursor**,
30
+ and drain backlog in-chat; outer driver is **optional** / **fallback** for headless/CI.
31
+ - Team mode routes work across PO, Tech Lead, Dev, QA, Release, and Curator roles.
32
+ - Backlog and bug drain advance OPEN items without re-invoking each phase manually.
33
+ - See the catalog in **Commands and workflow** for phase commands and orchestration details.
34
+
35
+ ### Quality & verification gates
36
+
37
+ - 3-layer quality chain: AI execute/QA loop → local `validate-and-push` → CI auto-fix.
38
+ - Phase gates include `/plan-verify`, `/qa`, `/verify-work`, and `/uat` with fail-closed stops.
39
+ - `/acceptance` blocks README ↔ backlog drift; user-visible metadata guard on operator scripts.
40
+ - Browser UAT probes with structured fallback when live browser checks are unavailable.
41
+ - Release gates enforce coverage, parity, and evidence before publish.
42
+ - See the catalog in **Features** (`/acceptance`) and **Commands and workflow** for gate commands.
43
+
44
+ ### Distribution & install
45
+
46
+ - Global install via npm, npx, Chocolatey, or Homebrew; apply to any repo with
47
+ `its-magic --target`.
48
+ - Modes: `missing` (safe merge), `overwrite` (+ `--backup`), `upgrade` (framework only),
49
+ and `--clean-repo`.
50
+ - Lifecycle QA matrix validates fresh install, upgrade, backup, and clean-repo paths.
51
+ - Multi-target release publish with confirmation gates for npm/choco/brew.
52
+ - See the **Feature coverage catalog** below for distribution-tagged items.
53
+
54
+ ### Operator control & ergonomics
55
+
56
+ - Scratchpad flags and `scratchpad.local.md` tune behavior without rewriting framework files.
57
+ - Guided intake packs structure your first `/intake` conversation.
58
+ - Caveman voice mode and optional input compression for terse operator UX.
59
+ - `TOKEN_PROFILE` cost profiles slim context packs without changing workflow semantics.
60
+ - Voice input shortcuts and permissions/runtime connectivity for remote execution.
61
+ - See the catalog in **Other useful capabilities** for scratchpad and governance flags.
26
62
 
27
63
  <!-- readme-feature-coverage-catalog -->
28
64
 
29
65
  ### Feature coverage catalog (US-0091)
30
66
 
67
+ - `/acceptance` — README ↔ backlog/acceptance feature coverage backfill + blocking drift gate (`US-0091`).
68
+ - `README.md` — Visionary intro + tiered feature hierarchy (autonomous AI dev team positioning, root/template parity) (`US-0094`).
69
+ - `/auto` — Native in-chat auto-chain + full-autonomy mode (`US-0095`, `US-0092`).
31
70
  - `/bin` — POSIX npm installer + Linux remote test targets (WSL / SSH / Docker) (`US-0084`).
32
71
  - `/choco` — Configurable Multi-Target Release Publish with Confirmation Gate (`US-0054`).
33
72
  - `/devops` — First-Class Bug Issue Workflow (Open/Closed) (`US-0079`).
34
73
  - `/engineering` — Agent-Driven Codebase Map Bootstrap (`US-0082`).
35
74
  - `/engineering` — Remote Runtime Connectivity Contract for QA/Release/Publish (`US-0064`).
36
75
  - `/install` — Template/install payload omits intake gate scripts (`BUG-0001`).
76
+ - `/installed` — its-magic ships its OWN packaging CI into generated repos, breaking CI in every created project (`BUG-0009`).
37
77
  - `/intake` — Optional Caveman-style input compression (safe file scope) (`US-0090`).
38
78
  - `/lint` — CI/CD Workflows (`US-0007`).
39
79
  - `/or` — Cursor Caveman mode (scratchpad-configurable terse responses) (`US-0089`).
@@ -1140,6 +1180,7 @@ workflow stops and points you to `scripts/validate-and-push` for local fixing.
1140
1180
  - `/acceptance` — Mandatory Intake Question Packs for First and Small Intakes (`US-0068`).
1141
1181
  - `/ask` — /ask Command: Context-Aware Questions Without Workflow (`US-0020`).
1142
1182
  - `/ask` — Context Compaction and Tiered Token-Cost Optimization Mode (`US-0053`).
1183
+ - `/auto` — Architecture triad archiver ignores `## US-xxxx` headings, blocking `/auto` with `STATE_ARCHIVE_BOUNDARY_AMBIGUOUS` (`BUG-0010`).
1143
1184
  - `/auto` — Configurable Auto Phase Selection Policy (`US-0070`).
1144
1185
  - `/auto` — Continuous `/auto` Backlog-Drain Mode with Fine-Tune Switches (`US-0044`).
1145
1186
  - `/auto` — Fresh Subagent Context Per Phase and /auto Orchestration (`US-0023`).
@@ -1184,6 +1225,7 @@ workflow stops and points you to `scripts/validate-and-push` for local fixing.
1184
1225
  - `/repetitive` — Delegable Intake Clarification Without Hard Blocks (`US-0083`).
1185
1226
  - `/research` — Knowledge Curation & Early Research (`US-0029`).
1186
1227
  - `/risk` — Intelligent Intake Decomposition and Risk-Aware PO Questioning (`US-0051`).
1228
+ - `/scratchpad` — Caveman mode missing voice compression rules (US-0089 incomplete delivery) (`BUG-0011`).
1187
1229
  - `/scratchpad` — Executable Scratchpad-Driven Sync and Auto-Push Wiring (`US-0076`).
1188
1230
  - `/scratchpad` — Scratchpad Delivery Simplification (Example-Only Install Policy) (`US-0073`).
1189
1231
  - `/scratchpad` — Upgrade Scratchpad Example–First Refresh (Fix Example Drift vs Materialized Baseline) (`US-0075`).
@@ -1191,6 +1233,7 @@ workflow stops and points you to `scripts/validate-and-push` for local fixing.
1191
1233
  - `/sprint-plan` — Explicit `/sprint-plan --bulk` Mode (`US-0046`).
1192
1234
  - `/sprint-plan` — Sprint Sizing Rules and Configurable Sprint Planning (`US-0022`).
1193
1235
  - `/story` — Optional Feature User Guide Generation (`US-0032`).
1236
+ - `/uat` — Cursor browser-integrated UAT self-test (browser_smoke + automatable manual UI) (`US-0093`).
1194
1237
  - `/uat` — UAT Artifact Lifecycle and Ownership (`US-0027`).
1195
1238
  - `SKILL` scratchpad flag — Skill and Templates (`US-0004`).
1196
1239
  - `US-0001` scratchpad flag — Core Workflow Commands (`US-0001`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "its-magic",
3
- "version": "0.1.2-49",
3
+ "version": "0.1.2-55",
4
4
  "description": "its-magic - AI dev team workflow for Cursor.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -8,6 +8,7 @@ Scoped modes (DEC-0073 §10 / US-0090):
8
8
  --scope=downstream-ci-guard DEC-0075 downstream CI guard script pair table.
9
9
  --scope=us-0092 DEC-0078 full-autonomy outer driver + probe surfaces.
10
10
  --scope=us-0093 DEC-0079 browser UAT probe surfaces.
11
+ --scope=us-0095 DEC-0080 native in-chat auto-chain surfaces.
11
12
  --scope=all union of all tables.
12
13
  """
13
14
 
@@ -99,6 +100,20 @@ US0093_PAIRS: tuple[tuple[str, str], ...] = (
99
100
  ),
100
101
  )
101
102
 
103
+ US0095_PAIRS: tuple[tuple[str, str], ...] = (
104
+ (".cursor/commands/auto.md", "template/.cursor/commands/auto.md"),
105
+ (
106
+ "docs/engineering/auto-orchestration-reference.md",
107
+ "template/docs/engineering/auto-orchestration-reference.md",
108
+ ),
109
+ ("docs/engineering/runbook.md", "template/docs/engineering/runbook.md"),
110
+ ("README.md", "template/README.md"),
111
+ (
112
+ "scripts/check_intake_template_parity.py",
113
+ "template/scripts/check_intake_template_parity.py",
114
+ ),
115
+ )
116
+
102
117
  DOWNSTREAM_CI_GUARD_PAIRS: tuple[tuple[str, str], ...] = (
103
118
  (
104
119
  "scripts/check_downstream_ci_guard.py",
@@ -117,6 +132,7 @@ SCOPES: dict[str, tuple[tuple[str, str], ...]] = {
117
132
  "downstream-ci-guard": DOWNSTREAM_CI_GUARD_PAIRS,
118
133
  "us-0092": US0092_PAIRS,
119
134
  "us-0093": US0093_PAIRS,
135
+ "us-0095": US0095_PAIRS,
120
136
  "all": (
121
137
  INTAKE_TEMPLATE_PAIRS
122
138
  + CAVEMAN_COMPRESS_PAIRS
@@ -124,6 +140,7 @@ SCOPES: dict[str, tuple[tuple[str, str], ...]] = {
124
140
  + DOWNSTREAM_CI_GUARD_PAIRS
125
141
  + US0092_PAIRS
126
142
  + US0093_PAIRS
143
+ + US0095_PAIRS
127
144
  ),
128
145
  }
129
146
 
@@ -71,19 +71,95 @@ Operators must follow the runbook recipe
71
71
  `stop_reason` vocabulary: `completed`, `decision_gate`, `missing_input`,
72
72
  `pause_request`, `loop_max`, `error`, `blocked`.
73
73
 
74
+ ## Native in-chat auto-chain (US-0095 / DEC-0080)
75
+
76
+ When **`AUTO_FLOW_MODE=full_autonomy`** runs in **Cursor IDE**, the orchestrator
77
+ **self-chains in-chat** across intersected lifecycle phases and backlog-drain
78
+ segment boundaries via a **foreground sequential** Task/subagent loop in the
79
+ **same /auto orchestrator session** — without mandatory outer driver or manual
80
+ re-invocation between segments.
81
+
82
+ ### Activation gate
83
+
84
+ | # | Condition |
85
+ |---|-----------|
86
+ | 1 | Merged scratchpad **`AUTO_FLOW_MODE=full_autonomy`** (exact literal) |
87
+ | 2 | Invocation context = **Cursor IDE** (default Agent panel `/auto` without `--invoke-cmd`) |
88
+ | 3 | Task tool available for foreground subagent spawn |
89
+
90
+ Set **`native_chain_active=true`** in `state.md` phase boundary when all hold.
91
+
92
+ ### Continuation loop (reference Step 5 — IDE primary)
93
+
94
+ 1. Resolve next `phase_id` from intersected schedule or drain-advance target.
95
+ 2. **US-0069** preflight (role matrix + capability gate).
96
+ 3. **Spawn fresh subagent** (Task tool, foreground — blocks until done).
97
+ 4. Verify isolation evidence + **DEC-0038** strict-proof tuple in `state.md`.
98
+ 5. Increment **`outer_cycle_index`**; check **`AUTO_LOOP_MAX_CYCLES`**.
99
+ 6. Branch stop matrix → continue spawn, drain-advance, block-retry, or hard stop.
100
+
101
+ **Loop invariants** (spawn-only — **BUG-0006** unchanged):
102
+
103
+ 1. Orchestrator **must not** stop after one phase or one story segment solely due to Cursor turn boundaries when continuation is schedulable.
104
+ 2. Each phase completes only via **fresh subagent spawn** + artifacts — orchestrator **must not** execute phase-role work in-band (**`AUTO_ORCHESTRATOR_PHASE_EXECUTION`** forbidden).
105
+ 3. **`stop_reason=completed (segment exhausted)`** is **invalid** when next phase, drain target, or relaxable retry is schedulable.
106
+
107
+ Preflight/post checks per **US-0069** / **DEC-0051** at every boundary.
108
+
109
+ ### Fail-closed: `NATIVE_CHAIN_UNAVAILABLE`
110
+
111
+ Emit when Task tool denied, spawn depth limit hit, or IDE context cannot schedule foreground subagent. Hard stop for native path. Optional fallback hint only: `python scripts/auto_outer_driver.py --repo .` (**optional** / **fallback** for headless/CI). **Non-suppressible** under **`AUTO_QUIET=1`**.
112
+
113
+ ### IDE drain-advance-without-pause
114
+
115
+ Deterministic **7-step** algorithm when **`full_autonomy`** + drain policy active (**`AUTO_BACKLOG_DRAIN=1`** or bug-queue per **US-0087** mutex).
116
+
117
+ **Trigger** (all required): `stop_phase=refresh-context`; `stop_reason=completed`; drain enabled; budget remaining.
118
+
119
+ | Step | Action |
120
+ |------|--------|
121
+ | **1** | **READ** latest phase-boundary block in `docs/engineering/state.md` |
122
+ | **2** | **ASSERT** **DEC-0069** pairing — completed phase refreshed **`resume_brief`** + **`state.md`**; stale → **`RESUME_BRIEF_STALE`** (fail-closed, no advance) |
123
+ | **3** | **SELECT** next work item (story or bug per drain mutex) |
124
+ | **4** | **RELOAD** scratchpad; **MATERIALIZE** `resolved_phase_plan` (**US-0070**) |
125
+ | **5** | **PREPEND** `handoffs/resume_brief.md` with segment pointers |
126
+ | **6** | **APPEND** `state.md` materialization breadcrumb for new segment |
127
+ | **7** | **IMMEDIATELY** spawn first phase subagent — **without operator re-`/auto`**, **no** mandatory outer-driver instruction |
128
+
129
+ **DEC-0069 pairing mandate**: every phase boundary and drain advance **must** refresh **`resume_brief`** + **`state.md`** before scheduling in-chat continuation. Stale brief → **`RESUME_BRIEF_STALE`** fail-closed (no advance).
130
+
131
+ ### Native-chain stop matrix (US-0095)
132
+
133
+ Native chain **does not weaken** **DEC-0078** hard gates. Hard stops (no relaxation): **`decision_gate`**, isolation/strict-proof violations, security deny, **`BACKLOG_MAX_STORIES_REACHED`**, **`AUTO_LOOP_MAX_CYCLES`**, unrecoverable **`error`**, **`pause_request`**. Relaxable transient stops per **DEC-0078** when configured.
134
+
135
+ ### `AUTO_QUIET` under native chain (US-0095)
136
+
137
+ | Event | `AUTO_QUIET=0` | `AUTO_QUIET=1` |
138
+ |-------|----------------|----------------|
139
+ | Routine phase PASS | May notify | **Suppress** |
140
+ | In-chat phase continuation | Compact breadcrumb OK | **Suppress** |
141
+ | Drain advance | Segment notify OK | **Suppress** routine prose; **no** outer-driver wait |
142
+ | Gates, caps, errors, **`NATIVE_CHAIN_UNAVAILABLE`** | **Always** | **Always** |
143
+
144
+ **Forbidden** in IDE-primary `full_autonomy` prose: mandatory `run the outer driver`; `re-run /auto` between drain segments; `segment exhausted` as terminal when continuation pending; unqualified `python scripts/auto_outer_driver.py`.
145
+
146
+ Full detail: **`docs/engineering/auto-orchestration-reference.md`**.
147
+
74
148
  ## Full-autonomy mode + outer driver (US-0092 / DEC-0078)
75
149
 
76
- **`AUTO_FLOW_MODE=full_autonomy`** (exact literal, default-off) enables the shipped
77
- stdlib outer driver **`scripts/auto_outer_driver.py`**. The driver **loops hook
78
- invocations** spawn-only preserved (**BUG-0006**); it never performs phase-role work.
150
+ **`AUTO_FLOW_MODE=full_autonomy`** (exact literal, default-off) enables hands-off
151
+ orchestration. **IDE primary path** (US-0095): run **`/auto` once in Cursor**
152
+ native in-chat auto-chain above. **Optional fallback**: stdlib outer driver
153
+ **`scripts/auto_outer_driver.py`** for headless/CI or when **`NATIVE_CHAIN_UNAVAILABLE`**.
79
154
 
80
- Operator recipe: set scratchpad keys run
155
+ The driver **loops hook invocations** spawn-only preserved (**BUG-0006**); it
156
+ never performs phase-role work. Headless/CI recipe: set scratchpad keys → run
81
157
  `python scripts/auto_outer_driver.py --repo .` once → interpret exit table in
82
- **`docs/engineering/runbook.md`** § **Full-autonomy outer driver (US-0092)**.
158
+ **`docs/engineering/runbook.md`** § **Full-autonomy outer driver (US-0092)** (**fallback**).
83
159
 
84
160
  **Drain-advance-without-pause**: with **`full_autonomy`** + **`AUTO_BACKLOG_DRAIN=1`**
85
161
  (or bug-queue policy), segment completion schedules the next OPEN story/bug
86
- **immediately** without operator re-`/auto`; **`resume_brief`** +
162
+ **immediately** **without operator re-`/auto`**; **`resume_brief`** +
87
163
  **`state.md`** refresh per **DEC-0069** at every boundary.
88
164
 
89
165
  ### Full-autonomy stop matrix (US-0092)
@@ -268,10 +268,18 @@ DEV_SERVER_COMMAND=
268
268
  # - CAVEMAN_MODE: 0|1 (default 0; absence = 0)
269
269
  # - CAVEMAN_LEVEL: lite|full|ultra (empty; with MODE=1 empty -> treat as full;
270
270
  # unknown value -> CAVEMAN_LEVEL_UNKNOWN and fall back to pre-US-0089 voice)
271
- # - CAVEMAN_COMPRESS_INPUT: 0|1 -- reserved for US-0090; inert in US-0089;
272
- # no behavior until compression story ships
273
- # - CAVEMAN_FILE_SCOPE: string -- reserved for US-0090; inert in US-0089;
274
- # no behavior until compression story ships
271
+ #
272
+ # ## Caveman input compression (US-0090 / DEC-0073)
273
+ # Input-side prose minification via scripts/caveman_compress_input.py. Default off.
274
+ # Orthogonal to CAVEMAN_MODE (reply voice) and TOKEN_PROFILE (context breadth).
275
+ # - CAVEMAN_COMPRESS_INPUT: 0|1 (default 0) -- activation gate; must be 1 for --write
276
+ # - CAVEMAN_FILE_SCOPE: string (empty default) -- allow-list of files eligible for compression:
277
+ # * empty: no files in scope (fail-closed on --write with CAVEMAN_COMPRESS_SCOPE_EMPTY)
278
+ # * named profile: e.g. docs-prose-only (user-guides, runbook, state-archive, handoffs/archive)
279
+ # * raw globs: e.g. docs/user-guides/**/*.md,handoffs/archive/*.md (forward slashes only)
280
+ # * hybrid: profile:docs-prose-only;globs:handoffs/archive/*.md
281
+ # Mutation requires COMPRESS_INPUT=1 + non-empty scope + CLI --write; use --dry-run first.
282
+ # Originals land in docs/.caveman-originals/<path>; deny-list always wins over allow.
275
283
  CAVEMAN_MODE=0
276
284
  CAVEMAN_LEVEL=
277
285
  CAVEMAN_COMPRESS_INPUT=0
@@ -2,38 +2,78 @@
2
2
 
3
3
  [GitHub Repository](https://github.com/fl0wm0ti0n/its-magic)
4
4
 
5
- Happy coding! Build something awesome.
6
-
7
- Drop-in template repo that implements a structured its-magic workflow in Cursor:
8
- intake -> discovery -> architecture -> sprint plan -> execute -> QA -> release,
9
- with pause/resume, decision gates, and persistent artifacts.
5
+ You bring the idea; its-magic is your structured **AI dev team** in Cursor — PO, Tech
6
+ Lead, Dev, QA, Release, and Curator — that turns ideas into shipped software through
7
+ explicit phases and handoff artifacts.
8
+
9
+ State lives in repo files (`docs/product`, `handoffs`, `sprints`, `decisions`) not
10
+ chat-only memory. Run `/intake` with your idea, then follow intake → discovery →
11
+ architecture → sprint plan → execute → QA → release; pause/resume and decision gates
12
+ keep you in control when you want to steer. Implementers: see `docs/developer/README.md`
13
+ for the DEV shard.
14
+
15
+ When you want hands-off delivery, enable **`AUTO_FLOW_MODE=full_autonomy`**
16
+ (default-off), run **`/auto` once in Cursor**, and let the native in-chat auto-chain
17
+ drain your backlog — self-verify UAT, bounded block retry, and advance to the next OPEN
18
+ story or bug without re-invoking each phase manually. The outer driver is **optional**
19
+ (**fallback** for headless/CI or when native chain is unavailable). Guided and
20
+ decision-gated modes remain the default.
10
21
 
11
22
  ## Features (what its-magic can do)
12
23
 
13
- - Structured phase workflow with explicit artifacts.
14
- - Artifact-first memory (state in files, not chat only).
15
- - Decision gate + escalation (`decisions/DEC-xxxx.md`).
16
- - Pause/resume with checkpoints (`handoffs/resume_brief.md`).
17
- - Automated execute/QA loop with safety caps (optional).
18
- - 3-layer quality chain: AI loop local validate-and-push → CI auto-fix.
19
- - User-visible metadata guard for operator-facing scripts/CLI (`US-0071` / `DEC-0053`):
20
- `python scripts/check-user-visible-metadata.py` (see `docs/engineering/runbook.md`).
21
- - CI/CD templates driven by `docs/engineering/runbook.md`.
22
- - Team-friendly local overrides (`scratchpad.local.md`).
23
- - Optional remote/docker execution and autonomous installs.
24
- - Built-in benchmarks (live, prompted, headless).
25
- - Multiplatform distribution (npm, Chocolatey, Homebrew).
24
+ ### Autonomous AI workflow
25
+
26
+ - Run `/intake` through `/release` with explicit phase handoffs and fresh subagent contexts.
27
+ - Use `/pause` and `/resume` with checkpoints when you want to steer; escalate blocking
28
+ choices to `decisions/DEC-xxxx.md`.
29
+ - Enable **`AUTO_FLOW_MODE=full_autonomy`** (default-off), run **`/auto` once in Cursor**,
30
+ and drain backlog in-chat; outer driver is **optional** / **fallback** for headless/CI.
31
+ - Team mode routes work across PO, Tech Lead, Dev, QA, Release, and Curator roles.
32
+ - Backlog and bug drain advance OPEN items without re-invoking each phase manually.
33
+ - See the catalog in **Commands and workflow** for phase commands and orchestration details.
34
+
35
+ ### Quality & verification gates
36
+
37
+ - 3-layer quality chain: AI execute/QA loop → local `validate-and-push` → CI auto-fix.
38
+ - Phase gates include `/plan-verify`, `/qa`, `/verify-work`, and `/uat` with fail-closed stops.
39
+ - `/acceptance` blocks README ↔ backlog drift; user-visible metadata guard on operator scripts.
40
+ - Browser UAT probes with structured fallback when live browser checks are unavailable.
41
+ - Release gates enforce coverage, parity, and evidence before publish.
42
+ - See the catalog in **Features** (`/acceptance`) and **Commands and workflow** for gate commands.
43
+
44
+ ### Distribution & install
45
+
46
+ - Global install via npm, npx, Chocolatey, or Homebrew; apply to any repo with
47
+ `its-magic --target`.
48
+ - Modes: `missing` (safe merge), `overwrite` (+ `--backup`), `upgrade` (framework only),
49
+ and `--clean-repo`.
50
+ - Lifecycle QA matrix validates fresh install, upgrade, backup, and clean-repo paths.
51
+ - Multi-target release publish with confirmation gates for npm/choco/brew.
52
+ - See the **Feature coverage catalog** below for distribution-tagged items.
53
+
54
+ ### Operator control & ergonomics
55
+
56
+ - Scratchpad flags and `scratchpad.local.md` tune behavior without rewriting framework files.
57
+ - Guided intake packs structure your first `/intake` conversation.
58
+ - Caveman voice mode and optional input compression for terse operator UX.
59
+ - `TOKEN_PROFILE` cost profiles slim context packs without changing workflow semantics.
60
+ - Voice input shortcuts and permissions/runtime connectivity for remote execution.
61
+ - See the catalog in **Other useful capabilities** for scratchpad and governance flags.
26
62
 
27
63
  <!-- readme-feature-coverage-catalog -->
28
64
 
29
65
  ### Feature coverage catalog (US-0091)
30
66
 
67
+ - `/acceptance` — README ↔ backlog/acceptance feature coverage backfill + blocking drift gate (`US-0091`).
68
+ - `README.md` — Visionary intro + tiered feature hierarchy (autonomous AI dev team positioning, root/template parity) (`US-0094`).
69
+ - `/auto` — Native in-chat auto-chain + full-autonomy mode (`US-0095`, `US-0092`).
31
70
  - `/bin` — POSIX npm installer + Linux remote test targets (WSL / SSH / Docker) (`US-0084`).
32
71
  - `/choco` — Configurable Multi-Target Release Publish with Confirmation Gate (`US-0054`).
33
72
  - `/devops` — First-Class Bug Issue Workflow (Open/Closed) (`US-0079`).
34
73
  - `/engineering` — Agent-Driven Codebase Map Bootstrap (`US-0082`).
35
74
  - `/engineering` — Remote Runtime Connectivity Contract for QA/Release/Publish (`US-0064`).
36
75
  - `/install` — Template/install payload omits intake gate scripts (`BUG-0001`).
76
+ - `/installed` — its-magic ships its OWN packaging CI into generated repos, breaking CI in every created project (`BUG-0009`).
37
77
  - `/intake` — Optional Caveman-style input compression (safe file scope) (`US-0090`).
38
78
  - `/lint` — CI/CD Workflows (`US-0007`).
39
79
  - `/or` — Cursor Caveman mode (scratchpad-configurable terse responses) (`US-0089`).
@@ -969,6 +1009,12 @@ Troubleshooting quick guide:
969
1009
  - Fix JSON syntax and retry.
970
1010
  - Secret-like inline value detected:
971
1011
  - Replace literal secret with an env-var reference field.
1012
+ - **CI still runs its-magic packaging jobs?** Your project received a pre-fix workflow.
1013
+ Run **`its-magic --target <repo> --mode upgrade`** (or **`--mode clean`** then reinstall)
1014
+ to refresh `.github/workflows/ci.yml` from the corrected template. After upgrade, GitHub
1015
+ Actions should show only **`checks`** and **`auto-fix`** jobs — not `npm-test`,
1016
+ `brew-test`, or `choco-test`. Fix applies to new installs/upgrades; stale repos heal on
1017
+ next upgrade (**US-0018**).
972
1018
 
973
1019
  Team/local (recommended in `.cursor/scratchpad.local.md`):
974
1020
 
@@ -1134,6 +1180,7 @@ workflow stops and points you to `scripts/validate-and-push` for local fixing.
1134
1180
  - `/acceptance` — Mandatory Intake Question Packs for First and Small Intakes (`US-0068`).
1135
1181
  - `/ask` — /ask Command: Context-Aware Questions Without Workflow (`US-0020`).
1136
1182
  - `/ask` — Context Compaction and Tiered Token-Cost Optimization Mode (`US-0053`).
1183
+ - `/auto` — Architecture triad archiver ignores `## US-xxxx` headings, blocking `/auto` with `STATE_ARCHIVE_BOUNDARY_AMBIGUOUS` (`BUG-0010`).
1137
1184
  - `/auto` — Configurable Auto Phase Selection Policy (`US-0070`).
1138
1185
  - `/auto` — Continuous `/auto` Backlog-Drain Mode with Fine-Tune Switches (`US-0044`).
1139
1186
  - `/auto` — Fresh Subagent Context Per Phase and /auto Orchestration (`US-0023`).
@@ -1178,6 +1225,7 @@ workflow stops and points you to `scripts/validate-and-push` for local fixing.
1178
1225
  - `/repetitive` — Delegable Intake Clarification Without Hard Blocks (`US-0083`).
1179
1226
  - `/research` — Knowledge Curation & Early Research (`US-0029`).
1180
1227
  - `/risk` — Intelligent Intake Decomposition and Risk-Aware PO Questioning (`US-0051`).
1228
+ - `/scratchpad` — Caveman mode missing voice compression rules (US-0089 incomplete delivery) (`BUG-0011`).
1181
1229
  - `/scratchpad` — Executable Scratchpad-Driven Sync and Auto-Push Wiring (`US-0076`).
1182
1230
  - `/scratchpad` — Scratchpad Delivery Simplification (Example-Only Install Policy) (`US-0073`).
1183
1231
  - `/scratchpad` — Upgrade Scratchpad Example–First Refresh (Fix Example Drift vs Materialized Baseline) (`US-0075`).
@@ -1185,6 +1233,7 @@ workflow stops and points you to `scripts/validate-and-push` for local fixing.
1185
1233
  - `/sprint-plan` — Explicit `/sprint-plan --bulk` Mode (`US-0046`).
1186
1234
  - `/sprint-plan` — Sprint Sizing Rules and Configurable Sprint Planning (`US-0022`).
1187
1235
  - `/story` — Optional Feature User Guide Generation (`US-0032`).
1236
+ - `/uat` — Cursor browser-integrated UAT self-test (browser_smoke + automatable manual UI) (`US-0093`).
1188
1237
  - `/uat` — UAT Artifact Lifecycle and Ownership (`US-0027`).
1189
1238
  - `SKILL` scratchpad flag — Skill and Templates (`US-0004`).
1190
1239
  - `US-0001` scratchpad flag — Core Workflow Commands (`US-0001`).
@@ -796,24 +796,102 @@ script or manual re-invocation with `start-from` / refreshed `resume_brief`) is
796
796
  | `RELEASE_PUBLISH_MODE=auto` | Explicit opt-in | **No change — hard default-off** | Always on publish |
797
797
  | Security deny (`.env`, intake mutation) | Hard deny | **No change — hard** | Always |
798
798
 
799
- **Drain-advance-without-pause**: outer driver schedules next OPEN story/bug immediately;
800
- paired **`resume_brief`** + **`state.md`** refresh per **DEC-0069** at every boundary.
799
+ **Drain-advance-without-pause**: with **`full_autonomy`** in IDE, native in-chat chain
800
+ schedules next OPEN story/bug **immediately** **without operator re-`/auto`**; outer
801
+ driver is **optional** / **fallback** for headless/CI. Paired **`resume_brief`** +
802
+ **`state.md`** refresh per **DEC-0069** at every boundary.
801
803
 
802
- ### Block-retry ledger + cap interaction (US-0092)
804
+ ### Native in-chat auto-chain (US-0095 / DEC-0080)
805
+
806
+ **IDE primary path** when **`AUTO_FLOW_MODE=full_autonomy`** + Cursor IDE + Task tool:
807
+ orchestrator runs a **foreground sequential** spawn loop in the **same /auto orchestrator
808
+ session** (**Native in-chat auto-chain**). Continuation loop: preflight → spawn → await →
809
+ verify → caps → branch. **`NATIVE_CHAIN_UNAVAILABLE`** when Task tool denied or spawn
810
+ depth limit hit — hard stop for native path; suggest outer driver as **optional** fallback.
811
+
812
+ **Activation gate**: `full_autonomy` + IDE context + Task tool → set **`native_chain_active=true`**
813
+ in `state.md` boundary.
814
+
815
+ **Spawn-only invariants** (**BUG-0006**): orchestrator schedules phase-role subagents only;
816
+ each phase completes via fresh spawn + artifacts; no in-band phase work.
817
+
818
+ **Forbidden turn-boundary semantics**: **`stop_reason=completed (segment exhausted)`** is
819
+ **invalid** when next phase, drain target, or relaxable retry is schedulable.
820
+
821
+ ### IDE drain-advance-without-pause algorithm (US-0095)
822
+
823
+ **Trigger** (all required): `stop_phase=refresh-context`; `stop_reason=completed`; drain
824
+ enabled (**`AUTO_BACKLOG_DRAIN=1`** or bug-queue per **US-0087** mutex); budget remaining.
825
+
826
+ | Step | Action |
827
+ |------|--------|
828
+ | **1** | **READ** latest phase-boundary block in `docs/engineering/state.md` (`stop_phase`, `stop_reason`, `story_id`, `sprint_id`, `orchestrator_run_id`, `backlog_drain_stories_remaining_budget`, `bug_queue_remaining`) |
829
+ | **2** | **ASSERT** **DEC-0069** pairing — completed phase refreshed **`resume_brief`** + **`state.md`**; stale → **`RESUME_BRIEF_STALE`** (fail-closed, no advance) |
830
+ | **3** | **SELECT** next work item — story: decrement budget, select OPEN story per `AUTO_STORY_SELECTION`; bug: ascending **`BUG-####`** per **US-0087** |
831
+ | **4** | **RELOAD** scratchpad; **MATERIALIZE** `resolved_phase_plan` (**US-0070**); intersect with segment entry phase |
832
+ | **5** | **PREPEND** `handoffs/resume_brief.md` — `story_id`/`bug_id`, `intended_resume_phase`, unchanged `orchestrator_run_id`, drain counters |
833
+ | **6** | **APPEND** `state.md` materialization breadcrumb for new segment |
834
+ | **7** | **IMMEDIATELY** spawn first phase subagent — **without operator re-`/auto`**, **no** mandatory outer-driver instruction |
835
+
836
+ **DEC-0069 pairing mandate**: every phase boundary and drain advance **must** refresh
837
+ **`resume_brief`** + **`state.md`** before scheduling in-chat continuation.
838
+
839
+ ### Native-chain stop matrix (US-0095)
840
+
841
+ Native chain **does not weaken** **DEC-0078** hard gates:
842
+
843
+ | Condition | Native chain behavior |
844
+ |-----------|----------------------|
845
+ | Next intersected phase, no hard stop | **Continue in-chat** — schedule spawn |
846
+ | **`decision_gate`**, isolation/strict-proof, security deny | **Hard stop** — unchanged |
847
+ | **`BACKLOG_MAX_STORIES_REACHED`**, **`loop_max`**, unrecoverable **`error`**, **`pause_request`** | **Hard stop** — unchanged |
848
+ | Relaxable transient stops (**DEC-0078**) | Bounded ledger retry → `phase_respawn` / `native_chain_continue` |
849
+ | Segment complete + drain enabled | **Drain-advance** — immediate in-chat continuation |
850
+ | Task spawn denied | **`NATIVE_CHAIN_UNAVAILABLE`** — hard for native path |
851
+
852
+ ### `AUTO_QUIET` under native chain (US-0095)
853
+
854
+ | Event | `AUTO_QUIET=0` | `AUTO_QUIET=1` |
855
+ |-------|----------------|----------------|
856
+ | Routine phase PASS | May notify | **Suppress** |
857
+ | Native chain continuing to next phase | Compact breadcrumb OK | **Suppress** |
858
+ | Drain advance to next story/bug | Segment handoff notify OK | **Suppress** routine prose; **no** outer-driver instruction |
859
+ | `decision_gate`, errors, caps, **`NATIVE_CHAIN_UNAVAILABLE`** | **Always** | **Always** |
860
+ | `BACKLOG_MAX_STORIES_REACHED`, `BLOCK_RETRY_CAP_EXHAUSTED` | **Always** | **Always** |
861
+
862
+ **Forbidden grep patterns** (IDE-primary `full_autonomy` sections): mandatory `run the outer driver`;
863
+ `re-run /auto` between drain segments; `segment exhausted` as terminal when continuation pending;
864
+ unqualified `python scripts/auto_outer_driver.py`.
865
+
866
+ ### Block-retry ledger + unified cap interaction (US-0092 / US-0095)
803
867
 
804
868
  Append-only **`handoffs/auto_block_retry/<orchestrator_run_id>.jsonl`** — names-only;
805
- no secrets. Cap interaction:
869
+ no secrets. IDE native chain and outer driver **share one accounting model**:
806
870
 
807
871
  | Cap | Scope |
808
872
  |-----|-------|
809
- | `AUTO_LOOP_MAX_CYCLES` | Outer-driver `/auto` invocations (incl. drain advances) |
810
- | `AUTO_IMPLEMENTATION_LOOP` | Inner `execute`↔`qa`↔`verify-work` when `1` |
873
+ | `AUTO_LOOP_MAX_CYCLES` | Each phase spawn + each drain advance = **1** `outer_cycle_index` increment |
874
+ | `AUTO_IMPLEMENTATION_LOOP` | Inner `execute`↔`qa`↔`verify-work` `implementation_loop_index` |
811
875
  | `AUTO_BLOCK_RETRY_MAX` | Per `(story_id, stop_reason)` recoverable retries |
812
- | `AUTO_BACKLOG_MAX_STORIES` | Drain breadth outer driver exit **4** |
876
+ | `AUTO_BACKLOG_MAX_STORIES` | `backlog_drain_stories_remaining_budget` decremented at segment advance |
877
+
878
+ **`remediation_action` values**: `phase_respawn`, `native_chain_continue`, `drain_advance`
879
+ (alongside existing `outer_reinvoke`).
880
+
881
+ **State breadcrumb fields** (each `full_autonomy` phase boundary):
882
+
883
+ | Field | Semantics |
884
+ |-------|-----------|
885
+ | **`native_chain_active`** | `true` when IDE native chain is driving continuation |
886
+ | **`outer_cycle_index`** | Continuation cycles this run (int ≥ 0) |
887
+ | **`implementation_loop_index`** | Inner remediation cycles for current story segment (int ≥ 0) |
888
+
889
+ Cap exhaustion → exit **6** `BLOCK_RETRY_CAP_EXHAUSTED`. **Ordering**: check
890
+ **`AUTO_LOOP_MAX_CYCLES`** first; then **`AUTO_IMPLEMENTATION_LOOP`** +
891
+ **`AUTO_BLOCK_RETRY_MAX`** before recoverable retry; unrecoverable classes bypass ledger.
813
892
 
814
- Cap exhaustion exit **6** `BLOCK_RETRY_CAP_EXHAUSTED`. Ordering: outer driver checks
815
- `AUTO_LOOP_MAX_CYCLES` first; orchestrator checks `AUTO_IMPLEMENTATION_LOOP` +
816
- `AUTO_BLOCK_RETRY_MAX` before scheduling remediation.
893
+ **Security deny-list** (unchanged from **DEC-0078**): no auto-read **`.env`**, no intake
894
+ evidence mutation, no publish without **`RELEASE_PUBLISH_MODE=auto`**.
817
895
 
818
896
  ### Browser UAT self-test (US-0093)
819
897
 
@@ -897,15 +975,19 @@ conditions the script is a no-op and the fail-closed reason codes from
897
975
  - `resolution_source` (`argument|resume_brief|state_fallback`)
898
976
  - `resolution_status` (`resolved|fail-fast`)
899
977
  - `timestamp`
900
- 5. **(reference Step 5 — continuous multi-phase spawn)** Spawn a fresh subagent
901
- for each remaining phase in **the intersected resolved schedule order** (not
902
- the full canonical list when phases are omitted), starting at
978
+ 5. **(reference Step 5 — continuous multi-phase spawn)** **IDE primary path
979
+ (US-0095)**: when **`AUTO_FLOW_MODE=full_autonomy`** + Cursor IDE + Task tool,
980
+ orchestrator runs **Native in-chat auto-chain** **foreground sequential**
981
+ spawn loop in the **same /auto orchestrator session** until stop matrix fires
982
+ (see **Native in-chat auto-chain (US-0095)** above). Otherwise spawn a fresh
983
+ subagent for each remaining phase in **the intersected resolved schedule order**
984
+ (not the full canonical list when phases are omitted), starting at
903
985
  `resolved_start_phase`, and **advance through all subsequent phases** until a
904
986
  **deterministic stop condition** fires (see **Deterministic stop matrix
905
987
  (US-0088)** above). The orchestrator does **not** stop after a single phase
906
988
  spawn unless the stop matrix requires it; outer-driver equivalence applies
907
- when a single invocation cannot schedule multiple subagent turns (see
908
- **Outer-driver equivalence (AC-1, Option B)** above):
989
+ when native chain is unavailable or a single invocation cannot schedule
990
+ multiple subagent turns (see **Outer-driver equivalence (AC-1, Option B)** above):
909
991
  default full path:
910
992
  intake -> discovery -> research -> architecture -> sprint plan ->
911
993
  plan verify -> execute -> QA -> verify work -> release -> refresh context.
@@ -1366,13 +1366,46 @@ success chatter. Non-suppressible notifications:
1366
1366
  `AUTO_QUIET` is **orthogonal** to `TOKEN_PROFILE` (**DEC-0035** / **US-0080**):
1367
1367
  `TOKEN_PROFILE` controls context breadth and token cost, not notification policy.
1368
1368
 
1369
- ### Full-autonomy outer driver (US-0092)
1369
+ Under **`full_autonomy`** IDE native chain (**US-0095**), drain advance suppresses
1370
+ routine prose when **`AUTO_QUIET=1`** but **must not** emit mandatory outer-driver
1371
+ wait instructions between segments.
1370
1372
 
1371
- Opt-in **`AUTO_FLOW_MODE=full_autonomy`** (exact literal, default-off) enables the
1372
- shipped stdlib outer driver. Spawn-only preserved — the driver loops hook
1373
- invocations; it never performs phase-role work.
1373
+ ### Native in-chat auto-chain (US-0095)
1374
1374
 
1375
- #### Enable and run (once per portfolio segment)
1375
+ **Primary IDE recipe** for hands-off delivery when **`AUTO_FLOW_MODE=full_autonomy`**
1376
+ (default-off): run **`/auto` once in Cursor** — orchestrator self-chains in-chat
1377
+ across phases and drain segments via **foreground sequential** Task loop in the
1378
+ **same /auto orchestrator session**.
1379
+
1380
+ #### Enable and run (IDE primary)
1381
+
1382
+ 1. Set in merged scratchpad:
1383
+ - `AUTO_FLOW_MODE=full_autonomy`
1384
+ - Optional: `AUTO_BACKLOG_DRAIN=1`, caps (`AUTO_LOOP_MAX_CYCLES`, `AUTO_BACKLOG_MAX_STORIES`, `AUTO_BLOCK_RETRY_MAX`)
1385
+ 2. Run **`/auto`** once in Cursor Agent panel (no `--invoke-cmd`).
1386
+ 3. Orchestrator continues in-chat until hard stop, drain budget exhausted, or
1387
+ **`NATIVE_CHAIN_UNAVAILABLE`** (optional fallback: outer driver below).
1388
+
1389
+ Normative detail: **`.cursor/commands/auto.md`** § **Native in-chat auto-chain (US-0095)**
1390
+ and **`docs/engineering/auto-orchestration-reference.md`** § **Native in-chat auto-chain**.
1391
+
1392
+ #### Primary / fallback boundary
1393
+
1394
+ | Context | Native in-chat chain | Outer driver | Messaging |
1395
+ |---------|---------------------|--------------|-----------|
1396
+ | **Cursor IDE + `full_autonomy`** | **Primary** | **Optional fallback** | No mandatory outer-driver drain recipe |
1397
+ | **Headless / CI** | Unavailable | **Recommended** | Runbook: headless primary |
1398
+ | **`--invoke-cmd`** | N/A | **Required** bridge | Document in runbook |
1399
+ | **`NATIVE_CHAIN_UNAVAILABLE`** | Stops | Suggested (**optional** tone) | Non-suppressible |
1400
+
1401
+ ### Full-autonomy outer driver (US-0092) — fallback
1402
+
1403
+ Opt-in **`AUTO_FLOW_MODE=full_autonomy`** (exact literal, default-off) also enables
1404
+ the shipped stdlib outer driver as **optional** / **fallback** for headless/CI or
1405
+ when native in-chat chain is unavailable. Spawn-only preserved — the driver loops hook
1406
+ invocations; it never performs phase-role work. **Not required** for IDE drain.
1407
+
1408
+ #### Enable and run (headless/CI fallback)
1376
1409
 
1377
1410
  1. Set in merged scratchpad (`.cursor/scratchpad.md` + optional local overrides):
1378
1411
  - `AUTO_FLOW_MODE=full_autonomy`
@@ -8,6 +8,7 @@ Scoped modes (DEC-0073 §10 / US-0090):
8
8
  --scope=downstream-ci-guard DEC-0075 downstream CI guard script pair table.
9
9
  --scope=us-0092 DEC-0078 full-autonomy outer driver + probe surfaces.
10
10
  --scope=us-0093 DEC-0079 browser UAT probe surfaces.
11
+ --scope=us-0095 DEC-0080 native in-chat auto-chain surfaces.
11
12
  --scope=all union of all tables.
12
13
  """
13
14
 
@@ -99,6 +100,20 @@ US0093_PAIRS: tuple[tuple[str, str], ...] = (
99
100
  ),
100
101
  )
101
102
 
103
+ US0095_PAIRS: tuple[tuple[str, str], ...] = (
104
+ (".cursor/commands/auto.md", "template/.cursor/commands/auto.md"),
105
+ (
106
+ "docs/engineering/auto-orchestration-reference.md",
107
+ "template/docs/engineering/auto-orchestration-reference.md",
108
+ ),
109
+ ("docs/engineering/runbook.md", "template/docs/engineering/runbook.md"),
110
+ ("README.md", "template/README.md"),
111
+ (
112
+ "scripts/check_intake_template_parity.py",
113
+ "template/scripts/check_intake_template_parity.py",
114
+ ),
115
+ )
116
+
102
117
  DOWNSTREAM_CI_GUARD_PAIRS: tuple[tuple[str, str], ...] = (
103
118
  (
104
119
  "scripts/check_downstream_ci_guard.py",
@@ -117,6 +132,7 @@ SCOPES: dict[str, tuple[tuple[str, str], ...]] = {
117
132
  "downstream-ci-guard": DOWNSTREAM_CI_GUARD_PAIRS,
118
133
  "us-0092": US0092_PAIRS,
119
134
  "us-0093": US0093_PAIRS,
135
+ "us-0095": US0095_PAIRS,
120
136
  "all": (
121
137
  INTAKE_TEMPLATE_PAIRS
122
138
  + CAVEMAN_COMPRESS_PAIRS
@@ -124,6 +140,7 @@ SCOPES: dict[str, tuple[tuple[str, str], ...]] = {
124
140
  + DOWNSTREAM_CI_GUARD_PAIRS
125
141
  + US0092_PAIRS
126
142
  + US0093_PAIRS
143
+ + US0095_PAIRS
127
144
  ),
128
145
  }
129
146