Dual Gate Moa — Testing skill for Claude Code
Dual-Gate-MoA: harness-enforced dual gates for LLM agents (recon before acting, QA before shipping) + MoA multi-candidate competition.
How to install Dual Gate Moa
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Alfred1893/dual-gate-moa and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Dual Gate Moa does
Dual-Gate-MoA: harness-enforced dual gates for LLM agents (recon before acting, QA before shipping) + MoA multi-candidate competition. Ships as a self-contained replication PRD.
Alternatives in Testing
- Grilling.V1 — Interview the user to clarify or stress-test the request before acting 272 ★
- Project PRD — Jesteś doświadczonym menedżerem produktu, którego zadaniem jest stworzenie kompleksowego dokumentu wymagań pro 265 ★
- Claude Dev Skill — A Claude Code custom skill that turns Claude into a Tech Lead — coordinating parallel Worker Agents through a 112 ★
README
双门 · MoA Agent 工作流架构(Dual-Gate-MoA)
[](./LICENSE) [](./LICENSE-docs.md) [](./dual-gate-replication-prd.md)
[English README](./README.en.md)
给 LLM agent 的每次任务装上入口与出口两道门,中间为高价值交付加一场多候选竞争:动手前先侦察,交付前必终检;触发靠 hook,不靠模型自觉。
先认识几个词
如果你不写代码,认识这五个词就能读完全文:
- agent:让大语言模型(LLM)自己规划步骤、调用工具、把一件事从头做到尾的工作方式——一个会自己动手的 AI 助手。
- subagent(子代理):主 agent 临时请来的专职同事,在隔离的上下文里只干一件事,干完交报告。本项目的侦察员和质检员都是 subagent。
- hook(钩子):宿主软件在固定时机自动运行的小脚本,比如「用户每发一条消息就执行一次」。它到点必响,不管模型记不记得。
- harness(运行框架):承载 agent 干活的宿主环境(如 Claude Code、Cursor),hook 和 subagent 这些机制层能力都由它提供。
- MoA(Mixture-of-Agents,多代理混合):同一个任务让多个模型各写一份完整答案,再由聚合器合成一份更好的终稿——像编辑部收三份独立初稿,出一篇定稿。
为什么存在
LLM agent 的失误,常常发生在两个时刻。
第一个时刻在入口。agent 拿到任务直接开干,外部事实没查,用户约束没问,上下文(模型当下记在脑子里的信息)缺口被带进执行过程,最后变成方向性返工。
第二个时刻在出口。答案写完就交付,没有独立质检,事实错误、答非所问、选择性遗漏直接流向用户,用户被迫当 QA(质检员)。
把「请你先确认需求」「请你交付前自查」写进提示词,只能算软提醒。上下文一长,提醒会被稀释。要让关键动作稳定触发,就不能只依赖模型记得,而要把它们移到 harness 的机制层。
Dual-Gate-MoA 做的就是这件事:入口一道侦察门,出口一道质检门,两门之间为值得较真的交付备一场多候选竞争。双门本体可以独立安装,MoA 是按需加装的扩展模块(PRD §14);完整形态就是仓库名本身——`dual-gate-moa`。
设计哲学
一句话:**强制在流程层,克制在内容层。**
强制,是因为触发由 hook 执行,不依赖 agent 的记忆。入口的 `UserPromptSubmit` hook(用户每提交一条消息就触发)会 100% 注入「先侦察再执行」规则;出口的 Stop hook(agent 试图结束回合时触发)会检查 QA 表态,没有表态就拦回,连续拦 8 次后系统强制放行,避免死循环。
克制,是因为触发之后做多做少,仍交给智能判断。侦察员发现上下文足够,可以秒退;质检员认为交付物达标,可以一次 PASS;闲聊、纯查询和琐碎机械任务,写一个豁免标记就走零开销路径。
还有一条贯穿始终的模型策略:**判断力密集的节点,永远用手里最强的模型。** 聚合器 `moa-aggregator` 与终检员 `qa-checker` 通过 `model: inherit` + `effort: max` 钉在主会话当前可用的最强模型档位——判断力不降级,且随模型迭代自动跟进;三个起草者(proposer)则刻意混布模型档位与解题视角(默认档三发 A/A/B:Sonnet·max ×1 + Opus·xhigh ×2,两个从正面解题、一个专走逆向;另有论文忠实版全顶配可切换),让候选之间的差异来自构造,而不是运气。
门不信任模型的记性,但信任模型的判断。v1.7 之后还多了一条:**门也不信任模型一定能跑完。** 真实事故取证发现,深思考档位的模型在重任务包上会陷入"思考失控"——整个输出窗口烧在推理上、一个字正文都不出。修法不是祈祷,是工程:后台派生(单点挂死不拖死全局)、看门狗定时自查(不再等用户发现)、尾部
Related Skills
Generate V0 Prompt
Convert a spec file into a self-contained v0.dev prompt
Spec Splitter
SPEC SPLITTER -- analyzes a spec for context window pressure, proposes a decomposition, and generates self-con
Geekstack Flow
A structured AI workflow for planning, coding, reviewing, testing and shipping software — LLM wiki memory, a t
AI Qe Agent
AI QE Agent with LLM Evaluation Layer — catches hallucinations, monitors chain consistency, self-heals Playwri
V Epic
Drive an EPIC — chain several features into one autonomous, resumable, dependency-ordered build on a single br
Shipyard
Turn your idea into working code — spec-driven agile sprints for Claude Code. 12 commands, 6 agents, TDD enfor
Related Agents
Niche Hunter
Find 3 KDP niches with high demand and low competition, with sales evidence. Returns candidate niches across f
Autopilot Orchestrator
Full RTL design pipeline orchestrator. Manages 6-phase flow with dual-layer phase gates, parallel agent execut
Redteam Finding Verifier
Independent verification agent for red-team findings. Use this agent after an analyzer, recon, CMS, or exploit