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.
Vendor hermes-agent into the megaplan repo as a subpackage called agent using git subtree (preserving history). Job A scope: (1) map reachable-module surface from megaplan's hermes_worker integration; (2) git-subtree vendor /Users/user_c042661f/Documents/hermes-agent/ at megaplan/agent/ preserving history; (3) rewire megaplan/hermes_worker.py to import from in-tree megaplan.agent package; (4) remove check_hermes_available() gating; (5) delete obvious dead weight (evals/, landingpage/, website/, demo/, assets/, node_modules/, package.json, package-lock.json, tinker-atropos/, honcho_integration/, mini-swe-agent/, gateway/, cron/, hermes_cli/, cli.py, auto_improve/, batch_runner.py, rl_cli.py, datagen-config-examples/, root .json benchmark artifacts, RELEASE_v.md, setup-hermes.sh, cli-config.yaml.example); (6) verify megaplan still imports and hermes_worker resolves. Out of scope (Job B later): skills/, tools/ filtering, acp_adapter, acp_registry, environments/.
code
Plan:
# Implementation Plan: Vendor hermes-agent as `megaplan/agent/` subpackage (Job A)
Overview
Vendor hermes-agent into megaplan at megaplan/agent/ via git subtree (history preserved). Integrate via a sys.path prepend shim in megaplan/agent/__init__.py so hermes's original top-level imports (from agent.X, from tools.X, from run_agent import ..., dynamic importlib.import_module("tools.*")) resolve without modifying any vendored file. Megaplan callers use the same short names so vendored internals and megaplan callers share one sys.modules identity.
Iter-5 refinement: split availability-check from shim-trigger. Availability helpers (_is_agent_available, detect_available_agents) are called from non-hermes flows (megaplan/cli.py:694 , , ). If those helpers trigger the shim, mutates on non-hermes paths. Fix per gate prescription: availability helpers use a — no imports, zero side effects. The shim trigger lives ONLY inside the three real-execution call sites that actually instantiate hermes. By construction, no availability path can mutate .
Assistant
handle_setup_global
megaplan/workers.py:1602
_runtime_fallback_candidates
megaplan/workers.py:1645,1660
resolve_agent_mode
sys.path
filesystem-existence check
import megaplan.agent
sys.path
Settled decisions (locked; not revisited):
vendoring-strategy-shim: sys.path shim over static rewrite.
shim-trigger-placement-rule: trigger only in real-execution sites; availability = filesystem check.
hermes-cli-retained: keep vendored in Job A.
agent-optional-extra: deps ship as [project.optional-dependencies] agent = [...].
key-pool-sibling-fallback-removed: drop ../hermes-agent/auto_improve/api_keys.json.
all_locations flag gate: grep -rnE "gateway|cron|honcho_integration" megaplan/agent/ --include='*.py' | grep -v "^megaplan/agent/(gateway|cron|honcho_integration)/" → for each hit, inspect context. Every reference MUST be wrapped in try: ... except ImportError: ... OR live inside a conditional/function that never runs on Job A's default configuration. If any unguarded top-level or import-time reference exists, add that specific directory back to the retention list (Step 7) with rationale — do NOT proceed with its deletion.
Diagnostic only — no files modified.
Step 4: Install the sys.path shim (megaplan/agent/__init__.py)
"""Vendored hermes-agent subpackage.
Importing this module prepends its directory to sys.path so hermes's
original top-level imports resolve without rewriting vendored code.
This shim is activated ONLY inside the three real-execution call sites
(hermes_worker.run_hermes_step, review/parallel._run_check,
parallel_critique._run_check) — never from availability helpers or at
module top — so non-hermes paths leave sys.path untouched.
"""
import os as _os
import sys as _sys
_agent_dir = _os.path.dirname(__file__)
if _agent_dir not in _sys.path:
_sys.path.insert(0, _agent_dir)
No other file under megaplan/agent/ is modified in Job A.
Placement rule (addresses FLAG-006 / correctness-1 / correctness-2):import megaplan.agent appears ONLY inside the three real-execution call sites. Availability helpers use Path(...).is_file() — no imports. Module-top placement is forbidden anywhere.
megaplan/workers.py:1576-1584 — availability check via filesystem (no shim trigger):
Path(__file__) is .../megaplan/workers.py, so .parent / "agent" / "run_agent.py" resolves to megaplan/agent/run_agent.py. No import megaplan.agent, no import run_agent. Zero sys.path mutation.
megaplan/_core/io.py:263-274 — same pattern:
python
def detect_available_agents() -> list[str]:
import megaplan._core as _core_pkg
_shutil_ref = _core_pkg.shutil
available = [a for a in KNOWN_AGENTS if a != "hermes" and _shutil_ref.which(a)]
from pathlib import Path
if (Path(__file__).resolve().parents[1] / "agent" / "run_agent.py").is_file():
available.append("hermes")
return available
__file__ is .../megaplan/_core/io.py, so parents[1] is megaplan/. Zero imports of hermes.
megaplan/hermes_worker.py in run_hermes_step (around line 290) — shim trigger retained:
python
import megaplan.agent # noqa: F401 — sys.path shim for the vendored hermes imports
from run_agent import AIAgent
from hermes_state import SessionDB
megaplan/review/parallel.py in _run_check at lines 80-81 AND 209-210 — same prepend in both spots.
megaplan/parallel_critique.py in _run_check at lines 51-52 — same prepend.
Delete check_hermes_available() from megaplan/hermes_worker.py:23-49 (and its from hermes_cli.config import get_env_path usage).
Rewrite hermes gating in megaplan/workers.py:1643-1658 — replace both check_hermes_available() call sites:
python
if not _is_agent_available(agent):
if explicit_agent and not any(pm.startswith(f"{step}=") for pm in (getattr(args, "phase_model", None) or [])):
if agent == "hermes":
raise CliError(
"agent_deps_missing",
"hermes backend requires: pip install 'megaplan-harness[agent]'",
)
raise CliError("agent_not_found", f"Agent '{agent}' not found on PATH")
if getattr(args, "hermes", None) is not None or agent == "hermes":
raise CliError(
"agent_deps_missing",
"hermes backend requires: pip install 'megaplan-harness[agent]'",
)
# Try fallback (existing logic, unchanged from here)
Note: _is_agent_available("hermes") now returns True purely from the filesystem check. If hermes runtime deps are missing, _is_agent_available still returns True (vendored files exist) but the actual from run_agent import AIAgent inside run_hermes_step will raise ModuleNotFoundError. To preserve FLAG-005 UX, wrap the shim-triggered import in run_hermes_step with a try/except that converts ImportError into CliError("agent_deps_missing", …):
python
import megaplan.agent
try:
from run_agent import AIAgent
from hermes_state import SessionDB
except ImportError as exc:
raise CliError(
"agent_deps_missing",
"hermes backend requires: pip install 'megaplan-harness[agent]'",
) from exc
Supporting infrastructure:
megaplan/key_pool.py:62-74 — drop the repo_root.parent / "hermes-agent" / ... sibling-repo fallback.
megaplan/workers.py:1662-1665 — change text to "Install claude or codex, or pip install 'megaplan-harness[agent]' for hermes.".
Step 6: Tests — no changes required
Scope: Trivial
tests/test_parallel_critique.py:404-407 and tests/test_parallel_review.py:198-201, 281-284 keep their existing monkeypatch.setitem(sys.modules, "run_agent", ...) / sys.modules["hermes_state"] fake pattern unchanged.
Re-run the two files after Step 5. Shim trigger runs inside each test call, but sys.modules["run_agent"] being set (fake) means Python returns the fake before hitting sys.path.
Step 7: Delete dead weight (git rm inside megaplan/agent/)
Scope: Small
git rm -r the brief's list, minus hermes_cli/ (kept per settled decision), minus any directory Step 3.3 flagged for retention:
For gateway/, cron/, honcho_integration/: delete ONLY if Step 3.3 confirms every reference is try/except-guarded or unreachable. Otherwise retain with a note mirroring the hermes_cli/ pattern.
Shim-trigger-placement gate: script that parses every megaplan/**/*.py outside megaplan/agent/ with ast and asserts (a) no module-top Import/ImportFrom targets megaplan.agent, and (b) the set of functions containing an import megaplan.agent statement is exactly {run_hermes_step, _run_check, _run_check} — NOT _is_agent_available, NOT detect_available_agents. Emit the list.
Strengthened isolation probe (addresses correctness-2): this is the probe upgraded per the gate — it exercises the ACTUAL non-hermes call paths, not just import megaplan.
code
python -c "
import sys
before = list(sys.path)
import megaplan
from megaplan.workers import _is_agent_available
from megaplan._core.io import detect_available_agents
assert _is_agent_available('claude') in (True, False)
assert _is_agent_available('codex') in (True, False)
assert _is_agent_available('hermes') in (True, False)
_ = detect_available_agents()
after = list(sys.path)
assert before == after, f'sys.path mutated by availability helpers: before={before}, after={after}'
print('OK: neither import nor availability helpers mutate sys.path')
"
Must exit 0 without hermes runtime deps installed.
CLI smoke + isolation:megaplan --help (exit 0). Then re-run the isolation probe in Step 9.2 — sys.path must remain clean after the CLI invocation.
agent_deps_missing UX check (venv WITHOUT [agent]): megaplan --agent hermes <args> must produce the agent_deps_missing CliError. Note: the filesystem check in _is_agent_available("hermes") returns True because vendored files exist, so this error now comes from the try/except wrapping the from run_agent import AIAgent inside run_hermes_step (Step 5.7). Validates the end-to-end UX path.
Bare-Python megaplan import probe (no hermes deps).
Hermetic shim-coverage probe under HOME=$(mktemp -d) (with [agent] deps).
Targeted pytest on the two parallel test files.
Full pytest.
megaplan --help + re-verify no sys.path mutation.
agent_deps_missing UX check (now routes through try/except in run_hermes_step).
(info) Manual hermes-backed phase run after [agent] install.
code
Plan metadata:
{
"version": 5,
"timestamp": "2026-04-22T00:04:50Z",
"hash": "sha256:64096be4be8ad528b23a7545d7d50871f838b5269803905056576e1dd86ea5ec",
"changes_summary": "Applied gate's narrow iter-5 prescription. (1) FLAG-006/correctness-1/correctness-2: rewrote _is_agent_available(\"hermes\") and detect_available_agents() to use Path(__file__).resolve() / \"agent\" / \"run_agent.py\").is_file() instead of any shim-trigger + import probe. These helpers now do zero imports and zero sys.path mutation, so they're safe to call from non-hermes flows (handle_setup_global, fallback logic). Shim trigger is retained only in the three real-execution call sites: hermes_worker.run_hermes_step, review/parallel._run_check (both instances), parallel_critique._run_check. (2) Because _is_agent_available now returns True whenever vendored files exist (regardless of runtime deps), I added a try/except around the from run_agent import AIAgent block inside run_hermes_step that converts ImportError into CliError(\"agent_deps_missing\", ...) \u2014 preserves the FLAG-005 UX guarantee end-to-end. (3) Upgraded the Step 9.2 isolation probe per gate warning: it now calls _is_agent_available(\"hermes\") and detect_available_agents() explicitly and asserts sys.path unchanged \u2014 catches any future regression where an availability helper grows a shim trigger. (4) all_locations flag: added Step 3.3 to grep for gateway/cron/honcho_integration references in the vendored tree and verify each is try/except-guarded before Step 7 deletes them. If unguarded references exist, those specific directories are retained with rationale (mirroring hermes_cli/). (5) Added AST-based shim-trigger-placement gate to Step 9.1: asserts the set of functions containing import megaplan.agent equals exactly {run_hermes_step, _run_check, _run_check}. (6) Cited settled decisions explicitly in the Overview per gate warning #5.",
"flags_addressed": [
"all_locations",
"FLAG-006",
"correctness-1",
"correctness-2"
],
"questions": [
"For the gateway/cron/honcho_integration audit (Step 3.3): if ANY reference is unguarded, the plan retains that directory in Job A with rationale (mirroring hermes_cli/). Confirm this soft-deviation-on-evidence approach is preferred over unconditional retention or unconditional deletion.",
"The agent_deps_missing UX now routes through a try/except in run_hermes_step rather than through availability gating (because _is_agent_available(\"hermes\") returns True on vendored-file existence even when runtime deps are missing). Acceptable, or should availability also check a marker like _agent_deps_ok() that attempts a lightweight import openai (or similar) probe? Plan prefers the try/except route for simplicity \u2014 it's one boundary, not two.",
"Settled decisions are now cited explicitly in the Overview. If any of the 10 listed settled decisions needs to revert, flag it now \u2014 otherwise they stay locked for execution."
],
"success_criteria": [
{
"criterion": "megaplan/agent/ exists after subtree merge with run_agent.py, hermes_state.py, hermes_cli/, model_tools.py, and pyproject.toml present; merge commit preserves hermes-agent history (no --squash).",
"priority": "must",
"requires": [
"run_shell",
"read_files"
]
},
{
"criterion": "megaplan/agent/__init__.py contains an idempotent sys.path prepend shim guarded by if _agent_dir not in _sys.path. No other file inside megaplan/agent/ is modified by Job A.",
"priority": "must",
"requires": [
"read_files"
]
},
{
"criterion": "_is_agent_available(\"hermes\") in megaplan/workers.py and detect_available_agents() in megaplan/_core/io.py determine hermes presence by a filesystem check on megaplan/agent/run_agent.py \u2014 neither function contains import megaplan.agent, import run_agent, or any other shim-triggering import.",
"priority": "must",
"requires": [
"read_files"
]
},
{
"criterion": "AST-verified shim-trigger placement: the set of function definitions in megaplan/**/*.py (outside megaplan/agent/) that contain an import megaplan.agent statement is exactly {run_hermes_step, _run_check, _run_check} (where the two _run_check instances are in megaplan/review/parallel.py and megaplan/parallel_critique.py). Zero module-top import megaplan.agent or from megaplan.agent ... statements anywhere.",
"priority": "must",
"requires": [
"run_shell",
"read_files"
]
},
{
"criterion": "Strengthened isolation probe passes: a script that imports megaplan, calls _is_agent_available for each of claude/codex/hermes, and calls detect_available_agents() asserts sys.path is identical before and after. Must exit 0 without hermes runtime deps installed.",
"priority": "must",
"requires": [
"run_shell"
]
},
{
"criterion": "check_hermes_available deleted from megaplan/hermes_worker.py; grep -r \"check_hermes_available\" megaplan/ tests/ returns zero.",
"priority": "must",
"requires": [
"run_shell",
"read_files"
]
},
{
"criterion": "megaplan raises CliError(\"agent_deps_missing\", \"hermes backend requires: pip install 'megaplan-harness[agent]'\") on explicit hermes selection when runtime deps are missing. Path is: _is_agent_available(\"hermes\") returns True (vendored files exist), agent resolution proceeds, then run_hermes_step's try/except wrapping from run_agent import AIAgent converts the ImportError into the CliError. Verified by running megaplan --agent hermes <args> in a venv without [agent] extras.",
"priority": "must",
"requires": [
"run_shell",
"read_files"
]
},
{
"criterion": "megaplan/key_pool.py no longer references hermes-agent as a filesystem path; grep -n \"hermes-agent\" megaplan/key_pool.py returns zero.",
"priority": "must",
"requires": [
"run_shell",
"read_files"
]
},
{
"criterion": "megaplan/workers.py:1662-1665 generic no-agents error no longer says "Install ... hermes-agent"; text points at pip install 'megaplan-harness[agent]' for hermes.",
"priority": "must",
"requires": [
"read_files"
]
},
{
"criterion": "python -c \"import megaplan.hermes_worker, megaplan.workers, megaplan.review.parallel, megaplan.parallel_critique, megaplan._core.io, megaplan.key_pool\" exits 0 without hermes third-party runtime deps installed.",
"priority": "must",
"requires": [
"run_shell"
]
},
{
"criterion": "Hermetic shim-coverage probe passes: HOME=$(mktemp -d) python -c \"import megaplan.agent; from run_agent import AIAgent; from hermes_state import SessionDB; import model_tools; print('OK')\" exits 0 in a venv with [agent] extras.",
"priority": "must",
"requires": [
"run_shell"
]
},
{
"criterion": "megaplan/pyproject.toml declares [project.optional-dependencies] agent = [...] harvested verbatim from megaplan/agent/pyproject.toml.",
"priority": "must",
"requires": [
"read_files"
]
},
{
"criterion": "Step 3.3 audit of gateway/cron/honcho_integration references in megaplan/agent/**/*.py is performed before Step 7 deletions. Each directory is either (a) deleted with documented evidence that every reference is try/except-guarded or unreachable in Job A config, OR (b) retained with rationale mirroring the hermes_cli/ pattern. No unguarded-reference-plus-deleted-directory combination ships.",
"priority": "must",
"requires": [
"run_shell",
"read_files",
"subjective_judgment"
]
},
{
"criterion": "Full pytest tests/ passes with the existing sys.modules[\"run_agent\"]/sys.modules[\"hermes_state\"] fake pattern unchanged.",
"priority": "must",
"requires": [
"run_tests"
]
},
{
"criterion": "skills/, tools/, acp_adapter*, acp_registry*, environments/, hermes_cli/ remain present under megaplan/agent/.",
"priority": "must",
"requires": [
"read_files"
]
},
{
"criterion": "megaplan --help runs without error AND a post-run sys.path check confirms no mutation.",
"priority": "should",
"requires": [
"run_shell"
]
},
{
"criterion": "README install instructions advertise pip install 'megaplan-harness[agent]' (quoted) and drop pip install hermes-agent.",
"priority": "should",
"requires": [
"read_files"
]
},
{
"criterion": "Root-level benchmark JSON files in megaplan/agent/ are deleted without removing schema/config JSON needed by vendored code.",
"priority": "should",
"requires": [
"run_shell",
"subjective_judgment"
]
},
{
"criterion": "A real hermes-backed phase run completes end-to-end after [agent] extras install.",
"priority": "info",
"requires": [
"inspect_runtime_ui"
]
}
],
"assumptions": [
"hermes-agent's default branch is main; fall back to master.",
"Subtree merge preserves full history (no --squash).",
"megaplan/agent/__init__.py is the ONLY new/modified file under megaplan/agent/ in Job A: a ~10-line sys.path shim.",
"Availability helpers (_is_agent_available, detect_available_agents) determine hermes presence by filesystem existence of megaplan/agent/run_agent.py \u2014 no imports, no shim trigger. This guarantees zero sys.path side effects on non-hermes flows (handle_setup_global, _runtime_fallback_candidates, resolve_agent_mode fallback).",
"The import megaplan.agent shim trigger appears in exactly three function bodies: hermes_worker.run_hermes_step (once), review/parallel._run_check (twice \u2014 lines 80-81 and 209-210), parallel_critique._run_check (once). Every trigger is textually immediately before a real from run_agent import AIAgent / from hermes_state import SessionDB line.",
"Because _is_agent_available(\"hermes\") now returns True whenever vendored files exist (even with missing runtime deps), the agent_deps_missing UX guarantee is preserved by wrapping the real-execution from run_agent import AIAgent block inside run_hermes_step with a try/except ImportError that raises CliError(\"agent_deps_missing\", ...). This routes the end-to-end UX through try/except, not through availability gating.",
"Step 3.3 audits references to gateway, cron, honcho_integration inside megaplan/agent/. If every reference is inside try: ... except ImportError (or inside a function unreachable in Job A config), delete per brief. Otherwise, retain the specific directory with rationale \u2014 same pattern as hermes_cli/.",
"The Step 9.2 isolation probe exercises the ACTUAL non-hermes paths that previously leaked: import megaplan, _is_agent_available for each agent, detect_available_agents. Asserts sys.path identical before/after \u2014 the concrete regression guard the gate asked for.",
"No test changes \u2014 sys.modules[\"run_agent\"]/[\"hermes_state\"] fakes continue to intercept.",
"All other settled decisions (shim-over-rewrite, hermes_cli retention, [agent] extra, key_pool fix, --no-squash, Job-B fences, hermetic HOME=$(mktemp -d) probe) are locked and carried forward unchanged."
],
"delta_from_previous_percent": 44.81,
"structure_warnings": []
}
code
Plan structure warnings from validator:
[]
Existing flags:
[
{
"id": "verifiability-0",
"concern": "Criterion 16: requires human verification (subjective_judgment).",
"status": "open",
"severity": "minor"
},
{
"id": "verifiability-1",
"concern": "Criterion 17: requires human verification (inspect_runtime_ui).",
"status": "open",
"severity": "minor"
},
{
"id": "correctness",
"concern": "Are the proposed changes technically correct?: The shim fixes the old namespace-rewrite problem, but it introduces a new process-wide import-side effect that is broader than the plan claims. The plan says the sys.path prepend is acceptable because megaplan is 'invoked as a CLI in its own process', yet megaplan/__init__.py:10-16 imports _core and workers, and megaplan/cli.py:24-32 imports _core during ordinary startup; with Step 5 adding module-top import megaplan.agent to _core/io.py and megaplan/workers.py, routine import megaplan or megaplan --help would prepend megaplan/agent/ to sys.path even on non-hermes paths. I confirmed the behavior with a minimal repro: importing an _core module that imports megaplan.agent at module load moved the vendored directory to sys.path[0] immediately.",
"status": "addressed",
"severity": "significant"
},
{
"id": "scope",
"concern": "Search for related code that handles the same concept. Is the reported issue a symptom of something broader?: The shim changes a broader surface than the idea text suggests. This is no longer just a hermes_worker integration concern: because megaplan.cli and even top-level megaplan/__init__.py import _core and workers, the planned module-top import megaplan.agent lines would make ordinary library import and CLI startup mutate global import resolution for common names like agent, tools, utils, skills, and environments, even when the user never selects hermes.",
"status": "addressed",
"severity": "significant"
},
{
"id": "all_locations",
"concern": "Does the change touch all locations AND supporting infrastructure?: Flagged that deleting gateway/, cron/, and honcho_integration/ is not a pure dead-code cleanup: vendored discovery still references those modules through model_tools.py and run_agent.py, so the plan is relying on import-failure fallback plus restricted toolsets.",
"status": "addressed",
"severity": "significant"
},
{
"id": "verifiability-2",
"concern": "Criterion 15: requires human verification (inspect_runtime_ui).",
"status": "open",
"severity": "minor"
},
{
"id": "FLAG-006",
"concern": "Import isolation: Recurring debt: the shim is no longer triggered at module import, but _core/io.detect_available_agents() is still a generic helper called from handle_setup_global() and worker fallback paths, so import megaplan.agent there would still mutate sys.path outside hermes-only execution.",
"status": "addressed",
"severity": "significant"
},
{
"id": "supporting-infra-1",
"concern": "Supporting infrastructure: deleting gateway/, cron/, and honcho_integration/ is a real behavior change because vendored tool discovery still references those modules; the plan depends on import-failure fallback rather than truly unreachable code.",
"status": "open",
"severity": "minor"
},
{
"id": "correctness-1",
"concern": "Are the proposed changes technically correct?: Flagged that _core/io.detect_available_agents() is still called from non-hermes flows (megaplan/cli.py:694 and megaplan/workers.py:1602,1660), so the function-local shim there would still mutate sys.path outside hermes-only execution.",
"status": "addressed",
"severity": "significant"
},
{
"id": "correctness-2",
"concern": "Are the proposed changes technically correct?: Flagged that the new import megaplan isolation probe would miss that remaining path, because the side effect happens when detect_available_agents() is called later, not during package import.",
"status": "addressed",
"severity": "significant"
}
]
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"
]
},
{
"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/vendor-hermes-agent-into-the-20260422-0112/critique_output.json
Read this file first — it contains 5 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.
Every check must end with at least one finding. Never leave a findings array empty. If you found no issue, add one detailed flagged: false finding explaining what you checked and why it appears clear.
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 5. 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.
{"checks":[{"id":"issue_hints","question":"Did the work fully address the issue hints, user notes, and approved plan requirements?","findings":[{"detail":"Checked the repo-backed brief deltas the earlier iterations were worried about: megaplan/key_pool.py still has the sibling ../hermes-agent/auto_improve/api_keys.json fallback, megaplan/workers.py still tells users to install hermes-agent, and README.md:23 still says pip install megaplan-harness hermes-agent. The revised plan explicitly rewrites all three and documents the intentional hermes_cli/ retention, so those hint-driven mismatches are covered.","flagged":false}]},{"id":"correctness","question":"Are the proposed changes technically correct?","findings":[{"detail":"Checked the actual hermes execution paths and found the new agent_deps_missing conversion is only planned inside megaplan/hermes_worker.py:run_hermes_step, but hermes superrobust paths do not go through that function. megaplan/parallel_critique.py:_run_check and megaplan/review/parallel.py:_run_check plus _run_criteria_verdict still import run_agent and hermes_state directly, so with vendored files present but runtime deps missing those paths would still raise raw ImportError or generic worker failure instead of the promised CliError(\"agent_deps_missing\", ...).","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":"Checked the broader megaplan hermes import surface and found four real import sites across three functions, not the three-call-site surface the plan locks in. Beyond megaplan/hermes_worker.py:run_hermes_step, the repo also imports Hermes directly in megaplan/parallel_critique.py:_run_check, megaplan/review/parallel.py:_run_check, and megaplan/review/parallel.py:_run_criteria_verdict; the last one is a separate execution site, not a second _run_check.","flagged":true}]},{"id":"all_locations","question":"Does the change touch all locations AND supporting infrastructure?","findings":[{"detail":"I checked the supporting validation against the repo's actual import sites and found Step 9.1's AST gate is internally inconsistent with the code surface it is supposed to guard. The repo's second review import site is _run_criteria_verdict in megaplan/review/parallel.py, but the plan says the only shim-bearing functions should be {run_hermes_step, _run_check, _run_check}; as written, a correct implementation that shims _run_criteria_verdict would fail the gate, while an implementation that forgets that function could still satisfy the named-set check.","flagged":true}]},{"id":"callers","question":"Find the callers of the changed function. What arguments do they actually pass? Does the fix handle all of them?","findings":[{"detail":"Checked the actual callers of the hermes-backed execution paths. megaplan/handlers/critique.py routes multi-check hermes critiques to run_parallel_critique(...), and megaplan/handlers/review.py routes superrobust hermes review to run_parallel_review(...); neither caller goes through run_hermes_step, so the proposed try/except in run_hermes_step does not handle all explicit-hermes callers that the plan's success criteria claim to cover.","flagged":true}]}],"flags":[{"id":"correctness-3","concern":"Hermes dependency handling: explicit hermes selection still fails incorrectly on parallel critique/review because only run_hermes_step converts ImportError into CliError(\"agent_deps_missing\", ...).","category":"correctness","severity_hint":"likely-significant","evidence":"megaplan/handlers/critique.py:104-124 and megaplan/handlers/review.py:371-382 dispatch hermes to run_parallel_critique / run_parallel_review, whose worker functions in megaplan/parallel_critique.py:41-52 and megaplan/review/parallel.py:71-81,200-210 import run_agent and hermes_state directly. The revised plan only adds the dependency-to-CliError conversion inside megaplan/hermes_worker.py:run_hermes_step."},{"id":"all_locations-1","concern":"Execution-site coverage: the plan and its AST gate omit megaplan/review/parallel.py:_run_criteria_verdict, which is a separate hermes execution site that also needs the shim and any missing-dependency handling.","category":"completeness","severity_hint":"likely-significant","evidence":"megaplan/review/parallel.py:200-210 defines _run_criteria_verdict() with direct from hermes_state import SessionDB and from run_agent import AIAgent, but Step 5 and Step 9.1 describe the review surface as two _run_check imports only and the success criterion's expected function set excludes _run_criteria_verdict."}],"verified_flag_ids":["correctness","scope","all_locations","FLAG-006","correctness-1","correctness-2"],"disputed_flag_ids":[]}