Skip to content

team.yml Reference

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


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 [].
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"

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.

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. Determines the role file name (roles/<name>.md).
typestring(required)AllOne of standard, gate, hug, exec, pull, or push.
depends_onstring[][]AllPhases that must complete before this one starts. Creates DAG edges.
commandsCommandDef[][]gate, hug, execShell commands. Required for exec phases, optional for gates and hug phases.
max_iterationsinteger3gate, hugMaximum command-verdict-route loops before auto-escalation. Clamped to 1–5.
agentstring(none)standard, gate, hugOverride the runtime agent for this phase. Must be a built-in or declared in agents.
sourcesSourceDef[][]pullExternal content to fetch. Required for pull phases.
targetsTargetDef[][]pushFiles to push externally. Required for push phases.
reviewReviewDef(none)hugHuman review configuration. Required on hug phases, not allowed on other types.
is_supportbooleanfalse(internal)Set automatically for phases in the support section. Do not set manually.
TypeAgentRoleCmdsItersSourcesTargetsReview
standard
gateoptopt
hugoptoptoptreq
execreq
pullreq
pushreq

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

FieldTypeRequiredDefaultApplies toDescription
namestringyesgate, hug, execHuman-readable label. Must be unique within the phase.
runstringyesgate, hug, execShell command. Exit 0 = pass, non-zero = fail.
ifstringnogate, hug, execCondition command. If it exits non-zero, the command is skipped (treated as passing).
scopestringno"workspace"gate, hug, exec"workspace" or "repo". Controls where the command runs in multi-repo setups.
escalate_on_failbooleannotrueexec onlyWhen false, failures log as warnings without halting. Not allowed on gate or hug commands.
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 # exec phases only

Each entry in a pull phase’s sources array defines external content to fetch. See Pull & Push for source types, conversion rules, and authentication.

FieldTypeRequiredDefaultDescription
urlstringyesSource URL. Supports HTTP(S), Google Docs/Sheets/Drive, and SharePoint/OneDrive. Supports $(inputs.*) template variables.
namestringyesSlug for the pulled content. Lowercase alphanumeric + hyphens. Determines output path under .cliq/pull/.
formatstringno"auto""auto" converts to Markdown/CSV where possible. "raw" stores the original binary.
sources:
- url: "gdrive://$(inputs.data_room_id)"
name: data-room
- url: "https://example.com/report.pdf"
name: market-report
format: raw

Each entry in a push phase’s targets array defines a file to deliver externally. See Pull & Push for destination URIs, modes, and security.

FieldTypeRequiredDefaultDescription
filestringyesLocal file path relative to project root.
tostringyesDestination URI. Accepts gdrive://, gdoc://, sharepoint://, and standard web URLs. Supports $(inputs.*) template variables. Trailing / = container (for create), no trailing / = document (for append/replace).
modestringno"create""create", "append", or "replace".
namestringconditionalDisplay name for the created file. Required when mode is "create". Supports template variables.
targets:
- file: reports/final-report.md
to: "gdrive://$(inputs.output_folder)/"
mode: create
name: "$(inputs.company_name)-report-$(date)"
- file: reports/final-report.md
to: "gdoc://$(inputs.report_doc_id)"
mode: replace

The review block is required on hug phases and not allowed on other types. See Configuring a HUG for the full guide.

FieldTypeRequiredDefaultDescription
reviewerstring | string[]yesNamed reviewer(s) from hug.reviewers in settings.
artifactsstring[]no[]Files or globs to include in the review page.
timeoutstringno"24h"Auto-escalate after this duration. Supports s, m, h, d suffixes.
remind_everystringno(none)Re-notification interval. Omit to notify once.
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 pull url fields, push to and name fields.

VariableResolves to
$(inputs.key)Value of input named key
$(req_key)Requirement key (e.g. PROJ-123)
$(team_name)Current team name
$(date)Current date (YYYY-MM-DD)
$(timestamp)Current date-time (YYYY-MM-DDTHH-MM-SS)
$(phase)Current phase name
$(instance_id)Cliq instance ID

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, hug, exec, pull, and push.
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
Exec without commandsExec 'foo' must have at least one command
Exec with max_iterationsExec 'foo' must not have max_iterations
Pull without sourcesPull phase 'foo' must have at least one source
Push without targetsPush phase 'foo' must have at least one target
Pull/push with commandsPull phase 'foo' must not have commands
hug without reviewHug phase 'foo' must have a review block
review on non-hugPhase 'foo' must not have a review block
escalate_on_fail on gate/hugescalate_on_fail is only allowed on exec phase commands
Missing role fileEvery non-exec, non-pull, non-push phase needs roles/<name>.md
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)

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: pull
sources:
- url: "https://example.com/coding-standards.md"
name: standards
- 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: hug
depends_on: [reviewer]
review:
reviewer: architects
artifacts:
- reports/*.md
timeout: 8h
remind_every: 2h
- name: git-finalize
type: standard
depends_on: [human-review]
- name: git-verify
type: exec
depends_on: [git-finalize]
commands:
- name: pushed
run: 'git ls-remote --heads origin $(git branch --show-current) | grep -q .'
scope: repo
- name: pr-exists
run: "cliq tool run pr-exists"
scope: repo
- name: publish-summary
type: push
depends_on: [git-verify]
targets:
- file: reports/summary.md
to: "gdrive://$(inputs.output_folder)/"
mode: create
name: "$(team_name)-$(date)"
support:
- name: git-resolver
type: standard
- name: hotfix-dev
type: standard