@thebassclef/lite 1.0.3 → 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 +92 -6
- package/dist/cli.js +92 -6
- 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,115 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: Universal API design principles — REST conventions, response shapes, status codes, auth, validation. Stack-specific globs + helpers live in per-stack siblings under standards/api-conventions/.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# API Conventions
|
|
7
|
+
|
|
8
|
+
Universal API design principles for any HTTP API surface. Stack-specific instantiations (Next.js App Router, FastAPI, Rails, Express, Go) live in per-stack siblings under `standards/api-conventions/`. The loader (future ticket) reads adopter's `tech_stack.frontend` + `tech_stack.backend` from `.claude/bassclef-configs.jsonc` and loads the matching sibling.
|
|
9
|
+
|
|
10
|
+
When no sibling exists for the adopter's stack, the universal principles below still apply.
|
|
11
|
+
|
|
12
|
+
## Universal principles
|
|
13
|
+
|
|
14
|
+
These hold regardless of stack.
|
|
15
|
+
|
|
16
|
+
### Route naming
|
|
17
|
+
|
|
18
|
+
- RESTful: `/api/[resource]` for collections, `/api/[resource]/[id]` for items
|
|
19
|
+
- Nested resources: `/api/[parent]/[parentId]/[child]`
|
|
20
|
+
- Actions (non-CRUD): `/api/[resource]/[id]/[action]` (e.g., `/api/deals/123/archive`)
|
|
21
|
+
- Lowercase, hyphenated: `/api/deal-pipeline`, not `/api/dealPipeline`
|
|
22
|
+
|
|
23
|
+
### Response shapes
|
|
24
|
+
|
|
25
|
+
Standard wrapper for successful single-item responses:
|
|
26
|
+
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"data": { ... },
|
|
30
|
+
"meta": { "timestamp": "2026-04-05T10:00:00Z" }
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Standard wrapper for successful collection responses:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"data": [ ... ],
|
|
39
|
+
"meta": {
|
|
40
|
+
"total": 42,
|
|
41
|
+
"page": 1,
|
|
42
|
+
"pageSize": 20,
|
|
43
|
+
"timestamp": "2026-04-05T10:00:00Z"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Standard error shape:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{
|
|
52
|
+
"error": {
|
|
53
|
+
"code": "VALIDATION_ERROR",
|
|
54
|
+
"message": "Human-readable description",
|
|
55
|
+
"details": [ ... ]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### HTTP status codes
|
|
61
|
+
|
|
62
|
+
| Code | When |
|
|
63
|
+
|------|------|
|
|
64
|
+
| 200 | Success (GET, PUT, PATCH) |
|
|
65
|
+
| 201 | Created (POST) |
|
|
66
|
+
| 204 | No content (DELETE) |
|
|
67
|
+
| 400 | Validation error, bad input |
|
|
68
|
+
| 401 | Not authenticated |
|
|
69
|
+
| 403 | Authenticated but not authorized |
|
|
70
|
+
| 404 | Resource not found |
|
|
71
|
+
| 409 | Conflict (duplicate, stale update) |
|
|
72
|
+
| 500 | Unexpected server error |
|
|
73
|
+
|
|
74
|
+
### Pagination
|
|
75
|
+
|
|
76
|
+
Default: cursor-based for lists > 20 items. Offset-based acceptable for admin/internal endpoints.
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
GET /api/deals?cursor=abc123&pageSize=20
|
|
80
|
+
→ { data: [...], meta: { nextCursor: "def456", hasMore: true } }
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Auth
|
|
84
|
+
|
|
85
|
+
- Every route that modifies data requires auth — no exceptions
|
|
86
|
+
- Read routes may be public if explicitly marked (e.g., `// PUBLIC: [reason]` comment)
|
|
87
|
+
- Auth check happens at the route boundary, not inside handlers
|
|
88
|
+
- Tenant context resolved at the route boundary, passed through to queries
|
|
89
|
+
|
|
90
|
+
### Validation
|
|
91
|
+
|
|
92
|
+
- Validate all input at the route handler boundary
|
|
93
|
+
- Use a schema-validation library (Zod, Pydantic, JSON Schema, etc.) for request body validation
|
|
94
|
+
- Never trust client-provided IDs for authorization decisions
|
|
95
|
+
- Use parameterized queries to prevent injection (every ORM has its own mechanism)
|
|
96
|
+
|
|
97
|
+
## Per-stack siblings
|
|
98
|
+
|
|
99
|
+
Per ARCH-T0 #1133 Path A — stack-specific instantiations live in their own files. Loader reads adopter's `tech_stack` from `.claude/bassclef-configs.jsonc`.
|
|
100
|
+
|
|
101
|
+
| Adopter's `tech_stack.frontend` | Sibling loaded |
|
|
102
|
+
|---|---|
|
|
103
|
+
| `nextjs` | `standards/api-conventions/nextjs.md` |
|
|
104
|
+
| `fastapi` | `standards/api-conventions/fastapi.md` *(future — file `/promote` to author)* |
|
|
105
|
+
| `rails` | `standards/api-conventions/rails.md` *(future)* |
|
|
106
|
+
| `express` | `standards/api-conventions/express.md` *(future)* |
|
|
107
|
+
| `none` or unset | universal principles only |
|
|
108
|
+
|
|
109
|
+
When the matching sibling does not exist, the universal principles above apply; sibling-specific guidance is skipped until the operator declares the stack and a sibling ships.
|
|
110
|
+
|
|
111
|
+
## Path A treatment
|
|
112
|
+
|
|
113
|
+
This rule shipped under ARCH-T0 #1133 Path A — additive, no content removed. Existing Next.js App Router specifics (formerly in this file) moved to `standards/api-conventions/nextjs.md`. Adopters following the rule pre-split keep working: the universal principles match what was already documented; the Next.js specifics are still discoverable via the sibling.
|
|
114
|
+
|
|
115
|
+
Loader infrastructure that reads sibling per `tech_stack` is a future ticket. Until it ships, the cross-reference table above is the discovery path.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: Before producing any substantive generative output (canvas, prototype, spec, proposal, rubric, ADR, variant), the agent MUST read the referenced artifacts and enumerate them in…
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Artifact Ingestion — Read Before You Produce
|
|
7
|
+
|
|
8
|
+
Before producing any substantive generative output (canvas, prototype,
|
|
9
|
+
spec, proposal, rubric, ADR, variant), the agent MUST read the
|
|
10
|
+
referenced artifacts and enumerate them in the output.
|
|
11
|
+
|
|
12
|
+
"Pattern-matched on generic X" is a failure, not a shortcut.
|
|
13
|
+
|
|
14
|
+
## When this rule fires
|
|
15
|
+
|
|
16
|
+
Fires on any of the following output types when they reference an
|
|
17
|
+
existing artifact the agent could have read:
|
|
18
|
+
|
|
19
|
+
- **Canvas / spec / ADR** drafts referencing issues, prior canvases,
|
|
20
|
+
chronicles, or memory entries
|
|
21
|
+
- **Prototype or variant** builds referencing prior prototypes,
|
|
22
|
+
design tokens, or luminary files
|
|
23
|
+
- **Iteration proposals** referencing active iteration goals (must
|
|
24
|
+
enumerate every workstream — see `blocked-items.md` for same
|
|
25
|
+
anti-skim shape)
|
|
26
|
+
- **Gate evaluations** (`/verify`, `/architect-review`) referencing
|
|
27
|
+
spec or ADR acceptance criteria
|
|
28
|
+
- **Skills producing derivative content** (`/value-prop` from a ticket,
|
|
29
|
+
`/decompose` from a spec) — must read source, not just the title
|
|
30
|
+
|
|
31
|
+
## Required format: "Sources read" block
|
|
32
|
+
|
|
33
|
+
Every output subject to this rule MUST begin with (or include) a
|
|
34
|
+
block like:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
## What I'm NOT reading (with reason)
|
|
38
|
+
|
|
39
|
+
- [path] — [deliberate exclusion reason, e.g. out of scope, stale]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If no artifacts were read: state "No prior artifacts; producing from
|
|
43
|
+
scratch because [reason]." Silence is not exemption.
|
|
44
|
+
|
|
45
|
+
## Anti-patterns that fire this rule
|
|
46
|
+
|
|
47
|
+
Direct quotes from recent failures:
|
|
48
|
+
|
|
49
|
+
- "I pattern-matched on generic card UI" — built prototype without
|
|
50
|
+
reading existing Norman/Prater variant files (2026-04-13)
|
|
51
|
+
- "I didn't study the existing variants before building" — same
|
|
52
|
+
incident
|
|
53
|
+
- Producing a canvas recommending vendor X without reading memory
|
|
54
|
+
that flagged vendor Y for evaluation (2026-04-13)
|
|
55
|
+
- Proposing iteration scope covering 1 of 4 workstreams without
|
|
56
|
+
enumerating the ones being dropped (2026-04-12)
|
|
57
|
+
- Skipping BLOCKED hook output in favor of answering the user's
|
|
58
|
+
direct question (2026-04-12; third instance in six weeks)
|
|
59
|
+
|
|
60
|
+
Shape across all four: **training priors substituted for explicit
|
|
61
|
+
artifacts the operator had already staged.**
|
|
62
|
+
|
|
63
|
+
## Verification cue for the agent (self-check before output)
|
|
64
|
+
|
|
65
|
+
Before producing the output, ask:
|
|
66
|
+
|
|
67
|
+
1. Did I Read every file path referenced in the prompt or parent
|
|
68
|
+
artifact?
|
|
69
|
+
2. Did I enumerate every workstream / variant / section of the parent
|
|
70
|
+
artifact, including the ones I'm deferring?
|
|
71
|
+
3. Did I check memory for prior evaluations, flagged alternatives, or
|
|
72
|
+
deferred decisions relevant to this output?
|
|
73
|
+
4. Did I consult the active luminary files for guidance (where the
|
|
74
|
+
skill or agent definition lists luminaries)?
|
|
75
|
+
|
|
76
|
+
If any answer is "no," stop. Read first. Then produce.
|
|
77
|
+
|
|
78
|
+
## Session-start branch — read recent strategic artifacts before substantive work
|
|
79
|
+
|
|
80
|
+
Before any branch creation OR substantive PR work in a session, the
|
|
81
|
+
agent MUST Read every strategic artifact (canvas / spec / iteration-bet
|
|
82
|
+
/ ADR / decomposition / roadmap) authored OR substantively modified
|
|
83
|
+
within the last 7 days.
|
|
84
|
+
|
|
85
|
+
**Why this branch exists.** The production-time gate (PreToolUse on
|
|
86
|
+
Write/Edit per `artifact-ingestion-gate.sh`) catches artifact-ingestion
|
|
87
|
+
failures at WRITE time. It does NOT catch the case where an agent runs
|
|
88
|
+
`/sprint`, sees a recently-merged commit in `git log`, treats it as
|
|
89
|
+
background context, and proceeds with substantive work for hours
|
|
90
|
+
before reading the artifact itself. That failure mode was demonstrated
|
|
91
|
+
2026-04-26: 5h triage session opened against canvas-v3 commit listed
|
|
92
|
+
in `/sprint` output without anyone reading the canvas; the canvas
|
|
93
|
+
explicitly named the triage fixes as transition methodology being
|
|
94
|
+
superseded by spine v0. Operator caught it; the cost was 4 PRs of
|
|
95
|
+
short-lifetime work.
|
|
96
|
+
|
|
97
|
+
**Mechanism.** `.claude/hooks/session-reflection.d/70-recent-strategic-artifacts.sh`
|
|
98
|
+
fires at SessionStart, runs `git log --since=7-days --diff-filter=AM`
|
|
99
|
+
restricted to the strategic-artifact path matcher, emits a `🛑 BLOCKED`
|
|
100
|
+
block listing each path + commit date when results are non-empty.
|
|
101
|
+
Window is configurable via `RECENT_STRATEGIC_DAYS` env (default 7);
|
|
102
|
+
0 disables for that session.
|
|
103
|
+
|
|
104
|
+
**Resolution per `.claude/rules/blocked-items.md`.** The agent MUST
|
|
105
|
+
either Read each listed artifact this session OR explicitly defer
|
|
106
|
+
("skip recent-artifacts this session"). Silence is not deferral. The
|
|
107
|
+
default is Read. The marker pattern from sibling production gates is
|
|
108
|
+
NOT used here because session-reflection.d/* fragments only fire once
|
|
109
|
+
per SessionStart by design — re-fire suppression is unnecessary.
|
|
110
|
+
|
|
111
|
+
**Override.** `SKIP_RECENT_ARTIFACTS=1 <command>` (logged to trace) or
|
|
112
|
+
operator-explicit deferral statement.
|
|
113
|
+
|
|
114
|
+
**Strategic-artifact path matcher** (mirrors production-gate matcher
|
|
115
|
+
minus prototypes which have their own approval workflow):
|
|
116
|
+
|
|
117
|
+
- `strategy/canvases/*.md`
|
|
118
|
+
- `docs/specs/*.md`
|
|
119
|
+
- `docs/iteration-bets/*.md`
|
|
120
|
+
- `architecture/decisions/ADR-*.md`
|
|
121
|
+
- `docs/decompositions/*.md`
|
|
122
|
+
- `docs/roadmaps/*.md`
|
|
123
|
+
|
|
124
|
+
Prototypes are deliberately excluded — `prototype-workflow.md` and
|
|
125
|
+
`prototype-production-coupling.md` cover that surface separately.
|
|
126
|
+
|
|
127
|
+
## Relationship to other rules
|
|
128
|
+
|
|
129
|
+
- `blocked-items.md` — same anti-skim shape; blocked items are a
|
|
130
|
+
specific case of artifact-ingestion failure (skipping hook-surfaced
|
|
131
|
+
artifacts)
|
|
132
|
+
- `oo-ad-entry-point.md` — analogous pattern for /decompose
|
|
133
|
+
(evidence required before Construction)
|
|
134
|
+
- `sdlc-gates.md` — pre-build gates; artifact ingestion is the gate
|
|
135
|
+
*before* temperance and diagnosis
|
|
136
|
+
- `substrate-config-schema.md` — reading `substrate.config.md` is
|
|
137
|
+
itself an artifact-ingestion obligation
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: "Plain check: Before I make a claim in this turn, I read the source first and cite it."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Assert Only After Verify
|
|
7
|
+
|
|
8
|
+
**Plain check:** Before I make a claim in this turn, I read the source first and cite it. If I cannot cite the source, I do not ship the claim.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Every operator-facing assertion carries at minimum three parts: **My claim** (what you are saying), **Evidence** (the source you read, cited inline), and **Why the evidence supports the claim** (one sentence on why the source supports the claim). Two optional parts sharpen the shape: **Qualifier** (confidence + N observations) and **Rebuttal** (what would falsify the claim). Without My claim + Evidence + Why the evidence supports the claim, the assertion does not ship. This rule closes #559 at the class layer — pairs with the UserPromptSubmit hook at `.claude/hooks/assert-verify-steering.sh` per ADR-035 substrate-as-system tenet.
|
|
13
|
+
|
|
14
|
+
**Vocabulary note (per bet 2026-07-03b WU-4 rename #613):** The working labels are **My claim / Evidence / Why the evidence supports the claim**. Toulmin's original vocabulary (claim / data / warrant) stays as the research citation in `.claude/luminaries/stephen-toulmin.md` — the working vocabulary reads plainer at the moment the operator scans the injected reminder.
|
|
15
|
+
|
|
16
|
+
## When this rule fires
|
|
17
|
+
|
|
18
|
+
Every operator-facing assertion the agent authors:
|
|
19
|
+
|
|
20
|
+
- Audit findings and severity ranks
|
|
21
|
+
- Cure recommendations and root-cause attributions
|
|
22
|
+
- Turn estimates and time budget claims
|
|
23
|
+
- Modal claims (words like "wrong," "broken," "should," "must," "always")
|
|
24
|
+
- Class-level diagnoses ("this is an instance of...")
|
|
25
|
+
- Ticket bodies, PR bodies, commit messages
|
|
26
|
+
- Chronicle entries and journal drafts
|
|
27
|
+
- Scope enumeration from queued tickets (/longrun option composition; /sprint next-work proposals)
|
|
28
|
+
|
|
29
|
+
Pass-through cases (rule does not add ceremony):
|
|
30
|
+
|
|
31
|
+
- Direct tool output relayed to the operator (test output, git output). INSTEAD of citing sources for tool relays: preserve the raw output; the tool IS the source.
|
|
32
|
+
- Operator-quoted text preserved verbatim. INSTEAD of citing external sources for quoted operator text: attribution to the operator IS the citation.
|
|
33
|
+
- Small conversational asides that carry no claim ("switching to main now"). INSTEAD of applying the shape to asides: reserve the discipline for assertions carrying a claim.
|
|
34
|
+
|
|
35
|
+
## What the rule requires
|
|
36
|
+
|
|
37
|
+
Before shipping any operator-facing assertion:
|
|
38
|
+
|
|
39
|
+
1. **My claim** — state the assertion in one sentence
|
|
40
|
+
2. **Evidence** — cite the source read inline. Files by path, tickets by number, git commits by SHA, chronicles by filename, standards by section
|
|
41
|
+
3. **Why the evidence supports the claim** — one sentence on why the cited source supports the claim
|
|
42
|
+
|
|
43
|
+
Optional (sharpen the shape):
|
|
44
|
+
|
|
45
|
+
4. **Qualifier** — confidence + how many observations back the claim (e.g., "3 catches in one session"; "1 chronicle line"; "grep across 62 rules")
|
|
46
|
+
5. **Rebuttal** — what would falsify the claim (per Popper). A claim that cannot be falsified is steering, not truth
|
|
47
|
+
|
|
48
|
+
## Anti-patterns
|
|
49
|
+
|
|
50
|
+
These shapes fail the rule.
|
|
51
|
+
|
|
52
|
+
**Assertion without cited source.** "The hook is broken." No path, no evidence.
|
|
53
|
+
|
|
54
|
+
INSTEAD: "The hook at the named path exits 2 when stdin contains no JSON — reproduced with `echo '' | bash <that-hook-path>`." My claim + Evidence + Why the evidence supports the claim.
|
|
55
|
+
|
|
56
|
+
**Assertion pointing at a source but no warrant.** "Per chronicle 2026-06-30." What in the chronicle? Which line?
|
|
57
|
+
|
|
58
|
+
INSTEAD: "Per chronicle 2026-06-30d L47 — three catches in one session, all naming R8 pattern." The warrant tells the reader what the source says.
|
|
59
|
+
|
|
60
|
+
**Severity rank without observation criteria.** "This is a HIGH-severity finding." What was measured? Against what threshold?
|
|
61
|
+
|
|
62
|
+
INSTEAD: "This is HIGH — audit finding blocks Phase XI Batten Down HIGH-severity discipline per architecture/audits/2026-06-28-adopter-experience.md L23; 2 sibling instances." Evidence + Why the evidence supports the claim.
|
|
63
|
+
|
|
64
|
+
**Root cause attribution without falsifiability.** "The cause is X."
|
|
65
|
+
|
|
66
|
+
INSTEAD: "The cause is X — falsified if removing X does not remove the symptom. Test: [name the test]." Rebuttal is Popper's contribution.
|
|
67
|
+
|
|
68
|
+
**One explanation without alternatives.** "The bug is caused by Y."
|
|
69
|
+
|
|
70
|
+
INSTEAD: "The bug fits Y (my current explanation), Z (alternative — same symptom, different mechanism), and W (third alternative). Reading source [path] to discriminate." Peirce's contribution — abductive reasoning names multiple candidates before committing.
|
|
71
|
+
|
|
72
|
+
**Trusting `gh issue view state` as evidence work is undone.** Scope enumeration surfaces (/longrun option tables, /sprint next-work proposals) that read ticket state alone recommend already-done work. Ticket state and shipped state can diverge — work sometimes lands without the ticket getting closed; tickets sometimes stay OPEN as trackers after cures ship.
|
|
73
|
+
|
|
74
|
+
INSTEAD apply the discipline shape per row of the option table:
|
|
75
|
+
|
|
76
|
+
1. Read the ticket's acceptance criteria (via `gh issue view <N> --json body`)
|
|
77
|
+
2. Grep or read the source the ticket measures against (the file, the counter, the audit output)
|
|
78
|
+
3. If acceptance criteria are met by the current source — close the ticket in the enumeration itself (do not recommend it as scope)
|
|
79
|
+
4. If not met — proceed with a specific measurement in the option row (what's missing, what's the delta, what's the actual turn cost)
|
|
80
|
+
|
|
81
|
+
The catch: bet 2026-07-26d /longrun prep surfaced #884 (MEMORY.md prune) as a 20-40 turn scope option; the ticket's acceptance thresholds were already met by the file on disk. Reading `gh issue view state` returned `OPEN`; reading the file measured against the ticket criteria showed all three thresholds already passed. Operator caught the miss. See `feedback_verify_ticket_source_not_just_state.md`.
|
|
82
|
+
|
|
83
|
+
## The three luminaries anchoring this rule
|
|
84
|
+
|
|
85
|
+
- **Stephen Toulmin** — argument model. Claim + data + warrant is the minimum shape; qualifier + rebuttal sharpen it. From *The Uses of Argument* (1958)
|
|
86
|
+
- **Karl Popper** — falsifiability. A claim that cannot be falsified is not a scientific claim; it is steering language. From *The Logic of Scientific Discovery* (1959)
|
|
87
|
+
- **Charles Sanders Peirce** — abductive reasoning. Multiple explanations fit the same evidence; naming alternatives before committing catches confirmation bias. From "Deduction, Induction, and Hypothesis" (1878)
|
|
88
|
+
|
|
89
|
+
Full luminary files ship in bet 2026-07-01b WU-2 at `.claude/luminaries/{stephen-toulmin,karl-popper,charles-sanders-peirce}.md`.
|
|
90
|
+
|
|
91
|
+
## Composes with
|
|
92
|
+
|
|
93
|
+
- `.claude/hooks/assert-verify-steering.sh` — the paired UserPromptSubmit hook this rule commits to
|
|
94
|
+
- `.claude/rules/context-engineering.md` — foundational rule; this rule extends context engineering with argument shape
|
|
95
|
+
- `.claude/rules/plain-english-discipline.md` — sister rule at prose surface; both fire per prompt
|
|
96
|
+
- `.claude/rules/artifact-ingestion.md` — "read before produce" is the data-source discipline this rule extends to assertions
|
|
97
|
+
- `.claude/rules/blocked-items.md` — assertions calling something BLOCKED must cite the block-source
|
|
98
|
+
- `.claude/rules/stuck-signal-diagnostic.md` — assertion of "stuck" requires 3-session data
|
|
99
|
+
- `.claude/luminaries/stephen-toulmin.md` — primary anchor (bet 2026-07-01b WU-2)
|
|
100
|
+
- `.claude/luminaries/karl-popper.md` — supporting anchor (bet 2026-07-01b WU-2)
|
|
101
|
+
- `.claude/luminaries/charles-sanders-peirce.md` — supporting anchor (bet 2026-07-01b WU-2)
|
|
102
|
+
- Memory `feedback_verify_ticket_source_not_just_state.md` — the discipline the scope-enumeration anti-pattern encodes; verify tickets against source before scoping, not `gh` state alone
|
|
103
|
+
- `.claude/skills/longrun/SKILL.md` prep — the surface where the scope-enumeration extension fires (Step 1 pre-flight through Step 1.7)
|
|
104
|
+
- `.claude/skills/sprint/SKILL.md` — sister surface (next-work proposals)
|
|
105
|
+
- ADR-035 substrate-as-system — the tenet this rule operationalizes at reasoning boundary
|
|
106
|
+
|
|
107
|
+
## Override
|
|
108
|
+
|
|
109
|
+
`SKIP_ASSERT_VERIFY_STEERING=1 <command>` on the hook — logged via trace-helper. The rule itself has no per-call override; the shape is minimum baseline. Use only when quoting verbatim external content that contains an unverified claim.
|
|
110
|
+
|
|
111
|
+
INSTEAD of overriding for routine work: cite the source. The cost is a filename + one warrant sentence; the discipline compounds across every future assertion in every consumer repo.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: "Session-start hook output may contain lines prefixed with BLOCKED:."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Blocked Items — Mandatory Resolution
|
|
7
|
+
|
|
8
|
+
Session-start hook output may contain lines prefixed with `BLOCKED:`.
|
|
9
|
+
These are not suggestions. They are mandatory scope.
|
|
10
|
+
|
|
11
|
+
## Protocol
|
|
12
|
+
|
|
13
|
+
1. **Before proposing any new work**, scan session-start output for
|
|
14
|
+
`BLOCKED:` lines.
|
|
15
|
+
2. Each blocked item MUST be either:
|
|
16
|
+
- **Resolved** in this session (run the command, write the artifact), OR
|
|
17
|
+
- **Explicitly deferred** by the operator ("skip metrics this session")
|
|
18
|
+
3. If the operator says nothing about blocked items, the default is
|
|
19
|
+
**resolve them**. Silence is not deferral.
|
|
20
|
+
4. Propose blocked items as the FIRST items in your session plan.
|
|
21
|
+
New iteration work comes AFTER blocked items, not instead of them.
|
|
22
|
+
|
|
23
|
+
## What counts as resolution
|
|
24
|
+
|
|
25
|
+
- `BLOCKED: release-notes` → run /release-notes, commit the output
|
|
26
|
+
- `BLOCKED: metrics` → run the metrics script, commit the output
|
|
27
|
+
- `BLOCKED: chronicle` → write the missing chronicle, commit
|
|
28
|
+
- `BLOCKED: architect-review` → run /architect-review
|
|
29
|
+
|
|
30
|
+
## What counts as explicit deferral
|
|
31
|
+
|
|
32
|
+
The operator must say one of:
|
|
33
|
+
- "skip [item]" / "defer [item]" / "not this session"
|
|
34
|
+
- Acknowledging the item exists is NOT deferral
|
|
35
|
+
- "okay" or "got it" is NOT deferral — it means resolve it
|
|
36
|
+
|
|
37
|
+
## Friction during chained dispatches (bassclef#400)
|
|
38
|
+
|
|
39
|
+
The `post-skill-friction-check.sh` hook fires on PostToolUse Skill for
|
|
40
|
+
major composer skills (/stage (formerly /preview), /launch (formerly /preview-build), /build, /shape full,
|
|
41
|
+
/longrun, /decompose, /spec, /architect-review, /interpret-input, etc.).
|
|
42
|
+
It classifies output:
|
|
43
|
+
|
|
44
|
+
- **Unambiguous friction** (`deferred to Phase X`, `stub return`,
|
|
45
|
+
`Error:`, `not yet implemented`) → log + recommend `/promote
|
|
46
|
+
substrate-defect` inline. Don't defer to closeout; file at the
|
|
47
|
+
boundary.
|
|
48
|
+
- **Borderline friction** (`Lorem ipsum`, `XXX`, `FIXME`, partial
|
|
49
|
+
output) → log only; operator triages on return.
|
|
50
|
+
- **No friction** → silent.
|
|
51
|
+
|
|
52
|
+
The friction log lives at `docs/session-friction-log.md`. Operators
|
|
53
|
+
returning from unattended runs read the log first; promote what's
|
|
54
|
+
worth promoting.
|
|
55
|
+
|
|
56
|
+
Per-skill opt-out: add `disable_friction_check: true` to skill
|
|
57
|
+
frontmatter (rare; for skills whose stub returns are intended).
|
|
58
|
+
Per-call override: `SKIP_FRICTION_CHECK=1 <command>` (logged).
|
|
59
|
+
|
|
60
|
+
## When resolution reveals a substrate defect
|
|
61
|
+
|
|
62
|
+
Sometimes resolving a BLOCKED item surfaces the real cause: the hook's
|
|
63
|
+
detection path is wrong, a state file rotted, a marker format changed,
|
|
64
|
+
or the compliance calculation reads a location the writer stopped
|
|
65
|
+
using. The nominal work was done; the signal kept firing because the
|
|
66
|
+
mechanism is broken.
|
|
67
|
+
|
|
68
|
+
When this happens, resolution MUST include firing `/promote` with the
|
|
69
|
+
`substrate-defect` classifier. Fix the local instance AND promote the
|
|
70
|
+
mechanism fix — otherwise every consumer repo keeps hitting the same
|
|
71
|
+
broken hook.
|
|
72
|
+
|
|
73
|
+
### Trigger (any of)
|
|
74
|
+
|
|
75
|
+
1. **Stuck signal resolved** — the signal was stuck per
|
|
76
|
+
`stuck-signal-diagnostic.md`, mechanism-read found a defect, defect
|
|
77
|
+
is now fixed. `/promote` fires automatically on this path.
|
|
78
|
+
2. **Hook false-positive** — the banner fired even though the
|
|
79
|
+
underlying work was already done, and the fix was editing the hook,
|
|
80
|
+
not doing the work.
|
|
81
|
+
3. **Counter miscount** — the number in the banner was wrong
|
|
82
|
+
(off-by-one, wrong window, stale cache), and the fix was editing
|
|
83
|
+
the counting mechanism.
|
|
84
|
+
4. **Marker location rot** — a gate marker was written to a path the
|
|
85
|
+
reader no longer checks (e.g., `/tmp` sandbox teardown), and the
|
|
86
|
+
fix was dual-writing or relocating the marker.
|
|
87
|
+
|
|
88
|
+
### Protocol
|
|
89
|
+
|
|
90
|
+
1. **Resolve the local instance.** Land the substrate edit (hook fix,
|
|
91
|
+
rule update, path correction) in the current branch.
|
|
92
|
+
2. **Fire `/promote`** — use the substrate-defect template in
|
|
93
|
+
`promote/SKILL.md`. The /promote issue cites:
|
|
94
|
+
- Signal observed (banner text + chronicle dates showing the loop)
|
|
95
|
+
- Mechanism file read (path + what was wrong)
|
|
96
|
+
- Fix applied (PR or commit ref)
|
|
97
|
+
- Propagation requirement (which consumer repos inherit; what
|
|
98
|
+
breaks if they don't pick up the fix)
|
|
99
|
+
3. **Classify** as `agent-self-proposed` + `substrate-defect` (see
|
|
100
|
+
`promote/SKILL.md` label table). These don't need operator prompt —
|
|
101
|
+
agent-discovered defects file automatically because the trigger
|
|
102
|
+
condition (stuck signal + mechanism fix) is unambiguous.
|
|
103
|
+
4. **Cite in the session's chronicle** with explicit "substrate defect
|
|
104
|
+
promoted: #NNN" line so retrospectives can audit the promotion
|
|
105
|
+
path worked.
|
|
106
|
+
|
|
107
|
+
### Why mandatory (not MUST-try)
|
|
108
|
+
|
|
109
|
+
`bassclef-evolution.md` already describes /promote as the promotion
|
|
110
|
+
path. The gap being closed: when an agent finds a substrate defect
|
|
111
|
+
mid-session and fixes only the local instance, the decision to
|
|
112
|
+
promote becomes "nice to have" and rots. Three sessions in April 2026
|
|
113
|
+
fixed local substrate drift without firing /promote; the same drift
|
|
114
|
+
resurfaced in consumer repos two weeks later (POA inherited broken
|
|
115
|
+
hook paths).
|
|
116
|
+
|
|
117
|
+
Making /promote mandatory on the `resolution-revealed-defect` branch
|
|
118
|
+
removes the decision. The agent doesn't choose whether to promote;
|
|
119
|
+
the trigger fires it.
|
|
120
|
+
|
|
121
|
+
### What doesn't trigger /promote
|
|
122
|
+
|
|
123
|
+
- BLOCKED items resolved by doing the nominal work (running
|
|
124
|
+
`/release-notes`, writing the chronicle) — the mechanism was fine,
|
|
125
|
+
the work just wasn't done. No defect to promote.
|
|
126
|
+
- Operator-overridden deferrals — the operator chose to skip; no
|
|
127
|
+
mechanism analysis happened.
|
|
128
|
+
- One-off bugs in the agent's session (typo in commit message,
|
|
129
|
+
missed file) — those aren't substrate.
|
|
130
|
+
|
|
131
|
+
The trigger is specifically "mechanism was broken, mechanism got
|
|
132
|
+
fixed" — not "work was slow, work got faster."
|
|
133
|
+
|
|
134
|
+
## Infrastructure note
|
|
135
|
+
|
|
136
|
+
This is a methodology rule, not a hook. It works regardless of whether
|
|
137
|
+
enforcement comes from bash hooks, Managed Agents outcome preconditions,
|
|
138
|
+
or any other infrastructure. The hook produces the signal; this rule
|
|
139
|
+
defines the response.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: Every substrate primitive ships with its paired bootstrap discipline.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Bootstrap-Pair Discipline
|
|
7
|
+
|
|
8
|
+
Every substrate primitive ships with its paired bootstrap discipline. A primitive without its pair is half-shipped — the substrate appears to ship the feature, but adopters hit the missing half as silent breakage at runtime.
|
|
9
|
+
|
|
10
|
+
This rule names the failure class, enumerates 5 known instances, and gives the discipline a name so future PRs catch the failure at authoring time instead of at adopter-runtime time.
|
|
11
|
+
|
|
12
|
+
## When this rule fires
|
|
13
|
+
|
|
14
|
+
Any PR that adds a substrate primitive to bassclef. "Substrate primitive" means any of these surfaces:
|
|
15
|
+
|
|
16
|
+
- **Hook** — a new file under `.claude/hooks/*.sh`
|
|
17
|
+
- **Rule** — a new file under `.claude/rules/*.md`
|
|
18
|
+
- **Skill** — a new directory under `.claude/skills/<name>/SKILL.md`
|
|
19
|
+
- **Validator / accessor / library** — a new shell library under `lib/*.sh` or a new validator under `scripts/`
|
|
20
|
+
- **Schema** — a new JSON Schema under `standards/state-spine/schemas/*.schema.json`
|
|
21
|
+
- **Standard** — a new standard under `standards/*.md`
|
|
22
|
+
- **ADR** — a new file under `architecture/decisions/ADR-*.md`
|
|
23
|
+
|
|
24
|
+
The rule passes through (does not fire) on:
|
|
25
|
+
|
|
26
|
+
- Operator content (chronicles, journals, deferred-actions)
|
|
27
|
+
- Documentation edits without behavior change
|
|
28
|
+
- Bug fixes that touch existing primitives without adding new ones
|
|
29
|
+
- Test edits (covered by sister rules — `.claude/rules/testing-tier-config.md`, `test-list-discipline.md`)
|
|
30
|
+
|
|
31
|
+
## The 7 known instances
|
|
32
|
+
|
|
33
|
+
Each row names the primitive being added, the pair it owes, and the failure mode when the pair is missing.
|
|
34
|
+
|
|
35
|
+
| Building block added | Bootstrap pair owed | Failure mode when missing |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| **Hook** under `.claude/hooks/*.sh` | The hook is wired in `.claude/settings.json` OR `presence/install/bassclef-sync.template.sh` for adopters | Hook exists on disk but stays silent (dead-letter) — surfaced 5 times during the 2026-04 substrate audit |
|
|
38
|
+
| **Rule** citing a mechanical hook in `## Mechanical Enforcement` | The cited hook exists on disk AND is wired | Rule promises mechanical layer that stays silent; methodology only — surfaced 11 times in WU-5 of bet 2026-06-24c |
|
|
39
|
+
| **Skill** declaring `modes:` / `tiers:` / `sizes:` in frontmatter | The `description:` field names each declared mode inline (per `.claude/rules/skill-description-clarity.md` description-mirrors-modes) | Type-ahead operator menu shows nothing distinguishing — surfaced 3 times in WU-6 of bet 2026-06-24c |
|
|
40
|
+
| **Accessor library** named in a rule (`lib/state.sh`) | The file exists at the named path | Rule's `accessor-library-discipline.md` references a path that 404s — surfaced via #324 (closed via bet 2026-06-25a) |
|
|
41
|
+
| **Schema** under `standards/state-spine/schemas/*.schema.json` | The write-time validation hook is wired (`state-validate.sh` PreToolUse) AND the entity has a storage-shape entry in `standards/state-spine.md` | Schema ships but the spine permits writes that violate it — surfaced via #319 (partial-close via bet 2026-06-25a WU-3) |
|
|
42
|
+
| **Adopter-observable surface change** — new hook / skill / rule / agent / luminary / standard / ADR / schema / sync-template OR edit to an existing one matching `.claude/rules/cold-adopter-harness-discipline.md` § "When this rule fires" | The cold-adopter harness check class covering the new surface exists in `scripts/cold-adopter-harness-sync.sh` AND the CI job `cold-adopter-harness` in `.github/workflows/bassclef-pr-ci.yml` fires on the PR | Substrate ships a change that breaks adopter-observable surface; harness passes with stale coverage OR harness fails with no CI gate to catch it before merge — surfaced via 2026-06-25 /longrun prep audit (Gap 1 + Gap 2 + Gap 3 of 5; closed via bet 25g) |
|
|
43
|
+
| **Release pipeline path change** (added bet 2026-06-29c WU-5) — any PR that adds a new top-level directory (e.g., new `lib/`, `templates/`, `presence/`) OR moves files between substrate directories (`scripts/`, `presence/`, `lib/`, `standards/`) OR adds a new operator-template at `presence/install/` | The release script's `ALLOWED_PATHS` in `scripts/release-to-bassclef.sh` covers the new top-level directory AND any new template at `presence/install/<name>.template.sh` is handled by the release step that ships templates (e.g., `public-bassclef-settings.template.json` copy step) | Release ships everything except the new directory; adopters get partial substrate; hooks reference files that aren't on the public tree — surfaced 4 release iterations in a row on 2026-06-29 (PRs #1372/#1373/#1374/#1375): PR #318 missed `scripts/`; later PRs missed `lib/` + `templates/`; settings template needed its own release-script step. Three sister cures: (a) extending the cold-adopter harness rule-mechanism-claim scanner to recognize `<name>.template.sh` as evidence the hook ships via install template; (b) refining the operator-private-path check filename pattern so it doesn't false-positive on bassclef's own `-review` rule names (out of scope tonight; tracked as follow-on); (c) auto-applying the `bassclef-internal-prose-ok` label on release PRs so the operator-private-path check passes first time (out of scope tonight; tracked as follow-on). |
|
|
44
|
+
|
|
45
|
+
## What this rule requires
|
|
46
|
+
|
|
47
|
+
When a PR adds a substrate primitive, the PR body MUST include a `Bootstrap pair shipped` block in the Summary section naming the pair:
|
|
48
|
+
|
|
49
|
+
```markdown
|
|
50
|
+
## Bootstrap pair shipped
|
|
51
|
+
|
|
52
|
+
- Building block: `<path>` (e.g., `.claude/hooks/foo.sh`)
|
|
53
|
+
- Pair: `<wiring location>` (e.g., `.claude/settings.json` PreToolUse Edit|Write|MultiEdit) OR `<rationale for no pair>`
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
If the primitive type is not in the 5-instance table, the author names the pair in plain English ("the pair this primitive owes is X because Y"). The reviewer's job is to verify the pair actually exists in the PR — not just that the author named it.
|
|
57
|
+
|
|
58
|
+
## Anti-patterns
|
|
59
|
+
|
|
60
|
+
These shapes fail this rule.
|
|
61
|
+
|
|
62
|
+
**Ship hook without wiring** — the hook lives on disk but no settings.json registers it. The hook is dead-letter; the failure surfaces silently in adopter sessions.
|
|
63
|
+
|
|
64
|
+
INSTEAD: ship the wiring in the same PR.
|
|
65
|
+
|
|
66
|
+
**Cite an unwired hook in a rule's Mechanical Enforcement section** — the rule promises mechanical enforcement but the hook is not wired. The rule operates as methodology-only with no agent-side awareness of the gap.
|
|
67
|
+
|
|
68
|
+
INSTEAD: either wire the hook in the same PR or rephrase the rule to claim methodology-only enforcement.
|
|
69
|
+
|
|
70
|
+
**Declare skill modes in frontmatter without naming them inline in the description** — the harness type-ahead shows the skill name but no mode disambiguation; operator has to invoke and discover.
|
|
71
|
+
|
|
72
|
+
INSTEAD: include each declared mode in the description's 280-character budget.
|
|
73
|
+
|
|
74
|
+
**Name a file path in a rule that does not exist on the substrate** — adopters reading the rule follow the path and 404.
|
|
75
|
+
|
|
76
|
+
INSTEAD: verify the path resolves on bassclef-upstream before the PR opens.
|
|
77
|
+
|
|
78
|
+
**Ship a schema without wiring the write-time validator** — writes that violate the schema land in the spine and corrupt state silently.
|
|
79
|
+
|
|
80
|
+
INSTEAD: wire `state-validate.sh` in `.claude/settings.json` in the same PR as the schema.
|
|
81
|
+
|
|
82
|
+
## Override path
|
|
83
|
+
|
|
84
|
+
`SKIP_BOOTSTRAP_PAIR=1 <command>` — for genuine cases where the pair lands in a separate PR by design AND the separate PR is filed AND the current PR's body cites the follow-on. Logged via trace-helper.
|
|
85
|
+
|
|
86
|
+
INSTEAD of overriding for routine work: ship the pair in the same PR. The cost is small (one hook line, one settings.json entry, one rule citation) and the discipline compounds across every future primitive.
|
|
87
|
+
|
|
88
|
+
## Mechanical layer (V2 deferred)
|
|
89
|
+
|
|
90
|
+
V1 of this rule is methodology only. V2 deferred extension: a pre-commit hook that:
|
|
91
|
+
|
|
92
|
+
1. Detects PRs adding substrate primitives (path matchers per the "When this rule fires" section)
|
|
93
|
+
2. Greps the staged content for the pair (e.g., new hook → grep settings.json staged diff for the hook's path)
|
|
94
|
+
3. BLOCKs when the pair is absent AND the override is absent
|
|
95
|
+
|
|
96
|
+
Defer to a separate goal when the methodology layer has shipped through enough PRs that the failure modes are stable and the pre-commit logic can mechanize against them confidently.
|
|
97
|
+
|
|
98
|
+
## Composes with
|
|
99
|
+
|
|
100
|
+
- `.claude/rules/pr-body-shape.md` — the `Bootstrap pair shipped` block lives in the Summary section per this rule
|
|
101
|
+
- `.claude/rules/we-dont-break-adopters.md` — sister discipline at the adopter-observable surface; this rule extends the discipline to bassclef-internal substrate completeness
|
|
102
|
+
- `.claude/rules/blocked-items.md` — the BLOCK protocol the V2 mechanical layer would fire
|
|
103
|
+
- `.claude/rules/loop-discipline.md` — sister at the construction-cycle level; bootstrap-pair check fires in the per-PR loop discipline
|
|
104
|
+
- `.claude/rules/accessor-library-discipline.md` — the rule that surfaced one instance (#324)
|
|
105
|
+
- `.claude/rules/testing-tier-config.md` — the Tier 0 strict-TDD pattern; the bootstrap pair often IS the test that locks the primitive
|
|
106
|
+
- `architecture/audits/2026-06-24-validator-bootstrap.md` — WU-10 surfaced the 5-instance enumeration
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
globs: ["*"]
|
|
4
|
+
description: Trunk-based development — branch naming and flow
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Model: trunk-based development (solo variant). `main` is always deployable.
|
|
8
|
+
|
|
9
|
+
Branch naming:
|
|
10
|
+
- `feature/ISSUE-NNN-short-description`
|
|
11
|
+
- `fix/ISSUE-NNN-short-description`
|
|
12
|
+
- `spike/ISSUE-NNN-short-description`
|
|
13
|
+
|
|
14
|
+
Every branch ties to a GitHub Issue. No branch without an issue.
|
|
15
|
+
|
|
16
|
+
Flow: issue → branch from main → work → PR → CI passes → squash merge → delete branch
|
|
17
|
+
|
|
18
|
+
Rules:
|
|
19
|
+
- Broken main = drop everything
|
|
20
|
+
- No branches older than 5 days — break it up
|
|
21
|
+
- Force push on feature branches is fine, never on main
|
|
22
|
+
- Semantic versioning tags for releases: v0.1.0, v0.2.0
|
|
23
|
+
|
|
24
|
+
Multi-branch work (autonomous/multi-step sessions):
|
|
25
|
+
- See `standards/branch-stacking.md` for stacked atomic branches
|
|
26
|
+
- Stack manifest declares branches, dependencies, parallel-safety
|
|
27
|
+
- Naming: `feature/ISSUE-NNN-stack-N-short-description`
|
|
28
|
+
- Each branch is independently reviewable and revertable
|