Vue SSR Hooks (Validation System)
Owns the post-task validation pipeline: format → lint → test.
Validation battery
Commands run in order (stop at first failure):
npx prettier --write . # format
npm run lint # eslint fix
npm run test:run # vitest single run
Short-circuit table
| Files modified | format | lint | test |
|---|---|---|---|
.vue, .js |
✅ | ✅ | ✅ |
.scss, .css only |
✅ | ✅ | ❌ skip |
.md, .json, config only |
❌ skip all | ❌ | ❌ |
Hook scripts
All scripts live in .claude/hooks/:
| Script | Purpose |
|---|---|
logs/logs.sh |
Logging infrastructure (timestamped entries) |
guards/changes/changes.sh |
Git digest sentinel (skip if no changes) |
guards/subagents/subagents.sh |
Block validation commands in sub-agent prompts |
scripts/lint/lint.sh |
Run eslint, report pass/fail |
scripts/test/test.sh |
Run vitest, report pass/fail |
scripts/format/format.sh |
Run prettier, report pass/fail |
Settings
.claude/settings._json contains the hook configuration (disabled via ._json extension). When activated, move content to .claude/settings.json.
Architecture decision: why hooks are disabled
The shell hooks (settings._json) are disabled due to a known Copilot bug that causes unreliable hook execution. The workaround is the hooks agent — the orchestrator delegates validation to it manually per the Task completion protocol in CLAUDE.md.
Do NOT re-enable by renaming to settings.json until the Copilot bug is confirmed fixed.
Two-path architecture:
- Current (active): Orchestrator → delegates to
hooksagent → agent runs format/lint/test - Future (when bug fixed): Stop event → shell scripts run automatically → no agent needed
The hooks agent
The hooks agent (model: haiku, tools: Bash) is the sole validation executor. The orchestrator delegates to it per the Task completion protocol in CLAUDE.md.
Guard: subagents
The subagents.sh guard blocks sub-agent prompts containing forbidden validation commands (npm test, npm run lint, npm run build). This enforces the centralized-validation rule.
Change detection
changes.sh computes a git digest (status + diff + untracked files → SHA). If the digest matches the last run's sentinel, validation is skipped (idempotent).
Source: e-xode/vue-ssr — distributed by TomeVault.