docs: surface Conventional Commits requirement across agent entry points

The implementer + reviewer sandcastle prompts already enforce
conventional commits, but the convention was buried in those prompt
templates — agents not running through sandcastle (e.g. interactive
Claude sessions, ad-hoc fixups) had no visible signal that the format
is non-negotiable.

Four visibility surfaces now carry the signal:

  - CLAUDE.md Key Conventions: new top bullet stating the spec
    (<type>(<scope>): <subject>), the full type list, breaking-change
    syntax (!), and three example commits
  - AGENTS.md preamble: parallel callout alongside the vocabulary
    and quality-gates notes
  - .claude/hooks/session-start.sh: one-line reminder in the boot
    pointers (every session now sees it at start)
  - .claude/hooks/prompt-context.sh: new 10th keyword group fires
    when a user prompt mentions commit/message/changelog/conventional,
    injecting the full spec into the turn's context

Conventional Commits spec: https://www.conventionalcommits.org/

Verified: the prompt-context hook smoke-tests green when a prompt
containing "commit message" is piped in — it emits the conventional
commits pointer.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-13 17:07:10 +02:00
parent 365c521076
commit 7193acd1d1
4 changed files with 7 additions and 0 deletions

View File

@@ -37,6 +37,9 @@ fi
if echo "$prompt" | grep -qE 'coverage|uncovered|lcov|mutation|stryker|coverage band'; then
inject+=('Coverage: ADR-020 + docs/guides/coverage.md (cookbook). 4 layers — L0 vitest thresholds, L1 pnpm coverage:diff (cover-the-diff), L2 coverage/summary.json (committed trend), L3 pnpm mutate (Stryker on entities + use-cases). Manifest-driven: feature.manifest.ts coverage.bands is the single source of truth.')
fi
if echo "$prompt" | grep -qE 'commit|message|changelog|conventional'; then
inject+=('Conventional Commits (non-negotiable): <type>(<scope>): <imperative subject> (≤72 chars). Types: feat|fix|docs|style|refactor|test|chore|perf|ci|build|revert. Use `!` for breaking changes. Body explains WHY if non-obvious. Examples: feat(auth): hash password before persisting; refactor(docs)!: consolidate scaffolding into guides. See CLAUDE.md Key Conventions.')
fi
if [ ${#inject[@]} -gt 0 ]; then
echo "=== context-relevant pointers (from .claude/hooks/prompt-context.sh) ==="

View File

@@ -9,6 +9,7 @@ Architecture: AGENTS.md, docs/architecture/overview.md, docs/architecture/agent-
Workflow: pnpm work status | pnpm work next | pnpm work dispatch (ADR-019)
Generator-first: pnpm turbo gen <kind> beats hand-rolled scaffolding (non-negotiable)
Conformance: pnpm conformance + pnpm fallow (5-gate drift detection)
Conventional Commits (non-negotiable): <type>(<scope>): <subject> — see CLAUDE.md Key Conventions
Skills: to-prd, grill-with-docs, grill-me, handoff (.claude/skills/)
EOF