Skip to content

docs(claude-md): route CLAUDE.md by loading-discipline (ADR-0081) - #148

Merged
ojfbot merged 1 commit into
mainfrom
docs/claude-md-routing
Jun 4, 2026
Merged

docs(claude-md): route CLAUDE.md by loading-discipline (ADR-0081)#148
ojfbot merged 1 commit into
mainfrom
docs/claude-md-routing

Conversation

@ojfbot

@ojfbot ojfbot commented Jun 4, 2026

Copy link
Copy Markdown
Owner

What

Applies the ADR-0081 loading-discipline to cv-builder's 366-line root CLAUDE.md.

Always-loaded footprint (M1): ~4151 → ~941 tokens (366 → 72 lines), ~77% drop. Relocate-only — 0 deletes, 0 @import.

Routing

  • Layer 1 packages/agent-core/CLAUDE.md (nested, loads when editing that package): add-an-agent procedure + models note.
  • Layer 1 .claude/rules/mf-and-deploy.md (paths: browser-app + vercel.json): Module Federation surface, shared singletons, local MF dev, Vercel deploy + cache-header rules.
  • Layer 2 docs/claude-reference.md: prerequisites, ESLint custom-rule catalog, Claude Code hook wiring, security commands, env setup, data dirs, architecture detail (multi-agent, monorepo tree, data models, package imports), agent system + .agents/ catalog, key technologies.
  • Layer 0 (stays): identity + server-side-only invariant, pnpm, command quick-ref, security/secrets invariant, testing philosophy, privacy, deployment-safety invariant.

Fix: broken pointer

CLAUDE.md:15 pointed at a root ARCHITECTURE.md that doesn't exist — corrected to docs/ARCHITECTURE.md (the real path). Verified docs/ARCHITECTURE.md is not a superset of the CLAUDE.md architecture block (missing Skills Gap Analyzer, Interview Coach, container-presenter, ResearchEntry, @frame/eslint-plugin, three-tier storage) → those were relocated to Layer 2, not deleted.

L2 lives in repo-native docs/ (domain-knowledge/ is a gitignored symlink farm into core).

