agentleFS
Leiser123Leiser123/Claude_code_for-Bo/site/AGENTS.md

Claude_code_for-Bo / site

AGENTS.md2 starsChanged 3 months agoMITView on GitHub

These rules apply to the public landing page and documentation experience under site/. scripts/generate-docs-manifest.mjs scans docs/, then emits three things into src/generated/ (gitignored): Routes come from file paths (docs/start/install.md → /start/install). Renaming a file renames its URL, so add the old path to both LEGACY_ROUTES in src/content/docs.js and legacyRoutes in scripts/prepare-static-output.mjs. Sidebar grouping comes from the sections array in the generator — register any new top-level docs/ directory there or it sorts last with a bare directory name. Order inside…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 33,398 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository7 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

6 rules. About 1 is common, 0 are distinctive, and 5 are very specific to this project.

  • ≈1

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Keep the site independently installable with npm ci and buildable with npm run build.

    line 7
  2. Very specific:

    Keep npm run check deterministic, offline, and responsible for site-specific validation beyond compilation.

    line 8
  3. Very specific:

    Treat files under docs/ as the source of truth for long-form Chinese and English documentation.

    line 10
  4. Common:

    Do not copy private user state, credentials, local filesystem paths, or unredacted product screenshots into the site.

    line 11
  5. Very specific:

    Run bun run check:docs after site or docs changes and include desktop plus narrow-mobile browser evidence for user-visible layout changes.

    line 12
  6. Very specific:

    Use tokens (--surface-*, --text-*, --border*, --brand*, --sp-*, --fs-*, --r-*) rather than literal values.

    line 30

≈ “Common” is an estimate: at least 1 in 5 of the 43,423 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

React Site Instructions

These rules apply to the public landing page and documentation experience under site/.

Contracts that must not break

  • Keep the site independently installable with npm ci and buildable with npm run build.
  • Keep npm run check deterministic, offline, and responsible for site-specific validation beyond compilation.
  • Preserve the GitHub Pages custom-domain contract; production assets and routes must work from the root of cchaha.ai. scripts/prepare-static-output.mjs hard-fails when the CNAME drifts.
  • Treat files under docs/ as the source of truth for long-form Chinese and English documentation. Keep paired public routes aligned when both languages exist.
  • Do not copy private user state, credentials, local filesystem paths, or unredacted product screenshots into the site.
  • Run bun run check:docs after site or docs changes and include desktop plus narrow-mobile browser evidence for user-visible layout changes.

How content reaches the site

scripts/generate-docs-manifest.mjs scans docs/, then emits three things into src/generated/ (gitignored):

  • docs-index.js — the eager index: route, section, title, nav_title, description, order. Keep it small; it ships on every page.
  • content/<id>.js — one module per document holding the markdown body (frontmatter already stripped). docsContent maps a route to a dynamic import, so opening one page never downloads the rest.
  • search-index.js — lazily imported by the search dialog only.

Routes come from file paths (docs/start/install.md → /start/install). Renaming a file renames its URL, so add the old path to both LEGACY_ROUTES in src/content/docs.js and legacyRoutes in scripts/prepare-static-output.mjs.

Sidebar grouping comes from the sections array in the generator — register any new top-level docs/ directory there or it sorts last with a bare directory name. Order inside a group comes from each document's order frontmatter.

Design system

src/styles/base.css holds every token. The palette is lifted from the desktop app's 「纸·墨·印」 themes — light mirrors 纯白, dark mirrors 墨夜 — so the site and the app read as one product. Rules:

  • Use tokens (--surface-*, --text-*, --border*, --brand*, --sp-*, --fs-*, --r-*) rather than literal values. A raw hex in a component is a bug.
  • The primary button is ink (--ink), turning terracotta (--brand) on hover. It is not brand-coloured at rest.
  • Depth comes from 1px borders and surface layering, not heavy shadows.
  • Both themes must work. data-theme on <html> is set by the bootstrap script in index.html before first paint.
  • Breakpoints are 1180 / 900 / 620 across both stylesheets. Do not introduce a fourth.

Mermaid

````mermaid fences render as diagrams. Nothing under docs/ currently uses one — the two pages that did were deleted in the July 2026 restructure — so the dependency and its .doc-mermaid styles sit unused, lazily loaded and costing readers nothing. Keep them: internals/ is exactly where a diagram would earn its place, and the mermaid theme is already wired to the site tokens.

Fonts

Self-hosted in public/fonts/, copied from desktop/public/fonts/. Never add a Google Fonts @import or <link> — it is unreachable from mainland China and would leave every heading in a fallback serif. Only the latin subsets are hosted; Chinese glyphs fall through to the platform font on purpose, exactly as the desktop app does.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.