File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,6 +131,10 @@ your-project/
131131- ` .codex/hooks.json ` : the same ` PostToolUse ` hook for Codex
132132- ` .agents/hooks/format-python.sh ` : the hook script, runs ` ruff format ` and ` ruff check --fix ` on the edited file
133133
134+ Both tools apply this configuration only in a trusted project. Claude Code asks once when you open the
135+ project; Codex additionally requires reviewing and trusting the hook with ` /hooks ` , and silently skips it
136+ until then.
137+
134138## Q&A
135139
136140### How do I run type checking?
Original file line number Diff line number Diff line change @@ -30,6 +30,22 @@ uv run ruff check .
3030uv run ruff check . --fix
3131```
3232
33+ ### AI Coding Agents
34+
35+ Rules for agents live in ` AGENTS.md ` (` CLAUDE.md ` imports it). A shared hook formats and lints every Python
36+ file right after Claude Code or Codex edits it, and reports the remaining diagnostics back to the agent:
37+
38+ - ` .agents/hooks/format-python.sh ` : the hook script, runs ` ruff format ` and ` ruff check --fix `
39+ - ` .claude/settings.json ` : Claude Code permissions and the ` PostToolUse ` hook (committed; put personal
40+ overrides in ` .claude/settings.local.json ` , which is git-ignored)
41+ - ` .codex/hooks.json ` : the same ` PostToolUse ` hook for Codex
42+
43+ Both tools require the project to be trusted before they apply its configuration:
44+
45+ - Claude Code: accept the trust prompt the first time you open the project.
46+ - Codex: trust the project, then review and trust the hook with ` /hooks ` . Until you do, Codex skips the
47+ hook without reporting an error.
48+
3349### Docker Development
3450
3551The template includes a complete Docker setup:
You can’t perform that action at this time.
0 commit comments