@thebassclef/lite 0.1.0 → 0.1.3

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 (163) hide show
  1. package/dist/cli.cjs +40 -6
  2. package/dist/cli.js +40 -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/package.json +1 -1
  7. package/substrate/.bassclef/lite-manifest.json +999 -92
  8. package/substrate/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
  9. package/substrate/.claude/hooks/longrun-prep-compounding-sequence-check.sh +492 -0
  10. package/substrate/.claude/hooks/pre-commit-gate.sh +1 -2
  11. package/substrate/.claude/hooks/turn-prose-kiss-check.sh +30 -1
  12. package/substrate/.claude/luminaries/glenford-myers.md +230 -0
  13. package/substrate/.claude/luminaries/hunt-thomas.md +115 -0
  14. package/substrate/.claude/luminaries/hyrum-wright.md +94 -0
  15. package/substrate/.claude/luminaries/michael-feathers.md +2 -2
  16. package/substrate/.claude/luminaries/tony-hoare.md +170 -0
  17. package/substrate/.claude/luminaries/vaughn-vernon.md +50 -0
  18. package/substrate/.claude/luminaries/w-edwards-deming.md +158 -0
  19. package/substrate/.claude/rules/accessor-library-discipline.md +138 -0
  20. package/substrate/.claude/rules/adr-discipline.md +120 -0
  21. package/substrate/.claude/rules/api-conventions.md +125 -0
  22. package/substrate/.claude/rules/bootstrap-pair-discipline.md +141 -0
  23. package/substrate/.claude/rules/cold-adopter-harness-discipline.md +129 -0
  24. package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +188 -0
  25. package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +188 -0
  26. package/substrate/.claude/rules/defensive-bash.md +68 -0
  27. package/substrate/.claude/rules/deferred-actions.md +233 -0
  28. package/substrate/.claude/rules/github-issue-flash-tweet.md +156 -0
  29. package/substrate/.claude/rules/hook-wire-on-author.md +103 -0
  30. package/substrate/.claude/rules/iteration-bet-brief-completeness.md +54 -0
  31. package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +3 -3
  32. package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +89 -0
  33. package/substrate/.claude/rules/loop-discipline.md +81 -0
  34. package/substrate/.claude/rules/manual-prod-approval.md +100 -0
  35. package/substrate/.claude/rules/marker-enrichment-discipline.md +99 -0
  36. package/substrate/.claude/rules/mobile-ephemeral-session.md +109 -0
  37. package/substrate/.claude/rules/new-dependency-check.md +51 -0
  38. package/substrate/.claude/rules/option-label-discipline.md +108 -0
  39. package/substrate/.claude/rules/pattern-annotation.md +100 -0
  40. package/substrate/.claude/rules/plain-english-discipline.md +11 -9
  41. package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +211 -0
  42. package/substrate/.claude/rules/pr-title-shape.md +161 -0
  43. package/substrate/.claude/rules/prototype-workflow.md +65 -0
  44. package/substrate/.claude/rules/reserved-skill-names.md +123 -0
  45. package/substrate/.claude/rules/schema-management.md +49 -0
  46. package/substrate/.claude/rules/security.md +37 -0
  47. package/substrate/.claude/rules/skill-composition-declarations.md +124 -0
  48. package/substrate/.claude/rules/skill-description-clarity.md +247 -0
  49. package/substrate/.claude/rules/skill-procedure-step-list.md +137 -0
  50. package/substrate/.claude/rules/stuck-signal-diagnostic.md +140 -0
  51. package/substrate/.claude/rules/substrate-config-schema.md +98 -0
  52. package/substrate/.claude/rules/test-list-discipline.md +175 -0
  53. package/substrate/.claude/rules/test-sufficiency.md +210 -0
  54. package/substrate/.claude/rules/testing-tier-config.md +145 -0
  55. package/substrate/.claude/rules/testing.md +38 -0
  56. package/substrate/.claude/rules/turn-estimate-grounding.md +134 -0
  57. package/substrate/.claude/rules/visual-hierarchy.md +437 -0
  58. package/substrate/.claude/rules/we-dont-break-adopters.md +126 -0
  59. package/substrate/.claude/rules/wu-sequencing-compounds.md +145 -0
  60. package/substrate/.claude/skills/build/SKILL.md +1 -1
  61. package/substrate/.claude/skills/chronicle/SKILL.md +55 -0
  62. package/substrate/.claude/skills/clean-artifacts/SKILL.md +249 -0
  63. package/substrate/.claude/skills/decompose/SKILL.md +1 -1
  64. package/substrate/.claude/skills/diagnose/SKILL.md +1 -1
  65. package/substrate/.claude/skills/feynman/SKILL.md +90 -0
  66. package/substrate/.claude/skills/howdoi/SKILL.md +1 -1
  67. package/substrate/.claude/skills/ia-model/SKILL.md +1 -1
  68. package/substrate/.claude/skills/interaction-design/SKILL.md +1 -1
  69. package/substrate/.claude/skills/interpret-input/SKILL.md +8 -8
  70. package/substrate/.claude/skills/journal/SKILL.md +209 -0
  71. package/substrate/.claude/skills/kiss/SKILL.md +1 -1
  72. package/substrate/.claude/skills/launch/SKILL.md +14 -23
  73. package/substrate/.claude/skills/lean-canvas/SKILL.md +1 -1
  74. package/substrate/.claude/skills/longrun/SKILL.md +45 -8
  75. package/substrate/.claude/skills/luminary/SKILL.md +1 -1
  76. package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +1 -1
  77. package/substrate/.claude/skills/onboard-repo/SKILL.md +143 -709
  78. package/substrate/.claude/skills/pattern-review/SKILL.md +1 -1
  79. package/substrate/.claude/skills/personas/SKILL.md +5 -5
  80. package/substrate/.claude/skills/promote/SKILL.md +1 -1
  81. package/substrate/.claude/skills/requirement/SKILL.md +1 -1
  82. package/substrate/.claude/skills/retro/SKILL.md +1 -1
  83. package/substrate/.claude/skills/riff/SKILL.md +1 -1
  84. package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +1 -1
  85. package/substrate/.claude/skills/session-end/SKILL.md +1 -1
  86. package/substrate/.claude/skills/session-log/SKILL.md +3 -3
  87. package/substrate/.claude/skills/skills/SKILL.md +1 -1
  88. package/substrate/.claude/skills/spec/SKILL.md +1 -1
  89. package/substrate/.claude/skills/sprint/SKILL.md +1 -1
  90. package/substrate/.claude/skills/stage/SKILL.md +1 -1
  91. package/substrate/.claude/skills/state-a-problem/SKILL.md +1 -1
  92. package/substrate/.claude/skills/temperance/SKILL.md +1 -1
  93. package/substrate/.claude/skills/use-case/SKILL.md +1 -1
  94. package/substrate/.claude/skills/user-stories/SKILL.md +1 -1
  95. package/substrate/.claude/skills/value-prop/SKILL.md +1 -1
  96. package/substrate/.claude/skills/verify/SKILL.md +1 -1
  97. package/substrate/.claude/skills/visual-review/SKILL.md +503 -0
  98. package/substrate/.claude/skills/whats-the-plan/SKILL.md +202 -0
  99. package/substrate/.claude/skills/whereami/SKILL.md +2 -2
  100. package/substrate/CONTRIBUTING.md +1 -1
  101. package/substrate/README.md +5 -5
  102. package/substrate/lib/prose-scan-boundary.sh +171 -0
  103. package/substrate/lib/tier-check.sh +50 -1
  104. package/substrate/lib/tier-dependency-audit.sh +159 -4
  105. package/substrate/presence/install/bassclef-sync.template.sh +1 -1
  106. package/substrate/scripts/generate-lite-manifest.sh +21 -5
  107. package/substrate/standards/adr-template.md +86 -0
  108. package/substrate/standards/api-conventions/nextjs.md +84 -0
  109. package/substrate/standards/artifact-composition.md +209 -0
  110. package/substrate/standards/bash-hook-safety.md +246 -0
  111. package/substrate/standards/branch-stacking.md +408 -0
  112. package/substrate/standards/code-safety-principles.md +176 -0
  113. package/substrate/standards/composer-prerequisites.md +155 -0
  114. package/substrate/standards/dependency-discipline/cargo.md +39 -0
  115. package/substrate/standards/dependency-discipline/gem.md +43 -0
  116. package/substrate/standards/dependency-discipline/go-mod.md +41 -0
  117. package/substrate/standards/dependency-discipline/npm.md +42 -0
  118. package/substrate/standards/dependency-discipline/pip.md +42 -0
  119. package/substrate/standards/deployment-topology/ec2-tailscale.md +225 -0
  120. package/substrate/standards/deployment-topology.md +69 -0
  121. package/substrate/standards/docs-sync-allowlist.md +4 -4
  122. package/substrate/standards/domain-and-dns.md +145 -0
  123. package/substrate/standards/frontend-stack.md +67 -0
  124. package/substrate/standards/frontmatter-schema.md +154 -0
  125. package/substrate/standards/hook-injection-discipline.md +202 -0
  126. package/substrate/standards/hook-install-class.md +215 -0
  127. package/substrate/standards/input-handler-interface.md +152 -0
  128. package/substrate/standards/lite-manifest-schema-changes.md +60 -0
  129. package/substrate/standards/luminary-matching.md +105 -0
  130. package/substrate/standards/migration-discipline/active-record.md +50 -0
  131. package/substrate/standards/migration-discipline/alembic.md +43 -0
  132. package/substrate/standards/migration-discipline/gorm.md +50 -0
  133. package/substrate/standards/migration-discipline/prisma.md +53 -0
  134. package/substrate/standards/migration-discipline/sqlalchemy.md +51 -0
  135. package/substrate/standards/mobile-ephemeral-session.md +167 -0
  136. package/substrate/standards/model-routing-discipline.md +160 -0
  137. package/substrate/standards/persona-schema.md +229 -0
  138. package/substrate/standards/pluggable-luminaries.md +323 -0
  139. package/substrate/standards/pr-body-discipline.md +115 -0
  140. package/substrate/standards/preview-state-schema.md +189 -0
  141. package/substrate/standards/reserved-skill-names.md +120 -0
  142. package/substrate/standards/scannable-multi-option-output.md +261 -0
  143. package/substrate/standards/sdlc-gates/typescript.md +57 -0
  144. package/substrate/standards/session-board.md +256 -0
  145. package/substrate/standards/state-spine-contract.md +255 -0
  146. package/substrate/standards/steering-hints/kiss-words.md +11 -0
  147. package/substrate/standards/substrate-config-schema.md +267 -0
  148. package/substrate/standards/tier-dependency-analysis.md +1 -1
  149. package/substrate/standards/tier-tag-schema.md +1 -1
  150. package/substrate/standards/two-layer-config.md +99 -0
  151. package/substrate/standards/use-case-format.md +292 -0
  152. package/substrate/standards/user-story-invest.md +268 -0
  153. package/substrate/standards/velocity-and-appetite.md +229 -0
  154. package/substrate/standards/voice-input-pattern.md +119 -0
  155. package/substrate/standards/worktree-management.md +211 -0
  156. package/substrate/templates/chronicle-template.md +75 -0
  157. package/substrate/templates/memory-proposal-template.md +77 -0
  158. package/substrate/templates/persona-template.md +200 -0
  159. package/substrate/templates/pr-faq.md +45 -0
  160. package/substrate/templates/secret-rotation-template.md +162 -0
  161. package/substrate/templates/spec-template.md +131 -0
  162. package/substrate/templates/use-case-template.md +194 -0
  163. package/substrate/templates/user-story-template.md +107 -0
