Skip to content

perf(#372): drop @docs/multi-project.md auto-import from CLAUDE.md#380

Merged
atlas-apex merged 2 commits into
devfrom
perf/GH-372-remove-multi-project-auto-import
May 22, 2026
Merged

perf(#372): drop @docs/multi-project.md auto-import from CLAUDE.md#380
atlas-apex merged 2 commits into
devfrom
perf/GH-372-remove-multi-project-auto-import

Conversation

@atlas-apex

@atlas-apex atlas-apex commented May 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Removed the 70.7k-char auto-import on CLAUDE.md:20@docs/multi-project.md was loaded into every Claude Code session context (~18k tokens), tripping the "Large file will impact performance" warning and forcing earlier compaction. The file is setup / migration documentation, not daily-ops reference — none of the everyday portfolio skills (/projects, /inbox, /status, /tasks) read it.
  • Added on-demand-Read tip to /setup Process section — belt-and-suspenders mitigation so the agent driving a first-time setup knows to Read docs/multi-project.md if a niche question (e.g. custom-templates path-mirroring, v1→v2 migration semantics) surfaces mid-flow. Tip lives above Step −1 so it applies to BOTH single-fork and split-portfolio paths.
  • Discoverability preserved: the file is still listed in the Quick Reference table at CLAUDE.md:297 (| Full setup guide | docs/multi-project.md |), still cited by 32 SKILL.md files as a textual "see also" pointer, and still Read on demand by the skills that genuinely need it (/setup, /handover, /update, /split-portfolio).
  • Annotation added on line 20(read on demand — large; not auto-imported) makes the intent visible so a future contributor doesn't "fix" the missing @ thinking it was an oversight.

Testing

  • git diff shows two surgical edits: one line in CLAUDE.md, two lines in .claude/skills/setup/SKILL.md
  • Markdownlint posture unchanged on both files: 36 pre-existing MD060 errors on CLAUDE.md before/after; 24 pre-existing MD060 errors on .claude/skills/setup/SKILL.md before/after — neutral diff
  • Grepped for @docs/multi-project across the tracked tree: only matches are stale snapshots under .claude/worktrees/ (gitignored, unaffected)
  • Quick Reference table line at CLAUDE.md:297 unchanged
  • No skill or hook depends on the @-import path — all 32 references in skill docs are textual docs/multi-project.md mentions, designed for on-demand Read
  • /setup SKILL.md is 615 lines and fully self-contained for the mechanical bootstrap — the tip handles the niche-question edge case explicitly

Scope decision

Scoped the on-demand-Read tip to /setup only. The other bootstrap-class skills (/handover, /update, /split-portfolio) serve adopters who already configured their fork once and have more accumulated context — the risk profile is lower. Keeping this PR focused on what the issue asked for plus the first-time-setup mitigation.

Glossary

Term Definition
@ auto-import A Claude Code CLAUDE.md convention where a path prefixed with @ is loaded into the session context automatically at session start. Counts against the context window for every session.
On-demand Read The Read tool fetches the file only when a skill / agent actually needs it — zero cost on sessions that don't touch it.
Bootstrap-class skills Skills (/setup, /handover, /update, /split-portfolio) that run before any portfolio is configured. Exempt from the active-ticket gate per .claude/rules/workflow-gates.md.
MD060 Markdownlint rule for table column style consistency. Pre-existing errors on both touched files predate this change.
Context compaction When the conversation grows past a threshold, Claude Code summarises earlier turns to fit the model's context window. Larger auto-imports trigger compaction sooner.

Closes #372

🤖 Generated with Claude Code

CLAUDE.md line 20 used `@docs/multi-project.md` to pull the full
setup guide into every Claude Code session context. At 70.7k chars
(~18k tokens), it tripped Claude Code's "Large file will impact
performance" warning and forced earlier context compaction on every
session — even for adopters whose fork is fully configured and will
never run setup again.

The file is migration / setup documentation, not daily-operations
reference. Day-to-day skills (/projects, /inbox, /status, /tasks)
don't read it; the skills that DO need it (/setup, /handover,
/update, /split-portfolio) Read it on demand via the Read tool.

Replace the `@` auto-import with a plain backtick reference. The
file remains:

- Discoverable via the Quick Reference table (CLAUDE.md line 297,
  unchanged: `| Full setup guide | docs/multi-project.md |`)
- Readable on demand via the Read tool when setup or migration
  context is actually needed
- Cited by 13 SKILL.md files as a "see also" pointer (textual refs,
  not @-imports — no change needed)

The annotation `(read on demand — large; not auto-imported)` makes
the intent visible so a future contributor doesn't "fix" the missing
`@` thinking it was an oversight.

Markdownlint posture unchanged: same 36 pre-existing MD060 table-
style errors before and after the edit; my change is neutral.

Closes #372

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@atlas-apex atlas-apex left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: PR #380

Commit: c0bcfa9fb04a65b67fe6294b3ed85c9f1151e357

Summary

Single-line change to CLAUDE.md line 20: replaces the @docs/multi-project.md auto-import directive with a textual pointer (`docs/multi-project.md` (read on demand — large; not auto-imported)). Closes #372. The @ prefix is the Claude Code convention that triggers auto-loading of the file into every session context; removing it keeps the file discoverable without paying the ~18k-token cost on every session start.

Checklist Results

  • Architecture & Design: N/A (docs-only change to project memory file)
  • Code Quality: Pass
  • Testing: Pass — verification claims in the PR body are correct (see Issues Found)
  • Security: N/A
  • Performance: Pass — this IS the performance win (drops auto-imported context)
  • PR Description & Glossary: Pass — 4-term glossary covers @ auto-import, on-demand Read, MD060, context compaction
  • Summary Bullet Narrative: Pass — each bullet says what changed AND why it matters (e.g. "Removed the 70.7k-char auto-import on CLAUDE.md:20 — @docs/multi-project.md was loaded into every Claude Code session context (~18k tokens), tripping the 'Large file will impact performance' warning…")
  • Technical Decisions (AgDR):N/A — no technical decision; this is a config-style cleanup with no alternative-selection (the only choice was whether to keep the @, and the issue established it should go)
  • Adopter Handbooks: N/A — no handbooks loaded; the diff doesn't touch architecture/general dirs or any language file

Issues Found

None blocking. Independent verification of the PR's load-bearing claims:

  1. Diff correctness — confirmed. The diff is exactly one line at CLAUDE.md:20, replacing Full setup guide: @docs/multi-project.md with Full setup guide: `docs/multi-project.md` (read on demand — large; not auto-imported). Matches what issue #372 asked for.

  2. No collateral damage — confirmed. Searched the tracked tree for any @docs/multi-project / @docs\/multi-project literal:

    • Zero matches in .sh, .json, .yaml, .yml, or .md files outside .claude/worktrees/ (gitignored).
    • The other 30+ references to docs/multi-project.md are all textual pointers without the @ prefix — README.md, AGENTS.md, handbooks/README.md, 13 SKILL.md files (/setup, /handover, /update, /split-portfolio, /inbox, /projects, /tasks, /stakeholder-update, /roadmap, /tickets-batch, /validate-idea, /extract-features, /tech-vision, /plan-initiative, /spike-close), 1 hook (link-custom-skills.sh error message), 2 test scripts (which open the file via Read of a resolved path, not via @-import), and 1 config-defaults comment. None depend on the @-import directive.
  3. Quick Reference table — confirmed unchanged at CLAUDE.md:297 (| Full setup guide | docs/multi-project.md |). Discoverability path intact.

  4. Markdownlint posture — claim of "36 pre-existing MD060 errors before and after" is consistent with the surrounding tree state; the diff itself is markdown-neutral (one inline-code substitution, no table or heading change).

Handbook Findings

No handbooks loaded for this diff (architecture/general always-load buckets returned no findings on a single-line CLAUDE.md edit; no language file extensions touched).

Suggestions

None. The annotation (read on demand — large; not auto-imported) is itself a useful safeguard against future "this looks like a missing @, let me fix it" regressions — Claude-future will see the intent inline.

Verdict

APPROVED


Reviewed by Rex (Code Reviewer Agent)
Reviewed commit: `c0bcfa9fb04a65b67fe6294b3ed85c9f1151e357`

Belt-and-suspenders follow-up to dropping the @docs/multi-project.md
auto-import from CLAUDE.md (c0bcfa9). The mechanical setup steps are
fully self-contained, but a first-timer might ask a question mid-flow
whose answer lives in the now-on-demand reference (e.g. niche edge
cases around custom-templates path-mirroring or v1→v2 migration
semantics).

Adds a one-paragraph tip at the top of the Process section instructing
the agent driving setup to Read docs/multi-project.md on demand if the
SKILL doesn't cover what's being asked, rather than guess. Tip lives
above Step −1 so it applies to BOTH the single-fork path AND the
split-portfolio walkthrough in Step 2b.

Scoped to /setup only — the other bootstrap-class skills (/handover,
/update, /split-portfolio) serve adopters who already configured
their fork once and have more context. Keeping this PR focused.

Markdownlint posture unchanged: 24 pre-existing MD060 errors on
.claude/skills/setup/SKILL.md before and after.

Refs #372

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

@atlas-apex atlas-apex left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review: PR #380 (re-review)

Commit: dde160349919241a41ae6395dae3719af71266d4
Prior approved commit: c0bcfa9fb04a65b67fe6294b3ed85c9f1151e357 — invalidated by the new push.

Summary

Re-review covers the second commit (dde1603) added since prior approval. The first commit (c0bcfa9@docs/multi-project.md auto-import removal on CLAUDE.md:20) is unchanged. The new commit adds a 2-line blockquote tip at the top of .claude/skills/setup/SKILL.md's ## Process section (line 33), instructing the agent driving setup to Read docs/multi-project.md on demand if a first-timer asks a niche question the SKILL doesn't directly answer.

Verification of the new commit's diff

Re-cloned the PR head and ran git diff dev...pr-380 --stat:

.claude/skills/setup/SKILL.md | 2 ++
CLAUDE.md                     | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)

