Conversation
The CLI still carried duplicate custom semver, stdin, and JSONC helpers in multiple modules, which kept correctness fixes from landing once and sticking everywhere. This extracts shared core helpers, routes the toolchain and CLI through them, replaces scaffold JSONC parsing with jsonc-parser, and updates the stale agents-args expectation that was already failing on main so the full suite can go green again. Constraint: Preserve existing CLI names, prompts, and output wording while changing only helper internals Rejected: Leave the duplicate helpers in place and patch each bug locally | keeps version/stdin/jsonc behavior drifting across modules Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep semver comparison, interactive stdin reads, and JSONC parsing in shared helpers instead of reintroducing local copies in command modules Tested: node --check src/core/versions.js src/core/stdin.js src/toolchain/index.js src/scaffold/index.js src/cli/main.js; node --test test/status.test.js test/release.test.js test/setup.test.js test/core-version.test.js test/core-stdin.test.js test/scaffold-jsonc.test.js; node --test test/cli-args-dispatch.test.js; npm test; openspec validate agent-codex-replace-custom-semver-jsonc-stdin-helper-2026-04-22-18-06 --type change --strict; openspec validate --specs Not-tested: Root cause of the lingering full-suite node test runner process after the green npm test body printed
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.
Automated by gx branch finish (PR flow).