@thebassclef/lite 0.0.1 → 0.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 (182) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +85 -4
  3. package/dist/cli.cjs +1610 -0
  4. package/dist/cli.js +1587 -0
  5. package/dist/index.cjs +4 -0
  6. package/dist/index.d.ts +2 -0
  7. package/dist/index.js +4 -0
  8. package/package.json +51 -3
  9. package/substrate/.bassclef/lite-manifest.json +1794 -0
  10. package/substrate/.claude/agents/architect.md +70 -0
  11. package/substrate/.claude/agents/builder.md +114 -0
  12. package/substrate/.claude/agents/designer.md +156 -0
  13. package/substrate/.claude/agents/reviewer.md +88 -0
  14. package/substrate/.claude/hooks/artifact-ingestion-gate.sh +357 -0
  15. package/substrate/.claude/hooks/assert-verify-steering.sh +77 -0
  16. package/substrate/.claude/hooks/bassclef-source-config-validate.sh +215 -0
  17. package/substrate/.claude/hooks/bassclef-sync.sh +634 -0
  18. package/substrate/.claude/hooks/compound-noun-scrub.sh +292 -0
  19. package/substrate/.claude/hooks/kiss-expansion-inject.sh +69 -0
  20. package/substrate/.claude/hooks/plain-english-steering.sh +156 -0
  21. package/substrate/.claude/hooks/post-skill-friction-check.sh +177 -0
  22. package/substrate/.claude/hooks/post-skill-telemetry.sh +62 -0
  23. package/substrate/.claude/hooks/pre-build-gate.sh +511 -0
  24. package/substrate/.claude/hooks/pre-commit-gate.sh +452 -0
  25. package/substrate/.claude/hooks/session-end.sh +433 -0
  26. package/substrate/.claude/hooks/session-reflection.sh +303 -0
  27. package/substrate/.claude/hooks/skill-body-grade-gate.sh +219 -0
  28. package/substrate/.claude/hooks/skill-body-intent-drift.sh +107 -0
  29. package/substrate/.claude/hooks/skill-step-list-check.sh +171 -0
  30. package/substrate/.claude/hooks/state-validate.sh +271 -0
  31. package/substrate/.claude/hooks/substrate-clarity-gate.sh +1110 -0
  32. package/substrate/.claude/hooks/temperance-gate.sh +147 -0
  33. package/substrate/.claude/hooks/testing-tier-enforce.sh +233 -0
  34. package/substrate/.claude/hooks/turn-prose-grade-measure.sh +219 -0
  35. package/substrate/.claude/hooks/turn-prose-kiss-check.sh +434 -0
  36. package/substrate/.claude/hooks/vocabulary-migration-check.sh +171 -0
  37. package/substrate/.claude/hooks/whereami-utc-gate.sh +142 -0
  38. package/substrate/.claude/luminaries/alan-cooper.md +170 -0
  39. package/substrate/.claude/luminaries/alistair-cockburn.md +140 -0
  40. package/substrate/.claude/luminaries/amazon-pr-faq.md +34 -0
  41. package/substrate/.claude/luminaries/ash-maurya.md +121 -0
  42. package/substrate/.claude/luminaries/bill-buxton.md +210 -0
  43. package/substrate/.claude/luminaries/charles-sanders-peirce.md +150 -0
  44. package/substrate/.claude/luminaries/david-ogilvy.md +192 -0
  45. package/substrate/.claude/luminaries/don-norman.md +173 -0
  46. package/substrate/.claude/luminaries/edward-tufte.md +179 -0
  47. package/substrate/.claude/luminaries/eric-evans.md +160 -0
  48. package/substrate/.claude/luminaries/frederick-brooks.md +50 -0
  49. package/substrate/.claude/luminaries/gang-of-four.md +157 -0
  50. package/substrate/.claude/luminaries/jason-fried-dhh.md +46 -0
  51. package/substrate/.claude/luminaries/jesse-james-garrett.md +154 -0
  52. package/substrate/.claude/luminaries/john-ousterhout.md +94 -0
  53. package/substrate/.claude/luminaries/karl-popper.md +132 -0
  54. package/substrate/.claude/luminaries/kent-beck.md +168 -0
  55. package/substrate/.claude/luminaries/linus-torvalds.md +218 -0
  56. package/substrate/.claude/luminaries/martin-fowler.md +164 -0
  57. package/substrate/.claude/luminaries/michael-feathers.md +125 -0
  58. package/substrate/.claude/luminaries/michael-nygard.md +118 -0
  59. package/substrate/.claude/luminaries/robert-c-martin.md +164 -0
  60. package/substrate/.claude/luminaries/saltzer-schroeder.md +194 -0
  61. package/substrate/.claude/luminaries/sophia-prater.md +193 -0
  62. package/substrate/.claude/luminaries/stephen-toulmin.md +131 -0
  63. package/substrate/.claude/rules/artifact-ingestion.md +179 -0
  64. package/substrate/.claude/rules/assert-only-after-verify.md +137 -0
  65. package/substrate/.claude/rules/blocked-items.md +146 -0
  66. package/substrate/.claude/rules/branching.md +28 -0
  67. package/substrate/.claude/rules/commit-conventions.md +22 -0
  68. package/substrate/.claude/rules/context-engineering.md +202 -0
  69. package/substrate/.claude/rules/context-management.md +85 -0
  70. package/substrate/.claude/rules/destructive-operations.md +69 -0
  71. package/substrate/.claude/rules/diagnosis.md +38 -0
  72. package/substrate/.claude/rules/guardrails.md +73 -0
  73. package/substrate/.claude/rules/identifier-leak-prevention.md +104 -0
  74. package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +98 -0
  75. package/substrate/.claude/rules/oo-ad-entry-point.md +117 -0
  76. package/substrate/.claude/rules/operator-facing-prose.md +196 -0
  77. package/substrate/.claude/rules/plain-english-discipline.md +154 -0
  78. package/substrate/.claude/rules/pr-body-shape.md +317 -0
  79. package/substrate/.claude/rules/pr-strategy.md +167 -0
  80. package/substrate/.claude/rules/sdlc-gates.md +149 -0
  81. package/substrate/.claude/rules/session-artifacts.md +236 -0
  82. package/substrate/.claude/rules/state-schema-validation.md +162 -0
  83. package/substrate/.claude/rules/whereami-load-bearing.md +202 -0
  84. package/substrate/.claude/rules/writing-craft-discipline.md +92 -0
  85. package/substrate/.claude/skills/build/SKILL.md +640 -0
  86. package/substrate/.claude/skills/decompose/SKILL.md +280 -0
  87. package/substrate/.claude/skills/diagnose/SKILL.md +297 -0
  88. package/substrate/.claude/skills/howdoi/SKILL.md +105 -0
  89. package/substrate/.claude/skills/ia-model/SKILL.md +108 -0
  90. package/substrate/.claude/skills/interaction-design/SKILL.md +112 -0
  91. package/substrate/.claude/skills/interpret-input/SKILL.md +180 -0
  92. package/substrate/.claude/skills/kiss/SKILL.md +449 -0
  93. package/substrate/.claude/skills/launch/SKILL.md +924 -0
  94. package/substrate/.claude/skills/lean-canvas/SKILL.md +332 -0
  95. package/substrate/.claude/skills/longrun/SKILL.md +426 -0
  96. package/substrate/.claude/skills/luminary/SKILL.md +481 -0
  97. package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
  98. package/substrate/.claude/skills/onboard-repo/SKILL.md +2190 -0
  99. package/substrate/.claude/skills/pattern-review/SKILL.md +99 -0
  100. package/substrate/.claude/skills/personas/SKILL.md +207 -0
  101. package/substrate/.claude/skills/promote/SKILL.md +283 -0
  102. package/substrate/.claude/skills/requirement/SKILL.md +98 -0
  103. package/substrate/.claude/skills/retro/SKILL.md +117 -0
  104. package/substrate/.claude/skills/riff/SKILL.md +114 -0
  105. package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
  106. package/substrate/.claude/skills/session-end/SKILL.md +309 -0
  107. package/substrate/.claude/skills/session-log/SKILL.md +299 -0
  108. package/substrate/.claude/skills/skills/SKILL.md +228 -0
  109. package/substrate/.claude/skills/spec/SKILL.md +105 -0
  110. package/substrate/.claude/skills/sprint/SKILL.md +392 -0
  111. package/substrate/.claude/skills/stage/SKILL.md +384 -0
  112. package/substrate/.claude/skills/state-a-problem/SKILL.md +185 -0
  113. package/substrate/.claude/skills/temperance/SKILL.md +108 -0
  114. package/substrate/.claude/skills/use-case/SKILL.md +417 -0
  115. package/substrate/.claude/skills/user-stories/SKILL.md +268 -0
  116. package/substrate/.claude/skills/value-prop/SKILL.md +251 -0
  117. package/substrate/.claude/skills/verify/SKILL.md +160 -0
  118. package/substrate/.claude/skills/whereami/SKILL.md +307 -0
  119. package/substrate/AGENTS.md +79 -0
  120. package/substrate/CLAUDE-lite.md +85 -0
  121. package/substrate/CODE_OF_CONDUCT.md +28 -0
  122. package/substrate/CONTRIBUTING.md +177 -0
  123. package/substrate/README.md +173 -0
  124. package/substrate/SECURITY.md +19 -0
  125. package/substrate/architecture/decisions/ADR-029-release-pipeline.md +79 -0
  126. package/substrate/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
  127. package/substrate/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
  128. package/substrate/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
  129. package/substrate/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
  130. package/substrate/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
  131. package/substrate/lib/clean-artifacts-sweep.sh +112 -0
  132. package/substrate/lib/code-comment-discipline.sh +144 -0
  133. package/substrate/lib/composer-preflight.sh +459 -0
  134. package/substrate/lib/hook-inject.sh +255 -0
  135. package/substrate/lib/luminary-pick.sh +96 -0
  136. package/substrate/lib/output-discipline.sh +143 -0
  137. package/substrate/lib/rewrite-check.sh +214 -0
  138. package/substrate/lib/state.sh +1372 -0
  139. package/substrate/lib/telemetry.sh +205 -0
  140. package/substrate/lib/tier-check.sh +138 -0
  141. package/substrate/lib/tier-dependency-audit.sh +933 -0
  142. package/substrate/presence/install/bassclef-hook-connect.sh +178 -0
  143. package/substrate/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
  144. package/substrate/presence/install/bassclef-sync.template.sh +2076 -0
  145. package/substrate/presence/install/schedule-auto-save.cron.sh +88 -0
  146. package/substrate/presence/install/schedule-auto-save.taskscheduler.md +122 -0
  147. package/substrate/scripts/aggregate-telemetry.sh +217 -0
  148. package/substrate/scripts/analyze-tier-dependencies.sh +239 -0
  149. package/substrate/scripts/generate-lite-manifest.sh +489 -0
  150. package/substrate/scripts/generate-tier-manifest.sh +28 -0
  151. package/substrate/scripts/intent-drift-check.sh +456 -0
  152. package/substrate/scripts/lite-manifest-drift-check.sh +146 -0
  153. package/substrate/scripts/render-lite-manifest-doc.sh +150 -0
  154. package/substrate/standards/bassclef-configs-schema.md +232 -0
  155. package/substrate/standards/bassclef-evolution.md +143 -0
  156. package/substrate/standards/bassclef-internal-jargon.md +244 -0
  157. package/substrate/standards/bassclef-managed-sentinel.md +96 -0
  158. package/substrate/standards/bassclef-source-config.md +228 -0
  159. package/substrate/standards/deferred-actions-schema.md +204 -0
  160. package/substrate/standards/docs-sync-allowlist.md +76 -0
  161. package/substrate/standards/graceful-exit.md +227 -0
  162. package/substrate/standards/hook-idempotency.md +102 -0
  163. package/substrate/standards/lite-manifest-schema-changes.md +75 -0
  164. package/substrate/standards/luminary-problem-patterns.md +481 -0
  165. package/substrate/standards/ogilvy-writing-rules.md +225 -0
  166. package/substrate/standards/opener-discipline.md +96 -0
  167. package/substrate/standards/operator-facing-prose-discipline.md +201 -0
  168. package/substrate/standards/project-directory-layout.md +276 -0
  169. package/substrate/standards/release-tagging.md +137 -0
  170. package/substrate/standards/sdlc-compliance.md +286 -0
  171. package/substrate/standards/secrets-lifecycle.md +210 -0
  172. package/substrate/standards/security-scanner-adapter.md +145 -0
  173. package/substrate/standards/skill-output-discipline.md +90 -0
  174. package/substrate/standards/state-spine.md +511 -0
  175. package/substrate/standards/tech-stack-config.md +109 -0
  176. package/substrate/standards/tier-dependency-analysis.md +167 -0
  177. package/substrate/standards/tier-runtime-deps/lite.md +57 -0
  178. package/substrate/standards/tier-tag-schema.md +155 -0
  179. package/substrate/standards/whereami-schema.md +301 -0
  180. package/substrate/standards/writing-guide.md +213 -0
  181. package/substrate/templates/deferred-action-template.md +45 -0
  182. package/substrate/templates/whereami-template.md +101 -0
