@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,267 @@
1
+ ---
2
+ tier: lite
3
+ description: substrate.config.md is the single source of truth for external resource references in any bassclef-substrate repo.
4
+ ---
5
+
6
+ # Substrate Config Schema
7
+
8
+ `substrate.config.md` is the **single source of truth** for external
9
+ resource references in any bassclef-substrate repo. Functionally, it
10
+ is to bassclef what `.env` is to runtime code — the one place agents
11
+ look for "where is X" without guessing, without consulting memory, and
12
+ without hardcoding.
13
+
14
+ ## Why this exists
15
+
16
+ Before this standard: resource references lived in three places —
17
+ `substrate.config.md`, project memory, and hardcoded in skills. Agents
18
+ had to check all three, confused them routinely, and produced wrong
19
+ pushes (drafts pushed to corpus doc, etc.).
20
+
21
+ Single-source-of-truth eliminates the ambiguity. Skills read only from
22
+ `substrate.config.md`. Memory references resources only by field name,
23
+ never by raw ID.
24
+
25
+ ## Typed suffix convention
26
+
27
+ Every resource field in `substrate.config.md` uses a typed suffix so
28
+ the agent never has to interpret the value:
29
+
30
+ | Suffix | Meaning | Examples |
31
+ |--------|---------|----------|
32
+ | `*_doc_id` | Google Doc ID (a string that goes after `/document/d/`) | `journal_doc_id`, `changelog_doc_id`, `brand_corpus_doc_id` |
33
+ | `*_sheet_id` | Google Sheets ID | `metrics_sheet_id` |
34
+ | `*_url` | Full URL (http/https) | `staging_url`, `grafana_url`, `langfuse_url` |
35
+ | `*_host` | Host without scheme | `db_host`, `redis_host` |
36
+ | `*_repo` | GitHub repo reference (`owner/name`) | `parent_repo`, `deploy_repo` |
37
+ | `*_repos` | Comma-separated list of GitHub repo references | `bassclef_evolution_child_repos` |
38
+ | `*_path` | Filesystem path (absolute preferred) | `shared_artifacts_path` |
39
+ | `*_channel_id` | Slack/Discord channel | `alerts_channel_id` |
40
+ | `*_project_id` | Linear/Jira/Asana project | `linear_project_id` |
41
+ | `*_token_name` | **Name of env var** holding a secret (never the secret itself) | `gh_token_name`, `anthropic_key_name` |
42
+ | `*_reviewers` | GitHub usernames (comma-separated) for approval gates | `prod_approval_reviewers` |
43
+ | `*_topology` | Architectural choice per `deployment-topology.md` | `staging_topology` |
44
+
45
+ **Secrets NEVER in `substrate.config.md`.** That file is committed to
46
+ git. Secrets live in `.env` (gitignored) or a secret manager. The
47
+ convention stores the *name* of the env var (e.g.,
48
+ `gh_token_name: GH_TOKEN`) so agents know which variable to read at
49
+ runtime.
50
+
51
+ **Secret lifecycle is tracked separately** in `substrate.secrets.md`
52
+ (schema: `standards/state-spine/schemas/substrate-secrets.schema.json`;
53
+ purpose: `standards/secrets-lifecycle.md`). That file holds rotation
54
+ cadence, expiry dates, runbook paths, and health-check commands —
55
+ references and metadata only, never values. The two files cross-reference
56
+ each other; `substrate.config.md` answers *where* a resource lives,
57
+ `substrate.secrets.md` answers *when* a credential expires and *how* to
58
+ rotate it.
59
+
60
+ ## Single-source-of-truth rule
61
+
62
+ 1. **External resource IDs live ONLY in `substrate.config.md`.** Any
63
+ Google Doc ID, URL, repo reference, or similar pointer is a field
64
+ in this file.
65
+ 2. **Project memory references resources ONLY by field name**, never
66
+ by raw value. `brand_corpus_doc_id` is a valid memory reference;
67
+ `1gps7mmEYBCud...` is not.
68
+ 3. **Skills and hooks read ONLY from `substrate.config.md`** for
69
+ resource lookups. No hardcoded IDs in skill files, hook scripts,
70
+ or agent definitions.
71
+ 4. **If an agent needs a resource that isn't in
72
+ `substrate.config.md`**, the agent prompts the operator to add it
73
+ with a typed field name. Do not hardcode. Do not cache in memory.
74
+ 5. **Scaffolding on new repos prompts for each known field** during
75
+ `/autonomous start` setup.
76
+
77
+ ## Known fields (extensible)
78
+
79
+ These fields are recognized by bassclef skills. Not all are required;
80
+ uncommented defaults shown.
81
+
82
+ ```yaml
83
+ # === Artifacts ===
84
+ journal_doc_id: [per-repo draft Google Doc — pushes from /journal + session-end]
85
+ changelog_doc_id: [per-repo weekly changelog Google Doc — pushes from /release-notes]
86
+ brand_corpus_doc_id: [cross-repo brand team corpus — pushes from /journal-export]
87
+
88
+ # === Environments ===
89
+ deploy_targets:
90
+ local: true # always available
91
+ staging: false # URL when configured
92
+ prod: false # URL when configured (hard gate — human-approved)
93
+
94
+ # === Integrations (optional, per-project) ===
95
+ langfuse_url: [tracing dashboard URL, if used]
96
+ grafana_url: [metrics dashboard URL, if used]
97
+ linear_project_id: [Linear project for ticket sync, if used]
98
+
99
+ # === Bassclef substrate (bassclef repo only) ===
100
+ # Consumer repos scanned by session-reflection for bassclef-evolution
101
+ # issues. Keep in sync with .github/workflows/bassclef-template-sync.yml
102
+ # matrix. Fallback when field absent: poa only.
103
+ bassclef_evolution_child_repos: [comma-separated list of owner/name]
104
+
105
+ # === Budget ===
106
+ budget:
107
+ session_ceiling: [API burst $/session]
108
+ iteration_ceiling: [API burst $/iteration]
109
+ warning_threshold: 75%
110
+
111
+ # === Secret references (names only, not values) ===
112
+ anthropic_key_name: ANTHROPIC_API_KEY # env var name, not the key
113
+ gh_token_name: GH_TOKEN # env var name, not the token
114
+
115
+ # === Hosting platform (REQUIRED in any consumer that ships a UI) ===
116
+ #
117
+ # Drives which deploy_* fields apply AND which adapter `/bind-subdomain`
118
+ # loads. Every consumer running `/preview-build` or shipping production
119
+ # UI MUST set this — the bassclef default is `amplify` per ADR-008
120
+ # (frontend-stack) + POA + quorum precedent (single-provider portfolio
121
+ # reduces operator cognitive load; AWS-native; cheap port to existing
122
+ # AWS auth).
123
+ #
124
+ # Enum values (all five are valid; not all have shipped adapters yet):
125
+ # - amplify: use amplify_app_id + amplify_region + amplify_branch
126
+ # (bassclef-recommended default; adapters live)
127
+ # - ec2-tailscale: use deploy_host + deploy_user + deploy_path (POA pattern)
128
+ # - vercel: adapter not yet shipped — schema reserves the slot
129
+ # - netlify: adapter not yet shipped — schema reserves the slot
130
+ # - cloudflare-pages: adapter not yet shipped — schema reserves the slot
131
+ # - none: consumer explicitly opts out of preview/prototype
132
+ # deployment. `/bind-subdomain` and `/launch-preview`
133
+ # refuse on `none` unless --override given. Use for
134
+ # docs-only repos (e.g., bassclef itself) or repos
135
+ # that ship no UI surface.
136
+ hosting_platform: amplify # bassclef default; pick from enum above
137
+
138
+ # --- Production tier (optional; declare when production differs from prototype) ---
139
+ #
140
+ # Per-tier hosting was added in bassclef#458 to resolve the POA case:
141
+ # POA's prototypes deploy to amplify, but POA's production runs on
142
+ # ec2-tailscale (per ADR-009) and predates the prototype pipeline.
143
+ # Without `production_hosting_platform`, hosting_platform=amplify
144
+ # implies POA's whole app is on amplify — wrong.
145
+ #
146
+ # `production_hosting_platform` is DECLARATIVE. /launch-preview and
147
+ # /bind-subdomain operate on the prototype tier only and do not read
148
+ # this field. It documents the production tier so operators (and
149
+ # future tooling) know the production deploy is a separate concern.
150
+ #
151
+ # When unset, production tier inherits hosting_platform.
152
+ production_hosting_platform: ec2-tailscale # only set when production differs from prototype
153
+
154
+ # --- Amplify-specific (when hosting_platform=amplify) ---
155
+ #
156
+ # `amplify_app_id` is the provisioning-indicator field (bassclef#523).
157
+ # Set by `/provision-deploy-host` on success when the Amplify app is
158
+ # created. Composer pre-flight (lib/composer-preflight.sh Check 6) reads
159
+ # this field to verify provisioning happened — when missing or set to a
160
+ # bracketed placeholder shape, /preview-build is BLOCKED with three-path
161
+ # remediation (run /provision-deploy-host inline / re-dispatch with
162
+ # --no-launch / explicit defer). Replaces the silent-defer-bind class
163
+ # that caused POA's 2026-05-05 mobile session to merge variants but
164
+ # never bind a subdomain.
165
+ amplify_app_id: [e.g., d154l5usyc80nk]
166
+ amplify_region: [e.g., eu-north-1]
167
+ amplify_branch: [branch bound to domain, default: main]
168
+
169
+ # --- EC2 + Tailscale-specific (when hosting_platform=ec2-tailscale) ---
170
+ # See standards/deployment-topology.md for the SENTINEL_bassclef_pattern.
171
+ #
172
+ # `deploy_host` is the provisioning-indicator field (bassclef#523) —
173
+ # Composer pre-flight Check 6 reads it to verify provisioning happened
174
+ # (parallel to amplify_app_id for amplify). Same three-path remediation
175
+ # applies when missing.
176
+ deploy_host: [Tailscale hostname of prod box]
177
+ deploy_user: [SSH user on prod box]
178
+ deploy_path: [absolute path on box, e.g., /opt/poa]
179
+ staging_deploy_host: [same or different Tailscale host]
180
+ staging_deploy_path: [absolute path, e.g., /opt/poa-staging]
181
+ staging_topology: same-box | separate-box # Option A or B
182
+ tailscale_tag: [CI tag, e.g., tag:ci]
183
+ backup_path: [absolute path, e.g., /opt/backups]
184
+ prod_approval_reviewers: [GitHub usernames comma-separated]
185
+
186
+ # === Domain + DNS (when app binds a friendly URL) ===
187
+ # See standards/domain-and-dns.md. Optional — skip if using platform
188
+ # default URL (e.g., *.amplifyapp.com). Binding is automated via the
189
+ # /bind-subdomain skill.
190
+ subdomain: [e.g., myapp.apps.example.com]
191
+ dns_provider: [cloudflare | route53] # v1 supports cloudflare
192
+ dns_zone: [e.g., example.com]
193
+ cloudflare_token_env: [env var name holding CF API token, e.g., CLOUDFLARE_API_TOKEN]
194
+ ```
195
+
196
+ ## Migration from anti-patterns
197
+
198
+ ### Anti-pattern 1: raw IDs in project memory
199
+
200
+ **Before**:
201
+ ```markdown
202
+ # memory/reference_brand_corpus.md
203
+ The brand team corpus lives at 1gps7mmEYBCud462Pn_DNf2mXa5Bj58NMjXUUDqWGIh0.
204
+ ```
205
+
206
+ **After**:
207
+ ```markdown
208
+ # memory/reference_brand_corpus.md
209
+ The brand team corpus is configured as `brand_corpus_doc_id` in
210
+ substrate.config.md. Agents should always read from there, never
211
+ reference the raw ID directly.
212
+ ```
213
+
214
+ ### Anti-pattern 2: hardcoded IDs in skills
215
+
216
+ **Before** (in `.claude/skills/journal-export/SKILL.md`):
217
+ ```bash
218
+ npx tsx scripts/push-to-gdoc.ts \
219
+ --file docs/journal-corpus/corpus.md \
220
+ --doc-id 1gps7mmEYBCud462Pn_DNf2mXa5Bj58NMjXUUDqWGIh0
221
+ ```
222
+
223
+ **After**:
224
+ ```bash
225
+ DOC_ID=$(grep "^brand_corpus_doc_id:" substrate.config.md | awk '{print $2}')
226
+ npx tsx scripts/push-to-gdoc.ts \
227
+ --file docs/journal-corpus/corpus.md \
228
+ --doc-id "$DOC_ID"
229
+ ```
230
+
231
+ Or equivalently, skills document the field name in prose and require
232
+ the agent to look it up at runtime:
233
+
234
+ ```markdown
235
+ ## Step 7: Push to Google Docs
236
+
237
+ Push to `brand_corpus_doc_id` from `substrate.config.md`:
238
+
239
+ \`\`\`bash
240
+ npx tsx scripts/push-to-gdoc.ts --file docs/journal-corpus/corpus.md \
241
+ --doc-id $(grep "^brand_corpus_doc_id:" substrate.config.md | awk '{print $2}')
242
+ \`\`\`
243
+ ```
244
+
245
+ ### Anti-pattern 3: scattered fields
246
+
247
+ If an app repo adds a new resource (e.g., a Retool dashboard URL)
248
+ and stores it in a README comment, an inline skill comment, or a
249
+ hook variable — that's the anti-pattern. All such values go in
250
+ `substrate.config.md` with the typed suffix.
251
+
252
+ ## Related rules
253
+
254
+ - `.claude/rules/substrate-config-schema.md` — enforces this standard
255
+ at agent behavior level (read from config, don't hardcode, don't
256
+ cache in memory)
257
+ - `.claude/skills/autonomous/SKILL.md` — prompts for each known field
258
+ during scaffold
259
+ - `.claude/skills/substrate-check/SKILL.md` — validates substrate.config.md
260
+ has required fields for the repo type
261
+
262
+ ## Versioning
263
+
264
+ When bassclef adds a new known field type, the schema here is the
265
+ authoritative list. App repos update their `substrate.config.md` to
266
+ add the new field during next `/autonomous start` scaffold pass (the
267
+ skill surfaces missing fields and prompts for values).
@@ -0,0 +1,109 @@
1
+ ---
2
+ tier: lite
3
+ description: "The tech_stack: block inside .claude/bassclef-configs.jsonc declares the adopter's primary tech stack."
4
+ ---
5
+
6
+ # Tech Stack Configuration
7
+
8
+ The `tech_stack:` block inside `.claude/bassclef-configs.jsonc` declares the adopter's primary tech stack. Stack-bound rules + standards in bassclef read this block to pick the right per-stack discipline.
9
+
10
+ Without `tech_stack:`, stack-bound rules fall back to their default (which is operator's stack — TypeScript + Next.js + Prisma + EC2-Tailscale). Non-matching adopters then see false-fires: Prisma rules at SQLAlchemy adopters, Next.js API conventions at FastAPI adopters, etc. The tech_stack block is what stops the bleed.
11
+
12
+ Schema source: `standards/state-spine/schemas/tech-stack.schema.json`. This file documents the semantics; the schema documents the shape.
13
+
14
+ ## When this block is read
15
+
16
+ | Surface | What it does with the block |
17
+ |---|---|
18
+ | `.claude/rules/schema-management.md` | Reads `tech_stack.orm:` to load the matching sibling under `standards/migration-discipline/<orm>.md` |
19
+ | `.claude/rules/api-conventions.md` | Frontmatter `tech_stack_match: { frontend: nextjs }`; rule fires only when matched |
20
+ | `.claude/rules/sdlc-gates.md` | Frontmatter `tech_stack_match: { lang: typescript }`; rule fires only when matched |
21
+ | `.claude/rules/new-dependency-check.md` | Reads `tech_stack.pkg_manager:` to load the matching sibling under `standards/dependency-discipline/<pkg_manager>.md` |
22
+ | `standards/frontend-stack.md` (now thin pointer) | Reads `tech_stack.frontend:` to direct adopter to the matching `standards/stack-patterns/<stack>.md` |
23
+ | `standards/deployment-topology.md` (now thin pointer) | Reads `tech_stack.deploy:` to direct adopter to the matching `standards/deployment-topology-patterns/<deploy>.md` |
24
+ | `/onboard-repo` Phase 2.x | Auto-detects + asks; writes the block |
25
+ | `/demo` first dispatch | If block absent, prompts the operator (bassclef#1126 / #1127) |
26
+ | `/launch` Phase -1 Check 7 | Refuses dispatch when block absent — `/launch` needs real stack tokens to produce real decompositions |
27
+
28
+ ## Fields
29
+
30
+ All fields are optional at the schema level; specific rules fail open (or fall back to operator's default) when their referenced field is absent. Adopters declare what they need.
31
+
32
+ | Field | Enum | Notes |
33
+ |---|---|---|
34
+ | `lang` | typescript / python / go / ruby / java / rust / none | Primary language family. Drives sdlc-gates Path B. |
35
+ | `frontend` | nextjs / react-vite / sveltekit / vue / svelte / django / rails / fastapi / none | Frontend framework. Drives api-conventions Path B + frontend-stack routing. |
36
+ | `backend` | nodejs / python / ruby / go / rust / deno / none | Backend runtime. Drives sdlc-gates Path B. |
37
+ | `orm` | prisma / sqlalchemy / gorm / alembic / active-record / drizzle / none | ORM. Drives schema-management Path A routing. |
38
+ | `pkg_manager` | npm / pnpm / yarn / pip / poetry / cargo / gem / go-mod | Package manager. Drives new-dependency-check Path A routing. |
39
+ | `deploy` | ec2-tailscale / vercel / netlify / fly / render / gcp-cloud-run / amplify / none | Deploy topology. Drives deployment-topology Path C routing. |
40
+ | `declared_at` | ISO 8601 date | Provenance — last declared. |
41
+ | `declared_via` | onboard-repo / demo-prompt / manual / migrated | Provenance — how declared. |
42
+ | `rationale` | string | Optional operator-narrative; one paragraph why. |
43
+
44
+ ## Auto-detection at `/onboard-repo`
45
+
46
+ When `/onboard-repo` runs, it inspects the adopter repo for stack signals and pre-fills the block:
47
+
48
+ | File present | Suggests |
49
+ |---|---|
50
+ | `package.json` with `"next"` dep | `frontend: nextjs`, `lang: typescript` (if tsconfig.json), `pkg_manager: npm/pnpm/yarn` (detect lockfile) |
51
+ | `package.json` with `"prisma"` dep | `orm: prisma` |
52
+ | `package.json` with `"drizzle-orm"` dep | `orm: drizzle` |
53
+ | `requirements.txt` or `pyproject.toml` | `lang: python` |
54
+ | pyproject.toml with `sqlalchemy` | `orm: sqlalchemy` |
55
+ | pyproject.toml with `alembic` | `orm: alembic` |
56
+ | `Gemfile` | `lang: ruby`, `pkg_manager: gem` |
57
+ | `Gemfile` with `rails` | `frontend: rails`, `backend: ruby`, `orm: active-record` |
58
+ | `go.mod` | `lang: go`, `pkg_manager: go-mod` |
59
+ | `Cargo.toml` | `lang: rust`, `pkg_manager: cargo` |
60
+ | `vercel.json` or `.vercelignore` | `deploy: vercel` |
61
+ | `netlify.toml` | `deploy: netlify` |
62
+ | `fly.toml` | `deploy: fly` |
63
+ | `render.yaml` | `deploy: render` |
64
+ | `app.yaml` (App Engine) or `cloudbuild.yaml` | `deploy: gcp-cloud-run` |
65
+ | `amplify.yml` | `deploy: amplify` |
66
+ | `infrastructure/` with terraform + EC2 + Tailscale | `deploy: ec2-tailscale` |
67
+
68
+ When auto-detection is ambiguous (e.g., monorepo with multiple stacks), the operator picks. When auto-detection finds nothing recognized, the block stays empty and stack-bound rules fall back to operator defaults.
69
+
70
+ ## Recommended defaults
71
+
72
+ For operators starting fresh (no existing repo), bassclef recommends:
73
+
74
+ ```jsonc
75
+ {
76
+ "tech_stack": {
77
+ "lang": "typescript",
78
+ "frontend": "nextjs",
79
+ "backend": "nodejs",
80
+ "orm": "prisma",
81
+ "pkg_manager": "pnpm",
82
+ "deploy": "vercel",
83
+ "declared_at": "2026-06-18",
84
+ "declared_via": "demo-prompt"
85
+ }
86
+ }
87
+ ```
88
+
89
+ Rationale: bassclef's most-tested portfolio stack. Cleanest path through `/launch` chain, the existing rule + standard set, and the bassclef-sync ergonomics. Operators on other stacks override at `/onboard-repo` time.
90
+
91
+ ## What this block does NOT carry
92
+
93
+ - **Queue / cache / auth / email infrastructure** — those are follow-on triggers per bassclef#1127; `/spec` detects need from use-case language and prompts at spec-time.
94
+ - **Build tooling specifics** (webpack vs turbopack, etc.) — too granular; rules don't yet route on this.
95
+ - **Runtime / version pins** (Node 20 vs 22, Python 3.11 vs 3.12) — `package.json engines` and equivalent files hold this.
96
+
97
+ ## Distinct from
98
+
99
+ - **`substrate.config.md`** — that holds resource references (Google Doc IDs, URLs, env-var names). Tech stack lives in `bassclef-configs.jsonc` because it's an *adoption* setting that controls bassclef's rule routing.
100
+ - **`standards/bassclef-platform.yml`** — org-baseline platform-engineering config (AWS account, IAM roles, etc.). Per-repo tech stack is finer-grained.
101
+ - **`design/object-model.md` Stack object** — that's about the *runtime* (which agents, which deploy target). This block is about *language + framework + ORM* — the discipline-routing dimension.
102
+
103
+ ## Refs
104
+
105
+ - bassclef#1127 — parent ticket (tech_stack discovery in /onboard-repo + this schema)
106
+ - bassclef#1133 — ARCH-T0 stack-leakage audit (the failure mode this block stops)
107
+ - bassclef#1126 — `/demo` skill split (first-dispatch prompt surface)
108
+ - WU-2 of bet `docs/iteration-bets/2026-06-18a-public-adopter-leverage-longrun.md` — ships this primitive
109
+ - Composes with: standards/bassclef-configs-schema.md (parent config), all WU-5 through WU-10 rewrites in bet 2026-06-18a
@@ -0,0 +1,167 @@
1
+ ---
2
+ tier: lite
3
+ description: Reference doc for the tier-dependency-audit subsystem.
4
+ ---
5
+ <!-- andon-allow: operator-private -->
6
+ <!-- andon-allow: bassclef-upstream -->
7
+
8
+ # Tier dependency analysis
9
+
10
+ Reference doc for the tier-dependency-audit subsystem. Sister to `standards/tier-tag-schema.md` — that standard names the `tier:` field per file; this standard names the graph walk that audits whether every legitimate `<tier>` dependency carries the tag AND whether every file in the release matches the graph.
11
+
12
+ ## Purpose
13
+
14
+ The release script (`scripts/release-to-bassclef.sh`) walks `ALLOWED_PATHS` and applies a tier check on `.md` and `.sh` files inside primitive surfaces (L466-505). Two branches ship files without a tier check:
15
+
16
+ - **L507-513** — non-md/sh files inside primitive surfaces (JSON, TXT, fixtures, subdir READMEs)
17
+ - **L514-518** — non-primitive paths (top-level files, CLAUDE.md, top-level manifests)
18
+
19
+ These two branches allow accidental leaks. Prior release attempt (release-2026-08-15-83778faf) shipped 61 cache binaries and one `.DS_Store` via one of these branches. Adopter public bassclef now carries 827 tracked orphan files.
20
+
21
+ This subsystem replaces the exempt-list patch pattern (Parnas information hiding of *what* to exclude) with an inclusion graph (Nygard fail-safe: only what the graph says is legit ships).
22
+
23
+ ## Reusable across tiers
24
+
25
+ One subsystem serves all tiers. The tier arg picks which root set + adopter-runtime dependency list to use. The walk algorithm is the same. Build it once for `lite`. Add tier-runtime dependency lists for `standard`, `standard-pro`, `ultra`, `upstream` as those tiers mature.
26
+
27
+ ## Input contract
28
+
29
+ ```
30
+ scripts/analyze-tier-dependencies.sh <tier>
31
+ ```
32
+
33
+ - `<tier>` — one of `lite | standard | standard-pro | ultra | upstream`
34
+ - Reads sources from bassclef-upstream working tree
35
+ - Reads adopter-runtime dependency list from `standards/tier-runtime-deps/<tier>.md`
36
+ - Reads release-script include set from `scripts/release-to-bassclef.sh --dry-run`
37
+ - Exits 0 on classification complete; exit 2 on malformed input; exit 3 on missing tier-runtime-deps file
38
+
39
+ ## Output contract
40
+
41
+ `docs/dependency-audits/<YYYY-MM-DD>-<tier>.md` — markdown table with 5 buckets (Bucket 2 splits into 2a + 2b per ADR-043 D1 + canvas 2026-07-19-bassclef-lite.md L76):
42
+
43
+ | Bucket | Meaning | Fix action |
44
+ |---|---|---|
45
+ | 1. Tagged | File has `tier: <tier>` frontmatter or header. Ships correctly. | None |
46
+ | 2a. Missing tag | File has NO tier tag at all AND is a legit `<tier>` dep per graph walk. Safe mechanical add. | Add `tier: <tier>` frontmatter or header via helper `scripts/apply-bucket2-tier-tags.sh` |
47
+ | 2b. Chain-snap risk | File has a tier tag for a DIFFERENT tier BUT graph walk says `<tier>` depends on it. This is canvas L76's "chain snaps at every hop" — bassclef-lite fetch would break if this file is missing. | Per-file cure per canvas Q1+Q2: (i) promote the file to `<tier>` standalone, (ii) inline it into the calling `<tier>` file per Ousterhout deep modules, OR (iii) determine the graph walk over-included (reference in doc but not runtime dep). |
48
+ | 3. Accidental leak | File currently ships but is not in the graph. | Remove from bassclef-upstream + extend .gitignore |
49
+ | 4. Missing from release | File is in the graph but not in the release-script include set. | Extend release script `ALLOWED_PATHS` or fix a filter |
50
+
51
+ Each bucket lists the affected files with one-line reasons. The doc also carries a summary count per bucket and a recommended fix order (bucket 4 first if any, then 2a mechanical, then 2b per-file review, then 3).
52
+
53
+ ### Why the 2a/2b split matters
54
+
55
+ Before the split, bucket 2 conflated two distinct classes. Files tagged `tier: standard` that are legit `<lite>` deps per graph walk landed in bucket 2 alongside files with no tag. Bulk "add `tier: lite`" would retag `standard` files as `lite` — a maturity signal shift that bloats bassclef-lite (defeats the slimmed-down goal for Sam/Louis/Adam Sharpe per canvas Stage 1).
56
+
57
+ Per ADR-043 D1:
58
+ - `tier: lite` = explicit inclusion in bassclef-lite npm ship
59
+ - `tier: standard` = deliberate exclusion from bassclef-lite
60
+
61
+ A file tagged `standard` is deliberately non-lite. When the graph walk from a lite root set discovers such a file as a dep, that's a chain-snap risk that needs per-file operator judgment — not a bulk retag.
62
+
63
+ ## Walk algorithm
64
+
65
+ Four data sources; union → compare against actual release set.
66
+
67
+ **Source 1 — root set (tagged).** Files that already carry `tier: <tier>` frontmatter or `# tier: <tier>` header. Seed for the walk.
68
+
69
+ **Source 2 — reference walk (BFS from root set).** For each file in the queue, extract references to other files. Add each new discovery to the queue. Repeat until queue empty.
70
+
71
+ Reference shapes to extract:
72
+
73
+ - `composes_with:` frontmatter — other skills or rules named
74
+ - `source lib/<name>.sh` in hook headers — lib files sourced
75
+ - `additionalDirectories:` in settings.json — paths the adopter loads
76
+ - Cross-file grep `bash scripts/<name>.sh` in hook bodies — scripts invoked
77
+ - `@luminary <slug>` refs — luminary files
78
+ - `see standards/<name>.md` refs — standard files
79
+ - `see .claude/rules/<name>.md` refs — rule files
80
+
81
+ **Source 3 — adopter-runtime dependencies (tier-specific).** Files the adopter needs at runtime that don't fall out of the reference walk. Lives at `standards/tier-runtime-deps/<tier>.md`. For lite:
82
+
83
+ - `CLAUDE.md`
84
+ - `bassclef-configs.jsonc`
85
+ - `.bassclef-source.json` template
86
+ - `.claude/settings.json` template
87
+ - `presence/install/*.template.sh`
88
+ - `LICENSE`
89
+ - `README.md`
90
+ - `.github/workflows/bassclef-*.yml`
91
+ - `lite-manifest.json`
92
+ - `bassclef-wiring-manifest.json`
93
+
94
+ **Source 4 — release-script include set (ACTUAL).** Runs `scripts/release-to-bassclef.sh --dry-run` and parses the `INCLUDE_LIST` output.
95
+
96
+ ## Classification rule
97
+
98
+ Let `INTENDED = Source 1 ∪ Source 2 ∪ Source 3`.
99
+
100
+ Let `ACTUAL = Source 4`.
101
+
102
+ - `INTENDED ∩ ACTUAL, has tag` → Bucket 1 (Tagged)
103
+ - `INTENDED ∩ ACTUAL, no tag` → Bucket 2 (Missing tag)
104
+ - `ACTUAL \ INTENDED` → Bucket 3 (Accidental leak)
105
+ - `INTENDED \ ACTUAL` → Bucket 4 (Missing from release)
106
+
107
+ ## Combined-tier mode
108
+
109
+ Single-tier audit surfaces one problem: bucket 3 (accidental leak) mixes true leaks with files legit-tagged for OTHER tiers. A `standard` file shipping in the actual release set is not a `lite` leak — it belongs in the release for standard adopters. Single-tier audit calls it bucket 3 anyway because the file is `ACTUAL \ INTENDED_lite`.
110
+
111
+ Combined-tier mode fixes the class. The script accepts a special arg `all` (or a comma list like `lite,standard,upstream`):
112
+
113
+ ```
114
+ scripts/analyze-tier-dependencies.sh all
115
+ scripts/analyze-tier-dependencies.sh lite,standard
116
+ ```
117
+
118
+ **Classification under combined-tier:**
119
+
120
+ Let `INTENDED_ALL = INTENDED_lite ∪ INTENDED_standard ∪ INTENDED_standard-pro ∪ INTENDED_ultra ∪ INTENDED_upstream` (or the user-supplied subset).
121
+
122
+ - `INTENDED_ALL ∩ ACTUAL, has any tier tag` → Bucket 1 (Tagged)
123
+ - `INTENDED_ALL ∩ ACTUAL, no tag` → Bucket 2 (Missing tag; carries per-tier reason for which tier each file belongs to)
124
+ - `ACTUAL \ INTENDED_ALL` → Bucket 3 (True accidental leak — belongs in no tier's graph)
125
+ - `INTENDED_ALL \ ACTUAL` → Bucket 4 (Missing from release; carries per-tier reason)
126
+
127
+ **When to use which mode:**
128
+
129
+ | Mode | Use case |
130
+ |---|---|
131
+ | Single-tier | Curate one tier's manifest; find lite deps missing tag; produce bucket 2 for one tier's tagging pass |
132
+ | Combined-tier | Identify true accidental leaks safe to remove from bassclef-upstream; produce bucket 3 for cleanup |
133
+
134
+ Bucket 2 outputs from single-tier and combined-tier agree for that tier's legit missing tags. Bucket 3 differs — single-tier over-counts leaks; combined-tier gives the honest count.
135
+
136
+ **Output naming:**
137
+
138
+ - Single-tier: `docs/dependency-audits/<YYYY-MM-DD>-<tier>.md`
139
+ - Combined-tier: `docs/dependency-audits/<YYYY-MM-DD>-combined-<tier-list>.md` (e.g., `2026-08-17-combined-all.md`)
140
+
141
+ ## Composition
142
+
143
+ - Sister to `standards/tier-tag-schema.md` — that standard names *what* the tag is; this standard names *how* to audit tag coverage per tier
144
+ - Consumed by `.claude/skills/tier-dependency-audit/SKILL.md` — user-invocable wrapper
145
+ - Composed with `scripts/release-to-bassclef.sh` — the ACTUAL set comes from `--dry-run`
146
+ - Composed with `.claude/rules/we-dont-break-adopters.md` (ADR-031) — the audit surfaces adopter-observable classes for careful handling
147
+ - Composed with `.claude/rules/mechanism-fidelity.md` (standard tier) — the subsystem IS the mechanism paired with tier-tag-schema
148
+
149
+ ## Anchor luminaries
150
+
151
+ - `@luminary david-parnas` — information hiding: consumers see tier arg + classified manifest, not the walk algorithm
152
+ - `@luminary john-ousterhout` — deep module: one script, many tier callers
153
+ - `@luminary michael-nygard` — fail-safe default: the graph says what's legit; L514 tightening rejects untagged by default after buckets 2+3 clear
154
+ - `@luminary michael-feathers` — characterization tests: fixture graph pins subsystem behavior in Tier 0 test
155
+
156
+ ## Refs
157
+
158
+ - Goal doc `docs/iteration-bets/2026-08-17a-tier-dependency-audit-subsystem.md`
159
+ - Sister `standards/tier-tag-schema.md`
160
+ - ADR-029 release pipeline
161
+ - ADR-031 we-dont-break-adopters
162
+ - ADR-037 release pipeline integrity check
163
+ - ADR-035 substrate-as-system
164
+
165
+ ## Retirement condition
166
+
167
+ This standard retires only if the tier system itself retires. Walk sources may extend (new reference shapes as substrate evolves); the four-bucket classification and BFS shape survive any specific source extension.
@@ -0,0 +1,57 @@
1
+ ---
2
+ tier: lite
3
+ description: Per standards/tier-dependency-analysis.md Source 3.
4
+ ---
5
+ <!-- andon-allow: operator-private -->
6
+ <!-- andon-allow: bassclef-upstream -->
7
+
8
+ # Tier runtime deps — lite
9
+
10
+ Per `standards/tier-dependency-analysis.md` Source 3. Files the lite adopter needs at runtime that do not fall out of the reference walk from the root set.
11
+
12
+ Consumed by `scripts/analyze-tier-dependencies.sh lite` when computing the INTENDED set.
13
+
14
+ ## Files
15
+
16
+ The subsystem parses the fenced code block below. One relative path per line. Blank lines and lines starting with `#` are comments.
17
+
18
+ ```
19
+ CLAUDE.md
20
+ LICENSE
21
+ README.md
22
+ bassclef-configs.jsonc
23
+ lite-manifest.json
24
+ bassclef-wiring-manifest.json
25
+ substrate.config.md
26
+ .bassclef-source.json.template
27
+ .claude/settings.json.template
28
+ presence/install/bassclef-sync.dispatcher.template.sh
29
+ presence/install/bassclef-sync.template.sh
30
+ .github/workflows/bassclef-pr-ci.yml
31
+ .github/workflows/bassclef-s3-publish.yml
32
+ .github/workflows/bassclef-docs-sync.yml
33
+ ```
34
+
35
+ ## Rationale per file
36
+
37
+ - **CLAUDE.md** — session-start context load for the adopter agent
38
+ - **LICENSE** — Apache 2.0 per ADR-045
39
+ - **README.md** — first-touch doc for cold adopters
40
+ - **bassclef-configs.jsonc** — adopter-editable config surface
41
+ - **lite-manifest.json** — tier snapshot for `bassclef-cli`
42
+ - **bassclef-wiring-manifest.json** — hook wiring reference per ADR-051 rename
43
+ - **substrate.config.md** — external resource references per `standards/substrate-config-schema.md`
44
+ - **.bassclef-source.json.template** — source pointer for consumer repos
45
+ - **.claude/settings.json.template** — hook wiring template
46
+ - **presence/install/*.template.sh** — install and dispatcher templates per ADR-032
47
+ - **.github/workflows/bassclef-*.yml** — CI + publish + docs-sync workflows adopters inherit
48
+
49
+ ## Extending this list
50
+
51
+ When a new lite runtime dep lands, add the path plus a one-line rationale. The subsystem re-parses on next audit run. No code change needed.
52
+
53
+ ## Refs
54
+
55
+ - Parent standard `standards/tier-dependency-analysis.md`
56
+ - Goal doc `docs/iteration-bets/2026-08-17a-tier-dependency-audit-subsystem.md`
57
+ - Sister future: `standards/tier-runtime-deps/{standard,standard-pro,ultra,upstream}.md` as those tiers mature