Files
agentic-dev/.claude/hooks/post-manifest-edit.sh
Danijel Martinek f77e6ea881 chore(template): clean-slate template snapshot from bb4a0c7
Curated, product-agnostic snapshot of the post-story-04 tree: demo
content deleted, auth-only reference feature, web-next shell, all gates
green. Product-specific docs, ADRs 027-029, PRDs/epics/archive, editor
library traces, and product naming are curated out; generic template
repairs (coverage provider devDeps, root test:coverage script, live
lint fixes, root-only release-please) are kept. See TEMPLATE.md for
provenance, curation list, and usage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
2026-07-12 20:40:54 +02:00

32 lines
988 B
Bash
Executable File

#!/usr/bin/env bash
# Tier 3 — when a feature.manifest.ts is edited, remind the agent to surface
# drift and follow manifest-first ordering. Non-blocking (stderr exit 0 is
# visible in transcript; we don't want this to kill the agent's flow).
set -euo pipefail
input=$(cat)
file_path=$(printf '%s' "$input" | jq -r '.tool_input.file_path // ""')
if [[ "$file_path" != *"feature.manifest.ts" ]]; then
exit 0
fi
feature=$(echo "$file_path" | sed -nE 's|.*packages/([^/]+)/src/feature\.manifest\.ts$|\1|p')
cat >&2 <<EOF
[post-manifest-edit] feature.manifest.ts changed (${feature:-unknown feature})
Manifest-first ordering reminder:
(1) manifest entry ← you just did this
(2) contracts — xInputSchema, xOutputSchema, IXUseCase
(3) tests (red) — colocated *.test.ts
(4) implementation — use-case + controller + DI binding
Surface drift now:
pnpm --filter @repo/${feature:-<feature>} test typecheck lint
pnpm conformance
EOF
exit 0