research: integrations outcome + rich wizard cards + coordinator template
ci / gates (push) Successful in 6s
ci / frontend (push) Successful in 39s
ci / rust (push) Successful in 22m15s
ci / e2e (push) Has been skipped
ci / publish (push) Successful in 2m40s

Adds a fifth outcome kind ('integrations') tuned for the "audit repo,
survey papers, propose a menu of concrete integrations" use case.
Every INT-XX item is self-contained (what, how, where, prereqs, effort,
risk, testing, rollback, acceptance) so a downstream loop can execute
one per iteration.

Backend:
- Migration 0041 drops + re-adds the outcome_kind CHECK constraint
  with 'integrations' allowed. Existing rows unaffected.
- VALID_OUTCOMES gains 'integrations'.
- New deliverable_template(kind) returns the canonical section shape
  for each outcome — spec, prod_plan, roadmap, paper, integrations all
  get first-class treatment (prior: all shared a bare label).
- build_coordinator_task injects an ARTIFACT SHAPE block from the
  template into the coordinator prompt, so the final synthesis
  actually matches the promise the wizard made.

Frontend:
- OutcomeKind gains 'integrations'.
- ResearchWizard OUTCOMES list carries a `sections` array per kind.
- Selected card renders an "ARTIFACT WILL CONTAIN" preview so users
  pick by seeing what they'll get, not by reading a one-line hint.
- Integrations card gets the fullest preview (executive summary +
  INT-XX card shape) since it's the most structured deliverable.

Follow-ups queued (next commit): loop wizard "Import from research
artifact" bridge + one-INT-per-iteration mode.
This commit is contained in:
Omar Sobh
2026-07-09 18:42:46 -07:00
parent 3bcd18bf50
commit 3ed1d03d2b
4 changed files with 192 additions and 10 deletions
@@ -45,18 +45,54 @@ const TOPOLOGIES: { kind: TopologyKind; label: string; hint: string }[] = [
},
];
const OUTCOMES: { kind: OutcomeKind; label: string; hint: string }[] = [
{ kind: "spec", label: "Spec", hint: "A structured technical specification." },
const OUTCOMES: {
kind: OutcomeKind;
label: string;
hint: string;
/** Optional: what the artifact will contain. Shown as a preview on the
* wizard card so users pick by seeing what they'll get. */
sections?: string[];
}[] = [
{
kind: "spec",
label: "Spec",
hint: "Technical spec: problem, interfaces, data model, acceptance criteria.",
sections: ["Problem", "Goals + non-goals", "Interfaces", "Data model", "Alternatives", "Acceptance criteria"],
},
{
kind: "prod_plan",
label: "Prod plan",
hint: "A prioritized product/execution plan.",
hint: "Prioritized execution plan with P0/P1/P2 workstreams and milestones.",
sections: ["Objective", "Success metrics", "Workstreams", "Milestones", "Risks", "Definition of done"],
},
{
kind: "roadmap",
label: "Roadmap",
hint: "Horizon roadmap — Now / Next / Later with cross-cutting concerns.",
sections: ["Vision", "Now (0-6w)", "Next (6-16w)", "Later (16w+)", "Cross-cutting"],
},
{ kind: "roadmap", label: "Roadmap", hint: "A phased horizon roadmap." },
{
kind: "paper",
label: "Paper",
hint: "A short scientific-style paper with methods + findings.",
hint: "Short scientific paper with methods, findings, related work.",
sections: ["Abstract", "Background", "Method", "Findings", "Discussion", "References"],
},
{
kind: "integrations",
label: "Integration plan",
hint:
"Audit the bound repo + survey papers → prioritized menu of concrete " +
"INT-XX items (what · how · where in architecture · effort · risk · " +
"acceptance). Loops can consume one item per iteration.",
sections: [
"Executive summary",
"INT-XX cards (P0/P1/P2)",
"· What it is + source paper(s)",
"· How to accomplish",
"· Where in the architecture (file paths)",
"· Prereqs, effort, risk, testing, rollback",
"· Acceptance criteria",
],
},
];
@@ -317,9 +353,48 @@ export function ResearchWizard({
onChange={() => setOutcome(o.kind)}
style={{ marginTop: 2 }}
/>
<div>
<div style={{ flex: 1, minWidth: 0 }}>
<div style={{ fontWeight: 600, color: "#f3f3f5" }}>{o.label}</div>
<div style={{ fontFamily: mono, fontSize: 11, color: "#8a8a92" }}>{o.hint}</div>
<div style={{ fontFamily: mono, fontSize: 11, color: "#8a8a92", lineHeight: 1.4 }}>
{o.hint}
</div>
{o.sections && outcome === o.kind ? (
<div
style={{
marginTop: 8,
padding: "8px 10px",
borderRadius: 6,
background: "rgba(255,255,255,.02)",
border: "1px solid rgba(255,255,255,.06)",
}}
>
<div
style={{
fontFamily: mono,
fontSize: 9,
letterSpacing: ".1em",
color: "#5a5a62",
marginBottom: 4,
}}
>
ARTIFACT WILL CONTAIN
</div>
<ul
style={{
margin: 0,
paddingLeft: 16,
fontFamily: mono,
fontSize: 10.5,
color: "#c3c3c8",
lineHeight: 1.5,
}}
>
{o.sections.map((s) => (
<li key={s}>{s}</li>
))}
</ul>
</div>
) : null}
</div>
</label>
))}