Hasty Briefsbeta

Bilingual

Self-improving CLAUDE.md files

a day ago
  • Using CLAUDE.md or AGENTS.md files improves agentic tools like Claude Code and Codex by providing project context.
  • Manually updating these files becomes tedious and hard to maintain as project complexity grows.
  • A trick is to use agent logs (JSONL files stored in ~/.claude/projects or ~/.codex/sessions) to identify common problems with CLAUDE.md.
  • Prompting the agent to search logs and analyze improvements to CLAUDE.md, including patterns of frustration or repeated requests, works well.
  • Parsing JSONL efficiently can be challenging, leading to complex jq commands, so a custom CLI tool was built for faster searching (open-sourced for Mac and Linux).
  • The CLI tool reduces analysis time from minutes to seconds, and could be scheduled for self-improvement.
  • Curating suggestions quickly helps, but better prompts could improve self-optimization.
  • The author hopes Anthropic adopts AGENTS.md for better naming.