its-magic 0.1.2-43 → 0.1.2-48
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 +119 -0
- package/package.json +1 -1
- package/scripts/check_intake_template_parity.py +67 -2
- package/scripts/guard_installer_publish.py +19 -1
- package/template/.cursor/commands/architecture.md +16 -6
- package/template/.cursor/commands/auto.md +42 -0
- package/template/.cursor/commands/qa.md +8 -0
- package/template/.cursor/commands/release.md +11 -0
- package/template/.cursor/commands/verify-work.md +16 -1
- package/template/.cursor/rules/caveman.mdc +43 -0
- package/template/.cursor/scratchpad.local.example.md +18 -4
- package/template/.cursor/scratchpad.md +14 -4
- package/template/.github/workflows/ci.yml +4 -114
- package/template/README.md +113 -0
- package/template/docs/engineering/auto-orchestration-reference.md +44 -1
- package/template/docs/engineering/context/installer-owned-paths.manifest +12 -0
- package/template/docs/engineering/context/readme-section-affinity.json +30 -0
- package/template/docs/engineering/runbook.md +118 -5
- package/template/scripts/auto_outer_driver.py +521 -0
- package/template/scripts/check_downstream_ci_guard.py +67 -0
- package/template/scripts/check_intake_template_parity.py +67 -2
- package/template/scripts/downstream_ci_guard_lib.py +222 -0
- package/template/scripts/enforce-triad-hot-surface.py +135 -8
- package/template/scripts/readme_feature_coverage_lib.py +608 -0
- package/template/scripts/uat_probe_lib.py +317 -0
- package/template/scripts/validate_readme_feature_coverage.py +140 -0
|
@@ -79,12 +79,15 @@ jobs:
|
|
|
79
79
|
|
|
80
80
|
- name: No commands set
|
|
81
81
|
if: ${{ steps.runbook.outputs.TEST_COMMAND == '' && steps.runbook.outputs.LINT_COMMAND == '' && steps.runbook.outputs.TYPECHECK_COMMAND == '' }}
|
|
82
|
-
run: echo "
|
|
82
|
+
run: echo "no tests configured yet"
|
|
83
83
|
|
|
84
84
|
- name: Summarise results
|
|
85
85
|
if: always()
|
|
86
86
|
run: |
|
|
87
87
|
echo "### CI Results" >> "$GITHUB_STEP_SUMMARY"
|
|
88
|
+
if [ "${{ steps.runbook.outputs.TEST_COMMAND }}" = "" ] && [ "${{ steps.runbook.outputs.LINT_COMMAND }}" = "" ] && [ "${{ steps.runbook.outputs.TYPECHECK_COMMAND }}" = "" ]; then
|
|
89
|
+
echo "**no tests configured yet**" >> "$GITHUB_STEP_SUMMARY"
|
|
90
|
+
fi
|
|
88
91
|
echo "| Step | Result |" >> "$GITHUB_STEP_SUMMARY"
|
|
89
92
|
echo "|------|--------|" >> "$GITHUB_STEP_SUMMARY"
|
|
90
93
|
echo "| Test | ${{ steps.test.outcome || 'skipped' }} |" >> "$GITHUB_STEP_SUMMARY"
|
|
@@ -189,116 +192,3 @@ jobs:
|
|
|
189
192
|
echo " 2. Run: bash scripts/validate-and-push.sh"
|
|
190
193
|
echo " (or: powershell scripts/validate-and-push.ps1)"
|
|
191
194
|
echo " 3. Fix failures, the script loops until green, then pushes."
|
|
192
|
-
|
|
193
|
-
# ── npm package test (Ubuntu) ──────────────────────────────────────
|
|
194
|
-
npm-test:
|
|
195
|
-
runs-on: ubuntu-latest
|
|
196
|
-
steps:
|
|
197
|
-
- uses: actions/checkout@v4
|
|
198
|
-
- uses: actions/setup-node@v4
|
|
199
|
-
with:
|
|
200
|
-
node-version: "20"
|
|
201
|
-
- name: npm pack
|
|
202
|
-
run: |
|
|
203
|
-
npm pack
|
|
204
|
-
TGZ=$(ls -t its-magic-*.tgz 2>/dev/null | head -1)
|
|
205
|
-
echo "TGZ=$TGZ" >> "$GITHUB_ENV"
|
|
206
|
-
echo "Package created: $TGZ"
|
|
207
|
-
- name: Install globally from tarball
|
|
208
|
-
run: npm install -g "$TGZ"
|
|
209
|
-
- name: Smoke test - help
|
|
210
|
-
run: its-magic --help
|
|
211
|
-
- name: Smoke test - install into temp dir
|
|
212
|
-
run: |
|
|
213
|
-
TEST_DIR=$(mktemp -d)
|
|
214
|
-
its-magic --target "$TEST_DIR" --mode missing --create
|
|
215
|
-
FAIL=0
|
|
216
|
-
for f in \
|
|
217
|
-
".cursor/commands/intake.md" \
|
|
218
|
-
".cursor/rules/core.mdc" \
|
|
219
|
-
".cursor/hooks.json" \
|
|
220
|
-
".cursor/scratchpad.md" \
|
|
221
|
-
"docs/engineering/runbook.md"; do
|
|
222
|
-
if [ -f "$TEST_DIR/$f" ]; then
|
|
223
|
-
echo "PASS: $f"
|
|
224
|
-
else
|
|
225
|
-
echo "FAIL: $f"
|
|
226
|
-
FAIL=1
|
|
227
|
-
fi
|
|
228
|
-
done
|
|
229
|
-
rm -rf "$TEST_DIR"
|
|
230
|
-
exit $FAIL
|
|
231
|
-
- name: Cleanup
|
|
232
|
-
if: always()
|
|
233
|
-
run: npm uninstall -g its-magic || true
|
|
234
|
-
|
|
235
|
-
# ── Homebrew formula test (macOS) ──────────────────────────────────
|
|
236
|
-
brew-test:
|
|
237
|
-
runs-on: macos-latest
|
|
238
|
-
steps:
|
|
239
|
-
- uses: actions/checkout@v4
|
|
240
|
-
- name: Validate formula syntax
|
|
241
|
-
run: brew style packaging/homebrew/its-magic.rb || true
|
|
242
|
-
- name: Test installer.sh
|
|
243
|
-
run: |
|
|
244
|
-
TEST_DIR=$(mktemp -d)
|
|
245
|
-
sh installer.sh --target "$TEST_DIR" --mode missing --create
|
|
246
|
-
FAIL=0
|
|
247
|
-
for f in \
|
|
248
|
-
".cursor/commands/intake.md" \
|
|
249
|
-
".cursor/rules/core.mdc" \
|
|
250
|
-
".cursor/hooks.json" \
|
|
251
|
-
".cursor/scratchpad.md" \
|
|
252
|
-
"docs/engineering/runbook.md"; do
|
|
253
|
-
if [ -f "$TEST_DIR/$f" ]; then
|
|
254
|
-
echo "PASS: $f"
|
|
255
|
-
else
|
|
256
|
-
echo "FAIL: $f"
|
|
257
|
-
FAIL=1
|
|
258
|
-
fi
|
|
259
|
-
done
|
|
260
|
-
rm -rf "$TEST_DIR"
|
|
261
|
-
exit $FAIL
|
|
262
|
-
|
|
263
|
-
# ── Chocolatey package test (Windows) ──────────────────────────────
|
|
264
|
-
choco-test:
|
|
265
|
-
runs-on: windows-latest
|
|
266
|
-
steps:
|
|
267
|
-
- uses: actions/checkout@v4
|
|
268
|
-
- name: Validate choco pack
|
|
269
|
-
shell: powershell
|
|
270
|
-
run: |
|
|
271
|
-
Push-Location packaging/chocolatey
|
|
272
|
-
choco pack
|
|
273
|
-
$nupkg = Get-ChildItem -Filter "*.nupkg" | Select-Object -First 1
|
|
274
|
-
if ($nupkg) {
|
|
275
|
-
Write-Host "PASS: Package created - $($nupkg.Name)"
|
|
276
|
-
} else {
|
|
277
|
-
Write-Host "FAIL: No .nupkg created"
|
|
278
|
-
exit 1
|
|
279
|
-
}
|
|
280
|
-
Pop-Location
|
|
281
|
-
- name: Test installer.ps1
|
|
282
|
-
shell: powershell
|
|
283
|
-
run: |
|
|
284
|
-
$testDir = Join-Path $env:TEMP "its-magic-ci-test"
|
|
285
|
-
& .\installer.ps1 -Target $testDir -Mode missing -Create
|
|
286
|
-
$fail = 0
|
|
287
|
-
$files = @(
|
|
288
|
-
".cursor\commands\intake.md",
|
|
289
|
-
".cursor\rules\core.mdc",
|
|
290
|
-
".cursor\hooks.json",
|
|
291
|
-
".cursor\scratchpad.md",
|
|
292
|
-
"docs\engineering\runbook.md"
|
|
293
|
-
)
|
|
294
|
-
foreach ($f in $files) {
|
|
295
|
-
$fp = Join-Path $testDir $f
|
|
296
|
-
if (Test-Path $fp) {
|
|
297
|
-
Write-Host "PASS: $f"
|
|
298
|
-
} else {
|
|
299
|
-
Write-Host "FAIL: $f"
|
|
300
|
-
$fail = 1
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
Remove-Item -Recurse -Force $testDir
|
|
304
|
-
exit $fail
|
package/template/README.md
CHANGED
|
@@ -24,6 +24,28 @@ with pause/resume, decision gates, and persistent artifacts.
|
|
|
24
24
|
- Built-in benchmarks (live, prompted, headless).
|
|
25
25
|
- Multiplatform distribution (npm, Chocolatey, Homebrew).
|
|
26
26
|
|
|
27
|
+
<!-- readme-feature-coverage-catalog -->
|
|
28
|
+
|
|
29
|
+
### Feature coverage catalog (US-0091)
|
|
30
|
+
|
|
31
|
+
- `/bin` — POSIX npm installer + Linux remote test targets (WSL / SSH / Docker) (`US-0084`).
|
|
32
|
+
- `/choco` — Configurable Multi-Target Release Publish with Confirmation Gate (`US-0054`).
|
|
33
|
+
- `/devops` — First-Class Bug Issue Workflow (Open/Closed) (`US-0079`).
|
|
34
|
+
- `/engineering` — Agent-Driven Codebase Map Bootstrap (`US-0082`).
|
|
35
|
+
- `/engineering` — Remote Runtime Connectivity Contract for QA/Release/Publish (`US-0064`).
|
|
36
|
+
- `/install` — Template/install payload omits intake gate scripts (`BUG-0001`).
|
|
37
|
+
- `/intake` — Optional Caveman-style input compression (safe file scope) (`US-0090`).
|
|
38
|
+
- `/lint` — CI/CD Workflows (`US-0007`).
|
|
39
|
+
- `/or` — Cursor Caveman mode (scratchpad-configurable terse responses) (`US-0089`).
|
|
40
|
+
- `/push` — Multiplatform Distribution (`US-0009`).
|
|
41
|
+
- `/run-tests` — Baseline Regression Cleanup for Installer and Version Sync Checks (`US-0074`).
|
|
42
|
+
- `/template` — End-to-End Lifecycle QA for `its-magic` Install/Upgrade/Clean (`US-0041`).
|
|
43
|
+
- `/upgrade` — Missing scripts still occur on install modes missing/upgrade (`BUG-0003`).
|
|
44
|
+
- `/usr` — Global Linux install fails: empty `install_include_paths` when manifest is CRLF (`BUG-0008`).
|
|
45
|
+
- `/workdir` — installer.sh fails in shell path with `set: Illegal option -` (`BUG-0004`).
|
|
46
|
+
- `MIGRATION` scratchpad flag — Smart Upgrade Mode (`US-0018`).
|
|
47
|
+
- `US-0016` scratchpad flag — Homebrew Version Sync (`US-0016`).
|
|
48
|
+
|
|
27
49
|
## Setup
|
|
28
50
|
|
|
29
51
|
its-magic is an installer you run once per repo. It copies the AI dev team
|
|
@@ -1105,6 +1127,68 @@ push / PR ──> checks ──> PASS ──> done
|
|
|
1105
1127
|
Auto-fix commits appear as `ci: auto-fix attempt N/3`. After 3 retries the
|
|
1106
1128
|
workflow stops and points you to `scripts/validate-and-push` for local fixing.
|
|
1107
1129
|
|
|
1130
|
+
<!-- readme-feature-coverage-catalog -->
|
|
1131
|
+
|
|
1132
|
+
### Feature coverage catalog (US-0091)
|
|
1133
|
+
|
|
1134
|
+
- `/acceptance` — Mandatory Intake Question Packs for First and Small Intakes (`US-0068`).
|
|
1135
|
+
- `/ask` — /ask Command: Context-Aware Questions Without Workflow (`US-0020`).
|
|
1136
|
+
- `/ask` — Context Compaction and Tiered Token-Cost Optimization Mode (`US-0053`).
|
|
1137
|
+
- `/auto` — Configurable Auto Phase Selection Policy (`US-0070`).
|
|
1138
|
+
- `/auto` — Continuous `/auto` Backlog-Drain Mode with Fine-Tune Switches (`US-0044`).
|
|
1139
|
+
- `/auto` — Fresh Subagent Context Per Phase and /auto Orchestration (`US-0023`).
|
|
1140
|
+
- `/auto` — Mid-Process `/auto` Continuation with Deterministic Resume Point (`US-0037`).
|
|
1141
|
+
- `/auto` — Strict Phase Role Enforcement in /auto Orchestration (`US-0069`).
|
|
1142
|
+
- `/auto` — Strict Runtime Proof for Per-Phase Subagent Isolation (`US-0056`).
|
|
1143
|
+
- `/auto` — Token-Cost Hardening for Orchestrated Runs (`US-0080`).
|
|
1144
|
+
- `/auto` — `/auto` continuous multi-phase loop + quiet drain (close one-phase-stop gap) (`US-0088`).
|
|
1145
|
+
- `/auto` — `/auto` executes phases without spawning required subagents (`BUG-0006`).
|
|
1146
|
+
- `/auto` — `/auto` explicit bug targeting (fix all OPEN bugs / fix `BUG-####`) (`US-0087`).
|
|
1147
|
+
- `/auto` — `/auto` fails with stale resume target after bug intake (`BUG-0005`).
|
|
1148
|
+
- `/check` — Optional Documentation Pack (Design Concept, CRS, Technical Spec) (`US-0031`).
|
|
1149
|
+
- `/confirmation` — Enforced Interactive Intake Question Evidence (`US-0078`).
|
|
1150
|
+
- `/connectivity` — Release Operator Run/Connect/Verify Hints Contract (`US-0067`).
|
|
1151
|
+
- `/decision` — Optional Fresh-Project ID Namespace Bootstrap (`US-0052`).
|
|
1152
|
+
- `/derived` — Deterministic Status Reconciliation Command (`US-0055`).
|
|
1153
|
+
- `/developer-dense` — Documentation Audience Profiles and Dual README Strategy (`US-0077`).
|
|
1154
|
+
- `/docs` — Installer-Owned `its_magic/` Folder for Framework Metadata (`US-0062`).
|
|
1155
|
+
- `/engineering` — Deterministic Context Slimming and Archive Enforcement Across Core Artifacts (`US-0072`).
|
|
1156
|
+
- `/engineering` — Deterministic State Hot-Surface Rollover and Archive Enforcement (`US-0060`).
|
|
1157
|
+
- `/engineering` — OS-Aware Runbook Command Auto-Bootstrap with Verified Quality Gates (`US-0063`).
|
|
1158
|
+
- `/flag` — Release Gate for Command/Flag Documentation Delta (`US-0030`).
|
|
1159
|
+
- `/intake` — Critical Evaluation in Intake and Architecture (`US-0021`).
|
|
1160
|
+
- `/intake` — Deterministic Intake Runtime Capability Guard and Single-Writer Drift Safety (`US-0059`).
|
|
1161
|
+
- `/intake` — Multi-Repo and Contract Compatibility Observability (`US-0034`).
|
|
1162
|
+
- `/intake` — intake evidence records asked questions that were never asked (`BUG-0007`).
|
|
1163
|
+
- `/integration` — Generated Test Scaffolding and Auto-Run Contract (`US-0066`).
|
|
1164
|
+
- `/managed` — Runtime QA Autopilot for Generated Projects (`US-0065`).
|
|
1165
|
+
- `/new` — First-Intake Full-Plan Coverage and Story-Map Gate (`US-0081`).
|
|
1166
|
+
- `/order` — Deterministic Artifact Ordering and Write Discipline (`US-0058`).
|
|
1167
|
+
- `/phases` — Cross-Phase Artifact Ownership Guard and Deterministic Archive Control (`US-0061`).
|
|
1168
|
+
- `/planning` — User-Visible Internal Metadata Sanitization Guard (`US-0071`).
|
|
1169
|
+
- `/product` — Backlog Reconciliation Gate for Released Sprints (`US-0043`).
|
|
1170
|
+
- `/push` — Phase-Triggered Sync Policy with Guarded Auto-Push (`US-0038`).
|
|
1171
|
+
- `/release` — Enforced Per-Phase Subagent Isolation with Audit Gate (`US-0048`).
|
|
1172
|
+
- `/release` — Legacy DONE-Story Acceptance/Traceability Backfill Guard (`US-0049`).
|
|
1173
|
+
- `/release` — Per-Sprint Release Notes and Release Queue Tracker (`US-0040`).
|
|
1174
|
+
- `/release` — Release Findings Artifact and Post-QA Issue Workflow (`US-0042`).
|
|
1175
|
+
- `/release` — Release Gate Tightening for Check-In Tests and QA/UAT Completion (`US-0039`).
|
|
1176
|
+
- `/remote` — Automation-driven remote execution selection (Docker / SSH / NL container intent) (`US-0086`).
|
|
1177
|
+
- `/remote` — Gitignored `.env` for remote and release connectivity (no AI read) (`US-0085`).
|
|
1178
|
+
- `/repetitive` — Delegable Intake Clarification Without Hard Blocks (`US-0083`).
|
|
1179
|
+
- `/research` — Knowledge Curation & Early Research (`US-0029`).
|
|
1180
|
+
- `/risk` — Intelligent Intake Decomposition and Risk-Aware PO Questioning (`US-0051`).
|
|
1181
|
+
- `/scratchpad` — Executable Scratchpad-Driven Sync and Auto-Push Wiring (`US-0076`).
|
|
1182
|
+
- `/scratchpad` — Scratchpad Delivery Simplification (Example-Only Install Policy) (`US-0073`).
|
|
1183
|
+
- `/scratchpad` — Upgrade Scratchpad Example–First Refresh (Fix Example Drift vs Materialized Baseline) (`US-0075`).
|
|
1184
|
+
- `/scratchpad` — Upgrade-Safe Scratchpad Example Refresh and Parity (`US-0057`).
|
|
1185
|
+
- `/sprint-plan` — Explicit `/sprint-plan --bulk` Mode (`US-0046`).
|
|
1186
|
+
- `/sprint-plan` — Sprint Sizing Rules and Configurable Sprint Planning (`US-0022`).
|
|
1187
|
+
- `/story` — Optional Feature User Guide Generation (`US-0032`).
|
|
1188
|
+
- `/uat` — UAT Artifact Lifecycle and Ownership (`US-0027`).
|
|
1189
|
+
- `SKILL` scratchpad flag — Skill and Templates (`US-0004`).
|
|
1190
|
+
- `US-0001` scratchpad flag — Core Workflow Commands (`US-0001`).
|
|
1191
|
+
|
|
1108
1192
|
## Walkthrough examples
|
|
1109
1193
|
|
|
1110
1194
|
### Example 1: New feature from idea
|
|
@@ -1240,6 +1324,35 @@ Reliable pattern:
|
|
|
1240
1324
|
- `decisions/`: decision records.
|
|
1241
1325
|
- `.github/workflows/`: CI/CD templates.
|
|
1242
1326
|
|
|
1327
|
+
<!-- readme-feature-coverage-catalog -->
|
|
1328
|
+
|
|
1329
|
+
### Feature coverage catalog (US-0091)
|
|
1330
|
+
|
|
1331
|
+
- `/evidence` — Backlog-to-Sprint Traceability Contract (`US-0025`).
|
|
1332
|
+
- `/exit` — Milestone Lifecycle Definition and Exit Criteria (`US-0026`).
|
|
1333
|
+
- `/field` — Official Remote Config Template, Docs, and Fail-Fast Validation (`US-0036`).
|
|
1334
|
+
- `/installer` — Runbook Completion (`US-0015`).
|
|
1335
|
+
- `/intake` — Component-Scoped Execution Mode with Protection Guards (`US-0035`).
|
|
1336
|
+
- `/intake` — Configurable Guided Intake Behavior (`US-0033`).
|
|
1337
|
+
- `/map-codebase` — map-codebase does not write codebase-map in fresh repos (`BUG-0002`).
|
|
1338
|
+
- `/memory-audit` — Memory Drift Audit Command (`US-0024`).
|
|
1339
|
+
- `/product` — Canonical Story Status Source + Global Drift Guard (`US-0045`).
|
|
1340
|
+
- `/product` — Clean Install Hygiene and Complete Clean-Repo Coverage (`US-0050`).
|
|
1341
|
+
- `/security-review` — Security & Compliance Review Agent (`US-0028`).
|
|
1342
|
+
- `/skip` — Explicit Bulk Execute Orchestration Mode (`US-0047`).
|
|
1343
|
+
- `/strings` — Clean Placeholder Content from Templates and Active Files (`US-0019`).
|
|
1344
|
+
- `/write` — Artifact Templates and Starter Docs (`US-0006`).
|
|
1345
|
+
- `AUTO_FLOW_MODE` scratchpad flag — Automation Modes (`US-0011`).
|
|
1346
|
+
- `README` scratchpad flag — Voice Input Documentation (`US-0010`).
|
|
1347
|
+
- `TEAM_MODE` scratchpad flag — Team Mode (`US-0013`).
|
|
1348
|
+
- `US-0002` scratchpad flag — AI Behavior Rules (`US-0002`).
|
|
1349
|
+
- `US-0003` scratchpad flag — Subagent Definitions (`US-0003`).
|
|
1350
|
+
- `US-0005` scratchpad flag — Hook System (`US-0005`).
|
|
1351
|
+
- `US-0008` scratchpad flag — CLI Installer (`US-0008`).
|
|
1352
|
+
- `US-0012` scratchpad flag — Benchmark Suite (`US-0012`).
|
|
1353
|
+
- `US-0014` scratchpad flag — Quality Chain (3-Layer) (`US-0014`).
|
|
1354
|
+
- `US-0017` scratchpad flag — Template Drift Guard (`US-0017`).
|
|
1355
|
+
|
|
1243
1356
|
## Developer and release deep-dive
|
|
1244
1357
|
|
|
1245
1358
|
### CI/CD via runbook
|
|
@@ -772,12 +772,55 @@ script or manual re-invocation with `start-from` / refreshed `resume_brief`) is
|
|
|
772
772
|
`stop_reason` vocabulary: `completed`, `decision_gate`, `missing_input`,
|
|
773
773
|
`pause_request`, `loop_max`, `error`, `blocked`.
|
|
774
774
|
|
|
775
|
+
### Full-autonomy stop matrix (US-0092)
|
|
776
|
+
|
|
777
|
+
**`AUTO_FLOW_MODE=full_autonomy`** enables **`scripts/auto_outer_driver.py`**
|
|
778
|
+
(spawn-only outer driver). **TOKEN_PROFILE controls context breadth / token cost only**
|
|
779
|
+
— never automation level, drain, or outer-driver invocation.
|
|
780
|
+
|
|
781
|
+
| Condition | US-0088 | `full_autonomy` delta | Operator notify |
|
|
782
|
+
|-----------|---------|------------------------|-----------------|
|
|
783
|
+
| Next phase, no hard stop | Continue inner `/auto` | Outer driver **re-invokes** when Cursor ends turn early | Quiet OK when `AUTO_QUIET=1` |
|
|
784
|
+
| `decision_gate` | Hard stop | **No change — hard** | Always |
|
|
785
|
+
| Unrecoverable `error` | Hard stop | **No change — hard** | Always |
|
|
786
|
+
| Critical `missing_input` | Hard stop | **No change — hard** | Always |
|
|
787
|
+
| Transient `missing_input` (recoverable) | Hard stop | **Relaxable** — bounded block-retry | Notify on cap |
|
|
788
|
+
| `pause_request` | Hard stop | **No change — hard** | Always |
|
|
789
|
+
| `loop_max` | Hard stop | **No change — hard** | Always |
|
|
790
|
+
| `blocked` — transient/sync | Hard stop | **Relaxable** when recoverable | Notify on cap |
|
|
791
|
+
| `blocked` — isolation/strict-proof/ownership | Hard stop | **No change — hard** | Always |
|
|
792
|
+
| UAT/QA fail | Hard stop (operator) | **Relaxable** when `AUTO_IMPLEMENTATION_LOOP=1` | Notify on cap |
|
|
793
|
+
| Segment complete + `AUTO_BACKLOG_DRAIN=1` | Advance (may need manual re-`/auto`) | **Drain-advance-without-pause** — immediate next item | Segment handoff notify |
|
|
794
|
+
| `BACKLOG_MAX_STORIES_REACHED` | Hard stop | **No change — hard** | Always |
|
|
795
|
+
| `AUTO_SCHEDULER_CONFLICT` | Hard stop | **No change — hard** | Always |
|
|
796
|
+
| `RELEASE_PUBLISH_MODE=auto` | Explicit opt-in | **No change — hard default-off** | Always on publish |
|
|
797
|
+
| Security deny (`.env`, intake mutation) | Hard deny | **No change — hard** | Always |
|
|
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.
|
|
801
|
+
|
|
802
|
+
### Block-retry ledger + cap interaction (US-0092)
|
|
803
|
+
|
|
804
|
+
Append-only **`handoffs/auto_block_retry/<orchestrator_run_id>.jsonl`** — names-only;
|
|
805
|
+
no secrets. Cap interaction:
|
|
806
|
+
|
|
807
|
+
| Cap | Scope |
|
|
808
|
+
|-----|-------|
|
|
809
|
+
| `AUTO_LOOP_MAX_CYCLES` | Outer-driver `/auto` invocations (incl. drain advances) |
|
|
810
|
+
| `AUTO_IMPLEMENTATION_LOOP` | Inner `execute`↔`qa`↔`verify-work` when `1` |
|
|
811
|
+
| `AUTO_BLOCK_RETRY_MAX` | Per `(story_id, stop_reason)` recoverable retries |
|
|
812
|
+
| `AUTO_BACKLOG_MAX_STORIES` | Drain breadth — outer driver exit **4** |
|
|
813
|
+
|
|
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.
|
|
817
|
+
|
|
775
818
|
### `AUTO_QUIET` vs `TOKEN_PROFILE` (US-0088 / AC-2)
|
|
776
819
|
|
|
777
820
|
| Key | Values | Role |
|
|
778
821
|
|-----|--------|------|
|
|
779
822
|
| `AUTO_QUIET` | `0` \| `1` (default `0`) | `1` = suppress routine per-phase success chatter; must **not** suppress `decision_gate`, errors, pause, `loop_max`, `blocked`, or missing inputs. |
|
|
780
|
-
| `TOKEN_PROFILE` | `lean` \| `balanced` \| `full` |
|
|
823
|
+
| `TOKEN_PROFILE` | `lean` \| `balanced` \| `full` | **TOKEN_PROFILE controls context breadth / token cost only** — **DEC-0035** / **US-0080** / **US-0092**; **orthogonal** to `AUTO_QUIET`, drain, and outer-driver invocation. |
|
|
781
824
|
|
|
782
825
|
### `TOKEN_PROFILE` × `CAVEMAN_MODE` non-substitution (US-0089 / DEC-0072 §1)
|
|
783
826
|
|
|
@@ -32,6 +32,12 @@ scripts/remote_config_summary.py
|
|
|
32
32
|
scripts/guard_installer_publish.py
|
|
33
33
|
scripts/enforce-triad-hot-surface.py
|
|
34
34
|
scripts/caveman_compress_input.py
|
|
35
|
+
scripts/readme_feature_coverage_lib.py
|
|
36
|
+
scripts/validate_readme_feature_coverage.py
|
|
37
|
+
scripts/check_downstream_ci_guard.py
|
|
38
|
+
scripts/downstream_ci_guard_lib.py
|
|
39
|
+
scripts/auto_outer_driver.py
|
|
40
|
+
scripts/uat_probe_lib.py
|
|
35
41
|
.github/workflows
|
|
36
42
|
README.md
|
|
37
43
|
its_magic
|
|
@@ -59,6 +65,12 @@ scripts/remote_config_summary.py
|
|
|
59
65
|
scripts/guard_installer_publish.py
|
|
60
66
|
scripts/enforce-triad-hot-surface.py
|
|
61
67
|
scripts/caveman_compress_input.py
|
|
68
|
+
scripts/readme_feature_coverage_lib.py
|
|
69
|
+
scripts/validate_readme_feature_coverage.py
|
|
70
|
+
scripts/check_downstream_ci_guard.py
|
|
71
|
+
scripts/downstream_ci_guard_lib.py
|
|
72
|
+
scripts/auto_outer_driver.py
|
|
73
|
+
scripts/uat_probe_lib.py
|
|
62
74
|
.github/workflows/ci.yml
|
|
63
75
|
.github/workflows/deploy.yml
|
|
64
76
|
its_magic
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"affinity_version": 1,
|
|
3
|
+
"rules": [
|
|
4
|
+
{
|
|
5
|
+
"dev_h2": "Workflow",
|
|
6
|
+
"root_h2": "Commands and workflow",
|
|
7
|
+
"tag": "slash_command"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"dev_h2": "Quality gates",
|
|
11
|
+
"root_h2": "Other useful capabilities",
|
|
12
|
+
"tag": "scratchpad_mode"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"dev_h2": "Architecture notes",
|
|
16
|
+
"root_h2": "Features",
|
|
17
|
+
"tag": "distribution"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"dev_h2": "Quality gates",
|
|
21
|
+
"root_h2": "Commands and workflow",
|
|
22
|
+
"tag": "release_gate"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"dev_h2": "Engineering decisions",
|
|
26
|
+
"root_h2": "Other useful capabilities",
|
|
27
|
+
"tag": "governance"
|
|
28
|
+
}
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -125,6 +125,48 @@ after template upgrades if needed.
|
|
|
125
125
|
|
|
126
126
|
Normative H2 titles and matrix: `docs/engineering/architecture.md` (`# US-0077`).
|
|
127
127
|
|
|
128
|
+
## README feature coverage validation (US-0091 / DEC-0074)
|
|
129
|
+
|
|
130
|
+
**Goal:** ensure every DONE user-visible backlog item (`US-xxxx` / `BUG-xxxx` with
|
|
131
|
+
`user_visible: true`) has operator blurbs in root `README.md` and traceability rows in
|
|
132
|
+
`docs/developer/README.md`, without inventing new `USER_*` / `DEV_*` H2 literals
|
|
133
|
+
(**DEC-0059** composes; **US-0030** delta gate unchanged).
|
|
134
|
+
|
|
135
|
+
### Delta vs static doc gates
|
|
136
|
+
|
|
137
|
+
| Gate | Question | Remediation |
|
|
138
|
+
|------|----------|-------------|
|
|
139
|
+
| **US-0030** (delta) | Did this sprint change commands/flags without README/runbook updates? | Update command docs for changed surfaces; agent checklist in `/release` step 3 family. |
|
|
140
|
+
| **US-0091** (static) | Is every DONE user-visible item documented in the README family? | Backfill root + DEV shard; set `user_visible:` marker; run validator `--report`. |
|
|
141
|
+
|
|
142
|
+
### Scratchpad key
|
|
143
|
+
|
|
144
|
+
- `README_FEATURE_COVERAGE_ENFORCE`: `0` \| `1` (default `0` until backfill completes).
|
|
145
|
+
- When `0`: `/release` step **3f** records `skipped` evidence; migration heuristic H1–H8
|
|
146
|
+
may classify unset `user_visible` during backfill.
|
|
147
|
+
- When `1`: explicit `user_visible:` required on all DONE items; heuristic disabled;
|
|
148
|
+
`/release` runs blocking validator.
|
|
149
|
+
|
|
150
|
+
**Activation (same commit as backfill):** complete audit + three-file backfill → explicit
|
|
151
|
+
`user_visible:` markers → verify `--report` shows `coverage_missing: []` → flip `0` → `1`.
|
|
152
|
+
|
|
153
|
+
### Commands
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
python scripts/validate_readme_feature_coverage.py --self-test
|
|
157
|
+
python scripts/validate_readme_feature_coverage.py --repo . --report
|
|
158
|
+
python scripts/validate_readme_feature_coverage.py --repo . --audit-out docs/engineering/context/readme-feature-coverage-audit.json
|
|
159
|
+
python scripts/validate_readme_feature_coverage.py --repo . --enforce
|
|
160
|
+
python scripts/check_intake_template_parity.py --scope=readme-feature-coverage
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Reason codes: `README_FEATURE_COVERAGE_BLOCKED`, `README_FEATURE_COVERAGE_GAP:<id>`,
|
|
164
|
+
`README_FEATURE_COVERAGE_PARITY_FAIL`, `README_FEATURE_COVERAGE_INPUT_INVALID`,
|
|
165
|
+
`README_FEATURE_COVERAGE_PROFILE_VIOLATION`.
|
|
166
|
+
|
|
167
|
+
Normative predicate + affinity manifest: `decisions/DEC-0074.md`,
|
|
168
|
+
`docs/engineering/context/readme-section-affinity.json`.
|
|
169
|
+
|
|
128
170
|
## User-visible internal metadata guard (US-0071 / DEC-0053)
|
|
129
171
|
|
|
130
172
|
**Goal:** keep planning-shaped identifiers out of **operator-visible software
|
|
@@ -380,11 +422,10 @@ Tiered token-cost control is explicit and defaulted in `.cursor/scratchpad.md`:
|
|
|
380
422
|
|
|
381
423
|
Deterministic profile semantics:
|
|
382
424
|
|
|
383
|
-
- `lean`:
|
|
384
|
-
autonomous loops, broad-context retrieval), while preserving mandatory
|
|
425
|
+
- `lean`: lowest context breadth / token cost defaults while preserving mandatory
|
|
385
426
|
quality/release gates.
|
|
386
|
-
- `balanced`:
|
|
387
|
-
- `full`:
|
|
427
|
+
- `balanced`: moderate context breadth / token cost.
|
|
428
|
+
- `full`: highest context breadth / token cost for complex/high-uncertainty work.
|
|
388
429
|
|
|
389
430
|
Manual override precedence:
|
|
390
431
|
|
|
@@ -399,7 +440,8 @@ Manual override precedence:
|
|
|
399
440
|
reasoning as phase input.
|
|
400
441
|
- **`start-from`**: use **`/auto start-from=<canonical_phase_id>`** when resuming so the
|
|
401
442
|
schedule intersection matches materialized **`resolved_phase_plan`** (**`DEC-0052`**).
|
|
402
|
-
- **`TOKEN_PROFILE`**:
|
|
443
|
+
- **`TOKEN_PROFILE`**: **TOKEN_PROFILE controls context breadth / token cost only**;
|
|
444
|
+
does **not** change automation level, drain, outer-driver invocation, or remove
|
|
403
445
|
isolation, strict-proof, role, or release gates.
|
|
404
446
|
- **Metrics**: append-only **`handoffs/token_cost_runs/<orchestrator_run_id>.md`** (or
|
|
405
447
|
**`.jsonl`**); copy path into **`token_cost_evidence_ref`** on **`state.md`** checkpoints.
|
|
@@ -458,8 +500,15 @@ Rollover fail-safe reason codes:
|
|
|
458
500
|
- `STATE_ARCHIVE_VERIFICATION_FAILED`
|
|
459
501
|
- `STATE_ARCHIVE_REQUIRED`
|
|
460
502
|
- `ARTIFACT_HOT_SURFACE_OVERSIZE`
|
|
503
|
+
- `ARCH_STORY_HEADING_LEVEL_INVALID`
|
|
461
504
|
- `CONTEXT_BUDGET_EXCEEDED`
|
|
462
505
|
|
|
506
|
+
**Architecture file blocked on rollover?** If story sections use legacy H2 `## US-xxxx`
|
|
507
|
+
headings, the archiver now recognizes them for rollover after **BUG-0010**. For new work,
|
|
508
|
+
`/architecture` must append H1 `# US-xxxx` (or `# BUG-xxxx` for defects). To converge an
|
|
509
|
+
existing repo, optionally normalize `## US-xxxx` → `# US-xxxx` manually (count decrease is
|
|
510
|
+
allowed; adding new `## US-` story headings is blocked).
|
|
511
|
+
|
|
463
512
|
### Minimal-read defaults by phase (bounded escalation)
|
|
464
513
|
|
|
465
514
|
Read `docs/engineering/phase-context.md` first, then the **required** paths for
|
|
@@ -1317,6 +1366,46 @@ success chatter. Non-suppressible notifications:
|
|
|
1317
1366
|
`AUTO_QUIET` is **orthogonal** to `TOKEN_PROFILE` (**DEC-0035** / **US-0080**):
|
|
1318
1367
|
`TOKEN_PROFILE` controls context breadth and token cost, not notification policy.
|
|
1319
1368
|
|
|
1369
|
+
### Full-autonomy outer driver (US-0092)
|
|
1370
|
+
|
|
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.
|
|
1374
|
+
|
|
1375
|
+
#### Enable and run (once per portfolio segment)
|
|
1376
|
+
|
|
1377
|
+
1. Set in merged scratchpad (`.cursor/scratchpad.md` + optional local overrides):
|
|
1378
|
+
- `AUTO_FLOW_MODE=full_autonomy`
|
|
1379
|
+
- Optional: `AUTO_BACKLOG_DRAIN=1`, `AUTO_BUG_QUEUE=1` (scheduler mutex per US-0087)
|
|
1380
|
+
- Caps: `AUTO_LOOP_MAX_CYCLES`, `AUTO_BACKLOG_MAX_STORIES`, `AUTO_BLOCK_RETRY_MAX` (default `3`)
|
|
1381
|
+
- Optional: `AUTO_OUTER_DRIVER_TIMEOUT_SECONDS` (unset = no timeout)
|
|
1382
|
+
2. Run once: `python scripts/auto_outer_driver.py --repo .`
|
|
1383
|
+
3. Interpret exit code (driver prints reason tokens on stderr):
|
|
1384
|
+
|
|
1385
|
+
| Exit | Meaning |
|
|
1386
|
+
|------|---------|
|
|
1387
|
+
| **0** | `completed` — segment/portfolio terminal per policy |
|
|
1388
|
+
| **1** | Hard stop — `decision_gate`, unrecoverable `error`, isolation/strict-proof, security deny |
|
|
1389
|
+
| **2** | Configuration — `AUTO_FLOW_MODE` not `full_autonomy` (`AUTO_FLOW_MODE_NOT_FULL_AUTONOMY`) |
|
|
1390
|
+
| **3** | `loop_max` — `AUTO_LOOP_MAX_CYCLES` exhausted |
|
|
1391
|
+
| **4** | `BACKLOG_MAX_STORIES_REACHED` / drain cap |
|
|
1392
|
+
| **5** | `pause_request` / `AUTO_PAUSE_REQUEST` |
|
|
1393
|
+
| **6** | `BLOCK_RETRY_CAP_EXHAUSTED` |
|
|
1394
|
+
| **124** | Hook/subprocess timeout |
|
|
1395
|
+
|
|
1396
|
+
`--dry-run` emits planned `/auto` hook invocations and drain-advance scheduling
|
|
1397
|
+
without side effects. `--invoke-cmd` overrides the default normative `/auto …` line.
|
|
1398
|
+
|
|
1399
|
+
#### Security (US-0092 / DEC-0078)
|
|
1400
|
+
|
|
1401
|
+
- **No** auto-read **`.env`** or secret paths.
|
|
1402
|
+
- **No** intake evidence mutation under automation.
|
|
1403
|
+
- **No** publish without **`RELEASE_PUBLISH_MODE=auto`** (explicit opt-in; default-off).
|
|
1404
|
+
- Block-retry ledger **`handoffs/auto_block_retry/<orchestrator_run_id>.jsonl`** is
|
|
1405
|
+
names-only — no secrets, no file contents.
|
|
1406
|
+
|
|
1407
|
+
UAT self-verify: **`scripts/uat_probe_lib.py`** shared by **`/verify-work`** and **`/qa`**.
|
|
1408
|
+
|
|
1320
1409
|
### Caveman mode (US-0089)
|
|
1321
1410
|
|
|
1322
1411
|
Optional response-side terse / imperative assistant voice. **Default off.**
|
|
@@ -1371,6 +1460,19 @@ vocabulary inherited from **US-0088** (`decision_gate`, `error`, `pause`,
|
|
|
1371
1460
|
`[INTAKE_EVIDENCE_VALIDATION_OK]`, `[SCRATCHPAD_PAIR_OK]`) also renders
|
|
1372
1461
|
byte-literal even at `CAVEMAN_LEVEL=ultra`.
|
|
1373
1462
|
|
|
1463
|
+
#### Voice compression levels
|
|
1464
|
+
|
|
1465
|
+
Compact before/after examples (full contract: `.cursor/rules/caveman.mdc`):
|
|
1466
|
+
|
|
1467
|
+
| Scenario | Level | Before | After |
|
|
1468
|
+
|----------|-------|--------|-------|
|
|
1469
|
+
| Technical explain | `full` | "The spawn-only orchestrator must dispatch a fresh subagent for each phase." | "Spawn-only orchestrator dispatches fresh subagent per phase. Next: run `/execute`." |
|
|
1470
|
+
| Destructive warning (auto-clarity break) | (pause) | "I will run `git push --force` to fix the remote." | "Destructive: `git push --force` rewrites remote history. Confirm branch and remote before proceeding." |
|
|
1471
|
+
|
|
1472
|
+
Normative voice-compression contract (precedence, drop rules, persistence,
|
|
1473
|
+
9-zone deferral): **`.cursor/rules/caveman.mdc`** — `## Voice compression
|
|
1474
|
+
(when CAVEMAN_MODE=1)`.
|
|
1475
|
+
|
|
1374
1476
|
### Caveman input compression (US-0090)
|
|
1375
1477
|
|
|
1376
1478
|
Optional **input-side** file compression. **Default off.** Operator-initiated,
|
|
@@ -1518,6 +1620,17 @@ Notify operator on segment handoff (non-routine, non-suppressible).
|
|
|
1518
1620
|
| `AUTO_SCHEDULER_CONFLICT` | Both `AUTO_BACKLOG_DRAIN=1` and `AUTO_BUG_QUEUE=1` without `bug-target=` argv | Supply explicit `bug-target=` or disable one scheduler |
|
|
1519
1621
|
| `BACKLOG_MAX_STORIES_REACHED` | Drain cap hit | Increase `AUTO_BACKLOG_MAX_STORIES` or run another `/auto` |
|
|
1520
1622
|
|
|
1623
|
+
### Downstream CI packaging job leak (BUG-0009 / DEC-0075)
|
|
1624
|
+
|
|
1625
|
+
**CI still runs its-magic packaging jobs?** Your project received a pre-fix workflow.
|
|
1626
|
+
Run **`its-magic --target <repo> --mode upgrade`** (or **`--mode clean`** then reinstall)
|
|
1627
|
+
to refresh `.github/workflows/ci.yml` from the corrected template. After upgrade, GitHub
|
|
1628
|
+
Actions should show only **`checks`** and **`auto-fix`** jobs — not `npm-test`,
|
|
1629
|
+
`brew-test`, or `choco-test`.
|
|
1630
|
+
|
|
1631
|
+
Scope reminder: fix applies to **new installs/upgrades**; stale repos heal on next upgrade
|
|
1632
|
+
(**US-0018**).
|
|
1633
|
+
|
|
1521
1634
|
## Explicit bulk sprint planning mode (US-0046)
|
|
1522
1635
|
|
|
1523
1636
|
`/sprint-plan` stays single-scope by default. Bulk planning is opt-in via
|