OpenSpec RU Mirror Sync
When to use
Use this skill immediately after:
/opsx:propose(artifacts created/updated inopenspec/changes/<change>/)/opsx:apply(tasks/design/specs updated inopenspec/changes/<change>/)/opsx:sync(main specs updated inopenspec/specs/)/opsx:archive(change moved to archive)- Any manual edit under
openspec/that should be mirrored toopenspec-ru/
Inputs
mode: one ofchange,main-specs,archivechange: required forchangeandarchivemodesupdated_paths: optional list of changed files; if omitted, sync full target scope
Rules
openspec/is source of truth. Never translate back from RU to source.- Translate markdown using Subagent model Composer 2.5.
- Keep technical identifiers unchanged:
- status/reason literals (
quarantine,mapping_invalid,row_empty_key, etc.) - endpoint paths, file paths, class names, table names, enum values
- status/reason literals (
- Preserve markdown structure exactly, especially checkboxes in
tasks.md(- [ ]/- [x]). - Non-markdown metadata files (e.g.,
.openspec.yaml) are copied as-is. - Mirror includes all change artifacts:
proposal.md,design.md,data-model.md,reused.md,tasks.md, andspecs/**/*.md.
Workflow
- Resolve source/target scope:
change:openspec/changes/<change>/->openspec-ru/changes/<change>/main-specs:openspec/specs/->openspec-ru/specs/archive: ensure both source trees are archived with sameYYYY-MM-DD-<change>suffix
- Ensure target directories exist (create if missing):
mkdir -p <mirror_scope> - Copy non-markdown files as-is:
(If bash is unavailable, usersync -a --include='*/' --exclude='*.md' --prune-empty-dirs <source_scope>/ <mirror_scope>/shutil.copy2in Python for each non-markdown file.) - Translate markdown files via Subagent (Composer 2.5):
- Invoke the Subagent with the instruction: "Translate the following markdown file to Russian. Preserve all markdown structure, code blocks, checkbox syntax (
- [ ]/- [x]), and technical identifiers (paths, enum values, status literals, class names) exactly as-is. Only translate human-readable prose." followed by the full file contents. - Write the Subagent output to the corresponding path under the mirror directory.
- Invoke the Subagent with the instruction: "Translate the following markdown file to Russian. Preserve all markdown structure, code blocks, checkbox syntax (
- Run parity check:
(If bash is unavailable, usediff <(find <source_scope> -type f | sed "s|<source_scope>/||" | sort) \ <(find <mirror_scope> -type f | sed "s|<mirror_scope>/||" | sort)os.walkin Python to compare relative path sets and identifymissing_in_mirror/extra_in_mirror.)- Report any missing or extra entries as skipped/failed files.
- Report:
- synced scope
- translated file count
- parity result
- any skipped/failed files with reason
Output format
Use this concise summary:
## RU Sync Result
- Scope: <change|main-specs|archive>
- Source: `<path>`
- Mirror: `<path>`
- Translated: <N> markdown files (Composer 2.5)
- Copied as-is: <M> files
- Parity: <ok|failed>
- Notes: <issues or "none">