#1993·OpenSpec

Apply workflow cannot map aggregated tasks back to custom-schema files

Author: philip-jvv-monolithCreated Sep 28, 2026Updated Sep 28, 2026

What happens

In OpenSpec 1.13.2, openspec instructions apply --change <name> --json correctly aggregates task progress from every file matched by a custom schema's apply.tracks, but each returned task contains only id, description, and done. The response does not expose a source path or line for readable task entries. contextFiles lists all artifact outputs, not which concrete file supplied each task.

The generated apply workflow therefore still says to mark a task complete in “the tasks file” with - [ ] to - [x]. With a nonstandard artifact id, a glob matching multiple files, or duplicate task descriptions, an agent cannot identify the correct source line safely and may update the wrong file or leave CLI progress unchanged.

Reproduction

  1. Define a custom schema whose apply.tracks points to a nonstandard path or glob, such as planning/*.md.
  2. Put pending CommonMark checkbox tasks in more than one matched file.
  3. Run openspec instructions apply --change <name> --json.
  4. Observe that tasks and progress are aggregated, but task entries cannot be mapped back to their source files.

Expected

Expose enough mutation metadata for the generated apply workflow to update exactly one tracked task safely. For example:

  • add sourcePath and a stable line/index to each task item; or
  • return the resolved readable tracking files plus an unambiguous task-to-source mapping.

The generated workflow should use that mapping and rerun apply instructions to confirm progress changed.

Related issues #922 and #1948 improved custom-path discovery and counting, but this remaining gap affects writing task completion back to the source.

  • Generated by Codex (GPT-5) via $development-tools:resolve-pr-comments*