Harden the execute→review pipeline so that by the time a plan reaches DONE, every task has verifiable evidence of completion. During execution: require the executor to return structured per-task evidence (files_changed, commands_run) that can be cross-checked against the actual git diff; require preliminary sense-check acknowledgments from the executor (not just reviewer). Between execute and review: add a programmatic validation pass that audits executor claims against repo state — did the claimed files actually change? do executor_notes reference real artifacts? are sense checks acknowledged? During review: reviewer cross-references executor evidence with git diff and fills verdicts. The whole loop should be thorough but not cumbersome — no new CLI flags, no interactive prompts, enforcement is automatic and invisible on the happy path. The goal: when a plan hits DONE, you can read finalize.json and have complete auditable evidence of what was done, why, and whether it checks out.
Goal: When a plan reaches DONE, finalize.json contains complete, auditable, programmatically-verified evidence of what was done and whether it checks out.
Current state: The pipeline already has good structural bones — executor returns task_updates with executor_notes, reviewer fills reviewer_verdict and sense_check verdicts, coverage gaps block state transitions. But three gaps remain:
Evidence is flat, not per-task.files_changed and commands_run live at the top level of execution.json, not tied to individual tasks. A reviewer can't mechanically verify "task T3 claims to have changed foo.py" against the diff.
No programmatic validation. Executor claims are trusted at face value. Nobody checks whether files_changed entries actually appear in the git diff, or whether executor_notes reference real files.
Sense-check acknowledgments are one-directional. The executor sees sense checks as "nudges" (prompts.py:380) but never formally acknowledges them. The reviewer is the first agent to produce verdicts.
Assistant
User
Assistant
User
Assistant
{"flags":[{"id":"FLAG-006","concern":"The plan now over-corrects by assuming every done task must map to at least one changed file. In this repository's task model, some legitimate tasks are verification-only, so blocking execute/review on non-empty files_changed / evidence_files for every done task will force agents to invent file attribution.","category":"correctness","severity_hint":"likely-significant","evidence":"The repo already models non-edit tasks: the mock finalize output creates T2 as \"Verify success criteria\" in megaplan/workers.py:348-354. Your Step 7 would block execute whenever a done task has empty files_changed, and Step 10 would block review whenever a done task has empty evidence_files. For verification-only tasks, the real evidence may be commands/results rather than a touched file, so this enforcement conflicts with the existing workflow shape and the user goal of keeping the agent interface simple and non-confusing."}],"verified_flag_ids":["FLAG-003","FLAG-004","FLAG-005"],"disputed_flag_ids":[]}
Constraints: No new CLI flags, no interactive prompts, enforcement is automatic. Happy path should feel invisible.
Phase 1: Structured Per-Task Evidence
Step 1: Extend execution.json schema to include per-task evidence (megaplan/schemas.py:129)
Scope: Small
Addfiles_changed (array of strings) and commands_run (array of strings) as optional fields inside task_updates items (schemas.py:133-138). Keep them optional so existing plans don't break validation, but downstream validation will flag their absence.
Addsense_check_acknowledgments as a new top-level array in execution.json (schemas.py:128), with items {"sense_check_id": "...", "acknowledged": true|false, "executor_note": "..."}. This is where the executor formally responds to each sense check.
Keep the existing top-level files_changed and commands_run — they serve as a summary and are still useful. The per-task fields are the granular evidence.
Step 2: Update the execute prompt to require per-task evidence (megaplan/prompts.py:398-430)
Scope: Small
Update the task_updates instruction (prompts.py:425) to require files_changed and commands_run per task update: {"task_id": "...", "status": "done|skipped", "executor_notes": "...", "files_changed": [...], "commands_run": [...]}.
Add a requirement to return sense_check_acknowledgments — one per sense check, with a brief executor_note explaining how execution addressed it.
Keep the existing nudge block (prompts.py:380-387) that lists sense checks — it provides awareness. The new requirement adds formal acknowledgment.
Step 3: Merge per-task evidence and sense-check acks into finalize.json (megaplan/handlers.py:1110-1134, megaplan/schemas.py:79)
Scope: Medium
Extend the finalize.json task schema (schemas.py:86-101) to add optional files_changed and commands_run arrays to each task object. These start empty and get populated during execute merge.
Extend sense_check schema (schemas.py:105-116) to add optional executor_acknowledged (boolean) and executor_note (string) fields.
Updatehandle_execute (handlers.py:1123-1130) to include files_changed and commands_run in merge_fields when merging task_updates into finalize.json tasks.
Add a new merge block in handle_execute (after line 1130) that validates and merges sense_check_acknowledgments from execution.json into finalize.json's sense_checks array. Use the existing _validate_merge_inputs / _merge_validated_entries pattern. Track coverage: if any sense checks lack acknowledgment, add a deviation but do not block (this is executor awareness, not executor sign-off — the reviewer still has final say).
Phase 2: Programmatic Evidence Validation
Step 4: Add validate_execution_evidence() to megaplan/evaluation.py
Scope: Medium
Implement a function validate_execution_evidence(finalize_data, execution_data, project_dir) -> list[str] that returns a list of validation findings (strings). This runs between execute and review as a pure audit — it does not block execution, it surfaces findings for the reviewer.
Check 1 — files_changed vs git diff: Run git diff --name-only against the project directory. Compare the union of all per-task files_changed against the actual diff. Flag:
Files claimed changed but not in diff ("Phantom file claim: executor says T2 changed foo.py but it is not in the git diff").
Files in diff but not claimed by any task ("Unclaimed change: bar.py appears in git diff but no task claims it").
Check 2 — executor_notes reference real artifacts: For each task's executor_notes, extract file-like tokens (simple regex for paths with extensions). Check whether those paths exist in the repo. Flag non-existent references.
Check 3 — sense-check coverage: Verify every sense_check has executor_acknowledged: true. Flag unacknowledged checks.
Return the findings list. Each finding is a human-readable string the reviewer can act on.
Step 5: Wire validation into handle_execute post-merge (megaplan/handlers.py:1134)
Scope: Small
Callvalidate_execution_evidence() after merging task_updates into finalize.json and before writing finalize.json to disk (handlers.py:1134).
Write the findings to execution_audit.json — a new artifact: {"findings": [...], "files_in_diff": [...], "files_claimed": [...], "timestamp": "..."}.
Append findings to the deviations list so they appear in the step response, but do not set blocked=True based on audit findings alone. The existing coverage check (all tasks must have updates) remains the only blocker.
Addexecution_audit.json to the artifacts list in the step response.
Step 6: Surface audit findings in review prompts (megaplan/prompts.py:433-520)
Scope: Small
Readexecution_audit.json in both _review_claude_prompt and _review_codex_prompt (after reading execution.json).
Add a new section to the review prompt: "Execution audit findings (programmatic cross-check of executor claims vs repo state):\n{audit_findings}".
Add a review requirement: "Cross-reference executor per-task files_changed against the git diff. Flag any discrepancy that the audit findings haven't already caught."
Add a review requirement: "Verify that sense-check acknowledgments are substantive, not perfunctory."
Phase 3: Reviewer Evidence and Final Checklist
Step 7: Enrich reviewer output to include evidence cross-references (megaplan/schemas.py:144-184)
Scope: Small
Addevidence_files (array of strings) to each task_verdict item in review.json schema — the reviewer lists which files from the diff they verified for this task.
Mergeevidence_files into finalize.json task objects during handle_review (handlers.py:1218-1225), alongside reviewer_verdict.
Step 8: Update render_final_md to show per-task evidence (megaplan/_core.py:92-142)
Scope: Small
Add rendering of files_changed and commands_run per task (when present) in the final checklist.
Add rendering of executor_acknowledged / executor_note in the sense-checks section.
Add rendering of evidence_files per task verdict (when present).
Show audit findings summary if execution_audit.json exists and phase is "review".
Step 9: Tests (tests/)
Scope: Medium
Unit testvalidate_execution_evidence() — mock git diff output, verify phantom-file and unclaimed-change detection, verify path-extraction from executor_notes.
Unit test schema changes — verify execution.json and finalize.json accept the new optional fields, and that strict_schema() handles them correctly.
Integration test the merge flow — create a finalize.json with tasks and sense_checks, simulate an execution.json with per-task evidence and sense_check_acknowledgments, run through handle_execute logic, verify finalize.json is enriched correctly.
Integration test the review merge — verify evidence_files merges into finalize.json tasks.
Testrender_final_md with the new fields present and absent.
Execution Order
Step 1-2 (schema + prompt) first — defines the contract before anything consumes it.
Step 3 (merge logic) — wires the new fields into finalize.json.
Step 4-5 (validation + wiring) — the audit pass, which depends on the per-task evidence existing.
Step 6 (review prompts) — surfaces audit results, depends on Step 5 producing the artifact.
Step 7-8 (reviewer evidence + final.md) — enriches the tail end of the pipeline.
Step 9 (tests) — validates the full chain.
Validation Order
Run schema tests after Step 1 to verify backwards compatibility.
Run merge tests after Step 3 to confirm new fields flow through.
Run validate_execution_evidence unit tests after Step 4.
Run full integration tests after Step 8 to verify the end-to-end pipeline.
Run existing test suite throughout to check for regressions.
code
Plan metadata:
{
"version": 1,
"timestamp": "2026-03-25T02:24:16Z",
"hash": "sha256:8d09d90d3ae9ad6b7ef42ce56103d719c1f1f174f5867decd0ffe89fbcb71d6f",
"questions": [
"Should audit findings (e.g., 'executor claims foo.py changed but it's not in the diff') be able to block the execute\u2192review transition, or should they always be advisory for the reviewer? Currently the plan treats them as advisory (surfaced as deviations, never blocking). Blocking would be stricter but could cause false-positive stalls if git state is unusual (e.g., unstaged changes, submodules).",
"For the per-task files_changed \u2014 should these be the files the executor intended to change for that task, or files that actually changed? The executor can only report intent; the audit validates against reality. Is this distinction worth calling out in the schema (e.g., claimed_files vs verified_files)?",
"How deep should the executor_notes artifact-reference check go? The current plan does simple path-extraction regex. Should it also verify that referenced functions/classes exist within those files, or is file-existence sufficient?"
],
"success_criteria": [
"Every task in finalize.json at STATE_DONE has non-empty files_changed, commands_run, executor_notes, and reviewer_verdict fields",
"Every sense_check in finalize.json at STATE_DONE has executor_acknowledged: true with a substantive executor_note and a reviewer verdict",
"execution_audit.json exists after every execute step and contains programmatic cross-check of claimed vs actual file changes",
"Phantom file claims (executor says file changed but git diff disagrees) are detected and surfaced in audit findings",
"Unclaimed changes (file in git diff but no task claims it) are detected and surfaced in audit findings",
"Review prompts include audit findings so the reviewer can act on discrepancies",
"All new fields are optional in schemas \u2014 existing plans that lack per-task evidence still pass schema validation (backwards compatible)",
"No new CLI flags or interactive prompts are introduced",
"Existing test suite passes without modification",
"render_final_md shows the enriched evidence when present"
],
"assumptions": [
"The git diff check uses git diff --name-only (staged + unstaged) relative to the project directory's HEAD. This is sufficient for most cases but won't catch committed-then-amended scenarios. Assumed acceptable.",
"Per-task files_changed and commands_run are executor-reported (claims), not system-captured. The audit validates claims against git state but doesn't independently log commands. Assumed acceptable since the executor is an LLM agent that can only self-report.",
"Sense-check acknowledgments are advisory, not blocking. An unacknowledged sense check is a deviation surfaced to the reviewer, not a gate. This keeps the executor from being blocked by edge-case sense checks it genuinely can't address.",
"The path-extraction regex for executor_notes validation will be simple (e.g., tokens containing / and a file extension). False positives are acceptable since findings are advisory.",
"Backwards compatibility: all new fields in finalize.json and execution.json schemas are optional. Plans created before this change will still validate and flow through the pipeline. The audit will simply report 'no per-task evidence available' for legacy executions.",
"The execution_audit.json artifact is written alongside execution.json and finalize.json \u2014 it does not require a separate CLI step or state transition."
],
"structure_warnings": []
}
code
Plan structure warnings from validator:
[]
Existing flags:
[]
Requirements:
- Consider whether the plan is at the right level of abstraction.
- Reuse existing flag IDs when the same concern is still open.
- `verified_flag_ids` should list previously addressed flags that now appear resolved.
- Focus on concrete issues that would cause real problems.
- Robustness level: standard. Use balanced judgment. Flag significant risks, but do not spend flags on minor polish or executor-obvious boilerplate.
- Verify that the plan remains aligned with the user's original intent.
- Verify that the plan follows the expected structure: one H1 title, `## Overview`, numbered step sections (`### Step N:` under `## Phase` headers, or flat `## Step N:`) with file references and numbered substeps, plus `## Execution Order` or `## Validation Order`. Missing structure should be flagged as category `completeness` with severity_hint `likely-significant`.
- Flag scope creep explicitly when the plan grows beyond the original idea or recorded user notes. Use the phrase "Scope creep:" in the concern.
- Assign severity_hint carefully. Implementation details the executor will naturally resolve should usually be `likely-minor`.
{"flags":[{"id":"FLAG-001","concern":"The backward-compatibility claim is not achievable as written: adding new "optional" evidence fields to execution.json, finalize.json, or review.json will make them required in the agent-facing schemas unless strict_schema() changes too.","category":"correctness","severity_hint":"likely-significant","evidence":"megaplan/schemas.py:189-196 rewrites every object schema so required == properties.keys(). Those strict schemas are what workers actually hand to Claude/Codex via --json-schema / --output-schema in megaplan/workers.py:475-480 and megaplan/workers.py:516-544. As written, Phase 1/3 would break legacy payloads instead of keeping them optional."},{"id":"FLAG-002","concern":"The proposed file-audit basis is wrong for this repository: git diff --name-only will miss normal changes that the current pipeline surfaces, especially new untracked files, so the audit will report false phantom/unclaimed discrepancies.","category":"correctness","severity_hint":"likely-significant","evidence":"Current review context comes from collect_git_diff_summary() using git status --short in megaplan/_core.py:402-419. The mock execute path creates a brand-new file (IMPLEMENTED_BY_MEGAPLAN.txt) in megaplan/workers.py:377-388; that shows up in status, but plain git diff --name-only does not include untracked files and also ignores staged-vs-HEAD unless extra flags are used. The plan's stated audit command therefore does not match existing repo behavior."},{"id":"FLAG-003","concern":"The plan does not actually enforce the DONE guarantee it states. It adds more evidence fields, but keeps the new checks advisory, so a plan can still reach DONE with missing per-task evidence or missing executor acknowledgments.","category":"completeness","severity_hint":"likely-significant","evidence":"Today handle_execute() only blocks when some tasks have no executor update (megaplan/handlers.py:1131-1139), and handle_review() only blocks on incomplete reviewer/sense-check coverage (megaplan/handlers.py:1245-1247). Your Phase 1/2 text explicitly says missing sense-check acknowledgments and audit findings should not block, and no step adds a new gate for non-empty per-task files_changed / commands_run / reviewer evidence. That conflicts with the overview and success criteria claiming every DONE task has auditable evidence."},{"id":"FLAG-004","concern":"The new audit step is underspecified for the non-real-git environments this repository already uses in tests; without an explicit non-fatal fallback, the change will break the stated success criterion that the existing suite passes unchanged.","category":"completeness","severity_hint":"likely-significant","evidence":"Multiple tests scaffold only an empty .git directory rather than a usable repository, e.g. tests/test_prompts.py:54 and tests/test_megaplan.py:67. Existing prompt code already treats git command failures as non-fatal in megaplan/_core.py:402-419. The proposed validate_execution_evidence() step says only to run git diff --name-only; it does not say how execute should behave on git errors/timeouts/non-repos, even though handle_execute() would call it on the critical path."}],"verified_flag_ids":[],"disputed_flag_ids":[]}
You are an independent reviewer. Critique the plan against the actual repository.
Harden the execute→review pipeline so that by the time a plan reaches DONE, every task has verifiable evidence of completion. During execution: require the executor to return structured per-task evidence (files_changed, commands_run) that can be cross-checked against the actual git diff; require preliminary sense-check acknowledgments from the executor (not just reviewer). Between execute and review: add a programmatic validation pass that audits executor claims against repo state — did the claimed files actually change? do executor_notes reference real artifacts? are sense checks acknowledged? During review: reviewer cross-references executor evidence with git diff and fills verdicts. The whole loop should be thorough but not cumbersome — no new CLI flags, no interactive prompts, enforcement is automatic and invisible on the happy path. The goal: when a plan hits DONE, you can read finalize.json and have complete auditable evidence of what was done, why, and whether it checks out.
User notes and answers:
Ease of agentic use is extremely important. The executor agent needs to understand what's expected without confusion. Enforcement should be robust but the interface (schema, prompts, error messages) must be simple and clear. Don't make the executor jump through hoops — make the right thing easy and the wrong thing impossible.
Goal: When a plan reaches DONE, finalize.json contains complete, auditable, programmatically-verified evidence of what was done and whether it checks out.
Current state: The pipeline has good structural bones — executor returns task_updates with executor_notes, reviewer fills reviewer_verdict and sense_check verdicts, coverage gaps block state transitions. Three gaps remain:
Evidence is flat, not per-task.files_changed and commands_run live at the top level of execution.json, not tied to individual tasks.
No programmatic validation. Executor claims are trusted at face value. Nobody checks whether claimed files actually appear in git status.
Sense-check acknowledgments are one-directional. The executor sees sense checks as "nudges" (prompts.py:380) but never formally acknowledges them.
Key design decision — required fields, not optional:strict_schema() (schemas.py:189-196) forces all declared properties to be required and sets additionalProperties: false on agent-facing schemas. Rather than fighting this (FLAG-001), we embrace it: all new evidence fields are required in the schema. This is actually better for agentic clarity — the executor always knows exactly what to return, no ambiguity. Empty arrays ([]) are the valid value for skipped tasks. This also means the DONE guarantee is enforced structurally (FLAG-003) — the agent literally cannot return a payload without the evidence fields.
Constraints: No new CLI flags, no interactive prompts, enforcement is automatic. Happy path feels invisible.
Phase 1: Schema and Prompt Changes
Step 1: Add per-task evidence fields to execution.json schema (megaplan/schemas.py:129-143)
Scope: Small
Addfiles_changed (array of strings) and commands_run (array of strings) as properties inside task_updates items (schemas.py:133). Since strict_schema() will make them required, the agent must always include them. For skipped tasks, empty arrays [] are valid.
Addsense_check_acknowledgments as a new required top-level array in execution.json (schemas.py:128), with items:
Simple two-field structure — no boolean flag, just the ID and a note. If the executor has nothing to say, a brief note like "N/A — not applicable during execution" suffices. This keeps the interface minimal.
Keep the existing top-level files_changed and commands_run as summary fields.
Step 2: Add evidence fields to finalize.json schema (megaplan/schemas.py:79-121)
Scope: Small
Addfiles_changed (array of strings, default []) and commands_run (array of strings, default []) to task items (schemas.py:86-101). These start as [] when finalize creates the tasks.
Addexecutor_note (string, default "") to sense_check items (schemas.py:105-116). Starts empty, populated during execute merge.
Addevidence_files (array of strings, default []) to task items for the reviewer to populate during review.
Step 3: Add evidence_files to review.json schema (megaplan/schemas.py:144-184)
Scope: Small
Addevidence_files (array of strings) to task_verdicts items (schemas.py:164-169). The reviewer lists which files from the diff they verified for each task.
Step 4: Update the execute prompt for per-task evidence (megaplan/prompts.py:398-430)
Scope: Small
Replace the task_updates instruction (prompts.py:425-426) with:
code
Return `task_updates` with one object per completed or skipped task:
{"task_id": "...", "status": "done|skipped", "executor_notes": "...", "files_changed": ["relative/path", ...], "commands_run": ["...", ...]}.
For skipped tasks, use empty arrays for files_changed and commands_run.
Replace the sense-check nudge block (prompts.py:379-382) to also require formal acknowledgment:
code
Sense checks — acknowledge each one in `sense_check_acknowledgments`:
- SC1 (T1): Did implementation match the stated idea?
Return: [{"sense_check_id": "SC1", "executor_note": "Yes — implemented X as described"}]
Keep the instruction simple and example-driven. Show the executor exactly what the output looks like.
Step 5: Update the review prompts for evidence cross-referencing (megaplan/prompts.py:433-520)
Scope: Small
Add review requirement to both _review_claude_prompt and _review_codex_prompt: "Return evidence_files in each task verdict listing the files you verified from the diff."
Add review requirement: "Cross-reference executor per-task files_changed against the git diff. Flag any discrepancy."
Add review requirement: "Verify that sense-check acknowledgments are substantive, not perfunctory."
Readexecution_audit.json if it exists (added in Phase 2), and include its findings in the prompt. Gracefully skip if the file doesn't exist (handles first-time runs and non-git environments).
Phase 2: Handler Merge Logic and Validation
Step 6: Update handle_execute to merge per-task evidence (megaplan/handlers.py:1110-1139)
Scope: Medium
Extendmerge_fields in the task_updates merge (handlers.py:1127) to include "files_changed" and "commands_run" alongside "status" and "executor_notes".
Add a new merge block after the task merge (after line 1130) for sense_check_acknowledgments:
Validate with _validate_merge_inputs(required_fields=("sense_check_id", "executor_note"), nonempty_fields={"executor_note"}).
Merge executor_note into finalize.json sense_checks using _merge_validated_entries(id_field="sense_check_id", merge_fields=("executor_note",)).
Track coverage: if ack_count < total_checks, add deviation. Block if any sense checks lack acknowledgment (same pattern as task coverage blocking).
Add per-task evidence completeness check: for each non-skipped task that was updated, verify files_changed is non-empty. If any "done" task has empty files_changed, add deviation but do not block (the audit in Step 7 will surface details for the reviewer).
Step 7: Add validate_execution_evidence() to megaplan/evaluation.py
Git file detection: Use git status --short (matching collect_git_diff_summary at _core.py:402-419) to get changed/untracked files. Parse the two-character status prefix and extract file paths. This catches modified, added, deleted, renamed, and untracked files — unlike git diff --name-only which misses untracked files (FLAG-002).
If .git doesn't exist: return {"findings": [], "skipped": True, "reason": "Not a git repository"}.
If git not on PATH: same, reason "git not found".
If timeout: same, reason "git status timed out".
This ensures test environments with empty .git dirs degrade gracefully.
Check 1 — files_changed vs git status: Collect union of all per-task files_changed from finalize.json tasks. Compare against actual files from git status. Flag:
Phantom claims: "executor says T2 changed foo.py but it is not in git status."
Unclaimed changes: "bar.py in git status but not claimed by any task."
Check 2 — executor_notes artifact references: For each task's executor_notes, extract path-like tokens (regex: word chars, slashes, dots, with a file extension). Check existence relative to project_dir. Flag non-existent paths. Keep regex simple — false positives are acceptable since findings are advisory.
Check 3 — sense-check acknowledgment quality: Flag any executor_note that is very short (< 10 chars) or matches a generic pattern ("done", "yes", "acknowledged") as "possibly perfunctory."
Step 8: Wire validation into handle_execute and write audit artifact (megaplan/handlers.py:1134)
Scope: Small
Callvalidate_execution_evidence(finalize_data, project_dir) after merging task_updates into finalize.json, before writing finalize.json to disk.
Write result to execution_audit.json in plan_dir.
Append each finding to the deviations list so it appears in the step response. Do not block based on audit findings — they are advisory for the reviewer.
Addexecution_audit.json to the artifacts list.
Step 9: Update handle_review to merge evidence_files (megaplan/handlers.py:1191-1280)
Scope: Small
Add"evidence_files" to merge_fields in the task_verdicts merge (handlers.py:1222).
No new blocking logic needed — existing verdict coverage check already ensures every task gets a verdict.
Update_mock_execute (workers.py:379-388) to include per-task files_changed and commands_run in each task_update, and add sense_check_acknowledgments to the payload.
Update_mock_review (workers.py:398-410) to include evidence_files in each task_verdict.
Ensure mock finalize (workers.py:345-373) initializes files_changed: [], commands_run: [], evidence_files: [] on tasks and executor_note: "" on sense_checks.
Run existing tests after Steps 1-3 + Step 10 to verify schema changes + mocks stay in sync.
Run handler tests after Steps 6, 9 to confirm new fields merge correctly.
Run validate_execution_evidence unit tests after Step 7.
Run full test suite after Step 11 to verify end-to-end pipeline.
Manual smoke test: run megaplan with mock workers end-to-end, inspect finalize.json at DONE to verify all evidence fields populated.
code
Plan metadata:
{
"version": 2,
"timestamp": "2026-03-25T02:30:38Z",
"hash": "sha256:b33b6202f3862b2297d237a3a8a0d752898ff10f06d4eb5d989d2d8b76def21c",
"changes_summary": "Revised plan to address all four significant critique flags:\n\n1. FLAG-001 (strict_schema makes all fields required): Flipped the design from "optional fields" to "required fields with empty defaults." Since strict_schema() forces all properties to be required and additionalProperties: false prevents extra fields, we embrace this \u2014 all new evidence fields are required in the schema. Empty arrays [] are valid for skipped tasks. No changes to strict_schema() needed. This is actually clearer for agents.\n\n2. FLAG-002 (wrong git command): Replaced git diff --name-only with git status --short throughout the audit logic, matching the existing collect_git_diff_summary() pattern at _core.py:402-419. This catches untracked files, staged changes, and deletions \u2014 all the states the pipeline already surfaces.\n\n3. FLAG-003 (no DONE enforcement): Now that fields are required in the schema, the agent literally cannot return a valid payload without them. Additionally: sense-check acknowledgment coverage now blocks (same pattern as task coverage blocking). Per-task evidence completeness is checked (done tasks must have non-empty files_changed). The DONE guarantee is enforced structurally.\n\n4. FLAG-004 (non-git test environments):validate_execution_evidence() follows collect_git_diff_summary()'s exact non-fatal pattern: check .git exists, catch FileNotFoundError, catch TimeoutExpired, return {\"skipped\": true, \"reason\": \"...\"} on any failure. Test environments with empty .git dirs degrade gracefully.\n\nAlso simplified the sense-check acknowledgment schema from three fields (sense_check_id, acknowledged, executor_note) to two (sense_check_id, executor_note) \u2014 the boolean was redundant since presence of a note implies acknowledgment. Fewer fields = easier for the agent.",
"flags_addressed": [
"FLAG-001",
"FLAG-002",
"FLAG-003",
"FLAG-004"
],
"questions": [
"Should sense-check acknowledgment coverage block execute (like task coverage does), or should it be a deviation-only? The revised plan blocks, reasoning that since the schema makes it easy to include, there's no excuse for missing it. But this could cause friction if an executor agent struggles with the acknowledgment format."
],
"success_criteria": [
"Every task in finalize.json at STATE_DONE has non-empty files_changed, commands_run, , and fields (enforced by required schema fields + handler merge)",
"Every sense_check in finalize.json at STATE_DONE has a non-empty and reviewer (enforced by schema + blocking on incomplete acknowledgment coverage)",
"execution_audit.json exists after every execute step and contains programmatic cross-check of claimed vs actual file changes",
"Phantom file claims (executor says file changed but git status disagrees) are detected and surfaced in audit findings",
"Unclaimed changes (file in git status but not claimed by any task) are detected and surfaced in audit findings",
"Review prompts include audit findings so the reviewer can act on discrepancies",
"New fields are required in agent-facing schemas \u2014 agents always return them, no ambiguity",
"No new CLI flags or interactive prompts are introduced",
"Audit validation degrades gracefully in non-git environments (returns skipped result, does not crash)",
"Existing test suite passes after updating test fixtures to include new required fields",
"render_final_md shows the enriched evidence when present",
"Mock workers produce valid payloads with all new fields"
],
"assumptions": [
"Per-task and are executor-reported claims, not system-captured. The audit validates claims against git state but doesn't independently log commands. Acceptable since the executor is an LLM agent that can only self-report.",
"The git status check uses (matching existing ). This captures modified, added, deleted, renamed, and untracked files. Committed-then-amended changes that are no longer dirty won't appear \u2014 assumed acceptable.",
"Making all new fields required in the schema means plans created before this version will need re-run to regenerate schema files. This is standard for schema-breaking changes and acceptable.",
"The artifact is written alongside and \u2014 no separate CLI step or state transition needed.",
"Sense-check acknowledgment coverage blocking (Step 6) uses the same pattern as task coverage: if executor doesn't acknowledge all sense checks, execute is blocked and must re-run. This is the right enforcement level since the schema makes it easy to include.",
"The path-extraction regex for executor_notes validation is simple (tokens with and file extensions). False positives are acceptable since findings are advisory for the reviewer."
],
"structure_warnings": [],
"delta_from_previous_percent": 71.31
}
code
Plan structure warnings from validator:
[]
Existing flags:
[
{
"id": "FLAG-001",
"concern": "The backward-compatibility claim is not achievable as written: adding new "optional" evidence fields to execution.json, finalize.json, or review.json will make them required in the agent-facing schemas unless strict_schema() changes too.",
"status": "addressed",
"severity": "significant"
},
{
"id": "FLAG-002",
"concern": "The proposed file-audit basis is wrong for this repository: git diff --name-only will miss normal changes that the current pipeline surfaces, especially new untracked files, so the audit will report false phantom/unclaimed discrepancies.",
"status": "addressed",
"severity": "significant"
},
{
"id": "FLAG-003",
"concern": "The plan does not actually enforce the DONE guarantee it states. It adds more evidence fields, but keeps the new checks advisory, so a plan can still reach DONE with missing per-task evidence or missing executor acknowledgments.",
"status": "addressed",
"severity": "significant"
},
{
"id": "FLAG-004",
"concern": "The new audit step is underspecified for the non-real-git environments this repository already uses in tests; without an explicit non-fatal fallback, the change will break the stated success criterion that the existing suite passes unchanged.",
"status": "addressed",
"severity": "significant"
}
]
code
Requirements:
- Consider whether the plan is at the right level of abstraction.
- Reuse existing flag IDs when the same concern is still open.
- `verified_flag_ids` should list previously addressed flags that now appear resolved.
- Focus on concrete issues that would cause real problems.
- Robustness level: standard. Use balanced judgment. Flag significant risks, but do not spend flags on minor polish or executor-obvious boilerplate.
- Verify that the plan remains aligned with the user's original intent.
- Verify that the plan follows the expected structure: one H1 title, `## Overview`, numbered step sections (`### Step N:` under `## Phase` headers, or flat `## Step N:`) with file references and numbered substeps, plus `## Execution Order` or `## Validation Order`. Missing structure should be flagged as category `completeness` with severity_hint `likely-significant`.
- Flag scope creep explicitly when the plan grows beyond the original idea or recorded user notes. Use the phrase "Scope creep:" in the concern.
- Assign severity_hint carefully. Implementation details the executor will naturally resolve should usually be `likely-minor`.
{"flags":[{"id":"FLAG-003","concern":"The DONE guarantee is still not fully enforced. The revised plan makes the new fields required in the payload shape, but it still allows key evidence fields to stay empty and remain non-blocking, so a plan can reach DONE without the non-empty per-task evidence promised in the success criteria.","category":"completeness","severity_hint":"likely-significant","evidence":"megaplan/handlers.py:1113-1139 currently blocks execute only on missing task coverage, and megaplan/handlers.py:1218-1247 blocks review only on verdict coverage. In the revised plan, Step 6 blocks on missing sense-check acknowledgments, but it explicitly keeps empty files_changed on done tasks advisory and adds no equivalent enforcement for empty commands_run or empty reviewer evidence_files. Required schema fields only enforce presence, not meaningful content; empty arrays are still valid."},{"id":"FLAG-004","concern":"The non-git fallback is still incomplete for this repository's actual test scaffolds. The revised plan handles missing .git, missing git, and timeouts, but it still does not cover the non-zero git status case caused by the empty .git directories used in tests.","category":"correctness","severity_hint":"likely-significant","evidence":"The repository already has a graceful pattern in megaplan/_core.py:402-419, which handles process.returncode != 0 from git status. That is the real failure mode in test scaffolds that create an empty .git directory, for example tests/test_prompts.py:54 and tests/test_megaplan.py:67. Revised Step 7 says it follows that pattern 'exactly', but its explicit fallback list omits the non-zero-returncode path, so FLAG-004 is not actually closed."},{"id":"FLAG-005","concern":"The merge steps still do not fit the repository's current helper behavior. As written, Phase 2 assumes the existing merge helpers can carry array fields through execute/review, but _validate_merge_inputs() currently strips them, so files_changed, commands_run, and evidence_files will not merge without an explicit helper redesign.","category":"correctness","severity_hint":"likely-significant","evidence":"_validate_merge_inputs() in megaplan/handlers.py:183-228 only copies required_fields into the normalized output, and those required fields are currently strings. handle_execute() validates task updates with required_fields=(\"task_id\", \"status\", \"executor_notes\") at megaplan/handlers.py:1113-1120; if Step 6 only extends merge_fields, the validated entries still will not contain files_changed or commands_run. The same issue applies to review: handle_review() validates only task_id and reviewer_verdict at megaplan/handlers.py:1202-1208, so Step 9 cannot merge evidence_files unless the validation/merge path is expanded first."}],"verified_flag_ids":["FLAG-001","FLAG-002"],"disputed_flag_ids":[]}
You are an independent reviewer. Critique the plan against the actual repository.
Harden the execute→review pipeline so that by the time a plan reaches DONE, every task has verifiable evidence of completion. During execution: require the executor to return structured per-task evidence (files_changed, commands_run) that can be cross-checked against the actual git diff; require preliminary sense-check acknowledgments from the executor (not just reviewer). Between execute and review: add a programmatic validation pass that audits executor claims against repo state — did the claimed files actually change? do executor_notes reference real artifacts? are sense checks acknowledged? During review: reviewer cross-references executor evidence with git diff and fills verdicts. The whole loop should be thorough but not cumbersome — no new CLI flags, no interactive prompts, enforcement is automatic and invisible on the happy path. The goal: when a plan hits DONE, you can read finalize.json and have complete auditable evidence of what was done, why, and whether it checks out.
User notes and answers:
Ease of agentic use is extremely important. The executor agent needs to understand what's expected without confusion. Enforcement should be robust but the interface (schema, prompts, error messages) must be simple and clear. Don't make the executor jump through hoops — make the right thing easy and the wrong thing impossible.
Goal: When a plan reaches DONE, finalize.json contains complete, auditable, programmatically-verified evidence of what was done and whether it checks out.
Current state: The pipeline has good structural bones — executor returns task_updates with executor_notes, reviewer fills reviewer_verdict and sense_check verdicts, coverage gaps block state transitions. Three gaps remain:
Evidence is flat, not per-task.files_changed and commands_run live at the top level of execution.json, not tied to individual tasks.
No programmatic validation. Executor claims are trusted at face value. Nobody checks whether claimed files actually appear in git status.
Sense-check acknowledgments are one-directional. The executor sees sense checks as "nudges" (prompts.py:380) but never formally acknowledges them.
Key design decision — required fields, not optional:strict_schema() (schemas.py:189-196) forces all declared properties to be required and sets additionalProperties: false on agent-facing schemas. Rather than fighting this, we embrace it: all new evidence fields are required in the schema. This is better for agentic clarity — the executor always knows exactly what to return, no ambiguity. Empty arrays ([]) are the valid value for skipped tasks.
DONE enforcement strategy: Three layers ensure the DONE guarantee:
Schema layer: Agent-facing schemas require all evidence fields — agent cannot return a valid payload without them.
Handler layer:handle_execute blocks if any "done" task has empty files_changed (not just missing task coverage). handle_review blocks if any task verdict has empty evidence_files. Sense-check acknowledgment coverage blocks execute.
Audit layer: Programmatic cross-check of executor claims vs git status surfaces advisory findings for the reviewer.
Merge helper extension:_validate_merge_inputs() (handlers.py:183-228) currently only handles string fields — it iterates required_fields, checks isinstance(value, str), and copies to a normalized dict. Array evidence fields (files_changed, commands_run, evidence_files) need a new array_fields parameter so the helper can validate and carry them through without breaking existing string-field behavior.
Constraints: No new CLI flags, no interactive prompts, enforcement is automatic. Happy path feels invisible.
Phase 1: Schema and Prompt Changes
Step 1: Add per-task evidence fields to execution.json schema (megaplan/schemas.py:129-143)
Scope: Small
Addfiles_changed (array of strings) and commands_run (array of strings) as properties inside task_updates items (schemas.py:133). Since strict_schema() will make them required, the agent must always include them. For skipped tasks, empty arrays [] are valid.
Addsense_check_acknowledgments as a new required top-level array in execution.json (schemas.py:128), with items:
Simple two-field structure — no boolean flag, just the ID and a note. If the executor has nothing to say, a brief note like "N/A — not applicable during execution" suffices. This keeps the interface minimal.
Keep the existing top-level files_changed and commands_run as summary fields.
Step 2: Add evidence fields to finalize.json schema (megaplan/schemas.py:79-121)
Scope: Small
Addfiles_changed (array of strings, default []) and commands_run (array of strings, default []) to task items (schemas.py:86-101). These start as [] when finalize creates the tasks.
Addexecutor_note (string, default "") to sense_check items (schemas.py:105-116). Starts empty, populated during execute merge.
Addevidence_files (array of strings, default []) to task items for the reviewer to populate during review.
Step 3: Add evidence_files to review.json schema (megaplan/schemas.py:144-184)
Scope: Small
Addevidence_files (array of strings) to task_verdicts items (schemas.py:164-169). The reviewer lists which files from the diff they verified for each task.
Step 4: Update the execute prompt for per-task evidence (megaplan/prompts.py:398-430)
Scope: Small
Replace the task_updates instruction (prompts.py:425-426) with:
code
Return `task_updates` with one object per completed or skipped task:
{"task_id": "...", "status": "done|skipped", "executor_notes": "...", "files_changed": ["relative/path", ...], "commands_run": ["...", ...]}.
For skipped tasks, use empty arrays for files_changed and commands_run.
Replace the sense-check nudge block (prompts.py:379-382) to also require formal acknowledgment:
code
Sense checks — acknowledge each one in `sense_check_acknowledgments`:
- SC1 (T1): Did implementation match the stated idea?
Return: [{"sense_check_id": "SC1", "executor_note": "Yes — implemented X as described"}]
Keep the instruction simple and example-driven. Show the executor exactly what the output looks like.
Step 5: Update the review prompts for evidence cross-referencing (megaplan/prompts.py:433-520)
Scope: Small
Add review requirement to both _review_claude_prompt and _review_codex_prompt: "Return evidence_files in each task verdict listing the files you verified from the diff."
Add review requirement: "Cross-reference executor per-task files_changed against the git diff. Flag any discrepancy."
Add review requirement: "Verify that sense-check acknowledgments are substantive, not perfunctory."
Readexecution_audit.json if it exists (added in Phase 2), and include its findings in the prompt. Gracefully skip if the file doesn't exist (handles first-time runs and non-git environments).
Phase 2: Handler Merge Logic and Validation
Step 6: Extend _validate_merge_inputs to support array fields (megaplan/handlers.py:183-228)
Scope: Medium — This is the prerequisite for Steps 7 and 10. Without it, array evidence fields silently disappear during merge.
The current function only handles string fields:
Line 206-217: iterates required_fields, checks isinstance(value, str), copies to normalized dict.
Line 249-250 in _merge_validated_entries: copies merge_fields from validated entry to target.
If files_changed: ["foo.py"] is in required_fields, it fails isinstance(value, str) and the entire entry is skipped as malformed.
Fix — add an array_fields parameter:
Addarray_fields: tuple[str, ...] = () parameter to _validate_merge_inputs() (handlers.py:183).
Update the validation loop (handlers.py:206-217) to handle array fields separately from required string fields:
python
# After the existing required_fields string loop (lines 208-217):
for field in array_fields:
value = entry.get(field)
if not isinstance(value, list):
malformed = True
break
normalized[field] = value
Also check that array fields are present in the entry (handlers.py:202): extend the missing-field check to include array_fields.
Update the return type annotation from list[dict[str, str]] to list[dict[str, Any]] (handlers.py:191) since normalized dicts now contain lists too.
Update_merge_validated_entries type annotation (handlers.py:231) from list[dict[str, str]] to list[dict[str, Any]] to match.
No changes to _merge_validated_entries logic itself — it already does target[field] = entry[field] which works for any type.
Step 7: Update handle_execute to merge per-task evidence and enforce completeness (megaplan/handlers.py:1110-1139)
Scope: Medium
Extend the _validate_merge_inputs call for task_updates (handlers.py:1113-1119) to include the new array fields:
Track coverage: unacked_checks = total_checks - ack_count. If unacked_checks > 0, add deviation and set blocked.
Add per-task evidence completeness enforcement (after merge, before writing finalize.json): iterate merged tasks, check each task with status == "done". If files_changed is empty (len(task.get("files_changed", [])) == 0), add deviation and set blocked = True. This enforces the DONE guarantee — a "done" task must claim at least one file changed. commands_run is allowed to be empty (some tasks are pure file edits with no commands). evidence_files is enforced on the review side (Step 10).
Step 8: Add validate_execution_evidence() to megaplan/evaluation.py
Git file detection: Use git status --short (matching collect_git_diff_summary at _core.py:402-419) to get changed/untracked files. Parse the two-character status prefix and extract file paths (column 3 onward, handling -> for renames). This catches modified, added, deleted, renamed, and untracked files.
Non-fatal fallback — all four paths explicitly:
If (project_dir / ".git").exists() is False: return {"findings": [], "skipped": True, "reason": "Not a git repository"}.
If FileNotFoundError (git not on PATH): return {"findings": [], "skipped": True, "reason": "git not found on PATH"}.
If subprocess.TimeoutExpired: return {"findings": [], "skipped": True, "reason": "git status timed out"}.
If process.returncode != 0: return {"findings": [], "skipped": True, "reason": f"git status failed: {process.stderr.strip() or process.stdout.strip()}"}.
This covers all four failure modes, including the non-zero returncode from empty .git directories used in test scaffolds at tests/test_prompts.py:54 and tests/test_megaplan.py:67.
Check 1 — files_changed vs git status: Collect union of all per-task files_changed from finalize.json tasks. Compare against actual files from git status. Flag:
Phantom claims: "executor says T2 changed foo.py but it is not in git status."
Unclaimed changes: "bar.py in git status but not claimed by any task."
Check 2 — executor_notes artifact references: For each task's executor_notes, extract path-like tokens (regex: word chars, slashes, dots, with a file extension). Check existence relative to project_dir. Flag non-existent paths. Keep regex simple — false positives are acceptable since findings are advisory.
Check 3 — sense-check acknowledgment quality: Flag any executor_note that is very short (< 10 chars) or matches a generic pattern ("done", "yes", "acknowledged") as "possibly perfunctory."
Step 9: Wire validation into handle_execute and write audit artifact (megaplan/handlers.py:1134)
Scope: Small
Callvalidate_execution_evidence(finalize_data, project_dir) after merging task_updates into finalize.json, before writing finalize.json to disk.
Write result to execution_audit.json in plan_dir.
Append each finding to the deviations list so it appears in the step response. Do not block based on audit findings — they are advisory for the reviewer. (Handler-level blocking in Step 7 already covers the structural guarantees.)
Addexecution_audit.json to the artifacts list.
Step 10: Update handle_review to merge evidence_files and enforce completeness (megaplan/handlers.py:1191-1280)
Scope: Small
Extend the _validate_merge_inputs call for task_verdicts (handlers.py:1202-1207) to include the new array field:
Add per-task evidence completeness enforcement in the blocked check (handlers.py:1245): after merging verdicts, check each task with status == "done". If evidence_files is empty, add issue and set blocked = True. This enforces the reviewer side of the DONE guarantee — the reviewer must cite at least one file they verified per done task.
Update_mock_execute (workers.py:379-388) to include per-task files_changed and commands_run in each task_update, and add sense_check_acknowledgments to the payload.
Update_mock_review (workers.py:398-410) to include evidence_files in each task_verdict.
Ensure mock finalize (workers.py:345-373) initializes files_changed: [], commands_run: [], evidence_files: [] on tasks and executor_note: "" on sense_checks.
Run existing tests after Steps 1-3 + Step 6 + Step 11 to verify schema changes, helper extension, and mocks stay in sync.
Run handler tests after Steps 7, 10 to confirm new fields merge and blocking works correctly.
Run validate_execution_evidence unit tests after Step 8.
Run full test suite after Step 12 to verify end-to-end pipeline.
Manual smoke test: run megaplan with mock workers end-to-end, inspect finalize.json at DONE to verify all evidence fields populated and non-empty for done tasks.
code
Plan metadata:
{
"version": 3,
"timestamp": "2026-03-25T02:35:04Z",
"hash": "sha256:af55ff5e059d3c0e617f36461a3abeede5f73aee14030fa79896597286d98282",
"changes_summary": "Surgical fixes for the three remaining flags \u2014 no structural changes to the plan, just closing the specific gaps:\n\nFLAG-003 (DONE enforcement): Added explicit blocking checks for empty evidence arrays. In Step 7: after merging task_updates, iterate done tasks \u2014 if any has empty files_changed, block execute. In Step 10: after merging task_verdicts, iterate done tasks \u2014 if any has empty evidence_files, block review. commands_run is intentionally not enforced (some tasks are pure file edits). This closes the gap between "required in schema" (agent must return the field) and "non-empty at DONE" (the field must have content for done tasks).\n\nFLAG-004 (non-zero returncode): Added the fourth fallback path explicitly in Step 8: if process.returncode != 0: return {\"findings\": [], \"skipped\": True, \"reason\": f\"git status failed: {stderr}\"}. This matches collect_git_diff_summary's handling at _core.py:417-418 and covers the empty .git directory case used in test scaffolds.\n\nFLAG-005 (merge helpers strip array fields): Added Step 6 as a dedicated step to extend _validate_merge_inputs. The fix adds an array_fields: tuple[str, ...] = () parameter. Array fields get validated with isinstance(value, list) instead of isinstance(value, str), and copied to the normalized dict alongside string fields. Return type annotation updated to dict[str, Any]. _merge_validated_entries already handles any type via target[field] = entry[field], so it only needs a type annotation update. Steps 7 and 10 now show the exact call signatures with array_fields= parameter.",
"flags_addressed": [
"FLAG-003",
"FLAG-004",
"FLAG-005"
],
"questions": [],
"success_criteria": [
"Every task in finalize.json at STATE_DONE has non-empty files_changed, executor_notes, and reviewer_verdict fields (enforced by handler blocking on empty arrays + required schema fields)",
"Every task in finalize.json at STATE_DONE has non-empty evidence_files from the reviewer (enforced by handle_review blocking)",
"Every sense_check in finalize.json at STATE_DONE has a non-empty executor_note and reviewer verdict (enforced by blocking on incomplete acknowledgment coverage)",
"execution_audit.json exists after every execute step and contains programmatic cross-check of claimed vs actual file changes",
"Phantom file claims (executor says file changed but git status disagrees) are detected and surfaced in audit findings",
"Unclaimed changes (file in git status but not claimed by any task) are detected and surfaced in audit findings",
"Review prompts include audit findings so the reviewer can act on discrepancies",
"New fields are required in agent-facing schemas \u2014 agents always return them, no ambiguity",
"No new CLI flags or interactive prompts are introduced",
"Audit validation degrades gracefully in all non-git scenarios: missing .git, missing git binary, timeout, AND non-zero returncode from empty .git directories",
"Existing test suite passes after updating test fixtures to include new required fields",
"render_final_md shows the enriched evidence when present",
"Mock workers produce valid payloads with all new fields",
"_validate_merge_inputs correctly carries array fields (files_changed, commands_run, evidence_files) through validation without stripping them"
],
"assumptions": [
"Per-task and are executor-reported claims, not system-captured. The audit validates claims against git state but doesn't independently log commands. Acceptable since the executor is an LLM agent that can only self-report.",
"The git status check uses (matching existing ). This captures modified, added, deleted, renamed, and untracked files. Committed-then-amended changes that are no longer dirty won't appear \u2014 assumed acceptable.",
"Making all new fields required in the schema means plans created before this version will need re-run to regenerate schema files. This is standard for schema-breaking changes and acceptable.",
"The artifact is written alongside and \u2014 no separate CLI step or state transition needed.",
"Sense-check acknowledgment coverage blocking uses the same pattern as task coverage: if executor doesn't acknowledge all sense checks, execute is blocked and must re-run.",
"The path-extraction regex for executor_notes validation is simple (tokens with and file extensions). False positives are acceptable since findings are advisory for the reviewer.",
" is not enforced non-empty for done tasks \u2014 some tasks are pure file edits with no shell commands. Only is enforced non-empty since every done task must touch at least one file.",
"Reviewer is enforced non-empty for done tasks \u2014 the reviewer must cite at least one file they verified. For skipped tasks, empty is valid."
],
"structure_warnings": [],
"delta_from_previous_percent": 30.3
}
code
Plan structure warnings from validator:
[]
Existing flags:
[
{
"id": "FLAG-003",
"concern": "The DONE guarantee is still not fully enforced. The revised plan makes the new fields required in the payload shape, but it still allows key evidence fields to stay empty and remain non-blocking, so a plan can reach DONE without the non-empty per-task evidence promised in the success criteria.",
"status": "addressed",
"severity": "significant"
},
{
"id": "FLAG-004",
"concern": "The non-git fallback is still incomplete for this repository's actual test scaffolds. The revised plan handles missing .git, missing git, and timeouts, but it still does not cover the non-zero git status case caused by the empty .git directories used in tests.",
"status": "addressed",
"severity": "significant"
},
{
"id": "FLAG-005",
"concern": "The merge steps still do not fit the repository's current helper behavior. As written, Phase 2 assumes the existing merge helpers can carry array fields through execute/review, but _validate_merge_inputs() currently strips them, so files_changed, commands_run, and evidence_files will not merge without an explicit helper redesign.",
"status": "addressed",
"severity": "significant"
}
]
code
Requirements:
- Consider whether the plan is at the right level of abstraction.
- Reuse existing flag IDs when the same concern is still open.
- `verified_flag_ids` should list previously addressed flags that now appear resolved.
- Focus on concrete issues that would cause real problems.
- Robustness level: standard. Use balanced judgment. Flag significant risks, but do not spend flags on minor polish or executor-obvious boilerplate.
- Verify that the plan remains aligned with the user's original intent.
- Verify that the plan follows the expected structure: one H1 title, `## Overview`, numbered step sections (`### Step N:` under `## Phase` headers, or flat `## Step N:`) with file references and numbered substeps, plus `## Execution Order` or `## Validation Order`. Missing structure should be flagged as category `completeness` with severity_hint `likely-significant`.
- Flag scope creep explicitly when the plan grows beyond the original idea or recorded user notes. Use the phrase "Scope creep:" in the concern.
- Assign severity_hint carefully. Implementation details the executor will naturally resolve should usually be `likely-minor`.
“You are an independent reviewer. Critique the plan against the actual repository.….” Conversation with gpt-5.4, from the Peter O’Mallet DataClaw Conversations dataset. The Chat Archive, 2026. https://thechatarchive.com/c/01m80epxxc7697r0p1p8j0b9j5