Skip to content

docs: rewrite CLAUDE.md in descriptive register, drop directives#23

Merged
walkindude merged 1 commit into
masterfrom
docs/claude-md-descriptive-register
Apr 26, 2026
Merged

docs: rewrite CLAUDE.md in descriptive register, drop directives#23
walkindude merged 1 commit into
masterfrom
docs/claude-md-descriptive-register

Conversation

@walkindude

Copy link
Copy Markdown
Owner

Summary

The repo's CLAUDE.md was running on imperatives directed at agents: "MANDATORY", "Using grep is always wrong here", "Never invoke without --json", "Never guess fqnames", "Do not read source files". That register is the same prompt-injection-adjacent shape that was rewritten out of cli-bridge's AGENTS.md. When a doc gets auto-loaded into an agent's context on every session in the repo, it should describe what the tool does and how the conventions work, not issue runtime instructions to the model.

This rewrite keeps the same content surface (session bootstrap, navigation tasks, fqname resolution, exploration sequence, failure modes, stale-index recovery, keeping the file current) and drops the coercive framing.

  • Wrong/Right comparison table → Task/Command table.
  • "Using grep ... is always wrong" header → a one-liner in the intro that distinguishes what grep answers from what gosymdb answers, without telling the agent what to do.
  • "Never guess fqnames" → a paragraph explaining why hand-constructed fqnames frequently misfire and pointing at find / def as the reliable source.
  • "Do not read source files" → an acknowledgement that source-reading is right for code-shape and control-flow questions, gosymdb is right for symbol-shaped questions.
  • Common failure modes section nearly untouched (it was already factual: error_code / hint / note / valid_subcommands).

Net: −97 / +47 lines. Same usefulness for an agent working in this repo, less directive register.

Test plan

  • Render the new CLAUDE.md on GitHub and confirm formatting (tables, code fences) survive
  • Confirm the file still answers the practical questions: how to bootstrap a session, how to resolve fqnames, what to do when error_code: no_database shows up, when to rebuild vs --auto-reindex
  • No factual drift vs the implementation (internal/cmd/agentcontext.go, indexer/stale.go)

🤖 Generated with Claude Code

The previous CLAUDE.md ran on imperatives ("MANDATORY", "Using grep
is always wrong here", "Never invoke without --json", "Never guess
fqnames", "Do not read source files"). That register is the same
prompt-injection-adjacent shape that was rewritten out of the
cli-bridge AGENTS.md: documentation that gets auto-loaded into an
agent's context every time it works in the repo, written as if it
were issuing runtime instructions to the model.

Rewritten as a working reference: what gosymdb does for navigation,
how to bootstrap a session, the task-to-command table, fqname
resolution, a typical exploration sequence, the common failure modes
(unchanged in substance — they were already factual), stale-index
recovery, and the convention for keeping this file in sync with code.

The Wrong/Right comparison table is gone; the same information is
present as a Task/Command table without the coercive framing. The
"Using grep ... is always wrong here" header is gone too — the
descriptive equivalent ("Grep finds string occurrences; gosymdb
finds resolved symbols. The two answer different questions") sits
in the navigation section without telling the agent what to do.

Net change: -97 / +47 lines. Same content surface, no behavioral
directives.
@walkindude walkindude force-pushed the docs/claude-md-descriptive-register branch from 8f1f951 to eb2a044 Compare April 26, 2026 13:32
@walkindude walkindude merged commit 4073d2b into master Apr 26, 2026
8 checks passed
@walkindude walkindude deleted the docs/claude-md-descriptive-register branch April 26, 2026 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant