@thebassclef/lite 1.0.4 → 1.1.0

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 (275) hide show
  1. package/dist/cli.cjs +65 -0
  2. package/dist/cli.js +65 -0
  3. package/dist/index.cjs +1 -1
  4. package/dist/index.d.ts +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/lite/.claude/agents/architect.md +70 -0
  7. package/dist/lite/.claude/agents/builder.md +114 -0
  8. package/dist/lite/.claude/agents/designer.md +156 -0
  9. package/dist/lite/.claude/agents/reviewer.md +88 -0
  10. package/dist/lite/.claude/hooks/bassclef-sync.sh +85 -27
  11. package/dist/lite/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
  12. package/dist/lite/.claude/hooks/longrun-prep-render-check.sh +236 -0
  13. package/dist/lite/.claude/hooks/persona-name-scrub-check.sh +105 -0
  14. package/dist/lite/.claude/hooks/skill-step-list-check.sh +171 -0
  15. package/dist/lite/.claude/luminaries/alan-cooper.md +170 -0
  16. package/dist/lite/.claude/luminaries/alistair-cockburn.md +140 -0
  17. package/dist/lite/.claude/luminaries/amazon-pr-faq.md +34 -0
  18. package/dist/lite/.claude/luminaries/andreas-zeller.md +74 -0
  19. package/dist/lite/.claude/luminaries/ash-maurya.md +121 -0
  20. package/dist/lite/.claude/luminaries/bill-buxton.md +210 -0
  21. package/dist/lite/.claude/luminaries/charles-sanders-peirce.md +150 -0
  22. package/dist/lite/.claude/luminaries/david-ogilvy.md +192 -0
  23. package/dist/lite/.claude/luminaries/don-norman.md +173 -0
  24. package/dist/lite/.claude/luminaries/edward-tufte.md +179 -0
  25. package/dist/lite/.claude/luminaries/eric-evans.md +160 -0
  26. package/dist/lite/.claude/luminaries/frederick-brooks.md +50 -0
  27. package/dist/lite/.claude/luminaries/gang-of-four.md +157 -0
  28. package/dist/lite/.claude/luminaries/glenford-myers.md +230 -0
  29. package/dist/lite/.claude/luminaries/hunt-thomas.md +115 -0
  30. package/dist/lite/.claude/luminaries/hyrum-wright.md +94 -0
  31. package/dist/lite/.claude/luminaries/jason-fried-dhh.md +46 -0
  32. package/dist/lite/.claude/luminaries/jesse-james-garrett.md +154 -0
  33. package/dist/lite/.claude/luminaries/john-ousterhout.md +94 -0
  34. package/dist/lite/.claude/luminaries/karl-popper.md +132 -0
  35. package/dist/lite/.claude/luminaries/kent-beck.md +168 -0
  36. package/dist/lite/.claude/luminaries/linus-torvalds.md +218 -0
  37. package/dist/lite/.claude/luminaries/martin-fowler.md +164 -0
  38. package/dist/lite/.claude/luminaries/michael-feathers.md +125 -0
  39. package/dist/lite/.claude/luminaries/michael-nygard.md +118 -0
  40. package/dist/lite/.claude/luminaries/robert-c-martin.md +164 -0
  41. package/dist/lite/.claude/luminaries/saltzer-schroeder.md +194 -0
  42. package/dist/lite/.claude/luminaries/sophia-prater.md +193 -0
  43. package/dist/lite/.claude/luminaries/stephen-toulmin.md +131 -0
  44. package/dist/lite/.claude/luminaries/tony-hoare.md +170 -0
  45. package/dist/lite/.claude/luminaries/vaughn-vernon.md +50 -0
  46. package/dist/lite/.claude/luminaries/w-edwards-deming.md +158 -0
  47. package/dist/lite/.claude/rules/accessor-library-discipline.md +110 -0
  48. package/dist/lite/.claude/rules/adr-discipline.md +96 -0
  49. package/dist/lite/.claude/rules/api-conventions.md +115 -0
  50. package/dist/lite/.claude/rules/artifact-ingestion.md +137 -0
  51. package/dist/lite/.claude/rules/assert-only-after-verify.md +111 -0
  52. package/dist/lite/.claude/rules/blocked-items.md +139 -0
  53. package/dist/lite/.claude/rules/bootstrap-pair-discipline.md +106 -0
  54. package/dist/lite/.claude/rules/branching.md +28 -0
  55. package/dist/lite/.claude/rules/cold-adopter-harness-discipline.md +93 -0
  56. package/dist/lite/.claude/rules/commit-conventions.md +22 -0
  57. package/dist/lite/.claude/rules/compounding-axis-fresh-analysis.md +173 -0
  58. package/dist/lite/.claude/rules/compounding-sequence-fresh-analysis.md +173 -0
  59. package/dist/lite/.claude/rules/context-engineering.md +155 -0
  60. package/dist/lite/.claude/rules/context-management.md +85 -0
  61. package/dist/lite/.claude/rules/defensive-bash.md +52 -0
  62. package/dist/lite/.claude/rules/deferred-actions.md +233 -0
  63. package/dist/lite/.claude/rules/destructive-operations.md +69 -0
  64. package/dist/lite/.claude/rules/diagnosis.md +38 -0
  65. package/dist/lite/.claude/rules/github-issue-flash-tweet.md +114 -0
  66. package/dist/lite/.claude/rules/guardrails.md +73 -0
  67. package/dist/lite/.claude/rules/hook-wire-on-author.md +77 -0
  68. package/dist/lite/.claude/rules/identifier-leak-prevention.md +73 -0
  69. package/dist/lite/.claude/rules/iteration-bet-brief-completeness.md +43 -0
  70. package/dist/lite/.claude/rules/lite-manifest-schema-change-discipline.md +79 -0
  71. package/dist/lite/.claude/rules/longrun-prep-plan-doc-compression.md +77 -0
  72. package/dist/lite/.claude/rules/loop-discipline.md +71 -0
  73. package/dist/lite/.claude/rules/manual-prod-approval.md +100 -0
  74. package/dist/lite/.claude/rules/marker-enrichment-discipline.md +72 -0
  75. package/dist/lite/.claude/rules/mobile-ephemeral-session.md +109 -0
  76. package/dist/lite/.claude/rules/new-dependency-check.md +44 -0
  77. package/dist/lite/.claude/rules/oo-ad-entry-point.md +95 -0
  78. package/dist/lite/.claude/rules/operator-facing-prose.md +177 -0
  79. package/dist/lite/.claude/rules/option-label-discipline.md +82 -0
  80. package/dist/lite/.claude/rules/pattern-annotation.md +83 -0
  81. package/dist/lite/.claude/rules/persona-name-leak-scrub.md +90 -0
  82. package/dist/lite/.claude/rules/plain-english-discipline.md +132 -0
  83. package/dist/lite/.claude/rules/plan-enumeration-needs-value-props.md +177 -0
  84. package/dist/lite/.claude/rules/pr-body-shape.md +195 -0
  85. package/dist/lite/.claude/rules/pr-strategy.md +142 -0
  86. package/dist/lite/.claude/rules/pr-title-shape.md +90 -0
  87. package/dist/lite/.claude/rules/prototype-workflow.md +53 -0
  88. package/dist/lite/.claude/rules/reserved-skill-names.md +103 -0
  89. package/dist/lite/.claude/rules/schema-management.md +42 -0
  90. package/dist/lite/.claude/rules/sdlc-gates.md +149 -0
  91. package/dist/lite/.claude/rules/security.md +37 -0
  92. package/dist/lite/.claude/rules/session-artifacts.md +236 -0
  93. package/dist/lite/.claude/rules/skill-composition-declarations.md +105 -0
  94. package/dist/lite/.claude/rules/skill-description-clarity.md +196 -0
  95. package/dist/lite/.claude/rules/skill-procedure-step-list.md +119 -0
  96. package/dist/lite/.claude/rules/sprint-prep-preset-picker.md +76 -0
  97. package/dist/lite/.claude/rules/state-schema-validation.md +156 -0
  98. package/dist/lite/.claude/rules/stuck-signal-diagnostic.md +111 -0
  99. package/dist/lite/.claude/rules/substrate-config-schema.md +85 -0
  100. package/dist/lite/.claude/rules/test-list-discipline.md +129 -0
  101. package/dist/lite/.claude/rules/test-sufficiency.md +186 -0
  102. package/dist/lite/.claude/rules/testing-tier-config.md +125 -0
  103. package/dist/lite/.claude/rules/testing.md +38 -0
  104. package/dist/lite/.claude/rules/turn-estimate-grounding.md +82 -0
  105. package/dist/lite/.claude/rules/visual-hierarchy.md +427 -0
  106. package/dist/lite/.claude/rules/we-dont-break-adopters.md +103 -0
  107. package/dist/lite/.claude/rules/whereami-load-bearing.md +184 -0
  108. package/dist/lite/.claude/rules/writing-craft-discipline.md +72 -0
  109. package/dist/lite/.claude/rules/wu-sequencing-compounds.md +119 -0
  110. package/dist/lite/.claude/skills/build/SKILL.md +640 -0
  111. package/dist/lite/.claude/skills/chronicle/SKILL.md +55 -0
  112. package/dist/lite/.claude/skills/clean-artifacts/SKILL.md +249 -0
  113. package/dist/lite/.claude/skills/decompose/SKILL.md +280 -0
  114. package/dist/lite/.claude/skills/diagnose/SKILL.md +297 -0
  115. package/dist/lite/.claude/skills/feynman/SKILL.md +90 -0
  116. package/dist/lite/.claude/skills/howdoi/SKILL.md +105 -0
  117. package/dist/lite/.claude/skills/ia-model/SKILL.md +108 -0
  118. package/dist/lite/.claude/skills/interaction-design/SKILL.md +112 -0
  119. package/dist/lite/.claude/skills/interpret-input/SKILL.md +180 -0
  120. package/dist/lite/.claude/skills/journal/SKILL.md +209 -0
  121. package/dist/lite/.claude/skills/kiss/SKILL.md +449 -0
  122. package/dist/lite/.claude/skills/launch/SKILL.md +915 -0
  123. package/dist/lite/.claude/skills/lean-canvas/SKILL.md +332 -0
  124. package/dist/lite/.claude/skills/longrun/SKILL.md +512 -0
  125. package/dist/lite/.claude/skills/luminary/SKILL.md +481 -0
  126. package/dist/lite/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
  127. package/dist/lite/.claude/skills/onboard-repo/SKILL.md +1640 -0
  128. package/dist/lite/.claude/skills/pattern-review/SKILL.md +99 -0
  129. package/dist/lite/.claude/skills/personas/SKILL.md +207 -0
  130. package/dist/lite/.claude/skills/promote/SKILL.md +283 -0
  131. package/dist/lite/.claude/skills/requirement/SKILL.md +98 -0
  132. package/dist/lite/.claude/skills/retro/SKILL.md +117 -0
  133. package/dist/lite/.claude/skills/riff/SKILL.md +114 -0
  134. package/dist/lite/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
  135. package/dist/lite/.claude/skills/session-end/SKILL.md +309 -0
  136. package/dist/lite/.claude/skills/session-log/SKILL.md +299 -0
  137. package/dist/lite/.claude/skills/skills/SKILL.md +228 -0
  138. package/dist/lite/.claude/skills/spec/SKILL.md +105 -0
  139. package/dist/lite/.claude/skills/sprint/SKILL.md +418 -0
  140. package/dist/lite/.claude/skills/stage/SKILL.md +384 -0
  141. package/dist/lite/.claude/skills/state-a-problem/SKILL.md +185 -0
  142. package/dist/lite/.claude/skills/temperance/SKILL.md +108 -0
  143. package/dist/lite/.claude/skills/use-case/SKILL.md +417 -0
  144. package/dist/lite/.claude/skills/user-stories/SKILL.md +268 -0
  145. package/dist/lite/.claude/skills/value-prop/SKILL.md +251 -0
  146. package/dist/lite/.claude/skills/verify/SKILL.md +160 -0
  147. package/dist/lite/.claude/skills/visual-review/SKILL.md +503 -0
  148. package/dist/lite/.claude/skills/whats-the-plan/SKILL.md +202 -0
  149. package/dist/lite/.claude/skills/whereami/SKILL.md +307 -0
  150. package/dist/lite/AGENTS.md +79 -0
  151. package/dist/lite/CLAUDE-lite.md +85 -0
  152. package/dist/lite/CODE_OF_CONDUCT.md +28 -0
  153. package/dist/lite/CONTRIBUTING.md +177 -0
  154. package/dist/lite/README.md +173 -0
  155. package/dist/lite/SECURITY.md +19 -0
  156. package/dist/lite/architecture/decisions/ADR-029-release-pipeline.md +79 -0
  157. package/dist/lite/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
  158. package/dist/lite/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
  159. package/dist/lite/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
  160. package/dist/lite/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
  161. package/dist/lite/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
  162. package/dist/lite/lib/clean-artifacts-sweep.sh +112 -0
  163. package/dist/lite/lib/code-comment-discipline.sh +144 -0
  164. package/dist/lite/lib/composer-preflight.sh +459 -0
  165. package/dist/lite/lib/deferred-actions.sh +146 -0
  166. package/dist/lite/lib/hook-header-parser.sh +61 -0
  167. package/dist/lite/lib/hook-heartbeat.sh +152 -0
  168. package/dist/lite/lib/hook-inject.sh +255 -0
  169. package/dist/lite/lib/hook-installer.sh +195 -0
  170. package/dist/lite/lib/luminary-pick.sh +96 -0
  171. package/dist/lite/lib/output-discipline.sh +143 -0
  172. package/dist/lite/lib/prose-scan-boundary.sh +171 -0
  173. package/dist/lite/lib/rewrite-check.sh +214 -0
  174. package/dist/lite/lib/session-rescue.sh +151 -0
  175. package/dist/lite/lib/source-graph-walker.sh +277 -0
  176. package/dist/lite/lib/state.sh +1372 -0
  177. package/dist/lite/lib/telemetry.sh +205 -0
  178. package/dist/lite/lib/tier-check.sh +187 -0
  179. package/dist/lite/lib/tier-dependency-audit.sh +1088 -0
  180. package/dist/lite/presence/install/bassclef-hook-connect.sh +178 -0
  181. package/dist/lite/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
  182. package/dist/lite/presence/install/bassclef-sync.template.sh +2278 -0
  183. package/dist/lite/presence/install/schedule-auto-save.cron.sh +88 -0
  184. package/dist/lite/presence/install/schedule-auto-save.taskscheduler.md +122 -0
  185. package/dist/lite/scripts/aggregate-telemetry.sh +217 -0
  186. package/dist/lite/scripts/analyze-tier-dependencies.sh +239 -0
  187. package/dist/lite/scripts/generate-lite-manifest.sh +505 -0
  188. package/dist/lite/scripts/generate-tier-manifest.sh +28 -0
  189. package/dist/lite/scripts/intent-drift-check.sh +456 -0
  190. package/dist/lite/scripts/lite-manifest-drift-check.sh +146 -0
  191. package/dist/lite/scripts/render-lite-manifest-doc.sh +150 -0
  192. package/dist/lite/standards/adr-template.md +86 -0
  193. package/dist/lite/standards/api-conventions/nextjs.md +84 -0
  194. package/dist/lite/standards/artifact-composition.md +209 -0
  195. package/dist/lite/standards/bash-hook-safety.md +246 -0
  196. package/dist/lite/standards/bassclef-configs-schema.md +232 -0
  197. package/dist/lite/standards/bassclef-evolution.md +143 -0
  198. package/dist/lite/standards/bassclef-internal-jargon.md +244 -0
  199. package/dist/lite/standards/bassclef-managed-sentinel.md +96 -0
  200. package/dist/lite/standards/bassclef-source-config.md +228 -0
  201. package/dist/lite/standards/branch-stacking.md +408 -0
  202. package/dist/lite/standards/code-safety-principles.md +176 -0
  203. package/dist/lite/standards/composer-prerequisites.md +155 -0
  204. package/dist/lite/standards/deferred-actions-schema.md +204 -0
  205. package/dist/lite/standards/dependency-discipline/cargo.md +39 -0
  206. package/dist/lite/standards/dependency-discipline/gem.md +43 -0
  207. package/dist/lite/standards/dependency-discipline/go-mod.md +41 -0
  208. package/dist/lite/standards/dependency-discipline/npm.md +42 -0
  209. package/dist/lite/standards/dependency-discipline/pip.md +42 -0
  210. package/dist/lite/standards/deployment-topology/ec2-tailscale.md +225 -0
  211. package/dist/lite/standards/deployment-topology.md +69 -0
  212. package/dist/lite/standards/docs-sync-allowlist.md +76 -0
  213. package/dist/lite/standards/domain-and-dns.md +145 -0
  214. package/dist/lite/standards/frontend-stack.md +67 -0
  215. package/dist/lite/standards/frontmatter-schema.md +154 -0
  216. package/dist/lite/standards/graceful-exit.md +227 -0
  217. package/dist/lite/standards/hook-idempotency.md +102 -0
  218. package/dist/lite/standards/hook-injection-discipline.md +202 -0
  219. package/dist/lite/standards/hook-install-class.md +215 -0
  220. package/dist/lite/standards/input-handler-interface.md +152 -0
  221. package/dist/lite/standards/lite-manifest-schema-changes.md +180 -0
  222. package/dist/lite/standards/lite-manifest.json +2797 -0
  223. package/dist/lite/standards/luminary-matching.md +105 -0
  224. package/dist/lite/standards/luminary-problem-patterns.md +481 -0
  225. package/dist/lite/standards/migration-discipline/active-record.md +50 -0
  226. package/dist/lite/standards/migration-discipline/alembic.md +43 -0
  227. package/dist/lite/standards/migration-discipline/gorm.md +50 -0
  228. package/dist/lite/standards/migration-discipline/prisma.md +53 -0
  229. package/dist/lite/standards/migration-discipline/sqlalchemy.md +51 -0
  230. package/dist/lite/standards/mobile-ephemeral-session.md +167 -0
  231. package/dist/lite/standards/model-routing-discipline.md +160 -0
  232. package/dist/lite/standards/ogilvy-writing-rules.md +225 -0
  233. package/dist/lite/standards/opener-discipline.md +96 -0
  234. package/dist/lite/standards/operator-facing-prose-discipline.md +201 -0
  235. package/dist/lite/standards/persona-schema.md +229 -0
  236. package/dist/lite/standards/pluggable-luminaries.md +323 -0
  237. package/dist/lite/standards/pr-body-discipline.md +115 -0
  238. package/dist/lite/standards/preview-state-schema.md +189 -0
  239. package/dist/lite/standards/project-directory-layout.md +276 -0
  240. package/dist/lite/standards/release-tagging.md +137 -0
  241. package/dist/lite/standards/reserved-skill-names.md +120 -0
  242. package/dist/lite/standards/scannable-multi-option-output.md +265 -0
  243. package/dist/lite/standards/sdlc-compliance.md +286 -0
  244. package/dist/lite/standards/sdlc-gates/typescript.md +57 -0
  245. package/dist/lite/standards/secrets-lifecycle.md +210 -0
  246. package/dist/lite/standards/security-scanner-adapter.md +145 -0
  247. package/dist/lite/standards/session-board.md +256 -0
  248. package/dist/lite/standards/skill-output-discipline.md +121 -0
  249. package/dist/lite/standards/state-spine-contract.md +255 -0
  250. package/dist/lite/standards/state-spine.md +511 -0
  251. package/dist/lite/standards/steering-hints/kiss-words.md +11 -0
  252. package/dist/lite/standards/substrate-config-schema.md +267 -0
  253. package/dist/lite/standards/tech-stack-config.md +109 -0
  254. package/dist/lite/standards/tier-dependency-analysis.md +167 -0
  255. package/dist/lite/standards/tier-runtime-deps/lite.md +57 -0
  256. package/dist/lite/standards/tier-tag-schema.md +155 -0
  257. package/dist/lite/standards/two-layer-config.md +99 -0
  258. package/dist/lite/standards/use-case-format.md +292 -0
  259. package/dist/lite/standards/user-story-invest.md +268 -0
  260. package/dist/lite/standards/velocity-and-appetite.md +229 -0
  261. package/dist/lite/standards/voice-input-pattern.md +119 -0
  262. package/dist/lite/standards/whereami-schema.md +301 -0
  263. package/dist/lite/standards/worktree-management.md +211 -0
  264. package/dist/lite/standards/writing-guide.md +213 -0
  265. package/dist/lite/templates/chronicle-template.md +75 -0
  266. package/dist/lite/templates/deferred-action-template.md +45 -0
  267. package/dist/lite/templates/memory-proposal-template.md +77 -0
  268. package/dist/lite/templates/persona-template.md +200 -0
  269. package/dist/lite/templates/pr-faq.md +45 -0
  270. package/dist/lite/templates/secret-rotation-template.md +162 -0
  271. package/dist/lite/templates/spec-template.md +131 -0
  272. package/dist/lite/templates/use-case-template.md +194 -0
  273. package/dist/lite/templates/user-story-template.md +107 -0
  274. package/dist/lite/templates/whereami-template.md +101 -0
  275. package/package.json +1 -1
