@thebassclef/lite 1.4.0 → 1.4.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.
Files changed (32) hide show
  1. package/README.md +1 -1
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/lite/.bassclef-source.json +2 -2
  6. package/dist/lite/.claude/hooks/_lib/wirings.sh +237 -0
  7. package/dist/lite/.claude/hooks/pre-commit-manifest-autoregen.sh +187 -0
  8. package/dist/lite/.claude/hooks/session-reflection.d/08-settings-drift.sh +66 -6
  9. package/dist/lite/.claude/hooks/session-reflection.d/20-artifact-staleness.sh +25 -5
  10. package/dist/lite/.claude/hooks/session-reflection.d/30-metrics-staleness.sh +11 -0
  11. package/dist/lite/.claude/hooks/session-reflection.d/60-deferred-actions.sh +2 -1
  12. package/dist/lite/.claude/hooks/session-reflection.d/80-hook-heartbeat-check.sh +20 -0
  13. package/dist/lite/.claude/hooks/session-reflection.d/tests/20-artifact-staleness.test.sh +89 -0
  14. package/dist/lite/.claude/hooks/session-reflection.sh +12 -1
  15. package/dist/lite/.claude/luminaries/david-farley.md +115 -0
  16. package/dist/lite/.claude/luminaries/jez-humble.md +124 -0
  17. package/dist/lite/.claude/luminaries/martin-fowler.md +18 -0
  18. package/dist/lite/.claude/skills/longrun/SKILL.md +51 -0
  19. package/dist/lite/.claude/skills/onboard-repo/SKILL.md +39 -11
  20. package/dist/lite/.claude/skills/provision-deploy-host/SKILL.md +2 -2
  21. package/dist/lite/lib/ancestor-claude-check.sh +101 -0
  22. package/dist/lite/lib/fixture-builder.sh +324 -0
  23. package/dist/lite/lib/workflow-metrics.sh +166 -0
  24. package/dist/lite/presence/install/bassclef-configs.template.jsonc +76 -0
  25. package/dist/lite/presence/install/bassclef-sync.template.sh +7 -4
  26. package/dist/lite/scripts/generate-lite-manifest.sh +151 -1
  27. package/dist/lite/scripts/workflow-metrics-query.sh +57 -0
  28. package/dist/lite/standards/lite-manifest-schema-changes.md +24 -0
  29. package/dist/lite/standards/lite-manifest.json +79 -68
  30. package/package.json +1 -1
  31. package/dist/lite/.claude/skills/journal-export/SKILL.md +0 -293
  32. package/dist/lite/.claude/skills/release/SKILL.md +0 -311
@@ -39,6 +39,11 @@ set -u
39
39
  # [x] Multiple amendment lines; latest wins by date-sort not file-order
40
40
  # [x] Trap: no tmpfiles created in hook; no trap needed. Reason: hook is read-only on filesystem.
41
41
  # [x] Override: no SKIP_ARTIFACT_STALENESS override today; test asserts absence. Reason: existing hook has no override; extension does not add one.
42
+ # Class D — release-notes freshness (bassclef-upstream#1802):
43
+ # [x] D1: fresh (today mtime) SEMVER release-notes file → silent (RED under filename-parse; GREEN under mtime cure)
44
+ # [x] D2: stale (10 days ago mtime) SEMVER release-notes file → BLOCK
45
+ # [x] D3: freshest mtime picked across multiple files
46
+ # [x] D4: no release-notes dir + few commits → silent (existing threshold preserved)
42
47
 
43
48
  REPO_ROOT="$(cd "$(dirname "$0")/../../../.." && pwd)"
44
49
  HOOK="${REPO_ROOT}/.claude/hooks/session-reflection.d/20-artifact-staleness.sh"
@@ -329,6 +334,90 @@ else
329
334
  fi
330
335
  teardown_tmpdir
331
336
 
