Skip to content

docs: one guide for people and agents, and a whole-docs review - #214

Merged
tenphi merged 8 commits into
mainfrom
claude/vibrant-bohr-kck3c7
Nov 24, 2026
Merged

tenphi merged 8 commits into
mainfrom
claude/vibrant-bohr-kck3c7

Conversation

@tenphi

@tenphi tenphi commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Why

The For humans / For AI agents split from #210 does not work:

  • 🏷️ The "For AI agents" tab held the wrong pages. Only 1 of its 21 pages (agents.md) is written for agents. The other 20 are ordinary guides and references, so a person who wants to change fonts has to open a tab that says it is not for them.
  • 🤖 Agents do not use sidebar tabs. They read llms.txt, the installed node_modules/@tenphi/cookbook/docs/, or the link in their prompt.
  • ⌨️ The human prompts were commands (npm create … --yes, npm run validate, config keys) instead of the person's goal.
  • 📚 Agent topics were spread over 4 overlapping pages.

This PR unifies the docs. It then fixes what review rounds found across the agent pages and the whole docs.

What changes

1. One set of docs for people and agents

  • 🧭 Navigation: Guide and Reference tabs. The Guide has an AI agents group: Work with a coding agent (/ai-agents), the Agent start page (/agents) and Agent harness.
  • 🧩 ai-agents.md absorbs ask-your-agent.md. The old route redirects through aliases.
    • It is organized by case: write a page, match your look, organize, publish on your domain, fix a part, keep current, API reference, another language, npm package, harness.
    • Each case has a prompt that states the goal and the facts only the person knows, what the agent does, what the person decides, and a link to the guide with the steps.
  • 📝 The Getting started prompt asks for the outcome, in all five languages. The translated pages now carry translated prompts.
  • 🤖 agents.md changes:
    • task rows for OpenAPI, languages and writing a page;
    • rule 6 says to leave a missing decision unset and report it, instead of stalling;
    • rule 7 offers to point a larger repository's instructions at a site created in one of its folders.
  • 🔧 Supporting files:
    • AGENTS.md documentation rules: one set of docs, prompts by case, no commands in prompts.
    • Also updated: README, translations, llms.txt (its For AI agents section stays, so the shipped harness rule is unchanged) and the reference budget check.

2. CLAUDE.md in new sites (@tenphi/create-cookbook)

  • Claude Code reads AGENTS.md only when no CLAUDE.md exists in its folder or above. So a site created with --source inside a repository that has a CLAUDE.md lost its agent instructions in Claude Code.
  • The creator now writes a CLAUDE.md containing only @AGENTS.md, so the rules stay in one file. This matches what harnesspm writes.
  • An existing CLAUDE.md is kept, and tests cover both cases.
  • The upgrade guide tells sites created before 0.34.1 to add the file.

3. Fixes from a whole-docs review

Three reviewers traced every page against packages/. Highlights:

  • Wrong facts:
    • build.strict is on by default.
    • The two "Upcoming" migration sections had already shipped in 0.30 and 0.31.
    • The origin conflict stops astro dev and astro build, not doctor.
    • Replacing the footer also loses the Markdown buttons and the credit.
    • The language selector falls back to the default-language page.
    • The brand contrast floors are corrected.
    • Setting only the body font keeps headings in Onest.
    • The Callout palette example now changes visible text.
    • The recipes intro no longer tells sites to drop root and content.
  • Examples that would break:
    • The monorepo and npm examples had no / page.
    • The preview example contradicted publishing.md.
    • Bare cookbook commands didn't run in a plain shell.
    • The ESLint setup didn't work on TypeScript 7.
    • The SiteTitle override lost its mobile preset.
  • Missing facts:
    • Astro 7.3.2 or a later 7.x is required.
    • A registry must serve packages without authentication.
    • The @tenphi/docs install for the graph API.
    • When frontmatterSchema runs.
    • Workflow branch and package-manager notes.
    • MDX imports for custom components.
  • One place per fact: repeated explanations now link to the page that owns them:
    • partial merging, server-only styling, header radius;
    • config discovery, the table of contents, localizeRepositoryLinks;
    • the color model, the comparison page.

