convergence-monitoring

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

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.

收敛监测解决了迭代式AI开发中最重要的问题:**何时应该停止迭代?**答案不是固定的迭代次数或时间限制——而是收敛。收敛指的是Agent的输出趋于稳定;每一轮迭代产生的变化比上一轮更少、更细微。
**核心见解:**你不需要零差异——只需要剩余的修改无关紧要即可。

1. What Is Convergence?

1. 什么是收敛?

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
收敛表现为迭代间变更量的快速、持续下降:
Iteration 1:  ████████████████████████████████████████  300行变更
Iteration 2:  ████████████████                          120行变更
Iteration 3:  ██████                                     40行变更
Iteration 4:  ██                                         10行变更(仅 cosmetic 调整)
              ^--- 已达到收敛:每次迭代的差异不断缩小,直到只剩 cosmetic 变更

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
信号含义
变更行数呈指数级下降每轮迭代的变更量约为上一轮的一半
变更变得无关紧要剩余变更仅涉及格式、注释、导入——不影响行为
测试趋于稳定测试数量停止增长;通过率接近100%
无新文件创建架构已稳定;仅修改现有文件
实现跟踪更新缩小实现跟踪的变更仅为状态更新,而非新发现
发出完成信号Agent判定所有退出条件均已满足

What convergence looks like in git

Git中的收敛表现

bash
undefined
bash
undefined

Check lines changed per iteration

检查每轮迭代的变更行数

git log --oneline --stat
git log --oneline --stat

Iteration 5: trivial changes

Iteration 5: 无关紧要的变更

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

Iteration 4: minor adjustments

Iteration 4: 小幅调整

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

Iteration 3: moderate changes

Iteration 3: 中度变更

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

Iteration 2: significant changes

Iteration 2: 重大变更

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

Iteration 1: major initial work

Iteration 1: 初始主要工作

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

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

---

2. What Is a Ceiling?