337
+ # =======================================================================
338
+ # Class D — release-notes freshness (bassclef-upstream#1802)
339
+ # =======================================================================
340
+ #
341
+ # Motivating bug: current fragment cuts filename to 10 chars expecting
342
+ # YYYY-MM-DD format. Actual convention is v<SEMVER>.md. Parse fails
343
+ # silently, falls back to epoch 0, banner reads "20715 days ago" every
344
+ # session. Cure: read file mtime, not filename.
345
+
346
+ echo ""
347
+ echo "Class D — release-notes freshness (#1802)"
348
+ echo ""
349
+
350
+ # Portable "N days ago" mtime stamp (BSD vs GNU date).
351
+ past_mtime_stamp() {
352
+ local days="$1"
353
+ if date -v-1d +%s > /dev/null 2>&1; then
354
+ date -v-"${days}"d +%Y%m%d0000 # BSD (macOS)
355
+ else
356
+ date -d "-${days} days" +%Y%m%d0000 # GNU (Linux/CI)
357
+ fi
358
+ }
359
+
360
+ # D1: today-mtime SEMVER filename → silent (RED under filename-parse; GREEN under mtime cure)
361
+ setup_tmpdir
362
+ mkdir -p "$TMPDIR_TEST/chronicle" "$TMPDIR_TEST/docs/release-notes"
363
+ touch "$TMPDIR_TEST/chronicle/2026-08-30-fresh.md" # silence chronicle section
364
+ touch "$TMPDIR_TEST/docs/release-notes/v0.99.0.md" # today mtime by default
365
+ add_commits_since "2026-08-30" 5
366
+ OUTPUT=$(run_hook "2026-08-30")
367
+ if echo "$OUTPUT" | grep -q "release-notes —"; then
368
+ assert "D1: today-mtime SEMVER filename → silent" "FIRED: $OUTPUT"
369
+ else
370
+ assert "D1: today-mtime SEMVER filename → silent" "ok"
371
+ fi
372
+ teardown_tmpdir
373
+
374
+ # D2: stale (10 days ago mtime) SEMVER filename → BLOCK
375
+ setup_tmpdir
376
+ mkdir -p "$TMPDIR_TEST/chronicle" "$TMPDIR_TEST/docs/release-notes"
377
+ touch "$TMPDIR_TEST/chronicle/2026-08-30-fresh.md"
378
+ touch "$TMPDIR_TEST/docs/release-notes/v0.98.0.md"
379
+ touch -t "$(past_mtime_stamp 10)" "$TMPDIR_TEST/docs/release-notes/v0.98.0.md"
380
+ add_commits_since "2026-08-30" 5
381
+ OUTPUT=$(run_hook "2026-08-30")
382
+ if echo "$OUTPUT" | grep -q "release-notes —"; then
383
+ assert "D2: 10-day-old SEMVER filename → BLOCK" "ok"
384
+ else
385
+ assert "D2: 10-day-old SEMVER filename → BLOCK" "SILENT: $OUTPUT"
386
+ fi
387
+ teardown_tmpdir
388
+
389
+ # D3: freshest mtime picked across multiple files
390
+ setup_tmpdir
391
+ mkdir -p "$TMPDIR_TEST/chronicle" "$TMPDIR_TEST/docs/release-notes"
392
+ touch "$TMPDIR_TEST/chronicle/2026-08-30-fresh.md"
393
+ touch "$TMPDIR_TEST/docs/release-notes/v0.95.0.md"
394
+ touch "$TMPDIR_TEST/docs/release-notes/v0.96.0.md"
395
+ touch "$TMPDIR_TEST/docs/release-notes/v0.97.0.md"
396
+ # Age the first two; leave v0.97.0.md fresh (today mtime)
397
+ touch -t "$(past_mtime_stamp 30)" "$TMPDIR_TEST/docs/release-notes/v0.95.0.md"
398
+ touch -t "$(past_mtime_stamp 20)" "$TMPDIR_TEST/docs/release-notes/v0.96.0.md"
399
+ add_commits_since "2026-08-30" 5
400
+ OUTPUT=$(run_hook "2026-08-30")
401
+ if echo "$OUTPUT" | grep -q "release-notes —"; then
402
+ assert "D3: freshest mtime picked across 3 files → silent (v0.97 is today)" "FIRED: $OUTPUT"
403
+ else
404
+ assert "D3: freshest mtime picked across 3 files → silent (v0.97 is today)" "ok"
405
+ fi
406
+ teardown_tmpdir
407
+
408
+ # D4: no release-notes dir + <10 commits → silent (existing threshold preserved)
409
+ setup_tmpdir
410
+ mkdir -p "$TMPDIR_TEST/chronicle"
411
+ touch "$TMPDIR_TEST/chronicle/2026-08-30-fresh.md"
412
+ add_commits_since "2026-08-30" 3
413
+ OUTPUT=$(run_hook "2026-08-30")
414
+ if echo "$OUTPUT" | grep -q "release-notes —"; then
415
+ assert "D4: no release-notes dir + few commits → silent" "FIRED: $OUTPUT"
416
+ else
417
+ assert "D4: no release-notes dir + few commits → silent" "ok"
418
+ fi
419
+ teardown_tmpdir
420
+
332
421
  # =======================================================================
333
422
  # Summary
334
423
  # =======================================================================
@@ -48,7 +48,18 @@ trace_log "session-start" "$SOURCE"
48
48
  HOOK_REAL_PATH="$(readlink -f "$0" 2>/dev/null || readlink "$0" 2>/dev/null || echo "$0")"
