- CLAUDE.md: add "Question the question" and "One clarifying question" rules to Tone and Interaction — XY problem detection, false premise checks, and explicit reframe pattern before answering - Add claude/ detail-file directory (topic docs referenced from CLAUDE.md) - Add ABOUT.md, FUTURE.md - Update memory/, scripts/, settings.yaml with accumulated session changes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.8 KiB
1.8 KiB
script: context-load
Location: scripts/context-load
Symlinked to: ~/sbin/context-load
Purpose
Gathers project context for a Claude Code session by walking from cwd upward, collecting key index files, and outputting structured text suitable for --append-system-prompt.
What it loads (in order)
- Paths to every
CLAUDE.mdfound walking up from cwd (not contents — Claude Code loads those natively viaclaudeMd), annotated withdescription:from siblingABOUT.mdif present - Paths to every project
CLAUDE.mdfound under each CLAUDE.md directory (depth 2-4) — for project discovery, also annotated with ABOUT.md descriptions - Every
CONTEXT.mdfound walking up (top-down) — full contents - Every
MEMORY.mdfound walking up (top-down) — full contents - Every
BESTPRACTICES.mdfound walking up (top-down) — full contents
What it does NOT load
- CLAUDE.md contents (loaded natively by Claude Code)
- Directory trees (Claude can run
treeon demand for fresh results) - README.md files (human-oriented, read on demand)
- git-status-report (moved to
/housekeepingskill)
How it works
- Uses
discover_upward()to walk from$PWDto/, collecting directories - Resolves symlinks via
readlink -fto deduplicate (e.g.,~/dev/claude/CLAUDE.mdsymlink toclaude-foundations/CLAUDE.md) - Emits each file with a structured header (
=== FILE: ... ===) for easy parsing - Uses
findto discover project CLAUDE.md files under each hierarchy directory
Gotchas
- Only walks upward from cwd for index files — but scans downward for project CLAUDE.md discovery. Launch from within a project directory to get that project's context.
- Index files (MEMORY.md, CONTEXT.md, BESTPRACTICES.md) should be thin indexes, not large documents, since they're injected into the system prompt.