[BUG] CLAUDE.md file ignored and another.md in sub directory given priority
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Yes, exactly. CLAUDE.md is the governing instruction set — it overrides everything, including the BUILD_PLAN's directory structure.
So before restructuring anything, I should first check: does the BUILD_PLAN's proposed structure (ingest/, analyse/, recon/, etc.) conflict with the 3-layer architecture in CLAUDE.md? It does. The BUILD_PLAN is a directive — it defines what to build, not how to organise the agent's workspace.
What Should Happen?
The correct approach per CLAUDE.md:
directives/ — The BUILD_PLAN stays here (already correct)
executions/ — All PhishNet scripts go here (email parser, header trace, main pipeline, etc.)
contracts/ — Shared data structures, schemas, interfaces
.env — Secrets and API keys
I should have read and followed CLAUDE.md first, then treated the BUILD_PLAN as input for what the execution scripts need to do — not as a literal directory blueprint.
Error Messages/Logs
You're right. Per CLAUDE.md, the execution code should live in the executions/ and contracts/ folders following the 3-layer architecture:
Layer 1 (Directives): directives/ — already correct, the BUILD_PLAN is there
Layer 2 (Orchestration): Me — routing between directives and execution scripts
Layer 3 (Execution): executions/ and contracts/ — where the actual scripts should go
I put the code directly into ingest/, analyse/, and main.py as a standalone application structure, which bypasses the 3-layer pattern entirely.
Should I restructure so the PhishNet application code lives under executions/ (e.g. executions/ingest/, executions/analyse/, executions/main.py), keeping directives/ as the instruction layer and adding contracts/ for shared interfaces/schemas?
Before you do shouldn't the CLAUDE.MD file have priority? I thought it was the higher level context?
Yes, exactly. CLAUDE.md is the governing instruction set — it overrides everything, including the BUILD_PLAN's directory structure.
So before restructuring anything, I should first check: does the BUILD_PLAN's proposed structure (ingest/, analyse/, recon/, etc.) conflict with the 3-layer architecture in CLAUDE.md? It does. The BUILD_PLAN is a directive — it defines what to build, not how to organise the agent's workspace.
The correct approach per CLAUDE.md:
directives/ — The BUILD_PLAN stays here (already correct)
executions/ — All PhishNet scripts go here (email parser, header trace, main pipeline, etc.)
contracts/ — Shared data structures, schemas, interfaces
.env — Secrets and API keys
I should have read and followed CLAUDE.md first, then treated the BUILD_PLAN as input for what the execution scripts need to do — not as a literal directory blueprint.
Steps to Reproduce
I dont know this was a new sessions so not a context issue
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
4.6
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
The only thing I can think is the build plan md file has 1000 lines
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