Make a plan's completion state travel with the file. Persist every step and acceptance-criterion as an HTML checked attribute (and .completed class) written by the agent, and rip out the per-browser localStorage layer so a plan renders identically on any machine, in any browser, and in git.
Read and implement all steps in the plan at docs/plans/persist-checkbox-state-in-html-attributes.md — Persist plan-HTML checkbox state in HTML attributes. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/persist-checkbox-state-in-html-attributes.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
More ways to run this plan — goal & workflow prompts, file path
Achieve this goal: Persist plan-HTML checkbox state in HTML attributes. The plan at docs/plans/persist-checkbox-state-in-html-attributes.md describes one approach — use it as reference, but optimize for the outcome. Fan out across parallel subagents where that serves the outcome. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/persist-checkbox-state-in-html-attributes.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
Run a workflow to implement the plan at docs/plans/persist-checkbox-state-in-html-attributes.md — Persist plan-HTML checkbox state in HTML attributes. Brief subagents with the plan file at docs/plans/persist-checkbox-state-in-html-attributes.md. Reserve a final verification phase for the lead agent, not a subagent. Verify against the plan's Tests, Verification, and Acceptance Criteria before reporting done. If everything passed, mark completion in docs/plans/persist-checkbox-state-in-html-attributes.md — tick each step's [x] marker and each criterion's - [x], set status: completed — and re-render the HTML from the spec. If any check failed, leave status: in-progress and say which.
persist-checkbox-state-in-html-attributes.html
docs/plans/persist-checkbox-state-in-html-attributes.html
docs/plans/persist-checkbox-state-in-html-attributes.md
Context
The story behind this plan — what prompted the work and why it matters now.
Every plan generated by plan-agent ships an interactive checklist. Today the acceptance-criteria checkboxes persist their ticked state to localStorage (see saveState() / restoreState() in SKELETON.html , keyed by document.title ). localStorage is per-browser and per-origin — it is never written back into the .html file. The result: copy a plan to another machine, open it in a different browser, or commit it to git, and every tick is gone. The on-disk file always shows an empty checklist.
There is also a silent divergence: restoreState() only ever adds checks ( if (state[i]) cb.checked = true ) and can never uncheck, so an HTML checked attribute and the localStorage snapshot can drift apart. Step completion already travels correctly — it is encoded as a .completed class on each .step-card , which lives in the file — but acceptance criteria do not.
The decision (confirmed up front): make the HTML checked attribute the single, portable source of truth, written into the file by the agent during implement/finalize. Browser ticks stay ephemeral, and the localStorage layer is removed entirely so there is nothing to diverge from. This mirrors how step state already works and makes the whole plan self-describing on disk.
Files that change
Every file this plan touches, and what happens to each one.
kit/plugins/plan-agent/skills/implementation-plan/reference/SKELETON.htmlmodified remove localStorage, drive state from attributeskit/plugins/plan-agent/skills/implementation-plan/SKILL.mdmodified attributes as portable source of truthkit/plugins/plan-agent/CHANGELOG.mdmodified changelog entry for the changetests/test-checkbox-portability.shnew portability smoke testtests/fixtures/checkbox-portability/fixture.htmlnew plan with pre-marked attributes
Steps
The step-by-step work, in order — each step says what to do, why it matters, and how to check it worked.
Tests
The tests that prove the change does what it promises.
Definition of done
The plan counts as done when every statement below is true — check each one off as you verify it.
Final check
One last pass to confirm the whole change works end to end.
Generate a fresh plan from the updated skeleton, then have the agent mark one step done (add .completed ) and tick one acceptance criterion (add the checked attribute). Copy the .html file to a second location — or open it in a different browser profile, or commit and re-clone — and confirm the step and criterion render as marked, with the progress bar reflecting the real count on first paint. The marks must travel with the file, not with the browser. Finally run bash tests/test-checkbox-portability.sh and confirm it exits 0, and grep -c localStorage reference/SKELETON.html returns 0.
Wrapping up
Three gates that must all pass before this plan is marked completed.
Completion Report
No items to report — all requirements met.