Files
OpenSpec/docs-lab/reference
Olga Pichuzhkina 852a073883 fix(specs): write spec files one at a time (#2037)
* fix(specs): write spec files one at a time

The specs instruction asked for one spec file per capability but not when
to write them, so with many capabilities the agent planned every file
before writing the first. The user saw only a spinner, and an interrupt
threw the whole plan away.

Ask the agent to start from the first capability that has no spec file,
announce each capability in one line, and write its file as soon as it
is drafted.

A glob artifact reads `done` once one matching file exists, so after an
interrupted run `/opsx:continue` would move on to `design` and leave the
missing specs unwritten. Have it check `done` glob artifacts for missing
files first and write those before anything else.

Refs #2034

* fix(specs): get the instruction before checking for missing files

The partial-artifact check in /opsx:continue compared the existing files
with what the artifact's instruction asks for, but fetched that
instruction only after finding a gap. Status JSON doesn't carry the
instruction, so the agent had nothing to compare against. Get the
instruction and read the dependencies first, and for spec-driven's specs
name the proposal as the source of the expected files.

* fix(specs): resolve expected spec paths against changeRoot

Expected spec paths are relative to the change, but
`existingOutputPaths` holds absolute paths, so comparing them directly
could report an existing spec as missing and send it to be rewritten.
Resolve each expected path against `changeRoot` first.
2026-10-05 22:17:36 +00:00
..