Skip to content

HUG Examples

These team.yml patterns cover the most common ways to use human gates. Each can be adapted to your workflow — change the commands, artifacts, timeout, and reviewers to fit.


The classic HUG use case — a human approves the design before any code is written:

phases:
- name: architect
type: standard
- name: arch-review
type: hug
depends_on: [architect]
commands:
- name: design-doc-exists
run: "test -f .cliq/design/architecture.md"
review:
reviewer: architect
artifacts:
- .cliq/design/architecture.md
timeout: 8h
remind_every: 2h
- name: developer
type: standard
depends_on: [arch-review]

The architect produces a design doc. The gate verifies it exists, then presents it to a human reviewer. If approved, development starts. If the reviewer requests changes, work routes back to the architect with feedback.


Sometimes you just need someone to check that tests pass and say “ship it”:

- name: go-no-go
type: hug
depends_on: [developer]
commands:
- name: tests
run: npm test
review:
reviewer: devteam
timeout: 4h

No artifacts — the reviewer sees the command results and the diff. Enough for a quick sanity check before the pipeline moves on.


HUG works for any kind of review, not just code:

- name: editorial-review
type: hug
depends_on: [writer]
commands:
- name: draft-exists
run: "test -f output/article.md"
review:
reviewer: editor
artifacts:
- output/article.md
timeout: 24h

The writer produces an article. The editor reviews the rendered markdown on the review page and either approves it or requests changes. The 24-hour timeout gives them a full business day.


Multiple reviewers for high-stakes decisions. All are notified, first verdict wins:

- name: deploy-approval
type: hug
depends_on: [reviewer]
commands:
- name: all-tests
run: npm test
- name: build-clean
run: npm run build
review:
reviewer: [devteam, security-lead]
artifacts:
- .cliq/reviews/
timeout: 2h
remind_every: 30m

Both devteam and security-lead get Slack notifications. The first one to submit a verdict decides the gate outcome. Reminders fire every 30 minutes to keep the review from stalling.


When the reviewer needs to see everything — design, data model, and the implementation:

- name: full-review
type: hug
depends_on: [developer]
commands:
- name: tests
run: npm test
- name: lint
run: npm run lint
review:
reviewer: [architect, security-lead]
artifacts:
- .cliq/design/architecture.md
- .cliq/design/data-model.md
- src/auth/**/*.ts
timeout: 8h
remind_every: 2h

Glob patterns work in artifactssrc/auth/**/*.ts includes all TypeScript files under src/auth/. The reviewer sees the architecture doc, data model, and every auth file rendered inline, alongside the full git diff and command results.


Chain multiple human gates for workflows that need approval at different stages:

phases:
- name: architect
type: standard
- name: design-approval
type: hug
depends_on: [architect]
commands:
- name: design-doc
run: "test -f .cliq/design/architecture.md"
review:
reviewer: tech-lead
artifacts:
- .cliq/design/architecture.md
timeout: 8h
- name: developer
type: standard
depends_on: [design-approval]
- name: code-review
type: hug
depends_on: [developer]
commands:
- name: tests
run: npm test
- name: build
run: npm run build
review:
reviewer: [tech-lead, security-lead]
artifacts:
- src/**/*.ts
timeout: 4h
remind_every: 1h
- name: deploy
type: standard
depends_on: [code-review]

The tech lead approves the design. The developer implements it. Both the tech lead and security lead review the code. Only after both gates pass does deployment begin.