@thebassclef/lite 1.1.1 → 1.2.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 (135) hide show
  1. package/dist/cli.cjs +23 -6
  2. package/dist/cli.js +23 -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/bassclef-configs.jsonc +56 -0
  7. package/dist/lite/.claude/bassclef-orientation.md +120 -0
  8. package/dist/lite/.claude/hooks/adr-discipline-check.sh +132 -0
  9. package/dist/lite/.claude/hooks/atomic-pr-check.sh +169 -0
  10. package/dist/lite/.claude/hooks/auto-save-idle.sh +51 -0
  11. package/dist/lite/.claude/hooks/bassclef-sync.sh +51 -13
  12. package/dist/lite/.claude/hooks/bet-doc-gate.sh +283 -0
  13. package/dist/lite/.claude/hooks/bug-diagnosis.sh +64 -0
  14. package/dist/lite/.claude/hooks/destructive-command-guard.sh +136 -0
  15. package/dist/lite/.claude/hooks/file-rename-discipline-check.sh +147 -0
  16. package/dist/lite/.claude/hooks/hook-classifier-canary.sh +158 -0
  17. package/dist/lite/.claude/hooks/kiss-default-check.sh +129 -0
  18. package/dist/lite/.claude/hooks/multi-tenancy-check.sh +83 -0
  19. package/dist/lite/.claude/hooks/oo-ad-entry-point-check.sh +216 -0
  20. package/dist/lite/.claude/hooks/operator-private-path-check.sh +203 -0
  21. package/dist/lite/.claude/hooks/pattern-annotation-validate.sh +142 -0
  22. package/dist/lite/.claude/hooks/plain-english-steering.sh +15 -1
  23. package/dist/lite/.claude/hooks/post-write-trace.sh +66 -0
  24. package/dist/lite/.claude/hooks/pr-body-scrub-check.sh +446 -0
  25. package/dist/lite/.claude/hooks/pre-commit-identifier-leak-scrub.sh +137 -0
  26. package/dist/lite/.claude/hooks/pre-gh-pr-body-scrub.sh +192 -0
  27. package/dist/lite/.claude/hooks/pre-gh-pr-title-scrub.sh +172 -0
  28. package/dist/lite/.claude/hooks/role-entry-gate.sh +115 -0
  29. package/dist/lite/.claude/hooks/save-state.sh +268 -0
  30. package/dist/lite/.claude/hooks/session-reflection.d/08-settings-drift.sh +8 -1
  31. package/dist/lite/.claude/hooks/session-reflection.d/10-abrupt-stop-recovery.sh +52 -0
  32. package/dist/lite/.claude/hooks/session-reflection.d/55-orientation-gate.sh +40 -4
  33. package/dist/lite/.claude/hooks/session-reflection.d/80-hook-heartbeat-check.sh +12 -5
  34. package/dist/lite/.claude/hooks/session-reflection.d/81-hook-manifest-staleness.sh +18 -2
  35. package/dist/lite/.claude/hooks/session-reflection.d/91-npm-version-drift.sh +54 -0
  36. package/dist/lite/.claude/hooks/session-reflection.d/tests/10-abrupt-stop-recovery.test.sh +95 -0
  37. package/dist/lite/.claude/hooks/session-reflection.sh +62 -15
  38. package/dist/lite/.claude/hooks/tool-failure-diagnosis.sh +50 -0
  39. package/dist/lite/.claude/luminaries/andrej-karpathy.md +165 -0
  40. package/dist/lite/.claude/luminaries/dave-gray.md +155 -0
  41. package/dist/lite/.claude/luminaries/gary-klein.md +166 -0
  42. package/dist/lite/.claude/luminaries/kaoru-ishikawa.md +162 -0
  43. package/dist/lite/.claude/luminaries/lean-product-canvas.md +33 -0
  44. package/dist/lite/.claude/luminaries/luke-wroblewski.md +224 -0
  45. package/dist/lite/.claude/luminaries/ryan-singer.md +113 -0
  46. package/dist/lite/.claude/luminaries/steve-krug.md +168 -0
  47. package/dist/lite/.claude/luminaries/tony-ulwick.md +134 -0
  48. package/dist/lite/.claude/rules/arc-level-orientation-before-leaf.md +60 -0
  49. package/dist/lite/.claude/rules/architect-review-discipline.md +71 -0
  50. package/dist/lite/.claude/rules/auto-fix-criteria.md +126 -0
  51. package/dist/lite/.claude/rules/bassclef-hook-drift-blocker.md +144 -0
  52. package/dist/lite/.claude/rules/bassclef-models-discovery.md +107 -0
  53. package/dist/lite/.claude/rules/bassclef-workflow-parity.md +104 -0
  54. package/dist/lite/.claude/rules/cost-governance.md +154 -0
  55. package/dist/lite/.claude/rules/file-rename-discipline.md +95 -0
  56. package/dist/lite/.claude/rules/mechanism-fidelity.md +88 -0
  57. package/dist/lite/.claude/rules/prototype-production-coupling.md +125 -0
  58. package/dist/lite/.claude/rules/quick-fix-criteria.md +90 -0
  59. package/dist/lite/.claude/rules/session-artifacts.md +30 -0
  60. package/dist/lite/.claude/rules/sibling-smoke-after-substrate-change.md +107 -0
  61. package/dist/lite/.claude/rules/substrate-as-system.md +67 -0
  62. package/dist/lite/.claude/rules/usability.md +22 -0
  63. package/dist/lite/.claude/settings.json +20 -0
  64. package/dist/lite/.claude/skills/agent-research-spawn/SKILL.md +100 -0
  65. package/dist/lite/.claude/skills/architect-review/SKILL.md +201 -0
  66. package/dist/lite/.claude/skills/auto-fix/SKILL.md +297 -0
  67. package/dist/lite/.claude/skills/autonomous/SKILL.md +300 -0
  68. package/dist/lite/.claude/skills/bind-subdomain/SKILL.md +232 -0
  69. package/dist/lite/.claude/skills/canvas/SKILL.md +41 -0
  70. package/dist/lite/.claude/skills/deploy-prod/SKILL.md +106 -0
  71. package/dist/lite/.claude/skills/docs-sync/SKILL.md +188 -0
  72. package/dist/lite/.claude/skills/eisenhower/SKILL.md +273 -0
  73. package/dist/lite/.claude/skills/empathy-map/SKILL.md +168 -0
  74. package/dist/lite/.claude/skills/frontend-design/SKILL.md +53 -0
  75. package/dist/lite/.claude/skills/interview-me/SKILL.md +171 -0
  76. package/dist/lite/.claude/skills/journal-export/SKILL.md +293 -0
  77. package/dist/lite/.claude/skills/jtbd-tasks/SKILL.md +203 -0
  78. package/dist/lite/.claude/skills/objectory-decompose/SKILL.md +256 -0
  79. package/dist/lite/.claude/skills/pick-luminaries/SKILL.md +100 -0
  80. package/dist/lite/.claude/skills/pre-mortem/SKILL.md +180 -0
  81. package/dist/lite/.claude/skills/prototype-gallery/SKILL.md +264 -0
  82. package/dist/lite/.claude/skills/provision-deploy-host/SKILL.md +257 -0
  83. package/dist/lite/.claude/skills/quick-fix/SKILL.md +273 -0
  84. package/dist/lite/.claude/skills/release/SKILL.md +311 -0
  85. package/dist/lite/.claude/skills/release-notes/SKILL.md +202 -0
  86. package/dist/lite/.claude/skills/rfc/SKILL.md +222 -0
  87. package/dist/lite/.claude/skills/riff-prototypes/SKILL.md +637 -0
  88. package/dist/lite/.claude/skills/secrets-bootstrap/SKILL.md +209 -0
  89. package/dist/lite/.claude/skills/skill/SKILL.md +304 -0
  90. package/dist/lite/.claude/skills/smoke-test/SKILL.md +100 -0
  91. package/dist/lite/.claude/skills/state/SKILL.md +204 -0
  92. package/dist/lite/.claude/skills/substrate-check/SKILL.md +218 -0
  93. package/dist/lite/.claude/skills/synthetic-user/SKILL.md +381 -0
  94. package/dist/lite/.claude/skills/task-scenarios/SKILL.md +105 -0
  95. package/dist/lite/.claude/skills/tier-dependency-audit/SKILL.md +139 -0
  96. package/dist/lite/.claude/skills/ux-migration/SKILL.md +424 -0
  97. package/dist/lite/.claude/skills/value-prop-canvas/SKILL.md +297 -0
  98. package/dist/lite/README.md +5 -1
  99. package/dist/lite/gitignore +6 -0
  100. package/dist/lite/lib/bassclef-dir-resolver.sh +85 -0
  101. package/dist/lite/lib/clone-failure-classifier.sh +59 -0
  102. package/dist/lite/lib/fixture-builder.sh +190 -0
  103. package/dist/lite/lib/fresh-install-check.sh +49 -0
  104. package/dist/lite/lib/hook-heartbeat.sh +0 -1
  105. package/dist/lite/lib/mechanism-fidelity.sh +569 -0
  106. package/dist/lite/lib/npm-version-check.sh +112 -0
  107. package/dist/lite/lib/preview-state.sh +229 -0
  108. package/dist/lite/lib/session-rescue.sh +0 -1
  109. package/dist/lite/scripts/generate-lite-manifest.sh +145 -4
  110. package/dist/lite/scripts/lite-manifest-drift-check.sh +5 -1
  111. package/dist/lite/standards/architect-review-discipline.md +222 -0
  112. package/dist/lite/standards/bassclef-platform.md +249 -0
  113. package/dist/lite/standards/bassclef-test-repos.md +97 -0
  114. package/dist/lite/standards/bassclef-wiring-manifest.json +25 -1
  115. package/dist/lite/standards/cold-adopter-harness.md +205 -0
  116. package/dist/lite/standards/data-management.md +135 -0
  117. package/dist/lite/standards/frontend-stack/nextjs-prisma.md +124 -0
  118. package/dist/lite/standards/lite-manifest-schema-changes.md +27 -0
  119. package/dist/lite/standards/lite-manifest.json +1456 -14
  120. package/dist/lite/standards/mechanism-fidelity.md +205 -0
  121. package/dist/lite/standards/operator-private-discipline.md +200 -0
  122. package/dist/lite/standards/operator-to-public-flow.md +195 -0
  123. package/dist/lite/standards/prototype-gallery.md +251 -0
  124. package/dist/lite/standards/pseudonym-key-schema.md +109 -0
  125. package/dist/lite/standards/sibling-validation-checklist.md +181 -0
  126. package/dist/lite/standards/slack-notifications.md +161 -0
  127. package/dist/lite/standards/synthetic-user-testing.md +173 -0
  128. package/dist/lite/standards/vendor-bindings.md +165 -0
  129. package/dist/lite/standards/vendor-plugins/frontend-design.md +66 -0
  130. package/dist/lite/standards/vpc-fit-validation.md +167 -0
  131. package/dist/lite/templates/gallery-yml.md +113 -0
  132. package/dist/lite/templates/product-canvas.md +169 -0
  133. package/dist/lite/templates/value-prop-canvas.md +180 -0
  134. package/package.json +3 -3
  135. /package/dist/lite/{whereami.md → docs/whereami.md} +0 -0
