Skip to content

Phase 3 — Research

Plan: i-want-to-ea3316 — pre-feature /brainstorm workflow Date: 2026-05-21 Phase status: completed Inputs: 01-brainstorming.md, 02-requirements.md (FR-1..20, IR-1..10, NFR-1..19, OOS-1..12, RES-1..6)


0. Executive summary

Adversarial parallel research (4 explorers + 1 critic) validated the core premise of /brainstorm — coordinator-driven multi-agent grilling cloned from /feature — but materially reshaped the implementation plan. The single hardest design problem identified, harvesting inquisitor report_to_coordinator payloads into JS for deduplication, is resolved: a second MessageBus.subscribe('coordinator', handler) registered from brainstormCommand.ts taps every envelope in parallel with the LLM-injection path (multiple handlers per ID already supported at MessageBus.ts:226-251). This is ~30 LOC, requires no new MessageBus API, and falsifies the primary researcher's three under-estimated harvest options.

Research falsified the counter-researcher's headline pivot (ALT-2: extend /research --interactive). Verification at researchCommand.ts:80-86,95-107 confirmed /research is a prompt-and-return command — the LLM does all dispatch — so the counter's "~200 LOC vs ~600" estimate is unsupported. We stay the course on cloning /feature.

Research surfaced a more dangerous architectural risk than originally documented: workflowController.ts:56-61 does not silently nest a new controller — it force-aborts the prior one. This means /feature --deep-brainstorm calling a nested runWorkflowStages would kill the outer /feature workflow. The fix (DEC-8) is for /brainstorm to walk its stage list directly from the command handler, never invoking runWorkflowStages. This is consistent with IR-6 (loop in JS) and removes the reentrancy hazard at its root.

Three latent /feature bugs were discovered that /brainstorm must NOT inherit: (1) featureCommand.ts:75-80 --resume <slug> lacks isPathInsideDir — directly exploitable path-traversal today; (2) CoordinatorEngine.askUser direct path (line 1074) does not honor state.session.unattended — only the ask_user tool path at line 1338 does — so /feature --deep-brainstorm --unattended would hang rather than fail fast; (3) featureCommand.ts:135 sanitizes project context but not the feature-arg topic. We promote FR-21 (askUser unattended fix) and FR-22 (slug validation with backport to /feature) to in-scope, fold what was OOS-2 into FR-21, and add FR-23 (wrapUntrusted on re-fed answers) per SEC-2.

