@thebassclef/lite 0.1.3 → 1.0.1
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 +431 -135
- package/dist/cli.js +433 -137
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lite/.bassclef-source.json +10 -0
- package/{substrate → dist/lite}/.claude/hooks/artifact-ingestion-gate.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/assert-verify-steering.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/bassclef-source-config-validate.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/bassclef-sync.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/compound-noun-scrub.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/kiss-expansion-inject.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/longrun-prep-compounding-sequence-check.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/plain-english-steering.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/post-skill-friction-check.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/post-skill-telemetry.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/pre-build-gate.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/pre-commit-gate.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/session-end.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/session-reflection.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/skill-body-grade-gate.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/skill-body-intent-drift.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/state-validate.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/substrate-clarity-gate.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/temperance-gate.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/testing-tier-enforce.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/turn-prose-grade-measure.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/turn-prose-kiss-check.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/vocabulary-migration-check.sh +0 -0
- package/{substrate → dist/lite}/.claude/hooks/whereami-utc-gate.sh +0 -0
- package/dist/lite/.claude/settings.json +212 -0
- package/dist/lite/CLAUDE.md +41 -0
- package/dist/lite/gitignore +58 -0
- package/dist/lite/standards/bassclef-wiring-manifest.json +497 -0
- package/dist/lite/whereami.md +24 -0
- package/package.json +8 -2
- package/substrate/.bassclef/lite-manifest.json +0 -2701
- package/substrate/.claude/agents/architect.md +0 -70
- package/substrate/.claude/agents/builder.md +0 -114
- package/substrate/.claude/agents/designer.md +0 -156
- package/substrate/.claude/agents/reviewer.md +0 -88
- package/substrate/.claude/hooks/longrun-prep-compounding-axis-check.sh +0 -492
- package/substrate/.claude/hooks/skill-step-list-check.sh +0 -171
- package/substrate/.claude/luminaries/alan-cooper.md +0 -170
- package/substrate/.claude/luminaries/alistair-cockburn.md +0 -140
- package/substrate/.claude/luminaries/amazon-pr-faq.md +0 -34
- package/substrate/.claude/luminaries/ash-maurya.md +0 -121
- package/substrate/.claude/luminaries/bill-buxton.md +0 -210
- package/substrate/.claude/luminaries/charles-sanders-peirce.md +0 -150
- package/substrate/.claude/luminaries/david-ogilvy.md +0 -192
- package/substrate/.claude/luminaries/don-norman.md +0 -173
- package/substrate/.claude/luminaries/edward-tufte.md +0 -179
- package/substrate/.claude/luminaries/eric-evans.md +0 -160
- package/substrate/.claude/luminaries/frederick-brooks.md +0 -50
- package/substrate/.claude/luminaries/gang-of-four.md +0 -157
- package/substrate/.claude/luminaries/glenford-myers.md +0 -230
- package/substrate/.claude/luminaries/hunt-thomas.md +0 -115
- package/substrate/.claude/luminaries/hyrum-wright.md +0 -94
- package/substrate/.claude/luminaries/jason-fried-dhh.md +0 -46
- package/substrate/.claude/luminaries/jesse-james-garrett.md +0 -154
- package/substrate/.claude/luminaries/john-ousterhout.md +0 -94
- package/substrate/.claude/luminaries/karl-popper.md +0 -132
- package/substrate/.claude/luminaries/kent-beck.md +0 -168
- package/substrate/.claude/luminaries/linus-torvalds.md +0 -218
- package/substrate/.claude/luminaries/martin-fowler.md +0 -164
- package/substrate/.claude/luminaries/michael-feathers.md +0 -125
- package/substrate/.claude/luminaries/michael-nygard.md +0 -118
- package/substrate/.claude/luminaries/robert-c-martin.md +0 -164
- package/substrate/.claude/luminaries/saltzer-schroeder.md +0 -194
- package/substrate/.claude/luminaries/sophia-prater.md +0 -193
- package/substrate/.claude/luminaries/stephen-toulmin.md +0 -131
- package/substrate/.claude/luminaries/tony-hoare.md +0 -170
- package/substrate/.claude/luminaries/vaughn-vernon.md +0 -50
- package/substrate/.claude/luminaries/w-edwards-deming.md +0 -158
- package/substrate/.claude/rules/accessor-library-discipline.md +0 -138
- package/substrate/.claude/rules/adr-discipline.md +0 -120
- package/substrate/.claude/rules/api-conventions.md +0 -125
- package/substrate/.claude/rules/artifact-ingestion.md +0 -179
- package/substrate/.claude/rules/assert-only-after-verify.md +0 -137
- package/substrate/.claude/rules/blocked-items.md +0 -146
- package/substrate/.claude/rules/bootstrap-pair-discipline.md +0 -141
- package/substrate/.claude/rules/branching.md +0 -28
- package/substrate/.claude/rules/cold-adopter-harness-discipline.md +0 -129
- package/substrate/.claude/rules/commit-conventions.md +0 -22
- package/substrate/.claude/rules/compounding-axis-fresh-analysis.md +0 -188
- package/substrate/.claude/rules/compounding-sequence-fresh-analysis.md +0 -188
- package/substrate/.claude/rules/context-engineering.md +0 -202
- package/substrate/.claude/rules/context-management.md +0 -85
- package/substrate/.claude/rules/defensive-bash.md +0 -68
- package/substrate/.claude/rules/deferred-actions.md +0 -233
- package/substrate/.claude/rules/destructive-operations.md +0 -69
- package/substrate/.claude/rules/diagnosis.md +0 -38
- package/substrate/.claude/rules/github-issue-flash-tweet.md +0 -156
- package/substrate/.claude/rules/guardrails.md +0 -73
- package/substrate/.claude/rules/hook-wire-on-author.md +0 -103
- package/substrate/.claude/rules/identifier-leak-prevention.md +0 -104
- package/substrate/.claude/rules/iteration-bet-brief-completeness.md +0 -54
- package/substrate/.claude/rules/lite-manifest-schema-change-discipline.md +0 -98
- package/substrate/.claude/rules/longrun-prep-plan-doc-compression.md +0 -89
- package/substrate/.claude/rules/loop-discipline.md +0 -81
- package/substrate/.claude/rules/manual-prod-approval.md +0 -100
- package/substrate/.claude/rules/marker-enrichment-discipline.md +0 -99
- package/substrate/.claude/rules/mobile-ephemeral-session.md +0 -109
- package/substrate/.claude/rules/new-dependency-check.md +0 -51
- package/substrate/.claude/rules/oo-ad-entry-point.md +0 -117
- package/substrate/.claude/rules/operator-facing-prose.md +0 -196
- package/substrate/.claude/rules/option-label-discipline.md +0 -108
- package/substrate/.claude/rules/pattern-annotation.md +0 -100
- package/substrate/.claude/rules/plain-english-discipline.md +0 -156
- package/substrate/.claude/rules/plan-enumeration-needs-value-props.md +0 -211
- package/substrate/.claude/rules/pr-body-shape.md +0 -317
- package/substrate/.claude/rules/pr-strategy.md +0 -167
- package/substrate/.claude/rules/pr-title-shape.md +0 -161
- package/substrate/.claude/rules/prototype-workflow.md +0 -65
- package/substrate/.claude/rules/reserved-skill-names.md +0 -123
- package/substrate/.claude/rules/schema-management.md +0 -49
- package/substrate/.claude/rules/sdlc-gates.md +0 -149
- package/substrate/.claude/rules/security.md +0 -37
- package/substrate/.claude/rules/session-artifacts.md +0 -236
- package/substrate/.claude/rules/skill-composition-declarations.md +0 -124
- package/substrate/.claude/rules/skill-description-clarity.md +0 -247
- package/substrate/.claude/rules/skill-procedure-step-list.md +0 -137
- package/substrate/.claude/rules/state-schema-validation.md +0 -162
- package/substrate/.claude/rules/stuck-signal-diagnostic.md +0 -140
- package/substrate/.claude/rules/substrate-config-schema.md +0 -98
- package/substrate/.claude/rules/test-list-discipline.md +0 -175
- package/substrate/.claude/rules/test-sufficiency.md +0 -210
- package/substrate/.claude/rules/testing-tier-config.md +0 -145
- package/substrate/.claude/rules/testing.md +0 -38
- package/substrate/.claude/rules/turn-estimate-grounding.md +0 -134
- package/substrate/.claude/rules/visual-hierarchy.md +0 -437
- package/substrate/.claude/rules/we-dont-break-adopters.md +0 -126
- package/substrate/.claude/rules/whereami-load-bearing.md +0 -202
- package/substrate/.claude/rules/writing-craft-discipline.md +0 -92
- package/substrate/.claude/rules/wu-sequencing-compounds.md +0 -145
- package/substrate/.claude/skills/build/SKILL.md +0 -640
- package/substrate/.claude/skills/chronicle/SKILL.md +0 -55
- package/substrate/.claude/skills/clean-artifacts/SKILL.md +0 -249
- package/substrate/.claude/skills/decompose/SKILL.md +0 -280
- package/substrate/.claude/skills/diagnose/SKILL.md +0 -297
- package/substrate/.claude/skills/feynman/SKILL.md +0 -90
- package/substrate/.claude/skills/howdoi/SKILL.md +0 -105
- package/substrate/.claude/skills/ia-model/SKILL.md +0 -108
- package/substrate/.claude/skills/interaction-design/SKILL.md +0 -112
- package/substrate/.claude/skills/interpret-input/SKILL.md +0 -180
- package/substrate/.claude/skills/journal/SKILL.md +0 -209
- package/substrate/.claude/skills/kiss/SKILL.md +0 -449
- package/substrate/.claude/skills/launch/SKILL.md +0 -915
- package/substrate/.claude/skills/lean-canvas/SKILL.md +0 -332
- package/substrate/.claude/skills/longrun/SKILL.md +0 -463
- package/substrate/.claude/skills/luminary/SKILL.md +0 -481
- package/substrate/.claude/skills/ogilvy-writing-audit/SKILL.md +0 -177
- package/substrate/.claude/skills/onboard-repo/SKILL.md +0 -1624
- package/substrate/.claude/skills/pattern-review/SKILL.md +0 -99
- package/substrate/.claude/skills/personas/SKILL.md +0 -207
- package/substrate/.claude/skills/promote/SKILL.md +0 -283
- package/substrate/.claude/skills/requirement/SKILL.md +0 -98
- package/substrate/.claude/skills/retro/SKILL.md +0 -117
- package/substrate/.claude/skills/riff/SKILL.md +0 -114
- package/substrate/.claude/skills/roadmap-reconcile/SKILL.md +0 -163
- package/substrate/.claude/skills/session-end/SKILL.md +0 -309
- package/substrate/.claude/skills/session-log/SKILL.md +0 -299
- package/substrate/.claude/skills/skills/SKILL.md +0 -228
- package/substrate/.claude/skills/spec/SKILL.md +0 -105
- package/substrate/.claude/skills/sprint/SKILL.md +0 -392
- package/substrate/.claude/skills/stage/SKILL.md +0 -384
- package/substrate/.claude/skills/state-a-problem/SKILL.md +0 -185
- package/substrate/.claude/skills/temperance/SKILL.md +0 -108
- package/substrate/.claude/skills/use-case/SKILL.md +0 -417
- package/substrate/.claude/skills/user-stories/SKILL.md +0 -268
- package/substrate/.claude/skills/value-prop/SKILL.md +0 -251
- package/substrate/.claude/skills/verify/SKILL.md +0 -160
- package/substrate/.claude/skills/visual-review/SKILL.md +0 -503
- package/substrate/.claude/skills/whats-the-plan/SKILL.md +0 -202
- package/substrate/.claude/skills/whereami/SKILL.md +0 -307
- package/substrate/AGENTS.md +0 -79
- package/substrate/CLAUDE-lite.md +0 -85
- package/substrate/CODE_OF_CONDUCT.md +0 -28
- package/substrate/CONTRIBUTING.md +0 -177
- package/substrate/README.md +0 -173
- package/substrate/SECURITY.md +0 -19
- package/substrate/architecture/decisions/ADR-029-release-pipeline.md +0 -79
- package/substrate/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +0 -139
- package/substrate/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +0 -192
- package/substrate/architecture/decisions/ADR-039-release-tagging-scheme.md +0 -145
- package/substrate/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +0 -155
- package/substrate/architecture/decisions/ADR-044-unified-skill-body-template.md +0 -162
- package/substrate/lib/clean-artifacts-sweep.sh +0 -112
- package/substrate/lib/code-comment-discipline.sh +0 -144
- package/substrate/lib/composer-preflight.sh +0 -459
- package/substrate/lib/hook-inject.sh +0 -255
- package/substrate/lib/luminary-pick.sh +0 -96
- package/substrate/lib/output-discipline.sh +0 -143
- package/substrate/lib/prose-scan-boundary.sh +0 -171
- package/substrate/lib/rewrite-check.sh +0 -214
- package/substrate/lib/state.sh +0 -1372
- package/substrate/lib/telemetry.sh +0 -205
- package/substrate/lib/tier-check.sh +0 -187
- package/substrate/lib/tier-dependency-audit.sh +0 -1088
- package/substrate/presence/install/bassclef-hook-connect.sh +0 -178
- package/substrate/presence/install/bassclef-sync.dispatcher.template.sh +0 -841
- package/substrate/presence/install/bassclef-sync.template.sh +0 -2076
- package/substrate/presence/install/schedule-auto-save.cron.sh +0 -88
- package/substrate/presence/install/schedule-auto-save.taskscheduler.md +0 -122
- package/substrate/scripts/aggregate-telemetry.sh +0 -217
- package/substrate/scripts/analyze-tier-dependencies.sh +0 -239
- package/substrate/scripts/generate-lite-manifest.sh +0 -505
- package/substrate/scripts/generate-tier-manifest.sh +0 -28
- package/substrate/scripts/intent-drift-check.sh +0 -456
- package/substrate/scripts/lite-manifest-drift-check.sh +0 -146
- package/substrate/scripts/render-lite-manifest-doc.sh +0 -150
- package/substrate/standards/adr-template.md +0 -86
- package/substrate/standards/api-conventions/nextjs.md +0 -84
- package/substrate/standards/artifact-composition.md +0 -209
- package/substrate/standards/bash-hook-safety.md +0 -246
- package/substrate/standards/bassclef-configs-schema.md +0 -232
- package/substrate/standards/bassclef-evolution.md +0 -143
- package/substrate/standards/bassclef-internal-jargon.md +0 -244
- package/substrate/standards/bassclef-managed-sentinel.md +0 -96
- package/substrate/standards/bassclef-source-config.md +0 -228
- package/substrate/standards/branch-stacking.md +0 -408
- package/substrate/standards/code-safety-principles.md +0 -176
- package/substrate/standards/composer-prerequisites.md +0 -155
- package/substrate/standards/deferred-actions-schema.md +0 -204
- package/substrate/standards/dependency-discipline/cargo.md +0 -39
- package/substrate/standards/dependency-discipline/gem.md +0 -43
- package/substrate/standards/dependency-discipline/go-mod.md +0 -41
- package/substrate/standards/dependency-discipline/npm.md +0 -42
- package/substrate/standards/dependency-discipline/pip.md +0 -42
- package/substrate/standards/deployment-topology/ec2-tailscale.md +0 -225
- package/substrate/standards/deployment-topology.md +0 -69
- package/substrate/standards/docs-sync-allowlist.md +0 -76
- package/substrate/standards/domain-and-dns.md +0 -145
- package/substrate/standards/frontend-stack.md +0 -67
- package/substrate/standards/frontmatter-schema.md +0 -154
- package/substrate/standards/graceful-exit.md +0 -227
- package/substrate/standards/hook-idempotency.md +0 -102
- package/substrate/standards/hook-injection-discipline.md +0 -202
- package/substrate/standards/hook-install-class.md +0 -215
- package/substrate/standards/input-handler-interface.md +0 -152
- package/substrate/standards/lite-manifest-schema-changes.md +0 -135
- package/substrate/standards/luminary-matching.md +0 -105
- package/substrate/standards/luminary-problem-patterns.md +0 -481
- package/substrate/standards/migration-discipline/active-record.md +0 -50
- package/substrate/standards/migration-discipline/alembic.md +0 -43
- package/substrate/standards/migration-discipline/gorm.md +0 -50
- package/substrate/standards/migration-discipline/prisma.md +0 -53
- package/substrate/standards/migration-discipline/sqlalchemy.md +0 -51
- package/substrate/standards/mobile-ephemeral-session.md +0 -167
- package/substrate/standards/model-routing-discipline.md +0 -160
- package/substrate/standards/ogilvy-writing-rules.md +0 -225
- package/substrate/standards/opener-discipline.md +0 -96
- package/substrate/standards/operator-facing-prose-discipline.md +0 -201
- package/substrate/standards/persona-schema.md +0 -229
- package/substrate/standards/pluggable-luminaries.md +0 -323
- package/substrate/standards/pr-body-discipline.md +0 -115
- package/substrate/standards/preview-state-schema.md +0 -189
- package/substrate/standards/project-directory-layout.md +0 -276
- package/substrate/standards/release-tagging.md +0 -137
- package/substrate/standards/reserved-skill-names.md +0 -120
- package/substrate/standards/scannable-multi-option-output.md +0 -261
- package/substrate/standards/sdlc-compliance.md +0 -286
- package/substrate/standards/sdlc-gates/typescript.md +0 -57
- package/substrate/standards/secrets-lifecycle.md +0 -210
- package/substrate/standards/security-scanner-adapter.md +0 -145
- package/substrate/standards/session-board.md +0 -256
- package/substrate/standards/skill-output-discipline.md +0 -90
- package/substrate/standards/state-spine-contract.md +0 -255
- package/substrate/standards/state-spine.md +0 -511
- package/substrate/standards/steering-hints/kiss-words.md +0 -11
- package/substrate/standards/substrate-config-schema.md +0 -267
- package/substrate/standards/tech-stack-config.md +0 -109
- package/substrate/standards/tier-dependency-analysis.md +0 -167
- package/substrate/standards/tier-runtime-deps/lite.md +0 -57
- package/substrate/standards/tier-tag-schema.md +0 -155
- package/substrate/standards/two-layer-config.md +0 -99
- package/substrate/standards/use-case-format.md +0 -292
- package/substrate/standards/user-story-invest.md +0 -268
- package/substrate/standards/velocity-and-appetite.md +0 -229
- package/substrate/standards/voice-input-pattern.md +0 -119
- package/substrate/standards/whereami-schema.md +0 -301
- package/substrate/standards/worktree-management.md +0 -211
- package/substrate/standards/writing-guide.md +0 -213
- package/substrate/templates/chronicle-template.md +0 -75
- package/substrate/templates/deferred-action-template.md +0 -45
- package/substrate/templates/memory-proposal-template.md +0 -77
- package/substrate/templates/persona-template.md +0 -200
- package/substrate/templates/pr-faq.md +0 -45
- package/substrate/templates/secret-rotation-template.md +0 -162
- package/substrate/templates/spec-template.md +0 -131
- package/substrate/templates/use-case-template.md +0 -194
- package/substrate/templates/user-story-template.md +0 -107
- package/substrate/templates/whereami-template.md +0 -101
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
description: Composer skills (/preview-build, /build, /shape full, future multi-skill chains) require certain prerequisites to dispatch safely.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Composer Prerequisites
|
|
7
|
-
|
|
8
|
-
Composer skills (`/preview-build`, `/build`, `/shape full`, future
|
|
9
|
-
multi-skill chains) require certain prerequisites to dispatch safely.
|
|
10
|
-
This standard documents the **6 bassclef pre-flight checks**, the
|
|
11
|
-
**auto-prep policy**, and the **signal-and-offer pattern** for
|
|
12
|
-
operator-decisions.
|
|
13
|
-
|
|
14
|
-
Implementation: `lib/composer-preflight.sh`. Per bassclef#408 (scaffold) + bassclef#449/#450 (deploy-host check).
|
|
15
|
-
|
|
16
|
-
## Why this exists
|
|
17
|
-
|
|
18
|
-
Before this standard: composer skills dispatched optimistically and
|
|
19
|
-
failed LATE inside their procedure when prerequisites weren't met.
|
|
20
|
-
Operator typed the dispatch, watched 5+ sequential errors surface,
|
|
21
|
-
manually prepped each, re-dispatched. Friction tax × 5.
|
|
22
|
-
|
|
23
|
-
After this standard: one Phase -1 pre-flight surface lists all
|
|
24
|
-
prerequisites at once. Auto-prep where mechanical and safe.
|
|
25
|
-
Signal-and-offer where operator-decisions. Refuses (with clear
|
|
26
|
-
instruction) where blocking.
|
|
27
|
-
|
|
28
|
-
## The 6 checks
|
|
29
|
-
|
|
30
|
-
| # | Check | Pass condition | Failure handling |
|
|
31
|
-
|---|-------|---------------|-------------------|
|
|
32
|
-
| 1 | **feature-branch** | repo on `feature/*` (or `fix/*`, `spike/*`) branch | refuses on main/master; instructs `git checkout -b feature/<slug>` |
|
|
33
|
-
| 2 | **state-spine** | `lib/state.sh` present in repo | auto-prep available from `$BASSCLEF_DIR/lib/state.sh`; falls back to refuse + /onboard-repo recommendation |
|
|
34
|
-
| 3 | **personas** | ≥1 persona at `docs/personas/*.md` | warn + offer `/personas` dispatch; composers may proceed with operator-as-persona |
|
|
35
|
-
| 4 | **budget** | `iteration_ceiling` (from `substrate.config.md`) ≥ estimated `turns × $0.10` | warn + offer ceiling bump in `substrate.config.md`; sequential mode ($0 burst) passes silently |
|
|
36
|
-
| 5 | **skill-registry** | dispatching skill resolves at `~/.claude/skills/<name>/SKILL.md` (user-level symlink) | warn if only at repo-level (bassclef#271 race); refuse if missing entirely |
|
|
37
|
-
| 6 | **deploy-host** | `hosting_platform` set in `substrate.config.md` AND adapter shipped | refuses on missing/unset; refuses on `none` unless `--no-launch` flag passed; warn on in-enum-but-adapter-not-shipped (vercel/netlify/cf-pages) — closes preview→production gap (bassclef#449/#450) |
|
|
38
|
-
|
|
39
|
-
### Check 6 — `--no-launch` mode
|
|
40
|
-
|
|
41
|
-
Composers receive an optional `--no-launch` flag. When passed, Check 6
|
|
42
|
-
short-circuits to pass with message "variants-only run" — used when the
|
|
43
|
-
dispatch is purely for design exploration (e.g., `/preview light` or
|
|
44
|
-
`/preview-build` invoked without `/launch-preview` chaining). Default is
|
|
45
|
-
full chain (deploy-host required). The flag is logged in pre-flight
|
|
46
|
-
output for audit.
|
|
47
|
-
|
|
48
|
-
## Auto-prep policy
|
|
49
|
-
|
|
50
|
-
**Auto-prep is allowed ONLY when ALL of:**
|
|
51
|
-
|
|
52
|
-
1. The action is mechanical (no operator-judgment input needed)
|
|
53
|
-
2. The action is safe (no destructive side-effects, no hidden state changes)
|
|
54
|
-
3. The action is reversible (operator can `git diff` to see exactly what changed)
|
|
55
|
-
4. The action is documented in this standard (no hidden auto-prep paths)
|
|
56
|
-
|
|
57
|
-
**Today the only auto-prep path is `lib/state.sh` bootstrap from
|
|
58
|
-
bassclef** (mechanical: `cp $BASSCLEF_DIR/lib/state.sh
|
|
59
|
-
$REPO/lib/state.sh`; safe: read-only template; reversible: standard
|
|
60
|
-
git diff).
|
|
61
|
-
|
|
62
|
-
**Forbidden auto-prep** (always operator-decision):
|
|
63
|
-
|
|
64
|
-
- Auto-branch creation (operator chooses naming + scope)
|
|
65
|
-
- Auto-budget changes (operator-economic decision)
|
|
66
|
-
- Auto-persona seeding (operator describes WHO; substrate fills shape)
|
|
67
|
-
- Auto-skill-registry recovery (operator reviews bassclef-sync output)
|
|
68
|
-
|
|
69
|
-
## Signal-and-offer pattern
|
|
70
|
-
|
|
71
|
-
For operator-decisions where the prerequisite isn't met, the composer:
|
|
72
|
-
|
|
73
|
-
1. **Signals** the gap clearly in the pre-flight surface
|
|
74
|
-
2. **Offers** a one-line action the operator can take
|
|
75
|
-
3. **Continues** if the operator confirms proceed (warn-tier) OR refuses if the gap is hard-block (fail-tier)
|
|
76
|
-
|
|
77
|
-
Example surface:
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
⚠️ budget iteration_ceiling $5 < estimated $8 (80 turns)
|
|
81
|
-
└─ recommendation: Bump iteration_ceiling in substrate.config.md OR reduce composer tier
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Operator decides:
|
|
85
|
-
- Bump ceiling → re-dispatch
|
|
86
|
-
- Use lower tier (`/preview-build medium` instead of `full`) → re-dispatch
|
|
87
|
-
- Proceed anyway (operator accepts overage risk) → composer proceeds with explicit acknowledgment
|
|
88
|
-
|
|
89
|
-
## When pre-flight fires
|
|
90
|
-
|
|
91
|
-
Phase -1 of the composer's procedure, BEFORE Phase 0:
|
|
92
|
-
|
|
93
|
-
```
|
|
94
|
-
PHASE -1: Pre-flight check (NEW, per bassclef#408)
|
|
95
|
-
source $BASSCLEF_DIR/lib/composer-preflight.sh
|
|
96
|
-
composer_preflight_check <skill> <estimated_turns> | composer_preflight_render <skill>
|
|
97
|
-
|
|
98
|
-
PHASE 0: Existing composer setup
|
|
99
|
-
...
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
If pre-flight returns `0` (all pass) → continue to Phase 0.
|
|
103
|
-
If pre-flight returns `1` (warnings) → composer surfaces warnings + asks operator proceed/abort.
|
|
104
|
-
If pre-flight returns `2` (failures) → composer refuses dispatch + exits.
|
|
105
|
-
|
|
106
|
-
## Override
|
|
107
|
-
|
|
108
|
-
Per-call: `SKIP_COMPOSER_PREFLIGHT=1 <command>` (logged via trace-helper).
|
|
109
|
-
|
|
110
|
-
Use sparingly. Override defeats the purpose; intended only for:
|
|
111
|
-
- Substrate-defect rescue (preflight itself broken)
|
|
112
|
-
- Operator-explicit "I know what I'm doing this once"
|
|
113
|
-
- Migration scripts that bootstrap state in odd shapes
|
|
114
|
-
|
|
115
|
-
NOT for:
|
|
116
|
-
- Routine work that fails preflight ("I'll fix the ceiling later")
|
|
117
|
-
- Automated CI dispatches (those should pre-prep, not bypass)
|
|
118
|
-
|
|
119
|
-
## Composer integration checklist
|
|
120
|
-
|
|
121
|
-
When adding pre-flight to a new composer skill:
|
|
122
|
-
|
|
123
|
-
1. Add Phase -1 to skill's procedure (before Phase 0)
|
|
124
|
-
2. Source the helper: `source $BASSCLEF_DIR/lib/composer-preflight.sh`
|
|
125
|
-
3. Call `composer_preflight_check <skill_name> <estimated_turns>`
|
|
126
|
-
4. Pipe through `composer_preflight_render` for operator surface
|
|
127
|
-
5. Branch on exit code (0 / 1 / 2) per the table above
|
|
128
|
-
6. Document `--skip-preflight` in skill's args reference
|
|
129
|
-
7. Test the integration (positive + negative cases)
|
|
130
|
-
|
|
131
|
-
## Composes with
|
|
132
|
-
|
|
133
|
-
- `lib/composer-preflight.sh` — implementation
|
|
134
|
-
- `.claude/rules/sdlc-gates.md` — pre-build gates (existing)
|
|
135
|
-
- `.claude/rules/blocked-items.md` — refuse + signal pattern (existing)
|
|
136
|
-
- `.claude/rules/destructive-operations.md` — auto-prep safety pattern
|
|
137
|
-
- bassclef#271 — skill-registry race (detected by check 5)
|
|
138
|
-
- bassclef#382 — substrate-clarity-gate (sibling write-time gate)
|
|
139
|
-
- bassclef#400 — friction-check (sibling post-skill gate)
|
|
140
|
-
|
|
141
|
-
## What this standard does NOT cover
|
|
142
|
-
|
|
143
|
-
- Pre-flight for `/longrun prep` (already exists in skill itself; this standard doesn't extend)
|
|
144
|
-
- Pre-flight for single-skill dispatches (`/value-prop`, `/kiss`, `/verify`) — overhead exceeds value
|
|
145
|
-
- Mid-composer prerequisites (e.g., spec validation between skills) — different surface; covered by composer's internal Phase 0+ logic
|
|
146
|
-
- Production deploy gates (`/deploy-prod` has its own approval surface)
|
|
147
|
-
|
|
148
|
-
## Sources
|
|
149
|
-
|
|
150
|
-
- bassclef#408 — the bassclef-evolution proposal this standard closes
|
|
151
|
-
- bassclef#400 scenario test (TwoDo /preview-build full surfaced 5 unmet prereqs)
|
|
152
|
-
- bassclef#271 — skill-registry race (check 5 detects)
|
|
153
|
-
- `lib/composer-preflight.sh` — the implementation
|
|
154
|
-
- `.claude/skills/longrun/SKILL.md` — existing pre-flight pattern (mirrors)
|
|
155
|
-
- `.claude/skills/autonomous/SKILL.md` — existing pre-flight pattern (mirrors)
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
description: Standard for docs/deferred-actions/*.md entries — the capability-routed handoff primitive that carries deferred work across session modalities.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Deferred Actions Schema
|
|
7
|
-
|
|
8
|
-
Standard for `docs/deferred-actions/*.md` entries — the capability-routed
|
|
9
|
-
handoff primitive that carries deferred work across session modalities.
|
|
10
|
-
|
|
11
|
-
Any session whose capabilities don't satisfy a pending action writes an
|
|
12
|
-
entry. Any capable future session picks it up at session-start via
|
|
13
|
-
`.claude/hooks/session-reflection.d/60-deferred-actions.sh`.
|
|
14
|
-
|
|
15
|
-
## Why this exists
|
|
16
|
-
|
|
17
|
-
Sessions have different capability surfaces (desktop, mobile-ephemeral,
|
|
18
|
-
cloud-web, CI). Work produced in one environment may not be deliverable
|
|
19
|
-
from that environment — a mobile session can compose a release-notes
|
|
20
|
-
addendum but cannot push it to Google Docs (no service-account key);
|
|
21
|
-
an abruptly-stopped session has pending artifacts but no chance to
|
|
22
|
-
push them.
|
|
23
|
-
|
|
24
|
-
Without this handoff, that work silently drops. With it, the next
|
|
25
|
-
capable session sees a `BLOCKED:` entry and resolves it inline with
|
|
26
|
-
the existing blocked-items protocol.
|
|
27
|
-
|
|
28
|
-
## File location
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
docs/deferred-actions/
|
|
32
|
-
├── README.md
|
|
33
|
-
├── <ISO-ts>-<slug>.md # pending entries
|
|
34
|
-
└── completed/
|
|
35
|
-
└── <ISO-ts>-<slug>.md # git mv'd here on resolution (audit trail)
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
Entries live flat under `docs/deferred-actions/`. On completion, the
|
|
39
|
-
session that resolves the entry runs `git mv` to `completed/` as the
|
|
40
|
-
audit record. The file name never changes, so history tracks the same
|
|
41
|
-
file across the move.
|
|
42
|
-
|
|
43
|
-
## Frontmatter schema
|
|
44
|
-
|
|
45
|
-
Every entry starts with YAML frontmatter. Required fields are enforced
|
|
46
|
-
by the scan hook; missing required fields cause the entry to surface as
|
|
47
|
-
`MALFORMED:` with a pointer to this standard.
|
|
48
|
-
|
|
49
|
-
```yaml
|
|
50
|
-
---
|
|
51
|
-
id: <ISO-ts>-<slug>
|
|
52
|
-
created_by_session: <chronicle-slug-or-session-id>
|
|
53
|
-
created_in: desktop | ephemeral-mobile | ephemeral-ci | cloud-web
|
|
54
|
-
created_at: <ISO-8601 timestamp, UTC>
|
|
55
|
-
pending_action: <slug describing the action>
|
|
56
|
-
requires_capability: [<cap>, <cap>, ...]
|
|
57
|
-
priority: high | medium | low
|
|
58
|
-
origin_skill: /<skill-name>
|
|
59
|
-
resolves_when: |
|
|
60
|
-
<multi-line description of what "done" looks like>
|
|
61
|
-
---
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
### Field reference
|
|
65
|
-
|
|
66
|
-
| Field | Required | Notes |
|
|
67
|
-
|-------|----------|-------|
|
|
68
|
-
| `id` | yes | Human-readable slug matching the filename (without `.md`). Pattern: `YYYY-MM-DDTHH-MM-SSZ-<slug>`. Dashes in the timestamp portion to keep it filesystem-safe. |
|
|
69
|
-
| `created_by_session` | yes | Chronicle filename (without `.md`) when available; otherwise a session identifier that future readers can trace. |
|
|
70
|
-
| `created_in` | yes | Modality vocabulary — one of `desktop`, `ephemeral-mobile`, `ephemeral-ci`, `cloud-web`. Extend vocabulary by adding rows to the modality table below, not by inventing values inline. |
|
|
71
|
-
| `created_at` | yes | ISO-8601 UTC timestamp. Used by the scan hook to sort entries by age for surfacing. |
|
|
72
|
-
| `pending_action` | yes | Slug describing what needs to happen. Not free-form prose — a reviewable verb phrase. Examples: `push-release-notes-to-gdoc`, `write-retroactive-version-tag`, `apply-memory-proposal`. |
|
|
73
|
-
| `requires_capability` | yes | List of capability tokens (vocabulary below). Session-start hook compares to current modality's capabilities; match → `BLOCKED:`, miss → `INFORM:`. |
|
|
74
|
-
| `priority` | yes | `high` / `medium` / `low`. Surfaces sort order + operator attention. Reserve `high` for integrity-critical (missing chronicle, lost memory proposal). |
|
|
75
|
-
| `origin_skill` | yes | Slash-command name of the skill that created the entry (e.g., `/release-notes`). Lets the session resuming the work re-enter the same skill with context. |
|
|
76
|
-
| `resolves_when` | yes | Plain-language description of the end state. Not a checklist — one or two sentences the resolver can match against. |
|
|
77
|
-
|
|
78
|
-
## Capability vocabulary
|
|
79
|
-
|
|
80
|
-
Stable set. Extend via this standard, not by inventing tokens inline.
|
|
81
|
-
|
|
82
|
-
| Capability | Meaning |
|
|
83
|
-
|------------|---------|
|
|
84
|
-
| `gcloud-auth` | Session can authenticate to Google Cloud (SA key at `~/.config/gcloud/sunjay-google-ops.json`). Needed for Google Docs push. |
|
|
85
|
-
| `google-docs-write` | Session has network + credentials to write to Google Docs. Composite — requires `gcloud-auth` + `network`. |
|
|
86
|
-
| `gh-auth` | `gh` CLI installed + authenticated in this session. |
|
|
87
|
-
| `git-push` | Session can push commits to remote (SSH keys or HTTPS PAT present). |
|
|
88
|
-
| `git-tag` | Session can create + push annotated tags. Superset of `git-push`. |
|
|
89
|
-
| `network` | Session has outbound internet access. Ephemeral sandboxes may not. |
|
|
90
|
-
| `memory-write` | Session can write to `~/.claude/projects/.../memory/`. Ephemeral sandboxes cannot. |
|
|
91
|
-
| `npm-install` | Session has npm + network to install packages. |
|
|
92
|
-
| `playwright-mcp` | Playwright MCP server configured in settings — visual review possible. |
|
|
93
|
-
| `docker-socket` | Session can run Docker (some CI runners + most desktops). |
|
|
94
|
-
|
|
95
|
-
New capabilities require a row here. The scan hook uses this table to
|
|
96
|
-
match entries to sessions — an entry requiring `rhyming-slang-decoder`
|
|
97
|
-
would never resolve because no modality advertises that capability.
|
|
98
|
-
|
|
99
|
-
## Modality → capability table (reference)
|
|
100
|
-
|
|
101
|
-
Session-start hook detects modality and synthesizes the capability set.
|
|
102
|
-
Not all modalities are static — a desktop session without `gcloud` auth
|
|
103
|
-
is missing `gcloud-auth` even if its modality generally has it. The
|
|
104
|
-
hook's detection logic (at `60-deferred-actions.sh`) is the source of
|
|
105
|
-
truth; this table is human reference.
|
|
106
|
-
|
|
107
|
-
| Modality | Typical capabilities |
|
|
108
|
-
|----------|---------------------|
|
|
109
|
-
| `desktop` | `gcloud-auth`, `gh-auth`, `git-push`, `git-tag`, `network`, `memory-write`, `npm-install`, `playwright-mcp` |
|
|
110
|
-
| `ephemeral-mobile` | `gh-auth`, `git-push`, `network` (fine-grained PAT only; no `gcloud`, no `memory-write`) |
|
|
111
|
-
| `ephemeral-ci` | `gh-auth`, `git-push`, `network`, workflow-secret-scoped (may include `google-docs-write` via SA key stored in GH secrets) |
|
|
112
|
-
| `cloud-web` | `network` (limited — no shell, no git, no auth) |
|
|
113
|
-
|
|
114
|
-
## Priority ladder
|
|
115
|
-
|
|
116
|
-
| Priority | When to use |
|
|
117
|
-
|----------|-------------|
|
|
118
|
-
| `high` | Integrity-critical: missing chronicle, orphaned memory proposal, data that will be lost if the next session doesn't pick it up. |
|
|
119
|
-
| `medium` | Delivery gaps with a real downstream cost: release notes not pushed to Google Doc (weekly changelog goes stale), LinkedIn draft not published. |
|
|
120
|
-
| `low` | Nice-to-have: metrics refresh, backfill of an ancillary artifact, retroactive tagging. |
|
|
121
|
-
|
|
122
|
-
Default `medium` if uncertain. Escalate to `high` only when silent drop
|
|
123
|
-
costs more than the cognitive load on the resolver.
|
|
124
|
-
|
|
125
|
-
## Body sections (in order)
|
|
126
|
-
|
|
127
|
-
Below the frontmatter, the body uses four sections. Session-reflection
|
|
128
|
-
surfaces frontmatter only; the body is for the resolving session.
|
|
129
|
-
|
|
130
|
-
```markdown
|
|
131
|
-
## Context
|
|
132
|
-
|
|
133
|
-
Why the work was deferred (one paragraph). Enough for a resolver who
|
|
134
|
-
wasn't in the original session to understand what's pending and why it
|
|
135
|
-
matters.
|
|
136
|
-
|
|
137
|
-
## Command to execute
|
|
138
|
-
|
|
139
|
-
Exact command, env vars, or agent instruction the resolver runs to
|
|
140
|
-
complete the work. Copy-pasteable. If the resolution is multi-step, a
|
|
141
|
-
small checklist. If it requires operator judgment (merge proposal,
|
|
142
|
-
edit memory file), state "operator action" and describe it.
|
|
143
|
-
|
|
144
|
-
## On completion
|
|
145
|
-
|
|
146
|
-
What the resolver does after the action succeeds — usually `git mv`
|
|
147
|
-
to `completed/` and any side-effect artifacts (e.g., "commit the push
|
|
148
|
-
log as chronicle footnote").
|
|
149
|
-
|
|
150
|
-
## Cross-refs
|
|
151
|
-
|
|
152
|
-
Related PRs, issues, chronicles, memory entries, or other deferred
|
|
153
|
-
actions. Makes the audit trail trivially traceable.
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
## Lifecycle
|
|
157
|
-
|
|
158
|
-
1. **Create**: skill or hook detects it can't complete an action, writes
|
|
159
|
-
the entry using `templates/deferred-action-template.md`,
|
|
160
|
-
commits it as part of the session's normal artifact flow.
|
|
161
|
-
2. **Surface**: next session-start, `60-deferred-actions.sh` scans
|
|
162
|
-
`docs/deferred-actions/*.md`, detects current capabilities, and emits
|
|
163
|
-
`BLOCKED:` (resolvable here) or `INFORM:` (visible, not actionable).
|
|
164
|
-
3. **Resolve**: resolving session follows the entry's "Command to
|
|
165
|
-
execute" section, verifies "On completion" state.
|
|
166
|
-
4. **Archive**: `git mv docs/deferred-actions/<id>.md docs/deferred-actions/completed/<id>.md`.
|
|
167
|
-
Commit the move with message `chore: resolve deferred action <id>`.
|
|
168
|
-
|
|
169
|
-
## Relationship to other rules + standards
|
|
170
|
-
|
|
171
|
-
- `.claude/rules/deferred-actions.md` — rule governing session-start
|
|
172
|
-
surfacing + resolution behavior
|
|
173
|
-
- `.claude/rules/blocked-items.md` — generic BLOCKED protocol; deferred
|
|
174
|
-
actions route through the same "resolve or explicitly defer" path
|
|
175
|
-
- `.claude/rules/mobile-ephemeral-session.md` — modality detection
|
|
176
|
-
primitives; the scan hook reuses its `$CLAUDE_EPHEMERAL` + heuristic
|
|
177
|
-
logic
|
|
178
|
-
- `.claude/rules/session-artifacts.md` — chronicle + LinkedIn tier
|
|
179
|
-
obligations; WS-3's session-rescue writes a deferred-action entry
|
|
180
|
-
when the Stop hook can't complete these
|
|
181
|
-
- `standards/mobile-ephemeral-session.md` — full standard, informs
|
|
182
|
-
modality classifications in the capability table
|
|
183
|
-
|
|
184
|
-
## Extension
|
|
185
|
-
|
|
186
|
-
- To add a capability: add a row to the capability vocabulary table +
|
|
187
|
-
update the detection logic in `60-deferred-actions.sh`.
|
|
188
|
-
- To add a modality: add a row to the modality→capability table +
|
|
189
|
-
update `created_in` vocabulary in the schema.
|
|
190
|
-
- To add a new pending_action type: no schema change needed; the field
|
|
191
|
-
is free-form slug. If the same action type recurs, update the
|
|
192
|
-
originating skill's SKILL.md to standardize the slug.
|
|
193
|
-
|
|
194
|
-
## What this standard is NOT
|
|
195
|
-
|
|
196
|
-
- Not a task tracker. GitHub issues remain the bassclef task system.
|
|
197
|
-
Deferred actions are session-to-session handoffs of *already-produced*
|
|
198
|
-
work that couldn't land.
|
|
199
|
-
- Not an audit log. The `completed/` subdirectory is retention for
|
|
200
|
-
traceability, not compliance evidence.
|
|
201
|
-
- Not a substitute for `#221`'s workflow-secret SA key path. Once
|
|
202
|
-
workflow-delivery lands, Google-Doc-push deferrals become rarer.
|
|
203
|
-
Deferred actions still cover memory proposals, session-rescue, and
|
|
204
|
-
any future credential-bound action without a workflow fallback.
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
description: The Rust package-manager sibling of .claude/rules/new-dependency-check.md.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# cargo — dependency discipline
|
|
7
|
-
|
|
8
|
-
The Rust package-manager sibling of `.claude/rules/new-dependency-check.md`. Loads when adopter's `tech_stack.pkg_manager` is `cargo`.
|
|
9
|
-
|
|
10
|
-
## Per-PM checks (beyond the universal concerns)
|
|
11
|
-
|
|
12
|
-
1. **MSRV (Minimum Supported Rust Version)** — does the package's MSRV align with the adopter's Rust version? Bumping Rust to take a new crate is a real cost; check `rust-version` in the crate's Cargo.toml.
|
|
13
|
-
2. **`no_std` compatibility** — for embedded / WASM / kernel use cases, does the crate work without the standard library? Check for `#![no_std]` support in the crate's docs.
|
|
14
|
-
3. **Feature flags** — Rust crates often ship optional features. Default features may pull in heavy transitive deps (e.g., `tokio` with full features). Audit `default-features` and explicitly select features you need.
|
|
15
|
-
4. **Unsafe code surface** — does the crate use `unsafe`? For security-critical paths, prefer crates audited by `cargo-audit` or that publish via `cargo-geiger` reports.
|
|
16
|
-
5. **Compile time** — Rust compile is slow; popular crates with heavy macros (serde, diesel) compound. Check existing Cargo.lock for already-pulled-in deps before adding a new heavyweight.
|
|
17
|
-
|
|
18
|
-
## Lockfile + reproducibility
|
|
19
|
-
|
|
20
|
-
- **Cargo.lock** — always check in for binaries; library crates traditionally don't, though modern practice is moving toward checking in for libraries too (reproducible builds).
|
|
21
|
-
|
|
22
|
-
## Approved Dependencies list location
|
|
23
|
-
|
|
24
|
-
Each adopter repo maintains its own. Typical locations:
|
|
25
|
-
- `CLAUDE.md` § "Approved Dependencies"
|
|
26
|
-
- `standards/approved-dependencies.md`
|
|
27
|
-
- `Cargo.toml` `[dependencies]` (Rust adopters; the manifest IS the approved list)
|
|
28
|
-
|
|
29
|
-
## Process specifics
|
|
30
|
-
|
|
31
|
-
1. State the package name and why.
|
|
32
|
-
2. Run the 5 universal concerns from `new-dependency-check.md`.
|
|
33
|
-
3. Run the 5 per-PM checks above.
|
|
34
|
-
4. Run `cargo add <pkg>` (or `cargo add <pkg> --no-default-features --features ...` for feature selection).
|
|
35
|
-
5. Use `[dev-dependencies]` for build-time-only deps (testing, benchmarking).
|
|
36
|
-
|
|
37
|
-
## Sources
|
|
38
|
-
|
|
39
|
-
- Adapted from operator's npm-rule shape; Rust ecosystem specifics from cargo book + RustSec + cargo-audit.
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
description: The Ruby package-manager sibling of .claude/rules/new-dependency-check.md.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# gem (Bundler) — dependency discipline
|
|
7
|
-
|
|
8
|
-
The Ruby package-manager sibling of `.claude/rules/new-dependency-check.md`. Loads when adopter's `tech_stack.pkg_manager` is `gem`.
|
|
9
|
-
|
|
10
|
-
## Per-PM checks (beyond the universal concerns)
|
|
11
|
-
|
|
12
|
-
1. **Ruby-version compatibility** — does the gem support the adopter's Ruby version? Check `required_ruby_version` in the gem's gemspec.
|
|
13
|
-
2. **Rails-version compatibility** (if applicable) — does the gem support the adopter's Rails major.minor? Gems that lag behind Rails majors are maintenance debt; gems that lead may break.
|
|
14
|
-
3. **C extension** — does the gem include native code (e.g., `nokogiri`, `pg`)? Installation requires platform-specific build tools; multi-platform deployments need precompiled gems or build-env parity.
|
|
15
|
-
4. **Test-mode side effects** — some gems modify global state on require (e.g., monkey-patching standard library, registering autoloaders). Audit for surprise behavior in test isolation.
|
|
16
|
-
5. **License compatibility** — Ruby gems are heterogeneous on license (MIT / Apache / BSD / GPL / proprietary). Audit for compatibility with the adopter's license posture.
|
|
17
|
-
|
|
18
|
-
## Lockfile + reproducibility
|
|
19
|
-
|
|
20
|
-
- **Gemfile.lock** — always check in. Bundler resolves deterministically from the lockfile.
|
|
21
|
-
- **Gemfile** — production vs development vs test groups must be explicit; ungrouped gems install in every environment.
|
|
22
|
-
|
|
23
|
-
## Approved Dependencies list location
|
|
24
|
-
|
|
25
|
-
Each adopter repo maintains its own. Typical locations:
|
|
26
|
-
- `CLAUDE.md` § "Approved Dependencies"
|
|
27
|
-
- `standards/approved-dependencies.md`
|
|
28
|
-
- `Gemfile` (Ruby adopters; the manifest IS the approved list, grouped by environment)
|
|
29
|
-
|
|
30
|
-
## Process specifics
|
|
31
|
-
|
|
32
|
-
1. State the gem name and why.
|
|
33
|
-
2. Run the 5 universal concerns from `new-dependency-check.md`.
|
|
34
|
-
3. Run the 5 per-PM checks above.
|
|
35
|
-
4. Add to `Gemfile`:
|
|
36
|
-
- `gem '<name>'` for production
|
|
37
|
-
- `gem '<name>', group: :development` for dev-only
|
|
38
|
-
- `gem '<name>', group: :test` for test-only
|
|
39
|
-
5. Run `bundle install` to resolve + update Gemfile.lock.
|
|
40
|
-
|
|
41
|
-
## Sources
|
|
42
|
-
|
|
43
|
-
- Adapted from operator's npm-rule shape; Ruby ecosystem specifics from Bundler docs + rubygems.org.
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
description: The Go package-manager sibling of .claude/rules/new-dependency-check.md.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# go-mod — dependency discipline
|
|
7
|
-
|
|
8
|
-
The Go package-manager sibling of `.claude/rules/new-dependency-check.md`. Loads when adopter's `tech_stack.pkg_manager` is `go-mod`.
|
|
9
|
-
|
|
10
|
-
## Per-PM checks (beyond the universal concerns)
|
|
11
|
-
|
|
12
|
-
1. **Go-version compatibility** — does the module's `go.mod` require a newer Go than the adopter? Bumping Go is a real cost; check `go` directive in the module's go.mod.
|
|
13
|
-
2. **Module path stability** — has the module gone through v2+ migrations (the `/v2`, `/v3` suffix dance)? Lock to a stable major; pre-1.0 modules can break minor-version contracts.
|
|
14
|
-
3. **Standard library coverage** — Go's stdlib is rich. Many "obvious" dependency candidates (JSON, HTTP server, logging, crypto, file I/O) are already in stdlib. Check before adding.
|
|
15
|
-
4. **Vendor vs proxy** — `vendor/` directory pins sources in the repo (fully reproducible, large repo); `GOPROXY` relies on external availability. Adopter picks; sibling notes the trade-off.
|
|
16
|
-
5. **CGo usage** — does the module call C code? CGo breaks cross-compilation and complicates Docker multi-stage builds. Pure-Go alternatives often exist; prefer them.
|
|
17
|
-
|
|
18
|
-
## Lockfile + reproducibility
|
|
19
|
-
|
|
20
|
-
- **go.sum** — checksums for every module + dependency. Always check in.
|
|
21
|
-
- **go.mod** — explicit declaration of direct dependencies; transitive deps live in go.sum.
|
|
22
|
-
|
|
23
|
-
## Approved Dependencies list location
|
|
24
|
-
|
|
25
|
-
Each adopter repo maintains its own. Typical locations:
|
|
26
|
-
- `CLAUDE.md` § "Approved Dependencies"
|
|
27
|
-
- `standards/approved-dependencies.md`
|
|
28
|
-
- `go.mod` `require` block (Go adopters; the manifest IS the approved list)
|
|
29
|
-
|
|
30
|
-
## Process specifics
|
|
31
|
-
|
|
32
|
-
1. State the module path and why.
|
|
33
|
-
2. Run the 5 universal concerns from `new-dependency-check.md`.
|
|
34
|
-
3. Run the 5 per-PM checks above.
|
|
35
|
-
4. Run `go get <module>@<version>` to add + pin.
|
|
36
|
-
5. Run `go mod tidy` to clean up unused deps + update go.sum.
|
|
37
|
-
6. Test deps go in `_test.go` files via `import` — no separate dev-dep grouping in Go.
|
|
38
|
-
|
|
39
|
-
## Sources
|
|
40
|
-
|
|
41
|
-
- Adapted from operator's npm-rule shape; Go ecosystem specifics from Go modules reference + golang.org/ref/mod.
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
description: The Node.js package-manager sibling of .claude/rules/new-dependency-check.md.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# npm / pnpm / yarn — dependency discipline
|
|
7
|
-
|
|
8
|
-
The Node.js package-manager sibling of `.claude/rules/new-dependency-check.md`. Loads when adopter's `tech_stack.pkg_manager` is `npm`, `pnpm`, or `yarn`.
|
|
9
|
-
|
|
10
|
-
## Per-PM checks (beyond the universal concerns)
|
|
11
|
-
|
|
12
|
-
1. **Stack compatibility** — does it work with the adopter's framework (Next.js / Vite / Remix / SvelteKit / etc.), TypeScript strict mode, and container build?
|
|
13
|
-
2. **Bundle impact** — check [bundlephobia.com](https://bundlephobia.com) for client-side packages. Anything over 50KB minified+gzipped warrants justification. Server-only packages bypass this check.
|
|
14
|
-
3. **SSR compatibility** — does the package use `window`, `document`, `localStorage`, or other browser-only APIs? Client-only libraries need `"use client"` directive (Next.js App Router) plus lazy loading via `next/dynamic` or equivalent. Server components silently fail when client-only APIs leak through.
|
|
15
|
-
4. **Type definitions** — does the package ship its own TypeScript types? If not, is there a `@types/*` package? Untyped JS dependencies degrade TS strict-mode value.
|
|
16
|
-
5. **Lockfile alignment** — adopter using pnpm? Use `pnpm add`, not `npm install`. Mixed package managers corrupt lockfiles and produce non-reproducible installs.
|
|
17
|
-
|
|
18
|
-
## Approved Dependencies list location
|
|
19
|
-
|
|
20
|
-
Each adopter repo maintains its own. Typical locations:
|
|
21
|
-
- `CLAUDE.md` § "Approved Dependencies"
|
|
22
|
-
- `standards/approved-dependencies.md`
|
|
23
|
-
- `docs/dependencies.md`
|
|
24
|
-
|
|
25
|
-
After installing a new package, add it to the list with a one-line rationale.
|
|
26
|
-
|
|
27
|
-
## Process specifics
|
|
28
|
-
|
|
29
|
-
1. State the package name and why.
|
|
30
|
-
2. Run the 5 universal concerns from `new-dependency-check.md`.
|
|
31
|
-
3. Run the 5 per-PM checks above.
|
|
32
|
-
4. Run the appropriate install:
|
|
33
|
-
- `npm install <pkg>` (npm)
|
|
34
|
-
- `pnpm add <pkg>` (pnpm)
|
|
35
|
-
- `yarn add <pkg>` (yarn)
|
|
36
|
-
5. Use `--save-dev` (npm/yarn) or `-D` (pnpm) for build-time-only dependencies (testing, linting, types).
|
|
37
|
-
6. Add to the Approved Dependencies list.
|
|
38
|
-
|
|
39
|
-
## Sources
|
|
40
|
-
|
|
41
|
-
- Original `new-dependency-check.md` content authored against npm (operator stack).
|
|
42
|
-
- This sibling preserves the npm-specific specifics that don't apply to other ecosystems (bundlephobia, SSR, "use client", @types/*).
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
tier: lite
|
|
3
|
-
description: The Python package-manager sibling of .claude/rules/new-dependency-check.md.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# pip / poetry — dependency discipline
|
|
7
|
-
|
|
8
|
-
The Python package-manager sibling of `.claude/rules/new-dependency-check.md`. Loads when adopter's `tech_stack.pkg_manager` is `pip` or `poetry`.
|
|
9
|
-
|
|
10
|
-
## Per-PM checks (beyond the universal concerns)
|
|
11
|
-
|
|
12
|
-
1. **Python-version compatibility** — does the package support the adopter's Python version? Many packages drop old Pythons quickly; some require minimum versions (e.g., 3.10+ for newer typing features).
|
|
13
|
-
2. **C extension / binary wheels** — does the package include native code? If yes, what platforms ship wheels (manylinux, macOS arm64, Windows)? Source-only installs fail without build tools.
|
|
14
|
-
3. **Dependency tree depth** — a dependency that pulls in 50 transitive deps is a maintenance liability. Inspect with `pip show <pkg>` or `poetry show --tree <pkg>`.
|
|
15
|
-
4. **Async / sync model** — does the package match the adopter's runtime model? Sync packages in an async app block the event loop; async packages in a sync app force conversion ceremony.
|
|
16
|
-
5. **Type stubs** — does the package ship `py.typed` marker (PEP 561)? If not, is there a `types-*` stub on PyPI? Untyped deps degrade mypy / pyright strict-mode value.
|
|
17
|
-
|
|
18
|
-
## Lockfile + reproducibility
|
|
19
|
-
|
|
20
|
-
- **pip** — `requirements.txt` + `pip freeze` is brittle; consider `pip-tools` (`pip-compile`) to pin transitive deps deterministically.
|
|
21
|
-
- **poetry** — `poetry.lock` is the bassclef lockfile; check it into version control.
|
|
22
|
-
|
|
23
|
-
## Approved Dependencies list location
|
|
24
|
-
|
|
25
|
-
Each adopter repo maintains its own. Typical locations:
|
|
26
|
-
- `CLAUDE.md` § "Approved Dependencies"
|
|
27
|
-
- `standards/approved-dependencies.md`
|
|
28
|
-
- `pyproject.toml` (poetry adopters; the dependencies list IS the approved list)
|
|
29
|
-
|
|
30
|
-
## Process specifics
|
|
31
|
-
|
|
32
|
-
1. State the package name and why.
|
|
33
|
-
2. Run the 5 universal concerns from `new-dependency-check.md`.
|
|
34
|
-
3. Run the 5 per-PM checks above.
|
|
35
|
-
4. Run the appropriate install:
|
|
36
|
-
- `pip install <pkg>` + update `requirements.txt`
|
|
37
|
-
- `poetry add <pkg>`
|
|
38
|
-
5. Use `--dev` (poetry) or a separate `requirements-dev.txt` (pip) for build-time-only dependencies (testing, linting, stubs).
|
|
39
|
-
|
|
40
|
-
## Sources
|
|
41
|
-
|
|
42
|
-
- Adapted from operator's npm-rule shape; Python ecosystem specifics from PyPA + PEP 561 + poetry docs.
|