its-magic 0.1.2-9 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (232) hide show
  1. package/README.md +1602 -755
  2. package/bin/its-magic.js +121 -11
  3. package/bin/postinstall.js +21 -0
  4. package/installer.ps1 +759 -0
  5. package/installer.py +981 -0
  6. package/installer.sh +649 -0
  7. package/package.json +18 -14
  8. package/scripts/check_intake_template_parity.py +284 -0
  9. package/scripts/doc_profile_lib.py +415 -0
  10. package/scripts/guard_installer_publish.py +88 -0
  11. package/scripts/intake_bug_routing_guard.py +67 -0
  12. package/scripts/intake_evidence_lib.py +802 -0
  13. package/scripts/intake_evidence_validate.py +73 -0
  14. package/scripts/materialize_codebase_map.py +184 -0
  15. package/scripts/remote_config_summary.py +243 -0
  16. package/template/.cursor/agents/curator.mdc +35 -0
  17. package/template/.cursor/agents/dev.mdc +29 -0
  18. package/template/.cursor/agents/po.mdc +141 -0
  19. package/template/.cursor/agents/qa.mdc +28 -0
  20. package/template/.cursor/agents/release.mdc +28 -0
  21. package/template/.cursor/agents/security.mdc +98 -0
  22. package/template/.cursor/agents/tech-lead.mdc +57 -0
  23. package/template/.cursor/commands/architecture.md +127 -0
  24. package/template/.cursor/commands/ask.md +55 -0
  25. package/template/.cursor/commands/auto.md +533 -0
  26. package/template/.cursor/commands/discovery.md +47 -0
  27. package/template/.cursor/commands/execute.md +343 -0
  28. package/template/.cursor/commands/intake.md +323 -0
  29. package/template/.cursor/commands/map-codebase.md +46 -0
  30. package/template/.cursor/commands/memory-audit.md +175 -0
  31. package/template/.cursor/commands/milestone-complete.md +51 -0
  32. package/template/.cursor/commands/milestone-start.md +59 -0
  33. package/template/.cursor/commands/pause.md +64 -0
  34. package/{.cursor/commands/gsd-phase-context.md → template/.cursor/commands/phase-context.md} +6 -2
  35. package/template/.cursor/commands/plan-verify.md +34 -0
  36. package/template/.cursor/commands/qa.md +226 -0
  37. package/template/.cursor/commands/quick.md +41 -0
  38. package/template/.cursor/commands/refresh-context.md +82 -0
  39. package/template/.cursor/commands/release.md +505 -0
  40. package/template/.cursor/commands/research.md +49 -0
  41. package/template/.cursor/commands/resume.md +67 -0
  42. package/template/.cursor/commands/security-review.md +81 -0
  43. package/template/.cursor/commands/sprint-plan.md +103 -0
  44. package/template/.cursor/commands/status-reconcile.md +95 -0
  45. package/template/.cursor/commands/verify-work.md +152 -0
  46. package/template/.cursor/dev-environment.json.example +22 -0
  47. package/{.cursor → template/.cursor}/hooks/README.md +3 -2
  48. package/{.cursor/hooks/gsd-hook.py → template/.cursor/hooks/hook.py} +15 -6
  49. package/template/.cursor/hooks.json +26 -0
  50. package/template/.cursor/remote.json +31 -0
  51. package/template/.cursor/rules/caveman.mdc +184 -0
  52. package/template/.cursor/rules/coding-standards.mdc +39 -0
  53. package/template/.cursor/rules/core.mdc +111 -0
  54. package/template/.cursor/rules/handoffs.mdc +27 -0
  55. package/template/.cursor/rules/quality.mdc +49 -0
  56. package/template/.cursor/scratchpad.local.example.md +323 -0
  57. package/template/.cursor/scratchpad.md +324 -0
  58. package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/SKILL.md +2 -2
  59. package/template/.cursorignore +6 -0
  60. package/template/.env.example +28 -0
  61. package/template/.github/workflows/ci.yml +194 -0
  62. package/{.github → template/.github}/workflows/deploy.yml +5 -2
  63. package/template/.its-magic-version +1 -0
  64. package/template/README.md +1602 -0
  65. package/template/decisions/DEC-0001.md +11 -0
  66. package/template/decisions/DEC-0002.md +11 -0
  67. package/template/docs/developer/README.md +44 -0
  68. package/template/docs/engineering/architecture.md +9 -0
  69. package/template/docs/engineering/artifact-ordering-policy.md +48 -0
  70. package/template/docs/engineering/artifact-ownership-policy.md +57 -0
  71. package/template/docs/engineering/auto-orchestration-reference.md +1211 -0
  72. package/{docs → template/docs}/engineering/codebase-map.md +0 -5
  73. package/template/docs/engineering/compatibility-report.md +20 -0
  74. package/template/docs/engineering/compatibility-signals.md +7 -0
  75. package/template/docs/engineering/component-scope-report.md +16 -0
  76. package/template/docs/engineering/component-scope.md +19 -0
  77. package/template/docs/engineering/context/installer-owned-paths.manifest +96 -0
  78. package/template/docs/engineering/context/readme-section-affinity.json +30 -0
  79. package/template/docs/engineering/decisions.md +16 -0
  80. package/template/docs/engineering/legacy-drift-audit.md +21 -0
  81. package/template/docs/engineering/manifests/components/api-gateway.manifest.yaml +12 -0
  82. package/template/docs/engineering/manifests/registry.manifest.yaml +20 -0
  83. package/template/docs/engineering/manifests/repo.manifest.yaml +11 -0
  84. package/template/docs/engineering/phase-context.md +16 -0
  85. package/template/docs/engineering/release-targets.json +123 -0
  86. package/template/docs/engineering/research.md +29 -0
  87. package/template/docs/engineering/runbook.md +2320 -0
  88. package/template/docs/engineering/runtime-connectivity.md +81 -0
  89. package/template/docs/engineering/security-review.md +33 -0
  90. package/template/docs/engineering/spec-pack/README.md +20 -0
  91. package/template/docs/engineering/state-archive/README.md +15 -0
  92. package/template/docs/engineering/state.md +20 -0
  93. package/template/docs/engineering/status-normalization-report.md +19 -0
  94. package/template/docs/engineering/token-cost-parity-manifest.md +16 -0
  95. package/template/docs/engineering/us-0084-remote-e2e.md +44 -0
  96. package/template/docs/product/acceptance.md +1 -0
  97. package/template/docs/product/backlog.md +5 -0
  98. package/template/docs/product/vision.md +11 -0
  99. package/template/docs/user-guides/README.md +40 -0
  100. package/{handoffs → template/handoffs}/dev_to_qa.md +0 -3
  101. package/{handoffs → template/handoffs}/po_to_tl.md +0 -3
  102. package/{handoffs → template/handoffs}/qa_to_dev.md +1 -2
  103. package/template/handoffs/release_notes.md +51 -0
  104. package/template/handoffs/release_queue.md +47 -0
  105. package/template/handoffs/release_to_dev.md +31 -0
  106. package/template/handoffs/releases/Sxxxx-release-notes.md +62 -0
  107. package/template/handoffs/resume_brief.md +14 -0
  108. package/{handoffs → template/handoffs}/tl_to_dev.md +0 -2
  109. package/template/handoffs/token_cost_runs/README.md +26 -0
  110. package/template/its_magic/.its-magic-version +1 -0
  111. package/template/its_magic/README.md +9 -0
  112. package/template/scripts/auto_outer_driver.py +521 -0
  113. package/template/scripts/caveman_compress_input.py +903 -0
  114. package/template/scripts/check_downstream_ci_guard.py +67 -0
  115. package/template/scripts/check_intake_template_parity.py +284 -0
  116. package/template/scripts/check_token_cost_parity.py +69 -0
  117. package/template/scripts/dev_environment_lib.py +463 -0
  118. package/template/scripts/doc_profile_lib.py +415 -0
  119. package/template/scripts/downstream_ci_guard_lib.py +222 -0
  120. package/template/scripts/enforce-triad-hot-surface.py +753 -0
  121. package/template/scripts/guard_installer_publish.py +88 -0
  122. package/template/scripts/intake_bug_resume_brief_refresh.py +303 -0
  123. package/template/scripts/intake_bug_routing_guard.py +67 -0
  124. package/template/scripts/intake_evidence_lib.py +802 -0
  125. package/template/scripts/intake_evidence_validate.py +73 -0
  126. package/template/scripts/materialize_codebase_map.py +184 -0
  127. package/template/scripts/pack_json_validate.py +130 -0
  128. package/template/scripts/project_readme_coverage_lib.py +417 -0
  129. package/template/scripts/readme_feature_coverage_lib.py +608 -0
  130. package/template/scripts/remote_config_summary.py +243 -0
  131. package/template/scripts/sync_push_gates.py +198 -0
  132. package/template/scripts/token_cost_compare.py +40 -0
  133. package/template/scripts/token_cost_lib.py +108 -0
  134. package/template/scripts/uat_probe_lib.py +868 -0
  135. package/template/scripts/validate-and-push.ps1 +280 -0
  136. package/template/scripts/validate-and-push.sh +243 -0
  137. package/template/scripts/validate_doc_profile.py +103 -0
  138. package/template/scripts/validate_project_readme_coverage.py +151 -0
  139. package/template/scripts/validate_readme_feature_coverage.py +140 -0
  140. package/template/sprints/S0001/progress.md +1 -0
  141. package/template/sprints/S0001/qa-findings.md +9 -0
  142. package/template/sprints/S0001/release-findings.md +24 -0
  143. package/template/sprints/S0001/sprint.md +9 -0
  144. package/template/sprints/S0001/summary.md +7 -0
  145. package/template/sprints/S0001/tasks.md +1 -0
  146. package/template/sprints/S0001/uat.json +6 -0
  147. package/template/sprints/S0001/uat.md +5 -0
  148. package/template/sprints/quick/Q0001/summary.md +1 -0
  149. package/{sprints → template/sprints}/quick/Q0001/task.json +0 -1
  150. package/.cursor/agents/curator.mdc +0 -21
  151. package/.cursor/agents/dev.mdc +0 -20
  152. package/.cursor/agents/po.mdc +0 -19
  153. package/.cursor/agents/qa.mdc +0 -19
  154. package/.cursor/agents/release.mdc +0 -19
  155. package/.cursor/agents/tech-lead.mdc +0 -21
  156. package/.cursor/commands/gsd-architecture.md +0 -29
  157. package/.cursor/commands/gsd-auto.md +0 -27
  158. package/.cursor/commands/gsd-discovery.md +0 -27
  159. package/.cursor/commands/gsd-execute.md +0 -32
  160. package/.cursor/commands/gsd-intake.md +0 -28
  161. package/.cursor/commands/gsd-map-codebase.md +0 -25
  162. package/.cursor/commands/gsd-milestone-complete.md +0 -24
  163. package/.cursor/commands/gsd-milestone-start.md +0 -26
  164. package/.cursor/commands/gsd-pause.md +0 -25
  165. package/.cursor/commands/gsd-plan-verify.md +0 -26
  166. package/.cursor/commands/gsd-qa.md +0 -28
  167. package/.cursor/commands/gsd-quick.md +0 -24
  168. package/.cursor/commands/gsd-refresh-context.md +0 -26
  169. package/.cursor/commands/gsd-release.md +0 -29
  170. package/.cursor/commands/gsd-research.md +0 -28
  171. package/.cursor/commands/gsd-resume.md +0 -26
  172. package/.cursor/commands/gsd-sprint-plan.md +0 -30
  173. package/.cursor/commands/gsd-verify-work.md +0 -25
  174. package/.cursor/hooks.json +0 -26
  175. package/.cursor/plans/cursor-gsd-team-kit_8cfee9b8.plan.md +0 -57
  176. package/.cursor/remote.json +0 -18
  177. package/.cursor/rules/gsd-core.mdc +0 -18
  178. package/.cursor/rules/gsd-handoffs.mdc +0 -10
  179. package/.cursor/rules/gsd-quality.mdc +0 -15
  180. package/.cursor/scratchpad.md +0 -34
  181. package/.github/workflows/ci.yml +0 -47
  182. package/decisions/DEC-0001.md +0 -21
  183. package/decisions/DEC-0002.md +0 -21
  184. package/docs/engineering/architecture.md +0 -354
  185. package/docs/engineering/decisions.md +0 -6
  186. package/docs/engineering/research.md +0 -11
  187. package/docs/engineering/runbook.md +0 -32
  188. package/docs/engineering/state.md +0 -33
  189. package/docs/product/acceptance.md +0 -6
  190. package/docs/product/backlog.md +0 -7
  191. package/docs/product/vision.md +0 -46
  192. package/gsd-installer.ps1 +0 -189
  193. package/gsd-installer.py +0 -195
  194. package/gsd-installer.sh +0 -201
  195. package/handoffs/release_notes.md +0 -14
  196. package/handoffs/resume_brief.md +0 -8
  197. package/milestones/M0001/milestone.json +0 -7
  198. package/milestones/M0001/phases.json +0 -9
  199. package/milestones/M0001/progress.md +0 -3
  200. package/milestones/M0001/summary.md +0 -3
  201. package/scripts/generate-release-notes.ps1 +0 -74
  202. package/scripts/generate-release-notes.sh +0 -63
  203. package/scripts/release-all.ps1 +0 -423
  204. package/scripts/release-all.sh +0 -226
  205. package/sprints/S0001/progress.md +0 -4
  206. package/sprints/S0001/qa-findings.md +0 -113
  207. package/sprints/S0001/sprint.md +0 -70
  208. package/sprints/S0001/summary.md +0 -46
  209. package/sprints/S0001/tasks.md +0 -35
  210. package/sprints/S0001/uat.json +0 -8
  211. package/sprints/S0001/uat.md +0 -8
  212. package/sprints/quick/Q0001/summary.md +0 -3
  213. /package/{.cursor/rules/gsd-escalation.mdc → template/.cursor/rules/escalation.mdc} +0 -0
  214. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/acceptance.json +0 -0
  215. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/acceptance.md +0 -0
  216. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/architecture.json +0 -0
  217. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/architecture.md +0 -0
  218. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/decision.json +0 -0
  219. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/decision.md +0 -0
  220. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/handoff.json +0 -0
  221. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/handoff.md +0 -0
  222. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/milestone.json +0 -0
  223. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/phase-context.json +0 -0
  224. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/plan-verify.json +0 -0
  225. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/sprint.json +0 -0
  226. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/sprint.md +0 -0
  227. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/story.json +0 -0
  228. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/story.md +0 -0
  229. /package/{.cursor/skills/gsd-team → template/.cursor/skills/its-magic}/templates/uat.json +0 -0
  230. /package/{docs → template/docs}/engineering/context/phase-template.json +0 -0
  231. /package/{docs → template/docs}/engineering/dependencies.json +0 -0
  232. /package/{sprints → template/sprints}/S0001/plan-verify.json +0 -0
