docs: add publish repo editing rules

This commit is contained in:
Peter Steinberger 2026-04-23 19:11:50 +01:00
parent 57f96f380b
commit d9bc5cfe11
No known key found for this signature in database
2 changed files with 35 additions and 0 deletions

34
AGENTS.md Normal file
View File

@ -0,0 +1,34 @@
# AGENTS.MD
Publish mirror for `docs.openclaw.ai`. Source repo: `openclaw/openclaw`.
## Rule
- Do not hand-edit generated docs output.
- Fix source or workflow; let sync/translation regenerate.
- Emergency generated-output edits need explicit owner approval and a follow-up source/workflow fix.
## Editable Here
- `AGENTS.md`, `CLAUDE.md`, `README.md`.
- `.github/workflows/translate-*.yml`.
- `.github/workflows/translate-locale-reusable.yml`.
- `docs/.i18n/glossary.<locale>.json` when adding fixed glossary terms for the translation workflow.
## Do Not Edit Here
- English docs under `docs/**`; edit `openclaw/openclaw/docs/**` instead.
- `docs/docs.json`; generated by source sync.
- Locale pages under `docs/<locale>/**`; generated by translation workflows.
- Translation memory `docs/.i18n/*.tm.jsonl`; generated by translation workflows.
- Locale navigation files `docs/.i18n/*-navigation.json`; generated workflow state.
- `.openclaw-sync/source.json`; generated sync metadata.
- `.openclaw-sync/check-docs-mdx.mjs` and `.openclaw-sync/docs-mdx-repair.md`; copied from `openclaw/openclaw`.
## Workflow
- Source sync starts in `openclaw/openclaw/.github/workflows/docs-sync-publish.yml`.
- Sync mirrors `openclaw/openclaw/docs/**` into this repo and updates `.openclaw-sync/source.json`.
- Locale workflows run from this repo after push, schedule, release dispatch, or manual dispatch.
- Translation pending logic compares source file SHA-256 with each page's `x-i18n.source_hash`.
- If translated MDX fails, the repair step may touch only `docs/<locale>/**` and `docs/.i18n/<locale>.tm.jsonl`.

1
CLAUDE.md Symbolic link
View File

@ -0,0 +1 @@
AGENTS.md