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
21 changes: 16 additions & 5 deletions docs/architecture/rfcs/typescript-control-plane-migration-v0.md
Original file line number Diff line number Diff line change
Expand Up @@ -959,16 +959,27 @@ lineage. Ambiguous, stale, truncated or unrelated material changes cannot close
the current obligation. This closes one T3 rule group, not
the remaining consumers or T1/T2/D1–D3.

Thresholds remain 15 advancement Todos or 20 selectable open Todos with
advancement work. Full material revisions include terminal advancement rows;
Long-chain scope correction (#4667): Agent lanes count 15 claimed advancement
Todos or 20 claimed open Todos with claimed advancement work. Shared candidates
remain selectable but no longer impose this duty; unscoped Goal observations
retain the selectable-pool thresholds. Full material revisions include terminal advancement rows;
timestamp-only maintenance does not rearm them. A complete agent-owned identity
also keeps an accepted long-chain ACK valid when peers change shared unclaimed
work. Owned material edits still rearm; an entirely unclaimed chain cannot use
that exemption. Historical revision-only ACKs keep exact-revision matching.
work. Owned material edits still rearm; an entirely unclaimed lane has no
long-chain duty. Historical revision-only ACKs keep exact-revision matching.
Intentional corrections: semantic writeback now preserves the owned identity;
an identity without a revision or an explicitly incomplete checkpoint cannot
suppress replanning. Other trigger kinds cannot borrow long-chain identity
matching. No threshold, write authority or obligation-id rule changes.
matching. The same TS owner now supplies `obligation_identity_revision` from the
owned basis for the existing Python identity codec and predecessor proof: peer
churn cannot invalidate an open Turn before its ACK. Numeric thresholds and
write authority remain unchanged. `replan_semantics.ts` accepts and projects an
evidence-linked vision path for long-chain review, preserving existing progress
exits and stricter vision obligations. The real CLI regression follows the
projected binding through durable ACK, satisfied checkpoint, one spend and next
Turn readback; maintenance stays quiet and an owned material edit rearms.
This advances overall-roadmap S2/S3's existing T3 owner, with no new provider,
store migration, frontend setting or claim of broader RFC acceptance.

The canonical index is built before display truncation. Exclusions, duplicate
ids/index lanes, incomplete timestamps and authoritative incomplete indexes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -728,14 +728,22 @@ Python 验证前置 obligation id。压缩保留实质字段 `done`,历史保
多后继歧义、过期、来源截断或无关实质变化都不能关闭当前 obligation。
这闭合一个 T3 规则组,不代表其余 consumer 或 T1/T2/D1–D3 完成。

阈值仍是 15 项 advancement,或存在 advancement 时的 20 项可选 open Todo。
长链口径修正(#4667):Agent lane 统计 15 项已认领 advancement,或存在已认领
advancement 时的 20 项已认领 open Todo。共享候选仍可选,但不再计入本 lane 的
义务;无 Agent 的 Goal 总览保留原可选池口径。
完整实质 revision 包含终态 advancement;仅更新时间不重新触发。完整的 Agent-owned
identity 还能在同伴改变共享 unclaimed 工作时保持既有 long-chain ACK 有效。
自己的实质工作变化仍重新触发;全是未认领工作的链不能使用 owned 豁免
自己的实质工作变化仍重新触发;没有认领工作的 lane 不产生长链义务
历史 revision-only ACK 仍按精确 revision 匹配。明确修正:语义写回不再丢失
owned identity;只有 identity 而没有 revision、或明确不完整的 checkpoint 不能
压制 replan;其他 trigger kind 不能借用长链身份匹配。阈值、写权限和 obligation-id
规则均未改变。
压制 replan;其他 trigger kind 不能借用长链身份匹配。同一 TS owner 现在提供
基于 owned 实质内容的 `obligation_identity_revision`,供既有 Python 身份 codec
及 predecessor 校验使用;同伴修改共享池不能在 ACK 前让本 Turn 的义务换 ID。
阈值数值和写权限不变。`replan_semantics.ts` 为长链 review 接受并投影带证据的
vision path,保留既有 progress 出口和严格 vision 义务。真实 CLI 回归沿投影绑定
验证持久 ACK、checkpoint、一次 spend 和下一 Turn 回读;维护不触发,自己任务的
实质修改重新触发。本次推进总路线 S2/S3 已有 T3 owner,不新增 provider、迁移存储
或前端设置,也不宣称整个 RFC 验收完成。

Canonical index 仍在展示截断前生成。Exclusion、重复 ID/index lane、不完整时间与
权威 index 不完整时均保持 fail-closed。真实 CLI 验证两条 ACK 路径经过运行记录及
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ def select_frontier_rule(facts):
| 4 | `open_user_todo` | 存在真正阻塞当前路径的用户工作;系统应等待具体输入,不能把缺少 authority 误写成 Replan。 | 否 |
| 5 | `todo_succession_gap` | Advancement 已完成,但没有 successor 或 `no_followup` 理由,且没有其他 advancement 接续;必须补上局部闭包。 | 是 |
| 6 | `vision_acceptance_gap` | Acceptance 仍有缺口,但没有满足它的 selectable work,或 successor 需要 Vision 决策;必须重建方向与 Frontier。 | 是 |
| 7 | `long_todo_chain` | 可选 Todo 链超过有界阈值;先做 Vision checkpoint、分组或裁剪,不能用无绑定 ACK 跳过。当前 obligation 只能由匹配其 id 的 semantic delta 闭合。 | 是 |
| 7 | `long_todo_chain` | 当前 Agent 已认领的 Todo 链达到有界阈值;共享未认领候选不计入。先做 Vision checkpoint、分组或裁剪,不能用无绑定 ACK 跳过。当前 obligation 只能由匹配其 id 的 semantic delta 闭合。 | 是 |
| 8 | `current_agent_blocker` | 当前 Agent 已有具体 blocker 解释为什么不能推进;下一步由 blocker 的 resume route 决定,而不是再造计划。 | 否 |
| 9 | `monitor_no_change_streak` | Monitor-only lane 连续 unchanged 达到阈值;必须用 expiry、blocker、supersede 或 successor 结束热等待。 | 是 |
| 10 | `not_monitor_only` | 当前 lane 并非纯 monitor 等待;monitor exhaustion 规则不适用,交还普通 advancement 路径处理。 | 否 |
Expand Down
8 changes: 6 additions & 2 deletions docs/product/core-control-plane/state-machine.md
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,16 @@ The same ordering applies when an agent records a bounded
as a goal-frontier `acceptance_gaps[]` entry. If no advancement frontier remains,
the gap becomes a replan trigger before the lane can quietly back off.

Long runnable lanes also pass through this machine. When the current agent can
select about 15 advancement todos, or about 20 open todos with advancement work
Long runnable lanes also pass through this machine. When the current agent owns
15 open advancement todos, or 20 claimed open todos with claimed advancement work
still present, quota should trigger a bounded vision replan before continuing
linearly. The replan reads the agent-scoped evidence log, uses bounded public
research when local evidence is insufficient for a public claim, then groups,
prunes, or reprioritizes the chain into the next high-value runnable slice.
Shared unclaimed candidates remain selectable but do not count toward this lane
threshold. A valid evidence-linked vision path can retain existing runnable work
and settle the projected Turn without adding another planning Todo. Shared-pool
churn preserves its obligation identity; owned material changes rearm it.

The same ordering also applies to `vision_checkpoint_v0`: if a role records
material progress but omits both a vision patch and an unchanged/no-follow-up
Expand Down
31 changes: 29 additions & 2 deletions docs/reference/protocols/goal-vision-replan-contract-v0.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,17 @@ stays on the original Turn, and in-flight continuation remains unchanged.
JSON 写作契约复用 vision 校验器,不新增 ACK 仪式,也不改变既有 successor、blocker、
terminal 出口。语义接受、checkpoint 满足、Turn 结算与 Goal 完成仍须分别验证。

Long-chain review also accepts `fresh_vision_path_outcome` and now projects this
JSON route. An acceptance summary plus an evidence-linked `continue`, `no_change`
or `replan` path can retain existing runnable work; no extra planning Todo or
legacy repair ACK is required. Existing typed progress, successor and terminal
exits remain available. Vision-only obligations still reject ordinary progress
identifiers. Use the projected Todo **or** obligation binding, never both.

长链 review 同样接受带验收摘要和证据的 vision path,并默认投影 JSON 写回路径;
可以保留已有可执行工作,无需新增“再次重规划”的 Todo。既有 typed progress、
successor 和 terminal 出口保留;严格 vision 义务仍不接受普通进度标识。

Inline vision writes require `--agent-id`. JSON packets must also resolve to
the same `agent_id` as the refresh run. This keeps `research-executor`,
`evaluator-promoter`, and other roles from overwriting or satisfying each
Expand Down Expand Up @@ -501,8 +512,8 @@ or agent-scope wait decisions:
- normalized progress shows no remaining advancement frontier;
- monitor-only lanes have no material transition and acceptance remains open;
- a cleared handoff has no successor or no-follow-up rationale;
- the current agent lane has a long selectable todo chain, such as 15 or more
advancement todos or roughly 20 open todos with advancement work still present;
- the current agent lane owns at least 15 open advancement Todos, or 20 claimed
open Todos with claimed advancement work still present;
- a periodic autonomous replan obligation is due;
- the user objective or acceptance contract changed;
- an approved dreaming proposal requires a delivery route.
Expand All @@ -511,6 +522,22 @@ The replan decision must not be disturbed by monitor quiet skip, scoped gate
waiting, or a single agent having no runnable todo. Those may explain local
lane state, but they cannot erase a required goal-level replan.

Long-chain scope correction (#4667): Agent-scoped counts now exclude shared
unclaimed candidates. They remain selectable, but do not create a replan duty
for a lane that has not claimed them. Unscoped Goal observations retain the
selectable-pool thresholds. Numeric thresholds and other replan sources are
unchanged. The typed frontier owner supplies `obligation_identity_revision`
from the owned material identity, keeping an open obligation stable across
peer/shared-pool churn; `frontier_revision` retains the full selectable-source
checkpoint for diagnostics and historical ACK matching. Owned material changes
still rearm. Timestamp/evidence bookkeeping does not. Existing accepted ACKs
remain readable; an outstanding pre-upgrade Turn should refresh its guard.

长链触发范围修正:Agent lane 只统计自己已认领的任务;共享未认领任务仍可选取,
但不计入本 lane 的长链阈值。无 Agent 的 Goal 总览保留原可选池口径。
义务身份使用 typed owner 给出的 owned 实质 revision,同伴修改共享池不会让正在
处理的义务换 ID;自己任务的实质修改仍重新触发。证据补充或更新时间不重新触发。

## Replan Output

A valid replan writes at least one bounded delta:
Expand Down
20 changes: 6 additions & 14 deletions loopx/control_plane/goals/goal_frontier/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1216,7 +1216,7 @@ def derive_goal_frontier_replan_obligation_from_summaries(
"kind": LONG_TODO_CHAIN_TRIGGER,
"section": "agent_todo_summary",
"text": (
"current agent lane has a long selectable todo chain; "
"current agent lane has a long claimed todo chain; "
"run a vision checkpoint/replan before continuing linearly"
),
**long_chain_trigger,
Expand All @@ -1229,26 +1229,18 @@ def derive_goal_frontier_replan_obligation_from_summaries(
"update_agent_vision",
"create_successor",
],
todo_actions=[
{
"action": "add",
"role": "agent",
"priority": "P1",
"text": (
"run a bounded long-chain vision replan: compare evidence "
"with the active vision, group or prune the todo chain, "
"and select the next high-value runnable slice"
),
}
],
todo_actions=[],
stop_condition=(
"stop if pruning or external research requires private material, "
"credentials, destructive git, production actions, or owner-only decisions"
),
recommended_action=(
"run a bounded long-chain vision replan before continuing a 15+ "
"todo lane: read evidence, use public research if local evidence "
"is weak, group/prune work, and write a concrete todo or vision delta"
"is weak, group/prune work, and record an evidence-linked vision "
"path through replan_action_packet.writeback_contract using the "
"current Turn settlement binding; retain existing runnable work "
"when appropriate instead of adding a Todo whose only action is replan"
),
rearmed_after_obligation_id=(
long_chain_ack_decision.rearmed_after_obligation_id
Expand Down
3 changes: 2 additions & 1 deletion loopx/control_plane/goals/goal_frontier/ack_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ def replan_successor_transition_ack(
eligible_ids.add(binding["todo_id"])
elif binding["kind"] == "predecessor":
prior = ensure_replan_novelty_policy({**(replan_obligation or {}), "triggers": [
{**trigger, "frontier_revision": binding["frontier_revision"]}
{**trigger, "frontier_revision": binding["frontier_revision"],
"obligation_identity_revision": binding["obligation_identity_revision"]}
for trigger in (replan_obligation or {}).get("triggers") or []]})
if prior["obligation_id"] == origins[binding["todo_id"]]:
eligible_ids.add(binding["todo_id"])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class LongTodoChainObservation:
count_kind: str
selectable_open_count: int
selectable_advancement_count: int
current_agent_claimed_open_count: int
current_agent_claimed_advancement_count: int
unclaimed_advancement_count: int
threshold: int
Expand Down
Loading
Loading