@@ -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` — 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
@@ -0,0 +1,155 @@
1
+ ---
2
+ tier: lite
3
+ description: Per-file maturity-signal field that governs flow from bassclef-upstream (upstream experimental) → bassclef (public hardened release mirror).
4
+ ---
5
+ <!-- andon-allow: operator-private -->
6
+ <!-- andon-allow: bassclef-upstream -->
7
+
8
+ # Tier-tag schema
9
+
10
+ Per-file maturity-signal field that governs flow from `bassclef-upstream` (upstream experimental) → `bassclef` (public hardened release mirror). The release script (`scripts/release-to-bassclef.sh`) reads this field on every substrate primitive and decides whether to include it in the release.
11
+
12
+ ## Field
13
+
14
+ - **Name:** `tier`
15
+ - **Location per file type** (extended 2026-08-17 per ADR-052 D6):
16
+ - `.md` files (skills, luminaries, rules, ADRs, standards): YAML frontmatter, recommended as the first line after the opening `---`
17
+ - `.sh` files (hooks, scripts): header comment `# tier: <value>` on line 2 (after the shebang)
18
+ - `.yml`, `.yaml` files: comment `# tier: <value>` on line 1
19
+ - `.jsonc` files: line comment `// tier: <value>` on line 1
20
+ - `.json` (pure) files: underscored key `"_tier": "<value>"` in the top object (underscore signals metadata field per common convention)
21
+ - LICENSE, plain text: external entry in `standards/tier-file-allowlist.json`
22
+ - **Values (extended 2026-08-17 per ADR-043 D1 amendment):** `upstream | archive | unknown | lite | standard | standard-pro | ultra`
23
+ - **Default for untagged legacy files:** untagged .md and .sh files BLOCK release per #1209. Untagged JSON / YAML / LICENSE ship by default via ALLOWED_PATHS (per `scripts/release-to-bassclef.sh:508-513`).
24
+ - **Required on:** skills, rules (enforced by `substrate-clarity-gate.sh`). Luminaries, hooks, ADRs, standards SHOULD carry it; strict enforcement deferred to a follow-on.
25
+
26
+ ## Scope — where the field applies
27
+
28
+ The `tier:` field applies to substrate building-block surfaces whose maturity governs release-script filtering. It does not apply to documentation surfaces that ship unconditionally.
29
+
30
+ **Applies to (field required or SHOULD carry):**
31
+
32
+ | Surface | Path pattern | Enforcement |
33
+ |---|---|---|
34
+ | Skills | `.claude/skills/*/SKILL.md` | `substrate-clarity-gate.sh` BLOCKs if missing |
35
+ | Rules | `.claude/rules/*.md` | `substrate-clarity-gate.sh` BLOCKs if missing |
36
+ | Luminaries | `.claude/luminaries/*.md` | SHOULD carry; strict enforcement deferred |
37
+ | Agents | `.claude/agents/*.md` | SHOULD carry; strict enforcement deferred |
38
+ | Hooks | `.claude/hooks/*.sh` | SHOULD carry; strict enforcement deferred |
39
+ | ADRs | `architecture/decisions/ADR-*.md` | SHOULD carry; strict enforcement deferred |
40
+ | Standards | `standards/*.md` | SHOULD carry; strict enforcement deferred |
41
+ | Strategy | `strategy/*` | SHOULD carry; strict enforcement deferred |
42
+
43
+ These paths match the building-block list in `scripts/release-to-bassclef.sh:254-263`. The release script reads the field per file and filters accordingly.
44
+
45
+ **Does NOT apply to (field MUST NOT appear):**
46
+
47
+ | Surface | Path pattern | Enforcement |
48
+ |---|---|---|
49
+ | Release notes | `docs/release-notes/*.md` | `substrate-clarity-gate.sh` BLOCKs if `tier:` present |
50
+ | Roadmaps | `docs/roadmaps/*.md` | `substrate-clarity-gate.sh` BLOCKs if `tier:` present |
51
+ | Canvases | `docs/canvases/*.md` | `substrate-clarity-gate.sh` BLOCKs if `tier:` present |
52
+
53
+ These paths ship unconditionally via the release script's fallback branch (`scripts/release-to-bassclef.sh:367-372` — "ship per allowed-path. No per-file tier needed"). Adding `tier:` there signals a distribution filter that does not exist.
54
+
55
+ **Rationale.** Per /luminary consult 2026-07-31 (Norman signifier discipline + Brooks conceptual integrity + Linus adopter contract): a field with two meanings across the substrate breaks coherence. A field that signals distribution but does not filter distribution misleads readers. Documentation surfaces describe shipped work; they are not themselves substrate building blocks whose maturity gates release.
56
+
57
+ **Legacy sweep.** Two release-notes shipped with `tier: standard` before this scope was clarified: `docs/release-notes/2026-07-10-v0.2.0.md` and `docs/release-notes/2026-07-10-v0.2.1.md`. Both swept in the same PR that added this Scope subsection.
58
+
59
+ ## Value semantics
60
+
61
+ | Value | Ships in release? | Meaning to adopter |
62
+ |---|---|---|
63
+ | `private` | **No** | Operator-private even outside `docs/operator-private/`. Belt-and-braces per-file gate. |
64
+ | `lite` | Yes | Early-access; minimal viable; expect rough edges. Signals "use it, file issues, expect change." |
65
+ | `standard` | Yes (bassclef + bassclef-ultra) | Portfolio operator's product; adds atomic skills lite embeds. Ships in bassclef + bassclef-ultra. NOT in bassclef-lite. |
66
+ | `standard-pro` | Conditional (with license key) | Extends `standard` with pre-release content. Ships to adopters whose `.bassclef-source.json` carries `tier_extension: standard-pro` AND `license_key`. Added bet 24b Step 2 (goal 20a Task 3.2). Iteration 3 wires the gate; Iteration 1 accepts the tag only. |
67
+ | `ultra` | Yes (bassclef-ultra only) | Reflective intelligence; Voyage-driven skills. Ships in bassclef-ultra only. |
68
+ | `archive` | **No** | Kept for historical reference or debugging. Not part of active development. Filters out at release. Added 2026-08-17 per ADR-043 D1 amendment. |
69
+ | `unknown` | **No** | Awaiting operator triage. Not yet classified. Filters out at release. Should be resolved. Added 2026-08-17 per ADR-043 D1 amendment. |
70
+
71
+ ## Maturity progression (lite → standard → ultra)
72
+
73
+ Promotion is **communicative, not mechanical.** A primitive that's ready for the next tier gets the frontmatter edited in a normal commit. The release script ships everything that isn't `private`; the tier name tells adopters how mature the file is.
74
+
75
+ ```
76
+ new primitive → lite → standard → ultra
77
+ ↓ ↓ ↓
78
+ ships, with maturity signal in name
79
+ ```
80
+
81
+ There is no separate `/promote --tier-up` skill; if one is needed it'll be added when the operator notices friction.
82
+
83
+ ## Gating
84
+
85
+ **Note (2026-08-17):** amended per ADR-052 D1 — concentric inclusion is the model. Each product ships every file tagged at a smaller-tier value plus its own value.
86
+
87
+ The release script per tier:
88
+
89
+ 1. Reads `tier:` per file per format (see "Tier tag per file format" below)
90
+ 2. If `tier ∈ {private, upstream, archive, unknown}` → **exclude from every downstream release**
91
+ 3. If `tier == lite` → include in bassclef-lite + bassclef + bassclef-ultra
92
+ 4. If `tier == standard` → include in bassclef + bassclef-ultra (NOT bassclef-lite)
93
+ 5. If `tier == standard-pro` → include only when adopter carries `tier_extension: standard-pro` + `license_key`
94
+ 6. If `tier == ultra` → include in bassclef-ultra only
95
+ 7. If `tier == <anything else>` → refuse the release with "INVALID tier" error
96
+ 8. If `tier == <empty>` on ANY file inside ALLOWED_PATHS → BLOCK release (add a tier tag per file format)
97
+
98
+ ## Tier tag per file format
99
+
100
+ Every file format that ships (or could ship) inside ALLOWED_PATHS carries a tier tag in a format the file's parser accepts:
101
+
102
+ | Format | Tag mechanism | Example |
103
+ |---|---|---|
104
+ | `.md` | YAML frontmatter `tier: X` | `---\ntier: lite\n---` |
105
+ | `.sh`, `.py` | header comment `# tier: X` (line 2 after shebang) | `#!/usr/bin/env bash\n# tier: standard` |
106
+ | `.json` (data files) | top-level `"_tier": "X"` field | `{"_tier": "upstream", "data": ...}` |
107
+ | `.json` (JSON Schema files) | `"$comment": "tier: X"` — because `$comment` is a recognized draft-2020-12 keyword; top-level unknown keys fail ajv strict mode | `{"$comment": "tier: standard", "$schema": ...}` |
108
+ | `.jsonc` | header comment `// tier: X` | `// tier: standard\n{...}` |
109
+ | `.yml`, `.yaml` | frontmatter `tier: X` OR header comment `# tier: X` | `---\ntier: lite\n---` |
110
+ | Other text | header comment appropriate to format | — |
111
+
112
+ Non-taggable formats (binary files) go into `standards/tier-file-allowlist.json` external allowlist per ADR-052 D6.
113
+
114
+ Prior default-ship rule for non-md/sh files (superseded by this table 2026-08-20 per Wave 4 Option C Step 4): removed. Every file inside ALLOWED_PATHS now carries an explicit tag per format.
115
+
116
+ ## Defense in depth — path exclusion registry
117
+
118
+ Files whose path matches an entry in `standards/path-exclusion-registry.json` are excluded from every release regardless of any inner `tier:` value. The path wins. Consumers (release script, audit tools) read the registry as the single source of truth for path-based exclusion classes: `session-runtime`, `operator-private`, `test-only`, `operator-internal-rd`, `prototype`, `config-per-repo`, `ephemeral-transient`.
119
+
120
+ See `standards/path-exclusion-registry.md` for classes + rationale per entry + how to add a new exclusion.
121
+
122
+ The path-exclusion registry supersedes the prior inline `case` statement in `scripts/release-to-bassclef.sh` L415-460. The refactor to read the registry ships as a separate PR after this schema amendment.
123
+
124
+ ## Validation
125
+
126
+ The `substrate-clarity-gate.sh` hook enforces on skill + rule edits:
127
+ 1. `tier:` present (BLOCK if missing)
128
+ 2. `tier:` value ∈ `{private, lite, standard, standard-pro, ultra}` (BLOCK if other value)
129
+ 3. `tier:` accepted as a recognized field (no `UNKNOWN_FIELDS` warning)
130
+
131
+ The `bassclef-source-config-validate.sh` hook validates `.bassclef-source.json` `tier_extension` field against the same enum (minus `private` — adopters cannot opt into private content).
132
+
133
+ Override hatches:
134
+ - `SKIP_SUBSTRATE_CLARITY=1` (full hook bypass; logged via trace-helper)
135
+ - Allowlists: `.claude/hooks/substrate-clarity-allowlist.txt`, `.claude/hooks/substrate-frontmatter-allowlist.txt`
136
+
137
+ ## Backfill provenance
138
+
139
+ - 392 primitives initially backfilled with `tier: public` 2026-06-21 (WU-1 commits 73c8fce + bc00f99 + e28d73f)
140
+ - 36 luminaries added to bassclef-upstream 2026-06-21 with `tier: public` (commit 54a65aa, WU-0 gap fix)
141
+ - 9 presence files added 2026-06-21 with `tier: public` (commit cf53a5f)
142
+ - All `tier: public` → `tier: standard` 2026-06-21 (commit TBD this session) per operator's rename to lite/standard/ultra vocabulary
143
+
144
+ ## Relationship to other tier concepts
145
+
146
+ - `tiers:` (plural, in skill frontmatter): skill MODES like `[medium, full]` for /launch sizes. Distinct from `tier:` (release maturity).
147
+ - `model_tier:` (in skill frontmatter): which Claude model the skill prefers. Distinct from `tier:`.
148
+
149
+ ## See also
150
+
151
+ - `architecture/dual-repo-flow.md` — the full architecture this tier field operationalizes
152
+ - `architecture/decisions/ADR-029-release-pipeline.md` — formalizes the release script that consumes this field
153
+ - `architecture/decisions/ADR-030-adopter-inbox-flow.md` — the ingestion direction; doesn't read tier but operates inside the same bounded-context model
154
+ - `scripts/release-to-bassclef.sh` — the consumer
155
+ - `.claude/hooks/substrate-clarity-gate.sh` — the gate that enforces this field on skill + rule