返回 CodeWhale
AGENTS.md
根目录 / web / AGENTS.md
1 # Web agent guidance
2
3 Read the repository guidance first. This directory is the Codewhale Next.js
4 site.
5
6 - Repository facts are generated by `npm run prebuild` into
7 `lib/facts.generated.ts`. Change their source and regenerate; never hand-edit
8 the generated file.
9 - Shared public copy lives in `lib/content/`. Keep product vocabulary aligned
10 with `docs/public-surface-facts.json` and `docs/MODES.md`; extend locale data,
11 not individual pages.
12 - Localization migrations are one-way. New or touched pages use the shared
13 dictionary/content spine; do not add page-local language booleans, `isZh`
14 copy forks, or hard-coded translated page clones. A compatibility exception
15 must name the external contract that still requires it. Website/docs
16 machine translation uses `npm run i18n:gt` (local JSON catalogs into the
17 same dictionaries). Do not add `gt-next` beside that path, and do not
18 point GT at TUI locale packs.
19 - Real-session media is owned by `lib/media-manifest.ts`. `pending` is the
20 truthful state until the complete asset set passes manifest tests.
21 - `AGENT.md` (singular) documents maintainer-owned community automation. Do not
22 expand its authority without Hunter.
23
24 Choose evidence according to the claim. For a localized page, render and inspect
25 that page at representative widths and run the narrow dictionary/content check
26 if it adds useful confidence. For a build-system or release-wide change, a full
27 gate may be justified. Do not run this whole sequence by default, and do not add
28 a test merely to freeze copy or component structure:
29
30 ```sh
31 npm ci
32 npm run prebuild
33 npm run check:facts
34 npm run check:docs
35 npm test
36 npm run lint
37 npm run build
38 ```
39
39 lines MARKDOWN