Process GitHub Issues for Testim docs Japanese localization. Fetches English originals, fixes Japanese docs (callouts, links, images, Japanese quality), creates new pages when missing, then creates PRs. Triggers: "/fix-doc-localization-issues", "Issue対応", "Issue処理" Arguments: Space-separated Issue numbers (e.g., /fix-doc-localization-issues 40 42 43)
Fix quality issues in Japanese documentation as described in GitHub Issues, then create PRs. Handles both existing page fixes and new page creation.
Accepts space-separated Issue numbers.
/fix-doc-localization-issues 40 42 43
If no arguments are provided, ask the user for Issue numbers.
Before starting, read and follow all rules in:
docs/WRITING_GUIDE.md — Frontmatter, internal links, callouts, source fidelity, terminologydocs/TRANSLATION_GUIDE.md — Natural Japanese, NG/OK patterns, terminology tabledocs/OPS_DESIGN.md — Review policy, feedback loopProcess Issues one at a time to completion. Do not interleave branches or PRs across Issues.
gh issue view {ISSUE_NUMBER}
sourceUrl from each target file's frontmattergit checkout main && git pull
git checkout -b claude/{topic-name}
Derive the branch name from the Issue content (e.g., claude/fix-recording-tests).
Check if the target file exists in src/content/docs/:
WebFetch each target file's sourceUrl and verify:
Apply fixes based on findings. Common patterns:
| Problem | Fix |
|---|---|
Legacy callout (> 📘) | Convert to :::info{title="..."} |
(doc:slug) links | Convert to /docs/slug |
| External link with existing JA file | Convert to /docs/slug internal link |
:fa-arrow-right: markers | Remove or replace with bold text |
| Image not embedded | Embed at the correct position per the original |
| Unnatural Japanese | Refer to TRANSLATION_GUIDE NG/OK patterns |
| Mistranslated Testim terms | Revert to English (see TRANSLATION_GUIDE 5.2) |
When the Issue identifies a page that does not yet exist in the repository:
sourceUrl to obtain the English contentnpm run check:snapshots:fetch -- --slug={slug} to save the HTML snapshotnpm run docs:fetch -- --slug={slug} or download images referenced in the EN HTML to public/images/{category-folder}/{slug}/snapshots/en/sidebar.jsonorder values. If inserting between existing values with no gap, shift subsequent files' order by +1src/content/docs/{category-folder}/{slug}.md:
<div class="note"> → :::note, links → /docs/{slug}npm run lint:docs -- --path={file} and npm run check:parity -- --slug={slug}Run a read-only review per .claude/skills/codex-review/SKILL.md:
codex -s read-only exec -C . \
"Review the Japanese documentation files changed on this branch against their English sourceUrl originals. Check: (1) all paragraphs/steps/callouts/images preserved, (2) images embedded at correct positions, (3) internal links use /docs/{slug} format, (4) Testim product names kept in English, (5) callouts use ::: directive syntax. No confirmation or questions needed. Provide concrete issues proactively."
Incorporate any feedback from Codex into fixes.
npm run lint && npm run test && npm run build
Loop back to Step 4 until all checks pass.
git add {target files}
git commit -m "docs: {summary of changes}
Closes #{ISSUE_NUMBER}"
git push -u origin claude/{topic-name}
Create PR:
gh pr create --title "docs: {summary}" --body "$(cat <<'EOF'
## Summary
- {changes}
## Checklist
- [ ] Compared against sourceUrl original
- [ ] Callouts use ::: directive syntax
- [ ] Internal links use /docs/{slug} format
- [ ] Testim terminology kept in English
- [ ] lint / test / build all pass
Closes #{ISSUE_NUMBER}
🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
)"
If a parent Issue has checkboxes for this work, update them:
gh issue view {PARENT_ISSUE_NUMBER}
If you find patterns that should be added to TRANSLATION_GUIDE or WRITING_GUIDE:
docs/OPS_DESIGN.md feedback loop)| Situation | Action |
|---|---|
| WebFetch fails for sourceUrl | Verify URL in browser. If invalid, comment on the Issue |
| Lint errors | Read error output, fix target files per WRITING_GUIDE |
| Build errors | Check frontmatter YAML syntax. Run astro check for details |
| Target file does not exist | Follow Step 4B to create the new page |