Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计通过

convergence-monitoring收敛监控

Agent Skill

convergence-monitoring 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

367

周安装

15

GitHub Stars

798

下载量

118
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:convergence-monitoring(收敛监控)
来源仓库:https://github.com/juliusbrussee/cavekit
仓库路径:skills/convergence-monitoring
安装命令:
npx skills add https://github.com/juliusbrussee/cavekit --skill convergence-monitoring
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/juliusbrussee/cavekit --skill convergence-monitoring

简介

convergence-monitoring 判断 AI 迭代是否收敛,即输出是否趋于稳定。

  • 通过监测每次迭代变化量递减趋势来确定停止时机。
  • 核心目标是识别剩余修改是否影响显著,而非追求零差异。
  • 适用于需要控制迭代成本、避免过度优化的长周期开发任务。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Convergence Monitoring

Convergence monitoring answers the most important question in iterative AI development: when should you stop iterating? The answer is not a fixed number of iterations or a time limit -- it is convergence. Convergence means the agent's output is stabilizing; each iteration produces fewer and smaller changes than the last.

Core insight: You don't need a zero-diff -- you need the remaining modifications to be inconsequential.


1. What Is Convergence?

Convergence appears as a rapid, consistent decline in the volume of changes from one iteration to the next:

Iteration 1:  ████████████████████████████████████████  300 lines changed
Iteration 2:  ████████████████                          120 lines changed
Iteration 3:  ██████                                     40 lines changed
Iteration 4:  ██                                         10 lines changed (cosmetic only)
              ^--- Convergence reached: the diff shrinks each pass until only cosmetic changes remain

Convergence indicators

SignalWhat It Means
Lines changed decreasing exponentiallyEach iteration makes roughly half the changes of the previous one
Changes become trivialRemaining changes are formatting, comments, imports -- not behavior
Tests stabilizeTest count stops increasing; pass rate approaches 100%
No new files createdThe architecture has settled; only existing files are modified
Impl tracking updates shrinkImplementation tracking changes are status updates, not new findings
Completion signal emittedAgent determines all exit criteria are met

What convergence looks like in git

# Check lines changed per iteration
git log --oneline --stat

# Iteration 5: trivial changes
abc1234 Iteration 5: formatting and comment fixes
 3 files changed, 8 insertions(+), 6 deletions(-)

# Iteration 4: minor adjustments
def5678 Iteration 4: edge case handling
 5 files changed, 22 insertions(+), 8 deletions(-)

# Iteration 3: moderate changes
ghi9012 Iteration 3: complete API integration
 12 files changed, 85 insertions(+), 31 deletions(-)

# Iteration 2: significant changes
jkl3456 Iteration 2: implement core features
 18 files changed, 156 insertions(+), 42 deletions(-)

# Iteration 1: major initial work
mno7890 Iteration 1: initial implementation
 25 files changed, 312 insertions(+), 15 deletions(-)

2. What Is a Ceiling?

A ceiling is when the agent cannot make further progress due to external constraints. Like convergence, it produces small diffs -- but for fundamentally different reasons.

Convergence:  Agent is DONE      -> small diffs because work is complete
Ceiling:      Agent is STUCK     -> small diffs because agent cannot proceed

Ceiling causes

CauseExampleHow to Detect
Missing dependencyAPI not available, library not installedAgent logs errors about unavailable resources
Ambiguous specRequirement can be interpreted multiple waysAgent oscillates between implementations
Tooling limitationBuild tool does not support needed featureAgent tries workarounds that do not converge
External serviceTest requires network access, external APITests fail with connection/timeout errors
Context window exhaustionCodebase too large for one sessionAgent loses track of earlier work
Permission boundaryAgent cannot access needed files or systemsRepeated permission errors in logs

How to tell them apart

DimensionConvergence (work is finishing)Ceiling (work is stuck)
Size of diffsShrinking steadily toward zeroStaying small but not trending down
Nature of changesCosmetic -- whitespace, comments, namingFunctional but going in circles
Test resultsPass rate climbing toward full coveragePass rate plateaued below target
Agent stanceWrapping up, marking exit criteria doneRetrying the same strategies repeatedly
Tracking statusTasks moving to DONEBLOCKED items piling up
Recommended actionDeclare done, move to next phaseDiagnose the obstacle, resolve it, then continue

How to distinguish them

Check 1: Are tests passing?
  YES, and improving -> Convergence
  NO, stuck at same failures -> Ceiling

Check 2: Is the agent trying new approaches?
  NO, just polishing -> Convergence
  YES, but they all fail similarly -> Ceiling

Check 3: Are there BLOCKED tasks in impl tracking?
  NO -> Convergence
  YES -> Ceiling (read the blockers)

Check 4: Is the agent producing meaningful error messages?
  NO, just minor changes -> Convergence
  YES, about dependencies/tools/access -> Ceiling

3. Non-Convergence Signals

Non-convergence means the agent is making changes, but they are NOT decreasing. The system is not stabilizing.

