Clarify workspace memory contract and add compaction nudge in Pi for Excel
Session from pi-for-excel-sessions on Hugging Face by thomasmustier · MIT · condensed by Coders Talk
Review a GitHub issue proposing changes to how the Pi for Excel agent handles rules, notes and memory, refine the design, and then implement it end-to-end as a merged PR.
- +0Prompt · +0Review issue #268 and help think through a clean, simple system for rules, memory and notes that works well for both agent and human.
- +0mAgent did · +0mResearched the codebase (rules store, workspace files, system prompt, compaction) and related issues #178/#20, then produced a comprehensive review comparing the three persistence layers (rules, workspace files, session context) against the issue's proposal.
- +4mPrompt · +4mWrite the refined approach back to the GitHub issue, clear and comprehensive.
- +5mAgent did · +5mDrafted an updated issue body dropping the two-tier notes structure in favour of a flat notes/ folder, sharpened three slices of work, and pushed it via gh issue edit to update issue #268.
- +10mPrompt · +10mGo ahead and implement this: open a PR, wait for Codex review, merge when green, then look for refactor opportunities and repeat, using an isolated worktree since other work is ongoing.
- +10mAgent did · +10mSet up an isolated git worktree, clarified the memory contract in the system prompt (rules vs notes vs workbook-scoped notes), added a new pre-compaction memory-nudge module, wired it into the compact command, updated docs and tests, then ran lint, typecheck, build and the full test suite until green before committing.
- +17mAgent did · +17mPushed the branch, opened PR #274, rewrote the PR body for clarity, then slept and polled for the automated Codex review; none appeared within the window, so it merged the PR once checks were green and removed the worktree.
- +44mPrompt · +44mAsked what's next, had the agent explain its top follow-up idea, then decided nothing further was needed right now.
- +44mOutcome · +44mPR #274 merged into main (squash, branch deleted) with all CI checks green; issue #268 closed with the updated memory-contract design; follow-up persistence work deferred, only leftover local branch cleanup remaining.
Next time I'd start the first prompt with the full context I already had in mind (rules vs notes vs memory, cross-workbook scoping) so the agent skips the long codebase archaeology phase before it can even discuss the design. The useful correction wasn't really an intervention on my part — the agent caught and fixed its own text-match and test-cleanup mistakes without me stepping in, and the /auto-pr process worked as intended end to end. I'd keep using the explicit poll-then-merge-if-green flow since it let the whole implementation and merge happen without me babysitting it.