Skip to content

Add CLAUDE.md symlinks to ensure Claude Code reads project context#259

Merged
nhorton merged 1 commit intomainfrom
claude/agents-md-symlink-rule-UGqfB
Mar 13, 2026
Merged

Add CLAUDE.md symlinks to ensure Claude Code reads project context#259
nhorton merged 1 commit intomainfrom
claude/agents-md-symlink-rule-UGqfB

Conversation

@nhorton
Copy link
Contributor

@nhorton nhorton commented Mar 13, 2026

Summary

This PR ensures that Claude Code can properly read project context by creating CLAUDE.md symlinks that point to AGENTS.md files. Claude Code reads CLAUDE.md for project context but ignores AGENTS.md, so symlinks are necessary to bridge this gap.

Key Changes

  • Added new deepreview job (agents_md_claude_md_symlink): A validation rule that checks every AGENTS.md file has a corresponding CLAUDE.md symlink pointing to it, with instructions for creating missing symlinks
  • Updated job creation script (make_new_job.sh): Automatically creates CLAUDE.md symlinks when new jobs are generated, ensuring all future jobs follow this pattern
  • Created symlinks in existing directories: Added CLAUDE.md symlinks to all existing AGENTS.md locations:
    • Root directory
    • .deepwork/jobs/test_job_flow/
    • .deepwork/jobs/update_job_schema/
    • doc/debugging_history/
    • src/deepwork/standard_jobs/deepwork_jobs/

Implementation Details

  • Symlinks use relative path targets (AGENTS.md rather than absolute paths) to remain valid after directory moves or clones
  • The deepreview job validates symlink existence and correctness, providing clear failure messages if symlinks are missing or incorrect
  • Job creation script now includes symlink creation in its workflow and displays the symlink in the directory tree output

https://claude.ai/code/session_013LSePqqcsCg1d6now3qseB

…ng files

Claude Code reads CLAUDE.md for project context but ignores AGENTS.md.
To ensure Claude picks up job context wherever AGENTS.md files exist:

- Add `agents_md_claude_md_symlink` review rule to .deepreview that checks
  every AGENTS.md has a sibling CLAUDE.md symlink pointing to it
- Create CLAUDE.md symlinks for all 5 existing AGENTS.md files in the repo
- Update make_new_job.sh to create a CLAUDE.md symlink alongside AGENTS.md
  whenever a new job directory is scaffolded

https://claude.ai/code/session_013LSePqqcsCg1d6now3qseB
@nhorton nhorton added this pull request to the merge queue Mar 13, 2026
Merged via the queue into main with commit 2bd925f Mar 13, 2026
5 checks passed
@nhorton nhorton deleted the claude/agents-md-symlink-rule-UGqfB branch March 13, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants