Skip to content

team.yml Reference

Exhaustive schema reference for every field recognized in team.yml. For conceptual guides, see Teams and Workflows.


FieldTypeDescription
namestringRequired. Scoped team name (@scope/name). Must be quoted in YAML.
descriptionstringHuman-readable summary shown in cliq team list, A2A, and CliqHub.
versionstringSemver (e.g. 1.2.0). Managed by cliq team version. Required for publishing. See Versioning.
cliq_versionstringMinimum cliq version (semver range, e.g. >=1.0.0).
toolsstring[]External tools needed (e.g. ["git", "npm"]). Checked at startup. Default [].
tagsstring[]Tags for discovery (e.g. [code, git, tdd]). Default [].
inputsInputDef[]Template parameters used via $(inputs.key). Default [].
outputsOutputDef[]Declared output parameters the team produces. Default [].
use_whenstring[]When this team is appropriate. Used for A2A routing. Default [].
not_forstring[]When not to use this team. Used for A2A routing. Default [].
agentsRecord<string, AgentDef>Custom agent declarations, keyed by name. Default {}.
workflowWorkflowDefRequired. The workflow — phases and optional support.

Each entry in the inputs array defines a template parameter.

FieldTypeRequiredDescription
namestringyesParameter name. Referenced as $(inputs.name) in the workflow.
descriptionstringnoHuman-readable description. Shown in cliq req prompts and A2A metadata.

Every declared input must be referenced via $(inputs.key) somewhere in the workflow — unused inputs are a validation error.

inputs:
- name: data_room_id
description: "Google Drive folder ID for the data room"
- name: company_name
description: "Target company name"

Each entry in the outputs array declares a named output the team produces. Outputs are metadata — they describe what the team delivers, used for A2A routing and documentation.

FieldTypeRequiredDescription
namestringyesOutput name.
descriptionstringnoHuman-readable description. Shown in A2A metadata and cliq team info.
outputs:
- name: report
description: "Final analysis report in Markdown"
- name: findings
description: "Structured findings as JSON"

The agents block is a map of agent name → agent definition. These agents are bundled with the team and resolved during assembly.

FieldTypeRequiredDescription
entrystringyesPath to the agent entry point, relative to the team directory.
envstring[]noEnvironment variable names the agent requires.
binariesstring[]noSystem binaries the agent requires (e.g. ["git"]). Checked at startup via cliq doctor.

Built-in agents (cursor, claude-code, gemini, codex, hug) don’t need entries — they’re available by name. See Cliq SDK for building custom agents.

agents:
openai-analyst:
entry: agents/analyst/index.js
env:
- OPENAI_API_KEY

The workflow key contains a phases array and an optional support array.

workflow:
phases:
- ...
support:
- ...

Each entry in workflow.phases defines a pipeline stage.

