📚 Add plan status lifecycle and review log

Give every plan a write-restricted Status (draft, reviewed,
done) and an append-only Review Log with UTC ISO 8601 lines.

Make-a-plan creates plans as draft and is the only flow
writing reviewed, on explicit user apply. Review-plan stays
read-only. Implement-plan closes the plan to done with the
issue URL when one exists, in the same commit as the code.
Document the lifecycle in the agents README.

AI-assisted-by: muse-spark-1.3-contributor
This commit is contained in:
Andrey Antukh 2026-09-16 18:12:12 +00:00
parent ebba70ad2b
commit 9ae967c621
4 changed files with 56 additions and 6 deletions

View File

@ -363,6 +363,20 @@ While a plan is still unimplemented, `/make-a-plan` revises it in
place. Once implemented and reviewed, it writes a new followup file.
Full rules live in the `planner` skill.
### Plan status lifecycle
Every plan carries `Status: draft | reviewed | done` plus an
append-only `Review Log` (UTC ISO 8601, one line per entry):
- `draft` — fresh from `/make-a-plan`.
- `reviewed` — review feedback incorporated. `/review-plan` stays
read-only; only your explicit "apply" makes `/make-a-plan` apply
the changes, flip the status, and log one line.
- `done``/implement-plan` closes it on completion, logging the
issue URL when one exists (never commit hashes).
A plan approved with no changes goes `draft``done` directly.
## 7. Connecting `gh` CLI with a token
The `create-issue` and `create-pr` flows need an authenticated `gh`

View File

@ -102,8 +102,14 @@ Implement every task in one go. Work methodically, keeping changes
focused on what the issue requires. Respect the plan's proposed
parallelization when it applies.
When the implementation is complete, load the **`create-commit`** skill
and follow its workflow to commit the changes. Provide a brief summary
When the implementation is complete, close the plan file first: flip its
`Status` to `done` and append one UTC ISO 8601 line to its `Review Log`
with the issue URL when one exists (standalone mode, e.g.
`https://github.com/penpot/penpot/issues/NNNN`); in continue/direct
mode with no issue, just `done` with no invented identifier. Never
record commit hashes. Then load the **`create-commit`** skill
and follow its workflow to commit the changes together with the
closed plan file, so plan and code land in the same commit. Provide a brief summary
of what was implemented and why, the issue reference (`issue-NNNN`) when
there is one, and the model name you are running as so the
`AI-assisted-by` trailer is set correctly.
@ -117,6 +123,9 @@ per task" — loop one task at a time:
- Commit it now: load the **`create-commit`** skill and follow it —
one commit per task, never two tasks in one commit. Same inputs as
always: what and why, the issue reference, your model name.
- After the final task, close the plan file (`Status: done`, one
`Review Log` line with the issue URL when one exists) and include
it in that last commit.
- Show the user the result (what changed, files touched, how it was
verified).
- WAIT for the user's confirmation before starting the next task.

View File

@ -22,7 +22,12 @@ stop — this skill needs the build agent to save the plan.
in place. Once the plan has been implemented and reviewed (post
`/review-code` findings on committed work), write a new derived plan
file instead — never rewrite the executed plan. The `planner` skill
defines the derived naming (`--review-NN`, `--task-NN`).
defines the derived naming (`--review-NN`, `--task-NN`).
- The user says to apply `review-plan` findings to a still-unimplemented
plan: apply the agreed changes, flip `Status` to `reviewed`, and
append one UTC ISO 8601 line to `Review Log` describing what changed.
This apply step is the only pre-implementation write to those fields —
`review-plan` itself stays read-only and never writes.
Do not use it to execute a plan — that is the `implement-plan` flow.
@ -40,9 +45,10 @@ Do not use it to execute a plan — that is the `implement-plan` flow.
announced path under `.agents/plans/` (create the directory if it does not
exist). This step is the flow's explicit authorization to write the plan
file — the only write allowed here. A fresh plan uses
`.agents/plans/YYYY-MM-DD-<slug>.md`; a derived plan uses the parent
`.agents/plans/YYYY-MM-DD-<slug>.md` with `Status: draft` and an
empty `Review Log`; a derived plan uses the parent
basename plus the `planner` suffix (`--review-NN`, `--task-NN`) in its
own new file. If I later ask for changes to a still-unimplemented plan,
own new file, also starting as `draft`. If I later ask for changes to a still-unimplemented plan,
update the saved file directly.
4. Present me with a clear, self-contained summary of the plan's most relevant points
only after all required decisions have been answered. Write it for someone who knows

View File

@ -70,7 +70,7 @@ Skipping this step is the #1 cause of incorrect or incomplete plans.
Each task follows this structure:
```markdown
## Task [N]: [Short descriptive title]
### Task [N]: [Short descriptive title]
**Description:** One or two paragraphs explaining what this task accomplishes.
Should be clear and concise.
@ -202,6 +202,10 @@ Use this document shape:
```markdown
# Plan: Title
Status: draft | reviewed | done
Review Log:
- YYYY-MM-DDTHH:MM:SSZ — <what changed and why, one line per entry>
## Context
## Affected Modules
## Architecture Decisions
@ -213,6 +217,23 @@ Use this document shape:
## Open Questions
```
`Status` and `Review Log` are write-restricted metadata, not free text:
- `make-a-plan` creates every plan with `Status: draft` and an empty
log. `reviewed` never means "a review was emitted" — it means
"review feedback was incorporated". A plan approved with no changes
goes `draft``done` without passing through `reviewed`.
- Only a user-triggered apply step writes them before implementation:
when the user says to apply `review-plan` findings, `make-a-plan`
applies the changes, flips to `reviewed`, and appends one UTC
ISO 8601 line describing what changed.
- `implement-plan` flips to `done` on completion and appends one line
with the issue URL when one exists (standalone mode); otherwise
just `done`. Never record commit hashes — they rot on amend/rebase
and git already links the commit.
- The log is append-only: never rewrite or delete lines.
- `review-plan` and `review-code` never write these fields.
Omit empty sections only when they do not apply. Every implementation task
still requires acceptance criteria, verification, dependencies, likely files,
and scope.