From mz-dev-pipe
ALWAYS invoke when the user wants to translate files, docs, or i18n resources. Triggers - "translate X to Y", "localize", "i18n to <lang>". When NOT to use - single-sentence phrase translation (answer inline).
npx claudepluginhub doctormozg/claude-pipelines --plugin mz-dev-pipeThis skill is limited to using the following tools:
Orchestrates a plan-approve-translate-verify flow for translating documents, READMEs, and i18n resources. Discovery produces a reviewable plan; an approval gate blocks every dispatch until the user confirms; parallel `pipeline-translator` waves produce output with Tier-1 structural checks inside each agent; an LLM-as-Judge sweep runs Tier-2 semantic review across all chunks; uncertainty-driven ...
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Checks Next.js compilation errors using a running Turbopack dev server after code edits. Fixes actionable issues before reporting complete. Replaces `next build`.
Guides code writing, review, and refactoring with Karpathy-inspired rules to avoid overcomplication, ensure simplicity, surgical changes, and verifiable success criteria.
Share bugs, ideas, or general feedback.
Orchestrates a plan-approve-translate-verify flow for translating documents, READMEs, and i18n resources. Discovery produces a reviewable plan; an approval gate blocks every dispatch until the user confirms; parallel pipeline-translator waves produce output with Tier-1 structural checks inside each agent; an LLM-as-Judge sweep runs Tier-2 semantic review across all chunks; uncertainty-driven Tier-3 probes (Wiktionary, MyMemory, back-translation) spend budget only on chunks the earlier tiers flagged. Verification is always on.
md, mdx, json, yaml/yml, po, properties, strings, xliff, txt.polish skill..docx, .pdf, images) — unsupported; escalate via AskUserQuestion.$ARGUMENTS is a natural-language request. Accepted forms: translate <path> to <lang> and translate <path> to <lang> mode:<sidecar|inplace|i18n>. There is no verification opt-in flag in the grammar — tiered verification is always on and its fixed cost is shown to the user at the approval gate. Source language defaults to auto-detect; output mode defaults to sidecar. Empty or ambiguous arguments escalate via AskUserQuestion — never guess.
See skills/shared/scope-parameter.md for the canonical scope modes (branch, global, working) and their git commands. Document any skill-specific overrides or restrictions below this line.
$ARGUMENTS contains path tokens or globs, those paths define the scope; if no path tokens are present, default to global (all eligible files in the repo).scope:working is an explicit opt-in for translating only uncommitted changes — useful for iterating on a draft, but rarely the right default for docs that are usually committed.scope:branch limits translation to files changed on the current branch vs base.scope:global translates all eligible project files; discovery excludes vendored, generated, and binary files..mz/task/| # | Phase | Reference | Loop? |
|---|---|---|---|
| 0 | Setup | inline below | — |
| 1 | Discovery + planning | phases/discovery_and_planning.md | — |
| 1.5 | User approval gate | inline below | re-plan on feedback |
| 2 | Parallel translation + Tier-1 structural verification (inside agent) | phases/translation_and_verification.md | wave loop |
| 3 | Cross-file consistency scan + glossary delta merge | phases/translation_and_verification.md | — |
| 4 | Tier-2 semantic verification (LLM-as-Judge, all chunks, wave-split) | phases/translation_and_verification.md | bounded |
| 5 | Tier-3 uncertainty-driven verification (Wiktionary / MyMemory / back-tr) | phases/translation_and_verification.md | bounded |
| 6 | Bounded re-translation loop on chunks with Critical: findings | phases/translation_and_verification.md | max MAX_VERIFICATION_ATTEMPTS |
| 7 | Finalization + summary | inline below | — |
<YYYY_MM_DD>_translate_<slug> where <YYYY_MM_DD> is today's date (underscores) and <slug> is a snake_case summary of the raw argument (max 20 chars); on same-day collision append _v2, _v3.TASK_DIR/<task_name>/ on disk.state.md with Status: running, Phase: setup, Started: <ISO 8601>, approval_iterations: 0.Read phases/discovery_and_planning.md at phase entry and run steps 1.1 through 1.8 in order. Output: <task_dir>/translation_plan.md, <task_dir>/discovery.md, <task_dir>/glossary.json. State → discovery_complete.
This orchestrator (not a subagent) must present to the user via AskUserQuestion. This step is interactive and must not be delegated. Full detail in phases/discovery_and_planning.md under Phase 1.5; the five load-bearing elements are:
Show <task_dir>/translation_plan.md verbatim plus the verification cost block (chunks, judge batches via MAX_JUDGE_BATCH, Tier-3 caps via MAX_WIKTIONARY_LOOKUPS / MAX_MYMEMORY_QUERIES, wall-clock range, INPLACE_DESTRUCTIVE highlight).
Before invoking AskUserQuestion, emit a text block to the user:
Translation plan ready for approval
The discovery phase has completed. The plan below shows all files to be translated, estimated chunks, and verification cost. Review the plan and verify the scope is correct.
Ask via AskUserQuestion ending literally with: Type **Approve** to proceed, **Reject** to cancel, or type your feedback.
"approve" → state plan_approved, proceed to Phase 2.
"reject" → state aborted_by_user, stop. Do not proceed.
Feedback → re-run affected Phase 1 sub-steps, overwrite the plan, re-present via AskUserQuestion. Increment approval_iterations; bounded by MAX_APPROVAL_ITERATIONS. This is a loop — repeat until the user explicitly approves. Never proceed to Phase 2 without explicit approval.
Cap reached → when approval_iterations reaches MAX_APPROVAL_ITERATIONS, follow the escalation branch in phases/discovery_and_planning.md Phase 1.5 "Iteration accounting" — it is the single source of truth for the three-choice escalation (abort / approve as-is / one final narrow revision with counter reset). Do not re-state the logic here; the phase file owns it.
Read phases/translation_and_verification.md on entry to Phase 2 and keep it loaded through Phase 6. Each phase ends with a state transition:
pipeline-translator waves, each running Tier-1 structural verification before returning. State → translation_complete.glossary_delta_<chunk_id>.json, sweep for cross-file term drift, re-dispatch drifted chunks. State → consistency_complete.ceil(total_chunks / MAX_JUDGE_BATCH) parallel pipeline-code-reviewer dispatches. State → judge_complete.Critical:. Wiktionary and MyMemory bounded by their constants; back-translation only on chunks with a Tier-2 Critical:. State → deep_verify_complete.Critical: finding, capped per chunk by MAX_VERIFICATION_ATTEMPTS shared with Phase 3.3 consistency re-dispatches. Phase 2.2 NEEDS_CONTEXT re-dispatches use a separate per-chunk MAX_CONTEXT_RETRIES counter. State → retranslation_complete.<task_dir>/summary.md per the Phase 7.1 shape in phases/translation_and_verification.md.state.md phase to complete with ended_at, final_outputs, escalations, phase_history, tier3_ledger_path.Delegated to phase files (see Phase Overview table). Reference material: grep references/placeholder-patterns.md, references/markdown-preservation-rules.md, references/language-codes.md.
| Rationalization | Rebuttal |
|---|---|
| "skip the plan gate, it's just a translation" | "sidecar vs inplace is the difference between a review diff and a destroyed original; the gate costs seconds and prevents days of cleanup." |
| "LLM translation is good enough, skip Tier-1" | "an LLM will silently drop {{user.name}} and your app will crash in production; grep -c costs nothing." |
| "only judge the headings; skip full Tier-2" | "the prioritized rubric already front-loads headings — the rest of the chunk is judged in the same pass; the savings are illusory." |
mode:inplace without showing the destructive warning.DONE without running Tier-1 verification.On completion, print the summary block from <task_dir>/summary.md covering files translated, Tier-1 pass/fail, Tier-2 verdicts and finding counts, Tier-3 lookup counts (<used> / MAX_*), glossary seeded/added/conflict counts, Phase 6 re-translation count, and every DONE_WITH_CONCERNS chunk surfaced for human review.