Imported from masmuss/dotfiles (
devin/AGENTS.md). Install upstream withnpx skills add masmuss/dotfiles --skill devin. Copyright stays with the author.
Codebase Memory
Codebase Knowledge Graph (codebase-memory-mcp)
This project uses codebase-memory-mcp to maintain a knowledge graph of the codebase. ALWAYS prefer MCP graph tools over grep/glob/file-search for code discovery.
Priority Order
search_graph— find functions, classes, routes, variables by patterntrace_path— trace who calls a function or what it callsget_code_snippet— read specific function/class source codecheck_index_coverage— validate candidate paths and missed ranges before claimsquery_graph— run Cypher queries for complex patternsget_architecture— high-level project summary
Evidence tiers
- Scout (Tier 1): quick positive lookup with few calls and targeted source checks. Mark it provisional; do not make negative or exhaustive claims.
- Verify (Tier 2, default): task-directed graph evidence, relevant trace directions, exact snippets for material claims, and relevant pagination.
- Auditor (Tier 3): bounded-scope full verification with current generation, complete relevant pagination, both call directions and broader relationships when material, and every limitation disclosed.
- After candidate paths are known in any tier, call
check_index_coverageonce with every evidence path. Add relevant scopes for negative or exhaustive claims. A clean result means no recorded gap, not proof of completeness. For partial, skipped, excluded, stale, pending, or unknown coverage, read/grep the reported ranges or scope before relying on graph results.
When to fall back to grep/glob
- Searching for string literals, error messages, config values
- Searching non-code files (Dockerfiles, shell scripts, configs)
- When MCP tools return insufficient results
Examples
- Find a handler:
search_graph(name_pattern=".*OrderHandler.*") - Who calls it:
trace_path(function_name="OrderHandler", direction="inbound") - Read source:
get_code_snippet(qualified_name="pkg/orders.OrderHandler")
Session resets and subagents
- At session start or after compaction, confirm the nearest graph project and generation with
list_projectsorindex_status, then choose Scout, Verify, or Auditor. - The graph project is the
list_projectsentry whoseroot_pathcontains your working directory; pass itsname(or the absolute directory itself) asproject, never a repo or folder name. - Before spawning a subagent, query the graph and coverage in the parent. Pass the tier, project, generation/freshness, bounded scope, queries and pagination state, qualified symbols, paths, call-chain findings, coverage evidence with ranges/reasons, source fallback already performed, and unresolved questions in the delegated task context.
- Do not assume subagents inherit MCP access or the parent conversation. If a child lacks MCP tools, it must not call or claim MCP access. It should use the supplied evidence and read/grep exact source, especially every reported missed-coverage range.
