Skip to content
AI HOT · Tips & opinions

Constraining coding agents with only the repo files you already have

如何只用自己拥有的文件约束编码智能体

Repo constraints for coding agents fall into four kinds of files: instructions, path rules, capability config and checks. The author adds them one at a time on the same ticket and re-tests to see what each one does. CLAUDE.md and .claude/rules/ give guidance, capability config limits which tools are available, and .claude/hooks/ can reject writes, sharing check logic with CI's make gate.

Why it matters: Adding repo constraints one at a time on the same ticket and re-testing separates instructions, rules, capabilities and checks, so each constraint maps to a concrete check result.

Read the original ↗Export Markdown