Configuration
Hooks enforce the schema. Rules govern behavior. The lockfile verifies integrity.
Hooks
Hooks are shell scripts in .claude/hooks/ that run before or after tool calls. They are configured in .claude/settings.json.
PreToolUse hooks
pre-write-entity.sh
Runs before every Write or Edit to store/wiki/. Calls pre-write-entity.py to validate YAML frontmatter against the entity schema. Bad frontmatter blocks the write. The agent must fix the frontmatter, not bypass the hook.
block-wiki-rm.sh
Runs before every Bash command. Blocks rm commands targeting store/wiki/. Entity deletion must go through a merge operation, not a file removal.
enforce-commit-author.sh
Runs before git commit commands. Ensures the commit author is kamil seghrouchni <kamil.seg@gmail.com>. Commits must never be attributed to Claude.
PostToolUse hooks
post-write-wiki-reindex.sh
Runs after every Write or Edit to store/wiki/. Regenerates the 7 index files. Keeps the index in sync with entity changes without manual intervention.
post-write-wiki-changelog.sh
Runs after every Write or Edit to store/wiki/. Appends a line to store/wiki/changelog.jsonl recording what changed.
SessionStart hooks
session-start-rules-reinject.sh
Runs when a session starts after context compaction. Re-injects the commandments banner so rules survive long sessions.
Rules
Nine rule files under .claude/rules/. Each governs a specific aspect of the system. The full reference is at Rules reference.
evidence-standard.md-- every fact needs a verbatim quote, source ID, and implicationscoring-axes.md-- three independent axes (Scale, Cost, Quality), never compositemodel-allocation.md-- Opus orchestrates, Sonnet processesexample-rotation.md-- domain framing rotates A/B/C across neuro, oncology, microbiometransparency-principles.md-- provenance over bypass, both sidesentity-schema.md-- YAML frontmatter contract enforced by hookwiki-conventions.md-- slug rules, article shape, index filesautonomy.md-- do the best thing, then report what you did_commandments.md-- 10-line banner injected into every subagent dispatch
Skills lockfile
vcro-skills-lock.json records the SHA-256 hash of every skill, rule, and agent file at install time. The installer runs python3 scripts/skills_lock.py --check to verify integrity.
If a skill file has been modified since install, the check fails with a warning. This catches accidental edits. Intentional changes should update the lockfile with python3 scripts/skills_lock.py --update.
Settings file
.claude/settings.json defines the hook configuration. It follows the Claude Code settings schema. The hooks section maps tool matchers to shell commands with timeouts.
{
"hooks": {
"PreToolUse": [
{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": ".claude/hooks/pre-write-entity.sh",
"timeout": 10
}]
}
],
"PostToolUse": [
{
"matcher": "Write|Edit",
"hooks": [{
"type": "command",
"command": ".claude/hooks/post-write-wiki-reindex.sh",
"timeout": 30
}]
}
]
}
}