Update all documentation, agent instructions, README, skill files, and prompts to cover the new subagent orchestration mode. For each stage of the megaplan workflow (init, plan, critique, gate, revise, finalize, execute, review), document what humans need to know, what the orchestrating agent needs to know, and what the worker agents need to know when subagent mode is active vs inline mode. Cover: how to activate/deactivate, breakpoint types and what triggers them, how resume works, safeguard behavior, and the config setting.
Megaplan has two orchestration modes — inline (default) and subagent — but documentation coverage is uneven:
.claude/skills/megaplan.md — Fully covers both modes (lines 1-117 inline, 119-258 subagent). This is the authoritative source.
megaplan/data/claude_subagent_appendix.md — Standalone subagent spec (140 lines). Content is essentially identical to the skill file's subagent section.
megaplan/data/instructions.md — Inline-only. No mention of subagent mode, breakpoints, or resume.
README.md — No mention of subagent mode at all.
Worker prompt builders (megaplan/prompts/*.py) — Workers don't need subagent awareness; they receive the same prompts regardless of orchestration mode. No changes needed here.
The key insight: worker agents don't care about orchestration mode. The distinction only matters to (1) human users, (2) the orchestrating agent (outer skill or subagent runner), and (3) the launcher logic. The prompt builders are worker-facing and should stay mode-agnostic.
Main Phase
Step 1: Update README.md with subagent mode section (README.md)
Scope: Small
Add a new section after "Running manually" (after line 56) covering:
What subagent mode is (one-sentence summary)
How to activate: megaplan config set orchestration.mode subagent
Assistant
User
Assistant
I’ve checked the revised plan against the packaging and setup paths again. The major source-of-truth issues are fixed, but there are still two concrete tensions around install-path consumers and mirror regeneration that I’m writing into the critique artifact now.
Assistant
I’ve written the iteration-2 findings. The revised plan genuinely fixes the big source-of-truth and doc-only-protocol problems, but I re-opened one install-path flag and added one new contradiction around the “appendix-only” success criterion versus the regenerated mirror.
Assistant
Updated critique_output.json.
The revised plan does fix the main source-of-truth and doc-only-protocol problems, and I marked those prior flags as verified. I re-opened FLAG-003 because Step 2 still points shared instructions.md consumers to a Claude-only appendix that local AGENTS.md and non-Claude skills do not include, and I added FLAG-004 because the success criteria say the full spec should live only in the appendix while Step 4 deliberately regenerates a duplicate mirror file.
How to deactivate: megaplan config set orchestration.mode inline or omit (inline is default)
Brief note that this is Claude Code-specific; other agents use inline mode
Keep it short — README is a quick-start doc, not a spec. Link to the skill file or instructions for details.
Step 2: Add subagent awareness to instructions.md (megaplan/data/instructions.md)
Scope: Medium
Add a new section after "Sessions And Autonomy" (after line 91) titled "Orchestration Mode" covering:
Inline vs subagent distinction (2-3 sentences)
Config: megaplan config set orchestration.mode subagent
Per-run override precedence
When to use which mode (mirrors skill file guidance)
Breakpoint types: GATE_ESCALATE, EXECUTE_APPROVAL, PHASE_ESCALATE, EXECUTE_ESCALATE — what triggers each
Resume behavior after breakpoints
Safeguards (retry with --fresh, escalation caps)
Do not duplicate the full agent prompt template — that belongs in the skill file and appendix only. instructions.md is for the orchestrating agent reading the skill, not for the subagent runner.
Step 3: Reconcile claude_subagent_appendix.md with skill file (megaplan/data/claude_subagent_appendix.md)
Scope: Small
Audit for any drift between claude_subagent_appendix.md and the corresponding section in .claude/skills/megaplan.md (lines 119-258).
Sync any discrepancies — the skill file is authoritative since it's what Claude Code actually loads.
Add a header comment noting that this file is the source-of-truth for the subagent prompt template, and the skill file's subagent section is derived from it (or vice versa — determine which is canonical and document).
Step 4: Review and tighten the skill file's subagent section (.claude/skills/megaplan.md)
Scope: Small
Review lines 119-258 for completeness against the task requirements:
Activation/deactivation: covered (lines 119-127)
Breakpoint types and triggers: covered (lines 199-210)
Resume: covered (lines 212-217)
Safeguards: covered (lines 192-197)
Config setting: covered (line 123, 249)
Add any missing per-stage documentation for what the orchestrating agent vs worker agent needs to know. Currently the skill file mixes orchestrator and worker guidance — add brief callouts where behavior differs between inline and subagent mode if any exist.
Verify the "Outer skill handling" section (lines 252-257) is clear enough for the orchestrating agent about its role in each mode.
Step 5: Validate no content is stale or contradictory
Scope: Small
Runmegaplan config show to confirm the orchestration.mode config key exists and works as documented.
Grep for any references to subagent mode in test files to ensure tests match documentation claims.
Cross-check that breakpoint type strings in docs match what the code actually uses (grep for BREAKPOINT:, GATE_ESCALATE, etc. in Python source).
Execution Order
Steps 1-2 can run in parallel (independent files).
Step 3 depends on reading step 4's target file, so run 3 and 4 together or sequentially.
Step 5 runs last as validation.
Validation Order
Grep for consistency of breakpoint type strings across all documentation and code.
Verify megaplan config set orchestration.mode subagent works via CLI.
Read each updated file end-to-end to check for contradictions.
code
Plan metadata:
{
"version": 1,
"timestamp": "2026-04-06T17:05:35Z",
"hash": "sha256:3b775ff928e571e58a92dc6a0ebfb3acf2bcf785d361d2b352498ae18f73fe7d",
"questions": [
"Should claude_subagent_appendix.md or .claude/skills/megaplan.md be the canonical source for the subagent spec? Currently they contain near-identical content. One option: appendix is canonical, skill file includes it. Another: skill file is canonical, appendix is generated/deprecated.",
"The task mentions documenting 'what worker agents need to know when subagent mode is active vs inline mode' \u2014 but from reading the code, workers receive identical prompts regardless of orchestration mode. Should we document this explicitly (workers are mode-agnostic) or is there planned divergence?",
"Should instructions.md remain inline-only (with a pointer to the appendix for subagent details), or should it fully incorporate the subagent spec? The current separation keeps instructions.md clean for non-Claude agents that only use inline mode."
],
"success_criteria": [
{
"criterion": "README.md mentions subagent mode with activation/deactivation instructions",
"priority": "must"
},
{
"criterion": "instructions.md covers orchestration mode, breakpoint types, resume, and safeguards",
"priority": "must"
},
{
"criterion": "claude_subagent_appendix.md and .claude/skills/megaplan.md are consistent \u2014 no contradictory claims about breakpoint types, resume protocol, or activation rules",
"priority": "must"
},
{
"criterion": "All four breakpoint types (GATE_ESCALATE, EXECUTE_APPROVAL, PHASE_ESCALATE, EXECUTE_ESCALATE) are documented with their triggers in at least instructions.md and the skill file",
"priority": "must"
},
{
"criterion": "Breakpoint type strings in documentation match the strings used in Python source code",
"priority": "must"
},
{
"criterion": "Each doc file stays under ~300 lines to avoid context bloat",
"priority": "should"
},
{
"criterion": "Worker prompt builders remain unchanged (mode-agnostic)",
"priority": "should"
},
{
"criterion": "Documentation clearly distinguishes what the human, orchestrating agent, and worker agent each need to know",
"priority": "should"
},
{
"criterion": "No duplicate full-spec blocks across files \u2014 use cross-references instead",
"priority": "should"
}
],
"assumptions": [
"Worker prompt builders (megaplan/prompts/*.py) do not need changes \u2014 workers are orchestration-mode-agnostic.",
"The README should stay concise \u2014 a short section pointing users to the skill file for full subagent details, not a reproduction of the full spec.",
"The skill file (.claude/skills/megaplan.md) is the authoritative runtime document since Claude Code loads it directly.",
"No code changes are needed \u2014 this is a documentation-only task.",
"instructions.md serves both Claude and non-Claude agents, so subagent-specific content should be clearly marked as Claude-specific or kept in the appendix."
],
"structure_warnings": []
}
code
Plan structure warnings from validator:
[]
Existing flags:
[]
Known accepted debt grouped by subsystem:
{
"are-the-proposed-changes-technically-correct": [
{
"id": "DEBT-009",
"concern": "are the proposed changes technically correct?: the mobile action-surface plan is technically incorrect for the current component structure. submissioncarouselcard hides footercontent below the md breakpoint (src/components/submissioncarouselcard.tsx:219), while submissionscarouselpage also hides the score panel on mobile via asidecontent={<div classname=\"hidden md:block\">... and passes hideactions to scorepanel at src/pages/submissionscarouselpage.tsx:250-263,347. reusing that pattern for entrypage would leave mobile users with no navigation controls and no scoring controls.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
},
{
"id": "DEBT-010",
"concern": "are the proposed changes technically correct?: i checked the sign-in callback path again. submissionslayout already wires usescoring(..., { onrequiresignin: () => pagemachine.dispatch({ type: 'open_sign_in_modal' }) }) at src/pages/submissionslayout.tsx:38-40, and scorepanel still has its own onrequiresignin prop. the revised step 4.2 is acceptable only if it explicitly rewires that prop to pagemachine.dispatch; otherwise removing local modal state would orphan the direct ui callback. the plan hints at this, but it remains easy to misread because the scoring-context callback and the scorepanel prop are separate mechanisms.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"are-the-success-criteria-well-prioritized-and-verifiable": [
{
"id": "DEBT-019",
"concern": "are the success criteria well-prioritized and verifiable?: mobile behavior is still under-prioritized relative to the actual risk in this repo. the user constraint specifically mentions the mobile bottom nav, but the only mobile-specific success criterion left is 'mobile scoring ux is coherent' at info level. given that the plan currently removes the working mobile nav, there should be at least a should or must criterion stating that mobile users retain navigation and scoring controls.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"did-the-work-fully-address-the-issue-hints-user-notes-and-approved-plan-requirements": [
{
"id": "DEBT-011",
"concern": "did the work fully address the issue hints, user notes, and approved plan requirements?: a new critical issue is introduced on mobile. step 4.9 says to remove entrypage's mobile sticky bottom nav and 'use the same footercontent slot in submissioncarouselcard', but src/components/submissioncarouselcard.tsx:217-221 renders footercontent inside classname=\"hidden md:block\". in the current repo, the mobile sticky nav at src/pages/entrypage.tsx:283-340 is the only mobile surface for back/next and the score toggle, so the revised plan would remove working mobile controls and replace them with a slot that is explicitly hidden on phones.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
},
{
"id": "DEBT-012",
"concern": "did the work fully address the issue hints, user notes, and approved plan requirements?: the plan still contradicts itself on mobile behavior. assumption #3 says the browse-mode mobile score toggle will be preserved, but step 4.9 removes the entire mobile sticky nav that contains that toggle in src/pages/entrypage.tsx:314-330. the implementer cannot satisfy both instructions as written.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"does-the-change-touch-all-locations-and-supporting-infrastructure": [
{
"id": "DEBT-018",
"concern": "does the change touch all locations and supporting infrastructure?: if the implementation really wants footercontent to carry mobile actions, the plan must also include a supporting change in src/components/submissioncarouselcard.tsx or render a separate mobile control surface outside the card. right now step 4.9 removes the mobile nav but does not list submissioncarouselcard.tsx:217-221 as a place that must change, so the required glue for mobile controls is missing.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"execute-phase-contract": [
{
"id": "DEBT-003",
"concern": "early-killed baselines pass truncated output to the execute worker, which may produce lower-quality diagnosis than full output.",
"occurrence_count": 1,
"plan_ids": [
"design-and-implement-a-20260327-0512"
]
}
],
"find-the-callers-of-the-changed-function-what-arguments-do-they-actually-pass-does-the-fix-handle-all-of-them": [
{
"id": "DEBT-014",
"concern": "find the callers of the changed function. what arguments do they actually pass? does the fix handle all of them?: i checked the skip caller path against the real hook behavior and removefromqueue(entryid) looks redundant. scoring.skipentry(entryid) optimistically adds the id to skippedentryids in src/hooks/usescoring.ts:245-249, and usecarouselqueue already reactively filters skipped entries from submissions[] in src/hooks/usecarouselqueue.ts:154-165. calling removefromqueue() immediately afterward is safe, but it duplicates an existing state transition and should be justified as an explicit ux optimization rather than required logic.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
},
{
"id": "DEBT-015",
"concern": "find the callers of the changed function. what arguments do they actually pass? does the fix handle all of them?: the direct ui sign-in caller is still important here. scorepanel invokes its own onrequiresignin prop when an unauthenticated user interacts with the score ui (src/components/scorepanel.tsx:499-515), which is independent of the scoring hook's internal requireauth() path. the plan should be read as requiring that caller to dispatch open_sign_in_modal; otherwise one caller remains broken even if submitscore() is correctly wired.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"handler-boilerplate": [
{
"id": "DEBT-004",
"concern": "_run_worker() pseudocode hardcodes iteration=state['iteration'] but handle_plan and handle_revise use different failure iteration values.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
},
{
"id": "DEBT-005",
"concern": "same issue as correctness-1: failure iteration would be wrong for plan/revise handlers.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
}
],
"install-paths": [
{
"id": "DEBT-023",
"concern": "local setup path doesn't expose subagent mode",
"occurrence_count": 1,
"plan_ids": [
"refactor-megaplan-skill-so-20260406-1818"
]
}
],
"is-there-convincing-verification-for-the-change": [
{
"id": "DEBT-016",
"concern": "is there convincing verification for the change?: the test-plan details still miss a small but real infrastructure update: the current locationdisplay helper in src/pages/submissionscarouselpage.test.tsx:289-291 only renders location.pathname, so the step 7 requirement to assert { state: { carousel: true, navdirection: 'forward' } } cannot be implemented unless that helper is extended to expose location.state. the same pattern exists in the related page tests.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
},
{
"id": "DEBT-017",
"concern": "is there convincing verification for the change?: there is still no explicit mobile regression test in the plan, even though the revised implementation proposal removes the only current mobile nav/score surface. given the repository's actual component structure, a mobile-focused test or visual verification step is needed to prove controls remain accessible below md.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"mobile-ui": [
{
"id": "DEBT-020",
"concern": "mobile ui: removing entrypage's mobile sticky nav and relying on submissioncarouselcard.footercontent would break mobile navigation and scoring because that footer slot is hidden below the md breakpoint.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"search-for-related-code-that-handles-the-same-concept-is-the-reported-issue-a-symptom-of-something-broader": [
{
"id": "DEBT-013",
"concern": "search for related code that handles the same concept. is the reported issue a symptom of something broader?: the mobile problem is broader than entrypage. submissionscarouselpage already has a pre-existing mobile gap because its score panel is desktop-only and its footer actions are also hidden on mobile (src/pages/submissionscarouselpage.tsx:250-263,347-354 plus src/components/submissioncarouselcard.tsx:219). the revised plan says entrypage should 'match the carouselpage pattern', which would spread that existing gap into the one page that currently has working mobile controls.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"subagent-safeguards": [
{
"id": "DEBT-021",
"concern": "hermes reference safeguard numbers not validated against actual implementation",
"occurrence_count": 1,
"plan_ids": [
"refactor-megaplan-skill-so-20260406-1818"
]
},
{
"id": "DEBT-022",
"concern": "plan's retry caps (1 phase, 3 execute) may differ from hermes-agent's actual policy",
"occurrence_count": 1,
"plan_ids": [
"refactor-megaplan-skill-so-20260406-1818"
]
}
],
"worker-permissions": [
{
"id": "DEBT-001",
"concern": "codex --full-auto flag only triggers for step == 'execute', not 'loop_execute'",
"occurrence_count": 1,
"plan_ids": [
"build-megaloop-a-minimal-20260327-0250"
]
},
{
"id": "DEBT-002",
"concern": "claude --permission-mode bypasspermissions only triggers for step == 'execute', not 'loop_execute'",
"occurrence_count": 1,
"plan_ids": [
"build-megaloop-a-minimal-20260327-0250"
]
}
],
"workflow-state-machine": [
{
"id": "DEBT-006",
"concern": "_plan_prompt() does not read research.json, so replanning from state_researched would ignore research results.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
},
{
"id": "DEBT-007",
"concern": "same issue as correctness-2: state_researched \u2192 plan path is only partially wired.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
},
{
"id": "DEBT-008",
"concern": "_plan_prompt() is a missed location for the state_researched \u2192 plan change.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
}
]
}
code
Escalated debt subsystems:
[
{
"subsystem": "workflow-state-machine",
"total_occurrences": 3,
"plan_count": 1,
"entries": [
{
"id": "DEBT-006",
"concern": "_plan_prompt() does not read research.json, so replanning from state_researched would ignore research results.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
},
{
"id": "DEBT-007",
"concern": "same issue as correctness-2: state_researched \u2192 plan path is only partially wired.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
},
{
"id": "DEBT-008",
"concern": "_plan_prompt() is a missed location for the state_researched \u2192 plan change.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
}
]
}
]
code
Debt guidance:
- These are known accepted limitations. Do not re-flag them unless the current plan makes them worse, broadens them, or fails to contain them.
- Prefix every new concern with a subsystem tag followed by a colon, for example `Timeout recovery: retry backoff remains brittle`.
- When a concern is recurring debt that still needs to be flagged, prefix it with `Recurring debt:` after the subsystem tag, for example `Timeout recovery: Recurring debt: retry backoff remains brittle`.
Your output template is at: /Users/user_c042661f/Documents/megaplan/.megaplan/plans/update-all-documentation-20260406-1902/critique_output.json
Read this file first — it contains 4 checks, each with a question and guidance.
For each check, investigate the codebase, then add your findings to the findings array for that check.
Each finding needs:
"detail": what you specifically checked and what you found (at least a full sentence)
"flagged": true if this describes a difference, risk, or tension — even if you think it's justified. false only if purely informational with no possible downside.
When in doubt, flag it — the gate can accept tradeoffs, but it can't act on findings it never sees.
Good: {"detail": "Checked callers of nthroot_mod in solveset.py line 1205 — passes prime moduli only, consistent with the fix.", "flagged": false}
Good: {"detail": "The fix handles empty tuples but not single-element tuples which need a trailing comma.", "flagged": true}
Bad: {"detail": "No issue found", "flagged": false} ← too brief, will be rejected
Bad: {"detail": "The hints suggest approach X but the plan uses Y. However Y is consistent with X's intent.", "flagged": false} ← a different approach than the hints IS a flag. You found a divergence — flag it. The gate decides if it's acceptable.
After filling in checks, add any additional concerns to the flags array (e.g., security, performance, dependencies).
Use the standard format (id, concern, category, severity_hint, evidence). This array can be empty.
Workflow: read the file → investigate → read file again → add finding → write file back. Repeat for each check.
code
Additional guidelines:
- Robustness level: standard. Use balanced judgment. Flag significant risks, but do not spend flags on minor polish or executor-obvious boilerplate.
- Over-engineering: prefer the simplest approach that fully solves the problem.
- Reuse existing flag IDs when the same concern is still open.
- `verified_flag_ids`: list flag IDs from prior iterations that the revised plan actually resolves (e.g., if the plan was revised to fix FLAG-001, and you confirm the fix is correct, include "FLAG-001"). Only include flags you've verified — don't guess.
- Verify that the plan follows the expected structure when validator warnings or the outline suggest drift.
- Additional flags may use these categories: correctness, security, completeness, performance, maintainability, other.
- Focus on concrete issues, not structural formatting.
{"checks":[{"id":"issue_hints","question":"Did the work fully address the issue hints, user notes, and approved plan requirements?","findings":[{"detail":"Checked the packaging path in megaplan/cli.py:297-306,313-314,339 and the setup tests at tests/test_megaplan.py:1607-1661. The user asked for documentation and skill updates, but the plan treats .claude/skills/megaplan.md as the authoritative runtime file even though megaplan setup actually ships the Claude skill from megaplan/data/instructions.md plus megaplan/data/claude_subagent_appendix.md; the checked-in .claude/skills/megaplan.md is just a mirrored copy in this repo.","flagged":true},{"detail":"Compared the requested stage-by-stage coverage against the repo surfaces that actually tell workers what to do. The only per-stage worker-facing artifacts are the prompt builders under megaplan/prompts/*.py, and the plan explicitly leaves them unchanged, so the requirement to document what worker agents need to know at each stage is only partially addressed unless another concrete worker-facing location is added.","flagged":true},{"detail":"Checked how shared instructions are consumed by setup. bundled_agents_md() and bundled_global_file('skill.md') in megaplan/cli.py:297-306 both read megaplan/data/instructions.md, so Step 2 would change local AGENTS.md and non-Claude installs as well, not just the Claude orchestrator guidance the plan describes.","flagged":true}]},{"id":"correctness","question":"Are the proposed changes technically correct?","findings":[{"detail":"Validated the supposed source-of-truth files by tracing setup generation. bundled_global_file('claude_skill.md') concatenates megaplan/data/instructions.md with megaplan/data/claude_subagent_appendix.md, and _GLOBAL_TARGETS writes that to .claude/skills/megaplan/SKILL.md (megaplan/cli.py:301-306,313), so Step 4's focus on .claude/skills/megaplan.md is technically pointed at the wrong file and would not control installed output.","flagged":true},{"detail":"Grep'd the repository for BREAKPOINT:, GATE_ESCALATE, EXECUTE_APPROVAL, PHASE_ESCALATE, and EXECUTE_ESCALATE. Those strings only appear in documentation (megaplan/data/claude_subagent_appendix.md and the mirrored .claude/skills/megaplan.md), not in Python implementation, so the plan's must-criterion about matching breakpoint strings to source code is not currently satisfiable as written.","flagged":true},{"detail":"Ran python -m megaplan config set orchestration.mode subagent and python -m megaplan config show with a temporary XDG_CONFIG_HOME. The config key does exist and round-trips correctly, but the actual CLI output is nested JSON with \"orchestration\": {\"mode\": \"subagent\"} rather than a literal orchestration.mode: subagent line, so any docs that quote output should match that shape.","flagged":true}]},{"id":"scope","question":"Search for related code that handles the same concept. Is the reported issue a symptom of something broader?","findings":[{"detail":"Looked beyond the checked-in docs to the generated install outputs. Local setup writes AGENTS.md from megaplan/data/instructions.md (megaplan/cli.py:297,377-386), global Codex installs also use that file (megaplan/cli.py:301-306,314), and a quick setup run produced an AGENTS.md with no subagent section. The subagent-doc gap is therefore broader than README plus Claude skill docs; it also affects local project installs and non-Claude agent installs if Step 2 is changed.","flagged":true},{"detail":"Searched the implementation for any runtime subagent orchestration support beyond config storage. Outside handle_config, the repository does not contain a subagent launcher, breakpoint parser, or resume handler; the protocol currently lives only in docs. That means the broader issue is not just documentation drift between files, but also an implementation/documentation boundary the plan should acknowledge when it claims code-level validation.","flagged":true},{"detail":"Checked the prompt layer that actually defines stage behavior for workers. The prompt builders cover prep, plan, critique, gate, revise, finalize, execute, and review, but none mention inline versus subagent mode, so leaving prompts untouched keeps the worker-facing stage story implicit instead of documented at the point of use.","flagged":true}]},{"id":"verification","question":"Is there convincing verification for the change?","findings":[{"detail":"Manually verified that the config setting works by running the CLI with a temporary config directory: config set orchestration.mode subagent succeeded and config show returned \"orchestration\": {\"mode\": \"subagent\"}. The plan's Step 5 validation for the config key is grounded in the actual repository.","flagged":false},{"detail":"The proposed validation misses the generated-output path entirely. Because the shipped skills and local instructions are assembled through bundled_global_file() and megaplan setup, verification needs to inspect the generated Claude skill, Codex skill, and local AGENTS.md, not just the source markdown files and grep results.","flagged":true},{"detail":"There is already automated coverage around these surfaces in tests/test_megaplan.py:1607-1661 and tests/test_megaplan.py:2154-2182, including assertions that Claude setup includes ## Subagent Mode, Codex setup does not, and config show exposes the orchestration block. The plan does not call for running or updating those tests, so its verification strategy is weaker than the repository's existing guardrails.","flagged":true}]}],"flags":[{"id":"FLAG-001","concern":"Documentation packaging: The plan targets .claude/skills/megaplan.md as the authoritative skill, but setup ships generated skills from megaplan/data/instructions.md and megaplan/data/claude_subagent_appendix.md.","category":"correctness","severity_hint":"likely-significant","evidence":"megaplan/cli.py:301-306,313-314,339 builds install artifacts from the data files, and tests/test_megaplan.py:1607-1661 verifies the generated setup output rather than the checked-in mirror file."},{"id":"FLAG-002","concern":"Subagent protocol: The plan's breakpoint-string validation assumes runtime source-of-truth in Python, but the repository currently defines the breakpoint and resume protocol only in documentation.","category":"completeness","severity_hint":"likely-significant","evidence":"Repository-wide search finds BREAKPOINT: and the four breakpoint type strings only in megaplan/data/claude_subagent_appendix.md and the mirrored .claude/skills/megaplan.md, not in executable code."},{"id":"FLAG-003","concern":"Install paths: Updating megaplan/data/instructions.md changes local AGENTS.md and non-Claude installs too, so the plan needs an explicit decision and verification for those consumers.","category":"completeness","severity_hint":"uncertain","evidence":"bundled_agents_md() and bundled_global_file('skill.md') in megaplan/cli.py:297-306 read instructions.md; a local megaplan setup --target-dir ... run generated AGENTS.md from that shared file."}],"verified_flag_ids":[],"disputed_flag_ids":[]}
You are an independent reviewer. Critique the plan against the actual repository.
Update all documentation, agent instructions, README, skill files, and prompts to cover the new subagent orchestration mode. For each stage of the megaplan workflow (init, plan, critique, gate, revise, finalize, execute, review), document what humans need to know, what the orchestrating agent needs to know, and what the worker agents need to know when subagent mode is active vs inline mode. Cover: how to activate/deactivate, breakpoint types and what triggers them, how resume works, safeguard behavior, and the config setting.
Megaplan has two orchestration modes — inline (default) and subagent — but documentation coverage is uneven. The critique revealed a critical file-targeting error in v1: the plan treated .claude/skills/megaplan.md as the authoritative source, but it is a derived mirror. The actual packaging pipeline is:
instructions.md feeds ALL consumers. Adding Claude-specific subagent content there would bleed into Codex, Cursor, and local AGENTS.md installs.
claude_subagent_appendix.md is the correct place for all Claude-specific subagent content. It is already appended only to the Claude skill output.
.claude/skills/megaplan.md (checked into this repo) is a convenience mirror. It must be regenerated after editing the source files.
Key constraint from implementation:
The subagent protocol (breakpoints, resume, safeguards) is a documentation-level contract — there is no Python runtime implementation. Breakpoint type strings exist only in docs. Validation means doc-to-doc consistency, not doc-to-code matching.
Worker agents are mode-agnostic (settled decision SD-001). Workers receive identical prompts from megaplan/prompts/*.py regardless of orchestration mode. The per-stage documentation requirement is satisfied by explicitly stating this fact, not by adding mode-awareness to worker prompts.
Main Phase
Step 1: Update README.md with subagent mode section (README.md)
Scope: Small
Add a new section after "Running manually" (after line 56) titled "Subagent mode (Claude Code)" covering:
One-sentence summary: subagent mode delegates the full workflow to an autonomous Claude Code agent, returning only at breakpoints.
Activate: megaplan config set orchestration.mode subagent
Deactivate: megaplan config set orchestration.mode inline (or omit — inline is default)
Note: Claude Code-specific. Other agents (Codex, Cursor) always use inline mode.
Keep to ~8 lines. README is a quick-start doc. No breakpoint details, no agent prompt template.
Step 2: Add agent-agnostic orchestration note to instructions.md (megaplan/data/instructions.md)
Scope: Small
Add a brief section after "Sessions And Autonomy" (after line 91) titled "Orchestration Mode" — 4-5 lines max:
Inline mode (default): phases run in the main conversation thread.
Subagent mode (Claude-specific): phases run in a background agent; see Claude-specific appendix for details.
Config: megaplan config set orchestration.mode subagent
This section deliberately avoids breakpoint/resume/safeguard details since those are Claude-specific and belong in the appendix.
Do not add breakpoint types, resume protocol, safeguards, or the agent prompt template here — that content would bleed into Codex/Cursor/AGENTS.md consumers via bundled_agents_md() and bundled_global_file("skill.md").
Verify the section is safe for all consumers by reviewing bundled_agents_md() at megaplan/cli.py:297-298 and bundled_global_file("skill.md") at megaplan/cli.py:303-304.
Step 3: Update claude_subagent_appendix.md — the authoritative subagent spec (megaplan/data/claude_subagent_appendix.md)
Scope: Medium
Add a header comment (line 1) noting this file is the source-of-truth for all Claude-specific subagent orchestration content, appended only to the Claude skill via bundled_global_file("claude_skill.md").
Review and update for completeness against the task requirements:
Activation/deactivation: already covered (lines 4-8). Fix config output format — megaplan config show returns nested JSON ("orchestration": {"mode": "subagent"}), not a flat orchestration.mode: subagent line. Update the reference at line 5 to show the actual JSON shape.
Breakpoint types and triggers: already covered (lines 81-92). Verify all four types are documented with trigger conditions.
Resume protocol: already covered (lines 94-99). No changes needed.
Safeguards: already covered (lines 73-79). No changes needed.
Per-stage behavior for the orchestrating agent: already covered in "Phase rules" (lines 37-44) and "Execution rules" (lines 46-52). No changes needed.
Add a brief "Worker agents" note (2-3 lines) stating that worker agents are mode-agnostic — they receive identical prompts from the megaplan CLI regardless of orchestration mode. This addresses the per-stage worker documentation requirement without adding content to the prompt builders.
Ensure the four breakpoint type strings are exactly: GATE_ESCALATE, EXECUTE_APPROVAL, PHASE_ESCALATE, EXECUTE_ESCALATE — consistent with the agent prompt template in the same file.
Step 4: Regenerate the mirror skill file (.claude/skills/megaplan.md)
Scope: Small
Regenerate.claude/skills/megaplan.md by running megaplan setup against this repo's home directory, or by manually concatenating _SKILL_HEADER + instructions.md + "\n" + claude_subagent_appendix.md to match the logic in megaplan/cli.py:306.
Alternatively, if the repo uses .claude/skills/megaplan.md as a checked-in development convenience, regenerate it with: python -c "from megaplan.cli import bundled_global_file; print(bundled_global_file('claude_skill.md'))" and write the output.
Diff the regenerated file against the current checked-in version to confirm changes are exactly what Steps 2-3 introduced. No unintended drift.
Step 5: Validate consistency and test (tests/test_megaplan.py)
Scope: Small
Grep for breakpoint type strings across all documentation files to confirm consistency:
GATE_ESCALATE, EXECUTE_APPROVAL, PHASE_ESCALATE, EXECUTE_ESCALATE should appear in claude_subagent_appendix.md and the regenerated .claude/skills/megaplan.md — and nowhere else.
They should NOT appear in instructions.md or README.md.
Runpython -m pytest tests/test_megaplan.py -x to verify setup tests still pass — especially tests/test_megaplan.py:1607-1661 which validates generated setup output.
Runmegaplan config set orchestration.mode subagent && megaplan config show to confirm the config key round-trips and the JSON output matches what the docs now say.
Read each updated file end-to-end to check for contradictions between instructions.md, claude_subagent_appendix.md, README.md, and the regenerated mirror.
Execution Order
Steps 1-3 can run in parallel (independent source files).
Step 4 must run after Steps 2-3 (regeneration depends on source edits).
Step 5 runs last (validation).
Validation Order
Run setup tests to catch packaging regressions.
Grep for breakpoint string consistency across all docs.
End-to-end read of all four files for contradictions.
code
Plan metadata:
{
"version": 2,
"timestamp": "2026-04-06T17:13:17Z",
"hash": "sha256:fdecd874bf0244801b5195d5f81d346a58b03fb15039eb11f1c6cb191fba85cf",
"changes_summary": "Revised plan to fix the fundamental file-targeting error. Key changes:\n\n1. Corrected source-of-truth: Plan now targets megaplan/data/instructions.md and megaplan/data/claude_subagent_appendix.md as the source files, and treats .claude/skills/megaplan.md as a derived mirror that must be regenerated (not edited directly).\n\n2. Scoped subagent content correctly: Claude-specific content (breakpoints, resume, safeguards, agent prompt template) stays exclusively in claude_subagent_appendix.md. instructions.md gets only a 4-5 line agent-agnostic orchestration note, avoiding bleed into Codex/Cursor/AGENTS.md consumers.\n\n3. Fixed breakpoint validation criterion: Changed from "match Python source code" to "consistent across all documentation files" \u2014 the protocol is doc-only by design, no Python implementation exists.\n\n4. Added mirror regeneration step: New Step 4 explicitly regenerates .claude/skills/megaplan.md from the source files and diffs against the old version.\n\n5. Fixed config output format: Docs will show the actual nested JSON output from megaplan config show, not a flat key=value format.\n\n6. Addressed worker documentation: Added explicit "workers are mode-agnostic" note to the appendix, satisfying the per-stage requirement without modifying prompt builders.\n\n7. Added setup test verification: Step 5 now runs tests/test_megaplan.py:1607-1661 to catch packaging regressions.",
"flags_addressed": [
"FLAG-001",
"FLAG-002",
"FLAG-003",
"issue_hints-1",
"issue_hints-2",
"issue_hints-3",
"correctness-1",
"correctness-2",
"correctness-3",
"scope-1",
"scope-2",
"scope-3"
],
"questions": [
"The checked-in .claude/skills/megaplan.md appears to be a manually maintained mirror. Should regeneration be automated (e.g., a pre-commit hook or CI check), or is manual regeneration after editing sources acceptable?"
],
"success_criteria": [
{
"criterion": "README.md mentions subagent mode with activation/deactivation instructions",
"priority": "must"
},
{
"criterion": "instructions.md has a brief orchestration-mode section that is safe for all consumers (no Claude-specific breakpoint/resume/safeguard content)",
"priority": "must"
},
{
"criterion": "claude_subagent_appendix.md covers all four breakpoint types with triggers, resume protocol, safeguards, and config setting",
"priority": "must"
},
{
"criterion": "claude_subagent_appendix.md and the regenerated .claude/skills/megaplan.md are consistent \u2014 no contradictory claims",
"priority": "must"
},
{
"criterion": "All four breakpoint type strings (GATE_ESCALATE, EXECUTE_APPROVAL, PHASE_ESCALATE, EXECUTE_ESCALATE) are consistent across all documentation files that reference them",
"priority": "must"
},
{
"criterion": "Config output format in docs matches actual megaplan config show JSON output",
"priority": "must"
},
{
"criterion": "Setup tests pass (tests/test_megaplan.py including lines 1607-1661)",
"priority": "must"
},
{
"criterion": "Each doc file stays under ~300 lines to avoid context bloat",
"priority": "should"
},
{
"criterion": "Worker prompt builders remain unchanged (mode-agnostic)",
"priority": "should"
},
{
"criterion": "No duplicate full-spec blocks across files \u2014 subagent details live only in the appendix",
"priority": "should"
},
{
"criterion": "Documentation explicitly states workers are mode-agnostic, addressing the per-stage worker question",
"priority": "should"
}
],
"assumptions": [
"Worker prompt builders (megaplan/prompts/*.py) do not need changes \u2014 workers are orchestration-mode-agnostic (settled decision SD-001).",
"megaplan/data/instructions.md + megaplan/data/claude_subagent_appendix.md are the source-of-truth; .claude/skills/megaplan.md is a derived mirror (settled decision SD-002).",
"Breakpoint type strings are a documentation-level protocol, not a code-level contract (settled decision SD-003).",
"The README should stay concise \u2014 a short section pointing users to the skill file for full subagent details.",
"No code changes are needed \u2014 this is a documentation-only task.",
"The 4-5 line orchestration note in instructions.md is safe for all consumers (Codex, Cursor, AGENTS.md) because it contains no Claude-specific content."
],
"delta_from_previous_percent": 88.19,
"structure_warnings": []
}
code
Plan structure warnings from validator:
[]
Existing flags:
[
{
"id": "FLAG-001",
"concern": "Documentation packaging: The plan targets .claude/skills/megaplan.md as the authoritative skill, but setup ships generated skills from megaplan/data/instructions.md and megaplan/data/claude_subagent_appendix.md.",
"status": "addressed",
"severity": "significant"
},
{
"id": "FLAG-002",
"concern": "Subagent protocol: The plan's breakpoint-string validation assumes runtime source-of-truth in Python, but the repository currently defines the breakpoint and resume protocol only in documentation.",
"status": "addressed",
"severity": "significant"
},
{
"id": "FLAG-003",
"concern": "Install paths: Updating megaplan/data/instructions.md changes local AGENTS.md and non-Claude installs too, so the plan needs an explicit decision and verification for those consumers.",
"status": "addressed",
"severity": "significant"
},
{
"id": "issue_hints-1",
"concern": "Did the work fully address the issue hints, user notes, and approved plan requirements?: Checked the packaging path in megaplan/cli.py:297-306,313-314,339 and the setup tests at tests/test_megaplan.py:1607-1661. The user asked for documentation and skill updates, but the plan treats .claude/skills/megaplan.md as the authoritative runtime file even though megaplan setup actually ships the Claude skill from megaplan/data/instructions.md plus megaplan/data/claude_subagent_appendix.md; the checked-in .claude/skills/megaplan.md is just a mirrored copy in this repo.",
"status": "addressed",
"severity": "significant"
},
{
"id": "issue_hints-2",
"concern": "Did the work fully address the issue hints, user notes, and approved plan requirements?: Compared the requested stage-by-stage coverage against the repo surfaces that actually tell workers what to do. The only per-stage worker-facing artifacts are the prompt builders under megaplan/prompts/*.py, and the plan explicitly leaves them unchanged, so the requirement to document what worker agents need to know at each stage is only partially addressed unless another concrete worker-facing location is added.",
"status": "addressed",
"severity": "significant"
},
{
"id": "issue_hints-3",
"concern": "Did the work fully address the issue hints, user notes, and approved plan requirements?: Checked how shared instructions are consumed by setup. bundled_agents_md() and bundled_global_file('skill.md') in megaplan/cli.py:297-306 both read megaplan/data/instructions.md, so Step 2 would change local AGENTS.md and non-Claude installs as well, not just the Claude orchestrator guidance the plan describes.",
"status": "addressed",
"severity": "significant"
},
{
"id": "correctness-1",
"concern": "Are the proposed changes technically correct?: Validated the supposed source-of-truth files by tracing setup generation. concatenates with , and writes that to (), so Step 4's focus on is technically pointed at the wrong file and would not control installed output.",
"status": "addressed",
"severity": "significant"
},
{
"id": "correctness-2",
"concern": "Are the proposed changes technically correct?: Grep'd the repository for , , , , and . Those strings only appear in documentation ( and the mirrored ), not in Python implementation, so the plan's must-criterion about matching breakpoint strings to source code is not currently satisfiable as written.",
"status": "addressed",
"severity": "significant"
},
{
"id": "correctness-3",
"concern": "Are the proposed changes technically correct?: Ran and with a temporary . The config key does exist and round-trips correctly, but the actual CLI output is nested JSON with rather than a literal line, so any docs that quote output should match that shape.",
"status": "addressed",
"severity": "significant"
},
{
"id": "scope-1",
"concern": "Search for related code that handles the same concept. Is the reported issue a symptom of something broader?: Looked beyond the checked-in docs to the generated install outputs. Local setup writes from (), global Codex installs also use that file (), and a quick setup run produced an with no subagent section. The subagent-doc gap is therefore broader than README plus Claude skill docs; it also affects local project installs and non-Claude agent installs if Step 2 is changed.",
"status": "addressed",
"severity": "significant"
},
{
"id": "scope-2",
"concern": "Search for related code that handles the same concept. Is the reported issue a symptom of something broader?: Searched the implementation for any runtime subagent orchestration support beyond config storage. Outside , the repository does not contain a subagent launcher, breakpoint parser, or resume handler; the protocol currently lives only in docs. That means the broader issue is not just documentation drift between files, but also an implementation/documentation boundary the plan should acknowledge when it claims code-level validation.",
"status": "addressed",
"severity": "significant"
},
{
"id": "scope-3",
"concern": "Search for related code that handles the same concept. Is the reported issue a symptom of something broader?: Checked the prompt layer that actually defines stage behavior for workers. The prompt builders cover , , , , , , , and , but none mention inline versus subagent mode, so leaving prompts untouched keeps the worker-facing stage story implicit instead of documented at the point of use.",
"status": "addressed",
"severity": "significant"
},
{
"id": "verification-1",
"concern": "Is there convincing verification for the change?: The proposed validation misses the generated-output path entirely. Because the shipped skills and local instructions are assembled through and , verification needs to inspect the generated Claude skill, Codex skill, and local , not just the source markdown files and grep results.",
"status": "open",
"severity": "minor"
},
{
"id": "verification-2",
"concern": "Is there convincing verification for the change?: There is already automated coverage around these surfaces in and , including assertions that Claude setup includes , Codex setup does not, and exposes the orchestration block. The plan does not call for running or updating those tests, so its verification strategy is weaker than the repository's existing guardrails.",
"status": "open",
"severity": "minor"
}
]
code
Known accepted debt grouped by subsystem:
{
"are-the-proposed-changes-technically-correct": [
{
"id": "DEBT-009",
"concern": "are the proposed changes technically correct?: the mobile action-surface plan is technically incorrect for the current component structure. submissioncarouselcard hides footercontent below the md breakpoint (src/components/submissioncarouselcard.tsx:219), while submissionscarouselpage also hides the score panel on mobile via asidecontent={<div classname=\"hidden md:block\">... and passes hideactions to scorepanel at src/pages/submissionscarouselpage.tsx:250-263,347. reusing that pattern for entrypage would leave mobile users with no navigation controls and no scoring controls.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
},
{
"id": "DEBT-010",
"concern": "are the proposed changes technically correct?: i checked the sign-in callback path again. submissionslayout already wires usescoring(..., { onrequiresignin: () => pagemachine.dispatch({ type: 'open_sign_in_modal' }) }) at src/pages/submissionslayout.tsx:38-40, and scorepanel still has its own onrequiresignin prop. the revised step 4.2 is acceptable only if it explicitly rewires that prop to pagemachine.dispatch; otherwise removing local modal state would orphan the direct ui callback. the plan hints at this, but it remains easy to misread because the scoring-context callback and the scorepanel prop are separate mechanisms.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"are-the-success-criteria-well-prioritized-and-verifiable": [
{
"id": "DEBT-019",
"concern": "are the success criteria well-prioritized and verifiable?: mobile behavior is still under-prioritized relative to the actual risk in this repo. the user constraint specifically mentions the mobile bottom nav, but the only mobile-specific success criterion left is 'mobile scoring ux is coherent' at info level. given that the plan currently removes the working mobile nav, there should be at least a should or must criterion stating that mobile users retain navigation and scoring controls.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"did-the-work-fully-address-the-issue-hints-user-notes-and-approved-plan-requirements": [
{
"id": "DEBT-011",
"concern": "did the work fully address the issue hints, user notes, and approved plan requirements?: a new critical issue is introduced on mobile. step 4.9 says to remove entrypage's mobile sticky bottom nav and 'use the same footercontent slot in submissioncarouselcard', but src/components/submissioncarouselcard.tsx:217-221 renders footercontent inside . in the current repo, the mobile sticky nav at is the only mobile surface for back/next and the score toggle, so the revised plan would remove working mobile controls and replace them with a slot that is explicitly hidden on phones.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
},
{
"id": "DEBT-012",
"concern": "did the work fully address the issue hints, user notes, and approved plan requirements?: the plan still contradicts itself on mobile behavior. assumption #3 says the browse-mode mobile score toggle will be preserved, but step 4.9 removes the entire mobile sticky nav that contains that toggle in . the implementer cannot satisfy both instructions as written.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"does-the-change-touch-all-locations-and-supporting-infrastructure": [
{
"id": "DEBT-018",
"concern": "does the change touch all locations and supporting infrastructure?: if the implementation really wants to carry mobile actions, the plan must also include a supporting change in or render a separate mobile control surface outside the card. right now step 4.9 removes the mobile nav but does not list as a place that must change, so the required glue for mobile controls is missing.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"execute-phase-contract": [
{
"id": "DEBT-003",
"concern": "early-killed baselines pass truncated output to the execute worker, which may produce lower-quality diagnosis than full output.",
"occurrence_count": 1,
"plan_ids": [
"design-and-implement-a-20260327-0512"
]
}
],
"find-the-callers-of-the-changed-function-what-arguments-do-they-actually-pass-does-the-fix-handle-all-of-them": [
{
"id": "DEBT-014",
"concern": "find the callers of the changed function. what arguments do they actually pass? does the fix handle all of them?: i checked the skip caller path against the real hook behavior and looks redundant. optimistically adds the id to in , and already reactively filters skipped entries from in . calling immediately afterward is safe, but it duplicates an existing state transition and should be justified as an explicit ux optimization rather than required logic.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
},
{
"id": "DEBT-015",
"concern": "find the callers of the changed function. what arguments do they actually pass? does the fix handle all of them?: the direct ui sign-in caller is still important here. invokes its own prop when an unauthenticated user interacts with the score ui (), which is independent of the scoring hook's internal path. the plan should be read as requiring that caller to dispatch ; otherwise one caller remains broken even if is correctly wired.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"handler-boilerplate": [
{
"id": "DEBT-004",
"concern": "_run_worker() pseudocode hardcodes iteration=state['iteration'] but handle_plan and handle_revise use different failure iteration values.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
},
{
"id": "DEBT-005",
"concern": "same issue as correctness-1: failure iteration would be wrong for plan/revise handlers.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
}
],
"install-paths": [
{
"id": "DEBT-023",
"concern": "local setup path doesn't expose subagent mode",
"occurrence_count": 1,
"plan_ids": [
"refactor-megaplan-skill-so-20260406-1818"
]
}
],
"is-there-convincing-verification-for-the-change": [
{
"id": "DEBT-016",
"concern": "is there convincing verification for the change?: the test-plan details still miss a small but real infrastructure update: the current helper in only renders , so the step 7 requirement to assert cannot be implemented unless that helper is extended to expose . the same pattern exists in the related page tests.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
},
{
"id": "DEBT-017",
"concern": "is there convincing verification for the change?: there is still no explicit mobile regression test in the plan, even though the revised implementation proposal removes the only current mobile nav/score surface. given the repository's actual component structure, a mobile-focused test or visual verification step is needed to prove controls remain accessible below .",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"mobile-ui": [
{
"id": "DEBT-020",
"concern": "mobile ui: removing entrypage's mobile sticky nav and relying on would break mobile navigation and scoring because that footer slot is hidden below the breakpoint.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"search-for-related-code-that-handles-the-same-concept-is-the-reported-issue-a-symptom-of-something-broader": [
{
"id": "DEBT-013",
"concern": "search for related code that handles the same concept. is the reported issue a symptom of something broader?: the mobile problem is broader than entrypage. already has a pre-existing mobile gap because its score panel is desktop-only and its footer actions are also hidden on mobile ( plus ). the revised plan says entrypage should 'match the carouselpage pattern', which would spread that existing gap into the one page that currently has working mobile controls.",
"occurrence_count": 1,
"plan_ids": [
"move-the-entry-page-into-20260401-0450"
]
}
],
"subagent-safeguards": [
{
"id": "DEBT-021",
"concern": "hermes reference safeguard numbers not validated against actual implementation",
"occurrence_count": 1,
"plan_ids": [
"refactor-megaplan-skill-so-20260406-1818"
]
},
{
"id": "DEBT-022",
"concern": "plan's retry caps (1 phase, 3 execute) may differ from hermes-agent's actual policy",
"occurrence_count": 1,
"plan_ids": [
"refactor-megaplan-skill-so-20260406-1818"
]
}
],
"worker-permissions": [
{
"id": "DEBT-001",
"concern": "codex --full-auto flag only triggers for step == 'execute', not 'loop_execute'",
"occurrence_count": 1,
"plan_ids": [
"build-megaloop-a-minimal-20260327-0250"
]
},
{
"id": "DEBT-002",
"concern": "claude --permission-mode bypasspermissions only triggers for step == 'execute', not 'loop_execute'",
"occurrence_count": 1,
"plan_ids": [
"build-megaloop-a-minimal-20260327-0250"
]
}
],
"workflow-state-machine": [
{
"id": "DEBT-006",
"concern": "_plan_prompt() does not read research.json, so replanning from state_researched would ignore research results.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
},
{
"id": "DEBT-007",
"concern": "same issue as correctness-2: state_researched \u2192 plan path is only partially wired.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
},
{
"id": "DEBT-008",
"concern": "_plan_prompt() is a missed location for the state_researched \u2192 plan change.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
}
]
}
code
Escalated debt subsystems:
[
{
"subsystem": "workflow-state-machine",
"total_occurrences": 3,
"plan_count": 1,
"entries": [
{
"id": "DEBT-006",
"concern": "_plan_prompt() does not read research.json, so replanning from state_researched would ignore research results.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
},
{
"id": "DEBT-007",
"concern": "same issue as correctness-2: state_researched \u2192 plan path is only partially wired.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
},
{
"id": "DEBT-008",
"concern": "_plan_prompt() is a missed location for the state_researched \u2192 plan change.",
"occurrence_count": 1,
"plan_ids": [
"clean-up-and-properly-20260331-0149"
]
}
]
}
]
code
Debt guidance:
- These are known accepted limitations. Do not re-flag them unless the current plan makes them worse, broadens them, or fails to contain them.
- Prefix every new concern with a subsystem tag followed by a colon, for example `Timeout recovery: retry backoff remains brittle`.
- When a concern is recurring debt that still needs to be flagged, prefix it with `Recurring debt:` after the subsystem tag, for example `Timeout recovery: Recurring debt: retry backoff remains brittle`.
Your output template is at: /Users/user_c042661f/Documents/megaplan/.megaplan/plans/update-all-documentation-20260406-1902/critique_output.json
Read this file first — it contains 4 checks, each with a question and guidance.
For each check, investigate the codebase, then add your findings to the findings array for that check.
Each finding needs:
"detail": what you specifically checked and what you found (at least a full sentence)
"flagged": true if this describes a difference, risk, or tension — even if you think it's justified. false only if purely informational with no possible downside.
When in doubt, flag it — the gate can accept tradeoffs, but it can't act on findings it never sees.
Good: {"detail": "Checked callers of nthroot_mod in solveset.py line 1205 — passes prime moduli only, consistent with the fix.", "flagged": false}
Good: {"detail": "The fix handles empty tuples but not single-element tuples which need a trailing comma.", "flagged": true}
Bad: {"detail": "No issue found", "flagged": false} ← too brief, will be rejected
Bad: {"detail": "The hints suggest approach X but the plan uses Y. However Y is consistent with X's intent.", "flagged": false} ← a different approach than the hints IS a flag. You found a divergence — flag it. The gate decides if it's acceptable.
After filling in checks, add any additional concerns to the flags array (e.g., security, performance, dependencies).
Use the standard format (id, concern, category, severity_hint, evidence). This array can be empty.
Workflow: read the file → investigate → read file again → add finding → write file back. Repeat for each check.
This is critique iteration 2. The template file includes prior findings with their status. Verify addressed flags were actually fixed, re-flag if inadequate, and check for new issues introduced by the revision.
code
Additional guidelines:
- Robustness level: standard. Use balanced judgment. Flag significant risks, but do not spend flags on minor polish or executor-obvious boilerplate.
- Over-engineering: prefer the simplest approach that fully solves the problem.
- Reuse existing flag IDs when the same concern is still open.
- `verified_flag_ids`: list flag IDs from prior iterations that the revised plan actually resolves (e.g., if the plan was revised to fix FLAG-001, and you confirm the fix is correct, include "FLAG-001"). Only include flags you've verified — don't guess.
- Verify that the plan follows the expected structure when validator warnings or the outline suggest drift.
- Additional flags may use these categories: correctness, security, completeness, performance, maintainability, other.
- Focus on concrete issues, not structural formatting.
Not yet included in a published release.
bundled_global_file('claude_skill.md')
megaplan/data/instructions.md
megaplan/data/claude_subagent_appendix.md
_GLOBAL_TARGETS
.claude/skills/megaplan/SKILL.md
megaplan/cli.py:301-306,313
.claude/skills/megaplan.md
BREAKPOINT:
GATE_ESCALATE
EXECUTE_APPROVAL
PHASE_ESCALATE
EXECUTE_ESCALATE
megaplan/data/claude_subagent_appendix.md
.claude/skills/megaplan.md
python -m megaplan config set orchestration.mode subagent