Phase — missing (top-level command)
Status: shipped. User docs: commands/missing.
Core: computeMissingLiteralKeys in packages/cli/src/core/validate/missingLiterals.ts — shared with validate.
This file is development-only (see repo .gitignore for docs/phases/).
Command shape (as implemented)
- Top-level:
i18nprune missing. - Target:
--locale <code>→locales/<code>.json; omit → source locale (config.source). - Human writes: path preview (
--top/--full-list/config.missing/MISSING_DISPLAY_DEFAULT_TOP), then Inquirerconfirmunless global--yes; non-interactive writes require--yes(or--dry-run). --dry-run,--from-report,--json, reports — implemented;--jsonemits fullpathsarray.
Default flow (recommended)
missing(default) — patch source locale JSON.sync— non-source files match source shape.fill— re-translate stale leaves in targets.validate/quality/reviewas needed.
Shared logic
- Same literal scan as
validate; comparison file is the chosen write target. validate --jsonmissingarray matchesmissingwhen the write target is the source locale file;--from-reportfilters to current scan.
Acceptance — met
-
--localeoptional → default source locale;--locale <code>→locales/<code>.json. - Warning when
--localeis not the source locale slug (where applicable). - Preconditions: missing
localesDir/ missing target where applicable. - Shared
computeMissingLiteralKeys,--from-report,--dry-run, tests.