Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,10 @@ assert.deepEqual(
{ wait_for_ci: false, review_priority: "other-developers-first" },
"an explicit Goal CI opt-out must survive default projection and omit envelope fields",
);

// Capability defaults may enable Stride without changing saved legacy choices.
const enabledStrideDefault = {...cadenceDefault, stride_strategy: "evidence_conditioned_v1"};
assert.deepEqual(goalReplanCadenceEditorValue(null, enabledStrideDefault), enabledStrideDefault);
assert.equal(goalReplanCadenceEditorValue({stride_strategy: "off"}, enabledStrideDefault).stride_strategy, "off");
assert.equal(goalReplanCadenceEditorValue({count_unit: "effective_turns", count: 3}, enabledStrideDefault).stride_strategy, "off");
assert.equal(projectEditableCapabilityConfiguration(cadenceEditor, {}, enabledStrideDefault).stride_strategy, "evidence_conditioned_v1");
41 changes: 22 additions & 19 deletions docs/architecture/rfcs/hierarchical-agent-stride-control-v0.md
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ times separately. Check whether later work implemented the proposed mechanism;
a decision record, saved snapshot or new identifier alone does not establish
adoption, restoration or improved results. These are refinements of the existing
Agent questions, not new decision fields, score thresholds or settlement gates;
the strategy remains default-off. Identify the remaining authoritative goal gap, its limiting
the inherited capability default enables the strategy; explicit off and saved legacy configurations retain their meaning. Identify the remaining authoritative goal gap, its limiting
component and plausible headroom before choosing the next mechanism. Compare
continuation with plausible alternatives that change the limiting assumption or
mechanism, including complete cost. A stalled route calls for a discriminating
Expand Down Expand Up @@ -870,7 +870,8 @@ source-bound stride decision. Typed progress, successor and terminal results
remain valid evidence/outcomes, while a bare Todo successor transition cannot
stand in for the review. An evidenced path decision can retain unfinished useful
work without a fabricated new progress identifier or Todo. Explicit acceptance
and capability outcome restrictions still apply; default-off and other sources
and capability outcome restrictions still apply; explicit off, saved legacy
cadence-only configurations and other sources
retain their prior exit policies. No new detector, threshold or action is added.

The frozen [EdgeBench diagnostic window](https://huggingface.co/datasets/songwells/loopxbench/blob/c5dd30bfaa2f5af42ccd7d0ca9ed59b865a81d42/public/edgebench-20261018-v1/diagnostic_windows.csv)
Expand All @@ -888,23 +889,25 @@ This proves the scripted control path, not model adoption or EdgeBench score gai
Existing negative-result and later-work followthrough coverage remains necessary.
The effective review cadence remains owned by the
[Goal Vision/replan contract](../../reference/protocols/goal-vision-replan-contract-v0.md#default-review-cadence)
and Goal/device configuration. Six effective work Turns is the default; enabling
the stride strategy for one Goal inherits that configured baseline. For the
enabled strategy with receipt-backed effective-Turn cadence, the latest settled
fresh stride review through the current Agent's last autonomous ACK adjusts the
next interval: `grow` with `supported_progress` and an evidence-linked previous
`goal_gain=improved` uses 1.5 times the baseline; `verify` or an uncertainty/gap/
failure basis uses 0.5 times; `switch` takes precedence and keeps the baseline.
Round up to at least one Turn, without compounding repeated reads. An initial,
unsettled, historical-v1 or missing decision keeps the baseline; do not reach
through a newer ACK to reuse older feedback. The settled writer validates citation
provenance; the gain remains an Agent claim, not independent outcome certification.
Off mode, legacy counting, stall triggers, authority, per-Turn settlement and
frozen workers retain their behavior. The inline review questions and syntax
example remain delivered together; shortening repeated prose adds no decision
fields or gates. Cadence is not Todo size, an experiment boundary or a mandatory
route switch. Matched continuation must qualify actual
adoption, target benefit and full cost before promotion or synergy claims.
and Goal/device configuration; six effective work Turns is the default. Stride
no longer maps grow/verify to fixed cadence multipliers. It governs work shape:
apply the three independent plans to actual Todo scope and acceptance through
existing authoring/update commands, record verified IDs in `todo_delta`, and
execute the retained or revised work under normal admission. Supported grow
consolidates fragmented setup, implementation, integration and decisive validation
into a coherent accepted deliverable or complete interpretable experiment.
Keep dependencies, acceptance, risk, authority and per-Turn settlement boundaries.
The next review must distinguish declared scope from actual execution, outcome
quality and full cost; preserving a plan is not adoption or benefit.

Evidence-conditioned stride is the capability default for inherited configuration.
Explicit off, saved legacy cadence-only configurations and historical records
retain their semantics. Clear overrides to inherit, or select off to roll back;
no installed configuration, frozen worker or historical receipt is rewritten.
The codec's missing historical strategy remains off. Review questions and syntax
examples remain together; no extra decision fields, strategy versions or
machine-enforced semantic classifier are added. Matched continuation must still
qualify target benefit and full cost before promotion or synergy claims.

Exploratory iteration may run only strategy-enabled test arms and reuse historical
baselines as descriptive references. A fresh concurrent baseline is not required
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ switch(尝试不同机制)或 verify(解决决定扩大或切换的具体
比较须绑定产物版本、输入条件和原预算,区分提交时刻与反馈实际到达时刻,并检查
后续工作是否执行了提议的机制变化。决定记录、快照或新标识本身不证明采用、恢复
或结果改善。这些是既有Agent问题的细化,不增加决策字段、分数阈值或结算门槛;
策略仍默认关闭。先识别仍未满足的
继承能力配置时策略默认开启,显式关闭和已保存的旧配置保留原语义。先识别仍未满足的
权威目标、当前瓶颈分量和可能的收益空间,再选择下一机制。比较原路线接续与
改变该瓶颈假设或机制的可行替代路线,并计入完整成本。路线停滞时,应以能区分
这些解释的完整实验推进,不能只继续局部调参。区分干预未执行、局部改善未迁移,
Expand Down Expand Up @@ -705,7 +705,8 @@ Benchmark 的显式 `loopx-planned` provider 在未修改的规划 packet 外附
任何结算路径都须留下绑定本次来源的 stride 决定。
类型化进展、后续任务和终止结果仍可作为证据与结果,但单独的 Todo 后续转换不能
代替复盘。有证据的路径决定可以保留尚未完成的有用工作,不必编造新进展标识或
Todo。验收和能力 owner 显式限定的结果仍须遵守;默认关闭和其他来源保持原有
Todo。验收和能力 owner 显式限定的结果仍须遵守;显式关闭、已保存的旧版仅周期
配置和其他来源保持原有
出口规则。不增加检测器、阈值或动作。

冻结的 [EdgeBench 诊断窗口](https://huggingface.co/datasets/songwells/loopxbench/blob/c5dd30bfaa2f5af42ccd7d0ca9ed59b865a81d42/public/edgebench-20261018-v1/diagnostic_windows.csv)
Expand All @@ -719,17 +720,19 @@ Todo。验收和能力 owner 显式限定的结果仍须遵守;默认关闭和
机制选择,改名本身不算换路。这证明脚本化控制链路,不证明模型采用或 EdgeBench
分数提升;既有负结果与后续实际工作跟进验证仍有必要。
有效复核周期仍由[Goal Vision/replan 契约](../../reference/protocols/goal-vision-replan-contract-v0.md#default-review-cadence)
及 Goal/设备配置负责。六个有效工作 Turn 是默认值;对单个 Goal 启用步幅策略时
沿用该配置基准。启用策略且按结算回执计有效 Turn 时,读取当前 Agent 最近一次
自主 ACK 之前(含该 ACK)的最新已结算 fresh stride 复盘,调整下一周期:
`grow`、`supported_progress` 且前次 `goal_gain=improved` 有证据关联时取基准的
1.5 倍;`verify` 或不确定/差距/失败依据取 0.5 倍;`switch` 优先并保留基准。
向上取整且至少一个 Turn,多次读取不连乘。首次、未结算、历史 v1 或缺失决定
保留基准;不能越过更新的 ACK 重用旧反馈。已结算写回校验引用来源,收益仍是
Agent 声明,不是独立结果认证。关闭状态、旧计数方式、停滞触发器、权限、每
Turn 结算和冻结 worker 行为不变。复盘问题和语法示例仍在同一 inline 包中交付;
压缩重复文字不新增决定字段或 gate。周期不是 Todo 大小、实验边界或强制换路信号。
策略采用、目标收益、完整成本和交互增益须通过匹配接续等实验验证后再作结论。
及 Goal/设备配置负责,默认六个有效工作 Turn。Stride 不再把 grow/verify 映射为
固定周期倍数,而是调整工作形态:通过既有 Todo 创建/更新命令,把三个轴的独立
计划落实到真实 Todo 范围和验收,向 `todo_delta` 写入已核验的 ID,并经正常准入
执行保留或调整后的工作。有证据支持的 grow 将碎片化准备、实现、集成及决定性
验证组织为完整可验收交付或完整可解释实验;保留依赖、验收、风险、权限与每 Turn
结算边界。下次复盘区分计划范围与实际执行、结果质量和完整成本;保存计划不等于
采用或收益。

继承能力配置时,依据证据的步幅策略默认开启。显式关闭、已保存的旧版仅周期配置
及历史记录保持原语义。清除覆盖可恢复继承,显式选择 off 可回退;不重写已安装
配置、冻结 worker 或历史回执。历史解码中缺失的策略仍按 off 处理。复盘问题和
语法示例仍一起交付,不新增决定字段、策略版本或机器强制语义分类器。目标收益、
完整成本与交互增益仍须通过匹配接续等实验验证后再作结论。

敏捷探索可只跑启用策略的测试组,以历史基线作描述性参照;不要求每次迭代都
重启并发基线。这类运行用于观察路线采用与迭代收益,不单独证明因果净收益或
Expand Down
35 changes: 23 additions & 12 deletions docs/reference/protocols/goal-vision-replan-contract-v0.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,22 @@ no TurnEnvelope opt-in is needed. Quota and writeback resolve the same live
configuration. See [Goal review cadence](../../quota-allocation.md#goal-review-cadence)
for configuration precedence, rollback and independent review triggers.

When `stride_strategy=evidence_conditioned_v1` is enabled, receipt-backed cadence
uses the configured count as a baseline for the next interval. A settled fresh
review can scale it by 1.5 (supported grow with evidence-linked improved goal
gain) or 0.5 (verify or uncertainty/gap/failure); switch keeps the baseline.
Counts round up to at least one, never compound across reads, and do not cross a
newer autonomous ACK to reuse older feedback. Missing/unsettled/historical
decisions and off mode keep the baseline. Stall triggers and settlement remain
independent. This feedback uses source-validated Agent claims, not certified gain;
see the [strategy boundary](../../architecture/rfcs/hierarchical-agent-stride-control-v0.md#76-research-scope-and-evidence-conditioned-control).
Evidence-conditioned Stride is the capability default when no Goal or saved
machine configuration overrides it. Explicit `off`, legacy saved cadence-only
configuration and historical decisions keep their original meaning. Clear the
cadence/strategy override to inherit the current default, or explicitly select
`off` for rollback; this does not rewrite prior evidence or frozen workers.

Stride sizes the next coherent Todo/delivery or interpretable experiment, route
change and validation scope through the existing Todo and Vision owners. Apply
an evidence-supported `grow` plan to actual Todo scope and acceptance, retain
unfinished useful work, and record verified Todo IDs in `todo_delta`. Subsequent
normal admission, execution and evidence-linked review qualify adoption; prose
and a new Todo alone do not. `verify` resolves a decision-relevant uncertainty
and need not shrink work. All actions preserve the configured review count,
stall triggers, dependencies, authority and per-Turn settlement. There are no
fixed grow/verify cadence multipliers. See the
[strategy boundary](../../architecture/rfcs/hierarchical-agent-stride-control-v0.md#76-research-scope-and-evidence-conditioned-control).

## Replan ACK freshness

Expand Down Expand Up @@ -432,8 +439,10 @@ is required before typed progress, a successor, blocker or terminal outcome can
settle the obligation. Enabled fresh-path decisions also retain their existing
structured-decision validation. The [structured contract](#structured-stride-control)
owns those field, reference and review requirements; the shared planning
guidance does not replace or add to them. `off` remains the default, including
legacy configurations, and unknown versions fail before mutation. No new
guidance does not replace or add to them. The inherited capability default is
`evidence_conditioned_v1`; explicit `off` and saved legacy cadence-only
configurations retain their meaning, as described in [Default review cadence](#default-review-cadence).
Unknown versions fail before mutation. No new
permission, scheduler or automatic route actuator is introduced here.

The [captured reader](turn-envelope-v0.md#captured-replan-reads--捕获后的重规划读取)
Expand Down Expand Up @@ -478,7 +487,9 @@ Todo 顺序和 Agent 暂定筛选规则可调整;到期复核可以继续、
fresh-path 决定仍受既有结构校验约束。这些是机器执行的字段、引用与复核要求,
不能一概称为建议文字,也不是本段新增的门禁。

默认仍为 `off`,旧配置兼容,未知版本在写入前拒绝。捕获后的 reader 在开关两种
继承能力配置时默认启用 `evidence_conditioned_v1`;显式 `off` 和已保存的旧版仅周期
配置保留原语义,详见[默认复盘周期](#default-review-cadence)。未知版本在写入前拒绝。
捕获后的 reader 在开关两种
情况下都先交付复盘事实、再交付写回格式;它改善信息交付,不是首次引入证据驱动
重规划。关闭 Stride 时观察到的读取/结算改善不能归为 Stride 收益。权限、调度器与
自动路线执行权不变;投递与隔离验证不证明实际决策采用、有用成果或可比完整成本。
Expand Down
2 changes: 2 additions & 0 deletions examples/autonomous-replan-obligation-smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ def write_fixture(
{
"id": GOAL_ID,
"domain": "autonomous-replan-fixture",
# Isolate progress/cadence semantics from optional structured work-shape review.
"execution_profile": {"stride_strategy": "off"},
"status": "active",
"repo": str(project),
"state_file": state_file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def write_fixture(root: Path) -> tuple[Path, Path, Path, Path]:
goal = {
"id": GOAL_ID,
"domain": "refresh-state-shared-runtime-smoke",
# This fixture qualifies routing/writeback, not a Stride review.
"execution_profile": {"stride_strategy": "off"},
"status": "active",
"repo": str(project),
"state_file": str(state_file.relative_to(project)),
Expand Down
4 changes: 2 additions & 2 deletions loopx/capabilities/todo_replan_cadence/machine_defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def default_replan_cadence_configuration() -> dict[str, Any]:
"count_unit": ReplanCadenceUnit.EFFECTIVE_TURNS.value,
"count": DEFAULT_EFFECTIVE_TURN_REPLAN_THRESHOLD,
"planning_horizon_goal": DEFAULT_PLANNING_HORIZON_GOAL,
"stride_strategy": "evidence_conditioned_v1",
Comment thread
loopx-agent marked this conversation as resolved.
Resolved
}


Expand All @@ -126,14 +127,13 @@ def todo_replan_cadence_machine_configuration_namespace() -> (
description=(
"Live review threshold for Goals without an explicit cadence override. "
"Defaults to six settled work Turns; completed Todos remain an explicit option. "
"The optional versioned stride strategy is disabled by default; enabled fresh Vision reviews require a bounded structured proposal. "
"Evidence-conditioned stride is enabled by default; fresh Vision reviews require a bounded structured work-shape proposal. Explicit off and legacy saved configurations retain their meaning. "
"It does not create "
"turns, spend quota, or grant authority."
),
default_configuration={
"schema_version": TODO_REPLAN_CADENCE_MACHINE_DEFAULTS_V2,
**default_replan_cadence_configuration(),
"stride_strategy": "off",
},
)

Expand Down
25 changes: 18 additions & 7 deletions loopx/control_plane/testing/cli_output_budget.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,12 @@ class CliOutputCommandClassification:
# Native Windows paired base/head both emit 40,701 JSON chars.
# Retain complete routes/context and bounded host-path headroom;
# line, per-Todo/fixed growth and all other ceilings stay unchanged.
"crowded": {"json": 42_000, "markdown": 10_500},
# Inherited Stride adds its complete decision/axis/source contract:
# the same native fixture measures 35,597 -> 42,281 characters.
# Preserve the original 42,000 failure and the required semantics;
# calibrate this regression allowance only, with 219 chars headroom.
# No production hard limit or line/collection-growth guard changes.
"crowded": {"json": 42_500, "markdown": 10_500},
# The unchanged 18-Todo / 3-Agent fixture on main ffc90182b and
# this candidate both emit 25,836 JSON characters (96 matched
# surface/mode measurements, no semantic or route differences).
Expand Down Expand Up @@ -191,11 +196,13 @@ class CliOutputCommandClassification:
markdown_anchor="# LoopX Turn Plan",
max_chars={
"small": {"json": 14_000, "markdown": 600},
# Pinned formatter base/head both emit 21,238 chars / 477 lines
# with complete vision authoring on the unchanged 36-Todo fixture.
# Keep executable evidence/continuation rules; 1,262 chars of
# headroom covers presentation variation, not extra Todo growth.
"crowded": {"json": 22_500, "markdown": 600},
# With an existing vision, the same 36-Todo fixture grows from
# 18,955 to 25,319 chars when inheriting the complete Stride contract
# (+6,364, identical to the no-vision route). Preserve the 22,500
# failure; 26,000 leaves 681 chars without relaxing collection,
# line or other-route limits. The earlier formatter observation
# was 21,238 chars / 477 lines, before these semantic changes.
"crowded": {"json": 26_000, "markdown": 600},
"multi_agent": {"json": 15_500, "markdown": 600},
},
max_lines={
Expand All @@ -214,7 +221,11 @@ class CliOutputCommandClassification:
# 35*60 = 2,100 as the per-Todo allowance; the advice adds 673 fixed
# chars, so 5,400 leaves 154 of headroom without widening per-Todo growth.
# This is a regression budget, not authority.
max_json_fixed_semantic_growth_chars=5_400,
# Inherited Stride adds a fixed required-review decision contract;
# matched small/crowded output is 10,560/15,492 -> 10,560/21,856.
# Keep 35*60 collection growth; 9,300 covers 9,196 fixed chars with
# 104 headroom. Retain the earlier 5,400 failure, not a size reduction.
max_json_fixed_semantic_growth_chars=9_300,
),
CliOutputBudgetSpec(
surface_id="status",
Expand Down
Loading
Loading