Repository navigation
feat(cli): add Chinese/English employee-standards selection - #57
Merged
Merged
Conversation
init/update accept --lang zh|en; precedence is flag > installed block > system locale > English. Add the English SSOT (§0–§7; §8 stays Chinese), block-scoped detection, and doctor comparison against the matching SSOT. Missing files or incomplete English sections fail loudly. Tests: 1516 passed, 5 skipped. lint/typecheck/build clean. No version bump.
Move language resolution and SSOT validation into src/commands/standards-source.ts so init.ts drops back below 1500 lines. Tests: 1516 passed, 5 skipped. lint/typecheck/build clean. No version bump.
The published 0.3.119 bundle has no English SSOT, so an English runner locale made the smoke exit 1. An installed block keeps the check independent of the published package. Tests: unchanged; the Windows smoke is the affected gate. No version bump.
Pristine checks now compare both bundled SSOTs, so `remove` deletes an English AGENTS.md whole. The update hint keys off block presence, not anchor detection, so --lang no longer claims to have no effect while it rewrites the block. Tests: 1518 passed, 5 skipped. lint/typecheck/build clean. No version bump.
Windows checkouts read the bundled standards with CRLF, so the expected body kept CRLF while the file content was normalized to LF. Normalize both sides; pristine English and Chinese AGENTS.md files delete whole again on Windows. Tests: 1518 passed, 5 skipped. lint/typecheck/build clean. No version bump.
Keep the repository root for code and entry files. Runtime paths, npm packaging, the sync script, and tests follow the new location; update still reads the legacy root layout from older fetched bundles. Tests: 1519 passed, 5 skipped. lint/typecheck/build clean. No version bump.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
init/updateaccept--lang zh|en; precedence is explicit flag > installed block > system locale > English.employee-standards.en.md(§0–§7; §8 stays Chinese-only) and ship it in the npm package.doctorcompares against the matching SSOT.--langexits 2 before any write.Test plan
npm run lintnpm run typechecknpm run build && npx vitest run— 1516 passed, 5 skippedtmp/integration:LANG=zh_CN.UTF-8→ Chinese;LANG=en_US.UTF-8→ English;LANGUAGE=en+LANG=zh_CN.UTF-8→ Englishupdatekeeps the installed Chinese block; local-bundle sync switches zh→en and prints the switch messageinit --lang frexits 2 with no files written