You are already running inside the megaplan harness for this step. Do the requested planning/review/execution work directly. Do NOT invoke the megaplan CLI, do NOT read or activate the megaplan skill, do NOT start nested megaplan plans, and do NOT recurse into another planning harness. Treat mentions of megaplan in the repository or environment as implementation context only.
You are an independent reviewer. Critique the plan against the actual repository.
Add a model-profile system to megaplan so users can define named presets like "standard" (current defaults) or "all-open" (all hermes + open-source OpenRouter models) and select them at run time via --profile <name>, instead of repeating long strings of --phase-model <step>=<agent>:<model> flags on every invocation.
Core idea: a profile is a named map from phase → agent:model that expands into the same --phase-model list the CLI already accepts. The hard work — per-phase agent/model resolution — already exists at megaplan/workers.py:1627-1629. Profiles are a preset loader in front of that site, not a new resolution path.
Precedence (high → low): ad-hoc --phase-model <step>=X > --profile <name> > --hermes <default-model> > agent default. Any phase a profile omits falls through to the default agent. A user can pick a profile and still override one phase ad-hoc.
Config format — TOML, two layers:
User-level at ~/.config/megaplan/profiles.toml (or ~/.megaplan/profiles.toml) for personal presets.
Project-level at .megaplan/profiles.toml (inside the project dir), which overrides/extends user.
Built-in profiles ship inside the package (megaplan/profiles/standard.toml, megaplan/profiles/all-open.toml) as the lowest-priority layer users can inherit or override.
Phase keys include the standard phases (plan, critique, revise, gate, finalize, execute, review) AND the tiebreaker sub-phases (tiebreaker_orchestrator, tiebreaker_challenger, tiebreaker_researcher, tiebreaker_synthesis).
CLI surface:
--profile <name> on every parser that already takes --phase-model: init, step, loop-init, loop-run, chain, tiebreaker. Single flag, not repeatable.
megaplan config profiles list — enumerate profiles across all three layers with source labels.
megaplan config profiles show <name> — print the fully-resolved profile.
Invalid profile name → hard CliError listing known profiles.
Validate phase keys at load time; reject unknown keys with a clear error.
Implementation sites:
New module: megaplan/profiles.py holding loader, validator, resolver with layered merge (built-in → user → project).
megaplan/cli.py: add --profile arg on the 5–6 parsers that carry --phase-model. Add config profiles subcommands.
megaplan/workers.py:1627-1629: expand resolved profile into phase_models list BEFORE the existing ad-hoc overrides, so ad-hoc wins.
megaplan/state.py / config snapshot: persist the resolved profile name into state["config"]["profile"] for audit/reproducibility.
Two shipped profiles: megaplan/profiles/standard.toml (reflect current defaults explicitly) and megaplan/profiles/all-open.toml (all hermes + open-source OpenRouter picks).
Harness tuning (robustness, max concurrency, timeouts) via profiles. If that's wanted later, do it as a separate profile kind ([harness-profiles.aggressive]) rather than conflating with models — they're independent axes users tune separately.
Per-model API key config (already handled by key_pool).
Cost estimation / budget gating per profile.
GUI / profile editor.
Dependency note — execute must wait: this plan's execute phase modifies megaplan/workers.py, which is also the target of the concurrent hermes vendor plan (vendor-hermes-agent-into-the-20260422-0112) currently running. Finalize this plan now; do NOT execute until the hermes plan commits. On re-run, verify whether the vendor plan's splitting of availability-check vs shim-trigger has shifted the phase_models resolution site (currently workers.py:1627-1629); line refs may need updating.
Success criteria:
megaplan init --profile all-open "test idea" expands into the same behavior as passing every equivalent --phase-model flag.
megaplan init --profile all-open --phase-model execute=claude "test" — ad-hoc override beats profile on that single phase.
megaplan config profiles list shows built-in + user + project profiles with source labels.
Unknown profile → CliError listing known profiles.
state.json records the resolved profile name in config.profile.
Existing behavior unchanged when --profile is not passed.
Scope is small by design — ~200 LOC of new code + two profile files + tests. Do not expand scope during revise unless critique identifies a real correctness issue.
code
Plan:
# Implementation Plan: Model Profile System
Overview
Add --profile <name> to every CLI entry point that already accepts --phase-model. A profile is a named TOML map from phase → agent:model spec that expands into the same phase_model list the CLI already consumes. The existing per-phase resolution logic at megaplan/workers.py:1615-1651 does not change; profiles are a preset loader that feeds data into that path with the correct precedence: ad-hoc --phase-model > --profile > --hermes > agent default.
Three config layers are merged in order: built-ins shipped in megaplan/profiles/*.toml (lowest) → user ~/.config/megaplan/profiles.toml → project .megaplan/profiles.toml (highest). A later layer replaces the full profile with the same name (no per-field merging — keep it simple; every layer writes a complete profile).
Python is already 3.11+ (pyproject.toml:9), so stdlib tomllib covers reads. No TOML writer needed — config profiles is read-only (list + show); users edit the TOML by hand. No new dependencies.
Repo shape to respect:
CLI parsers duplicate the --hermes / --phase-model block by hand at six call sites (see Step 4). Match existing style — do not refactor to a shared helper unless trivial.
DEFAULT_AGENT_ROUTING at megaplan/types.py:305-318 is the canonical phase-key list. The brief mentions tiebreaker_orchestrator and tiebreaker_synthesis; neither exists as routing keys today (see Question 1). Validate against whatever set we settle on.
JSON is the existing config format (megaplan/_core/io.py:229). Profiles use TOML per brief; keep them in a separate file so the main config path is unaffected.
Dependency gate: the concurrent hermes vendor plan modifies megaplan/workers.py. Before executing this plan, re-verify that the resolution site is still at workers.py:1627-1629 (or find its new location via grep -n "phase_model" megaplan/workers.py). Do not merge ahead of the vendor plan.
Scope: one new module (~120 LOC), two profile TOMLs, ~6 call-site edits adding one argparse line each, one state-snapshot line, one config profiles handler branch (~40 LOC), and targeted tests. Target total: ~200 LOC + profiles + tests.
Main Phase
Step 1: Pin the resolution site and re-verify line refs (megaplan/workers.py)
Scope: Small
Confirmresolve_agent_mode still starts at megaplan/workers.py:1615 and that the phase_model loop that reads args.phase_model is at lines 1627-1634. If the hermes vendor plan has shifted these lines, update the plan’s line refs before proceeding.
Note the semantics: the loop uses for ... else — the first phase_model entry matching step wins, otherwise it falls through to --hermes/--agent/config. This means we can expand the profile into the end of the phase_model list (ad-hoc entries from the user are prepended and therefore win on first match).
Step 2: Write the profile loader (megaplan/profiles.py — NEW)
Scope: Medium
Createmegaplan/profiles.py exporting:
VALID_PHASE_KEYS: frozenset[str] — derived from megaplan.types.DEFAULT_AGENT_ROUTING.keys(). Include any tiebreaker sub-phases resolved in Question 1.
load_profiles(home: Path | None = None, project_dir: Path | None = None) -> dict[str, dict[str, str]] — merges built-in + user + project layers and returns {profile_name: {phase: "agent:model"}}. Later layers replace earlier ones by name.
load_profile_sources(...) -> dict[str, list[tuple[str, dict]]] — same as above but keeps per-layer entries for the config profiles list source-labels output.
resolve_profile(name: str, profiles: dict) -> dict[str, str] — returns the phase map for name, raises CliError("unknown_profile", f"Unknown profile '{name}'. Known: {sorted(profiles)}") on miss.
profile_to_phase_models(profile: dict[str, str]) -> list[str] — returns [f"{phase}={spec}" for phase, spec in profile.items()].
Load built-ins via importlib.resources.files("megaplan.profiles") (package-data read). Use stdlib tomllib (read-binary). Never crash on a missing user or project file — treat as empty.
Validate on load: every key under [profiles.<name>] must be in VALID_PHASE_KEYS; every value must be parseable by parse_agent_spec (i.e. non-empty, agent in KNOWN_AGENTS). Raise CliError("invalid_profile", ...) with the offending file path and key on failure.
Layer paths:
Built-in: package data megaplan/profiles/*.toml.
User: config_dir(home) / "profiles.toml" (reuse megaplan._core.io.config_dir, so XDG is honored).
Project: project_dir / ".megaplan" / "profiles.toml" — project_dir resolved by the caller (handle_init already knows it; other handlers read it from state["config"]["project_dir"]).
Createmegaplan/profiles/standard.toml — explicit mirror of DEFAULT_AGENT_ROUTING (plan/prep/revise/gate/finalize = "claude"; critique/execute/review/loop_execute/tiebreaker_* = "codex"; loop_plan = "claude"). Useful as documentation and as an override target.
Createmegaplan/profiles/all-open.toml using the exact example from the brief (hermes + open-source OpenRouter picks for every phase).
Register the megaplan.profiles subpackage so package-data works: add megaplan/profiles/__init__.py (empty) and confirm pyproject.toml[tool.setuptools.package-data] or equivalent picks up *.toml. If the project uses setuptools with include-package-data, add megaplan/profiles/*.toml to MANIFEST.in or the package-data section. Verify with a local pip install -e . + importlib.resources probe.
Step 4: Add --profile to every phase-model-bearing parser (megaplan/cli.py, megaplan/chain.py, megaplan/prompts/tiebreaker_orchestrator.py, megaplan/auto.py)
Scope: Medium
Add one line next to each existing --phase-model declaration:
python
parser.add_argument("--profile", default=None,
help="Named preset from profiles.toml; see 'megaplan config profiles list'.")
Sites to edit (confirmed via repo scan):
megaplan/cli.py:871 — init_parser
megaplan/cli.py:900 — step-family loop (covers plan/prep/critique/revise/gate/finalize/execute/review in one block)
Do not add a shared helper — it would touch more files than the six add-argument lines. Match the existing copy-paste style to minimize diff risk.
Step 5: Expand the profile into args.phase_model at parser exit (megaplan/cli.py)
Scope: Small
Add a helper _apply_profile_expansion(args, project_dir) in megaplan/cli.py (near main()). If getattr(args, "profile", None) is set:
Call load_profiles(project_dir=project_dir) and resolve_profile(args.profile, ...).
Build profile phase-model strings and append them to args.phase_model (ad-hoc entries are already there and come first → they win due to the first-match break in resolve_agent_mode).
Invoke the helper once per CLI command that supports --profile, right after arg parsing and right before the command handler dispatches. Placing it in main() around cli.py:1160 after the args are parsed is the cleanest single site.
Resolveproject_dir: for init use args.project_dir or Path.cwd(); for other commands use the plan's state["config"]["project_dir"] if available, else Path.cwd(). Falling back to cwd is fine — the project-layer file is optional.
Step 6: Persist the resolved profile in state (megaplan/handlers/init.py)
Scope: Small
Add one line in the state-initialization block (megaplan/handlers/init.py:105-111): if getattr(args, "profile", None), set state["config"]["profile"] = args.profile. Store only the name — the expanded phase-models are already captured indirectly via each phase's worker result.
Step 7: Add config profiles list and config profiles show (megaplan/cli.py)
Scope: Medium
Extend the config subparser at megaplan/cli.py:916-922:
Branch in handle_config (megaplan/cli.py:735): when args.config_action == "profiles", dispatch on args.profiles_action. For list, call load_profile_sources and print each profile with its source label (built-in | user | project) and the layers it appears in (noting overrides). For show, print the fully resolved {phase: spec} map as JSON.
Confirm a bad --profile foo raises CliError("unknown_profile", ...) with the message listing known profiles. The raise point is in _apply_profile_expansion calling resolve_profile. main() already catches CliError and renders a non-zero exit — no new plumbing needed.
Step 9: Tests (tests/test_profiles.py — NEW, plus a touch to tests/test_cli.py or equivalent)
Scope: Medium
New filetests/test_profiles.py covering:
load_profiles returns only built-ins when user/project layers absent.
User layer replaces a built-in profile with the same name; project layer beats user.
Invalid phase key in a TOML raises CliError("invalid_profile", ...) and the path appears in the message.
Invalid agent in a spec (e.g. foo:bar) raises CliError.
profile_to_phase_models round-trips: passing its output into an argparse.Namespace(phase_model=...) and calling resolve_agent_mode returns the expected agent/model.
Integration test — construct an argparse.Namespace mimicking init --profile all-open --phase-model execute=claude, run _apply_profile_expansion, then resolve_agent_mode("execute", args) → expect ("claude", ..., ..., None) (ad-hoc wins). Do the same without the ad-hoc override → expect hermes + the OpenRouter model from all-open.
State snapshot — call handle_init with a stubbed args namespace (follow existing patterns in tests/test_handlers.py or tests/test_core.py) and assert state["config"]["profile"] == "all-open".
No-profile regression — existing behavior unchanged when --profile is absent (covered by running the current test suite).
Execution Order
Step 1 first — re-verify workers.py line refs given the concurrent hermes vendor plan.
Steps 2–3 — loader + built-in TOMLs — foundation everything else depends on.
Step 4 — add --profile arg across parsers (mechanical, no behavior change yet).
Step 5 — wire the profile expansion into args.phase_model in main().
Step 6 — state snapshot (one-liner; do it together with Step 5 commit).
Step 7 — config profiles list/show subcommands.
Step 8 — spot-check the error-path wiring.
Step 9 — tests last so they exercise the full wire-up.
Validation Order
pytest tests/test_profiles.py -x — cheapest, narrowest signal on loader + merge.
pytest tests/ — full suite to catch regressions from added --profile args across parsers.
Manual smoke: megaplan config profiles list, megaplan config profiles show all-open, megaplan init --profile all-open --phase-model execute=claude "test idea" — confirm the resolved routing reports hermes everywhere except execute=claude, and state.json records config.profile == "all-open".
megaplan init --profile nonexistent "x" — confirm the error message lists known profiles.
code
Plan metadata:
{
"version": 1,
"timestamp": "2026-04-23T18:31:17Z",
"hash": "sha256:c6cb188dd17a594b45e46ac0dde08c826bbd196970d8d220e4ef63609e12e9d3",
"questions": [
"The brief lists tiebreaker_orchestrator and tiebreaker_synthesis as valid phase keys, but DEFAULT_AGENT_ROUTING at megaplan/types.py:305-318 only has tiebreaker_researcher and tiebreaker_challenger. Should profiles validate against the current DEFAULT_AGENT_ROUTING.keys() only, or should we extend the routing table to add those sub-phases as first-class entries (which would be a bigger change)? I'm assuming 'validate against current keys only' for now.",
"User-level profile file location: brief lists both ~/.config/megaplan/profiles.toml and ~/.megaplan/profiles.toml. The existing code uses XDG-aware config_dir() (\u2192 ~/.config/megaplan/). Pick one \u2014 I'm assuming ~/.config/megaplan/profiles.toml to match config.json.",
"When a later layer defines a profile with the same name as an earlier layer, should the merge be (a) complete replacement of the profile or (b) per-phase field merge? I'm assuming (a) complete replacement \u2014 simpler, and profiles are small."
],
"success_criteria": [
{
"criterion": "megaplan init --profile all-open \"test idea\" resolves every phase's agent/model to the values defined in megaplan/profiles/all-open.toml (behavioral equivalent to passing the corresponding --phase-model flags for each phase).",
"priority": "must",
"requires": [
"run_shell",
"run_tests"
]
},
{
"criterion": "megaplan init --profile all-open --phase-model execute=claude \"test\" resolves execute to claude while every other phase comes from the profile (ad-hoc --phase-model beats --profile).",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "megaplan config profiles list enumerates profiles from all three layers (built-in, user, project) with source labels, reading user layer from ~/.config/megaplan/profiles.toml and project layer from .megaplan/profiles.toml.",
"priority": "must",
"requires": [
"run_shell",
"read_files"
]
},
{
"criterion": "megaplan config profiles show <name> prints the fully resolved phase\u2192spec map for that profile after layered merge.",
"priority": "must",
"requires": [
"run_shell"
]
},
{
"criterion": "Unknown profile name (e.g. --profile does-not-exist) raises a CliError whose message lists the known profile names; process exits non-zero.",
"priority": "must",
"requires": [
"run_shell",
"run_tests"
]
},
{
"criterion": "Profile TOML with an unknown phase key or an invalid agent spec fails to load with a CliError naming the offending file and key.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "state.json for a plan initialized with --profile <name> contains config.profile == \"<name>\".",
"priority": "must",
"requires": [
"run_tests",
"read_files"
]
},
{
"criterion": "Existing behavior is unchanged when --profile is not passed \u2014 the full test suite (pytest tests/) passes.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "Layered-merge precedence is correct: project layer > user layer > built-in; and ad-hoc --phase-model > --profile > --hermes > agent default. Covered by tests/test_profiles.py.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "Total new code (profile module + CLI edits + state snapshot) stays close to the brief's ~200 LOC target, not counting profile TOMLs or tests.",
"priority": "should",
"requires": [
"parse_diff"
]
},
{
"criterion": "No new runtime dependencies added to pyproject.toml (stdlib tomllib only).",
"priority": "must",
"requires": [
"read_files"
]
},
{
"criterion": "Package data for megaplan/profiles/*.toml is correctly declared so importlib.resources.files(\"megaplan.profiles\") finds the built-in TOMLs after a fresh pip install -e ..",
"priority": "must",
"requires": [
"run_shell",
"read_files"
]
},
{
"criterion": "Before executing, the implementer re-verifies megaplan/workers.py:1627-1629 still reflects the phase-model resolution site (hermes vendor plan may have shifted lines).",
"priority": "must",
"requires": [
"read_files"
]
},
{
"criterion": "Manual smoke path works in a clean checkout: create a project-level .megaplan/profiles.toml with one profile, run megaplan config profiles list, confirm it appears with project source label, then run megaplan init --profile <that-profile> \"idea\" and inspect state.json.",
"priority": "info",
"requires": [
"subjective_judgment"
]
}
],
"assumptions": [
"Validate phase keys against DEFAULT_AGENT_ROUTING.keys() \u2014 excludes tiebreaker_orchestrator and tiebreaker_synthesis which don't exist as routing keys today.",
"User profile file lives at ~/.config/megaplan/profiles.toml (XDG-aware via existing config_dir() helper), not ~/.megaplan/profiles.toml.",
"Layered merge replaces profiles whole when names collide across layers (no per-field merging).",
"config profiles is read-only \u2014 users edit TOML by hand. No TOML writer (tomli-w) added.",
"Python 3.11+ per pyproject.toml:9 \u2192 use stdlib tomllib for reads.",
"--profile is not repeatable; passing --profile a --profile b uses b (argparse default behavior with default=None).",
"--profile interacts with --hermes per the brief's precedence: profile wins over --hermes. Implementation: after profile expansion, the profile's entries are in args.phase_model, which is consulted before --hermes in resolve_agent_mode \u2014 so this falls out automatically.",
"The concurrent hermes vendor plan (vendor-hermes-agent-into-the-20260422-0112) will finalize before this plan executes. Re-verify megaplan/workers.py:1615-1651 line refs at execute time.",
"Profile name is a simple identifier (matches TOML table-name conventions); we don't need to validate filesystem-safe characters separately."
],
"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"
]
},
{
"id": "DEBT-029",
"concern": "are the proposed changes technically correct?: checked the new diff-helper proposal against the repo's existing execution-evidence semantics. validate_execution_evidence() in megaplan/evaluation.py:109-175 uses git status --short, so untracked files count as real changed files today, but step 3 proposes collect_git_diff_patch(project_dir) via git diff head; by git behavior that will not include untracked files, so heavy review could miss exactly the newly created files that execute and review already treat as part of the patch.",
"occurrence_count": 1,
"plan_ids": [
"robust-review-v2"
]
},
{
"id": "DEBT-032",
"concern": "are the proposed changes technically correct?: a generated-schema gap remains. tests/test_schemas.py reads the repo-root .megaplan/schemas/review.json directly via _review_disk_schema(), the checked-in local file is currently stale relative to schemas, and ensure_runtime_layout() in megaplan/_core/io.py is the production writer for that file class. the plan says generated schemas must stay aligned, but it never names a regeneration step or a test adjustment for that disk-schema path, so the validation story is still incomplete.",
"occurrence_count": 1,
"plan_ids": [
"fix-the-6-remaining-openai-20260409-0502"
]
},
{
"id": "DEBT-046",
"concern": "are the proposed changes technically correct?: the new pre-extraction step that migrates pinnedshotgroups out of core is still under-specified for compatibility. current runtime and test code reads config.pinnedshotgroups directly across hooks/usetimelinecommit.ts, lib/pinned-group-projection.ts, hooks/useshotgroups.ts, components/timelineeditor/timelineeditor.tsx, hooks/usetimelinetrackmanagement.ts, lib/serialize.test.ts, lib/migrate.test.ts, and many other tests, so landing that migration before extraction needs a dual-read/projection shim or a clearly synchronized update plan instead of only a schema/serializer note.",
"occurrence_count": 1,
"plan_ids": [
"design-plan-to-extract-the-20260419-1637"
]
},
{
"id": "DEBT-050",
"concern": "are the proposed changes technically correct?: runner inputs: the revised auto-mode snippet calls $(cat ${idea_file}) and the chain-mode path runs mp-chain ${chain_spec}, but step 7's deploy flow still only does railway link, railway variables --set, and railway up. there is no corresponding step that copies the idea file or chain spec into /workspace, so a literal implementation would boot into auto/chain mode and immediately fail on missing input files.",
"occurrence_count": 1,
"plan_ids": [
"build-megaplan-cloud-a-new-20260421-0406"
]
}
],
"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"
]
}
],
"completeness": [
{
"id": "DEBT-036",
"concern": "handle_init() and override flows also emit next_step but aren't listed for next_step_runtime enrichment.",
"occurrence_count": 1,
"plan_ids": [
"design-and-plan-calibrated-20260410-1430"
]
},
{
"id": "DEBT-037",
"concern": "handle_execute() at handlers.py:1152-1175 can clear next_step to none but leave stale next_step_runtime.",
"occurrence_count": 1,
"plan_ids": [
"design-and-plan-calibrated-20260410-1430"
]
},
{
"id": "DEBT-040",
"concern": "next_step_runtime fires on previous step completion, not literally when the next phase starts.",
"occurrence_count": 1,
"plan_ids": [
"design-and-plan-calibrated-20260410-1430"
]
},
{
"id": "DEBT-043",
"concern": "test_command config override unreachable via normal init/cli flow",
"occurrence_count": 1,
"plan_ids": [
"add-test-baselining-to-the-20260410-2240"
]
}
],
"correctness": [
{
"id": "DEBT-038",
"concern": "status-progress gating excludes finalized plans with finalize.json in between-batch and blocked states.",
"occurrence_count": 1,
"plan_ids": [
"design-and-plan-calibrated-20260410-1430"
]
},
{
"id": "DEBT-039",
"concern": "resolve_phase_runtime called on non-phase next_step values would fail.",
"occurrence_count": 1,
"plan_ids": [
"design-and-plan-calibrated-20260410-1430"
]
},
{
"id": "DEBT-041",
"concern": "non-phase next_step values from workflow_next() not filtered.",
"occurrence_count": 1,
"plan_ids": [
"design-and-plan-calibrated-20260410-1430"
]
},
{
"id": "DEBT-042",
"concern": "baseline_test_command schema says string-only but fallback returns none",
"occurrence_count": 1,
"plan_ids": [
"add-test-baselining-to-the-20260410-2240"
]
},
{
"id": "DEBT-044",
"concern": "fallback uses null+baseline_test_note instead of brief's empty-array+meta_commentary",
"occurrence_count": 1,
"plan_ids": [
"add-test-baselining-to-the-20260410-2240"
]
},
{
"id": "DEBT-045",
"concern": "pinnedshotgroups migration lacks a specified compatibility phase for in-tree callers",
"occurrence_count": 1,
"plan_ids": [
"design-plan-to-extract-the-20260419-1637"
]
}
],
"criteria-prompt": [
{
"id": "DEBT-026",
"concern": "criteria prompt: v3 replaces _review_prompt() in heavy mode with a new heavy_criteria_review_prompt, so the plan no longer follows the brief's explicit requirement that _review_prompt() remain the heavy-mode criteria_verdict check.",
"occurrence_count": 1,
"plan_ids": [
"robust-review-v2"
]
}
],
"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"
]
},
{
"id": "DEBT-028",
"concern": "did the work fully address the issue hints, user notes, and approved plan requirements?: checked step 7 against the brief's explicit prompt-builder requirement. the revision fixes the old context leak by introducing a brand-new heavy_criteria_review_prompt, but the brief said _review_prompt() should stay as-is and still run as the criteria_verdict check in heavy mode; v3 solves the problem by replacing that heavy-mode criteria path instead of reusing the baseline review prompt, which is still a material divergence from the requested design.",
"occurrence_count": 1,
"plan_ids": [
"robust-review-v2"
]
},
{
"id": "DEBT-047",
"concern": "did the work fully address the issue hints, user notes, and approved plan requirements?: issue hints: the plan now wires mode=auto|chain|idle, but the user-requested auto.idea_file and chain.spec still have no deployment path into the container. reigh's readme uploads the idea file explicitly before running megaplan init, and chain.sh exits if /workspace/chain.yaml is missing, so a plan that only sets these paths in cloud.yaml without also staging the files still leaves the requested runner modes incomplete.",
"occurrence_count": 1,
"plan_ids": [
"build-megaplan-cloud-a-new-20260421-0406"
]
}
],
"diff-capture": [
{
"id": "DEBT-027",
"concern": "diff capture: the proposed collect_git_diff_patch(project_dir) helper uses git diff head, which will miss untracked files even though the existing execution-evidence path already treats untracked files as real changed work.",
"occurrence_count": 1,
"plan_ids": [
"robust-review-v2"
]
}
],
"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"
]
},
{
"id": "DEBT-033",
"concern": "does the change touch all locations and supporting infrastructure?: the prior missing locations in megaplan/workers.py and tests/test_workers.py are now covered, but one supporting-infrastructure path is still absent from the steps: the repo-root generated schema copy under .megaplan/schemas/review.json and the tests that read it directly. without either explicitly regenerating that file or changing those tests to materialize schemas in a temp root, the plan can still leave the runtime-schema copy out of sync with the raw registry.",
"occurrence_count": 1,
"plan_ids": [
"fix-the-6-remaining-openai-20260409-0502"
]
},
{
"id": "DEBT-035",
"concern": "does the change touch all locations and supporting infrastructure?: the plan adds _set_active_step and _clear_active_step helpers to handlers.py. _run_worker (handlers.py:135) is modified to accept a resolved parameter. but _run_worker is also called directly by handle_critique's sequential fallback at line 801 and 803. these calls currently don't pass resolved. the plan's step 2.6 for handle_critique says to set active_step after resolution at line 794 \u2014 but the _run_worker calls at 801/803 would re-resolve the agent internally (since resolved isn't passed). this means the agent is resolved twice on the critique sequential path. the double-resolution is wasteful but correct (same result). however, to match the plan's goal of 'resolve_agent_mode() is called once per handler invocation', the resolved tuple should be passed to these _run_worker calls too.",
"occurrence_count": 1,
"plan_ids": [
"fix-megaplan-s-planning-20260409-2103"
]
},
{
"id": "DEBT-048",
"concern": "does the change touch all locations and supporting infrastructure?: supporting infrastructure is still missing for mode inputs. step 3 ports chain.yaml.example into package templates, but step 5's materialize_deploy_dir() layout does not include it, step 7 deploy does not upload it or auto.idea_file, and the docs/validation steps do not mention any artifact-sync path before boot. that leaves the runner depending on files that the deployment plan never places on the container volume.",
"occurrence_count": 1,
"plan_ids": [
"build-megaplan-cloud-a-new-20260421-0406"
]
}
],
"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"
]
},
{
"id": "DEBT-034",
"concern": "find the callers of the changed function. what arguments do they actually pass? does the fix handle all of them?: i rechecked the caller paths after the revision. the raw-schema caller path through validate_payload() is now accounted for, but the runtime-schema caller path still is not: strict_schema() only reaches the on-disk runtime schemas through ensure_runtime_layout(), while current tests like tests/test_schemas.py and tests/test_parallel_review.py consume the already-written repo copy directly. the plan does not yet say how that caller path gets refreshed or asserted after the code change.",
"occurrence_count": 1,
"plan_ids": [
"fix-the-6-remaining-openai-20260409-0502"
]
},
{
"id": "DEBT-051",
"concern": "find the callers of the changed function. what arguments do they actually pass? does the fix handle all of them?: the real callers for these paths are shell commands that expect actual files. reigh's readme uploads an idea file into /workspace/megaplan-idea-2week.txt before calling megaplan init, and chain.sh immediately checks -f \"$spec\" before running megaplan chain --spec \"$spec\". the revised plan now constructs equivalent callers from auto.idea_file and chain.spec, but still never adds the corresponding file-transfer or materialization step, so those callers would receive nonexistent arguments.",
"occurrence_count": 1,
"plan_ids": [
"build-megaplan-cloud-a-new-20260421-0406"
]
}
],
"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"
]
},
{
"id": "DEBT-024",
"concern": "no automated guard to keep the mirror file synchronized with source files",
"occurrence_count": 1,
"plan_ids": [
"update-all-documentation-20260406-1902"
]
},
{
"id": "DEBT-025",
"concern": "local setup test only checks agents.md existence, not content",
"occurrence_count": 1,
"plan_ids": [
"update-all-documentation-20260406-1902"
]
}
],
"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"
]
}
],
"runner-inputs": [
{
"id": "DEBT-052",
"concern": "runner inputs: auto and chain modes still assume auto.idea_file and chain.spec already exist on the container volume, but the deploy plan does not upload or materialize those files anywhere.",
"occurrence_count": 1,
"plan_ids": [
"build-megaplan-cloud-a-new-20260421-0406"
]
}
],
"runtime-schema-sync": [
{
"id": "DEBT-031",
"concern": "runtime schema sync: the plan still does not include an explicit refresh or validation step for the generated .megaplan/schemas/review.json copy that repository tests read directly.",
"occurrence_count": 1,
"plan_ids": [
"fix-the-6-remaining-openai-20260409-0502"
]
}
],
"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"
]
},
{
"id": "DEBT-030",
"concern": "search for related code that handles the same concept. is the reported issue a symptom of something broader?: the revised plan correctly narrows the schema-shape problem itself back to the six audited mismatches, but the generated runtime-schema consumer path is broader than the plan acknowledges: tests/test_parallel_review.py also reads the runtime review.json schema from schemas_root(repo_root), so stale generated schema copies can affect more than the direct schema tests.",
"occurrence_count": 1,
"plan_ids": [
"fix-the-6-remaining-openai-20260409-0502"
]
},
{
"id": "DEBT-049",
"concern": "search for related code that handles the same concept. is the reported issue a symptom of something broader?: input provisioning is the broader unresolved concept here. the repo's current railway workflow does not just run commands; it also stages runtime artifacts into /workspace first, such as the uploaded idea text in readme line 103 and the expected /workspace/chain.yaml consumed by chain.sh. the revised plan fixes the runner dispatch itself, but it still treats auto.idea_file and chain.spec as if those files will already exist without describing how cloud deploy makes that true.",
"occurrence_count": 1,
"plan_ids": [
"build-megaplan-cloud-a-new-20260421-0406"
]
}
],
"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"
]
}
],
"validation-order-text": [
{
"id": "DEBT-053",
"concern": "validation order step 7 text-level mismatch between cloud bootstrap and cloud status --chain via marker.",
"occurrence_count": 1,
"plan_ids": [
"sprint-2-of-the-megaplan-20260421-1254"
]
},
{
"id": "DEBT-054",
"concern": "manual e2e check mixes auto wrapper with chain marker path.",
"occurrence_count": 1,
"plan_ids": [
"sprint-2-of-the-megaplan-20260421-1254"
]
}
],
"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": "are-the-proposed-changes-technically-correct",
"total_occurrences": 6,
"plan_count": 5,
"entries": [
{
"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"
]
},
{
"id": "DEBT-029",
"concern": "are the proposed changes technically correct?: checked the new diff-helper proposal against the repo's existing execution-evidence semantics. validate_execution_evidence() in megaplan/evaluation.py:109-175 uses git status --short, so untracked files count as real changed files today, but step 3 proposes collect_git_diff_patch(project_dir) via git diff head; by git behavior that will not include untracked files, so heavy review could miss exactly the newly created files that execute and review already treat as part of the patch.",
"occurrence_count": 1,
"plan_ids": [
"robust-review-v2"
]
},
{
"id": "DEBT-032",
"concern": "are the proposed changes technically correct?: a generated-schema gap remains. tests/test_schemas.py reads the repo-root .megaplan/schemas/review.json directly via _review_disk_schema(), the checked-in local file is currently stale relative to schemas, and ensure_runtime_layout() in megaplan/_core/io.py is the production writer for that file class. the plan says generated schemas must stay aligned, but it never names a regeneration step or a test adjustment for that disk-schema path, so the validation story is still incomplete.",
"occurrence_count": 1,
"plan_ids": [
"fix-the-6-remaining-openai-20260409-0502"
]
},
{
"id": "DEBT-046",
"concern": "are the proposed changes technically correct?: the new pre-extraction step that migrates pinnedshotgroups out of core is still under-specified for compatibility. current runtime and test code reads config.pinnedshotgroups directly across hooks/usetimelinecommit.ts, lib/pinned-group-projection.ts, hooks/useshotgroups.ts, components/timelineeditor/timelineeditor.tsx, hooks/usetimelinetrackmanagement.ts, lib/serialize.test.ts, lib/migrate.test.ts, and many other tests, so landing that migration before extraction needs a dual-read/projection shim or a clearly synchronized update plan instead of only a schema/serializer note.",
"occurrence_count": 1,
"plan_ids": [
"design-plan-to-extract-the-20260419-1637"
]
},
{
"id": "DEBT-050",
"concern": "are the proposed changes technically correct?: runner inputs: the revised auto-mode snippet calls $(cat ${idea_file}) and the chain-mode path runs mp-chain ${chain_spec}, but step 7's deploy flow still only does railway link, railway variables --set, and railway up. there is no corresponding step that copies the idea file or chain spec into /workspace, so a literal implementation would boot into auto/chain mode and immediately fail on missing input files.",
"occurrence_count": 1,
"plan_ids": [
"build-megaplan-cloud-a-new-20260421-0406"
]
}
]
},
{
"subsystem": "correctness",
"total_occurrences": 6,
"plan_count": 3,
"entries": [
{
"id": "DEBT-038",
"concern": "status-progress gating excludes finalized plans with finalize.json in between-batch and blocked states.",
"occurrence_count": 1,
"plan_ids": [
"design-and-plan-calibrated-20260410-1430"
]
},
{
"id": "DEBT-039",
"concern": "resolve_phase_runtime called on non-phase next_step values would fail.",
"occurrence_count": 1,
"plan_ids": [
"design-and-plan-calibrated-20260410-1430"
]
},
{
"id": "DEBT-041",
"concern": "non-phase next_step values from workflow_next() not filtered.",
"occurrence_count": 1,
"plan_ids": [
"design-and-plan-calibrated-20260410-1430"
]
},
{
"id": "DEBT-042",
"concern": "baseline_test_command schema says string-only but fallback returns none",
"occurrence_count": 1,
"plan_ids": [
"add-test-baselining-to-the-20260410-2240"
]
},
{
"id": "DEBT-044",
"concern": "fallback uses null+baseline_test_note instead of brief's empty-array+meta_commentary",
"occurrence_count": 1,
"plan_ids": [
"add-test-baselining-to-the-20260410-2240"
]
},
{
"id": "DEBT-045",
"concern": "pinnedshotgroups migration lacks a specified compatibility phase for in-tree callers",
"occurrence_count": 1,
"plan_ids": [
"design-plan-to-extract-the-20260419-1637"
]
}
]
},
{
"subsystem": "completeness",
"total_occurrences": 4,
"plan_count": 2,
"entries": [
{
"id": "DEBT-036",
"concern": "handle_init() and override flows also emit next_step but aren't listed for next_step_runtime enrichment.",
"occurrence_count": 1,
"plan_ids": [
"design-and-plan-calibrated-20260410-1430"
]
},
{
"id": "DEBT-037",
"concern": "handle_execute() at handlers.py:1152-1175 can clear next_step to none but leave stale next_step_runtime.",
"occurrence_count": 1,
"plan_ids": [
"design-and-plan-calibrated-20260410-1430"
]
},
{
"id": "DEBT-040",
"concern": "next_step_runtime fires on previous step completion, not literally when the next phase starts.",
"occurrence_count": 1,
"plan_ids": [
"design-and-plan-calibrated-20260410-1430"
]
},
{
"id": "DEBT-043",
"concern": "test_command config override unreachable via normal init/cli flow",
"occurrence_count": 1,
"plan_ids": [
"add-test-baselining-to-the-20260410-2240"
]
}
]
},
{
"subsystem": "did-the-work-fully-address-the-issue-hints-user-notes-and-approved-plan-requirements",
"total_occurrences": 4,
"plan_count": 3,
"entries": [
{
"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"
]
},
{
"id": "DEBT-028",
"concern": "did the work fully address the issue hints, user notes, and approved plan requirements?: checked step 7 against the brief's explicit prompt-builder requirement. the revision fixes the old context leak by introducing a brand-new heavy_criteria_review_prompt, but the brief said _review_prompt() should stay as-is and still run as the criteria_verdict check in heavy mode; v3 solves the problem by replacing that heavy-mode criteria path instead of reusing the baseline review prompt, which is still a material divergence from the requested design.",
"occurrence_count": 1,
"plan_ids": [
"robust-review-v2"
]
},
{
"id": "DEBT-047",
"concern": "did the work fully address the issue hints, user notes, and approved plan requirements?: issue hints: the plan now wires mode=auto|chain|idle, but the user-requested auto.idea_file and chain.spec still have no deployment path into the container. reigh's readme uploads the idea file explicitly before running megaplan init, and chain.sh exits if /workspace/chain.yaml is missing, so a plan that only sets these paths in cloud.yaml without also staging the files still leaves the requested runner modes incomplete.",
"occurrence_count": 1,
"plan_ids": [
"build-megaplan-cloud-a-new-20260421-0406"
]
}
]
},
{
"subsystem": "does-the-change-touch-all-locations-and-supporting-infrastructure",
"total_occurrences": 4,
"plan_count": 4,
"entries": [
{
"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"
]
},
{
"id": "DEBT-033",
"concern": "does the change touch all locations and supporting infrastructure?: the prior missing locations in megaplan/workers.py and tests/test_workers.py are now covered, but one supporting-infrastructure path is still absent from the steps: the repo-root generated schema copy under .megaplan/schemas/review.json and the tests that read it directly. without either explicitly regenerating that file or changing those tests to materialize schemas in a temp root, the plan can still leave the runtime-schema copy out of sync with the raw registry.",
"occurrence_count": 1,
"plan_ids": [
"fix-the-6-remaining-openai-20260409-0502"
]
},
{
"id": "DEBT-035",
"concern": "does the change touch all locations and supporting infrastructure?: the plan adds _set_active_step and _clear_active_step helpers to handlers.py. _run_worker (handlers.py:135) is modified to accept a resolved parameter. but _run_worker is also called directly by handle_critique's sequential fallback at line 801 and 803. these calls currently don't pass resolved. the plan's step 2.6 for handle_critique says to set active_step after resolution at line 794 \u2014 but the _run_worker calls at 801/803 would re-resolve the agent internally (since resolved isn't passed). this means the agent is resolved twice on the critique sequential path. the double-resolution is wasteful but correct (same result). however, to match the plan's goal of 'resolve_agent_mode() is called once per handler invocation', the resolved tuple should be passed to these _run_worker calls too.",
"occurrence_count": 1,
"plan_ids": [
"fix-megaplan-s-planning-20260409-2103"
]
},
{
"id": "DEBT-048",
"concern": "does the change touch all locations and supporting infrastructure?: supporting infrastructure is still missing for mode inputs. step 3 ports chain.yaml.example into package templates, but step 5's materialize_deploy_dir() layout does not include it, step 7 deploy does not upload it or auto.idea_file, and the docs/validation steps do not mention any artifact-sync path before boot. that leaves the runner depending on files that the deployment plan never places on the container volume.",
"occurrence_count": 1,
"plan_ids": [
"build-megaplan-cloud-a-new-20260421-0406"
]
}
]
},
{
"subsystem": "find-the-callers-of-the-changed-function-what-arguments-do-they-actually-pass-does-the-fix-handle-all-of-them",
"total_occurrences": 4,
"plan_count": 3,
"entries": [
{
"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"
]
},
{
"id": "DEBT-034",
"concern": "find the callers of the changed function. what arguments do they actually pass? does the fix handle all of them?: i rechecked the caller paths after the revision. the raw-schema caller path through validate_payload() is now accounted for, but the runtime-schema caller path still is not: strict_schema() only reaches the on-disk runtime schemas through ensure_runtime_layout(), while current tests like tests/test_schemas.py and tests/test_parallel_review.py consume the already-written repo copy directly. the plan does not yet say how that caller path gets refreshed or asserted after the code change.",
"occurrence_count": 1,
"plan_ids": [
"fix-the-6-remaining-openai-20260409-0502"
]
},
{
"id": "DEBT-051",
"concern": "find the callers of the changed function. what arguments do they actually pass? does the fix handle all of them?: the real callers for these paths are shell commands that expect actual files. reigh's readme uploads an idea file into /workspace/megaplan-idea-2week.txt before calling megaplan init, and chain.sh immediately checks -f \"$spec\" before running megaplan chain --spec \"$spec\". the revised plan now constructs equivalent callers from auto.idea_file and chain.spec, but still never adds the corresponding file-transfer or materialization step, so those callers would receive nonexistent arguments.",
"occurrence_count": 1,
"plan_ids": [
"build-megaplan-cloud-a-new-20260421-0406"
]
}
]
},
{
"subsystem": "install-paths",
"total_occurrences": 3,
"plan_count": 2,
"entries": [
{
"id": "DEBT-023",
"concern": "local setup path doesn't expose subagent mode",
"occurrence_count": 1,
"plan_ids": [
"refactor-megaplan-skill-so-20260406-1818"
]
},
{
"id": "DEBT-024",
"concern": "no automated guard to keep the mirror file synchronized with source files",
"occurrence_count": 1,
"plan_ids": [
"update-all-documentation-20260406-1902"
]
},
{
"id": "DEBT-025",
"concern": "local setup test only checks agents.md existence, not content",
"occurrence_count": 1,
"plan_ids": [
"update-all-documentation-20260406-1902"
]
}
]
},
{
"subsystem": "search-for-related-code-that-handles-the-same-concept-is-the-reported-issue-a-symptom-of-something-broader",
"total_occurrences": 3,
"plan_count": 3,
"entries": [
{
"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"
]
},
{
"id": "DEBT-030",
"concern": "search for related code that handles the same concept. is the reported issue a symptom of something broader?: the revised plan correctly narrows the schema-shape problem itself back to the six audited mismatches, but the generated runtime-schema consumer path is broader than the plan acknowledges: tests/test_parallel_review.py also reads the runtime review.json schema from schemas_root(repo_root), so stale generated schema copies can affect more than the direct schema tests.",
"occurrence_count": 1,
"plan_ids": [
"fix-the-6-remaining-openai-20260409-0502"
]
},
{
"id": "DEBT-049",
"concern": "search for related code that handles the same concept. is the reported issue a symptom of something broader?: input provisioning is the broader unresolved concept here. the repo's current railway workflow does not just run commands; it also stages runtime artifacts into /workspace first, such as the uploaded idea text in readme line 103 and the expected /workspace/chain.yaml consumed by chain.sh. the revised plan fixes the runner dispatch itself, but it still treats auto.idea_file and chain.spec as if those files will already exist without describing how cloud deploy makes that true.",
"occurrence_count": 1,
"plan_ids": [
"build-megaplan-cloud-a-new-20260421-0406"
]
}
]
},
{
"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/phase-model-profiles/critique_output.json
Review the plan with a broad scope. Consider whether the approach is correct, whether it covers
all the places it needs to, whether it would break callers or violate codebase conventions,
and whether its verification strategy is adequate.
Place any concrete concerns in the flags array in the template file using the standard format
(id, concern, category, severity_hint, evidence). Leave checks as an empty array.
Workflow: read the file → investigate → read file again → add findings → write file back.
code
Additional guidelines:
- Robustness level: light. Be pragmatic. Only flag issues that would cause real failures. Ignore style, minor edge cases, and issues the executor will naturally resolve.
- 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":[],"flags":[{"id":"FLAG-001","concern":"Import layout: the plan puts the loader in megaplan/profiles.py and the built-in TOMLs in a megaplan/profiles/ package. Python resolves megaplan.profiles to the package, so the new loader module would be shadowed and the proposed importlib.resources.files(\"megaplan.profiles\") call would no longer target the loader module.","category":"correctness","severity_hint":"likely-significant","evidence":"Step 2 names a new module megaplan/profiles.py, while Step 3 also adds megaplan/profiles/__init__.py plus package data under the same import path. A quick local repro with both pkg/profiles.py and pkg/profiles/__init__.py imported pkg.profiles from the package, not the module."},{"id":"FLAG-002","concern":"Chain routing: the plan says to add --profile support to chain, but the actual chain path does not currently carry per-phase routing flags at all. Adding the flag only in build_chain_parser() would leave megaplan chain --profile ... accepted but ignored unless the plan also threads it through chain initialization.","category":"completeness","severity_hint":"likely-significant","evidence":"megaplan/chain.py:592-631 defines only --spec and --no-git-refresh on the chain parser. The actual milestone launch path is _init_plan() at megaplan/chain.py:313-344, which shells out to megaplan init with --project-dir, --auto-approve, --robustness, and --idea-file only."},{"id":"FLAG-003","concern":"Project-layer lookup: the proposed single _apply_profile_expansion() hook in main() does not have the plan state needed to find the correct project .megaplan/profiles.toml for non-init commands. Falling back to Path.cwd() would silently miss project-level profiles whenever a user reruns a phase outside the source checkout.","category":"correctness","severity_hint":"likely-significant","evidence":"megaplan/cli.py:1152-1210 parses args and dispatches before any plan state is loaded. Existing phase handlers resolve the plan first and then use persisted config, e.g. megaplan/handlers/plan.py:18-35, megaplan/handlers/execute.py:45-64, and megaplan/handlers/tiebreaker.py:36-55, where the canonical project directory lives in state[\"config\"][\"project_dir\"]."},{"id":"FLAG-004","concern":"Packaging: Step 3 points the implementer at setuptools package-data or MANIFEST.in, but this repository builds with Hatchling. That is the wrong packaging mechanism for this repo, so the built-in profile TOMLs are not actually covered by the current plan.","category":"correctness","severity_hint":"likely-minor","evidence":"pyproject.toml:1-3 sets build-backend = \"hatchling.build\", and the only packaging config is [tool.hatch.build.targets.wheel] at pyproject.toml:28-30. There is no setuptools configuration for the proposed package-data change to hook into."}],"verified_flag_ids":[],"disputed_flag_ids":[]}