Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

docs(claude): add working notes pointer and code discovery policy - #33

Merged
sha1n merged 1 commit into
masterfrom
docs/code-discovery-policy
Jul 30, 2026
Merged

sha1n merged 1 commit into
masterfrom
docs/code-discovery-policy

Conversation

@sha1n

@sha1n sha1n commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

Adds two sections to the global Claude Code instructions: a pointer to ~/.claude/agent-workflow-notes.md for practices that don't need to sit in permanent context, and a ## Code Discovery policy for routing between the codebase-memory-mcp knowledge graph and plain text search.

Changes

  • ## Code Discovery deliberately does not restate graph-first routing. That is already asserted by the MCP tool descriptions and by the server's SessionStart and SubagentStart hooks, so a fourth copy would be redundant. The section carries only what no other layer does: a bound on those hooks' unconditional "ALWAYS ... for ANY code exploration" framing, which is wrong for non-code artifacts, aggregate counts, and git history.
  • The freshness rule is phrased behaviorally instead of naming tools to call, because no tool in codebase-memory-mcp 0.9.0 can report staleness. index_status reads live git rather than indexed state, so a stale index still reports ready on the current branch. Verified locally against an index 14 days old and sitting on a different branch than the worktree — it reported clean.
  • Revisit trigger, recorded in the commit body rather than in CLAUDE.md so it cannot rot silently: upstream DeusData/codebase-memory-mcp#786 (open, milestone 0.9.2-rc) would expose real freshness metadata. When it lands, the second bullet's justification largely collapses.

Working Notes points at ~/.claude/agent-workflow-notes.md so detailed
practices stay out of permanent context.

Code Discovery bounds the graph-first framing asserted by the
codebase-memory-mcp tool descriptions and its session/subagent hooks,
which reads as unconditional and is wrong for non-code artifacts,
aggregate counts, and git history.

The freshness rule is deliberately behavioral rather than tool-directed:
no tool in codebase-memory-mcp 0.9.0 reports index staleness. index_status
reads live git rather than indexed state, so a stale index still reports
ready on the current branch, and Branch.head_sha freezes at creation-time
HEAD. Verified locally: an index 14 days old and on a different branch
reported clean. Upstream DeusData/codebase-memory-mcp#1296, #1213, #1339;
the fix is #786, open, milestone 0.9.2-rc. Revisit this section when that
lands.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@sha1n sha1n added the documentation Improvements or additions to documentation label Jul 30, 2026
@sha1n sha1n self-assigned this Jul 30, 2026
@sha1n
sha1n merged commit 19a9223 into master Jul 30, 2026
2 checks passed
@sha1n
sha1n deleted the docs/code-discovery-policy branch July 30, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant