클로드에서 CLAUDE.md 규칙이 닿는지는 파일 위치가 아니라 세션을 띄운 폴더가 결정한다
같은 규칙 문서를 쓰더라도 작업 세션을 어느 폴더에서 열어 주느냐에 따라 닿는 범위가 달라진다. 대화 한가운데에야 도착한 규칙은 처음부터 준 규칙의 절반만 받아들여졌다.
jangwook.net
Personal technical notes on AI agents, automation, developer tools, and the process of building software.
Latest Notes
The root page stays intentionally small. Choose a language, then read the full archive and related posts there.
AI 에이전트, 자동화, 개발 도구, 소프트웨어 제작 과정을 한국어로 기록합니다.
같은 규칙 문서를 쓰더라도 작업 세션을 어느 폴더에서 열어 주느냐에 따라 닿는 범위가 달라진다. 대화 한가운데에야 도착한 규칙은 처음부터 준 규칙의 절반만 받아들여졌다.
AGENTS.md를 CLAUDE.md로 끌어오는 공식 방법 세 가지를 실제로 돌려 비교한 결과, 세 방법은 같은 결과를 냈다. 대신 예시로 감싼 한 줄이 문서 전체를 아무 알림 없이 지워 버리는 함정이 확인됐다.
냉장고에 붙인 메모 같은 규칙 문서가 실제로 어디까지 효과가 있는지 6번씩 반복해 쟀다. 사용자 요청이 규칙 하나와 충돌하는 순간 충돌하지 않은 규칙까지 문서 전체가 공격으로 판정되어 버려지는 결과가 6번 중 6번 나왔다.
Personal notes on AI agents, automation, developer tools, and building software.
A test with 60 runs shows that the same rules file can reach the AI helper from one folder but not from another, and a rules file handed over mid-conversation was followed only half the time. The launch folder decides the first part; the arrival time decides the second.
Three official ways to connect AGENTS.md to CLAUDE.md all loaded the document in testing, with at most 122 tokens of difference. The actual risk is not the wiring but a single example line wrapped in a code block that quietly erases the whole document.
A committed rules file like CLAUDE.md or AGENTS.md is a suggestion the assistant reads, not a rule anyone enforces. When one user request conflicts with a single rule, the model judged the whole file a prompt attack and discarded all of it, 6 times out of 6.
AIエージェント、自動化、開発ツール、ソフトウェア開発の記録です。
AIコーディング助手が規則文書を読み込むかどうかは、文書の置き場所ではなく作業を始めたフォルダで決まることを、60回の試行で確かめた記録である。作業の途中で届いたルールは、初めから手渡されたルールの半分しか守られなかった。
三つの接続方法を実測したら結果は同じで、選ぶ基準は速さではなく環境の制約だった。本当の落とし穴は、例示の一行が文書の読み込みを静かに止めることにある。
リポジトリに置いた規則文書はモデルに届くが、守られるとは限らない。ユーザーが一つ逆の頼みをしただけで、文書全体が攻撃と判定されて捨てられた実測を書く。
记录 AI 代理、自动化、开发工具和软件构建过程。
CLAUDE.md 规则文件放的位置一样,会话启动的文件夹不一样,被读到的结果就完全不同。对话中途才被读到的规则文件,遵守率只有一半。
让 AGENTS.md 进入 Claude Code 的三种官方做法,实测结果都一样,所以选择的标准不是快慢,而是你环境里的限制。真正要小心的,是一行被当作示例包进代码块的写法,它会让整份规则文档悄无声息地消失。
写进仓库规则文件里的规矩,被模型读到不等于被遵守。实测显示用户一句话和规矩冲突时,整份规则文件在 6 次里 6 次被当作提示词攻击丢掉。