2. 什么是瓶颈(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
瓶颈指的是Agent因外部约束无法取得进一步进展。与收敛类似,它会产生小差异,但原因完全不同。
收敛:  Agent已完成工作      -> 差异小是因为工作已结束
瓶颈:  Agent陷入停滞     -> 差异小是因为Agent无法继续推进

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
成因示例检测方式
缺失依赖API不可用、库未安装Agent日志中出现关于资源不可用的错误
模糊需求规格需求存在多种解读方式Agent在不同实现间反复摇摆
工具限制构建工具不支持所需功能Agent尝试的变通方法无法收敛
外部服务依赖测试需要网络访问、外部API测试因连接/超时错误失败
上下文窗口耗尽代码库过大,超出单次会话处理能力Agent无法追踪早期工作
权限边界限制Agent无法访问所需文件或系统日志中反复出现权限错误

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
维度收敛(工作接近完成)瓶颈(工作陷入停滞)
差异大小稳步缩小至接近零保持较小但无下降趋势
变更性质Cosmetic——空格、注释、命名功能性变更但陷入循环
测试结果通过率持续攀升至全覆盖通过率在目标以下停滞
Agent状态收尾工作,标记退出条件完成反复尝试相同策略
跟踪状态任务转为DONEBLOCKED任务不断堆积
建议操作宣告完成,进入下一阶段诊断障碍、解决后继续

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

检查1:测试是否通过?
  是且持续改善 -> 收敛
  否,卡在相同失败点 -> 瓶颈

检查2:Agent是否尝试新方法?
  否,仅做优化 -> 收敛
  是,但均以类似方式失败 -> 瓶颈

检查3:实现跟踪中是否存在BLOCKED任务?
  否 -> 收敛
  是 -> 瓶颈(查看阻塞原因)

检查4:Agent是否产生有意义的错误信息?
  否,仅做小幅变更 -> 收敛
  是,关于依赖/工具/访问权限 -> 瓶颈

3. Non-Convergence Signals

3. 非收敛信号

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
非收敛指的是Agent仍在产生变更,但变更量并未减少。系统未趋于稳定。
非收敛:
Iteration 1:  ████████████████████████████████████████  250行变更
Iteration 2:  ██████████████████████████████████████    230行变更
Iteration 3:  ████████████████████████████████████████  260行变更
Iteration 4:  ██████████████████████████████████        220行变更
              ^--- 未收敛:变更量持平/波动

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
根本原因症状修复方案
模糊需求规格Agent每轮迭代对需求的解读不同细化需求规格;添加具体验收标准
弱验证机制Agent无法验证正确性,因此持续变更添加构建/测试/代码检查关卡;强化验收标准
子Agent冲突多个Agent以冲突方式修改同一代码添加文件归属表;通过Agent工具调度子Agent
矛盾需求规格A要求X,规格B要求非X解决需求中的矛盾;添加明确优先级/规则
缺失退出条件Agent不知道何时完成工作添加明确的退出条件清单和完成信号
范围过宽单次提示/迭代的工作量过大拆分为更小、聚焦的提示,明确边界
依赖不稳定外部库或API持续变更固定依赖版本;在测试中模拟外部服务

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

当循环未趋于稳定时,问题出在源头——修复需求规格、验证机制或协调问题,而非增加迭代次数。
当系统未收敛时,运行更多迭代只会浪费时间和计算资源。正确做法:
  1. 停止迭代循环
  2. 分析非收敛模式
  3. 修复根本原因(通常是需求规格或验证机制)
  4. 恢复迭代循环

4. Test Pass Rate as Convergence Signal

4. 测试通过率作为收敛信号

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  |
| Iteration | 测试总数 | 通过数 | 失败数 | 跳过数 | 通过率 | 变化量 |
|-----------|-------|------|------|------|-----------|-------|
| 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
模式含义操作
测试数量增加Agent在添加测试覆盖良好——系统正在成熟
通过率接近100%实现符合需求规格良好——接近收敛
每轮迭代失败数减少每轮迭代修复的问题多于引入的问题良好——健康收敛
通过率在<100%时停滞部分测试持续失败瓶颈——调查失败测试
测试数量减少Agent在删除测试不良——调查原因;可能是删除了不便的测试
通过率波动修复某区域问题时破坏了另一区域非收敛——检查是否存在矛盾需求

Automated convergence check

自动化收敛检查

bash
undefined
bash
undefined

After each iteration, check convergence signals

每轮迭代后,检查收敛信号

echo "=== Convergence Check ==="
echo "=== 收敛检查 ==="

1. Lines changed (should be decreasing)

1. 变更行数(应持续减少)

git diff --stat HEAD~1
git diff --stat HEAD~1

2. Test results (should be improving)

2. 测试结果(应持续改善)

{TEST_COMMAND} 2>&1 | tail -5
{TEST_COMMAND} 2>&1 | tail -5

3. Build health (should always pass)

3. 构建健康度(应始终通过)

{BUILD_COMMAND} 2>&1 | tail -3
{BUILD_COMMAND} 2>&1 | tail -3

4. Files changed (should be decreasing)

4. 变更文件数(应持续减少)

git diff --name-only HEAD~1 | wc -l

---
git diff --name-only HEAD~1 | wc -l

---

5. Forward Progress Metrics

5. 进度指标

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)
拥有通过测试的需求规格占比:
需求规格覆盖率:
  spec-auth.md:     ██████████████████████████████████████  95% (19/20项需求)
  spec-data.md:     ████████████████████████████████        80% (16/20项需求)
  spec-ui.md:       ██████████████████████                  55% (11/20项需求)
  spec-api.md:      ████████████████████████████            70% (14/20项需求)
  ─────────────────────────────────────────────────────
  整体:          ████████████████████████████            75% (60/80项需求)

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)
指标健康趋势不健康趋势
通过测试的需求数每轮迭代增加持平或减少
总测试数增加持平或减少
实现跟踪中的DONE任务增加持平且BLOCKED任务增多
未解决问题减少增加或持平
记录的死胡同小幅增加(学习过程)激增(盲目尝试)

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.

跟踪每轮迭代的进度:
| Iteration | 已满足需求数 | 本轮新增 | 速度 |
|-----------|-----------------|-------------------|----------|
| 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        |
速度应随时间下降(先处理简单需求,后处理复杂需求),但绝不应降至零。零速度=瓶颈。

6. When to Stop Iterating

6. 何时停止迭代

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
当满足以下任一条件时,停止迭代循环:
  1. **发出完成信号:**Agent输出
    <all-tasks-complete>
  2. **变更无关紧要:**上一轮迭代变更少于约20行,且均为格式/注释调整
  3. **测试通过率稳定:**通过率连续2+轮保持95%以上
  4. **所有退出条件满足:**退出条件清单中的所有
    [ ]
    均变为
    [x]
  5. **进度正向停滞:**所有需求规格均有通过的测试

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
当满足以下所有条件时,继续迭代:
  1. 变更仍为实质性(行为变更,而非仅格式调整)
  2. 测试通过率仍在改善
  3. 实现跟踪中仍有TODO或IN_PROGRESS任务
  4. 迭代次数未超过最大值

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

当满足以下任一条件时,暂停并调查:
  1. 变更量小但测试未通过
  2. Agent反复尝试相同方法
  3. 实现跟踪中BLOCKED任务不断堆积
  4. 测试通过率波动(上升-下降-上升-下降)
  5. Agent产生关于依赖或工具的错误信息

7. Monitoring During Iteration Loops

