/fh-commons:convergence-loopfrom fh-commons
Replaces single-pass verification with a converging FAIL→FIX→re-verify loop up to N rounds. Declares 'truly passed' only after convergence. Escalates to structural redesign if unresolved after N rounds.
Ships in fh-commons. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A single pass declaration is hard to trust. A fix exposes new FAILs, and round 2 catches what round 1 missed. convergence-loop assigns a "truly passed" criterion to any gate.
/convergence-loopExtracted from a recurring "single-pass gate is hard to trust" pattern observed across multiple hub workflows. The canonical reference is:
harvest-loop extract→attack→synthesize cycle: pattern extraction → attack → synthesis → the repeating structure must run until convergenceWhen the same structure recurs across gates, it is a skill.
| Applicable Gate | Example |
|---|---|
| Skill diagnostic gate | harness-doctor + apex-review |
| Session harvest loop | harvest-loop extract→attack→synthesize cycle |
| External asset audit | steel-quench Wave 1~N |
| Domain-specific quality gate | Plug in any project-defined FAIL→FIX checkpoint |
| Any FAIL→FIX repeating structure | User-defined gate |
[Input] gate name + pass criteria + max rounds N (default 3)
│
▼
Round 1
│ Execute gate
│ → All items pass: ✅ Round 1 passed → Round 2 (verification)
│ → FAIL occurs: List FAIL items → Execute FIX → Round 2
│
▼
Round N (N ≥ 2)
│ Re-execute same gate (with FIX applied + search for new FAILs)
│ → All items pass AND no FIX was applied in response to THIS round:
│ ✅ Declare truly passed ← the only terminating exit
│ → All items pass BUT you fixed something this round (any severity):
│ the fix is unverified → Round N+1
│ → New FAIL: List → FIX → prove the re-verify can fail (below) → Round N+1
│
▼
│ → FAILs remain after N rounds: "Structural redesign required" → Escalate
│ → Rounds clean but each keeps producing fixes: the fixes are manufacturing the
│ findings → REDUCE THE DESIGN, then re-run (steel-quench §Convergence Criteria 4)
│
▼ (if not converged within N rounds)
Escalation
→ Classify root cause: ambiguous criteria / FIX capability limit / gate design flaw
→ Output recommended action
Core principle: A fix exposing new FAILs is not a failure — it is a signal that the gate is working correctly. The deeper the round, the more fundamental the FAILs it uncovers.
Gate name: [what checkpoint is this]
Pass criteria: [specify pass condition — "all items ✅" or concrete criteria]
Max rounds: [default 3; simple gates 2; complex gates up to 5]
FIX owner: [auto-fixable / requires human / mixed]
Escalation: [who to escalate to / how, if not converged within N rounds]
What must stay constant across rounds:
What changes across rounds:
A green re-verify after a fix can mean the check aims at the wrong spot, the input never passed the defect's path, or the defect is really gone — and the output looks the same. Only the last counts. So every round that applies a FIX also does this before the next round, for each defect it fixed:
main is now), by the same path, environment
and command. That assertion must fail for the defect's reason — an infrastructure error, a missing
file or an unrelated failure does not count. If it passes, the check does not reach the defect: move
the input onto the defect's path and re-run; do not use the fixed subject's green as evidence.bash scripts/revert_probe.sh <fixed-file> <lane-suite> --baseline <pre-fix-ref>
— it swaps that one file back, reruns the suite, restores the bytes and names which lanes flipped.
The flip must include the defect's own assertion. Zero flips, or only unrelated flips, means the
check is not shown to detect this defect. Without the script (a plugin-only install): extract the
pre-fix file to a temporary path first (git show <ref>:<path> > "$tmp", check it succeeded), copy
the fixed file aside, put the pre-fix bytes in place, rerun, put the fixed bytes back, and compare the
file's hash and git diff --cached with what they were before. Never git checkout <ref> -- <path>
(it stages the revert). When the fix spans several files, undo the fix hunks, not whole files.Fail-before column) with the commands run: red→green, or
NOT RUN — <why> when no runnable check exists.Any NOT RUN carries to the end: the loop may then finish only as «passed — fix unverified: round
», never as ✅ truly passed. Fixes are a frequent source of new defects, so after the undo check
also re-run the neighbouring lanes, not only the one the fix targeted.
Judge with the engine, not by eye (2026-11-06): write the round vector as
R1 [new=<n>, fixed=<n>] → R2 [new=<n>, fixed=<n>] … (every round both counts) and run
python3 scripts/convergence_verdict.py --rounds "<vector>" — exit 0 CONVERGED · 1 NOT-CONVERGED or
PROVISIONAL (one clean round) · 2 UNMEASURED (a shape it cannot read, or a round missing a count — never
guessed). --scan-markers tracks/_meta audits every marker's axis2-rounds: line for «converged» written
where the vector says otherwise (first run: 6 markers wrote «R1 [new=0, fixed=0] → converged» — one round).
Calibration: bash scripts/test_convergence_verdict_lanes.sh. The rule it applies:
Convergence = a round returns 0 new FAILs AND no FIX was applied in response to it
Conditions to declare truly passed:
1. All items pass AND
2. Nothing was changed in response to THIS round, at any severity
(a FAIL you accept as residual is terminal; a FAIL you fix is not — the fix is unverified) AND
3. At least 2 rounds executed (a single clean round is "provisionally passed" only)
← condition 3 is NOT redundant with 2 and was nearly lost when 2 replaced it: freezing answers
"did the artifact change under the audit", min-2 answers "is one look enough". Independent
questions, both still open. Done When and the pipeline diagram enforce min-2 as well.
NOT "0 new FAILs across 2 consecutive rounds": while every round ships fixes that can never fire,
so it reads as permanently not-converged and gets shipped past anyway. Stricter form for quench
waves: steel-quench §Convergence Criteria.
| Cause | Signal | Recommended Action |
|---|---|---|
| Ambiguous pass criteria | Same item judged differently each round | Restate criteria explicitly, then restart |
| FIX capability limit | FAILs detected but fix method unknown | Bring in expert or reduce scope |
| Gate design flaw | Same FAIL repeats after N rounds | Redesign the gate itself → meta-prompt-builder |
## convergence-loop Result
Gate: [gate name]
Max rounds: N | Actual convergence round: M
| Round | Verdict | FAIL Items | New FAILs | FIX Applied | Fail-before |
|:---:|:---:|---|:---:|:---:|:---:|
| 1 | FAIL/PASS | [item list] | — | Y/N | red→green / NOT RUN — why / — |
| 2 | FAIL/PASS | [item list] | [new] | Y/N | … |
| 3 | PASS | none | none | — | — |
✅ Truly passed (converged at round M)
⚠️ Passed — fix unverified: round <n> (a FIX round's Fail-before is NOT RUN)
❌ Not converged within N rounds → Escalation: [root cause classification]
| Situation | Related Skill |
|---|---|
| Applied to skill diagnostic gate | harness-doctor → convergence-loop wrapper |
| Applied to quench wave | steel-quench Wave 3+ — stricter: S/A grade + the no-repair clause. Defer to its §Convergence Criteria, do not re-derive |
| Applied to session harvest loop | harvest-loop extract→attack→synthesize cycle |
| When gate redesign is needed | meta-prompt-builder |
Each condition declares its check class (mandatory-pass / measured / judged); every judged condition names its adversarial pairing — no judge-only path.
Setup complete (gate name, pass criteria, max rounds confirmed)
(mandatory-pass — all three named in writing BEFORE round 1; criteria written after seeing round-1
output are post-hoc and do not satisfy this)
+ Minimum 2 rounds executed
(measured: round count >= 2, read off the per-round table below)
+ Convergence declared (a round returns zero new failures AND you make no repairs in response to
it, at any grade) or escalation triggered
(measured: the round's new-failure count = 0 AND its repair count = 0 — two numbers, both recorded
per round; a single-number reading is what let "0 new failures while still repairing" pass)
⚠️ NOT "2 consecutive rounds": while every round ships repairs that criterion can never fire, so
it reads as permanently not-converged and gets shipped past. Adjudicated with measured evidence in
`steel-quench` §Convergence Criteria (2026-08-02).
+ Every round that applied a FIX carries a Fail-before entry: `red→green` (unfixed subject red by the
same path, and the fix site reverted → red → restored, e.g. `scripts/revert_probe.sh`) or
`NOT RUN — <why>`
(measured: the entry per FIX round; any `NOT RUN` caps the final verdict at «passed — fix
unverified», because green alone cannot tell a check that misses the defect from one that catches it)
+ Escalation root cause classified when max rounds is hit without convergence
(judged — adversarial pairing: `fh-commons:quench-challenger` argues that the loop stopped because
the GATE is blind rather than because the artifact is clean; an unchallenged "converged" on a
gate that never produced a FAIL is the failure mode this pairing exists to catch)
+ Per-round result table output
(mandatory-pass — one row per executed round, each carrying its new-failure and repair counts;
a missing row makes the two measured conditions above unreadable)
arXiv:2606.27009 (Semantic Early-Stopping for Iterative LLM Agent Loops, 2026-06-25, verified
2026-06-27) externally validates this skill's core thesis — stop on convergence, not a fixed
iteration cap — measuring −38% tokens vs fixed caps when stopping is judge-free (consecutive draft
embeddings stop changing in meaning). Sharpening, not blind validation: the same paper finds
quality-gated stopping (a judge call each round) counterproductive due to judging cost, and that an
oracle picking the best round beats any stopping rule — so the harder problem is which round was
best, not when to stop. Implication for this skill's judge/checklist-gated rounds: per-round
verification cost is real; prefer a cheap convergence signal where one exists, and keep max rounds N
bounded.
What SKILL.md sets; muted values are Claude Code's defaults
sonnet8 skills in this plugin
/deliberationMulti-perspective synthesis structure — Innovator (propose) → Devil-Advocate (challenge) → Mediator (synthesize) 3-layer execution. Outputs conditional verdicts without binary win/loss. Activates on "deliberation", "battle this out", "weigh the pros and cons", "review from multiple angles", "which side is right?". Optional deep-insight persona jurors for domain-specific views. Designed for design decisions, skill proposals, and architectural choices./essay-writerDrafts, revises and audits reflective non-fiction essays and essay serials (philosophy, humanities, science-meets-life pieces, platform serials, book chapters) — Korean first, other languages by the same steps. Pins the author's voice decisions before any edit (narrator person including the inclusive "we", register, length band, where each signature image lives), runs a claim gate that separates sourced fact, contested fact and interpretation, maps repeated images and verbatim sentences across episodes, calibrates hedging so conviction survives, and checks mobile rhythm and episode-to-episode bridges. The essay writer is the only one who edits prose; a technical reviewer critiques read-only. Technical docs, tech-blog posts and talk scripts go to ko-tech-writer instead. Triggers: "에세이 다듬어줘", "연재 원고 검토해줘", "브런치 연재 회차 점검해줘", "이 글 단정적인 데 없나 봐줘", "에세이에서 1인칭 빼줘", "회차마다 같은 비유가 반복되나 봐줘", "review my essay serial", "audit this essay for overclaiming"./ko-tech-writerWrites or revises Korean technical prose across three registers — reader-facing documents (tech-blog posts, technical docs), spoken scripts, and derived compressed assets (teasers, summaries) — through a fixed pipeline: register detection, real-sample calibration of the target venue, a translationese-removal pass, honesty-level layering (reader information vs internal audit vocabulary), a number/claim gate, and a rendition + perceptual QA pass. Triggers: "기술문서 써줘", "테크블로그 초안 잡아줘", "이 문서 번역투 고쳐줘", "블로그체로 다듬어줘", "이 글 회사 기술블로그에 올릴 수 있게 다듬어줘", "발표 대본 다듬어줘", "낭독 대본 점검해줘", "이 스크립트 소리 내서 읽을 때 걸리는 데 있나"./mcp-circuit-breakerDetects MCP tool failure patterns and trips a circuit breaker to stop cascading retries. Proposes fallback alternatives and resets when the tool recovers. Triggers on "MCP failing", "tool keeps erroring", "circuit-breaker", repeated tool call failures./persona-castUse to get a screen, page, form, flow or spec looked over the way its users and a review team would: does it look right, is the wording clear, where would someone get confused or stuck. Sends it to separate reviewer personas (designer, UX writer, front/back-end dev, QA, accessibility) and keeps what each one alone caught. Triggers: "이 화면 어때?", "이 페이지 괜찮아 보여?", "화면 문구 어색한 데 없어?", "사용자가 헷갈릴까?", "디자이너·QA 눈으로 봐줘", "does this page look okay?", "is the wording on this screen clear?", "persona-cast"./standpoint-reviewStandpoint review — check a change from the side that RECEIVES it: copy the receiving repo (or a clean install of the package) into an isolated folder, apply the change there, run that repo's OWN checks, have a reviewer judge the change against that repo's OWN rules with none of the author's explanation, then verify every finding against the source before acting on it. Use when asked whether a change breaks, or still works with, another repo, app, harness or package consumer that depends on it. Triggers: "입장 리뷰", "받는 쪽에서 돌려 봐", "하위 레포에서 돌려 봐", "그 레포 규칙으로 검증해 줘", "standpoint review", "run it from the target", "check it from the downstream repo", "make sure it won't break the repo that depends on it", "will this change break downstream users".npx claudepluginhub chrono-meta/forge-harness --plugin fh-commonsOther plugins' skills for the same job