@thebassclef/lite 1.0.4 → 1.1.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 +65 -0
- package/dist/cli.js +65 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lite/.claude/agents/architect.md +70 -0
- package/dist/lite/.claude/agents/builder.md +114 -0
- package/dist/lite/.claude/agents/designer.md +156 -0
- package/dist/lite/.claude/agents/reviewer.md +88 -0
- package/dist/lite/.claude/hooks/bassclef-sync.sh +85 -27
- package/dist/lite/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
- package/dist/lite/.claude/hooks/longrun-prep-render-check.sh +236 -0
- package/dist/lite/.claude/hooks/persona-name-scrub-check.sh +105 -0
- package/dist/lite/.claude/hooks/skill-step-list-check.sh +171 -0
- package/dist/lite/.claude/luminaries/alan-cooper.md +170 -0
- package/dist/lite/.claude/luminaries/alistair-cockburn.md +140 -0
- package/dist/lite/.claude/luminaries/amazon-pr-faq.md +34 -0
- package/dist/lite/.claude/luminaries/andreas-zeller.md +74 -0
- package/dist/lite/.claude/luminaries/ash-maurya.md +121 -0
- package/dist/lite/.claude/luminaries/bill-buxton.md +210 -0
- package/dist/lite/.claude/luminaries/charles-sanders-peirce.md +150 -0
- package/dist/lite/.claude/luminaries/david-ogilvy.md +192 -0
- package/dist/lite/.claude/luminaries/don-norman.md +173 -0
- package/dist/lite/.claude/luminaries/edward-tufte.md +179 -0
- package/dist/lite/.claude/luminaries/eric-evans.md +160 -0
- package/dist/lite/.claude/luminaries/frederick-brooks.md +50 -0
- package/dist/lite/.claude/luminaries/gang-of-four.md +157 -0
- package/dist/lite/.claude/luminaries/glenford-myers.md +230 -0
- package/dist/lite/.claude/luminaries/hunt-thomas.md +115 -0
- package/dist/lite/.claude/luminaries/hyrum-wright.md +94 -0
- package/dist/lite/.claude/luminaries/jason-fried-dhh.md +46 -0
- package/dist/lite/.claude/luminaries/jesse-james-garrett.md +154 -0
- package/dist/lite/.claude/luminaries/john-ousterhout.md +94 -0
- package/dist/lite/.claude/luminaries/karl-popper.md +132 -0
- package/dist/lite/.claude/luminaries/kent-beck.md +168 -0
- package/dist/lite/.claude/luminaries/linus-torvalds.md +218 -0
- package/dist/lite/.claude/luminaries/martin-fowler.md +164 -0
- package/dist/lite/.claude/luminaries/michael-feathers.md +125 -0
- package/dist/lite/.claude/luminaries/michael-nygard.md +118 -0
- package/dist/lite/.claude/luminaries/robert-c-martin.md +164 -0
- package/dist/lite/.claude/luminaries/saltzer-schroeder.md +194 -0
- package/dist/lite/.claude/luminaries/sophia-prater.md +193 -0
- package/dist/lite/.claude/luminaries/stephen-toulmin.md +131 -0
- package/dist/lite/.claude/luminaries/tony-hoare.md +170 -0
- package/dist/lite/.claude/luminaries/vaughn-vernon.md +50 -0
- package/dist/lite/.claude/luminaries/w-edwards-deming.md +158 -0
- package/dist/lite/.claude/rules/accessor-library-discipline.md +110 -0
- package/dist/lite/.claude/rules/adr-discipline.md +96 -0
- package/dist/lite/.claude/rules/api-conventions.md +115 -0
- package/dist/lite/.claude/rules/artifact-ingestion.md +137 -0
- package/dist/lite/.claude/rules/assert-only-after-verify.md +111 -0
- package/dist/lite/.claude/rules/blocked-items.md +139 -0
- package/dist/lite/.claude/rules/bootstrap-pair-discipline.md +106 -0
- package/dist/lite/.claude/rules/branching.md +28 -0
- package/dist/lite/.claude/rules/cold-adopter-harness-discipline.md +93 -0
- package/dist/lite/.claude/rules/commit-conventions.md +22 -0
- package/dist/lite/.claude/rules/compounding-axis-fresh-analysis.md +173 -0
- package/dist/lite/.claude/rules/compounding-sequence-fresh-analysis.md +173 -0
- package/dist/lite/.claude/rules/context-engineering.md +155 -0
- package/dist/lite/.claude/rules/context-management.md +85 -0
- package/dist/lite/.claude/rules/defensive-bash.md +52 -0
- package/dist/lite/.claude/rules/deferred-actions.md +233 -0
- package/dist/lite/.claude/rules/destructive-operations.md +69 -0
- package/dist/lite/.claude/rules/diagnosis.md +38 -0
- package/dist/lite/.claude/rules/github-issue-flash-tweet.md +114 -0
- package/dist/lite/.claude/rules/guardrails.md +73 -0
- package/dist/lite/.claude/rules/hook-wire-on-author.md +77 -0
- package/dist/lite/.claude/rules/identifier-leak-prevention.md +73 -0
- package/dist/lite/.claude/rules/iteration-bet-brief-completeness.md +43 -0
- package/dist/lite/.claude/rules/lite-manifest-schema-change-discipline.md +79 -0
- package/dist/lite/.claude/rules/longrun-prep-plan-doc-compression.md +77 -0
- package/dist/lite/.claude/rules/loop-discipline.md +71 -0
- package/dist/lite/.claude/rules/manual-prod-approval.md +100 -0
- package/dist/lite/.claude/rules/marker-enrichment-discipline.md +72 -0
- package/dist/lite/.claude/rules/mobile-ephemeral-session.md +109 -0
- package/dist/lite/.claude/rules/new-dependency-check.md +44 -0
- package/dist/lite/.claude/rules/oo-ad-entry-point.md +95 -0
- package/dist/lite/.claude/rules/operator-facing-prose.md +177 -0
- package/dist/lite/.claude/rules/option-label-discipline.md +82 -0
- package/dist/lite/.claude/rules/pattern-annotation.md +83 -0
- package/dist/lite/.claude/rules/persona-name-leak-scrub.md +90 -0
- package/dist/lite/.claude/rules/plain-english-discipline.md +132 -0
- package/dist/lite/.claude/rules/plan-enumeration-needs-value-props.md +177 -0
- package/dist/lite/.claude/rules/pr-body-shape.md +195 -0
- package/dist/lite/.claude/rules/pr-strategy.md +142 -0
- package/dist/lite/.claude/rules/pr-title-shape.md +90 -0
- package/dist/lite/.claude/rules/prototype-workflow.md +53 -0
- package/dist/lite/.claude/rules/reserved-skill-names.md +103 -0
- package/dist/lite/.claude/rules/schema-management.md +42 -0
- package/dist/lite/.claude/rules/sdlc-gates.md +149 -0
- package/dist/lite/.claude/rules/security.md +37 -0
- package/dist/lite/.claude/rules/session-artifacts.md +236 -0
- package/dist/lite/.claude/rules/skill-composition-declarations.md +105 -0
- package/dist/lite/.claude/rules/skill-description-clarity.md +196 -0
- package/dist/lite/.claude/rules/skill-procedure-step-list.md +119 -0
- package/dist/lite/.claude/rules/sprint-prep-preset-picker.md +76 -0
- package/dist/lite/.claude/rules/state-schema-validation.md +156 -0
- package/dist/lite/.claude/rules/stuck-signal-diagnostic.md +111 -0
- package/dist/lite/.claude/rules/substrate-config-schema.md +85 -0
- package/dist/lite/.claude/rules/test-list-discipline.md +129 -0
- package/dist/lite/.claude/rules/test-sufficiency.md +186 -0
- package/dist/lite/.claude/rules/testing-tier-config.md +125 -0
- package/dist/lite/.claude/rules/testing.md +38 -0
- package/dist/lite/.claude/rules/turn-estimate-grounding.md +82 -0
- package/dist/lite/.claude/rules/visual-hierarchy.md +427 -0
- package/dist/lite/.claude/rules/we-dont-break-adopters.md +103 -0
- package/dist/lite/.claude/rules/whereami-load-bearing.md +184 -0
- package/dist/lite/.claude/rules/writing-craft-discipline.md +72 -0
- package/dist/lite/.claude/rules/wu-sequencing-compounds.md +119 -0
- package/dist/lite/.claude/skills/build/SKILL.md +640 -0
- package/dist/lite/.claude/skills/chronicle/SKILL.md +55 -0
- package/dist/lite/.claude/skills/clean-artifacts/SKILL.md +249 -0
- package/dist/lite/.claude/skills/decompose/SKILL.md +280 -0
- package/dist/lite/.claude/skills/diagnose/SKILL.md +297 -0
- package/dist/lite/.claude/skills/feynman/SKILL.md +90 -0
- package/dist/lite/.claude/skills/howdoi/SKILL.md +105 -0
- package/dist/lite/.claude/skills/ia-model/SKILL.md +108 -0
- package/dist/lite/.claude/skills/interaction-design/SKILL.md +112 -0
- package/dist/lite/.claude/skills/interpret-input/SKILL.md +180 -0
- package/dist/lite/.claude/skills/journal/SKILL.md +209 -0
- package/dist/lite/.claude/skills/kiss/SKILL.md +449 -0
- package/dist/lite/.claude/skills/launch/SKILL.md +915 -0
- package/dist/lite/.claude/skills/lean-canvas/SKILL.md +332 -0
- package/dist/lite/.claude/skills/longrun/SKILL.md +512 -0
- package/dist/lite/.claude/skills/luminary/SKILL.md +481 -0
- package/dist/lite/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
- package/dist/lite/.claude/skills/onboard-repo/SKILL.md +1640 -0
- package/dist/lite/.claude/skills/pattern-review/SKILL.md +99 -0
- package/dist/lite/.claude/skills/personas/SKILL.md +207 -0
- package/dist/lite/.claude/skills/promote/SKILL.md +283 -0
- package/dist/lite/.claude/skills/requirement/SKILL.md +98 -0
- package/dist/lite/.claude/skills/retro/SKILL.md +117 -0
- package/dist/lite/.claude/skills/riff/SKILL.md +114 -0
- package/dist/lite/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
- package/dist/lite/.claude/skills/session-end/SKILL.md +309 -0
- package/dist/lite/.claude/skills/session-log/SKILL.md +299 -0
- package/dist/lite/.claude/skills/skills/SKILL.md +228 -0
- package/dist/lite/.claude/skills/spec/SKILL.md +105 -0
- package/dist/lite/.claude/skills/sprint/SKILL.md +418 -0
- package/dist/lite/.claude/skills/stage/SKILL.md +384 -0
- package/dist/lite/.claude/skills/state-a-problem/SKILL.md +185 -0
- package/dist/lite/.claude/skills/temperance/SKILL.md +108 -0
- package/dist/lite/.claude/skills/use-case/SKILL.md +417 -0
- package/dist/lite/.claude/skills/user-stories/SKILL.md +268 -0
- package/dist/lite/.claude/skills/value-prop/SKILL.md +251 -0
- package/dist/lite/.claude/skills/verify/SKILL.md +160 -0
- package/dist/lite/.claude/skills/visual-review/SKILL.md +503 -0
- package/dist/lite/.claude/skills/whats-the-plan/SKILL.md +202 -0
- package/dist/lite/.claude/skills/whereami/SKILL.md +307 -0
- package/dist/lite/AGENTS.md +79 -0
- package/dist/lite/CLAUDE-lite.md +85 -0
- package/dist/lite/CODE_OF_CONDUCT.md +28 -0
- package/dist/lite/CONTRIBUTING.md +177 -0
- package/dist/lite/README.md +173 -0
- package/dist/lite/SECURITY.md +19 -0
- package/dist/lite/architecture/decisions/ADR-029-release-pipeline.md +79 -0
- package/dist/lite/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
- package/dist/lite/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
- package/dist/lite/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
- package/dist/lite/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
- package/dist/lite/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
- package/dist/lite/lib/clean-artifacts-sweep.sh +112 -0
- package/dist/lite/lib/code-comment-discipline.sh +144 -0
- package/dist/lite/lib/composer-preflight.sh +459 -0
- package/dist/lite/lib/deferred-actions.sh +146 -0
- package/dist/lite/lib/hook-header-parser.sh +61 -0
- package/dist/lite/lib/hook-heartbeat.sh +152 -0
- package/dist/lite/lib/hook-inject.sh +255 -0
- package/dist/lite/lib/hook-installer.sh +195 -0
- package/dist/lite/lib/luminary-pick.sh +96 -0
- package/dist/lite/lib/output-discipline.sh +143 -0
- package/dist/lite/lib/prose-scan-boundary.sh +171 -0
- package/dist/lite/lib/rewrite-check.sh +214 -0
- package/dist/lite/lib/session-rescue.sh +151 -0
- package/dist/lite/lib/source-graph-walker.sh +277 -0
- package/dist/lite/lib/state.sh +1372 -0
- package/dist/lite/lib/telemetry.sh +205 -0
- package/dist/lite/lib/tier-check.sh +187 -0
- package/dist/lite/lib/tier-dependency-audit.sh +1088 -0
- package/dist/lite/presence/install/bassclef-hook-connect.sh +178 -0
- package/dist/lite/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
- package/dist/lite/presence/install/bassclef-sync.template.sh +2278 -0
- package/dist/lite/presence/install/schedule-auto-save.cron.sh +88 -0
- package/dist/lite/presence/install/schedule-auto-save.taskscheduler.md +122 -0
- package/dist/lite/scripts/aggregate-telemetry.sh +217 -0
- package/dist/lite/scripts/analyze-tier-dependencies.sh +239 -0
- package/dist/lite/scripts/generate-lite-manifest.sh +505 -0
- package/dist/lite/scripts/generate-tier-manifest.sh +28 -0
- package/dist/lite/scripts/intent-drift-check.sh +456 -0
- package/dist/lite/scripts/lite-manifest-drift-check.sh +146 -0
- package/dist/lite/scripts/render-lite-manifest-doc.sh +150 -0
- package/dist/lite/standards/adr-template.md +86 -0
- package/dist/lite/standards/api-conventions/nextjs.md +84 -0
- package/dist/lite/standards/artifact-composition.md +209 -0
- package/dist/lite/standards/bash-hook-safety.md +246 -0
- package/dist/lite/standards/bassclef-configs-schema.md +232 -0
- package/dist/lite/standards/bassclef-evolution.md +143 -0
- package/dist/lite/standards/bassclef-internal-jargon.md +244 -0
- package/dist/lite/standards/bassclef-managed-sentinel.md +96 -0
- package/dist/lite/standards/bassclef-source-config.md +228 -0
- package/dist/lite/standards/branch-stacking.md +408 -0
- package/dist/lite/standards/code-safety-principles.md +176 -0
- package/dist/lite/standards/composer-prerequisites.md +155 -0
- package/dist/lite/standards/deferred-actions-schema.md +204 -0
- package/dist/lite/standards/dependency-discipline/cargo.md +39 -0
- package/dist/lite/standards/dependency-discipline/gem.md +43 -0
- package/dist/lite/standards/dependency-discipline/go-mod.md +41 -0
- package/dist/lite/standards/dependency-discipline/npm.md +42 -0
- package/dist/lite/standards/dependency-discipline/pip.md +42 -0
- package/dist/lite/standards/deployment-topology/ec2-tailscale.md +225 -0
- package/dist/lite/standards/deployment-topology.md +69 -0
- package/dist/lite/standards/docs-sync-allowlist.md +76 -0
- package/dist/lite/standards/domain-and-dns.md +145 -0
- package/dist/lite/standards/frontend-stack.md +67 -0
- package/dist/lite/standards/frontmatter-schema.md +154 -0
- package/dist/lite/standards/graceful-exit.md +227 -0
- package/dist/lite/standards/hook-idempotency.md +102 -0
- package/dist/lite/standards/hook-injection-discipline.md +202 -0
- package/dist/lite/standards/hook-install-class.md +215 -0
- package/dist/lite/standards/input-handler-interface.md +152 -0
- package/dist/lite/standards/lite-manifest-schema-changes.md +180 -0
- package/dist/lite/standards/lite-manifest.json +2797 -0
- package/dist/lite/standards/luminary-matching.md +105 -0
- package/dist/lite/standards/luminary-problem-patterns.md +481 -0
- package/dist/lite/standards/migration-discipline/active-record.md +50 -0
- package/dist/lite/standards/migration-discipline/alembic.md +43 -0
- package/dist/lite/standards/migration-discipline/gorm.md +50 -0
- package/dist/lite/standards/migration-discipline/prisma.md +53 -0
- package/dist/lite/standards/migration-discipline/sqlalchemy.md +51 -0
- package/dist/lite/standards/mobile-ephemeral-session.md +167 -0
- package/dist/lite/standards/model-routing-discipline.md +160 -0
- package/dist/lite/standards/ogilvy-writing-rules.md +225 -0
- package/dist/lite/standards/opener-discipline.md +96 -0
- package/dist/lite/standards/operator-facing-prose-discipline.md +201 -0
- package/dist/lite/standards/persona-schema.md +229 -0
- package/dist/lite/standards/pluggable-luminaries.md +323 -0
- package/dist/lite/standards/pr-body-discipline.md +115 -0
- package/dist/lite/standards/preview-state-schema.md +189 -0
- package/dist/lite/standards/project-directory-layout.md +276 -0
- package/dist/lite/standards/release-tagging.md +137 -0
- package/dist/lite/standards/reserved-skill-names.md +120 -0
- package/dist/lite/standards/scannable-multi-option-output.md +265 -0
- package/dist/lite/standards/sdlc-compliance.md +286 -0
- package/dist/lite/standards/sdlc-gates/typescript.md +57 -0
- package/dist/lite/standards/secrets-lifecycle.md +210 -0
- package/dist/lite/standards/security-scanner-adapter.md +145 -0
- package/dist/lite/standards/session-board.md +256 -0
- package/dist/lite/standards/skill-output-discipline.md +121 -0
- package/dist/lite/standards/state-spine-contract.md +255 -0
- package/dist/lite/standards/state-spine.md +511 -0
- package/dist/lite/standards/steering-hints/kiss-words.md +11 -0
- package/dist/lite/standards/substrate-config-schema.md +267 -0
- package/dist/lite/standards/tech-stack-config.md +109 -0
- package/dist/lite/standards/tier-dependency-analysis.md +167 -0
- package/dist/lite/standards/tier-runtime-deps/lite.md +57 -0
- package/dist/lite/standards/tier-tag-schema.md +155 -0
- package/dist/lite/standards/two-layer-config.md +99 -0
- package/dist/lite/standards/use-case-format.md +292 -0
- package/dist/lite/standards/user-story-invest.md +268 -0
- package/dist/lite/standards/velocity-and-appetite.md +229 -0
- package/dist/lite/standards/voice-input-pattern.md +119 -0
- package/dist/lite/standards/whereami-schema.md +301 -0
- package/dist/lite/standards/worktree-management.md +211 -0
- package/dist/lite/standards/writing-guide.md +213 -0
- package/dist/lite/templates/chronicle-template.md +75 -0
- package/dist/lite/templates/deferred-action-template.md +45 -0
- package/dist/lite/templates/memory-proposal-template.md +77 -0
- package/dist/lite/templates/persona-template.md +200 -0
- package/dist/lite/templates/pr-faq.md +45 -0
- package/dist/lite/templates/secret-rotation-template.md +162 -0
- package/dist/lite/templates/spec-template.md +131 -0
- package/dist/lite/templates/use-case-template.md +194 -0
- package/dist/lite/templates/user-story-template.md +107 -0
- package/dist/lite/templates/whereami-template.md +101 -0
- package/package.json +1 -1
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: "The default PR strategy for any multi-issue iteration is stacked atomic branches: one branch per issue, one PR per branch, each independently reviewable and revertable."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PR Strategy — Stacked Default (Mechanically Enforced)
|
|
7
|
+
|
|
8
|
+
The default PR strategy for any multi-issue iteration is **stacked atomic
|
|
9
|
+
branches**: one branch per issue, one PR per branch, each independently
|
|
10
|
+
reviewable and revertable. Bundling multiple issues into a single PR is
|
|
11
|
+
the **explicit override**, requested via `bundle: true` in the iteration
|
|
12
|
+
goal's frontmatter (or operator statement) at iteration scaffold time.
|
|
13
|
+
|
|
14
|
+
This rule was methodology-only in v0. **As of Phase II Trim the Fat
|
|
15
|
+
(2026-05-07), it is mechanically enforced** by the `atomic-pr-check.sh`
|
|
16
|
+
hook, which fires on `git push` and BLOCKs branches with multiple WU-N
|
|
17
|
+
tags in commit messages unless a matching iteration goal declares
|
|
18
|
+
`bundle: true` in frontmatter.
|
|
19
|
+
|
|
20
|
+
INSTEAD of relying on agent self-discipline: the hook reads the branch's
|
|
21
|
+
commits, counts distinct WU-N tags, and either passes (≤1 distinct tag)
|
|
22
|
+
or BLOCKs with a structured remediation message (multi-step without
|
|
23
|
+
`bundle: true`).
|
|
24
|
+
|
|
25
|
+
## Default behavior
|
|
26
|
+
|
|
27
|
+
When `/autonomous start` enters Construction with N≥2 issues in scope:
|
|
28
|
+
|
|
29
|
+
- Each issue → its own branch (`feature/ISSUE-NNN-stack-N-slug`)
|
|
30
|
+
- Each branch → its own PR
|
|
31
|
+
- Per `standards/branch-stacking.md`: independence is designed in,
|
|
32
|
+
graceful unwind is mechanical, manifest declares dependencies
|
|
33
|
+
- Boot sequence does NOT ask "stacked or bundled?" — assumes stacked
|
|
34
|
+
|
|
35
|
+
## Override: `bundle` flag
|
|
36
|
+
|
|
37
|
+
To collapse a multi-issue iteration into a single PR, the operator
|
|
38
|
+
supplies `bundle` at boot:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
/autonomous start orchestrator-gated bundle
|
|
42
|
+
/autonomous start operator-gated sequential bundle
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Or states it conversationally during scope confirmation. The default
|
|
46
|
+
short-circuits unless the override is present.
|
|
47
|
+
|
|
48
|
+
## When bundling IS acceptable
|
|
49
|
+
|
|
50
|
+
Use `bundle` when ALL of these hold:
|
|
51
|
+
|
|
52
|
+
1. **Single logical concern** — all changes serve one decision; splitting
|
|
53
|
+
would be artificial (e.g., a tightly-coupled rename across N files
|
|
54
|
+
that doesn't compile in isolation).
|
|
55
|
+
2. **Tight coupling that breaks atomic verification** — branch N can't
|
|
56
|
+
pass `/verify` without branch M's changes (decomposition gap, not a
|
|
57
|
+
feature).
|
|
58
|
+
3. **Emergency hotfix** — staging delay between PRs would compound the
|
|
59
|
+
incident; one PR + one merge gets fixes to prod faster.
|
|
60
|
+
4. **Operator explicitly requests** — `bundle` flag or verbatim
|
|
61
|
+
instruction.
|
|
62
|
+
|
|
63
|
+
If only #4 holds without #1-3, push back: "stacked is default; what
|
|
64
|
+
about this scope makes bundling correct?"
|
|
65
|
+
|
|
66
|
+
## When stacking is mandatory
|
|
67
|
+
|
|
68
|
+
Stack regardless of operator preference when:
|
|
69
|
+
|
|
70
|
+
- **Mix of skill + rule + hook changes** — different review surfaces;
|
|
71
|
+
reviewer needs to evaluate each independently
|
|
72
|
+
- **Mix of new files + existing-file edits** — independent revert paths
|
|
73
|
+
- **Different blast radii** — high-radius changes (hooks, schemas)
|
|
74
|
+
shouldn't ride with low-radius (doc edits) in one PR
|
|
75
|
+
- **Multi-WS iteration goal** — workstreams are separate intents by
|
|
76
|
+
definition
|
|
77
|
+
|
|
78
|
+
## Enforcement
|
|
79
|
+
|
|
80
|
+
- **Hook (mechanical)**: `.claude/hooks/atomic-pr-check.sh` fires on
|
|
81
|
+
Bash tool calls matching `git push`. Counts distinct WU-N tags in
|
|
82
|
+
branch commits. BLOCKs multi-step branches without `bundle: true` in
|
|
83
|
+
a matching iteration goal's frontmatter. Phase II Trim the Fat
|
|
84
|
+
shipped this as the v1 mechanical-enforcement layer.
|
|
85
|
+
- **Boot sequence** (`strategy/autonomous-boot-sequence.md` Step 4):
|
|
86
|
+
scaffold prompt skips PR-strategy question unless `bundle: true`
|
|
87
|
+
supplied
|
|
88
|
+
- **Skill args** (`.claude/skills/autonomous/SKILL.md`): `bundle` listed
|
|
89
|
+
in args reference table
|
|
90
|
+
- **Standard** (`standards/branch-stacking.md`): declares stacked as
|
|
91
|
+
default at the top
|
|
92
|
+
- **Methodology**: agent self-checks before pushing; the hook is the
|
|
93
|
+
backstop, not the only line of defense
|
|
94
|
+
|
|
95
|
+
INSTEAD of methodology-only enforcement: the hook fires automatically
|
|
96
|
+
on every `git push`. Bypass with `SKIP_ATOMIC_PR_CHECK=1` (logged via
|
|
97
|
+
trace-helper) only for genuine bypass cases.
|
|
98
|
+
|
|
99
|
+
## Override path
|
|
100
|
+
|
|
101
|
+
`bundle` at boot. No mid-session switch — once a stack manifest is
|
|
102
|
+
written, the strategy is locked for that bet (changing mid-flight would
|
|
103
|
+
require re-decomposing scope).
|
|
104
|
+
|
|
105
|
+
## Merge protocol — MUST read before merging any stacked PR
|
|
106
|
+
|
|
107
|
+
When merging stacked PRs with declared dependencies (Graphite-style:
|
|
108
|
+
dependent PR's `baseRefName` is another feature branch, not `main`),
|
|
109
|
+
**read `standards/branch-stacking.md` §"Squash merge — two protocols"
|
|
110
|
+
BEFORE the first merge in the stack**.
|
|
111
|
+
|
|
112
|
+
Two protocols exist; picking one is mandatory:
|
|
113
|
+
|
|
114
|
+
1. **Retarget-before-merge** (preferred) — retarget dependents to
|
|
115
|
+
`main` via `gh pr edit <PR> --base main` before merging the parent.
|
|
116
|
+
Dependents survive the cascade.
|
|
117
|
+
2. **Rebase-after-merge** (fallback) — only if auto-close already
|
|
118
|
+
fired. Per-PR rebase + re-create. Costs 3-8 turns per stack.
|
|
119
|
+
|
|
120
|
+
Helper: `scripts/check-stack-dependents.sh <PR-N>` lists PRs that
|
|
121
|
+
will auto-close when PR N merges with `--delete-branch`.
|
|
122
|
+
|
|
123
|
+
**Why this rule repeats what the standard says**: agents load the
|
|
124
|
+
`.claude/rules/` directory automatically. Standards live in
|
|
125
|
+
`standards/` and are referenced by path. Moving the ceremony-layer
|
|
126
|
+
pointer into the rule means an agent that reads `pr-strategy.md`
|
|
127
|
+
at merge-time is told to go read the protocol — closes the
|
|
128
|
+
"standard exists but agent didn't read it before acting" gap
|
|
129
|
+
observed 2026-04-22 (#245 auto-closed on #244 merge because the
|
|
130
|
+
retarget protocol wasn't consulted).
|
|
131
|
+
|
|
132
|
+
## Relationship to other rules
|
|
133
|
+
|
|
134
|
+
- `branching.md` — trunk-based + squash merge (governs all branches)
|
|
135
|
+
- `iteration-bet-brief-completeness.md` — Orchestrator transmits
|
|
136
|
+
manifest to Builder; manifest carries the strategy decision
|
|
137
|
+
- `commit-conventions.md` — PR titles per format regardless of strategy
|
|
138
|
+
- `bassclef-workflow-parity.md` — sibling-grep discipline applies per
|
|
139
|
+
PR, not per strategy
|
|
140
|
+
- `standards/branch-stacking.md` §"Squash merge — two protocols" —
|
|
141
|
+
merge-time recovery protocols; MUST read before first merge in any
|
|
142
|
+
stack
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: Sister rule to pr-body-shape.md. Encodes authoring-time discipline for the PR title surface. Titles show in gh pr list, GitHub search, and mobile views — they are the…
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PR Title Shape Contract
|
|
7
|
+
|
|
8
|
+
Sister rule to `pr-body-shape.md`. Encodes authoring-time discipline for the PR title surface. Titles show in `gh pr list`, GitHub search, and mobile views — they are the highest-visibility surface in the PR-authoring stack.
|
|
9
|
+
|
|
10
|
+
## When this rule fires
|
|
11
|
+
|
|
12
|
+
Any time a PR title is being written via:
|
|
13
|
+
|
|
14
|
+
- `gh pr create --title ...`
|
|
15
|
+
- `gh pr edit <N> --title ...`
|
|
16
|
+
- Direct REST `curl POST /repos/<o>/<r>/pulls` with a `title` field
|
|
17
|
+
- GitHub web UI (manual operator authoring)
|
|
18
|
+
|
|
19
|
+
## Format contract
|
|
20
|
+
|
|
21
|
+
Every PR title is:
|
|
22
|
+
|
|
23
|
+
- **≤72 characters** (mobile views truncate; squash-merge commit messages prefer short)
|
|
24
|
+
- **One conventional-commit prefix** per `commit-conventions.md` — `feat:`, `fix:`, `docs:`, `refactor:`, `test:`, `ci:`, `chore:`, `security:`
|
|
25
|
+
- **One primary change** — sub-concepts go in the body Summary, not the title
|
|
26
|
+
- **Bet/WU reference** as `(WU-N)` only when present; bet ref belongs in body Refs
|
|
27
|
+
|
|
28
|
+
Recommended shape: `<type>(<scope>): <verb> <object> (<optional WU-N>)`
|
|
29
|
+
|
|
30
|
+
Examples (all ≤72 chars):
|
|
31
|
+
|
|
32
|
+
- `feat(#1241): document the pseudonym registry file (WU-4)`
|
|
33
|
+
- `fix(bassclef#1125): jq+set -e fail-soft fix in 2 hooks (WU-8)`
|
|
34
|
+
- `chore: update whereami; close bet 2026-06-19b (WU-5)`
|
|
35
|
+
|
|
36
|
+
## DON'T / INSTEAD catalog
|
|
37
|
+
|
|
38
|
+
### Length and structure
|
|
39
|
+
|
|
40
|
+
| Don't | INSTEAD |
|
|
41
|
+
|---|---|
|
|
42
|
+
| Exceed 72 chars (mobile truncates; squash commit messages prefer short) | Keep under 72; cut to one concept |
|
|
43
|
+
| Stack multiple concepts with `+` or `—` (`carry-forward + housekeeping + roadmap-reconcile`) | Name the ONE primary change; sub-concepts go in body Summary |
|
|
44
|
+
| `(WU-N of bet YYYY-MM-DDx)` suffix bloat | Either drop entirely or `(WU-N)` alone — bet ref belongs in body Refs |
|
|
45
|
+
| Ticket-ref bloat with verbose body (`chore(bassclef#1031): document operator-private-pseudonyms.json registry shape`) | Either prefix `(#NNNN)` OR a full descriptive body — not both |
|
|
46
|
+
|
|
47
|
+
### Conventional-commit prefix
|
|
48
|
+
|
|
49
|
+
| Don't | INSTEAD |
|
|
50
|
+
|---|---|
|
|
51
|
+
| Conventional-commit prefix mismatch (`chore` for substantive features) | Match prefix to actual change type per `commit-conventions.md` |
|
|
52
|
+
| Invent bassclef-internal prefixes (`substrate-defect:`, `bet:`, `closeout:` outside of `chore(closeout)`) | Use the 8 standard types only; substrate bugs are `fix:` |
|
|
53
|
+
| Process narration as title (`/longrun pre-flight`, `/session-end for X`) | Name the artifact change (`prep goal doc`, `update whereami`) |
|
|
54
|
+
|
|
55
|
+
### Plain English
|
|
56
|
+
|
|
57
|
+
| Don't | INSTEAD |
|
|
58
|
+
|---|---|
|
|
59
|
+
| Bassclef-internal compound verbs/nouns (`Pattern-B mv`, `review-file pass`, `registry shape`) | Plain verb + object (`move`, `run`, `document the file schema`) |
|
|
60
|
+
| Uncommon hyphenated prose compounds (`carry-forward`, `pre-flight` as title prose) | Plain words (`continued`, `prep`); literal filenames + CLI flags + script names preserve as code identifiers |
|
|
61
|
+
| Buzz adjectives in titles (`substantive`, `comprehensive`, `robust`) | Concrete verb + concrete object |
|
|
62
|
+
| Bassclef-internal verbs (`flip`, `Pattern-B'd`, `seed` as noun) | Plain verbs (`update`, `move`, `set up`) |
|
|
63
|
+
|
|
64
|
+
### Cross-surface consistency
|
|
65
|
+
|
|
66
|
+
| Don't | INSTEAD |
|
|
67
|
+
|---|---|
|
|
68
|
+
| Repeat literal filenames in both title and body Summary | Plain title; filenames in body where they're grep-anchored to the actual change |
|
|
69
|
+
| Mix `skillname` and `/skillname` for the same skill across titles | Use `/skillname` consistently when referencing the skill; plain filename when referencing the file (e.g., `docs/whereami.md`) |
|
|
70
|
+
|
|
71
|
+
## Mechanical enforcement
|
|
72
|
+
|
|
73
|
+
Wordlist BLOCK terms are caught by `pre-gh-pr-title-scrub.sh` at write time. This rule covers everything else as methodology. Hook extension to catch the additional catalog rows is sibling work tracked at bassclef#1241.
|
|
74
|
+
|
|
75
|
+
## Override path
|
|
76
|
+
|
|
77
|
+
`SKIP_PR_TITLE_SHAPE=1 <command>` — logged via trace-helper. Use rarely:
|
|
78
|
+
|
|
79
|
+
- Quoting an exact phrase from a memory file or external doc that requires verbatim retention
|
|
80
|
+
- One-off automated dispatch where the title is generated by a third-party tool
|
|
81
|
+
|
|
82
|
+
## Composes with
|
|
83
|
+
|
|
84
|
+
- `.claude/rules/pr-body-shape.md` — sister rule at the body surface
|
|
85
|
+
- `.claude/rules/commit-conventions.md` — conventional-commit format
|
|
86
|
+
- `.claude/rules/plain-english-discipline.md` — master plain-English rule
|
|
87
|
+
- `.claude/rules/operator-facing-prose.md` — gloss + /kiss meta-discipline
|
|
88
|
+
- `.claude/rules/context-engineering.md` — INSTEAD-block discipline (foundational)
|
|
89
|
+
- `standards/bassclef-internal-jargon.md` — wordlist driving BLOCK substitutions
|
|
90
|
+
- `.claude/hooks/pre-gh-pr-title-scrub.sh` — mechanical floor
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: "Design prototypes (artifacts under docs/prototypes/**) are visual statements to Reviewer (\"this is what we want built\")."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Prototype Workflow — Visual Confirm Before Commit
|
|
7
|
+
|
|
8
|
+
Design prototypes (artifacts under `docs/prototypes/**`) are visual
|
|
9
|
+
statements to Reviewer ("this is what we want built"). They MUST NOT
|
|
10
|
+
enter git history until the operator has confirmed the rendered output.
|
|
11
|
+
|
|
12
|
+
## Protocol for prototype edits
|
|
13
|
+
|
|
14
|
+
When modifying a file under `docs/prototypes/**/*.{html,css,tsx,jsx}`:
|
|
15
|
+
|
|
16
|
+
1. **Render** — open the prototype locally (dev server, Playwright MCP, or direct file)
|
|
17
|
+
2. **Screenshot** — save to `.playwright-mcp/prototype-render-<branch>.png` or equivalent
|
|
18
|
+
3. **Share with operator** — show rendered output, wait for explicit confirmation
|
|
19
|
+
4. **Then commit** — only after confirmation
|
|
20
|
+
|
|
21
|
+
Committing first and sharing after inverts the gate: git history now
|
|
22
|
+
holds unapproved state, and any revert has to serve only as a rule-
|
|
23
|
+
violation record.
|
|
24
|
+
|
|
25
|
+
## Distinction from production-UI visual review
|
|
26
|
+
|
|
27
|
+
- **Production UI** (per usability rule #7): Reviewer diffs built surface
|
|
28
|
+
against prototype before merge
|
|
29
|
+
- **Prototype edits** (this rule): agent confirms rendered prototype
|
|
30
|
+
against operator intent before commit
|
|
31
|
+
|
|
32
|
+
The two gates are complementary. Production gate catches drift from
|
|
33
|
+
prototype; this gate catches drift from operator intent.
|
|
34
|
+
|
|
35
|
+
## When this rule does NOT fire
|
|
36
|
+
|
|
37
|
+
- Non-visual edits to prototype directory (README, notes, data fixtures)
|
|
38
|
+
- Branch explicitly scoped to "prototype cleanup / lint / formatting"
|
|
39
|
+
with no visual change (agent must assert no-visual-change)
|
|
40
|
+
|
|
41
|
+
## Relationship to other rules
|
|
42
|
+
|
|
43
|
+
- `usability.md` #7 — production UI visual review; this rule's upstream
|
|
44
|
+
- `design-direction.md` — prototype approvals are load-bearing once
|
|
45
|
+
given; this rule governs HOW to get them
|
|
46
|
+
- `sdlc-gates.md` — post-build gates; prototype confirmation is a
|
|
47
|
+
pre-commit gate
|
|
48
|
+
|
|
49
|
+
## Enforcement
|
|
50
|
+
|
|
51
|
+
Methodology-level today. Future mechanical backstop (proposed): pre-commit
|
|
52
|
+
hook checks paths matching `docs/prototypes/**/*.{html,css}` and requires
|
|
53
|
+
a render artifact newer than the edit plus an operator-confirmation marker.
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: "Bassclef MUST NOT create a skill (.claude/skills/<name>/SKILL.md) with a name Claude Code's harness already claims."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Reserved Skill Names
|
|
7
|
+
|
|
8
|
+
Bassclef MUST NOT create a skill (`.claude/skills/<name>/SKILL.md`)
|
|
9
|
+
with a name Claude Code's harness already claims. Collisions are
|
|
10
|
+
silent and behavioral: operator types `/<name>` expecting bassclef's
|
|
11
|
+
skill; harness resolves the built-in first and returns something else.
|
|
12
|
+
|
|
13
|
+
The authoritative list lives in `standards/reserved-skill-names.md`.
|
|
14
|
+
This file is the **rule** — semantics, enforcement, override path.
|
|
15
|
+
|
|
16
|
+
## When this rule fires
|
|
17
|
+
|
|
18
|
+
On any commit (or PR) that stages a new `.claude/skills/<name>/SKILL.md`
|
|
19
|
+
where `<name>` appears in the `standards/reserved-skill-names.md` list.
|
|
20
|
+
|
|
21
|
+
Does NOT fire on:
|
|
22
|
+
- Edits to existing skill files (only NEW skill directories)
|
|
23
|
+
- Files outside `.claude/skills/`
|
|
24
|
+
- Skills whose name includes a prefix/suffix avoiding collision
|
|
25
|
+
(e.g., `/docs-generator`, `/review-pr`)
|
|
26
|
+
|
|
27
|
+
## Enforcement
|
|
28
|
+
|
|
29
|
+
### Mechanical — pre-commit hook
|
|
30
|
+
|
|
31
|
+
`.claude/hooks/pre-commit-gate.sh` checks staged skill directories
|
|
32
|
+
against the reserved list. On collision, emits:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
BLOCKED: reserved skill name — `<name>` collides with a Claude Code
|
|
36
|
+
built-in. See standards/reserved-skill-names.md. Rename or override
|
|
37
|
+
with SKIP_RESERVED_NAMES=1.
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Blocks the commit. Per `blocked-items.md`, the block must be resolved
|
|
41
|
+
(rename) or explicitly deferred (override with rationale) — silence
|
|
42
|
+
is not deferral.
|
|
43
|
+
|
|
44
|
+
### Methodology — agent self-check
|
|
45
|
+
|
|
46
|
+
When drafting a new skill, the agent MUST:
|
|
47
|
+
|
|
48
|
+
1. Read `standards/reserved-skill-names.md` before proposing a skill name
|
|
49
|
+
2. If the proposed name matches, either:
|
|
50
|
+
- Pick a different name
|
|
51
|
+
- Justify the override (see Override path below)
|
|
52
|
+
3. Cite the check in the PR body ("Reserved-names check: [name] — no
|
|
53
|
+
collision" or "collision — override justified by X")
|
|
54
|
+
|
|
55
|
+
The "Sources read" block per `artifact-ingestion.md` covers this
|
|
56
|
+
citation automatically when a new-skill PR references the standards list.
|
|
57
|
+
|
|
58
|
+
## Override path
|
|
59
|
+
|
|
60
|
+
Rare case — bassclef wants to deliberately shadow a harness built-in:
|
|
61
|
+
|
|
62
|
+
1. Add a note to the skill's SKILL.md frontmatter:
|
|
63
|
+
`reserved_name_override: "<name> — rationale"`
|
|
64
|
+
2. Commit with `SKIP_RESERVED_NAMES=1 git commit ...`
|
|
65
|
+
3. Call out the override in the PR body
|
|
66
|
+
|
|
67
|
+
The override exists because rules should be judgeable. But the friction
|
|
68
|
+
is deliberately high — bypassing the hook requires conscious intent.
|
|
69
|
+
|
|
70
|
+
## What counts as a "collision"
|
|
71
|
+
|
|
72
|
+
Exact string match, case-insensitive, against the `Name` column of
|
|
73
|
+
`standards/reserved-skill-names.md`. The skill directory name (not the
|
|
74
|
+
slash-command alias, not the frontmatter `name:` field) is what the
|
|
75
|
+
harness resolves; the directory name is what the hook checks.
|
|
76
|
+
|
|
77
|
+
Prefixes and suffixes break collision:
|
|
78
|
+
|
|
79
|
+
| Reserved | Bassclef skill | Collides? |
|
|
80
|
+
|----------|----------------|-----------|
|
|
81
|
+
| `docs` | `docs-generator` | No |
|
|
82
|
+
| `docs` | `docs` | **Yes** |
|
|
83
|
+
| `init` | `init-repo` | No |
|
|
84
|
+
| `review` | `review` | **Yes** |
|
|
85
|
+
| `review` | `pr-review` | No |
|
|
86
|
+
|
|
87
|
+
## How the list gets updated
|
|
88
|
+
|
|
89
|
+
Process lives in `standards/reserved-skill-names.md` ("Updating this
|
|
90
|
+
list" section). Key constraint: if the list addition would collide
|
|
91
|
+
with an existing bassclef skill, that skill MUST be renamed before
|
|
92
|
+
the list addition merges. No silent shadow.
|
|
93
|
+
|
|
94
|
+
## Relationship to other rules
|
|
95
|
+
|
|
96
|
+
- `blocked-items.md` — the hook emits `BLOCKED: reserved skill name`;
|
|
97
|
+
this rule's semantics slot into the blocked-items protocol
|
|
98
|
+
- `artifact-ingestion.md` — new-skill PRs read the standards list;
|
|
99
|
+
"Sources read" block cites it
|
|
100
|
+
- `commit-conventions.md` — override commits include `SKIP_RESERVED_NAMES=1`;
|
|
101
|
+
rationale in body
|
|
102
|
+
- `sdlc-gates.md` — collision check fires at pre-commit, before
|
|
103
|
+
bassclef-evolution check
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
globs: ["prisma/**", "**/schema.prisma", "**/migration*", "alembic/**", "db/migrate/**", "migrations/**", "**/migrations/**"]
|
|
4
|
+
description: Schema management — never apply schema changes without a migration; loads per-ORM sibling
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Schema Management
|
|
8
|
+
|
|
9
|
+
Universal principle: **never apply schema changes without a migration file**. Schema drift between local and prod is a load-bearing failure mode for every ORM. When local is reset (rebuild, fresh clone, CI runner spin-up), unmigrated changes vanish silently and prod diverges from local. The failure surfaces hours or days later as a runtime crash with no obvious cause.
|
|
10
|
+
|
|
11
|
+
The discipline holds across ORMs; the specifics differ. Bassclef's loader reads `tech_stack.orm:` from `.claude/bassclef-configs.jsonc` and loads the matching sibling under `standards/migration-discipline/` for ORM-specific guidance.
|
|
12
|
+
|
|
13
|
+
## Universal commitments (every ORM)
|
|
14
|
+
|
|
15
|
+
1. **Never use auto-apply / push tools** that bypass migration files (Prisma `db push`, GORM `AutoMigrate` in production, Django `--fake`, etc.). They feel fast but ship drift.
|
|
16
|
+
2. **Always create a migration file** when changing the schema. The migration is the audit trail; missing migration = missing audit.
|
|
17
|
+
3. **Commit the migration with the schema change.** Splitting them across commits is how reviewers miss the migration entirely.
|
|
18
|
+
4. **Run migrate-deploy in CI**, not `dev` / autogen. Production migrations are explicit, reviewed, and reversible.
|
|
19
|
+
5. **After merging a schema change**, regenerate the client / model bindings + restart the dev process. Cached clients don't know about new fields.
|
|
20
|
+
6. **Migration files are immutable once shipped**. Editing a merged migration corrupts history for every other developer.
|
|
21
|
+
|
|
22
|
+
## Per-ORM siblings
|
|
23
|
+
|
|
24
|
+
| Adopter's `tech_stack.orm` | Sibling loaded |
|
|
25
|
+
|---|---|
|
|
26
|
+
| `prisma` | `standards/migration-discipline/prisma.md` |
|
|
27
|
+
| `sqlalchemy` | `standards/migration-discipline/sqlalchemy.md` (Alembic via SQLAlchemy autogen) |
|
|
28
|
+
| `alembic` | `standards/migration-discipline/alembic.md` (standalone Alembic, non-SQLAlchemy) |
|
|
29
|
+
| `gorm` | `standards/migration-discipline/gorm.md` |
|
|
30
|
+
| `active-record` | `standards/migration-discipline/active-record.md` (Rails migrations) |
|
|
31
|
+
| `drizzle` | `standards/migration-discipline/drizzle.md` *(future — file `/promote` to author)* |
|
|
32
|
+
| `none` or unset | Universal commitments only |
|
|
33
|
+
|
|
34
|
+
When the matching sibling does not exist, the rule fires the universal commitments only and surfaces a `/promote` candidate for the missing sibling.
|
|
35
|
+
|
|
36
|
+
## Session-start drift check
|
|
37
|
+
|
|
38
|
+
Each ORM's sibling describes its drift-detection mechanism. The session-start hook reads the adopter's `tech_stack.orm:` and runs the matching check. If drift is detected, the agent creates the missing migration before writing any code.
|
|
39
|
+
|
|
40
|
+
## Tech stack vocabulary
|
|
41
|
+
|
|
42
|
+
The loader reads `tech_stack.orm` shipped in bassclef#1127 (WU-2 of bet 2026-06-18a). Adopters set the value at `/onboard-repo` Phase 2.x. When `tech_stack:` block is absent, the universal commitments still apply; ORM-specific guidance is skipped until the operator declares the stack.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: Universal SDLC gates — pre-build temperance + diagnose, post-build /verify, observed-failure chain. Stack-specific globs live in per-language siblings under standards/sdlc-gates/.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SDLC Gates
|
|
7
|
+
|
|
8
|
+
Universal SDLC discipline applicable to any stack. The temperance + diagnose + verify chain is language-agnostic; the specific globs that scope the rule to source files live in per-language siblings under `standards/sdlc-gates/`. The loader (future ticket) reads adopter's `tech_stack.lang` from `.claude/bassclef-configs.jsonc` and applies the matching sibling's globs in addition to this rule.
|
|
9
|
+
|
|
10
|
+
When no sibling exists for the adopter's language, the universal gates below still apply — the rule fires methodologically even without glob-based file scoping.
|
|
11
|
+
|
|
12
|
+
## Per-stack siblings
|
|
13
|
+
|
|
14
|
+
| Adopter's `tech_stack.lang` | Sibling loaded |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `typescript` | `standards/sdlc-gates/typescript.md` |
|
|
17
|
+
| `python` | `standards/sdlc-gates/python.md` *(future — file `/promote` to author)* |
|
|
18
|
+
| `ruby` | `standards/sdlc-gates/ruby.md` *(future)* |
|
|
19
|
+
| `go` | `standards/sdlc-gates/go.md` *(future)* |
|
|
20
|
+
| `none` or unset | universal gates only; no glob-based scoping |
|
|
21
|
+
|
|
22
|
+
When the matching sibling does not exist, the universal gates below apply; sibling-specific globs are skipped until the operator declares the stack and a sibling ships.
|
|
23
|
+
|
|
24
|
+
## Pre-Build (before writing code) — HOOK ENFORCED (BLOCKING)
|
|
25
|
+
|
|
26
|
+
The `pre-build-gate.sh` hook enforces these as hard blocks (exit 2)
|
|
27
|
+
on PreToolUse Edit / Write / MultiEdit. Per bassclef#1060 the gate
|
|
28
|
+
flipped from advisory (banner + exit 0) to blocking after an audit
|
|
29
|
+
showed 0 of 15 PRs had temperance markers. Methodology-only failed.
|
|
30
|
+
|
|
31
|
+
Override paths per gate: `SKIP_TEMPERANCE=1` and `SKIP_DIAGNOSE=1`
|
|
32
|
+
(logged via trace-helper).
|
|
33
|
+
|
|
34
|
+
1. **Temperance** — fires at **scope-decision boundaries**, not
|
|
35
|
+
per-branch. You must state your approach before the gate clears.
|
|
36
|
+
BLOCKS first edit on non-stacked branches until a marker exists
|
|
37
|
+
at `state/markers/temperance/<branch-slug>.marker`. Stacked
|
|
38
|
+
branches auto-suppress (the scope decision was made at
|
|
39
|
+
manifest-write time).
|
|
40
|
+
|
|
41
|
+
Scope-decision boundaries (where the gate IS load-bearing):
|
|
42
|
+
- Session kickoff (autonomous or `/longrun` start)
|
|
43
|
+
- Phase boundary (last WS in a phase transitions to merged →
|
|
44
|
+
next phase's premise re-engaged)
|
|
45
|
+
- Post-compaction recovery (context just compacted; have I drifted?)
|
|
46
|
+
- Scope-drift detection (a WS exceeds time budget × 1.5 → pause and
|
|
47
|
+
re-anchor)
|
|
48
|
+
- First edit per branch IF branch is NOT declared in any stack
|
|
49
|
+
manifest (non-stacked work fallback)
|
|
50
|
+
|
|
51
|
+
When the current branch IS declared in a `docs/stacks/*.md` or
|
|
52
|
+
`docs/branch-stacks/*.md` manifest, per-branch temperance is
|
|
53
|
+
**suppressed** — the scope decision was made at manifest-write
|
|
54
|
+
time. Phase-level firings cover the actual decision points.
|
|
55
|
+
Per bassclef#272.
|
|
56
|
+
|
|
57
|
+
Auto-fire mechanisms (session-kickoff, phase-boundary,
|
|
58
|
+
post-compaction, scope-drift detection) ship with the `/longrun`
|
|
59
|
+
skill (bassclef#274). Until then, the operator + agent fire
|
|
60
|
+
temperance manually at those boundaries.
|
|
61
|
+
2. **Diagnosis** — fires on ALL fix/ branches. You must run /diagnose
|
|
62
|
+
(Is/Is Not + Five Whys + Hypothesis) before writing any fix code.
|
|
63
|
+
The hook blocks until diagnosis evidence exists.
|
|
64
|
+
3. SDLC checkpoint — spec current? diagrams need updating?
|
|
65
|
+
4. Requirements → tickets — log before coding
|
|
66
|
+
|
|
67
|
+
## Observed failure → temperance → diagnose (MANDATORY)
|
|
68
|
+
|
|
69
|
+
Any time you observe a failure — regardless of source — fire this chain:
|
|
70
|
+
|
|
71
|
+
1. Temperance (pause before reacting):
|
|
72
|
+
- Is this expected? Is this worth investigating?
|
|
73
|
+
- Am I about to brute-force a retry instead of understanding?
|
|
74
|
+
|
|
75
|
+
2. Diagnose (if the failure is real):
|
|
76
|
+
- Is / Is Not
|
|
77
|
+
- Five Whys to root cause
|
|
78
|
+
- Hypothesis + test plan
|
|
79
|
+
- THEN fix
|
|
80
|
+
|
|
81
|
+
This applies to ALL failure sources:
|
|
82
|
+
- Tool output (CI logs, tsc errors, test failures, deploy logs)
|
|
83
|
+
- Failures you caused (pushed code → CI broke → fix before moving on)
|
|
84
|
+
- User-reported failures (text, screenshots, logs)
|
|
85
|
+
- Server logs you read
|
|
86
|
+
|
|
87
|
+
Do NOT rely on hooks alone. You are responsible for recognizing failures
|
|
88
|
+
in all forms and firing the temperance → diagnose chain yourself.
|
|
89
|
+
|
|
90
|
+
## Post-Build (before committing — EACH task, not batched)
|
|
91
|
+
|
|
92
|
+
Run /verify for the change type. Do not batch-build then batch-verify.
|
|
93
|
+
|
|
94
|
+
Before committing, ask yourself:
|
|
95
|
+
- Did I add or modify an exported function? → It needs a test.
|
|
96
|
+
- Did I change query logic or selection behavior? → Test it.
|
|
97
|
+
- Can I extract the logic into a pure function? → Do it, then test it.
|
|
98
|
+
|
|
99
|
+
"I'll add tests later" is never acceptable.
|
|
100
|
+
|
|
101
|
+
INSTEAD: tests ship with the code in the same commit. If the test is
|
|
102
|
+
hard to write, that's a signal the implementation needs decomposing —
|
|
103
|
+
fix the design first, then the test follows naturally.
|
|
104
|
+
|
|
105
|
+
## Bassclef Evolution Check (non-bassclef repos only)
|
|
106
|
+
|
|
107
|
+
Before committing **any methodology or configuration change** in an app repo,
|
|
108
|
+
ask: "Is this local or global?"
|
|
109
|
+
|
|
110
|
+
### What triggers the check
|
|
111
|
+
|
|
112
|
+
Not just `.claude/` — any change that establishes a pattern other repos
|
|
113
|
+
might need:
|
|
114
|
+
|
|
115
|
+
| Change | Examples | Why it matters |
|
|
116
|
+
|--------|----------|---------------|
|
|
117
|
+
| `.claude/` files | skills, rules, hooks, agents | Direct substrate changes |
|
|
118
|
+
| `settings.json` | model routing, permission defaults, hook config | Global agent behavior |
|
|
119
|
+
| `package.json` scripts | new dev commands, lint configs, build patterns | Workflow conventions |
|
|
120
|
+
| Hook scripts | pre-commit, pre-push, CI scripts | Process enforcement |
|
|
121
|
+
| Config files | `.eslintrc`, `tsconfig`, `prettier`, `.env.example` | Standards compliance |
|
|
122
|
+
| New workflow patterns | testing approaches, deployment scripts, seed patterns | Methodology evolution |
|
|
123
|
+
|
|
124
|
+
### The check
|
|
125
|
+
|
|
126
|
+
1. Is this general (applies to any project) or app-specific?
|
|
127
|
+
2. If general → run `/promote` to create a `bassclef-evolution` issue
|
|
128
|
+
3. Log the promotion and continue with current work.
|
|
129
|
+
|
|
130
|
+
INSTEAD of waiting for promotion to merge: file the issue and
|
|
131
|
+
keep moving. Promotion lands on its own cadence; current work
|
|
132
|
+
doesn't block on it.
|
|
133
|
+
|
|
134
|
+
4. If unsure → promote. It's cheaper to reject a promotion than to
|
|
135
|
+
rediscover the pattern later in another repo.
|
|
136
|
+
|
|
137
|
+
### Common miss: settings.json
|
|
138
|
+
|
|
139
|
+
Settings changes are the most commonly missed. When an app repo modifies
|
|
140
|
+
agent behavior, model routing, permission patterns, or hook configuration
|
|
141
|
+
in `settings.json`, that's almost always a global decision wearing local
|
|
142
|
+
clothes. The pre-commit hook flags these.
|
|
143
|
+
|
|
144
|
+
INSTEAD of dismissing the warning: read the flagged change, decide
|
|
145
|
+
local-vs-global, run /promote if global. Warnings are signal, not noise.
|
|
146
|
+
|
|
147
|
+
## Architect Review
|
|
148
|
+
|
|
149
|
+
Run /architect-review every 10 commits or before any launch.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
globs: ["**/*.ts", "**/*.tsx", "**/*.json", ".env*", "Dockerfile*", "docker-compose*"]
|
|
4
|
+
description: Security scanning — loads when touching source, config, or infra files
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Three-layer security pipeline. All block merge on failure.
|
|
8
|
+
|
|
9
|
+
Pipeline order: push → secret scan → lint → typecheck → SAST → dependency audit → test → build → deploy
|
|
10
|
+
|
|
11
|
+
Layer 1 — Secret Detection (gitleaks):
|
|
12
|
+
Pre-commit hook + CI. Catches API keys, OAuth tokens, AWS creds, private keys.
|
|
13
|
+
Never commit .env files, credentials, or API keys.
|
|
14
|
+
|
|
15
|
+
Layer 2 — Dependency Vulnerabilities (npm audit):
|
|
16
|
+
CI blocks on high-severity CVEs. Uses audit-ci for strict enforcement.
|
|
17
|
+
|
|
18
|
+
Layer 3 — SAST (ESLint security plugins + TypeScript compiler):
|
|
19
|
+
eslint-plugin-security, @typescript-eslint, eslint-plugin-no-secrets.
|
|
20
|
+
Optional: Semgrep for deeper analysis as complexity grows.
|
|
21
|
+
|
|
22
|
+
Rules:
|
|
23
|
+
- No secrets in code or logs — use environment variables
|
|
24
|
+
- Validate all user input at system boundaries
|
|
25
|
+
- Use parameterized queries (Prisma handles this)
|
|
26
|
+
- OWASP top 10 awareness: XSS, injection, broken auth, SSRF
|
|
27
|
+
|
|
28
|
+
Auth matrix (define per project):
|
|
29
|
+
- List every route and its required auth level
|
|
30
|
+
- Protected routes must check session/token
|
|
31
|
+
- Public routes must be explicitly marked as intentionally public
|
|
32
|
+
- API routes that modify data require auth — no exceptions
|
|
33
|
+
|
|
34
|
+
Tenant isolation (if multi-tenant):
|
|
35
|
+
- Every query on tenant-scoped models must include tenant context
|
|
36
|
+
- No hardcoded tenant IDs, financial thresholds, or tenant-specific logic
|
|
37
|
+
- Tenant context resolved at middleware/boundary, passed through
|