@@ -0,0 +1,77 @@
1
+ ---
2
+ tier: lite
3
+ description: Every new bassclef hook (a file under .claude/hooks/*.sh) MUST be added to project .claude/settings.json in the same PR that authors it.
4
+ ---
5
+
6
+ # Hook Wire On Author
7
+
8
+ Every new bassclef hook (a file under `.claude/hooks/*.sh`) MUST be added to project `.claude/settings.json` in the same PR that authors it. Hooks without settings entries are dead-letter — they exist on disk but stay silent on every tool call. The substrate appears to ship the safety net; in reality, every adopter session runs without it.
9
+
10
+ INSTEAD of shipping the hook on its own: include the settings entry in the same PR. The cost is one settings.json edit; the work compounds across every adopter session.
11
+
12
+ This rule closes the substrate-defect class that produced bassclef-upstream#319 (phase-1, closed 2026-06-24) + #376 (phase-2, this rule's filing context).
13
+
14
+ ## When this rule fires
15
+
16
+ Any PR that adds a new `.claude/hooks/*.sh` file. The rule passes through on:
17
+
18
+ - Edits to existing hooks (only NEW hook files trigger)
19
+ - Test files under `.claude/hooks/tests/`
20
+ - Library scripts under `lib/` (those are sourced; not hooks)
21
+ - Documentation under `.claude/hooks/*.md`
22
+
23
+ ## What the rule requires
24
+
25
+ When a PR adds a new hook file, the same PR MUST also include an edit to `.claude/settings.json` adding the hook at its correct matcher. The hook's header MUST declare its intended matcher per these conventions:
26
+
27
+ - `# PreToolUse: <matcher>` — added under `hooks.PreToolUse[].matcher`
28
+ - `# Stop` — added under `hooks.Stop[].hooks`
29
+ - `# PostToolUse: <matcher>` — added under `hooks.PostToolUse[].matcher`
30
+ - `# SessionStart` — added under `hooks.SessionStart[].hooks`
31
+ - `# UserPromptSubmit` — added under `hooks.UserPromptSubmit[].hooks`
32
+
33
+ The PR body MUST include a `Bootstrap pair shipped` block per `.claude/rules/bootstrap-pair-discipline.md` naming both the hook file AND the settings.json entry line.
34
+
35
+ ## Anti-patterns
36
+
37
+ These shapes fail this rule.
38
+
39
+ **Hook shipped without settings entry.** Author edits `.claude/hooks/foo.sh`, commits, opens PR. Settings.json untouched.
40
+
41
+ INSTEAD: ship the settings entry in the same PR. The cost is small (one settings.json line); the work compounds across every adopter session.
42
+
43
+ **Hook references "sourced-only by design" in header.** Hook docstring says "this hook is sourced by other hooks, not connected directly." Phase-1 audit treated this as exempt; phase-2 reshape clarifies: composite/sourced libraries belong under `lib/`, not `.claude/hooks/`.
44
+
45
+ INSTEAD of marking the hook exempt: move sourced-only libraries to `lib/`. Hooks under `.claude/hooks/` either get a settings entry or get moved.
46
+
47
+ **Hook shipped at wrong matcher.** Author adds `pre-build-gate.sh` under PreToolUse Bash when its header says PreToolUse Edit|Write|MultiEdit. Hook stays silent.
48
+
49
+ INSTEAD of guessing the matcher: read the hook's header before adding the entry. The matcher convention is documented above.
50
+
51
+ ## Mechanical layer
52
+
53
+ **V1.5 (bassclef-upstream#1163 Layer 4, shipped 2026-08-08):** `.claude/hooks/hook-classifier-canary.sh` fires as PreToolUse Edit|Write|MultiEdit against paths under `.claude/hooks/*.sh` (excludes tests dir + fixtures). Detects new hook files that lack any recognized wiring signal (settings.json / .github/workflows / scripts/release-to-bassclef.sh / launchd header / sourced-lib header). Emits ADVISORY to stderr naming 5 remediation paths. Sources `lib/mechanism-fidelity.sh` for the classifier vocabulary. Override: `SKIP_HOOK_CLASSIFIER_CANARY=1`. Tier 0 test at `.claude/hooks/tests/hook-classifier-canary.test.sh` (10 tests).
54
+
55
+ **V2 (deferred):** flip canary from ADVISORY to BLOCK once one calibration cycle passes with zero operator-reported false positives.
56
+
57
+ **V3 (deferred to pre-commit sibling):** extend `pre-commit-gate.sh` to scan `git diff --staged --name-only` for new hooks and BLOCK when settings entry absent. Two-layer defense (author-time canary + commit-time gate) closes the class end-to-end.
58
+
59
+ Defer V3 to a separate goal when V1.5+V2 have shipped through enough PRs that the failure modes are stable.
60
+
61
+ ## Override
62
+
63
+ `SKIP_HOOK_WIRE_ON_AUTHOR=1 <command>` — logged via trace-helper. Use only when:
64
+
65
+ - The hook is genuinely "in development" and ships without settings entry with a follow-on ticket filed AND the current PR cites the follow-on
66
+ - Emergency rescue where adding the entry would break the harness
67
+
68
+ INSTEAD of overriding for routine work: ship the settings entry in the same PR. The cost is small (one settings.json line); the discipline compounds across every adopter session.
69
+
70
+ ## Composes with
71
+
72
+ - `.claude/rules/bootstrap-pair-discipline.md` — sister discipline (this rule extends the bootstrap-pair contract to hook + settings entry)
73
+ - `.claude/rules/cold-adopter-harness-discipline.md` — sister discipline at adopter-observable boundary (settings.json IS adopter-observable)
74
+ - `.claude/rules/blocked-items.md` — BLOCK protocol the V2 mechanical layer fires
75
+ - `@luminary saltzer-schroeder` — complete mediation (the safety net is connected, not dead-letter)
76
+ - `@luminary michael-nygard` — stability pattern (the settings entry is what makes the safety net real)
77
+ - `@luminary linus-torvalds` — adopter-trust ceiling (bassclef hooks without settings entries equal adopter hooks without settings entries)
@@ -0,0 +1,73 @@
1
+ ---
2
+ tier: lite
3
+ description: Bassclef commits stay free of operator machine identifiers.
4
+ ---
5
+
6
+ <!-- andon-allow: [A-Za-z][A-Za-z0-9]*-MacBook-(Air|Pro) -->
7
+ <!-- andon-allow: /Users/[a-z][a-z0-9._-]+ -->
8
+ <!-- andon-allow: /home/[a-z][a-z0-9._-]+ -->
9
+
10
+ # Identifier leak prevention
11
+
12
+ Bassclef commits stay free of operator machine identifiers.
13
+
14
+ INSTEAD of committing hostname strings (X-MacBook-Air, DESKTOP-XYZ, X-server-N), absolute paths starting with /Users/ or /home/, or any operator-identifying metadata: rewrite the message or content with placeholders (branch name, `<machine>`, `$HOME`) before commit.
15
+
16
+ This rule is the methodology layer. The mechanical layer is `.claude/hooks/pre-commit-identifier-leak-scrub.sh` (PreToolUse Bash matcher on `git commit`). Both required.
17
+
18
+ ## When this rule fires
19
+
20
+ Every `git commit` invocation across bassclef and adopter repos. The hook scans:
21
+
22
+ 1. Commit message text (parses `-m "..."` arg)
23
+ 2. Staged content (`git diff --cached`)
24
+
25
+ Fires on PreToolUse Bash matcher when `tool_input.command` starts with `git commit`. Non-git-commit commands pass through cleanly.
26
+
27
+ ## What the rule requires
28
+
29
+ No commit lands with these patterns in message OR staged content:
30
+
31
+ - **Hostname shapes**: `[A-Za-z][A-Za-z0-9]*-MacBook-(Air|Pro)`, `DESKTOP-[A-Z0-9]{4,}`, `*-server-*`, `*-desktop-*`
32
+ - **Absolute paths**: `/Users/<name>`, `/home/<name>`
33
+
34
+ Extension mechanism — future pattern classes added to the hook's `IDENTIFIER_PATTERNS` regex + a corresponding Tier 0 test.
35
+
36
+ ## Anti-patterns
37
+
38
+ **Auto-save-checkpoint commits with hostname suffix.**
39
+
40
+ INSTEAD of interpolating `$(hostname -s)` into the commit message per `save-state.sh` historical L222-225 shape: use branch name + file count only. Session identity moves to commit trailer if debug needed locally.
41
+
42
+ **LAST_SAVE file with `machine:` field.**
43
+
44
+ INSTEAD of writing machine identifier into `.claude/LAST_SAVE`: either gitignore the file OR drop the `machine:` field. This ticket takes both paths — gitignore the file + drop the field.
45
+
46
+ **state/markers/ tracked in git.**
47
+
48
+ INSTEAD of selectively-gitignored marker subdirs (contradicts `session-artifacts.md` L14-25): broad `state/markers/` gitignore + `git rm -r --cached state/markers/` one-time cure. Adopters inheriting the sync run the same cure once.
49
+
50
+ ## Override path
51
+
52
+ `SKIP_IDENTIFIER_LEAK_SCRUB=1 git commit ...` — logged via trace-helper. Rare use cases:
53
+
54
+ - Documentation explaining what patterns to avoid (e.g., this rule body cites the pattern class)
55
+ - Migration scripts that intentionally reference historical hostname strings
56
+ - Emergency rescue where the hook itself misbehaves
57
+
58
+ INSTEAD of routine overrides: rewrite the commit or content. The cost is small; the discipline compounds across every future commit.
59
+
60
+ ## Composes with
61
+
62
+ - `.claude/rules/session-artifacts.md` (L14-25 — state/markers gitignore intent this rule enforces)
63
+ - `.claude/rules/blocked-items.md` (BLOCK protocol the hook fires)
64
+ - `.claude/rules/testing-tier-config.md` (Tier 0 strict TDD on the hook + tests)
65
+ - `.claude/rules/hook-wire-on-author.md` (settings.json wiring discipline)
66
+ - `.claude/rules/bootstrap-pair-discipline.md` (hook + rule + test + wire ship together)
67
+ - `.claude/rules/we-dont-break-adopters.md` (adopter cure documented above)
68
+ - `.claude/hooks/pre-commit-identifier-leak-scrub.sh` (mechanical implementation)
69
+ - `.claude/hooks/tests/pre-commit-identifier-leak-scrub.test.sh` (12-test coverage)
70
+ - @luminary saltzer-schroeder — complete mediation
71
+ - @luminary linus-torvalds — adopter contract (ADR-031)
72
+ - @luminary michael-feathers — characterization tests
73
+ - @luminary michael-nygard — stability pattern (fail-soft on grep missing)
@@ -0,0 +1,43 @@
1
+ ---
2
+ tier: lite
3
+ description: When Orchestrator (or any agent) delegates a Construction stack to a subagent (Builder, Designer, Architect), the brief MUST include, verbatim and with file paths, every artifact…
4
+ ---
5
+
6
+ # Iteration Goal Brief Completeness
7
+
8
+ When Orchestrator (or any agent) delegates a Construction stack to a
9
+ subagent (Builder, Designer, Architect), the brief MUST include, verbatim
10
+ and with file paths, every artifact the iteration goal cites that applies
11
+ to the stack's scope.
12
+
13
+ ## Required in every delegation brief
14
+
15
+ - Canvas (if scope touches a subsystem covered by the canvas)
16
+ - Spec or decomposition artifact
17
+ - **All prototypes** listed in the goal's References, scoped to which apply per surface
18
+ - ADRs the goal pins as governing constraints
19
+ - Design token file(s) if the scope touches token-governed surfaces
20
+ - Prior PRs that shipped shared primitives the stack should reuse
21
+ - Luminary map (primary pair + any extended pairs tagged to surfaces in scope)
22
+
23
+ ## Checkpoint before spawning the subagent
24
+
25
+ Before the Task/Agent call, enumerate the goal's reference list and confirm
26
+ each relevant entry is in the brief. Missing entries = re-brief before
27
+ spawn. In sequential mode, same checkpoint applies to the role handoff
28
+ within a single session.
29
+
30
+ ## Operator- vs orchestrator-gated
31
+
32
+ - **Orchestrator-gated**: Orchestrator constructs the brief and validates
33
+ completeness before delegation. No operator prompt required.
34
+ - **Operator-gated**: operator may shape or override, but the default is
35
+ full transmission. Partial briefs require explicit operator choice.
36
+
37
+ ## Relationship to other rules
38
+
39
+ - `artifact-ingestion.md` — Builder's obligation to read staged artifacts;
40
+ this rule is Orchestrator's reciprocal obligation to surface them
41
+ - `design-direction.md` — approvals are load-bearing; bet references
42
+ carry the approvals and must reach Builder intact
43
+ - `sdlc-gates.md` — pre-build gates; brief completeness is itself a gate
@@ -0,0 +1,79 @@
1
+ ---
2
+ tier: lite
3
+ description: Every lite-manifest schema change ships a migration-note ledger entry in the same PR. Adopters read the ledger before sync.
4
+ ---
5
+
6
+ # Lite-manifest schema-change discipline
7
+
8
+ Every change to `standards/lite-manifest.schema.json` (schema shape) or to the output shape of `<tier>-manifest.json` (extractor emissions) MUST ship with a matching ledger entry in `standards/lite-manifest-schema-changes.md` in the same PR. The release script blocks the cascade if the ledger has no entry for the outgoing `manifest_version`.
9
+
10
+ This rule is the methodology layer. The mechanical layer is a pre-flight check in `scripts/release-to-bassclef.sh` (Step 3.6, added in goal 2026-09-07c Step 4). Both required.
11
+
12
+ Sister discipline at the file-rename surface; same shape at a different surface — files there, schema fields here.
13
+
14
+ ## When this rule fires
15
+
16
+ Any PR that touches:
17
+
18
+ - `standards/lite-manifest.schema.json` (schema shape)
19
+ - `scripts/generate-lite-manifest.sh` in a way that changes the output shape (adds or removes emitted keys)
20
+
21
+ Skips:
22
+
23
+ - Content-only manifest regens (backfill helper adds descriptions to source files; content_hash changes but no schema shift)
24
+ - Comment-only edits to schema or extractor
25
+
26
+ ## What the rule requires
27
+
28
+ When a PR changes the manifest schema OR output shape:
29
+
30
+ 1. **Ledger entry** — add a new entry to `standards/lite-manifest-schema-changes.md` in the same PR. Format per the ledger's format section. Newest-first ordering.
31
+ 2. **Version bump** — pin the entry to a specific `manifest_version` bump. Per the schema title description policy:
32
+ - Adding an optional field → MINOR bump
33
+ - Adding a required field → MAJOR bump (breaking)
34
+ - Removing a field → MAJOR bump
35
+ - Content-only change → PATCH bump
36
+ 3. **Downstream cure named** — the entry names what adopters need to do. If nothing (backward-compatible add), say so explicitly. If code change (like the v0.36.0 `upstream_commit` removal), name the pattern.
37
+ 4. **Release script pre-flight** — before every `/release`, the script reads the ledger and confirms an entry exists for the outgoing `manifest_version`. Missing entry BLOCKs the cascade.
38
+
39
+ ## Anti-patterns
40
+
41
+ **Schema field added but no ledger entry.** Release script pre-flight BLOCKs.
42
+ INSTEAD: add the entry in the same PR.
43
+
44
+ **Ledger entry written but wrong version bump.** Adopters plan their pin update against the wrong version.
45
+ INSTEAD: correct the bump before merge. AJV validation of the entry format catches inconsistency.
46
+
47
+ **Downstream cure vague (no name for the class).** Adopters at cold-sync can't reason about which script needs fixing.
48
+ INSTEAD: cite the class + link to a reference cure like bassclef-web c9a9da7.
49
+
50
+ **Schema change ships without adopter coordination.** Even with a ledger entry, adopters that exact-pin the manifest_version need advance warning.
51
+ INSTEAD: coord comment on bassclef-web#256 + bassclef-cli#51 BEFORE the release cascade per Linus L6 pre-mortem cure.
52
+
53
+ ## Override
54
+
55
+ `SKIP_LITE_MANIFEST_SCHEMA_LEDGER=1 <command>` — logged via trace-helper. Use only when:
56
+
57
+ - The schema change is a comment-only edit that keeps the shape stable
58
+ - The change reverses a prior entry (a rollback) and the prior entry names both the change and the rollback
59
+ - One-shot migration script that touches the schema during a migration window
60
+
61
+ INSTEAD of overriding for routine work: write the entry. The cost is small (one section in the ledger); the discipline compounds across every adopter that syncs.
62
+
63
+ ## Composes with
64
+
65
+ - file-rename-discipline (standard tier) — sister at the file surface
66
+ - `.claude/rules/we-dont-break-adopters.md` — parent discipline (ADR-031)
67
+ - `.claude/rules/cold-adopter-harness-discipline.md` — sibling smoke fires against ledger entries before release
68
+ - `.claude/rules/bootstrap-pair-discipline.md` — this rule + hook + tests + settings wire ship together
69
+ - `.claude/rules/testing-tier-config.md` — Tier 0 strict TDD on ledger format tests
70
+ - `.claude/rules/blocked-items.md` — BLOCK protocol the release-script pre-flight fires
71
+ - `standards/lite-manifest.schema.json` — the schema this ledger tracks
72
+ - `standards/lite-manifest-schema-changes.md` — the ledger this rule enforces
73
+ - `scripts/release-to-bassclef.sh` — release-script pre-flight (Step 3.6)
74
+ - ADR-031 (we-don't-break-adopters)
75
+ - ADR-029 (release pipeline)
76
+ - @luminary linus-torvalds — lead. Adopter contract; the ledger is the operational form of Torvalds's rule at the schema surface
77
+ - @luminary tony-hoare — pre/postcondition contract on schema changes
78
+ - @luminary michael-nygard — stability pattern (block-on-missing-entry)
79
+ - @luminary michael-feathers — characterization test on the ledger format
@@ -0,0 +1,77 @@
1
+ ---
2
+ tier: lite
3
+ description: When a plan doc at docs/next-session-plan-*.md (modified within 48 hours) carries a ## Recommended session sequence (or equivalent) section, /longrun prep MUST skip the full Steps…
4
+ ---
5
+
6
+ # /longrun prep — compress when plan doc pre-picks scope
7
+
8
+ When a plan doc at `docs/next-session-plan-*.md` (modified within 48 hours) carries a `## Recommended session sequence` (or equivalent) section, `/longrun prep` MUST skip the full Steps 1.4c-1.7b option-table ceremony and present the pre-authored sequence directly. This rule closes bassclef-upstream#1307 R1 — the workflow-overhead class where prep re-authors 15-25 turns of ceremony an earlier session already shipped in a plan doc.
9
+
10
+ This rule is the methodology layer. The mechanism is the /longrun SKILL body Step 0.85 (bassclef-upstream#1307 R1). V2 Stop-hook enforcement is deferred per pre-mortem R5.
11
+
12
+ ## When this rule fires
13
+
14
+ Every `/longrun prep` dispatch. The SKILL body Step 0.85 checks for a plan doc first. When one is found, the compressed prep path fires (converged preset). When none matches, prep falls to exploratory or reversible-small per the picker.
15
+
16
+ Detection criteria for the converged preset (all three must match):
17
+
18
+ 1. File matching `docs/next-session-plan-*.md` exists at repo root
19
+ 2. File was modified within the last 48 hours (`find -mtime -2`)
20
+ 3. File body contains one of: `## Recommended session sequence`, `## Recommended sequence`, `## Next-session pickup`
21
+
22
+ ## The three presets (per bassclef-upstream#1598)
23
+
24
+ Per `.claude/skills/longrun/SKILL.md` Step 0.85 picker. Prep renders in the shape that fits the mode:
25
+
26
+ | Preset | Fires when | Shape |
27
+ |---|---|---|
28
+ | **converged** | Plan doc matches criteria above OR fresh `/state-a-problem` marker present | Lean canvas — Problem + Value + Solution + options table |
29
+ | **exploratory** | No plan doc + operator typed `/longrun` alone + no fresh problem marker | Scan-table dominant — options table + one line per row + recommend row marker |
30
+ | **reversible-small** | Small scope stated in the invocation + won't break other work | Three-chunk compact — one line per option, one recommend line, one action line |
31
+
32
+ Ambiguous cases: picker asks `Converged / Exploratory / Small? (c/e/s/skip)`.
33
+
34
+ ## What the compressed path requires
35
+
36
+ When the compressed (converged) path fires, prep still ships the three-block opener per `.claude/rules/operator-facing-prose.md` Rule 3 (Problem + Value + Evidence). The compression targets Steps 1.4c-1.7b:
37
+
38
+ - **Skip:** re-authoring the full 5-axis-per-option block for every option (SKILL Step 1.5)
39
+ - **Skip:** re-authoring a full card for every non-recommended option (SKILL Step 1.6)
40
+ - **Skip:** re-authoring step cards + per-step compounding blocks (SKILL Steps 1.7 + 1.7a) for options the plan doc did not recommend
41
+ - **Keep:** scan-table at the top (3-5 rows summarizing the plan doc's items)
42
+ - **Keep:** one card for the recommended item per SKILL Step 1.6
43
+ - **Keep:** step cards + per-step compounding for the recommended item only per SKILL Steps 1.7 + 1.7a
44
+ - **Keep:** recommendation sentence per SKILL Step 1.7b
45
+ - **Add:** plan doc file path cited inline as source
46
+
47
+ Operators still pick from the scan table. The plan doc's ranking becomes the default, not a mandate.
48
+
49
+ ## Anti-patterns
50
+
51
+ **Full ceremony fires despite plan doc present.** The exact class #1307 R1 filed. Cure: run the SKILL Step 0.85 detection first.
52
+
53
+ **Plan doc detection succeeds but prep still authors 5-axis blocks for every option.** Partial compression is not compression. Cure: skip the per-option 5-axis blocks; keep them only for the recommended item's card.
54
+
55
+ **Compressed prep drops the recommendation sentence.** Operators still need one-line rationale. Cure: keep Step 1.7b.
56
+
57
+ **Compressed prep skips the three-block opener.** Rule 3 discipline holds regardless of compression. Cure: Problem + Value + Evidence always land before scan-table.
58
+
59
+ INSTEAD of any of these: check for plan doc first (SKILL Step 0.85 detection); use the recommended sequence verbatim; ask operator to confirm or reshape.
60
+
61
+ ## Override
62
+
63
+ `SKIP_LONGRUN_COMPRESS=1 <command>` — logged via trace-helper. Use only when the plan doc is out of date and the operator wants a fresh option set. In that case, dispatch full ceremony and note the override reason in the prep opener.
64
+
65
+ INSTEAD of overriding routinely: update the plan doc. A stale plan doc is a bad plan doc; fixing it upstream compounds across every future prep.
66
+
67
+ ## Composes with
68
+
69
+ - `.claude/skills/longrun/SKILL.md` Step 0.85 — the SKILL amendment this rule prescribes
70
+ - `.claude/rules/operator-facing-prose.md` Rule 3 — three-block opener still fires under compression
71
+ - `.claude/rules/compounding-sequence-fresh-analysis.md` — per-option 5-axis fresh analysis still holds for the recommended item's card
72
+ - `.claude/rules/plan-enumeration-needs-value-props.md` — every option in the compressed scan-table still carries a value-prop cell
73
+ - `.claude/rules/blocked-items.md` — silence is not deferral (plan doc detection reports fire vs skip explicitly)
74
+ - `.claude/rules/bootstrap-pair-discipline.md` — this rule + SKILL amendment ship as paired bootstrap
75
+ - @luminary john-ousterhout — deep module (compression path hides plan-doc detection behind narrow interface)
76
+ - @luminary donald-norman — signifier + feedback (plan doc presence is a signifier; compressed vs full ceremony is user feedback)
77
+ - @luminary frederick-brooks — conceptual integrity (compression preserves the option-table + card + step-card shape; only volume shrinks)
@@ -0,0 +1,71 @@
1
+ ---
2
+ tier: lite
3
+ description: Every step that ships code or substrate runs the six-step cycle for shipping code or substrate.
4
+ ---
5
+
6
+ # /loop discipline — methodology layer
7
+
8
+ Every step that ships code or substrate runs the six-step cycle below. This rule is the methodology layer; the full cycle spec lives with operator substrate.
9
+
10
+ ## When this rule fires
11
+
12
+ The rule fires when an agent or operator opens a feature branch, commits, opens a PR, runs review, or merges. The discipline applies regardless of work scope — single-issue fix, multi-step /longrun, and substrate-defect filing all run the same six steps.
13
+
14
+ ## What the rule requires
15
+
16
+ Before merging a PR that touches code or substrate, the agent has done all six main steps plus three sub-steps:
17
+
18
+ 0.5. `/pre-mortem` light fired (3 luminary lenses, 5-8 risks per lens, 30 min per Klein workshop shape) BEFORE Step 1 /temperance. Marker exists at `state/markers/pre-mortem/<branch-slug>.marker` citing the risk ledger path. Strongest concerns fold into the plan before edits begin. Per `.claude/skills/pre-mortem/SKILL.md` light mode.
19
+ 1. `/temperance` fired with answers stated (smallest shape, blast radius, brute-force check). Marker exists at `state/markers/temperance/<branch-slug>.marker`.
20
+ 2. `/luminary` picked at least one primary lens. Marker exists at `state/markers/luminary/<branch-slug>.marker`. Slugs recorded in the evidence row's `authoring_luminaries` field.
21
+ 2a. Marker declares `lead` field naming one primary luminary; `supporting` field lists the others. Lead is the luminary whose lens verifies the ship at Step 5.5. Format mirrors bet-doc frontmatter `authoring_luminaries.primary` and `.supporting`.
22
+ 3. Tier 0 strict TDD satisfied where the testing tier requires it. Tests pass. The `testing-tier-enforce` hook has not blocked the commit.
23
+ 4. Review run. Findings categorized as red, amber, green, note. CodeReviewer agent dispatched OR inline review with luminary lens applied.
24
+ 5. Red and amber findings resolved through one or more iterations. Iteration count recorded. When the change is a SKILL body rewrite (any file under `.claude/skills/*/SKILL.md`), the intent check is measurable — run `scripts/intent-drift-check.sh --skill <slug>`. Cosine at or above 0.90 versus the saved vector at `.claude/embeddings/skills/<slug>.json` passes. Cosine below threshold means intent drifted and the rewrite iterates or reverts. Subjective promise-list checks satisfy the step ONLY when no saved vector exists (new skill). Threshold raised from 0.85 to 0.90 per #790 (2026-07-19) after first-6-cures median landed at 0.987.
25
+ 5.5. Lead lens confirms all red and amber findings cleared before Step 6 merge. Marker exists at `state/markers/lead-lens-signoff/<branch-slug>.marker` naming the lead luminary and either "no findings" or the specific finding IDs cleared. Rubber-stamp sign-off is a discipline miss — sign-off must cite finding IDs or state "no findings" with rationale.
26
+ 6. PR body carries the structured evidence including the three markers from Steps 0.5, 2a, 5.5. Squash merge. Evidence row status flips to merged.
27
+
28
+ Silence at any step is not deferral. Explicit deferral with stated rationale is the only acceptable skip.
29
+
30
+ The three sub-steps (0.5 + 2a + 5.5) close the aggregate-GREEN balancing check gap named in #845 body Cure B. When every gate reports GREEN independently but the fix ships in the wrong shape, the missing signal is a balancing check — a lens that reads the aggregate and asks "does this actually solve the problem." The lead luminary IS the balancing check. Ships per #836.
31
+
32
+ ## What this rule does NOT require
33
+
34
+ - A specific number of luminaries (one minimum; five maximum per `/luminary` skill ceiling).
35
+ - A specific finding count (red and amber findings should exist; zero on every PR signals shallow review).
36
+ - A specific iteration count (zero is acceptable when first review is clean).
37
+ - The CodeReviewer agent specifically — inline review with luminary lens is acceptable for smaller scope.
38
+ - A standalone evidence document. Tier 1 evidence rows live in PR body sections; tier 0 in standalone files. Both satisfy the rule.
39
+
40
+ ## Skip path with explicit deferral
41
+
42
+ Some work skips part of the cycle by declaration:
43
+
44
+ - **Trivial change** — typo, dependency bump, single-line rename. Commit message line `loop: skipped — trivial change, no review surface` records the skip.
45
+ - **Documented emergency** — production incident with operator-approved bypass. PR body carries authorization.
46
+ - **Operator direct merge** — operator authors the change and merges. The discipline applies to the agent work that surfaces it, not to the operator's edit.
47
+
48
+ Silence is not skip. Default is run the cycle.
49
+
50
+ ## Composes with
51
+
52
+ - `standards/construction-evidence-discipline.md` — the artifact produced per cycle
53
+ - `.claude/rules/testing-tier-config.md` — step 3 enforcement
54
+ - `.claude/rules/wu-sequencing-compounds.md` — sister discipline at the multi-step bet level
55
+ - `.claude/rules/blocked-items.md` — the protocol for surfacing skipped steps that should have run
56
+ - `.claude/skills/pre-mortem/SKILL.md` — Step 0.5 method; light mode shape (3 lenses, 30 min)
57
+ - `.claude/luminaries/gary-klein.md` — Step 0.5 anchor (pre-mortem originator)
58
+
59
+ ## Mechanical enforcement
60
+
61
+ V1 ships this rule + the standard. V2 (deferred) extends `pre-commit-gate.sh` to verify both markers exist for the branch before any commit, and adds a PR-open hook that verifies the evidence section is present in the PR body.
62
+
63
+ Per memory `feedback_hooks_beat_methodology_for_substrate_quality`: V2 hook ships alongside the methodology — both required for the discipline to hold across context boundaries.
64
+
65
+ ## Override path
66
+
67
+ `SKIP_LOOP_DISCIPLINE=1 <command>` — logged via trace-helper. Use only for migration scripts that author many goal docs at once, or for emergency rescue. Routine skip is not an override target; routine skip is a methodology miss.
68
+
69
+ ## Source dialogue
70
+
71
+ 2026-06-23 overnight bet 23a (discipline mechanization three disciplines). The loop was exercised on every step during the goal; this rule and the companion standard codify what the goal did.
@@ -0,0 +1,100 @@
1
+ ---
2
+ tier: lite
3
+ globs: [".github/workflows/**/*.yml", ".github/workflows/**/*.yaml"]
4
+ description: Prod deploys require GitHub Environments with required_reviewers — no exceptions
5
+ ---
6
+
7
+ # Manual Prod Approval Rule
8
+
9
+ Every app repo's production deploy MUST gate on GitHub Environments
10
+ with `required_reviewers` configured. Auto-deploy-to-prod on any
11
+ branch push is a rule violation.
12
+
13
+ ## Why
14
+
15
+ `guardrails.md` already says: "Deploy to production without human
16
+ approval — even in orchestrator-gated mode. This is the hardest
17
+ guardrail. No exceptions."
18
+
19
+ This rule specifies the **mechanism** for enforcement: GitHub's
20
+ native Environments feature with reviewer requirements, not agent
21
+ discipline. Agents can and will skip softer forms. Infrastructure-
22
+ enforced gates cannot be skipped.
23
+
24
+ ## What satisfies the rule
25
+
26
+ A deploy workflow with a job referencing a GitHub Environment that
27
+ has `required_reviewers` configured:
28
+
29
+ ```yaml
30
+ jobs:
31
+ deploy-prod:
32
+ environment:
33
+ name: prod # ← this environment must exist in repo settings
34
+ # with required_reviewers set
35
+ steps:
36
+ - ... actual deploy steps
37
+ ```
38
+
39
+ Repo settings at github.com/[owner]/[repo]/settings/environments
40
+ must show:
41
+ - Environment named `prod`
42
+ - Deployment protection rules enabled
43
+ - Required reviewers populated (at least one operator)
44
+
45
+ ## What violates the rule
46
+
47
+ - `main` branch push auto-deploys to prod without Environment gating
48
+ - Any workflow job deploying to prod without `environment:` field
49
+ - Environment exists but has no required reviewers (empty list = auto-approved)
50
+ - Reviewers are GitHub bots / service accounts (must be human identity)
51
+
52
+ ## Detection
53
+
54
+ This rule fires when:
55
+ - A new app repo is scaffolded by `/autonomous start` with
56
+ `deploy_targets.prod` set to a URL
57
+ - `.github/workflows/deploy.yml` is added or modified
58
+ - Pre-commit-gate hook detects workflow changes touching prod deploy steps
59
+
60
+ ## Enforcement
61
+
62
+ - Pre-commit-gate hook surfaces a warning if deploy workflow
63
+ touches prod without Environment reference
64
+ - `/substrate-check` skill validates Environment + reviewer configuration
65
+ when `deploy_targets.prod` is set
66
+ - `/deploy-prod` skill refuses to run if Environment validation
67
+ fails
68
+
69
+ ## What agents do when rule is violated
70
+
71
+ Fire BLOCKED: (per `blocked-items.md`):
72
+ - `BLOCKED: prod deploy without approval gate — configure GitHub
73
+ Environment 'prod' with required_reviewers before proceeding`
74
+ - Resolve (configure via `gh api` or UI) or explicit defer with
75
+ rationale. Silence is not deferral.
76
+
77
+ ## Setup commands (one-time per repo)
78
+
79
+ ```bash
80
+ # Get your user ID
81
+ USER_ID=$(gh api user --jq '.id')
82
+
83
+ # Create prod environment with yourself as reviewer
84
+ gh api repos/$OWNER/$REPO/environments/prod --method PUT -f "wait_timer=0" \
85
+ -f "deployment_branch_policy[protected_branches]=false" \
86
+ -f "deployment_branch_policy[custom_branch_policies]=true"
87
+
88
+ # Add required reviewer
89
+ gh api repos/$OWNER/$REPO/environments/prod \
90
+ --method PUT \
91
+ -F "reviewers[][type]=User" \
92
+ -F "reviewers[][id]=$USER_ID"
93
+ ```
94
+
95
+ ## Related
96
+
97
+ - `.claude/rules/guardrails.md` — prod deploy human-approved
98
+ - `standards/deployment-topology.md` — bassclef deploy pattern
99
+ - `standards/substrate-config-schema.md` — `prod_approval_reviewers`
100
+ field convention
@@ -0,0 +1,72 @@
1
+ ---
2
+ tier: lite
3
+ description: Gate marker files (under state/markers/temperance/, state/markers/luminary/, state/markers/arc-walk/, state/markers/orientation-gate/, state/markers/roadmap-reconcile-gate/) MUST…
4
+ ---
5
+
6
+ # Marker Enrichment Discipline
7
+
8
+ Gate marker files (under `state/markers/temperance/`, `state/markers/luminary/`, `state/markers/arc-walk/`, `state/markers/orientation-gate/`, `state/markers/roadmap-reconcile-gate/`) MUST carry body content within the same WU or PR that creates them. Touching a marker without body content satisfies the gate's existence check but leaves no audit trail — months later, a reader cannot recover the scope-decision, luminary lens, or thread context that the marker is supposed to record.
9
+
10
+ This rule is the methodology layer. The mechanical layer is `pre-build-gate.sh` extended with a non-empty-body check on the 5 gate-marker classes (advisory in V1 per the allowlist baseline; BLOCK in V2 after the allowlist is empty).
11
+
12
+ ## When this rule fires
13
+
14
+ Any session creating a marker file in the 5 gate-marker directories:
15
+
16
+ - `state/markers/temperance/`
17
+ - `state/markers/luminary/`
18
+ - `state/markers/arc-walk/`
19
+ - `state/markers/orientation-gate/`
20
+ - `state/markers/roadmap-reconcile-gate/`
21
+
22
+ Does NOT fire on:
23
+
24
+ - `state/markers/session-timing/` — transient timing data, machine-written
25
+ - `state/markers/diagnose/` — fix-branch evidence (uses different format)
26
+ - `state/markers/adr/` — ADR decision markers (different rule)
27
+ - `state/markers/turn-prose-surface/` — kiss-surface flags (different rule)
28
+ - Markers in the allowlist `state/markers/marker-enrichment-allowlist.txt` (grandfathered baseline; cleared over time)
29
+
30
+ ## What the rule requires
31
+
32
+ When the step that creates a marker commits:
33
+
34
+ 1. Marker file exists at the expected path
35
+ 2. Marker file is non-empty (>0 bytes)
36
+ 3. Marker body contains the format conventions above (date + branch + decision-content; advisory check in V1, mechanical in V2)
37
+
38
+ INSTEAD of `touch state/markers/temperance/<branch>.marker`: use heredoc to write the body inline:
39
+
40
+ ```bash
41
+ cat > state/markers/temperance/<branch>.marker << 'EOF'
42
+ # Temperance marker — <bet> <WU>
43
+ - date: <ISO date>
44
+ - branch: <branch>
45
+ - scope-decision: <right-thing + right-way + drift-trigger>
46
+ EOF
47
+ ```
48
+
49
+ ## Mechanical layer (V1 advisory)
50
+
51
+ `pre-build-gate.sh` extended with `check_marker_non_empty()` function. Fires on existence check; if marker exists but is 0 bytes AND not in the allowlist, emits ADVISORY warning to stderr. Does NOT block in V1.
52
+
53
+ V2 (deferred to follow-on goal): flip to BLOCK once the allowlist baseline is fully cleared (operator backfills over time).
54
+
55
+ ## Allowlist
56
+
57
+ `.claude/hooks/marker-enrichment-allowlist.txt` lists existing empty markers as of bet 28a WU-5 land date. Entries grandfathered indefinitely. Operator backfills body content over time; when the allowlist is empty, V2 BLOCK flip becomes eligible.
58
+
59
+ ## Override
60
+
61
+ `SKIP_MARKER_ENRICHMENT=1 <command>` — for one-shot migration scripts that bootstrap markers from external state. Logged via trace-helper.
62
+
63
+ INSTEAD of overriding for routine work: write the body. The cost is seconds; the audit trail compounds across every future session reading the marker.
64
+
65
+ ## Composes with
66
+
67
+ - `.claude/rules/sdlc-gates.md` — temperance + diagnose gate firing semantics
68
+ - `.claude/rules/blocked-items.md` — BLOCK protocol (V2 will use this)
69
+ - `.claude/rules/testing-tier-config.md` — Tier 0 strict-TDD on the hook + tests
70
+ - `.claude/rules/mechanism-fidelity.md` — sister mechanical-enforcement discipline
71
+ - `.claude/hooks/pre-build-gate.sh` — the mechanical implementation
72
+ - `@luminary michael-feathers` — characterization tests as cure; existing empty markers are legacy; cure by enriching as touched