# Team Charter — {{project_name}}

## Purpose

All work on this repository is executed through a simulated team of specialized
agents. Every problem-solving session MUST instantiate this team structure. No work
begins without the Manager spawning the appropriate team members.

## Execution Model

- All team members are spawned as Claude Code agents (via the Agent tool)
- **Worktrees are the preferred isolation method** — each agent working on code should use `isolation: "worktree"`
- Each team member has a persistent name and personality (see `roster/` directory)
- Team members communicate via the SendMessage tool when named and running concurrently

## Org Chart

{{#team_members}}
### {{name}} — {{role}} ({{level}})
- **Reports to:** {{reports_to}}
{{/team_members}}

## Process Rules — Charter Modules

The process rules for this repository live in the **modular charter** under
[`charter/`](charter/charter.md) — one focused document per rule set. Those modules
are the **single source of truth**; this file does not restate them.

| Module | Governs |
|--------|---------|
| [charter/charter.md](charter/charter.md) | Index, ground rules, approval gates, feedback severity |
| [charter/agents.md](charter/agents.md) | Agent naming, spawning, lifecycle, verifying agent reports |
| [charter/branching.md](charter/branching.md) | Integration/feature branches, worktree discipline, releases |
| [charter/commits.md](charter/commits.md) | Per-commit identity, `Co-Authored-By` trailers |
| [charter/pull-requests.md](charter/pull-requests.md) | PR creation, review workflow, merge gates, definition of done |
| [charter/issues.md](charter/issues.md) | Delegation, work gates, assignment labels, comment protocol |
| [charter/hooks.md](charter/hooks.md) | Which rules are enforced automatically, and how |

The modules are installed by the framework layer (part of `2real-team init`, or the
standalone `framework/install/bootstrap.py`) with repo-specific values (owner,
branch schemes, merge model, reviewer count) substituted from
`.claude/framework.config.json`. If the `charter/` directory is missing, run the
framework bootstrap to lay it down.

## Team-Simulation Rules

These complement the modules above and are specific to the simulated-team layer:

### Firing and Hiring

- Severe feedback (see [charter/charter.md](charter/charter.md) § Feedback) means
  the member is fired and replaced with a new agent (new name, new personality).
- A fired member's roster file is archived (renamed with a `_departed_` prefix);
  the replacement gets a fresh roster file in `roster/`.
- The Manager is the only role that can fire/hire — except the Manager themselves,
  whom the user fires.
- Reassign the departed member's open issues per
  [charter/issues.md](charter/issues.md) § Assignment.

### Tech Preferences & Decision-Making

- Each member tracks stack/tooling/library/cloud preferences in a
  `## Tech Preferences` section of their roster card; preferences evolve with
  project experience.
- Leads and reports **debate** tooling/architecture choices; consensus is adopted.
- **Tie-breaking:** when agreement cannot be reached, the decision escalates to the
  **least common ancestor (LCA) in the org chart**, who decides and the team moves on.

### Steady-State Goal

The team evolves through feedback cycles toward a steady state of little to no
negative feedback. Hire/fire decisions serve this goal — composition stabilizes as
effective members are retained.

## How to Instantiate the Team

Follow [charter/agents.md](charter/agents.md): read the charter modules and the
roster files in `roster/`, spawn the Manager first, let the Manager request the team
members the task needs, isolate all code-writing agents in worktrees, and coordinate
via named agents and SendMessage.