Non-convergence:
Iteration 1:  ████████████████████████████████████████  250 lines changed
Iteration 2:  ██████████████████████████████████████    230 lines changed
Iteration 3:  ████████████████████████████████████████  260 lines changed
Iteration 4:  ██████████████████████████████████        220 lines changed
              ^--- NOT converging: changes are flat/oscillating

Root causes of non-convergence

Root CauseSymptomFix
Fuzzy specsAgent interprets requirements differently each iterationMake specs more precise; add concrete acceptance criteria
Weak validationAgent cannot verify correctness, so it keeps changing thingsAdd build/test/lint gates; strengthen acceptance criteria
Fighting sub-agentsMultiple agents change the same code in conflicting waysAdd file ownership tables; dispatch subagents via the Agent tool
Contradictory requirementsSpec A says X, spec B says not-XResolve contradictions in specs; add explicit priority/precedence
Missing exit criteriaAgent does not know when it is doneAdd explicit exit criteria checklists and completion signals
Over-broad scopeToo much work for one prompt/iterationSplit into smaller, focused prompts with clear boundaries
Unstable dependenciesExternal library or API keeps changingPin dependencies; mock external services in tests

The critical rule

When the loop isn't stabilizing, the problem is upstream -- fix the specifications, validation, or coordination rather than adding more passes.

Running more iterations when the system is not converging wastes time and compute. Instead:

  1. Stop the iteration loop
  2. Analyze the non-convergence pattern
  3. Fix the root cause (usually specs or validation)
  4. Resume the iteration loop

4. Test Pass Rate as Convergence Signal

Test pass rate is the most reliable quantitative convergence signal. Track these metrics:

Metrics to monitor

| Iteration | Tests | Pass | Fail | Skip | Pass Rate | Delta |
|-----------|-------|------|------|------|-----------|-------|
| 1         | 45    | 30   | 15   | 0    | 66.7%     | --    |
| 2         | 62    | 50   | 12   | 0    | 80.6%     | +13.9 |
| 3         | 78    | 70   | 8    | 0    | 89.7%     | +9.1  |
| 4         | 85    | 82   | 3    | 0    | 96.5%     | +6.8  |
| 5         | 88    | 87   | 1    | 0    | 98.9%     | +2.4  |

What to look for

PatternMeaningAction
Test count increasingAgent is adding coverageGood -- system is maturing
Pass rate approaching 100%Implementation matches specsGood -- approaching convergence
Fewer failures per iterationEach pass fixes more than it breaksGood -- healthy convergence
Pass rate plateaus < 100%Some tests consistently failCeiling -- investigate failing tests
Test count decreasingAgent is deleting testsBad -- investigate why; may be deleting inconvenient tests
Pass rate oscillatingFixes in one area break anotherNon-convergence -- check for conflicting specs

Automated convergence check

# After each iteration, check convergence signals
echo "=== Convergence Check ==="

# 1. Lines changed (should be decreasing)
git diff --stat HEAD~1

# 2. Test results (should be improving)
{TEST_COMMAND} 2>&1 | tail -5

# 3. Build health (should always pass)
{BUILD_COMMAND} 2>&1 | tail -3

# 4. Files changed (should be decreasing)
git diff --name-only HEAD~1 | wc -l

5. Forward Progress Metrics

For large projects where full convergence takes many iterations, track forward progress toward eventual convergence.

Spec requirement coverage

The percentage of spec requirements with passing tests:

Spec Requirements Coverage:
  spec-auth.md:     ██████████████████████████████████████  95% (19/20 requirements)
  spec-data.md:     ████████████████████████████████        80% (16/20 requirements)
  spec-ui.md:       ██████████████████████                  55% (11/20 requirements)
  spec-api.md:      ████████████████████████████            70% (14/20 requirements)
  ─────────────────────────────────────────────────────
  Overall:          ████████████████████████████            75% (60/80 requirements)

Forward progress signals

MetricHealthy TrendUnhealthy Trend
Requirements with passing testsIncreasing each iterationFlat or decreasing
Total test countIncreasingFlat or decreasing
DONE tasks in impl trackingIncreasingFlat with BLOCKED tasks growing
Open issuesDecreasingIncreasing or flat
Dead ends documentedIncreasing slightly (learning)Exploding (thrashing)

Iteration velocity

Track how much progress each iteration makes:

| Iteration | Requirements Met | New This Iteration | Velocity |
|-----------|-----------------|-------------------|----------|
| 1         | 15/80           | 15                | 15       |
| 2         | 30/80           | 15                | 15       |
| 3         | 48/80           | 18                | 18       |
| 4         | 60/80           | 12                | 12       |
| 5         | 68/80           | 8                 | 8        |
| 6         | 73/80           | 5                 | 5        |
| 7         | 76/80           | 3                 | 3        |

Velocity should decrease over time (easy requirements first, hard ones last), but should never hit zero. Zero velocity = ceiling.


6. When to Stop Iterating

Stop conditions (convergence reached)

Stop the iteration loop when ANY of these are true:

  1. Completion signal emitted: Agent outputs <all-tasks-complete>
  2. Changes are trivial: Last iteration changed fewer than ~20 lines, all formatting/comments
  3. Test pass rate is stable: Pass rate has been 95%+ for 2+ consecutive iterations
  4. All exit criteria met: Every [] in the exit criteria checklist is [x]
  5. Forward progress stalled positively: All spec requirements have passing tests

