@thebassclef/lite 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +2 -0
- package/dist/cli.js +2 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/substrate/.bassclef/lite-manifest.json +999 -92
- package/substrate/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
- package/substrate/.claude/hooks/longrun-prep-compounding-sequence-check.sh +492 -0
- package/substrate/.claude/hooks/pre-commit-gate.sh +1 -2
- package/substrate/.claude/hooks/turn-prose-kiss-check.sh +30 -1
- package/substrate/.claude/luminaries/glenford-myers.md +230 -0
- package/substrate/.claude/luminaries/hunt-thomas.md +115 -0
- package/substrate/.claude/luminaries/hyrum-wright.md +94 -0
- package/substrate/.claude/luminaries/michael-feathers.md +2 -2
- package/substrate/.claude/luminaries/tony-hoare.md +170 -0
- package/substrate/.claude/luminaries/vaughn-vernon.md +50 -0
- package/substrate/.claude/luminaries/w-edwards-deming.md +158 -0
- package/substrate/.claude/rules/accessor-library-discipline.md +138 -0
- package/substrate/.claude/rules/adr-discipline.md +120 -0
- package/substrate/.claude/rules/api-conventions.md +125 -0
- package/substrate/.claude/rules/bootstrap-pair-discipline.md +141 -0
- package/substrate/.claude/rules/cold-adopter-harness-discipline.md +129 -0
- package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +188 -0
- package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +188 -0
- package/substrate/.claude/rules/defensive-bash.md +68 -0
- package/substrate/.claude/rules/deferred-actions.md +233 -0
- package/substrate/.claude/rules/github-issue-flash-tweet.md +156 -0
- package/substrate/.claude/rules/hook-wire-on-author.md +103 -0
- package/substrate/.claude/rules/iteration-bet-brief-completeness.md +54 -0
- package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +3 -3
- package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +89 -0
- package/substrate/.claude/rules/loop-discipline.md +81 -0
- package/substrate/.claude/rules/manual-prod-approval.md +100 -0
- package/substrate/.claude/rules/marker-enrichment-discipline.md +99 -0
- package/substrate/.claude/rules/mobile-ephemeral-session.md +109 -0
- package/substrate/.claude/rules/new-dependency-check.md +51 -0
- package/substrate/.claude/rules/option-label-discipline.md +108 -0
- package/substrate/.claude/rules/pattern-annotation.md +100 -0
- package/substrate/.claude/rules/plain-english-discipline.md +11 -9
- package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +211 -0
- package/substrate/.claude/rules/pr-title-shape.md +161 -0
- package/substrate/.claude/rules/prototype-workflow.md +65 -0
- package/substrate/.claude/rules/reserved-skill-names.md +123 -0
- package/substrate/.claude/rules/schema-management.md +49 -0
- package/substrate/.claude/rules/security.md +37 -0
- package/substrate/.claude/rules/skill-composition-declarations.md +124 -0
- package/substrate/.claude/rules/skill-description-clarity.md +247 -0
- package/substrate/.claude/rules/skill-procedure-step-list.md +137 -0
- package/substrate/.claude/rules/stuck-signal-diagnostic.md +140 -0
- package/substrate/.claude/rules/substrate-config-schema.md +98 -0
- package/substrate/.claude/rules/test-list-discipline.md +175 -0
- package/substrate/.claude/rules/test-sufficiency.md +210 -0
- package/substrate/.claude/rules/testing-tier-config.md +145 -0
- package/substrate/.claude/rules/testing.md +38 -0
- package/substrate/.claude/rules/turn-estimate-grounding.md +134 -0
- package/substrate/.claude/rules/visual-hierarchy.md +437 -0
- package/substrate/.claude/rules/we-dont-break-adopters.md +126 -0
- package/substrate/.claude/rules/wu-sequencing-compounds.md +145 -0
- package/substrate/.claude/skills/build/SKILL.md +1 -1
- package/substrate/.claude/skills/chronicle/SKILL.md +55 -0
- package/substrate/.claude/skills/clean-artifacts/SKILL.md +249 -0
- package/substrate/.claude/skills/decompose/SKILL.md +1 -1
- package/substrate/.claude/skills/diagnose/SKILL.md +1 -1
- package/substrate/.claude/skills/feynman/SKILL.md +90 -0
- package/substrate/.claude/skills/howdoi/SKILL.md +1 -1
- package/substrate/.claude/skills/ia-model/SKILL.md +1 -1
- package/substrate/.claude/skills/interaction-design/SKILL.md +1 -1
- package/substrate/.claude/skills/interpret-input/SKILL.md +8 -8
- package/substrate/.claude/skills/journal/SKILL.md +209 -0
- package/substrate/.claude/skills/kiss/SKILL.md +1 -1
- package/substrate/.claude/skills/launch/SKILL.md +14 -23
- package/substrate/.claude/skills/lean-canvas/SKILL.md +1 -1
- package/substrate/.claude/skills/longrun/SKILL.md +45 -8
- package/substrate/.claude/skills/luminary/SKILL.md +1 -1
- package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +1 -1
- package/substrate/.claude/skills/onboard-repo/SKILL.md +143 -709
- package/substrate/.claude/skills/pattern-review/SKILL.md +1 -1
- package/substrate/.claude/skills/personas/SKILL.md +5 -5
- package/substrate/.claude/skills/promote/SKILL.md +1 -1
- package/substrate/.claude/skills/requirement/SKILL.md +1 -1
- package/substrate/.claude/skills/retro/SKILL.md +1 -1
- package/substrate/.claude/skills/riff/SKILL.md +1 -1
- package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +1 -1
- package/substrate/.claude/skills/session-end/SKILL.md +1 -1
- package/substrate/.claude/skills/session-log/SKILL.md +3 -3
- package/substrate/.claude/skills/skills/SKILL.md +1 -1
- package/substrate/.claude/skills/spec/SKILL.md +1 -1
- package/substrate/.claude/skills/sprint/SKILL.md +1 -1
- package/substrate/.claude/skills/stage/SKILL.md +1 -1
- package/substrate/.claude/skills/state-a-problem/SKILL.md +1 -1
- package/substrate/.claude/skills/temperance/SKILL.md +1 -1
- package/substrate/.claude/skills/use-case/SKILL.md +1 -1
- package/substrate/.claude/skills/user-stories/SKILL.md +1 -1
- package/substrate/.claude/skills/value-prop/SKILL.md +1 -1
- package/substrate/.claude/skills/verify/SKILL.md +1 -1
- package/substrate/.claude/skills/visual-review/SKILL.md +503 -0
- package/substrate/.claude/skills/whats-the-plan/SKILL.md +202 -0
- package/substrate/.claude/skills/whereami/SKILL.md +2 -2
- package/substrate/CONTRIBUTING.md +1 -1
- package/substrate/README.md +5 -5
- package/substrate/lib/prose-scan-boundary.sh +171 -0
- package/substrate/lib/tier-check.sh +50 -1
- package/substrate/lib/tier-dependency-audit.sh +159 -4
- package/substrate/presence/install/bassclef-sync.template.sh +1 -1
- package/substrate/scripts/generate-lite-manifest.sh +21 -5
- package/substrate/standards/adr-template.md +86 -0
- package/substrate/standards/api-conventions/nextjs.md +84 -0
- package/substrate/standards/artifact-composition.md +209 -0
- package/substrate/standards/bash-hook-safety.md +246 -0
- package/substrate/standards/branch-stacking.md +408 -0
- package/substrate/standards/code-safety-principles.md +176 -0
- package/substrate/standards/composer-prerequisites.md +155 -0
- package/substrate/standards/dependency-discipline/cargo.md +39 -0
- package/substrate/standards/dependency-discipline/gem.md +43 -0
- package/substrate/standards/dependency-discipline/go-mod.md +41 -0
- package/substrate/standards/dependency-discipline/npm.md +42 -0
- package/substrate/standards/dependency-discipline/pip.md +42 -0
- package/substrate/standards/deployment-topology/ec2-tailscale.md +225 -0
- package/substrate/standards/deployment-topology.md +69 -0
- package/substrate/standards/docs-sync-allowlist.md +4 -4
- package/substrate/standards/domain-and-dns.md +145 -0
- package/substrate/standards/frontend-stack.md +67 -0
- package/substrate/standards/frontmatter-schema.md +154 -0
- package/substrate/standards/hook-injection-discipline.md +202 -0
- package/substrate/standards/hook-install-class.md +215 -0
- package/substrate/standards/input-handler-interface.md +152 -0
- package/substrate/standards/lite-manifest-schema-changes.md +60 -0
- package/substrate/standards/luminary-matching.md +105 -0
- package/substrate/standards/migration-discipline/active-record.md +50 -0
- package/substrate/standards/migration-discipline/alembic.md +43 -0
- package/substrate/standards/migration-discipline/gorm.md +50 -0
- package/substrate/standards/migration-discipline/prisma.md +53 -0
- package/substrate/standards/migration-discipline/sqlalchemy.md +51 -0
- package/substrate/standards/mobile-ephemeral-session.md +167 -0
- package/substrate/standards/model-routing-discipline.md +160 -0
- package/substrate/standards/persona-schema.md +229 -0
- package/substrate/standards/pluggable-luminaries.md +323 -0
- package/substrate/standards/pr-body-discipline.md +115 -0
- package/substrate/standards/preview-state-schema.md +189 -0
- package/substrate/standards/reserved-skill-names.md +120 -0
- package/substrate/standards/scannable-multi-option-output.md +261 -0
- package/substrate/standards/sdlc-gates/typescript.md +57 -0
- package/substrate/standards/session-board.md +256 -0
- package/substrate/standards/state-spine-contract.md +255 -0
- package/substrate/standards/steering-hints/kiss-words.md +11 -0
- package/substrate/standards/substrate-config-schema.md +267 -0
- package/substrate/standards/tier-dependency-analysis.md +1 -1
- package/substrate/standards/tier-tag-schema.md +1 -1
- package/substrate/standards/two-layer-config.md +99 -0
- package/substrate/standards/use-case-format.md +292 -0
- package/substrate/standards/user-story-invest.md +268 -0
- package/substrate/standards/velocity-and-appetite.md +229 -0
- package/substrate/standards/voice-input-pattern.md +119 -0
- package/substrate/standards/worktree-management.md +211 -0
- package/substrate/templates/chronicle-template.md +75 -0
- package/substrate/templates/memory-proposal-template.md +77 -0
- package/substrate/templates/persona-template.md +200 -0
- package/substrate/templates/pr-faq.md +45 -0
- package/substrate/templates/secret-rotation-template.md +162 -0
- package/substrate/templates/spec-template.md +131 -0
- package/substrate/templates/use-case-template.md +194 -0
- package/substrate/templates/user-story-template.md +107 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: "Bassclef adopts Linus Torvalds's rule: we do not break adopters."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# We don't break adopters
|
|
7
|
+
|
|
8
|
+
Bassclef adopts Linus Torvalds's rule: **we do not break adopters**. Every change to a surface adopters see must keep their existing setup working. When a change would break an adopter, bassclef pays the migration cost. Adopters never pay for bassclef's internal cleanup.
|
|
9
|
+
|
|
10
|
+
**Adopter-count threshold (per ADR-041, added 2026-07-17):** the mechanism for keeping adopters working scales with adopter count.
|
|
11
|
+
|
|
12
|
+
- **N ≤ 24 active adopters** (current: 5) — substrate renames ship immediate. Old vocabulary in prior artifacts (session logs, past goal docs, chronicles, closed PRs) reads through `standards/vocabulary-migration.json`. No compat-shim SKILL stubs per rename. No 90-day grace window on prose. The operator Slacks each adopter about renames as they ship.
|
|
13
|
+
- **N ≥ 25 active adopters** — the full compat-shim discipline returns: rename ships with compat alias, fixture, migration manifest, 90-day grace window on prose, adopter changelog entry.
|
|
14
|
+
|
|
15
|
+
Adopter count read from `standards/bassclef-source-consumers.json` and `.claude/rules/sibling-smoke-after-substrate-change.md` (sibling-smoke rule ships at standard tier). A backlog ticket tracks the counter mechanism (see ADR-041 Decision 4).
|
|
16
|
+
|
|
17
|
+
**Behavior changes stay under full discipline regardless of adopter count.** API contract changes, schema shape changes, and hook filename changes still ship with compat shims — the translation table cannot help there. Only vocabulary renames (word-for-word substitution) qualify for the translation-table path.
|
|
18
|
+
|
|
19
|
+
This rule is the methodology layer. The mechanical layer (CI test that clones a representative adopter and verifies their sync hook against the proposed bassclef HEAD; pre-rename validation; the bassclef-source-redirect registry) is Phase 2 work tracked under bassclef#1360.
|
|
20
|
+
|
|
21
|
+
## When this rule fires
|
|
22
|
+
|
|
23
|
+
Any change to bassclef-upstream or public bassclef that touches an **adopter-observable surface**:
|
|
24
|
+
|
|
25
|
+
**Filesystem surfaces:**
|
|
26
|
+
- Filesystem paths under `~/src/sunj-labs/` that adopter repos symlink into (`canonical/`, `bassclef/`, etc.)
|
|
27
|
+
- Symlink targets inside `<adopter>/.claude/hooks/` or `<adopter>/.claude/skills/`
|
|
28
|
+
- Filenames referenced by adopter `.claude/settings.json` (e.g., the bassclef-sync filename (renamed from a former canonical name per ADR-031))
|
|
29
|
+
- Schema shape of state-spine files (entity types, required frontmatter fields, marker formats)
|
|
30
|
+
- `settings.json` `additionalDirectories` path conventions
|
|
31
|
+
- Repo names and sync URLs in `.bassclef-source.json`
|
|
32
|
+
- Hook filenames, agent names, skill directory names that adopter automation invokes
|
|
33
|
+
|
|
34
|
+
**gh API surfaces (per bassclef-upstream#404):**
|
|
35
|
+
- Label names — rename affects `gh issue list --label X`, `gh pr list --label X`, saved filter URLs, and webhook payloads
|
|
36
|
+
- Label descriptions — visible on hover in GitHub UI + in `gh label list` output; carry brand vocabulary adopters quote
|
|
37
|
+
- Repo description — visible on repo home page + in `gh repo view --json description` + at discovery surfaces
|
|
38
|
+
- Repo topics — discovery + search surface
|
|
39
|
+
- Milestone titles + descriptions — adopters filter by these
|
|
40
|
+
- Project descriptions (gh projects v2) — when used for cross-repo coordination
|
|
41
|
+
|
|
42
|
+
Use `scripts/migrate-gh-surfaces.sh` (sister to `migrate-adopter-references.sh`) to sweep gh API surfaces during a rename event. Defaults to `--dry-run`; operator runs `--apply` after confirming the proposed diff.
|
|
43
|
+
|
|
44
|
+
Does NOT fire on:
|
|
45
|
+
- Internal bassclef refactors that don't change any of the above (private/methodology docs, operator-private content)
|
|
46
|
+
- Strict additions (new skills/rules/hooks that don't replace existing surfaces)
|
|
47
|
+
- gh API surfaces internal to a repo (issue body content, PR review comments, individual issue numbers — those have their own discipline)
|
|
48
|
+
|
|
49
|
+
## What the rule requires
|
|
50
|
+
|
|
51
|
+
When a substrate change touches an adopter-observable surface:
|
|
52
|
+
|
|
53
|
+
1. **Compatibility shim** — the old surface must keep working. Filesystem rename → leave a symlink at the old path. Filename rename → keep an alias or a one-line forwarding stub at the old name. Schema field rename → continue accepting both during the deprecation window.
|
|
54
|
+
2. **Migration manifest** — file at `docs/operator-private/forward-port-registry/migrations/<date>-<change-slug>.md` documenting: what changed, what the shim is, when adopters can safely remove it, the path forward.
|
|
55
|
+
3. **Adopter changelog entry** — when /release ships the change to public bassclef, the PR body's Summary section names the rename + the shim + when the shim retires.
|
|
56
|
+
4. **Deprecation period** — minimum one /release cycle between "shim in place + old surface deprecated" and "shim removable / breaking change ships." Documented explicitly per change.
|
|
57
|
+
5. **Override path** — if a breaking change is genuinely unavoidable, file an ADR explaining why, AND add a `**BREAKING:**` section to the next /release's PR body, AND set the deprecation period to ≥3 release cycles for any high-blast-radius surface.
|
|
58
|
+
|
|
59
|
+
## Anti-patterns
|
|
60
|
+
|
|
61
|
+
These shapes violate the rule:
|
|
62
|
+
|
|
63
|
+
- **Silent rename** — old name removed, no shim, adopters discover when they `git pull` and something disappears. (Exactly what tonight's `mv canonical bassclef` did before the rescue symlink.)
|
|
64
|
+
- **"It works on my machine" testing** — substrate-renames tested only against the operator's own setup, not against adopter sync paths.
|
|
65
|
+
- **Breaking change disguised as feature work** — a feat: commit that happens to rename a public schema field; adopters' parsers break silently.
|
|
66
|
+
- **One-shot fallback** — the existing `bassclef-sync.sh` line `if [ -d $CWD/../bassclef ]; then ... else $CWD/../canonical` is a one-shot fallback, NOT a compat shim. It papers over the rename for new clones; it doesn't help adopters who already have stale symlinks.
|
|
67
|
+
|
|
68
|
+
INSTEAD of any of those: leave the old surface in place as a redirect/symlink/alias; deprecate it explicitly with a date; ship the migration manifest; surface the change in the adopter changelog.
|
|
69
|
+
|
|
70
|
+
## Why this rule exists
|
|
71
|
+
|
|
72
|
+
2026-06-21 evening. Operator renamed `~/src/sunj-labs/canonical` → `~/src/sunj-labs/bassclef` on their machine. Every adopter repo on the machine broke. The list: poa, twoDo, family-recipe-2, eugene-supplements, quorum. Each had 30+ broken symlinks pointing through `../canonical/.claude/hooks/<name>.sh`. poa's `/longrun` start emitted 6+ PreToolUse hook errors per Bash tool call. Non-blocking but noisy. Real failures got masked.
|
|
73
|
+
|
|
74
|
+
The rename was reasonable (the GitHub repo had been renamed canonical → bassclef weeks earlier; the local folder was finally catching up). The lack of compatibility-shim discipline made it cascade.
|
|
75
|
+
|
|
76
|
+
This is Hyrum's Law in action. Every adopter depended on the observable path `~/src/sunj-labs/canonical/`. Bassclef never named that path in any contract. With enough adopters, every observable behavior becomes essential.
|
|
77
|
+
|
|
78
|
+
Linus's 30-year rule applies directly. The Linux kernel does not break userspace. Even when userspace depends on something the kernel never promised. The kernel team pays the cost. Bassclef takes the same stance.
|
|
79
|
+
|
|
80
|
+
## How this composes with existing substrate
|
|
81
|
+
|
|
82
|
+
- `architecture/decisions/ADR-024-forward-port-registry.md` — Strategy A-clean (replace adopter-facing names, no grace period) was the prior default. **This rule supersedes that for adopter-observable surfaces** — compat shims and grace periods are now required. Operator-internal rewrites (chronicles, ADRs, iteration-bets) keep Strategy A-clean.
|
|
83
|
+
- `architecture/decisions/ADR-019-reference-vs-vendor-distribution.md` — reference-binding adopters (HTTP API, agent-read URLs) need URL-stability; vendor-binding adopters need filesystem-path-stability. This rule covers both.
|
|
84
|
+
- `architecture/decisions/ADR-029-release-pipeline.md` — every /release that touches an adopter-observable surface MUST include a migration-manifest reference in the PR body.
|
|
85
|
+
- `architecture/decisions/ADR-030-adopter-inbox-flow.md` — adopters file issues when something silently breaks; this rule makes those issues a defect signal, not an acceptable channel.
|
|
86
|
+
- `architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md` — the architectural decision that adopts this rule as Tier 1.
|
|
87
|
+
- `architecture/dual-repo-flow.md` — contains the "Non-breaking changes to adopters" section that this rule operationalizes.
|
|
88
|
+
|
|
89
|
+
## Override path
|
|
90
|
+
|
|
91
|
+
`SKIP_ADOPTER_COMPAT=1 <command>` — for genuinely-exceptional cases. Logged via trace-helper. Use only when:
|
|
92
|
+
|
|
93
|
+
- The breaking change ships under an explicit ADR with `**BREAKING:**` PR body section
|
|
94
|
+
- Deprecation period ≥3 /release cycles has elapsed since the deprecation announcement
|
|
95
|
+
- A migration manifest exists with documented automated remediation
|
|
96
|
+
|
|
97
|
+
INSTEAD of overriding for routine work: write the compat shim. The cost is small (one symlink, one alias, one forwarding stub); the adopter trust compounds across every future release.
|
|
98
|
+
|
|
99
|
+
## Composes with
|
|
100
|
+
|
|
101
|
+
- `@luminary linus-torvalds` — anchor for the discipline (we don't break userspace)
|
|
102
|
+
- `@luminary hyrum-wright` — theoretical foundation (with enough users, all observable behaviors are depended on)
|
|
103
|
+
- `@luminary michael-nygard` — circuit-breaker / stability-pattern shape
|
|
104
|
+
- `@luminary vaughn-vernon` — anticorruption layer between bassclef-internal renames and adopter-observable state
|
|
105
|
+
- `@luminary frederick-brooks` — conceptual integrity vs migration cost trade-off
|
|
106
|
+
- `.claude/rules/destructive-operations.md` — sister discipline at the local-action layer
|
|
107
|
+
- `.claude/rules/sdlc-gates.md` — temperance gate must fire before any rename touching adopter-observable surfaces
|
|
108
|
+
|
|
109
|
+
## Refs
|
|
110
|
+
|
|
111
|
+
- bassclef#1360 — substrate-rename adopter-migration discipline gap (mechanical layer Phase 2)
|
|
112
|
+
- poa#1251 — poa-specific migration sister ticket
|
|
113
|
+
- ADR-031 — non-breaking-change adopter discipline decision
|
|
114
|
+
- ADR-024 — forward-port-registry (this rule extends/supersedes for adopter-observable surfaces)
|
|
115
|
+
- ADR-019 — reference vs vendor distribution
|
|
116
|
+
- 2026-06-21 chronicle — the rename + cascade + rescue
|
|
117
|
+
|
|
118
|
+
## Retirement condition
|
|
119
|
+
|
|
120
|
+
This rule retires only if bassclef stops having adopters. The mechanical-layer Phase 2 work may reduce the methodology cost but does not retire the discipline. Every release continues to carry adopter compatibility as Tier 1.
|
|
121
|
+
|
|
122
|
+
## When the discipline costs more than the rename benefit
|
|
123
|
+
|
|
124
|
+
Sometimes the migration cost will exceed the rename benefit. That's a signal NOT to do the rename. Adopter compatibility is the constraint that disciplines bassclef-internal refactoring — if a rename can't be made non-breaking, the rename probably isn't worth doing. This is Brooks's conceptual-integrity discipline as a budget, not as a license.
|
|
125
|
+
|
|
126
|
+
Closes the methodology gap surfaced 2026-06-21. Phase 2 mechanical layer tracked at bassclef#1360.
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: WUs within a chosen goal shape ship as compounding builds.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# WU Sequencing — Each WU Compounds With the Next
|
|
7
|
+
|
|
8
|
+
WUs within a chosen goal shape ship as compounding builds. Each WU declares what it produces that the next WU consumes. The trap: independent step enumeration where each step does its own thing. No WU's output feeds another. The value that compounded at shape-pick time disappears once the shape is picked.
|
|
9
|
+
|
|
10
|
+
The rule mechanizes the discipline filed at bassclef#1348. The operator caught the gap on 2026-06-20h prep. My first WU proposal sequenced fixes (recursive walk + triage + workflow stand-up) as parallel-safe atomic items. It should have been a chain where each output flowed into the next.
|
|
11
|
+
|
|
12
|
+
Sister rules cover the INTER-shape layer. bassclef#1299 covers Step 1.5 (the compounding column). bassclef#1302 covers Step 1.6 (the adopter-benefit column). Those two help the operator pick between shapes. This rule disciplines step enumeration WITHIN a chosen shape.
|
|
13
|
+
|
|
14
|
+
## When this rule fires
|
|
15
|
+
|
|
16
|
+
- `/longrun prep` Step 1.7 (added in this rule's PR) — when step enumeration goes into the prep output proposal, the table includes a produces/consumes column
|
|
17
|
+
- Bet doc authoring — when the `## Steps` section is written, the table uses the produces/consumes shape
|
|
18
|
+
- `/sprint` next-work proposals — same shape when proposing a multi-step sequence (sister surface; same wordlist)
|
|
19
|
+
- `/build` skill construction-time sequencing — out of scope for V1; separate ticket if surfaced
|
|
20
|
+
|
|
21
|
+
## Format contract
|
|
22
|
+
|
|
23
|
+
Every goal doc's `## Steps` section uses one of two table shapes.
|
|
24
|
+
|
|
25
|
+
### Shape A — three-column (canonical)
|
|
26
|
+
|
|
27
|
+
```markdown
|
|
28
|
+
| WU | Produces | Consumes (from prior WU) |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| **0** prep | goal doc + stack manifest + temperance marker | — (session-start) |
|
|
31
|
+
| **1** <ticket> | <what ships> | <what it reads from prior WU> |
|
|
32
|
+
| **2** <ticket> | <what ships> | <what it reads from WU-1> |
|
|
33
|
+
| ... |
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Shape B — six-column (extended per bassclef-upstream#688)
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
| WU | Problem + value prop | Produces | Consumes (from prior WU) | How this step builds on the prior | Risk |
|
|
40
|
+
|---|---|---|---|---|---|
|
|
41
|
+
| **0** prep | <problem sentence> + <value prop sentence> | goal doc + markers | — (session-start) | — (baseline) | low |
|
|
42
|
+
| **1** <ticket> | <problem sentence> + <value prop sentence> | <what ships> | <what reads from prior WU> | <how it builds> | <low/med/high> |
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Shape B mirrors the `/longrun` prep proposal rendering. Prep proposals MUST render six-column so the operator sees per-step sequencing at pick-time. Bet doc `## Steps` sections use EITHER shape; six-column is preferred when the goal doc reuses the prep proposal table verbatim.
|
|
46
|
+
|
|
47
|
+
Column semantics for Shape B:
|
|
48
|
+
|
|
49
|
+
- **Problem + value prop** — one cell combining `/state-a-problem brief` output AND `/value-prop flash` output. Do NOT split the two outputs into separate cells. Operator preference confirmed 2026-07-09 (bassclef-upstream#688).
|
|
50
|
+
- **How this step builds on the prior** — one line explaining the sequencing. "Baseline" for WU-0. Parallel-safe WUs state "parallel-safe with WU-N".
|
|
51
|
+
- **Risk** — low / medium / high, matching the step's Step 1.5 risk-class value.
|
|
52
|
+
|
|
53
|
+
Format rules (both shapes):
|
|
54
|
+
|
|
55
|
+
- Shape A header exactly: `| WU | Produces | Consumes (from prior WU) |` — greppable by `bet-doc-gate.sh` V2 hook (3-column path)
|
|
56
|
+
- Shape B header exactly: `| WU | Problem + value prop | Produces | Consumes (from prior WU) | How this step builds on the prior | Risk |` — greppable by `bet-doc-gate.sh` V2 hook (6-column path)
|
|
57
|
+
- Each WU's Produces is a concrete artifact (file, decision, label set, marker, output)
|
|
58
|
+
- Each WU's Consumes names what the prior WU produced — by reference, not duplicated description
|
|
59
|
+
- WU-0 prep consumes "session-start" (no prior WU)
|
|
60
|
+
- Final WU (closeout) produces the chronicle + whereami flip; consumes the union of all prior WU outputs
|
|
61
|
+
- When a WU is genuinely parallel-safe (no consumer), state "parallel-safe (no consumer)" or "parallel-safe with WU-N" in the Consumes cell — explicit declaration, not silent
|
|
62
|
+
|
|
63
|
+
## What this rule requires
|
|
64
|
+
|
|
65
|
+
The agent runs this check before committing the goal doc OR before posting the `/longrun prep` confirmation surface:
|
|
66
|
+
|
|
67
|
+
1. Each WU declared in the proposed shape has a Produces cell
|
|
68
|
+
2. Each WU after WU-0 has a Consumes cell that names what the prior WU produced
|
|
69
|
+
3. When a WU's Produces doesn't feed any later WU, the rule fires WARN. Either the step is misplaced (should be its own goal) OR the sequencing is correct but the next-WU consumption is implicit and needs stating.
|
|
70
|
+
4. The goal doc body cites this rule's slug in the `references:` block when sequencing is non-obvious
|
|
71
|
+
|
|
72
|
+
## Anti-patterns
|
|
73
|
+
|
|
74
|
+
The following shapes fail this rule:
|
|
75
|
+
|
|
76
|
+
- **Bare WU list** — `WU-1: fix X. WU-2: fix Y. WU-3: triage Z.` Independent items; no produces/consumes contract
|
|
77
|
+
- **Sequence-implied-by-ordering** — WUs listed in order but the goal doc body doesn't say WHY this order. Order alone is not compounding
|
|
78
|
+
- **All WUs are independent** — every step is parallel-safe. That signal calls for a question: is this one goal or several smaller bets?
|
|
79
|
+
|
|
80
|
+
The agent picks one path when the rule fires WARN:
|
|
81
|
+
|
|
82
|
+
- Restructures the step sequence so each step's output is input to the next (preferred)
|
|
83
|
+
- Splits the goal — if WUs are genuinely parallel-safe with no compounding, they belong in separate goals
|
|
84
|
+
- Explicitly justifies why a parallel-safe WU rides with sequenced WUs (e.g., shared review window, operator preference)
|
|
85
|
+
|
|
86
|
+
## Eat-own-dogfood
|
|
87
|
+
|
|
88
|
+
The goal that ships this rule (2026-06-20h-recursive-walk-and-triage-marathon) already uses the produces/consumes table in its own `## Steps` section. The goal doc author's chair is the first place this rule fires.
|
|
89
|
+
|
|
90
|
+
## Mechanical layer
|
|
91
|
+
|
|
92
|
+
V1 ships this rule + the SKILL.md Step 1.7 procedure update.
|
|
93
|
+
|
|
94
|
+
**V2 (shipped 2026-06-23 per bassclef-upstream#21):** `.claude/hooks/bet-doc-gate.sh` PreToolUse Edit|Write|MultiEdit on `docs/iteration-bets/*.md` performs the substantive Consumes-cell check. Composed with sister #300 thread-walk check in the same hook file. Behaviors:
|
|
95
|
+
|
|
96
|
+
- **PASS** when Consumes cell contains a concrete artifact reference (backtick-quoted ref, slash-prefixed path, `.sh|.md|.json|.yml` extension) OR explicit literal `"parallel-safe (no consumer)"` OR `"session-start"` (prep) OR `"union of"` (closeout).
|
|
97
|
+
- **WARN** (exit 0 with stderr) when Consumes cell starts with `WU-N` or `WU-N's` followed by vague prose without any concrete artifact reference. Advisory in V2; flips to BLOCK in V3 if observable drift persists.
|
|
98
|
+
- **Silent** on non-matching paths, non-Edit tool calls, or goal docs without a steps table.
|
|
99
|
+
|
|
100
|
+
Overrides (logged via trace-helper):
|
|
101
|
+
- `SKIP_PRODUCES_CONSUMES_CHECK=1` — bypass P/C only
|
|
102
|
+
- `SKIP_BET_DOC_GATE=1` — bypass both P/C and thread-walk
|
|
103
|
+
|
|
104
|
+
Per `feedback_hooks_beat_methodology_for_substrate_quality` memory: V2 hook ships ALONGSIDE the methodology — both required.
|
|
105
|
+
|
|
106
|
+
## Override path
|
|
107
|
+
|
|
108
|
+
`SKIP_WU_SEQUENCING_COMPOUNDS=1 <command>` (when V2 hook ships) — logged via trace-helper. Use rarely:
|
|
109
|
+
|
|
110
|
+
- Single-WU bets — no sequencing applies; the column is trivially empty
|
|
111
|
+
- Genuinely parallel atomic WUs that share a review window (declare in goal doc body)
|
|
112
|
+
- Migration scripts authoring many goal docs at once
|
|
113
|
+
|
|
114
|
+
INSTEAD of overriding for routine work: write the produces/consumes cells. The discipline costs seconds at write-time and compounds across every future thread walking tonight's chronicle for reference.
|
|
115
|
+
|
|
116
|
+
## Composes with
|
|
117
|
+
|
|
118
|
+
- `.claude/rules/arc-level-orientation-before-leaf.md` — sister at orientation surface (sister bassclef#1347 fixes one-level walk)
|
|
119
|
+
- `.claude/rules/plan-enumeration-needs-value-props.md` — sister at choice-presentation surface
|
|
120
|
+
- `.claude/rules/blocked-items.md` — BLOCK protocol the V2 hook fires
|
|
121
|
+
- `.claude/skills/longrun/SKILL.md` Step 1.7 — primary surface this rule extends
|
|
122
|
+
- `.claude/skills/sprint/SKILL.md` — sister surface (next-work proposals)
|
|
123
|
+
- standards/branch-stacking.md — stack manifest already declares dependencies between WUs; this rule extends to the goal doc body
|
|
124
|
+
|
|
125
|
+
## Distinct from
|
|
126
|
+
|
|
127
|
+
- bassclef#1299 (Step 1.5 compounding-sequence) — that's INTER-shape (helps operator pick between shapes); this is INTRA-shape (governs step enumeration within a chosen shape)
|
|
128
|
+
- bassclef#1302 (Step 1.6 adopter-benefit) — that's INTER-shape adopter mechanism; this is intra-shape WU dependency
|
|
129
|
+
- standards/branch-stacking.md — that's about branches + their dependencies (deployment shape); this is about WUs + their produces/consumes (build shape)
|
|
130
|
+
|
|
131
|
+
## Refs
|
|
132
|
+
|
|
133
|
+
- bassclef#1348 — this rule's filing ticket
|
|
134
|
+
- bassclef#1299 — sister Step 1.5 INTER-shape compounding column
|
|
135
|
+
- bassclef#1302 — sister Step 1.6 INTER-shape adopter-benefit column
|
|
136
|
+
- bassclef#1347 — sister substrate-defect at orientation surface (both shipped 2026-06-20h)
|
|
137
|
+
- Memory `feedback_hooks_beat_methodology_for_substrate_quality` — pattern pushing V2 mechanical extension
|
|
138
|
+
- 2026-06-20h /longrun prep — the session that surfaced this gap; operator's framing: "where is the sequencing discipline ticket — that you propose /longrun and its components as sequenced builds that compound"
|
|
139
|
+
- @luminary kent-beck — test-list as planning artifact (TDD By Example chs 1-3); analogous shape for step enumeration as compounding-build artifact
|
|
140
|
+
|
|
141
|
+
## Retirement condition
|
|
142
|
+
|
|
143
|
+
This rule retires only if WU as a bet-shaping primitive retires. The discipline of declared produces/consumes survives any rename or restructure of the step vocabulary.
|
|
144
|
+
|
|
145
|
+
Closes bassclef#1348 (V1 methodology + procedure layer; V2 mechanical layer follow-on).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
tier: lite
|
|
3
3
|
name: build
|
|
4
|
-
description: "Take a buildable plan and ship it. Reads
|
|
4
|
+
description: "Take a buildable plan and ship it. Reads a spec from /launch. Dispatches a builder per user story. Runs /verify. Opens PRs. Gates prod deploy on a human. Refuses auth, schema, security, and tenant work. --explain narrates first."
|
|
5
5
|
problem: "A buildable plan sits on disk. Nothing ships until someone writes code and PRs and gates prod."
|
|
6
6
|
value: "Reads the plan and ships it. Runs the whole cycle so you can watch instead of type."
|
|
7
7
|
inputs: [A goal slug pointing to a spec on disk]
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: chronicle
|
|
3
|
+
description: "Write the session log \u2014 alias for /session-log during the grace window through 2026-10-31. Renamed per ADR-040 Decision 1. Both names resolve to the same behavior; after grace ends, only /session-log resolves."
|
|
4
|
+
problem: "Grace-window sessions still call for /chronicle. New alias for /session-log keeps both live."
|
|
5
|
+
value: "Writes the session log through the grace window. Same output as /session-log."
|
|
6
|
+
inputs: [Optional session or goal ref]
|
|
7
|
+
outputs: [Session log entry at chronicle/*]
|
|
8
|
+
tier: lite
|
|
9
|
+
user_invocable: true
|
|
10
|
+
disable_model_invocation: false
|
|
11
|
+
modes: [default]
|
|
12
|
+
composes_with: [session-log]
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# /chronicle (alias — renamed to /session-log)
|
|
16
|
+
|
|
17
|
+
## What you get
|
|
18
|
+
|
|
19
|
+
`/chronicle` is the old name for `/session-log`. It still works during the grace window through 2026-10-31 per ADR-031 and `.claude/rules/we-dont-break-adopters.md`. Both names produce the same session log entry with the same shape and the same Gate Evidence table.
|
|
20
|
+
|
|
21
|
+
The rename is per ADR-040 Decision 1 (planning-skill vocabulary rewrite). "Chronicle" was borrowed from Ryan Singer's Shape Up; "session log" reads plain per Krug and Cooper consultations documented at ADR-040.
|
|
22
|
+
|
|
23
|
+
## When to use it
|
|
24
|
+
|
|
25
|
+
Prefer `/session-log`. Existing operator habit or existing scripts that call `/chronicle` still work through the grace window. After 2026-10-31 the alias stops resolving; migrate to `/session-log` before then.
|
|
26
|
+
|
|
27
|
+
## What this alias does
|
|
28
|
+
|
|
29
|
+
Runs the same procedure as `/session-log`. See `.claude/skills/session-log/SKILL.md` for the full body. Both files ship the same behavior during the grace window; the pointer in `standards/file-renames.json` records the rename.
|
|
30
|
+
|
|
31
|
+
## Grace window details
|
|
32
|
+
|
|
33
|
+
- **Renamed at:** 2026-07-17 per ADR-040
|
|
34
|
+
- **Alias active until:** 2026-10-31
|
|
35
|
+
- **After grace window:** `/chronicle` invocation returns "unknown skill"; only `/session-log` resolves
|
|
36
|
+
- **Registered in:** `standards/file-renames.json`
|
|
37
|
+
- **Fixture test:** `.claude/hooks/tests/fixtures/adopter-2026-07-17-chronicle-rename/` per `.claude/rules/file-rename-discipline.md`
|
|
38
|
+
- **Artifact directory names:** stay as `chronicle/` (bassclef) and `docs/chronicle/` (app repos) during this window. A separate migration handles the directory rename after the SKILL rename settles.
|
|
39
|
+
|
|
40
|
+
## Composes with
|
|
41
|
+
|
|
42
|
+
- `/session-log` — canonical name; this file is the alias
|
|
43
|
+
- `/session-end` — the closeout skill that calls the log entry as part of the MUST tier
|
|
44
|
+
|
|
45
|
+
## Refs
|
|
46
|
+
|
|
47
|
+
- ADR-040 planning-skill vocabulary and lite profile
|
|
48
|
+
- `.claude/rules/we-dont-break-adopters.md` — grace window discipline
|
|
49
|
+
- `.claude/rules/file-rename-discipline.md` — rename registration
|
|
50
|
+
- `standards/file-renames.json` — this rename registered here
|
|
51
|
+
- `.claude/skills/session-log/SKILL.md` — canonical target
|
|
52
|
+
|
|
53
|
+
## Output discipline
|
|
54
|
+
|
|
55
|
+
Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
name: clean-artifacts
|
|
4
|
+
description: "Sweep workflow exhaust from the repo (stale verify markers, old Playwright screenshots, expired SDLC traces). Strict allowlist; never touches git-tracked files or critical artifacts. Dry-run by default. Runs standalone or via /session-end."
|
|
5
|
+
problem: "Workflow exhaust piles up \u2014 stale verify markers, old screenshots, expired SDLC traces."
|
|
6
|
+
value: "Sweeps three classes of exhaust from the working tree. Idempotent. Safe by exclusion list."
|
|
7
|
+
inputs: [Optional --dry-run flag]
|
|
8
|
+
outputs: [Files removed by class, Skipped safety-list entries, Total space reclaimed]
|
|
9
|
+
user_invocable: true
|
|
10
|
+
disable_model_invocation: false
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# /clean-artifacts — Workflow Exhaust Sweeper
|
|
14
|
+
|
|
15
|
+
Over time, bassclef-substrate repos accumulate workflow exhaust in
|
|
16
|
+
predictable locations:
|
|
17
|
+
|
|
18
|
+
- `state/markers/verify/` files for merged branches (`/verify` leftovers)
|
|
19
|
+
- `.playwright-mcp/` screenshots from old visual reviews
|
|
20
|
+
- `docs/sdlc-traces/` hook-output logs from prior sessions
|
|
21
|
+
- `/tmp/claude-*` markers belonging to expired sessions
|
|
22
|
+
- `.test-baseline` and similar transient verify outputs at repo root
|
|
23
|
+
|
|
24
|
+
None of these are load-bearing once their session ends. None are
|
|
25
|
+
git-tracked (all covered by `.gitignore`). But without an explicit
|
|
26
|
+
sweep, they rot in place.
|
|
27
|
+
|
|
28
|
+
`/clean-artifacts` does the sweep. **Strict allowlist** — only touches
|
|
29
|
+
paths this skill knows about. **Dry-run default** — requires explicit
|
|
30
|
+
`--delete` flag to actually remove anything. **Age-gated** — never
|
|
31
|
+
touches files newer than configurable thresholds (default 7 days).
|
|
32
|
+
|
|
33
|
+
## When to use
|
|
34
|
+
|
|
35
|
+
- At session-end (hooked via `/session-end` May tier — see below)
|
|
36
|
+
- Ad-hoc, when repo root feels cluttered
|
|
37
|
+
- Before a long flight / offline period when you want to reduce
|
|
38
|
+
checkout size
|
|
39
|
+
- After merging many PRs — verify-markers for merged branches pile up
|
|
40
|
+
|
|
41
|
+
## When NOT to use
|
|
42
|
+
|
|
43
|
+
- When investigating an issue that might reference recent markers
|
|
44
|
+
(keep evidence intact until resolved)
|
|
45
|
+
- Immediately after `/verify` — the marker you just wrote is fresh
|
|
46
|
+
and load-bearing for the pre-commit gate
|
|
47
|
+
- Before `/session-end` runs its Must tier (sweep happens AFTER
|
|
48
|
+
chronicle + whereami are written, never before)
|
|
49
|
+
|
|
50
|
+
## Usage
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
/clean-artifacts → dry-run; list what would be removed
|
|
54
|
+
/clean-artifacts dry-run → same as default
|
|
55
|
+
/clean-artifacts --delete → actually remove files
|
|
56
|
+
/clean-artifacts --age=3 → override age threshold (default 7 days)
|
|
57
|
+
/clean-artifacts --delete --age=14 → combine flags
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Implementation
|
|
61
|
+
|
|
62
|
+
As of goal `2026-08-25-tier-consistency-clean-artifacts-inline`, the sweep logic lives in `lib/clean-artifacts-sweep.sh`. The lib is a shared deep module. Both this skill and `/session-end` (lite tier) source it. The skill body wraps the lib with dry-run default plus the operator-facing dispatch surface.
|
|
63
|
+
|
|
64
|
+
To invoke the lib directly:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
source lib/clean-artifacts-sweep.sh
|
|
68
|
+
clean_artifacts_sweep # dry-run
|
|
69
|
+
clean_artifacts_sweep --delete # remove files
|
|
70
|
+
clean_artifacts_sweep --age=14 # override age threshold
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
The strict allowlist, safety list, and refusal thresholds live inside the lib. See `docs/decompositions/2026-08-25-clean-artifacts-sweep.md` for the responsibility model + interface contract. See `lib/tests/clean-artifacts-sweep.test.sh` for Tier 0 tests.
|
|
74
|
+
|
|
75
|
+
## Clean targets (strict allowlist)
|
|
76
|
+
|
|
77
|
+
The skill NEVER touches anything outside this list.
|
|
78
|
+
|
|
79
|
+
| Path | What | Age gate | Notes |
|
|
80
|
+
|------|------|----------|-------|
|
|
81
|
+
| `state/markers/verify/*.marker` | `/verify` markers for branches | >7d default | Skip markers matching current branch |
|
|
82
|
+
| `.playwright-mcp/*.png` | Playwright screenshots | >7d default | Skip if referenced by open visual-review |
|
|
83
|
+
| `.playwright-mcp/*.yaml` | Playwright trace snapshots | >7d default | — |
|
|
84
|
+
| `docs/sdlc-traces/*.log` | SDLC hook traces | >30d default | Longer keep for audit |
|
|
85
|
+
| `/tmp/claude-verify-*` | Temp verify markers (machine-local) | any age | Current branch marker excluded |
|
|
86
|
+
| `/tmp/claude-session-timing-*` | Session timing files | >1d | Current session's excluded |
|
|
87
|
+
| `*.test-baseline` (repo root only) | Transient vitest baseline output | any age | Only at root — never in test dirs |
|
|
88
|
+
|
|
89
|
+
### NEVER touched (safety list — explicit exclusions)
|
|
90
|
+
|
|
91
|
+
| Path | Why excluded |
|
|
92
|
+
|------|-------------|
|
|
93
|
+
| `.claude/CHECKPOINT.md` | Load-bearing for graceful-exit recovery |
|
|
94
|
+
| `.claude/SESSION_LOCK` | Only removed by save-state.sh or session-end |
|
|
95
|
+
| `.claude/LAST_SAVE` | Referenced by session-start hook |
|
|
96
|
+
| `state/markers/verify/<current-branch>.marker` | Fresh; pre-commit gate depends on it |
|
|
97
|
+
| Any git-tracked file | Git history is authority |
|
|
98
|
+
| `docs/chronicle/**` | Chronicles are permanent record |
|
|
99
|
+
| `docs/whereami.md` | Load-bearing project state |
|
|
100
|
+
| `docs/operator-private/journals/**` | Pending push to Google Doc |
|
|
101
|
+
| `docs/iteration-bets/**` | Active + historical goal records |
|
|
102
|
+
| `docs/decompositions/**` | Decomposition artifacts |
|
|
103
|
+
| `docs/designs/**` | Design docs |
|
|
104
|
+
| `docs/release-notes/**` | Release history |
|
|
105
|
+
| `research/**` | Spike output (ignored by git but kept locally) |
|
|
106
|
+
|
|
107
|
+
Any target not in the clean-targets table is untouched — no matter
|
|
108
|
+
how old, no matter how unused-looking. Safety before tidiness.
|
|
109
|
+
|
|
110
|
+
## Procedure
|
|
111
|
+
|
|
112
|
+
### Step 1: Enumerate candidates
|
|
113
|
+
|
|
114
|
+
For each clean-target path, glob the matching files. Apply the age
|
|
115
|
+
gate (skip files modified within the threshold). Apply the
|
|
116
|
+
never-touched exclusions.
|
|
117
|
+
|
|
118
|
+
Emit to stdout:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
## Clean-artifacts dry-run — [timestamp]
|
|
122
|
+
|
|
123
|
+
**Clean targets** (would remove with --delete):
|
|
124
|
+
|
|
125
|
+
state/markers/verify/ (5 candidates, >7d):
|
|
126
|
+
feature-150-xxx.marker (12d old)
|
|
127
|
+
feature-152-xxx.marker (18d old)
|
|
128
|
+
...
|
|
129
|
+
|
|
130
|
+
.playwright-mcp/ (3 candidates, >7d):
|
|
131
|
+
review-2026-04-05.png (13d old)
|
|
132
|
+
...
|
|
133
|
+
|
|
134
|
+
**Skipped** (protected):
|
|
135
|
+
|
|
136
|
+
state/markers/verify/feature-176-stack-3-clean-artifacts.marker
|
|
137
|
+
(current branch marker — protected)
|
|
138
|
+
.claude/CHECKPOINT.md (load-bearing, never cleaned)
|
|
139
|
+
|
|
140
|
+
**Summary**
|
|
141
|
+
- 8 files would be removed (~240KB)
|
|
142
|
+
- Run with --delete to proceed
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Step 2: Safety checks (if --delete)
|
|
146
|
+
|
|
147
|
+
Before actually deleting, perform these checks:
|
|
148
|
+
|
|
149
|
+
1. Confirm current branch marker is in the skip list
|
|
150
|
+
2. Confirm `.claude/CHECKPOINT.md` was not flagged
|
|
151
|
+
3. Count candidates — if >100, refuse and surface a warning
|
|
152
|
+
("unexpected volume; inspect clean-targets table before overriding")
|
|
153
|
+
4. Check total size — if >50MB, refuse similarly
|
|
154
|
+
5. If any path outside clean-targets table appears, abort — bug in
|
|
155
|
+
the skill, not a situation to override
|
|
156
|
+
|
|
157
|
+
### Step 3: Delete (only if --delete)
|
|
158
|
+
|
|
159
|
+
Iterate the candidate list, remove each file. Log each removal. On
|
|
160
|
+
any error, stop and report partial state — never continue past an
|
|
161
|
+
unexpected failure.
|
|
162
|
+
|
|
163
|
+
### Step 4: Report
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
## Clean-artifacts complete — [timestamp]
|
|
167
|
+
|
|
168
|
+
Removed: N files (~M KB)
|
|
169
|
+
Skipped: N protected
|
|
170
|
+
Errors: N (details below if any)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Session-end integration
|
|
174
|
+
|
|
175
|
+
`/clean-artifacts` is invoked at the end of `/session-end`'s May
|
|
176
|
+
tier — AFTER chronicle, whereami, journal entries, and tag push
|
|
177
|
+
have all completed. Never before.
|
|
178
|
+
|
|
179
|
+
Rationale: May tier is conditional and best-effort. If `/session-end`
|
|
180
|
+
is in a degraded state (timeout pending, network flaky), skipping the
|
|
181
|
+
sweep is fine. Chronicle + whereami are not.
|
|
182
|
+
|
|
183
|
+
The `/session-end` SKILL.md May tier should include:
|
|
184
|
+
|
|
185
|
+
```markdown
|
|
186
|
+
11. **Clean workflow exhaust** (May — conditional)
|
|
187
|
+
Run /clean-artifacts --delete to sweep stale markers, screenshots,
|
|
188
|
+
and traces. Dry-run first if session was unusual (spikes, aborts).
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Hook integration (optional, future)
|
|
192
|
+
|
|
193
|
+
A mechanical helper could live at `.claude/hooks/clean-artifacts.sh`
|
|
194
|
+
that invokes the skill's dry-run logic deterministically without
|
|
195
|
+
requiring the agent. Not required for v1; skill invocation from
|
|
196
|
+
`/session-end` is sufficient.
|
|
197
|
+
|
|
198
|
+
## Rules
|
|
199
|
+
|
|
200
|
+
- **Dry-run is the default.** `--delete` must be explicit.
|
|
201
|
+
- **Strict allowlist only.** If a path isn't in the clean-targets
|
|
202
|
+
table, don't clean it.
|
|
203
|
+
- **Never touch git-tracked files.** Check with `git ls-files` before
|
|
204
|
+
deleting. Even if a git-tracked file matches a clean-target glob,
|
|
205
|
+
skip it and report.
|
|
206
|
+
- **Age gate before delete.** Every clean-target has a minimum age;
|
|
207
|
+
never delete fresh files.
|
|
208
|
+
- **Current-session markers protected.** Current branch's verify
|
|
209
|
+
marker, current session's timing file, the active `.claude/SESSION_LOCK`.
|
|
210
|
+
- **Report on every sweep.** Even if no candidates found, emit a
|
|
211
|
+
one-line "nothing to clean" so the operator knows the sweep ran.
|
|
212
|
+
|
|
213
|
+
## Common pitfalls
|
|
214
|
+
|
|
215
|
+
- **Running during active verify**: if `/verify` just wrote a marker
|
|
216
|
+
and you run `/clean-artifacts --delete --age=0`, that marker could
|
|
217
|
+
disappear before the pre-commit hook reads it. Always respect the
|
|
218
|
+
age gate.
|
|
219
|
+
- **Expanding the clean-targets table without safety review**: adding
|
|
220
|
+
a path is a one-way door if files were already deleted. Require a
|
|
221
|
+
review against the NEVER touched list before expanding.
|
|
222
|
+
- **Running in CI**: CI runs are ephemeral; the checkout is a fresh
|
|
223
|
+
clone. Sweep is wasted work there. Don't wire this into CI
|
|
224
|
+
pipelines.
|
|
225
|
+
|
|
226
|
+
## Relationship to other skills
|
|
227
|
+
|
|
228
|
+
| Skill | Relationship |
|
|
229
|
+
|-------|-------------|
|
|
230
|
+
| `/session-end` | Composer includes `/clean-artifacts` as May-tier step |
|
|
231
|
+
| `/verify` | Writes markers; `/clean-artifacts` cleans stale ones (different lifetime) |
|
|
232
|
+
| `/substrate-check` | Validates wiring; doesn't clean |
|
|
233
|
+
| `/visual-review` | Writes screenshots; `/clean-artifacts` ages them out |
|
|
234
|
+
|
|
235
|
+
## Why this skill exists
|
|
236
|
+
|
|
237
|
+
Observed across multiple bassclef + POA sessions: verify-markers for
|
|
238
|
+
merged branches accumulate indefinitely. Playwright screenshots from
|
|
239
|
+
old visual reviews sit in `.playwright-mcp/` until manually removed.
|
|
240
|
+
SDLC traces grow without bound. Each is individually small; collectively
|
|
241
|
+
they make `git status` noisy and `du` numbers embarrassing.
|
|
242
|
+
|
|
243
|
+
Codified from `/onboard-repo`'s observation that repo roots in new
|
|
244
|
+
consumer repos start clean but accumulate exhaust rapidly. Rather
|
|
245
|
+
than ask each operator to sweep manually, give them one command.
|
|
246
|
+
|
|
247
|
+
## Output discipline
|
|
248
|
+
|
|
249
|
+
Dispatch `/kiss words --rewrite` on your skill output before you return it. See `standards/skill-output-discipline.md` for the contract.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
tier: lite
|
|
3
3
|
name: decompose
|
|
4
|
-
description:
|
|
4
|
+
description: "Audit responsibilities before you build. Reads sequence diagrams. Assigns GRASP roles. Identifies interfaces. Audits cross-cutting concerns. Selects patterns from GoF, Fowler, and stack idioms. Bridges design and build."
|
|
5
5
|
problem: "Cross-cutting concerns bolt into implementations. Logging and tracing pile inside business code."
|
|
6
6
|
value: "A responsibility matrix that keeps each concern in its own class. Decorators stay clean."
|
|
7
7
|
inputs: [Sequence diagrams from spec, A decomposition target — feature or defect]
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
tier: lite
|
|
3
3
|
name: diagnose
|
|
4
|
-
description: Diagnose a defect before fixing
|
|
4
|
+
description: "Diagnose a defect before fixing. Reproduce the failure first (Step 0), then Is/Is Not, then Five Whys, then a Hypothesis. Run before writing any fix code. Lazy diagnosis ships brittle fixes."
|
|
5
5
|
problem: "Bugs get fixed on guesses. The wrong cause gets patched. The class comes back a week later."
|
|
6
6
|
value: "A short trace from failure to root cause. You fix the class once instead of the instance three times."
|
|
7
7
|
inputs: [A failing test or error log, A bug ticket or screenshot]
|