@thebassclef/lite 1.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +65 -0
- package/dist/cli.js +65 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lite/.claude/agents/architect.md +70 -0
- package/dist/lite/.claude/agents/builder.md +114 -0
- package/dist/lite/.claude/agents/designer.md +156 -0
- package/dist/lite/.claude/agents/reviewer.md +88 -0
- package/dist/lite/.claude/hooks/bassclef-sync.sh +85 -27
- package/dist/lite/.claude/hooks/longrun-prep-compounding-axis-check.sh +492 -0
- package/dist/lite/.claude/hooks/longrun-prep-render-check.sh +236 -0
- package/dist/lite/.claude/hooks/persona-name-scrub-check.sh +105 -0
- package/dist/lite/.claude/hooks/skill-step-list-check.sh +171 -0
- package/dist/lite/.claude/luminaries/alan-cooper.md +170 -0
- package/dist/lite/.claude/luminaries/alistair-cockburn.md +140 -0
- package/dist/lite/.claude/luminaries/amazon-pr-faq.md +34 -0
- package/dist/lite/.claude/luminaries/andreas-zeller.md +74 -0
- package/dist/lite/.claude/luminaries/ash-maurya.md +121 -0
- package/dist/lite/.claude/luminaries/bill-buxton.md +210 -0
- package/dist/lite/.claude/luminaries/charles-sanders-peirce.md +150 -0
- package/dist/lite/.claude/luminaries/david-ogilvy.md +192 -0
- package/dist/lite/.claude/luminaries/don-norman.md +173 -0
- package/dist/lite/.claude/luminaries/edward-tufte.md +179 -0
- package/dist/lite/.claude/luminaries/eric-evans.md +160 -0
- package/dist/lite/.claude/luminaries/frederick-brooks.md +50 -0
- package/dist/lite/.claude/luminaries/gang-of-four.md +157 -0
- package/dist/lite/.claude/luminaries/glenford-myers.md +230 -0
- package/dist/lite/.claude/luminaries/hunt-thomas.md +115 -0
- package/dist/lite/.claude/luminaries/hyrum-wright.md +94 -0
- package/dist/lite/.claude/luminaries/jason-fried-dhh.md +46 -0
- package/dist/lite/.claude/luminaries/jesse-james-garrett.md +154 -0
- package/dist/lite/.claude/luminaries/john-ousterhout.md +94 -0
- package/dist/lite/.claude/luminaries/karl-popper.md +132 -0
- package/dist/lite/.claude/luminaries/kent-beck.md +168 -0
- package/dist/lite/.claude/luminaries/linus-torvalds.md +218 -0
- package/dist/lite/.claude/luminaries/martin-fowler.md +164 -0
- package/dist/lite/.claude/luminaries/michael-feathers.md +125 -0
- package/dist/lite/.claude/luminaries/michael-nygard.md +118 -0
- package/dist/lite/.claude/luminaries/robert-c-martin.md +164 -0
- package/dist/lite/.claude/luminaries/saltzer-schroeder.md +194 -0
- package/dist/lite/.claude/luminaries/sophia-prater.md +193 -0
- package/dist/lite/.claude/luminaries/stephen-toulmin.md +131 -0
- package/dist/lite/.claude/luminaries/tony-hoare.md +170 -0
- package/dist/lite/.claude/luminaries/vaughn-vernon.md +50 -0
- package/dist/lite/.claude/luminaries/w-edwards-deming.md +158 -0
- package/dist/lite/.claude/rules/accessor-library-discipline.md +110 -0
- package/dist/lite/.claude/rules/adr-discipline.md +96 -0
- package/dist/lite/.claude/rules/api-conventions.md +115 -0
- package/dist/lite/.claude/rules/artifact-ingestion.md +137 -0
- package/dist/lite/.claude/rules/assert-only-after-verify.md +111 -0
- package/dist/lite/.claude/rules/blocked-items.md +139 -0
- package/dist/lite/.claude/rules/bootstrap-pair-discipline.md +106 -0
- package/dist/lite/.claude/rules/branching.md +28 -0
- package/dist/lite/.claude/rules/cold-adopter-harness-discipline.md +93 -0
- package/dist/lite/.claude/rules/commit-conventions.md +22 -0
- package/dist/lite/.claude/rules/compounding-axis-fresh-analysis.md +173 -0
- package/dist/lite/.claude/rules/compounding-sequence-fresh-analysis.md +173 -0
- package/dist/lite/.claude/rules/context-engineering.md +155 -0
- package/dist/lite/.claude/rules/context-management.md +85 -0
- package/dist/lite/.claude/rules/defensive-bash.md +52 -0
- package/dist/lite/.claude/rules/deferred-actions.md +233 -0
- package/dist/lite/.claude/rules/destructive-operations.md +69 -0
- package/dist/lite/.claude/rules/diagnosis.md +38 -0
- package/dist/lite/.claude/rules/github-issue-flash-tweet.md +114 -0
- package/dist/lite/.claude/rules/guardrails.md +73 -0
- package/dist/lite/.claude/rules/hook-wire-on-author.md +77 -0
- package/dist/lite/.claude/rules/identifier-leak-prevention.md +73 -0
- package/dist/lite/.claude/rules/iteration-bet-brief-completeness.md +43 -0
- package/dist/lite/.claude/rules/lite-manifest-schema-change-discipline.md +79 -0
- package/dist/lite/.claude/rules/longrun-prep-plan-doc-compression.md +77 -0
- package/dist/lite/.claude/rules/loop-discipline.md +71 -0
- package/dist/lite/.claude/rules/manual-prod-approval.md +100 -0
- package/dist/lite/.claude/rules/marker-enrichment-discipline.md +72 -0
- package/dist/lite/.claude/rules/mobile-ephemeral-session.md +109 -0
- package/dist/lite/.claude/rules/new-dependency-check.md +44 -0
- package/dist/lite/.claude/rules/oo-ad-entry-point.md +95 -0
- package/dist/lite/.claude/rules/operator-facing-prose.md +177 -0
- package/dist/lite/.claude/rules/option-label-discipline.md +82 -0
- package/dist/lite/.claude/rules/pattern-annotation.md +83 -0
- package/dist/lite/.claude/rules/persona-name-leak-scrub.md +90 -0
- package/dist/lite/.claude/rules/plain-english-discipline.md +132 -0
- package/dist/lite/.claude/rules/plan-enumeration-needs-value-props.md +177 -0
- package/dist/lite/.claude/rules/pr-body-shape.md +195 -0
- package/dist/lite/.claude/rules/pr-strategy.md +142 -0
- package/dist/lite/.claude/rules/pr-title-shape.md +90 -0
- package/dist/lite/.claude/rules/prototype-workflow.md +53 -0
- package/dist/lite/.claude/rules/reserved-skill-names.md +103 -0
- package/dist/lite/.claude/rules/schema-management.md +42 -0
- package/dist/lite/.claude/rules/sdlc-gates.md +149 -0
- package/dist/lite/.claude/rules/security.md +37 -0
- package/dist/lite/.claude/rules/session-artifacts.md +236 -0
- package/dist/lite/.claude/rules/skill-composition-declarations.md +105 -0
- package/dist/lite/.claude/rules/skill-description-clarity.md +196 -0
- package/dist/lite/.claude/rules/skill-procedure-step-list.md +119 -0
- package/dist/lite/.claude/rules/sprint-prep-preset-picker.md +76 -0
- package/dist/lite/.claude/rules/state-schema-validation.md +156 -0
- package/dist/lite/.claude/rules/stuck-signal-diagnostic.md +111 -0
- package/dist/lite/.claude/rules/substrate-config-schema.md +85 -0
- package/dist/lite/.claude/rules/test-list-discipline.md +129 -0
- package/dist/lite/.claude/rules/test-sufficiency.md +186 -0
- package/dist/lite/.claude/rules/testing-tier-config.md +125 -0
- package/dist/lite/.claude/rules/testing.md +38 -0
- package/dist/lite/.claude/rules/turn-estimate-grounding.md +82 -0
- package/dist/lite/.claude/rules/visual-hierarchy.md +427 -0
- package/dist/lite/.claude/rules/we-dont-break-adopters.md +103 -0
- package/dist/lite/.claude/rules/whereami-load-bearing.md +184 -0
- package/dist/lite/.claude/rules/writing-craft-discipline.md +72 -0
- package/dist/lite/.claude/rules/wu-sequencing-compounds.md +119 -0
- package/dist/lite/.claude/skills/build/SKILL.md +640 -0
- package/dist/lite/.claude/skills/chronicle/SKILL.md +55 -0
- package/dist/lite/.claude/skills/clean-artifacts/SKILL.md +249 -0
- package/dist/lite/.claude/skills/decompose/SKILL.md +280 -0
- package/dist/lite/.claude/skills/diagnose/SKILL.md +297 -0
- package/dist/lite/.claude/skills/feynman/SKILL.md +90 -0
- package/dist/lite/.claude/skills/howdoi/SKILL.md +105 -0
- package/dist/lite/.claude/skills/ia-model/SKILL.md +108 -0
- package/dist/lite/.claude/skills/interaction-design/SKILL.md +112 -0
- package/dist/lite/.claude/skills/interpret-input/SKILL.md +180 -0
- package/dist/lite/.claude/skills/journal/SKILL.md +209 -0
- package/dist/lite/.claude/skills/kiss/SKILL.md +449 -0
- package/dist/lite/.claude/skills/launch/SKILL.md +915 -0
- package/dist/lite/.claude/skills/lean-canvas/SKILL.md +332 -0
- package/dist/lite/.claude/skills/longrun/SKILL.md +512 -0
- package/dist/lite/.claude/skills/luminary/SKILL.md +481 -0
- package/dist/lite/.claude/skills/ogilvy-writing-audit/SKILL.md +177 -0
- package/dist/lite/.claude/skills/onboard-repo/SKILL.md +1640 -0
- package/dist/lite/.claude/skills/pattern-review/SKILL.md +99 -0
- package/dist/lite/.claude/skills/personas/SKILL.md +207 -0
- package/dist/lite/.claude/skills/promote/SKILL.md +283 -0
- package/dist/lite/.claude/skills/requirement/SKILL.md +98 -0
- package/dist/lite/.claude/skills/retro/SKILL.md +117 -0
- package/dist/lite/.claude/skills/riff/SKILL.md +114 -0
- package/dist/lite/.claude/skills/roadmap-reconcile/SKILL.md +163 -0
- package/dist/lite/.claude/skills/session-end/SKILL.md +309 -0
- package/dist/lite/.claude/skills/session-log/SKILL.md +299 -0
- package/dist/lite/.claude/skills/skills/SKILL.md +228 -0
- package/dist/lite/.claude/skills/spec/SKILL.md +105 -0
- package/dist/lite/.claude/skills/sprint/SKILL.md +418 -0
- package/dist/lite/.claude/skills/stage/SKILL.md +384 -0
- package/dist/lite/.claude/skills/state-a-problem/SKILL.md +185 -0
- package/dist/lite/.claude/skills/temperance/SKILL.md +108 -0
- package/dist/lite/.claude/skills/use-case/SKILL.md +417 -0
- package/dist/lite/.claude/skills/user-stories/SKILL.md +268 -0
- package/dist/lite/.claude/skills/value-prop/SKILL.md +251 -0
- package/dist/lite/.claude/skills/verify/SKILL.md +160 -0
- package/dist/lite/.claude/skills/visual-review/SKILL.md +503 -0
- package/dist/lite/.claude/skills/whats-the-plan/SKILL.md +202 -0
- package/dist/lite/.claude/skills/whereami/SKILL.md +307 -0
- package/dist/lite/AGENTS.md +79 -0
- package/dist/lite/CLAUDE-lite.md +85 -0
- package/dist/lite/CODE_OF_CONDUCT.md +28 -0
- package/dist/lite/CONTRIBUTING.md +177 -0
- package/dist/lite/README.md +173 -0
- package/dist/lite/SECURITY.md +19 -0
- package/dist/lite/architecture/decisions/ADR-029-release-pipeline.md +79 -0
- package/dist/lite/architecture/decisions/ADR-031-non-breaking-changes-adopter-discipline.md +139 -0
- package/dist/lite/architecture/decisions/ADR-032-adopter-sync-dispatcher-architecture.md +192 -0
- package/dist/lite/architecture/decisions/ADR-039-release-tagging-scheme.md +145 -0
- package/dist/lite/architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md +155 -0
- package/dist/lite/architecture/decisions/ADR-044-unified-skill-body-template.md +162 -0
- package/dist/lite/lib/clean-artifacts-sweep.sh +112 -0
- package/dist/lite/lib/code-comment-discipline.sh +144 -0
- package/dist/lite/lib/composer-preflight.sh +459 -0
- package/dist/lite/lib/deferred-actions.sh +146 -0
- package/dist/lite/lib/hook-header-parser.sh +61 -0
- package/dist/lite/lib/hook-heartbeat.sh +152 -0
- package/dist/lite/lib/hook-inject.sh +255 -0
- package/dist/lite/lib/hook-installer.sh +195 -0
- package/dist/lite/lib/luminary-pick.sh +96 -0
- package/dist/lite/lib/output-discipline.sh +143 -0
- package/dist/lite/lib/prose-scan-boundary.sh +171 -0
- package/dist/lite/lib/rewrite-check.sh +214 -0
- package/dist/lite/lib/session-rescue.sh +151 -0
- package/dist/lite/lib/source-graph-walker.sh +277 -0
- package/dist/lite/lib/state.sh +1372 -0
- package/dist/lite/lib/telemetry.sh +205 -0
- package/dist/lite/lib/tier-check.sh +187 -0
- package/dist/lite/lib/tier-dependency-audit.sh +1088 -0
- package/dist/lite/presence/install/bassclef-hook-connect.sh +178 -0
- package/dist/lite/presence/install/bassclef-sync.dispatcher.template.sh +841 -0
- package/dist/lite/presence/install/bassclef-sync.template.sh +2278 -0
- package/dist/lite/presence/install/schedule-auto-save.cron.sh +88 -0
- package/dist/lite/presence/install/schedule-auto-save.taskscheduler.md +122 -0
- package/dist/lite/scripts/aggregate-telemetry.sh +217 -0
- package/dist/lite/scripts/analyze-tier-dependencies.sh +239 -0
- package/dist/lite/scripts/generate-lite-manifest.sh +505 -0
- package/dist/lite/scripts/generate-tier-manifest.sh +28 -0
- package/dist/lite/scripts/intent-drift-check.sh +456 -0
- package/dist/lite/scripts/lite-manifest-drift-check.sh +146 -0
- package/dist/lite/scripts/render-lite-manifest-doc.sh +150 -0
- package/dist/lite/standards/adr-template.md +86 -0
- package/dist/lite/standards/api-conventions/nextjs.md +84 -0
- package/dist/lite/standards/artifact-composition.md +209 -0
- package/dist/lite/standards/bash-hook-safety.md +246 -0
- package/dist/lite/standards/bassclef-configs-schema.md +232 -0
- package/dist/lite/standards/bassclef-evolution.md +143 -0
- package/dist/lite/standards/bassclef-internal-jargon.md +244 -0
- package/dist/lite/standards/bassclef-managed-sentinel.md +96 -0
- package/dist/lite/standards/bassclef-source-config.md +228 -0
- package/dist/lite/standards/branch-stacking.md +408 -0
- package/dist/lite/standards/code-safety-principles.md +176 -0
- package/dist/lite/standards/composer-prerequisites.md +155 -0
- package/dist/lite/standards/deferred-actions-schema.md +204 -0
- package/dist/lite/standards/dependency-discipline/cargo.md +39 -0
- package/dist/lite/standards/dependency-discipline/gem.md +43 -0
- package/dist/lite/standards/dependency-discipline/go-mod.md +41 -0
- package/dist/lite/standards/dependency-discipline/npm.md +42 -0
- package/dist/lite/standards/dependency-discipline/pip.md +42 -0
- package/dist/lite/standards/deployment-topology/ec2-tailscale.md +225 -0
- package/dist/lite/standards/deployment-topology.md +69 -0
- package/dist/lite/standards/docs-sync-allowlist.md +76 -0
- package/dist/lite/standards/domain-and-dns.md +145 -0
- package/dist/lite/standards/frontend-stack.md +67 -0
- package/dist/lite/standards/frontmatter-schema.md +154 -0
- package/dist/lite/standards/graceful-exit.md +227 -0
- package/dist/lite/standards/hook-idempotency.md +102 -0
- package/dist/lite/standards/hook-injection-discipline.md +202 -0
- package/dist/lite/standards/hook-install-class.md +215 -0
- package/dist/lite/standards/input-handler-interface.md +152 -0
- package/dist/lite/standards/lite-manifest-schema-changes.md +180 -0
- package/dist/lite/standards/lite-manifest.json +2797 -0
- package/dist/lite/standards/luminary-matching.md +105 -0
- package/dist/lite/standards/luminary-problem-patterns.md +481 -0
- package/dist/lite/standards/migration-discipline/active-record.md +50 -0
- package/dist/lite/standards/migration-discipline/alembic.md +43 -0
- package/dist/lite/standards/migration-discipline/gorm.md +50 -0
- package/dist/lite/standards/migration-discipline/prisma.md +53 -0
- package/dist/lite/standards/migration-discipline/sqlalchemy.md +51 -0
- package/dist/lite/standards/mobile-ephemeral-session.md +167 -0
- package/dist/lite/standards/model-routing-discipline.md +160 -0
- package/dist/lite/standards/ogilvy-writing-rules.md +225 -0
- package/dist/lite/standards/opener-discipline.md +96 -0
- package/dist/lite/standards/operator-facing-prose-discipline.md +201 -0
- package/dist/lite/standards/persona-schema.md +229 -0
- package/dist/lite/standards/pluggable-luminaries.md +323 -0
- package/dist/lite/standards/pr-body-discipline.md +115 -0
- package/dist/lite/standards/preview-state-schema.md +189 -0
- package/dist/lite/standards/project-directory-layout.md +276 -0
- package/dist/lite/standards/release-tagging.md +137 -0
- package/dist/lite/standards/reserved-skill-names.md +120 -0
- package/dist/lite/standards/scannable-multi-option-output.md +265 -0
- package/dist/lite/standards/sdlc-compliance.md +286 -0
- package/dist/lite/standards/sdlc-gates/typescript.md +57 -0
- package/dist/lite/standards/secrets-lifecycle.md +210 -0
- package/dist/lite/standards/security-scanner-adapter.md +145 -0
- package/dist/lite/standards/session-board.md +256 -0
- package/dist/lite/standards/skill-output-discipline.md +121 -0
- package/dist/lite/standards/state-spine-contract.md +255 -0
- package/dist/lite/standards/state-spine.md +511 -0
- package/dist/lite/standards/steering-hints/kiss-words.md +11 -0
- package/dist/lite/standards/substrate-config-schema.md +267 -0
- package/dist/lite/standards/tech-stack-config.md +109 -0
- package/dist/lite/standards/tier-dependency-analysis.md +167 -0
- package/dist/lite/standards/tier-runtime-deps/lite.md +57 -0
- package/dist/lite/standards/tier-tag-schema.md +155 -0
- package/dist/lite/standards/two-layer-config.md +99 -0
- package/dist/lite/standards/use-case-format.md +292 -0
- package/dist/lite/standards/user-story-invest.md +268 -0
- package/dist/lite/standards/velocity-and-appetite.md +229 -0
- package/dist/lite/standards/voice-input-pattern.md +119 -0
- package/dist/lite/standards/whereami-schema.md +301 -0
- package/dist/lite/standards/worktree-management.md +211 -0
- package/dist/lite/standards/writing-guide.md +213 -0
- package/dist/lite/templates/chronicle-template.md +75 -0
- package/dist/lite/templates/deferred-action-template.md +45 -0
- package/dist/lite/templates/memory-proposal-template.md +77 -0
- package/dist/lite/templates/persona-template.md +200 -0
- package/dist/lite/templates/pr-faq.md +45 -0
- package/dist/lite/templates/secret-rotation-template.md +162 -0
- package/dist/lite/templates/spec-template.md +131 -0
- package/dist/lite/templates/use-case-template.md +194 -0
- package/dist/lite/templates/user-story-template.md +107 -0
- package/dist/lite/templates/whereami-template.md +101 -0
- package/package.json +1 -1
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
---
|
|
2
|
+
adr: 044
|
|
3
|
+
tier: lite
|
|
4
|
+
title: Unified SKILL body template — converges Amazon PR-FAQ, Cooper, Krug, Beck, Anthropic, OpenAI
|
|
5
|
+
status: proposed
|
|
6
|
+
date: 2026-07-19
|
|
7
|
+
supersedes:
|
|
8
|
+
- ADR-040 Decision 4
|
|
9
|
+
authoring_luminaries:
|
|
10
|
+
primary:
|
|
11
|
+
- amazon-pr-faq
|
|
12
|
+
- alan-cooper
|
|
13
|
+
- steve-krug
|
|
14
|
+
- kent-beck
|
|
15
|
+
supporting:
|
|
16
|
+
- anthropic (external — platform.claude.com best practices + skill-creator SKILL.md)
|
|
17
|
+
- openai (external — OpenAI Academy skills guidance)
|
|
18
|
+
tickets:
|
|
19
|
+
- sunj-labs/bassclef-upstream#798
|
|
20
|
+
description: Bassclef ships two competing SKILL body specs.
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
# ADR-044 — Unified SKILL body template
|
|
24
|
+
|
|
25
|
+
## Context
|
|
26
|
+
|
|
27
|
+
Bassclef ships two competing SKILL body specs. ADR-040 Decision 4 prescribes an Amazon PR-FAQ shape (H1 + mock announcement + when-to-use + FAQ + details below the fold). `.claude/skills/skill/SKILL.md` Step 3 prescribes a different scaffold (When to use / When NOT to use / Usage / Procedure / Composes with / Distinct from / Rules / Sources read / Why this skill exists). Neither cites the other. Neither embeds every discipline the converged best practices name.
|
|
28
|
+
|
|
29
|
+
Bet 19i audit at `architecture/audits/2026-07-19-scope-a-pre-simplification-intent.md` surfaced two follow-on problems:
|
|
30
|
+
|
|
31
|
+
- INSTEAD-block regression across 12 of 17 planning-adjacent skills after Scope A + Scope B rewrites. Grandfathered through 2026-08-18 per bassclef#1249 allowlist.
|
|
32
|
+
- Scope A + Scope B applied ADR-040 D4 and stripped disciplines the `/skill` scaffold still enforces (INSTEAD blocks, Composes with, Distinct from, When NOT to use).
|
|
33
|
+
|
|
34
|
+
An internal consultation compared 4 luminaries against 3 external best-practice sources. Six disciplines carry three or more upvotes from independent sources. Two more disciplines (progressive disclosure, examples pattern) are Anthropic's biggest recommendations neither current template names.
|
|
35
|
+
|
|
36
|
+
Operator picked path c per direct feedback on 2026-07-19 — one unified template supersedes both prior specs.
|
|
37
|
+
|
|
38
|
+
## Decision
|
|
39
|
+
|
|
40
|
+
Every rewritten SKILL body follows the unified template below. This ADR supersedes ADR-040 Decision 4 for SKILL body shape. The `/skill` skill's Step 3 scaffold updates to output this template. The `substrate-clarity-gate.sh` hook extends to check for missing sections (advisory V1; BLOCK V2 after grace window).
|
|
41
|
+
|
|
42
|
+
### Frontmatter
|
|
43
|
+
|
|
44
|
+
Required fields per bassclef#377 + Anthropic naming spec:
|
|
45
|
+
|
|
46
|
+
- `name` — lowercase-letters + numbers + hyphens; up to 64 chars. Gerund form preferred (`processing-pdfs`, `writing-documentation`) per Anthropic; noun phrase or action-oriented forms accepted.
|
|
47
|
+
- `description` — up to 280 chars per bassclef#377. Third person per Anthropic mandate. Includes both what the skill does AND when to use it. Pushy trigger per Anthropic skill-creator ("Use whenever the user mentions X").
|
|
48
|
+
- `tier` — one of `upstream | lite | standard | ultra` per ADR-043 tier axis.
|
|
49
|
+
- `maturity` — one of `alpha | beta | stable | hardened` per ADR-043 maturity axis. Optional; defaults to `stable` when absent.
|
|
50
|
+
- `user_invocable`, `disable_model_invocation` — Anthropic Claude Code convention.
|
|
51
|
+
- `modes` / `tiers` / `sizes` — YAML list when applicable. Mirrored inline in description per bassclef#535.
|
|
52
|
+
- `composes_with` — YAML list of skill names this skill dispatches. Enforced by substrate-clarity-gate to resolve to real skills.
|
|
53
|
+
- `depends_on` — YAML list of preconditions (skills, rules, or config blocks). Advisory in V1.
|
|
54
|
+
|
|
55
|
+
### Body sections (in order)
|
|
56
|
+
|
|
57
|
+
1. **`# /skill-name`** — H1 with plain-English slash-command form. Krug trunk-test signal: reader identifies the skill at first line.
|
|
58
|
+
|
|
59
|
+
2. **`## What you get`** — outcome-framed opener. Past tense as if the skill already shipped its result. Amazon PR-FAQ discipline: describe what the operator sees when the skill finishes, not the mechanics. One to two paragraphs; grade 8-9 English.
|
|
60
|
+
|
|
61
|
+
3. **`## When to use it`** — persona-explicit discriminator per Cooper. Open with the primary persona ("Sam invokes this when...") when persona applies. Otherwise open with the triggering condition. Includes the discriminator against sibling skills. One paragraph.
|
|
62
|
+
|
|
63
|
+
4. **`## When NOT to use`** — Krug trunk-test / anti-scope. Names skills the reader should reach for instead. One paragraph or bullet list.
|
|
64
|
+
|
|
65
|
+
5. **`## FAQ`** — 4 to 6 anticipated adopter questions with 2-3 sentence answers each. Questions written in third person from the reader's viewpoint ("What does X do?"; not "How do I use X?"). Krug + Cooper discipline; Amazon PR-FAQ shape.
|
|
66
|
+
|
|
67
|
+
6. **`## Details below the fold`** — the runnable protocol. Numbered steps with feedback loops named per Anthropic + Beck. Optional if the skill body is dispatch-only.
|
|
68
|
+
|
|
69
|
+
7. **`## Examples`** — input / output pairs for output-quality-critical skills. Anthropic + OpenAI + Beck agree. Required when the skill produces prose, code, or structured output the operator will read or ship. Optional when the skill is action-only (e.g., pure state read).
|
|
70
|
+
|
|
71
|
+
8. **`## Anti-patterns and INSTEAD`** — required table per Cooper + Krug + bassclef#371. Left column names the anti-pattern; right column names the INSTEAD substitute. At least 3 rows. Enforced by substrate-clarity-gate.
|
|
72
|
+
|
|
73
|
+
9. **`## Composes with`** — bullet list of skills this skill dispatches OR extends. Relational metadata; substrate-clarity-gate verifies references resolve.
|
|
74
|
+
|
|
75
|
+
10. **`## Distinct from`** — bullet list of adjacent skills the reader might confuse with this one; each entry names how this one differs. Cooper disambiguation.
|
|
76
|
+
|
|
77
|
+
11. **`## Rules`** — self-check bullets the agent runs before / during / after. Anthropic feedback-loop discipline made explicit.
|
|
78
|
+
|
|
79
|
+
12. **`## Output discipline`** — dispatch `/kiss words --grade10` on the full rendered output before posting. Applies to opener + tables + cards + step details + recommendation + closing prose. Not just the opener. Not an inline BLOCK-term scan. Actual skill dispatch per bassclef-upstream#858 pilot on /longrun + /sprint. Required for skills that emit operator-facing prose. Skipped only when the skill emits no operator-facing prose (pure state read, JSON output only) — declare `no_operator_output: true` in frontmatter to opt out. Added by bassclef-upstream#859 Iteration A WU-A1.
|
|
80
|
+
|
|
81
|
+
13. **`## Test cases`** — evaluation prompts per Anthropic + Beck. Required when the skill body is over 100 lines OR ships to bassclef-lite. Each test carries an ID, a prompt, and expected behavior. Small skills MAY defer to a stub row.
|
|
82
|
+
|
|
83
|
+
14. **`## Sources read`** — evidence trail per bassclef#559 (assert-only-after-verify). Every claim in the body cites the source read inline. Placeholder for the author to fill.
|
|
84
|
+
|
|
85
|
+
15. **`## Why this skill exists`** — rationale for the reader. Names the class of failure the skill prevents or the pattern it captures.
|
|
86
|
+
|
|
87
|
+
### Progressive disclosure
|
|
88
|
+
|
|
89
|
+
Anthropic's biggest recommendation. When the SKILL.md body approaches 500 lines, split domain-specific detail into referenced files at `.claude/skills/<slug>/references/<domain>.md`. Reference files must be one level deep from SKILL.md — Claude will partially read files that reference other files.
|
|
90
|
+
|
|
91
|
+
Reference files longer than 100 lines carry a table of contents at the top per Anthropic.
|
|
92
|
+
|
|
93
|
+
Executable scripts live at `.claude/skills/<slug>/scripts/`. Scripts execute via bash; their contents do not consume context tokens until read.
|
|
94
|
+
|
|
95
|
+
### Prose disciplines (mandatory across every section)
|
|
96
|
+
|
|
97
|
+
Two clarity checks fire at compose time via `/skill` Step 4 and again at Write time via the settings.json hook chain:
|
|
98
|
+
|
|
99
|
+
- **FKGL grade 8-9 for 80% of prose; ceiling 10 per sentence** per bassclef#790 + `.claude/rules/operator-facing-prose.md`. Enforced by `.claude/hooks/skill-body-grade-gate.sh`. Structured spec content that legitimately grades high uses `<!-- FKGL-EXEMPT: reason --> ... <!-- /FKGL-EXEMPT -->` blocks.
|
|
100
|
+
- **Compound nouns outside the allowlist BLOCK** per `standards/bassclef-internal-jargon.md`. Enforced by `.claude/hooks/compound-noun-scrub.sh`. Allowlist covers standard tech vocab (pre-commit, YAML, API). Bassclef-internal compounds (load-bearing, blast-radius, tier-preset) are the substitution table's block list.
|
|
101
|
+
|
|
102
|
+
The `/skill` scaffold at Step 4 runs the full three-layer chain before Write — substrate-clarity-gate + skill-body-grade-gate + compound-noun-scrub. A `/skill` dispatch that produces a draft failing any layer returns to Step 2 (description work) or Step 3 (body work) automatically. The composer catches issues at compose time, not at Write time.
|
|
103
|
+
|
|
104
|
+
### Grace window
|
|
105
|
+
|
|
106
|
+
Per `.claude/rules/we-dont-break-adopters.md` — existing SKILL bodies read through 2026-10-31 under prior shapes (ADR-040 D4 or the older `/skill` scaffold). New skills authored from this ADR's ship date land under the unified template. Existing skills refactored under bassclef-lite Path X''' start from their pre-2026-07-16 body per operator direction, apply the unified template, and regenerate baseline vectors per #795.
|
|
107
|
+
|
|
108
|
+
## Consequences
|
|
109
|
+
|
|
110
|
+
### Positive
|
|
111
|
+
|
|
112
|
+
- One template governs SKILL body shape across bassclef. Two-template drift retires.
|
|
113
|
+
- INSTEAD-block discipline enforced by required Anti-patterns section. Closes bassclef#1249 allowlist grace at expiry.
|
|
114
|
+
- Progressive disclosure enables SKILL bodies to grow without exceeding 500 lines. Anthropic-native pattern.
|
|
115
|
+
- Examples pattern makes output-quality-critical skills verifiable at read time.
|
|
116
|
+
- Test cases section makes every SKILL body evaluation-ready per Anthropic.
|
|
117
|
+
- Persona-explicit discriminator per Cooper; adopters see who the skill serves at first glance.
|
|
118
|
+
- ADR-043 tier + maturity fields codified in the frontmatter spec.
|
|
119
|
+
|
|
120
|
+
### Negative
|
|
121
|
+
|
|
122
|
+
- Longer body sections list than ADR-040 D4 (14 sections vs 5). Trade-off: comprehensive vs terse.
|
|
123
|
+
- Every SKILL body under 100 lines still owes at least the required sections. Small skills gain overhead.
|
|
124
|
+
- Refactor cost across ~30 lite skills starting from pre-2026-07-16 bodies is substantial. Grace window absorbs.
|
|
125
|
+
|
|
126
|
+
### Neutral
|
|
127
|
+
|
|
128
|
+
- The `/skill` scaffold updates to output the unified template. Existing scaffold users get the new shape from the next `/skill` dispatch.
|
|
129
|
+
- `substrate-clarity-gate.sh` V1 advisory; V2 BLOCK after grace window closes.
|
|
130
|
+
|
|
131
|
+
## Alternatives considered
|
|
132
|
+
|
|
133
|
+
**Path a — patch ADR-040 D4 to add INSTEAD-block requirement only.** Smallest cure; closes the INSTEAD-block regression. Rejected because it leaves the two-template drift.
|
|
134
|
+
|
|
135
|
+
**Path b — patch both ADR-040 D4 and the `/skill` scaffold to add missing convergence disciplines.** Middle ground; keeps two specs synchronized. Rejected because keeping two specs synchronized is the root failure mode. One breaks; the other rots.
|
|
136
|
+
|
|
137
|
+
**Path c — one ADR-044 replaces both.** Selected. Root-cause fix.
|
|
138
|
+
|
|
139
|
+
## Related decisions
|
|
140
|
+
|
|
141
|
+
- ADR-040 Decision 4 (superseded by this ADR for SKILL body shape)
|
|
142
|
+
- ADR-040 Decision 1 (planning-skill vocabulary — bet → goal, chronicle → session log) — unrelated to shape; stays as-is
|
|
143
|
+
- ADR-041 (adopter-count-based grace window discipline)
|
|
144
|
+
- ADR-043 (two-axis tier + maturity)
|
|
145
|
+
|
|
146
|
+
## Sources read
|
|
147
|
+
|
|
148
|
+
- Consultation memo at operator-private consultation path (local-only)
|
|
149
|
+
- `.claude/luminaries/amazon-pr-faq.md`
|
|
150
|
+
- `.claude/luminaries/alan-cooper.md`
|
|
151
|
+
- `.claude/luminaries/steve-krug.md`
|
|
152
|
+
- `.claude/luminaries/kent-beck.md`
|
|
153
|
+
- External — platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices via WebFetch
|
|
154
|
+
- External — github.com/anthropics/skills/blob/main/skills/skill-creator/SKILL.md via WebFetch
|
|
155
|
+
- External — academy.openai.com/public/clubs/work-users-ynjqu/resources/skills via WebFetch
|
|
156
|
+
- `architecture/decisions/ADR-040-planning-skill-vocabulary-and-lite-profile.md` § Decision 4
|
|
157
|
+
- `.claude/skills/skill/SKILL.md` Step 3 scaffold
|
|
158
|
+
- `.claude/rules/context-engineering.md` (bassclef#371)
|
|
159
|
+
- `.claude/rules/skill-description-clarity.md` (bassclef#377)
|
|
160
|
+
- `.claude/hooks/substrate-clarity-gate.sh` (bassclef#382)
|
|
161
|
+
- `architecture/audits/2026-07-19-scope-a-pre-simplification-intent.md`
|
|
162
|
+
- Operator direct feedback on 2026-07-19 (path c pick + pre-2026-07-16 constraint)
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# tier: lite
|
|
3
|
+
# install-class: dual
|
|
4
|
+
# lib/clean-artifacts-sweep.sh — shared deep module for workflow-exhaust
|
|
5
|
+
# sweep. Both /session-end (lite) and /clean-artifacts (standard) source this.
|
|
6
|
+
#
|
|
7
|
+
# Public interface (per docs/decompositions/2026-08-25-clean-artifacts-sweep.md):
|
|
8
|
+
# clean_artifacts_sweep [--delete] [--age=N]
|
|
9
|
+
#
|
|
10
|
+
# Env:
|
|
11
|
+
# SWEEP_ROOT — root directory to sweep (default: $PWD)
|
|
12
|
+
# CURRENT_BRANCH — current branch for marker exclusion (default: git detect)
|
|
13
|
+
#
|
|
14
|
+
# Exit codes:
|
|
15
|
+
# 0 — sweep completed (dry-run or delete)
|
|
16
|
+
# 1 — refusal (too many / too large / bad state)
|
|
17
|
+
# 2 — delete error (partial state; caller reports)
|
|
18
|
+
#
|
|
19
|
+
# Anchor luminaries: @luminary john-ousterhout (deep module),
|
|
20
|
+
# @luminary tony-hoare (safety list is precondition boundary),
|
|
21
|
+
# @luminary alan-cooper (Sam-language in stdout),
|
|
22
|
+
# @luminary michael-feathers (characterization of SKILL body L1-L230).
|
|
23
|
+
|
|
24
|
+
clean_artifacts_sweep() {
|
|
25
|
+
local delete=0 age_override="" arg
|
|
26
|
+
for arg in "$@"; do
|
|
27
|
+
case "$arg" in
|
|
28
|
+
--delete) delete=1 ;;
|
|
29
|
+
--age=*) age_override="${arg#--age=}" ;;
|
|
30
|
+
*) echo "clean_artifacts_sweep: unknown arg '$arg'" >&2; return 1 ;;
|
|
31
|
+
esac
|
|
32
|
+
done
|
|
33
|
+
|
|
34
|
+
local root="${SWEEP_ROOT:-$PWD}"
|
|
35
|
+
local cur_branch="${CURRENT_BRANCH:-$(git -C "$root" rev-parse --abbrev-ref HEAD 2>/dev/null || echo '')}"
|
|
36
|
+
local cur_slug="${cur_branch#feature/}"; cur_slug="${cur_slug#fix/}"; cur_slug="${cur_slug//\//-}"
|
|
37
|
+
|
|
38
|
+
local age_marker=7 age_screenshot=7 age_trace=30
|
|
39
|
+
if [ -n "$age_override" ]; then
|
|
40
|
+
age_marker="$age_override"; age_screenshot="$age_override"; age_trace="$age_override"
|
|
41
|
+
fi
|
|
42
|
+
|
|
43
|
+
# Enumerate per category
|
|
44
|
+
local -a candidates=()
|
|
45
|
+
local f
|
|
46
|
+
if [ -d "$root/state/markers/verify" ]; then
|
|
47
|
+
while IFS= read -r -d '' f; do candidates+=("$f"); done \
|
|
48
|
+
< <(find "$root/state/markers/verify" -type f -name '*.marker' -mtime +"$age_marker" -print0 2>/dev/null)
|
|
49
|
+
fi
|
|
50
|
+
if [ -d "$root/.playwright-mcp" ]; then
|
|
51
|
+
while IFS= read -r -d '' f; do candidates+=("$f"); done \
|
|
52
|
+
< <(find "$root/.playwright-mcp" -type f \( -name '*.png' -o -name '*.yaml' \) -mtime +"$age_screenshot" -print0 2>/dev/null)
|
|
53
|
+
fi
|
|
54
|
+
if [ -d "$root/docs/sdlc-traces" ]; then
|
|
55
|
+
while IFS= read -r -d '' f; do candidates+=("$f"); done \
|
|
56
|
+
< <(find "$root/docs/sdlc-traces" -type f -name '*.log' -mtime +"$age_trace" -print0 2>/dev/null)
|
|
57
|
+
fi
|
|
58
|
+
|
|
59
|
+
# Safety-list filter
|
|
60
|
+
local -a survivors=()
|
|
61
|
+
for f in ${candidates[@]+"${candidates[@]}"}; do
|
|
62
|
+
local base rel
|
|
63
|
+
rel="${f#"$root"/}"
|
|
64
|
+
base="$(basename "$f")"
|
|
65
|
+
case "$rel" in
|
|
66
|
+
.claude/CHECKPOINT.md|.claude/SESSION_LOCK|.claude/LAST_SAVE) continue ;;
|
|
67
|
+
esac
|
|
68
|
+
if [ -n "$cur_slug" ] && [ "$base" = "feature-${cur_slug}.marker" ]; then continue; fi
|
|
69
|
+
if git -C "$root" ls-files --error-unmatch "$rel" >/dev/null 2>&1; then continue; fi
|
|
70
|
+
survivors+=("$f")
|
|
71
|
+
done
|
|
72
|
+
|
|
73
|
+
local n=${#survivors[@]}
|
|
74
|
+
|
|
75
|
+
# Refusal thresholds (Hoare precondition)
|
|
76
|
+
if [ "$n" -gt 100 ]; then
|
|
77
|
+
echo "Refusing sweep — candidate count $n exceeds safe threshold (100). Inspect clean-targets table before override." >&2
|
|
78
|
+
return 1
|
|
79
|
+
fi
|
|
80
|
+
local total_bytes=0 sz
|
|
81
|
+
for f in ${survivors[@]+"${survivors[@]}"}; do
|
|
82
|
+
sz=$(wc -c < "$f" 2>/dev/null | tr -d ' ')
|
|
83
|
+
total_bytes=$((total_bytes + ${sz:-0}))
|
|
84
|
+
done
|
|
85
|
+
if [ "$total_bytes" -gt 52428800 ]; then
|
|
86
|
+
echo "Refusing sweep — total size ${total_bytes} bytes exceeds safe threshold (50 MB)." >&2
|
|
87
|
+
return 1
|
|
88
|
+
fi
|
|
89
|
+
|
|
90
|
+
if [ "$n" -eq 0 ]; then
|
|
91
|
+
echo "Sweeping stale files... nothing to clean."
|
|
92
|
+
return 0
|
|
93
|
+
fi
|
|
94
|
+
|
|
95
|
+
local kb=$((total_bytes / 1024))
|
|
96
|
+
if [ "$delete" -eq 0 ]; then
|
|
97
|
+
echo "Sweeping stale files... Would remove $n files (${kb} KB)"
|
|
98
|
+
return 0
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
local removed=0
|
|
102
|
+
for f in "${survivors[@]}"; do
|
|
103
|
+
if rm -f "$f" 2>/dev/null; then
|
|
104
|
+
removed=$((removed + 1))
|
|
105
|
+
else
|
|
106
|
+
echo "Removed $removed of $n before error at $f" >&2
|
|
107
|
+
return 2
|
|
108
|
+
fi
|
|
109
|
+
done
|
|
110
|
+
echo "Removed $removed files (${kb} KB)"
|
|
111
|
+
return 0
|
|
112
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# tier: lite
|
|
3
|
+
# code-comment-discipline.sh — classifier lib for header comment blocks
|
|
4
|
+
# in bash source files.
|
|
5
|
+
#
|
|
6
|
+
# Answers per file: does the header comment block carry bassclef-internal
|
|
7
|
+
# jargon per standards/bassclef-internal-jargon.md BLOCK-tier terms? Returns
|
|
8
|
+
# a count + list of hits.
|
|
9
|
+
#
|
|
10
|
+
# Sister to lib/output-discipline.sh (goal 25a) — one classifies SKILL/rule
|
|
11
|
+
# body prose for /kiss dispatch presence; this one classifies bash header
|
|
12
|
+
# comments for jargon presence. Same Ousterhout deep-module shape.
|
|
13
|
+
#
|
|
14
|
+
# Per bassclef-upstream#859 Iteration C goal 25b WU-5. Bash 3.2+ compatible.
|
|
15
|
+
#
|
|
16
|
+
# Usage — sourced by /audit-code-comment-discipline skill:
|
|
17
|
+
# source lib/code-comment-discipline.sh
|
|
18
|
+
# extract_header_comments <file> # prints header comment lines
|
|
19
|
+
# count_jargon_hits <file> # prints hit count to stdout
|
|
20
|
+
# list_jargon_hits <file> # prints one line per hit "term|line#"
|
|
21
|
+
# walk_code_files <type> # prints one path per line
|
|
22
|
+
# load_block_terms # loads BLOCK terms into a global var
|
|
23
|
+
|
|
24
|
+
set -o pipefail
|
|
25
|
+
|
|
26
|
+
# === Global: BLOCK terms loaded from standards/bassclef-internal-jargon.md ===
|
|
27
|
+
# Populated on demand via load_block_terms. Bash 3.2 has no associative arrays;
|
|
28
|
+
# a newline-separated string works fine here.
|
|
29
|
+
CCD_BLOCK_TERMS=""
|
|
30
|
+
|
|
31
|
+
# === Load BLOCK terms from the wordlist ===
|
|
32
|
+
# Reads the wordlist table + extracts the term column for BLOCK-tier rows.
|
|
33
|
+
# Skips ADVISE + ALLOW + BLOCK-title tiers. Cached after first load.
|
|
34
|
+
load_block_terms() {
|
|
35
|
+
[ -n "$CCD_BLOCK_TERMS" ] && return 0
|
|
36
|
+
|
|
37
|
+
local wordlist="${CCD_WORDLIST:-standards/bassclef-internal-jargon.md}"
|
|
38
|
+
[ ! -f "$wordlist" ] && return 1
|
|
39
|
+
|
|
40
|
+
# Table row shape: | term | plain | TIER |
|
|
41
|
+
# Grep BLOCK rows only (exclude BLOCK-title); extract first column between pipes.
|
|
42
|
+
CCD_BLOCK_TERMS=$(grep -E '^\|.*\|.*\|[[:space:]]*BLOCK[[:space:]]*\|' "$wordlist" 2>/dev/null \
|
|
43
|
+
| awk -F '|' '{gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2); print $2}' \
|
|
44
|
+
| grep -v '^$')
|
|
45
|
+
return 0
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
# === extract_header_comments — print header comment lines ===
|
|
49
|
+
# Header block = leading `#` comment lines from top of file, skipping the
|
|
50
|
+
# shebang, until the first blank line OR the first non-comment/non-blank line.
|
|
51
|
+
# Returns 0 always.
|
|
52
|
+
extract_header_comments() {
|
|
53
|
+
local file="$1"
|
|
54
|
+
[ ! -f "$file" ] && return 0
|
|
55
|
+
|
|
56
|
+
awk '
|
|
57
|
+
NR == 1 && /^#!/ { next } # skip shebang
|
|
58
|
+
/^#/ { print; next } # keep comment lines
|
|
59
|
+
/^[[:space:]]*$/ { exit } # blank line ends header block
|
|
60
|
+
{ exit } # any other line ends header
|
|
61
|
+
' "$file"
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
# === count_jargon_hits — count BLOCK-term hits in header comment ===
|
|
65
|
+
# Prints an integer to stdout. Exit 0 always.
|
|
66
|
+
count_jargon_hits() {
|
|
67
|
+
local file="$1"
|
|
68
|
+
[ ! -f "$file" ] && { echo 0; return 0; }
|
|
69
|
+
|
|
70
|
+
load_block_terms
|
|
71
|
+
[ -z "$CCD_BLOCK_TERMS" ] && { echo 0; return 0; }
|
|
72
|
+
|
|
73
|
+
local header
|
|
74
|
+
header=$(extract_header_comments "$file")
|
|
75
|
+
[ -z "$header" ] && { echo 0; return 0; }
|
|
76
|
+
|
|
77
|
+
local count=0
|
|
78
|
+
local term
|
|
79
|
+
# Iterate over BLOCK terms; count case-insensitive substring matches.
|
|
80
|
+
while IFS= read -r term; do
|
|
81
|
+
[ -z "$term" ] && continue
|
|
82
|
+
# Skip very long descriptive rows (they carry commentary in the wordlist).
|
|
83
|
+
[ "${#term}" -gt 40 ] && continue
|
|
84
|
+
if echo "$header" | grep -qiF -- "$term"; then
|
|
85
|
+
count=$((count + 1))
|
|
86
|
+
fi
|
|
87
|
+
done <<< "$CCD_BLOCK_TERMS"
|
|
88
|
+
|
|
89
|
+
echo "$count"
|
|
90
|
+
return 0
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
# === list_jargon_hits — one line per hit ===
|
|
94
|
+
# Format: "term|first-line-in-header-where-it-appears"
|
|
95
|
+
# Prints nothing when clean. Exit 0 always.
|
|
96
|
+
list_jargon_hits() {
|
|
97
|
+
local file="$1"
|
|
98
|
+
[ ! -f "$file" ] && return 0
|
|
99
|
+
|
|
100
|
+
load_block_terms
|
|
101
|
+
[ -z "$CCD_BLOCK_TERMS" ] && return 0
|
|
102
|
+
|
|
103
|
+
local header
|
|
104
|
+
header=$(extract_header_comments "$file")
|
|
105
|
+
[ -z "$header" ] && return 0
|
|
106
|
+
|
|
107
|
+
local term line
|
|
108
|
+
while IFS= read -r term; do
|
|
109
|
+
[ -z "$term" ] && continue
|
|
110
|
+
[ "${#term}" -gt 40 ] && continue
|
|
111
|
+
line=$(echo "$header" | grep -inF -- "$term" | head -1)
|
|
112
|
+
[ -n "$line" ] && echo "${term}|${line}"
|
|
113
|
+
done <<< "$CCD_BLOCK_TERMS"
|
|
114
|
+
|
|
115
|
+
return 0
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
# === walk_code_files — enumerate bash source files ===
|
|
119
|
+
# Types: hooks | scripts | libs | all. Prints one path per line.
|
|
120
|
+
walk_code_files() {
|
|
121
|
+
local type="$1"
|
|
122
|
+
local root="${2:-.}"
|
|
123
|
+
|
|
124
|
+
case "$type" in
|
|
125
|
+
hooks|hook)
|
|
126
|
+
find "$root/.claude/hooks" -maxdepth 1 -name "*.sh" -type f 2>/dev/null | sort
|
|
127
|
+
;;
|
|
128
|
+
scripts|script)
|
|
129
|
+
find "$root/scripts" -maxdepth 1 -name "*.sh" -type f 2>/dev/null | sort
|
|
130
|
+
;;
|
|
131
|
+
libs|lib)
|
|
132
|
+
find "$root/lib" -maxdepth 1 -name "*.sh" -type f 2>/dev/null | sort
|
|
133
|
+
;;
|
|
134
|
+
all)
|
|
135
|
+
walk_code_files hooks "$root"
|
|
136
|
+
walk_code_files scripts "$root"
|
|
137
|
+
walk_code_files libs "$root"
|
|
138
|
+
;;
|
|
139
|
+
*)
|
|
140
|
+
return 1
|
|
141
|
+
;;
|
|
142
|
+
esac
|
|
143
|
+
return 0
|
|
144
|
+
}
|