Archive the arch/parity/short evidence and mark the U1 claim done so U2 can take the intent mutex next. Co-authored-by: Cursor <cursoragent@cursor.com>
3.5 KiB
3.5 KiB
title, status, created, updated, owner, branch, worktree, mutex
| title | status | created | updated | owner | branch | worktree | mutex |
|---|---|---|---|---|---|---|---|
| 多意图 HITL U1:契约冻结 | done | 2026-09-15 | 2026-09-15 | Cursor | feature/multi-intent-u1-contracts | - | architecture-docs |
多意图 HITL U1:契约冻结
目标
冻结 app/intentflow 边界、状态机、BatchActionPolicy、错误码、事件契约与默认 legacy tier;不改识别路由、不建表、不接 HTTP。
范围
module-boundaries.yaml:app/intentflowallowlist、三表 owner、unwrap_owners、三条intent.plan.*事件events.StaticContracts与 YAML 对等;archtest 扫描intent.plan.*internal/app/intentflow骨架:状态、错误码、Service 端口、政策、tier 开关- CSRF/认证结论:现有 Bearer + CORS 对 U5 足够,不是 blocker
非目标
- 不修改
internal/intent业务类型或MULTI_INTENT_ENABLED - 不建 Goose 表、不接线
app.Assemble、不改 chat/coordinator/Web - 不 Append 事件、不实施 U2–U12
REST(U5 再挂路由)
GET /api/v1/intent-plans/activeGET /api/v1/intent-plans/{plan_id}POST /api/v1/intent-plans/{plan_id}/decisions- body:
expected_revision、decision_nonce、decision_digest、kind、步骤选择
- body:
CSRF / 认证(U5 前置结论,非 blocker)
现有认证是 Authorization: Bearer 或 X-Session-Token 请求头(internal/server/auth_handlers.go),无 cookie 会话,无独立 CSRF 中间件;另有 Origin allowlist CORS。
- 自定义头不会被浏览器跨站表单自动带上,现有模式对 U5 足够
decision_nonce/ 幂等键只防重放与并发,不替代 CSRF 或身份认证- U5 必须
requireAuthenticatedUser+ 四元作用域(environment/project/session/user) - 禁止为计划 API 改成 cookie 自动提交
- 若未来改 cookie 认证,另立 auth 任务,不得在 intent-plan 端点发明弱 CSRF
步骤
- 从最新
dev检出feature/multi-intent-u1-contracts并认领 CURRENT - 登记边界 YAML、事件契约、archtest regex
- 落地 intentflow 骨架与 BatchActionPolicy
- arch/parity/short 测试与 U1 报告
验收标准
intent -> maturity保持;server/chat 不直写计划表- YAML ↔ StaticContracts parity 绿
- 未知 action/policy key fail closed;ActionRegistry 无 batch/tier 字段
- 默认
MULTI_INTENT_PLAN_TIER=legacy - 单意图生成策略不变(本单元无运行时改动)
相关链接
- 总览: 2026-09-15-multi-intent-hitl.md
- 设计: ../../system-design/2026-09-15-multi-intent-hitl-plan.md
- Checklist: ../checklists/2026-09-15-multi-intent-u1-contracts.md
- Test report: ../../test-reports/2026-09-15-multi-intent-u1-contracts-test-report.md
证据 / 备注
- 事件登记窗口同时占用
eventsmutex;U1 不改 intent 代码。 - 生产者含
events:StaticContracts 字面量落在internal/events/registry.go,与现有 document.* 先例一致。 - CSRF:Bearer /
X-Session-Token+ CORS allowlist,U5 非 blocker。 - 冒烟:
go vet ./...、go test -short ./...、./scripts/arch-check.sh --mode blockPASS。U1 无 schema/容器变更,集成槽位保持 idle。 - 提交:
bdccb4ddocs(ops);aefb1e4feat(events);9364da4feat(intentflow);随后 docs(status)。