@thebassclef/lite 0.0.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +85 -4
- package/dist/cli.cjs +1612 -0
- package/dist/cli.js +1589 -0
- package/dist/index.cjs +4 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/package.json +51 -3
- package/substrate/.bassclef/lite-manifest.json +2701 -0
- package/substrate/.claude/agents/architect.md +70 -0
- package/substrate/.claude/agents/builder.md +114 -0
- package/substrate/.claude/agents/designer.md +156 -0
- package/substrate/.claude/agents/reviewer.md +88 -0
- package/substrate/.claude/hooks/artifact-ingestion-gate.sh +357 -0
- package/substrate/.claude/hooks/assert-verify-steering.sh +77 -0
- package/substrate/.claude/hooks/bassclef-source-config-validate.sh +215 -0
- package/substrate/.claude/hooks/bassclef-sync.sh +634 -0
- package/substrate/.claude/hooks/compound-noun-scrub.sh +292 -0
- package/substrate/.claude/hooks/kiss-expansion-inject.sh +69 -0
- package/substrate/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
- package/substrate/.claude/hooks/longrun-prep-compounding-sequence-check.sh +492 -0
- package/substrate/.claude/hooks/plain-english-steering.sh +156 -0
- package/substrate/.claude/hooks/post-skill-friction-check.sh +177 -0
- package/substrate/.claude/hooks/post-skill-telemetry.sh +62 -0
- package/substrate/.claude/hooks/pre-build-gate.sh +511 -0
- package/substrate/.claude/hooks/pre-commit-gate.sh +451 -0
- package/substrate/.claude/hooks/session-end.sh +433 -0
- package/substrate/.claude/hooks/session-reflection.sh +303 -0
- package/substrate/.claude/hooks/skill-body-grade-gate.sh +219 -0
- package/substrate/.claude/hooks/skill-body-intent-drift.sh +107 -0
- package/substrate/.claude/hooks/skill-step-list-check.sh +171 -0
- package/substrate/.claude/hooks/state-validate.sh +271 -0
- package/substrate/.claude/hooks/substrate-clarity-gate.sh +1110 -0
- package/substrate/.claude/hooks/temperance-gate.sh +147 -0
- package/substrate/.claude/hooks/testing-tier-enforce.sh +233 -0
- package/substrate/.claude/hooks/turn-prose-grade-measure.sh +219 -0
- package/substrate/.claude/hooks/turn-prose-kiss-check.sh +463 -0
- package/substrate/.claude/hooks/vocabulary-migration-check.sh +171 -0
- package/substrate/.claude/hooks/whereami-utc-gate.sh +142 -0
- package/substrate/.claude/luminaries/alan-cooper.md +170 -0
- package/substrate/.claude/luminaries/alistair-cockburn.md +140 -0
- package/substrate/.claude/luminaries/amazon-pr-faq.md +34 -0
- package/substrate/.claude/luminaries/ash-maurya.md +121 -0
- package/substrate/.claude/luminaries/bill-buxton.md +210 -0
- package/substrate/.claude/luminaries/charles-sanders-peirce.md +150 -0
- package/substrate/.claude/luminaries/david-ogilvy.md +192 -0
- package/substrate/.claude/luminaries/don-norman.md +173 -0
- package/substrate/.claude/luminaries/edward-tufte.md +179 -0
- package/substrate/.claude/luminaries/eric-evans.md +160 -0
- package/substrate/.claude/luminaries/frederick-brooks.md +50 -0
- package/substrate/.claude/luminaries/gang-of-four.md +157 -0
- package/substrate/.claude/luminaries/glenford-myers.md +230 -0
- package/substrate/.claude/luminaries/hunt-thomas.md +115 -0
- package/substrate/.claude/luminaries/hyrum-wright.md +94 -0
- package/substrate/.claude/luminaries/jason-fried-dhh.md +46 -0
- package/substrate/.claude/luminaries/jesse-james-garrett.md +154 -0
- package/substrate/.claude/luminaries/john-ousterhout.md +94 -0
- package/substrate/.claude/luminaries/karl-popper.md +132 -0
- package/substrate/.claude/luminaries/kent-beck.md +168 -0
- package/substrate/.claude/luminaries/linus-torvalds.md +218 -0
- package/substrate/.claude/luminaries/martin-fowler.md +164 -0
- package/substrate/.claude/luminaries/michael-feathers.md +125 -0
- package/substrate/.claude/luminaries/michael-nygard.md +118 -0
- package/substrate/.claude/luminaries/robert-c-martin.md +164 -0
- package/substrate/.claude/luminaries/saltzer-schroeder.md +194 -0
- package/substrate/.claude/luminaries/sophia-prater.md +193 -0
- package/substrate/.claude/luminaries/stephen-toulmin.md +131 -0
- package/substrate/.claude/luminaries/tony-hoare.md +170 -0
- package/substrate/.claude/luminaries/vaughn-vernon.md +50 -0
- package/substrate/.claude/luminaries/w-edwards-deming.md +158 -0
- package/substrate/.claude/rules/accessor-library-discipline.md +138 -0
- package/substrate/.claude/rules/adr-discipline.md +120 -0
- package/substrate/.claude/rules/api-conventions.md +125 -0
- package/substrate/.claude/rules/artifact-ingestion.md +179 -0
- package/substrate/.claude/rules/assert-only-after-verify.md +137 -0
- package/substrate/.claude/rules/blocked-items.md +146 -0
- package/substrate/.claude/rules/bootstrap-pair-discipline.md +141 -0
- package/substrate/.claude/rules/branching.md +28 -0
- package/substrate/.claude/rules/cold-adopter-harness-discipline.md +129 -0
- package/substrate/.claude/rules/commit-conventions.md +22 -0
- package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +188 -0
- package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +188 -0
- package/substrate/.claude/rules/context-engineering.md +202 -0
- package/substrate/.claude/rules/context-management.md +85 -0
- package/substrate/.claude/rules/defensive-bash.md +68 -0
- package/substrate/.claude/rules/deferred-actions.md +233 -0
- package/substrate/.claude/rules/destructive-operations.md +69 -0
- package/substrate/.claude/rules/diagnosis.md +38 -0
- package/substrate/.claude/rules/github-issue-flash-tweet.md +156 -0
- package/substrate/.claude/rules/guardrails.md +73 -0
- package/substrate/.claude/rules/hook-wire-on-author.md +103 -0
- package/substrate/.claude/rules/identifier-leak-prevention.md +104 -0
- package/substrate/.claude/rules/iteration-bet-brief-completeness.md +54 -0
- package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +98 -0
- package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +89 -0
- package/substrate/.claude/rules/loop-discipline.md +81 -0
- package/substrate/.claude/rules/manual-prod-approval.md +100 -0
- package/substrate/.claude/rules/marker-enrichment-discipline.md +99 -0
- package/substrate/.claude/rules/mobile-ephemeral-session.md +109 -0
- package/substrate/.claude/rules/new-dependency-check.md +51 -0
- package/substrate/.claude/rules/oo-ad-entry-point.md +117 -0
- package/substrate/.claude/rules/operator-facing-prose.md +196 -0
- package/substrate/.claude/rules/option-label-discipline.md +108 -0
- package/substrate/.claude/rules/pattern-annotation.md +100 -0
- package/substrate/.claude/rules/plain-english-discipline.md +156 -0
- package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +211 -0
- package/substrate/.claude/rules/pr-body-shape.md +317 -0
- package/substrate/.claude/rules/pr-strategy.md +167 -0
- package/substrate/.claude/rules/pr-title-shape.md +161 -0
- package/substrate/.claude/rules/prototype-workflow.md +65 -0
- package/substrate/.claude/rules/reserved-skill-names.md +123 -0
- package/substrate/.claude/rules/schema-management.md +49 -0
- package/substrate/.claude/rules/sdlc-gates.md +149 -0
- package/substrate/.claude/rules/security.md +37 -0
- package/substrate/.claude/rules/session-artifacts.md +236 -0
- package/substrate/.claude/rules/skill-composition-declarations.md +124 -0
- package/substrate/.claude/rules/skill-description-clarity.md +247 -0
- package/substrate/.claude/rules/skill-procedure-step-list.md +137 -0
- package/substrate/.claude/rules/state-schema-validation.md +162 -0
- package/substrate/.claude/rules/stuck-signal-diagnostic.md +140 -0
- package/substrate/.claude/rules/substrate-config-schema.md +98 -0
- package/substrate/.claude/rules/test-list-discipline.md +175 -0
- package/substrate/.claude/rules/test-sufficiency.md +210 -0
- package/substrate/.claude/rules/testing-tier-config.md +145 -0
- package/substrate/.claude/rules/testing.md +38 -0
- package/substrate/.claude/rules/turn-estimate-grounding.md +134 -0
- package/substrate/.claude/rules/visual-hierarchy.md +437 -0
- package/substrate/.claude/rules/we-dont-break-adopters.md +126 -0
- package/substrate/.claude/rules/whereami-load-bearing.md +202 -0
- package/substrate/.claude/rules/writing-craft-discipline.md +92 -0
- package/substrate/.claude/rules/wu-sequencing-compounds.md +145 -0
- package/substrate/.claude/skills/build/SKILL.md +640 -0
- package/substrate/.claude/skills/chronicle/SKILL.md +55 -0
- package/substrate/.claude/skills/clean-artifacts/SKILL.md +249 -0
- package/substrate/.claude/skills/decompose/SKILL.md +280 -0
- package/substrate/.claude/skills/diagnose/SKILL.md +297 -0
- package/substrate/.claude/skills/feynman/SKILL.md +90 -0
- package/substrate/.claude/skills/howdoi/SKILL.md +105 -0
- package/substrate/.claude/skills/ia-model/SKILL.md +108 -0
- package/substrate/.claude/skills/interaction-design/SKILL.md +112 -0
- package/substrate/.claude/skills/interpret-input/SKILL.md +180 -0
- package/substrate/.claude/skills/journal/SKILL.md +209 -0
- package/substrate/.claude/skills/kiss/SKILL.md +449 -0
- package/substrate/.claude/skills/launch/SKILL.md +915 -0
- package/substrate/.claude/skills/lean-canvas/SKILL.md +332 -0
- package/substrate/.claude/skills/longrun/SKILL.md +463 -0
- package/substrate/.claude/skills/luminary/SKILL.md +481 -0
- package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
- package/substrate/.claude/skills/onboard-repo/SKILL.md +1624 -0
- package/substrate/.claude/skills/pattern-review/SKILL.md +99 -0
- package/substrate/.claude/skills/personas/SKILL.md +207 -0
- package/substrate/.claude/skills/promote/SKILL.md +283 -0
- package/substrate/.claude/skills/requirement/SKILL.md +98 -0
- package/substrate/.claude/skills/retro/SKILL.md +117 -0
- package/substrate/.claude/skills/riff/SKILL.md +114 -0
- package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
- package/substrate/.claude/skills/session-end/SKILL.md +309 -0
- package/substrate/.claude/skills/session-log/SKILL.md +299 -0
- package/substrate/.claude/skills/skills/SKILL.md +228 -0
- package/substrate/.claude/skills/spec/SKILL.md +105 -0
- package/substrate/.claude/skills/sprint/SKILL.md +392 -0
- package/substrate/.claude/skills/stage/SKILL.md +384 -0
- package/substrate/.claude/skills/state-a-problem/SKILL.md +185 -0
- package/substrate/.claude/skills/temperance/SKILL.md +108 -0
- package/substrate/.claude/skills/use-case/SKILL.md +417 -0
- package/substrate/.claude/skills/user-stories/SKILL.md +268 -0
- package/substrate/.claude/skills/value-prop/SKILL.md +251 -0
- package/substrate/.claude/skills/verify/SKILL.md +160 -0
- package/substrate/.claude/skills/visual-review/SKILL.md +503 -0
- package/substrate/.claude/skills/whats-the-plan/SKILL.md +202 -0
- package/substrate/.claude/skills/whereami/SKILL.md +307 -0
- package/substrate/AGENTS.md +79 -0
- package/substrate/CLAUDE-lite.md +85 -0
- package/substrate/CODE_OF_CONDUCT.md +28 -0
- package/substrate/CONTRIBUTING.md +177 -0
- package/substrate/README.md +173 -0
- package/substrate/SECURITY.md +19 -0
- package/substrate/architecture/decisions/ADR-029-release-pipeline.md +79 -0
- package/substrate/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
- package/substrate/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
- package/substrate/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
- package/substrate/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
- package/substrate/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
- package/substrate/lib/clean-artifacts-sweep.sh +112 -0
- package/substrate/lib/code-comment-discipline.sh +144 -0
- package/substrate/lib/composer-preflight.sh +459 -0
- package/substrate/lib/hook-inject.sh +255 -0
- package/substrate/lib/luminary-pick.sh +96 -0
- package/substrate/lib/output-discipline.sh +143 -0
- package/substrate/lib/prose-scan-boundary.sh +171 -0
- package/substrate/lib/rewrite-check.sh +214 -0
- package/substrate/lib/state.sh +1372 -0
- package/substrate/lib/telemetry.sh +205 -0
- package/substrate/lib/tier-check.sh +187 -0
- package/substrate/lib/tier-dependency-audit.sh +1088 -0
- package/substrate/presence/install/bassclef-hook-connect.sh +178 -0
- package/substrate/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
- package/substrate/presence/install/bassclef-sync.template.sh +2076 -0
- package/substrate/presence/install/schedule-auto-save.cron.sh +88 -0
- package/substrate/presence/install/schedule-auto-save.taskscheduler.md +122 -0
- package/substrate/scripts/aggregate-telemetry.sh +217 -0
- package/substrate/scripts/analyze-tier-dependencies.sh +239 -0
- package/substrate/scripts/generate-lite-manifest.sh +505 -0
- package/substrate/scripts/generate-tier-manifest.sh +28 -0
- package/substrate/scripts/intent-drift-check.sh +456 -0
- package/substrate/scripts/lite-manifest-drift-check.sh +146 -0
- package/substrate/scripts/render-lite-manifest-doc.sh +150 -0
- package/substrate/standards/adr-template.md +86 -0
- package/substrate/standards/api-conventions/nextjs.md +84 -0
- package/substrate/standards/artifact-composition.md +209 -0
- package/substrate/standards/bash-hook-safety.md +246 -0
- package/substrate/standards/bassclef-configs-schema.md +232 -0
- package/substrate/standards/bassclef-evolution.md +143 -0
- package/substrate/standards/bassclef-internal-jargon.md +244 -0
- package/substrate/standards/bassclef-managed-sentinel.md +96 -0
- package/substrate/standards/bassclef-source-config.md +228 -0
- package/substrate/standards/branch-stacking.md +408 -0
- package/substrate/standards/code-safety-principles.md +176 -0
- package/substrate/standards/composer-prerequisites.md +155 -0
- package/substrate/standards/deferred-actions-schema.md +204 -0
- package/substrate/standards/dependency-discipline/cargo.md +39 -0
- package/substrate/standards/dependency-discipline/gem.md +43 -0
- package/substrate/standards/dependency-discipline/go-mod.md +41 -0
- package/substrate/standards/dependency-discipline/npm.md +42 -0
- package/substrate/standards/dependency-discipline/pip.md +42 -0
- package/substrate/standards/deployment-topology/ec2-tailscale.md +225 -0
- package/substrate/standards/deployment-topology.md +69 -0
- package/substrate/standards/docs-sync-allowlist.md +76 -0
- package/substrate/standards/domain-and-dns.md +145 -0
- package/substrate/standards/frontend-stack.md +67 -0
- package/substrate/standards/frontmatter-schema.md +154 -0
- package/substrate/standards/graceful-exit.md +227 -0
- package/substrate/standards/hook-idempotency.md +102 -0
- package/substrate/standards/hook-injection-discipline.md +202 -0
- package/substrate/standards/hook-install-class.md +215 -0
- package/substrate/standards/input-handler-interface.md +152 -0
- package/substrate/standards/lite-manifest-schema-changes.md +135 -0
- package/substrate/standards/luminary-matching.md +105 -0
- package/substrate/standards/luminary-problem-patterns.md +481 -0
- package/substrate/standards/migration-discipline/active-record.md +50 -0
- package/substrate/standards/migration-discipline/alembic.md +43 -0
- package/substrate/standards/migration-discipline/gorm.md +50 -0
- package/substrate/standards/migration-discipline/prisma.md +53 -0
- package/substrate/standards/migration-discipline/sqlalchemy.md +51 -0
- package/substrate/standards/mobile-ephemeral-session.md +167 -0
- package/substrate/standards/model-routing-discipline.md +160 -0
- package/substrate/standards/ogilvy-writing-rules.md +225 -0
- package/substrate/standards/opener-discipline.md +96 -0
- package/substrate/standards/operator-facing-prose-discipline.md +201 -0
- package/substrate/standards/persona-schema.md +229 -0
- package/substrate/standards/pluggable-luminaries.md +323 -0
- package/substrate/standards/pr-body-discipline.md +115 -0
- package/substrate/standards/preview-state-schema.md +189 -0
- package/substrate/standards/project-directory-layout.md +276 -0
- package/substrate/standards/release-tagging.md +137 -0
- package/substrate/standards/reserved-skill-names.md +120 -0
- package/substrate/standards/scannable-multi-option-output.md +261 -0
- package/substrate/standards/sdlc-compliance.md +286 -0
- package/substrate/standards/sdlc-gates/typescript.md +57 -0
- package/substrate/standards/secrets-lifecycle.md +210 -0
- package/substrate/standards/security-scanner-adapter.md +145 -0
- package/substrate/standards/session-board.md +256 -0
- package/substrate/standards/skill-output-discipline.md +90 -0
- package/substrate/standards/state-spine-contract.md +255 -0
- package/substrate/standards/state-spine.md +511 -0
- package/substrate/standards/steering-hints/kiss-words.md +11 -0
- package/substrate/standards/substrate-config-schema.md +267 -0
- package/substrate/standards/tech-stack-config.md +109 -0
- package/substrate/standards/tier-dependency-analysis.md +167 -0
- package/substrate/standards/tier-runtime-deps/lite.md +57 -0
- package/substrate/standards/tier-tag-schema.md +155 -0
- package/substrate/standards/two-layer-config.md +99 -0
- package/substrate/standards/use-case-format.md +292 -0
- package/substrate/standards/user-story-invest.md +268 -0
- package/substrate/standards/velocity-and-appetite.md +229 -0
- package/substrate/standards/voice-input-pattern.md +119 -0
- package/substrate/standards/whereami-schema.md +301 -0
- package/substrate/standards/worktree-management.md +211 -0
- package/substrate/standards/writing-guide.md +213 -0
- package/substrate/templates/chronicle-template.md +75 -0
- package/substrate/templates/deferred-action-template.md +45 -0
- package/substrate/templates/memory-proposal-template.md +77 -0
- package/substrate/templates/persona-template.md +200 -0
- package/substrate/templates/pr-faq.md +45 -0
- package/substrate/templates/secret-rotation-template.md +162 -0
- package/substrate/templates/spec-template.md +131 -0
- package/substrate/templates/use-case-template.md +194 -0
- package/substrate/templates/user-story-template.md +107 -0
- package/substrate/templates/whereami-template.md +101 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
tier: lite
|
|
3
|
+
description: "Every load-bearing architectural decision MUST be recorded as an ADR (Architecture Decision Record) per Michael Nygard's lifecycle: proposed → accepted → deprecated → superseded."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ADR Discipline
|
|
7
|
+
|
|
8
|
+
Every load-bearing architectural decision MUST be recorded as an ADR (Architecture Decision Record) per Michael Nygard's lifecycle: `proposed` → `accepted` → `deprecated` → `superseded`.
|
|
9
|
+
|
|
10
|
+
ADR discipline lives at the rule layer (this file) plus the mechanical layer (`.claude/hooks/adr-discipline-check.sh` — PreToolUse hook on architectural-decision paths). Both load-bearing for adopter architecture quality.
|
|
11
|
+
|
|
12
|
+
## Why this rule exists
|
|
13
|
+
|
|
14
|
+
ADR discipline previously lived only in the Architect agent persona. Sequential-mode adopter sessions skip Architect role entirely; architectural decisions ship without records.
|
|
15
|
+
|
|
16
|
+
INSTEAD: this rule mechanizes ADR discipline at the decision boundary via PreToolUse hook. The hook fires regardless of which agent role is active.
|
|
17
|
+
|
|
18
|
+
Eugene-supplements `apps/web` made 4+ architectural decisions (Postgres over SQLite, Server Actions over Express, Prisma over Drizzle, single-app over monorepo) with zero ADRs. The cost compounds: future maintainers can't reconstruct why; future architectural decisions can't be measured against the original rationale; deprecation requires re-deriving the decision context months later.
|
|
19
|
+
|
|
20
|
+
## When this rule fires
|
|
21
|
+
|
|
22
|
+
Any session writing or editing a file matching architectural-decision shape:
|
|
23
|
+
|
|
24
|
+
- `prisma/schema.prisma` or per-ORM schema equivalent (schema-change)
|
|
25
|
+
- `docker-compose*.yml` or `docker-compose*.yaml` (deployment-topology-change)
|
|
26
|
+
- `src/middleware.ts` or per-stack middleware equivalent (middleware-change)
|
|
27
|
+
- `*/alembic/versions/*.py` / `*/db/migrate/*.rb` / `*/migrations/*.go` (schema-migration)
|
|
28
|
+
- `package.json` / `pyproject.toml` / `Gemfile` / `go.mod` / `Cargo.toml` on Write only (dependency-manifest-change)
|
|
29
|
+
|
|
30
|
+
When match fires, the hook checks for an ADR marker at `state/markers/adr/<decision-slug>-*.md`. The marker is required — generic ADRs in `docs/adrs/` or `architecture/decisions/` are not sufficient because they may be unrelated to the current decision class. When the marker is absent, the hook BLOCKs with template + writeup prompt.
|
|
31
|
+
|
|
32
|
+
## Load-bearing definition
|
|
33
|
+
|
|
34
|
+
A decision is load-bearing when:
|
|
35
|
+
|
|
36
|
+
- It establishes an invariant future decisions must respect
|
|
37
|
+
- Reversing it would require substantial migration work (>1 day operator time)
|
|
38
|
+
- Multiple parts of the codebase depend on it
|
|
39
|
+
- It crosses a bounded context boundary (per Evans DDD)
|
|
40
|
+
- It changes a cross-cutting concern (auth, logging, multi-tenancy, observability stack)
|
|
41
|
+
|
|
42
|
+
Non-load-bearing (skip ADR):
|
|
43
|
+
|
|
44
|
+
- Bug fixes within existing patterns
|
|
45
|
+
- Component-level library choices (icon library, date-picker)
|
|
46
|
+
- Cosmetic refactors (renames, file reorganizations without behavior change)
|
|
47
|
+
- Test additions
|
|
48
|
+
- Documentation edits
|
|
49
|
+
|
|
50
|
+
When in doubt, write the ADR. Ten-minute cost; high-value record.
|
|
51
|
+
|
|
52
|
+
## ADR format
|
|
53
|
+
|
|
54
|
+
Use `standards/adr-template.md`. Required sections:
|
|
55
|
+
|
|
56
|
+
- Frontmatter: id, title, status, date, supersedes, superseded_by
|
|
57
|
+
- Context — what motivated the decision
|
|
58
|
+
- Decision — the choice + rationale
|
|
59
|
+
- Status — proposed / accepted / deprecated / superseded
|
|
60
|
+
- Consequences — what becomes easier / harder / enables / blocks
|
|
61
|
+
- References — related ADRs, external sources, source incidents
|
|
62
|
+
|
|
63
|
+
## Marker convention
|
|
64
|
+
|
|
65
|
+
After writing the ADR, touch the marker:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
mkdir -p state/markers/adr
|
|
69
|
+
touch state/markers/adr/<decision-slug>-ADR-NNN.md
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
The marker is the audit trail: the hook reads it; reviewers can grep for it; chronicle Gate Evidence sections can cite it.
|
|
73
|
+
|
|
74
|
+
## Override path
|
|
75
|
+
|
|
76
|
+
`SKIP_ADR_CHECK=1 <command>` — logged via trace-helper. Use rarely:
|
|
77
|
+
|
|
78
|
+
- Trivial revert of a previously-decided architectural change (the revert is reversing the prior decision per its `superseded_by` field)
|
|
79
|
+
- Emergency rescue when the hook itself misclassifies (file substrate-defect)
|
|
80
|
+
- One-shot migration script that touches many architectural files (operator has reviewed externally)
|
|
81
|
+
- Bulk dependency-manifest regen where every dep was already declared in a prior ADR
|
|
82
|
+
|
|
83
|
+
INSTEAD of overriding for routine work: write the ADR. The ten-minute cost is one of the cheapest substrate disciplines to follow.
|
|
84
|
+
|
|
85
|
+
## Tech-stack-aware composition
|
|
86
|
+
|
|
87
|
+
ADR discipline is stack-agnostic. The same template applies across stacks. Per-stack ADR examples may ship as siblings under `standards/adr-examples/<stack>.md` over time, with the discipline itself staying the same across stacks.
|
|
88
|
+
|
|
89
|
+
## What the rule does NOT cover
|
|
90
|
+
|
|
91
|
+
- ADR review process (operator + Architect agent collaboration)
|
|
92
|
+
- ADR retirement (status change to `deprecated` or `superseded`; the file stays in place)
|
|
93
|
+
- Cross-project ADR sharing (bassclef's ADRs and adopter's ADRs stay in separate directories)
|
|
94
|
+
- ADR templates for non-software architecture (deployment-process ADRs, team-structure ADRs — out of scope for this rule)
|
|
95
|
+
|
|
96
|
+
INSTEAD: each of the above lives in a sibling rule or template if it becomes relevant.
|
|
97
|
+
|
|
98
|
+
## Composition with other rules
|
|
99
|
+
|
|
100
|
+
- `.claude/rules/testing-tier-config.md` — Tier 0 strict-TDD on hook + tests (this hook + its test file land Tier 0)
|
|
101
|
+
- `.claude/rules/blocked-items.md` — BLOCK protocol the hook fires
|
|
102
|
+
- `.claude/rules/oo-ad-entry-point.md` — `/decompose` evidence is sister discipline at Construction boundary
|
|
103
|
+
- `.claude/rules/schema-management.md` — schema-change ADR aligns with migration-discipline
|
|
104
|
+
- `standards/adr-template.md` — the template the rule references
|
|
105
|
+
|
|
106
|
+
## Refs
|
|
107
|
+
|
|
108
|
+
- bassclef#1149 — this rule's filing ticket (T17 of cold-adopter promote drop)
|
|
109
|
+
- bassclef#1134 — ARCH-T1 grandparent (adopter inheritance umbrella)
|
|
110
|
+
- bet 2026-06-20e — WU-11 ships this rule + template + hook
|
|
111
|
+
- `.claude/hooks/adr-discipline-check.sh` — the mechanical implementation
|
|
112
|
+
- `.claude/hooks/tests/adr-discipline-check.test.sh` — Tier 0 test coverage
|
|
113
|
+
- `standards/adr-template.md` — the ADR template
|
|
114
|
+
- `@luminary michael-nygard` — anchor for ADR lifecycle (Cognitect, 2011)
|
|
115
|
+
|
|
116
|
+
## Retirement condition
|
|
117
|
+
|
|
118
|
+
This rule retires only if ADRs themselves cease to be a bassclef architecture-record format. The mechanical layer (hook) may evolve to detect more decision shapes; the methodology of recording load-bearing decisions persists.
|
|
119
|
+
|
|
120
|
+
Closes adopter architecture-record gap surfaced by Eugene-supplements 2026-06.
|
|
@@ -0,0 +1,125 @@
|
|
|
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.
|
|
116
|
+
|
|
117
|
+
## Refs
|
|
118
|
+
|
|
119
|
+
- ARCH-T0 #1133 — operator-stack-leakage audit + remediation (parent)
|
|
120
|
+
- ARCH-T1 #1134 — Bassclef-as-Platform full adopter inheritance (grandparent)
|
|
121
|
+
- bassclef#1309 — this sub-ticket (api-conventions Path A)
|
|
122
|
+
- bassclef#1150 T18 — sister Path A (migration-discipline)
|
|
123
|
+
- `.claude/rules/schema-management.md` — precedent rule for Path A additive shape
|
|
124
|
+
- `.claude/rules/new-dependency-check.md` — sister precedent
|
|
125
|
+
- `standards/api-conventions/nextjs.md` — Next.js App Router sibling
|
|
@@ -0,0 +1,179 @@
|
|
|
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
|
+
## Sources read
|
|
38
|
+
|
|
39
|
+
- [path or reference]:[line range if applicable] — [what I took from it]
|
|
40
|
+
- …
|
|
41
|
+
|
|
42
|
+
## What I'm NOT reading (with reason)
|
|
43
|
+
|
|
44
|
+
- [path] — [deliberate exclusion reason, e.g. out of scope, stale]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
If no artifacts were read: state "No prior artifacts; producing from
|
|
48
|
+
scratch because [reason]." Silence is not exemption.
|
|
49
|
+
|
|
50
|
+
## Anti-patterns that fire this rule
|
|
51
|
+
|
|
52
|
+
Direct quotes from recent failures:
|
|
53
|
+
|
|
54
|
+
- "I pattern-matched on generic card UI" — built prototype without
|
|
55
|
+
reading existing Norman/Prater variant files (2026-04-13)
|
|
56
|
+
- "I didn't study the existing variants before building" — same
|
|
57
|
+
incident
|
|
58
|
+
- Producing a canvas recommending vendor X without reading memory
|
|
59
|
+
that flagged vendor Y for evaluation (2026-04-13)
|
|
60
|
+
- Proposing iteration scope covering 1 of 4 workstreams without
|
|
61
|
+
enumerating the ones being dropped (2026-04-12)
|
|
62
|
+
- Skipping BLOCKED hook output in favor of answering the user's
|
|
63
|
+
direct question (2026-04-12; third instance in six weeks)
|
|
64
|
+
|
|
65
|
+
Shape across all four: **training priors substituted for explicit
|
|
66
|
+
artifacts the operator had already staged.**
|
|
67
|
+
|
|
68
|
+
## Verification cue for the agent (self-check before output)
|
|
69
|
+
|
|
70
|
+
Before producing the output, ask:
|
|
71
|
+
|
|
72
|
+
1. Did I Read every file path referenced in the prompt or parent
|
|
73
|
+
artifact?
|
|
74
|
+
2. Did I enumerate every workstream / variant / section of the parent
|
|
75
|
+
artifact, including the ones I'm deferring?
|
|
76
|
+
3. Did I check memory for prior evaluations, flagged alternatives, or
|
|
77
|
+
deferred decisions relevant to this output?
|
|
78
|
+
4. Did I consult the active luminary files for guidance (where the
|
|
79
|
+
skill or agent definition lists luminaries)?
|
|
80
|
+
|
|
81
|
+
If any answer is "no," stop. Read first. Then produce.
|
|
82
|
+
|
|
83
|
+
## Session-start branch — read recent strategic artifacts before substantive work
|
|
84
|
+
|
|
85
|
+
Before any branch creation OR substantive PR work in a session, the
|
|
86
|
+
agent MUST Read every strategic artifact (canvas / spec / iteration-bet
|
|
87
|
+
/ ADR / decomposition / roadmap) authored OR substantively modified
|
|
88
|
+
within the last 7 days.
|
|
89
|
+
|
|
90
|
+
**Why this branch exists.** The production-time gate (PreToolUse on
|
|
91
|
+
Write/Edit per `artifact-ingestion-gate.sh`) catches artifact-ingestion
|
|
92
|
+
failures at WRITE time. It does NOT catch the case where an agent runs
|
|
93
|
+
`/sprint`, sees a recently-merged commit in `git log`, treats it as
|
|
94
|
+
background context, and proceeds with substantive work for hours
|
|
95
|
+
before reading the artifact itself. That failure mode was demonstrated
|
|
96
|
+
2026-04-26: 5h triage session opened against canvas-v3 commit listed
|
|
97
|
+
in `/sprint` output without anyone reading the canvas; the canvas
|
|
98
|
+
explicitly named the triage fixes as transition methodology being
|
|
99
|
+
superseded by spine v0. Operator caught it; the cost was 4 PRs of
|
|
100
|
+
short-lifetime work.
|
|
101
|
+
|
|
102
|
+
**Mechanism.** `.claude/hooks/session-reflection.d/70-recent-strategic-artifacts.sh`
|
|
103
|
+
fires at SessionStart, runs `git log --since=7-days --diff-filter=AM`
|
|
104
|
+
restricted to the strategic-artifact path matcher, emits a `🛑 BLOCKED`
|
|
105
|
+
block listing each path + commit date when results are non-empty.
|
|
106
|
+
Window is configurable via `RECENT_STRATEGIC_DAYS` env (default 7);
|
|
107
|
+
0 disables for that session.
|
|
108
|
+
|
|
109
|
+
**Resolution per `.claude/rules/blocked-items.md`.** The agent MUST
|
|
110
|
+
either Read each listed artifact this session OR explicitly defer
|
|
111
|
+
("skip recent-artifacts this session"). Silence is not deferral. The
|
|
112
|
+
default is Read. The marker pattern from sibling production gates is
|
|
113
|
+
NOT used here because session-reflection.d/* fragments only fire once
|
|
114
|
+
per SessionStart by design — re-fire suppression is unnecessary.
|
|
115
|
+
|
|
116
|
+
**Override.** `SKIP_RECENT_ARTIFACTS=1 <command>` (logged to trace) or
|
|
117
|
+
operator-explicit deferral statement.
|
|
118
|
+
|
|
119
|
+
**Strategic-artifact path matcher** (mirrors production-gate matcher
|
|
120
|
+
minus prototypes which have their own approval workflow):
|
|
121
|
+
|
|
122
|
+
- `strategy/canvases/*.md`
|
|
123
|
+
- `docs/specs/*.md`
|
|
124
|
+
- `docs/iteration-bets/*.md`
|
|
125
|
+
- `architecture/decisions/ADR-*.md`
|
|
126
|
+
- `docs/decompositions/*.md`
|
|
127
|
+
- `docs/roadmaps/*.md`
|
|
128
|
+
|
|
129
|
+
Prototypes are deliberately excluded — `prototype-workflow.md` and
|
|
130
|
+
`prototype-production-coupling.md` cover that surface separately.
|
|
131
|
+
|
|
132
|
+
## Why this rule exists
|
|
133
|
+
|
|
134
|
+
Operator was QA-ing agent laziness four times in six hours on
|
|
135
|
+
2026-04-12/13 across two agents. Substrate credibility depends on
|
|
136
|
+
agents doing the homework before producing the output. Without this
|
|
137
|
+
rule, every generated artifact requires operator spot-check against
|
|
138
|
+
sources — which defeats the automation thesis.
|
|
139
|
+
|
|
140
|
+
This rule is enforced by `.claude/hooks/artifact-ingestion-gate.sh`
|
|
141
|
+
(bassclef, 2026-04-13). The hook fires on PreToolUse for Write/Edit
|
|
142
|
+
to matcher paths (canvas, spec, ADR, iteration-bet, prototype html,
|
|
143
|
+
decomposition) and blocks when no "## Sources read" block exists.
|
|
144
|
+
|
|
145
|
+
The rule stands regardless of hook availability — it belongs in every
|
|
146
|
+
session's loaded context, not in an optional gate. The hook is the
|
|
147
|
+
mechanical backstop; the rule is the reasoning.
|
|
148
|
+
|
|
149
|
+
## Consumer-repo installation
|
|
150
|
+
|
|
151
|
+
Bassclef-sync symlinks the hook file into consumer repos automatically.
|
|
152
|
+
To wire it as a gate, add to the consumer repo's `.claude/settings.json`
|
|
153
|
+
under `hooks.PreToolUse`:
|
|
154
|
+
|
|
155
|
+
```json
|
|
156
|
+
{
|
|
157
|
+
"matcher": "Edit|Write",
|
|
158
|
+
"hooks": [
|
|
159
|
+
{ "type": "command", "command": "$CLAUDE_PROJECT_DIR/.claude/hooks/artifact-ingestion-gate.sh" }
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
(If `Edit|Write` matcher already exists with other hooks, append this
|
|
165
|
+
command to its `hooks` array — don't duplicate the matcher entry.)
|
|
166
|
+
|
|
167
|
+
Override: `SKIP_ARTIFACT_INGESTION=1 <tool-call>` (logged to trace).
|
|
168
|
+
|
|
169
|
+
## Relationship to other rules
|
|
170
|
+
|
|
171
|
+
- `blocked-items.md` — same anti-skim shape; blocked items are a
|
|
172
|
+
specific case of artifact-ingestion failure (skipping hook-surfaced
|
|
173
|
+
artifacts)
|
|
174
|
+
- `oo-ad-entry-point.md` — analogous pattern for /decompose
|
|
175
|
+
(evidence required before Construction)
|
|
176
|
+
- `sdlc-gates.md` — pre-build gates; artifact ingestion is the gate
|
|
177
|
+
*before* temperance and diagnosis
|
|
178
|
+
- `substrate-config-schema.md` — reading `substrate.config.md` is
|
|
179
|
+
itself an artifact-ingestion obligation
|
|
@@ -0,0 +1,137 @@
|
|
|
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
|
+
## Why this rule exists
|
|
92
|
+
|
|
93
|
+
Tonight's session surfaced R8 (assertion without verification) five times in ~5 hours (chronicle `2026-07-01c-r8-cascade-audit-retraction-and-cure-prep.md` names catches 16-20). My audit of `/longrun` was itself R8. I filed 5 tickets on unvalidated claims. I inflated turn estimates 3-4x above WU-2 grounding evidence. I attributed a false root cause during `/diagnose`. Operator caught each instance.
|
|
94
|
+
|
|
95
|
+
`#559` named the R8 class in June. `#564` shipped one narrow surface cure (compounding-axis columns) but does not steer reasoning at the origin. Anthropic's UserPromptSubmit hook surface enables reasoning-boundary steering — the plain-English steering (per bassclef#790) proves the mechanism works. Every prompt this session carried the grade-10 reminder; my prose landed at grade 10 without conscious effort. Same physics applies to assertion discipline.
|
|
96
|
+
|
|
97
|
+
The paired hook injects Toulmin's argument shape (labeled in bassclef as My claim + Evidence + Why the evidence supports the claim; Toulmin's original terms are claim + data + warrant per `.claude/luminaries/stephen-toulmin.md`) into every prompt. This rule is the methodology; the hook is the mechanism per ADR-035.
|
|
98
|
+
|
|
99
|
+
## Composes with
|
|
100
|
+
|
|
101
|
+
- `.claude/hooks/assert-verify-steering.sh` — the paired UserPromptSubmit hook this rule commits to
|
|
102
|
+
- `.claude/rules/context-engineering.md` — foundational rule; this rule extends context engineering with argument shape
|
|
103
|
+
- `.claude/rules/plain-english-discipline.md` — sister rule at prose surface; both fire per prompt
|
|
104
|
+
- `.claude/rules/artifact-ingestion.md` — "read before produce" is the data-source discipline this rule extends to assertions
|
|
105
|
+
- `.claude/rules/blocked-items.md` — assertions calling something BLOCKED must cite the block-source
|
|
106
|
+
- `.claude/rules/stuck-signal-diagnostic.md` — assertion of "stuck" requires 3-session data
|
|
107
|
+
- `.claude/luminaries/stephen-toulmin.md` — primary anchor (bet 2026-07-01b WU-2)
|
|
108
|
+
- `.claude/luminaries/karl-popper.md` — supporting anchor (bet 2026-07-01b WU-2)
|
|
109
|
+
- `.claude/luminaries/charles-sanders-peirce.md` — supporting anchor (bet 2026-07-01b WU-2)
|
|
110
|
+
- 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
|
|
111
|
+
- `.claude/skills/longrun/SKILL.md` prep — the surface where the scope-enumeration extension fires (Step 1 pre-flight through Step 1.7)
|
|
112
|
+
- `.claude/skills/sprint/SKILL.md` — sister surface (next-work proposals)
|
|
113
|
+
- ADR-035 substrate-as-system — the tenet this rule operationalizes at reasoning boundary
|
|
114
|
+
|
|
115
|
+
## Override
|
|
116
|
+
|
|
117
|
+
`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.
|
|
118
|
+
|
|
119
|
+
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.
|
|
120
|
+
|
|
121
|
+
## Refs
|
|
122
|
+
|
|
123
|
+
- bassclef-upstream#559 — R8 mechanization umbrella (this rule closes at class level)
|
|
124
|
+
- bassclef-upstream#582 — parent ticket for this rule + hook
|
|
125
|
+
- bassclef-upstream#564 — narrow-surface precedent (compounding-axis columns)
|
|
126
|
+
- ADR-035 substrate-as-system tenet — rule + mechanism paired
|
|
127
|
+
- `chronicle/2026-07-01c-r8-cascade-audit-retraction-and-cure-prep.md` — 5+ R8 catches this session; audit retraction pattern named
|
|
128
|
+
- `chronicle/2026-06-30d-post-session-end-appendix.md` — 5 prior R8 catches
|
|
129
|
+
- `chronicle/2026-07-26d-cures-2-3-5-shipped.md` — surfaced the scope-enumeration miss (#884 already-done recommended as 20-40 turn work); motivates the extension shipped in bet 2026-07-26g
|
|
130
|
+
- bassclef-upstream#916 — this rule's scope-enumeration extension ticket
|
|
131
|
+
- Toulmin — *The Uses of Argument* (Cambridge, 1958)
|
|
132
|
+
- Popper — *The Logic of Scientific Discovery* (Hutchinson, 1959)
|
|
133
|
+
- Peirce — "Deduction, Induction, and Hypothesis" (*Popular Science Monthly*, 1878)
|
|
134
|
+
|
|
135
|
+
## Retirement condition
|
|
136
|
+
|
|
137
|
+
This rule retires only if R8 (assertion without verification) stops reproducing across sessions. The mechanical layer (UserPromptSubmit hook) may evolve — additional detection heuristics, PR-body scan extensions, retroactive audit sweeps — but the discipline of My claim + Evidence + Why the evidence supports the claim (Toulmin's shape) at reasoning origin persists.
|