Skip to content

docs: trim AGENTS.md to what the code does not show, and fix stale claims - #192

Merged
Ardnived merged 1 commit into
mainfrom
claude/docs-doctor-trim
Oct 20, 2026
Merged

Ardnived merged 1 commit into
mainfrom
claude/docs-doctor-trim

Conversation

@Ardnived

Copy link
Copy Markdown
Contributor

Summary

  • The root AGENTS.md loads in every session. It now holds only what the code, the config and the skill listing do not already show: 20,606 → 15,322 characters (−26%).
  • Two path-bound rules move to new nested guides, each with a CLAUDE.md symlink, so they load only where they apply.
  • Stale claims in AGENTS.md, server/AGENTS.md and docs/rules/rest-api.md are fixed. Each one was checked against the code first. The docs follow the code.
  • Docs-only. The two edits outside Markdown are a comment in eslint.config.js and one phrase in DESIGN_SYSTEM.md. Both pointed at AGENTS.md sections that this PR removes.

Change outline

Trims in AGENTS.md

Cut, because another file already holds the fact:

  • the supported-agents line and the project overview / stack list (package.json)
  • the 11 standard commands (package.json scripts). The section becomes "Commands package.json does not show" and keeps sync:translations and check.sh
  • the .env copy step, the dev-mode notes and the variable-source table (.env.example, wrangler.toml, vite.config.ts). The PUBLIC__-is-not-public warning stays
  • the Workers/Hono architecture tour (server/entry.ts, wrangler.toml)
  • the pageContext bullet (types/vike.d.ts) and the Sentry section (sentry.browser.config.ts, vite.config.ts)
  • the /finalize-pr step list, the plugin skill list, the workflow.json description and the worktree note. These copies of the skills had drifted from them
  • the project skills table. Claude Code lists every skill description in each session

New nested guides

File Moved from the root Root keeps
components/AGENTS.md (+ CLAUDE.md symlink) Keep browser-only libraries out of the Worker bundle (ClientOnly + React.lazy) a one-line pointer under Cloudflare Workers Deployment
pages/AGENTS.md (+ CLAUDE.md symlink) the [slug] RESERVED_SEGMENTS exclusion a one-line pointer under Repo-wide conventions

The header blockquote and "Nested guides" in "Where everything lives" now list both guides.

YAML quoting fix

The description: values in .claude/skills/component-development/SKILL.md and .claude/skills/design-extraction/SKILL.md are now double-quoted. Unquoted, the : inside each value is a mapping error under strict YAML: ruby -ryaml raises Psych::SyntaxError on the old frontmatter.

Stale fixes

Where Was Now, per the code
AGENTS.md Debugging, and the local-environment line "a local 403 means the key is stale" a stale key or the atlas role gap (sahaj-atlas-client). GET /api/clients/me tells the two apart
AGENTS.md PR Workflow, phase 1 the finalize pipeline "opens the PR and makes CI pass" /finalize-pr opens a draft PR and pushes. Neither skill waits for CI
AGENTS.md commands pr-prep listed as a skill check.sh is the leanGate in .claude/workflow.json, and /finalize-pr runs it
AGENTS.md rule table leaves out code-comments.md a row for it, plus a note that a rule with no paths: loads in every session. rest-api now covers "Adding a query function", not "a cached" one
server/AGENTS.md depth > 1 without populate returns "missing fields" HTTP 400, as the comments in sahajcloud-client.ts say. Missing fields come from a populate entry that leaves them out
server/AGENTS.md getPageLocaleStatus "retries once" it passes maxAttempts: 1: one attempt, no retry
docs/rules/rest-api.md the example find sends depth: 2 with no select and no populate sends both. Without them the read is a 400

Not stale: "Nothing in this repo caches them". The KV removal (#98) has landed on main, and server/CACHING.md agrees.

Validation

  • Every fence is balanced, and all 66 relative links in the changed Markdown resolve.
  • Both SKILL.md frontmatters parse with ruby -ryaml safe_load.
  • node --check eslint.config.js and eslint eslint.config.js pass.
  • tests/guards/design-tokens.test.ts, the guard that reads DESIGN_SYSTEM.md, passes 4 of 4.

🤖 Generated with Claude Code

…aims

The root guide loads in every session, and most of what it carried was
already in package.json, .env.example, wrangler.toml, the Sentry config,
the plugin's skill listing or the skill bodies. AGENTS.md goes from
20,606 to 15,322 characters.

Two path-bound rules move to nested guides with a CLAUDE.md symlink, so
they load only where they apply: the browser-only-library pattern to
components/AGENTS.md, and the [slug] RESERVED_SEGMENTS exclusion to
pages/AGENTS.md. The root keeps a one-line pointer to each.

Both project SKILL.md descriptions are now quoted. Unquoted, the ": "
inside them is a mapping error under strict YAML.

Stale claims, each checked against the code:
- A local 403 can be the atlas role gap, not only a stale key.
- /implement-ticket and /finalize-pr open a draft PR and push. Neither
  waits for CI.
- check.sh is the leanGate that /finalize-pr runs, not a skill.
- The rule table lists code-comments.md, the one rule with no paths:.
- server/AGENTS.md: depth > 1 without populate is a 400, and
  getPageLocaleStatus makes one attempt (maxAttempts: 1), no retry.
- docs/rules/rest-api.md: the example query sends select and populate.

The eslint.config.js comment and the DESIGN_SYSTEM.md resource line no
longer point at removed AGENTS.md sections.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@Ardnived
Ardnived merged commit c6eee7e into main Oct 20, 2026
11 checks passed
@Ardnived
Ardnived deleted the claude/docs-doctor-trim branch October 20, 2026 22:50
@sydevs-bot sydevs-bot moved this from Revising to Done in SYDevelopers Technical Roadmap Oct 20, 2026
sydevs-bot pushed a commit that referenced this pull request Oct 20, 2026
AGENTS.md was the one conflicted file, in two hunks.

The command list took main's trim and kept this branch's `check:wrangler`
entry. #192 cut every command package.json already shows; check:wrangler is
a script there too, but its comment carries the prerequisite — ladle:build
writes the `build/` the dry run reads — which package.json cannot show.

The two reference-doc lines are one edit from each side: "Ladle playground"
is this branch's, and "a 403 is a stale key or a missing role" is #192's
stale-claim fix. Both kept.

#192 deleted tailwind.config.ts for the CSS-first `@theme`, and this branch
is what first puts ladle:build and check:wrangler in the gate job, so both
were re-run against the merge rather than assumed.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0117m7rQTWeApAfzWKT6VgHE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant