Skip to main content
skill CX Codex

gate-attribution · zaxbyhub — Claude Code skill: what it does, how to install

gate-attribution assigns reviewer and test engineer verdicts to individual plan tasks during swarm batch runs. Activates when dispatches return multi-task rows.

MIT ★ 539 updated 2026-10-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ZaxbyHub/opencode-swarm --skill gate-attribution -a claude-code
Open on GitHub

What gate-attribution does

This skill defines the attribution protocol for delegation-gate runtimes. Single-task runs link results through taskId, whereas set-dispatches require strict row outputs such as [REVIEWED] | task-X.Y | APPROVED or [TESTED] | X.Y | PASS.

Every parsed row writes a distinct evidence record to .swarm/evidence/{taskId}.json. A single multi-task summary file fails the verification gate because prose text cannot satisfy individual task requirements.

This workflow applies only in environments with swarm controller dispatch tools available in the active session.

What it helps with

  • Map batch review and test outputs to specific task identifiers
  • Write isolated evidence entries to .swarm/evidence/{taskId}.json
  • Structure multi-task test passes via dispatch_lanes_async

Example prompts for the agent

  • Verify task 2.1, execute the test suite, and output a [TESTED] verdict line
  • Set up parallel verification via dispatch_lanes_async with one lane per taskId
  • Format review feedback for tasks 1.1 and 1.2 using [REVIEWED] | task-id | verdict rows

How to install gate-attribution

1Skills CLI (Vercel)

npx skills add ZaxbyHub/opencode-swarm --skill gate-attribution -a claude-code

2Manually: put the files in place

~/.claude/skills/gate-attribution/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/gate-attribution/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about gate-attribution

How to install gate-attribution in Claude Code?

Run npx skills add ZaxbyHub/opencode-swarm --skill gate-attribution -a claude-code.

What does gate-attribution do?

It parses structured [REVIEWED] and [TESTED] lines into task-scoped evidence files required to satisfy gate checks.

Why does prose verification fail the gate?

Batched runs without explicit parseable rows are treated as ambiguous, so the tracker fails closed to prevent incorrect task completions.

Source text

SKILL.md · MIT
---
name: gate-attribution
description: Per-task gate dispatch protocol for reviewer/test_engineer set-dispatch attribution. Activates when dispatch_lanes returns set-dispatch verdict rows that must be attributed to plan tasks. Documents single-task attribution plus parseable set-dispatch reviewer/test_engineer rows.
metadata:
  audience: swarm-plugin
---

# Gate Attribution

## The rule
The gate tracker attributes reviewer/test_engineer dispatches PER TASK. A
single-task prompt still attributes by `task_id` / `taskId` / unambiguous prompt
task ID. A set-dispatch can also count per-task when the reviewer/test_engineer
output includes parseable per-task rows:

```
[REVIEWED] | task-2.1 | APPROVED | ...
[TESTED] | 2.1 | PASS | ...
```

`[REVIEWED]` verdicts are `APPROVED | REJECTED | CONCERNS`; `[TESTED]` verdicts
are `PASS | FAIL | SKIPPED`. Rows with `task-X.Y` are normalized to `X.Y`;
unsafe or non-plan IDs are ignored.
Each parseable per-task verdict row creates gate evidence (regardless of verdict
value); the gate's pass/fail decision is made elsewhere from the accumulated
evidence. If no rows are parseable, attribution falls back to the single-task
rule.

## Protocol
1. **For unrelated or high-risk tasks:** Dispatch separate reviewer and/or test_engineer lanes with exactly ONE taskId.
2. **For a true set-dispatch:** Require one `[REVIEWED] | task-id | verdict | ...` (or `[TESTED] | ...`) row per task in the returned output. Each parseable row creates gate evidence; the gate decision is made from the accumulated evidence.
3. **Minimize overhead via parallel dispatch when set-dispatch is not appropriate:**
   ```
   dispatch_lanes_async with:
   - common_prompt: shared verification context
   - lanes: one lane per task, each with a single taskId
   - max_concurrent: up to 3
   ```
   This protocol applies only in sessions whose actual tool list includes the
   swarm controller's dispatch tools; on hosts without the controller it is not
   applicable — do not fabricate set-dispatch rows.
