Teams
A team is a group of agents working together on a wish. The team-lead orchestrates, engineers build, reviewers validate β all in isolated git worktrees with shared state.Creating a Team
- Creates a git worktree for isolated work
- Spawns a team-lead agent
- Registers the team in
~/.genie/teams/<name>.json - The team-lead reads the wish and dispatches workers
Team Structure
Every team has a hierarchy:Worktree Isolation
Each team works in its own git worktree:- Isolation β each team has its own working tree, no merge conflicts between teams
- Shared state β
.genie/directory is shared viagit rev-parse --git-common-dir - Clean cleanup β
genie team disbandremoves the worktree
Team Lifecycle
| Phase | What happens |
|---|---|
| Create | Worktree created, team-lead spawned |
| Active | Engineers working on execution groups |
| Review | Work complete, reviewer validating |
| Done | PR created, team can be disbanded |
| Disbanded | Worktree removed, agents stopped |
Managing Teams
For full command details, see the Team CLI reference.Communication Within Teams
Direct Messages
Send a message to a specific agent:Team Broadcast
Message all team members:Reading Team Chat
.genie/chat/<team>.jsonl β a newline-delimited JSON log of all messages.
Autonomous Execution
When a team is created with a wish, the team-lead runs autonomously:- Reads the wish β parses execution groups and dependencies
- Dispatches groups β spawns engineers for independent groups in parallel
- Monitors progress β checks completion via
genie donesignals - Runs fix loops β if review returns FIX-FIRST, dispatches fix agents
- Creates PR β when review returns SHIP, creates the pull request
genie team create to PR can run without human intervention.
Native Teams (Claude Code Integration)
Genie integrates with Claude Codeβs native team feature:- Built-in teammate messaging via
SendMessage - Shared task lists in
~/.claude/tasks/<team>/ - Team-wide context through team config
Team State
| State | Location | Purpose |
|---|---|---|
| Team config | PostgreSQL teams table | Team metadata and member list |
| Worker registry | PostgreSQL agents table | Agent status and tmux sessions |
| Team chat | PostgreSQL team_chat table | Message history |
| Wish state | PostgreSQL tasks + task_dependencies | Execution progress |
Best Practices
One wish per team
One wish per team
Each team should focus on a single wish. If you have multiple wishes, create multiple teams.
Let the team-lead orchestrate
Let the team-lead orchestrate
Donβt micromanage β the team-lead knows the wish pipeline. Intervene only when blocked.
Use worktrees for parallel work
Use worktrees for parallel work
Worktrees prevent merge conflicts. Two teams working on different wishes in the same repo wonβt step on each other.
Disband when done
Disband when done
Teams consume tmux sessions and disk space. Disband after the PR is merged.