$npx -y skills add WenyuChiou/agent-collab-skills --skill agent-acceptance-gateUse when a multi-agent round needs a pre-merge gate, pre-commit check, verification before push, or a PASS/FAIL decision after reconciliation.
| 1 | # agent-acceptance-gate |
| 2 | |
| 3 | The last gate before merging multi-agent output. The reconciler |
| 4 | **describes** what each agent did; the acceptance-gate **decides** |
| 5 | whether the round is mergeable. |
| 6 | |
| 7 | It runs the `success_criteria` declared in `.coord/plan.yml`, |
| 8 | aggregates risks, optionally audits prose, checks budget, and |
| 9 | produces a single PASS / FAIL / RETRY verdict per task and overall. |
| 10 | |
| 11 | ## Why use this instead of "I'll grep it myself" |
| 12 | |
| 13 | The gate replaces ad-hoc inline shell verification with one structured |
| 14 | verdict. Concrete differences observed in production (`measured-benefits.md` |
| 15 | R5 + Phase D): |
| 16 | |
| 17 | | Inline shell verification | This skill (R5 measured) | |
| 18 | |---|---| |
| 19 | | Main session runs 5+ grep / diff commands, interprets each output, drafts a manual PASS/FAIL — ~10k tokens of shell-debugging in context | Subagent runs all checks + returns ~2k token structured report → **~5× token saving** in main session | |
| 20 | | Easy to forget a check ("did I grep for banned phrases this time?") | Preset YAML encodes the full check set — no missed checks | |
| 21 | | Catches one drift case; misses cross-language echoes | `cross_document_link_text_parity` v0.2.3 caught 9+ real drift bugs the human audit missed | |
| 22 | |
| 23 | ### The DeepSeek-R2 fabrication that almost shipped |
| 24 | |
| 25 | 2026-05-13 session: Codex generated a paragraph claiming "DeepSeek-R2 |
| 26 | reaches 94.2% on GPQA Diamond" — pure fabrication. Manual grep on the |
| 27 | diff missed it because the claim was internally consistent. Only a |
| 28 | third-party reviewer agent doing live `gh api` search caught it. |
| 29 | |
| 30 | The `fact-check-frontier-models` preset was built directly from this |
| 31 | incident. Running the preset would have caught the fabrication |
| 32 | automatically by hitting arxiv + GitHub for each (model, benchmark, %) |
| 33 | triple in the diff. |
| 34 | |
| 35 | → **F14**: the preset existed by 2026-05-14, but a subsequent operator |
| 36 | skipped it because "the task feels simple". The Phase D dogfood |
| 37 | (49 files × 3 locales, 50k tokens inline vs 16k with gate = ~3× saving) |
| 38 | proved the gate catches drift the operator misses. **The cost of running |
| 39 | the gate is much smaller than the cost of one missed drift.** |
| 40 | |
| 41 | ### Mandatory invocation triggers (no judgment call) |
| 42 | |
| 43 | These triggers are mechanical — if any fire, invoke the matching preset |
| 44 | **before commit**. Skipping is F14 territory. |
| 45 | |
| 46 | | Trigger condition | MUST invoke | |
| 47 | |---|---| |
| 48 | | Diff touches ≥ 2 locale variants of same file stem (e.g., `06-x.md` + `06-x.en.md` + `06-x.zh-Hans.md`) | `--preset=multi-locale-mirror-sync --stem=<stem>` | |
| 49 | | Diff adds entries to any catalog file (project listings, framework comparisons) | `--preset=catalog-entry-add --catalog-file=<path>` | |
| 50 | | Diff touches a "frontier model" claim (model name within 3 lines of a benchmark %, e.g., "GPT-5.5 reaches 94% GPQA") | `--preset=fact-check-frontier-models --file=<path> --models=<csv>` | |
| 51 | |
| 52 | ### CLAUDE.md snippet to enforce the gate |
| 53 | |
| 54 | ```markdown |
| 55 | ## Acceptance gate rule (enforced) |
| 56 | |
| 57 | Before any commit that: |
| 58 | - touches ≥ 2 locale variants of the same file stem → invoke |
| 59 | `Skill("agent-collab-workspace:agent-acceptance-gate", |
| 60 | args="--preset=multi-locale-mirror-sync --stem=<stem>")` |
| 61 | - adds catalog entries → invoke `--preset=catalog-entry-add ...` |
| 62 | - includes a frontier model + benchmark % claim → invoke |
| 63 | `--preset=fact-check-frontier-models ...` |
| 64 | |
| 65 | Skip only when the trigger does not apply (single-file diff, pure |
| 66 | mechanical rename, etc.). NEVER skip when the trigger fires — |
| 67 | this is the F14 anti-pattern that shipped the DeepSeek-R2 |
| 68 | fabrication. |
| 69 | |
| 70 | When the preset FAILS: |
| 71 | 1. Read the FAIL reasons in the gate report. |
| 72 | 2. Either fix-and-rerun (cheap drift) or re-delegate the task with |
| 73 | tighter constraints (systemic drift). |
| 74 | 3. Do NOT override the FAIL by hand. The whole point of the gate is |
| 75 | that the operator's judgment failed earlier — adding more operator |
| 76 | judgment on top defeats it. |
| 77 | ``` |
| 78 | |
| 79 | ## When to use |
| 80 | |
| 81 | Trigger phrases: |
| 82 | |
| 83 | - "Run the acceptance gate." |
| 84 | - "Pre-commit check across multi-agent output." |
| 85 | - "Are we ready to commit this round?" |
| 86 | - "Verify all multi-agent output before I push." |
| 87 | - "Gate this round — go or no-go?" |
| 88 | |
| 89 | Not for: |
| 90 | |
| 91 | - Describing what each agent did → that's |
| 92 | `agent-output-reconciler`. |
| 93 | - Running the agents → delegate skills. |
| 94 | - Per-task acceptance during agent execution → that's the agent |
| 95 | skill itself (codex-delegate's wrapper checks its own task's |
| 96 | acceptance). |
| 97 | - Single-agent runs without a `.coord/plan.yml` → just run |
| 98 | `pytest` and call it a day. |
| 99 | |
| 100 | ## Inputs (auto-discovered) |
| 101 | |
| 102 | 1. **`.coord/plan.yml`** — round, tasks, `success_criteria` per |
| 103 | task, `budget` if declared, and `context_policy` if declared. |
| 104 | 2. **`.ai/<agent>_log_<NNN>_<slug>.txt.result.json`** — token usage, |
| 105 | risks, files_changed. Filename uses double extension by design |
| 106 | (codex-delegate appends `.result.json` to the log path; see |
| 107 | `examples/codex_log_001_*.txt.result.json.sample`). |
| 108 | 3. |