@@ -0,0 +1,251 @@
1
+ ---
2
+ tier: lite
3
+ description: - bassclef #252 — ticket prescribing the three-artifact shape (standard + skill + template) - .claude/skills/prototype-variants/SKILL.md — upstream skill producing the variants this standard indexes - ~/src/sunj-labs/quorum/prototypes/ — 23-variant…
4
+ ---
5
+
6
+ ## Sources read
7
+
8
+ - `bassclef #252` — ticket prescribing the three-artifact shape (standard + skill + template)
9
+ - `.claude/skills/prototype-variants/SKILL.md` — upstream skill producing the variants this standard indexes
10
+ - `~/src/sunj-labs/quorum/prototypes/` — 23-variant repo that forced this pattern (variants a–s + synthesis m/mxh/mxj/mxk)
11
+ - `standards/project-directory-layout.md` — `prototypes/` is already a bassclef directory; this standard extends conventions around it
12
+
13
+ ## What I'm NOT reading (with reason)
14
+
15
+ - Next.js App Router docs — gallery page is plain Next; no framework-specific specialization
16
+ - Static hosting vendor docs (Amplify/Netlify/Vercel) — gallery is a route under the consumer app; no vendor-specific logic
17
+ - Analytics vendors (Plausible, Vercel Analytics) — variant-open tracking is explicitly deferred per `#252` v1
18
+
19
+ # Prototype Gallery Standard
20
+
21
+ Convention for how sunj-labs app repos expose their prototype variants
22
+ as a single shareable index page with scannable context.
23
+
24
+ Operationalized by `/prototype-gallery` (skill) and `templates/gallery-yml.md` (metadata template).
25
+
26
+ ## The problem this standard solves
27
+
28
+ Repos that run `/prototype-variants` accumulate multiple variants in
29
+ `prototypes/` — often 3-5, sometimes 20+ (quorum has 23). When the
30
+ operator wants to share or compare variants:
31
+
32
+ - Each variant is its own static HTML with no cross-variant context
33
+ - Collaborators open tabs per variant and switch between them with no
34
+ value-prop framing — just raw UI
35
+ - The operator's decision-support surface is memory-dependent: "what
36
+ was variant-k optimizing for again?"
37
+ - Single-URL sharing requires the gallery page to exist; without it,
38
+ sharing means hunting Amplify URLs per variant or sending file paths
39
+
40
+ The gallery page is the single shareable URL with all variants listed,
41
+ each with a 2-line value prop and luminary attribution.
42
+
43
+ ## Coupled decisions
44
+
45
+ ### 1. Directory convention
46
+
47
+ | Source path | Purpose |
48
+ |-------------|---------|
49
+ | `prototypes/<slug>/` | Variant source (HTML, CSS, images) — authored by `/prototype-variants` or by hand |
50
+ | `prototypes/<slug>/gallery.yml` | Variant metadata for the gallery index (this standard's artifact) |
51
+ | `public/prototypes/<slug>/` | Copy of variant HTML served by the consumer app's static pipeline |
52
+ | `src/app/prototypes/page.tsx` | Gallery index page (or `src/app/page.tsx` if prototype-first) |
53
+
54
+ `prototypes/` is the source of truth. `public/prototypes/` is regenerated by the skill; never hand-edited. `src/app/prototypes/page.tsx` is regenerated but may be hand-edited — the skill refuses to overwrite without confirmation.
55
+
56
+ ### 2. Gallery route
57
+
58
+ | Scenario | Route | Example |
59
+ |----------|-------|---------|
60
+ | Repo is prototype-first (only variants, no app yet) | `/` | quorum |
61
+ | Repo has its own app and variants live alongside | `/prototypes` | POA (hypothetical — review-queue pre-v5) |
62
+
63
+ The skill detects which scenario by checking for an existing `src/app/page.tsx` — if present and non-trivially different from a gallery scaffold, route is `/prototypes`; otherwise `/`.
64
+
65
+ **Per ADR-016**: variant URLs are `<app>.apps.fivepandas.com/prototypes/<dispatch-slug>/<variant-slug>/` — path-based under the existing app subdomain. One subdomain per app regardless of variant count; routing is the consumer app's responsibility (static folder OR Next.js App Router). See `standards/domain-and-dns.md` §4 for the full convention.
66
+
67
+ **Production exclusion (consumer responsibility):** `/prototypes/*` routes MUST be gated behind a build-time flag so production builds strip prototype galleries. Galleries leaking into production hostnames are a real-user-confusion risk (bassclef#441 R1, addressed in bassclef#458). See §"Production-domain gating" below for the requirement and three reference configs.
68
+
69
+ ### 3. Metadata: `gallery.yml` (primary) or README frontmatter (fallback)
70
+
71
+ Each variant declares gallery metadata via `prototypes/<slug>/gallery.yml`. Schema:
72
+
73
+ ```yaml
74
+ title: "Variant A — Ive + HIG"
75
+ value_prop: |
76
+ Restrained surfaces. Operator reads the deal in under 3 seconds.
77
+ Strong typographic hierarchy; no decorative affordances.
78
+ luminaries:
79
+ - Jony Ive
80
+ - Apple HIG
81
+ date: 2026-04-20
82
+ status: active # active | archived | superseded
83
+ ```
84
+
85
+ **`title`**: Short label shown on the card. Usually `<variant-slug humanized> — <luminary shorthand>`.
86
+
87
+ **`value_prop`**: Two lines maximum. Tufte-density constraint — the whole point of the gallery is scannable context, not explanatory prose. Longer value props are a spec violation; the skill may truncate or the reviewer may reject.
88
+
89
+ **`luminaries`**: List of luminary names (matches the `primary_luminaries` shape in iteration goals per `standards/pluggable-luminaries.md`). Rendered as tag pills on the card.
90
+
91
+ **`date`**: When the variant was produced. Controls sort order (newest first, by default).
92
+
93
+ **`status`**: `active` = shown in gallery; `archived` = hidden but preserved on disk; `superseded` = hidden with a "superseded by" link to the successor variant (field: `superseded_by: <slug>`).
94
+
95
+ **Fallback**: if `gallery.yml` is absent, skill reads variant's `README.md` frontmatter for the same fields. If neither exists, skill fails with a clear error naming the variant — does NOT synthesize defaults, because a gallery card without a value prop is worse than no card.
96
+
97
+ ### 4. Card shape
98
+
99
+ Each variant renders as a card with four zones:
100
+
101
+ ```
102
+ ┌─────────────────────────────────────────────┐
103
+ │ Variant A — Ive + HIG │ ← title
104
+ │ │
105
+ │ Restrained surfaces. Operator reads the │ ← value_prop (2 lines)
106
+ │ deal in under 3 seconds. │
107
+ │ │
108
+ │ [Jony Ive] [Apple HIG] │ ← luminary pills
109
+ │ │
110
+ │ [ Open → ] │ ← CTA
111
+ └─────────────────────────────────────────────┘
112
+ ```
113
+
114
+ Card styling is the consumer app's concern, not bassclef's. The skill scaffolds a plain CSS-only card with semantic markup; consumer repos can override by editing `page.tsx` directly (the skill respects hand-edits per Decision 1).
115
+
116
+ ### 5. Regeneration discipline
117
+
118
+ When a new variant is added to `prototypes/`, the skill re-scans and regenerates:
119
+
120
+ 1. Copies updated variant HTML into `public/prototypes/<slug>/`
121
+ 2. Re-reads all `gallery.yml` files
122
+ 3. Updates `src/app/prototypes/page.tsx` IF it matches the bassclef scaffold shape (hash check against the template)
123
+ 4. If `page.tsx` has been hand-edited, skill surfaces a diff and asks operator whether to merge
124
+
125
+ **Additive regeneration**: archived/superseded variants are NOT deleted from `public/prototypes/` — old URLs continue to resolve for operators who bookmarked them. Gallery index just hides them.
126
+
127
+ ## Production-domain gating
128
+
129
+ ADR-016 R1 (production-domain pollution): when prototype and production tiers share a hostname (the common case — both deploy under `<app>.apps.fivepandas.com`), real users navigating directly to `<app>.apps.fivepandas.com/prototypes/some-slug/variant-a/` would land on a stale prototype with no production framing. This is real-user confusion, not just operator-facing aesthetics.
130
+
131
+ **Requirement:** consumer apps that adopt the gallery convention MUST gate `/prototypes/*` routes behind a build-time flag. Production builds MUST strip the prototype routes from the deployed bundle.
132
+
133
+ The gate is consumer responsibility (no auto-strip — see "What bassclef does not do" below). Below are three reference configs covering the common shapes.
134
+
135
+ ### Reference config 1: Next.js App Router (`app/prototypes/[...slug]/page.tsx`)
136
+
137
+ The gallery page reads the env var at request time and returns 404 in production builds. The `[...slug]` catch-all matches every variant URL.
138
+
139
+ ```tsx
140
+ // app/prototypes/[...slug]/page.tsx
141
+ import { notFound } from 'next/navigation'
142
+
143
+ export default function PrototypePage({ params }: { params: { slug: string[] } }) {
144
+ if (process.env.PREVIEW_TIER !== '1') {
145
+ notFound()
146
+ }
147
+ // Render variant page. In production builds (PREVIEW_TIER unset),
148
+ // the notFound() above runs and Next.js returns the 404 page.
149
+ return <iframe src={`/prototypes-static/${params.slug.join('/')}/index.html`} className="w-full h-screen border-0" />
150
+ }
151
+ ```
152
+
153
+ Set `PREVIEW_TIER=1` in dev / preview deploys; leave unset in production. The catch-all approach means one route gates every variant URL.
154
+
155
+ ### Reference config 2: Next.js static folder (`public/prototypes/`)
156
+
157
+ If your variants live in `public/prototypes/` and are served as static files (no Next.js route), the gate moves to the build script:
158
+
159
+ ```json
160
+ // package.json
161
+ {
162
+ "scripts": {
163
+ "build": "if [ \"$PREVIEW_TIER\" = \"1\" ]; then next build; else rm -rf public/prototypes && next build; fi",
164
+ "build:preview": "PREVIEW_TIER=1 next build",
165
+ "build:prod": "next build"
166
+ }
167
+ }
168
+ ```
169
+
170
+ In production builds, the `public/prototypes/` directory is removed before `next build` runs. The static files don't ship in the production bundle. Preview builds keep them.
171
+
172
+ ### Reference config 3: generic framework (Vite, Remix, plain HTML)
173
+
174
+ For frameworks without first-class app-router gating, gate at the static-asset boundary:
175
+
176
+ ```bash
177
+ # scripts/strip-prototypes.sh — run before production deploy
178
+ #!/bin/bash
179
+ set -e
180
+ if [ "${PREVIEW_TIER:-0}" != "1" ]; then
181
+ echo "Production build: stripping public/prototypes/"
182
+ rm -rf public/prototypes
183
+ fi
184
+ ```
185
+
186
+ Hook the script into your build command (`pre-build` in package.json, `build.beforeBuild` in framework config, or CI step) so it runs before the bundler reads the static dir.
187
+
188
+ ### How `/launch-preview` warns about gating
189
+
190
+ `/launch-preview` Phase 4 reads `bassclef-platform.yml`'s `deploy_tiers.{prototype,production}` and surfaces a warning when prototype and production share a hostname:
191
+
192
+ ```
193
+ ⚠️ PRODUCTION-DOMAIN GATING
194
+
195
+ This gallery is live at <URL>. Production deploys to the same hostname.
196
+ Real users navigating directly to /prototypes/<slug>/ would see this
197
+ gallery in production. Gate /prototypes/* in your consumer build.
198
+
199
+ See standards/prototype-gallery.md §"Production-domain gating" for
200
+ three reference configs (Next.js App Router, static folder, generic).
201
+ ```
202
+
203
+ The warning is informational — `/launch-preview` does not block. ADR-016 R1 names this as a real-user-confusion risk; the warning surfaces it at the moment a gallery goes live so the operator can verify their consumer's gate is in place.
204
+
205
+ ### What bassclef does not do
206
+
207
+ - **Auto-inject gating logic** into consumer builds — operator-judgment territory; consumers know their build pipeline
208
+ - **Block `/launch-preview`** when gating is missing — too aggressive; warning + reference config is sufficient
209
+ - **Verify the gate works at runtime** — would require bassclef to fetch the production URL post-deploy, which crosses a runtime boundary the substrate avoids
210
+
211
+ If a consumer ships ungated `/prototypes/*` and a real user finds them, that's a consumer-side bug — but the warning at `/launch-preview` time means no consumer ships it without seeing the warning first.
212
+
213
+ ## Chain position
214
+
215
+ ```
216
+ /prototype-variants → variants in prototypes/
217
+ /prototype-gallery → gallery.yml per variant + public/ copies + src/app/prototypes/page.tsx
218
+ deploy → shareable URL with full variant index
219
+ ```
220
+
221
+ Upstream: `/prototype-variants` (produces the variants).
222
+ Downstream: the consumer app's deploy pipeline (Amplify/Netlify/Vercel), which serves the gallery page at the declared route.
223
+
224
+ ## Out of scope (v1 per #252)
225
+
226
+ - Variant-to-variant navigation within a variant page (prev/next chrome)
227
+ - Gallery-side search or filter (tag/luminary/date facets)
228
+ - Analytics on variant opens
229
+ - Mobile-specific viewport overrides
230
+ - Multi-repo galleries (e.g., a cross-repo operator dashboard showing every bassclef consumer's variants)
231
+
232
+ These are feature ideas to file as follow-up tickets if the v1 gallery proves its lovability signal. The `gallery.yml` schema is designed to accept them later (e.g., adding `tags:` field doesn't break existing galleries).
233
+
234
+ ## Relationship to other standards
235
+
236
+ - `standards/project-directory-layout.md` — declares `prototypes/` as bassclef directory; this standard extends it
237
+ - `standards/pluggable-luminaries.md` — `luminaries:` field shape in `gallery.yml` matches iteration-bet conventions
238
+ - `standards/frontend-stack.md` — gallery page is ordinary Next.js route; no framework deviation
239
+ - `.claude/skills/prototype-variants/SKILL.md` — upstream producer
240
+ - `.claude/skills/prototype-gallery/SKILL.md` — operationalizer of this standard
241
+ - `.claude/skills/visual-review/SKILL.md` — still evaluates individual variants; gallery doesn't replace per-variant review
242
+
243
+ ## Retirement condition
244
+
245
+ If operators stop running multi-variant bets (e.g., bassclef absorbs
246
+ richer decision-support via `/prototype-variants` bake-off mode and
247
+ operators no longer keep variants around for comparison), the gallery
248
+ becomes vestigial. Retire by removing the skill + standard + template;
249
+ variant HTML stays on disk at `prototypes/` with no public surface.
250
+
251
+ Closes bassclef #252.
@@ -0,0 +1,109 @@
1
+ ---
2
+ tier: lite
3
+ title: Pseudonym key schema — substrate-archaeology scrub mapping
4
+ date: 2026-06-06
5
+ schema_for: pseudonym-key.yml (operator-authored in bassclef-upstream)
6
+ bassclef_authors: schema vocabulary + structural shape only
7
+ operator_authors: source-to-pseudonym mapping (in bassclef-upstream)
8
+ acceptance_per: bassclef#853 Sub-bet 22 pseudonym-key as substrate building block
9
+ status: v0 (schema authoring)
10
+ description: Substrate building block for pre-public-launch substrate-archaeology scrub.
11
+ ---
12
+ <!-- andon-allow: docs/operator-private/[a-z-]+/20[0-9][0-9]-[0-9]{2} -->
13
+
14
+ # Pseudonym key schema
15
+
16
+ Substrate building block for pre-public-launch substrate-archaeology scrub. The schema maps operator source-vocabulary to category-classified pseudonyms. Bassclef ships the schema and its vocabulary. The authored mapping itself lives in a private repo the operator controls.
17
+
18
+ ## Why two files
19
+
20
+ The schema and the mapping live apart on purpose. The mapping is reverse-engineerable from an operator's portfolio: if the public schema named both source tokens and their pseudonyms, anyone could collapse the substitution. So the public file ships the shape; the private file holds the substance.
21
+
22
+ | File | Repo | Role | Sensitivity |
23
+ |---|---|---|---|
24
+ | `standards/pseudonym-key-schema.md` (this file) | bassclef | Schema vocabulary + structural shape | Public |
25
+ | `docs/operator-private/pseudonym-key.yml` | bassclef-upstream | Authored source-to-pseudonym mapping | Tier 1 (operator-private) |
26
+
27
+ The scrub script that ships in bassclef reads the mapping at execution time only, via the `SUNJ_LABS_ROOT` environment variable. The mapping never appears in any bassclef artifact: not in commit messages, not in chronicles, not in audit findings, not in this schema.
28
+
29
+ ## Category vocabulary
30
+
31
+ The schema recognises ten categories of operator source-vocabulary. Every entry in the authored mapping carries one of these labels.
32
+
33
+ | Category | Description | Default sensitivity |
34
+ |---|---|---|
35
+ | consumer-app | Operator's adopter app codenames | structural |
36
+ | tier-1-mechanism | Sensitive IP mechanism names | sensitive-ip |
37
+ | domain-codename | Sensitive IP domain codename | sensitive-ip |
38
+ | cloud-stack | Operator-specific cloud or architecture references | structural |
39
+ | operator-specific | Operator's personal or portfolio names | operator-specific |
40
+ | portfolio-effort | Portfolio acronyms | structural |
41
+ | utility-app | Operator's utility-app codenames | structural |
42
+ | operations-app | Operator's operations-app codenames | structural |
43
+ | internal-pr | Internal-repo PR numbers | structural |
44
+ | ip-classification-family | Operator's IP-classification taxonomy | sensitive-ip |
45
+
46
+ ## Sensitivity classes
47
+
48
+ Each entry in the mapping is also classified by sensitivity. Sensitivity determines the scrub pattern.
49
+
50
+ | Class | Scrub pattern | Pseudonym style |
51
+ |---|---|---|
52
+ | structural | Pattern B — pseudonym substitution | `<category>-<n>` (for example `consumer-app-1`) |
53
+ | sensitive-ip | Pattern A — direct scrub, or Pattern B with deeper anonymisation | `null` (Pattern A) or `<category-class>-<n>` (Pattern B) |
54
+ | operator-specific | Pattern A or Pattern B, per operator decision | Per operator |
55
+
56
+ ## Scrub patterns
57
+
58
+ The schema names three patterns the operator may apply per entry. The audit doc (`docs/operator-private/audits/2026-06-06-sub-goal-22-substrate-archaeology-audit.md`) recommends Pattern C hybrid as the default for the Sub-bet 22 scrub execution.
59
+
60
+ - **Pattern A — Direct scrub.** Delete the operator reference outright. Substrate-archaeology shape preserved only in bassclef-upstream. Zero source-vocab residue in public substrate.
61
+ - **Pattern B — Pseudonym substitution.** Map the source token to a neutral placeholder. Substrate-archaeology shape preserved in public; specifics anonymised. Consistent pseudonyms across sessions enable continuity.
62
+ - **Pattern C — Hybrid.** Pattern A for sensitive-ip class items; Pattern B for structural class items. The audit doc names which categories fall on which side of the split.
63
+
64
+ ## Mapping file shape
65
+
66
+ The authored mapping in bassclef-upstream follows this YAML shape.
67
+
68
+ ```yaml
69
+ schema_version: 1
70
+ generated_by: operator-attended write in bassclef-upstream
71
+ generated_at: <ISO timestamp>
72
+ mappings:
73
+ <source-vocabulary-token-1>:
74
+ pseudonym: <category>-<n> # or null for full scrub
75
+ category: <category-label> # from vocabulary table above
76
+ sensitivity: structural | sensitive-ip | operator-specific
77
+ notes: <optional operator commentary>
78
+ <source-vocabulary-token-2>:
79
+ # ...
80
+ ```
81
+
82
+ Source-vocabulary tokens are authored exclusively in bassclef-upstream. Bassclef's schema doc never names them. The example above uses placeholder syntax (`<source-vocabulary-token-N>`) and a placeholder category (`<category-label>`); neither carries a real token.
83
+
84
+ ## Schema authoring discipline
85
+
86
+ The two-file split lives or dies by discipline at the seam.
87
+
88
+ - Bassclef authors the schema vocabulary and structural shape. The work happens in bassclef sessions and lands as a public PR.
89
+ - Operator authors the initial mapping in bassclef-upstream via a separate write session. Bassclef never receives the populated mapping in a context-readable surface.
90
+ - Bassclef's scrub script reads the mapping via the `SUNJ_LABS_ROOT` environment variable at execution time. The mapping never enters bassclef's git history.
91
+ - Pseudonym key updates that change the schema vocabulary propagate via the forward-port registry (planned Sub-bet 22 Phase 3). Updates to the mapping itself stay in bassclef-upstream.
92
+
93
+ ## Adopter discipline
94
+
95
+ Adopter repos that fork bassclef author their own pseudonym key in their own private repo. The schema ships in bassclef for everyone; the per-operator mapping stays operator-private. The pattern scales without forcing operators to share their source-vocabulary with each other or with bassclef.
96
+
97
+ ## Composes with
98
+
99
+ - Sub-bet 22 substrate-archaeology audit — the substrate building block Sub-bet 22 declares.
100
+ - Forward-port registry v1 (Sub-bet 14) — pseudonym key updates may propagate via registry.
101
+ - Six Tier 1 substrate categories — pseudonym-key is the sixth (cameo engine, ADR pins, operator-narrative, operator-state, operator-portfolio specifics, pseudonym-key).
102
+ - bassclef#811 — operator-private substrate restructure. This schema extends the same discipline.
103
+
104
+ ## Refs
105
+
106
+ - bassclef#853 — parent ticket (Pre-launch substrate evolution).
107
+ - bassclef#811 — operator-private substrate restructure parent.
108
+ - `docs/operator-private/audits/2026-06-06-sub-goal-22-substrate-archaeology-audit.md` — Sub-bet 22 audit (categories only).
109
+ - bassclef-upstream — host for the authored `pseudonym-key.yml`.
@@ -0,0 +1,181 @@
1
+ ---
2
+ tier: lite
3
+ description: Operator-runnable procedure for validating bassclef substrate end-to-end on a real consumer repo.
4
+ ---
5
+
6
+ # Sibling-validation checklist
7
+
8
+ Operator-runnable procedure for validating bassclef substrate end-to-end on a real consumer repo. Run after substantive substrate-evolution work where the new behavior depends on adopter inheritance.
9
+
10
+ ## When to run
11
+
12
+ Run this checklist when one of:
13
+
14
+ 1. **New SessionStart hook ships** that should fire in adopter repos (e.g., the orientation gates from bassclef#1275)
15
+ 2. **New bassclef-configs.jsonc block ships** that adopters should opt into (e.g., `wiki_sync` from bassclef#1265)
16
+ 3. **New adopter-vendored template ships** under `strategy/templates/` (e.g., `bassclef-docs-sync.template.yml`)
17
+ 4. **Cold-adopter-inheritance discipline change** that propagates via `additionalDirectories` AND requires a mechanism check in the consumer
18
+ 5. **Quarterly substrate audit** — sanity-check that prior shipping still works end-to-end
19
+
20
+ Skip when: pure bassclef-internal changes (operator narrative, retro chronicles, internal rules that don't propagate to adopters).
21
+
22
+ ## Before you start
23
+
24
+ Pick the smallest consumer repo as the validation target. Smaller surface area means faster failure-mode isolation. Per the operator's consumer registry at `standards/bassclef-source-consumers.json`, smaller is better for first-pass validation.
25
+
26
+ You need:
27
+
28
+ - Local checkout of one consumer repo (e.g., `~/src/<org>/<consumer>/`)
29
+ - `gh` authenticated with read+write access to that consumer
30
+ - Bassclef synced to the consumer's `.bassclef-source.json` per `/onboard-repo` Phase 2.4
31
+ - A scratch feature branch in the consumer (don't validate on main)
32
+
33
+ ## Procedure
34
+
35
+ ### Step 0 — Dispatch from bassclef's full path, not adopter-rooted relative (bassclef#1290)
36
+
37
+ This checklist file lives in bassclef only — it's NOT vendored into adopter repos. Bassclef's `standards/`, `architecture/`, `design/`, `docs/` directories are accessed via the agent's `additionalDirectories` pointing at bassclef's checkout; they aren't synced into adopters' filesystems.
38
+
39
+ If you dispatch this checklist from an adopter repo's shell, use bassclef's full path:
40
+
41
+ ```bash
42
+ # Right
43
+ bash $HOME/src/sunj-labs/bassclef/standards/sibling-validation-checklist.md
44
+ # (or wherever your bassclef checkout lives)
45
+
46
+ # Wrong (file not found — checklist isn't vendored into the adopter)
47
+ bash standards/sibling-validation-checklist.md
48
+ ```
49
+
50
+ The session-start hook (per bassclef#1290) clarifies this in its "Note:" line after the substrate-sync status, so adopters returning to a session see the access-model split before they hit the false "file not found" loop.
51
+
52
+ When the agent (not the shell) needs to read this checklist, the `additionalDirectories` lookup resolves automatically — no full-path dispatch needed. This Step 0 only applies to operator dispatching the checklist from shell.
53
+
54
+ ### Step 1 — Snapshot current state
55
+
56
+ In the consumer repo:
57
+
58
+ ```bash
59
+ cd ~/src/<org>/<consumer>
60
+ git checkout main && git pull
61
+ git checkout -b scratch/bassclef-validation-$(date +%Y-%m-%d)
62
+ ```
63
+
64
+ Record what you're validating against:
65
+
66
+ - Bassclef commit currently in `.bassclef-source.json` `installed_sha` field
67
+ - Date of last bassclef sync (`installed_at`)
68
+ - Which substrate change you're testing
69
+
70
+ ### Step 2 — Force-sync bassclef to latest
71
+
72
+ ```bash
73
+ bash .claude/hooks/bassclef-sync.sh --force
74
+ ```
75
+
76
+ Verify the sync picked up the substrate change you're testing:
77
+
78
+ ```bash
79
+ # For hook changes — verify the hook file is up to date
80
+ diff .claude/hooks/session-reflection.d/<hook>.sh \
81
+ ~/src/<bassclef-checkout>/.claude/hooks/session-reflection.d/<hook>.sh
82
+
83
+ # For bassclef-configs.jsonc changes — verify the new block is present
84
+ grep -A3 "<new-block-name>" .claude/bassclef-configs.jsonc
85
+
86
+ # For template changes — verify the template is present
87
+ ls strategy/templates/<template-name>
88
+ ```
89
+
90
+ ### Step 3 — Wire the consumer's substrate.config.md (if needed)
91
+
92
+ When the substrate change reads new fields from `substrate.config.md`, populate them:
93
+
94
+ ```bash
95
+ # Example for bassclef#1275 orientation hooks parameterization
96
+ grep -E "bassclef_evolution_label|bassclef_evolution_child_repos" substrate.config.md
97
+ # If missing, add:
98
+ echo "bassclef_evolution_label: bassclef-evolution" >> substrate.config.md
99
+ echo "bassclef_evolution_child_repos: <comma-separated-sibling-repos>" >> substrate.config.md
100
+ git add substrate.config.md && git commit -m "test: wire bassclef-evolution scan for sibling-validation"
101
+ ```
102
+
103
+ ### Step 4 — Trigger the substrate behavior
104
+
105
+ For SessionStart hooks, the trigger is opening a new Claude Code session. Simulate by running the hook directly:
106
+
107
+ ```bash
108
+ echo '{}' | bash .claude/hooks/session-reflection.d/<hook>.sh
109
+ ```
110
+
111
+ For session-start-only behavior, exit the current session + start a new one in the consumer repo.
112
+
113
+ For PreToolUse hooks, fire the relevant tool (Edit / Write / Bash / etc.) and verify the hook fires.
114
+
115
+ For workflow templates, push the scratch branch (or use `workflow_dispatch` with `force_full_sync=true` if applicable):
116
+
117
+ ```bash
118
+ git push -u origin scratch/bassclef-validation-$(date +%Y-%m-%d)
119
+ gh workflow run <workflow-name>.yml --ref scratch/bassclef-validation-...
120
+ ```
121
+
122
+ ### Step 5 — Verify expected behavior
123
+
124
+ Per the substrate change's acceptance criteria, verify:
125
+
126
+ - Hook fires when expected (BLOCKED block emits, exit code matches, stderr structure matches `.claude/rules/blocked-items.md`)
127
+ - Hook silent when expected (override path, marker present, etc.)
128
+ - Workflow runs to completion + commits expected output
129
+ - Config block read at runtime + default applied when absent
130
+ - Adopter discipline applies (rule body loads via `additionalDirectories`, agent self-check fires)
131
+
132
+ Record any mismatch — that's a real defect in the substrate that just shipped.
133
+
134
+ ### Step 6 — Tear down
135
+
136
+ ```bash
137
+ # Restore consumer to pre-validation state
138
+ cd ~/src/<org>/<consumer>
139
+ git checkout main
140
+ git branch -D scratch/bassclef-validation-$(date +%Y-%m-%d)
141
+ git push origin --delete scratch/bassclef-validation-$(date +%Y-%m-%d) 2>/dev/null || true
142
+
143
+ # Revert substrate.config.md test edits if they shouldn't persist
144
+ git checkout main -- substrate.config.md # only if test edits weren't merge-worthy
145
+ ```
146
+
147
+ ### Step 7 — Report
148
+
149
+ Outcome:
150
+
151
+ - **✅ Substrate works end-to-end** → comment on the source ticket(s) closing them with "validated on `<consumer-repo>` <date>". No further action.
152
+ - **⚠️ Substrate works partially** → file follow-on ticket naming the gap; consumer-side workaround if needed.
153
+ - **❌ Substrate broken end-to-end** → revert or hotfix the source PR; substrate-defect /promote per `.claude/rules/blocked-items.md` §"When resolution reveals a substrate defect".
154
+
155
+ ## Acceptance criteria for this checklist itself
156
+
157
+ This checklist passes its own acceptance when:
158
+
159
+ - Operator can read it cold and dispatch validation in under 10 minutes
160
+ - Each step has a concrete verification command (no "make sure it works")
161
+ - Three outcomes are explicit (pass / partial / fail)
162
+ - Substrate-defect path cites `blocked-items.md` for mandatory /promote
163
+ - Tear-down is explicit so validation doesn't leave consumer-repo state polluted
164
+
165
+ ## Why this checklist exists
166
+
167
+ Bet 2026-06-20b shipped two adopter-inheritance changes (orientation gates fire for adopters per bassclef#1275 + wiki-sync adopter mechanism per bassclef#1265) with bassclef-side Tier 0 tests passing — but no end-to-end consumer validation ran. Substrate that hasn't been verified on a real consumer is substrate that ships on faith.
168
+
169
+ This checklist is the operator-runnable depth-verification path. Future cold-adopter shipping bets can dispatch the checklist for end-to-end confirmation without re-deriving the steps each time.
170
+
171
+ ## Refs
172
+
173
+ - `standards/bassclef-source-consumers.json` — registry of sibling repos (pick smallest for first validation)
174
+ - `.claude/rules/blocked-items.md` — BLOCKED protocol if validation surfaces a defect
175
+ - `.claude/rules/bassclef-models-discovery.md` — how consumer agents find bassclef's models
176
+ - `.claude/skills/onboard-repo/SKILL.md` — Phase 2.x reads substrate.config.md fields
177
+ - `.claude/hooks/bassclef-sync.sh` — the sync entry-point consumer hooks invoke
178
+ - bassclef#1275 — first substrate change this checklist will retroactively validate
179
+ - bassclef#1265 — second substrate change this checklist will retroactively validate
180
+ - bassclef#1134 — Bassclef-as-Platform umbrella (the discipline this checklist supports)
181
+ - Bet `docs/iteration-bets/2026-06-20c-validate-and-finish-arc.md` — this checklist's filing bet