How to test

  • node core/scripts/claude-md/footprint.mjs cv-builder → always ~941 / conditional ~1061; @import: 0.
  • All distinctive strings (Skills Gap Analyzer, container-presenter, @frame/eslint-plugin, remoteEntry.js, 9b84f80, …) verified present across the new fileset.
  • Editing packages/agent-core/** loads the nested guidance; editing packages/browser-app/** or vercel.json loads the MF/deploy rule.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Skill Audit — PR #148

Recommended skills (based on diff analysis)

  • /doc-refactor — Documentation files modified
  • /deploy — PR references deployment/release
  • /investigate — PR references bug fix — was root cause analyzed?

Generated by skill-audit

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Preview deployment ready
🔍 https://ojf-cv-builder-3t4fbpyip-ojfbots-projects.vercel.app

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Preview deployment ready
🔍 https://ojf-cv-builder-9ijkulbje-ojfbots-projects.vercel.app

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Browser Automation Test Results

Suite Result
Comprehensive tests failure
Visual regression failure

Screenshot Baselines — 20/20 ✅ Complete

Status Baseline Test Step UI State
✅ captured dashboard-initial-desktop Dashboard - Initial Load TabPanel=Interactive, AppSidebar=Collapsed, ChatWindow=Hidden
✅ captured sidebar-expanded-desktop Sidebar - Expanded State TabPanel=Interactive, AppSidebar=Expanded, ChatWindow=Hidden
✅ captured bio-tab-desktop Bio Tab - Layout TabPanel=Bio, AppSidebar=Collapsed, ChatWindow=Collapsed, ActivePane=Bio - Summary
✅ captured bio-chat-open-desktop Bio Tab - Chat Open TabPanel=Bio, AppSidebar=Collapsed, ChatWindow=Expanded, ActivePane=Bio - Summary
✅ captured bio-form-empty-desktop Bio Form - Empty State TabPanel=Bio, AppSidebar=Collapsed, ChatWindow=Collapsed, ActivePane=Bio - Launch Tiles
✅ captured bio-file-browser-desktop Bio - File Browser TabPanel=Bio, AppSidebar=Collapsed, ChatWindow=Collapsed, ActivePane=Bio - File Viewer
✅ captured jobs-tab-desktop Jobs Tab - Layout TabPanel=Jobs, AppSidebar=Collapsed, ChatWindow=Collapsed
✅ captured jobs-sidebar-chat-desktop Jobs - Sidebar and Chat Open TabPanel=Jobs, AppSidebar=Expanded, ChatWindow=Expanded
✅ captured outputs-sidebar-desktop Outputs - Sidebar Expanded TabPanel=Output, AppSidebar=Expanded, ChatWindow=Collapsed
✅ captured outputs-tab-desktop Outputs Tab - Layout TabPanel=Output, AppSidebar=Collapsed, ChatWindow=Collapsed
✅ captured research-tab-desktop Research Tab - Layout TabPanel=Research, AppSidebar=Collapsed, ChatWindow=Collapsed
✅ captured pipelines-tab-desktop Pipelines Tab - Layout TabPanel=Pipelines, AppSidebar=Collapsed, ChatWindow=Collapsed
✅ captured toolbox-tab-desktop Toolbox Tab - Layout TabPanel=Toolbox, AppSidebar=Collapsed, ChatWindow=Collapsed
✅ captured jobs-chat-open-desktop Jobs - Chat Open TabPanel=Jobs, AppSidebar=Collapsed, ChatWindow=Expanded
✅ captured sidebar-collapsed-desktop Sidebar - Collapsed State TabPanel=Interactive, AppSidebar=Collapsed, ChatWindow=Hidden
✅ captured chat-component-desktop Chat Component - Initial State TabPanel=Interactive, AppSidebar=Collapsed, ChatWindow=Visible
✅ captured theme-light-desktop Theme - Light Mode TabPanel=Interactive, AppSidebar=Collapsed, Theme=Light
✅ captured settings-modal-open-desktop Settings Modal - Open TabPanel=Interactive, AppSidebar=Collapsed, Modal=Settings
✅ captured chat-input-focused-desktop Chat Input - Focus State TabPanel=Interactive, AppSidebar=Collapsed, ChatWindow=Visible, FocusedElement=ChatInput
✅ captured chat-help-badge-desktop Chat - Help Badge Interaction TabPanel=Interactive, AppSidebar=Collapsed, ChatWindow=Visible, HelpBadge=Visible
📸 Screenshots (20) ⏭ 20 no actual
⏭ no actual   dashboard-initial-desktop
Baseline
baseline
⏭ no actual   sidebar-expanded-desktop
Baseline
baseline
⏭ no actual   bio-tab-desktop
Baseline
baseline
⏭ no actual   bio-chat-open-desktop
Baseline
baseline
⏭ no actual   bio-form-empty-desktop
Baseline
baseline
⏭ no actual   bio-file-browser-desktop
Baseline
baseline
⏭ no actual   jobs-tab-desktop
Baseline
baseline
⏭ no actual   jobs-sidebar-chat-desktop
Baseline
baseline
⏭ no actual   outputs-sidebar-desktop
Baseline
baseline
⏭ no actual   outputs-tab-desktop
Baseline
baseline
⏭ no actual   research-tab-desktop
Baseline
baseline
⏭ no actual   pipelines-tab-desktop
Baseline
baseline
⏭ no actual   toolbox-tab-desktop
Baseline
baseline
⏭ no actual   jobs-chat-open-desktop
Baseline
baseline
⏭ no actual   sidebar-collapsed-desktop
Baseline
baseline
⏭ no actual   chat-component-desktop
Baseline
baseline
⏭ no actual   theme-light-desktop
Baseline
baseline
⏭ no actual   settings-modal-open-desktop
Baseline
baseline
⏭ no actual   chat-input-focused-desktop
Baseline
baseline
⏭ no actual   chat-help-badge-desktop
Baseline
baseline

📊 Visual Dashboard →  |  CI Run →

Apply the ADR-0081 loading-discipline to cv-builder's 366-line CLAUDE.md.
Always-loaded footprint: ~4151 -> ~941 tokens (366 -> 72 lines), ~77% drop.
Relocate-only (0 deletes, 0 @import); all distinctive strings verified present.

Routing:
- Layer 1: packages/agent-core/CLAUDE.md (nested) <- add-an-agent procedure +
  models note; loads when editing that package.
- Layer 1: .claude/rules/mf-and-deploy.md (paths: browser-app + vercel.json) <-
  Module Federation surface, shared singletons, local MF dev, Vercel deploy +
  cache-header rules.
- Layer 2: docs/claude-reference.md <- prerequisites, ESLint custom-rule
  catalog, Claude Code hook wiring, security commands, env setup, data dirs,
  architecture detail (multi-agent, monorepo tree, data models, package
  imports), agent system + .agents/ catalog, key technologies.
- Layer 0 (stays): identity + server-side-only invariant, pnpm, command
  quick-ref, security/secrets invariant, testing philosophy, privacy,
  deployment-safety invariant.

Fix: the broken root pointer 'see ARCHITECTURE.md' (CLAUDE.md:15) now targets
docs/ARCHITECTURE.md (the real path). Verified docs/ARCHITECTURE.md is NOT a
superset of the CLAUDE.md architecture block (missing Skills Gap Analyzer,
Interview Coach, container-presenter, ResearchEntry, @frame/eslint-plugin,
three-tier storage) -> relocated those to Layer 2 rather than deleting.

L2 lives in repo-native docs/ (domain-knowledge/ is a gitignored symlink farm).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ojfbot
ojfbot force-pushed the docs/claude-md-routing branch from 927fb5f to 70d7bf5 Compare June 4, 2026 22:51
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Preview deployment ready
🔍 https://ojf-cv-builder-2m0p8khcy-ojfbots-projects.vercel.app

@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Preview deployment ready
🔍 https://ojf-cv-builder-pfkmp502n-ojfbots-projects.vercel.app

@ojfbot
ojfbot merged commit 7ed1ef2 into main Jun 4, 2026
17 checks passed
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