Repository navigation
fix(cli): require OpenSpec 1.x and add the verify-and-ask clause - #58
Merged
Merged
Conversation
OpenSpec 2.x removed the /opsx:* commands and --profile that the pipeline template asserts on. Install commands pin @1; init and doctor report a 2.x install as unsupported. The package stops shipping v1-generated .claude/ files. Tests: 1528/1528 pass. lint, typecheck, build clean. No version bump.
Section 0 routes facts the agent is unsure of through installed source/types then official docs then web search, and only then asks the user. The trigger is the agent's own uncertainty, so design trade-offs stay out of scope. Tests: 1528/1528 pass. lint, typecheck, build clean. No version bump.
2.x still takes --profile; what it dropped is the generated /opsx:* command files. The probe now says why a version could not be read, doctor always shows the cli-version row, init aborts on 2.x, and both paths have tests. Tests: 1536/1536 pass. lint, typecheck, build clean. No version bump.
init throws instead of exiting, so the CLI prints the reason once. One status helper now feeds init, doctor and the new non-blocking update warning; tests pin the version module instead of probing the host CLI. Tests: 1543/1543 pass (also with a fake 2.x CLI on PATH). lint, typecheck, build clean. No version bump.
… breakage Version parsing now prefers a bare version or a tool-named semver, so a Node version in the banner no longer flips a 1.x install to unsupported; a broken PATH binary is reported instead of hidden behind an npx copy. doctor drops the init hint when init would abort, and the guard tests leave the CodeGraph suite. Tests: 1546/1546 pass (also with a fake 2.x on PATH). lint, typecheck, build clean. No version bump.
The guard tests pushed doctor.test.ts past the 1500-line CI cap; they move out with the same doctor mocks. No behavior change. Tests: 1546/1546 pass. lint, typecheck, build, size check 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
/opsx:*command files thattemplates/auto-pipeline.ymlasserts on, so the pipeline breaks under 2.x. Install commands pin@1;doctorreports a 2.x install as unsupported and exits 1,initaborts on 2.x..claude/commands and skills — nothing at runtime reads them.Test plan
npm run lintnpm run typechecknpm run build && npx vitest run— 1536 passed, 5 skippednpm pack --dry-run— no.claude/entries; standards, templates and scripts presentopenspec-pw doctoragainst a fake OpenSpec 2.1.0 on PATH — redcli-versionrow, exit 1; against real 1.17.0 — green, exit 0openspec-pw initagainst a fake OpenSpec 2.1.0 — red prerequisite line, aborts2.1.0→ major 2,1.6.0-beta.1→ major 1, unparseable output → reason kept