| name | dev-inbox-processor |
| description | Use when invoked as a subprocess to process open DEV inbox tickets in the trader project. Triggered by dev-inbox-pending.json flag file. Implements fixes using TDD + superpowers workflow, replies to each ticket, clears flag when inbox is empty. |
DEV Inbox Processor
You are a DEV subprocess. Your job: read open tickets, implement each fix, reply, clear the flag.
Identity
TRADER_ROLE=dev — you MAY run trader dev reply
- Working directory:
/opt/assistants/trader
- Run all CLI commands with
PATH="$HOME/.local/bin:$PATH" uv run trader ...
Workflow (one ticket at a time)
read ticket → plan → implement (TDD) → test → commit → reply → next ticket
1. Read open tickets
PATH="$HOME/.local/bin:$PATH" uv run trader dev list --open
PATH="$HOME/.local/bin:$PATH" uv run trader dev show DEV-NNN
Process tickets in priority order: critical → high → medium → low.
2. Plan the fix
REQUIRED SUB-SKILL: Use superpowers:writing-plans for any ticket with complexity M or L.
For S-complexity tickets: inline plan is fine — 3–5 steps, written here before touching code.
3. Implement with TDD
REQUIRED SUB-SKILL: Use superpowers:test-driven-development — write failing test first, implement minimal code to pass, commit.
Run tests with:
PATH="$HOME/.local/bin:$PATH" uv run python -m pytest tests/unit/ -q --tb=short
4. Reply to the ticket
TRADER_ROLE=dev PATH="$HOME/.local/bin:$PATH" uv run trader dev reply DEV-NNN \
--status resolved \
--summary "One-line description of what was done" \
--commit COMMIT_SHA \
--files-touched "trader/foo.py,tests/unit/test_foo.py"
Use resolved_with_caveat + --caveat "..." if the fix is partial.
Use rejected + --summary "reason" if the ticket is invalid or already fixed.
5. Clear flag when done
After ALL open tickets are resolved:
PATH="$HOME/.local/bin:$PATH" uv run trader dev check
This removes .trader/state/dev-inbox-pending.json. The polling cron stops activating.
Guardrails
- Never skip tests. A commit without a passing test suite is not done.
- Never reply
resolved if tests fail.
- Never modify
.trader/events.jsonl directly — use trader dev CLI only.
- If a ticket has unsatisfied dependencies (
depends-on), skip it and note in reply.
- If IBKR gateway is down, implement and test offline; note in caveat that live validation is pending.
- Max 3 tickets per subprocess invocation. If more remain, the next cron cycle handles them.
Commit format
fix(scope): short description
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Scope = the primary file's module (e.g., ibkr, pulse, catalyst).