Skip to content

docs: slim root CLAUDE.md, move detail to scoped CLAUDE.mds + skills#38

Merged
FranRom merged 3 commits into
mainfrom
docs/slim-claude-md-with-skills
May 17, 2026
Merged

docs: slim root CLAUDE.md, move detail to scoped CLAUDE.mds + skills#38
FranRom merged 3 commits into
mainfrom
docs/slim-claude-md-with-skills

Conversation

@FranRom
Copy link
Copy Markdown
Owner

@FranRom FranRom commented May 16, 2026

Summary

Root CLAUDE.md is loaded into every session's context. It had grown into a reference manual (~600 lines covering fetcher steps, MCP invariants, filter tuning, AI review internals). This PR slims it to index + cross-cutting invariants and pushes the detail to where it's actually needed.

  • Scoped CLAUDE.mds (auto-loaded by Claude Code only when working in that directory):
    • src/fetchers/CLAUDE.md — hard invariants + security checklist (fetchers must never throw, safe HTTP wrappers, isSafeUrl, stripHtml, etc.)
    • src/mcp/CLAUDE.md — stdio/JOB_ID/lock/error-envelope invariants
  • pupila-* skills under .claude/skills/ (committed so contributors get them):
    • pupila-fetchers — adding a fetcher, tier-S slugs, known upstream issues
    • pupila-mcp-tools — 4-step recipe for adding an MCP tool
    • pupila-filters — tuning weights, _signals debugging, scoring tiers reference
    • pupila-ai-review — review pipeline, brief lever, AI Apply, provider-switching
  • .gitignore — keep .claude/ local-only by default but allow .claude/skills/pupila-*/ to ship.
  • Root CLAUDE.md — drops ~600 lines, adds a "Where things live" index pointing into each scoped file or skill. While editing, fixed a few stale facts (TypeScript 6 not 5.9, Vitest 4 / 330 cases not Vitest 3 / 192, pre-commit also runs lint:ui-patterns, CI has 7 gates incl. bundle-size).

Test plan

  • pnpm run lint — clean
  • pnpm run typecheck — clean
  • pnpm run lint:ui-patterns — clean
  • Sanity check the rendered Markdown on GitHub (tables, code fences, the new "Where things live" index)
  • Spot-check that the four new skill files are picked up by a fresh Claude Code session (they appear in available-skills after install)

Root CLAUDE.md is loaded every turn — make it an index + cross-cutting
invariants, not a reference manual.

- New scoped CLAUDE.mds (auto-loaded by Claude Code in their dirs):
  - src/fetchers/CLAUDE.md  — hard invariants + security checklist
  - src/mcp/CLAUDE.md       — stdio/lock/error-envelope invariants
- New pupila-* skills under .claude/skills/ (ship with the repo):
  - pupila-fetchers      — adding a fetcher, tier-S slugs, upstream issues
  - pupila-mcp-tools     — 4-step recipe for adding an MCP tool
  - pupila-filters       — tuning weights, _signals debugging, scoring tiers
  - pupila-ai-review     — review pipeline, brief lever, AI Apply
- .gitignore: keep .claude/ local-only except pupila-* skills (ship)
- Root CLAUDE.md: drop ~600 lines moved into the above; add a "Where
  things live" index pointing to each
@FranRom FranRom self-assigned this May 16, 2026
@FranRom FranRom requested review from ibsenjg and ogarciarevett May 16, 2026 18:24
The skill and the scoped CLAUDE.md split the same concern by audience
(procedure vs invariants) but always fire together — every tool change
edits files in src/mcp/ anyway. Consolidating into the scoped CLAUDE.md
removes the "Hard invariants (refresher)" duplication and gives one
auto-loading home for both.
Copy link
Copy Markdown
Collaborator

@ogarciarevett ogarciarevett left a comment

Choose a reason for hiding this comment

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

LGTM

No content removed. Stack, repo layout, and code-level docs converted
from bullets/ASCII tree to tables for scanability. New 'Orchestrator
flow' section walks the `pnpm run dev` pipeline step-by-step instead
of leaving it implicit. Stale test count (192) fixed to 330.
@FranRom FranRom merged commit 7df1921 into main May 17, 2026
1 check passed
@FranRom FranRom deleted the docs/slim-claude-md-with-skills branch May 17, 2026 13:52
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.

2 participants