49
49
  {
50
50
  _br_sd="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
51
- for _br_c in "${_br_sd}/../../lib/bassclef-dir-resolver.sh" "${HOME:-/}/lib/bassclef-dir-resolver.sh"; do
51
+ # bassclef-cli#140 cure — add $CWD/lib/ to the search list. bassclef init
52
+ # copies dist/lite/lib/*.sh into $targetDir/lib/ (src/commands/init.ts:300)
53
+ # and bassclef-sync section 3d copies $BASSCLEF_DIR/lib/*.sh into $CWD/lib/
54
+ # (presence/install/bassclef-sync.template.sh L1450). The prior two search
55
+ # paths both resolved to $HOME/lib/ for operator-installed dispatchers, so
56
+ # the resolver never loaded and defensive fallback set BASSCLEF_DIR=$HOME,
57
+ # producing the "[bassclef-hook-connect] skip — shared function not found
58
+ # at $HOME/presence/install/..." line at every session start.
59
+ for _br_c in \
60
+ "${_br_sd}/../../lib/bassclef-dir-resolver.sh" \
61
+ "${HOME:-/}/lib/bassclef-dir-resolver.sh" \
62
+ "${CWD:-.}/lib/bassclef-dir-resolver.sh"; do
52
63
  [ -f "$_br_c" ] && source "$_br_c" && break
53
64
  done
54
65
  unset _br_sd _br_c
@@ -0,0 +1,115 @@
1
+ ---
2
+ tier: lite
3
+ name: David Farley
4
+ slug: david-farley
5
+ claimed_by: [architect, builder, deployer]
6
+ referenced_by_skills: [architect-review, decompose, deploy-prod]
7
+ primary_domain: engineering
8
+ depth: full
9
+ sources:
10
+ - type: book
11
+ title: "Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation"
12
+ authors: ["Jez Humble", "David Farley"]
13
+ year: 2010
14
+ url: "https://continuousdelivery.com/"
15
+ isbn: "9780321601919"
16
+ methodology_covered:
17
+ - "Deployment pipeline mechanics: commit stage, acceptance stage, capacity stage, manual stage"
18
+ - "Fast feedback: commit stage under 5 minutes; acceptance stage under 1 hour"
19
+ - "Testing strategies per pipeline stage"
20
+ - "Zero-downtime release patterns"
21
+ - type: book
22
+ title: "Modern Software Engineering"
23
+ authors: ["David Farley"]
24
+ year: 2021
25
+ url: "https://www.davefarley.net/?p=352"
26
+ isbn: "9780137314911"
27
+ methodology_covered:
28
+ - "Optimize for learning and managing complexity as the two core engineering activities"
29
+ - "Iterative + incremental development as engineering discipline"
30
+ - "Empirical approach: hypothesis, experiment, measurement"
31
+ - "Modularity + cohesion + separation of concerns as anti-complexity tools"
32
+ - type: video
33
+ title: "Continuous Delivery (YouTube channel)"
34
+ authors: ["David Farley"]
35
+ year: 2025
36
+ url: "https://www.youtube.com/@ContinuousDelivery"
37
+ methodology_covered:
38
+ - "Deployment pipeline design patterns"
39
+ - "TDD + BDD + continuous delivery integration"
40
+ - "Software engineering as engineering, not craft"
41
+ verification_status: verified
42
+ description: "Continuous Delivery co-author; deployment pipeline mechanics; author of Modern Software Engineering."
43
+ ---
44
+
45
+ # David Farley
46
+
47
+ ## Signature
48
+
49
+ *"Software development is fundamentally an exercise in learning."*
50
+
51
+ Co-author of **Continuous Delivery** (2010, with Jez Humble). Author of **Modern Software Engineering** (2021). Runs the "Continuous Delivery" YouTube channel. The bassclef voice on deployment pipeline mechanics, engineering as a discipline, and optimizing for feedback speed at each pipeline stage.
52
+
53
+ ## Core methods
54
+
55
+ - **Four-stage pipeline** — Commit stage (build + unit tests + static analysis, under 5 min). Acceptance stage (integration + functional tests, under 1 hour). Capacity stage (load + perf tests). Manual stage (exploratory + UAT). Each stage's failure blocks progress to the next.
56
+ - **Fast feedback at commit stage** — The commit stage MUST fire fast. If it takes longer than 5 minutes, engineers push less often; batch sizes grow; risk hides.
57
+ - **Iterative + incremental** — Iterative means "improve the same thing over cycles." Incremental means "ship in small pieces." Both discipline needed.
58
+ - **Learning as engineering** — Every design decision is a hypothesis. Measure the outcome. Adjust.
59
+ - **Modularity + cohesion + separation of concerns** — The three tools against complexity. Farley treats each as measurable.
60
+
61
+ ## When to channel this luminary
62
+
63
+ When the primary risk is that the pipeline itself has become the bottleneck — commit stage slow, feedback delayed, engineers pushing less often. Farley dominates for pipeline mechanics, engineering-discipline framing, and deep questions about what makes software engineering an engineering discipline (rather than craft or art). Pair with Humble (CD foundations), Fowler (CI foundations), and Nygard (release stability).
64
+
65
+ Do NOT channel Farley as primary for UX or product decisions, pure code refactoring, or team-organization questions.
66
+ INSTEAD: use Cooper or Norman for UX; use Fowler for code refactoring; use the DevOps Handbook lineage (Kim, Humble, Debois, Willis) for team organization.
67
+
68
+ ## Stack translation
69
+
70
+ In bassclef's CI pipeline:
71
+
72
+ - **Commit stage under 5 min** → bassclef-pr-ci median is 9.7 min per issue #1515. Farley would flag this as the primary defect. The target of 3 min matches his commit-stage rule.
73
+ - **Acceptance stage under 1 hour** → substrate-check-phase + cold-adopter-harness serve this role. They stay within 1 hour today.
74
+ - **Fast feedback** → Cure 1 (auto-regen manifest) + #1562 (path-filter shard) both fall in the commit-stage speed budget.
75
+ - **Modularity + cohesion + separation of concerns** → the three-zone canvas (Zone A author-time, Zone B CI-time, Zone C release-time) IS separation of concerns applied to CI/CD as a subsystem.
76
+ - **Learning as engineering** — Each Phase's metric checkpoint (measure bassclef-pr-ci median after Phase 1, Phase 2) is the hypothesis-experiment-measurement loop applied to the pipeline.
77
+
78
+ ## Anti-patterns it prevents
79
+
80
+ - **Slow commit stage** — engineers push less often when they wait 10 minutes for CI. Batch sizes grow. Integration risk hides.
81
+ - **Pipeline stages that fail to earn their runtime** — every stage must raise confidence enough to justify its cost. Stages that duplicate work OR check nothing get cut.
82
+ INSTEAD: audit stage-by-stage confidence delta; cut what fails to earn its cost.
83
+ - **Craft framing** — treating software as art hides that some approaches measurably work and others measurably fail. Engineering framing forces the measurement.
84
+ - **Big-bang releases** — batch sizes so large that feedback arrives after decisions land.
85
+ - **Manual pipeline stages presented as "necessary review"** — sometimes true; often the pipeline was designed without the review's information need. Farley pushes to automate what the reviewer actually looks for.
86
+
87
+ ## Worked example
88
+
89
+ For bassclef's Phase 1 cure planning (per docs/canvases/2026-09-18-ci-cd-subsystem.md):
90
+
91
+ Farley's approach:
92
+ - **Commit stage speed** — Phase 1 targets 9.7 min median → 6 min median → 3 min median. Each Phase makes the commit stage cheaper.
93
+ - **Modularity of cures** — Each of the 5 Phase 1 cures ships as its own PR. Cure 1 stays independent of Cure 3. Each reversible on its own.
94
+ - **Hypothesis-experiment-measurement** — Cure 5 (guard-add fixture-shape audit) is a hypothesis: "guard-add pattern drift causes Class D failures." Ship it. Measure: does Class D recurrence rate drop? Adjust or advance.
95
+ - **Learning** — session 2026-09-18a chronicle shows 6 hard failures across 3 CI cycles. Farley would treat this as the empirical evidence the design is optimizing against, not just narrative.
96
+
97
+ What Farley would flag on bassclef today:
98
+ - Commit stage at 9.7 min breaks his rule. Fix this first.
99
+ - Missing measurement infrastructure — #1307 (workflow-overhead profiling) is exactly what he'd prioritize.
100
+ - The three-zone canvas correctly applies separation of concerns to the CI subsystem.
101
+
102
+ ## Sources
103
+
104
+ - *Continuous Delivery* — Humble, Farley, Addison-Wesley (2010)
105
+ - *Modern Software Engineering* — Farley (2021)
106
+ - davefarley.net — primary methodology site
107
+ - Continuous Delivery YouTube channel (weekly, since ~2020)
108
+
109
+ ## Related luminaries
110
+
111
+ - **Jez Humble** — CD co-author; complements Farley's pipeline mechanics with delivery performance + DORA metrics framing.
112
+ - **Martin Fowler** — CI foundations; Farley's CD extends Fowler's CI.
113
+ - **Michael Nygard** — release stability patterns Farley references at the acceptance + capacity stages.
114
+ - **Kent Beck** — TDD anchor; Farley's commit-stage speed rule assumes fast unit tests, which TDD requires.
115
+ - **John Ousterhout** — deep modules; Farley's modularity discipline maps to Ousterhout's deep-module principle.
@@ -0,0 +1,124 @@
1
+ ---
2
+ tier: lite
3
+ name: Jez Humble
4
+ slug: jez-humble
5
+ claimed_by: [architect, deployer, closer]
6
+ referenced_by_skills: [architect-review, deploy-prod, release]
7
+ primary_domain: engineering
8
+ depth: full
9
+ sources:
10
+ - type: book
11
+ title: "Continuous Delivery: Reliable Software Releases through Build, Test, and Deployment Automation"
12
+ authors: ["Jez Humble", "David Farley"]
13
+ year: 2010
14
+ url: "https://continuousdelivery.com/"
15
+ isbn: "9780321601919"
16
+ methodology_covered:
17
+ - "Deployment pipeline as the primary release artifact"
18
+ - "Every commit produces a release candidate"
19
+ - "Automate build, test, deploy, and infrastructure provisioning"
20
+ - "Trunk-based development over long-lived branches"
21
+ - "Configuration management as first-class code"
22
+ - type: book
23
+ title: "The DevOps Handbook"
24
+ authors: ["Gene Kim", "Jez Humble", "Patrick Debois", "John Willis"]
25
+ year: 2016
26
+ url: "https://itrevolution.com/product/the-devops-handbook/"
27
+ isbn: "9781942788003"
28
+ methodology_covered:
29
+ - "Three Ways: flow, feedback, continual learning"
30
+ - "Small batch sizes; fast feedback loops"
31
+ - "Culture of psychological safety around failure"
32
+ - type: book
33
+ title: "Accelerate: The Science of Lean Software and DevOps"
34
+ authors: ["Nicole Forsgren", "Jez Humble", "Gene Kim"]
35
+ year: 2018
36
+ url: "https://itrevolution.com/product/accelerate/"
37
+ isbn: "9781942788331"
38
+ methodology_covered:
39
+ - "DORA metrics: deployment frequency, lead time, MTTR, change fail rate"
40
+ - "High performers deploy 208x more often + recover 2604x faster"
41
+ - "Continuous delivery causes higher software delivery performance"
42
+ - type: blog_post
43
+ title: "continuousdelivery.com (primary methodology venue)"
44
+ authors: ["Jez Humble"]
45
+ year: 2025
46
+ url: "https://continuousdelivery.com/"
47
+ methodology_covered:
48
+ - "Deployment pipeline patterns + anti-patterns"
49
+ - "Trunk-based development advocacy"
50
+ - "Release strategies: blue-green, canary, dark launching"
51
+ verification_status: verified
52
+ description: "Continuous Delivery co-author; deployment pipeline framework; DORA metrics researcher."
53
+ ---
54
+
55
+ # Jez Humble
56
+
57
+ ## Signature
58
+
59
+ *"If it hurts, do it more often, and bring the pain forward."*
60
+
61
+ Co-author of **Continuous Delivery** (2010, with David Farley) — the book that defined the deployment pipeline. Co-author of **The DevOps Handbook** (2016) and **Accelerate** (2018). Researcher on DORA (DevOps Research and Assessment) metrics. The bassclef voice on release automation, deployment pipelines, and measuring software delivery performance.
62
+
63
+ ## Core methods
64
+
65
+ - **Deployment pipeline** — Every commit runs through automated stages: commit → build → automated tests → staging → production. Each stage raises confidence. Failure at any stage halts the pipeline and blocks release.
66
+ - **Every commit is a release candidate** — The main branch stays deployable. If a commit passes the pipeline, it could ship to production. This is what trunk-based development delivers.
67
+ - **Small batch sizes** — Merge small changes often. Large batches hide risk. Small batches surface risk fast.
68
+ - **Configuration as code** — Environment definitions live in version control. No hand-tuned servers. Reproducible from source.
69
+ - **DORA metrics** — Four measurements separate high performers from low: deployment frequency, lead time for changes, mean time to restore, change failure rate.
70
+
71
+ ## When to channel this luminary
72
+
73
+ When the primary risk is that releases become rare, painful, or unreliable. Humble dominates for release pipeline design, DevOps practice audits, deployment strategy (blue-green, canary), and any conversation about measuring delivery performance. Pair with Fowler (CI foundations), Farley (deployment pipeline mechanics), and Nygard (release stability patterns).
74
+
75
+ Do NOT channel Humble as primary for: architecture decisions unrelated to release (use Ousterhout, Vernon), UI design (use Cooper, Norman), or code-level refactoring (use Fowler).
76
+
77
+ ## Stack translation
78
+
79
+ In bassclef's release pipeline:
80
+
81
+ - **Deployment pipeline** → `scripts/release-to-bassclef.sh` fires stages in order: filter files by tier → run andon scan → open release PR → CI → merge → tag. Each stage carries a fail condition.
82
+ - **Every commit is a release candidate** → main branch on bassclef-upstream stays deployable. `/release` can fire from any main commit.
83
+ - **Small batch sizes** → per `.claude/rules/pr-strategy.md`, default is stacked atomic PRs (one issue per PR) not bundled multi-issue PRs.
84
+ - **Configuration as code** → `.claude/settings.json`, `bassclef-configs.jsonc`, and workflow yaml all live in git. No hand-tuned CI runners.
85
+ - **DORA metrics** → `scripts/metrics.sh --all` computes deployment frequency, lead time, MTTR, change failure rate against bassclef-upstream commits + release tags.
86
+
87
+ ## Anti-patterns it prevents
88
+
89
+ - **Release train that misses stations** — quarterly releases where each release carries months of changes. Batch size hides risk; small changes get delayed by batch coordination.
90
+ - **Manual staging steps** — one engineer knows the deploy dance. When they leave, release breaks. Automation is the durable artifact.
91
+ - **Long-lived feature branches** — branch merges become integration nightmares. Trunk-based development merges daily; feature flags gate release, not branches.
92
+ - **Environment drift** — staging works, prod breaks. Configuration-as-code kills the class.
93
+ - **Metrics theater** — measuring what is easy (lines of code, story points) instead of what matters (DORA metrics).
94
+
95
+ ## Worked example
96
+
97
+ For bassclef's release-to-bassclef pipeline (2026-09-18 session shipped v0.45.0):
98
+
99
+ Humble's approach:
100
+ - **Deployment pipeline** — `/release` runs dry-run first (Step 3 filter + Step 3.5 tier alignment + Step 3.6 lite manifest ledger + Step 4 andon scan). Live run happens only after operator confirms dry-run output. Each step's failure blocks the live run.
101
+ - **Every commit is a release candidate** — bassclef-upstream main stays green. Session close verifies this before ending.
102
+ - **Small batches** — v0.45.0 shipped one goal's cures (Phase A + Phase B fixes), not months of accumulated substrate change.
103
+ - **DORA metrics** — `scripts/metrics.sh` computes lead time from commit to bassclef-public sync. Session 2026-09-18a hit blocked state because 267 commits since last metrics run means DORA drift is real.
104
+
105
+ What Humble would flag on bassclef today:
106
+ - Change failure rate is measurable but not measured (metrics.sh block from session-start hook).
107
+ - MTTR is anecdotal (session logs) not measured (no timing on cure cycles).
108
+ - The v0.45.0 release cascade showed short lead time (single day from cure filing to public ship) — that IS the delivery performance high performers hit.
109
+
110
+ ## Sources
111
+
112
+ - *Continuous Delivery* — Humble, Farley, Addison-Wesley (2010)
113
+ - *The DevOps Handbook* — Kim, Humble, Debois, Willis (2016)
114
+ - *Accelerate* — Forsgren, Humble, Kim (2018)
115
+ - continuousdelivery.com — primary methodology venue
116
+ - DORA State of DevOps reports (2014-2023) — Humble co-led research
117
+
118
+ ## Related luminaries
119
+
120
+ - **Martin Fowler** — CI foundations that CD builds on; Fowler's canonical CI article predates the CD book by four years.
121
+ - **David Farley** — CD co-author; deeper on deployment pipeline mechanics + author of *Modern Software Engineering* (2021).
122
+ - **Michael Nygard** — *Release It!* covers stability patterns Humble references at the deployment layer.
123
+ - **Nicole Forsgren** — Accelerate co-author; owns the DORA research methodology.
124
+ - **Gene Kim** — DevOps Handbook + Accelerate co-author; *The Phoenix Project* narrative frame for the same principles.
@@ -37,6 +37,18 @@ sources:
37
37
  methodology_covered:
38
38
  - "Internal vs external DSL design choices"
39
39
  - "DSL design patterns — when to build, when to embed, when to skip"
40
+ - type: article
41
+ title: "Continuous Integration (canonical definition)"
42
+ authors: ["Martin Fowler"]
43
+ year: 2006
44
+ url: "https://martinfowler.com/articles/continuousIntegration.html"
45
+ methodology_covered:
46
+ - "Continuous Integration canonical definition — every developer integrates to mainline daily"
47
+ - "Automate the build; make the build self-testing"
48
+ - "Every commit should build main line on an integration machine"
49
+ - "Fix broken builds immediately; keep the build fast"
50
+ - "Test in a clone of the production environment; make it easy to get the latest deliverables"
51
+ - "Everyone can see the results of the latest build; automate deployment"
40
52
  - type: blog_post
41
53
  title: "martinfowler.com (primary methodology venue)"
42
54
  authors: ["Martin Fowler"]
@@ -63,6 +75,12 @@ refactoring, and enterprise patterns.
63
75
 
64
76
  ## Core methods
65
77
 
78
+ - **Continuous Integration canonical definition** — Fowler's 2006 article
79
+ set the discipline. Every developer integrates to mainline daily. The
80
+ build is automated + self-testing. Every commit builds mainline. Broken
81
+ builds fire immediate fix. Keep the build fast. Test in a clone of prod.
82
+ Automate deployment. This is the CI/CD foundation that Humble + Farley
83
+ extended in *Continuous Delivery* (2010).
66
84
  - **Code smells catalog** — Long Method, Large Class, Feature Envy,
67
85
  Shotgun Surgery, Primitive Obsession, Data Clumps, and dozens more.
68
86
  Named patterns make smells recognizable on sight.
@@ -329,6 +329,57 @@ Full re-render is only correct when the operator asks for it explicitly ("show m
329
329
 
330
330
  **Step 1.4e** — Card + scan-table shape (per goal 24e; Tufte + Prater). Multi-option output has three parts. First, a compact scan-table on top. Second, one card per option. Third, step cards for the recommended option only. See `standards/scannable-multi-option-output.md` § Card template + § Glyph legend + § Progressive disclosure.
331
331
 
332
+ <!-- FKGL-EXEMPT: Step 1.4f — Candidate 4 shape lock per bassclef-upstream#1598 operator pick 2026-09-21 -->
333
+ **Step 1.4f — Converged preset render shape (per bassclef-upstream#1598 operator pick 2026-09-21).** The converged preset renders **Candidate 4** — Deliverable lead + Recommend card + Other options scan-table + Ask hints. Reader hits Deliverable within one screen. Sequencing + non-recommended option cards hide behind the operator's follow-up question.
334
+
335
+ Anchor luminaries: `@luminary alan-cooper` (satisficing default) + `@luminary luke-wroblewski` (mobile-first).
336
+
337
+ Rendered shape (three visible sections + ask hints):
338
+
339
+ ```
340
+ === Deliverable ===
341
+
342
+ <one paragraph of adopter or subsystem value; NOT framework process>
343
+
344
+ === Recommend: Option a — <label> ===
345
+
346
+ - Value: <what adopters or subsystems get; e.g., "adopters see current
347
+ docs" not "two PRs merged">
348
+ - Turns: <range>
349
+ - Risk: 🟢/🟡/🔴 <one-line failure mode>
350
+ - Priority: P1/P2/P3
351
+
352
+ === Other options ===
353
+
354
+ b. <label> <turns> <risk-glyph> <priority>
355
+ c. <label> <turns> <risk-glyph> <priority>
356
+
357
+ Ask "step plan" for sequencing.
358
+ Ask "see b" or "see c" for detail on other options.
359
+ ```
360
+
361
+ **Value axis discipline.** Every axis labeled "Value" (or "Deliverable" prose lead) reads as adopter or subsystem value — what breaks for the reader if it doesn't ship, what improves for them when it does. Framework-mechanic process language (e.g., "two PRs opened", "tags cut", "sim in tree") stays out of the Value axis. Process belongs in the step plan.
362
+
363
+ Correct value line examples:
364
+ - "Adopters browsing docs.bassclef.dev see today's substrate. Every future /release runs a local lite-bundle check before pushing."
365
+ - "Louis reads the recommendation before scrolling. Sam sees no stuck signals on first-run."
366
+
367
+ Incorrect value line examples:
368
+ - "Two doc PRs land + adopter-simulator-lite in tree + v1.0.0 tag on both repos." (framework process — belongs in step plan)
369
+ - "Ships the manifest generator amendment." (mechanism — reader can't act on this)
370
+
371
+ **Ask-hints render.** The two ask-hint lines land at the very tail of prep output, in this order:
372
+
373
+ ```
374
+ Ask "step plan" for sequencing.
375
+ Ask "see b" or "see c" for detail on other options.
376
+ ```
377
+
378
+ When the operator asks any of the three, the assistant renders the expansion in-conversation (not a re-render of the whole prep). Sequencing hint fires Step 1.7 render for the recommended option only. Option-detail hint fires the full card render for the named non-recommended option.
379
+
380
+ Grace: full-ceremony preset (`/longrun full`) keeps the pre-#1598 render (multi-card + step-card table). Candidate 4 applies at converged preset only.
381
+ <!-- /FKGL-EXEMPT -->
382
+
332
383
  <!-- FKGL-EXEMPT: Step 1.5 preset note — technical procedure reference to the picker per bassclef-upstream#1598 -->
333
384
  **Step 1.5 preset note (per bassclef-upstream#1598).** The axis rendering below applies to the FULL ceremony path (no preset picked, or `full` override). When Step 0.85 picker fires a converged / exploratory / reversible-small preset, the axis set adjusts per `.claude/rules/compounding-sequence-fresh-analysis.md` § Per-preset axis sets. Stop hook reads the preset marker and applies the matching check.
334
385
  <!-- /FKGL-EXEMPT -->
@@ -43,8 +43,11 @@ Pick the shape that matches how you plan to work. The picker is the first fork.
43
43
  | **share via GitHub** | A repo you push to GitHub and share | Path A — standard onboarding (Phases 1-3) |
44
44
  | **browse first** | Scanning what /onboard-repo does before you commit | Path A read-only walk (dry-run mode) |
45
45
  | **just me on this Mac** | A local-only project. No GitHub push. | Path B — empty-repo starter (`--greenfield-from-intent`) |
46
+ | **top-up an existing bassclef repo** | Repo where `bassclef init` already ran; only some files need adding | Path C — additive-only (per bassclef-cli#101) |
46
47
 
47
- **Recommended:** `share via GitHub` when you have a GitHub org and repo ready. Otherwise `just me on this Mac`.
48
+ **Recommended:** `share via GitHub` when you have a GitHub org and repo ready. `top-up an existing bassclef repo` if `.bassclef/init.manifest.json` exists. Otherwise `just me on this Mac`.
49
+
50
+ **Path B safety guard (per bassclef-cli#101):** Path B refuses to run when `.bassclef/init.manifest.json` is present. Path B truncates `.claude/settings.json` and other core files as part of empty-repo starter setup. Picking Path B on an installed repo destroys 20+ hook wirings. When the manifest file is present, the skill halts and asks the operator to switch to Path C (top-up) instead, or pass `--overwrite` if the destructive replace is intentional.
48
51
 
49
52
  If the operator did not name a preset, ask first: `Share via GitHub / Browse first / Just me on this Mac? (g/b/j/skip)`
50
53
 
@@ -68,7 +71,7 @@ the operator picked before validating.
68
71
  - Bassclef is cloned as a peer at `$BASSCLEF_DIR` (default `~/src/<your-org>/bassclef`, for
69
72
  desktop `additionalDirectories` resolution)
70
73
  - You are currently `cd`'d into the target repo's working directory
71
- - Claude Code session was started with `--add-dir ~/src/sunj-labs/bassclef`
74
+ - Claude Code session has access to the bassclef checkout at `${BASSCLEF_DIR:-$CLAUDE_PROJECT_DIR}` (via `--add-dir` or bassclef init default)
72
75
  so this skill file is accessible
73
76
 
74
77
  ### Path B — `--greenfield-from-intent` (cold-adopter magic demo)
@@ -83,7 +86,7 @@ the operator picked before validating.
83
86
  with only files Path B is allowed to overwrite — see "Working
84
87
  directory convention" below)
85
88
  - `gh` is NOT required (no GitHub repo gets created)
86
- - A peer bassclef checkout at `~/src/sunj-labs/bassclef` is preferred
89
+ - A peer bassclef checkout at `${BASSCLEF_DIR:-$CLAUDE_PROJECT_DIR}` is preferred
87
90
  but not required (the thin-pointer dispatcher falls back to the
88
91
  GitHub tarball when the sibling is absent — Path B's `Phase B.3`
89
92
  installs it)
@@ -130,6 +133,31 @@ onboarding) or **Path B** (`--greenfield-from-intent` cold-adopter
130
133
  magic demo). Decide first, then walk only the phases under the chosen
131
134
  path. Do not mix.
132
135
 
136
+ ### Pre-phase — ancestor `.claude/` audit (both paths)
137
+
138
+ Before choosing a path, walk from the target repo up to `$HOME`.
139
+ Report any `.claude/` directory found in an ancestor. Adopters often
140
+ have a stale `.claude/skills/` sitting in a parent dir from an old
141
+ setup. Claude Code walks up from cwd loading `.claude/` at every
142
+ ancestor level. A stale ancestor dir produces duplicate + often
143
+ outdated skill entries in every child repo.
144
+
145
+ ```bash
146
+ bash lib/ancestor-claude-check.sh "$(pwd)"
147
+ ```
148
+
149
+ Output is one absolute path per line. Empty output means clean tree.
150
+
151
+ For each path echoed, warn the adopter with the cure hint the helper
152
+ prints to stderr:
153
+
154
+ ```
155
+ cure: mv "<path>" "<path>.stale-<date>"
156
+ ```
157
+
158
+ Do NOT auto-cure. Adopter decides whether to move each aside before
159
+ proceeding. Ship bassclef-upstream#573.
160
+
133
161
  ### Choosing the path
134
162
 
135
163
  | Signal | Path |
@@ -178,7 +206,7 @@ mkdir -p .claude/hooks docs
178
206
 
179
207
  # Install the thin-pointer dispatcher (same source as Path A Phase 2.1).
180
208
  # Sibling-fast-path preferred; the curl fallback works for cold adopters.
181
- cp ~/src/sunj-labs/bassclef/presence/install/bassclef-sync.dispatcher.template.sh \
209
+ cp ${BASSCLEF_DIR:-$CLAUDE_PROJECT_DIR}/presence/install/bassclef-sync.dispatcher.template.sh \
182
210
  .claude/hooks/bassclef-sync.sh 2>/dev/null \
183
211
  || curl -sL https://raw.githubusercontent.com/sunj-labs/bassclef/main/presence/install/bassclef-sync.dispatcher.template.sh \
184
212
  -o .claude/hooks/bassclef-sync.sh
@@ -455,7 +483,7 @@ mkdir -p .claude/hooks
455
483
 
456
484
  # Install thin-pointer dispatcher from bassclef's own template directory.
457
485
  # This is the source-of-truth file consumers vendor.
458
- cp ~/src/sunj-labs/bassclef/presence/install/bassclef-sync.dispatcher.template.sh \
486
+ cp ${BASSCLEF_DIR:-$CLAUDE_PROJECT_DIR}/presence/install/bassclef-sync.dispatcher.template.sh \
459
487
  .claude/hooks/bassclef-sync.sh
460
488
 
461
489
  # OR — if bassclef isn't checked out alongside this repo, fetch from
@@ -778,7 +806,7 @@ Validate the written file against the schema:
778
806
 
779
807
  ```bash
780
808
  perl -pe 's,^\s*//.*$,,; s,/\*.*?\*/,,g' .claude/bassclef-configs.jsonc \
781
- | ajv validate -s ~/src/sunj-labs/bassclef/standards/state-spine/schemas/bassclef-configs.schema.json \
809
+ | ajv validate -s ${BASSCLEF_DIR:-$CLAUDE_PROJECT_DIR}/standards/state-spine/schemas/bassclef-configs.schema.json \
782
810
  -d - --spec=draft2020 -c ajv-formats
783
811
  ```
784
812
 
@@ -887,7 +915,7 @@ TECH_STACK
887
915
 
888
916
  ```bash
889
917
  perl -pe 's,^\s*//.*$,,; s,/\*.*?\*/,,g' .claude/bassclef-configs.jsonc \
890
- | ajv validate -s ~/src/sunj-labs/bassclef/standards/state-spine/schemas/bassclef-configs.schema.json \
918
+ | ajv validate -s ${BASSCLEF_DIR:-$CLAUDE_PROJECT_DIR}/standards/state-spine/schemas/bassclef-configs.schema.json \
891
919
  -d - --spec=draft2020 -c ajv-formats
892
920
  ```
893
921
 
@@ -972,7 +1000,7 @@ Pick a/b/c:
972
1000
 
973
1001
  ```bash
974
1002
  perl -pe 's,^\s*//.*$,,; s,/\*.*?\*/,,g' .claude/bassclef-configs.jsonc \
975
- | ajv validate -s ~/src/sunj-labs/bassclef/standards/state-spine/schemas/bassclef-configs.schema.json \
1003
+ | ajv validate -s ${BASSCLEF_DIR:-$CLAUDE_PROJECT_DIR}/standards/state-spine/schemas/bassclef-configs.schema.json \
976
1004
  -d - --spec=draft2020 -c ajv-formats
977
1005
  ```
978
1006
 
@@ -1228,7 +1256,7 @@ After the bassclef-configs block is written, point the operator at the matching
1228
1256
  ```
1229
1257
  Next step: copy the per-stack reference workflow into your repo's CI.
1230
1258
 
1231
- cp ~/src/sunj-labs/bassclef/config/security-scanners/<STACK_GUESS>.yml \
1259
+ cp ${BASSCLEF_DIR:-$CLAUDE_PROJECT_DIR}/config/security-scanners/<STACK_GUESS>.yml \
1232
1260
  .github/workflows/security-scan.yml
1233
1261
 
1234
1262
  The workflow auto-skips when the bassclef-configs stack value is null,
@@ -1292,7 +1320,7 @@ Inherits bassclef substrate via `--add-dir ../bassclef` (desktop) and
1292
1320
  S3 tarball sync (mobile). The `@.claude/bassclef-orientation.md` import
1293
1321
  above auto-loads the substrate discipline (gates, luminaries, tier ladder,
1294
1322
  what-NOT-to-do). For the upstream role declaration, see
1295
- `~/src/sunj-labs/bassclef/CLAUDE.md`.
1323
+ `${BASSCLEF_DIR:-$CLAUDE_PROJECT_DIR}/CLAUDE.md`.
1296
1324
 
1297
1325
  ## Stack
1298
1326
 
@@ -1307,7 +1335,7 @@ what-NOT-to-do). For the upstream role declaration, see
1307
1335
 
1308
1336
  ```bash
1309
1337
  mkdir -p docs
1310
- cp ~/src/sunj-labs/bassclef/templates/whereami-template.md \
1338
+ cp ${BASSCLEF_DIR:-$CLAUDE_PROJECT_DIR}/templates/whereami-template.md \
1311
1339
  docs/whereami.md
1312
1340
  ```
1313
1341
 
@@ -51,7 +51,7 @@ PR; consumer is ready for `/launch-preview`.
51
51
  ## Prerequisites
52
52
 
53
53
  1. Consumer repo exists at `sunj-labs/<consumer>`
54
- 2. `bassclef-platform.yml` exists at `~/src/sunj-labs/platform-config/bassclef-platform.yml`
54
+ 2. `bassclef-platform.yml` exists at `${PLATFORM_CONFIG_DIR:-$HOME/src/sunj-labs/platform-config}/bassclef-platform.yml`
55
55
  3. Operator's shell env has every `storage.type: env` secret named in
56
56
  substrate.secrets.md (run `/secrets-bootstrap` to verify; happens
57
57
  automatically as Phase 0 of this skill)
@@ -186,7 +186,7 @@ WU-3.5 primitive).
186
186
 
187
187
  Next:
188
188
  /launch-preview <consumer> — bind subdomain + smoke-test
189
- cd ~/src/sunj-labs/<consumer> — switch to consumer repo
189
+ cd ${CONSUMER_REPO_DIR:-.} — switch to consumer repo (default: current dir)
190
190
  git pull — pull the substrate.config PR you just merged
191
191
  ```
192
192