Human Gate (HUG)
Everyone needs a hug once in a while.
Many pipelines have moments where a machine shouldn’t make the call. Maybe it’s an architecture decision that shapes six months of work. Maybe it’s a deployment to production. Maybe it’s content going out under someone’s name. A human gate - a HUG - is how you put a person in that seat.
HUG pauses a cliq pipeline at any gate phase, presents a structured review to a human through a clean web interface, and resumes based on their verdict. The reviewer gets everything they need to make a decision — a brief, artifacts, diffs, check results — and a chat assistant they can question about the work. When they decide, the pipeline continues.
No context switching. No “can you look at this PR when you get a chance.” The reviewer opens a link, sees what matters, and acts.
How It Works
Section titled “How It Works”A human gate is a hug phase. The orchestrator runs automated checks first — all checks must pass before a review is created. If any check fails, the gate fails immediately and no review is sent. Reviewers only see complete, valid work.
When checks pass, the hug agent:
- Assembles context from the workspace — role brief, check results, artifacts, git diff, pipeline timeline
- Creates a review on the hug server (a standalone web service backed by PostgreSQL)
- Notifies reviewers via Slack with a direct link
- Opens a chat connection so the reviewer can ask questions in real time
- Polls for a verdict, sending reminders at the configured interval
- Writes an audit trail to
.cliq/reviews/— the permanent record - Returns the verdict to the orchestrator as a standard gate result
Orchestrator ── A2A ──▶ Hug Agent ── POST + WebSocket ──▶ Hug Server ──▶ Human (browser)The hug agent is the protocol boundary. The orchestrator sees a normal A2A agent. The hug server sees HTTP and WebSocket traffic. The human sees a web page. Everyone speaks their native language.
Verdict Mapping
Section titled “Verdict Mapping”When the reviewer submits their decision, the hug agent maps it to a standard gate verdict:
| Human action | Gate verdict | What happens |
|---|---|---|
| Approve | PASS | Pipeline continues to the next phase |
| Request Changes | ROUTE:<target> | Work routes to the selected phase with feedback |
| Reject | ESCALATE | Pipeline halts — human intervention required |
| Timeout (no action) | ESCALATE | Pipeline halts with “timed out” reason |
When routing work back, the reviewer’s comment becomes routing context delivered to the target phase through the gate channel.
Next Steps
Section titled “Next Steps”| I want to… | Go to |
|---|---|
| Install and run the hug server | HUG Server |
| Add a human gate to my team | Configuring Gates |
| See real-world team.yml patterns | Examples |
| Look up settings or fix an issue | Settings & Troubleshooting |