TradeMasterAPI uses a chain of specialized agents to move a product intent from idea → shipped code. Each agent has a single lane; handoffs are explicit.
user intent
│
▼
┌─────────────────┐
│ product-manager │ breaks intent into atomic GitHub cards with acceptance criteria,
│ │ links each to an epic, adds `needs-grooming`
└─────────────────┘
│
▼
┌─────────────────┐ ┌──────────────────┐
│ card-groomer │◀──▶│ product-manager │ groomer refines; PM clarifies intent
│ │ │ │ when a card is ambiguous
└─────────────────┘ └──────────────────┘
│
▼
┌─────────────────────┐
│ software-architect │ when a card is too big / cross-cutting / security-sensitive:
│ │ writes docs/architecture/<topic>.md + ADRs, splits into sub-cards
└─────────────────────┘
│
▼
┌──────────────────┐
│ feature-developer│ takes a groomed, sized card. Lands backend + frontend + tests
│ │ behind a flag. Opens PR. Hands off to ux-polisher.
└──────────────────┘
│
▼
┌──────────────────┐
│ ux-polisher │ iterates on the same branch: layout, density, tooltips, loading
│ │ / empty / error states, keyboard paths, a11y. Pushes polish commits.
└──────────────────┘
│
▼
human review + merge
│
▼
(later) flag flip PR
| Agent | Creates | Modifies | Never touches |
|---|---|---|---|
| product-manager | GitHub issues | — | code, PRs |
| card-groomer | issue comments, issue labels | — | code, closes issues, issue bodies |
| software-architect | design docs, ADRs, sub-issues | — | application code, PRs |
| feature-developer | branch, commits, PR, tests, flag entry | backend + frontend code + tests | auth paths without escalation |
| ux-polisher | commits on the developer's branch | frontend code + CSS + tests | backend logic |
Co-Authored-By: trailers in commits (user pref)isolation: "worktree" for mutation agentsWhen invoking feature-developer or ux-polisher via the Agent tool, always pass isolation: "worktree". Claude Code spawns the subagent in its own git worktree (shared .git dir, separate working tree at .claude/worktrees/agent-<id>/) so the subagent's Edit/Write operations don't contend with:
Observed 2026-04-22: without worktree isolation, three parallel feature-developer dispatches all hit hard Write/Edit permission walls — Claude Code's mutation-safety heuristic triggers when multiple agents share a working tree. With worktree isolation, a single dispatch and parallel dispatches both work cleanly.
# Correct — mutation agent, worktree-isolated
Agent({
subagent_type: "feature-developer",
isolation: "worktree", # required for parallel + recommended even solo
run_in_background: true,
prompt: "...self-contained brief..."
})
For software-architect, product-manager, card-groomer, marketing-strategist, business-legal-researcher, ux-designer, bookkeeper — worktree isolation is still recommended when running in parallel with other agents, but not strictly required for solo design/research work (those agents mostly write docs + file GitHub issues, which don't collide with source-code mutation).
Caveats to know:
pip install and external-process spawn are sandbox-restricted separately from worktree isolation. If an agent needs new Python deps, it may need to mock them via sys.modules injection and let CI install them for real. Same for direct pytest invocations — CI runs tests, agent writes them.requirements.txt = conflict bound to happen).Product manager breaking down a new initiative:
Task product-manager to break down "production release to Heroku with versioning + docs + marketing site" into epic + sub-cards
Architect designing the auth layer:
Task software-architect to design multi-user auth with WebAuthn passkeys and GDPR compliance
Developer implementing a groomed sub-card:
Task feature-developer to implement #94 (WebAuthn registration endpoint)
UX polish on a developer's PR:
Task ux-polisher to polish PR #123
Groomer sweeping:
Task card-groomer to triage the open backlog
Each lane is optimized for its concern: PM for scope, groomer for quality, architect for constraints, developer for correctness, polisher for elegance. Mixing concerns means none get done well.
The pipeline also means a human reviews the PR with a specific question: "did feature-developer satisfy the card, and did ux-polisher polish it?" The reviewer's job is scoped, not open-ended.