Skip to main content

Solo Founder OS agent #4 — keep EN/ZH locale JSON in sync via Claude + HITL markdown review.

Project description

bilingual-content-sync-agent

English | 中文

Solo Founder OS agent #4 — keep en.json and zh.json (or any locale pair) in sync. Diffs, translates missing keys via Claude, queues them in a markdown HITL review file, applies approved edits back to your locale JSON. Never auto-writes without human approval.

License PyPI Python Model

Built by Alex Ji for VibeXForge's 925 EN/ZH i18n strings. Born from this thought:

Every feature ships English first. ZH catches up days or weeks later. Tracking which keys are stale is manual labor I do at 1 AM. Same for the next 11 makers I know.

What it does

en.json + zh.json
        ↓
   diff (find keys present in EN, missing/empty/echo'd in ZH)
        ↓
   translate via Claude Sonnet (vibex-tone glossary baked in)
        ↓
   queue/pending/<timestamp>-review.md
        ↓
   founder edits in Obsidian, moves to queue/approved/
        ↓
   apply → writes back to zh.json (preserves nesting + key order)

CLI

# Coverage report
bilingual-sync stats --en locales/en.json --zh locales/zh.json

# Show what's missing (no LLM call)
bilingual-sync diff --en locales/en.json --zh locales/zh.json

# Translate + write review file (LLM call)
bilingual-sync draft \
  --en locales/en.json \
  --zh locales/zh.json \
  --glossary glossary.json \
  --tone "indie SaaS, gamified, neon-pixel, peer-to-peer"

# After human review → move file to queue/approved/, then:
bilingual-sync apply --en locales/en.json --zh locales/zh.json

Glossary file

Glossary keys force consistent translation of brand terms. Without it, Claude picks reasonable defaults but those drift across runs.

{
  "Forge": "锻造",
  "Dojo": "道场",
  "Vibe": "氛围",
  "Login": "登录",
  "Sign up": "注册"
}

What gets flagged as "missing"

A key is missing in ZH when ANY of:

  • key absent from zh.json
  • ZH value is empty string
  • ZH value byte-equals the EN value (a common copy-paste mistake — easy to miss without tooling)

Design choices

  • HITL is non-negotiable. UI strings are seen by every user every session. One bad translation that ships globally is worse than five days of catch-up. The agent never writes to zh.json without an explicit approve-and-apply step.
  • Sonnet by default, not Haiku. Cold UI translations are exactly the task where naïve Haiku output gets too literal ("Login" → "登入" instead of "登录"). Sonnet's nuance is worth the 3× cost for 925 strings (~$0.50 total).
  • Batched calls. 50 keys per call is the token-budget sweet spot. Full vibex catalog = ~20 calls = ~$0.50.
  • Preserves placeholders + HTML. The system prompt explicitly forbids translating {name}, <span>, ICU patterns. If Claude breaks this it gets flagged in the review file.
  • Built on solo-founder-os. AnthropicClient handles graceful degrade + auto-logs token usage to ~/.bilingual-content-sync-agent/usage.jsonl (cost-audit-agent picks it up monthly).

Roadmap

  • v0.1 — diff/draft/apply/stats CLI · HITL queue · Sonnet drafting · 43 tests · graceful degrade
  • v0.2 — Multi-language support (EN→ES, EN→JA, etc.) — same code path, different glossaries
  • v0.3 — Watch mode: re-run on commit, post-flagging stale keys to GitHub PR
  • v0.4 — In-context preview: show the React component a key appears in
  • v0.5 — Reverse sync: detect ZH-only orphan keys (features that got removed but ZH was forgotten)

MCP server (Claude Desktop / Cursor / Zed)

Translate missing i18n keys inline from your AI assistant.

pip install 'bilingual-content-sync-agent[mcp]'
{
  "mcpServers": {
    "bilingual-sync": {
      "command": "bilingual-sync-mcp",
      "env": { "ANTHROPIC_API_KEY": "..." }
    }
  }
}

Tools: diff_locales(en, zh) · translate_missing(en, zh, ...) · apply_approved(en, zh)

License

MIT.

🧩 Part of the Solo Founder OS stack

A growing collection of MIT-licensed agents that share solo-founder-os as their base — cron, eval, reflexion, AnthropicClient, HITL queue, notifiers. Each agent is independently useful; together they cover the full one-person company workflow.

🌐 The whole stack is live in production at vibexforge.com.

Agent What it does
solo-founder-os The shared base lib (cron · eval · reflexion · skill library · DGM-lite). Every other agent depends on it.
build-quality-agent Pre-push Claude diff reviewer + local build runner — catches CI-killing changes before they ship.
customer-discovery-agent Reddit pain-point scraper + Claude clustering for product validation.
funnel-analytics-agent Daily founder brief + real-time PH-day alerts across 9 sources.
orallexa-marketing-agent AI marketing agent — submit project once, get platform-native posts for X / Reddit / HN / Dev.to / 小红书 + 7 more. Powers vibexforge.com.
vc-outreach-agent Cold email drafter — investors (vc mode) or paying customers (customer mode, merged from customer-outreach in v0.9.0). HITL queue + SMTP sender.
cost-audit-agent Monthly bill audit across 6 providers (Vercel / Anthropic / OpenPanel / HyperDX / Supabase / GitHub Actions) with dollar-tagged waste findings.
customer-support-agent Triage user messages → auto-draft replies → HITL queue. Closes the L5 customer-support layer.
payments-agent Overdue-invoice reminder drafter. Stripe-shaped types + MockProvider fallback + hard money-safety prompt rules.

Each agent's own row is omitted from its README. Install whichever solve real problems for you — pip install <agent-name>.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bilingual_content_sync_agent-0.4.0.tar.gz (23.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bilingual_content_sync_agent-0.4.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file bilingual_content_sync_agent-0.4.0.tar.gz.

File metadata

File hashes

Hashes for bilingual_content_sync_agent-0.4.0.tar.gz
Algorithm Hash digest
SHA256 4ccb73b48f410b96e8965fec2866134afd17f8186335a989a771181d0f85e7d8
MD5 386168777d22acad2649aebf0545da48
BLAKE2b-256 ad2cca8cffda5d43c78add183fc233b0d4ea9f7cadc46c2eee75d6fa41228051

See more details on using hashes here.

Provenance

The following attestation bundles were made for bilingual_content_sync_agent-0.4.0.tar.gz:

Publisher: release.yml on alex-jb/bilingual-content-sync-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file bilingual_content_sync_agent-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for bilingual_content_sync_agent-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1dbf671a466a2bb56d069f5bf14fb80878bf1ea0f6185c1542b3c3a1edfe5120
MD5 4888927d8aaeea3d90fed1e7cfc84713
BLAKE2b-256 be1872c4f30885b8501527a7dad16edd830d5c786b504e767c9f66735bad4560

See more details on using hashes here.

Provenance

The following attestation bundles were made for bilingual_content_sync_agent-0.4.0-py3-none-any.whl:

Publisher: release.yml on alex-jb/bilingual-content-sync-agent

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page