I want to add an external feedback thing to each Megaplan that we can obviously fill in,…
- User
I want to add an external feedback thing to each Megaplan that we can obviously fill in, that we can do backwards compatible for ones that have already been done. and basically want to be able to add a feel that kind of like let's just say like out of 10 how well you know or how well did each stage perform you know so if relevant you know all the different stages and then what was the overall performance like and then put like on each field or each stage put like an overall one put an optional comment can you please figure out
Assistant
I'll explore the codebase to understand how megaplans are stored and what stages exist, then design the feedback feature.
Assistant
I have a good picture. Before I design, one UX call to make.
Assistant
Let me check the exact on-disk plan layout and Plan model fields before implementing.
Assistant
Now let me check the CLI structure to see where to plug in a
feedbackcommand.Assistant
Good direction. Let me check existing template scaffolding precedents so we match style.
Assistant
Plan locked in. Here's the shape:
feedback.mdin plan dir (same pattern asfinal.md,user_actions.md), one canonical templatemegaplan feedback <plan>scaffolds it if missing, prints path;--showparses it back- Full stage list + Overall, each with
rating:andcomment:fields, all blank - Parsed feedback attached to
Plan.feedbackon load (optional field, so old plans without the file still work) - File-mode only for v1 (DB jsonb column can come later if you want it indexed)
Starting implementation now.
Assistant
Good — confirming the file-editing UX. I'll make
megaplan feedback <plan>scaffold the file and open it in$EDITORby default, with--no-editto suppress.Assistant
Now I'll look at the schemas package to know where to expose
Feedback, and check an existing simple pydantic model file for style.Assistant
Feedbackis already taken (Arnold model — different concept). I'll usePlanFeedbackto avoid the collision.Assistant
Now wire the field into
Plan. I'll check whatStorageModelallows and add anAny-typed field so we don't import circularly.Assistant
Now thread
feedbackthroughfrom_plan_stateso callers can pass it in:Assistant
Now wire
load_plan()to pass parsed feedback through:Assistant
Now the CLI. Let me check how a similar simple handler (like
handle_resume) accesses the plan directory.Assistant
Good. Now I'll add the handler. I'll place it after
handle_resume.Assistant
Now register the parser and command handler:
Assistant
Now write a focused test for the feedback module.
Assistant
All tests pass. Let me also run a quick sanity check that the broader Plan/PlanRepository code still loads:
Assistant
Let me wrap the test task and then find the megaplan skill doc.
Assistant
megaplan/data/instructions.mdis already the universal skill source (megaplan setupdistributes it to Claude / Codex / Cursor with per-agent wrappers). Adding the feedback section there propagates everywhere on nextmegaplan setup.Assistant
Now let me verify the bundled distribution still works and confirm the existing per-agent SKILL files would refresh on next
megaplan setup:Assistant
Verified — the section flows into both the Claude and Codex bundled skill docs. Let me run the full feedback test once more plus a related test to make sure nothing else broke:
Assistant
All green. Quick summary of what landed:
New behavior
megaplan feedback --plan <name>— scaffoldsfeedback.mdin the plan dir (full canonical stage list +Overall, each withrating:0–10 andcomment:fields, all blank), then opens in$EDITOR/$VISUAL.--no-edit— just scaffold and print the path.--show— parse and print a human summary.- Old plans without
feedback.md: backwards compatible.Plan.feedbackisNoneuntil a user (ormegaplan feedback) creates the file.
Files touched
megaplan/feedback.py(new) — / dataclasses, , , , .
- User
u run it
Assistant
All three distributed skill docs now contain the
## Feedbacksection (Claude, Codex, Cursor — 4 hits each: heading + body mentions + command-line). Theskipped: truejust means the auto-sync that runs implicitly had already refreshed them from the updatedinstructions.md— they're current.- User
Did you add this to the db version as well as local file version?
Assistant
Honest answer: no, file-mode only. Let me confirm what the DB side currently looks like.
Assistant
No — DB-mode support was deferred. Concretely:
- In-memory
Planmodel: has the newfeedbackfield, defaultNone. Works for both backends. - File backend: full support — scaffold, edit, parse on load.
- DB backend (
megaplan/store/db.py:3026,3038,3071,3100): buildsPlan(**row, artifacts=...)from theplansrow, so it'd pick up afeedbackcolumn for free — but there is nofeedbackcolumn yet, and there's no migration, no write path, and no editor UX for DB-mode plans (they don't have a plan-dir to dropfeedback.mdinto).
(The
feedbacksymbols indb.pyare the unrelated ArnoldFeedbackentity — user-volunteered process feedback — which is why I called the new modelPlanFeedbackto avoid the collision.)To finish DB-mode support I'd need:
- A migration adding (idempotent, like the existing ones in ).
- In-memory
- User
Yeah, let's do that. Then let's just run through, let's just write in the Megaplan skill document first, let's just write like a short kind of description of how to actually use this process, you know, so like to deploy sub-agents, to go through the artifacts from each step, to kind of like assess them and leave a comment, then just think through the overall thing and then leave, assess that and leave a comment as well.
Assistant
On it. I'll do the DB support first (migration + db.py + CLI branch), then add the "how to fill in feedback" subagent process to the skill doc.
Assistant
Now thread
feedbackthroughdb.py. Let me find the column allowlist for plans and the insert/update paths.Assistant
Now I need to check how plans are inserted/updated to make sure feedback flows through. Let me look at the insert/update paths.
Assistant
Let me sanity-check that the existing tests still pass and the CLI module imports cleanly:
Assistant
Now the skill doc — short process description for how an agent should fill the file using subagents.
Assistant
Now let me run setup so the updated doc propagates, and confirm the bundle picks up everything.
Assistant
All three distributed skill docs now have the subagent process section. Final test run to confirm nothing regressed:
Assistant
Done. Recap:
DB-mode support
supabase/migrations/202605120000_plan_feedback_column.sql—ALTER TABLE plans ADD COLUMN IF NOT EXISTS feedback jsonb.megaplan/store/db.py:219,225,286—feedbackadded to_PLAN_COLUMNS,_PLAN_JSONB, and_COPY_JSONB_COLUMNS, socreate_plan/load_plan/update_plan/list_plansround-trip it for free.megaplan/cli.py—handle_feedbacknow calls_push_feedback_to_dbafter the editor closes: when--actororMEGAPLAN_ACTOR_IDis set, it looks up the plan by name and pushes the parsed dict viastore.update_plan(..., feedback=...). No actor → silent skip (file-mode users unaffected).
Skill doc (
megaplan/data/instructions.md→ bundled into all three agent skill files)- User
Nice. And can you add for both local mode or the web mode, whatever the database mode, can you add a way to find both all of the plans and search them or just find all the plans for a specific, sorry, the feedback for a specific profile or for a specific kind of repo? So basically like simple search tools on top of the feedback.
Assistant
Let me figure out where the profile name and repo are stored on a plan, in both backends.
Assistant
Adding the search command. I'll extend the existing
feedbacksubparser to accept a positionaloperation(defaulting toeditso the existing UX stays the same).Assistant
First, restructure the feedback subparser to take an operation positional:
Assistant
Now extend
handle_feedbackto dispatch onoperation, and add the search implementation:Assistant
Now dispatch on
operationinsidehandle_feedback:Assistant
Let me also try a real invocation against the current project to be sure:
Assistant
Works. Now add tests covering the filter + render + an end-to-end search via the public helpers:
Assistant
All 15 feedback tests pass. Let me also confirm none of the other tests regressed:
Assistant
Now document the search command in the skill doc and refresh distributions.
Assistant
All three distributed skill docs now contain the search documentation.
Summary of this round:
Search command —
megaplan feedback search [filters]- Scans both backends in one pass: walks file-mode
feedback.mdacross project roots, and (when an actor is configured) readsplans.feedbackjsonb from the DB. De-dupes by (plan name, project_dir). - Filters:
--profile,--repo,--min-rating,--max-rating,--stage,--has-comment,--all,--json. All substring/range-based, all optional. - Default output is a compact table with plan / profile / overall rating / backend / repo + the first line of the Overall comment. returns raw rows for scripting.
- Scans both backends in one pass: walks file-mode