多轮严格迭代改进
gauntlet-loop
当用户要求 Gauntlet Loop(严苛循环),或对某个有挑战性的产物依据具体、可检查的标准进行多轮不懈改进时使用;不适用于有明确验收测试的例行变更,也不适用于一次性在多种方案间做选择(arena);协调独立的构建者和新加入的评审者,直到证据支持停止。
- License 许可
- MIT
- 所属仓库
- mintuz/skills
- 最近更新
- 2026-11-13
- Stars
- ★ 35
- Forks
- 7
01 前言 Front Matter
- name
- gauntlet-loop
- description
- WHEN a user asks for a Gauntlet Loop or relentless improvement of one ambitious artifact against a concrete, inspectable bar over repeated rounds; NOT for routine changes with clear acceptance tests, or for choosing between alternative shapes in one pass (arena); coordinates separate builders and fresh critics until evidence supports stopping.
03 SKILL.md 正文
Gauntlet Loop
Give a lead agent the destination and bar. Let it choose the route. Keep building and judging separate (principle-judge-with-fresh-eyes).
1. Set the bar
State the goal as an observable outcome, preserving the user's constraints. Use a supplied reference when it is inspectable; otherwise propose the strongest concrete comparison or measurement available. For a quantitative outcome, state a specific value at a stated scale. For a qualitative outcome, state the reference or the observable criteria. Explain its relevance in one sentence. Ask the user to confirm or amend it before round 1. A placeholder the user must fill later is not a bar (principle-fix-the-bar-first).
Define how a critic can compare the real artifact with the bar:
| Artifact | Useful bar |
|---|---|
| Visual product | Rendered reference, screenshots, or interaction recording |
| Software system | Passing behavior, performance, recovery, or security checks |
| Writing | Reference passages plus factual and structural checks |
| Research | Source quality, coverage criteria, and reproducible calculations |
For a visual bar, fix the capture protocol alongside the reference (viewport, theme, seed data, animation state) so both sides of every comparison are captured the same way. A comparison whose two sides were captured differently returns UNJUDGEABLE; the loop then repairs the inspection path instead of the artifact.
When rounds capture screenshots, use one capture mechanism for the whole run. Number the files per round (e.g. round2/01-empty-state.png) so each round diffs cleanly against the baseline.
For a visual artifact, pin the design tokens, visual motifs, and any taste constraints in the bar before round 1. A taste rejection that arrives after a WIN means the bar was incomplete.
When failure modes depend on scale, build or obtain a realistic-scale fixture before setting the bar. A small fixture hides the defects the loop exists to find.
Name any resource limit, the materiality threshold below which a remaining gap does not justify another round, and the allowed stop conditions. State the limit and the threshold as specific values. Exhaustion is a stopping reason, never evidence that the bar was met.
Complete when: the goal, inspectable bar, comparison method, materiality threshold, and stop policy are explicit.
2. Split at judging seams
Inspect the task and current artifact, then divide only the important parts that can be built and judged independently. Keep tightly coupled parts together. Use one loop when decomposition adds no independent judgement.
Assign each part to a builder and reserve a separate critic context. Declare dependencies between parts so independent work can run in parallel without conflicting edits.
Complete when: every important part has a judging seam, an owner, and declared integration dependencies.
3. Build the artifact
Give each builder the goal, relevant bar and rules, the actual inputs, and an isolated editable workspace. When the artifact lives in a git repository, that workspace is the builder's own git worktree on its own branch, and the rest of this section applies. Each builder commits its own round work on its own branch. No builder in a run uses git stash: all worktrees of one repository share one stash list, so a stash pop can restore another builder's edits. A builder that must set work aside commits it.
Share one worktree between builders only when the host cannot create separate worktrees; when it can, move each builder into its own worktree before the next round. In a shared worktree, all builders work on the run branch and run no git write commands. State in each shared-worktree brief that every git command that changes the branch, index, or working tree (stash, checkout, switch, reset, restore, clean, add, commit) is forbidden there. A builder that needs a forbidden operation stops and reports to the lead. A shared worktree has one index, so at the end of each round the lead alone commits: one commit per builder, and each commit contains only that builder's files. The lead obtains the state it needs, such as a baseline on main, from a separate worktree or clone. When none is available, the lead reports that state as unobtainable instead of changing the shared worktree.
Let the builder choose the implementation. Require it to produce or modify the real artifact and run the smallest checks that make the artifact inspectable. The builder reports the artifact and evidence, not a quality verdict.
Complete when: every active part has an inspectable artifact and its checks or render path work.
4. Run the gauntlet
For each judging round, launch a fresh critic with only:
- the goal and relevant constraints;
- the bar and comparison method;
- the real artifact and raw evidence.
Withhold the builder's history, rationale, summaries, and claimed quality. Ask the critic to inspect the artifact itself, use a blind A/B comparison when practical, and return:
WIN,LOSE, orUNJUDGEABLE;- direct comparison evidence;
- the single largest meaningful gap if the artifact loses.
On LOSE, send that gap to the builder, repair it, and use another fresh critic. On UNJUDGEABLE, repair the inspection path or sharpen the bar before changing the artifact. Freeze a part only on WIN or an explicit stop condition.
Complete when: every active part has fresh, artifact-level evidence and either wins or has exactly one next gap.
5. Converge
Repeat build and gauntlet rounds without choosing an arbitrary round count. Maintain a compact ledger:
| Round | Part | Verdict | Evidence | Largest gap | Repair |
|---|
For a git-backed artifact, name a run branch and end each round with a commit on it; for any other artifact, end each round with a checkpoint copy. When builders have their own branches, the lead merges each builder branch into the run branch. The lead never stashes, resets, or discards a builder's uncommitted edits. An interrupt then strands at most one round of work.
State in each round's report the rounds used against the agreed budget and stop policy. The loop must end by that policy, not by a user interrupt.
Stop a loop only when the artifact wins, the user stops it, the named resource limit is reached, or the remaining improvement is below the agreed materiality threshold. Record unmet gaps whenever a loop stops without winning.
For long unattended runs, maintain a lightweight progress artifact only when the user needs to observe evolution without interrupting the loop.
Complete when: every part has a terminal verdict or named stop reason, with no claimed win unsupported by comparison evidence.
6. Integrate and judge whole
Integrate completed parts and run the relevant whole-artifact checks. When separately improved parts conflict, use one fresh smoothing pass to resolve only integration inconsistencies. Then give a fresh critic the complete artifact and original bar.
Complete when: the integrated artifact has been inspected against the original bar, relevant checks pass, and every remaining gap or stop reason is explicit.
Report
Lead with the whole-artifact verdict, bar, and direct evidence. List rounds per part, each closed gap with the round that closed it, verification results, unresolved gaps, and the exact reason for stopping.
04 同仓库更多 Skills
lens-review
USE WHEN reviewing uncommitted work, a branch diff or a pull request through several installed skills, each run as its own review lens; NOT WHEN you need one cold second opinion (double-check), a verdict against a specification (acceptance-review) or the built-in fixed-lens /code-review. Runs each lens in an isolated read-only agent, has a separate agent try to refute every finding, and returns one severity-ranked report.
XState 状态机建模
xstate
当 React 状态因外部响应而变化——异步提交、进行中或加载标志、重试、取消、轮询、乐观更新、过期响应——或因与可中断的过程(如拖拽或手势)交互而变化时使用;或在构建、审查、测试或可视化 XState 5 actors 和 @xstate/react 集成时使用;不适用于单个事件即可完全设定的值,如文本草稿、焦点标志或简单的开关切换;建模类型化生命周期并渲染合法的 Mermaid stateDiagram-v2 图表。
网页界面设计优化
web-design
在优化 UI 布局、排版、色彩或细节打磨时使用;不涉及代码实现;提供简洁的原则,以实现有意图、易读的设计。
Tailwind CSS 样式开发
tailwind
在编写、修复或审查使用 Tailwind CSS 的项目中的样式时使用,即便只是改一个类名,或请求中未提及 Tailwind:颜色、焦点环、间距、由 prop、map 或 CVA 变体选择的类名、Tailwind 样式表或 tailwind.config 中的主题令牌与深色模式、配置或升级(如不确定项目是否使用 Tailwind,先检查 package.json 或主样式表);不适用于在没有 Tailwind 的项目中编写纯 CSS 或 Sass;产出的类名能被 Tailwind 识别,语法适配已安装的主版本,具有可见的焦点指示器,且不引入未要求的依赖或杜撰的品牌值。
代码重构规划
refactoring
当你需要制定计划来重构、重组或清理正常工作的代码,且测试结果已知(全绿或已记录的失败集合)时使用;不适用于新功能交付或任何行为变更;以可逆的基线安全性和按优先级排序的改进为核心。
react
USE WHEN changing the logic, data, props, state, Effects or rendered text of a React component, hook or page, even a one-line change; NOT WHEN the request is styling only (class names, Tailwind, CSS, dark mode, spacing, shadows) or tests only, or when it models submit, in-flight, loading, retry or failure states, even for a named React form (xstate covers that, including its React wiring); applies React 19 composition, state, Effect, structure, API and performance rules with only the project's installed libraries.