Claude-Code-parity /workflows TUI + workflow prompting improvements - #30
Conversation
…ovements TUI: restyle the /workflows navigator's phases and agents views into the two-pane layout Claude Code uses — a left "Phases" box and a right "<phase> · N agent" box sharing one top/bottom border, a "›" selection caret, "● name model Nk tok" agent rows, and a two-line header with a right-aligned "done/total agents · tokens". Width-safe (collapses to a single pane below ~37 cols); the runs and detail views and all key bindings are unchanged. The one render snapshot test is updated to the new layout. Prompting: - agent.ts: give every subagent (not only schema agents) the framing that it is a subagent whose only returned result matters and that it has no parent/repo context it was not given. - workflow.ts: verify() defaults move from 2 reviewers / 0.5 to 3 / 0.66 so a tie no longer passes — a clear majority is required to confirm. - workflow-tool.ts: document the default finder -> verify -> merge/rank/cap fan-out shape, and that each subagent should get a substantive task rather than a trivial one-file read or a check-on-another-agent. - effort-command.ts: note ultracode is session-only / not persisted and that exhaustive runs should set explicit token/agent caps. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Thanks for this, @paulbrav — the two-pane navigator looks great and the prompting tweaks are sensible. Build and unit tests are green as-is; a few things I'd like to see before merging:
-
Single-pane phase coloring (
src/workflow-ui.ts).renderSinglePanecallsleftPhaseRow(..., [], ...)with an empty agents array, sophaseStatusColorcan't see running/error state and those phases fall back to dim. The two-pane path passesmodel.agents(runId, p.title)— could you thread the per-phase agents through here the same way? Completed phases still color correctly (that usesp.done/total), so it's only running/error that's affected. -
Width-safety test. The new phases/agents render tests all run at width 80, i.e. the two-pane path. Since the headline feature is the sub-37-column collapse, could you add a test that renders below the single-pane threshold and asserts the fallback to
renderSinglePane(full-width, no two-pane divider)? That path is currently uncovered. -
verify() default change. Bumping reviewers 2 to 3 / threshold 0.5 to 0.66 is a good call — a 1-1 tie shouldn't confirm. Since it changes behavior and adds ~50% reviewer cost per verify for default callers, could you just call it out in a CHANGELOG/release-note line so it isn't a silent default change?
None of these are blockers on the functionality — they're about covering the new render path and not shipping a silent default change. Happy to merge once they're in.
|
The TUI work here is high quality — I built the merge commit against current main and got tsc clean, 746/746 green, and the width behavior (37-col collapse, shared frame) checks out exactly as described. Also glad to see the header sums per-agent tokens rather than run-level Two asks:
Minor notes, non-blocking: persisted runs render "0 tok" per agent (per-agent tokens aren't persisted — pre-existing gap your layout makes visible), and the scroll indicator only shows overflow below, not above. |
Resolve conflict in src/workflow-tool.ts by keeping main's lazy promptGuidelines getter (QuintinShaw#49) and inserting PR QuintinShaw#30's two additional guideline strings (finder->verify->merge shape; substantive self-contained subagent tasks) into that array.
|
Landing this now. I pushed the integration directly to your branch ( The two-pane renderer is really nice work — 757/757 green, tsc clean, and I ran a real end-to-end workflow against it to confirm the wiring. The |
Two related sets of changes that bring pi-dynamic-workflows closer to Claude Code's dynamic-workflows experience.
/workflowsTUI — two-pane layoutRestyle the navigator's phases and agents views to match Claude Code's
/workflows:<phase> · N agentbox sharing one top/bottom border (┌ … ┬ … ┐/└ … ┴ … ┘)›selection caret and● name model Nk tokagent rows with right-aligned token countsdone/total agents · tokensWidth-safe — collapses to a single full-width pane below ~37 columns. The runs and detail views and all key bindings are unchanged; the one render snapshot test is updated to the new layout.
After:
Prompting
verify()defaults move from 2 reviewers / 0.5 to 3 / 0.66, so a 1-1 tie no longer passes (a clear majority is required to confirm a finding).Verification
npm run build(tsc): cleannpm run test:unit: 725/725 passbiome check: clean🤖 Generated with Claude Code