Finally, two internal contradictions were caught by the critic: T-1 (brainstorm doc step 5 vs FR-12 default about whether round-2 re-spawns inquisitors — collapsed into a single rewritten FR-5, FR-12 retired) and T-2 (--deep-brainstorm writing 00- artifacts colliding with /feature's existing 01-brainstorming.md — resolved by making --deep-brainstorm compose two sibling slug dirs via --from-brainstorm instead of inlining). Several optimistic numeric NFRs (NFR-1 <15s spawn, NFR-2 <3min total) are unbenchmarked and are weakened to best-effort targets, recast as ⚠️ ASSUMPTIONS for Phase 4.


1. Research methodology

  • 4 parallel explorer agents spawned (primary-researcher, counter-researcher, context-researcher, edge-case-researcher) under the adversarial-research pattern. Each was given a focused brief and reported via report_to_coordinator with report_type: partial_result.
  • 1 reviewer critic (research-critic) cross-referenced all four reports and VERIFIED the five strongest claims by direct source inspection:
    • V1 (no JS-side harvest buffer for inquisitor partials): VERIFIED at FleetManager.ts:525-533 + CoordinatorEngine.ts:676-696.
    • V2 (counter's ALT-2 /research premise): FALSIFIED at researchCommand.ts:80-86,95-107.
    • V3 (workflow-controller reentrancy): VERIFIED hostile — workflowController.ts:56-61 force-aborts the prior controller.
    • V4 (SEC-3 path traversal in --resume): VERIFIED at featureCommand.ts:75-80.
    • V5 (askUser unattended): VERIFIED — direct path at CoordinatorEngine.ts:1074 lacks the check that the tool path at line 1338 has; under attended UI absent it hangs, not "returns empty".
  • The critic also caught two internal contradictions (T-1, T-2) and an inconsistency (T-3) that no single explorer surfaced.

2. Verified findings

2.1 Architecture & reuse

  • /feature is the right template — not /research, /init, or /code-review. Only /feature already drives coordinator.askUser deterministically from JS and iterates stages imperatively. Counter-researcher's ALT-2 (extend /research --interactive) is falsified (critic V2): researchCommand.ts:80-86,95-107 shows /research builds a single mega-prompt and returns — the LLM does all dispatch; it spawns no workers from JS, does not iterate stages, and does not call askUser. (Primary verdict + critic V2.)
  • ~17 helpers reusable (primary inventory): parseFeatureArgs (slug+flag parser), resolvePlanSlug, slugify, createPlanDir (src/utils/planDir.ts), runWorkflowStages per-stage-prompt mode (⚠️ but see DEC-8), coordinator.askUser direct path (CoordinatorEngine.ts:1074), snapshotAgentIds/waitForStageWorkers, the spawn_worker coordinator tool handler (coordinator/tools/spawn_worker.ts), the *.role.md file format and SkillRegistry.getRole(), atomicWriteFile (src/utils/atomicWrite.ts — note: name is atomicWriteFile, not atomicWrite), the topology setState pattern in FleetStateStore, and parseFrontmatter array-of-objects support (added post-T-153).
  • Workflow-runner per-stage-prompt mode applies only if /brainstorm ends up using runWorkflowStages. Per DEC-8 it does not — so this reuse claim is informational only.

2.2 The inquisitor-harvest mechanism (RESOLVED)

  • Problem (GAP #2 / DEP-3, VERIFIED at FleetManager.ts:525-533 + CoordinatorEngine.ts:676-696): there is no per-worker partial_result buffer accessible from JS. report_to_coordinator envelopes are formatted by MessageBus.formatForInjection() and re-injected as text into the coordinator SDK queue. The coordinator LLM sees them; JS does not.

  • Solution (DEC-2): register a second subscriber on the message bus from brainstormCommand.ts:

    ts
    messageBus.subscribe('coordinator', (envelope) => {
      if (envelope.message.type !== 'text') return;
      const text = envelope.message.content;
      if (!text.startsWith('[partial_result] ')) return;   // prefix from FleetManager.ts:530
      if (envelope.fromRole !== 'inquisitor-ux' &&
          envelope.fromRole !== 'inquisitor-technical' &&
          envelope.fromRole !== 'inquisitor-edge-cases') return;
      accumulator.push({ from: envelope.fromAgentId, body: text.slice('[partial_result] '.length) });
    });

    Verified at MessageBus.ts:226-251: subscribe() stores handlers in an array (lines 227-229), so a second handler does not displace the LLM-injection handler. ~30 LOC. No new MessageBus API.

  • Inquisitor report_to_coordinator body MUST be machine-parseable JSON (template instruction baked into each inquisitor-*.role.md). Format ratified in Phase 4 (see Q-D1; DEC-7 recommends {questions: [{text, angle, priority}]}).

  • Resolves RES-1, RES-2, and Q-PIVOTAL (the single Phase-4 question the critic flagged). The primary researcher's option (c) ("read state.agents.get(id).output after agent.completed") is non-viable if inquisitors exit via report_to_coordinator without a final assistant message — the harvest must happen on the message bus.

2.3 Workflow controller hostility (NEW RISK — was AR-1 "unguarded", actually "hostilely guarded")

  • workflowController.ts:56-61: setActiveWorkflowController(c) does not silently nest. It force-aborts any prior controller with the reason 'replaced by a new active workflow controller'. So /feature --deep-brainstorm calling a nested runWorkflowStages (as primary originally implied) would destroy the outer /feature workflow mid-flight.
  • This drives DEC-8: /brainstorm walks its stage list directly from the command handler. It does NOT call runWorkflowStages. The workflow file shrinks to one iterative round-template stage.
  • Combined with DEC-3 (deep-brainstorm composes via sibling slugs, not nesting), the reentrancy hazard is removed at the root.

2.4 Latent /feature bugs — do NOT inherit

IDSeverityLocationFix
SEC-3 path traversal in --resume <slug>HIGHfeatureCommand.ts:75-80isPathInsideDir(resolvedDir, planRoot) + regex /^[a-z0-9][a-z0-9-]{0,63}$/
askUser unattended hang (direct path)HIGHCoordinatorEngine.ts:1074-1097Mirror the unattended short-circuit from the tool path at line 1338 (~10 LOC)
User answers re-fed without wrapUntrusted (SEC-2)HIGHwherever round-2 prompts re-include round-1 answerswrapUntrusted() from src/utils/promptInjectionGuard.ts:78
atomicWriteFile default mode 0o600LOWsrc/utils/atomicWrite.ts:24Callers pass {mode: 0o644} explicitly (NFR-10/NFR-20)
Topic string not sanitized when used as feature argMEDfeatureCommand.ts:135 (only project context sanitized)Canonical sanitizer at syntheticCommandBuilder.ts:156 + competeCommand.ts:197; reuse from /brainstorm for the topic string

2.5 Test coverage

  • 4 new / extended test files (per context-researcher's plan):
    • src/commands/brainstormCommand.test.ts — argument parsing, single-round flow, N_min loop termination, summarize / keep-grilling branches, artifact YAML round-trip, unattended refusal.
    • src/commands/featureCommand.test.ts (additions) — --from-brainstorm <slug>, missing-slug error with list, schema_version-too-new error, --deep-brainstorm chain.
    • src/skills/workflows/parser.brainstorm.test.ts — parse brainstorm.workflow.md end-to-end; stage count; preQuestions; artifact field.
    • src/skills/SkillRegistry.brainstorm.test.ts — three inquisitor roles discoverable via getRole(name) after bundled-asset cache rebuild.
  • Reusable test helpers (per context-researcher DEP citations): makeContext(), STAGE_PROMPTS, makeMockRegistry(), makeHandler({onUserInput}), MemoryPersistence patterns, the crew-override hijack defense pattern at researchCommand.test.ts:214-235.
  • 15+ new test cases catalogued by edge-case-researcher (slug regex, sentinel-file presence, partial-failure threshold, 8KB string cap, prompt-injection wrap, etc.) — to be expanded in Phase 6 (Tasks). The four explicit NFR-12/13/14 cases remain mandatory.

3. Falsified claims and rejected pivots

3.1 REJECTED: Counter-researcher's ALT-2 (extend /research --interactive)

  • Premise: /research already drives askUser deterministically and would only need an --interactive flag (~200 LOC).
  • Verdict: FALSIFIED by critic V2 via direct read of researchCommand.ts:80-86,95-107. /research is a prompt-and-return command: it builds one mega-prompt for the coordinator LLM, which does all worker dispatch and any user interaction itself. There is no JS-side stage loop, no askUser call from JS, no spawn_worker call from JS.
  • Conclusion: ALT-2 would require building the same JS orchestration /feature already has. The ~200 LOC estimate is unsupported. We stay the course on cloning /feature (DEC-1).

3.2 Over-confident / speculative claims flagged

These should be re-cast as ⚠️ ASSUMPTIONS in Phase 4 (Design), not load-bearing requirements:

  • "3 angles surface questions a single agent would miss" — HYPOTHESIS, no A/B data. The critic flagged this as unproven.
  • Counter's "Opus can enumerate all angles in one shot" — equally speculative.
  • NFR-1 <15s round-1 spawn-to-first-question — unbenchmarked, and contradicted by PERF-1 (default pLimit(maxConcurrency)=5 fleet-wide; 3 inquisitors take 3 of 5 slots; under /loop-target this target is unlikely to hold).
  • NFR-2 <3min total — unbenchmarked, excludes user think-time (the dominant factor for an interactive grilling tool).

→ All four to be re-cast as ⚠️ ASSUMPTIONS in Phase 4 with NFR-1/NFR-2 weakened (see §4.3).


4. Requirements amendments (proposed for Phase 4 ratification)

4.1 Promote to IN-SCOPE

  • FR-21 — Fix CoordinatorEngine.askUser() direct path to honor state.session.unattended by mirroring the existing check at line 1338 (tool path) into line 1074 (direct path). ~10 LOC. Promotes OOS-2 to in-scope. Without this fix, /feature --deep-brainstorm --unattended would hang silently.
  • FR-22 — Validate --resume <slug> and --from-brainstorm <slug> arguments with regex /^[a-z0-9][a-z0-9-]{0,63}$/ AND isPathInsideDir(resolvedDir, planRoot). Backport to /feature --resume to close SEC-3 in the existing command path.

4.2 New requirements (from edge-case-researcher; accepted)

  • FR-23 — Wrap all user-supplied answers re-fed to any agent (coordinator follow-ups in round 2+, or any future inquisitor re-spawn) with wrapUntrusted() from src/utils/promptInjectionGuard.ts:78. Closes SEC-2.
  • FR-24 — Write a .brainstorm-complete sentinel file in .plans/<slug>/ after both artifact files are written. --resume rejects a slug missing the sentinel (or treats it as "in progress" and offers to discard / restart from round 1, per IR-9). Closes EC-9 (two-file artifact atomicity not guaranteed across files).
  • FR-25 — Inquisitor success threshold = ≥1 inquisitor returns ≥1 parseable question. Record per-inquisitor success | parse_error | timeout | empty status in .brainstorming.context.md under a new inquisitor_status: field. If the threshold is not met, the command aborts with an actionable error before entering the grilling loop. (Closes EC-2 / R1.)
  • NFR-20 — Brainstorm artifacts written with explicit {mode: 0o644} passed to atomicWriteFile. (Closes SEC-5 / D-4.)
  • NFR-21 — Per-string length cap 8KB on individual questions and answers. Truncate with an elision marker (…[truncated, see NDJSON transcript]) and preserve the original in the per-worker NDJSON file under <sessionDir>.workers/. Prevents prompt-bomb DOS via paste.

4.3 Modified requirements

  • FR-5 modified — Round 1 spawns 3 inquisitors. Rounds 2+ use coordinator-only follow-ups (no re-spawn). Folds the prior FR-12 default into FR-5. (Resolves T-1: prior brainstorming-doc step 5 said inquisitors re-spawned on rounds 2+, FR-12 said the opposite; both can't be true. FR-12 was the more recent and correct intent.)
  • FR-12 retired — Default folded into FR-5. The opt-in --full-inquisitors-each-round flag is moved to OOS-13 (out of scope for v1; revisit if/when multi-agent-vs-coordinator-followup ROI data exists).
  • FR-19 modified/feature --deep-brainstorm "<topic>" no longer inlines /brainstorm artifacts into the feature's slug dir. Instead it (a) runs /brainstorm "<topic>" which creates its own brainstorm slug, then (b) auto-invokes /feature --from-brainstorm <newbrainstormslug> "<topic>". This (1) avoids the 00- vs existing 01-brainstorming.md artifact collision flagged as T-2, and (2) sidesteps the workflow-controller hostile-abort risk (C-4 / DEC-8). The two slug dirs are siblings under .plans/; cross-referenceable but independent. (Discoverability covered in Q-D4.)
  • FR-9 correctedatomicWriteatomicWriteFile (D-4 typo). Pass {mode: 0o644} per NFR-20. The artifact-atomicity guarantee in FR-9 is per file, not across the pair; FR-24's sentinel file is what restores the pairwise guarantee.
  • NFR-1 weakened — change "<15 s spawn-to-first-question, <30 s cold" to "best-effort under fleet idle; no hard SLA. Latency observable via /diagnose." Recast as ⚠️ ASSUMPTION pending benchmarks.
  • NFR-2 weakened — change "❤️ min total" to "no hard cap excluding user think-time; latency observable via /diagnose." Recast as ⚠️ ASSUMPTION.
  • IR-8 reinterpreted00- prefix still applies to standalone /brainstorm artifacts in their own slug dir. Under the revised FR-19, --deep-brainstorm does not write any 00- file inside a /feature slug — the 00- artifacts live in the brainstorm slug only.

4.4 OOS amendments

  • OOS-2 PROMOTED to in-scope as FR-21 (askUser unattended fix).
  • New OOS-13: --full-inquisitors-each-round flag (deferred from v1; depends on OOS-14 ROI data).
  • New OOS-14: A/B benchmark proving multi-agent inquisitor value vs single-agent grilling. Deferred. If v1 ships and metrics show low ROI, revisit FR-5.
  • New OOS-15: Fix for UserInputDialog empty-submit (EC-3) and multi-line paste (EC-4) latent bugs. Pre-existing in UserInputDialog.tsx lines 48-53 and 93. Not introduced by /brainstorm. See Q-D6 for scope decision.

5. Open questions for Phase 4 (Design)

5.1 Carry-forward from Phase 2 (RES-1..RES-6 resolutions)

  • RES-1 (deduplication algorithm across 3 inquisitor outputs): PARTIALLY RESOLVED by DEC-2 + DEC-7 (JSON harvest). Specific dedup heuristic remains a design choice — recommend lowercase-normalize + token-set Jaccard ≥ 0.6 + per-angle preference tie-break. ⚠️ ASSUMPTION; ratify in Phase 4.
  • RES-2 (prioritization heuristic when > 8 questions): OPEN for design. Recommended starting point: 1-per-angle floor (3 minimum), then highest priority field from inquisitor JSON (DEC-7), then lexicographic tie-break for determinism. ⚠️ ASSUMPTION.
  • RES-3 (per-inquisitor prompt template): OPEN for design. The role files must instruct (a) angle-discipline ("only UX questions"), (b) JSON output schema (DEC-7), (c) the 3-to-8 question count constraint from FR-4, (d) the "exit without writing files" constraint. No research evidence yet that any specific template wording maximizes quality — this is a craft-iteration task in Phase 4 / Phase 5 validation.
  • RES-4 (round-2+ coordinator follow-ups vs short-lived inquisitor spawn): RESOLVED by FR-5 modified (DEC-5) — coordinator-only follow-ups by default. The opt-in re-spawn is OOS-13. ⚠️ ASSUMPTION: coordinator context window is wide enough to retain round-1 transcript without summarization through round ~5; if v1 telemetry shows context exhaustion, add a transcript-compaction step.
  • RES-5 (user "skip this question" mid-round): OPEN for design. Recommend reserving the literal answer string skip (case-insensitive) as a sentinel parsed by the JS handler — appended to transcript as answer: "[skipped by user]" and not fed forward as untrusted text. ⚠️ ASSUMPTION; alternative is a UI choice via askUser({choices: [...]}).
  • RES-6 (Phase-2 seed-input format for /feature --from-brainstorm): OPEN for design. Two viable shapes: (a) verbatim Q&A pairs prepended to requirements prompt; (b) a coordinator-synthesized "Vision + Constraints + Open Questions" summary that quotes the Q&A inline. Recommend both — the context file (FR-14) already carries the structured Q&A; the requirements prompt consumes a synthesized digest derived from it. ⚠️ ASSUMPTION.

5.2 New open questions for design phase

  • Q-D1: Inquisitor reply format — JSON schema vs YAML vs markdown bullet list? Recommend JSON {questions: [{text, angle, priority}]} for parser simplicity and robustness against malformed-LLM-markdown. (See DEC-7.)
  • Q-D2: How does the coordinator know round 1 is complete and trigger the consolidation step? Recommend: the JS subscriber from DEC-2 accumulates per-inquisitor reports keyed by fromAgentId; once agent.completed events arrive for all 3 inquisitor IDs (or the FR-25 threshold + a configurable per-round timeout fires), the command emits a synthesis prompt to the coordinator with the consolidated question list.
  • Q-D3: Termination policy — fixed N rounds (--rounds <n> flag, FR-13) vs user-driven "summarize now" (FR-7) vs coordinator-detected "no new questions"? Today FR-7 + FR-13 cover (a) and (b); coordinator-detected (c) is OOS for v1.
  • Q-D4: When --deep-brainstorm chains to --from-brainstorm, are the two slug dirs left as sibling dirs forever, or does /feature move / symlink brainstorm artifacts into the feature dir for discoverability? Recommend: leave as siblings; the feature slug's 01-brainstorming.md pointer-file (per FR-16) cites the brainstorm slug. Document in docs/commands-manual.md.
  • Q-D5: IR-7 topology save/restore try/finally vs workflow-controller exit ordering (per critic T-5). Both must run on exit; document explicit ordering: topology restore runs in the command handler's outer finally, after any controller cleanup.
  • Q-D6: UserInputDialog empty-submit (EC-3) and multi-line paste (EC-4) bugs — fix as prerequisites, accept as v1 limitations, or scope to NFR hardening? Recommend: accept as v1 limitations (OOS-15) but document loudly in docs/commands-manual.md. The bugs are not /brainstorm-specific.
  • Q-D7: PERF-1 fleet-concurrency starvation — does /brainstorm reserve dedicated worker slots, or compete normally against /loop-target and other parallel work? Recommend competing normally for v1; document in NFR-1/NFR-2 weakening notes.
  • Q-D8 (NEW, from critic T-3 follow-on): once FR-21 ships, should /feature --deep-brainstorm --unattended be explicitly refused (no interactive grilling possible) or silently degrade to a single round of inquisitor-only output with no user grilling? Recommend refuse to keep semantics honest.

6. Implementation sketch (informational for Phase 4)

Approximate scope based on critic's verified findings:

  • src/commands/brainstormCommand.ts (~250-350 LOC): parseBrainstormArgs, resolveBrainstormSlug (with FR-22 SEC-3 fix), loadProjectContext() call (DEP-5 — WorkerPromptComposer does NOT auto-inject .fleet/context/*.md; call mirrors featureCommand.ts:126), the second messageBus.subscribe('coordinator', …) (DEC-2), a JS while (round < N_min || keepGrilling) loop that walks the round-template stage list directly (DEC-8, IR-6), topology save/restore in try/finally (IR-7, Q-D5), atomicWriteFile calls for both artifacts + the FR-24 sentinel file with {mode: 0o644}, and the FR-11 unattended refusal.
  • 3 role files under src/skills/bundled/roles/: inquisitor-ux.role.md, inquisitor-technical.role.md, inquisitor-edge-cases.role.md (~40 lines each — frontmatter + system prompt enforcing angle discipline, JSON output (Q-D1 / DEC-7), 3–8-question count, no-file-writes).
  • 1 workflow file + 1 stage prompt under src/skills/bundled/workflows/brainstorm/: brainstorm.workflow.md and brainstorm/round.prompt.md. Stages collapse to ONE iterative round template because the loop lives in the command handler (DEC-8).
  • FR-22 backport patch to parseFeatureArgs / resolvePlanSlug (src/utils/planDir.ts) adding isPathInsideDir + slug-regex validation. Closes SEC-3 in /feature --resume simultaneously.
  • FR-21 patch to CoordinatorEngine.askUser direct path at CoordinatorEngine.ts:1074-1097 (~10 LOC mirror of the unattended short-circuit currently only at line 1338).
  • src/utils/brainstormContext.ts (~30 LOC): parseBrainstormContext(filePath) wrapping parseFrontmatter(). Validates schema_version <= 1 (FR-18).
  • Registration in src/commands/registry.ts BUILTIN_COMMANDS and COMMAND_CATEGORIES (lines 53-58 and 178-215).

Tests: 4 new / extended test files per §2.5 + 15 new test cases per edge-case-researcher's catalogue.

Total estimate: ~600-800 LOC new + ~50 LOC patches + ~250 LOC tests. (Counter's "~200 LOC" via /research extension is invalid per V2 falsification.)


7. Risks ranked for design phase

RankRiskOwner phaseMitigation
R1Inquisitor harvest correctness — JSON parse failures, partial reports, malformed payloadsDesign + BuildDEC-7 JSON schema + parser tolerant of missing fields; FR-25 success threshold; per-inquisitor status in .context.md
R2--deep-brainstorm UX — two sibling slug dirs may confuse users (Q-D4)DesignPointer-file in feature slug + docs
R3Prompt-injection via re-fed answers (SEC-2)BuildFR-23 wrapUntrusted on every re-feed
R4Path traversal in --resume / --from-brainstorm (SEC-3)BuildFR-22 regex + isPathInsideDir; backport to /feature
R5askUser hang under --unattended (V5)BuildFR-21 mirror of line 1338 into line 1074
R6Workflow controller abort if nested (C-4)DesignDEC-8: walk stage list directly, never call runWorkflowStages
R7Topology restore race vs concurrent /loop (IR-7)Buildtry/finally + Q-D5 ordering documented in handler
R8Fleet concurrency starvation (PERF-1) — 3 inquisitors take 3 of 5 default slotsTestQ-D7 documented as known; NFR-1/NFR-2 weakened
R9UserInputDialog latent bugs (EC-3 empty submit / EC-4 multi-line paste)Q-D6Accept as OOS-15 for v1; document in commands-manual

8. Decisions ratified by research (for Phase 4 to adopt)

  • DEC-1: Clone /feature pattern, NOT /research, /init, or /code-review. (Critic V2 falsified counter's ALT-2.)
  • DEC-2: Harvest inquisitor partials via a second messageBus.subscribe('coordinator', …) filtering envelopes whose text starts with [partial_result] and whose fromRole is one of the three inquisitor roles. ~30 LOC. No new MessageBus API. (Critic C-3; MessageBus.ts:226-251.)
  • DEC-3: /brainstorm artifacts live in their own slug dir. --deep-brainstorm composes via --from-brainstorm <newslug> chaining, NOT inline injection into the feature slug. (Resolves T-2 artifact collision and C-4 workflow-controller reentrancy abort.)
  • DEC-4: Dual artifact (00-brainstorming.md human-readable + 00-brainstorming.context.md machine-readable) kept. schema_version: 1 retained in the context-file frontmatter (the counter's D-3 "YAGNI" challenge is overruled — schema versioning is cheap insurance for FR-18 forward-compat). However the runtime parser only checks schema_version <= 1; no migration code ships in v1 (matches OOS-11).
  • DEC-5: Multi-agent inquisitor spawn is round-1 only. Coordinator-only follow-ups for rounds 2+. --full-inquisitors-each-round flag is dropped from v1 (now OOS-13). (Resolves T-1 contradiction.)
  • DEC-6: FR-21 (askUser unattended fix) and FR-22 (slug-regex + isPathInsideDir with backport to /feature) are promoted to in-scope for this feature. (Resolves T-3 inconsistency between OOS-2 + FR-11 + FR-19.)
  • DEC-7: Inquisitor reply format = JSON {questions: [{text, angle, priority}]}. Format pinned in each inquisitor-*.role.md system prompt. (Resolves Q-PIVOTAL secondary; ratify final shape in Phase 4 design.)
  • DEC-8: /brainstorm does NOT call runWorkflowStages — the command handler walks its stage list directly via a JS while loop. (Resolves C-4 / V3 hostile guard at workflowController.ts:56-61; consistent with IR-6.)

9. Phase exit criteria

  • [x] 4 parallel research explorers ran in parallel and reported via report_to_coordinator with report_type: partial_result.
  • [x] Research-critic cross-referenced reports and VERIFIED 5 strongest claims by direct source inspection (V1–V5).
  • [x] Counter-recommendation (ALT-2 /research --interactive) evaluated and rejected with cited evidence (researchCommand.ts:80-86,95-107).
  • [x] Harvest architectural blocker (DEP-3 / GAP #2) resolved with concrete mechanism (DEC-2; ~30 LOC, no new API).
  • [x] Latent /feature bugs catalogued with severity + fix locations (§2.4).
  • [x] 5 new requirements proposed (FR-21..25 + NFR-20/21); 3 modified (FR-5, FR-9, FR-19); 1 retired (FR-12); 3 added to OOS (OOS-13/14/15).
  • [x] 8 design-phase open questions enumerated (Q-D1..Q-D8); RES-1..RES-6 carry-forward status documented.
  • [x] 8 ratifiable decisions (DEC-1..DEC-8) extracted.
  • [x] Risks ranked R1..R9.
  • [x] Artifact written.