WORK-072
ID:WORK-072Status:done

Add --resolve and --resolve-file flags to plan update

Extend the refrakt plan update command to accept resolution content and append a ## Resolution section to work item and bug files.

Priority:highComplexity:moderateMilestone:v0.9.0Source:SPEC-027

Criteria completion

Criteria completion: 18 of 9 (200%) checked; history from Mar 24 to Mar 300%25%50%75%100%Mar 24Mar 30
Branches 3
History 5
  1. f2b3512
    Content editedby Claude
    Add {ID}-{slug}.md filename convention + migrate filenames subcommand
  2. f262d7b
    Content editedby Claude
  3. 2637549
    • ☑ `--resolve <text>` flag appends a `## Resolution` section before the closing rune tag
    • ☑ `--resolve-file <path>` reads resolution body from a file
    • ☑ `Completed: <today's ISO date>` is auto-prepended as the first line of the section
    • ☑ Resolution section is inserted before `{% /work %}` or `{% /bug %}` closing tag
    • ☑ If a `## Resolution` section already exists, new content is appended with a `---` separator
    • ☑ `--resolve` can be combined with `--status done` in a single command
    • ☑ `--resolve` can be used standalone (without changing status) for incremental updates
    • ☑ `--resolve` is only allowed on `work` and `bug` rune types (error for spec/decision/milestone)
    • ☑ Unit tests cover: new resolution, append to existing, combined with status change, standalone resolve, file input, type restriction
    by Björn Andersson
  4. 6d13c51
    statusready→done
    by Claude
  5. 3e9d54e
    Created (ready)by Claude
    Add work items WORK-071 through WORK-075 for SPEC-027

Acceptance Criteria

  • --resolve <text> flag appends a ## Resolution section before the closing rune tag
  • --resolve-file <path> reads resolution body from a file
  • Completed: <today's ISO date> is auto-prepended as the first line of the section
  • Resolution section is inserted before {% /work %} or {% /bug %} closing tag
  • If a ## Resolution section already exists, new content is appended with a --- separator
  • --resolve can be combined with --status done in a single command
  • --resolve can be used standalone (without changing status) for incremental updates
  • --resolve is only allowed on work and bug rune types (error for spec/decision/milestone)
  • Unit tests cover: new resolution, append to existing, combined with status change, standalone resolve, file input, type restriction

Approach

Extend UpdateOptions in runes/plan/src/commands/update.ts with resolve?: string and resolveFile?: string. After applying attribute and checkbox changes, if resolve content is provided, locate the closing rune tag and insert the formatted Resolution section. Parse --resolve and --resolve-file in the CLI plugin's argument handling.

References

  • SPEC-027
  • WORK-071 — scanner must understand resolution format (parallel, not blocking)

Resolution

Completed: 2026-03-30

Full implementation in runes/plan/src/commands/update.ts with 9 unit tests covering all acceptance criteria (new resolution, append to existing, combined with status change, standalone resolve, file input, type restriction). All criteria verified met.