Skip to content

Plan lifecycle: closed-plan step repair and edit regression guard - #41

Merged
DocksDocks merged 2 commits into
mainfrom
40-plan-lifecycle-closed-plan-step-repair-and-edit-regression-guard
Aug 25, 2026
Merged

Plan lifecycle: closed-plan step repair and edit regression guard#41
DocksDocks merged 2 commits into
mainfrom
40-plan-lifecycle-closed-plan-step-repair-and-edit-regression-guard

Conversation

@DocksDocks

Copy link
Copy Markdown
Owner

Closes #40

Implements the reviewed plan #40:

  • step repair - plan.mjs step accepts a finished plan when the target status is terminal (done/skipped), repairing a closed-but-unarchived record without reopening; every other case still requires ongoing. Reopening stays prohibited because archive trusts only the latest closure event.
  • edit guard - plan.mjs edit refuses a body that moves a matching step id from a terminal remote status to a non-terminal one, closing the stale-draft revert race the export provenance digest cannot see (observed live in plan Skill kit refresh: fix audit findings, add routing, remove okf-bundle #35 and Reword security/refactor plan-record label blocks to creation state #39 runs).
  • tests - four new plan-cli assertions: terminal repair on a closed COMPLETED issue (body edit only), non-terminal refusal, regression refusal with no body write, terminal-preserving edit passes.
  • docs - plan-contract.md Issue writes, manager SKILL CLI table, docs/PLAN.md, and the workspace template synchronized.

Reviews: plan review pass; code review round 1 pass (no findings).
Verification: node scripts/tests/plan-cli.mjs, plan-skill-phases.mjs, plugin selftest, and node scripts/ci.mjs --plugin plan-lifecycle all exit 0.

…sion guard

A finished plan with a non-terminal step deadlocked: step required
ongoing while archive required every step terminal, and reopening
destroyed the closure proof. step now accepts terminal targets on a
finished plan. edit now refuses a body that regresses a terminal step
status, closing the stale-draft revert race the provenance digest
cannot see.
@DocksDocks DocksDocks linked an issue Aug 25, 2026 that may be closed by this pull request
@DocksDocks
DocksDocks merged commit f431ef3 into main Aug 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Plan lifecycle: closed-plan step repair and edit regression guard

1 participant