@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.
- package/dist/cli.cjs +40 -6
- package/dist/cli.js +40 -6
- 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,167 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: Autonomous sessions running in ephemeral environments — claude.ai/code mobile sandbox, CI runners executing agentic work, temporary dev containers — have different state-continuity constraints than desktop sessions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mobile / Ephemeral Session Standard
|
|
7
|
+
|
|
8
|
+
Autonomous sessions running in ephemeral environments — claude.ai/code
|
|
9
|
+
mobile sandbox, CI runners executing agentic work, temporary dev
|
|
10
|
+
containers — have different state-continuity constraints than desktop
|
|
11
|
+
sessions. This standard defines what must be true for ephemeral
|
|
12
|
+
sessions to produce reviewable, recoverable work.
|
|
13
|
+
|
|
14
|
+
## The core constraint
|
|
15
|
+
|
|
16
|
+
Ephemeral sandbox state is destroyed when the session ends. Any
|
|
17
|
+
artifact not committed AND pushed before exit is lost.
|
|
18
|
+
|
|
19
|
+
This is different from desktop: desktop auto-save commits locally and
|
|
20
|
+
pushes "when convenient." Ephemeral has no "later" — exit is terminal.
|
|
21
|
+
|
|
22
|
+
## Detection
|
|
23
|
+
|
|
24
|
+
**Primary (required for certainty)**: operator sets `CLAUDE_EPHEMERAL=1`
|
|
25
|
+
as the first command in the session. No heuristics beat explicit
|
|
26
|
+
opt-in.
|
|
27
|
+
|
|
28
|
+
**Fallback heuristics** (if operator doesn't set the flag):
|
|
29
|
+
- `pwd` doesn't start with `/Users/`
|
|
30
|
+
- `hostname` doesn't match known machines
|
|
31
|
+
- `$HOME` isn't the operator's real home
|
|
32
|
+
- Tailscale CLI not installed at `/Applications/Tailscale.app/Contents/MacOS/Tailscale`
|
|
33
|
+
- Fresh-clone reflog (very short history)
|
|
34
|
+
|
|
35
|
+
≥2 heuristics firing → treat as ephemeral with surfaced warning.
|
|
36
|
+
Single heuristic → surface but don't switch modes automatically.
|
|
37
|
+
|
|
38
|
+
**Refine over time**: after the first few mobile sessions, update
|
|
39
|
+
these heuristics based on actual claude.ai/code sandbox environment.
|
|
40
|
+
|
|
41
|
+
## Rules (MUST)
|
|
42
|
+
|
|
43
|
+
### 1. All session artifacts round-trip through git
|
|
44
|
+
|
|
45
|
+
Chronicles, handoff docs, state files, diagnosis output, decomposition
|
|
46
|
+
artifacts — everything MUST be committed AND pushed before the session
|
|
47
|
+
naturally or unnaturally ends. Auto-save hooks in ephemeral mode must
|
|
48
|
+
`git push` after every commit, not batch-push at exit.
|
|
49
|
+
|
|
50
|
+
### 2. No filesystem-only markers
|
|
51
|
+
|
|
52
|
+
Desktop hooks use `/tmp/claude-verify-[branch]` and similar markers.
|
|
53
|
+
These are lost on sandbox death. Every filesystem marker MUST have a
|
|
54
|
+
git-tracked equivalent that the hook also writes and reads. When
|
|
55
|
+
running in ephemeral mode, the git-tracked form is authoritative.
|
|
56
|
+
|
|
57
|
+
| Desktop | Ephemeral-compatible |
|
|
58
|
+
|---------|---------------------|
|
|
59
|
+
| `/tmp/claude-verify-[branch]` | `state/markers/verify/[branch]` (git-tracked, committed by /verify) |
|
|
60
|
+
| Session lock at `.claude/SESSION_LOCK` | Same, but with ISO timestamp + TTL — stale locks auto-clear with ≥30min age |
|
|
61
|
+
| Iteration state in `.claude/iteration-state` | Committed to repo, not gitignored |
|
|
62
|
+
| Agent memory at `~/.claude/projects/...` | Either: (a) commit a memory export to `memory/` in repo, OR (b) accept per-session memory loss, rely on chronicles as context substitute |
|
|
63
|
+
|
|
64
|
+
### 3. Auto-save pushes every commit
|
|
65
|
+
|
|
66
|
+
Hook must:
|
|
67
|
+
- Detect ephemeral mode (env var, hostname pattern, or explicit flag)
|
|
68
|
+
- After each auto-save commit, invoke `git push origin HEAD` with
|
|
69
|
+
reasonable backoff on failure
|
|
70
|
+
- Coalesce commits within the last 10 min to avoid thrashing git
|
|
71
|
+
history
|
|
72
|
+
- If push fails (network, auth, conflict): retry once, then log
|
|
73
|
+
failure visibly — operator sees it in session output
|
|
74
|
+
|
|
75
|
+
### 4. Session-lock TTL + ephemeral-safe
|
|
76
|
+
|
|
77
|
+
Session locks must be:
|
|
78
|
+
- Timestamp-bearing (ISO 8601 in UTC)
|
|
79
|
+
- Stale-clearable (locks ≥30 min old are cleared with an announcement)
|
|
80
|
+
- Git-committed if ephemeral (lives in the repo so other sessions
|
|
81
|
+
can see it)
|
|
82
|
+
|
|
83
|
+
Stale-lock clearing rule: agent reads lock file, checks timestamp, if
|
|
84
|
+
age > TTL, clears lock and announces in session output. No polling;
|
|
85
|
+
one-shot check at session start.
|
|
86
|
+
|
|
87
|
+
### 5. No credential-bearing tools in ephemeral
|
|
88
|
+
|
|
89
|
+
Ephemeral sessions MUST NOT carry long-lived credentials:
|
|
90
|
+
- No SSH keys for prod/staging boxes
|
|
91
|
+
- No AWS access keys
|
|
92
|
+
- No Tailscale auth tokens
|
|
93
|
+
- No long-lived PATs (use fine-grained PATs with short TTL or
|
|
94
|
+
GitHub App installation tokens only)
|
|
95
|
+
|
|
96
|
+
Agents in ephemeral sessions work at the git layer — clone, branch,
|
|
97
|
+
commit, push, open PR. Deploy work happens in CI after PR merge,
|
|
98
|
+
never from the ephemeral sandbox directly.
|
|
99
|
+
|
|
100
|
+
### 6. Session-end rigor is absolute
|
|
101
|
+
|
|
102
|
+
Ephemeral sessions MUST invoke `/session-end` explicitly before exit.
|
|
103
|
+
Stop hook may not fire; operator may close the tab; sandbox may time
|
|
104
|
+
out. Relying on shutdown hooks is the failure mode. Explicit
|
|
105
|
+
session-end at natural stopping points is the rule.
|
|
106
|
+
|
|
107
|
+
Session-end in ephemeral mode:
|
|
108
|
+
1. Write chronicle (commit + push)
|
|
109
|
+
2. Update whereami if changed (commit + push)
|
|
110
|
+
3. Write any LinkedIn drafts (commit + push)
|
|
111
|
+
4. Confirm working tree clean
|
|
112
|
+
5. Confirm HEAD matches origin
|
|
113
|
+
6. Exit only after verification
|
|
114
|
+
|
|
115
|
+
## Rules (SHOULD)
|
|
116
|
+
|
|
117
|
+
### 7. Recent-chronicle read at session start
|
|
118
|
+
|
|
119
|
+
If project memory isn't available (no MCP memory server, no memory
|
|
120
|
+
repo), read the last 2-3 chronicles at session start as context
|
|
121
|
+
substitute. Substantial enough to recover current iteration state,
|
|
122
|
+
open threads, and recent decisions.
|
|
123
|
+
|
|
124
|
+
### 8. Conservative auto-mode in ephemeral
|
|
125
|
+
|
|
126
|
+
Ephemeral sessions default to operator-gated even if orchestrator-
|
|
127
|
+
gated was requested. The ephemeral constraint adds risk that deserves
|
|
128
|
+
confirmation at decision points. Override with explicit
|
|
129
|
+
`orchestrator-gated --ephemeral-ok` flag.
|
|
130
|
+
|
|
131
|
+
### 9. Recipe for "hello world" mobile session
|
|
132
|
+
|
|
133
|
+
First mobile session on any repo should be trivial: chronicle edit,
|
|
134
|
+
doc fix, skill tweak, README update. Not a feature build. Validates
|
|
135
|
+
the end-to-end loop (auth → clone → edit → commit → push → PR)
|
|
136
|
+
before testing anything complex.
|
|
137
|
+
|
|
138
|
+
## Rationale
|
|
139
|
+
|
|
140
|
+
Mobile autonomous is valuable because it compresses the feedback
|
|
141
|
+
loop for idea-to-artifact work (operator has an insight on phone;
|
|
142
|
+
captures it via agent; agent produces artifact; operator reviews on
|
|
143
|
+
desktop). The tax is state continuity — easy to lose work to
|
|
144
|
+
sandbox death.
|
|
145
|
+
|
|
146
|
+
The rules here make state continuity a build-time property of the
|
|
147
|
+
substrate, not a run-time discipline the operator has to remember.
|
|
148
|
+
Every hook, every skill, every rule that already exists keeps working
|
|
149
|
+
as long as it respects these constraints.
|
|
150
|
+
|
|
151
|
+
## Relationship to other standards
|
|
152
|
+
|
|
153
|
+
- `standards/substrate-config-schema.md` — no secrets in
|
|
154
|
+
substrate.config.md (already required); ephemeral just makes
|
|
155
|
+
this more critical
|
|
156
|
+
- `standards/deployment-topology.md` — deploy work happens in CI
|
|
157
|
+
post-PR, never from ephemeral session
|
|
158
|
+
- `.claude/rules/blocked-items.md` — BLOCKED: protocol continues to
|
|
159
|
+
work in ephemeral; silence is not deferral in either mode
|
|
160
|
+
|
|
161
|
+
## Enforcement
|
|
162
|
+
|
|
163
|
+
Hook layer enforces what it can (auto-save push, marker git-tracking,
|
|
164
|
+
session lock TTL). Agent behavior enforces the rest (explicit
|
|
165
|
+
session-end, no credential tools, conservative auto-mode).
|
|
166
|
+
Self-test skill could validate hook configuration when run in
|
|
167
|
+
ephemeral mode.
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: - ADR-021 — anchor catalog selection (cameo engine model context, now operator-internal) - bassclef#853 Sub-bet 16 + Sub-bet 19 — model routing substrate primitive - bassclef#944 — Voyage matcher excision (operator-internal pinning moved to…
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Model routing discipline
|
|
7
|
+
|
|
8
|
+
## Sources read
|
|
9
|
+
|
|
10
|
+
- ADR-021 — anchor catalog selection (cameo engine model context, now operator-internal)
|
|
11
|
+
- bassclef#853 Sub-bet 16 + Sub-bet 19 — model routing substrate primitive
|
|
12
|
+
- bassclef#944 — Voyage matcher excision (operator-internal pinning moved to bassclef-upstream)
|
|
13
|
+
- `.claude/agents/*.md` existing tier declarations (Opus / Sonnet / Haiku across 13 agents)
|
|
14
|
+
- Operator spec: provider-agnostic routing supporting 10+ providers
|
|
15
|
+
|
|
16
|
+
## What this is
|
|
17
|
+
|
|
18
|
+
Model routing is how bassclef's agents, skills, and subagents pick which LLM to call at dispatch time. The substrate names four capability tiers — `cheap-fast`, `balanced`, `capable`, `embedding`. Each provider maps its concrete models to those tiers in `config/model-routing.yaml`.
|
|
19
|
+
|
|
20
|
+
Agents declare a tier in frontmatter. Skills can override per invocation. The substrate resolves the concrete model at dispatch time from the active provider + tier mapping.
|
|
21
|
+
|
|
22
|
+
## Why this exists
|
|
23
|
+
|
|
24
|
+
Three problems the old shape didn't solve:
|
|
25
|
+
|
|
26
|
+
1. Agent frontmatter pinned vendor-specific model IDs (`claude-opus-4-6`, `claude-sonnet-4-6`, `claude-haiku-4-5`). Switching providers meant editing every agent file.
|
|
27
|
+
2. Adopters using OpenAI, Gemini, Bedrock, etc. couldn't reuse bassclef's agent definitions without rewriting model declarations.
|
|
28
|
+
3. Per-skill or per-call model selection had no clean override path. Operator env vars worked but weren't documented.
|
|
29
|
+
|
|
30
|
+
This primitive fixes all three: agents declare a tier, not a vendor. Adopters edit `config/model-routing.yaml` to pick their provider. Per-invocation overrides cascade through a clear precedence stack.
|
|
31
|
+
|
|
32
|
+
## The four capability tiers
|
|
33
|
+
|
|
34
|
+
| Tier | When to use |
|
|
35
|
+
|---|---|
|
|
36
|
+
| **cheap-fast** | High-frequency, low-complexity, structured output. Checklist eval, file navigation, simple extraction, automation, runbook execution. |
|
|
37
|
+
| **balanced** | Default for most agents. Code edits, planning, analysis, design, strategic reasoning. |
|
|
38
|
+
| **capable** | High-complexity reasoning, architectural decisions, problem framing, synthesis across many docs. |
|
|
39
|
+
| **embedding** | Vector embeddings for retrieval (semantic search, anchor matching). Not a chat model. |
|
|
40
|
+
|
|
41
|
+
Tiers describe capability, not vendor. The same tier maps to different concrete models per provider.
|
|
42
|
+
|
|
43
|
+
### Tiers are vocabulary, not benchmark
|
|
44
|
+
|
|
45
|
+
The four tier names describe **intent**, not measured cross-provider equivalence. A `capable` model on one provider is not strictly equal to a `capable` model on another — output quality, latency, cost, and context window all vary. The tier abstraction picks the right shape of model for a workload; adopters validate the concrete mapping against their own workloads before pinning a provider.
|
|
46
|
+
|
|
47
|
+
INSTEAD of treating tiers as benchmark guarantees: read them as design intent. "Use capable" means "this work needs the strongest reasoning the provider ships." Whether that's Claude Opus, GPT-o1, Gemini 2.0 Pro, or Mistral Large 2 depends on the provider's roadmap — and on what the adopter measures against their own jobs.
|
|
48
|
+
|
|
49
|
+
This framing prevents the cross-provider semantic-equivalence misread: tiers are a coordination mechanism, not a quality contract.
|
|
50
|
+
|
|
51
|
+
## How to declare
|
|
52
|
+
|
|
53
|
+
### In an agent definition
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
---
|
|
57
|
+
name: Closer
|
|
58
|
+
model_tier: cheap-fast
|
|
59
|
+
description: Administrative gate evaluation; checklists; retros.
|
|
60
|
+
---
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### In a skill (optional per-call override)
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
---
|
|
67
|
+
name: example-skill
|
|
68
|
+
model_tier: capable # overrides invoking agent's tier
|
|
69
|
+
---
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### In substrate.config.md (per-repo provider default)
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
## Model routing
|
|
76
|
+
|
|
77
|
+
# Default provider for this repo. Tier-to-model mapping comes from
|
|
78
|
+
# bassclef's config/model-routing.yaml unless overridden here.
|
|
79
|
+
model_provider: anthropic
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Override precedence
|
|
83
|
+
|
|
84
|
+
When resolving a model at dispatch, the substrate walks this stack from highest to lowest priority:
|
|
85
|
+
|
|
86
|
+
| Priority | Source | Notes |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| 1 | `CLAUDE_MODEL_OVERRIDE` env var | Direct vendor model ID; bypasses tier resolution |
|
|
89
|
+
| 2 | Per-invocation flag (skill arg) | `--model gpt-4o` style override |
|
|
90
|
+
| 3 | Skill-level `model_tier:` declaration | Skill frontmatter |
|
|
91
|
+
| 4 | Agent-level `model_tier:` declaration | Agent frontmatter |
|
|
92
|
+
| 5 | Per-repo `model_provider:` in substrate.config.md | Repo default; pairs with tier above |
|
|
93
|
+
| 6 | Substrate default in `config/model-routing.yaml` | `default_provider:` field |
|
|
94
|
+
|
|
95
|
+
INSTEAD of hardcoding vendor model IDs in agent definitions: declare a tier; let the resolution stack pick the concrete model. The override path stays open at every layer for genuine reasons (vendor pinning, per-call experimentation, operator emergency override).
|
|
96
|
+
|
|
97
|
+
## How adopters extend
|
|
98
|
+
|
|
99
|
+
Adopters use any LLM provider — Anthropic, OpenAI, Google Gemini, AWS Bedrock, Azure OpenAI, Mistral, Cohere, DeepSeek, xAI, local LLaMA, or any future provider.
|
|
100
|
+
|
|
101
|
+
To add a new provider:
|
|
102
|
+
|
|
103
|
+
1. Edit `config/model-routing.yaml`. Add a provider block under `providers:` with tier mappings.
|
|
104
|
+
2. Set `default_provider:` to the new provider (or leave the default and set per-repo).
|
|
105
|
+
3. The agents work unchanged.
|
|
106
|
+
|
|
107
|
+
No agent edits. No skill edits. The tier abstraction does the work.
|
|
108
|
+
|
|
109
|
+
## What the substrate ships
|
|
110
|
+
|
|
111
|
+
`config/model-routing.yaml` ships defaults for ten providers:
|
|
112
|
+
|
|
113
|
+
- **Anthropic** — Claude family (Opus 4.7, Sonnet 4.6, Haiku 4.5)
|
|
114
|
+
- **OpenAI** — GPT family
|
|
115
|
+
- **Google Gemini** — Gemini family
|
|
116
|
+
- **AWS Bedrock** — Bedrock-hosted Anthropic models
|
|
117
|
+
- **Azure OpenAI** — Azure-hosted GPT
|
|
118
|
+
- **Mistral** — Mistral family
|
|
119
|
+
- **Cohere** — Command family + embed models
|
|
120
|
+
- **DeepSeek** — DeepSeek-V3 / DeepSeek-Coder
|
|
121
|
+
- **xAI** — Grok family
|
|
122
|
+
- **local-llama** — Self-hosted Llama 3
|
|
123
|
+
|
|
124
|
+
The defaults are starting points. Operator can pin specific versions, swap models within a tier, or add new providers via config edit.
|
|
125
|
+
|
|
126
|
+
## How adopter-internal primitives reference this
|
|
127
|
+
|
|
128
|
+
Operator-internal pinning decisions (anchor catalog model choices, embedding-vendor selection) stay in `bassclef-upstream/docs/operator-private/adrs/` per Tier 1 substrate. The pins reference this routing primitive: operator-internal substrate calls `state_routing_resolve(tier='embedding', purpose='<purpose>')` which reads the operator-internal config to pick the concrete embedding model.
|
|
129
|
+
|
|
130
|
+
Adopters don't need the operator-internal pinning decisions. The substrate primitive gives them the tier abstraction; their config picks the concrete model.
|
|
131
|
+
|
|
132
|
+
## What this primitive does NOT do
|
|
133
|
+
|
|
134
|
+
- Does not choose a tier for you. Agent definitions declare the tier.
|
|
135
|
+
- Does not call the LLM. The harness does that with the resolved model ID.
|
|
136
|
+
- Does not handle rate limits, retries, or fallbacks. Those are runtime concerns (separate primitive — see bassclef#853 Sub-bet 20 parallel-dispatch ceiling).
|
|
137
|
+
- Does not move secrets. Provider API keys live in `substrate.secrets.md` per `standards/secrets-lifecycle.md`. This primitive only routes between providers; the secrets layer authenticates each call.
|
|
138
|
+
|
|
139
|
+
## Composes with
|
|
140
|
+
|
|
141
|
+
- ADR-021 — anchor catalog selection (operator-internal; references this primitive)
|
|
142
|
+
- ADR-023 — dependency-aware pre-flight dispatch (Sub-bet 13)
|
|
143
|
+
- ADR-025 — atomic write-claim (Sub-bet 9)
|
|
144
|
+
- bassclef#853 Sub-bet 17 — subagent isolation (different concern; both fire pre-dispatch)
|
|
145
|
+
- bassclef#853 Sub-bet 18 — session marker handoff (different concern; both fire pre-dispatch)
|
|
146
|
+
- bassclef#853 Sub-bet 20 — parallel-dispatch ceiling (caps concurrent agents per plan capacity)
|
|
147
|
+
- `standards/vendor-bindings.md` — this primitive is the SENTINEL_bassclef_answer to "how do we stay portable across LLM vendors"
|
|
148
|
+
- `standards/secrets-lifecycle.md` — provider API keys live there
|
|
149
|
+
|
|
150
|
+
## Override path
|
|
151
|
+
|
|
152
|
+
`SKIP_MODEL_ROUTING=1 <command>` — bypasses tier resolution entirely. Logged via trace-helper. Use only when debugging a routing bug or when a one-off vendor model is needed for a specific call that isn't worth a permanent config entry.
|
|
153
|
+
|
|
154
|
+
## Retirement condition
|
|
155
|
+
|
|
156
|
+
This primitive retires only if the harness ships a built-in tier abstraction that supersedes it. Until then, this discipline holds across all bassclef-substrate agents + skills + subagents.
|
|
157
|
+
|
|
158
|
+
## Closes
|
|
159
|
+
|
|
160
|
+
bassclef#853 Sub-bet 16 (model routing substrate primitive) + Sub-bet 19 (provider-agnostic extension across 10+ providers).
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: Bassclef schema for user personas in sunj-labs repos.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Persona Schema
|
|
7
|
+
|
|
8
|
+
Bassclef schema for user personas in sunj-labs repos. The contract the
|
|
9
|
+
`/personas` skill reads and every downstream consumer (`/value-prop-canvas`,
|
|
10
|
+
`/synthetic-user`, `/risk-test-synthetic`, `/user-stories`, `/jtbd-tasks`,
|
|
11
|
+
`/spec`, `/prototype-variants`) composes against.
|
|
12
|
+
|
|
13
|
+
Template: `templates/persona-template.md`.
|
|
14
|
+
Skill: `.claude/skills/personas/SKILL.md`.
|
|
15
|
+
|
|
16
|
+
## Why this standard exists
|
|
17
|
+
|
|
18
|
+
Before this schema, persona shape was implicit and scattered:
|
|
19
|
+
|
|
20
|
+
- `.claude/skills/jtbd-tasks/SKILL.md` Step 0 defined a "minimum viable
|
|
21
|
+
persona" with 5 fields (Age, Role, Device, Goal, Jargon comfort)
|
|
22
|
+
- `.claude/skills/synthetic-user/SKILL.md` read personas from
|
|
23
|
+
`docs/design/personas/` with no schema validation
|
|
24
|
+
- sunj-labs/quorum invented its own richer shape (Pichler + evidence-
|
|
25
|
+
traceability) for psychographic-mining output — not reflected anywhere
|
|
26
|
+
in bassclef
|
|
27
|
+
|
|
28
|
+
Three consumers, three schemas, zero validation. Adding `/value-prop-canvas`
|
|
29
|
+
and `/risk-test-synthetic` without standardizing would have made four.
|
|
30
|
+
|
|
31
|
+
This standard consolidates around Pichler's template shape, adds evidence-
|
|
32
|
+
traceability as a distinguishing rule, and preserves both prior path
|
|
33
|
+
conventions for backward compat.
|
|
34
|
+
|
|
35
|
+
## File convention
|
|
36
|
+
|
|
37
|
+
### Preferred path
|
|
38
|
+
|
|
39
|
+
`docs/personas/{slug}.md` — one file per persona.
|
|
40
|
+
|
|
41
|
+
Filename basename MUST match the `slug` field in the file's body. The
|
|
42
|
+
slug is URL-safe: lowercase, hyphens, no spaces.
|
|
43
|
+
|
|
44
|
+
### Legacy path (accepted)
|
|
45
|
+
|
|
46
|
+
`docs/design/personas/{slug}.md` — read by `/jtbd-tasks` and `/synthetic-user`
|
|
47
|
+
before this standard existed. Still valid. Consumers read both paths,
|
|
48
|
+
preferring `docs/personas/` when both exist.
|
|
49
|
+
|
|
50
|
+
New repos SHOULD use `docs/personas/`. Existing repos MAY migrate or
|
|
51
|
+
leave legacy files in place; consolidating bet may follow.
|
|
52
|
+
|
|
53
|
+
## Required fields
|
|
54
|
+
|
|
55
|
+
Every persona file MUST have:
|
|
56
|
+
|
|
57
|
+
| Field | Shape | Example |
|
|
58
|
+
|-------|-------|---------|
|
|
59
|
+
| `slug` | URL-safe identifier, matches filename | `couple-founders` |
|
|
60
|
+
| `name` | Human-readable display name (H1 satisfies) | `Couple Founders` |
|
|
61
|
+
|
|
62
|
+
Absent any required field → `/personas validate` reports FAIL. Downstream
|
|
63
|
+
skills SHOULD refuse to operate on invalid personas.
|
|
64
|
+
|
|
65
|
+
The required set is intentionally minimal. `slug` + `name` is enough to
|
|
66
|
+
reference a persona unambiguously; everything else is quality-of-output
|
|
67
|
+
for downstream skills, not a load-bearing contract at the identity level.
|
|
68
|
+
|
|
69
|
+
## Recommended fields (Pichler shape + outcome framing)
|
|
70
|
+
|
|
71
|
+
High-value personas carry the full Pichler template plus an explicit
|
|
72
|
+
goal line:
|
|
73
|
+
|
|
74
|
+
| Field | Purpose |
|
|
75
|
+
|-------|---------|
|
|
76
|
+
| `goal` | One-line "what this persona is trying to accomplish" — verb-first, outcome-oriented |
|
|
77
|
+
| `tasks` | Recurring tasks in pursuit of the goal |
|
|
78
|
+
| `approach` | How they go about it (habits, tools, rhythm) |
|
|
79
|
+
| `context` | Life / business / organizational grounding |
|
|
80
|
+
| `knowledge` | Domain expertise, jargon comfort, technical fluency |
|
|
81
|
+
| `biography` | Background, archetype, formative influences |
|
|
82
|
+
|
|
83
|
+
Absence produces WARN (not FAIL) in validation. A persona with only the
|
|
84
|
+
required fields is valid but thin — downstream skills will produce
|
|
85
|
+
thinner outputs against it.
|
|
86
|
+
|
|
87
|
+
**Goal inference fallback:** if a persona omits `goal` but has a
|
|
88
|
+
`## JTBD statements` section, `/personas validate` prints an INFER line
|
|
89
|
+
suggesting a goal derivable from the first JTBD. This is advisory, not
|
|
90
|
+
auto-applied — the operator reviews and edits the file. The rationale:
|
|
91
|
+
downstream skills like `/value-prop-canvas` and `/user-stories` need an
|
|
92
|
+
unambiguous goal, and silent inference produces inconsistent results
|
|
93
|
+
across consumers. Surface the gap once, let the operator resolve it, and
|
|
94
|
+
every downstream read is consistent.
|
|
95
|
+
|
|
96
|
+
## Evidence-traceability rule
|
|
97
|
+
|
|
98
|
+
A persona that claims pain points, workflows, or behavior patterns MUST
|
|
99
|
+
cite sources. Claims without source traces are **orphan claims** and
|
|
100
|
+
surface as WARN in `/personas validate`.
|
|
101
|
+
|
|
102
|
+
### Bassclef citation format
|
|
103
|
+
|
|
104
|
+
```markdown
|
|
105
|
+
### P1 — Concise pain label
|
|
106
|
+
|
|
107
|
+
[Paragraph describing the pain.]
|
|
108
|
+
|
|
109
|
+
> *Source trace: [source-N reference] — "[direct quote or close paraphrase]"*
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
Acceptable source types:
|
|
113
|
+
|
|
114
|
+
- Repo-local research document (e.g., `docs/research/reddit-synthesis.md §3`)
|
|
115
|
+
- External URL (articles, interviews, public forum posts)
|
|
116
|
+
- Attributed interview note (`interview/YYYY-MM-DD-name.md §4`)
|
|
117
|
+
- Analytics dashboard reference (product metric + timeframe)
|
|
118
|
+
|
|
119
|
+
Not acceptable: "common knowledge," "I've seen this before," unattributed
|
|
120
|
+
assertions, operator intuition.
|
|
121
|
+
|
|
122
|
+
### Why this rule exists
|
|
123
|
+
|
|
124
|
+
Personas without source traces fail silently. They look plausible, their
|
|
125
|
+
synthesized behaviors read naturally, and downstream skills (VPC,
|
|
126
|
+
synthetic-user) produce plausible-looking artifacts against them. The
|
|
127
|
+
artifacts fail on contact with actual users because the foundational
|
|
128
|
+
persona was a pattern-match on training priors, not evidence.
|
|
129
|
+
|
|
130
|
+
Parallel to `.claude/rules/artifact-ingestion.md`: read before you
|
|
131
|
+
produce. Cite before you claim.
|
|
132
|
+
|
|
133
|
+
## Operator-default fallback
|
|
134
|
+
|
|
135
|
+
Repos without persona files are common — new repos, internal tooling,
|
|
136
|
+
early spikes. `/personas default` emits a minimal operator persona
|
|
137
|
+
derived from:
|
|
138
|
+
|
|
139
|
+
- `CLAUDE.md` (for goal / context)
|
|
140
|
+
- `substrate.config.md` (for agents / deploy targets)
|
|
141
|
+
- `docs/whereami.md` (for active iteration context)
|
|
142
|
+
- Git `user.email` (for slug derivation)
|
|
143
|
+
|
|
144
|
+
### When operator-default is appropriate
|
|
145
|
+
|
|
146
|
+
- New repo; first iteration; no user research yet
|
|
147
|
+
- Internal tooling where the operator IS the user
|
|
148
|
+
- Spike / prototype sessions where user identity is deliberately deferred
|
|
149
|
+
|
|
150
|
+
### When it's a red flag
|
|
151
|
+
|
|
152
|
+
Operator-default leaking into these situations means the product is
|
|
153
|
+
being validated against the operator's self-assessment, which is not
|
|
154
|
+
user validation:
|
|
155
|
+
|
|
156
|
+
- `/synthetic-user` running Tier 3 journeys against operator-default
|
|
157
|
+
- `/value-prop-canvas` built from operator-default (value prop for
|
|
158
|
+
"you" tells you nothing about fit for real customers)
|
|
159
|
+
- Iteration goal lovability/viability signals tied to operator-default
|
|
160
|
+
|
|
161
|
+
`/personas validate` surfaces these with a note:
|
|
162
|
+
"Only operator-default persona found; consider adding real personas
|
|
163
|
+
before [downstream skill]."
|
|
164
|
+
|
|
165
|
+
## Multiple personas — no compression
|
|
166
|
+
|
|
167
|
+
If three real customer segments exist, three persona files exist. Do NOT
|
|
168
|
+
collapse into a "composite customer" or "typical user" — compression
|
|
169
|
+
loses the fit signal that `/value-prop-canvas` and `/risk-test-synthetic`
|
|
170
|
+
depend on.
|
|
171
|
+
|
|
172
|
+
VPC is 1:1 with persona. Risk-test matrices are persona × risk × artifact.
|
|
173
|
+
A single merged persona flattens the matrix.
|
|
174
|
+
|
|
175
|
+
## Validation checklist
|
|
176
|
+
|
|
177
|
+
`/personas validate` walks every persona file under both bassclef and
|
|
178
|
+
legacy paths and reports:
|
|
179
|
+
|
|
180
|
+
- [ ] Required fields (slug, name) present — FAIL on absence
|
|
181
|
+
- [ ] Slug matches filename basename — FAIL on mismatch
|
|
182
|
+
- [ ] Pichler recommended fields (goal, tasks, approach, context, knowledge, biography) — WARN on absence
|
|
183
|
+
- If `goal` is absent but a `## JTBD statements` section exists, emit INFER line with suggested goal derived from first JTBD
|
|
184
|
+
- [ ] Evidence traces present for behavior/pain claims — WARN on orphans
|
|
185
|
+
- [ ] No duplicate slugs across files — FAIL on duplicate
|
|
186
|
+
- [ ] File is readable markdown (parses without error) — FAIL otherwise
|
|
187
|
+
|
|
188
|
+
Output format:
|
|
189
|
+
|
|
190
|
+
```markdown
|
|
191
|
+
## Persona validation
|
|
192
|
+
|
|
193
|
+
**Files scanned**: N in docs/personas/, M in docs/design/personas/
|
|
194
|
+
|
|
195
|
+
| File | Required | Pichler | Evidence | Slug-match | Status |
|
|
196
|
+
|------|----------|---------|----------|-----------|--------|
|
|
197
|
+
| [file] | ✅/❌ | ✅/⚠️ | ✅/⚠️ | ✅/❌ | PASS/WARN/FAIL |
|
|
198
|
+
|
|
199
|
+
**Pass**: N | **Warn**: M | **Fail**: K
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Relationship to other standards
|
|
203
|
+
|
|
204
|
+
| Standard / rule | Connection |
|
|
205
|
+
|-----------------|-----------|
|
|
206
|
+
| `.claude/rules/artifact-ingestion.md` | Evidence-traceability is artifact-ingestion applied to personas specifically |
|
|
207
|
+
| `standards/whereami-schema.md` | Same "schema + template + skill + rule" pattern; different domain |
|
|
208
|
+
| `standards/substrate-config-schema.md` | Operator-default fallback reads substrate.config fields |
|
|
209
|
+
| `.claude/skills/jtbd-tasks/SKILL.md` | Step 0 "minimum viable persona" is a subset view of this schema; valid but thin |
|
|
210
|
+
| `.claude/skills/synthetic-user/SKILL.md` | Existing consumer; reads legacy path; continues to work |
|
|
211
|
+
|
|
212
|
+
## Future evolution
|
|
213
|
+
|
|
214
|
+
When `/psychographic-mine` (quorum #54) and `/auto-user-research`
|
|
215
|
+
(quorum #53) promote to bassclef, they produce files conforming to
|
|
216
|
+
this schema with High evidence-quality ratings by construction.
|
|
217
|
+
|
|
218
|
+
When `/jtbd-tasks` consolidates its Step 0 to delegate to `/personas
|
|
219
|
+
default` or `/personas get`, the "minimum viable persona" variant
|
|
220
|
+
becomes a template preset rather than a parallel shape.
|
|
221
|
+
|
|
222
|
+
Neither consolidation happens in this bet's scope — both deferred to
|
|
223
|
+
follow-up iterations so this standard ships with a stable contract
|
|
224
|
+
first.
|
|
225
|
+
|
|
226
|
+
## Closes
|
|
227
|
+
|
|
228
|
+
- bassclef #200 (companion to quorum #50)
|
|
229
|
+
- Part of iteration `docs/iteration-bets/2026-04-19e-persona-vpc-promotions.md` Stack-1
|