Skip to content

RFC: capable manager and semantic work handoff / 强能力管家与语义工作交接 - #4330

Merged
huangruiteng merged 5 commits into
mainfrom
codex/capable-manager-semantic-handoff-rfc
Sep 13, 2026
Merged

huangruiteng merged 5 commits into
mainfrom
codex/capable-manager-semantic-handoff-rfc

Conversation

@huangruiteng

@huangruiteng huangruiteng commented Sep 13, 2026 •

Copy link
Copy Markdown
Collaborator

Manager conversations currently constrain investigation and lose meaning across handoffs. This bilingual RFC proposes a capable host manager using ordinary tools, plus semantic work requests that preserve intent, decisions, evidence, receiver-owned replanning and automatic return. It permits a cohesive TypeScript refactor while retaining existing work-state authority.

管家应具备充分的本机调查能力,交接应延续工作语义。本双语 RFC 融合强智能管家、通用语义交接与长程目标推进,并同步修正共享权威、共享目标对齐/修订、TS 迁移三篇 RFC 和目录的实现状态与执行依赖。

  • Long-horizon / 长程: distinguish availability from Goal/Vision/Todo/evidence-driven continuation, with replacement-session and actual cross-day acceptance.
  • Grok Bot study / 竞品印照: official product/deployment documentation informs selected tool, collaboration and recovery patterns. No authenticated trial, hidden runtime implementation or comparative performance is claimed.
  • Four contracts / 四份契约: manager owns the exchange; alignment owns intent-change legality and future qualified amendment commits; shared authority owns reviewed work-state transactions; TS migration owns complete transaction replacement and old-rule retirement. Raw chats, briefs and transport state do not enter the coordination head.
  • Verified status / 实现状态: alignment Stage 1/2 reader and proposal admission exist, with no canonical amendment effect. Shared authority has real foundations and merged SQLite candidate feat(coordination): add opt-in SQLite authority provider #4121, without provider promotion. Correct the TS lease-fence reference to merged fix(todos): support lease-fenced canonical text and note updates #4152. Source checkpoint: 7eb4b7bb1661bd5eff63a8725a33169792d5964b; rebased to 6b337bcbde8457bc3268ec7d2780367ace3c6147, preserving merged refactor(coordination): unify command recovery and isolate archive transactions #4286 recovery/conformance documentation and naming that owner as reusable M2 foundation.
  • Execution / 执行: M1 host capabilities and independent reply recovery proceed now; M2 replaces a complete request transaction and qualifies manager→worker plus worker→worker; M3 closes automatic return/frontends; M4 promotes a named cohort. A1–A16 cover continuation, artifacts, selected authority sources, crash reconciliation and amendment boundaries. Storage promotion and Stage 3 amendment commits retain separate qualification requirements.
  • feat(todos): explicit revision-guarded cross-agent session continuation (Stage A) #4094 integration / 显式接续整合: New §5.13 maps shipped rich/legacy continuation notes into semantic context and retains typed Todo transfer authority. Receiver assessment is distinct from ownership adoption; current notes can expire/be replaced. The existing CLI becomes the worker→worker adapter only after shared request/result/return qualification. Its bilingual Stage A RFC and index now link the successor; frontend/Lark/automatic continuation remain explicit M2/M3 work.
  • Existing work / 既有工作: fix(manager): read repository evidence before handoff #4306 is closed as the superseded approach; its user issue remains an acceptance obligation. fix(scheduler): dispatch stranded peer handoffs #4312 remains migration input. Extend existing engineering Todos rather than creating a parallel task ledger.

Validation / 验证:

  • examples/docs-governance-smoke.py passed with repository Python.
  • New relative links, reciprocal language links, manager section/A1–A16 parity, public-diff private-marker review and git diff --check passed.
  • Independent Luna/max cross-RFC review; corrected admission-versus-consultation wording, work-effect qualification, future commit-owner naming and TS review-artifact definition.
  • Public documentation only. No runtime/frontend/Lark implementation change or completed end-to-end acceptance is claimed. Entry points and companion work are explicit implementation milestones.

RFC remains under review; do not self-merge. 本 PR 保持待审阅,不自合并。

Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
…emantics

Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
…ntracts

Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
Signed-off-by: huangruiteng <14976749+huangruiteng@users.noreply.github.com>
@huangruiteng
huangruiteng merged commit ddf6efa into main Sep 13, 2026
18 checks passed
@huangruiteng
huangruiteng deleted the codex/capable-manager-semantic-handoff-rfc branch September 13, 2026 11:59
@huangruiteng

huangruiteng commented Sep 13, 2026 via email

Copy link
Copy Markdown
Collaborator Author

@huangruiteng

Copy link
Copy Markdown
Collaborator Author

Implementation reconciliation / 实现线对齐

The open implementation queue has been reconciled to this RFC and the pending cross-session amendment #4344:

No runtime/permission/authority PR was self-merged during this reconciliation.

@huangruiteng

Copy link
Copy Markdown
Collaborator Author

Post-#4344 implementation reconciliation / #4344 合入后的实现对齐:

Both rewritten PR heads have local Python/static/maintainability/dashboard/package-smoke evidence. Because they affect runtime permissions or Lark authority, they remain independent-review required and were not self-merged.

@luw2007

luw2007 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Review: changes requested on the Chinese RFC mirror

Reviewed the requested diff (capable-manager-semantic-handoff-v0.zh-CN.md, merged as f72bdd1fa) against its English mirror, the alignment RFC, and the post-merge #4344 amendments. The documentation checks may pass, but five contract gaps remain load-bearing before M2 treats A1–A20 as promotion gates:

  1. P1 — Late effect proof is rejected after the request head advances. Observation still contains only request_id + request_revision, and §5.10 still CASes every observation against that revision. A receipt produced under r1 cannot be appended after correction/cancellation creates r2 without either failing CAS or being falsely attributed to r2. Add an immutable dispatch_attempt/effect_attempt relation whose evidence may settle late; use request-head CAS only when authorizing new effects.

  2. P1 — Effectful pre-Todo reassignment lacks a request-level execution fence. The RFC permits work without a Todo and says delegation does not claim the worker Todo. The new RFC: cross-session restoration and semantic handoff / 跨会话续接与语义交接 #4344 session/runtime fencing covers session replacement and existing work ownership, but it does not define exclusivity between two receivers of effectful pre-Todo work. Require one active effectful attempt per request revision, or acknowledged cancellation/expiry of the old attempt before another receiver may execute. Consultation may remain multi-recipient.

  3. P1 — §5.12 still overstates Stage 3 authority. It says broader objective/acceptance/non-goal/permission/stop-condition changes may use the qualified Stage 3 owner, while the alignment RFC limits the first Stage 3 slice to intent-preserving shared_work_graph. State that each amendment class needs its own qualified policy/verifier/commit path; the first Stage 3 owner cannot authorize broader classes.

  4. P1 — Request-derived amendments are not revoked atomically with their source request revision. Stage 2 may retain request-derived proposals, but the amendment commit contract does not bind commit eligibility to the live source request revision. A proposal from r1 can therefore commit after r2 corrects or cancels it if the Goal basis remains current. Persist the source request revision, CAS its non-revoked/non-superseded state at commit, and add the correction/cancellation race to A7+A16.

  5. P2 — Acceptance permits false-positive qualification. A3 does not require an actual reversible host mutation/readback/revocation-before-execution; §7's untrusted repo/web instruction boundary has no adversarial acceptance row; A14 permits only a no-read result in the sole cross-host artifact case. Split positive and negative journeys: prove one reversible non-Core mutation, prove prompt-injection cannot alter grants/instructions, and prove successful authorized remote artifact retrieval/use separately from denied/unavailable handling. Also clarify A6 as the same identity construction/invariants, not literal identical IDs across distinct requests.

#4344 materially improves cross-session restoration and adds A17–A20, but does not close these request/effect/amendment identity gaps. Recommend a small bilingual RFC correction before M2 implementation freezes the schema.

@huangruiteng

Copy link
Copy Markdown
Collaborator Author

@luw2007 谢谢,这条评论指出的是会影响实现正确性的契约缺口,尤其“旧请求回执”和“来源请求取消与 Goal commit 竞态”,不只是文案问题。

已在你的后续 PR #4367 上继续更新(f8ffacbdf822ef7b0dd742b7a3ac022fe1d928d2),保留原贡献与署名,并同步管家/目标对齐两篇 RFC 的中英版本:

  • 保留你补齐的 immutable attempt、跨 revision 单 effectful fence、Stage 3 class 收窄,以及 A3/A6/A14 的真实正负向验收。
  • 针对 docs(rfc): close semantic handoff contract gaps #4367 复审剩余阻塞,新增 alignment §5.1:请求 owner CAS 预留精确 operation;后来的取消由 Goal owner 对同一 operation 做条件 abort,与 commit 在同一终局记录上竞争。先读请求状态再单独 Goal CAS 不再被描述为能解决竞态。
  • 明确提交先赢、取消先赢、预留后崩溃、提交后响应丢失、lease 过期及晚到执行者的结果。未知状态不能释放 fence;中止记录阻止旧执行者重放或另换 operation ID;已提交效果不能被说成已取消或已回滚。
  • A7/A16 联合验收要求贯穿两个 owner;前端/飞书/CLI 区分“请求取消”“待结算”和“已结算但效果已发生”。

文档治理检查、JSON/链接/新增锚点、双语验收 ID 和 diff 检查通过。协议仍是待验收设计,没有将文档修改当作运行时实现。欢迎复审 #4367,尤其是两个明确的本地线性化边界和 crash recovery。

English: updated your #4367 rather than duplicating it. The correction retains your five-gap fixes and replaces the remaining source-read/Goal-CAS race with an exact request reservation plus Goal-owner commit/conditional-abort terminal receipt. Unknown outcomes retain the fence; late execution cannot bypass a terminal abort. Both RFC language pairs and the combined A7/A16 matrix are updated. Documentation checks pass; implementation and real runtime qualification remain pending.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants