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_coordinatorwithreport_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
/researchpremise): FALSIFIED atresearchCommand.ts:80-86,95-107. - V3 (workflow-controller reentrancy): VERIFIED hostile —
workflowController.ts:56-61force-aborts the prior controller. - V4 (SEC-3 path traversal in
--resume): VERIFIED atfeatureCommand.ts:75-80. - V5 (askUser unattended): VERIFIED — direct path at
CoordinatorEngine.ts:1074lacks the check that the tool path at line 1338 has; under attended UI absent it hangs, not "returns empty".
- V1 (no JS-side harvest buffer for inquisitor partials): VERIFIED at
- 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
/featureis the right template — not/research,/init, or/code-review. Only/featurealready drivescoordinator.askUserdeterministically from JS and iterates stages imperatively. Counter-researcher's ALT-2 (extend/research --interactive) is falsified (critic V2):researchCommand.ts:80-86,95-107shows/researchbuilds a single mega-prompt and returns — the LLM does all dispatch; it spawns no workers from JS, does not iterate stages, and does not callaskUser. (Primary verdict + critic V2.)- ~17 helpers reusable (primary inventory):
parseFeatureArgs(slug+flag parser),resolvePlanSlug,slugify,createPlanDir(src/utils/planDir.ts),runWorkflowStagesper-stage-prompt mode (⚠️ but see DEC-8),coordinator.askUserdirect path (CoordinatorEngine.ts:1074),snapshotAgentIds/waitForStageWorkers, thespawn_workercoordinator tool handler (coordinator/tools/spawn_worker.ts), the*.role.mdfile format andSkillRegistry.getRole(),atomicWriteFile(src/utils/atomicWrite.ts— note: name isatomicWriteFile, notatomicWrite), thetopologysetState pattern inFleetStateStore, andparseFrontmatterarray-of-objects support (added post-T-153). - Workflow-runner per-stage-prompt mode applies only if
/brainstormends up usingrunWorkflowStages. 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-workerpartial_resultbuffer accessible from JS.report_to_coordinatorenvelopes are formatted byMessageBus.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:tsmessageBus.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_coordinatorbody MUST be machine-parseable JSON (template instruction baked into eachinquisitor-*.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).outputafteragent.completed") is non-viable if inquisitors exit viareport_to_coordinatorwithout 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-brainstormcalling a nestedrunWorkflowStages(as primary originally implied) would destroy the outer/featureworkflow mid-flight.- This drives DEC-8:
/brainstormwalks its stage list directly from the command handler. It does NOT callrunWorkflowStages. 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
| ID | Severity | Location | Fix |
|---|---|---|---|
SEC-3 path traversal in --resume <slug> | HIGH | featureCommand.ts:75-80 | isPathInsideDir(resolvedDir, planRoot) + regex /^[a-z0-9][a-z0-9-]{0,63}$/ |
askUser unattended hang (direct path) | HIGH | CoordinatorEngine.ts:1074-1097 | Mirror the unattended short-circuit from the tool path at line 1338 (~10 LOC) |
User answers re-fed without wrapUntrusted (SEC-2) | HIGH | wherever round-2 prompts re-include round-1 answers | wrapUntrusted() from src/utils/promptInjectionGuard.ts:78 |
atomicWriteFile default mode 0o600 | LOW | src/utils/atomicWrite.ts:24 | Callers pass {mode: 0o644} explicitly (NFR-10/NFR-20) |
| Topic string not sanitized when used as feature arg | MED | featureCommand.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-brainstormchain.src/skills/workflows/parser.brainstorm.test.ts— parsebrainstorm.workflow.mdend-to-end; stage count; preQuestions; artifact field.src/skills/SkillRegistry.brainstorm.test.ts— three inquisitor roles discoverable viagetRole(name)after bundled-asset cache rebuild.
- Reusable test helpers (per context-researcher DEP citations):
makeContext(),STAGE_PROMPTS,makeMockRegistry(),makeHandler({onUserInput}),MemoryPersistencepatterns, the crew-override hijack defense pattern atresearchCommand.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:
/researchalready drivesaskUserdeterministically and would only need an--interactiveflag (~200 LOC). - Verdict: FALSIFIED by critic V2 via direct read of
researchCommand.ts:80-86,95-107./researchis 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, noaskUsercall from JS, nospawn_workercall from JS. - Conclusion: ALT-2 would require building the same JS orchestration
/featurealready 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)=5fleet-wide; 3 inquisitors take 3 of 5 slots; under/loop-targetthis 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 honorstate.session.unattendedby 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 --unattendedwould hang silently. - FR-22 — Validate
--resume <slug>and--from-brainstorm <slug>arguments with regex/^[a-z0-9][a-z0-9-]{0,63}$/ANDisPathInsideDir(resolvedDir, planRoot). Backport to/feature --resumeto 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()fromsrc/utils/promptInjectionGuard.ts:78. Closes SEC-2. - FR-24 — Write a
.brainstorm-completesentinel file in.plans/<slug>/after both artifact files are written.--resumerejects 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 | emptystatus in.brainstorming.context.mdunder a newinquisitor_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 toatomicWriteFile. (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-roundflag 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/brainstormartifacts 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 the00-vs existing01-brainstorming.mdartifact 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 corrected —
atomicWrite→atomicWriteFile(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 reinterpreted —
00-prefix still applies to standalone/brainstormartifacts in their own slug dir. Under the revised FR-19,--deep-brainstormdoes not write any00-file inside a/featureslug — the00-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-roundflag (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
UserInputDialogempty-submit (EC-3) and multi-line paste (EC-4) latent bugs. Pre-existing inUserInputDialog.tsxlines 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
priorityfield 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 asanswer: "[skipped by user]"and not fed forward as untrusted text. ⚠️ ASSUMPTION; alternative is a UI choice viaaskUser({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; onceagent.completedevents 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-brainstormchains to--from-brainstorm, are the two slug dirs left as sibling dirs forever, or does/featuremove / symlink brainstorm artifacts into the feature dir for discoverability? Recommend: leave as siblings; the feature slug's01-brainstorming.mdpointer-file (per FR-16) cites the brainstorm slug. Document indocs/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:
UserInputDialogempty-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 indocs/commands-manual.md. The bugs are not/brainstorm-specific. - Q-D7: PERF-1 fleet-concurrency starvation — does
/brainstormreserve dedicated worker slots, or compete normally against/loop-targetand 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 --unattendedbe 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 —WorkerPromptComposerdoes NOT auto-inject.fleet/context/*.md; call mirrorsfeatureCommand.ts:126), the secondmessageBus.subscribe('coordinator', …)(DEC-2), a JSwhile (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),atomicWriteFilecalls 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.mdandbrainstorm/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) addingisPathInsideDir+ slug-regex validation. Closes SEC-3 in/feature --resumesimultaneously. - FR-21 patch to
CoordinatorEngine.askUserdirect path atCoordinatorEngine.ts:1074-1097(~10 LOC mirror of the unattended short-circuit currently only at line 1338). src/utils/brainstormContext.ts(~30 LOC):parseBrainstormContext(filePath)wrappingparseFrontmatter(). Validatesschema_version <= 1(FR-18).- Registration in
src/commands/registry.tsBUILTIN_COMMANDSandCOMMAND_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
| Rank | Risk | Owner phase | Mitigation |
|---|---|---|---|
| R1 | Inquisitor harvest correctness — JSON parse failures, partial reports, malformed payloads | Design + Build | DEC-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) | Design | Pointer-file in feature slug + docs |
| R3 | Prompt-injection via re-fed answers (SEC-2) | Build | FR-23 wrapUntrusted on every re-feed |
| R4 | Path traversal in --resume / --from-brainstorm (SEC-3) | Build | FR-22 regex + isPathInsideDir; backport to /feature |
| R5 | askUser hang under --unattended (V5) | Build | FR-21 mirror of line 1338 into line 1074 |
| R6 | Workflow controller abort if nested (C-4) | Design | DEC-8: walk stage list directly, never call runWorkflowStages |
| R7 | Topology restore race vs concurrent /loop (IR-7) | Build | try/finally + Q-D5 ordering documented in handler |
| R8 | Fleet concurrency starvation (PERF-1) — 3 inquisitors take 3 of 5 default slots | Test | Q-D7 documented as known; NFR-1/NFR-2 weakened |
| R9 | UserInputDialog latent bugs (EC-3 empty submit / EC-4 multi-line paste) | Q-D6 | Accept as OOS-15 for v1; document in commands-manual |
8. Decisions ratified by research (for Phase 4 to adopt)
- DEC-1: Clone
/featurepattern, 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 whosefromRoleis one of the three inquisitor roles. ~30 LOC. No new MessageBus API. (Critic C-3;MessageBus.ts:226-251.) - DEC-3:
/brainstormartifacts live in their own slug dir.--deep-brainstormcomposes 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.mdhuman-readable +00-brainstorming.context.mdmachine-readable) kept.schema_version: 1retained 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 checksschema_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-roundflag is dropped from v1 (now OOS-13). (Resolves T-1 contradiction.) - DEC-6: FR-21 (askUser unattended fix) and FR-22 (slug-regex +
isPathInsideDirwith 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 eachinquisitor-*.role.mdsystem prompt. (Resolves Q-PIVOTAL secondary; ratify final shape in Phase 4 design.) - DEC-8:
/brainstormdoes NOT callrunWorkflowStages— the command handler walks its stage list directly via a JSwhileloop. (Resolves C-4 / V3 hostile guard atworkflowController.ts:56-61; consistent with IR-6.)
9. Phase exit criteria
- [x] 4 parallel research explorers ran in parallel and reported via
report_to_coordinatorwithreport_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
/featurebugs 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.