@thebassclef/lite 1.0.4 → 1.1.1

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 +298 -55
  2. package/dist/cli.js +298 -55
  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 +12 -5
@@ -0,0 +1,85 @@
1
+ ---
2
+ tier: lite
3
+ globs: ["*"]
4
+ description: Context window management — thresholds, compaction strategy, survival kit
5
+ ---
6
+
7
+ # Context Management
8
+
9
+ Long sessions will hit context limits. This is expected, not a failure.
10
+ Manage proactively.
11
+
12
+ INSTEAD of waiting for compaction to surprise you: checkpoint at 70%
13
+ context (commit work, write whereami, let compaction run). Re-read the
14
+ survival kit after compaction.
15
+
16
+ ## Thresholds
17
+
18
+ | Context level | Action |
19
+ |--------------|--------|
20
+ | 0–50% | Normal operation. Read files freely. |
21
+ | 50–70% | Be selective. INSTEAD of full file reads: use Glob/Grep with bounded result sets. Skip re-reading files already in current context. |
22
+ | 70% | **Checkpoint now.** Commit all work. Write whereami. The system will auto-compact prior messages. After compaction, re-read the survival kit. |
23
+ | 80%+ | **Atomic tasks only.** Complete current task, commit, re-read survival kit. Do not start multi-file changes. |
24
+ | 90% | **Finish and stop.** Complete the current atomic unit, commit, update whereami. Write chronicle if at a phase boundary. |
25
+
26
+ ## Survival kit (re-read after ANY compaction)
27
+
28
+ The survival kit mirrors what `iteration-bet-brief-completeness.md`
29
+ requires in a Builder/Designer/Architect handoff brief — same artifact
30
+ list, one source of truth. Post-compaction re-read is functionally
31
+ identical to a fresh role handoff: the agent needs the same context to
32
+ continue the goal correctly.
33
+
34
+ **Always re-read:**
35
+
36
+ 1. **Iteration bet** — scope, phase, time budget, acceptance criteria, references block
37
+ 2. **Phase-state** — where we are, what's done, what's next
38
+ 3. **MUST gates** — sdlc-gates rule + choreography Section 9
39
+ 4. **Current agent definition** — role-specific obligations (if multi-agent)
40
+
41
+ **Re-read when the goal's References cite them (per scope):**
42
+
43
+ 5. **Canvas** — upstream thesis; re-read when spec is thin or scope is
44
+ product-facing
45
+ 6. **Current spec or decomposition artifact** — what's being built; the
46
+ `/decompose` output carries cross-cutting-concern resolution
47
+ (interfaces, decorators) that must survive compaction or the
48
+ Langfuse-inside-HaikuImputer anti-pattern reproduces
49
+ 7. **Prototypes** — every prototype path the goal cites; losing these
50
+ reproduces the cramped-UI-rebuild failure mode
51
+ 8. **Pinned ADRs** — architecture constraints the goal calls governing
52
+ 9. **Luminary map** — primary pair + extended pairs for surfaces in scope
53
+ 10. **Branch stack manifest** — if in Construction with stacked branches
54
+ 11. **Risk register (active iteration)** — so mitigations aren't re-forgotten
55
+
56
+ What you do NOT need to re-read: the 24 bassclef rules, standards in
57
+ `standards/`, and agent choreography. Those inherit via
58
+ `additionalDirectories` and are injected fresh each turn — compaction
59
+ does not drop them.
60
+
61
+ If you can't recall what you're building, what gates apply, or which
62
+ prototypes/ADRs/luminaries govern the work, you've lost critical
63
+ context. Re-read before continuing.
64
+
65
+ ## Anti-patterns
66
+
67
+ - **Don't read entire large files** when you only need a section.
68
+ INSTEAD: use Read with offset/limit, or grep for the section header first.
69
+ - **Don't re-read files** already in the conversation.
70
+ INSTEAD: check whether the file content is already in your context window.
71
+ - **Don't expand search results** you don't need.
72
+ INSTEAD: use head_limit on Grep to cap the result set.
73
+ - **Don't keep retrying** failed approaches — each retry consumes context.
74
+ INSTEAD: diagnose first (Is/Is Not + Five Whys), then fix.
75
+
76
+ ## Sequential mode specifics
77
+
78
+ In sequential autonomous mode, one session plays all roles. Context
79
+ pressure is highest during Construction after Inception and Elaboration
80
+ have consumed context. At each role transition:
81
+
82
+ 1. Commit all artifacts from the current role
83
+ 2. The handoff artifact IS the context for the next role
84
+ 3. Let compaction run
85
+ 4. Re-read survival kit + next agent definition
@@ -0,0 +1,52 @@
1
+ ---
2
+ tier: lite
3
+ description: Every bash hook + script in bassclef follows standards/bash-hook-safety.md.
4
+ ---
5
+
6
+ # Defensive Bash — Methodology Pointer
7
+
8
+ Every bash hook + script in bassclef follows `standards/bash-hook-safety.md`. This rule is the auto-loaded reminder; the standard is the full reference.
9
+
10
+ ## When this rule fires
11
+
12
+ Any edit / write to:
13
+
14
+ - `.claude/hooks/*.sh` (hook files)
15
+ - `scripts/*.sh` (scripts)
16
+ - `lib/*.sh` (shared bash libraries)
17
+ - New bash files anywhere in the repo (`.sh` extension OR `#!/bin/bash` shebang)
18
+
19
+ ## The seven disciplines (one-line each)
20
+
21
+ 1. **Strict mode at the top** — `set -euo pipefail` is mandatory
22
+ 2. **Quote every variable** — `"$var"` always inside string contexts; bare `$var` inside strings causes word-splitting + glob-expansion
23
+ 3. **`local` in functions** — every function-scope variable declared `local`
24
+ 4. **Trap EXIT for cleanup** — temp files / locks / background processes get `trap '...' EXIT`
25
+ 5. **Explicit return codes** — every termination point ends with `exit N`
26
+ 6. **Glob-tolerance** — `shopt -s nullglob` or array-with-length-check
27
+ 7. **Audit emission at every exit** — `trace_record` before exit
28
+
29
+ Full reference: `standards/bash-hook-safety.md` (each discipline has anti-pattern + INSTEAD pair + worked example).
30
+
31
+ ## Saltzer & Schroeder anchor
32
+
33
+ The seven disciplines instantiate `@luminary saltzer-schroeder`'s 8 protection-mechanism principles for the bash layer. The stack-translation table in `.claude/luminaries/saltzer-schroeder.md` maps each principle to its bash discipline.
34
+
35
+ INSTEAD of inventing bassclef-specific bash rules: this rule + standard chain to the 50-year-stable Saltzer & Schroeder authority. The chain is: principle (luminary) → discipline (standard) → reminder (this rule).
36
+
37
+ ## Mechanical enforcement
38
+
39
+ | Layer | Mechanism | When |
40
+ |---|---|---|
41
+ | Methodology | This rule (auto-loaded) | Every session |
42
+ | Tier 0 TDD | `testing-tier-enforce.sh` hook | Edit/Write on `.claude/hooks/*.sh` (test mtime ≤ source mtime) |
43
+ | Shellcheck baseline | `.github/workflows/shellcheck.yml` (Phase X-4) | PR open + push |
44
+ | Strict-mode self-check | Reviewer + `/security-review` skill | PR review |
45
+
46
+ INSTEAD of relying on agent self-discipline alone: mechanical layers fire at the moment of failure. This rule is the methodology layer that coexists with the mechanical layers.
47
+
48
+ ## Override
49
+
50
+ `SKIP_DEFENSIVE_BASH=1 <command>` — for one-shot scripts that will not ship into the substrate (e.g., ad-hoc data inspection). Logged via trace-helper.
51
+
52
+ INSTEAD of overriding when scope is tight: split the work — the throwaway script bypasses; the substrate-bound hook keeps the discipline. Mixing the two leaves substrate code with weakened safety.
@@ -0,0 +1,233 @@
1
+ ---
2
+ tier: lite
3
+ globs: ["**/*"]
4
+ description: Deferred-actions manifest — capability-routed handoff across session modalities. Sessions write entries when capabilities don't satisfy an action; capable future sessions pick them up.
5
+ ---
6
+
7
+ # Deferred Actions — Session Handoff Protocol
8
+
9
+ `docs/deferred-actions/*.md` is the capability-routed handoff primitive.
10
+ When a session produces work it cannot deliver (missing credentials,
11
+ ephemeral sandbox, abrupt stop), it writes a deferred-action entry that
12
+ a capable future session picks up at session-start.
13
+
14
+ See `standards/deferred-actions-schema.md` for the full schema, field
15
+ reference, capability vocabulary, and lifecycle. This rule governs
16
+ *agent behavior* — when to write, when to resolve, how to prioritize.
17
+
18
+ ## When to write a deferred-action entry
19
+
20
+ Any time the session has produced artifacts or state the current
21
+ environment cannot deliver, and a future session with different
22
+ capabilities could.
23
+
24
+ Specifically:
25
+
26
+ 1. **External delivery gap** — skill produced output that pushes to an
27
+ external service (Google Doc, memory file, remote tag) but the
28
+ session lacks the capability. Examples:
29
+ - `/release-notes` in ephemeral-mobile — missing `gcloud-auth`
30
+ - `/journal` in cloud-web — missing `network` + `gcloud-auth`
31
+ - `/deploy-prod` retroactive `git tag` — ephemeral session without `git-tag`
32
+ 2. **Memory proposal** — mobile / cloud-web session identifies a memory
33
+ entry worth adding, but cannot write to `~/.claude/projects/.../memory/`.
34
+ Write a `*-memory.md` entry with the proposed content; next desktop
35
+ session reviews and applies.
36
+ 3. **Session rescue (abrupt stop)** — Stop hook fires in danger mode
37
+ (context exhausted, OS interruption). Write a `*-session-rescue.md`
38
+ entry enumerating unfinished MUST/SHOULD obligations (chronicle
39
+ backfill, whereami update, journal entry). Next session picks them
40
+ up as `BLOCKED:` items.
41
+ 4. **Skill explicitly defers** — any skill that encounters a missing
42
+ capability mid-run should self-detect and write the entry rather
43
+ than silently skipping. Silent skip is a rule violation (per
44
+ `session-artifacts.md` — silence is not deferral).
45
+
46
+ ## How to write
47
+
48
+ Copy `templates/deferred-action-template.md` to
49
+ `docs/deferred-actions/<ISO-ts>-<slug>.md`. Fill every required field
50
+ per the schema. Commit as part of the session's normal artifact flow.
51
+
52
+ ```bash
53
+ # example one-liner for skills
54
+ TS=$(date -u +"%Y-%m-%dT%H-%M-%SZ")
55
+ SLUG="release-notes-gdoc-push"
56
+ cp templates/deferred-action-template.md \
57
+ "docs/deferred-actions/${TS}-${SLUG}.md"
58
+ # ...then edit the frontmatter + body in-place
59
+ ```
60
+
61
+ The file must commit successfully — if `git add` / `git commit` fails
62
+ in the current session, the entry will not propagate. Surface the
63
+ failure visibly; do not silently drop.
64
+
65
+ ## When to resolve
66
+
67
+ At session-start, `60-deferred-actions.sh` scans entries and emits
68
+ `BLOCKED:` for capability-matched entries (this session can resolve)
69
+ or `INFORM:` for capability-missed entries (visible, not actionable).
70
+
71
+ Protocol for `BLOCKED:` entries mirrors `blocked-items.md`:
72
+
73
+ 1. Surface the `BLOCKED:` block verbatim to the operator (agent's
74
+ mandatory response format handles this automatically).
75
+ 2. Each blocked deferred-action entry MUST be either:
76
+ - **Resolved** in this session (run the entry's "Command to execute",
77
+ verify "On completion", apply Pattern A or Pattern B per below), OR
78
+ - **Explicitly deferred** by operator ("skip `<id>` this session")
79
+ 3. Silence is not deferral. Default is resolve.
80
+
81
+ ### Two resolution patterns — Pattern A and Pattern B
82
+
83
+ Resolution shape depends on whether the entry's work was actually done OR routed elsewhere. Picking the wrong pattern is a real substrate failure. The eager mv to `completed/` mistake compounds across consumer sessions if not caught.
84
+
85
+ **Pattern B (mv to completed/) — work was done:**
86
+
87
+ The entry's `Command to execute` ran successfully; the entry's `On
88
+ completion` checks pass; the work the entry described is finished.
89
+
90
+ ```bash
91
+ git mv "docs/deferred-actions/<id>.md" \
92
+ "docs/deferred-actions/completed/<id>.md"
93
+ git commit -m "chore: resolve <id>"
94
+ ```
95
+
96
+ The filename never changes; git tracks the move so audit trail is
97
+ preserved.
98
+
99
+ **Pattern A (keep alive in active dir, flip status, surface as INFORM)
100
+ — work was routed elsewhere:**
101
+
102
+ The entry can't run as written because the substrate needs the current session cannot deliver. Examples: operator decisions, infra not yet provisioned, schema not yet shipped. The work moves to a GitHub issue in the consumer repo with the prereq spec. Bassclef issues get cross-referenced in a comment. The deferred-action file stays **in the active dir** with status flipped to `blocked-on-issue:#NNN`.
103
+
104
+ Procedure:
105
+ 1. File a GitHub issue in the consumer repo with the prereq
106
+ specification.
107
+ 2. Cross-reference relevant bassclef issues in a comment on that
108
+ issue.
109
+ 3. **Leave** the deferred-action file in `docs/deferred-actions/`
110
+ (active dir).
111
+ 4. Edit the entry's frontmatter: set `status: blocked-on-issue:#NNN`.
112
+ 5. When bassclef#434 (`/defer-to-issue` skill) ships, the skill will
113
+ automate steps 1-4 and surface the entry as `INFORM` instead of
114
+ `BLOCKED` at session-start.
115
+
116
+ Why Pattern A: deferred actions stay a visible signal until the substrate work behind them ships. Moving to `completed/` makes them disappear from the BLOCKED/INFORM pipeline. That is correct only when the work itself was done (Pattern B). Not when it was routed elsewhere.
117
+
118
+ ### Picking between A and B
119
+
120
+ ```mermaid
121
+ stateDiagram-v2
122
+ [*] --> Active: entry written
123
+
124
+ Active --> RanCommand: agent runs Command to execute
125
+ RanCommand --> CheckOnCompletion: command succeeded
126
+ CheckOnCompletion --> CompletedB: On completion check passes (work done)
127
+ CheckOnCompletion --> RanCommand: check fails — retry
128
+
129
+ Active --> FoundFalsePositive: hook fired but work was already done
130
+ FoundFalsePositive --> CompletedB: mv to completed/ with body note
131
+
132
+ Active --> NeedsPrereqs: work needs prereqs current session cannot deliver
133
+ NeedsPrereqs --> FiledIssue: file GitHub issue with prereq spec
134
+ FiledIssue --> BlockedOnIssueA: leave in active dir, flip status to blocked-on-issue:#NNN
135
+
136
+ CompletedB --> [*]: archived in completed/ dir
137
+ BlockedOnIssueA --> Active: prereqs land, retry
138
+ BlockedOnIssueA --> CompletedB: re-routed work satisfied elsewhere
139
+ ```
140
+
141
+ The state machine. Pattern B archives via `git mv` to `completed/`. Pattern A keeps the entry in `active/` and flips its status. Picking wrong compounds across consumer sessions. The wrong pick is: eager mv to `completed/` when the work was routed elsewhere.
142
+
143
+ Ask: did the entry's `Command to execute` run successfully and does
144
+ its `On completion` check pass?
145
+
146
+ - **Yes** → Pattern B (mv to completed/)
147
+ - **No, because the work needs prereqs the current session can't
148
+ deliver** → Pattern A (file issue, flip status, leave in active dir)
149
+ - **No, because the entry was a hook false-positive (the work was
150
+ already done elsewhere)** → Pattern B (mv to completed/) with a
151
+ body note in the resolution commit explaining the false-positive
152
+ reason
153
+
154
+ Mid-session, if you are tempted to mv a deferred-action to `completed/` because "we decided not to do it tonight" — STOP. That is Pattern A territory. File the issue. Comment with cross-refs. Leave the file alone. If you have already mv'd, revert. Push the revert to the same branch the file lives on.
155
+
156
+ ### Source incidents
157
+
158
+ - TwoDo session 2026-05-02 (`docs/chronicle/2026-05-02-bind-subdomain-deferred-action-triage.md`): bind-subdomain deferred-action filed by cloud `/launch` dispatch (TwoDo PR #269) needed deploy-host provisioning the session couldn't do. First pass mv'd to `completed/` (commit `b4db506`); operator caught it and reverted (`b566d6c`) so bassclef#434 (when shipped) can route through Pattern A.
159
+ - bassclef session 2026-05-03 /longrun pre-flight: `2026-05-01T11-51-24Z-session-rescue` had its hook-flagged obligations satisfied across subsequent sessions (chronicles written daily, whereami fresh) — Pattern B mv to completed/ correct here (work satisfied via natural session flow, not structurally re-routed).
160
+
161
+ ### Reference
162
+
163
+ - bassclef#434 — `/defer-to-issue` skill (automates Pattern A)
164
+ - bassclef#437 — deferred-action schema extension (adds the
165
+ `blocked-on-issue:#NNN` status field referenced above)
166
+
167
+ ## When to surface INFORM
168
+
169
+ `INFORM:` entries are visible at session-start but not actionable in
170
+ the current modality. Agent behavior:
171
+
172
+ - Acknowledge the count in the session plan ("3 deferred entries require
173
+ capabilities this session doesn't have — next desktop session picks
174
+ them up")
175
+ - Do NOT attempt to resolve them. Doing so wastes turns and may corrupt
176
+ the entry (partial resolution with wrong capabilities).
177
+ - Do NOT delete or archive them. They wait for a capable session.
178
+
179
+ ## Priority handling
180
+
181
+ Entries have `priority: high | medium | low` in frontmatter. Resolution
182
+ order within a session:
183
+
184
+ 1. All `high` entries first (integrity-critical — missing chronicle,
185
+ orphan memory proposal)
186
+ 2. All `medium` entries (delivery gaps with downstream cost)
187
+ 3. `low` entries (nice-to-have) only if time budget allows
188
+
189
+ If a session has 5+ resolvable entries, batch by priority and surface a
190
+ resolution plan to the operator before running through them.
191
+
192
+ ## What NOT to write as a deferred action
193
+
194
+ - **Tasks the operator hasn't asked for** — deferred actions are for
195
+ already-produced work, not proactive task proposals. Use GitHub
196
+ issues for that.
197
+ - **Debug state or scratch notes** — chronicle footnotes, commit
198
+ messages, and scratch branches cover these.
199
+ - **Information the resolver can re-derive** — if the work can be
200
+ re-produced by running the skill again, just cite the skill in a
201
+ chronicle and let the next session re-run it.
202
+
203
+ ## Relationship to other rules
204
+
205
+ - `blocked-items.md` — deferred actions fire through the same
206
+ BLOCKED/resolve/explicit-defer protocol; this rule adds the
207
+ capability-routing layer
208
+ - `mobile-ephemeral-session.md` — modality detection + the rule that
209
+ markers go git-tracked (not `/tmp`); deferred actions are the
210
+ mechanism for modality-bridging
211
+ - `session-artifacts.md` — chronicle + journal-entry tier obligations;
212
+ session-rescue entries cover the abrupt-stop case
213
+ - `artifact-ingestion.md` — resolving a deferred action counts as
214
+ "reading prior artifact"; the entry itself is the source to cite
215
+
216
+ ## Override paths
217
+
218
+ - **Skip this session**: operator explicit "skip `<id>`" — entry stays
219
+ in place, next session surfaces it again
220
+ - **Reject as not-needed**: operator explicit "reject `<id>`" — the
221
+ resolving session `git mv`'s to `completed/` with a body note
222
+ explaining rejection rationale (audit trail preserved)
223
+ - **Re-scope mid-resolution**: if the entry's command no longer applies,
224
+ amend the entry body to describe the new path; do not delete
225
+
226
+ ## Enforcement
227
+
228
+ Methodology-level. The session-reflection hook surfaces entries; the
229
+ rule governs disposition. Mechanical enforcement (hook blocks session
230
+ on unresolved high-priority entries) could be added if methodology
231
+ alone proves insufficient.
232
+
233
+ Override per-session: `SKIP_DEFERRED_ACTIONS=1 <command>` (logged to trace).
@@ -0,0 +1,69 @@
1
+ ---
2
+ tier: lite
3
+ description: The destructive-command-guard hook catches known patterns mechanically.
4
+ ---
5
+
6
+ # Destructive Operations — Agent Self-Assessment
7
+
8
+ The destructive-command-guard hook catches known patterns mechanically.
9
+ This rule is the primary gate — your judgment catches what grep cannot.
10
+
11
+ ## Before ANY command that modifies state outside the working directory
12
+
13
+ Pause and ask three questions:
14
+
15
+ 1. **ROOT CAUSE** — What specific problem requires this action?
16
+ Not "it's broken." What exactly is wrong? Can you name the error?
17
+
18
+ 2. **SIMPLER FIX** — Is there a targeted alternative that avoids destruction?
19
+ The simplest fix is almost never the most destructive one.
20
+
21
+ 3. **RECOVERY** — If this goes wrong, can you undo it?
22
+
23
+ ## What counts as "outside the working directory"
24
+
25
+ - **Databases**: any SQL command, Prisma operation, Redis command, Mongo operation
26
+ - **Containers**: Docker, Kubernetes, compose operations that modify state
27
+ - **Cloud infra**: AWS, GCP, Azure, Terraform, Pulumi operations
28
+ - **Package registries**: npm publish, unpublish, deprecate
29
+ - **Caches**: Redis FLUSHALL, CDN invalidation, build cache clearing
30
+ - **Services**: process kills, daemon restarts, cron modifications
31
+ - **Auth/secrets**: key rotation, token revocation, permission changes
32
+ - **DNS/networking**: record changes, firewall rules, proxy config
33
+
34
+ ## The hook catches these mechanically
35
+
36
+ Destructive verbs: reset, drop, delete, destroy, purge, prune, wipe,
37
+ clean, truncate, flush, drain, evict, overwrite, revert, rollback,
38
+ format, erase, clear, demolish, discard, abort, terminate, revoke,
39
+ invalidate, expire, uninstall, deregister, detach
40
+
41
+ Force flags: --force, --hard, -f, -rf, --yes, --no-verify
42
+
43
+ Amplifiers: CASCADE, --all, --volumes, -r, --recursive, system
44
+
45
+ ## You catch what the hook cannot
46
+
47
+ The hook is grep. It doesn't understand semantics. These are destructive
48
+ but won't trigger the hook:
49
+
50
+ - `redis-cli FLUSHALL` — "FLUSHALL" is now caught, but `redis-cli SET key ""` (overwriting data) is not
51
+ - `kubectl apply -f destroy-everything.yaml` — "apply" is not destructive, the file is
52
+ - `curl -X DELETE https://api.example.com/users` — HTTP DELETE is semantic
53
+ - `psql -c "UPDATE users SET role = 'admin'"` — UPDATE isn't a destructive verb but this is dangerous
54
+ - `echo "" > important-config.yaml` — echo and redirect, not a destructive verb
55
+ - Piping data to a command that overwrites: `cat /dev/null > database.db`
56
+ - Any SDK/API call that modifies production state
57
+
58
+ **Your responsibility**: if the command modifies state that can't be
59
+ trivially recreated, pause and answer the three questions. Don't wait
60
+ for the hook. The hook is the safety net. You are the primary gate.
61
+
62
+ ## Severity guide
63
+
64
+ | Signal | Action |
65
+ |--------|--------|
66
+ | Modifies local dev data | Pause, assess, proceed if justified |
67
+ | Modifies shared/staging state | Pause, assess, confirm with operator |
68
+ | Modifies production state | **STOP. Always require explicit human approval.** |
69
+ | Irreversible at any level | Pause, verify backup exists, confirm with operator |
@@ -0,0 +1,38 @@
1
+ ---
2
+ tier: lite
3
+ globs: ["*"]
4
+ description: Three-step diagnosis before writing any fix
5
+ ---
6
+
7
+ When a failure's cause is not immediately obvious, run diagnosis BEFORE writing any fix.
8
+
9
+ Step 0 — Reproduce (RED anchor):
10
+ State the minimum repro command / URL / action that triggers the failure.
11
+ State observed vs expected. State environment. State reproducibility
12
+ (every time / intermittent / unable).
13
+
14
+ Without a repro, "I fixed it" has no counterpart "here's the thing it's not
15
+ doing anymore." The repro is the surface every subsequent step operates on.
16
+
17
+ Step 1 — Is/Is Not (2 min):
18
+ Fill the table. What specific thing fails? What similar thing works?
19
+ This constrains the hypothesis space before touching code.
20
+
21
+ Step 2 — Five Whys:
22
+ Trace to something changeable that prevents the CLASS of failure, not just this instance.
23
+ A timeout is a symptom. Missing observability is a root cause.
24
+
25
+ Step 3 — Hypothesis + Test:
26
+ One sentence hypothesis. Minimum falsifiable check (a test, a log, a query).
27
+
28
+ Output: diagnosis comment on the ticket BEFORE opening a fix PR.
29
+
30
+ Skip criteria (all steps):
31
+
32
+ Skip full diagnosis ONLY when cause is immediately obvious and reproducible:
33
+ typo, missing env var, off-by-one. In these cases the repro is implicit in
34
+ the code change itself; state "Step 0 skipped — [reason]" in output.
35
+ Silence is not skip.
36
+
37
+ When in doubt, run it. Step 0 repro is cheap; the "unable to reproduce"
38
+ escalation is itself valuable signal.
@@ -0,0 +1,114 @@
1
+ ---
2
+ tier: lite
3
+ description: "Every GitHub issue body opens with Problem (≤500 chars): + --- + technical detail."
4
+ ---
5
+
6
+ # GitHub Issue Body — Problem-Section Discipline
7
+
8
+ Every GitHub issue body opens with `**Problem (≤500 chars):**` + `---` + technical detail. Operators on mobile read the title, then the Problem statement, then decide whether to scroll into the body. Detail comes AFTER the problem framing, not before.
9
+
10
+ This rule closes the missing-surface gap: bassclef already enforces a clean opener at three other surfaces (skill descriptions per bassclef#377, plan enumerations per bassclef#339, autonomous-run output per bassclef#357). bassclef#484 originally adopted Flash + Tweet at the issue surface; bassclef#1178 retires that pairing in favor of a single problem-grounded section drafted by `/state-a-problem brief` — same shape, better orientation, fewer chars for the operator to scan.
11
+
12
+ ## Format contract
13
+
14
+ Every issue body MUST open with:
15
+
16
+ ```markdown
17
+ **Problem (≤500 chars):** <Who + What + When + Why now + Outcome — framework implicit; drafted by /state-a-problem brief>
18
+
19
+ ---
20
+
21
+ ## <first detail section>
22
+ ```
23
+
24
+ Format rules:
25
+
26
+ - **Problem label is bold and enclosed in `**`** — visual scan handle, not body prose
27
+ - **Length limit enforced** — Problem ≤500 chars (matches `/state-a-problem brief` mode cap)
28
+ - **Plain language** — no bassclef jargon ("primitive", "load-bearing") in the Problem section. The Problem section is the FIRST place a reader meets the work; jargon here destroys orientation. `/state-a-problem` runs `/kiss --grade10` inline by default so this rule is hard to violate
29
+ - **Horizontal rule** (`---`) separates Problem from technical detail
30
+ - **Implicit framework** — Who/What/When/Why-now/Outcome carried in 3-4 sentences; labels NOT in the output
31
+ - **No leading whitespace or code blocks before Problem** — must be the literal first content of the body
32
+
33
+ ## What NOT to do
34
+
35
+ - **Don't open with a section header** (`## Summary`, `## Context`, etc.) before Problem. INSTEAD: Problem is the headline; section headers come after the `---` rule.
36
+ - **Don't fall back to Flash + Tweet** because the `/state-a-problem` skill is not at hand. INSTEAD: hand-roll the Problem section using the implicit framework (Who/What/When/Why-now/Outcome in 3-4 sentences). The shape contract holds even when the mechanical layer is not running.
37
+ - **Don't bury the claim in a "## Why this is needed" section.** INSTEAD: the claim IS the Problem opener; the rest of "why" belongs in detail.
38
+ - **Don't use jargon walls in Problem.** INSTEAD: substitute plain English per `standards/bassclef-internal-jargon.md` and the `/kiss --grade10` table.
39
+ - **Don't skip Problem because "the title says it."** INSTEAD: titles are search-truncated to ~70 chars; the Problem section gives the operator full context without needing to load the body.
40
+
41
+ ## Trivial-fix exception
42
+
43
+ Bug-report or quick-fix tickets MAY skip the Problem section if the scope is one file AND no methodology change is implied (e.g., "typo in line 42 of X"). The shape contract still requires a clear first detail section in that case.
44
+
45
+ ## When this rule fires
46
+
47
+ Every NEW GitHub issue body filed via:
48
+
49
+ - `/promote` SKILL.md output — must include Problem section at top
50
+ - `gh issue create` direct dispatch — agent self-checks before writing; local pre-author scrub fires via bassclef#1177 (PR #1180)
51
+ - Manual operator filing via GitHub web UI — issue templates updated to show Problem shape
52
+
53
+ Existing tickets are NOT retroactively backfilled. Forward-only enforcement keeps the discipline visible at the ticket-creation surface where it lands.
54
+
55
+ ## Mechanical enforcement
56
+
57
+ V1 shipped methodology + `/promote` SKILL composition update (bassclef#484). V2 shipped local pre-author body scrub via bassclef#1177 (PR #1180 merged 2026-06-18). V3 (this bassclef#1178 amendment) ships:
58
+
59
+ - Shape contract enforces Problem opener at substantive issue bodies
60
+ - `/state-a-problem brief` skill drafts the section (runs `/kiss --grade10` inline by default)
61
+ - `/promote` SKILL output gains the Problem-section shape
62
+
63
+ ## Override path
64
+
65
+ `SKIP_ISSUE_PROBLEM_SHAPE=1 <command>` — for genuinely-not-issue-body cases (e.g., bug reports filed directly by external users where bassclef doesn't control the format). Logged.
66
+
67
+ INSTEAD of overriding for tight scope: write the Problem section. Three sentences carrying the framework cost less than reviewer re-derivation.
68
+
69
+ ## Summary
70
+
71
+ Add `/roadmap-reconcile` — a bassclef skill that updates roadmap surfaces...
72
+
73
+ ## Why this is needed
74
+
75
+ Observed pattern (2026-05-04 sessions, captured during /longrun prep 2026-05-04d):
76
+
77
+ 1. Operator ideation surfaces a load-bearing detour mid-session...
78
+ 2. The detour reshapes downstream LR-N sequencing, but the canvases that hold...
79
+ ```
80
+
81
+ Operator on mobile reads title, then "Summary" header, then has to read 3 paragraphs to get the claim. The claim is buried; user pain stays implicit.
82
+
83
+ ### Anti-pattern (V1 Flash + Tweet — superseded by bassclef#1178)
84
+
85
+ ```markdown
86
+ **Flash (≤180 chars):** /roadmap-reconcile automates LR4 WU-0's manual canvas reconciliation — diffs canvas LR-N tables against shipping reality, surfaces drift via dry-run, applies edits with --apply.
87
+
88
+ **Tweet (≤280 chars):** Stale-canvas trap closes: every future /longrun prep auto-reconciles before scope commit. Skill detects status mismatch, sequencing mismatch, and reference rot.
89
+ ```
90
+
91
+ Better than no shape, but solution-framed twice. Reader still does not know WHY this work exists — only WHAT it does.
92
+
93
+ ### Conformant pattern (bassclef#1178 — Problem opener)
94
+
95
+ ```markdown
96
+ **Problem (≤500 chars):** Today canvas LR-N tables and shipping reality drift apart across long sessions — operators returning to a canvas after a /longrun see stale status, wrong sequencing, and reference rot. The drift compounds across iterations until someone manually reconciles. The change we want is automated reconciliation at every /longrun prep so canvas tables and shipping reality stay aligned without manual cycles.
97
+
98
+ ---
99
+
100
+ ## Goal
101
+
102
+ Add `/roadmap-reconcile` — a bassclef skill that...
103
+ ```
104
+
105
+ Operator gets user pain → solution → diff in <60 seconds. Detail follows for those who want depth.
106
+
107
+ ## Composes with
108
+
109
+ - `/state-a-problem` skill (brief mode, ≤500 chars) — drafts the Problem section; runs `/kiss --grade10` inline by default
110
+ - `/promote` SKILL.md — composes Problem section at the top of every filed issue body
111
+ - `/kiss` skill (words mode) — applies plain-English substitution to body's technical detail
112
+ - `.claude/rules/pr-body-shape.md` (bassclef#906, amended by bassclef#1178) — sister discipline at PR-body surface
113
+ - `.claude/rules/skill-description-clarity.md` (bassclef#377) — sibling discipline at description surface
114
+ - `.claude/rules/plan-enumeration-needs-value-props.md` (bassclef#339) — sibling discipline at choice-presentation surface
@@ -0,0 +1,73 @@
1
+ ---
2
+ tier: lite
3
+ globs: ["*"]
4
+ description: Agent guardrails — behavior boundaries, escalation rules, capability ceilings for autonomous operation
5
+ ---
6
+
7
+ # Agent Guardrails
8
+
9
+ Formal behavior boundaries for autonomous agents. These are hard constraints,
10
+ not guidelines.
11
+
12
+ ## What agents must NEVER do
13
+ - Push to main without PR review
14
+ - Delete data in production databases
15
+ - Deploy to production without human approval — even in orchestrator-gated mode. This is the hardest guardrail. No exceptions.
16
+ - Deploy to any environment not configured in substrate.config.md deploy_targets
17
+ - Modify auth/security middleware without human approval
18
+ - Expand scope beyond the declared time budget
19
+ - Skip a hard gate (Inception → Elaboration → Construction → Transition)
20
+ - Self-report gate compliance without evidence artifacts
21
+ - Override another agent's decision authority (e.g., Builder overriding Architect on ADRs)
22
+ - Send external communications (emails, Slack, webhooks) without human approval
23
+ - Modify CI/CD pipeline configuration without human approval
24
+ - Create or delete GitHub repos, branches on main, or release tags
25
+
26
+ ## What agents must ALWAYS do
27
+ - Save state before ending (commit, push, LAST_SAVE)
28
+ - Write a chronicle entry at session end
29
+ - Run /temperance before non-trivial implementation
30
+ - Run /verify after each task before committing
31
+ - Flag ambiguity rather than proceeding with assumptions
32
+ - Produce a substrate artifact at every handoff
33
+ - Reference the iteration goal when starting work
34
+ - Check the risk register at iteration start
35
+
36
+ ## Escalation rules
37
+ - Builder → Architect for ADR questions
38
+ - Builder → PM for scope questions
39
+ - Builder → Designer for UX questions
40
+ - Any agent → Orchestrator for sequencing disputes
41
+ - Any agent → Human for: scope expansion, security changes, external communications, budget overruns
42
+
43
+ ## Capability ceilings by role
44
+ - Reviewer: read-only. Cannot modify code.
45
+ - Shaper: cannot implement or deploy.
46
+ - PM: cannot implement or architect.
47
+ - Designer: cannot implement. Validates only.
48
+ - Creative Director: cannot implement. Directs only.
49
+ - Architect: cannot implement in Construction. Designs only.
50
+ - Builder: cannot override ADRs. Implements within constraints.
51
+ - Deployer: cannot write application code. Ships only.
52
+ - Closer: cannot build. Documents and closes only.
53
+ - Orchestrator: cannot override any role's decision authority. Coordinates only.
54
+
55
+ ## Graceful exit conditions
56
+
57
+ See `standards/graceful-exit.md` for the full exit protocol, checkpoint format,
58
+ checkpoint triggers, and recovery procedure.
59
+
60
+ Summary of conditions (full protocol in the standard):
61
+ - Time budget exhausted → save state, write checkpoint, report progress, end
62
+ - Budget limit reached → save state, write checkpoint, report, end
63
+ - Ambiguity unresolvable without human → save state, write checkpoint, escalate, end
64
+ - Blocked by external dependency → save state, log blocker in checkpoint, end
65
+ - Error after 3 diagnosis attempts → save state, write checkpoint, escalate, end
66
+ - User interrupts → save state immediately, write checkpoint
67
+ - Context pressure ≥ 70% → write checkpoint, let compaction run, re-read survival kit
68
+
69
+ ## Agent identity in artifacts
70
+ - Every commit by an autonomous agent includes the agent role in the message
71
+ - Every PR created by an agent is labeled with the agent role
72
+ - Chronicle entries note which agent(s) were active
73
+ - This enables audit: who did what, with what authority