@thebassclef/lite 0.1.0 → 0.1.2
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.
- package/dist/cli.cjs +2 -0
- package/dist/cli.js +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/substrate/.bassclef/lite-manifest.json +999 -92
- package/substrate/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
- package/substrate/.claude/hooks/longrun-prep-compounding-sequence-check.sh +492 -0
- package/substrate/.claude/hooks/pre-commit-gate.sh +1 -2
- package/substrate/.claude/hooks/turn-prose-kiss-check.sh +30 -1
- package/substrate/.claude/luminaries/glenford-myers.md +230 -0
- package/substrate/.claude/luminaries/hunt-thomas.md +115 -0
- package/substrate/.claude/luminaries/hyrum-wright.md +94 -0
- package/substrate/.claude/luminaries/michael-feathers.md +2 -2
- package/substrate/.claude/luminaries/tony-hoare.md +170 -0
- package/substrate/.claude/luminaries/vaughn-vernon.md +50 -0
- package/substrate/.claude/luminaries/w-edwards-deming.md +158 -0
- package/substrate/.claude/rules/accessor-library-discipline.md +138 -0
- package/substrate/.claude/rules/adr-discipline.md +120 -0
- package/substrate/.claude/rules/api-conventions.md +125 -0
- package/substrate/.claude/rules/bootstrap-pair-discipline.md +141 -0
- package/substrate/.claude/rules/cold-adopter-harness-discipline.md +129 -0
- package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +188 -0
- package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +188 -0
- package/substrate/.claude/rules/defensive-bash.md +68 -0
- package/substrate/.claude/rules/deferred-actions.md +233 -0
- package/substrate/.claude/rules/github-issue-flash-tweet.md +156 -0
- package/substrate/.claude/rules/hook-wire-on-author.md +103 -0
- package/substrate/.claude/rules/iteration-bet-brief-completeness.md +54 -0
- package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +3 -3
- package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +89 -0
- package/substrate/.claude/rules/loop-discipline.md +81 -0
- package/substrate/.claude/rules/manual-prod-approval.md +100 -0
- package/substrate/.claude/rules/marker-enrichment-discipline.md +99 -0
- package/substrate/.claude/rules/mobile-ephemeral-session.md +109 -0
- package/substrate/.claude/rules/new-dependency-check.md +51 -0
- package/substrate/.claude/rules/option-label-discipline.md +108 -0
- package/substrate/.claude/rules/pattern-annotation.md +100 -0
- package/substrate/.claude/rules/plain-english-discipline.md +11 -9
- package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +211 -0
- package/substrate/.claude/rules/pr-title-shape.md +161 -0
- package/substrate/.claude/rules/prototype-workflow.md +65 -0
- package/substrate/.claude/rules/reserved-skill-names.md +123 -0
- package/substrate/.claude/rules/schema-management.md +49 -0
- package/substrate/.claude/rules/security.md +37 -0
- package/substrate/.claude/rules/skill-composition-declarations.md +124 -0
- package/substrate/.claude/rules/skill-description-clarity.md +247 -0
- package/substrate/.claude/rules/skill-procedure-step-list.md +137 -0
- package/substrate/.claude/rules/stuck-signal-diagnostic.md +140 -0
- package/substrate/.claude/rules/substrate-config-schema.md +98 -0
- package/substrate/.claude/rules/test-list-discipline.md +175 -0
- package/substrate/.claude/rules/test-sufficiency.md +210 -0
- package/substrate/.claude/rules/testing-tier-config.md +145 -0
- package/substrate/.claude/rules/testing.md +38 -0
- package/substrate/.claude/rules/turn-estimate-grounding.md +134 -0
- package/substrate/.claude/rules/visual-hierarchy.md +437 -0
- package/substrate/.claude/rules/we-dont-break-adopters.md +126 -0
- package/substrate/.claude/rules/wu-sequencing-compounds.md +145 -0
- package/substrate/.claude/skills/build/SKILL.md +1 -1
- package/substrate/.claude/skills/chronicle/SKILL.md +55 -0
- package/substrate/.claude/skills/clean-artifacts/SKILL.md +249 -0
- package/substrate/.claude/skills/decompose/SKILL.md +1 -1
- package/substrate/.claude/skills/diagnose/SKILL.md +1 -1
- package/substrate/.claude/skills/feynman/SKILL.md +90 -0
- package/substrate/.claude/skills/howdoi/SKILL.md +1 -1
- package/substrate/.claude/skills/ia-model/SKILL.md +1 -1
- package/substrate/.claude/skills/interaction-design/SKILL.md +1 -1
- package/substrate/.claude/skills/interpret-input/SKILL.md +8 -8
- package/substrate/.claude/skills/journal/SKILL.md +209 -0
- package/substrate/.claude/skills/kiss/SKILL.md +1 -1
- package/substrate/.claude/skills/launch/SKILL.md +14 -23
- package/substrate/.claude/skills/lean-canvas/SKILL.md +1 -1
- package/substrate/.claude/skills/longrun/SKILL.md +45 -8
- package/substrate/.claude/skills/luminary/SKILL.md +1 -1
- package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +1 -1
- package/substrate/.claude/skills/onboard-repo/SKILL.md +143 -709
- package/substrate/.claude/skills/pattern-review/SKILL.md +1 -1
- package/substrate/.claude/skills/personas/SKILL.md +5 -5
- package/substrate/.claude/skills/promote/SKILL.md +1 -1
- package/substrate/.claude/skills/requirement/SKILL.md +1 -1
- package/substrate/.claude/skills/retro/SKILL.md +1 -1
- package/substrate/.claude/skills/riff/SKILL.md +1 -1
- package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +1 -1
- package/substrate/.claude/skills/session-end/SKILL.md +1 -1
- package/substrate/.claude/skills/session-log/SKILL.md +3 -3
- package/substrate/.claude/skills/skills/SKILL.md +1 -1
- package/substrate/.claude/skills/spec/SKILL.md +1 -1
- package/substrate/.claude/skills/sprint/SKILL.md +1 -1
- package/substrate/.claude/skills/stage/SKILL.md +1 -1
- package/substrate/.claude/skills/state-a-problem/SKILL.md +1 -1
- package/substrate/.claude/skills/temperance/SKILL.md +1 -1
- package/substrate/.claude/skills/use-case/SKILL.md +1 -1
- package/substrate/.claude/skills/user-stories/SKILL.md +1 -1
- package/substrate/.claude/skills/value-prop/SKILL.md +1 -1
- package/substrate/.claude/skills/verify/SKILL.md +1 -1
- package/substrate/.claude/skills/visual-review/SKILL.md +503 -0
- package/substrate/.claude/skills/whats-the-plan/SKILL.md +202 -0
- package/substrate/.claude/skills/whereami/SKILL.md +2 -2
- package/substrate/CONTRIBUTING.md +1 -1
- package/substrate/README.md +5 -5
- package/substrate/lib/prose-scan-boundary.sh +171 -0
- package/substrate/lib/tier-check.sh +50 -1
- package/substrate/lib/tier-dependency-audit.sh +159 -4
- package/substrate/presence/install/bassclef-sync.template.sh +1 -1
- package/substrate/scripts/generate-lite-manifest.sh +21 -5
- package/substrate/standards/adr-template.md +86 -0
- package/substrate/standards/api-conventions/nextjs.md +84 -0
- package/substrate/standards/artifact-composition.md +209 -0
- package/substrate/standards/bash-hook-safety.md +246 -0
- package/substrate/standards/branch-stacking.md +408 -0
- package/substrate/standards/code-safety-principles.md +176 -0
- package/substrate/standards/composer-prerequisites.md +155 -0
- package/substrate/standards/dependency-discipline/cargo.md +39 -0
- package/substrate/standards/dependency-discipline/gem.md +43 -0
- package/substrate/standards/dependency-discipline/go-mod.md +41 -0
- package/substrate/standards/dependency-discipline/npm.md +42 -0
- package/substrate/standards/dependency-discipline/pip.md +42 -0
- package/substrate/standards/deployment-topology/ec2-tailscale.md +225 -0
- package/substrate/standards/deployment-topology.md +69 -0
- package/substrate/standards/docs-sync-allowlist.md +4 -4
- package/substrate/standards/domain-and-dns.md +145 -0
- package/substrate/standards/frontend-stack.md +67 -0
- package/substrate/standards/frontmatter-schema.md +154 -0
- package/substrate/standards/hook-injection-discipline.md +202 -0
- package/substrate/standards/hook-install-class.md +215 -0
- package/substrate/standards/input-handler-interface.md +152 -0
- package/substrate/standards/lite-manifest-schema-changes.md +60 -0
- package/substrate/standards/luminary-matching.md +105 -0
- package/substrate/standards/migration-discipline/active-record.md +50 -0
- package/substrate/standards/migration-discipline/alembic.md +43 -0
- package/substrate/standards/migration-discipline/gorm.md +50 -0
- package/substrate/standards/migration-discipline/prisma.md +53 -0
- package/substrate/standards/migration-discipline/sqlalchemy.md +51 -0
- package/substrate/standards/mobile-ephemeral-session.md +167 -0
- package/substrate/standards/model-routing-discipline.md +160 -0
- package/substrate/standards/persona-schema.md +229 -0
- package/substrate/standards/pluggable-luminaries.md +323 -0
- package/substrate/standards/pr-body-discipline.md +115 -0
- package/substrate/standards/preview-state-schema.md +189 -0
- package/substrate/standards/reserved-skill-names.md +120 -0
- package/substrate/standards/scannable-multi-option-output.md +261 -0
- package/substrate/standards/sdlc-gates/typescript.md +57 -0
- package/substrate/standards/session-board.md +256 -0
- package/substrate/standards/state-spine-contract.md +255 -0
- package/substrate/standards/steering-hints/kiss-words.md +11 -0
- package/substrate/standards/substrate-config-schema.md +267 -0
- package/substrate/standards/tier-dependency-analysis.md +1 -1
- package/substrate/standards/tier-tag-schema.md +1 -1
- package/substrate/standards/two-layer-config.md +99 -0
- package/substrate/standards/use-case-format.md +292 -0
- package/substrate/standards/user-story-invest.md +268 -0
- package/substrate/standards/velocity-and-appetite.md +229 -0
- package/substrate/standards/voice-input-pattern.md +119 -0
- package/substrate/standards/worktree-management.md +211 -0
- package/substrate/templates/chronicle-template.md +75 -0
- package/substrate/templates/memory-proposal-template.md +77 -0
- package/substrate/templates/persona-template.md +200 -0
- package/substrate/templates/pr-faq.md +45 -0
- package/substrate/templates/secret-rotation-template.md +162 -0
- package/substrate/templates/spec-template.md +131 -0
- package/substrate/templates/use-case-template.md +194 -0
- package/substrate/templates/user-story-template.md +107 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: "Every skill's frontmatter description field must be parseable by an engineer with no bassclef context in under 60 seconds."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill-Description Clarity
|
|
7
|
+
|
|
8
|
+
Every skill's frontmatter `description` field must be parseable by an
|
|
9
|
+
engineer with no bassclef context in under 60 seconds. Outcome-first.
|
|
10
|
+
≤280 chars. Plain language. INSTEAD-block discipline.
|
|
11
|
+
|
|
12
|
+
This rule sits at the entry surface. It parallels bassclef#357 (which governs autonomous-run output). It applies `.claude/rules/context-engineering.md` at the description field: write for what the model can access. For this rule, that means write what a fresh engineer can read in 60 seconds.
|
|
13
|
+
|
|
14
|
+
**Mechanical enforcement**: `.claude/hooks/substrate-clarity-gate.sh` fires at PreToolUse Edit|Write on substrate paths. It BLOCKs skill descriptions past 280 chars or without verb-first openers. The rule + luminary INSTEAD-block check runs ADVISORY today. It flips to BLOCK once the rule + luminary audits ship (tracked under bassclef-upstream#303). The allowlist at `.claude/hooks/substrate-clarity-allowlist.txt` grandfathers existing violators during the grace window. Per bassclef#382.
|
|
15
|
+
|
|
16
|
+
## The bar
|
|
17
|
+
|
|
18
|
+
Anthropic's frontend-design description (per Welch's revision):
|
|
19
|
+
|
|
20
|
+
> "Create distinctive, production-grade frontend interfaces with
|
|
21
|
+
> high design quality. Avoids generic AI aesthetics."
|
|
22
|
+
|
|
23
|
+
That's the bar. Outcome ("create distinctive interfaces"), one-line
|
|
24
|
+
how ("with high design quality"), one-line why-distinct ("avoids
|
|
25
|
+
generic AI aesthetics"). 117 chars. Engineer reads it; knows what
|
|
26
|
+
the skill produces; knows when to use it.
|
|
27
|
+
|
|
28
|
+
Compare to bassclef's pre-rule descriptions (representative):
|
|
29
|
+
|
|
30
|
+
> "BUILD-tier composer (Construction transition). Chains the
|
|
31
|
+
> prototype pipeline (input → variants → gallery → bind-subdomain)
|
|
32
|
+
> PLUS the buildable-spec pipeline (use-case → user-stories →
|
|
33
|
+
> ia-model → interaction-design → decompose → spec → ux-migration)."
|
|
34
|
+
|
|
35
|
+
571 chars. Methodology-laden. Requires knowing what every named
|
|
36
|
+
component is. Engineer can't grok in 60 seconds.
|
|
37
|
+
|
|
38
|
+
## Format
|
|
39
|
+
|
|
40
|
+
Every skill's frontmatter `description` field follows:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
<verb> <outcome>. <one-line how>. <one-line why-distinct>.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- **Verb**: imperative — "Create," "Generate," "Run," "Compose," "Audit"
|
|
47
|
+
- **Outcome**: what the skill PRODUCES (not how it works internally)
|
|
48
|
+
- **One-line how**: the most distinguishing mechanism, in plain language
|
|
49
|
+
- **One-line why-distinct**: what makes it different from adjacent skills (or what it specifically AVOIDS)
|
|
50
|
+
|
|
51
|
+
Total ≤280 chars including spaces.
|
|
52
|
+
|
|
53
|
+
## INSTEAD-block discipline
|
|
54
|
+
|
|
55
|
+
Every "DON'T" / "AVOID" / "NEVER" in the description gets paired with
|
|
56
|
+
the actionable substitute, per `.claude/rules/context-engineering.md`.
|
|
57
|
+
|
|
58
|
+
INSTEAD of bare negation: state the actionable substitute the engineer
|
|
59
|
+
or model can verify in their current context. Bare "DON'T X" without
|
|
60
|
+
"INSTEAD: Y" is a no-op for a stateless reader.
|
|
61
|
+
|
|
62
|
+
In a description, this shows up in the why-distinct clause:
|
|
63
|
+
|
|
64
|
+
- **Anti**: "Don't use this for short prompts."
|
|
65
|
+
- **INSTEAD**: "Use for prompts ≥3 sentences; for one-liners, see /value-prop flash."
|
|
66
|
+
|
|
67
|
+
The negation lives in context (when not to use). The substitute names the actionable path (which skill to use instead).
|
|
68
|
+
|
|
69
|
+
## Plain language (per /kiss words)
|
|
70
|
+
|
|
71
|
+
Grade-10 reading level. Common substitutions bassclef-substrate writers should make:
|
|
72
|
+
|
|
73
|
+
| Replace | With |
|
|
74
|
+
|---|---|
|
|
75
|
+
| "composer" | "runs" / "chains" / "combines" |
|
|
76
|
+
| "primitive" | "building block" |
|
|
77
|
+
| "tier-preset" | "preset" / "size" |
|
|
78
|
+
| "operationalize" | "do" / "ship" |
|
|
79
|
+
| "load-bearing" | "required" / "must work" |
|
|
80
|
+
| "blast radius" | "impact" / "what it can break" |
|
|
81
|
+
| "substrate" | "system" / "framework" |
|
|
82
|
+
| "bassclef" (in description body) | use sparingly; prefer "the framework" |
|
|
83
|
+
| "compose-with" | "uses" / "builds on" |
|
|
84
|
+
| "scope-bounded" | "small" / "tight" |
|
|
85
|
+
|
|
86
|
+
If the description still uses bassclef jargon after substitution,
|
|
87
|
+
the description was assuming context the engineer doesn't have.
|
|
88
|
+
Rewrite further.
|
|
89
|
+
|
|
90
|
+
## What MUST NOT appear in a description
|
|
91
|
+
|
|
92
|
+
- References to other skills the engineer hasn't read yet (skill names OK; methodology references aren't)
|
|
93
|
+
- Methodology chains ("X → Y → Z → ...")
|
|
94
|
+
- Tier specifications without explaining what the tier does
|
|
95
|
+
- Citations to bassclef issues (those go in the body)
|
|
96
|
+
- Dates / versions / "renamed from X on Y" (those go in the body)
|
|
97
|
+
- Assumed pipeline knowledge ("Phase 14 of the buildable-spec chain")
|
|
98
|
+
|
|
99
|
+
## What MUST appear in a description
|
|
100
|
+
|
|
101
|
+
- The verb-outcome opener
|
|
102
|
+
- A concrete sense of what the user gets back
|
|
103
|
+
- A distinguishing characteristic vs. adjacent skills
|
|
104
|
+
- **Modes / tiers / sizes named inline when frontmatter declares them** (bassclef#535) — see next section
|
|
105
|
+
|
|
106
|
+
## Description-mirrors-modes (bassclef#535)
|
|
107
|
+
|
|
108
|
+
When a skill's frontmatter declares structured `modes:` / `tiers:` / `sizes:` (per bassclef#515), the description **text** MUST name each declared value inline. Operators see Claude Code's type-ahead BEFORE invoking `/skills`; type-ahead reads only the `description` field. Frontmatter `modes:` is machine-readable for bassclef's audit + render pipeline but invisible to type-ahead.
|
|
109
|
+
|
|
110
|
+
**The discipline:**
|
|
111
|
+
|
|
112
|
+
- If frontmatter has `modes: [scope, words]`, description must contain "scope" AND "words" (typically as "Two modes — scope ... and words ..." or similar)
|
|
113
|
+
- If frontmatter has `tiers: [quick, light, medium, full]`, description must name all four
|
|
114
|
+
- If frontmatter has `sizes: [flash, tweet, brief, verbose]`, description must name all four
|
|
115
|
+
- Skills with `no_user_modes: true` (opt-out) are exempt
|
|
116
|
+
- The 280-char ceiling still applies — naming N modes that won't fit means the description is over-claiming; collapse the verbiage around them
|
|
117
|
+
|
|
118
|
+
**Why mirror, not auto-render?**
|
|
119
|
+
|
|
120
|
+
Type-ahead reads `description`. bassclef doesn't control the harness; we control the data we put in `description`. Mirroring is the cheap fix that makes type-ahead useful for mode-bearing skills today. Frontmatter `modes:` stays machine-readable for `/skills` catalog rendering + audit + future structured uses; description text stays human-readable for type-ahead.
|
|
121
|
+
|
|
122
|
+
**Conformance examples (all 7 skills with modes today):**
|
|
123
|
+
|
|
124
|
+
| Skill | Frontmatter | Description names them? |
|
|
125
|
+
|---|---|---|
|
|
126
|
+
| `/value-prop` | `sizes: [flash, tweet, brief, verbose]` | ✓ "Four sizes — flash ... tweet ... brief ... verbose" |
|
|
127
|
+
| `/kiss` | `modes: [scope, words]` | ✓ "Two modes — scope ... and words ..." |
|
|
128
|
+
| `/stage` | `sizes: [quick, light]` | ✓ "Two sizes: quick ... and light ..." |
|
|
129
|
+
| `/launch` | `sizes: [medium, full]` | ✓ "Two sizes: medium ... and full ..." |
|
|
130
|
+
| `/shape` | `tiers: [quick, light, medium, full]` | ✓ "four sizes — quick, light, medium, full" |
|
|
131
|
+
| `/longrun` | `modes: [prep, checkpoint, closeout]` | ✓ "three modes — prep, checkpoint, closeout" (after bassclef#535) |
|
|
132
|
+
| `/interpret-input` | `modes: [text, url, image, repo, transcript, napkin, mixed]` | ✓ types listed in parens |
|
|
133
|
+
| `/onboard-repo` | `modes: [default, --with-deploy-host, --with-secrets, --full]` | ❌ pending — fold into LR8.6 PR #526 amendment |
|
|
134
|
+
|
|
135
|
+
**Mechanical enforcement (deferred follow-on):**
|
|
136
|
+
|
|
137
|
+
- `scripts/audit-skills-modes.sh` (bassclef#515 PR #519) extends with `description-doesnt-mirror-modes` finding type
|
|
138
|
+
- `.claude/hooks/substrate-clarity-gate.sh` extends with the same check at PreToolUse Edit/Write time
|
|
139
|
+
- Both gated behind bassclef#515 + bassclef#382 landing first; until then, this rule is methodology-level + the operator runs the audit manually
|
|
140
|
+
|
|
141
|
+
**Override:**
|
|
142
|
+
|
|
143
|
+
`SKIP_DESCRIPTION_MIRRORS_MODES=1` per-call override (logged via trace-helper). Use only when the frontmatter declares modes that are too numerous to mention inline (>5) AND a higher-level grouping description suffices.
|
|
144
|
+
|
|
145
|
+
## Worked examples — applying the rule
|
|
146
|
+
|
|
147
|
+
### /sprint (before)
|
|
148
|
+
|
|
149
|
+
> "Show current iteration goal, open issues by priority, and proposed next sprint. Quick orientation for any session."
|
|
150
|
+
|
|
151
|
+
132 chars. Decent — verb opener, outcome named. Could be tighter on
|
|
152
|
+
why-distinct. **Score: B+. Acceptable.**
|
|
153
|
+
|
|
154
|
+
### /sprint (after)
|
|
155
|
+
|
|
156
|
+
> "Show what's in flight and what's next. Reads project state, open issues, and the active iteration goal; proposes the next sprint. Run at session start to orient."
|
|
157
|
+
|
|
158
|
+
161 chars. Verb-outcome stronger. Why-distinct (when to use) explicit. **Score: A.**
|
|
159
|
+
|
|
160
|
+
### /longrun (before)
|
|
161
|
+
|
|
162
|
+
> "Self-checkpointing long-session lifecycle (prep / checkpoint / closeout). Orchestrator-gated sequential by default. Use when ≥2 active goals OR estimated >50 turns OR session crosses compaction. Composes /temperance, /retro, /promote, /session-end. Replaces manual mid-session reflection that defeats fire-and-forget intent."
|
|
163
|
+
|
|
164
|
+
322 chars. Methodology-laden. "Orchestrator-gated sequential" is jargon. Composes-list dumps internal references. **Score: D.**
|
|
165
|
+
|
|
166
|
+
### /longrun (after)
|
|
167
|
+
|
|
168
|
+
> "Run a long autonomous session that paces itself — prepares scope, checkpoints at phase boundaries, closes with chronicle + journal entry + retro. Use for sessions over 50 turns or with multiple bets. Replaces mid-session manual reflection."
|
|
169
|
+
|
|
170
|
+
249 chars. Outcome-first. Plain language. When-to-use explicit. **Score: A-.**
|
|
171
|
+
|
|
172
|
+
### /launch (formerly /preview-build) (before)
|
|
173
|
+
|
|
174
|
+
> "BUILD-tier composer (Construction transition). Chains the prototype pipeline (input → variants → gallery → bind-subdomain) PLUS the buildable-spec pipeline (use-case → user-stories → ia-model → interaction-design → decompose → spec → ux-migration). Tiers: medium (~1 day, 3 variants + buildable spec + INVEST stories + GRASP matrix) and full..."
|
|
175
|
+
|
|
176
|
+
571 chars (truncated). Methodology dump. Tier specs without context.
|
|
177
|
+
**Score: F.**
|
|
178
|
+
|
|
179
|
+
### /launch (after)
|
|
180
|
+
|
|
181
|
+
> "Turn an idea into a buildable plan. Produces a clickable mock gallery PLUS the spec, decomposition, and migration plan needed to actually build the chosen direction. Two sizes: medium (~1 day) and full (~audit-grade). Operator dispatches when ready to ship."
|
|
182
|
+
|
|
183
|
+
275 chars. Outcome-first. The "PLUS" makes the differentiator vs.
|
|
184
|
+
/stage (formerly /preview) clear. Tiers framed by time budget, not internal methodology.
|
|
185
|
+
**Score: A.**
|
|
186
|
+
|
|
187
|
+
## Application
|
|
188
|
+
|
|
189
|
+
### Per skill (rewrites)
|
|
190
|
+
|
|
191
|
+
1. Read existing description
|
|
192
|
+
2. Score against rule (Verb? Outcome? ≤280 chars? Jargon? Plain language?)
|
|
193
|
+
3. Rewrite if score < B
|
|
194
|
+
4. Test the rewrite: would a senior engineer with no bassclef context understand it in 60 seconds?
|
|
195
|
+
|
|
196
|
+
### Per longrun (audit)
|
|
197
|
+
|
|
198
|
+
The audit issue (bassclef#375 + sister WU-3 issues) tracks
|
|
199
|
+
per-skill rewrites. WU-6 of this longrun ships top-7 (data + judgment
|
|
200
|
+
based) as in-scope examples; rest filed as follow-up.
|
|
201
|
+
|
|
202
|
+
### Per new skill
|
|
203
|
+
|
|
204
|
+
Every new skill's description goes through this rule before merge.
|
|
205
|
+
Test: paste the description into a Slack DM to a senior engineer
|
|
206
|
+
without bassclef context. If they ask "what does this DO?" you
|
|
207
|
+
violated the rule.
|
|
208
|
+
|
|
209
|
+
INSTEAD of testing against a bassclef-savvy reader: test against
|
|
210
|
+
a fresh reader who carries no internal vocabulary. That's the
|
|
211
|
+
audience the description has to serve.
|
|
212
|
+
|
|
213
|
+
## Relationship to other rules
|
|
214
|
+
|
|
215
|
+
- `.claude/rules/context-engineering.md` — the foundational rule; this is one application
|
|
216
|
+
- bassclef#357 (autonomous-run flash + kiss) — sibling discipline at output surface; this rule is at description surface
|
|
217
|
+
- bassclef#367 (section-heading standardization) — sibling specificity discipline
|
|
218
|
+
- bassclef#339 (plan-enumeration-needs-value-props) — sibling at choice-presentation surface
|
|
219
|
+
|
|
220
|
+
## Override
|
|
221
|
+
|
|
222
|
+
There is no override. Skill descriptions are an entry surface for
|
|
223
|
+
engineers and operators. Violating the rule means engineers won't
|
|
224
|
+
adopt the skill, regardless of how good the skill itself is.
|
|
225
|
+
|
|
226
|
+
If you can't write the description per the rule, the skill's job
|
|
227
|
+
isn't clear enough — clarify the skill before clarifying the
|
|
228
|
+
description.
|
|
229
|
+
|
|
230
|
+
## Audit pattern
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# Find skills whose descriptions exceed 280 chars
|
|
234
|
+
grep -r "^description:" .claude/skills/*/SKILL.md | awk -F: '{ if (length($0) > 280) print $0 }'
|
|
235
|
+
|
|
236
|
+
# Find skills whose descriptions use bassclef jargon
|
|
237
|
+
git grep -niE 'composer|primitive|tier-preset|operationalize|load-bearing|blast radius|compose-with' .claude/skills/*/SKILL.md | grep -E '^.*:description:'
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Sources read
|
|
241
|
+
|
|
242
|
+
- `.claude/rules/context-engineering.md` (bassclef#371) — foundational rule
|
|
243
|
+
- bassclef#357 — sibling output-surface rule
|
|
244
|
+
- bassclef#367 — sibling specificity rule
|
|
245
|
+
- `.claude/skills/value-prop/SKILL.md` — flash mode (≤180 chars analog)
|
|
246
|
+
- `.claude/skills/kiss/SKILL.md` — words mode (plain-language analog)
|
|
247
|
+
- Anthropic `frontend-design` skill description — direct exemplar; bassclef declares this as baseline-composes-with in `/frontend-design`, `/riff-prototypes`, `/launch`, `/visual-review` skill frontmatter rather than carrying it as a luminary entry
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: Before executing any SKILL procedure, I write the numbered step list into the response.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill-procedure step-list
|
|
7
|
+
|
|
8
|
+
Before executing any SKILL procedure, I write the numbered step list into the response. Each step is marked `[x]` executed with source cited OR `[~]` explicitly deferred with reason. No `[ ]` unchecked lines ship at output time. Silence is not deferral.
|
|
9
|
+
|
|
10
|
+
This rule extends `.claude/rules/assert-only-after-verify.md` from the assertion surface to the SKILL-procedure surface. It is the methodology layer. The mechanical layer is `.claude/hooks/skill-step-list-check.sh` — Stop hook that scans the transcript for a Skill dispatch followed by an assistant response without a step-list block.
|
|
11
|
+
|
|
12
|
+
## Why this rule exists
|
|
13
|
+
|
|
14
|
+
Session 2026-08-05a dispatched `/roadmap-reconcile --dry-run` during `/longrun` prep. The SKILL procedure names 5 steps. I ran Step 1 (enumerate surfaces), skipped Step 2 (read shipping reality), and jumped to Step 3 (build a diff). I substituted whereami queue narrative for the actual `gh pr view` + `gh issue view` cross-check Step 2 requires. Four stale drift rows shipped. Operator caught the class in one turn — three closed tickets (#1050, #1051, #1054) shown as pending because whereami queue said so and no cross-check verified.
|
|
15
|
+
|
|
16
|
+
Memory alone catches nothing at write time. Two existing rule + hook pairs prove the pattern holds at scale — `.claude/rules/assert-only-after-verify.md` + `.claude/hooks/assert-verify-steering.sh`, and `.claude/rules/plain-english-discipline.md` + `.claude/hooks/turn-prose-kiss-check.sh`. This rule is the third pair, at the SKILL-procedure surface.
|
|
17
|
+
|
|
18
|
+
## When this rule fires
|
|
19
|
+
|
|
20
|
+
Every SKILL dispatch. Agents self-check before writing the response. Hook fires at Stop event as the write-time backstop.
|
|
21
|
+
|
|
22
|
+
Fires on:
|
|
23
|
+
|
|
24
|
+
- Any Skill tool dispatch in the current turn
|
|
25
|
+
- Any SKILL body whose procedure names 2+ steps
|
|
26
|
+
|
|
27
|
+
Passes through on:
|
|
28
|
+
|
|
29
|
+
- Non-Skill tool calls (Bash, Read, Edit, Write, Grep, etc.) — those follow their own discipline rules
|
|
30
|
+
- SKILL body procedures with 0 or 1 step (no list needed)
|
|
31
|
+
- Tool-output relays (test output, git output) that carry no assertions of their own
|
|
32
|
+
|
|
33
|
+
## What the rule requires
|
|
34
|
+
|
|
35
|
+
Before shipping any response following a SKILL dispatch:
|
|
36
|
+
|
|
37
|
+
1. **Read the SKILL body Procedure section.** Enumerate the numbered steps.
|
|
38
|
+
2. **Write the step list at the top of the response.** Format: `Step N — <name>` followed by a status marker.
|
|
39
|
+
3. **Execute each step.** Cite the source inline as it runs.
|
|
40
|
+
4. **Mark each step's status:**
|
|
41
|
+
- `[x]` executed with source cited
|
|
42
|
+
- `[~]` explicitly deferred with reason (silence is not deferral)
|
|
43
|
+
- Do not ship `[ ]` unchecked at output time.
|
|
44
|
+
INSTEAD: mark every step `[x]` or `[~]` before the response ships. Unchecked shipped equals silent skip.
|
|
45
|
+
5. **Loaded context is a hint, not a substitute for a source read named by a step.** The context feels full. That is when the skip is easiest and the drift is worst.
|
|
46
|
+
INSTEAD: cite the source per the SKILL step. Loaded context is a hint, not a substitute.
|
|
47
|
+
|
|
48
|
+
## Format contract
|
|
49
|
+
|
|
50
|
+
Each step line matches one of these shapes:
|
|
51
|
+
|
|
52
|
+
- `Step N — <name> — [x] <source cited>`
|
|
53
|
+
- `Step N — <name> — [~] <deferral reason>`
|
|
54
|
+
|
|
55
|
+
Or a block header + list format:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
Steps:
|
|
59
|
+
- Step 1 — <name> — [x] <source>
|
|
60
|
+
- Step 2 — <name> — [~] <reason>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The hook scans for two markers together: the token `Step\s+\d+` AND either `[x]` or `[~]` bracketed. Both must appear in the assistant text following a Skill dispatch.
|
|
64
|
+
|
|
65
|
+
## Anti-patterns
|
|
66
|
+
|
|
67
|
+
These shapes fail this rule.
|
|
68
|
+
|
|
69
|
+
**Dispatch skill; write results with no step list.** The response ships without any `Step N` markers. Hook fires ADVISORY (or BLOCK under strict toggle).
|
|
70
|
+
INSTEAD: enumerate the SKILL procedure steps at the top of the response before running them.
|
|
71
|
+
|
|
72
|
+
**Silent skip.** A step gets no `[x]` and no `[~]` line — the response simply omits it.
|
|
73
|
+
INSTEAD: every step from the SKILL procedure appears in the response, either done or explicitly deferred with reason.
|
|
74
|
+
|
|
75
|
+
**Context as substitute.** Loaded context carries a plausible answer. Skip the SKILL step; use the context.
|
|
76
|
+
INSTEAD: cite the source per the SKILL step. Loaded context is a hint, not a substitute for the read the step names.
|
|
77
|
+
|
|
78
|
+
**Half-written list.** Some steps carry markers; others do not.
|
|
79
|
+
INSTEAD: every step marked before response ships. Half-written lists cause reviewer confusion + trigger the hook.
|
|
80
|
+
|
|
81
|
+
## When this rule does NOT fire
|
|
82
|
+
|
|
83
|
+
- Tool-output relays (test output, git output) — no assertion of the agent's own
|
|
84
|
+
- SKILL body with 0 or 1 step — no list needed
|
|
85
|
+
- Skill invoked purely for its output display (e.g., `/whereami` for a status snapshot)
|
|
86
|
+
- Chat responses that do not follow a Skill dispatch
|
|
87
|
+
|
|
88
|
+
## Override
|
|
89
|
+
|
|
90
|
+
`SKIP_SKILL_STEP_LIST=1 <command>` — per-call bypass, logged via trace-helper. Use rarely:
|
|
91
|
+
|
|
92
|
+
- One-shot migration scripts that dispatch many SKILLs at once
|
|
93
|
+
- Emergency rescue when the hook itself misbehaves
|
|
94
|
+
- Explicitly-deferred rework where the step list ships in a follow-up response
|
|
95
|
+
|
|
96
|
+
For routine SKILL dispatches, write the step list. The cost is small; the audit trail compounds.
|
|
97
|
+
|
|
98
|
+
## Toggle
|
|
99
|
+
|
|
100
|
+
The hook reads `SKILL_STEP_LIST_TOGGLE` from env OR `skill_step_list.toggle` from `.claude/bassclef-configs.jsonc`:
|
|
101
|
+
|
|
102
|
+
- `true` (default) — advisory (exit 0, findings to stderr)
|
|
103
|
+
- `strict` — strict (exit 2, blocks the stop event, forces a rewrite)
|
|
104
|
+
- `false` — silent (exit 0, no scan)
|
|
105
|
+
|
|
106
|
+
V1 ships advisory. V2 may flip to strict after a calibration cycle observes drift stays under 10%.
|
|
107
|
+
|
|
108
|
+
## Anchor luminaries
|
|
109
|
+
|
|
110
|
+
- `.claude/luminaries/saltzer-schroeder.md` (Saltzer & Schroeder 1975, IEEE 63(9)) — complete mediation. Every access to protected state is checked. Whereami narrative was a cached authorization. Rule + hook forces mediation at every SKILL dispatch.
|
|
111
|
+
- `.claude/luminaries/tony-hoare.md` (Hoare 1969, CACM 12(10)) — pre/postcondition triple. Each step's postcondition is the next step's precondition. Skip breaks the chain.
|
|
112
|
+
- `.claude/luminaries/michael-feathers.md` (Feathers 2004) — characterization tests. Pin actual behavior via source of record before naming it.
|
|
113
|
+
- `.claude/luminaries/kent-beck.md` (Beck 2002) — list-before-execute. Sister discipline at test surface applied to SKILL surface.
|
|
114
|
+
|
|
115
|
+
## Composes with
|
|
116
|
+
|
|
117
|
+
- `.claude/rules/assert-only-after-verify.md` — parent discipline at claim surface; this rule extends to SKILL-procedure surface
|
|
118
|
+
- `.claude/rules/bootstrap-pair-discipline.md` — pair-shape pattern (rule + hook + Tier 0 test)
|
|
119
|
+
- `.claude/rules/substrate-as-system.md` — ADR-035 tenet
|
|
120
|
+
- `.claude/rules/test-list-discipline.md` — Beck's list-before-execute sister rule at test surface
|
|
121
|
+
- `.claude/rules/testing-tier-config.md` — Tier 0 strict TDD on hook + tests
|
|
122
|
+
- `.claude/rules/we-dont-break-adopters.md` — V1 ADVISORY default preserves adopter behavior
|
|
123
|
+
- `.claude/rules/blocked-items.md` — BLOCK protocol the hook fires under strict toggle
|
|
124
|
+
- `.claude/hooks/skill-step-list-check.sh` — mechanical implementation
|
|
125
|
+
- `.claude/hooks/tests/skill-step-list-check.test.sh` — Tier 0 test coverage (10 tests)
|
|
126
|
+
|
|
127
|
+
## Refs
|
|
128
|
+
|
|
129
|
+
- sunj-labs/bassclef-upstream#1119 — parent ticket
|
|
130
|
+
- Session 2026-08-05a `/diagnose` output — root cause named (SKILL step skip + context-as-substitute)
|
|
131
|
+
- Memory `feedback_skill_procedure_step_list_before_execute` — evidence anchor
|
|
132
|
+
- Goal doc `docs/iteration-bets/2026-08-05a-skill-step-list-plus-whereami-hygiene.md` — bet frame
|
|
133
|
+
- Sister ticket sunj-labs/bassclef-upstream#1121 — in-turn error stream subsystem (broader observability)
|
|
134
|
+
|
|
135
|
+
## Retirement condition
|
|
136
|
+
|
|
137
|
+
This rule retires only if SKILL dispatch stops being the primary agent-to-substrate composition path. The mechanical layer may evolve (additional detection heuristics, integration with error-stream subsystem #1121). The discipline of write-time step verification persists.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: "When a hook emits the same BLOCKED signal across ≥3 consecutive sessions and the underlying state counter hasn't moved, the signal is stuck."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Stuck-Signal Diagnostic
|
|
7
|
+
|
|
8
|
+
When a hook emits the same BLOCKED signal across ≥3 consecutive sessions
|
|
9
|
+
and the underlying state counter hasn't moved, the signal is stuck.
|
|
10
|
+
A stuck signal is evidence of a **substrate defect**, not operator
|
|
11
|
+
error — the hook is correctly detecting a condition the fix path
|
|
12
|
+
cannot clear. Continuing to fire the same banner without reading the
|
|
13
|
+
mechanism that produces it reproduces the acknowledge-and-skip loop
|
|
14
|
+
`blocked-items.md` was built to close.
|
|
15
|
+
|
|
16
|
+
## When this rule fires
|
|
17
|
+
|
|
18
|
+
Any BLOCKED banner whose underlying counter / state has not advanced
|
|
19
|
+
across ≥3 sessions. Observable shapes:
|
|
20
|
+
|
|
21
|
+
- `BLOCKED: verify-compliance — X%` where X is identical 3 sessions running
|
|
22
|
+
- `BLOCKED: temperance-compliance — X%` where X is identical 3 sessions running
|
|
23
|
+
- `BLOCKED: metrics — DORA stale` with identical staleness counts
|
|
24
|
+
- `BLOCKED: release-notes — last entry N days ago` where N grows but no
|
|
25
|
+
release is written
|
|
26
|
+
- Any hook-surfaced BLOCKED whose associated counter/timestamp/state
|
|
27
|
+
is numerically or categorically unchanged across the last 3 chronicles
|
|
28
|
+
|
|
29
|
+
The operator does not need to flag the staleness. The agent must
|
|
30
|
+
self-detect by comparing current banner text against the prior
|
|
31
|
+
session's banner text (visible in chronicles or `/sprint` output).
|
|
32
|
+
|
|
33
|
+
## Mandatory mechanism-read
|
|
34
|
+
|
|
35
|
+
When stuck-signal is detected, the agent MUST:
|
|
36
|
+
|
|
37
|
+
1. **Stop addressing the symptom.** Do not propose running the usual
|
|
38
|
+
fix (e.g., "let me run /verify more diligently this session"). The
|
|
39
|
+
fix has been tried and the counter hasn't moved. That's the signal.
|
|
40
|
+
|
|
41
|
+
2. **Read the mechanism files named in the banner.** The hook banner
|
|
42
|
+
names the exact paths. Follow the paths. Read every one.
|
|
43
|
+
|
|
44
|
+
3. **Trace the counter's update path.** From mechanism-file read,
|
|
45
|
+
answer:
|
|
46
|
+
- Where is the counter computed?
|
|
47
|
+
- What state does the counter consume?
|
|
48
|
+
- What action updates that state?
|
|
49
|
+
- Is the update actually landing, or landing to a surface the
|
|
50
|
+
counter doesn't read?
|
|
51
|
+
|
|
52
|
+
4. **Fire /diagnose on the mechanism.** Treat the stuck signal as a
|
|
53
|
+
substrate failure per `diagnosis.md`. Is/Is-Not + Five Whys +
|
|
54
|
+
Hypothesis applied to the hook + state-file + update path — not to
|
|
55
|
+
the surface behavior.
|
|
56
|
+
|
|
57
|
+
5. **Resolve via substrate edit or escalate.** The fix is almost
|
|
58
|
+
always in the mechanism: wrong path, stale regex, counter reading
|
|
59
|
+
a location the writer stopped using, `/tmp` marker lost across
|
|
60
|
+
sandbox teardown. Edit the substrate, commit, verify the counter
|
|
61
|
+
advances. If substrate-read reveals no defect, escalate — the
|
|
62
|
+
counter is correct and the work is genuinely undone; `blocked-items.md`
|
|
63
|
+
default (resolve) applies.
|
|
64
|
+
|
|
65
|
+
## Post-resolution obligation: mandatory /promote
|
|
66
|
+
|
|
67
|
+
When mechanism-read reveals a substrate defect (hook path wrong,
|
|
68
|
+
state file rotted, marker format changed, compliance calc broken),
|
|
69
|
+
resolution MUST include firing `/promote` with the `substrate-defect`
|
|
70
|
+
classifier. See `blocked-items.md` §"When resolution reveals a
|
|
71
|
+
substrate defect" for the full protocol and `promote/SKILL.md` for
|
|
72
|
+
the template.
|
|
73
|
+
|
|
74
|
+
Fixing the local instance without promoting means the same defect
|
|
75
|
+
keeps firing in consumer repos — which is exactly the
|
|
76
|
+
acknowledge-and-skip loop at a different layer.
|
|
77
|
+
|
|
78
|
+
## Why this rule exists
|
|
79
|
+
|
|
80
|
+
2026-04-20 session end + 2026-04-21 session start (the loop that
|
|
81
|
+
motivated bet `2026-04-21a-blocked-signal-integrity`): session-rescue
|
|
82
|
+
hook fired 15 times in ≤4 hours, each session acknowledging the
|
|
83
|
+
deferred-actions BLOCKED block, resolving the nominal entry, and
|
|
84
|
+
shipping — only for the next stop to write a fresh rescue entry.
|
|
85
|
+
|
|
86
|
+
The counter ("15 deferred-action entries resolvable") stayed stuck
|
|
87
|
+
because resolution lived in the local session but the hook's
|
|
88
|
+
detection path rotted during `/tmp` sandbox teardown. The mechanism
|
|
89
|
+
file (`session-end.sh`) had a calendar-date chronicle check that fired
|
|
90
|
+
even when a fresh chronicle existed with a different date pattern —
|
|
91
|
+
a substrate defect that `/verify`-more-carefully could not clear.
|
|
92
|
+
|
|
93
|
+
Root cause: the agent kept "resolving" the surface while the
|
|
94
|
+
mechanism produced fresh false-positives. Three sessions of identical
|
|
95
|
+
banner text. The signal was stuck. Nobody read `session-end.sh`.
|
|
96
|
+
|
|
97
|
+
This rule removes the option to "try harder" when the counter hasn't
|
|
98
|
+
moved. If the counter is stuck, the fix is in the mechanism, not in
|
|
99
|
+
the work.
|
|
100
|
+
|
|
101
|
+
## Relationship to other rules
|
|
102
|
+
|
|
103
|
+
- `blocked-items.md` — the base BLOCKED-resolve-or-explicit-defer
|
|
104
|
+
protocol; stuck-signal is a specific escalation branch
|
|
105
|
+
- `diagnosis.md` — Is/Is-Not + Five Whys applies to the mechanism
|
|
106
|
+
when the signal is stuck
|
|
107
|
+
- `sdlc-gates.md` — observed failure → temperance → diagnose chain;
|
|
108
|
+
stuck-signal is an observed failure in the meta-signal layer
|
|
109
|
+
- `artifact-ingestion.md` — "read the file before producing" extends
|
|
110
|
+
to "read the mechanism before resolving"
|
|
111
|
+
- Post-resolution `/promote` obligation: `blocked-items.md` §"When
|
|
112
|
+
resolution reveals a substrate defect"
|
|
113
|
+
|
|
114
|
+
## Enforcement
|
|
115
|
+
|
|
116
|
+
Methodology-level. The compliance-counter hooks
|
|
117
|
+
(`session-reflection.d/40-gate-compliance.sh` and siblings) name
|
|
118
|
+
mechanism paths in their BLOCKED banners so the agent has the
|
|
119
|
+
literal file paths to read — no guessing about what "mechanism"
|
|
120
|
+
means. If stuck-signal recurs without mechanism-read in the next 6
|
|
121
|
+
months, upgrade to hook-enforced: refuse session advance until an
|
|
122
|
+
Edit tool call lands on the named mechanism path.
|
|
123
|
+
|
|
124
|
+
## Override
|
|
125
|
+
|
|
126
|
+
There is no override. Stuck-signal is the condition under which
|
|
127
|
+
"proceed and try again" is the failure mode. If the counter is
|
|
128
|
+
stuck, the agent reads the mechanism. Full stop.
|
|
129
|
+
|
|
130
|
+
Operator may still explicitly defer the underlying BLOCKED item per
|
|
131
|
+
`blocked-items.md` deferral syntax ("skip metrics this session") —
|
|
132
|
+
but the mechanism-read obligation still fires the next session unless
|
|
133
|
+
the operator also defers that (rare, e.g., "mechanism-read next
|
|
134
|
+
week, I'm unblocking you manually this time").
|
|
135
|
+
|
|
136
|
+
## Retirement condition
|
|
137
|
+
|
|
138
|
+
If counter-stuck incidents fall to zero for 12 months with no
|
|
139
|
+
operator-flagged false-negatives, this rule has done its job.
|
|
140
|
+
Retirement candidate — the methodology-layer habit is durable.
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
globs: ["substrate.config.md", "substrate.secrets.md", ".claude/skills/**/*.md", ".claude/hooks/**/*", "standards/**/*.md"]
|
|
4
|
+
description: Substrate config + secrets schemas — single source of truth for external resource references and secret lifecycle
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Substrate Config + Secrets Schema (rule)
|
|
8
|
+
|
|
9
|
+
Two paired files; each owns one concern:
|
|
10
|
+
|
|
11
|
+
| File | Owns | Standard |
|
|
12
|
+
|------|------|----------|
|
|
13
|
+
| `substrate.config.md` | External resource *references* (Google Doc IDs, URLs, repo refs, env-var names) | `standards/substrate-config-schema.md` |
|
|
14
|
+
| `substrate.secrets.md` | Secret *lifecycle* (rotation cadence, expiry, runbooks, health checks) | `standards/secrets-lifecycle.md` |
|
|
15
|
+
|
|
16
|
+
Both are read at session-start; agents always source from these files.
|
|
17
|
+
|
|
18
|
+
INSTEAD of memory or hardcoded values: read at session-start from
|
|
19
|
+
`substrate.config.md` (resources) and `substrate.secrets.md` (lifecycle).
|
|
20
|
+
|
|
21
|
+
## Agent behavior rules
|
|
22
|
+
|
|
23
|
+
1. **Read resources only from `substrate.config.md`.** When a skill
|
|
24
|
+
or hook needs a doc ID, URL, or similar reference, the agent
|
|
25
|
+
reads it from this file at runtime. Don't hardcode. Don't cache.
|
|
26
|
+
|
|
27
|
+
INSTEAD: read at runtime from `substrate.config.md`. Field name is
|
|
28
|
+
the interface; raw value is implementation detail that can change.
|
|
29
|
+
|
|
30
|
+
2. **Reference by field name, not by raw value.** In project memory,
|
|
31
|
+
in chronicles, in commit messages: say `brand_corpus_doc_id`, not
|
|
32
|
+
`1gps7mmEYBCud...`. The raw value is an implementation detail;
|
|
33
|
+
the field name is the interface.
|
|
34
|
+
|
|
35
|
+
3. **When a resource is missing**, prompt the operator to add it to
|
|
36
|
+
`substrate.config.md` with a typed field name. Use the suffix
|
|
37
|
+
convention: `*_doc_id`, `*_url`, `*_repo`, `*_path`, `*_token_name`,
|
|
38
|
+
etc. (full list in the standard).
|
|
39
|
+
|
|
40
|
+
4. **No raw secrets in `substrate.config.md`.** That file is
|
|
41
|
+
committed to git. Store the *name* of the env var holding the
|
|
42
|
+
secret (`anthropic_key_name: ANTHROPIC_API_KEY`).
|
|
43
|
+
|
|
44
|
+
INSTEAD of inlining the secret value: keep values in their
|
|
45
|
+
authoritative storage (1Password / GitHub Actions Secrets /
|
|
46
|
+
AWS Secrets Manager / `.env`); the config file points by name.
|
|
47
|
+
|
|
48
|
+
5. **Secret *lifecycle* belongs in `substrate.secrets.md`**, not
|
|
49
|
+
`substrate.config.md`. References go in config; rotation cadence,
|
|
50
|
+
expiry dates, runbook paths, and health-check commands go in
|
|
51
|
+
secrets. Each file owns its concern.
|
|
52
|
+
|
|
53
|
+
INSTEAD of mixing concerns: lifecycle metadata (last_rotated,
|
|
54
|
+
expiry_at, rotation_procedure) lives in `substrate.secrets.md`;
|
|
55
|
+
resource references (doc IDs, URLs, env-var names) live in
|
|
56
|
+
`substrate.config.md`. Cross-reference between the two files.
|
|
57
|
+
|
|
58
|
+
6. **No secret VALUES anywhere in the repo.** `substrate.secrets.md`
|
|
59
|
+
tracks references and metadata only — values stay in their
|
|
60
|
+
authoritative storage (1Password / GitHub Actions Secrets / `.env`
|
|
61
|
+
/ AWS Secrets Manager). The session-start hook
|
|
62
|
+
(`.claude/hooks/session-reflection.d/90-secrets-expiry.sh`) surfaces
|
|
63
|
+
BLOCKED when any secret is within `alert_threshold_days`; resolve
|
|
64
|
+
per the entry's `rotation_procedure` runbook.
|
|
65
|
+
|
|
66
|
+
7. **When migrating old code**, replace hardcoded IDs with
|
|
67
|
+
`substrate.config.md` lookups. Grep for the raw ID value across
|
|
68
|
+
`.claude/`, `standards/`, `strategy/`, and the raw content of
|
|
69
|
+
project memory. Replace with field-name reference.
|
|
70
|
+
|
|
71
|
+
## Why this rule exists
|
|
72
|
+
|
|
73
|
+
Before this rule (learned 2026-04-12):
|
|
74
|
+
- Brand corpus doc ID lived in project memory
|
|
75
|
+
- Hardcoded in `/journal-export` skill
|
|
76
|
+
- Also referenced indirectly in other places
|
|
77
|
+
- Agent pushed to wrong doc, operator caught the mismatch, hours of
|
|
78
|
+
confusion and re-pushing followed
|
|
79
|
+
|
|
80
|
+
After: one place. Typed. Skills read at runtime. Memory points by
|
|
81
|
+
name. Agents can't confuse which doc is which because there's only
|
|
82
|
+
one source.
|
|
83
|
+
|
|
84
|
+
## Bootstrap path for new repos
|
|
85
|
+
|
|
86
|
+
When `/autonomous start` scaffolds a new repo's `substrate.config.md`,
|
|
87
|
+
it prompts for every known resource field (per the standard's "Known
|
|
88
|
+
fields" section). Operators can skip (defaults apply), but each known
|
|
89
|
+
field is surfaced once so nothing gets stored in memory or hardcoded
|
|
90
|
+
by accident.
|
|
91
|
+
|
|
92
|
+
## Related
|
|
93
|
+
|
|
94
|
+
- `standards/substrate-config-schema.md` — full standard
|
|
95
|
+
- `.claude/skills/autonomous/SKILL.md` — scaffold prompts for
|
|
96
|
+
each known field
|
|
97
|
+
- `.claude/skills/substrate-check/SKILL.md` — can validate config schema
|
|
98
|
+
compliance in a repo
|