@thebassclef/lite 1.0.4 → 1.1.1
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 +298 -55
- package/dist/cli.js +298 -55
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lite/.claude/agents/architect.md +70 -0
- package/dist/lite/.claude/agents/builder.md +114 -0
- package/dist/lite/.claude/agents/designer.md +156 -0
- package/dist/lite/.claude/agents/reviewer.md +88 -0
- package/dist/lite/.claude/hooks/bassclef-sync.sh +85 -27
- package/dist/lite/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
- package/dist/lite/.claude/hooks/longrun-prep-render-check.sh +236 -0
- package/dist/lite/.claude/hooks/persona-name-scrub-check.sh +105 -0
- package/dist/lite/.claude/hooks/skill-step-list-check.sh +171 -0
- package/dist/lite/.claude/luminaries/alan-cooper.md +170 -0
- package/dist/lite/.claude/luminaries/alistair-cockburn.md +140 -0
- package/dist/lite/.claude/luminaries/amazon-pr-faq.md +34 -0
- package/dist/lite/.claude/luminaries/andreas-zeller.md +74 -0
- package/dist/lite/.claude/luminaries/ash-maurya.md +121 -0
- package/dist/lite/.claude/luminaries/bill-buxton.md +210 -0
- package/dist/lite/.claude/luminaries/charles-sanders-peirce.md +150 -0
- package/dist/lite/.claude/luminaries/david-ogilvy.md +192 -0
- package/dist/lite/.claude/luminaries/don-norman.md +173 -0
- package/dist/lite/.claude/luminaries/edward-tufte.md +179 -0
- package/dist/lite/.claude/luminaries/eric-evans.md +160 -0
- package/dist/lite/.claude/luminaries/frederick-brooks.md +50 -0
- package/dist/lite/.claude/luminaries/gang-of-four.md +157 -0
- package/dist/lite/.claude/luminaries/glenford-myers.md +230 -0
- package/dist/lite/.claude/luminaries/hunt-thomas.md +115 -0
- package/dist/lite/.claude/luminaries/hyrum-wright.md +94 -0
- package/dist/lite/.claude/luminaries/jason-fried-dhh.md +46 -0
- package/dist/lite/.claude/luminaries/jesse-james-garrett.md +154 -0
- package/dist/lite/.claude/luminaries/john-ousterhout.md +94 -0
- package/dist/lite/.claude/luminaries/karl-popper.md +132 -0
- package/dist/lite/.claude/luminaries/kent-beck.md +168 -0
- package/dist/lite/.claude/luminaries/linus-torvalds.md +218 -0
- package/dist/lite/.claude/luminaries/martin-fowler.md +164 -0
- package/dist/lite/.claude/luminaries/michael-feathers.md +125 -0
- package/dist/lite/.claude/luminaries/michael-nygard.md +118 -0
- package/dist/lite/.claude/luminaries/robert-c-martin.md +164 -0
- package/dist/lite/.claude/luminaries/saltzer-schroeder.md +194 -0
- package/dist/lite/.claude/luminaries/sophia-prater.md +193 -0
- package/dist/lite/.claude/luminaries/stephen-toulmin.md +131 -0
- package/dist/lite/.claude/luminaries/tony-hoare.md +170 -0
- package/dist/lite/.claude/luminaries/vaughn-vernon.md +50 -0
- package/dist/lite/.claude/luminaries/w-edwards-deming.md +158 -0
- package/dist/lite/.claude/rules/accessor-library-discipline.md +110 -0
- package/dist/lite/.claude/rules/adr-discipline.md +96 -0
- package/dist/lite/.claude/rules/api-conventions.md +115 -0
- package/dist/lite/.claude/rules/artifact-ingestion.md +137 -0
- package/dist/lite/.claude/rules/assert-only-after-verify.md +111 -0
- package/dist/lite/.claude/rules/blocked-items.md +139 -0
- package/dist/lite/.claude/rules/bootstrap-pair-discipline.md +106 -0
- package/dist/lite/.claude/rules/branching.md +28 -0
- package/dist/lite/.claude/rules/cold-adopter-harness-discipline.md +93 -0
- package/dist/lite/.claude/rules/commit-conventions.md +22 -0
- package/dist/lite/.claude/rules/compounding-axis-fresh-analysis.md +173 -0
- package/dist/lite/.claude/rules/compounding-sequence-fresh-analysis.md +173 -0
- package/dist/lite/.claude/rules/context-engineering.md +155 -0
- package/dist/lite/.claude/rules/context-management.md +85 -0
- package/dist/lite/.claude/rules/defensive-bash.md +52 -0
- package/dist/lite/.claude/rules/deferred-actions.md +233 -0
- package/dist/lite/.claude/rules/destructive-operations.md +69 -0
- package/dist/lite/.claude/rules/diagnosis.md +38 -0
- package/dist/lite/.claude/rules/github-issue-flash-tweet.md +114 -0
- package/dist/lite/.claude/rules/guardrails.md +73 -0
- package/dist/lite/.claude/rules/hook-wire-on-author.md +77 -0
- package/dist/lite/.claude/rules/identifier-leak-prevention.md +73 -0
- package/dist/lite/.claude/rules/iteration-bet-brief-completeness.md +43 -0
- package/dist/lite/.claude/rules/lite-manifest-schema-change-discipline.md +79 -0
- package/dist/lite/.claude/rules/longrun-prep-plan-doc-compression.md +77 -0
- package/dist/lite/.claude/rules/loop-discipline.md +71 -0
- package/dist/lite/.claude/rules/manual-prod-approval.md +100 -0
- package/dist/lite/.claude/rules/marker-enrichment-discipline.md +72 -0
- package/dist/lite/.claude/rules/mobile-ephemeral-session.md +109 -0
- package/dist/lite/.claude/rules/new-dependency-check.md +44 -0
- package/dist/lite/.claude/rules/oo-ad-entry-point.md +95 -0
- package/dist/lite/.claude/rules/operator-facing-prose.md +177 -0
- package/dist/lite/.claude/rules/option-label-discipline.md +82 -0
- package/dist/lite/.claude/rules/pattern-annotation.md +83 -0
- package/dist/lite/.claude/rules/persona-name-leak-scrub.md +90 -0
- package/dist/lite/.claude/rules/plain-english-discipline.md +132 -0
- package/dist/lite/.claude/rules/plan-enumeration-needs-value-props.md +177 -0
- package/dist/lite/.claude/rules/pr-body-shape.md +195 -0
- package/dist/lite/.claude/rules/pr-strategy.md +142 -0
- package/dist/lite/.claude/rules/pr-title-shape.md +90 -0
- package/dist/lite/.claude/rules/prototype-workflow.md +53 -0
- package/dist/lite/.claude/rules/reserved-skill-names.md +103 -0
- package/dist/lite/.claude/rules/schema-management.md +42 -0
- package/dist/lite/.claude/rules/sdlc-gates.md +149 -0
- package/dist/lite/.claude/rules/security.md +37 -0
- package/dist/lite/.claude/rules/session-artifacts.md +236 -0
- package/dist/lite/.claude/rules/skill-composition-declarations.md +105 -0
- package/dist/lite/.claude/rules/skill-description-clarity.md +196 -0
- package/dist/lite/.claude/rules/skill-procedure-step-list.md +119 -0
- package/dist/lite/.claude/rules/sprint-prep-preset-picker.md +76 -0
- package/dist/lite/.claude/rules/state-schema-validation.md +156 -0
- package/dist/lite/.claude/rules/stuck-signal-diagnostic.md +111 -0
- package/dist/lite/.claude/rules/substrate-config-schema.md +85 -0
- package/dist/lite/.claude/rules/test-list-discipline.md +129 -0
- package/dist/lite/.claude/rules/test-sufficiency.md +186 -0
- package/dist/lite/.claude/rules/testing-tier-config.md +125 -0
- package/dist/lite/.claude/rules/testing.md +38 -0
- package/dist/lite/.claude/rules/turn-estimate-grounding.md +82 -0
- package/dist/lite/.claude/rules/visual-hierarchy.md +427 -0
- package/dist/lite/.claude/rules/we-dont-break-adopters.md +103 -0
- package/dist/lite/.claude/rules/whereami-load-bearing.md +184 -0
- package/dist/lite/.claude/rules/writing-craft-discipline.md +72 -0
- package/dist/lite/.claude/rules/wu-sequencing-compounds.md +119 -0
- package/dist/lite/.claude/skills/build/SKILL.md +640 -0
- package/dist/lite/.claude/skills/chronicle/SKILL.md +55 -0
- package/dist/lite/.claude/skills/clean-artifacts/SKILL.md +249 -0
- package/dist/lite/.claude/skills/decompose/SKILL.md +280 -0
- package/dist/lite/.claude/skills/diagnose/SKILL.md +297 -0
- package/dist/lite/.claude/skills/feynman/SKILL.md +90 -0
- package/dist/lite/.claude/skills/howdoi/SKILL.md +105 -0
- package/dist/lite/.claude/skills/ia-model/SKILL.md +108 -0
- package/dist/lite/.claude/skills/interaction-design/SKILL.md +112 -0
- package/dist/lite/.claude/skills/interpret-input/SKILL.md +180 -0
- package/dist/lite/.claude/skills/journal/SKILL.md +209 -0
- package/dist/lite/.claude/skills/kiss/SKILL.md +449 -0
- package/dist/lite/.claude/skills/launch/SKILL.md +915 -0
- package/dist/lite/.claude/skills/lean-canvas/SKILL.md +332 -0
- package/dist/lite/.claude/skills/longrun/SKILL.md +512 -0
- package/dist/lite/.claude/skills/luminary/SKILL.md +481 -0
- package/dist/lite/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
- package/dist/lite/.claude/skills/onboard-repo/SKILL.md +1640 -0
- package/dist/lite/.claude/skills/pattern-review/SKILL.md +99 -0
- package/dist/lite/.claude/skills/personas/SKILL.md +207 -0
- package/dist/lite/.claude/skills/promote/SKILL.md +283 -0
- package/dist/lite/.claude/skills/requirement/SKILL.md +98 -0
- package/dist/lite/.claude/skills/retro/SKILL.md +117 -0
- package/dist/lite/.claude/skills/riff/SKILL.md +114 -0
- package/dist/lite/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
- package/dist/lite/.claude/skills/session-end/SKILL.md +309 -0
- package/dist/lite/.claude/skills/session-log/SKILL.md +299 -0
- package/dist/lite/.claude/skills/skills/SKILL.md +228 -0
- package/dist/lite/.claude/skills/spec/SKILL.md +105 -0
- package/dist/lite/.claude/skills/sprint/SKILL.md +418 -0
- package/dist/lite/.claude/skills/stage/SKILL.md +384 -0
- package/dist/lite/.claude/skills/state-a-problem/SKILL.md +185 -0
- package/dist/lite/.claude/skills/temperance/SKILL.md +108 -0
- package/dist/lite/.claude/skills/use-case/SKILL.md +417 -0
- package/dist/lite/.claude/skills/user-stories/SKILL.md +268 -0
- package/dist/lite/.claude/skills/value-prop/SKILL.md +251 -0
- package/dist/lite/.claude/skills/verify/SKILL.md +160 -0
- package/dist/lite/.claude/skills/visual-review/SKILL.md +503 -0
- package/dist/lite/.claude/skills/whats-the-plan/SKILL.md +202 -0
- package/dist/lite/.claude/skills/whereami/SKILL.md +307 -0
- package/dist/lite/AGENTS.md +79 -0
- package/dist/lite/CLAUDE-lite.md +85 -0
- package/dist/lite/CODE_OF_CONDUCT.md +28 -0
- package/dist/lite/CONTRIBUTING.md +177 -0
- package/dist/lite/README.md +173 -0
- package/dist/lite/SECURITY.md +19 -0
- package/dist/lite/architecture/decisions/ADR-029-release-pipeline.md +79 -0
- package/dist/lite/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
- package/dist/lite/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
- package/dist/lite/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
- package/dist/lite/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
- package/dist/lite/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
- package/dist/lite/lib/clean-artifacts-sweep.sh +112 -0
- package/dist/lite/lib/code-comment-discipline.sh +144 -0
- package/dist/lite/lib/composer-preflight.sh +459 -0
- package/dist/lite/lib/deferred-actions.sh +146 -0
- package/dist/lite/lib/hook-header-parser.sh +61 -0
- package/dist/lite/lib/hook-heartbeat.sh +152 -0
- package/dist/lite/lib/hook-inject.sh +255 -0
- package/dist/lite/lib/hook-installer.sh +195 -0
- package/dist/lite/lib/luminary-pick.sh +96 -0
- package/dist/lite/lib/output-discipline.sh +143 -0
- package/dist/lite/lib/prose-scan-boundary.sh +171 -0
- package/dist/lite/lib/rewrite-check.sh +214 -0
- package/dist/lite/lib/session-rescue.sh +151 -0
- package/dist/lite/lib/source-graph-walker.sh +277 -0
- package/dist/lite/lib/state.sh +1372 -0
- package/dist/lite/lib/telemetry.sh +205 -0
- package/dist/lite/lib/tier-check.sh +187 -0
- package/dist/lite/lib/tier-dependency-audit.sh +1088 -0
- package/dist/lite/presence/install/bassclef-hook-connect.sh +178 -0
- package/dist/lite/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
- package/dist/lite/presence/install/bassclef-sync.template.sh +2278 -0
- package/dist/lite/presence/install/schedule-auto-save.cron.sh +88 -0
- package/dist/lite/presence/install/schedule-auto-save.taskscheduler.md +122 -0
- package/dist/lite/scripts/aggregate-telemetry.sh +217 -0
- package/dist/lite/scripts/analyze-tier-dependencies.sh +239 -0
- package/dist/lite/scripts/generate-lite-manifest.sh +505 -0
- package/dist/lite/scripts/generate-tier-manifest.sh +28 -0
- package/dist/lite/scripts/intent-drift-check.sh +456 -0
- package/dist/lite/scripts/lite-manifest-drift-check.sh +146 -0
- package/dist/lite/scripts/render-lite-manifest-doc.sh +150 -0
- package/dist/lite/standards/adr-template.md +86 -0
- package/dist/lite/standards/api-conventions/nextjs.md +84 -0
- package/dist/lite/standards/artifact-composition.md +209 -0
- package/dist/lite/standards/bash-hook-safety.md +246 -0
- package/dist/lite/standards/bassclef-configs-schema.md +232 -0
- package/dist/lite/standards/bassclef-evolution.md +143 -0
- package/dist/lite/standards/bassclef-internal-jargon.md +244 -0
- package/dist/lite/standards/bassclef-managed-sentinel.md +96 -0
- package/dist/lite/standards/bassclef-source-config.md +228 -0
- package/dist/lite/standards/branch-stacking.md +408 -0
- package/dist/lite/standards/code-safety-principles.md +176 -0
- package/dist/lite/standards/composer-prerequisites.md +155 -0
- package/dist/lite/standards/deferred-actions-schema.md +204 -0
- package/dist/lite/standards/dependency-discipline/cargo.md +39 -0
- package/dist/lite/standards/dependency-discipline/gem.md +43 -0
- package/dist/lite/standards/dependency-discipline/go-mod.md +41 -0
- package/dist/lite/standards/dependency-discipline/npm.md +42 -0
- package/dist/lite/standards/dependency-discipline/pip.md +42 -0
- package/dist/lite/standards/deployment-topology/ec2-tailscale.md +225 -0
- package/dist/lite/standards/deployment-topology.md +69 -0
- package/dist/lite/standards/docs-sync-allowlist.md +76 -0
- package/dist/lite/standards/domain-and-dns.md +145 -0
- package/dist/lite/standards/frontend-stack.md +67 -0
- package/dist/lite/standards/frontmatter-schema.md +154 -0
- package/dist/lite/standards/graceful-exit.md +227 -0
- package/dist/lite/standards/hook-idempotency.md +102 -0
- package/dist/lite/standards/hook-injection-discipline.md +202 -0
- package/dist/lite/standards/hook-install-class.md +215 -0
- package/dist/lite/standards/input-handler-interface.md +152 -0
- package/dist/lite/standards/lite-manifest-schema-changes.md +180 -0
- package/dist/lite/standards/lite-manifest.json +2797 -0
- package/dist/lite/standards/luminary-matching.md +105 -0
- package/dist/lite/standards/luminary-problem-patterns.md +481 -0
- package/dist/lite/standards/migration-discipline/active-record.md +50 -0
- package/dist/lite/standards/migration-discipline/alembic.md +43 -0
- package/dist/lite/standards/migration-discipline/gorm.md +50 -0
- package/dist/lite/standards/migration-discipline/prisma.md +53 -0
- package/dist/lite/standards/migration-discipline/sqlalchemy.md +51 -0
- package/dist/lite/standards/mobile-ephemeral-session.md +167 -0
- package/dist/lite/standards/model-routing-discipline.md +160 -0
- package/dist/lite/standards/ogilvy-writing-rules.md +225 -0
- package/dist/lite/standards/opener-discipline.md +96 -0
- package/dist/lite/standards/operator-facing-prose-discipline.md +201 -0
- package/dist/lite/standards/persona-schema.md +229 -0
- package/dist/lite/standards/pluggable-luminaries.md +323 -0
- package/dist/lite/standards/pr-body-discipline.md +115 -0
- package/dist/lite/standards/preview-state-schema.md +189 -0
- package/dist/lite/standards/project-directory-layout.md +276 -0
- package/dist/lite/standards/release-tagging.md +137 -0
- package/dist/lite/standards/reserved-skill-names.md +120 -0
- package/dist/lite/standards/scannable-multi-option-output.md +265 -0
- package/dist/lite/standards/sdlc-compliance.md +286 -0
- package/dist/lite/standards/sdlc-gates/typescript.md +57 -0
- package/dist/lite/standards/secrets-lifecycle.md +210 -0
- package/dist/lite/standards/security-scanner-adapter.md +145 -0
- package/dist/lite/standards/session-board.md +256 -0
- package/dist/lite/standards/skill-output-discipline.md +121 -0
- package/dist/lite/standards/state-spine-contract.md +255 -0
- package/dist/lite/standards/state-spine.md +511 -0
- package/dist/lite/standards/steering-hints/kiss-words.md +11 -0
- package/dist/lite/standards/substrate-config-schema.md +267 -0
- package/dist/lite/standards/tech-stack-config.md +109 -0
- package/dist/lite/standards/tier-dependency-analysis.md +167 -0
- package/dist/lite/standards/tier-runtime-deps/lite.md +57 -0
- package/dist/lite/standards/tier-tag-schema.md +155 -0
- package/dist/lite/standards/two-layer-config.md +99 -0
- package/dist/lite/standards/use-case-format.md +292 -0
- package/dist/lite/standards/user-story-invest.md +268 -0
- package/dist/lite/standards/velocity-and-appetite.md +229 -0
- package/dist/lite/standards/voice-input-pattern.md +119 -0
- package/dist/lite/standards/whereami-schema.md +301 -0
- package/dist/lite/standards/worktree-management.md +211 -0
- package/dist/lite/standards/writing-guide.md +213 -0
- package/dist/lite/templates/chronicle-template.md +75 -0
- package/dist/lite/templates/deferred-action-template.md +45 -0
- package/dist/lite/templates/memory-proposal-template.md +77 -0
- package/dist/lite/templates/persona-template.md +200 -0
- package/dist/lite/templates/pr-faq.md +45 -0
- package/dist/lite/templates/secret-rotation-template.md +162 -0
- package/dist/lite/templates/spec-template.md +131 -0
- package/dist/lite/templates/use-case-template.md +194 -0
- package/dist/lite/templates/user-story-template.md +107 -0
- package/dist/lite/templates/whereami-template.md +101 -0
- package/package.json +12 -5
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: docs/whereami.md is the authoritative project-state snapshot in any bassclef-substrate repo.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Whereami Schema
|
|
7
|
+
|
|
8
|
+
`docs/whereami.md` is the **authoritative project-state snapshot** in
|
|
9
|
+
any bassclef-substrate repo. One per repo, maintained at session-end,
|
|
10
|
+
read at session-start. Functionally it is the current-state header —
|
|
11
|
+
whereas `docs/iteration-bets/` holds the goal.contracts and `chronicle/`
|
|
12
|
+
holds the narrative log, `whereami.md` answers "where is the project
|
|
13
|
+
right now?" in one glance.
|
|
14
|
+
|
|
15
|
+
## Why this exists
|
|
16
|
+
|
|
17
|
+
Before this standard: each agent reconstructed project state by
|
|
18
|
+
reading iteration-bets + chronicles + git log + substrate.config.md
|
|
19
|
+
at session-start. This reconstruction:
|
|
20
|
+
|
|
21
|
+
- Duplicates ~5 reads per session-start
|
|
22
|
+
- Drifts silently when phase or iteration changes without cross-artifact
|
|
23
|
+
updates
|
|
24
|
+
- Produces inconsistent answers to "what phase are we in?" depending on
|
|
25
|
+
which agent asked and which files it read
|
|
26
|
+
|
|
27
|
+
Making whereami load-bearing solves all three by establishing one
|
|
28
|
+
source, maintained at session boundaries.
|
|
29
|
+
|
|
30
|
+
## The artifact
|
|
31
|
+
|
|
32
|
+
Location: `docs/whereami.md` (every consumer repo). Bassclef itself
|
|
33
|
+
maintains one at the same path.
|
|
34
|
+
|
|
35
|
+
Format: Markdown with a standard structure (schema below). Plain prose
|
|
36
|
+
allowed in descriptive fields. No YAML frontmatter — simpler to eyeball.
|
|
37
|
+
|
|
38
|
+
## Schema
|
|
39
|
+
|
|
40
|
+
Nine sections, in this order. Missing fields acceptable when no data
|
|
41
|
+
exists yet (new repo, no active iteration); empty sections MUST render
|
|
42
|
+
as "—" rather than be omitted, so the reader knows what's unset vs. what
|
|
43
|
+
was forgotten.
|
|
44
|
+
|
|
45
|
+
Section 2a (Active sessions registry) is OPTIONAL in singleton mode and
|
|
46
|
+
REQUIRED in plural / parallel mode. Section count is "8 + optional 1."
|
|
47
|
+
|
|
48
|
+
### 1. Project-level phase
|
|
49
|
+
|
|
50
|
+
```markdown
|
|
51
|
+
## Project-level phase
|
|
52
|
+
|
|
53
|
+
phase: [Inception | Elaboration | Construction | Transition]
|
|
54
|
+
note: [one-paragraph description of what this phase means for this repo]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Bassclef values only. If you're tempted to write a custom phase, the
|
|
58
|
+
project is either between standard phases (write "Construction, tail
|
|
59
|
+
end of iteration X") or the phase model doesn't fit (surface as a
|
|
60
|
+
bassclef-evolution proposal, don't invent a value).
|
|
61
|
+
|
|
62
|
+
### 2. Active iteration
|
|
63
|
+
|
|
64
|
+
Two shapes — singleton (sequential mode, one goal at a time) and plural
|
|
65
|
+
(parallel mode, multiple bets in flight on the same repo). Singleton is
|
|
66
|
+
the bassclef default; plural is the parallel-fanout extension (Phase
|
|
67
|
+
A WS-2 of example-pipeline bet).
|
|
68
|
+
|
|
69
|
+
#### Singleton (default — sequential mode)
|
|
70
|
+
|
|
71
|
+
```markdown
|
|
72
|
+
## Active iteration
|
|
73
|
+
|
|
74
|
+
iteration_bet: [path to current bet, or "none — between iterations"]
|
|
75
|
+
iteration_started: [YYYY-MM-DD]
|
|
76
|
+
iteration_phase: [current WS or stage within the goal. or "—"]
|
|
77
|
+
previous_bet: [path to last closed bet]
|
|
78
|
+
next_bet: [one-line description of planned next bet, or "—"]
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
If `iteration_bet` is "none," `iteration_phase` MUST be "—".
|
|
82
|
+
|
|
83
|
+
#### Plural (parallel mode — Stage 4+)
|
|
84
|
+
|
|
85
|
+
```markdown
|
|
86
|
+
## Active iteration
|
|
87
|
+
|
|
88
|
+
iteration_bets:
|
|
89
|
+
- bet: docs/iteration-bets/2026-04-25-example-pipeline.md
|
|
90
|
+
started: 2026-04-25
|
|
91
|
+
phase: Phase A
|
|
92
|
+
session: 2026-04-26-phase-a-autonomous
|
|
93
|
+
- bet: docs/iteration-bets/2026-04-26-quorum-prototype-gallery.md
|
|
94
|
+
started: 2026-04-26
|
|
95
|
+
phase: WS-1
|
|
96
|
+
session: 2026-04-26-quorum-wire
|
|
97
|
+
previous_bet: [path to last closed bet]
|
|
98
|
+
next_bet: [one-line description of planned next bet, or "—"]
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Backward-compatibility window**: readers MUST accept BOTH the
|
|
102
|
+
singleton field (`iteration_bet:`) AND the plural field
|
|
103
|
+
(`iteration_bets:`). Writers in sequential mode SHOULD continue using
|
|
104
|
+
the singleton form. The plural form activates when ≥2 bets are
|
|
105
|
+
in-flight against the same repo — typically via worktree-based
|
|
106
|
+
parallel sessions. Plural form deprecates singleton 30 days after
|
|
107
|
+
parallel-mode adoption stabilizes; until then both are valid.
|
|
108
|
+
|
|
109
|
+
### 2a. Active sessions registry (parallel mode)
|
|
110
|
+
|
|
111
|
+
```markdown
|
|
112
|
+
## Active sessions
|
|
113
|
+
|
|
114
|
+
active_sessions:
|
|
115
|
+
- session_id: 2026-04-26-phase-a-autonomous
|
|
116
|
+
started: 2026-04-26T01:00:00+0000
|
|
117
|
+
working_dir: /Users/<operator>/src/<org>/bassclef
|
|
118
|
+
agent: orchestrator-gated-sequential
|
|
119
|
+
bet: docs/iteration-bets/2026-04-25-example-pipeline.md
|
|
120
|
+
tier: longrun
|
|
121
|
+
- session_id: 2026-04-26-quorum-wire
|
|
122
|
+
started: 2026-04-26T02:30:00+0000
|
|
123
|
+
working_dir: /Users/<operator>/src/<org>/bassclef-quorum-worktree
|
|
124
|
+
agent: builder
|
|
125
|
+
bet: docs/iteration-bets/2026-04-26-quorum-prototype-gallery.md
|
|
126
|
+
tier: short
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Empty when only one session is active (singleton mode). Each session
|
|
130
|
+
appends an entry at `/longrun prep` and removes its entry at
|
|
131
|
+
`/longrun closeout`. Stale entries (session_id has no live process
|
|
132
|
+
AND age > 24h) are reaped by `bassclef-sync.sh` session-start hook.
|
|
133
|
+
|
|
134
|
+
The session-id MUST match the session-board filename slug (per
|
|
135
|
+
`standards/session-board.md`) so cross-references resolve cleanly.
|
|
136
|
+
|
|
137
|
+
### 3. Active agents
|
|
138
|
+
|
|
139
|
+
```markdown
|
|
140
|
+
## Active agents
|
|
141
|
+
|
|
142
|
+
[sequential mode]
|
|
143
|
+
- [role-name] ([current task])
|
|
144
|
+
|
|
145
|
+
[multi-agent mode]
|
|
146
|
+
- [role-name] on branch [branch-name] ([status])
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
For sequential sessions, typically one entry. For multi-agent /
|
|
150
|
+
multi-worktree sessions, one entry per active agent. If between
|
|
151
|
+
iterations: "None (between iterations)".
|
|
152
|
+
|
|
153
|
+
### 4. Subsystem phases (table)
|
|
154
|
+
|
|
155
|
+
```markdown
|
|
156
|
+
## Subsystem phases
|
|
157
|
+
|
|
158
|
+
| Subsystem | Phase | Last iteration | Notes |
|
|
159
|
+
|-----------|-------|---------------|-------|
|
|
160
|
+
| [name] | [phase] | [YYYY-MM-DD] | [one-line] |
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Subsystems are the repo's own decomposition — in bassclef, these are
|
|
164
|
+
standards / skills / agents / SDLC-process / session-continuity /
|
|
165
|
+
design-system. Each consumer repo defines its own list.
|
|
166
|
+
|
|
167
|
+
### 5. Gate progress (project-level)
|
|
168
|
+
|
|
169
|
+
```markdown
|
|
170
|
+
## Gate progress (project-level)
|
|
171
|
+
|
|
172
|
+
### Inception — [COMPLETE (YYYY-MM-DD) | IN PROGRESS | PENDING]
|
|
173
|
+
- [x] Vision doc
|
|
174
|
+
- [x] Risk register populated
|
|
175
|
+
...
|
|
176
|
+
|
|
177
|
+
### Elaboration — [status]
|
|
178
|
+
- [ ] ADRs drafted
|
|
179
|
+
...
|
|
180
|
+
|
|
181
|
+
### Construction — [status]
|
|
182
|
+
...
|
|
183
|
+
|
|
184
|
+
### Transition — [status]
|
|
185
|
+
...
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Checkbox format. Gate items are repo-specific. Bassclef values
|
|
189
|
+
only for phase status: COMPLETE / IN PROGRESS / PENDING.
|
|
190
|
+
|
|
191
|
+
### 6. Risk register
|
|
192
|
+
|
|
193
|
+
```markdown
|
|
194
|
+
## Risk register
|
|
195
|
+
|
|
196
|
+
See docs/risk-register.md
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
One-line pointer. The register itself is a separate artifact; this
|
|
200
|
+
field just establishes the reference. If no register exists, write
|
|
201
|
+
"none yet — file when first risk materializes."
|
|
202
|
+
|
|
203
|
+
### 7. Last updated (MUST)
|
|
204
|
+
|
|
205
|
+
```markdown
|
|
206
|
+
## Last updated
|
|
207
|
+
|
|
208
|
+
2026-04-16T19:00:00Z — session-end
|
|
209
|
+
session: [chronicle filename, e.g., 2026-04-16c-plan-declaration-and-whereami.md]
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
ISO 8601 UTC timestamp. Auto-stamped by `/session-end` skill when it
|
|
213
|
+
updates whereami. Hook-read to detect staleness.
|
|
214
|
+
|
|
215
|
+
### 8. Configuration pointer
|
|
216
|
+
|
|
217
|
+
```markdown
|
|
218
|
+
## Configuration
|
|
219
|
+
|
|
220
|
+
See substrate.config.md for external resource references.
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
One-line pointer. Decouples state tracking (whereami) from resource
|
|
224
|
+
references (substrate.config.md) — both are single-source but for
|
|
225
|
+
different concerns.
|
|
226
|
+
|
|
227
|
+
## Freshness rules
|
|
228
|
+
|
|
229
|
+
Hook-enforced via `bassclef-sync.sh` section emitted on session-start:
|
|
230
|
+
|
|
231
|
+
- `last_updated` newer than 3 days → green, session proceeds normally
|
|
232
|
+
- `last_updated` 3–7 days old → warning surfaced, session proceeds
|
|
233
|
+
- `last_updated` older than 7 days → BLOCKED (per `blocked-items.md`)
|
|
234
|
+
- File missing → BLOCKED
|
|
235
|
+
|
|
236
|
+
Threshold is tuneable. 3 days v1 default. Consumer repos may override
|
|
237
|
+
via `substrate.config.md` field (proposed: `whereami_freshness_days`).
|
|
238
|
+
|
|
239
|
+
## Who updates it
|
|
240
|
+
|
|
241
|
+
| Trigger | Who | Action |
|
|
242
|
+
|---------|-----|--------|
|
|
243
|
+
| Session end | `/session-end` skill (MUST tier) | Update last_updated + any field that changed |
|
|
244
|
+
| Phase transition | Closer / operator | Update phase + gate progress |
|
|
245
|
+
| Iteration start | `/autonomous start` or equivalent | Update iteration_bet + active agents |
|
|
246
|
+
| Iteration end | `/session-end` + closeout | Update previous_bet; clear iteration_phase |
|
|
247
|
+
| Subsystem change | Agent performing the change | Update subsystem row with one-line + date |
|
|
248
|
+
|
|
249
|
+
## Who reads it
|
|
250
|
+
|
|
251
|
+
| Reader | When | What it expects |
|
|
252
|
+
|--------|------|-----------------|
|
|
253
|
+
| `/sprint` skill | Session-start orientation | Primary source (no longer fallback) |
|
|
254
|
+
| `bassclef-sync.sh` hook | Session-start | Freshness check only |
|
|
255
|
+
| `/substrate-check` skill | On-demand validation | Presence + schema conformance |
|
|
256
|
+
| Operator eyeballing | Any time | Human-readable summary |
|
|
257
|
+
| Chronicle writer | Session-end | Phase context for narrative |
|
|
258
|
+
|
|
259
|
+
## What whereami is NOT
|
|
260
|
+
|
|
261
|
+
- **Not the iteration goal** — iteration goal is the scope contract for
|
|
262
|
+
the current work; whereami references it by path
|
|
263
|
+
- **Not the chronicle** — chronicle is retrospective narrative;
|
|
264
|
+
whereami is current snapshot
|
|
265
|
+
- **Not substrate.config.md** — that file is resource references
|
|
266
|
+
(where is X); whereami is state (where are we)
|
|
267
|
+
- **Not a risk register** — register is a separate artifact; whereami
|
|
268
|
+
points to it
|
|
269
|
+
- **Not an ADR log** — ADRs are decisions; whereami is state
|
|
270
|
+
- **Not `/sprint` output** — `/sprint` READS whereami; it doesn't
|
|
271
|
+
replace it
|
|
272
|
+
|
|
273
|
+
## Relationship to other standards
|
|
274
|
+
|
|
275
|
+
- `standards/substrate-config-schema.md` — same single-source-of-truth
|
|
276
|
+
pattern, different concern (resources vs. state)
|
|
277
|
+
- `strategy/session-continuity.md` — three-layer memory architecture
|
|
278
|
+
where whereami is the "current state" layer
|
|
279
|
+
- `strategy/agent-choreography.md` — which agent updates whereami at
|
|
280
|
+
which gate is defined here
|
|
281
|
+
- `.claude/rules/whereami-load-bearing.md` — enforces read + write
|
|
282
|
+
obligations per session
|
|
283
|
+
|
|
284
|
+
## Template
|
|
285
|
+
|
|
286
|
+
See `templates/whereami-template.md` for a fillable starting
|
|
287
|
+
point. `/autonomous start` creates one when scaffolding a new repo.
|
|
288
|
+
|
|
289
|
+
## Scrutiny
|
|
290
|
+
|
|
291
|
+
Bar for adding a schema: the artifact must have load-bearing behavior
|
|
292
|
+
elsewhere in the methodology, or it's documentation for documentation's
|
|
293
|
+
sake. Whereami meets the bar because:
|
|
294
|
+
|
|
295
|
+
1. `/sprint` will read it as primary source (not fallback)
|
|
296
|
+
2. `bassclef-sync.sh` will block on staleness
|
|
297
|
+
3. `/session-end` will write to it as MUST tier
|
|
298
|
+
4. `/substrate-check` will validate its shape
|
|
299
|
+
|
|
300
|
+
Without those four hooks, this standard would be shelfware. Ship the
|
|
301
|
+
hooks with the schema.
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: Defines the lifecycle for git worktrees in autonomous agent sessions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Worktree Management Standard
|
|
7
|
+
|
|
8
|
+
Defines the lifecycle for git worktrees in autonomous agent sessions.
|
|
9
|
+
Worktrees enable parallel branch work but create operational hazards when
|
|
10
|
+
agents crash, hit rate limits, or exhaust context without cleanup.
|
|
11
|
+
|
|
12
|
+
This standard applies whenever agents use `git worktree add` — whether
|
|
13
|
+
in parallel autonomous mode or manual multi-branch work.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Worktree Lifecycle
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
CREATE → WORK → COMMIT → PR → CLEANUP
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Every worktree must complete this lifecycle. A worktree that skips CLEANUP
|
|
24
|
+
leaves a branch lock, consumes disk, and confuses the next session.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Pre-Session Audit (MUST — session start)
|
|
29
|
+
|
|
30
|
+
Before creating any new worktrees, audit existing ones:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
git worktree list
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
For each worktree that is not the main working tree:
|
|
37
|
+
|
|
38
|
+
1. **Check if prunable**: `git worktree list` shows `prunable` for worktrees
|
|
39
|
+
whose directory no longer exists
|
|
40
|
+
2. **Check age**: if the worktree is from a previous session (different date
|
|
41
|
+
or session ID), it is stale
|
|
42
|
+
3. **Check for uncommitted work**: `git -C <worktree-path> status` — if dirty,
|
|
43
|
+
the previous agent died mid-work
|
|
44
|
+
|
|
45
|
+
### Stale worktree resolution
|
|
46
|
+
|
|
47
|
+
| State | Action |
|
|
48
|
+
|-------|--------|
|
|
49
|
+
| Prunable (directory gone) | `git worktree prune` — safe, just cleans metadata |
|
|
50
|
+
| Clean (no uncommitted changes) | `git worktree remove <path>` — safe to remove |
|
|
51
|
+
| Dirty (uncommitted changes) | Commit as `chore: wip — recovered from stale worktree`, then remove |
|
|
52
|
+
| Branch has open PR | Remove worktree, leave PR open for review |
|
|
53
|
+
| Branch has no PR and no useful commits | Remove worktree, delete branch |
|
|
54
|
+
|
|
55
|
+
Present stale worktrees to the operator at session start. In orchestrator-gated
|
|
56
|
+
mode, auto-clean prunable and clean worktrees; prompt for dirty ones.
|
|
57
|
+
|
|
58
|
+
The session-start hook should surface stale worktrees. If it doesn't, the
|
|
59
|
+
agent checks manually.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Creating Worktrees
|
|
64
|
+
|
|
65
|
+
### Naming convention
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
.claude/worktrees/<slug>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Where `<slug>` matches the branch's short description. Example:
|
|
72
|
+
`feature/100-stack-1-worktree-mgmt` → `.claude/worktrees/worktree-mgmt`
|
|
73
|
+
|
|
74
|
+
### Creation checklist
|
|
75
|
+
|
|
76
|
+
1. Verify the branch doesn't already exist: `git branch --list <name>`
|
|
77
|
+
2. Create from main (not from another worktree's branch):
|
|
78
|
+
```bash
|
|
79
|
+
git worktree add .claude/worktrees/<slug> -b <branch-name>
|
|
80
|
+
```
|
|
81
|
+
3. Record the worktree in the stack manifest if one exists
|
|
82
|
+
4. Never `cd` into the worktree — use `git -C <path>` for all operations
|
|
83
|
+
|
|
84
|
+
### Why never `cd` into a worktree
|
|
85
|
+
|
|
86
|
+
If the agent's working directory is inside a worktree and the worktree is
|
|
87
|
+
removed (by cleanup, crash recovery, or another agent), the shell's cwd
|
|
88
|
+
becomes invalid. All subsequent commands fail with "Unable to read current
|
|
89
|
+
working directory." This was observed in POA parallel run 2026-04-07.
|
|
90
|
+
|
|
91
|
+
Instead:
|
|
92
|
+
```bash
|
|
93
|
+
# Good — run from main working tree
|
|
94
|
+
git -C .claude/worktrees/my-feature add .
|
|
95
|
+
git -C .claude/worktrees/my-feature commit -m "feat: description"
|
|
96
|
+
|
|
97
|
+
# Bad — changes cwd, creates cleanup hazard
|
|
98
|
+
cd .claude/worktrees/my-feature
|
|
99
|
+
git add .
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## File Watcher Conflicts
|
|
105
|
+
|
|
106
|
+
### Problem
|
|
107
|
+
|
|
108
|
+
Dev servers (Next.js, Vite), linters (ESLint watch mode), formatters
|
|
109
|
+
(Prettier watch), and IDE file sync tools monitor the filesystem. When a
|
|
110
|
+
worktree agent writes a file, watchers may:
|
|
111
|
+
|
|
112
|
+
- Revert the file to their cached state
|
|
113
|
+
- Trigger a rebuild that overwrites agent output
|
|
114
|
+
- Lock files that the agent needs to write
|
|
115
|
+
|
|
116
|
+
### Mitigation
|
|
117
|
+
|
|
118
|
+
Before creating worktrees for parallel work:
|
|
119
|
+
|
|
120
|
+
1. **Stop all file watchers**: dev server, lint --watch, test --watch
|
|
121
|
+
2. **Check for processes holding files**:
|
|
122
|
+
```bash
|
|
123
|
+
lsof +D <worktree-path> 2>/dev/null
|
|
124
|
+
```
|
|
125
|
+
3. **If watchers can't be stopped** (e.g., IDE integration), document in
|
|
126
|
+
the stack manifest that this branch is not parallel-safe
|
|
127
|
+
|
|
128
|
+
The `/autonomous start` boot sequence should check for running dev servers
|
|
129
|
+
and warn before spawning parallel agents.
|
|
130
|
+
|
|
131
|
+
### IDE-specific notes
|
|
132
|
+
|
|
133
|
+
- **VS Code**: File watcher is aggressive. If the worktree is inside the
|
|
134
|
+
project directory (which `.claude/worktrees/` is), VS Code will watch it.
|
|
135
|
+
Consider creating worktrees outside the project directory for parallel runs.
|
|
136
|
+
- **Cursor/JetBrains**: Similar behavior. Same mitigation.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## Cleanup Protocol (MUST — before session end)
|
|
141
|
+
|
|
142
|
+
Every agent that creates a worktree MUST clean it up before exiting.
|
|
143
|
+
This is part of the graceful exit protocol (see `standards/graceful-exit.md`).
|
|
144
|
+
|
|
145
|
+
### Normal cleanup (work complete, PR open)
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
git worktree remove .claude/worktrees/<slug>
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
If the branch was merged, also delete the branch:
|
|
152
|
+
```bash
|
|
153
|
+
git branch -d <branch-name>
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Abnormal cleanup (agent dying, context exhaustion)
|
|
157
|
+
|
|
158
|
+
If the agent knows it's about to die (context pressure, rate limit, budget):
|
|
159
|
+
|
|
160
|
+
1. Commit any in-progress work: `git -C <worktree-path> commit -am "chore: wip"`
|
|
161
|
+
2. Push the branch: `git -C <worktree-path> push -u origin <branch>`
|
|
162
|
+
3. Remove the worktree: `git worktree remove <path>`
|
|
163
|
+
4. Note in checkpoint: "worktree cleaned, branch pushed, PR not yet open"
|
|
164
|
+
|
|
165
|
+
If the agent dies without cleanup (crash, kill, timeout), the next session's
|
|
166
|
+
pre-session audit handles recovery.
|
|
167
|
+
|
|
168
|
+
### Cleanup order
|
|
169
|
+
|
|
170
|
+
When multiple worktrees exist:
|
|
171
|
+
|
|
172
|
+
1. Remove worktrees with merged PRs first (safest)
|
|
173
|
+
2. Remove worktrees with open PRs next (work is preserved in the PR)
|
|
174
|
+
3. Remove worktrees with unpushed work last (commit and push first)
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Rate Limit Awareness
|
|
179
|
+
|
|
180
|
+
Parallel worktree agents multiply API request rate against the same account
|
|
181
|
+
quota. This was observed in POA 2026-04-07: 3 agents = 3x RPM pressure,
|
|
182
|
+
causing 429 errors.
|
|
183
|
+
|
|
184
|
+
### Mitigations
|
|
185
|
+
|
|
186
|
+
| Strategy | When to use |
|
|
187
|
+
|----------|------------|
|
|
188
|
+
| Sequential mode | Default. Zero rate limit risk. Recommended for most work. |
|
|
189
|
+
| Staggered starts | If parallel: delay 30s between agent spawns |
|
|
190
|
+
| Reduced context | Send only relevant files to each agent, not full repo |
|
|
191
|
+
| Fewer parallel agents | Max 2 concurrent for most account tiers |
|
|
192
|
+
|
|
193
|
+
### Rate limit detection
|
|
194
|
+
|
|
195
|
+
If an agent receives a 429 or rate limit error:
|
|
196
|
+
|
|
197
|
+
1. Do NOT retry immediately — this makes it worse
|
|
198
|
+
2. Wait the duration specified in the Retry-After header (or 60s default)
|
|
199
|
+
3. If rate limits persist after 3 retries: save state, report to operator,
|
|
200
|
+
recommend switching to sequential mode
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Relationship to Other Standards
|
|
205
|
+
|
|
206
|
+
| Standard | Relationship |
|
|
207
|
+
|----------|-------------|
|
|
208
|
+
| `standards/graceful-exit.md` | Worktree cleanup is a MUST gate in exit protocol |
|
|
209
|
+
| `standards/branch-stacking.md` | Stack manifest tracks worktree branches |
|
|
210
|
+
| `.claude/rules/cost-governance.md` | Rate limit cost of parallel worktrees |
|
|
211
|
+
| `strategy/agent-choreography.md` | Orchestrator manages worktree lifecycle in parallel mode |
|