Expand description
OpenSpec adapter for speccoder.
Finds an OpenSpec project and its active changes, parses a change’s
tasks.md (as OpenSpec counts tasks) and spec deltas (scenarios included),
and checks before any model call what openspec archive would refuse
later. Read-only except write::tick and write::append_convergence;
it never runs OpenSpec’s CLI (crosscheck only reads its JSON).
Modules§
- crosscheck
- speccoder’s parse against OpenSpec’s own answer: the JSON
of
openspec validate <id> --strict --jsonandopenspec instructions apply --change <id> --json, which the runtime may run. A disagreement is evidence of a parser gap: shown, never resolved silently. This module only reads JSON; it runs nothing. - delta
- Spec deltas of a change (
openspec/changes/<id>/specs/<capability>/spec.md) and the requirement names of the main specs (openspec/specs/**/spec.md). - discover
- Where the OpenSpec project is, how it is configured, and which change is
selected — without OpenSpec’s CLI: the nearest
openspec/withconfig.yaml,specs/orchanges/, as OpenSpec’s “nearest” root. - preflight
- What
openspec archivewould refuse, found before any model call:validate --strictpasses a MODIFIED requirement that does not exist, and onlyarchivefails on it — after the work is done. - tasks
tasks.mdof an OpenSpec change.- write
- The engine’s two writes to a change’s
tasks.md: a one-byte tick and the convergence append. Both re-read the file and refuse when it changed since speccoder read it.
Structs§
- Change
- A change’s files, read.
- NotA
Project - No OpenSpec directory was found from the start path upward.
Functions§
- change_
dir - The change directory of
id, relative to the root. - inspect
- Inspects the OpenSpec project containing
start, selectingchangeif given, else the only active change. Preflight problems of the selected change are among the diagnostics. - load_
change - Reads change
idof the project atroot, with the deltas’ problems. - main_
specs - Requirement names per capability of the main specs of
root. - sha256_
hex - Lowercase hex SHA-256 of
bytes.