Endpoints
Body content types accepted on PUT and preview-compose:
application/json, text/yaml, application/yaml. JSON envelope shape { template, enabled? } or { template_yaml, enabled? } is also accepted; bare-template JSON works too. Idempotency-Key header required on PUT/DELETE.
Body size limits: 128 KiB alignment / 64 KiB protection (mirrors org-scope template limits).
Alignment template schema
A team-scope alignment template is a partial Alignment Card. The composer reads the same field paths the agent card reads, but a template legitimately omits fields that are author-specific (agent_id, card_version, etc. — see allow-list).
Fields that are typically authored at team scope:
Other
audit.* fields (trace_format, queryable, query_endpoint, tamper_evidence) are platform-scoped: a team may propose values, but the composer ignores them in favor of the platform values. Teams cannot widen the platform’s audit-storage commitments.
Protection template schema
A team-scope protection template is a partial Protection Card. Fields:Template-scope allow-list
The server-side validator reuses the agent-card validator with one accommodation: certain fields that are required on a full agent card are legitimately absent on a template. The validator filters validation errors keyed to these field paths + therequired-class rules:
required, required_enum, required_when_typed, non_empty. Other validation rules (enum membership, BOUNDARY rejection, disjoint-action checks, regex syntax for forbidden_tools.pattern, etc.) still apply.
Composition output
GET /v1/alignment/team/{team_id}?include=sources returns the team-scope sources envelope — the three contributing layers (platform / org / team) plus the composed result:
available: false for a layer that has no enabled contribution; my_role is the caller’s effective role on the team. The dashboard team-template editor renders the four rows (platform, org, team, composed). ?include=sources is an all-scope feature — each scope (agent / org / team / platform) returns a scope-appropriate envelope. The agent-scope envelope adds an agent layer and a teams[] array (an agent can belong to several teams); a solo agent with zero teams therefore sees teams: [].
Audit + recompose
Successful PUT or DELETE emits agovernance_audit_log row:
metadata carries org_id, team_name, and agents_flagged_for_recompose (the count of canonical-card rows scoped to this team’s active agents that were flipped to needs_recompose=true).
The recompose fan-out is scoped to the team’s agents only — never a blanket org flip. Background recompose then re-runs the composer for each flagged agent against the new template.
See also
- Team Scope (concept) — model overview
- Alignment Card Schema — full agent-card schema (template is a partial form)
- Protection Card Schema
- Card Composition — the layered cascade