Kept on purpose: architecture.md "Component ownership", the order of sections in authoring.mdx, and the "Client navigation" section.

Checks

  • Build, cookbook doctor with fragment checks, cookbook check-build and check-reference-budgets.mjs pass.
  • pnpm check:recipes passes: every checked recipe and example builds. The component anatomy check passes.
  • pnpm lint (0 warnings), prettier --check, pnpm check:harness, harnesspm sync --check and pnpm check:packages pass.
  • Tests pass: harness.test.ts, scaffold.test.ts, pack-docs.test.mjs, agent-discovery.test.ts, documentation.test.ts.

Entropy

  • Reader navigation: Moderately Decreased. There is no audience tab to pick before reaching Theme or Deployment, and one page of cases replaces two overlapping pages.
  • Agent path: Slightly Decreased. Task rows lead straight to the steps, and rule 6 no longer stalls the work.
  • Docs maintenance: Slightly Decreased. Repeated facts now live on one page each and are linked from the others.
  • Project creator: Neutral. One import-only file, which harnesspm already writes.
  • No exceptions recorded.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Gr8S7DePcxFzSN3gkPVNcb

The For humans / For AI agents split did not hold: only the agent start
page was written for agents, and agents do not use sidebar tabs. People
had to open a tab that said it was not for them to read any guide, and
the human prompts listed commands instead of the person's goal.

- Navigation: back to Guide and Reference tabs, with an AI agents group
  (Work with a coding agent, For AI agents, Agent harness).
- ai-agents.md absorbs ask-your-agent.md, organized by case: each prompt
  states the goal and the facts only the person knows, then what the
  agent does and what the person decides. The old route redirects.
- Getting started's prompt (and its four translations, now translated)
  asks for the outcome instead of dictating npm commands.
- llms.txt keeps its For AI agents section, so the harness rule is
  unchanged; the former For humans pages join Guides.
- AGENTS.md, README, translations and the reference budget check follow.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7DePcxFzSN3gkPVNcb
- ai-agents.md: every case links to the guide with its steps instead of
  restating it. The language case no longer claims the selector opens
  the language's home page; it links the default-language page and marks
  it as a fallback. The logo is not part of the theme.
- New "Write or update a page" case; cases ordered by how often people
  need them; harnesspm is a case; plain words instead of version
  integrity, contrast floors and trust values. The domain case leaves
  DNS to the person, and the published-site section links publishing.md.
- agents.md: no intro bullets that repeat the rules; rule 6 says to
  leave a missing decision unset and report it instead of stalling;
  rule 7 offers to point a larger repository's instructions at a site in
  one of its folders; task rows for OpenAPI, languages and writing a
  page; sidebar label "Agent start page".
- site-navigation.md says what each selector does for a missing page.
- agent-harness.md: the harness needs Cookbook 0.34.0 or later.
- Home pages link the agent path; translation fixes; the AI agents group
  drops the English-only marker its sibling groups never had; the Start
  group no longer shares its label with Getting started.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7DePcxFzSN3gkPVNcb
Claude Code reads AGENTS.md only when no CLAUDE.md exists in its folder
or above. A site created with --source inside a repository that has one,
the usual case, lost its agent instructions in Claude Code. The creator
now writes CLAUDE.md with a single `@AGENTS.md` import, so the rules stay
in one file. Like AGENTS.md, an existing CLAUDE.md is kept. harnesspm
writes the same import and keeps an existing one.

The upgrade skill stays in .agents/skills/: Claude Code does not discover
skills there, but AGENTS.md names its path, and the import now carries
that pointer to Claude Code too.

Docs list the new file, and the upgrade guide tells sites created before
0.34.1 to add it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7DePcxFzSN3gkPVNcb
- A new language needs its interface text too: Cookbook ships English
  and French messages only. The language case and the agents.md row
  link the translations section.
