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,184 @@
1
+ ---
2
+ description: "Caveman mode (US-0089) — optional response-side terse voice, default off"
3
+ globs: ["**/*"]
4
+ ---
5
+
6
+ # Caveman mode (US-0089)
7
+
8
+ This rule composes an optional **response-side** terse / imperative assistant
9
+ voice. It is **default off**. When `CAVEMAN_MODE` is unset or `0`, this rule
10
+ adds **zero** behavioral change and the assistant responds exactly as it did
11
+ pre-US-0089.
12
+
13
+ Inspired by JuliusBrussee/caveman (MIT). External reference only; not vendored.
14
+
15
+ ## Scratchpad gate (authoritative across subagent spawns)
16
+
17
+ Read the merged scratchpad (`.cursor/scratchpad.md`, then optional
18
+ `.cursor/scratchpad.local.md` overrides per **DEC-0055**) for these keys:
19
+
20
+ - `CAVEMAN_MODE=0|1` — default `0`. Absence is equivalent to `0`.
21
+ - `CAVEMAN_LEVEL=lite|full|ultra` — default empty.
22
+ - With `CAVEMAN_MODE=0`: inert regardless of value.
23
+ - With `CAVEMAN_MODE=1` and `CAVEMAN_LEVEL` empty: treat as `full`
24
+ (mid-tier default, matching upstream reference).
25
+ - With `CAVEMAN_MODE=1` and a listed level: apply that level.
26
+ - With `CAVEMAN_MODE=1` and any other non-empty value: fail closed with
27
+ deterministic reason code `CAVEMAN_LEVEL_UNKNOWN` and fall back to
28
+ pre-US-0089 voice (no terseness applied) while continuing the turn.
29
+ - `CAVEMAN_COMPRESS_INPUT=0|1` — **reserved for US-0090**; inert in US-0089;
30
+ no behavior until the compression story ships.
31
+ - `CAVEMAN_FILE_SCOPE=` — **reserved for US-0090**; inert in US-0089; no
32
+ behavior until the compression story ships.
33
+
34
+ Scratchpad values are **authoritative across subagent spawns**. Session
35
+ toggle phrases (see below) are overlays for the current conversation only
36
+ and do NOT persist across a fresh subagent context.
37
+
38
+ ## Literal-region invariant (9-zone hard MUST)
39
+
40
+ When `CAVEMAN_MODE=1`, the following output regions remain **byte-literal**
41
+ (no abbreviation, no rewording, no casing change). This rule is phrased as
42
+ **MUST**, not SHOULD:
43
+
44
+ 1. **Fenced code blocks** — both plain triple-backtick blocks and CODE
45
+ REFERENCE blocks of the form `startLine:endLine:filepath`. Content, line
46
+ numbers, filepath, language tags, and whitespace preserved.
47
+ 2. **File / path strings** — anything matching
48
+ `` `[\w./-]+\.(md|py|ps1|sh|json|mdc|ts|tsx|js|jsx|yml|yaml|toml|ini|env|example|manifest)` ``
49
+ or enclosed in backticks that points to a repo path. Preserve extension
50
+ and case.
51
+ 3. **AC checklist items** — bullets of form `- [ ]` or `- [x]` and their
52
+ entire text (AC-1..AC-N).
53
+ 4. **Reason codes** — `ALL_CAPS_WITH_UNDERSCORES` tokens such as
54
+ `PHASE_CONTEXT_ISOLATION_VIOLATION`, `RUNTIME_PROOF_MISSING`,
55
+ `AUTO_RESUME_ERROR`, `AUTO_SCHEDULER_CONFLICT`, `REMOTE_TARGET_UNKNOWN`,
56
+ `CAVEMAN_LEVEL_UNKNOWN`, `INTAKE_PERSISTENCE_BLOCKED`.
57
+ 5. **IDs** — `US-xxxx`, `DEC-xxxx`, `R-xxxx`, `BUG-####`, `S0xxx`, `T-xxx`.
58
+ 6. **Contract markers** — `[BUG_VALIDATION_OK]`,
59
+ `[INTAKE_EVIDENCE_VALIDATION_OK]`, `[SCRATCHPAD_PAIR_OK]`,
60
+ `[ARTIFACT_ORDERING_ANCHOR_AMBIGUOUS]`, `[CODEBASE_MAP_OK]`, and siblings.
61
+ 7. **Strict-proof tuple fields** — `orchestrator_run_id`, `runtime_proof_id`,
62
+ `proof_hash`, `proof_issued_at`, `proof_ttl_seconds`, `phase_id`, `role`
63
+ (DEC-0038).
64
+ 8. **Isolation evidence fields** — `fresh_context_marker`, `evidence_ref`,
65
+ `timestamp` (DEC-0029).
66
+ 9. **Commit / git refs** — quoted `git commit` messages, branch names, SHAs,
67
+ `HEAD`, tag names.
68
+
69
+ Forbidden "garbling" examples (never permitted even under `ultra`): dropping
70
+ the `US-` prefix from an ID, lowercasing a reason code, collapsing a fenced
71
+ code block into a bullet, truncating a path mid-filename, abbreviating a
72
+ proof hash.
73
+
74
+ ## Non-suppressible gate vocabulary (inherited from US-0088)
75
+
76
+ Caveman voice MUST NOT remove or abbreviate the following gate tokens — they
77
+ render byte-literal even under `CAVEMAN_LEVEL=ultra`:
78
+
79
+ - `decision_gate`
80
+ - `error`
81
+ - `pause`
82
+ - `loop_max`
83
+ - `blocked`
84
+ - `missing input`
85
+ - `[BUG_VALIDATION_OK]`
86
+ - `[INTAKE_EVIDENCE_VALIDATION_OK]`
87
+ - `[SCRATCHPAD_PAIR_OK]`
88
+
89
+ ## Operator toggle phrases (canonical set)
90
+
91
+ | Phrase | Effect |
92
+ |--------|--------|
93
+ | `caveman on` | Enable Caveman voice for the session (overlay). Effective from the next assistant turn. |
94
+ | `caveman off` | Disable Caveman voice for the session (overlay). Effective from the next assistant turn. |
95
+ | `stop caveman` | Alias for `caveman off`. |
96
+ | `normal mode` | Alias for `caveman off`. |
97
+ | `caveman: lite|full|ultra` | Set level for the session (implies `caveman on`). Effective from the next assistant turn. Accepts the three literal tokens `caveman: lite`, `caveman: full`, `caveman: ultra`. |
98
+
99
+ Determinism rules:
100
+
101
+ - Scratchpad `CAVEMAN_MODE` / `CAVEMAN_LEVEL` are **authoritative across
102
+ subagent spawns**; session toggles are overlays for the current
103
+ conversation only and do NOT persist across a fresh subagent context.
104
+ - Within a session, the **last explicit toggle wins**.
105
+ - A mid-turn toggle applies **from the next turn onward**; current-turn
106
+ machine-verifiable artifacts (gate messages, reason codes, strict-proof
107
+ tuples, isolation-evidence fields) remain literal regardless of the
108
+ toggle.
109
+ - Ambiguous phrases (`be caveman-lite`, `quiet caveman`, `cave man off`,
110
+ etc.) are **not recognized** — only the exact literal matches above fire.
111
+
112
+ ## Composition (non-substitution) with TOKEN_PROFILE
113
+
114
+ `TOKEN_PROFILE` controls context breadth. `CAVEMAN_MODE` controls reply
115
+ voice. Neither substitutes for the other; setting one does not change the
116
+ other. Combine freely.
117
+
118
+ ## Default-off invariant
119
+
120
+ With `CAVEMAN_MODE=0` or absent, this rule adds zero behavioral change:
121
+ existing command strings, gate ordering, spawn-only phrasing (BUG-0006),
122
+ contract-test token lists, `AUTO_QUIET` non-suppressible vocabulary
123
+ (US-0088), user-visible ID metadata (US-0071), strict-proof tuples
124
+ (DEC-0038), and isolation evidence fields (DEC-0029) all remain unchanged.
125
+
126
+ ## Non-goals (US-0089)
127
+
128
+ - No input-side file compression. `CAVEMAN_COMPRESS_INPUT` and
129
+ `CAVEMAN_FILE_SCOPE` are documented no-ops here; US-0090 owns that
130
+ vertical.
131
+ - No change to `TOKEN_PROFILE` (DEC-0035 / US-0080), context packs, archive
132
+ policy, or phase-context slimming.
133
+ - No rewrite of canonical artifacts (`docs/product/backlog.md`,
134
+ `docs/product/acceptance.md`, `docs/engineering/state.md` schema,
135
+ `docs/engineering/decisions.md`, DEC files).
136
+ - No new npm / Python dependencies. No `package.json` edit.
137
+ - No vendor plugin install. No package-manager install recipe is surfaced;
138
+ the JuliusBrussee/caveman reference is documentation-only.
139
+ - No change to spawn-only orchestration (US-0048 / DEC-0029 / BUG-0006),
140
+ strict runtime proof (DEC-0038), `AUTO_QUIET` non-suppressible list
141
+ (US-0088), or US-0071 visible-metadata rules.
142
+
143
+ ## Voice compression (when CAVEMAN_MODE=1)
144
+
145
+ ### Precedence
146
+
147
+ When `CAVEMAN_MODE=1`, voice-compression directives in **this rule** override
148
+ conflicting **user rule** prose-style guidance (e.g. "write complete sentences",
149
+ "blog-post quality") for **assistant reply voice only**; does **not** override
150
+ user rules for tool usage, git safety, security, or commit policy.
151
+
152
+ ### Intensity levels
153
+
154
+ | Level | Semantics | Example pattern |
155
+ |-------|-----------|-----------------|
156
+ | `lite` | Drop filler but keep grammatical sentences | Before: "I will now explain the orchestration gate because plan-verify requires it." After: "Orchestration gate required for plan-verify. Run gate check next." |
157
+ | `full` | Drop articles + fragments OK | Before: "The spawn-only orchestrator must dispatch a fresh subagent for each phase." After: "Spawn-only orchestrator dispatches fresh subagent per phase. Next: run `/execute`." Pattern: `[thing] [action] [reason]. [next step].` |
158
+ | `ultra` | Abbreviate ordinary prose words only; literals per §6 stub | Before: "The auth middleware returns HTTP 401 when the bearer token is absent from the Authorization header." After: "Auth middleware → 401. Bearer token absent. Check header." |
159
+
160
+ Goal: **token-saving terse/imperative prose** — **not** stereotypical caveman
161
+ roleplay.
162
+
163
+ ### Drop rules
164
+
165
+ Drop articles, filler, hedging, and pleasantries where level permits; keep
166
+ technical terms exact; fragments OK at `full` and `ultra`.
167
+
168
+ ### Auto-Clarity
169
+
170
+ Pause compression for **security** warnings, **destructive** operations, or
171
+ **ambiguous** compression — deliver the clear part in full prose, then resume
172
+ Caveman voice.
173
+
174
+ ### Persistence
175
+
176
+ Voice compression is active in **every response** while `CAVEMAN_MODE=1`;
177
+ turn off only via scratchpad keys or the documented toggle phrases above.
178
+
179
+ ### Ultra and literal regions
180
+
181
+ **Pointer stub** — defer to existing `## Literal-region invariant (9-zone hard
182
+ MUST)` above. Reason codes, IDs, paths, and proof tuples remain **byte-literal**.
183
+ At `ultra`, abbreviate ordinary prose words only — **never** abbreviate reason
184
+ codes or gate tokens. **No duplicate** 9-zone list here.
@@ -0,0 +1,39 @@
1
+ ---
2
+ description: "Strict coding standards and language best practices"
3
+ globs: ["**/*"]
4
+ ---
5
+
6
+ - Follow the official best practices of each language/framework used in the
7
+ changed files. Do not use deprecated APIs unless explicitly required.
8
+ - Keep behavior deterministic and explicit: avoid hidden side effects and
9
+ implicit global state.
10
+ - Prefer readability over cleverness. Use clear naming and small functions.
11
+ - Match existing project conventions for formatting, structure, and patterns.
12
+ - Keep interfaces stable and backward compatible unless the task requires a
13
+ breaking change (then document the break and migration steps).
14
+ - Validate input boundaries and handle errors intentionally (no silent catches).
15
+ - Never swallow exceptions without logging/context and a clear recovery path.
16
+ - Avoid duplicated logic; extract shared behavior when repetition appears.
17
+ - Minimize complexity: avoid unnecessary abstraction, deep nesting, and large
18
+ functions/classes.
19
+ - Use strict typing and contracts where available (TypeScript/Python typing/etc).
20
+ - No dead code, commented-out code blocks, or unused variables/imports.
21
+ - Add or update tests for behavior changes. Tests must verify outcomes, not only
22
+ implementation details.
23
+ - If tests/lint/typecheck fail for changed areas, fix before marking work done.
24
+ - Security by default: validate untrusted input, avoid injection-prone patterns,
25
+ and do not introduce secrets into code or artifacts.
26
+ - Remote config security (DEC-0016): never commit secret literals (tokens,
27
+ passwords, private keys) in `.cursor/remote.json`; use environment-variable
28
+ references only (for example `tokenEnv`, `passwordEnv`, `privateKeyPathEnv`).
29
+ - `.env` exclusion (DEC-0071 / US-0085): do not open, attach, read, search
30
+ inside, or index `.env` or `.env.*` files. Use environment variable names
31
+ in prose only. Operators source `.env` outside agent context.
32
+ - Automation remote routing (US-0086): when `AUTO_REMOTE_AUTOMATION_PROFILE=off`,
33
+ keep local behavior and never silently reroute `TEST_COMMAND` to remote.
34
+ Explicit NL routing is limited to `start container <target_id>` and unknown or
35
+ disabled targets must fail closed with documented reason codes.
36
+ - Performance by default: avoid obvious N+1 loops, repeated expensive work, and
37
+ unnecessary I/O in hot paths.
38
+ - Documentation by default: update relevant docs when behavior, setup, or usage
39
+ changes.
@@ -0,0 +1,111 @@
1
+ ---
2
+ description: "Core workflow and context pack rules"
3
+ globs: ["**/*"]
4
+ ---
5
+
6
+ - Intake backlog/acceptance writes require **US-0078** evidence validation
7
+ (`scripts/intake_evidence_validate.py` / **DEC-0060**) before persistence; see
8
+ `.cursor/commands/intake.md`.
9
+ - For first/new/broad intake, persistence also requires **US-0081** complete-plan
10
+ coverage contract validation (**DEC-0064**):
11
+ `plan_area_inventory` + `plan_area_coverage` + `coverage_complete=true`; fail
12
+ closed under `INTAKE_PERSISTENCE_BLOCKED` with deterministic plan-coverage
13
+ subcodes.
14
+ - Defect intake uses **`INTAKE_WORK_ITEM_KIND=bug`** and/or **`/intake bug`**; validate bugs with
15
+ `scripts/bug_issue_validate.py` and run `scripts/intake_bug_routing_guard.py` before allocating
16
+ **`US-xxxx`** for defect-shaped prose (**US-0079** / **DEC-0061**).
17
+ - Use the phase flow: intake -> discovery -> research -> architecture ->
18
+ [security-review: design, if SECURITY_REVIEW=1] -> sprint plan -> plan verify
19
+ -> execute -> [security-review: code, if SECURITY_REVIEW=1] -> QA ->
20
+ verify work -> release -> refresh context.
21
+ - Enforce agent isolation: each phase must run in a fresh subagent context.
22
+ Never execute two delivery phases in the same agent conversation.
23
+ - `AUTO_FLOW_MODE` controls whether phases run automatically or stop at
24
+ decision gates (`auto_until_decision` recommended).
25
+ - `PHASE_MODE=interactive` means ask questions; `PHASE_MODE=auto` minimizes
26
+ prompts unless decisions are required.
27
+ - `AUTO_IMPLEMENTATION_LOOP=1` enables an automatic fix loop:
28
+ execute -> QA -> execute (and verify-work) until quality gates are green or
29
+ `AUTO_LOOP_MAX_CYCLES` is reached.
30
+ - `AUTO_PAUSE_REQUEST=1` requests a graceful stop at the next safe boundary
31
+ defined by `AUTO_PAUSE_POLICY` (`after_task` or `after_phase`).
32
+ - `SECURITY_REVIEW=1` enables optional security review insertion points:
33
+ post-architecture (design mode) and post-execute (code mode). When
34
+ `SECURITY_REVIEW=0` (default), these optional steps are skipped entirely and
35
+ base workflow behavior is unchanged.
36
+ - Persist decisions and state in files; do not keep critical info only in chat.
37
+ - Handoffs are the only cross-phase memory. When a phase writes its outputs and
38
+ handoff, stop that agent and start the next phase in a new subagent.
39
+ - Pause/resume is first-class. Update `handoffs/resume_brief.md` on pause.
40
+ - `/auto` continuation contract (DEC-0017):
41
+ - Support explicit `start-from=<phase>` using canonical phase IDs only:
42
+ `intake`, `discovery`, `research`, `architecture`, `sprint-plan`,
43
+ `plan-verify`, `execute`, `qa`, `verify-work`, `release`,
44
+ `refresh-context`.
45
+ - Deterministic precedence must be:
46
+ 1) explicit `start-from`
47
+ 2) `handoffs/resume_brief.md`
48
+ 3) conservative `docs/engineering/state.md` fallback
49
+ 4) fail-fast on unresolved/conflicting/ambiguous signals.
50
+ - Conflict/staleness policy:
51
+ - explicit valid override wins;
52
+ - if no override and `resume_brief` conflicts with inferred state, fail fast;
53
+ - if `resume_brief` exists but is stale or unparseable, fail fast;
54
+ - use state fallback only when resume brief is absent.
55
+ - Fail-fast contract format:
56
+ `[AUTO_RESUME_ERROR] <code>: <summary>. Source=<source>. Fix: <action>.`
57
+ Required codes:
58
+ `INVALID_START_FROM`, `RESUME_BRIEF_MISSING`, `RESUME_BRIEF_STALE`,
59
+ `RESUME_BRIEF_UNPARSEABLE`, `RESUME_STATE_CONFLICT`,
60
+ `STATE_PHASE_AMBIGUOUS`, `STATE_PHASE_UNRECOVERABLE`.
61
+ - Preserve existing stop/gate controls in continuation mode:
62
+ decision gate, missing critical input, pause request, loop max cycles.
63
+ - Write deterministic breadcrumbs (`resolution_source`, chosen phase,
64
+ `stop_reason`, `stop_phase`, `timestamp`) to `docs/engineering/state.md`
65
+ and `handoffs/resume_brief.md` (when stopped before completion).
66
+ - Context pack must stay compact: summarize, do not dump raw logs.
67
+ - Remote execution contract (DEC-0016):
68
+ - If `REMOTE_EXECUTION=0` (default), skip remote config validation and keep
69
+ workflow overhead at zero.
70
+ - If `REMOTE_EXECUTION=1`, validate `.cursor/remote.json` before any remote
71
+ build/test activity and fail fast on blocking issues.
72
+ - Required root fields: `version`, `defaultTarget`, `targets`.
73
+ - Required target fields: `id`, `type`, `enabled`, `host`, `port`,
74
+ `workspaceRoot`.
75
+ - Allowed `type` values: `docker`, `ssh`, `vm`.
76
+ - `defaultTarget` must reference an existing enabled target id.
77
+ - No committed secrets in config; sensitive values must be env-var references.
78
+ - If valid, agents may use configured remote/docker servers for builds/tests.
79
+ - Release queue and per-sprint notes contract (DEC-0020):
80
+ - `/verify-work` declares sprint readiness in state context (`ready` intent).
81
+ - `/release` owns target-sprint-only queue transitions and sprint-scoped note
82
+ writing:
83
+ `planned|ready -> unreleased -> released`.
84
+ - Canonical artifacts are `handoffs/release_queue.md` and
85
+ `handoffs/releases/Sxxxx-release-notes.md`.
86
+ - `handoffs/release_notes.md` remains legacy-compatible pointer/summary only.
87
+ - On unresolved sprint identity or queue/notes mismatch, fail closed with
88
+ deterministic reason codes and remediation guidance; no destructive
89
+ reconciliation.
90
+ - Release gate no-bypass (US-0039 / DEC-0019):
91
+ - Default behavior is strict no-bypass for release gates.
92
+ - Overrides require explicit decision evidence with rationale and risk
93
+ acceptance.
94
+ - Release operator hints contract (US-0067 / DEC-0049):
95
+ - `/release` output must include deterministic sections:
96
+ `Run -> Connect -> Verify -> Credentials -> Known Issues`.
97
+ - Required fields include start command, runtime mode/context ref, endpoint +
98
+ port + health endpoint, verification steps, credentials source refs
99
+ (env-ref-only), and known issues.
100
+ - Missing/ambiguous fields or inline secrets fail closed with
101
+ `RELEASE_OPERATOR_HINTS_MISSING`,
102
+ `RELEASE_OPERATOR_HINTS_AMBIGUOUS`, or
103
+ `RELEASE_OPERATOR_HINTS_SECRET_EXPOSURE`.
104
+ - Cross-phase artifact ownership guard (US-0061 / DEC-0043):
105
+ - All delivery phases must enforce
106
+ `docs/engineering/artifact-ownership-policy.md` before mutating artifacts.
107
+ - Non-authorized phases must not delete or rewrite other-phase owned sections.
108
+ - On prohibited mutation, fail closed with `PHASE_OWNERSHIP_VIOLATION`.
109
+ - If an override-authorized mutation path is allowed but evidence is missing,
110
+ fail closed with `PHASE_OVERRIDE_EVIDENCE_MISSING`.
111
+
@@ -0,0 +1,27 @@
1
+ ---
2
+ description: "Handoffs and artifact persistence"
3
+ globs: ["**/*"]
4
+ ---
5
+
6
+ - Every role writes handoffs to files; nothing important stays in chat only.
7
+ - Every handoff boundary requires a fresh agent context for the receiving role.
8
+ - Do not continue across roles in one conversation; write the handoff, stop,
9
+ then start the next role in a new subagent/chat.
10
+ - Update sprint `summary.md` and `progress.md` after task completion.
11
+ - Use `handoffs/*.md` for role-to-role transfers.
12
+ - Keep `docs/engineering/state.md` current and concise.
13
+ - Release handoff touchpoints (US-0040):
14
+ - `/verify-work` handoff should identify release-ready target sprint context.
15
+ - `/release` handoff should reference canonical sprint notes path:
16
+ `handoffs/releases/Sxxxx-release-notes.md`.
17
+ - `/release` handoff should reference queue state in
18
+ `handoffs/release_queue.md`, including any fail-safe reason codes.
19
+ - If `/release` is blocked post-QA, write/update
20
+ `sprints/Sxxxx/release-findings.md` and hand off remediation via
21
+ `handoffs/release_to_dev.md`.
22
+ - `handoffs/release_notes.md` is maintained as backward-compatible
23
+ latest-pointer summary.
24
+ - User-guide traceability (US-0032): When `USER_GUIDE_MODE=1`, handoffs and
25
+ release context should reference the canonical user guide for the target
26
+ story: `docs/user-guides/US-xxxx.md` (story ID maps 1:1 to guide artifact).
27
+
@@ -0,0 +1,49 @@
1
+ ---
2
+ description: "Quality gates and small-step execution"
3
+ globs: ["**/*"]
4
+ ---
5
+
6
+ - Prefer small, atomic changes tied to a single task.
7
+ - Run tests, lint, and typecheck when commands are configured in
8
+ `docs/engineering/runbook.md` (`TEST_COMMAND`, `LINT_COMMAND`, `TYPECHECK_COMMAND`).
9
+ - If `AUTO_INSTALL_DEPS=1` in `.cursor/scratchpad.md`, install required
10
+ runtimes/libs without asking (package manager only).
11
+ - If `AUTO_RELEASE_NOTES=1` in `.cursor/scratchpad.md`, generate release notes
12
+ automatically (scripted).
13
+ - If `PERMISSION_MODE=auto`, do not ask for routine permission prompts.
14
+ - If `RUN_TESTS_ON_EDIT=1`, run configured tests after meaningful edits.
15
+ - If `LOOP_UNTIL_GREEN=1`, iterate fix/test until green, bounded by
16
+ `AUTO_LOOP_MAX_CYCLES` when set.
17
+ - Update `docs/engineering/state.md` after meaningful changes.
18
+ - If tests fail and commands are set, fix or document before proceeding.
19
+ - Scripts that call subprocesses must use timeouts to prevent infinite hangs.
20
+ Use `-NonInteractive` for PowerShell, `< /dev/null` for sh, and respect
21
+ `TEST_TIMEOUT_SECONDS` from the runbook. Never use `Read-Host` or `read`
22
+ in code paths reachable without user interaction.
23
+ - Quality chain: Cursor AI loop (in-editor) → `scripts/validate-and-push`
24
+ (local pre-push) → CI auto-fix (GitHub Actions). Each layer catches issues
25
+ the previous layer missed.
26
+ - Before pushing, recommend running `scripts/validate-and-push.ps1` (Windows)
27
+ or `bash scripts/validate-and-push.sh` (Linux/Mac) to catch failures locally.
28
+ - `LINT_FIX_COMMAND` and `FORMAT_COMMAND` in the runbook enable automatic
29
+ formatting/lint fixes both locally and in CI.
30
+ - Remote config validation errors (when `REMOTE_EXECUTION=1`) must be fail-fast
31
+ and actionable using this format:
32
+ `[REMOTE_CONFIG_ERROR] <path>: expected <rule>, got <actual>. Fix: <hint>.`
33
+ Include all of: failing path, expected rule/range, actual value or type, and
34
+ a concrete remediation hint.
35
+ - Runtime QA autopilot failures (US-0065) must use deterministic reason codes
36
+ and evidence:
37
+ `RUNTIME_STARTUP_FAILED`, `RUNTIME_ENDPOINT_UNREACHABLE`,
38
+ `RUNTIME_LOG_CRITICAL_DETECTED`, `RUNTIME_RETRY_BUDGET_EXHAUSTED`,
39
+ `RUNTIME_STACK_PROFILE_UNRESOLVED`.
40
+ Include startup command/profile, runtime mode, health result, retry ledger,
41
+ and log summary in QA artifacts.
42
+ - User-visible internal metadata (US-0071 / DEC-0053): do not introduce
43
+ planning-shaped tokens (`US-[0-9]{4}`, `DEC-[0-9]{4}`, `R-[0-9]{4}`) into
44
+ operator-visible strings under inclusive scan roots (`bin/`, root installers,
45
+ `packaging/**`, `scripts/validate-and-push.*`). Use
46
+ `python scripts/check-user-visible-metadata.py` before handoff; on leakage use
47
+ `USER_VISIBLE_INTERNAL_METADATA_DETECTED` with path evidence and remediation
48
+ per `docs/engineering/runbook.md`.
49
+