its-magic 0.1.2-42 → 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 +99 -4
- 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 +184 -0
- package/template/.cursor/scratchpad.local.example.md +257 -225
- 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 +1004 -934
- package/template/docs/engineering/context/installer-owned-paths.manifest +15 -0
- package/template/docs/engineering/context/readme-section-affinity.json +30 -0
- package/template/docs/engineering/runbook.md +2051 -1772
- package/template/scripts/auto_outer_driver.py +521 -0
- package/template/scripts/caveman_compress_input.py +903 -0
- package/template/scripts/check_downstream_ci_guard.py +67 -0
- package/template/scripts/check_intake_template_parity.py +99 -4
- 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
|