Why: the three cards whose PRs are merged (Backend #212, #226, #237) were still sitting at .task/ top level, which keeps the main checkout reporting card debt. Only the status line and the merge fact were added; the historical record inside each card is untouched. Evidence: Gitea API for PRs 212/226/237 all report state=closed merged=true (merge commits56a7f9f440,508288fbed,f084d10aa5); triage receipt /tmp/be-triage-cardclose-20261021.json (verdict NEW). Impact: .task bookkeeping only; no code change, no submodule pin change. Refs: fix/close-merged-task-cards
3.3 KiB
3.3 KiB
feature/regulations-kb-ext20 任务卡
任务主记录:本文件随 PR 描述维护。 状态:已完成(合入前闭合);owner:weichen。已合入 (merge 56a7f9f440);本卡随合入闭合,归档时移入 .task/archive/。
基线与授权
- 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Backend.git;root_target:main;immediate_target:main
- branch_kind:standalone;跨仓总任务:Agent-System-Dev
feature/regulations-kb(Dev PR #614) - R0(initial_main_sha):cac60c0;工作区:/home/weichen/projects/Agent-System-Backend-wt-feature-regulations-kb-ext20;分支:feature/regulations-kb-ext20
- 授权与交付终点:用户 2026-10-18 /goal 指示按法规知识库计划实现全部内容;本任务交付 U9 的基座公开契约 EXT-20(提案:Documents
docs/proposals/2026-10-18-ext-20-regulations-provider.md,分支feature/regulations-kb-u9-contract),经 PR 合入 main。不含法规提供方实现(属 KB 仓)与 RDM 消费(U6)。 - 实施执行:agent-per-unit(配置:AGENT-EXECUTION.md)
目标与非目标
- 目标:
pkg/extension新增RegulationsProvider/RegulationsRegistrar/RegulationsHost与 DTO;进程内注册槽仅接受插件kbreg且只注册一次;分发 Host 实现四个方法并强制调用方身份、查询最小化(机密词拒绝、长度限制)、状态透传与无明文审计;快照、边界与契约/兼容测试。 - 非目标:不实现搜索或语料检索;不改
KnowledgeSearch语义。
Agent 实施收据
| 单元 ID | 预期范围 | 角色 | 候选顺序 | attempt | CLI/模型 | 终态 | transport | fallback | 源码外收据路径 |
|---|---|---|---|---|---|---|---|---|---|
| backend-ext20-regulations-provider | pkg/extension、internal/app | implementation | cursor, antigravity, pi | 1 | cursor-agent-stable / auto(session not-observable,新进程) | success | refs/agent-exec/cfc2e055f212789112cf11716f5649c5/c04b36e76696 → aaed108(apply 快进) | 否 | /tmp/regkb-u9-receipt.json |
结果与验证(完成后填写)
- 结果:
pkg/extension/regulations.go(EXT-20 接口、DTO、状态常量、ErrRegulationsUnavailable)、surface.txt与SurfaceVersion2.15.0-experimental;internal/app/regulations.go注册槽(仅 kbreg、一次、非 nil;声明式拒绝)与 inprocHost 四方法(有效账户检查、调用方取自分发上下文、schema 校验、查询去空白/1–256 字符/排除词拒绝且不调用提供方、状态透传、审计仅含修订/计数/状态/查询 sha256);单元与兼容测试。 - 验证(SELF,host 于 HEAD aaed108):
go vet ./pkg/extension/ ./internal/app/与go test ./pkg/extension/... ./internal/app/...PASS;全量GOWORK=off go vet ./... && go test -count=1 ./...40 包 ok,仅pkg/identity TestDSNFileMode失败——在未改动基线cac60c0上同样失败(本机环境问题,本变更未触及 pkg/identity),以 CI(GATE)为准。 - Review:host 主模型审阅实际 diff(base
3187a00/ head aaed108),与提案第 2、4、5 节一致,无阻塞项。 - 影响与剩余项:新增可选能力,未注册提供方时返回不可用,既有行为不变。