@thebassclef/lite 0.1.3 → 1.0.0
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 +216 -137
- package/dist/cli.js +218 -139
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lite/.bassclef-source.json +10 -0
- package/dist/lite/.claude/settings.json +212 -0
- package/dist/lite/CLAUDE.md +41 -0
- package/dist/lite/gitignore +58 -0
- package/dist/lite/standards/bassclef-wiring-manifest.json +497 -0
- package/dist/lite/whereami.md +24 -0
- package/package.json +8 -2
- package/substrate/.bassclef/lite-manifest.json +0 -2701
- package/substrate/.claude/agents/architect.md +0 -70
- package/substrate/.claude/agents/builder.md +0 -114
- package/substrate/.claude/agents/designer.md +0 -156
- package/substrate/.claude/agents/reviewer.md +0 -88
- package/substrate/.claude/hooks/artifact-ingestion-gate.sh +0 -357
- package/substrate/.claude/hooks/assert-verify-steering.sh +0 -77
- package/substrate/.claude/hooks/bassclef-source-config-validate.sh +0 -215
- package/substrate/.claude/hooks/bassclef-sync.sh +0 -634
- package/substrate/.claude/hooks/compound-noun-scrub.sh +0 -292
- package/substrate/.claude/hooks/kiss-expansion-inject.sh +0 -69
- package/substrate/.claude/hooks/longrun-prep-compounding-axis-check.sh +0 -492
- package/substrate/.claude/hooks/longrun-prep-compounding-sequence-check.sh +0 -492
- package/substrate/.claude/hooks/plain-english-steering.sh +0 -156
- package/substrate/.claude/hooks/post-skill-friction-check.sh +0 -177
- package/substrate/.claude/hooks/post-skill-telemetry.sh +0 -62
- package/substrate/.claude/hooks/pre-build-gate.sh +0 -511
- package/substrate/.claude/hooks/pre-commit-gate.sh +0 -451
- package/substrate/.claude/hooks/session-end.sh +0 -433
- package/substrate/.claude/hooks/session-reflection.sh +0 -303
- package/substrate/.claude/hooks/skill-body-grade-gate.sh +0 -219
- package/substrate/.claude/hooks/skill-body-intent-drift.sh +0 -107
- package/substrate/.claude/hooks/skill-step-list-check.sh +0 -171
- package/substrate/.claude/hooks/state-validate.sh +0 -271
- package/substrate/.claude/hooks/substrate-clarity-gate.sh +0 -1110
- package/substrate/.claude/hooks/temperance-gate.sh +0 -147
- package/substrate/.claude/hooks/testing-tier-enforce.sh +0 -233
- package/substrate/.claude/hooks/turn-prose-grade-measure.sh +0 -219
- package/substrate/.claude/hooks/turn-prose-kiss-check.sh +0 -463
- package/substrate/.claude/hooks/vocabulary-migration-check.sh +0 -171
- package/substrate/.claude/hooks/whereami-utc-gate.sh +0 -142
- package/substrate/.claude/luminaries/alan-cooper.md +0 -170
- package/substrate/.claude/luminaries/alistair-cockburn.md +0 -140
- package/substrate/.claude/luminaries/amazon-pr-faq.md +0 -34
- package/substrate/.claude/luminaries/ash-maurya.md +0 -121
- package/substrate/.claude/luminaries/bill-buxton.md +0 -210
- package/substrate/.claude/luminaries/charles-sanders-peirce.md +0 -150
- package/substrate/.claude/luminaries/david-ogilvy.md +0 -192
- package/substrate/.claude/luminaries/don-norman.md +0 -173
- package/substrate/.claude/luminaries/edward-tufte.md +0 -179
- package/substrate/.claude/luminaries/eric-evans.md +0 -160
- package/substrate/.claude/luminaries/frederick-brooks.md +0 -50
- package/substrate/.claude/luminaries/gang-of-four.md +0 -157
- package/substrate/.claude/luminaries/glenford-myers.md +0 -230
- package/substrate/.claude/luminaries/hunt-thomas.md +0 -115
- package/substrate/.claude/luminaries/hyrum-wright.md +0 -94
- package/substrate/.claude/luminaries/jason-fried-dhh.md +0 -46
- package/substrate/.claude/luminaries/jesse-james-garrett.md +0 -154
- package/substrate/.claude/luminaries/john-ousterhout.md +0 -94
- package/substrate/.claude/luminaries/karl-popper.md +0 -132
- package/substrate/.claude/luminaries/kent-beck.md +0 -168
- package/substrate/.claude/luminaries/linus-torvalds.md +0 -218
- package/substrate/.claude/luminaries/martin-fowler.md +0 -164
- package/substrate/.claude/luminaries/michael-feathers.md +0 -125
- package/substrate/.claude/luminaries/michael-nygard.md +0 -118
- package/substrate/.claude/luminaries/robert-c-martin.md +0 -164
- package/substrate/.claude/luminaries/saltzer-schroeder.md +0 -194
- package/substrate/.claude/luminaries/sophia-prater.md +0 -193
- package/substrate/.claude/luminaries/stephen-toulmin.md +0 -131
- package/substrate/.claude/luminaries/tony-hoare.md +0 -170
- package/substrate/.claude/luminaries/vaughn-vernon.md +0 -50
- package/substrate/.claude/luminaries/w-edwards-deming.md +0 -158
- package/substrate/.claude/rules/accessor-library-discipline.md +0 -138
- package/substrate/.claude/rules/adr-discipline.md +0 -120
- package/substrate/.claude/rules/api-conventions.md +0 -125
- package/substrate/.claude/rules/artifact-ingestion.md +0 -179
- package/substrate/.claude/rules/assert-only-after-verify.md +0 -137
- package/substrate/.claude/rules/blocked-items.md +0 -146
- package/substrate/.claude/rules/bootstrap-pair-discipline.md +0 -141
- package/substrate/.claude/rules/branching.md +0 -28
- package/substrate/.claude/rules/cold-adopter-harness-discipline.md +0 -129
- package/substrate/.claude/rules/commit-conventions.md +0 -22
- package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +0 -188
- package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +0 -188
- package/substrate/.claude/rules/context-engineering.md +0 -202
- package/substrate/.claude/rules/context-management.md +0 -85
- package/substrate/.claude/rules/defensive-bash.md +0 -68
- package/substrate/.claude/rules/deferred-actions.md +0 -233
- package/substrate/.claude/rules/destructive-operations.md +0 -69
- package/substrate/.claude/rules/diagnosis.md +0 -38
- package/substrate/.claude/rules/github-issue-flash-tweet.md +0 -156
- package/substrate/.claude/rules/guardrails.md +0 -73
- package/substrate/.claude/rules/hook-wire-on-author.md +0 -103
- package/substrate/.claude/rules/identifier-leak-prevention.md +0 -104
- package/substrate/.claude/rules/iteration-bet-brief-completeness.md +0 -54
- package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +0 -98
- package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +0 -89
- package/substrate/.claude/rules/loop-discipline.md +0 -81
- package/substrate/.claude/rules/manual-prod-approval.md +0 -100
- package/substrate/.claude/rules/marker-enrichment-discipline.md +0 -99
- package/substrate/.claude/rules/mobile-ephemeral-session.md +0 -109
- package/substrate/.claude/rules/new-dependency-check.md +0 -51
- package/substrate/.claude/rules/oo-ad-entry-point.md +0 -117
- package/substrate/.claude/rules/operator-facing-prose.md +0 -196
- package/substrate/.claude/rules/option-label-discipline.md +0 -108
- package/substrate/.claude/rules/pattern-annotation.md +0 -100
- package/substrate/.claude/rules/plain-english-discipline.md +0 -156
- package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +0 -211
- package/substrate/.claude/rules/pr-body-shape.md +0 -317
- package/substrate/.claude/rules/pr-strategy.md +0 -167
- package/substrate/.claude/rules/pr-title-shape.md +0 -161
- package/substrate/.claude/rules/prototype-workflow.md +0 -65
- package/substrate/.claude/rules/reserved-skill-names.md +0 -123
- package/substrate/.claude/rules/schema-management.md +0 -49
- package/substrate/.claude/rules/sdlc-gates.md +0 -149
- package/substrate/.claude/rules/security.md +0 -37
- package/substrate/.claude/rules/session-artifacts.md +0 -236
- package/substrate/.claude/rules/skill-composition-declarations.md +0 -124
- package/substrate/.claude/rules/skill-description-clarity.md +0 -247
- package/substrate/.claude/rules/skill-procedure-step-list.md +0 -137
- package/substrate/.claude/rules/state-schema-validation.md +0 -162
- package/substrate/.claude/rules/stuck-signal-diagnostic.md +0 -140
- package/substrate/.claude/rules/substrate-config-schema.md +0 -98
- package/substrate/.claude/rules/test-list-discipline.md +0 -175
- package/substrate/.claude/rules/test-sufficiency.md +0 -210
- package/substrate/.claude/rules/testing-tier-config.md +0 -145
- package/substrate/.claude/rules/testing.md +0 -38
- package/substrate/.claude/rules/turn-estimate-grounding.md +0 -134
- package/substrate/.claude/rules/visual-hierarchy.md +0 -437
- package/substrate/.claude/rules/we-dont-break-adopters.md +0 -126
- package/substrate/.claude/rules/whereami-load-bearing.md +0 -202
- package/substrate/.claude/rules/writing-craft-discipline.md +0 -92
- package/substrate/.claude/rules/wu-sequencing-compounds.md +0 -145
- package/substrate/.claude/skills/build/SKILL.md +0 -640
- package/substrate/.claude/skills/chronicle/SKILL.md +0 -55
- package/substrate/.claude/skills/clean-artifacts/SKILL.md +0 -249
- package/substrate/.claude/skills/decompose/SKILL.md +0 -280
- package/substrate/.claude/skills/diagnose/SKILL.md +0 -297
- package/substrate/.claude/skills/feynman/SKILL.md +0 -90
- package/substrate/.claude/skills/howdoi/SKILL.md +0 -105
- package/substrate/.claude/skills/ia-model/SKILL.md +0 -108
- package/substrate/.claude/skills/interaction-design/SKILL.md +0 -112
- package/substrate/.claude/skills/interpret-input/SKILL.md +0 -180
- package/substrate/.claude/skills/journal/SKILL.md +0 -209
- package/substrate/.claude/skills/kiss/SKILL.md +0 -449
- package/substrate/.claude/skills/launch/SKILL.md +0 -915
- package/substrate/.claude/skills/lean-canvas/SKILL.md +0 -332
- package/substrate/.claude/skills/longrun/SKILL.md +0 -463
- package/substrate/.claude/skills/luminary/SKILL.md +0 -481
- package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +0 -177
- package/substrate/.claude/skills/onboard-repo/SKILL.md +0 -1624
- package/substrate/.claude/skills/pattern-review/SKILL.md +0 -99
- package/substrate/.claude/skills/personas/SKILL.md +0 -207
- package/substrate/.claude/skills/promote/SKILL.md +0 -283
- package/substrate/.claude/skills/requirement/SKILL.md +0 -98
- package/substrate/.claude/skills/retro/SKILL.md +0 -117
- package/substrate/.claude/skills/riff/SKILL.md +0 -114
- package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +0 -163
- package/substrate/.claude/skills/session-end/SKILL.md +0 -309
- package/substrate/.claude/skills/session-log/SKILL.md +0 -299
- package/substrate/.claude/skills/skills/SKILL.md +0 -228
- package/substrate/.claude/skills/spec/SKILL.md +0 -105
- package/substrate/.claude/skills/sprint/SKILL.md +0 -392
- package/substrate/.claude/skills/stage/SKILL.md +0 -384
- package/substrate/.claude/skills/state-a-problem/SKILL.md +0 -185
- package/substrate/.claude/skills/temperance/SKILL.md +0 -108
- package/substrate/.claude/skills/use-case/SKILL.md +0 -417
- package/substrate/.claude/skills/user-stories/SKILL.md +0 -268
- package/substrate/.claude/skills/value-prop/SKILL.md +0 -251
- package/substrate/.claude/skills/verify/SKILL.md +0 -160
- package/substrate/.claude/skills/visual-review/SKILL.md +0 -503
- package/substrate/.claude/skills/whats-the-plan/SKILL.md +0 -202
- package/substrate/.claude/skills/whereami/SKILL.md +0 -307
- package/substrate/AGENTS.md +0 -79
- package/substrate/CLAUDE-lite.md +0 -85
- package/substrate/CODE_OF_CONDUCT.md +0 -28
- package/substrate/CONTRIBUTING.md +0 -177
- package/substrate/README.md +0 -173
- package/substrate/SECURITY.md +0 -19
- package/substrate/architecture/decisions/ADR-029-release-pipeline.md +0 -79
- package/substrate/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +0 -139
- package/substrate/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +0 -192
- package/substrate/architecture/decisions/ADR-039-release-tagging-scheme.md +0 -145
- package/substrate/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +0 -155
- package/substrate/architecture/decisions/ADR-044-unified-skill-body-template.md +0 -162
- package/substrate/lib/clean-artifacts-sweep.sh +0 -112
- package/substrate/lib/code-comment-discipline.sh +0 -144
- package/substrate/lib/composer-preflight.sh +0 -459
- package/substrate/lib/hook-inject.sh +0 -255
- package/substrate/lib/luminary-pick.sh +0 -96
- package/substrate/lib/output-discipline.sh +0 -143
- package/substrate/lib/prose-scan-boundary.sh +0 -171
- package/substrate/lib/rewrite-check.sh +0 -214
- package/substrate/lib/state.sh +0 -1372
- package/substrate/lib/telemetry.sh +0 -205
- package/substrate/lib/tier-check.sh +0 -187
- package/substrate/lib/tier-dependency-audit.sh +0 -1088
- package/substrate/presence/install/bassclef-hook-connect.sh +0 -178
- package/substrate/presence/install/bassclef-sync.dispatcher.template.sh +0 -841
- package/substrate/presence/install/bassclef-sync.template.sh +0 -2076
- package/substrate/presence/install/schedule-auto-save.cron.sh +0 -88
- package/substrate/presence/install/schedule-auto-save.taskscheduler.md +0 -122
- package/substrate/scripts/aggregate-telemetry.sh +0 -217
- package/substrate/scripts/analyze-tier-dependencies.sh +0 -239
- package/substrate/scripts/generate-lite-manifest.sh +0 -505
- package/substrate/scripts/generate-tier-manifest.sh +0 -28
- package/substrate/scripts/intent-drift-check.sh +0 -456
- package/substrate/scripts/lite-manifest-drift-check.sh +0 -146
- package/substrate/scripts/render-lite-manifest-doc.sh +0 -150
- package/substrate/standards/adr-template.md +0 -86
- package/substrate/standards/api-conventions/nextjs.md +0 -84
- package/substrate/standards/artifact-composition.md +0 -209
- package/substrate/standards/bash-hook-safety.md +0 -246
- package/substrate/standards/bassclef-configs-schema.md +0 -232
- package/substrate/standards/bassclef-evolution.md +0 -143
- package/substrate/standards/bassclef-internal-jargon.md +0 -244
- package/substrate/standards/bassclef-managed-sentinel.md +0 -96
- package/substrate/standards/bassclef-source-config.md +0 -228
- package/substrate/standards/branch-stacking.md +0 -408
- package/substrate/standards/code-safety-principles.md +0 -176
- package/substrate/standards/composer-prerequisites.md +0 -155
- package/substrate/standards/deferred-actions-schema.md +0 -204
- package/substrate/standards/dependency-discipline/cargo.md +0 -39
- package/substrate/standards/dependency-discipline/gem.md +0 -43
- package/substrate/standards/dependency-discipline/go-mod.md +0 -41
- package/substrate/standards/dependency-discipline/npm.md +0 -42
- package/substrate/standards/dependency-discipline/pip.md +0 -42
- package/substrate/standards/deployment-topology/ec2-tailscale.md +0 -225
- package/substrate/standards/deployment-topology.md +0 -69
- package/substrate/standards/docs-sync-allowlist.md +0 -76
- package/substrate/standards/domain-and-dns.md +0 -145
- package/substrate/standards/frontend-stack.md +0 -67
- package/substrate/standards/frontmatter-schema.md +0 -154
- package/substrate/standards/graceful-exit.md +0 -227
- package/substrate/standards/hook-idempotency.md +0 -102
- package/substrate/standards/hook-injection-discipline.md +0 -202
- package/substrate/standards/hook-install-class.md +0 -215
- package/substrate/standards/input-handler-interface.md +0 -152
- package/substrate/standards/lite-manifest-schema-changes.md +0 -135
- package/substrate/standards/luminary-matching.md +0 -105
- package/substrate/standards/luminary-problem-patterns.md +0 -481
- package/substrate/standards/migration-discipline/active-record.md +0 -50
- package/substrate/standards/migration-discipline/alembic.md +0 -43
- package/substrate/standards/migration-discipline/gorm.md +0 -50
- package/substrate/standards/migration-discipline/prisma.md +0 -53
- package/substrate/standards/migration-discipline/sqlalchemy.md +0 -51
- package/substrate/standards/mobile-ephemeral-session.md +0 -167
- package/substrate/standards/model-routing-discipline.md +0 -160
- package/substrate/standards/ogilvy-writing-rules.md +0 -225
- package/substrate/standards/opener-discipline.md +0 -96
- package/substrate/standards/operator-facing-prose-discipline.md +0 -201
- package/substrate/standards/persona-schema.md +0 -229
- package/substrate/standards/pluggable-luminaries.md +0 -323
- package/substrate/standards/pr-body-discipline.md +0 -115
- package/substrate/standards/preview-state-schema.md +0 -189
- package/substrate/standards/project-directory-layout.md +0 -276
- package/substrate/standards/release-tagging.md +0 -137
- package/substrate/standards/reserved-skill-names.md +0 -120
- package/substrate/standards/scannable-multi-option-output.md +0 -261
- package/substrate/standards/sdlc-compliance.md +0 -286
- package/substrate/standards/sdlc-gates/typescript.md +0 -57
- package/substrate/standards/secrets-lifecycle.md +0 -210
- package/substrate/standards/security-scanner-adapter.md +0 -145
- package/substrate/standards/session-board.md +0 -256
- package/substrate/standards/skill-output-discipline.md +0 -90
- package/substrate/standards/state-spine-contract.md +0 -255
- package/substrate/standards/state-spine.md +0 -511
- package/substrate/standards/steering-hints/kiss-words.md +0 -11
- package/substrate/standards/substrate-config-schema.md +0 -267
- package/substrate/standards/tech-stack-config.md +0 -109
- package/substrate/standards/tier-dependency-analysis.md +0 -167
- package/substrate/standards/tier-runtime-deps/lite.md +0 -57
- package/substrate/standards/tier-tag-schema.md +0 -155
- package/substrate/standards/two-layer-config.md +0 -99
- package/substrate/standards/use-case-format.md +0 -292
- package/substrate/standards/user-story-invest.md +0 -268
- package/substrate/standards/velocity-and-appetite.md +0 -229
- package/substrate/standards/voice-input-pattern.md +0 -119
- package/substrate/standards/whereami-schema.md +0 -301
- package/substrate/standards/worktree-management.md +0 -211
- package/substrate/standards/writing-guide.md +0 -213
- package/substrate/templates/chronicle-template.md +0 -75
- package/substrate/templates/deferred-action-template.md +0 -45
- package/substrate/templates/memory-proposal-template.md +0 -77
- package/substrate/templates/persona-template.md +0 -200
- package/substrate/templates/pr-faq.md +0 -45
- package/substrate/templates/secret-rotation-template.md +0 -162
- package/substrate/templates/spec-template.md +0 -131
- package/substrate/templates/use-case-template.md +0 -194
- package/substrate/templates/user-story-template.md +0 -107
- package/substrate/templates/whereami-template.md +0 -101
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
globs: ["*"]
|
|
4
|
-
description: Context window management — thresholds, compaction strategy, survival kit
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Context Management
|
|
8
|
-
|
|
9
|
-
Long sessions will hit context limits. This is expected, not a failure.
|
|
10
|
-
Manage proactively.
|
|
11
|
-
|
|
12
|
-
INSTEAD of waiting for compaction to surprise you: checkpoint at 70%
|
|
13
|
-
context (commit work, write whereami, let compaction run). Re-read the
|
|
14
|
-
survival kit after compaction.
|
|
15
|
-
|
|
16
|
-
## Thresholds
|
|
17
|
-
|
|
18
|
-
| Context level | Action |
|
|
19
|
-
|--------------|--------|
|
|
20
|
-
| 0–50% | Normal operation. Read files freely. |
|
|
21
|
-
| 50–70% | Be selective. INSTEAD of full file reads: use Glob/Grep with bounded result sets. Skip re-reading files already in current context. |
|
|
22
|
-
| 70% | **Checkpoint now.** Commit all work. Write whereami. The system will auto-compact prior messages. After compaction, re-read the survival kit. |
|
|
23
|
-
| 80%+ | **Atomic tasks only.** Complete current task, commit, re-read survival kit. Do not start multi-file changes. |
|
|
24
|
-
| 90% | **Finish and stop.** Complete the current atomic unit, commit, update whereami. Write chronicle if at a phase boundary. |
|
|
25
|
-
|
|
26
|
-
## Survival kit (re-read after ANY compaction)
|
|
27
|
-
|
|
28
|
-
The survival kit mirrors what `iteration-bet-brief-completeness.md`
|
|
29
|
-
requires in a Builder/Designer/Architect handoff brief — same artifact
|
|
30
|
-
list, one source of truth. Post-compaction re-read is functionally
|
|
31
|
-
identical to a fresh role handoff: the agent needs the same context to
|
|
32
|
-
continue the goal correctly.
|
|
33
|
-
|
|
34
|
-
**Always re-read:**
|
|
35
|
-
|
|
36
|
-
1. **Iteration bet** — scope, phase, time budget, acceptance criteria, references block
|
|
37
|
-
2. **Phase-state** — where we are, what's done, what's next
|
|
38
|
-
3. **MUST gates** — sdlc-gates rule + choreography Section 9
|
|
39
|
-
4. **Current agent definition** — role-specific obligations (if multi-agent)
|
|
40
|
-
|
|
41
|
-
**Re-read when the goal's References cite them (per scope):**
|
|
42
|
-
|
|
43
|
-
5. **Canvas** — upstream thesis; re-read when spec is thin or scope is
|
|
44
|
-
product-facing
|
|
45
|
-
6. **Current spec or decomposition artifact** — what's being built; the
|
|
46
|
-
`/decompose` output carries cross-cutting-concern resolution
|
|
47
|
-
(interfaces, decorators) that must survive compaction or the
|
|
48
|
-
Langfuse-inside-HaikuImputer anti-pattern reproduces
|
|
49
|
-
7. **Prototypes** — every prototype path the goal cites; losing these
|
|
50
|
-
reproduces the cramped-UI-rebuild failure mode
|
|
51
|
-
8. **Pinned ADRs** — architecture constraints the goal calls governing
|
|
52
|
-
9. **Luminary map** — primary pair + extended pairs for surfaces in scope
|
|
53
|
-
10. **Branch stack manifest** — if in Construction with stacked branches
|
|
54
|
-
11. **Risk register (active iteration)** — so mitigations aren't re-forgotten
|
|
55
|
-
|
|
56
|
-
What you do NOT need to re-read: the 24 bassclef rules, standards in
|
|
57
|
-
`standards/`, and agent choreography. Those inherit via
|
|
58
|
-
`additionalDirectories` and are injected fresh each turn — compaction
|
|
59
|
-
does not drop them.
|
|
60
|
-
|
|
61
|
-
If you can't recall what you're building, what gates apply, or which
|
|
62
|
-
prototypes/ADRs/luminaries govern the work, you've lost critical
|
|
63
|
-
context. Re-read before continuing.
|
|
64
|
-
|
|
65
|
-
## Anti-patterns
|
|
66
|
-
|
|
67
|
-
- **Don't read entire large files** when you only need a section.
|
|
68
|
-
INSTEAD: use Read with offset/limit, or grep for the section header first.
|
|
69
|
-
- **Don't re-read files** already in the conversation.
|
|
70
|
-
INSTEAD: check whether the file content is already in your context window.
|
|
71
|
-
- **Don't expand search results** you don't need.
|
|
72
|
-
INSTEAD: use head_limit on Grep to cap the result set.
|
|
73
|
-
- **Don't keep retrying** failed approaches — each retry consumes context.
|
|
74
|
-
INSTEAD: diagnose first (Is/Is Not + Five Whys), then fix.
|
|
75
|
-
|
|
76
|
-
## Sequential mode specifics
|
|
77
|
-
|
|
78
|
-
In sequential autonomous mode, one session plays all roles. Context
|
|
79
|
-
pressure is highest during Construction after Inception and Elaboration
|
|
80
|
-
have consumed context. At each role transition:
|
|
81
|
-
|
|
82
|
-
1. Commit all artifacts from the current role
|
|
83
|
-
2. The handoff artifact IS the context for the next role
|
|
84
|
-
3. Let compaction run
|
|
85
|
-
4. Re-read survival kit + next agent definition
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
description: Every bash hook + script in bassclef follows standards/bash-hook-safety.md.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Defensive Bash — Methodology Pointer
|
|
7
|
-
|
|
8
|
-
Every bash hook + script in bassclef follows `standards/bash-hook-safety.md`. This rule is the auto-loaded reminder; the standard is the full reference.
|
|
9
|
-
|
|
10
|
-
## When this rule fires
|
|
11
|
-
|
|
12
|
-
Any edit / write to:
|
|
13
|
-
|
|
14
|
-
- `.claude/hooks/*.sh` (hook files)
|
|
15
|
-
- `scripts/*.sh` (scripts)
|
|
16
|
-
- `lib/*.sh` (shared bash libraries)
|
|
17
|
-
- New bash files anywhere in the repo (`.sh` extension OR `#!/bin/bash` shebang)
|
|
18
|
-
|
|
19
|
-
## The seven disciplines (one-line each)
|
|
20
|
-
|
|
21
|
-
1. **Strict mode at the top** — `set -euo pipefail` is mandatory
|
|
22
|
-
2. **Quote every variable** — `"$var"` always inside string contexts; bare `$var` inside strings causes word-splitting + glob-expansion
|
|
23
|
-
3. **`local` in functions** — every function-scope variable declared `local`
|
|
24
|
-
4. **Trap EXIT for cleanup** — temp files / locks / background processes get `trap '...' EXIT`
|
|
25
|
-
5. **Explicit return codes** — every termination point ends with `exit N`
|
|
26
|
-
6. **Glob-tolerance** — `shopt -s nullglob` or array-with-length-check
|
|
27
|
-
7. **Audit emission at every exit** — `trace_record` before exit
|
|
28
|
-
|
|
29
|
-
Full reference: `standards/bash-hook-safety.md` (each discipline has anti-pattern + INSTEAD pair + worked example).
|
|
30
|
-
|
|
31
|
-
## Saltzer & Schroeder anchor
|
|
32
|
-
|
|
33
|
-
The seven disciplines instantiate `@luminary saltzer-schroeder`'s 8 protection-mechanism principles for the bash layer. The stack-translation table in `.claude/luminaries/saltzer-schroeder.md` maps each principle to its bash discipline.
|
|
34
|
-
|
|
35
|
-
INSTEAD of inventing bassclef-specific bash rules: this rule + standard chain to the 50-year-stable Saltzer & Schroeder authority. The chain is: principle (luminary) → discipline (standard) → reminder (this rule).
|
|
36
|
-
|
|
37
|
-
## Mechanical enforcement
|
|
38
|
-
|
|
39
|
-
| Layer | Mechanism | When |
|
|
40
|
-
|---|---|---|
|
|
41
|
-
| Methodology | This rule (auto-loaded) | Every session |
|
|
42
|
-
| Tier 0 TDD | `testing-tier-enforce.sh` hook | Edit/Write on `.claude/hooks/*.sh` (test mtime ≤ source mtime) |
|
|
43
|
-
| Shellcheck baseline | `.github/workflows/shellcheck.yml` (Phase X-4) | PR open + push |
|
|
44
|
-
| Strict-mode self-check | Reviewer + `/security-review` skill | PR review |
|
|
45
|
-
|
|
46
|
-
INSTEAD of relying on agent self-discipline alone: mechanical layers fire at the moment of failure. This rule is the methodology layer that coexists with the mechanical layers.
|
|
47
|
-
|
|
48
|
-
## Override
|
|
49
|
-
|
|
50
|
-
`SKIP_DEFENSIVE_BASH=1 <command>` — for one-shot scripts that will not ship into the substrate (e.g., ad-hoc data inspection). Logged via trace-helper.
|
|
51
|
-
|
|
52
|
-
INSTEAD of overriding when scope is tight: split the work — the throwaway script bypasses; the substrate-bound hook keeps the discipline. Mixing the two leaves substrate code with weakened safety.
|
|
53
|
-
|
|
54
|
-
## Refs
|
|
55
|
-
|
|
56
|
-
- `standards/bash-hook-safety.md` — full reference
|
|
57
|
-
- `standards/code-safety-principles.md` — language-agnostic principles this rule instantiates
|
|
58
|
-
- `@luminary saltzer-schroeder` — anchor
|
|
59
|
-
- `@luminary john-ousterhout` — Deep modules framing for hook design
|
|
60
|
-
- `@luminary kent-beck` — TDD anchor; Tier 0 strict-TDD applies
|
|
61
|
-
- `.claude/rules/security.md` — sibling rule for web-layer source
|
|
62
|
-
- `.claude/rules/destructive-operations.md` — agent self-assessment companion
|
|
63
|
-
- `.claude/rules/testing-tier-config.md` — Tier 0 strict-TDD discipline
|
|
64
|
-
- docs/iteration-bets/2026-06-17a-secure-coding-foundations-longrun.md — goal authoring this rule
|
|
65
|
-
|
|
66
|
-
## Retirement
|
|
67
|
-
|
|
68
|
-
This rule retires only if bassclef migrates off bash for hooks. See `standards/bash-hook-safety.md` § Retirement.
|
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
globs: ["**/*"]
|
|
4
|
-
description: Deferred-actions manifest — capability-routed handoff across session modalities. Sessions write entries when capabilities don't satisfy an action; capable future sessions pick them up.
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Deferred Actions — Session Handoff Protocol
|
|
8
|
-
|
|
9
|
-
`docs/deferred-actions/*.md` is the capability-routed handoff primitive.
|
|
10
|
-
When a session produces work it cannot deliver (missing credentials,
|
|
11
|
-
ephemeral sandbox, abrupt stop), it writes a deferred-action entry that
|
|
12
|
-
a capable future session picks up at session-start.
|
|
13
|
-
|
|
14
|
-
See `standards/deferred-actions-schema.md` for the full schema, field
|
|
15
|
-
reference, capability vocabulary, and lifecycle. This rule governs
|
|
16
|
-
*agent behavior* — when to write, when to resolve, how to prioritize.
|
|
17
|
-
|
|
18
|
-
## When to write a deferred-action entry
|
|
19
|
-
|
|
20
|
-
Any time the session has produced artifacts or state the current
|
|
21
|
-
environment cannot deliver, and a future session with different
|
|
22
|
-
capabilities could.
|
|
23
|
-
|
|
24
|
-
Specifically:
|
|
25
|
-
|
|
26
|
-
1. **External delivery gap** — skill produced output that pushes to an
|
|
27
|
-
external service (Google Doc, memory file, remote tag) but the
|
|
28
|
-
session lacks the capability. Examples:
|
|
29
|
-
- `/release-notes` in ephemeral-mobile — missing `gcloud-auth`
|
|
30
|
-
- `/journal` in cloud-web — missing `network` + `gcloud-auth`
|
|
31
|
-
- `/deploy-prod` retroactive `git tag` — ephemeral session without `git-tag`
|
|
32
|
-
2. **Memory proposal** — mobile / cloud-web session identifies a memory
|
|
33
|
-
entry worth adding, but cannot write to `~/.claude/projects/.../memory/`.
|
|
34
|
-
Write a `*-memory.md` entry with the proposed content; next desktop
|
|
35
|
-
session reviews and applies.
|
|
36
|
-
3. **Session rescue (abrupt stop)** — Stop hook fires in danger mode
|
|
37
|
-
(context exhausted, OS interruption). Write a `*-session-rescue.md`
|
|
38
|
-
entry enumerating unfinished MUST/SHOULD obligations (chronicle
|
|
39
|
-
backfill, whereami update, journal entry). Next session picks them
|
|
40
|
-
up as `BLOCKED:` items.
|
|
41
|
-
4. **Skill explicitly defers** — any skill that encounters a missing
|
|
42
|
-
capability mid-run should self-detect and write the entry rather
|
|
43
|
-
than silently skipping. Silent skip is a rule violation (per
|
|
44
|
-
`session-artifacts.md` — silence is not deferral).
|
|
45
|
-
|
|
46
|
-
## How to write
|
|
47
|
-
|
|
48
|
-
Copy `templates/deferred-action-template.md` to
|
|
49
|
-
`docs/deferred-actions/<ISO-ts>-<slug>.md`. Fill every required field
|
|
50
|
-
per the schema. Commit as part of the session's normal artifact flow.
|
|
51
|
-
|
|
52
|
-
```bash
|
|
53
|
-
# example one-liner for skills
|
|
54
|
-
TS=$(date -u +"%Y-%m-%dT%H-%M-%SZ")
|
|
55
|
-
SLUG="release-notes-gdoc-push"
|
|
56
|
-
cp templates/deferred-action-template.md \
|
|
57
|
-
"docs/deferred-actions/${TS}-${SLUG}.md"
|
|
58
|
-
# ...then edit the frontmatter + body in-place
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
The file must commit successfully — if `git add` / `git commit` fails
|
|
62
|
-
in the current session, the entry will not propagate. Surface the
|
|
63
|
-
failure visibly; do not silently drop.
|
|
64
|
-
|
|
65
|
-
## When to resolve
|
|
66
|
-
|
|
67
|
-
At session-start, `60-deferred-actions.sh` scans entries and emits
|
|
68
|
-
`BLOCKED:` for capability-matched entries (this session can resolve)
|
|
69
|
-
or `INFORM:` for capability-missed entries (visible, not actionable).
|
|
70
|
-
|
|
71
|
-
Protocol for `BLOCKED:` entries mirrors `blocked-items.md`:
|
|
72
|
-
|
|
73
|
-
1. Surface the `BLOCKED:` block verbatim to the operator (agent's
|
|
74
|
-
mandatory response format handles this automatically).
|
|
75
|
-
2. Each blocked deferred-action entry MUST be either:
|
|
76
|
-
- **Resolved** in this session (run the entry's "Command to execute",
|
|
77
|
-
verify "On completion", apply Pattern A or Pattern B per below), OR
|
|
78
|
-
- **Explicitly deferred** by operator ("skip `<id>` this session")
|
|
79
|
-
3. Silence is not deferral. Default is resolve.
|
|
80
|
-
|
|
81
|
-
### Two resolution patterns — Pattern A and Pattern B
|
|
82
|
-
|
|
83
|
-
Resolution shape depends on whether the entry's work was actually done OR routed elsewhere. Picking the wrong pattern is a real substrate failure. The eager mv to `completed/` mistake compounds across consumer sessions if not caught.
|
|
84
|
-
|
|
85
|
-
**Pattern B (mv to completed/) — work was done:**
|
|
86
|
-
|
|
87
|
-
The entry's `Command to execute` ran successfully; the entry's `On
|
|
88
|
-
completion` checks pass; the work the entry described is finished.
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
git mv "docs/deferred-actions/<id>.md" \
|
|
92
|
-
"docs/deferred-actions/completed/<id>.md"
|
|
93
|
-
git commit -m "chore: resolve <id>"
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
The filename never changes; git tracks the move so audit trail is
|
|
97
|
-
preserved.
|
|
98
|
-
|
|
99
|
-
**Pattern A (keep alive in active dir, flip status, surface as INFORM)
|
|
100
|
-
— work was routed elsewhere:**
|
|
101
|
-
|
|
102
|
-
The entry can't run as written because the substrate needs the current session cannot deliver. Examples: operator decisions, infra not yet provisioned, schema not yet shipped. The work moves to a GitHub issue in the consumer repo with the prereq spec. Bassclef issues get cross-referenced in a comment. The deferred-action file stays **in the active dir** with status flipped to `blocked-on-issue:#NNN`.
|
|
103
|
-
|
|
104
|
-
Procedure:
|
|
105
|
-
1. File a GitHub issue in the consumer repo with the prereq
|
|
106
|
-
specification.
|
|
107
|
-
2. Cross-reference relevant bassclef issues in a comment on that
|
|
108
|
-
issue.
|
|
109
|
-
3. **Leave** the deferred-action file in `docs/deferred-actions/`
|
|
110
|
-
(active dir).
|
|
111
|
-
4. Edit the entry's frontmatter: set `status: blocked-on-issue:#NNN`.
|
|
112
|
-
5. When bassclef#434 (`/defer-to-issue` skill) ships, the skill will
|
|
113
|
-
automate steps 1-4 and surface the entry as `INFORM` instead of
|
|
114
|
-
`BLOCKED` at session-start.
|
|
115
|
-
|
|
116
|
-
Why Pattern A: deferred actions stay a visible signal until the substrate work behind them ships. Moving to `completed/` makes them disappear from the BLOCKED/INFORM pipeline. That is correct only when the work itself was done (Pattern B). Not when it was routed elsewhere.
|
|
117
|
-
|
|
118
|
-
### Picking between A and B
|
|
119
|
-
|
|
120
|
-
```mermaid
|
|
121
|
-
stateDiagram-v2
|
|
122
|
-
[*] --> Active: entry written
|
|
123
|
-
|
|
124
|
-
Active --> RanCommand: agent runs Command to execute
|
|
125
|
-
RanCommand --> CheckOnCompletion: command succeeded
|
|
126
|
-
CheckOnCompletion --> CompletedB: On completion check passes (work done)
|
|
127
|
-
CheckOnCompletion --> RanCommand: check fails — retry
|
|
128
|
-
|
|
129
|
-
Active --> FoundFalsePositive: hook fired but work was already done
|
|
130
|
-
FoundFalsePositive --> CompletedB: mv to completed/ with body note
|
|
131
|
-
|
|
132
|
-
Active --> NeedsPrereqs: work needs prereqs current session cannot deliver
|
|
133
|
-
NeedsPrereqs --> FiledIssue: file GitHub issue with prereq spec
|
|
134
|
-
FiledIssue --> BlockedOnIssueA: leave in active dir, flip status to blocked-on-issue:#NNN
|
|
135
|
-
|
|
136
|
-
CompletedB --> [*]: archived in completed/ dir
|
|
137
|
-
BlockedOnIssueA --> Active: prereqs land, retry
|
|
138
|
-
BlockedOnIssueA --> CompletedB: re-routed work satisfied elsewhere
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
The state machine. Pattern B archives via `git mv` to `completed/`. Pattern A keeps the entry in `active/` and flips its status. Picking wrong compounds across consumer sessions. The wrong pick is: eager mv to `completed/` when the work was routed elsewhere.
|
|
142
|
-
|
|
143
|
-
Ask: did the entry's `Command to execute` run successfully and does
|
|
144
|
-
its `On completion` check pass?
|
|
145
|
-
|
|
146
|
-
- **Yes** → Pattern B (mv to completed/)
|
|
147
|
-
- **No, because the work needs prereqs the current session can't
|
|
148
|
-
deliver** → Pattern A (file issue, flip status, leave in active dir)
|
|
149
|
-
- **No, because the entry was a hook false-positive (the work was
|
|
150
|
-
already done elsewhere)** → Pattern B (mv to completed/) with a
|
|
151
|
-
body note in the resolution commit explaining the false-positive
|
|
152
|
-
reason
|
|
153
|
-
|
|
154
|
-
Mid-session, if you are tempted to mv a deferred-action to `completed/` because "we decided not to do it tonight" — STOP. That is Pattern A territory. File the issue. Comment with cross-refs. Leave the file alone. If you have already mv'd, revert. Push the revert to the same branch the file lives on.
|
|
155
|
-
|
|
156
|
-
### Source incidents
|
|
157
|
-
|
|
158
|
-
- TwoDo session 2026-05-02 (`docs/chronicle/2026-05-02-bind-subdomain-deferred-action-triage.md`): bind-subdomain deferred-action filed by cloud `/launch` dispatch (TwoDo PR #269) needed deploy-host provisioning the session couldn't do. First pass mv'd to `completed/` (commit `b4db506`); operator caught it and reverted (`b566d6c`) so bassclef#434 (when shipped) can route through Pattern A.
|
|
159
|
-
- bassclef session 2026-05-03 /longrun pre-flight: `2026-05-01T11-51-24Z-session-rescue` had its hook-flagged obligations satisfied across subsequent sessions (chronicles written daily, whereami fresh) — Pattern B mv to completed/ correct here (work satisfied via natural session flow, not structurally re-routed).
|
|
160
|
-
|
|
161
|
-
### Reference
|
|
162
|
-
|
|
163
|
-
- bassclef#434 — `/defer-to-issue` skill (automates Pattern A)
|
|
164
|
-
- bassclef#437 — deferred-action schema extension (adds the
|
|
165
|
-
`blocked-on-issue:#NNN` status field referenced above)
|
|
166
|
-
|
|
167
|
-
## When to surface INFORM
|
|
168
|
-
|
|
169
|
-
`INFORM:` entries are visible at session-start but not actionable in
|
|
170
|
-
the current modality. Agent behavior:
|
|
171
|
-
|
|
172
|
-
- Acknowledge the count in the session plan ("3 deferred entries require
|
|
173
|
-
capabilities this session doesn't have — next desktop session picks
|
|
174
|
-
them up")
|
|
175
|
-
- Do NOT attempt to resolve them. Doing so wastes turns and may corrupt
|
|
176
|
-
the entry (partial resolution with wrong capabilities).
|
|
177
|
-
- Do NOT delete or archive them. They wait for a capable session.
|
|
178
|
-
|
|
179
|
-
## Priority handling
|
|
180
|
-
|
|
181
|
-
Entries have `priority: high | medium | low` in frontmatter. Resolution
|
|
182
|
-
order within a session:
|
|
183
|
-
|
|
184
|
-
1. All `high` entries first (integrity-critical — missing chronicle,
|
|
185
|
-
orphan memory proposal)
|
|
186
|
-
2. All `medium` entries (delivery gaps with downstream cost)
|
|
187
|
-
3. `low` entries (nice-to-have) only if time budget allows
|
|
188
|
-
|
|
189
|
-
If a session has 5+ resolvable entries, batch by priority and surface a
|
|
190
|
-
resolution plan to the operator before running through them.
|
|
191
|
-
|
|
192
|
-
## What NOT to write as a deferred action
|
|
193
|
-
|
|
194
|
-
- **Tasks the operator hasn't asked for** — deferred actions are for
|
|
195
|
-
already-produced work, not proactive task proposals. Use GitHub
|
|
196
|
-
issues for that.
|
|
197
|
-
- **Debug state or scratch notes** — chronicle footnotes, commit
|
|
198
|
-
messages, and scratch branches cover these.
|
|
199
|
-
- **Information the resolver can re-derive** — if the work can be
|
|
200
|
-
re-produced by running the skill again, just cite the skill in a
|
|
201
|
-
chronicle and let the next session re-run it.
|
|
202
|
-
|
|
203
|
-
## Relationship to other rules
|
|
204
|
-
|
|
205
|
-
- `blocked-items.md` — deferred actions fire through the same
|
|
206
|
-
BLOCKED/resolve/explicit-defer protocol; this rule adds the
|
|
207
|
-
capability-routing layer
|
|
208
|
-
- `mobile-ephemeral-session.md` — modality detection + the rule that
|
|
209
|
-
markers go git-tracked (not `/tmp`); deferred actions are the
|
|
210
|
-
mechanism for modality-bridging
|
|
211
|
-
- `session-artifacts.md` — chronicle + journal-entry tier obligations;
|
|
212
|
-
session-rescue entries cover the abrupt-stop case
|
|
213
|
-
- `artifact-ingestion.md` — resolving a deferred action counts as
|
|
214
|
-
"reading prior artifact"; the entry itself is the source to cite
|
|
215
|
-
|
|
216
|
-
## Override paths
|
|
217
|
-
|
|
218
|
-
- **Skip this session**: operator explicit "skip `<id>`" — entry stays
|
|
219
|
-
in place, next session surfaces it again
|
|
220
|
-
- **Reject as not-needed**: operator explicit "reject `<id>`" — the
|
|
221
|
-
resolving session `git mv`'s to `completed/` with a body note
|
|
222
|
-
explaining rejection rationale (audit trail preserved)
|
|
223
|
-
- **Re-scope mid-resolution**: if the entry's command no longer applies,
|
|
224
|
-
amend the entry body to describe the new path; do not delete
|
|
225
|
-
|
|
226
|
-
## Enforcement
|
|
227
|
-
|
|
228
|
-
Methodology-level. The session-reflection hook surfaces entries; the
|
|
229
|
-
rule governs disposition. Mechanical enforcement (hook blocks session
|
|
230
|
-
on unresolved high-priority entries) could be added if methodology
|
|
231
|
-
alone proves insufficient.
|
|
232
|
-
|
|
233
|
-
Override per-session: `SKIP_DEFERRED_ACTIONS=1 <command>` (logged to trace).
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
description: The destructive-command-guard hook catches known patterns mechanically.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Destructive Operations — Agent Self-Assessment
|
|
7
|
-
|
|
8
|
-
The destructive-command-guard hook catches known patterns mechanically.
|
|
9
|
-
This rule is the primary gate — your judgment catches what grep cannot.
|
|
10
|
-
|
|
11
|
-
## Before ANY command that modifies state outside the working directory
|
|
12
|
-
|
|
13
|
-
Pause and ask three questions:
|
|
14
|
-
|
|
15
|
-
1. **ROOT CAUSE** — What specific problem requires this action?
|
|
16
|
-
Not "it's broken." What exactly is wrong? Can you name the error?
|
|
17
|
-
|
|
18
|
-
2. **SIMPLER FIX** — Is there a targeted alternative that avoids destruction?
|
|
19
|
-
The simplest fix is almost never the most destructive one.
|
|
20
|
-
|
|
21
|
-
3. **RECOVERY** — If this goes wrong, can you undo it?
|
|
22
|
-
|
|
23
|
-
## What counts as "outside the working directory"
|
|
24
|
-
|
|
25
|
-
- **Databases**: any SQL command, Prisma operation, Redis command, Mongo operation
|
|
26
|
-
- **Containers**: Docker, Kubernetes, compose operations that modify state
|
|
27
|
-
- **Cloud infra**: AWS, GCP, Azure, Terraform, Pulumi operations
|
|
28
|
-
- **Package registries**: npm publish, unpublish, deprecate
|
|
29
|
-
- **Caches**: Redis FLUSHALL, CDN invalidation, build cache clearing
|
|
30
|
-
- **Services**: process kills, daemon restarts, cron modifications
|
|
31
|
-
- **Auth/secrets**: key rotation, token revocation, permission changes
|
|
32
|
-
- **DNS/networking**: record changes, firewall rules, proxy config
|
|
33
|
-
|
|
34
|
-
## The hook catches these mechanically
|
|
35
|
-
|
|
36
|
-
Destructive verbs: reset, drop, delete, destroy, purge, prune, wipe,
|
|
37
|
-
clean, truncate, flush, drain, evict, overwrite, revert, rollback,
|
|
38
|
-
format, erase, clear, demolish, discard, abort, terminate, revoke,
|
|
39
|
-
invalidate, expire, uninstall, deregister, detach
|
|
40
|
-
|
|
41
|
-
Force flags: --force, --hard, -f, -rf, --yes, --no-verify
|
|
42
|
-
|
|
43
|
-
Amplifiers: CASCADE, --all, --volumes, -r, --recursive, system
|
|
44
|
-
|
|
45
|
-
## You catch what the hook cannot
|
|
46
|
-
|
|
47
|
-
The hook is grep. It doesn't understand semantics. These are destructive
|
|
48
|
-
but won't trigger the hook:
|
|
49
|
-
|
|
50
|
-
- `redis-cli FLUSHALL` — "FLUSHALL" is now caught, but `redis-cli SET key ""` (overwriting data) is not
|
|
51
|
-
- `kubectl apply -f destroy-everything.yaml` — "apply" is not destructive, the file is
|
|
52
|
-
- `curl -X DELETE https://api.example.com/users` — HTTP DELETE is semantic
|
|
53
|
-
- `psql -c "UPDATE users SET role = 'admin'"` — UPDATE isn't a destructive verb but this is dangerous
|
|
54
|
-
- `echo "" > important-config.yaml` — echo and redirect, not a destructive verb
|
|
55
|
-
- Piping data to a command that overwrites: `cat /dev/null > database.db`
|
|
56
|
-
- Any SDK/API call that modifies production state
|
|
57
|
-
|
|
58
|
-
**Your responsibility**: if the command modifies state that can't be
|
|
59
|
-
trivially recreated, pause and answer the three questions. Don't wait
|
|
60
|
-
for the hook. The hook is the safety net. You are the primary gate.
|
|
61
|
-
|
|
62
|
-
## Severity guide
|
|
63
|
-
|
|
64
|
-
| Signal | Action |
|
|
65
|
-
|--------|--------|
|
|
66
|
-
| Modifies local dev data | Pause, assess, proceed if justified |
|
|
67
|
-
| Modifies shared/staging state | Pause, assess, confirm with operator |
|
|
68
|
-
| Modifies production state | **STOP. Always require explicit human approval.** |
|
|
69
|
-
| Irreversible at any level | Pause, verify backup exists, confirm with operator |
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
globs: ["*"]
|
|
4
|
-
description: Three-step diagnosis before writing any fix
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
When a failure's cause is not immediately obvious, run diagnosis BEFORE writing any fix.
|
|
8
|
-
|
|
9
|
-
Step 0 — Reproduce (RED anchor):
|
|
10
|
-
State the minimum repro command / URL / action that triggers the failure.
|
|
11
|
-
State observed vs expected. State environment. State reproducibility
|
|
12
|
-
(every time / intermittent / unable).
|
|
13
|
-
|
|
14
|
-
Without a repro, "I fixed it" has no counterpart "here's the thing it's not
|
|
15
|
-
doing anymore." The repro is the surface every subsequent step operates on.
|
|
16
|
-
|
|
17
|
-
Step 1 — Is/Is Not (2 min):
|
|
18
|
-
Fill the table. What specific thing fails? What similar thing works?
|
|
19
|
-
This constrains the hypothesis space before touching code.
|
|
20
|
-
|
|
21
|
-
Step 2 — Five Whys:
|
|
22
|
-
Trace to something changeable that prevents the CLASS of failure, not just this instance.
|
|
23
|
-
A timeout is a symptom. Missing observability is a root cause.
|
|
24
|
-
|
|
25
|
-
Step 3 — Hypothesis + Test:
|
|
26
|
-
One sentence hypothesis. Minimum falsifiable check (a test, a log, a query).
|
|
27
|
-
|
|
28
|
-
Output: diagnosis comment on the ticket BEFORE opening a fix PR.
|
|
29
|
-
|
|
30
|
-
Skip criteria (all steps):
|
|
31
|
-
|
|
32
|
-
Skip full diagnosis ONLY when cause is immediately obvious and reproducible:
|
|
33
|
-
typo, missing env var, off-by-one. In these cases the repro is implicit in
|
|
34
|
-
the code change itself; state "Step 0 skipped — [reason]" in output.
|
|
35
|
-
Silence is not skip.
|
|
36
|
-
|
|
37
|
-
When in doubt, run it. Step 0 repro is cheap; the "unable to reproduce"
|
|
38
|
-
escalation is itself valuable signal.
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
description: "Every GitHub issue body opens with Problem (≤500 chars): + --- + technical detail."
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# GitHub Issue Body — Problem-Section Discipline
|
|
7
|
-
|
|
8
|
-
Every GitHub issue body opens with `**Problem (≤500 chars):**` + `---` + technical detail. Operators on mobile read the title, then the Problem statement, then decide whether to scroll into the body. Detail comes AFTER the problem framing, not before.
|
|
9
|
-
|
|
10
|
-
This rule closes the missing-surface gap: bassclef already enforces a clean opener at three other surfaces (skill descriptions per bassclef#377, plan enumerations per bassclef#339, autonomous-run output per bassclef#357). bassclef#484 originally adopted Flash + Tweet at the issue surface; bassclef#1178 retires that pairing in favor of a single problem-grounded section drafted by `/state-a-problem brief` — same shape, better orientation, fewer chars for the operator to scan.
|
|
11
|
-
|
|
12
|
-
## Why this rule exists
|
|
13
|
-
|
|
14
|
-
Operator feedback during /longrun 2026-05-04d closeout: "we were supposed to be ensuring that we were having value propositions and keep it simple (i.e., KISS-type skill and GitHub issue organizing). I'm not sure we're doing that consistently."
|
|
15
|
-
|
|
16
|
-
Tickets bassclef#479 + bassclef#480 (filed during the same session) both had multi-section technical bodies with no opener. Operator on mobile reads title + scrolls past. Agent reading the ticket later has to re-scan to extract the 1-line claim. Both tickets DEMONSTRATE the gap; this rule closes it.
|
|
17
|
-
|
|
18
|
-
V1 (bassclef#484) shipped Flash + Tweet. Operator observation 2026-06-18 surfaced that Flash + Tweet was solution-framed twice — neither stated user pain. bassclef#1178 retires Flash + Tweet at the issue surface in favor of a single problem-grounded opener. Same eat-our-own-dogfood: this rule, amended for bassclef#1178, opens its own related tickets with the new shape.
|
|
19
|
-
|
|
20
|
-
## Format contract
|
|
21
|
-
|
|
22
|
-
Every issue body MUST open with:
|
|
23
|
-
|
|
24
|
-
```markdown
|
|
25
|
-
**Problem (≤500 chars):** <Who + What + When + Why now + Outcome — framework implicit; drafted by /state-a-problem brief>
|
|
26
|
-
|
|
27
|
-
---
|
|
28
|
-
|
|
29
|
-
## <first detail section>
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
Format rules:
|
|
33
|
-
|
|
34
|
-
- **Problem label is bold and enclosed in `**`** — visual scan handle, not body prose
|
|
35
|
-
- **Length limit enforced** — Problem ≤500 chars (matches `/state-a-problem brief` mode cap)
|
|
36
|
-
- **Plain language** — no bassclef jargon ("primitive", "load-bearing") in the Problem section. The Problem section is the FIRST place a reader meets the work; jargon here destroys orientation. `/state-a-problem` runs `/kiss --grade10` inline by default so this rule is hard to violate
|
|
37
|
-
- **Horizontal rule** (`---`) separates Problem from technical detail
|
|
38
|
-
- **Implicit framework** — Who/What/When/Why-now/Outcome carried in 3-4 sentences; labels NOT in the output
|
|
39
|
-
- **No leading whitespace or code blocks before Problem** — must be the literal first content of the body
|
|
40
|
-
|
|
41
|
-
## What NOT to do
|
|
42
|
-
|
|
43
|
-
- **Don't open with a section header** (`## Summary`, `## Context`, etc.) before Problem. INSTEAD: Problem is the headline; section headers come after the `---` rule.
|
|
44
|
-
- **Don't fall back to Flash + Tweet** because the `/state-a-problem` skill is not at hand. INSTEAD: hand-roll the Problem section using the implicit framework (Who/What/When/Why-now/Outcome in 3-4 sentences). The shape contract holds even when the mechanical layer is not running.
|
|
45
|
-
- **Don't bury the claim in a "## Why this is needed" section.** INSTEAD: the claim IS the Problem opener; the rest of "why" belongs in detail.
|
|
46
|
-
- **Don't use jargon walls in Problem.** INSTEAD: substitute plain English per `standards/bassclef-internal-jargon.md` and the `/kiss --grade10` table.
|
|
47
|
-
- **Don't skip Problem because "the title says it."** INSTEAD: titles are search-truncated to ~70 chars; the Problem section gives the operator full context without needing to load the body.
|
|
48
|
-
|
|
49
|
-
## Trivial-fix exception
|
|
50
|
-
|
|
51
|
-
Bug-report or quick-fix tickets MAY skip the Problem section if the scope is one file AND no methodology change is implied (e.g., "typo in line 42 of X"). The shape contract still requires a clear first detail section in that case.
|
|
52
|
-
|
|
53
|
-
## When this rule fires
|
|
54
|
-
|
|
55
|
-
Every NEW GitHub issue body filed via:
|
|
56
|
-
|
|
57
|
-
- `/promote` SKILL.md output — must include Problem section at top
|
|
58
|
-
- `gh issue create` direct dispatch — agent self-checks before writing; local pre-author scrub fires via bassclef#1177 (PR #1180)
|
|
59
|
-
- Manual operator filing via GitHub web UI — issue templates updated to show Problem shape
|
|
60
|
-
|
|
61
|
-
Existing tickets are NOT retroactively backfilled. Forward-only enforcement keeps the discipline visible at the ticket-creation surface where it lands.
|
|
62
|
-
|
|
63
|
-
## Mechanical enforcement
|
|
64
|
-
|
|
65
|
-
V1 shipped methodology + `/promote` SKILL composition update (bassclef#484). V2 shipped local pre-author body scrub via bassclef#1177 (PR #1180 merged 2026-06-18). V3 (this bassclef#1178 amendment) ships:
|
|
66
|
-
|
|
67
|
-
- Shape contract enforces Problem opener at substantive issue bodies
|
|
68
|
-
- `/state-a-problem brief` skill drafts the section (runs `/kiss --grade10` inline by default)
|
|
69
|
-
- `/promote` SKILL output gains the Problem-section shape
|
|
70
|
-
|
|
71
|
-
## Override path
|
|
72
|
-
|
|
73
|
-
`SKIP_ISSUE_PROBLEM_SHAPE=1 <command>` — for genuinely-not-issue-body cases (e.g., bug reports filed directly by external users where bassclef doesn't control the format). Logged.
|
|
74
|
-
|
|
75
|
-
INSTEAD of overriding for tight scope: write the Problem section. Three sentences carrying the framework cost less than reviewer re-derivation.
|
|
76
|
-
|
|
77
|
-
## Worked examples
|
|
78
|
-
|
|
79
|
-
### Anti-pattern (what NOT to do — bassclef#479 + #480 demonstrate this)
|
|
80
|
-
|
|
81
|
-
```markdown
|
|
82
|
-
## Summary
|
|
83
|
-
|
|
84
|
-
Add `/roadmap-reconcile` — a bassclef skill that updates roadmap surfaces...
|
|
85
|
-
|
|
86
|
-
## Why this is needed
|
|
87
|
-
|
|
88
|
-
Observed pattern (2026-05-04 sessions, captured during /longrun prep 2026-05-04d):
|
|
89
|
-
|
|
90
|
-
1. Operator ideation surfaces a load-bearing detour mid-session...
|
|
91
|
-
2. The detour reshapes downstream LR-N sequencing, but the canvases that hold...
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Operator on mobile reads title, then "Summary" header, then has to read 3 paragraphs to get the claim. The claim is buried; user pain stays implicit.
|
|
95
|
-
|
|
96
|
-
### Anti-pattern (V1 Flash + Tweet — superseded by bassclef#1178)
|
|
97
|
-
|
|
98
|
-
```markdown
|
|
99
|
-
**Flash (≤180 chars):** /roadmap-reconcile automates LR4 WU-0's manual canvas reconciliation — diffs canvas LR-N tables against shipping reality, surfaces drift via dry-run, applies edits with --apply.
|
|
100
|
-
|
|
101
|
-
**Tweet (≤280 chars):** Stale-canvas trap closes: every future /longrun prep auto-reconciles before scope commit. Skill detects status mismatch, sequencing mismatch, and reference rot.
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
Better than no shape, but solution-framed twice. Reader still does not know WHY this work exists — only WHAT it does.
|
|
105
|
-
|
|
106
|
-
### Conformant pattern (bassclef#1178 — Problem opener)
|
|
107
|
-
|
|
108
|
-
```markdown
|
|
109
|
-
**Problem (≤500 chars):** Today canvas LR-N tables and shipping reality drift apart across long sessions — operators returning to a canvas after a /longrun see stale status, wrong sequencing, and reference rot. The drift compounds across iterations until someone manually reconciles. The change we want is automated reconciliation at every /longrun prep so canvas tables and shipping reality stay aligned without manual cycles.
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## Goal
|
|
114
|
-
|
|
115
|
-
Add `/roadmap-reconcile` — a bassclef skill that...
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
Operator gets user pain → solution → diff in <60 seconds. Detail follows for those who want depth.
|
|
119
|
-
|
|
120
|
-
## Composes with
|
|
121
|
-
|
|
122
|
-
- `/state-a-problem` skill (brief mode, ≤500 chars) — drafts the Problem section; runs `/kiss --grade10` inline by default
|
|
123
|
-
- `/promote` SKILL.md — composes Problem section at the top of every filed issue body
|
|
124
|
-
- `/kiss` skill (words mode) — applies plain-English substitution to body's technical detail
|
|
125
|
-
- `.claude/rules/pr-body-shape.md` (bassclef#906, amended by bassclef#1178) — sister discipline at PR-body surface
|
|
126
|
-
- `.claude/rules/skill-description-clarity.md` (bassclef#377) — sibling discipline at description surface
|
|
127
|
-
- `.claude/rules/plan-enumeration-needs-value-props.md` (bassclef#339) — sibling discipline at choice-presentation surface
|
|
128
|
-
|
|
129
|
-
## Distinct from
|
|
130
|
-
|
|
131
|
-
- `commit-conventions.md` — commit messages have separate format; this rule applies to issue BODIES, not commits
|
|
132
|
-
- `iteration-bet-brief-completeness.md` — that's about delegation briefs (handoff content); this is about ticket-creation surface
|
|
133
|
-
- `pattern-annotation.md` — that's source-code annotation discipline; orthogonal
|
|
134
|
-
|
|
135
|
-
## Sources read
|
|
136
|
-
|
|
137
|
-
- bassclef#484 (this rule's V1 parent ticket — filed at LR4 closeout) — operator framing
|
|
138
|
-
- bassclef#1178 — V3 amendment (Problem section + `/state-a-problem` skill) — replaces Flash + Tweet at this surface
|
|
139
|
-
- bassclef#377 (`.claude/rules/skill-description-clarity.md`) — sibling discipline at description surface
|
|
140
|
-
- bassclef#339 (`.claude/rules/plan-enumeration-needs-value-props.md`) — sibling discipline at enumeration surface
|
|
141
|
-
- bassclef#357 (autonomous-run flash + kiss) — sibling discipline at output surface
|
|
142
|
-
- bassclef#1176 + bassclef#1177 — local pre-author body scrub hooks
|
|
143
|
-
- `.claude/skills/value-prop/SKILL.md` — Flash + Tweet modes kept for chronicle / journal entry surfaces (just not PR + issue)
|
|
144
|
-
- `.claude/skills/state-a-problem/SKILL.md` — replaces Flash + Tweet at this surface
|
|
145
|
-
- `.claude/skills/promote/SKILL.md` — composition surface this rule integrates with
|
|
146
|
-
- NN/g, UX Design Institute, OpinionX problem-statement frameworks — the templates `/state-a-problem` synthesizes
|
|
147
|
-
|
|
148
|
-
## Closes
|
|
149
|
-
|
|
150
|
-
- V1 of bassclef#484 — Flash + Tweet at issue body opener (WU-3 of LR5)
|
|
151
|
-
- V2 of bassclef#484 — local pre-author scrub (bassclef#1176 + bassclef#1177)
|
|
152
|
-
- V3 of bassclef#484 — Problem section opener replacing Flash + Tweet (bassclef#1178 — this amendment)
|
|
153
|
-
|
|
154
|
-
## Retirement condition
|
|
155
|
-
|
|
156
|
-
If observed across 6 months with zero operator corrections of issue opener formatting + `/promote` SKILL output consistently Problem-first, this rule is calibrated. If operator stops asking "what does this ticket buy me?" entirely, the rule has done its job.
|