FieldTypeDefaultApplies toDescription
namestring(required)AllUnique identifier. Must not contain . characters. Determines the role file name (roles/<name>.md) for phases that require one.
typestring(required)AllOne of standard, gate, or team.
depends_onstring[][]AllPhases that must complete before this one starts. Creates DAG edges.
commandsCommandDef[][]standard, gateShell commands. Required for agent: exec phases, optional for gates.
max_iterationsinteger3gateMaximum command-verdict-route loops before auto-escalation. Clamped to 1–5.
agentstring(none)standard, gateOverride the runtime agent for this phase. Must be a built-in or declared in agents. Use agent: hug for human review gates, agent: exec for command-only phases.
teamstring(none)teamRequired for team phases. Local ref (@acme/security-scan) or hub ref (hub://@acme/[email protected]). Not allowed on other types. Resolved recursively at assembly time.
inputsRecord<string, string>{}teamStatic key-value pairs passed to the sub-team at req time. Validated against the sub-team’s declared inputs at assembly time.
actionstring(none)standardConnector action (e.g. get, list, create, update). Passed to the agent as ctx.action.
sourcesSourceEntry[][]standardConnector data sources. Each entry has name, optional ref, url, headers, method, body.
target_entriesTargetEntry[][]standardConnector data targets. Each entry has name, file, optional ref, url, headers, method, mode.
modelstring(none)standard, gateOverride the LLM model for this phase. Passed to the agent as ctx.model.
reviewReviewBlock(none)gateNested review configuration for human gates. Required when agent: hug. See HUG Review Block.
is_supportbooleanfalse(internal)Set automatically for phases in the support section. Do not set manually.
TypeAgentRoleCmdsItersTeamHUG fields
standardopt
gateoptoptwith agent: hug
teambuilt-inreq

Standard phases with agent: exec require at least one command. Gate phases with agent: hug require the review: block with a reviewer field.


Each entry in a phase’s commands array defines a shell command.

FieldTypeRequiredDefaultApplies toDescription
namestringyesAllHuman-readable label. Must be unique within the phase.
runstringyesAllShell command. Exit 0 = pass, non-zero = fail.
ifstringnoAllCondition command. If it exits non-zero, the command is skipped (treated as passing).
scopestringno"workspace"All"workspace" or "repo". Controls where the command runs in multi-repo setups.
escalate_on_failbooleannotrueAllWhen false, failures log as warnings without halting.
commands:
- name: build
run: npm run build
scope: repo
if: "test -f package.json"
- name: tests
run: npm test
- name: changelog
run: "test -f CHANGELOG.md"
escalate_on_fail: false

Each entry in a phase’s sources array defines a data source for a connector agent. Used with type: standard phases that have a connector agent. See Agent SDK — Connector Patterns for the full guide.

FieldTypeRequiredDefaultDescription
namestringyesIdentifier for the source. Used by the agent to write fetched content via ctx.write_file(name, content) to .cliq/files/{phase}/{name}.
refstringnoSystem-specific reference (e.g. Jira issue key, S3 path, Google Doc ID).
urlstringnoHTTP URL (used by the curl agent).
headersRecord<string, string>no{}HTTP headers to include in the request.
methodstringno"GET" ("POST" when body is present)HTTP method override.
bodystringnoRequest body (used by the curl agent). When present, method defaults to POST and Content-Type defaults to application/json.
sources:
- name: ticket.json
ref: PROJ-123
- name: api-data.json
url: "https://api.example.com/data"
headers:
Authorization: "Bearer ${API_TOKEN}"
- name: search-results.json
url: "https://api.example.com/graphql"
body: '{ "query": "{ users { id name } }" }'

Each entry in a phase’s target_entries array defines a data target for a connector agent. Used with type: standard phases that have a connector agent. See Agent SDK — Connector Patterns for the full guide.

FieldTypeRequiredDefaultDescription
namestringyesIdentifier for the target.
filestringyesLocal file path relative to the project root.
refstringnoSystem-specific destination (e.g. folder ID, document ID).
urlstringnoHTTP URL (used by the curl agent).
headersRecord<string, string>no{}HTTP headers to include in the request.
methodstringno"POST"HTTP method override.
modestringno"create"Write mode: "create", "append", or "replace".
target_entries:
- name: report
file: reports/analysis.json
url: "https://api.example.com/reports"
method: PUT
headers:
Content-Type: application/json

Human review is configured by setting agent: hug on a type: gate phase and adding a nested review: block. See Configuring a HUG for the full guide.

FieldTypeRequiredDefaultDescription
review.reviewerstring | string[]yesNamed reviewer(s) from hug.reviewers in settings.
review.artifactsstring[]no[]Files or globs to include in the review page.
review.timeoutstringno"24h"Auto-escalate after this duration. Supports s, m, h, d suffixes.
review.remind_everystringno(none)Re-notification interval. Omit to notify once.
- name: human-review
type: gate
agent: hug
depends_on: [developer]
review:
reviewer: architects
artifacts:
- .cliq/design/architecture.md
- reports/*.md
timeout: 8h
remind_every: 2h

Entries in workflow.support use the same fields as regular phases but with constraints:

  • Must not have depends_on — support phases are only reachable through gate routing
  • Use their real functional type (standard, gate, etc.)
  • Sit outside the main DAG until activated
FieldTypeRequiredDescription
namestringyesUnique identifier. Must have a matching roles/<name>.md.
typestringyesFunctional type: standard or gate.
agentstringnoAgent override, same as main phases.
workflow:
phases:
- ...
support:
- name: git-resolver
type: standard
- name: security-fixer
type: standard

Template variables can be used in role files, connector url fields, target_entries fields, and phase commands.

VariableResolves toAvailable in
$(inputs.key)Value of input named keyroles, connector entries
$(req_key)Requirement key (e.g. PROJ-123)roles, connector entries
$(team_name)Current team nameroles, connector entries
$(date)Current date (YYYY-MM-DD)roles, connector entries
$(timestamp)Current date-time (YYYY-MM-DDTHH-MM-SS)roles, connector entries
$(phase)Current phase nameroles, connector entries
$(instance_id)Cliq instance IDroles, connector entries
$(handoff.<phase>.<path>)Scalar value from an upstream phase’s handoff dataroles, connector entries, commands
$(dirs.project)Absolute path to the project rootteam phase roles
$(dirs.self)Absolute path to the current pipeline’s state directoryteam phase roles
$(dirs.parent)Absolute path to the parent pipeline’s state directory (null at top level)team phase roles
$(dirs.<phase>)Absolute path to a sibling team phase’s call frameteam phase roles

Handoff variables let you wire structured data from an upstream phase’s handoff.json into downstream YAML fields. The syntax is:

$(handoff.<phase_name>.<field>[.<nested>...])

The <phase_name> identifies which upstream channel to read from, and the remaining dot-path traverses the data field of that phase’s HandoffEnvelope.

phases:
- name: analyzer
type: standard
- name: deployer
type: standard
agent: exec
depends_on: [analyzer]
commands:
- name: deploy
run: "deploy --env $(handoff.analyzer.environment) --version $(handoff.analyzer.version)"

In this example, the analyzer phase writes structured data like { "environment": "staging", "version": "2.1.0" } in its handoff. The deployer phase uses those values directly in its commands without any agent interpretation.

Rules:

  • Scalars only. $(handoff.*) variables must resolve to a string, number, or boolean. If the path resolves to an object or array, the pipeline escalates with an error.
  • Embedding allowed. Variables can appear within strings: "deploy to $(handoff.analyzer.environment)".
  • Missing values escalate. If the referenced phase or field doesn’t exist, the pipeline escalates — this is never silently ignored.
  • Gate data access. For gate phases, you can reach into verdict details: $(handoff.reviewer.verdict.outcome), $(handoff.reviewer.verdict.reason), $(handoff.reviewer.iteration).

Working directory. Every agent’s cwd defaults to $(dirs.self). At top level, dirs.self equals the project root, so nothing changes for single-team projects. In sub-teams, dirs.self is the call frame, isolating bare relative paths from the project root and from parallel team phases.

To access project files from a sub-team, use $(dirs.project) explicitly. For call-frame-local artifacts, use $(dirs.self). For outputs from a specific upstream phase, use $(dirs.<phase>). cliq team validate warns about bare relative paths that should be qualified with one of these prefixes; cliq team publish blocks them, with --force available as an override for false positives. See Roles — Team Phase Roles for usage patterns.


cliq team validate, cliq assemble, and cliq team publish all enforce these rules:

RuleError
Missing nameTeam missing required "name" field
Missing type on phasePhase 'foo' missing required "type" field
Invalid typePhase 'foo' has invalid type "custom". Valid types are standard, gate, and team.
Phase name contains .Phase name 'foo.bar' must not contain '.' characters
Team phase without teamTeam phase 'foo' must have a "team" field
team on non-team phasePhase 'foo' has a "team" field but is not type "team"
Duplicate phase namesDuplicate phase name: 'foo'
Unknown dependencyPhase 'foo' depends on unknown phase 'bar'
Dependency cycleCycle detected involving 'foo'
No root phaseNo root phase found
agent: exec without commandsPhase 'foo' with agent 'exec' must have at least one command
agent: exec with max_iterationsPhase 'foo' with agent 'exec' must not have max_iterations
agent: hug without review: blockPhase 'foo' with agent 'hug' must have a review block with reviewer
review: without agent: hugPhase 'foo' has review block but agent is not 'hug'
Missing role fileEvery phase (except agent: exec) needs roles/<name>.md (including team phases)
Unknown agentPhase 'foo' references unknown agent 'bar'
Duplicate command namesGate 'foo' has duplicate command name: 'bar'
Unused inputInput 'key' is declared but never referenced
Invalid versionInvalid version 'abc' — expected semver (e.g. 1.0.0)
Team input mismatchPhase 'foo' → sub-team '@acme/bar': missing required input 'key'
Team cycle detectedCycle detected in team references: '@acme/a' is already being assembled
Team limit exceededTeam limit exceeded: more than 50 teams resolved in a single project
Hub download failureAssembly failed at [@local/parent → hub://@acme/ghost]: Team not found on hub

name: "@local/feature-dev-js"
description: "Feature development with git lifecycle for JavaScript/TypeScript projects"
version: "1.1.0"
cliq_version: ">=1.0.0"
tools: ["git", "npm"]
tags: [code, git, tdd, quality-gates, pr]
inputs:
- name: output_folder
description: "Google Drive folder ID for publishing deliverables"
use_when:
- The task requires code changes delivered as a pull request
- A buildable project with package.json exists in the repository
not_for:
- Exploratory work without a clear implementation target
- Repositories without an npm-based build system
agents:
security-scanner:
entry: agents/scanner/index.js
env:
- SCANNER_API_KEY
workflow:
phases:
- name: fetch-context
type: standard
agent: curl
action: get
sources:
- name: standards
url: "https://example.com/coding-standards.md"
- name: git-setup
type: gate
depends_on: [fetch-context]
commands:
- name: clean-tree
run: 'git status --porcelain | wc -l | xargs test 0 -eq'
scope: repo
max_iterations: 1
- name: architect
type: standard
depends_on: [git-setup]
- name: tester
type: standard
depends_on: [architect]
- name: developer
type: standard
depends_on: [tester]
- name: reviewer
type: gate
depends_on: [developer]
commands:
- name: build
run: npm run build
scope: repo
if: "test -f package.json"
- name: tests
run: npm test
scope: repo
if: "test -f package.json"
max_iterations: 3
- name: human-review
type: gate
agent: hug
depends_on: [reviewer]
review:
reviewer: architects
artifacts:
- reports/*.md
timeout: 8h
remind_every: 2h
- name: git-finalize
type: standard
depends_on: [human-review]
agent: git
action: create_pr
- name: git-verify
type: standard
agent: exec
depends_on: [git-finalize]
commands:
- name: pushed
run: 'git ls-remote --heads origin $(git branch --show-current) | grep -q .'
scope: repo
- name: publish-summary
type: standard
depends_on: [git-verify]
agent: gdrive
action: create
target_entries:
- name: summary
file: reports/summary.md
ref: "$(inputs.output_folder)"
support:
- name: git-resolver
type: standard
- name: hotfix-dev
type: standard