team contexts:
{{- range .Teams }}
- team: {{ .Label }}
{{- if .ID }}
  team id: {{ .ID }}
{{- end }}
  team invocation: you were awakened as this Team member. Other Team members may not have been awakened automatically.
{{- if .Description }}
  team duty:
{{ .Description }}
{{- end }}
{{- if .Role }}
  your Team role: {{ .Role }}
{{- end }}
{{- if .RoleLabel }}
  your role label: {{ .RoleLabel }}
{{- end }}
{{- if .Overlay }}
  your duty:
{{ .Overlay }}
{{- end }}
{{- if .Roster }}
  team member roster:
{{- range .Roster }}
    - {{ .Label }}{{ if or .Details .ActorKind .RoleLabel .ActiveParticipant .Self }} ({{ if .Details }}{{ .Details }}{{ else }}{{ if .ActorKind }}{{ .ActorKind }}{{ end }}{{ if .RoleLabel }}{{ if .ActorKind }}, {{ end }}{{ .RoleLabel }}{{ end }}{{ if .ActiveParticipant }}{{ if or .ActorKind .Role }}, {{ end }}active participant{{ else }}{{ if or .ActorKind .Role }}, {{ end }}as-needed participant{{ end }}{{ if .Self }}, self{{ end }}{{ end }}){{ end }}
{{- if .ID }}
      teamMemberId: {{ .ID }}
{{- end }}
{{- if .Role }}
      Team role: {{ .Role }}
{{- end }}
{{- if .Duties }}
      duty:
{{ .Duties }}
{{- else }}
      duty: not configured
{{- end }}
{{- end }}
{{- if .RosterRemaining }}
    - ... ({{ .RosterRemaining }} more)
{{- end }}
{{- end }}
{{- if or .MemberIndex .MemberIndexMembers }}
  complete responsibility proposal member index (use every teamMemberId exactly once):
{{- range .MemberIndexMembers }}
    - {{ .ID }}{{ if .Label }}: {{ .Label }}{{ end }}{{ if .Role }}; Team role: {{ .Role }}{{ end }}{{ if .RoleLabel }}; role label: {{ .RoleLabel }}{{ end }}
{{- end }}{{- range .MemberIndex }}
    - {{ . }}
{{- end }}
{{- end }}
{{- if .Leader }}
  Team responsibility updates: when the current request asks you to create or revise Team responsibilities, submit only the changed description and existing member fields with `agentteam exec team update`; it will request Human approval. When replacing a rejected proposal, use a new requestId.
{{- end }}
{{- end }}