@@ -0,0 +1,64 @@
1
+ ---
2
+ description: "its-magic pause: write checkpoint and resume brief."
3
+ ---
4
+
5
+ # /pause
6
+
7
+ ## Subagents
8
+ - curator
9
+
10
+ ## Execution model
11
+ - Run `/pause` in a fresh Curator subagent context.
12
+ - After writing outputs, stop.
13
+
14
+ ## Isolation evidence write requirement (US-0048 / DEC-0029)
15
+
16
+ At the end of `/pause`, append an isolation evidence entry to
17
+ `docs/engineering/state.md`:
18
+
19
+ - `phase_id=pause`
20
+ - `role=curator`
21
+ - `fresh_context_marker=<new marker for this subagent>`
22
+ - `timestamp=<ISO UTC>`
23
+ - `evidence_ref=handoffs/resume_brief.md`
24
+
25
+ ## Inputs
26
+
27
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
28
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
29
+ full-file reads when a section heading exists.
30
+ - Current sprint progress and state
31
+ - Optional intent: immediate pause or graceful pause after current boundary
32
+
33
+ ## Outputs (artifacts)
34
+ - `docs/engineering/state.md`
35
+ - `sprints/S0001/progress.md`
36
+ - `handoffs/resume_brief.md`
37
+
38
+ ## Stop conditions
39
+ - Missing state or progress updates
40
+
41
+ ## Steps
42
+ 1. Write a short checkpoint of current work.
43
+ 2. Update sprint progress and state.
44
+ 3. Record deterministic continuation breadcrumbs in `docs/engineering/state.md`:
45
+ - `invocation_mode=auto|manual`
46
+ - `requested_start_from`
47
+ - `resolved_start_phase`
48
+ - `resolution_source`
49
+ - `resolution_status`
50
+ - `stop_reason=pause_request|manual_pause`
51
+ - `stop_phase`
52
+ - `timestamp`
53
+ 4. Write `handoffs/resume_brief.md` with next actions and canonical intended
54
+ resume phase (`intake|discovery|research|architecture|sprint-plan|plan-verify|execute|qa|verify-work|release|refresh-context`).
55
+ - Include isolation provenance (US-0048 / DEC-0029):
56
+ - `isolation_provenance_ref` pointing to the latest isolation evidence entry
57
+ in `docs/engineering/state.md`
58
+ - `resume_requires_fresh_context=1` (resume must run the next phase in a
59
+ fresh subagent and write new isolation evidence; no marker reuse)
60
+ 5. If pause metadata is stale or ambiguous, fail fast with:
61
+ `[AUTO_RESUME_ERROR] <code>: <summary>. Source=<source>. Fix: <action>.`
62
+ 6. If this pause was requested via `AUTO_PAUSE_REQUEST=1`, reset the flag to `0`
63
+ after checkpoint is complete.
64
+
@@ -1,14 +1,18 @@
1
1
  ---
