clone

a hermes agent plugin for openspec: tools for spec workflows and a dashboard tab for browsing changes and specs

main
hermes-openspec / openspec / changes / archive / spec-first-class-tools / proposal.md
proposal.md 1.8K rendered
1## Why23Specs are the only core OpenSpec artifact without first-class agent tools. Changes have create→promote→archive. Ideas have create→enrich→promote. Specs require hand-writing markdown after calling `openspec_instructions(artifact=specs)` for the authoring guide — no structured create, no filesystem-backed read, no dedicated list. This blocks agents from programmatically creating and inspecting specs without the CLI binary.45## What Changes67- Add `openspec_spec_create` — structured input (title, purpose, requirements array with scenarios) → writes properly formatted `spec.md`. `change` param scopes to change delta specs; omitting it targets baseline specs.8- Add `openspec_spec_show` — reads a spec as structured JSON using the existing `spec_parser.parse_spec`. Works on both change and baseline specs. Filesystem-backed (no CLI needed).9- Add `openspec_spec_list` — lists specs within a change, or baseline specs. Filesystem-backed.10- Add `spec_to_markdown` serializer to `spec_parser.py` — inverse of `parse_spec`, converts structured input to `### Requirement:` / `#### Scenario:` format.1112All three tools are filesystem-backed (always available, like idea/change tools). `spec_show` and `spec_list` reuse `spec_parser.py` from the semantic diff work.1314## Capabilities1516### New Capabilities17- None.1819### Modified Capabilities20- `agent-tools`: Add spec lifecycle tools for create, show, and list workflows.2122## Impact2324- `spec_parser.py` — add `spec_to_markdown` serializer25- `schemas.py` — three new schemas26- `tools.py` — three new handlers27- `__init__.py` — register three new tools28- `plugin.yaml` — declare three new tools29- `README.md`, `docs/tool-reference.md` — tool count and table updates30- Tests for structured create, parse round-trip, overwrite protection, change vs baseline scoping, and listing