---
name: "Split agent definitions from project.toml into agents.toml"
---

# Refactor 482: Split agent definitions from project.toml into agents.toml

## Current State

- TBD

## Desired State

Move all `[[agent]]` blocks from `.huskies/project.toml` into a separate `.huskies/agents.toml`. The server loads agents from agents.toml and merges with project.toml config. Falls back to inline `[[agent]]` blocks in project.toml for backwards compatibility. The watcher should detect changes to agents.toml and hot-reload. This is a prerequisite for bug 481 (scaffold copies default agents to new projects) — agents.toml becomes the embeddable template.

## Acceptance Criteria

- [ ] All [[agent]] blocks moved from .huskies/project.toml to .huskies/agents.toml
- [ ] Server loads agent config from agents.toml, falls back to inline [[agent]] in project.toml for backwards compat
- [ ] Watcher detects agents.toml changes and triggers hot-reload
- [ ] project.toml is significantly smaller (only project settings remain)
- [ ] agents.toml is the canonical default template for scaffolding (prerequisite for bug 481)
- [ ] All existing agent functionality unchanged

## Out of Scope

- TBD