2
- description: "GSD phase context: capture phase preferences and constraints."
2
+ description: "its-magic phase context: capture phase preferences and constraints."
3
3
  ---
4
4
 
5
- # /gsd-phase-context
5
+ # /phase-context
6
6
 
7
7
  ## Subagents
8
8
  - po
9
9
  - tech-lead
10
10
 
11
11
  ## Inputs
12
+
13
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
14
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
15
+ full-file reads when a section heading exists.
12
16
  - Phase name (intake, discovery, architecture, sprint-plan, execute, qa, release)
13
17
  - Preferences, constraints, UX requirements
14
18
 
@@ -0,0 +1,34 @@
1
+ ---
2
+ description: "its-magic plan verify: verify sprint tasks against acceptance."
3
+ ---
4
+
5
+ # /plan-verify
6
+
7
+ ## Subagents
8
+ - tech-lead
9
+
10
+ ## Execution model
11
+ - Run `/plan-verify` in a fresh Tech Lead subagent context.
12
+ - After writing outputs, stop and hand off to `/execute` in a new subagent/chat.
13
+
14
+ ## Inputs
15
+
16
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
17
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
18
+ full-file reads when a section heading exists.
19
+ - `sprints/S0001/tasks.md`
20
+ - `docs/product/acceptance.md`
21
+ - `docs/engineering/architecture.md`
22
+
23
+ ## Outputs (artifacts)
24
+ - `sprints/S0001/plan-verify.json`
25
+ - `docs/engineering/state.md`
26
+
27
+ ## Stop conditions
28
+ - Tasks do not cover acceptance criteria
29
+ - Decision gate triggered
30
+
31
+ ## Steps
32
+ 1. Check each acceptance criterion against tasks.
33
+ 2. Record gaps and required changes in `plan-verify.json`.
34
+ 3. Update state and handoff if needed.
@@ -0,0 +1,226 @@
1
+ ---
2
+ description: "its-magic QA: test plan, findings, verify fixes."
3
+ ---
4
+
5
+ # /qa
6
+
7
+ ## Subagents
8
+ - qa
9
+
10
+ ## Execution model
11
+ - Run `/qa` in a fresh QA subagent context.
12
+ - After writing outputs, stop and hand off to `/execute` (if issues) or
13
+ `/verify-work` (if clear) in a new subagent/chat.
14
+ - Each QA pass in the implementation loop must be a new QA subagent.
15
+
16
+ ## Isolation evidence write requirement (US-0048 / DEC-0029)
17
+
18
+ At the end of `/qa`, append an isolation evidence entry to
19
+ `docs/engineering/state.md`:
20
+
21
+ - `phase_id=qa`
22
+ - `role=qa`
23
+ - `fresh_context_marker=<new marker for this subagent>`
24
+ - `timestamp=<ISO UTC>`
25
+ - `evidence_ref=<primary output ref>` (recommended: `sprints/Sxxxx/qa-findings.md` and/or `handoffs/qa_to_dev.md`)
26
+
27
+ In an execute↔QA implementation loop (`AUTO_IMPLEMENTATION_LOOP=1`), each new
28
+ `/qa` cycle must have a new `fresh_context_marker` (marker reuse is treated as
29
+ stale isolation evidence).
30
+
31
+ ## Inputs
32
+
33
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
34
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
35
+ full-file reads when a section heading exists.
36
+ - `handoffs/dev_to_qa.md`
37
+ - `sprints/S0001/summary.md`
38
+
39
+ ## Outputs (artifacts)
40
+ - `sprints/S0001/qa-findings.md`
41
+ - `handoffs/qa_to_dev.md` (if issues)
42
+ - `docs/engineering/state.md`
43
+
44
+ ## Stop conditions
45
+ - Critical defects require decision
46
+ - Missing test plan coverage
47
+
48
+ ## Release gate prerequisite (US-0039)
49
+
50
+ QA completion evidence is required before `/release` may proceed. Record findings in
51
+ `sprints/Sxxxx/qa-findings.md`; unresolved blocking findings block release with
52
+ `RELEASE_QA_BLOCKERS_OPEN`. When clear, handoff to `/verify-work` so release gate can
53
+ verify no unresolved blockers.
54
+
55
+ ## Self-verify UAT probes (US-0092 / DEC-0078)
56
+
57
+ Share the **`scripts/uat_probe_lib.py`** resolver with **`/verify-work`**: derive
58
+ acceptance steps, execute probes where stack profile resolves, record evidence in
59
+ **`sprints/Sxxxx/uat.json`** `probe_results[]` and **`sprints/Sxxxx/qa-findings.md`**.
60
+ Fail closed with **`UAT_PROBE_UNRESOLVED`** (not PASS) when no probe maps.
61
+ Forbidden: auto-read **`.env`**, mutate intake evidence — **`UAT_PROBE_FORBIDDEN`**.
62
+
63
+ Reason codes extend with **`UAT_BROWSER_UNAVAILABLE`**, **`UAT_BROWSER_PROBE_FAILED`**,
64
+ **`UAT_BROWSER_PROBE_TIMEOUT`** (**US-0093** / **DEC-0079**).
65
+
66
+ ### Browser UAT self-test (US-0093)
67
+
68
+ When **`UAT_BROWSER_PROBE_MODE=cursor`** (default) and step classifies as **`browser_smoke`**
69
+ (or automatable **`manual_operator`** reclassified per **DEC-0079** §4), execute the **Cursor
70
+ browser MCP** sequence — **lib never calls MCP directly** (**BUG-0006**):
71
+
72
+ 1. **Resolve target URL** — `docs/engineering/runtime-connectivity.md` first `http(s)://`; else
73
+ dev-server port from `package.json` + scratchpad **`DEV_SERVER_PORT`**.
74
+ 2. **`browser_navigate`** — load health/app URL; respect enterprise origin allowlist.
75
+ 3. **Step plan** — map acceptance verbs to **`browser_click`** / **`browser_type`** /
76
+ **`browser_scroll`** when automatable; **never** fill password/credential fields or read **`.env`**.
77
+ 4. **`browser_screenshot`** — write to **`sprints/Sxxxx/evidence/browser/<probe_id>-<seq>.png`**
78
+ (max **5** per probe).
79
+ 5. **Console + network evidence** — counts + summary path refs only (no inline secrets).
80
+ 6. **Verdict** — set **`passed`**, **`reason_code`**, **`browser_evidence_refs`** in
81
+ **`uat.json`** `probe_results[]`; **`passed=true`** in **`cursor`** mode **requires** non-empty
82
+ **`navigation_url`** + at least one screenshot or console/network summary path — else
83
+ **`UAT_BROWSER_PROBE_FAILED`**. Mirror under **`qa-findings.md`** **Runtime browser evidence**.
84
+ 7. **Fallback** — MCP unavailable → record **`UAT_BROWSER_UNAVAILABLE`**, run stdlib fallback when
85
+ **`UAT_BROWSER_FALLBACK_CHAIN=1`**; validate via
86
+ **`python scripts/uat_probe_lib.py --merge-result <fragment.json>`**.
87
+
88
+ **No silent PASS** — stdlib alone does **not** PASS **`browser_smoke`** in **`cursor`** mode
89
+ without agent **`browser_evidence_refs`**. Security: no auto-read **`.env`**, no credential
90
+ auto-fill, no intake evidence mutation — **`UAT_PROBE_FORBIDDEN`** unchanged.
91
+
92
+ ## Steps
93
+ 0. If `SECURITY_REVIEW=1`, verify `docs/engineering/security-review.md` exists
94
+ and has no unresolved `critical` findings before proceeding. If unresolved
95
+ critical findings exist, stop at a decision gate.
96
+ 1. Define a test plan and run verification using the runbook commands
97
+ (`TEST_COMMAND`, `LINT_COMMAND`, `TYPECHECK_COMMAND` in `docs/engineering/runbook.md`).
98
+ - `TEST_COMMAND` is mandatory baseline evidence for push eligibility.
99
+ - Optional checks run only when configured and should be reported as
100
+ `pass|fail|skipped` deterministically.
101
+ - **User-visible metadata guard (US-0071 / DEC-0053):** run
102
+ `python scripts/check-user-visible-metadata.py` (see runbook). On failure,
103
+ record blocking findings with reason `USER_VISIBLE_INTERNAL_METADATA_DETECTED`,
104
+ cite `path:line:column` evidence, token class, and remediation per runbook.
105
+ If the checker entrypoint is missing, fail closed with
106
+ `METADATA_SANITIZATION_POLICY_MISSING`.
107
+ 2. Record findings and severity.
108
+ - Explicitly classify blockers that must prevent auto-push:
109
+ unresolved blocking QA findings and unresolved critical issues.
110
+ 3. Update state and handoff to dev if needed.
111
+ - For sync-policy evidence, include deterministic `reason_code` guidance:
112
+ - `PRE_QA_AUTOPUSH_FORBIDDEN` (feature work before QA completion)
113
+ - `BLOCKING_QA_FINDINGS` (open blockers/criticals)
114
+ - `SYNC_PUSHED` (eligible + checks passed + branch safe)
115
+ 4. If `AUTO_IMPLEMENTATION_LOOP=1` and blocking issues exist, handoff to dev and
116
+ return to `/execute` automatically (bounded by `AUTO_LOOP_MAX_CYCLES`).
117
+ 5. Follow with `/verify-work` for user acceptance when blocking issues are closed.
118
+ 6. If `AUTO_PAUSE_REQUEST=1` at safe boundary, run `/pause` before next phase.
119
+ 7. Before pushing, suggest running `scripts/validate-and-push` to catch failures
120
+ locally before they reach CI. If CI fails, the auto-fix job in
121
+ `.github/workflows/ci.yml` attempts automatic lint/format fixes and retries.
122
+ 8. Optional compatibility observability QA checks (US-0034):
123
+ - If `CROSS_REPO_OBSERVABILITY=0`, add zero required compatibility overhead.
124
+ - If `CROSS_REPO_OBSERVABILITY=1`, verify compatibility artifacts exist and
125
+ are current (`docs/engineering/compatibility-signals.md`,
126
+ `docs/engineering/compatibility-report.md`) with traceable references to
127
+ story/sprint/task context.
128
+ - If unresolved critical compatibility findings exist and
129
+ `COMPATIBILITY_GATE_ON_CRITICAL=1`, mark as release-blocking and require
130
+ decision gate before `/release`.
131
+ 9. Optional component-scope protection checks (US-0035):
132
+ - If `COMPONENT_SCOPE_MODE=0`, add zero required protection overhead.
133
+ - If `COMPONENT_SCOPE_MODE=1`, verify unaffected-component protection checks
134
+ for declared `non_target_components` and record evidence in
135
+ `docs/engineering/component-scope-report.md`.
136
+ - If unapproved out-of-scope impact is detected, mark as blocking and require
137
+ decision gate before `/release`.
138
+ 10. Optional spec-pack verification (US-0031):
139
+ - If `SPEC_PACK_MODE=0`, add no required spec-pack checks (zero overhead).
140
+ - If `SPEC_PACK_MODE=1`, verify target-story spec-pack artifacts exist and
141
+ required sections are populated; report gaps in qa-findings; see runbook
142
+ for minimum sections and traceability.
143
+ 11. Optional user-guide verification (US-0032):
144
+ - If `USER_GUIDE_MODE=0`, add no required user-guide checks or blocking (zero overhead).
145
+ - If `USER_GUIDE_MODE=1`, verify target-story user guide exists at
146
+ `docs/user-guides/US-xxxx.md` and required sections are present; report
147
+ gaps in qa-findings; see runbook for minimum schema.
148
+ 12. Optional remote runtime QA/debug contract (US-0064):
149
+ - When remote runtime metadata exists in
150
+ `docs/engineering/release-targets.json` for active target context,
151
+ validate remote endpoint reachability/debug evidence per configured
152
+ `runtime.mode`.
153
+ - Include local vs remote QA context and sanitized endpoint details in
154
+ `sprints/Sxxxx/qa-findings.md`.
155
+ - If remote connectivity config is incomplete for required remote checks,
156
+ mark blocking with deterministic reason code
157
+ `REMOTE_CONNECTIVITY_CONFIG_INVALID`.
158
+ - **US-0084**: when `REMOTE_EXECUTION=1`, expect **`handoffs/dev_to_qa.md`**
159
+ to carry an **environment label** (`WSL`, `ssh:<hostEnv>`, `dockerOverSsh`, …)
160
+ and **test locus** (local vs remote); reject evidence that pastes secret
161
+ values (keys/passwords) — **names-only** refs align with
162
+ `python scripts/remote_config_summary.py` output.
163
+ 13. Runtime QA autopilot contract (US-0065 / DEC-0047):
164
+ - Runtime truth path is mandatory for generated-project QA:
165
+ `startup -> readiness/connectivity -> log scan -> bounded retry -> verdict`.
166
+ - PASS requires runtime startup and endpoint/process reachability evidence.
167
+ - Deterministic failure outcomes:
168
+ - startup command/process fails: `RUNTIME_STARTUP_FAILED`
169
+ - endpoint/process unreachable after retries:
170
+ `RUNTIME_ENDPOINT_UNREACHABLE`
171
+ - critical runtime log signals detected:
172
+ `RUNTIME_LOG_CRITICAL_DETECTED`
173
+ - retry budget exhausted without recovery:
174
+ `RUNTIME_RETRY_BUDGET_EXHAUSTED`
175
+ - stack profile unresolved for runtime checks:
176
+ `RUNTIME_STACK_PROFILE_UNRESOLVED`
177
+ - Runtime profile resolution must be stack-aware for:
178
+ `node|python|go|java|dotnet` at minimum.
179
+ - Unknown/ambiguous stacks must fail closed with
180
+ `RUNTIME_STACK_PROFILE_UNRESOLVED` (no silent generic PASS fallback).
181
+ - Bounded retry loop requirements:
182
+ - retry only transient startup/connectivity failures,
183
+ - enforce configured attempt cap (`attempt <= max`),
184
+ - write per-attempt ledger evidence (`attempt`, `delay_ms`, `outcome`),
185
+ - stop retrying on non-transient critical log failures.
186
+ - Required QA runtime evidence schema fields in `sprints/Sxxxx/qa-findings.md`:
187
+ - `runtime_startup_command`
188
+ - `runtime_stack_profile`
189
+ - `runtime_mode` (`local|remote`)
190
+ - `runtime_health_target` (process/endpoint)
191
+ - `runtime_health_result`
192
+ - `runtime_log_summary` (severity counts + key signals)
193
+ - `runtime_retry_count`
194
+ - `runtime_retry_ledger`
195
+ - `runtime_final_verdict` (`pass|fail`)
196
+ - `runtime_reason_code`
197
+ - `runtime_evidence_refs`
198
+ - Webapp runtime verification path (when applicable):
199
+ - run browser-surface check for expected app load path,
200
+ - capture console error summary and failed network request summary,
201
+ - include results in runtime evidence fields.
202
+ - Optional debug escalation path:
203
+ - use only for reproducible runtime failures,
204
+ - keep instrumentation bounded and reversible,
205
+ - record debug actions/evidence and cleanup confirmation.
206
+ 14. Generated baseline test auto-run contract (US-0066 / DEC-0048):
207
+ - For generated-project QA scope, run baseline tests automatically using the
208
+ resolved `TEST_COMMAND`; do not treat baseline tests as optional.
209
+ - Deterministic generated-test evidence fields in `sprints/Sxxxx/qa-findings.md`:
210
+ - `generated_test_stack_profile`
211
+ - `generated_test_command`
212
+ - `generated_test_result` (`pass|fail`)
213
+ - `generated_test_output_ref`
214
+ - `generated_test_paths_ref`
215
+ - `generated_test_reason_code`
216
+ - Deterministic scaffold failure outcomes:
217
+ - unresolved profile: `TEST_SCAFFOLD_STACK_UNRESOLVED`
218
+ - unsupported profile: `TEST_SCAFFOLD_UNSUPPORTED_STACK`
219
+ - generation/run failure: `TEST_SCAFFOLD_GENERATION_FAILED`
220
+ - Non-destructive baseline guardrails:
221
+ - preserve user-authored tests/config/commands,
222
+ - validate generated scaffold behavior as fill-missing/idempotent only.
223
+ - Runtime integration boundary:
224
+ - generated-test PASS does not override runtime-autopilot failures from
225
+ `US-0065`; non-starting apps cannot PASS QA.
226
+
@@ -0,0 +1,41 @@
1
+ ---
2
+ description: "its-magic quick: execute a small task without full planning."
3
+ ---
4
+
5
+ # /quick
6
+
7
+ ## Subagents
8
+ - dev
9
+
10
+ ## Execution model
11
+ - Run `/quick` in a fresh Dev subagent context.
12
+ - After writing outputs, stop. Any follow-up starts in a new subagent/chat.
13
+
14
+ ## Inputs
15
+ - Task description
16
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at `docs/engineering/phase-context.md`
17
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
18
+ full-file reads when a section heading exists.
19
+
20
+ ## `/auto` routing (US-0096 / DEC-0082)
21
+
22
+ When **`DELIVERY_MODE=mega_quick`** and eligibility passes, **`/auto`** materializes this
23
+ command only (`resolved_phase_plan = ["quick"]`). See **`.cursor/commands/auto.md`** §
24
+ **`mega_quick` routing** for seven **`MEGA_QUICK_*`** fail-closed codes and
25
+ **`DELIVERY_MODE_INELIGIBLE`** handling.
26
+
27
+ Artifacts under **`sprints/quick/Qxxxx/`**: **`task.json`** + **`summary.md`**. Second spawn
28
+ only on test failure. Closure requires **`acceptance_met: true`** + green tests.
29
+
30
+ ## Outputs (artifacts)
31
+ - `sprints/quick/Q0001/task.json`
32
+ - `sprints/quick/Q0001/summary.md`
33
+ - `docs/engineering/state.md`
34
+
35
+ ## Stop conditions
36
+ - Decision gate triggered
37
+
38
+ ## Steps
39
+ 1. Define the task in `task.json`.
40
+ 2. Implement the change quickly.
41
+ 3. Write a short summary and update state.
@@ -0,0 +1,82 @@
1
+ ---
2
+ description: "its-magic refresh context: compact state and decisions."
3
+ ---
4
+
5
+ # /refresh-context
6
+
7
+ ## Subagents
8
+ - curator
9
+
10
+ ## Execution model
11
+ - Run `/refresh-context` in a fresh Curator subagent context.
12
+ - After writing outputs, stop. Next phase starts in a new subagent/chat.
13
+
14
+ ## Inputs
15
+
16
+ - **Narrow-read (US-0053 / US-0096 Tranche A)**: Start at docs/engineering/phase-context.md
17
+ and the story section anchor in vision/architecture/decisions when a heading exists; forbid
18
+ full-file reads when a section heading exists.
19
+ - Current sprint artifacts
20
+ - Decisions and handoffs
21
+
22
+ ## Outputs (artifacts)
23
+ - `docs/engineering/state.md`
24
+ - `docs/engineering/decisions.md`
25
+ - `sprints/S0001/summary.md`
26
+
27
+ ## Stop conditions
28
+ - Missing critical artifacts
29
+
30
+ ## Steps
31
+ 1. Compact state and decisions into a short context pack.
32
+ 2. Update sprint summary with current status.
33
+ 3. Ensure handoffs and state are consistent.
34
+ 3a. Optional codebase map refresh (US-0082 / DEC-0065): when merged scratchpad
35
+ sets `CODEBASE_MAP_REFRESH_ON_ROLLOVER=1`, from repository root run
36
+ `python scripts/materialize_codebase_map.py --trigger refresh-context`.
37
+ Default is **skip** (omit this step) to avoid map churn. On
38
+ `CODEBASE_MAP_BLOCKED:*`, record the token and remediation in the new
39
+ `state.md` checkpoint; do not rewrite operator-authored maps outside the
40
+ bootstrap contract.
41
+ 4. Enforce **triad** hot-surface rollover when merged scratchpad thresholds are
42
+ exceeded (DEC-0054):
43
+ - read caps from `.cursor/scratchpad.md` + `.cursor/scratchpad.local.md`,
44
+ including `STATE_HOT_MAX_LINES`, `STATE_HOT_MAX_CHECKPOINTS`,
45
+ `PO_TO_TL_HOT_MAX_LINES`, `PO_TO_TL_HOT_MAX_SECTIONS`, `ARCH_HOT_MAX_LINES`,
46
+ and `ARCH_HOT_MAX_STORY_SECTIONS` (see runbook defaults),
47
+ - run `python scripts/enforce-triad-hot-surface.py --rollover` from repo root
48
+ (or `--repo <root>`) so `state.md`, `handoffs/po_to_tl.md`, and
49
+ `docs/engineering/architecture.md` archive oldest contiguous units into
50
+ deterministic packs under `docs/engineering/state-archive/`,
51
+ `handoffs/archive/`, and `docs/engineering/architecture-archive/`,
52
+ - immediately rerun `python scripts/enforce-triad-hot-surface.py --check`;
53
+ on failure stop with `STATE_ARCHIVE_REQUIRED` or
54
+ `ARTIFACT_HOT_SURFACE_OVERSIZE` (no successful phase completion on oversize
55
+ hot files),
56
+ - record verification tuple fields (`boundary`, `moved`, `retained`,
57
+ `pack_ref`) in the new `state.md` checkpoint when any rollover occurred;
58
+ idempotent reruns must not duplicate archived content.
59
+
60
+ ## Deterministic artifact ordering contract (US-0058 / DEC-0040)
61
+
62
+ - Writes must follow `docs/engineering/artifact-ordering-policy.md`.
63
+ - `docs/engineering/state.md` refresh checkpoints are append-bottom only.
64
+ - `docs/engineering/decisions.md` compact index remains newest-first in bounded
65
+ section while preserving canonical header structure.
66
+ - `sprints/S0001/summary.md` context-pack pointer is prepend-top within its
67
+ context section; historical details remain intact.
68
+ - Missing/ambiguous anchors fail with `ARTIFACT_ORDERING_ANCHOR_AMBIGUOUS`
69
+ (no partial write).
70
+ - Archive write or rollover boundary ambiguity fails with
71
+ `STATE_ARCHIVE_WRITE_FAILED` or `STATE_ARCHIVE_BOUNDARY_AMBIGUOUS`
72
+ (no partial write).
73
+ - Archive verification mismatch fails with `STATE_ARCHIVE_VERIFICATION_FAILED`
74
+ (no partial write).
75
+
76
+ ## Cross-phase ownership guard (US-0061 / DEC-0043)
77
+
78
+ - Refresh-context mutations must comply with
79
+ `docs/engineering/artifact-ownership-policy.md`.
80
+ - Only curator-owned compaction scopes may be mutated; non-owned section
81
+ rewrites fail closed with `PHASE_OWNERSHIP_VIOLATION`.
82
+