Why: The task card is the authorization record for intent-to-workflow work, and the routing, retry, and script rulings have to be fixed before code changes.
Evidence: precheck READY at 959179f88f; core/baseline.md and workflows/delivery.md section 1 were read.
Impact: No product code. Six pull requests are the delivery end, and merging them is not authorized.
Refs: feature/agent-harness-p4
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: The example plugin needs a bound intent and a plugin-shipped script so the three P4 paths can be checked against a real plugin.
Evidence: TestRepoExamplePluginLoads accepts the plugin, asks 主题是什么?, and keeps the topic slot.
Impact: demo.brief starts the five-step workflow. demo.script stays unbound and needs runtime.workflowScripts.
Refs: feature/agent-harness-p4
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: Dev has to record the Core, Backend, Frontend, UI, and Documents commits that implement intent-to-workflow.
Evidence: make test passed, including boundary lint, core, backend, frontend vitest, UI tsc and vitest, and agent-command.
Impact: agent-native stays at a34689c. The example plugin is already on this branch.
Refs: feature/agent-harness-p4
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: The live check needs the first draft to miss a line the critic can name, then the retry can add it.
Evidence: The prompt does not mention the marker. maxRetries stays 1.
Impact: demo.brief drafts are rejected until they contain 核对标记:P4.
Refs: feature/agent-harness-p4
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: The step critic has to call the configured model, and Dev should record that backend commit.
Evidence: go test ./internal/runtime/ -run TestJudgeUsesConfiguredModel passed in the backend repo.
Impact: Only the backend pointer moves.
Refs: feature/agent-harness-p4
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: Dev should record the backend commit that makes planning return JSON and makes the critic reject a missing line.
Evidence: go test ./internal/runtime/ ./internal/prompts/ passed on that commit.
Impact: Only the backend pointer moves.
Refs: feature/agent-harness-p4
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: Dev should record the backend commit that runs a registered script from the launch of that call.
Evidence: go test ./internal/runtime/ -run TestRegisteredWorkflowUsesItsOwnScriptCopy passed.
Impact: Only the backend pointer moves.
Refs: feature/agent-harness-p4
Co-authored-by: Cursor <cursoragent@cursor.com>
Why: Acceptance needs the precheck, task-sync, and make test evidence on the card, plus what the three live conversations actually did.
Evidence: make test passed at 5f872f3. The sync row is in the table. The p4 service produced the slot question, one critic rejection, a confirmed plan, and the plugin script artifact.
Impact: Documentation only. The six pull requests stay unmerged.
Refs: feature/agent-harness-p4
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen
merged commit 3ba104c721 into main2026-10-02 01:04:03 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
feature/agent-harness-p4 任务卡
任务主记录:<PR 链接,task-finish 时填写>;状态:进行中;owner:weichen
基线与授权
959179f88ffeature/agent-harness-p4上提 PR;Dev 仓推进modules/core、modules/backend、modules/frontend、modules/ui、modules/documents与plugins/example并提 PR。终点是六个 PR 已开、不合入。未授权:合入 main、改 agent-native、改 agent-squad 契约、动dev服务。make precheckverdict READY。head=959179f88f,origin/main 同步,树干净。必读 core/baseline.md、workflows/delivery.md §1 已读。script,执行前必须用户确认。critic 每步最多重试 3 次、缺省 1 次,整个工作流最多重试 6 次。脚本最多回调 50 次,单行不超过 1MB,超时缺省 600s、最长 1800s(墙钟,含等待 HITL 和子代理)。脚本与run_python相同,以当前用户身份运行,工作目录为会话沙箱,没有网络或文件系统隔离。回调一律经过runCtx.ExecuteTool,不能调用run_python、run_shell、run_workflow和派发类工具。模型写的脚本运行前必须确认;插件自带的脚本不需要。开关runtime.workflowScripts缺省关闭。critic 无法解析按不通过处理。小队入口不提供run_workflow。目标与非目标
WorkflowDef有执行器。意图命中后接到绑定的工作流。critic 按步骤打回,每步和整条工作流都有上限。同时支持模型生成步骤和沙箱脚本两种动态工作流。同步记录
959179f88f959179f88f959179f88f5f872f3b7f结果与验证(完成后填写)
f93f473给步骤加上 Agent、Script、Critic,kind 增加 script。Backend4b4be2b注册工作流、按意图启动、执行六类步骤、确认后跑模型规划、以及 fd 3/fd 4 脚本宿主。Frontend7d796ee与 UI22666a0只同步了契约。Documents974db6a写入 P4 裁定。Dev5f872f3推进这五个模块,并给示例插件加上demo.brief与demo.script。make precheck为 READY,head959179f88f(2026-10-01T15:52Z)。make task-sync记录 sync_base959179f88f、tested_head5f872f3、checked_at 2026-10-01T16:38:23Z。随后在该 head 上make test通过:边界检查、core、backend、frontend vitest 53、UI tsc 与 vitest 71、agent-command。三处 agent-native 仍是a34689c。p4 服务(127.0.0.1:8929,数据从 dev 备份,未改 dev)核对了三项:会话cnv_e3f0cf85f48d中「写一份简报」先问「主题是什么?」,critic 打回一次并留下丢弃理由,重跑后完成,工件art_76f9b51b4e27,收件箱有「简报好了」。会话cnv_ccba204decb3中run_workflow的 goal 先请用户确认计划,确认后执行完成。打开runtime.workflowScripts后,会话cnv_adadae794ae2跑插件脚本demo.script,脚本问「要记下来吗?」,确认后产出demo-script.md(art_13fe6947ef6e)。