Skip to content

Commit c80ace8

Browse files
authored
fix(pi): let agent submit any markdown plan file by path (#595)
* fix(pi): let agent submit any markdown plan file by path Removes all configured plan-file state (module var, --plan-file flag, /plannotator-set-file command, interactive path prompt). The agent now writes its plan as a markdown file anywhere inside the working directory and calls plannotator_submit_plan with the file path. During planning, the write gate allows any .md / .mdx file inside cwd (with traversal/absolute-escape rejection) instead of a single configured path. plannotator_submit_plan gains a required filePath parameter, which is validated, stat-checked, and read. Version history in ~/.plannotator continues to key off plan content so naming is free-form without losing version linking. For provenance purposes, this commit was AI assisted. * refactor(pi): drop isSubmitPathAllowed alias isSubmitPathAllowed was a pure pass-through to isPlanWritePathAllowed with no plausible reason to diverge. Use the write-gate helper directly from submit_plan and drop the alias. For provenance purposes, this commit was AI assisted. * fix(pi): update bundled planning prompt for filePath-based submit The shipped plannotator.json planning prompt still referenced ${planFilePath} and instructed the agent to call plannotator_submit_plan with no arguments. After the submit tool gained a required filePath parameter, default sessions hit the stale prompt and submits failed. Rewritten to match the new flow: agent picks its own plan filename and passes it to plannotator_submit_plan. For provenance purposes, this commit was AI assisted. * fix(pi): persist state on plan denial Mirror the approve branches by calling persistState() before returning on the deny path. Without this, a Pi restart between denial and the agent's next submit would lose the lastSubmittedPath in memory, forcing the agent to re-pick a plan file instead of resuming on the same one. For provenance purposes, this commit was AI assisted.
1 parent 24a070d commit c80ace8

4 files changed

Lines changed: 201 additions & 162 deletions

File tree

0 commit comments

Comments
 (0)