@@ -0,0 +1,161 @@
1
+ ---
2
+ tier: lite
3
+ description: Sister rule to pr-body-shape.md. Encodes authoring-time discipline for the PR title surface. Titles show in gh pr list, GitHub search, and mobile views — they are the…
4
+ ---
5
+
6
+ # PR Title Shape Contract
7
+
8
+ Sister rule to `pr-body-shape.md`. Encodes authoring-time discipline for the PR title surface. Titles show in `gh pr list`, GitHub search, and mobile views — they are the highest-visibility surface in the PR-authoring stack.
9
+
10
+ ## Why this rule exists
11
+
12
+ The `pre-gh-pr-title-scrub.sh` hook catches BLOCK terms in titles per `standards/bassclef-internal-jargon.md`. It does not catch:
13
+
14
+ - Length over 72 chars (mobile views truncate)
15
+ - Multiple concepts stacked with `+` or `—`
16
+ - `(WU-N of bet YYYY-MM-DDx)` suffix bloat
17
+ - Process narration (`/longrun pre-flight`, `/session-end for X`)
18
+ - Bassclef-internal compound verbs/nouns (`Pattern-B mv`, `review-file pass`, `registry shape`)
19
+ - Ticket-ref bloat with verbose body
20
+ - Conventional-commit prefix mismatch (`chore` for substantive features)
21
+ - Uncommon hyphenated prose compounds in titles
22
+ - Repeating literal filenames across title + body
23
+ - Inconsistent `skillname` vs `/skillname` references
24
+
25
+ This rule is the methodology that covers the gap. The wordlist hook is the FLOOR; this catalog is the BAR. Apply the catalog at authoring time rather than relying on the hook to catch what slipped past you.
26
+
27
+ The catalog was drafted from PR-authoring failures observed 2026-06-19. See bassclef#1241 for the source incidents.
28
+
29
+ ## When this rule fires
30
+
31
+ Any time a PR title is being written via:
32
+
33
+ - `gh pr create --title ...`
34
+ - `gh pr edit <N> --title ...`
35
+ - Direct REST `curl POST /repos/<o>/<r>/pulls` with a `title` field
36
+ - GitHub web UI (manual operator authoring)
37
+
38
+ ## Format contract
39
+
40
+ Every PR title is:
41
+
42
+ - **≤72 characters** (mobile views truncate; squash-merge commit messages prefer short)
43
+ - **One conventional-commit prefix** per `commit-conventions.md` — `feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `ci:`, `chore:`, `security:`
44
+ - **One primary change** — sub-concepts go in the body Summary, not the title
45
+ - **Bet/WU reference** as `(WU-N)` only when present; bet ref belongs in body Refs
46
+
47
+ Recommended shape: `<type>(<scope>): <verb> <object> (<optional WU-N>)`
48
+
49
+ Examples (all ≤72 chars):
50
+
51
+ - `feat(#1241): document the pseudonym registry file (WU-4)`
52
+ - `fix(bassclef#1125): jq+set -e fail-soft fix in 2 hooks (WU-8)`
53
+ - `chore: update whereami; close bet 2026-06-19b (WU-5)`
54
+
55
+ ## DON'T / INSTEAD catalog
56
+
57
+ ### Length and structure
58
+
59
+ | Don't | INSTEAD |
60
+ |---|---|
61
+ | Exceed 72 chars (mobile truncates; squash commit messages prefer short) | Keep under 72; cut to one concept |
62
+ | Stack multiple concepts with `+` or `—` (`carry-forward + housekeeping + roadmap-reconcile`) | Name the ONE primary change; sub-concepts go in body Summary |
63
+ | `(WU-N of bet YYYY-MM-DDx)` suffix bloat | Either drop entirely or `(WU-N)` alone — bet ref belongs in body Refs |
64
+ | Ticket-ref bloat with verbose body (`chore(bassclef#1031): document operator-private-pseudonyms.json registry shape`) | Either prefix `(#NNNN)` OR a full descriptive body — not both |
65
+
66
+ ### Conventional-commit prefix
67
+
68
+ | Don't | INSTEAD |
69
+ |---|---|
70
+ | Conventional-commit prefix mismatch (`chore` for substantive features) | Match prefix to actual change type per `commit-conventions.md` |
71
+ | Invent bassclef-internal prefixes (`substrate-defect:`, `bet:`, `closeout:` outside of `chore(closeout)`) | Use the 8 standard types only; substrate bugs are `fix:` |
72
+ | Process narration as title (`/longrun pre-flight`, `/session-end for X`) | Name the artifact change (`prep goal doc`, `update whereami`) |
73
+
74
+ ### Plain English
75
+
76
+ | Don't | INSTEAD |
77
+ |---|---|
78
+ | Bassclef-internal compound verbs/nouns (`Pattern-B mv`, `review-file pass`, `registry shape`) | Plain verb + object (`move`, `run`, `document the file schema`) |
79
+ | Uncommon hyphenated prose compounds (`carry-forward`, `pre-flight` as title prose) | Plain words (`continued`, `prep`); literal filenames + CLI flags + script names preserve as code identifiers |
80
+ | Buzz adjectives in titles (`substantive`, `comprehensive`, `robust`) | Concrete verb + concrete object |
81
+ | Bassclef-internal verbs (`flip`, `Pattern-B'd`, `seed` as noun) | Plain verbs (`update`, `move`, `set up`) |
82
+
83
+ ### Cross-surface consistency
84
+
85
+ | Don't | INSTEAD |
86
+ |---|---|
87
+ | Repeat literal filenames in both title and body Summary | Plain title; filenames in body where they're grep-anchored to the actual change |
88
+ | Mix `skillname` and `/skillname` for the same skill across titles | Use `/skillname` consistently when referencing the skill; plain filename when referencing the file (e.g., `docs/whereami.md`) |
89
+
90
+ ## Worked examples
91
+
92
+ ### Anti-pattern — multi-concept + bet-ref bloat + bassclef-internal compound
93
+
94
+ ```
95
+ chore(bet): /longrun 2026-06-19b pre-flight — carry-forward + housekeeping + roadmap-reconcile (WU-0 of bet 2026-06-19b)
96
+ ```
97
+
98
+ 100 chars. Three stacked concepts. Process narration. Bet ref bloat. Bassclef-internal compound `carry-forward`.
99
+
100
+ ### Conformant pattern
101
+
102
+ ```
103
+ chore(bet): prep 2026-06-19b /longrun continued (WU-0)
104
+ ```
105
+
106
+ 53 chars. One primary change. Plain English. `/longrun` slashed consistently. Bet ref dropped from title (lives in body).
107
+
108
+ ### Anti-pattern — buzz adjective + invented compound + filename duplication
109
+
110
+ ```
111
+ chore(bassclef#1031): document operator-private-pseudonyms.json registry shape (WU-4 of bet 2026-06-19b)
112
+ ```
113
+
114
+ 104 chars. Invented compound `registry shape`. Filename appears in title AND body Summary.
115
+
116
+ ### Conformant pattern
117
+
118
+ ```
119
+ chore(#1031): document the pseudonym registry file (WU-4)
120
+ ```
121
+
122
+ 57 chars. Plain English. Filename moved to body (where the diff is grep-anchored).
123
+
124
+ ## Mechanical enforcement
125
+
126
+ Wordlist BLOCK terms are caught by `pre-gh-pr-title-scrub.sh` at write time. This rule covers everything else as methodology. Hook extension to catch the additional catalog rows is sibling work tracked at bassclef#1241.
127
+
128
+ ## Override path
129
+
130
+ `SKIP_PR_TITLE_SHAPE=1 <command>` — logged via trace-helper. Use rarely:
131
+
132
+ - Quoting an exact phrase from a memory file or external doc that requires verbatim retention
133
+ - One-off automated dispatch where the title is generated by a third-party tool
134
+
135
+ ## Composes with
136
+
137
+ - `.claude/rules/pr-body-shape.md` — sister rule at the body surface
138
+ - `.claude/rules/commit-conventions.md` — conventional-commit format
139
+ - `.claude/rules/plain-english-discipline.md` — master plain-English rule
140
+ - `.claude/rules/operator-facing-prose.md` — gloss + /kiss meta-discipline
141
+ - `.claude/rules/context-engineering.md` — INSTEAD-block discipline (foundational)
142
+ - `standards/bassclef-internal-jargon.md` — wordlist driving BLOCK substitutions
143
+ - `.claude/hooks/pre-gh-pr-title-scrub.sh` — mechanical floor
144
+
145
+ ## Distinct from
146
+
147
+ - `commit-conventions.md` — commit message FORMAT (type + scope + body); this rule applies to PR TITLES (which become squash-commit subjects)
148
+ - `pr-body-shape.md` — body section structure + DON'T/INSTEAD catalog for each section
149
+ - `pattern-annotation.md` — source code annotation; orthogonal
150
+
151
+ ## Refs
152
+
153
+ - bassclef#1241 — `/pr-title` + `/pr-body` skill spec (this rule is the methodology side)
154
+ - bassclef#1239 — pre-gh-*-scrub matcher extension for curl REST fallback (related substrate-defect)
155
+ - bassclef#1178 — Problem-section shape (rule for the body opener)
156
+ - bassclef#1217 — pre-gh-pr-title-scrub hook (the mechanical floor)
157
+ - bassclef#915 — phrase-shaped advisory perimeter
158
+
159
+ ## Retirement condition
160
+
161
+ If observed across 6 months with title-shape drift consistently below 10% on sampled feature-scope PRs, the rule is correctly calibrated. If drift exceeds 25%, escalate the hook to enforce the catalog rows mechanically. The catalog rows ship without an a-priori retirement condition — they encode discipline that survives any future skill or hook build.
@@ -0,0 +1,65 @@
1
+ ---
2
+ tier: lite
3
+ description: "Design prototypes (artifacts under docs/prototypes/**) are visual statements to Reviewer (\"this is what we want built\")."
4
+ ---
5
+
6
+ # Prototype Workflow — Visual Confirm Before Commit
7
+
8
+ Design prototypes (artifacts under `docs/prototypes/**`) are visual
9
+ statements to Reviewer ("this is what we want built"). They MUST NOT
10
+ enter git history until the operator has confirmed the rendered output.
11
+
12
+ ## Protocol for prototype edits
13
+
14
+ When modifying a file under `docs/prototypes/**/*.{html,css,tsx,jsx}`:
15
+
16
+ 1. **Render** — open the prototype locally (dev server, Playwright MCP, or direct file)
17
+ 2. **Screenshot** — save to `.playwright-mcp/prototype-render-<branch>.png` or equivalent
18
+ 3. **Share with operator** — show rendered output, wait for explicit confirmation
19
+ 4. **Then commit** — only after confirmation
20
+
21
+ Committing first and sharing after inverts the gate: git history now
22
+ holds unapproved state, and any revert has to serve only as a rule-
23
+ violation record.
24
+
25
+ ## Distinction from production-UI visual review
26
+
27
+ - **Production UI** (per usability rule #7): Reviewer diffs built surface
28
+ against prototype before merge
29
+ - **Prototype edits** (this rule): agent confirms rendered prototype
30
+ against operator intent before commit
31
+
32
+ The two gates are complementary. Production gate catches drift from
33
+ prototype; this gate catches drift from operator intent.
34
+
35
+ ## When this rule does NOT fire
36
+
37
+ - Non-visual edits to prototype directory (README, notes, data fixtures)
38
+ - Branch explicitly scoped to "prototype cleanup / lint / formatting"
39
+ with no visual change (agent must assert no-visual-change)
40
+
41
+ ## Why this rule exists
42
+
43
+ 2026-04-13 incident: agent modified conversational Review Queue
44
+ prototype v5, committed, pushed, reported success — all before showing
45
+ operator the rendered output. Operator reviewed, rejected. Commit +
46
+ revert pair now serves only to satisfy the rule that was violated.
47
+
48
+ The existing `/verify` "UI component / page" gate runs `/visual-review`
49
+ for production UI. Prototypes fell in a gap: not production (so gate
50
+ doesn't fire) but visual artifacts whose whole purpose is operator
51
+ review. This rule closes the gap.
52
+
53
+ ## Relationship to other rules
54
+
55
+ - `usability.md` #7 — production UI visual review; this rule's upstream
56
+ - `design-direction.md` — prototype approvals are load-bearing once
57
+ given; this rule governs HOW to get them
58
+ - `sdlc-gates.md` — post-build gates; prototype confirmation is a
59
+ pre-commit gate
60
+
61
+ ## Enforcement
62
+
63
+ Methodology-level today. Future mechanical backstop (proposed): pre-commit
64
+ hook checks paths matching `docs/prototypes/**/*.{html,css}` and requires
65
+ a render artifact newer than the edit plus an operator-confirmation marker.
@@ -0,0 +1,123 @@
1
+ ---
2
+ tier: lite
3
+ description: "Bassclef MUST NOT create a skill (.claude/skills/<name>/SKILL.md) with a name Claude Code's harness already claims."
4
+ ---
5
+
6
+ # Reserved Skill Names
7
+
8
+ Bassclef MUST NOT create a skill (`.claude/skills/<name>/SKILL.md`)
9
+ with a name Claude Code's harness already claims. Collisions are
10
+ silent and behavioral: operator types `/<name>` expecting bassclef's
11
+ skill; harness resolves the built-in first and returns something else.
12
+
13
+ The authoritative list lives in `standards/reserved-skill-names.md`.
14
+ This file is the **rule** — semantics, enforcement, override path.
15
+
16
+ ## Why this rule exists
17
+
18
+ 2026-04-18 during fix-workflow family shaping: bet originally proposed
19
+ `/investigate` as the postmortem composer. Check of Claude Code's `FEY`
20
+ array revealed `investigate` is a harness built-in (remote investigation
21
+ workflow). Naming the bassclef skill `/investigate` would have meant
22
+ every `/investigate` invocation resolved to the harness, not bassclef —
23
+ the skill would have been unreachable via its own name.
24
+
25
+ Renamed to `/incident-report`. Filed this rule to prevent future
26
+ collisions reaching PR stage.
27
+
28
+ ## When this rule fires
29
+
30
+ On any commit (or PR) that stages a new `.claude/skills/<name>/SKILL.md`
31
+ where `<name>` appears in the `standards/reserved-skill-names.md` list.
32
+
33
+ Does NOT fire on:
34
+ - Edits to existing skill files (only NEW skill directories)
35
+ - Files outside `.claude/skills/`
36
+ - Skills whose name includes a prefix/suffix avoiding collision
37
+ (e.g., `/docs-generator`, `/review-pr`)
38
+
39
+ ## Enforcement
40
+
41
+ ### Mechanical — pre-commit hook
42
+
43
+ `.claude/hooks/pre-commit-gate.sh` checks staged skill directories
44
+ against the reserved list. On collision, emits:
45
+
46
+ ```
47
+ BLOCKED: reserved skill name — `<name>` collides with a Claude Code
48
+ built-in. See standards/reserved-skill-names.md. Rename or override
49
+ with SKIP_RESERVED_NAMES=1.
50
+ ```
51
+
52
+ Blocks the commit. Per `blocked-items.md`, the block must be resolved
53
+ (rename) or explicitly deferred (override with rationale) — silence
54
+ is not deferral.
55
+
56
+ ### Methodology — agent self-check
57
+
58
+ When drafting a new skill, the agent MUST:
59
+
60
+ 1. Read `standards/reserved-skill-names.md` before proposing a skill name
61
+ 2. If the proposed name matches, either:
62
+ - Pick a different name
63
+ - Justify the override (see Override path below)
64
+ 3. Cite the check in the PR body ("Reserved-names check: [name] — no
65
+ collision" or "collision — override justified by X")
66
+
67
+ The "Sources read" block per `artifact-ingestion.md` covers this
68
+ citation automatically when a new-skill PR references the standards list.
69
+
70
+ ## Override path
71
+
72
+ Rare case — bassclef wants to deliberately shadow a harness built-in:
73
+
74
+ 1. Add a note to the skill's SKILL.md frontmatter:
75
+ `reserved_name_override: "<name> — rationale"`
76
+ 2. Commit with `SKIP_RESERVED_NAMES=1 git commit ...`
77
+ 3. Call out the override in the PR body
78
+
79
+ The override exists because rules should be judgeable. But the friction
80
+ is deliberately high — bypassing the hook requires conscious intent.
81
+
82
+ ## What counts as a "collision"
83
+
84
+ Exact string match, case-insensitive, against the `Name` column of
85
+ `standards/reserved-skill-names.md`. The skill directory name (not the
86
+ slash-command alias, not the frontmatter `name:` field) is what the
87
+ harness resolves; the directory name is what the hook checks.
88
+
89
+ Prefixes and suffixes break collision:
90
+
91
+ | Reserved | Bassclef skill | Collides? |
92
+ |----------|----------------|-----------|
93
+ | `docs` | `docs-generator` | No |
94
+ | `docs` | `docs` | **Yes** |
95
+ | `init` | `init-repo` | No |
96
+ | `review` | `review` | **Yes** |
97
+ | `review` | `pr-review` | No |
98
+
99
+ ## How the list gets updated
100
+
101
+ Process lives in `standards/reserved-skill-names.md` ("Updating this
102
+ list" section). Key constraint: if the list addition would collide
103
+ with an existing bassclef skill, that skill MUST be renamed before
104
+ the list addition merges. No silent shadow.
105
+
106
+ ## Relationship to other rules
107
+
108
+ - `blocked-items.md` — the hook emits `BLOCKED: reserved skill name`;
109
+ this rule's semantics slot into the blocked-items protocol
110
+ - `artifact-ingestion.md` — new-skill PRs read the standards list;
111
+ "Sources read" block cites it
112
+ - `commit-conventions.md` — override commits include `SKIP_RESERVED_NAMES=1`;
113
+ rationale in body
114
+ - `sdlc-gates.md` — collision check fires at pre-commit, before
115
+ bassclef-evolution check
116
+
117
+ ## Retirement condition
118
+
119
+ If Claude Code ships a machine-readable API for the built-in registry
120
+ (e.g., `claude --list-builtins --json`), this rule's mechanical
121
+ enforcement can migrate to a dynamic check. The methodology-level
122
+ rule (agent self-check) stays regardless — it's the first line of
123
+ defense.
@@ -0,0 +1,49 @@
1
+ ---
2
+ tier: lite
3
+ globs: ["prisma/**", "**/schema.prisma", "**/migration*", "alembic/**", "db/migrate/**", "migrations/**", "**/migrations/**"]
4
+ description: Schema management — never apply schema changes without a migration; loads per-ORM sibling
5
+ ---
6
+
7
+ # Schema Management
8
+
9
+ Universal principle: **never apply schema changes without a migration file**. Schema drift between local and prod is a load-bearing failure mode for every ORM. When local is reset (rebuild, fresh clone, CI runner spin-up), unmigrated changes vanish silently and prod diverges from local. The failure surfaces hours or days later as a runtime crash with no obvious cause.
10
+
11
+ The discipline holds across ORMs; the specifics differ. Bassclef's loader reads `tech_stack.orm:` from `.claude/bassclef-configs.jsonc` and loads the matching sibling under `standards/migration-discipline/` for ORM-specific guidance.
12
+
13
+ ## Universal commitments (every ORM)
14
+
15
+ 1. **Never use auto-apply / push tools** that bypass migration files (Prisma `db push`, GORM `AutoMigrate` in production, Django `--fake`, etc.). They feel fast but ship drift.
16
+ 2. **Always create a migration file** when changing the schema. The migration is the audit trail; missing migration = missing audit.
17
+ 3. **Commit the migration with the schema change.** Splitting them across commits is how reviewers miss the migration entirely.
18
+ 4. **Run migrate-deploy in CI**, not `dev` / autogen. Production migrations are explicit, reviewed, and reversible.
19
+ 5. **After merging a schema change**, regenerate the client / model bindings + restart the dev process. Cached clients don't know about new fields.
20
+ 6. **Migration files are immutable once shipped**. Editing a merged migration corrupts history for every other developer.
21
+
22
+ ## Per-ORM siblings
23
+
24
+ | Adopter's `tech_stack.orm` | Sibling loaded |
25
+ |---|---|
26
+ | `prisma` | `standards/migration-discipline/prisma.md` |
27
+ | `sqlalchemy` | `standards/migration-discipline/sqlalchemy.md` (Alembic via SQLAlchemy autogen) |
28
+ | `alembic` | `standards/migration-discipline/alembic.md` (standalone Alembic, non-SQLAlchemy) |
29
+ | `gorm` | `standards/migration-discipline/gorm.md` |
30
+ | `active-record` | `standards/migration-discipline/active-record.md` (Rails migrations) |
31
+ | `drizzle` | `standards/migration-discipline/drizzle.md` *(future — file `/promote` to author)* |
32
+ | `none` or unset | Universal commitments only |
33
+
34
+ When the matching sibling does not exist, the rule fires the universal commitments only and surfaces a `/promote` candidate for the missing sibling.
35
+
36
+ ## Session-start drift check
37
+
38
+ Each ORM's sibling describes its drift-detection mechanism. The session-start hook reads the adopter's `tech_stack.orm:` and runs the matching check. If drift is detected, the agent creates the missing migration before writing any code.
39
+
40
+ ## Tech stack vocabulary
41
+
42
+ The loader reads `tech_stack.orm` shipped in bassclef#1127 (WU-2 of bet 2026-06-18a). Adopters set the value at `/onboard-repo` Phase 2.x. When `tech_stack:` block is absent, the universal commitments still apply; ORM-specific guidance is skipped until the operator declares the stack.
43
+
44
+ ## Refs
45
+
46
+ - Path A pattern from bassclef#1133 (ARCH-T0 stack-leakage audit).
47
+ - WU-5 of bet `docs/iteration-bets/2026-06-18a-public-adopter-leverage-longrun.md` ships this catalog split. Subsumes bassclef#1150 (T18 migration-discipline) — that ticket's scope lands here.
48
+ - Sister Path A: bassclef#1133 WU-10 (new-dependency-check → dependency-discipline catalog, same shape).
49
+ - Reads from bassclef#1127 (tech_stack vocabulary).
@@ -0,0 +1,37 @@
1
+ ---
2
+ tier: lite
3
+ globs: ["**/*.ts", "**/*.tsx", "**/*.json", ".env*", "Dockerfile*", "docker-compose*"]
4
+ description: Security scanning — loads when touching source, config, or infra files
5
+ ---
6
+
7
+ Three-layer security pipeline. All block merge on failure.
8
+
9
+ Pipeline order: push → secret scan → lint → typecheck → SAST → dependency audit → test → build → deploy
10
+
11
+ Layer 1 — Secret Detection (gitleaks):
12
+ Pre-commit hook + CI. Catches API keys, OAuth tokens, AWS creds, private keys.
13
+ Never commit .env files, credentials, or API keys.
14
+
15
+ Layer 2 — Dependency Vulnerabilities (npm audit):
16
+ CI blocks on high-severity CVEs. Uses audit-ci for strict enforcement.
17
+
18
+ Layer 3 — SAST (ESLint security plugins + TypeScript compiler):
19
+ eslint-plugin-security, @typescript-eslint, eslint-plugin-no-secrets.
20
+ Optional: Semgrep for deeper analysis as complexity grows.
21
+
22
+ Rules:
23
+ - No secrets in code or logs — use environment variables
24
+ - Validate all user input at system boundaries
25
+ - Use parameterized queries (Prisma handles this)
26
+ - OWASP top 10 awareness: XSS, injection, broken auth, SSRF
27
+
28
+ Auth matrix (define per project):
29
+ - List every route and its required auth level
30
+ - Protected routes must check session/token
31
+ - Public routes must be explicitly marked as intentionally public
32
+ - API routes that modify data require auth — no exceptions
33
+
34
+ Tenant isolation (if multi-tenant):
35
+ - Every query on tenant-scoped models must include tenant context
36
+ - No hardcoded tenant IDs, financial thresholds, or tenant-specific logic
37
+ - Tenant context resolved at middleware/boundary, passed through
@@ -0,0 +1,124 @@
1
+ ---
2
+ tier: lite
3
+ description: How and when skills declare composes_with (extends another skill) vs depends_on (needs a runtime predecessor) in frontmatter. Closes bassclef#862 Gap 3.
4
+ ---
5
+
6
+ # Skill composition declarations — `composes_with:` and `depends_on:`
7
+
8
+ Two frontmatter fields make skill relationships explicit and machine-checkable. `composes_with:` names skills the current skill builds on. `depends_on:` names what must exist at runtime before the skill can usefully run.
9
+
10
+ The substrate-clarity-gate hook reads both fields and catches typos by checking that named targets actually exist on disk. `composes_with:` is strict — a missing target blocks the write. `depends_on:` is advisory in V1.
11
+
12
+ ## When this rule fires
13
+
14
+ When authoring or editing a skill frontmatter and you need to express:
15
+
16
+ - "This skill chains with skill X" → `composes_with:`
17
+ - "This skill needs Y to exist or be set first" → `depends_on:`
18
+
19
+ Either field is optional. Skills that stand alone need neither.
20
+
21
+ ## `composes_with:` — extends another skill's behavior
22
+
23
+ Use when the current skill builds on another skill's output, runs another skill as a step, or extends another skill's discipline.
24
+
25
+ Format:
26
+
27
+ ```yaml
28
+ composes_with: [kiss, value-prop]
29
+ ```
30
+
31
+ Each name must match a `.claude/skills/<name>/SKILL.md` file. The hook BLOCKs the write when a name does not resolve.
32
+
33
+ Examples that qualify:
34
+
35
+ - `/longrun` composes_with `[temperance, retro, promote, session-end]` — runs these skills at lifecycle points
36
+ - `/launch` composes_with `[interpret-input, stage, spec, use-case]` — chains the buildable-plan pipeline
37
+ - `/diagnose` composes_with `[temperance]` — fires temperance before diagnostic ceremony
38
+
39
+ When `composes_with:` is wrong, the substrate doesn't know the skill maps to a real chain. INSTEAD of listing rough memory of which skills run: list the exact slugs the skill calls.
40
+
41
+ ## `depends_on:` — required runtime predecessors
42
+
43
+ Use when the skill assumes a predecessor exists at runtime. The predecessor can be a skill, a rule, or a known config block in `.claude/bassclef-configs.jsonc`.
44
+
45
+ Format:
46
+
47
+ ```yaml
48
+ depends_on: [tech_stack, personas]
49
+ ```
50
+
51
+ V1 enforcement is advisory. The hook warns when a named target does not resolve as a skill, rule, or known config block, but the write passes. V2 may flip to strict once the vocabulary stabilizes.
52
+
53
+ Recognized config blocks (V1 list): `tech_stack`, `adopter_defaults`, `plan_tier`, `prose_discipline`, `longrun`, `testing`.
54
+
55
+ Examples that qualify:
56
+
57
+ - A skill that reads adopter stack metadata depends_on `[tech_stack]`
58
+ - A skill that requires persona definitions depends_on `[personas]` (the `/personas` skill must have run)
59
+ - A skill that reads adopter overrides depends_on `[adopter_defaults]` (the bassclef-configs block)
60
+
61
+ When `depends_on:` is wrong, the skill silently produces empty output instead of telling the operator what is missing. INSTEAD of letting the skill discover its preconditions at runtime: declare them up front.
62
+
63
+ ## composes_with vs depends_on — picking one
64
+
65
+ | If the relationship is... | Use |
66
+ |---|---|
67
+ | The current skill runs the other skill as a step | `composes_with:` |
68
+ | The current skill extends or chains the other skill's output | `composes_with:` |
69
+ | The current skill needs prior session state from another skill | `depends_on:` |
70
+ | The current skill reads a config block at runtime | `depends_on:` |
71
+ | The current skill assumes a rule is in force | `depends_on:` |
72
+
73
+ INSTEAD of listing the same name in both fields: pick the relationship that fires first. A skill that both runs `/value-prop` AND needs `/personas` from a prior session declares `composes_with: [value-prop]` plus `depends_on: [personas]`.
74
+
75
+ ## What this rule does NOT cover
76
+
77
+ - Source code patterns and design pattern annotations — see `.claude/rules/pattern-annotation.md`
78
+ - Frontmatter schema fields other than these two — see `standards/frontmatter-schema.md`
79
+ - Adopter onboarding wiring (which adopter-config blocks ship by default) — see `.claude/skills/onboard-repo/SKILL.md`
80
+ - Layer 3 traceability manifests that auto-populate from declared values — Phase 4 of bet 2026-06-18a (WU-17/WU-18/WU-19 deferred follow-on)
81
+
82
+ ## Mechanical enforcement
83
+
84
+ - `composes_with:` value type must be a YAML list of strings. A non-list type or a non-string item BLOCKs the write.
85
+ - Each name in `composes_with:` must resolve to `<repo>/.claude/skills/<name>/SKILL.md`. A missing target BLOCKs.
86
+ - Each name in `depends_on:` resolves against skills, rules, or known config blocks. A miss emits an ADVISORY notice and passes.
87
+ - Substrate root for path resolution is derived from the file being written (everything before `/.claude/`).
88
+
89
+ Hook: `.claude/hooks/substrate-clarity-gate.sh` (added in bassclef#862 WU-15).
90
+ Tests: `.claude/hooks/tests/substrate-clarity-gate.test.sh` Tests 27–36.
91
+
92
+ ## Override
93
+
94
+ `SKIP_SUBSTRATE_CLARITY=1 <command>` bypasses the validation and logs the override via trace-helper. INSTEAD of overriding when a target is genuinely missing: file the missing skill first, then add the composes_with entry.
95
+
96
+ Override is appropriate when:
97
+
98
+ - A migration script edits many skills at once and the target skill ships in the same PR
99
+ - Emergency rescue when the hook itself is broken
100
+
101
+ ## Composes with
102
+
103
+ - `.claude/rules/skill-description-clarity.md` — sister discipline at the frontmatter description surface
104
+ - `.claude/rules/state-schema-validation.md` — sister mechanical check at the state-spine surface
105
+ - `standards/frontmatter-schema.md` — full frontmatter field catalog
106
+
107
+ ## Refs
108
+
109
+ - bassclef#862 Gap 3 — declared composition fields
110
+ - WU-15 of `docs/iteration-bets/2026-06-18a-public-adopter-leverage-longrun.md` — ships this rule + hook extension
111
+ - WU-3 of same bet (bassclef PR #1167) — frontmatter schema validation that recognized these fields
112
+ - bassclef#1127 — tech_stack vocabulary; the first recognized config block
113
+ - WU-17 / WU-18 / WU-19 (deferred) — Phase 4 manifests that read declared values to build forward/reverse lookups
114
+
115
+ ## Sources read
116
+
117
+ - `.claude/hooks/substrate-clarity-gate.sh` — current validation passes
118
+ - `standards/frontmatter-schema.md` — recognized field catalog
119
+ - bassclef#862 issue body — WU-3 + WU-15 framing
120
+ - `docs/iteration-bets/2026-06-18a-public-adopter-leverage-longrun.md` — goal doc with WU-15 spec
121
+
122
+ ## Retirement condition
123
+
124
+ This rule retires when declared composition fields are no longer in the substrate vocabulary. The fields may evolve (Layer 3 manifests may read them differently) but the discipline of declaring relationships at the frontmatter surface persists.