Skip to content

docs: link the guides instead of importing them - #482

Merged
retr0h merged 1 commit into
mainfrom
docs/lazy-doc-references
Sep 4, 2026
Merged

docs: link the guides instead of importing them#482
retr0h merged 1 commit into
mainfrom
docs/lazy-doc-references

Conversation

@retr0h

@retr0h retr0h commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

What

Replaces @CONTRIBUTING.md in the agent files with [CONTRIBUTING.md](CONTRIBUTING.md).

Why

@file in an agents file is an import, not a reference. golangci-lint aside, Claude Code pulls the whole file into context at session start whether or not the task goes near it.

repo CONTRIBUTING.md
gohai 595 lines / 23 KB
osapi 519 lines / 20 KB
osapi-orchestrator 507 lines / 19 KB
nats-client, nats-server 306 lines / 11 KB

That is roughly six thousand tokens spent in gohai before the first instruction is read.

A markdown link is the lazy form: the agent opens it when the work calls for it, and the link can point at one section — CONTRIBUTING.md#before-you-start — instead of the whole document.

Two inconsistencies this also settles

  • README.md already used [CONTRIBUTING.md](CONTRIBUTING.md), so the two files disagreed about how to cite the same document.
  • AGENTS.md disagreed with itself: docs/methodology.md was an import in the opening paragraph and plain backticks three sections later.

What is deliberately unchanged

CLAUDE.md keeps its trailing bare @AGENTS.md. That import is the file's entire purpose — it exists so Claude Code finds AGENTS.md, which is 55 lines and always relevant. Only the prose mention above it, which imported the same file a second time, became a link.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FuKUsHFG1EqZXamffh9M2c

`@CONTRIBUTING.md` in an agents file is an import: the whole file is
pulled into context at the start of every session, whether the task
touches it or not. CONTRIBUTING.md is 595 lines here, which is around
six thousand tokens spent before anyone has said anything.

A markdown link is the lazy form — the agent opens it when the work
calls for it, and can be pointed at one section rather than the lot.
README.md already referred to it this way, so the two files disagreed
about how to cite the same document. AGENTS.md disagreed with itself as
well, naming docs/methodology.md as an import in one paragraph and as
plain text three sections later.

CLAUDE.md keeps its trailing @AGENTS.md. That one is deliberate: the
file exists so Claude Code finds AGENTS.md, and importing it is the
whole job. The prose mention above it no longer imports a second time.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FuKUsHFG1EqZXamffh9M2c
@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #482   +/-   ##
=======================================
  Coverage   99.94%   99.94%           
=======================================
  Files         484      484           
  Lines       22877    22877           
=======================================
  Hits        22865    22865           
  Misses         12       12           

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4ceffff...4c66849. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@retr0h
retr0h merged commit 27aceab into main Sep 4, 2026
12 checks passed
@retr0h
retr0h deleted the docs/lazy-doc-references branch September 4, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant