Skip to main content
This page documents the normative JSON Schemas for team-scope alignment + protection templates. Team templates share their on-the-wire shape with agent cards at the same kind: an alignment template is a partial alignment-card body; a protection template is a partial protection-card body. Server-side validation runs the same agent-card validators with a small allow-list of “may legitimately be omitted at template scope” fields (see Allow-list below).

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 + the required-class rules:
Rules ignored on these field paths: 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 a governance_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