Agent OpenSpec Tools Delta
MODIFIED Requirements
Requirement: Spec lifecycle tools
The plugin SHALL provide filesystem-backed tools for creating, reading, and listing specs so agents can manage specs as first-class artifacts without the OpenSpec CLI binary.
Scenario: Create a baseline spec
- GIVEN a project with an
openspec/directoryspecs/ - WHEN an agent calls
openspec_spec_createwith a spec name, title, purpose, and requirements array (each with name, description, and optional scenarios) - THEN the tool writes a properly formatted
openspec/usingspecs/ <name>/ spec.md ### Requirement:and#### Scenario:markdown and returnsok: truewith the spec name and relative path
Scenario: Create a change-scoped spec
- GIVEN a project with an active change
- WHEN an agent calls
openspec_spec_createwith achangeparameter and a spec name - THEN the tool writes the spec under
openspec/instead of the baseline directorychanges/ <change>/ specs/ <name>/ spec.md
Scenario: Refuse to overwrite existing spec
- GIVEN a spec already exists at the target path
- WHEN an agent calls
openspec_spec_createwithout aforceflag - THEN the tool returns
ok: falseand does not modify the existing file
Scenario: Show a spec as structured JSON
- WHEN an agent calls
openspec_spec_showwith a spec name and optionalchangeid - THEN the tool reads and parses the spec using
spec_parser.parse_specand returnsok: truewith the title, purpose, and an array of requirements (each with name, description, and scenarios)
Scenario: Show missing spec
- WHEN an agent calls
openspec_spec_showfor a spec that does not exist - THEN the tool returns
ok: falsewith a clear error
Scenario: List baseline specs
- WHEN an agent calls
openspec_spec_listwithout achangeparameter - THEN the tool returns
ok: truewith an array of spec names found underopenspec/specs/
Scenario: List change-scoped specs
- WHEN an agent calls
openspec_spec_listwith achangeparameter - THEN the tool returns
ok: truewith an array of spec names found underopenspec/changes/ <change>/ specs/
Scenario: List specs when none exist
- GIVEN the target specs directory is empty or missing
- WHEN an agent calls
openspec_spec_list - THEN the tool returns
ok: truewith an empty array
Scenario: Invalid workdir
- WHEN any spec tool is called with a missing or non-directory workdir
- THEN the tool returns
ok: falseand does not perform filesystem operations