- The harness case says the agent records the person's trust choice
  before they run approve, which writes only pending entries.
- site-navigation.md names the last fallback: a home page.
- The sitemap needs the public URL.
- ai-agents.md links agents.md for what is installed instead of
  repeating its table; Getting started no longer lists a partial set of
  next steps, in every language.
- customization-rules.md: the hand-written agent instruction is for
  projects the creator did not make.
- Clearer link text on the home pages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7DePcxFzSN3gkPVNcb
- build.strict is on by default; the page described it as opt-in.
- Replacing or disabling the footer also removes the Markdown controls
  and the credit.
- A page's tableOfContents replaces the heading levels (missing ones use
  2 and 3) while mobile falls back to the site setting.
- The APCA rule names theme.brand.contrast.apca; the title falls back to
  the first `#` heading; plain words for "safe mode" and the inline
  config root.
- The color model and localizeRepositoryLinks link to the pages that own
  them instead of restating them; a migration note leaves the reference.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7DePcxFzSN3gkPVNcb
- migration.md: the two "Upcoming" sections shipped in 0.30 and 0.31;
  they are now version ranges, with the Tasty versions corrected. The
  page-text note links publishing.md, which has the header advice.
- cli.md: missing links are errors unless build.strict is false; the
  build also stops on the two contrast errors.
- publishing.md: astro dev and build, not doctor, stop on conflicting
  origins.
- plugins.md: frontmatterSchema runs in astro dev and build, not in
  doctor; the snippet has its imports.
- architecture.md: install @tenphi/docs to use the graph API; the
  pipeline ends with the discovery files.
- deployment.md: the workflow runs on pushes to main and adds pnpm or
  Yarn setup; one statement of the project-site base.
- troubleshooting.md: what doctor reports for missing pages, and links
  to the languages and versions sections.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7DePcxFzSN3gkPVNcb
- examples.md: the monorepo and npm examples get a home page, since the
  header title links to /; the preview example keeps the production URL
  as publishing.md says; commands run as written; the registry note
  moves to content-sources.md, which says it must not need a login.
- getting-started.md: Cookbook needs Astro 7.3.2 or a later 7.x;
  --yes and the creator flags are explained; config file discovery links
  the configuration reference; doctor is named.
- content-sources.md: plain opening; "Default sources" heading; dot
  paths are skipped too; missing links are errors by default.
- site-navigation.md and comparison.md say each fact once; authoring
  names the preview's View source control.
- Home pages describe the examples correctly. Translations mirror these
  changes, add the deploy step and use one name for the authoring page.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7DePcxFzSN3gkPVNcb
- theme-and-components.md: the Callout palette example styles the parts
  that set text color; the brand contrast text matches palette.ts (brand
  text 75/90, filled labels 80/95, a target below 45 cannot lower them);
  Tasty, Glaze, APCA and OKHSL are explained before use; custom
  components show their MDX import.
- Setting only the body font keeps headings in Onest: the local-font
  recipe sets both, and the fonts page says so.
- recipes.md: copy a recipe's site and theme fields and keep root,
  content and site.url, instead of replacing the file.
- customization-rules.md: lint leads with createValidationConfig, the
  SiteTitle example keeps its mobile preset, checks use validate.
- custom-components.md: ESLint leads with a config that works on
  TypeScript 7; real part names.
- component-styles.md: legacy hooks named, example owners named, an
  override that changes something, accurate @prose-heading; lint does
  not check theme.styles values.
- Partial merging, server-only styling and header radius are explained
  once and linked from the other pages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Gr8S7DePcxFzSN3gkPVNcb
@tenphi tenphi changed the title docs: unify the docs for people and coding agents docs: one guide for people and agents, and a whole-docs review Nov 24, 2026
@tenphi
tenphi merged commit ffcc0a5 into main Nov 24, 2026
12 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 24, 2026
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