mirror of
https://github.com/Fission-AI/OpenSpec.git
synced 2026-10-19 06:10:10 +08:00
* docs(openspec): propose version reporting command * docs(openspec): clarify update guidance availability * feat(cli): report version and update metadata * fix(cli): harden version install detection
2.1 KiB
2.1 KiB
Tasks
1. Model version and install information
- 1.1 Add typed, pure install classification that reports location, package manager, and scope without guessing ownership for source or unknown layouts.
- 1.2 Add POSIX and Windows unit cases for global, project, temporary, source, and unknown installs.
2. Expose structured update-check outcomes
- 2.1 Refactor the existing update check to return
available,current,disabled, orofflinewith structured latest-version and update-guidance fields. - 2.2 Keep
getAvailableCliUpdate()as a compatibility wrapper soopenspec updatebehavior does not change. - 2.3 Cover privacy opt-outs, rejected registries, timeouts, invalid responses, current versions, and available updates without weakening existing network safeguards.
3. Add the version command
- 3.1 Add
openspec versionwith--jsonand--checkoptions and no project-root prerequisite. - 3.2 Emit one schema-versioned JSON document with explicit nulls for unknown values and no incidental stdout.
- 3.3 Add human-readable output for local information and each update-check status.
- 3.4 Reject
--upgradeand other unsupported options without running an installer.
4. Verify compatibility and behavior
- 4.1 Add CLI end-to-end coverage for text output, JSON output,
--check, and execution outside an OpenSpec project. - 4.2 Prove
openspec --versionstill emits only the bare version string. - 4.3 Prove JSON runs emit no telemetry notice, completion tip, color sequence, or extra stdout text.
5. Document and release
- 5.1 Document
openspec version,--json, and--checkindocs-lab/reference/cli.mdusing the current docs-lab format; do not update the legacydocs/tree. - 5.2 Add a minor changeset for
@fission-ai/openspec.
6. Final verification
- 6.1 Run
pnpm build, the focused version-check and CLI tests,pnpm test,pnpm exec tsc --noEmit, andpnpm lint. - 6.2 Run
openspec validate add-version-command --strictand confirm every planning artifact is complete.