Repository navigation
AI 决策面:任务进度、待裁决提议与裁决账本 - #319
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
目的 / Why
让研究 loop 的"决策面"进入账本:agent 从 Context 直接看到任务进度、待裁决提议和历史裁决,而不是靠外部提示词描述工作队列;"agent 只提议、引擎裁决"补上裁决记录这一半。
改动 / Changes
internal/aiplane/verdict.go:裁决记录verdict:{proposal-fingerprint},引擎身份写入(WriteAsEngine),无新依赖。accept / reject / needs_more_evidence,rationale与decided_by必填。schema_version1→2):task_states:task:status:前缀的最新状态(name/phase/owner/attempt/next_due/last_error);open_proposals:proposal:前缀中尚无裁决的提议摘要;verdicts:全部裁决,按 fingerprint 升序。as_of_nanos读取,并纳入context_fingerprint。kairosflux.go:新增AdjudicateProposal、GetVerdict,以及Verdict/TaskStateSummary/ProposalSummary类型别名与结论常量。contracts/aiplane/verdict.schema.json;context.schema.json升级到 v2 并补字段说明。明确不包含:没有新增网络 opcode(Context/裁决目前仍只有 Go 嵌入式入口);不改 proposal 的不可变语义;不引入任何新依赖。
验证 / Verification
go build ./...、go vet ./...、go test ./...:全部通过。open_proposals;as_of之前的任务状态可见、之后不可见;引擎级 E2E(提交提议 → 出现在 open_proposals → 裁决 → 离开队列、指纹变化、可单读)。数据影响 / Data impact
新增键空间
verdict:(版本化、不可变),与既有proposal:分离,避免 Context 按proposal:扫描时需过滤内部键。无迁移,无协议帧变更;旧数据不受影响。