Inherits all behavior from /AGENTS.md at the monorepo root. Local rules extend or override the root file for this repository.
This repository is the standalone HagiCode documentation site built with Astro and Starlight.
- User docs, guides, and reference pages live here.
- Blog content and release-note related flows also run here.
- The marketing website lives in
repos/site.
Run commands from repos/docs/.
Run from repos/docs/. Most commands chain prepare:docs-runtime first so generated locale resources and the assembled content tree exist before Astro or TypeScript run.
For a no-build first pass, use npm run test:fast; it prepares the docs runtime and runs TypeScript checking only, so it does not validate rendered pages or production output. Use the full build commands for release and CI verification.
npm install
npm run dev
npm run build
npm run build:ci
npm run preview
npm run test:fast
npm run typecheck
npm run verify:blognpm run i18n:check # audit + stale generated-resource check + doctor
npm run i18n:audit
npm run i18n:doctor
npm run i18n:generate # refresh src/i18n/generated resources
npm run i18n:sync # dry-run en-US -> zh-CN
npm run i18n:prune # dry-run prunenpm run release-notes:fetch
npm run release-notes:materialize
npm run release-notes:sync
npm run verify:release-notes:input
npm run verify:release-notes:output
npm run test:release-notesnpm run sync:articles-snapshot # structured article snapshot for *-vs-hagicode FAQ routes
npm run sync:tips-snapshotnpm run screenshots:scan-metadata
npm run screenshots:syncnpm run verify:docs-image-references # read-only audit of body image references
npm run test:docs-image-referencesnpm run test:release-notes
npm run test:runtime-version-index # vitest; chains prepare:docs-runtimenpm run report:translation
npm run translate:missing:pi
npm run verify:docs-translationsrc/content/docs/: documentation and blog contentsrc/content/.generated/docs/: build-time assembled Starlight input tree generated byprepare:docs-content; do not edit directlysrc/components/: custom site componentssrc/i18n/locales/: source-of-truth YAML UI strings per localesrc/i18n/generated/: committed generated locale resources imported byastro.config.mjssrc/data/release-notes/: release-note source data and materialized outputscripts/: content preparation, verification, and sync toolingtests/: script and content workflow tests
- Favor clear documentation structure over marketing language.
- Keep content in Markdown or MDX patterns already established in the repo.
- Preserve frontmatter, heading structure, internal links, and verification-script expectations.
- Use repo scripts for content materialization, translation, release notes, and screenshot workflows instead of editing generated output directly.
- Keep docs-specific concerns here; broader product marketing belongs in
repos/site. - Tag new calls to action for Google Analytics with
gaEventAttributes()and follow the "Analytics events" notes inREADME.md.
README.mdDESIGN.mdscripts/