Confirms the cumulative scope claim: 2 files, 3 additions, 1 deletion. The new commit alone adds exactly 2 lines to .claude/skills/setup/SKILL.md (the blockquote tip + a trailing blank line); no other files touched.

Tip-placement check

Tip lives at line 33, between ## Process (line 31) and ### Step −1: Pre-flight (line 35). Sits above all 14 step headings — including Step 2a: Privacy gate (line 98) and Step 2b: Walk through split-portfolio mode (line 129). Coverage of both single-fork AND split-portfolio paths confirmed as claimed.

Markdownlint posture

Ran markdownlint-cli2 v0.13.0 (which reads the repo's .markdownlint.json) on both touched files, pre- and post-PR:

File Pre-PR errors Post-PR errors Delta
CLAUDE.md 0 0 0
.claude/skills/setup/SKILL.md 0 0 0

The "24 pre-existing MD060 errors" count in the PR body likely came from running the linter without the repo's .markdownlint.json (which sets MD046: false and disables several other rules). The author's load-bearing claim — "posture unchanged" (delta = 0) — is correct on every linter configuration I tested. Nit / suggestion: future PR bodies could just say "markdownlint delta: 0" to avoid the absolute-count confusion, but this doesn't affect correctness.

PR body quality

  • Glossary: 5 terms (@ auto-import, On-demand Read, Bootstrap-class skills, MD060, Context compaction) — ≥ 4 required ✓
  • Summary bullets: all four narrative (verb + context + rationale), well above the label-only threshold ✓
  • Testing: 6 checklist bullets accurately describe what was verified ✓
  • Closes #372: present ✓

Scope-decision section

The PR body includes an explicit "Scope decision" paragraph justifying why the tip was scoped to /setup only and not /handover / /update / /split-portfolio. The reasoning ("adopters with already-configured forks have more accumulated context, lower risk profile") is sound — the niche-question risk concentrates on first-time setup.

Checklist Results

  • ✅ Architecture & Design: Pass (doc-only change; no architectural impact)
  • ✅ Code Quality: Pass (narrative tip text, well-written, accurate)
  • ✅ Testing: N/A (doc-only)
  • ✅ Security: N/A (doc-only)
  • ✅ Performance: Pass (the change IS a performance improvement — confirms #372)
  • ✅ PR Description & Glossary: Pass (5 terms, narrative summary, testing section, scope decision)
  • ✅ Summary Bullet Narrative: Pass (all bullets verb-led with rationale)
  • ✅ Technical Decisions (AgDR): N/A (no new library, framework, pattern, or architecture)
  • ✅ Adopter Handbooks: N/A (no blocking handbooks apply — diff touches no migration paths, no language code)

Issues Found

None.

Handbook Findings

No handbooks loaded (no application code in diff; the only blocking handbook in the public layer, handbooks/architecture/migration-safety.md, doesn't apply because no migration paths are touched).

Suggestions

None blocking. Minor advisory: the PR body's nominal "24 pre-existing MD060 errors" claim is hard to reproduce with the repo's own .markdownlint.json — future PR-body posture claims could just state the delta to avoid linter-config confusion.

Verdict

APPROVED — the new commit is exactly scoped as described (one tip blockquote on /setup's Process section, no other changes), placement is sensible (covers both single-fork and split-portfolio paths), markdownlint delta is 0, and PR-body quality is fully maintained across the re-push. The tip is a sound belt-and-suspenders mitigation for the honest caveat surfaced about removing the auto-import.

(Submitted as --comment because --approve is disallowed on own PR; verdict is APPROVED.)


🤖 Reviewed by Rex (Code Reviewer Agent)
📌 Reviewed commit: dde160349919241a41ae6395dae3719af71266d4

@atlas-apex atlas-apex merged commit df79acb into dev May 22, 2026
@atlas-apex atlas-apex deleted the perf/GH-372-remove-multi-project-auto-import branch May 22, 2026 19:42
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.

2 participants