psychology

chevp-ai-framework

Lifecycle Gates Guidelines Commands Agents Templates
webhook Plugin Layer · Hooks

Hooks

Three Python hooks turn the lifecycle's discipline into mechanical enforcement.

Advisory by default — surface violations rather than hard-lock the editor.

The Three Hooks

UserPromptSubmit

mode-context.py

Per-turn reminder injected into every user prompt. Tells the AI: lifecycle is active, infer the mode, output the Adaptive Mode-Awareness Header, block forward jumps when gates are not passed, never write decided-by / approved-by.

Effect: keeps the process top-of-mind without bloating CLAUDE.md.

PreToolUse: Write/Edit

gate-check.py

Blocks production-code writes if no approved EXP plan exists. Process artifacts (plans, specs, ADRs, templates, docs, hooks, commands, agents, skills, README, CLAUDE.md, .md files) are always allowed — they are documentation. Source files require an approved EXP plan in a conventional location.

Effect: safety net that surfaces skipped steps with permissionDecision: ask — the user can always confirm.

PreToolUse: Write/Edit

provenance-check.py

Enforces architecture-governance provenance rules. AI must not set decided-by / approved-by / approved-at. AI must not mark an artifact approved / accepted itself. Existing approved-by values cannot be overwritten.

Effect: mechanical defence against the AI silently signing decisions on the human's behalf. See architecture-governance.

Hook Philosophy

Without the Plugin

The plugin layer is additive. Without it, the framework still works via @url loading and AI discipline. With the plugin installed, gate enforcement becomes mechanical (hooks) and mode transitions become explicit (slash commands).

menu_book

Read the source

hooks/ open_in_new