Continue conditions (not yet converged)

Continue iterating when ALL of these are true:

  1. Changes are still substantial (behavior changes, not just formatting)
  2. Test pass rate is still improving
  3. There are still TODO or IN_PROGRESS tasks in impl tracking
  4. The iteration count is under the maximum

Investigate conditions (possible ceiling)

Pause and investigate when ANY of these are true:

  1. Changes are small but tests are NOT passing
  2. Agent is retrying the same approach repeatedly
  3. BLOCKED tasks are accumulating in impl tracking
  4. Test pass rate is oscillating (up-down-up-down)
  5. Agent is producing error messages about dependencies or tooling

7. Monitoring During Iteration Loops

What to monitor in real time

+------------------------------------------------------+
| Convergence Dashboard                                |
+------------------------------------------------------+
| Iteration: 4/10                                      |
| Lines changed: 45 (prev: 112, trend: decreasing)    |
| Files changed: 3 (prev: 8, trend: decreasing)       |
| Test pass rate: 94.2% (prev: 87.1%, trend: up)      |
| Tests: 82 total (prev: 75, trend: up)               |
| BLOCKED tasks: 0 (prev: 1, trend: down)             |
| Status: CONVERGING                                   |
+------------------------------------------------------+

Monitoring commands

# Quick convergence check after each iteration
echo "--- Lines changed ---"
git diff --stat HEAD~1 | tail -1

echo "--- Files changed ---"
git diff --name-only HEAD~1 | wc -l

echo "--- Test results ---"
{TEST_COMMAND} --summary 2>&1 | tail -3

echo "--- Impl tracking status ---"
grep -c "BLOCKED\|IN_PROGRESS\|TODO\|DONE" context/impl/impl-*.md

Automated alerts

Set up alerts for non-convergence signals:

AlertTriggerAction
OscillationLines changed increased vs previous iterationPause; check for conflicting changes
StallLines changed < 5 but tests still failingPause; likely a ceiling
RegressionTest pass rate decreasedPause; investigate what broke
RunawayLines changed > 500 for 3+ iterationsPause; scope may be too broad

8. Non-Convergence Recovery

When you detect non-convergence, follow this recovery process:

Step 1: Stop the iteration loop

Do not keep running. More iterations will not help.

Step 2: Diagnose the root cause

## Non-Convergence Diagnosis

### Symptoms
- [ ] Changes are flat (not decreasing)
- [ ] Changes are oscillating (up-down-up-down)
- [ ] Agent is retrying failed approaches
- [ ] Tests are oscillating (passing then failing)
- [ ] Multiple agents changing the same files

### Root Cause Analysis
1. Check specs: Are requirements clear and unambiguous?
2. Check validation: Can the agent verify correctness?
3. Check file ownership: Are agents conflicting?
4. Check scope: Is the prompt trying to do too much?
5. Check dependencies: Are external resources available?

Step 3: Fix the root cause

Root CauseFix
Fuzzy specsRewrite ambiguous requirements with concrete acceptance criteria
Weak validationAdd build/test/lint gates to the prompt
File conflictsAdd file ownership tables; dispatch subagents via the Agent tool
Over-broad scopeSplit into smaller prompts; reduce concurrent agents
External dependencyMock the dependency; or resolve it before resuming

Step 4: Resume the iteration loop

After fixing the root cause, resume from where you stopped. Do NOT restart from scratch -- git history preserves all progress.

# Resume with the same prompt, possibly fewer remaining iterations
iteration-loop context/prompts/003-generate-impl-from-plans.md -n 5 -t 1h

9. Convergence and Revision

Revision directly improves convergence by making specs more complete:

Without revision:
  Iteration 1: 200 lines, 5 manual fixes -> specs unchanged
  Iteration 2: 180 lines, 4 manual fixes -> specs unchanged
  Iteration 3: 170 lines, 4 manual fixes -> NOT converging

With revision:
  Iteration 1: 200 lines, 5 manual fixes -> specs updated with 5 new requirements
  Iteration 2: 100 lines, 2 manual fixes -> specs updated with 2 new requirements
  Iteration 3: 50 lines, 0 manual fixes  -> CONVERGING

Frequent manual fixes without revision = non-convergence. The iteration loop keeps producing the same bugs because nothing in the specs prevents them.


Cross-References

  • Convergence patterns reference: See references/convergence-patterns.md for the complete convergence pattern catalog with examples.
  • Revision: See ck:revision skill for how tracing bugs to specs improves convergence.
  • Prompt pipeline: See ck:prompt-pipeline skill for designing prompts with proper exit criteria and completion signals.
  • Validation-first design: See ck:validation-first skill for building validation gates that provide convergence signals.
  • Impl tracking: See ck:impl-tracking skill for tracking progress and detecting ceiling conditions.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.23%
按下载量换算42

Claude

27.79%
按下载量换算33

Cursor

18.69%
按下载量换算22

Gemini CLI

8.63%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills