Documentation
¶
Overview ¶
Package fleet turns an operator's plan into a working agent team.
The generating model NEVER writes files. It proposes a manifest; this package validates it and writes the tree. Two reasons that split matters:
- `.claude/` is a protected path. Writes there are not auto-approved in default or acceptEdits mode and are denied outright in dontAsk, and `permissions.allow` does not pre-approve them. Making it work would mean granting bypassPermissions to a session that just ingested an untrusted operator plan.
- Writing from Go makes the namespace contract mechanical: every generated file is recorded, so a later regeneration can tell its own output from something a human edited.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentSpec ¶
type AgentSpec struct {
Slug string `json:"slug"`
DisplayName string `json:"display_name"`
// Description is the delegation trigger — it is what the router matches on,
// so a vague one makes the agent unreachable.
Description string `json:"description"`
Role string `json:"role"` // orchestrator | builder | advisor | reviewer
Model string `json:"model"` // haiku | sonnet | opus | inherit
Areas []string `json:"areas"`
Tools []string `json:"tools"`
Skills []string `json:"skills"`
Persona string `json:"persona"` // the system prompt body, markdown
}
type AgentsService ¶
type AgentsService struct {
// contains filtered or unexported fields
}
func NewAgentsService ¶
func NewAgentsService(db *sql.DB, log *slog.Logger) *AgentsService
func (*AgentsService) Routes ¶
func (s *AgentsService) Routes(r chi.Router)
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator turns a plan into a fleet.
type Manifest ¶
type Manifest struct {
Summary string `json:"summary"`
Agents []AgentSpec `json:"agents"`
Skills []SkillSpec `json:"skills"`
Notes []string `json:"notes,omitempty"`
}
Manifest is what the generator returns.
func (*Manifest) Validate ¶
Validate normalizes the manifest and reports every problem at once, so a regeneration prompt can be given the full list rather than one error per round.
func (*Manifest) Write ¶
func (m *Manifest) Write(root string) ([]WrittenFile, error)
Write renders the manifest into `<root>/.claude/`.
Generated files land in their own namespace and are recorded in manifest.json, so a later run can distinguish its own previous output from a file a human has since edited — and never clobber the latter.
type Progress ¶
Progress is reported back to the wizard as the phases advance, so a run that takes ten minutes does not look like a hang.
spentUSD is included because a ten-minute run showing $0.00 throughout gives the operator no way to tell a cheap run from an expensive one until it is over — by which point the money is spent.
type WrittenFile ¶
type WrittenFile struct {
Path string `json:"path"`
SHA256 string `json:"sha256"`
Owner string `json:"owner"`
}
WrittenFile records one file the generator produced.