Add hook scaffolding support to projio add claude and a new projio claude update-hooks command.
Context¶
Projio already manages .claude/settings.json for per-project sandboxing (allowedTools, path-scoped Edit/Write). Hooks are the missing piece — Claude Code supports hooks in the same settings file but projio doesn't generate them.
Requirements¶
- Extend
projio add claude(insrc/projio/init.py) to also scaffold ahookssection in.claude/settings.json - Add
projio claude update-hooksCLI command (alongside existingupdate-permissions) that regenerates hooks from projio.toml config - Default hook templates to scaffold:
- PostToolUse on Edit/Write → project-specific lint command (if defined in projio.toml)
- PostToolUse on note_create →
indexio buildtrigger - PreToolUse on Bash → optional safety guard (log or block dangerous patterns)
- Hooks should be configurable in
projio.tomlunder a[claude.hooks]section update-hooksshould be idempotent likeupdate-permissions
Implementation notes¶
- Look at existing
_scaffold_claude_settings()andupdate_claude_permissions()in init.py for patterns - Hook format in settings.json:
{"hooks": {"PostToolUse": [{"matcher": "Edit|Write", "command": "..."}]}} - Keep hooks minimal by default — don't add hooks the project doesn't need
Source context: worklog¶
Worklog (worklog): Personal meta-tracking and coordination space
Recent commits:
28708f6 Update
5001ad2 Fix /read: send as .txt attachment so it opens natively on iOS/Android
2dd6e15 Fix /read: send large files as document attachments for full-content access on mobile
README:
Worklog¶
Arash's coordination space. Tracks projects, generates status reports, and sends notifications - without holding any datasets or scientific outputs.
Quick start¶
pip install -e . # core (registry + status)
pip install -e ".[bot]" # optional: telegram bot
Com¶
Related Notes¶
- [[issue-arash-20260328-193353-406929.md]] — Both touch projio CLI subcommand infrastructure — silent CLI bug and hook scaffolding both affect the same
projiocommand surface - [[issue-arash-20260327-141525-036428.md]] — Both are projio feature requests that extend the project setup/init layer (git-annex PATH injection vs hook scaffolding in projio add claude)