mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-29 23:27:44 +00:00
Codex (run locally) added AGENTS.md, .agents/skills symlinks and a .codex push hook; this makes both agents read one copy of everything: - AGENTS.md is now the single source of the project rules. .claude/CLAUDE.md imports it with @../AGENTS.md and keeps only Claude-specific notes; the res/ guide moves to amethyst/src/main/res/AGENTS.md the same way. - .agents/skills/<name> are symlinks to .claude/skills/<name>, never copies. - The push checks move to tools/agent-hooks/, run by .claude/settings.json, .codex/hooks.json (matched to Bash and the PR tool) and CI. The Codex hook now also runs spotless. The shared gate accepts Codex's payloads. - New agent_config_check.py (pre-push and CI) enforces the layout: symlinks, CLAUDE.md imports, AGENTS.md under Codex's 32 KiB doc limit, description length, the combined skill-list budget, and that every path a skill cites exists. - Fixes the Compose-escaping pre-push hook, which exited 1 on a hit and so never blocked a push (PreToolUse blocks only on exit 2). - Live docs point at AGENTS.md instead of .claude/CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
58 lines
1.3 KiB
JSON
58 lines
1.3 KiB
JSON
{
|
|
"env": {
|
|
"LANG": "C.UTF-8",
|
|
"LC_ALL": "C.UTF-8"
|
|
},
|
|
"hooks": {
|
|
"PreToolUse": [
|
|
{
|
|
"matcher": "Bash|mcp__github__create_pull_request",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "$CLAUDE_PROJECT_DIR/tools/agent-hooks/pre-push-spotless.sh",
|
|
"timeout": 180
|
|
},
|
|
{
|
|
"type": "command",
|
|
"command": "$CLAUDE_PROJECT_DIR/tools/agent-hooks/pre-push-orphan-strings.sh",
|
|
"timeout": 30
|
|
},
|
|
{
|
|
"type": "command",
|
|
"command": "$CLAUDE_PROJECT_DIR/tools/agent-hooks/pre-push-compose-escaping.sh",
|
|
"timeout": 30
|
|
},
|
|
{
|
|
"type": "command",
|
|
"command": "$CLAUDE_PROJECT_DIR/tools/agent-hooks/pre-push-agent-config.sh",
|
|
"timeout": 30
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"SessionStart": [
|
|
{
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/session-start.sh"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"Stop": [
|
|
{
|
|
"matcher": "",
|
|
"hooks": [
|
|
{
|
|
"type": "command",
|
|
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/stop-spotless.sh",
|
|
"timeout": 120
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|