Sync User Manual
Synchronize 使用说明/ with the deployed issue-wiki website through the deterministic script in scripts/sync_manual.py.
Workflow
Work from the repository root.
Require
.agents/skills/sync-user-manual/.env.local. If it is missing, ask the user to copy.env.exampleand fill in the deployed API URL and administrator credentials. Never read the repository-root.envor.env.secrets.Run the preview command:
python .agents/skills/sync-user-manual/scripts/sync_manual.pyReport the preview counts and every validation or duplicate conflict. Do not continue when preview fails.
Obtain explicit user confirmation before writing to the deployed website.
After confirmation, run:
python .agents/skills/sync-user-manual/scripts/sync_manual.py --applyReport the completed, skipped, and failed operations. Never retry a failed write automatically; a later full rerun is idempotent.
Safety Rules
- Treat preview login as read-only access. Do not use
--applyunless the user explicitly confirms the displayed plan. - Never print passwords, bearer tokens, or authorization headers.
- Never delete remote documents, folders, uploads, comments, or likes.
- Stop before writes when local validation or remote duplicate detection fails.
- Keep
.env.localand the repository-root.sync-user-manual-state.local.jsonuntracked. - Do not contact a production deployment while developing or testing this skill unless the user explicitly requests it.
Deterministic Behavior
- Map directories below
使用说明/to website folders; do not create a使用说明wrapper folder or image-only folders. - Match a document by normalized target folder path plus its complete filename stem.
- Preserve unrelated remote content and existing website folder ordering. Never compare or update folder
sort_order. - Omit folder
sort_orderwhen creating a missing folder so the website assigns its position. Synchronize only matched documents' content and ordering. - Upload only referenced local JPG, JPEG, PNG, GIF, or WebP files. Reuse URLs by SHA-256 from the local state file.
- Leave remote, absolute-site, data, and anchor image URLs unchanged.