返回 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 - `lib/changelog.generated.ts` and `lib/install-guide.generated.ts` are not
10 tracked. `npm run prebuild`, `npm run dev` and the vitest global setup derive
11 them from `CHANGELOG.md` and `docs/INSTALL.md`; never commit them.
12 - Shared public copy lives in `lib/content/`. Keep product vocabulary aligned
13 with `docs/public-surface-facts.json` and `docs/MODES.md`; extend locale data,
14 not individual pages.
15 - Localization migrations are one-way. New or touched pages use the shared
16 dictionary/content spine; do not add page-local language booleans, `isZh`
17 copy forks, or hard-coded translated page clones. A compatibility exception
18 must name the external contract that still requires it. Website/docs
19 machine translation uses `npm run i18n:gt` (local JSON catalogs into the
20 same dictionaries). Do not add `gt-next` beside that path, and do not
21 point GT at TUI locale packs.
22 - Real-session media is owned by `lib/media-manifest.ts`. `pending` is the
23 truthful state until the complete asset set passes manifest tests.
24 - `AGENT.md` (singular) documents maintainer-owned community automation. Do not
25 expand its authority without Hunter.
26
27 Choose evidence according to the claim. For a localized page, render and inspect
28 that page at representative widths and run the narrow dictionary/content check
29 if it adds useful confidence. For a build-system or release-wide change, a full
30 gate may be justified. Do not run this whole sequence by default, and do not add
31 a test merely to freeze copy or component structure:
32
33 ```sh
34 npm ci
35 npm run prebuild
36 npm run check:facts
37 npm run check:docs
38 npm test
39 npm run lint
40 npm run build
41 ```
42
42 lines MARKDOWN