4. **Collect + attribute:** Single-task lanes auto-attribute to their taskId; set-dispatch rows auto-attribute per parsed row.
5. **Do NOT rely on prose summaries:** A batched dispatch without parseable rows is ambiguous and does not count per-task.

Gate evidence is persisted independently as `.swarm/evidence/{taskId}.json` for each task. Each parseable set-dispatch row causes the hook to write one task-scoped evidence file for that task (regardless of verdict value); a single multi-task evidence file cannot satisfy any task.

## Optimization for trivial tasks
For pure ceremony gates (1-line doc fix):
```
TASK: Verify task X.Y. Run skill-mirrors.test.ts. PASS/FAIL.
taskId: X.Y
```

## Why this exists
The gate tracker (the delegation-gate runtime) keys delegation chains by
`sessionID`. Ambiguous multi-task prompts still fail closed, but parseable
`[REVIEWED] | task-id | ...` rows provide explicit per-task attribution for
set-dispatches. Tracked in issue #1746 item 6.

© ZaxbyHub · MIT · ZaxbyHub/opencode-swarm

Similar skills

All skills for Agent setup: memory, context, orchestration →

gate-attribution by other authors comes first.

gate-attribution ZaxbyHub gate-attribution sets the rule that keeps reviewer and test_engineer checks attributable: one taskId per dispatch, with lanes run in parallel to save overhead. CX Codex +1 ★ 539repo stars verification-gate sentimony verification-gate — a skill that blocks completion claims until fresh evidence backs them: it builds an evidence matrix and returns a verdict for the exact claim set. CX Codex +1 2,600installs code-review-gate kyy-logs The code-review-gate Claude Code skill reviews code changes before a commit or PR merge. It gathers the diff, checks test quality, and records issues. CX Codex +1 ★ 517repo stars parallel-agents davila7 parallel-agents orchestrates specialized sub-agents inside Claude Code for multi-perspective code reviews and cross-domain feature analysis. CX Codex +1 189installs swarm backnotprop A skill for Claude Code, Cursor, Codex, GitHub Copilot, Gemini CLI, and OpenCode that fans out N parallel subagents, drains their results, and returns a single consolidated report. Triggered by /swarm or the phrase "swarm this" in chat. CX Codex +1 10,300installs swarm-advanced ruvnet swarm-advanced — a skill for Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode that brings multi-agent swarm patterns to your workflow. Coordinates parallel research, development, and testing across specialized agents. CX Codex +1 1,200installs agent-acceptance-gate WenyuChiou agent-acceptance-gate is a Claude Code skill that reconciles lane results before commit or push and returns a verdict. CX Codex +1 ★ 34repo stars

From the same set121

The whole set →
ci-fix-monitor ci-fix-monitor is a Claude Code skill that monitors pull request check runs and resolves CI failures. It tracks builds until every required job turns green. CX Codex +1 ★ 539repo stars swarm-resume swarm-resume is a Claude Code skill that restores swarm plan state and clears stale git branches to resume work on an approved plan. CX Codex +1 ★ 539repo stars ci-failure-batching ci-failure-batching collects failed PR checks before planning fixes. Use it to group related CI problems and avoid a separate push cycle for each one. CX Codex +1 ★ 539repo stars mock-to-internals-migration mock-to-internals-migration is a Claude Code skill for moving mocks from Vitest to Bun and checking the _internals seam. It activates for mock migrations and related test-structure changes. CX Codex +1 ★ 539repo stars merge-queue-readiness The merge-queue-readiness skill simulates a PR merged with the latest main before it enters a GitHub merge queue. Use it to catch integration failures that isolated PR checks can miss. CX Codex +1 ★ 539repo stars issue-tracer issue-tracer — a subagent that carries a GitHub issue from report to fix plan. It collects evidence, pinpoints the root cause, and touches no code until you approve the plan. CX Codex +1 ★ 539repo stars qa-reviewer The qa-reviewer subagent reviews pull requests before merge, checking logic, security, error handling, style, and test coverage without changing code. CX Codex +1 ★ 539repo stars durable-session-state The durable-session-state skill keeps task plans, decisions, validation results, and review verdicts in project files. Use it to pick up long-running work after context compaction or a handoff. CX Codex +1 ★ 539repo stars

Project sponsors

Companies that keep this analytics open