Skip to content

Commit 062897e

Browse files
authored
feat: Claude-Code-parity /workflows two-pane TUI (#30)
Two-pane (Phases | agents) navigator renderer with shared frame, ANSI-aware width handling, scroll windows, and narrow-terminal single-pane degrade. Includes workflow-tool/effort-command prompting refinements. Co-authored-by paulbrav.
1 parent 707b876 commit 062897e

4 files changed

Lines changed: 455 additions & 17 deletions

File tree

src/effort-command.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export function createEffortState(): EffortState {
2727
const HIGH_DIRECTIVE =
2828
"Effort: HIGH. Be thorough — use a few parallel reviewers/perspectives and an adversarial verify pass (see verify()/judgePanel()); set a moderate tokenBudget and maxAgents on the workflow tool call.";
2929
const ULTRA_DIRECTIVE =
30-
"Effort: ULTRA. Be exhaustive — fan out widely (more reviewers/judges, deeper loopUntilDry rounds, a completenessCheck at the end), set a generous tokenBudget and a high maxAgents on the workflow tool call, and prefer the big tier for synthesis.";
30+
"Effort: ULTRA. Be exhaustive — fan out widely (more reviewers/judges, deeper loopUntilDry rounds, a completenessCheck at the end), and prefer the big tier for synthesis. This can spend a lot of tokens quickly, so set explicit caps you're comfortable paying for (a generous but bounded tokenBudget and a high maxAgents) on the workflow tool call rather than leaving them unbounded.";
3131

3232
/** The extra directive appended to the forced-workflow prompt for an effort level. */
3333
export function effortDirective(level: EffortLevel): string | undefined {
@@ -69,7 +69,7 @@ export function registerEffortCommand(pi: ExtensionAPI, state: EffortState): voi
6969
// `/ultracode` turns it on, `/ultracode off` turns it off. Alias for /effort ultra.
7070
pi.registerCommand("ultracode", {
7171
description:
72-
"Ultracode: standing maximal-effort mode — auto-arms an exhaustive workflow for substantive messages. /ultracode off to stop.",
72+
"Ultracode: standing maximal-effort mode (this session only, never persisted) — auto-arms an exhaustive workflow for substantive messages. /ultracode off to stop.",
7373
async handler(args: string, _ctx: ExtensionCommandContext) {
7474
const arg = args.trim().toLowerCase();
7575
const say = (content: string) => pi.sendMessage({ customType: "effort", content, display: true });

src/workflow-tool.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,8 @@ export function createWorkflowTool(options: WorkflowToolOptions = {}): ToolDefin
185185
"For workflow, use low concurrency and agentRetries for unstable provider/transport fan-out runs; retries apply only to recoverable agent failures and still require explicit null handling after exhaustion.",
186186
"For workflow, failed agent(), parallel(), or pipeline() branches return null and log the failure unless the workflow is aborted. Check for nulls before synthesizing conclusions.",
187187
"For workflow, include a final synthesis/assertion agent when combining multiple subagent results; return a compact JSON-serializable value with ok/verdict plus the important outputs.",
188+
"For workflow, the default quality shape for fan-out work is finder -> verify -> merge: run one agent per angle or work-unit (in parallel), pass each candidate finding through verify() and drop the unconfirmed, then a single synthesis agent that de-duplicates, ranks by confidence/severity, and caps the output. If nothing survives verification, return an empty result and say so rather than padding.",
189+
"For workflow, give each subagent a substantive, self-contained task: do not spawn an agent just to read one file or run one command, and do not use one agent only to check on another. Prefer fewer, higher-level agents over many trivial micro-tasks.",
188190
"For workflow, if agent() needs machine-readable output, pass a plain JSON Schema via opts.schema; agent() will return the validated object. Use JSON Schema syntax, not TypeScript or TypeBox constructors.",
189191
modelRoutingGuideline(() => manager.getModelRegistry()),
190192
agentTypeGuideline(),

0 commit comments

Comments
 (0)