Keep CLAUDE.md short by moving code structure into Octocode

This workflow reduces the problem of CLAUDE.md becoming too large and outdated in a big codebase. The main idea is to stop storing detailed code structure inside CLAUDE.md and move that knowledge to Octocode, an open-source MCP server. Octocode uses tree-sitter AST parsing and a knowledge graph to make code structure searchable, including imports, callers, and callees. CLAUDE.md can then stay short, around 50 lines, and focus only on process rules. Claude or another AI agent can ask Octocode for current codebase context when it needs details. The goal is to give the AI useful structure without forcing the human to keep a long instruction file updated by hand.

Key points

  • The workflow aims to keep CLAUDE.md small and easier to maintain.
  • Octocode stores and serves code structure instead of putting that detail in CLAUDE.md.
  • The AI agent can query imports, callers, callees, and other code relationships.
  • CLAUDE.md can focus on process rules instead of project structure notes.
  • This is most useful for large or complex codebases, not tiny projects.

Quick term guide

workflow
A repeatable set of steps for getting a task done.
CLAUDE.md
A project instruction file that tells Claude Code how to work with the codebase.
open-source
Software whose code is shared publicly so others can inspect, use, or change it.
MCP server
A server that helps AI tools connect to outside services in a standard way.
tree-sitter AST parsing
A way to read code by breaking it into a structured tree.
knowledge graph
A structured map that links facts, topics, or ideas and shows how they relate.
maintain
To keep an app working by fixing problems and making updates over time.
codebases
The full set of code files that make up a software project.
Read original