How suge8/firecode works
FireCode is a Pi coding-agent extension for parallel sub-agents, adversarial multi-model review, and a streamlined terminal UI. A user request enters Pi’s agent workflow; the Master can delegate work, review can send findings back for repair and re-review, and delivery routes results into the session. Watcher advice is an independent, optional branch. The excerpts establish shared busy-state, delivery, and tool-rendering behavior; several domain internals are unsampled, so their documented capabilities are shown without inferred call chains.
Main entry points: index.ts Extension registration · run.ts Master coordinator · review/index.ts Review loop · busy.ts Shared activity state
Components 23
Extension setup
- Extension registration
index.ts - Configuration
config.ts
Delegation
- Master coordinator
master/run.ts - Master actions and tools
master/actions.ts - Sub-agent sessions
spawn.ts - Worker activity and views
master/worker-view.ts
Review and advice
- Review loop
review/index.ts - Review state machine
review/state.ts - Review evidence
review/evidence.ts - Watcher observer
watcher/index.ts
Session runtime
- Model providers
provider/claude-sub.ts - OpenAI native provider
provider/openai-native/src/extension.ts - Message delivery
deliver.ts - Shared activity state
busy.ts - Session round records
round.ts - Agent tools
tools/index.ts
Terminal interface
- Tool output projection
tools/group-view.ts - Status bar
statusbar/index.ts - Text formatting
format.ts - Activity indicator
flame.ts - Preset and quota commands
session/presets.ts
Other components
- User
- Pi agent host
Connections 26
- User → Pi agent host: requests work
README.md - Pi agent host → Extension registration: loads extension
index.ts - Extension registration → Configuration: loads settings
index.ts - Extension registration → Master coordinator: registers coordinator
index.ts - Extension registration → Review loop: registers review
index.ts - Extension registration → Watcher observer: registers watcher
index.ts - Extension registration → Model providers: registers provider
index.ts - Extension registration → OpenAI native provider: registers provider
index.ts - Master coordinator → Master actions and tools: dispatches actions
master/index.ts - Master coordinator → Sub-agent sessions: spawns agents
README.md - Master coordinator → Worker activity and views: publishes activity
- Review loop → Review state machine: reduces events
review/index.ts - Review loop → Review evidence: builds evidence
review/index.ts - Review loop → Message delivery: delivers feedback
review/index.ts - Watcher observer → Message delivery: delivers advice
watcher/index.ts - Watcher observer → Shared activity state: observes activity
watcher/index.ts - Master coordinator → Shared activity state: publishes activity
master/index.ts - Session round records → Shared activity state: tracks activity
round.ts - Message delivery → Pi agent host: sends session messages
deliver.ts - Agent tools → Pi agent host: executes host tools
tools/index.ts - Agent tools → Tool output projection: renders tool output
tools/index.ts - Tool output projection → Text formatting: formats content
tools/group-view.ts - Status bar → Shared activity state: reads activity
statusbar/index.ts - Status bar → Text formatting: formats status
statusbar/index.ts - Status bar → Activity indicator: renders activity
statusbar/index.ts - User → Preset and quota commands: switches presets
README.md