feat(examples-chat): Phase 3B — subagents#224
Merged
Conversation
Splits Phase 3 of the canonical demo's roadmap into 3A (interrupts — shipped in PRs #222 + #223) and this 3B (subagents). Adds a compiled child graph (`research`) the parent dispatches as a tool, surfaces `<chat-subagents>` in the demo shell, and adds one welcome suggestion. Mirrors Phase 3A's shape: ~90 LOC, single PR, TDD'd python graph + Angular shell wiring + welcome suggestion + CHECKLIST + verification. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Single-subagent-dispatch plan for Phase 3B. ~90 LOC across 7 phased tasks (Phases 0-6). TDD'd python graph (research subgraph + tool), Angular adapter config (subagentToolNames), shell wiring (chat-subagents mount), welcome suggestion, CHECKLIST, server-side verification probe, and PR open. Mirrors the Phase 3A plan format committed at daf31f89. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Layers subagents onto the canonical demo by adding a compiled child graph (
research) that the parent dispatches as a tool. Surfaces<chat-subagents>in the demo shell. Adds one welcome suggestion.ResearchStateTypedDict +research_nodeasync function + compiledresearch_subgraph(single-node child graph) +research@toolwhose body awaitsresearch_subgraph.ainvoke(...). Bound on the parent in 2 places (bind_tools,ToolNode); zero new graph edges. SYSTEM_PROMPT extended by one paragraph instructing the parent to dispatchresearchfor in-depth topic questions.subagentToolNames: ['research']passed to theagent({...})factory indemo-shell.component.ts. This populatesagent.subagents()fromtools:<id>-namespaced child stream events that the SubagentTracker keys on.ChatSubagentsComponentfrom@ngaf/chat; add toimportsarray; mount<chat-subagents [agent]="agent" />in a fixed-position panel above the chat input via@if (agent.subagents && agent.subagents().size > 0).<chat-subagents>filters to active (non-complete) subagents internally, so the card flashes during the child run and disappears once the parent has the summary back. Persisting the card after completion is a Phase 4+ concern.Spec:
docs/superpowers/specs/2026-05-08-canonical-chat-demo-phase-3b-subagents-design.mdPlan:
docs/superpowers/plans/2026-05-08-canonical-chat-demo-phase-3b-subagents.mdPhase 4+ (generative UI, time travel, multi-thread) is later.
Test plan
Verified locally
Pending visual verification
(Visual sweep continues against issue #214; rolls together with the next iteration.)
🤖 Generated with Claude Code