@thebassclef/lite 1.0.3 → 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 +92 -6
  2. package/dist/cli.js +92 -6
  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,408 @@
1
+ ---
2
+ tier: lite
3
+ description: Stacked atomic branches are the default for any iteration with N≥2 issues.
4
+ ---
5
+
6
+ # Branch Stacking Standard
7
+
8
+ ## Default for multi-issue iterations
9
+
10
+ **Stacked atomic branches are the default** for any iteration with N≥2
11
+ issues. One branch per issue, one PR per branch, each independently
12
+ reviewable and revertable. The `bundle` flag at `/autonomous start`
13
+ overrides this; see `.claude/rules/pr-strategy.md` for when bundling is
14
+ acceptable.
15
+
16
+ This is codified — the boot sequence does not ask "stacked or bundled?"
17
+ per session.
18
+
19
+ ## When to use
20
+
21
+ Autonomous or multi-step sessions where work spans multiple logical units
22
+ that should be independently reviewable and revertable. This extends the
23
+ trunk-based model in `.claude/rules/branching.md` for multi-branch work.
24
+
25
+ Use this standard when:
26
+ - An agent (or agents) will produce more than one PR in a session
27
+ - Work has a natural decomposition into independent or sequenced units
28
+ - You want the ability to accept some branches and reject others
29
+
30
+ ---
31
+
32
+ ## Core principle
33
+
34
+ **Each branch = one intent.** A branch does one thing: "Add the data model"
35
+ or "Build the list view" — not "Add data model and list view and API routes."
36
+
37
+ If you can't describe a branch's intent in one sentence, split it.
38
+
39
+ ---
40
+
41
+ ## Stack manifest
42
+
43
+ Before building, the agent writes a manifest declaring the planned stack.
44
+ This is the iteration's work breakdown and the Orchestrator's routing map.
45
+
46
+ **Location**: `docs/branch-stacks/YYYY-MM-DD-slug.md` in the working repo.
47
+
48
+ ### Format
49
+
50
+ ```markdown
51
+ # Branch Stack: [name]
52
+
53
+ **Issue**: #NNN
54
+ **Iteration goal**: [path to iteration goal]
55
+ **Execution mode**: sequential | parallel | mixed
56
+ **Date**: YYYY-MM-DD
57
+
58
+ ## Branches
59
+
60
+ | # | Branch | Intent | Depends on | Parallel-safe |
61
+ |---|--------|--------|-----------|---------------|
62
+ | 1 | feature/NNN-stack-1-data-model | CRM schema + migration | none | yes |
63
+ | 2 | feature/NNN-stack-2-api-routes | CRUD API for entities | stack-1 | no |
64
+ | 3 | feature/NNN-stack-3-list-view | List page UI | stack-1 | yes |
65
+ | 4 | feature/NNN-stack-4-detail-view | Detail page UI | stack-3 | no |
66
+
67
+ ## Parallel groups
68
+
69
+ - Group A (no dependencies): stack-1
70
+ - Group B (after stack-1 merged): stack-2, stack-3 (parallel)
71
+ - Group C (after stack-3 merged): stack-4
72
+
73
+ ## Acceptance criteria per branch
74
+
75
+ ### stack-1: data-model
76
+ - [ ] Prisma schema with migration file
77
+ - [ ] prisma generate succeeds
78
+ - [ ] Seed script if needed
79
+
80
+ ### stack-2: api-routes
81
+ - [ ] CRUD endpoints with tests
82
+ - [ ] Auth middleware applied
83
+
84
+ [... etc]
85
+ ```
86
+
87
+ ---
88
+
89
+ ## Execution modes
90
+
91
+ ### Sequential (supervised sessions)
92
+
93
+ One agent, one branch at a time. Human checkpoint between branches.
94
+
95
+ ```
96
+ Agent builds stack-1
97
+ → PR opened → human reviews → approved → merge to main
98
+ Agent builds stack-2
99
+ → PR opened → human reviews → approved → merge to main
100
+ [...]
101
+ ```
102
+
103
+ **Branch base**: Each branch is based on `main` (after the previous branch
104
+ is merged). This means each branch includes the accumulated work of prior
105
+ branches but is independently reviewable as a PR.
106
+
107
+ **Human checkpoint**: After each branch, the agent opens a PR and stops.
108
+ Human reviews. Approved → merge → agent proceeds. Rejected → agent adjusts
109
+ or the branch is discarded.
110
+
111
+ ### Parallel (Cherny's worktree model)
112
+
113
+ Multiple agents in git worktrees (`claude -w`), each on its own branch,
114
+ building simultaneously. No dirty tree conflicts — each worktree is an
115
+ isolated copy of the repo.
116
+
117
+ ```
118
+ Orchestrator reads stack manifest
119
+ → Independent branches fan out to parallel worktree agents
120
+ → Dependent branches queue behind prerequisites
121
+
122
+ Agent A (worktree 1): stack-2-api-routes
123
+ Agent B (worktree 2): stack-3-list-view
124
+ [building simultaneously, no conflicts]
125
+
126
+ Each agent opens its own PR when done
127
+ Human reviews PRs after session (or Reviewer agent evaluates)
128
+ ```
129
+
130
+ **Branch base for parallel work**: Independent branches base off `main`.
131
+ When a branch depends on another (stack-4 depends on stack-3), it bases
132
+ off the dependency branch. The manifest makes this explicit.
133
+
134
+ **Worktree lifecycle**:
135
+ - Created by Orchestrator (or human) when fanning out parallel work
136
+ - Each worktree gets one branch, one agent
137
+ - On completion: agent opens PR, worktree is available for cleanup
138
+ - Merged worktrees: deleted automatically after merge
139
+ - Abandoned worktrees (no commits after 2 hours): flagged for cleanup
140
+ - Worktree cleanup command: `git worktree prune`
141
+
142
+ **Conflict detection**: If two parallel agents modify the same file,
143
+ the Orchestrator flags this to the human. Do not attempt auto-resolution —
144
+ file-level conflicts in parallel branches indicate a decomposition problem
145
+ (the branches weren't truly independent). Fix the manifest, not the merge.
146
+
147
+ ### Mixed (common in practice)
148
+
149
+ Some branches are independent (parallelize), some are dependent (sequence).
150
+ The manifest's dependency graph determines which is which.
151
+
152
+ ```
153
+ Group A: stack-1 (alone, must complete first)
154
+ Group B: stack-2 + stack-3 (parallel, both depend on stack-1)
155
+ Group C: stack-4 (sequential, depends on stack-3)
156
+ ```
157
+
158
+ The Orchestrator executes Group A, waits for merge, fans out Group B in
159
+ parallel worktrees, waits for Group B merges, then executes Group C.
160
+
161
+ ---
162
+
163
+ ## Graceful unwind
164
+
165
+ If branch N is rejected:
166
+ - **Branches that depend on N** (per manifest): also discarded
167
+ - **Branches independent of N**: survive untouched
168
+ - **Agent never needs to untangle** — independence is designed in, not retrofitted
169
+
170
+ The dependency graph in the manifest makes this mechanical:
171
+ 1. Look up what depends on N (transitively)
172
+ 2. Discard N and all its dependents
173
+ 3. Everything else is unaffected
174
+
175
+ This is why independence is the default and dependencies are the exception.
176
+
177
+ ---
178
+
179
+ ## Squash merge — two protocols
180
+
181
+ When merging stacked PRs whose bases are other feature branches
182
+ (Graphite-style stack — common when the agent declares "depends on"
183
+ in the manifest), GitHub auto-closes dependent PRs the moment the
184
+ base branch is deleted. ("Cannot change the base branch of a closed
185
+ pull request.") Recovery requires re-creating each PR. Costs ~3-8
186
+ turns per stack. Observed 2026-04-18c (#178/#179/#180 cascade).
187
+
188
+ Two protocols handle this. Pick by **when** you can act:
189
+
190
+ | Protocol | When to use | Trade-off |
191
+ |----------|-------------|-----------|
192
+ | **Retarget-before-merge** (preferred) | You have access to the dependent PRs before merging stack-N | Cleanest — no auto-close, no recovery cost |
193
+ | **Rebase-after-merge** (fallback) | Auto-close already happened, OR you forgot to retarget | Recoverable but expensive — per-PR rebase + re-create |
194
+
195
+ If the iteration uses **base = main** for every branch (independence
196
+ designed in via manifest, no Graphite-style chaining), neither cascade
197
+ fires — but stacked PRs with declared dependencies almost always use
198
+ chained bases.
199
+
200
+ ### Retarget-before-merge (preferred)
201
+
202
+ **Before** squash-merging PR N in a stack:
203
+
204
+ 1. **Identify dependent PRs** — those whose `baseRefName` equals
205
+ PR N's `headRefName`. Use the helper script:
206
+
207
+ ```bash
208
+ scripts/check-stack-dependents.sh <PR-N-number>
209
+ ```
210
+
211
+ This lists open PRs that will auto-close if PR N merges and its
212
+ branch is deleted.
213
+
214
+ 2. **Retarget each dependent to main** (or the stack root):
215
+
216
+ ```bash
217
+ gh pr edit <dependent-PR-number> --base main
218
+ ```
219
+
220
+ The dependent PR survives the merge. Its diff may now show extra
221
+ commits (the work from PR N) until the dependent is rebased — but
222
+ it stays open.
223
+
224
+ 3. **Merge PR N**:
225
+
226
+ ```bash
227
+ gh pr merge <PR-N-number> --squash --delete-branch
228
+ ```
229
+
230
+ Auto-close cascade does not fire because no other PR has PR N's
231
+ branch as base anymore.
232
+
233
+ 4. **(Optional) Rebase dependent on top of merged main** if you want
234
+ the diff to show only the dependent's own work:
235
+
236
+ ```bash
237
+ git checkout <dependent-branch>
238
+ git pull origin main --rebase
239
+ git push --force-with-lease
240
+ ```
241
+
242
+ 5. **Repeat** for the next PR in stack order.
243
+
244
+ #### Why this works
245
+
246
+ The auto-close trigger is "base branch deleted on a closed/merged PR
247
+ where another PR depends on it." Retarget breaks the dependency
248
+ *before* the delete fires. The dependents continue tracking main; their
249
+ content is unchanged.
250
+
251
+ ### Rebase-after-merge (fallback)
252
+
253
+ Use only if the cascade has already fired (dependent PRs show
254
+ "Closed — base branch was deleted") OR you forgot the retarget step.
255
+
256
+ After squash-merging PR N in a stack (without prior retarget):
257
+
258
+ 1. **Pull updated main**: `git checkout main && git pull`
259
+ 2. **Rebase the next branch**: `git checkout feature/next && git rebase main`
260
+ 3. **Force push with lease**: `git push --force-with-lease`
261
+ (safe force push — fails if someone else pushed to the branch)
262
+ 4. **If GitHub auto-closed the downstream PR**: re-create it pointing
263
+ at main, since the closed PR cannot be reopened with a new base:
264
+ ```bash
265
+ gh pr create --base main --head feature/next \
266
+ --title "[same as closed PR]" \
267
+ --body "[same as closed PR, plus link to closed PR for context]"
268
+ ```
269
+ Or merge locally:
270
+ ```bash
271
+ git checkout main
272
+ git merge --squash feature/next
273
+ git commit -m "feat: description"
274
+ ```
275
+ 5. **Repeat** for remaining branches in stack order
276
+
277
+ #### Why this happens
278
+
279
+ Squash merge creates a single new commit on main that replaces all
280
+ commits from the branch. The next branch's base commits no longer exist
281
+ on main — they were squashed into one. GitHub sees a conflict because
282
+ the branch history diverged from main. Combined with branch deletion,
283
+ the auto-close cascade fires for any dependent PR.
284
+
285
+ ### Auto-save checkpoint conflicts
286
+
287
+ If the auto-save launchd timer committed checkpoint files (e.g.,
288
+ `.test-baseline`) on feature branches during construction, these
289
+ checkpoints will conflict during rebase. Use `git rebase --skip` to
290
+ drop the checkpoint commits — they're not part of the real work.
291
+
292
+ The auto-save timer should be paused during autonomous sessions
293
+ (SESSION_LOCK check, see #62).
294
+
295
+ ### Alternative: regular merge commits
296
+
297
+ Using regular merge commits (no squash) preserves branch relationships
298
+ and avoids the rebase cascade. Trade-off: messier main history with
299
+ merge commits. Squash is still preferred for a clean main, but the
300
+ rebase step is the cost.
301
+
302
+ ---
303
+
304
+ ## Naming convention
305
+
306
+ ```
307
+ feature/ISSUE-NNN-stack-N-short-description
308
+ ```
309
+
310
+ Examples:
311
+ - `feature/47-stack-1-crm-data-model`
312
+ - `feature/47-stack-2-crm-api-routes`
313
+ - `feature/47-stack-3-crm-list-view`
314
+
315
+ The `stack-N` segment makes merge ordering obvious in `git branch` output
316
+ and GitHub's PR list.
317
+
318
+ ---
319
+
320
+ ## Per-branch verification
321
+
322
+ Each branch passes `/verify` independently before the PR is opened.
323
+ CI must pass on each branch in isolation. A branch that only works when
324
+ combined with another branch is not atomic — fix the decomposition.
325
+
326
+ Exception: Dependent branches (stack-4 depends on stack-3) are verified
327
+ against their base branch, not against main alone.
328
+
329
+ ---
330
+
331
+ ## Automatic stack creation (via /autonomous)
332
+
333
+ When `/autonomous start` enters Construction, the Orchestrator runs a
334
+ five-step automation sequence (defined in strategy/autonomous-boot-sequence.md Step 9).
335
+ This section documents what the automation produces so agents know what
336
+ to expect when picking up a stack mid-session.
337
+
338
+ ### What gets created automatically
339
+
340
+ **1. GitHub issues** — one per task, created via `gh issue create`.
341
+ Each issue includes: what, acceptance criteria, and a ref to the
342
+ iteration goal. Issue numbers are assigned before any branch is created.
343
+
344
+ **2. Stack manifest** — written to `docs/branch-stacks/YYYY-MM-DD-slug.md`
345
+ before any branch is created. The manifest is committed first so all
346
+ agents can find it.
347
+
348
+ **3. Branches** — created from main in dependency order, named
349
+ `feature/ISSUE-NNN-stack-N-short-description`.
350
+
351
+ ### Automation invariants
352
+
353
+ - The manifest is always committed before branches are created.
354
+ If you see a branch without a manifest, the automation was interrupted.
355
+ - Issue numbers in the manifest are real GitHub issue numbers.
356
+ A placeholder NNN means the automation did not complete — finish it.
357
+ - Every branch bases from main, not from the previous branch.
358
+ Stacked rebases follow the squash-merge protocol in this document.
359
+ - The manifest is updated after each PR opens (status: pr-open) and
360
+ after each merge (status: merged). Pending = not yet started.
361
+
362
+ ### Resuming an interrupted stack
363
+
364
+ If the automation was interrupted (crash, time budget exhausted, pause),
365
+ the next session reads:
366
+
367
+ 1. `docs/branch-stacks/YYYY-MM-DD-slug.md` — what's done, what's pending
368
+ 2. `docs/whereami.md` — branch_stack field points at the manifest
369
+ 3. GitHub issues — open issues with no linked PR are pending branches
370
+
371
+ Resume from the first branch with status "pending" in the manifest.
372
+ Do not re-create issues or rewrite the manifest unless it is corrupted.
373
+
374
+ ### Manual stack creation (non-autonomous sessions)
375
+
376
+ The standard still applies for manually created stacks — write the
377
+ manifest first, create issues, then branches. The automation does this
378
+ programmatically. Format and invariants are identical.
379
+
380
+ ---
381
+
382
+ ## Integration with process framework
383
+
384
+ | Concept | Maps to |
385
+ |---------|---------|
386
+ | Branch stack | Iteration |
387
+ | Stack manifest | Iteration work breakdown |
388
+ | Individual branch | Task within iteration |
389
+ | Iteration goal | Governs the whole stack |
390
+ | Parallel groups | Orchestrator routing |
391
+
392
+ Individual branches do not need their own iteration goals. The stack-level
393
+ bet covers time budget, risk, and value for the entire body of work.
394
+
395
+ ---
396
+
397
+ ## Relation to existing branching rules
398
+
399
+ This standard extends `.claude/rules/branching.md`. All existing rules
400
+ still apply:
401
+ - `main` is always deployable
402
+ - Every branch ties to a GitHub Issue (stack branches share the parent issue)
403
+ - Squash merge to main
404
+ - No branches older than 5 days
405
+ - Force push on feature branches is fine, never on main
406
+
407
+ The addition: branches can now be explicitly sequenced and parallelized
408
+ via a stack manifest, with graceful unwind as a first-class property.
@@ -0,0 +1,176 @@
1
+ ---
2
+ tier: lite
3
+ description: "This standard codifies language-agnostic principles for writing safer code across bassclef's supported stacks (TypeScript, Python, Ruby, Java, Go, bash)."
4
+ ---
5
+
6
+ # Code Safety Principles — Language-Agnostic
7
+
8
+ This standard codifies language-agnostic principles for writing safer code across bassclef's supported stacks (TypeScript, Python, Ruby, Java, Go, bash). It is the substrate-internal companion to the Saltzer & Schroeder luminary — the luminary names WHY each principle matters at the protection-mechanism design level; this standard names WHAT the principle looks like in source code.
9
+
10
+ ## Why this standard exists
11
+
12
+ Bassclef's `.claude/rules/security.md` is scoped to web-application source files (`.ts`, `.tsx`, `.json`, `.env`, `Dockerfile`). It catches the OWASP-top-10 surface for the web layer. It does not cover:
13
+
14
+ - Bash hooks (bassclef's own implementation language for `.claude/hooks/*.sh`)
15
+ - Backend daemons (Python, Go, Java, Ruby — any language an adopter ships)
16
+ - Code review of cross-cutting concerns (default-behavior choices, scope choices, override-path design)
17
+
18
+ The principles in this standard apply to ALL six languages because they are about the *shape* of code, not language-specific syntax. The downstream stack-specific guides (Phase X-3 `bash-hook-safety.md`; Phase Y reference configs per stack) instantiate these principles in the language idiom of the day.
19
+
20
+ ## Anchor luminary
21
+
22
+ `@luminary saltzer-schroeder` is the authority. Their 1975 paper articulated the 8 principles for protection-mechanism design that this standard implements at the source-code level.
23
+
24
+ INSTEAD of inventing bassclef-specific principles: this standard maps Saltzer & Schroeder's 8 principles into 6 source-code disciplines that any language can express. The 1975 framing predates every modern attack class and still holds.
25
+
26
+ ## The six source-code disciplines
27
+
28
+ ### 1. Validate at boundaries
29
+
30
+ Every value entering the system from an external source must be validated at the boundary. After validation, internal code treats the value as trusted.
31
+
32
+ INSTEAD of validating at every call site: validate once at the entry boundary; pass typed values to internal code that trusts them.
33
+
34
+ **Boundaries to validate at:**
35
+
36
+ - HTTP request handlers (parse + validate body, query, headers, path params before any business logic)
37
+ - CLI argument parsers (validate flag values before dispatch)
38
+ - File parsers (validate schema/structure before consuming content)
39
+ - Foreign-key dereferences across service boundaries (validate the referenced object's shape before use)
40
+ - Environment variable reads at process startup (validate types + ranges before runtime use)
41
+
42
+ **Per language idiom:**
43
+
44
+ | Stack | Validation primitive |
45
+ |---|---|
46
+ | TypeScript | Zod / Yup / io-ts schema at handler entry |
47
+ | Python | Pydantic model at handler entry; argparse with custom types for CLI |
48
+ | Ruby | dry-validation or ActiveModel validation at controller boundary |
49
+ | Java | Jakarta Bean Validation (JSR 380) annotations; manual validators for non-bean inputs |
50
+ | Go | github.com/go-playground/validator at handler entry; validate.Var for ad-hoc |
51
+ | Bash | argparse-style validation in helper functions; `[[ -n "${var:?}" ]]` for required values |
52
+
53
+ ### 2. Fail-safe defaults
54
+
55
+ Default behavior denies / refuses / rejects unless an explicit signal permits. The author of a new code path is forced to make the permission decision visible.
56
+
57
+ INSTEAD of "permit by default, deny on exclusion list": deny by default, permit on explicit allowlist. The allowlist makes new permissions visible; the exclusion list makes new denials invisible.
58
+
59
+ **Examples by domain:**
60
+
61
+ - **HTTP routes** — middleware denies all paths by default; routes opt in via explicit definitions. Catch-all 404 vs catch-all 200.
62
+ - **Feature flags** — new flag defaults to OFF; opt-in turns on. INSTEAD of new flag default ON (silently activating in every environment).
63
+ - **CORS** — empty origin list rejects; explicit origins permit. INSTEAD of `*` wildcard.
64
+ - **DB row visibility** — multi-tenant query starts with tenant filter; opt in to cross-tenant only with explicit annotation. INSTEAD of unfiltered base query + per-call tenant filter (easy to forget).
65
+ - **Bash auto-save** — refuse all branches; allowlist enables. INSTEAD of allow all branches; refuse list excludes (PR #1058 anti-pattern).
66
+
67
+ ### 3. Least privilege
68
+
69
+ Each operation runs with the minimum privileges needed to complete its job. Tokens, credentials, file modes, network access, database permissions — all scoped to the narrowest grant.
70
+
71
+ INSTEAD of granting broad permissions because tightening is annoying: grant narrow permissions at creation; broaden only with explicit justification.
72
+
73
+ **Per language idiom:**
74
+
75
+ | Stack | Least-privilege primitive |
76
+ |---|---|
77
+ | TypeScript | scoped Prisma client / scoped fetch credentials / scoped GitHub PAT |
78
+ | Python | scoped boto3 IAM roles; scoped requests session with restricted cookies |
79
+ | Ruby | scoped ActiveRecord connection pool per concern; scoped Net::HTTP credentials |
80
+ | Java | scoped JDBC connection with role-based grants; scoped HttpClient TLS config |
81
+ | Go | scoped HTTP client; scoped database/sql DSN per role |
82
+ | Bash | `--scope=<minimum>` flags on every CLI; `sudo` disallowed by default; file modes 644/755 by default |
83
+
84
+ Token discipline (per memory `feedback_never_paste_tokens_in_chat`) is least privilege applied to authentication.
85
+ INSTEAD of broad-org admin tokens: fine-grained PATs scoped to a single target repo + minimum permission set. INSTEAD of pasting credential values into any chat / log / commit: reference credentials by environment-variable name only.
86
+
87
+ ### 4. Complete mediation
88
+
89
+ Every access to every protected resource passes through the protection mechanism. There are no "trusted" internal paths that skip the check.
90
+
91
+ INSTEAD of checking authorization at the boundary and trusting internal callers: check at every access point. The cost of one extra check is small; the cost of one missed check can be the whole system.
92
+
93
+ **Examples by domain:**
94
+
95
+ - **DB queries** — Row-level security at the database is complete mediation; ORM-side filters are bypass-able if a caller uses raw SQL
96
+ - **HTTP middleware** — Apply auth middleware to a route group; selective-skip is a security bug.
97
+ INSTEAD of allowing per-route opt-out: route groups are the granularity; new routes inherit the middleware.
98
+ - **Tenant filtering** — Filter at the query builder layer (every query inherits); not at the controller layer (controllers can forget).
99
+ INSTEAD of controller-layer filtering: query-builder-layer filtering so the tenant context is structurally inseparable from every query.
100
+ - **File access** — Mediate via accessor functions that include the check; raw file handles bypass the check.
101
+ INSTEAD of granting raw handles for performance: accessor functions own the read/write surface; performance optimization lives inside the accessor.
102
+ - **Bash hook PreToolUse** — Hook fires on every matching tool call, not "first call per session"
103
+
104
+ ### 5. Defense in depth
105
+
106
+ Multiple independent layers protect the same resource. A single compromise of one layer leaves the resource still protected by the others.
107
+
108
+ INSTEAD of relying on one strong layer: stack multiple layers, each cheap, with no single layer load-bearing.
109
+
110
+ **Example stack for bassclef production deploys:**
111
+
112
+ 1. GitHub Environment with `required_reviewers` (separation of privilege)
113
+ 2. `deploy-guard.sh` hook BLOCKs without explicit `DEPLOY_PROD=1` env var
114
+ 3. `gh pr merge` requires operator account (not agent token)
115
+ 4. CI passing gate (test + build + lint + security scan)
116
+ 5. Manual smoke-test acknowledgement before traffic shift
117
+
118
+ Five layers. Compromise of any one (e.g., agent token leaked) still leaves four layers protecting the deploy.
119
+
120
+ INSTEAD of "we have CI, that's enough": every layer is cheap; every layer catches a different failure class.
121
+
122
+ ### 6. Audit at every layer
123
+
124
+ Every state-modifying action emits an audit record. The record names: who, what, when, from where, with what authority.
125
+
126
+ INSTEAD of audit-only-on-failure: audit on every state change so post-incident reconstruction has the data it needs.
127
+
128
+ **Per language idiom:**
129
+
130
+ | Stack | Audit primitive |
131
+ |---|---|
132
+ | TypeScript | structured logger (pino, winston) + trace ID at handler entry |
133
+ | Python | structlog or loguru + trace ID; opentelemetry for cross-service |
134
+ | Ruby | structured Rails logger + Lograge; trace ID via request middleware |
135
+ | Java | SLF4J + Logback structured layout; OpenTelemetry tracer |
136
+ | Go | zap or zerolog + trace context; OpenTelemetry SDK |
137
+ | Bash | `trace-helper.sh` writes JSONL to `.claude/state/traces/<session>.jsonl` |
138
+
139
+ Bassclef's `lib/trace-helper.sh` is the substrate's audit primitive for bash. Every hook fires `trace_record <hook> <verb> <context>` before exit. Override usage (e.g., `SKIP_*=1`) is logged automatically.
140
+
141
+ ## What this standard does NOT do
142
+
143
+ - **Does not specify cryptographic primitives** — algorithm choice, key length, library selection are out of scope. Use the language's standard library + vetted cryptography library (e.g., libsodium binding, Bouncy Castle).
144
+ - **Does not catalog OWASP top-10 mitigations** — `.claude/rules/security.md` covers the web layer; this standard covers the substrate-internal layer that the web layer rests on.
145
+ - **Does not replace `/security-review`** — that skill applies these principles to a specific PR. This standard is the reference the skill cites.
146
+ - **Does not specify threat models** — Schneier-anchored threat-thinking is a separate luminary candidate (deferred per Phase X+Y+Z bet's Out of scope).
147
+
148
+ ## When this standard fires
149
+
150
+ | Surface | What to check |
151
+ |---|---|
152
+ | New HTTP handler / route | Boundary validation present? Default behavior fail-safe? |
153
+ | New bash hook | All 8 principles via stack-translation table in `saltzer-schroeder.md` |
154
+ | New CLI tool | Argument validation? Least-privilege credential scope? |
155
+ | New cross-service call | Validation on the response? Audit emit at call site? |
156
+ | Schema migration | Defense in depth via review + dry-run + rollback? |
157
+ | Code review | All 6 disciplines applied? |
158
+
159
+ ## Refs
160
+
161
+ - `@luminary saltzer-schroeder` — anchor; 8 principles for protection-mechanism design
162
+ - `.claude/rules/security.md` — web-layer rule (`.ts/.tsx/.json/.env/Dockerfile` scope)
163
+ - `.claude/rules/destructive-operations.md` — agent self-assessment companion
164
+ - `standards/bash-hook-safety.md` (Phase X-3) — bash-specific instantiation of these principles
165
+ - `docs/iteration-bets/2026-06-17a-secure-coding-foundations-longrun.md` — goal authoring this standard
166
+ - bassclef#1058 — concrete failure (auto-save scope hole) that motivated this standard
167
+
168
+ ## Composes with
169
+
170
+ - `standards/destructive-operations.md` style → `.claude/rules/destructive-operations.md` (agent self-assessment)
171
+ - `standards/bassclef-configs-schema.md` § Security scanning (Phase Y-2) — adopter-facing scanner-adapter config
172
+ - `standards/security-scanner-adapter.md` (Phase Y-1) — adapter pattern that uses scanner outputs to enforce these disciplines
173
+
174
+ ## Retirement
175
+
176
+ This standard retires only if Saltzer & Schroeder's principles are superseded by a fundamentally different protection-mechanism framework. The 8 principles have held for 50 years; retirement is not a near-term concern. The stack-translation tables evolve as bassclef adds support for new languages.