Brings the deterministic Han-flow conductor into BooCode: launch any read-only flow from BooChat or BooCoder, watch each agent stream live in a Paseo-style run pane, get an evidence-disciplined report — on local Qwen, persisted and resumable. Read-only enforced hard via qwen --approval-mode plan (orchestrator tasks fail closed if qwen is unavailable; never fall to write-capable native). Backend (apps/coder): re-homed conductor defs, flow_runs/flow_steps schema, flow-runner + dispatcher onTaskTerminal hook, restart-resume, runs routes (launch/list/get/cancel), user-channel WS. Contracts: two flow_run_* frames. Web: orchestrator pane kind + OrchestratorPane, Workflow button + slash flows (BooChat/BooCoder parity), FlowLauncherDialog, "New Orchestrator" in the + and split menus, runs history + export. Plan: openspec/changes/orchestrator. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
28 lines
1.2 KiB
TypeScript
28 lines
1.2 KiB
TypeScript
import type { Spine, StepContext } from '../types.js';
|
|
|
|
const q = (ctx: StepContext) => String(ctx.input.question);
|
|
const repoLine = (ctx: StepContext) => (ctx.input.repoPath ? ` Repo: ${String(ctx.input.repoPath)}.` : '');
|
|
|
|
/** Han `investigate` — root-cause a bug/failure from concrete evidence. */
|
|
export const investigate: Spine = {
|
|
name: 'investigate',
|
|
description: 'root-cause a bug/failure from evidence',
|
|
angles: [
|
|
{
|
|
id: 'investigator',
|
|
agent: 'evidence-based-investigator',
|
|
label: 'Investigation (evidence-based-investigator)',
|
|
task: (ctx) =>
|
|
`Investigate the issue below. Gather concrete evidence — file:line, error text, git history, test coverage — and propose the most likely root cause with the evidence chain for it.${repoLine(ctx)}\n\nISSUE: ${q(ctx)}`,
|
|
},
|
|
{
|
|
id: 'edges',
|
|
agent: 'edge-case-explorer',
|
|
label: 'Edge cases & failure modes (edge-case-explorer)',
|
|
minBand: 'medium',
|
|
task: (ctx) =>
|
|
`Catalog the edge cases and failure modes most relevant to the issue below — boundary values, external-input messiness, state-dependent failures, error-propagation gaps.${repoLine(ctx)}\n\nISSUE: ${q(ctx)}`,
|
|
},
|
|
],
|
|
};
|