Files
brain/.claude/settings.json
T

292 lines
7.3 KiB
JSON

{
"$schema": "https://json.schemastore.org/claude-code-settings.json",
"permissions": {
"allow": [
"Bash(npm install:*)",
"Bash(npm run lint:md:*)",
"Bash(npm run spell:*)",
"Bash(npm run links:*)",
"Bash(npm run lint:css:*)",
"Bash(npm run a11y:*)",
"Bash(npm run check:docs:*)",
"Bash(npm run lint:md:fix:*)",
"Bash(npm run sast:*)",
"Bash(git status)",
"Bash(git diff)",
"Bash(git log:*)",
"Bash(git add:*)",
"Bash(node --version)",
"Bash(npm --version)",
"Bash(npx --version)",
"Bash(./bin/gitleaks:*)",
"Bash(./bin/lychee:*)",
"PowerShell(Get-ChildItem:*)",
"PowerShell(Test-Path:*)",
"PowerShell(Expand-Archive:*)",
"Read(**)",
"Glob(**)",
"Grep(**)"
],
"deny": [
"Bash(rm -rf:*)",
"Bash(git push --force:*)",
"Bash(git reset --hard:*)",
"Bash(npm publish:*)",
"PowerShell(Remove-Item:*-Recurse*)",
"PowerShell(Set-ExecutionPolicy:* -Scope LocalMachine*)"
]
},
"hooks": {
"PreToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "node -e \"const f=process.env.CLAUDE_FILE_PATH||''; const pd=process.env.CLAUDE_PROJECT_DIR||''; const path=require('path'); if (f && pd && path.resolve(f) === path.resolve(pd, 'CLAUDE.md')) { process.stderr.write('\\n[hook] WARNING: Direct edit of root CLAUDE.md detected. Per CLAUDE.md §5 п.10, prefer /claude-md-management:revise-claude-md or /claude-md-management:claude-md-improver. If invoked via that skill, this warning is informational.\\n'); }\""
}
]
},
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "node tools/enforce-floor.mjs",
"timeout": 10
}
]
},
{
"matcher": "Edit|Write|MultiEdit|NotebookEdit|Bash",
"hooks": [
{
"type": "command",
"command": "node tools/enforce-domain-skill-discipline.mjs",
"timeout": 10
}
]
},
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "node tools/enforce-supreme-gate.mjs",
"timeout": 10
}
]
},
{
"matcher": "*",
"hooks": [
{
"type": "command",
"command": "node tools/enforce-snapshot.mjs",
"timeout": 10
}
]
},
{
"matcher": "Edit|Write|MultiEdit|NotebookEdit",
"hooks": [
{
"type": "command",
"command": "node tools/enforce-normative-content-rules.mjs",
"timeout": 10
}
]
},
{
"matcher": "Read",
"hooks": [
{
"type": "command",
"command": "node tools/enforce-read-path-deny.mjs",
"timeout": 5
}
]
},
{
"matcher": "mcp__.*",
"hooks": [
{
"type": "command",
"command": "node tools/enforce-mcp-classification.mjs",
"timeout": 5
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "node tools/enforce-verify-gate.mjs",
"timeout": 10
}
]
},
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "node tools/enforce-criterion-gate.mjs",
"timeout": 10
}
]
},
{
"matcher": "TodoWrite",
"hooks": [
{
"type": "command",
"command": "node tools/enforce-todowrite-skill-verifier.mjs",
"timeout": 5
}
]
},
{
"matcher": "AskUserQuestion",
"hooks": [
{
"type": "command",
"command": "node tools/askuser-cosmetic-detector.mjs",
"timeout": 5
}
]
}
],
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "node -e \"const f=process.env.CLAUDE_FILE_PATH||''; if(/\\\\.md$/i.test(f) && !/CLAUDE\\\\.md$/i.test(f)) { require('child_process').spawnSync('npx',['-y','markdownlint-cli2','--fix',f],{stdio:'inherit',shell:true}); }\""
}
]
},
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "node -e \"const f=process.env.CLAUDE_FILE_PATH||''; const n=f.replace(/\\\\\\\\/g,'/'); if (/(^|\\\\/)db\\\\/schema\\\\.sql$/i.test(n)) { process.stdout.write('\\n[hook] REMINDER: You modified db/schema.sql. Per CLAUDE.md §5 п.8, add a corresponding entry to db/CHANGELOG_schema.md before committing.\\n'); }\""
}
]
},
{
"matcher": "Write",
"hooks": [
{
"type": "command",
"command": "node tools/enforce-mentor-then-judge.mjs",
"timeout": 300
}
]
},
{
"matcher": "Skill",
"hooks": [
{
"type": "command",
"command": "node tools/enforce-skill-journaler.mjs",
"timeout": 5
}
]
},
{
"matcher": "AskUserQuestion",
"hooks": [
{
"type": "command",
"command": "node tools/enforce-askuser-answer-parser.mjs",
"timeout": 5
}
]
},
{
"matcher": "Edit|Write|MultiEdit|Bash|PowerShell",
"hooks": [
{
"type": "command",
"command": "node tools/enforce-floor-escape-consume.mjs",
"timeout": 5
}
]
}
],
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "node tools/observer-stop-hook.mjs",
"timeout": 60
}
]
},
{
"hooks": [
{
"type": "command",
"command": "node tools/cost-stop-hook.mjs",
"timeout": 10
}
]
},
{
"hooks": [
{
"type": "command",
"command": "node tools/enforce-coverage-verify.mjs",
"timeout": 10
}
]
},
{
"hooks": [
{
"type": "command",
"command": "node tools/enforce-verdict-ack.mjs",
"timeout": 10
}
]
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "node tools/floor-manifest-check.mjs",
"timeout": 10
}
]
},
{
"hooks": [
{
"type": "command",
"command": "node tools/router-embedding-warmup.mjs",
"timeout": 30
}
]
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "node tools/enforce-verdict-surface.mjs",
"timeout": 10
}
]
}
]
}
}