Skip to content

plan-lifecycle: tear down what a plan created - #84

Merged
DocksDocks merged 1 commit into
mainfrom
83-plan-lifecycle-tear-down-what-a-plan-created
Oct 21, 2026
Merged

DocksDocks merged 1 commit into
mainfrom
83-plan-lifecycle-tear-down-what-a-plan-created

Conversation

@DocksDocks

Copy link
Copy Markdown
Owner

Summary

plan-lifecycle now tears down the resources that a plan created. Source request: DocksDocks/public#89.

  • plan-contract.md: a new ### Teardown subsection after ### Archive. It covers tracking, compose stacks, After archive, Exit without a merge, Production resources, and Kept resources.
    • After archive: stop the processes and stacks that the plan started, then run git worktree remove and git worktree prune, then git branch -d. Teardown never uses --force, git branch -D, or --volumes.
    • Before docker compose down, teardown records the volume names from the container mounts. This record also finds anonymous volumes, which have no project label.
    • Local resources are development, and teardown removes them without a question. A remote production cleanup needs its own in-session question. A yolo invocation does not answer it.
  • The Merge now option states the teardown, so a Merge now answer confirms the branch delete.
  • The non-production target definition moves from Yolo runs to Steps, acceptance, and effects.
  • plan-manager and yolo point to the contract's Teardown at archive and at every exit without a merge. They report Kept resources.
  • The yolo run summary gets a ### Kept resources section. yolo no longer keeps the merged local branch by rule.

Verification

  • node scripts/ci.mjs --plugin plan-lifecycle: all checks passed.
  • Plan acceptance A1 to A8 passed. The plan issue records the results.
  • Plan review passed in round 2. Code review passed in round 1 with one MEDIUM finding, which the issue comment records.

Closes #83

Add a Teardown subsection to the plan contract and point plan-manager and yolo to it. The Merge now option states the teardown, so its answer confirms the merged branch delete. Remote production cleanups need their own question. The yolo run summary lists Kept resources.

Refs #83
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: tear down what a plan created

1 participant