# ResearchProcess code classification manifest (RP2/#265) Doctrine: detection may be aggressive; deletion must be conservative. This manifest classifies every research-execution code path. **RP11/#274 EXECUTED 2026-09-09** — RP10 proven (PR #279 merged); safe paths retired: `research_backend.py` (run_full_research self-walk + --watch), `run_research_stage.py`, `run_agent_stage.py` (+ its test), the three legacy research workflows, and the split-stage prompt templates. Retired stage names remain ONLY inside the RETIRED_STAGES guard that blocks them. Classifications: CURRENT | ADAPT | SUPERSEDED | COMPATIBILITY | TEST_FIXTURE | DEBUG_ONLY | UNKNOWN_PURPOSE ## Canonical execution path (CURRENT) | Path | Role | Notes | |---|---|---| | `scripts/research_task_tree.py` | canonical stage model | ISSUE→INWARD→OUTWARD→APPLICABILITY→(INNOVATION)→ADVERSARIAL→SYNTHESIS→QUALIFY; RETIRED_STAGES guard; conditional INNOVATION routing | | `scripts/research_stage_executor.py` | one-stage executor | stage-trigger boundary, idempotency, placement gate wired into execute() | | `scripts/research_define.py` | ISSUE gate compiler | deterministic, needs_mimo hardwired False (compat shim) | | `scripts/research_inward_context.py` | INWARD context builder | deterministic + bounded MiMo flag | | `scripts/research_prompt_compiler.py` | stage prompt compiler | canonical templates incl. issue.md, applicability.md | | `scripts/research_event_relay.py` | event streaming | ResearchEventRelay, tool receipts | | `scripts/research_artifact.py` | artifact validation | structured-artifact gate | | `scripts/research_router.py` | OUTWARD routing | academic/software/web classification | | `scripts/runner_evidence.py` | placement evidence | runtime hostname/runner capture + Pi rejection gate | | `scripts/fake_worker.py` | TEST_FIXTURE | deterministic pipeline tests | | `prompts/research-stages/*.md` | stage templates | issue.md + applicability.md added RP2 | ## SUPERSEDED (retire in RP11 after RP10 proof; DO NOT DELETE NOW) | Path | Superseded by | Classification | Evidence | |---|---|---|---| | `scripts/research_backend.py::run_full_research()` | one-stage-per-StageReady executor | RETIRED 2026-09-09 (self-walking loop, §26.6) | `while stage_count < max_stages` local advance loop; called by `--issue` CLI path and `--watch` loop | | `scripts/research_backend.py --watch` | Gitea-authorized StageReady events | RETIRED 2026-09-09 (poll-loop supervisor, §26.7) | `while True: gitea_api(...); time.sleep(POLL_INTERVAL)` — deterministic reconciliation only, but watches+launches whole processes rather than single stages | | `scripts/run_research_stage.py` | `research_stage_executor.py` | ADAPT → verify before RP3 | single ref from one workflow | | `scripts/run_agent_stage.py` | unified OUTWARD executor | UNKNOWN_PURPOSE | only self-referential test found; investigate in RP11 | | old stage names `DEFINE`/`OUTWARD_DISCOVERY`/`OUTWARD_READING` | ISSUE / unified OUTWARD | COMPATIBILITY (executor returns RETIRED_STAGE; advance raises) | cannot become READY through canonical path — regression-tested | | `prompts/research-stages/outward_discovery.md`, `outward_reading.md`, `define.md` | outward.md, issue.md | COMPATIBILITY (not routed by canonical compiler for new runs) | verify no dynamic selection in RP11 | | `.gitea/workflows/research-dispatcher.yml`, `research-stage-headless.yml` dispatch semantics | StageReady → desktop executor | ADAPT | runs-on: rune-ci-desktop already correct; stage input default `DEFINE` must move to `ISSUE` | ## Issues classified as disposable acceptance history (26.8) - #245, #254, #255, #256, #260, #261, #262: `research-pending` trigger labels removed 2026-09-08 (RP0) — no stale process can redispatch. - #263: closed+superseded with evidence note; artifacts preserved at `/mnt/workdrive/research-stage/research/issue-263/`. ## tui-restart-pending (legacy permission/restart mechanism) Classification: **SUPERSEDED CANDIDATE** (not removed). The pending restart procedure existed to fix permission flags for the OLD research dispatch flow. The corrected canonical path does not depend on it. Verify before RP11 removal that no current hook still reads the flag file. ## RP11 acceptance checklist (carried forward from handoff §26.11) - one canonical authority per responsibility (stage model, StageReady, execution, eligibility, artifact schema, gate, persistence, TUI projection, runner placement, refinement routing) - no production self-walking loop; no foreground sleep/poll supervisor - no heavy-cognition path targeting the Pi - old stage names cannot become READY (already proven: test_retired_stages_cannot_become_ready) - one real progression issue still completes after cleanup