7. 迭代循环中的监测

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                                   |
+------------------------------------------------------+
+------------------------------------------------------+
| 收敛仪表盘                                |
+------------------------------------------------------+
| 迭代次数: 4/10                                      |
| 变更行数: 45(上一轮: 112,趋势: 下降)    |
| 变更文件数: 3(上一轮: 8,趋势: 下降)       |
| 测试通过率: 94.2%(上一轮: 87.1%,趋势: 上升)      |
| 测试总数: 82(上一轮: 75,趋势: 上升)               |
| BLOCKED任务数: 0(上一轮: 1,趋势: 下降)             |
| 状态: 正在收敛                                   |
+------------------------------------------------------+

Monitoring commands

监测命令

bash
undefined
bash
undefined

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
undefined
echo "--- 变更行数 ---" git diff --stat HEAD~1 | tail -1
echo "--- 变更文件数 ---" git diff --name-only HEAD~1 | wc -l
echo "--- 测试结果 ---" {TEST_COMMAND} --summary 2>&1 | tail -3
echo "--- 实现跟踪状态 ---" grep -c "BLOCKED|IN_PROGRESS|TODO|DONE" context/impl/impl-*.md
undefined

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

为非收敛信号设置告警:
告警触发条件操作
波动变更行数较上一轮增加暂停;检查是否存在冲突变更
停滞变更行数<5但测试仍失败暂停;可能存在瓶颈
退化测试通过率下降暂停;调查问题原因
失控连续3+轮迭代变更行数>500暂停;范围可能过宽

8. Non-Convergence Recovery

8. 非收敛恢复流程

When you detect non-convergence, follow this recovery process:
检测到非收敛时,遵循以下恢复流程:

Step 1: Stop the iteration loop

步骤1:停止迭代循环

Do not keep running. More iterations will not help.
不要继续运行。更多迭代无济于事。

Step 2: Diagnose the root cause

步骤2:诊断根本原因

markdown
undefined
markdown
undefined

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
  • 变更量持平(未减少)
  • 变更量波动(上升-下降-上升-下降)
  • Agent反复尝试失败方法
  • 测试结果波动(通过后又失败)
  • 多个Agent修改同一文件

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?
undefined
  1. 检查需求规格:需求是否清晰明确?
  2. 检查验证机制:Agent能否验证正确性?
  3. 检查文件归属:Agent是否存在冲突?
  4. 检查范围:提示的工作量是否过大?
  5. 检查依赖:外部资源是否可用?
undefined

Step 3: Fix the root cause

步骤3:修复根本原因

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
根本原因修复方案
模糊需求规格重写模糊需求,添加具体验收标准
弱验证机制在提示中添加构建/测试/代码检查关卡
文件冲突添加文件归属表;通过Agent工具调度子Agent
范围过宽拆分为更小的提示;减少并发Agent数量
外部依赖问题模拟依赖;或在恢复前解决依赖问题

Step 4: Resume the iteration loop

步骤4:恢复迭代循环

After fixing the root cause, resume from where you stopped. Do NOT restart from scratch -- git history preserves all progress.
bash
undefined
修复根本原因后,从停止处恢复。不要从头开始——git历史记录保留了所有进度。
bash
undefined

Resume with the same prompt, possibly fewer remaining iterations

使用相同提示恢复迭代,可减少剩余迭代次数

iteration-loop context/prompts/003-generate-impl-from-plans.md -n 5 -t 1h

---
iteration-loop context/prompts/003-generate-impl-from-plans.md -n 5 -t 1h

---

9. Convergence and Revision

9. 收敛与修订

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.

修订通过完善需求规格直接提升收敛效率:
无修订:
  Iteration 1: 200行变更,5处手动修复 -> 需求规格未变更
  Iteration 2: 180行变更,4处手动修复 -> 需求规格未变更
  Iteration 3: 170行变更,4处手动修复 -> 未收敛

有修订:
  Iteration 1: 200行变更,5处手动修复 -> 需求规格新增5项要求
  Iteration 2: 100行变更,2处手动修复 -> 需求规格新增2项要求
  Iteration 3: 50行变更,0处手动修复  -> 正在收敛
**频繁手动修复但不修订需求规格=非收敛。**迭代循环会持续产生相同的bug,因为需求规格中没有任何规则防止此类问题。

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.
  • **收敛模式参考:**查看
    references/convergence-patterns.md
    获取完整的收敛模式目录及示例。
  • **修订:**查看
    ck:revision
    技能,了解如何通过将bug追溯到需求规格来提升收敛效率。
  • **提示流水线:**查看
    ck:prompt-pipeline
    技能,了解如何设计带有适当退出条件和完成信号的提示。
  • **验证优先设计:**查看
    ck:validation-first
    技能,了解如何构建提供收敛信号的验证关卡。
  • **实现跟踪:**查看
    ck:impl-tracking
    技能,了解如何跟踪进度并检测瓶颈情况。