Commit Graph

2 Commits

Author SHA1 Message Date
wangjia 74be3ecec1 feat(agent): L3 记忆注入——子任务带父任务拆解意图 + 兄弟状态
- types.TaskContext + Task.context(daemon 装配、不持久化)
- store.taskContextOf(taskId):父 plan + 同层兄弟概览(标题/状态/复杂度,排除自身)
- orchestrator.claimOne:executor 子任务填充 context 下发(planner 跑在父任务上不需要)
- runner.buildPrompt 注入「## 拆解背景」段(顺序:规范→背景→任务内容)
- 仅 DB 读,不做 git/RAG 检索(成本控制)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 22:32:21 +08:00
wangjia fe7923a618 feat(agent): L2/L4 记忆注入——项目规范 + 全局规范文件喂进 4 处 prompt
- L2 projects.agent_rules 列(schema+迁移+类型+mapper+patchProject+API 透传)
- L4 protocol.readGlobalAgentRules():worker 直接读 <data>/agent-global.md(非DB,
  不读用户 ~/.claude/CLAUDE.md,避免个人习惯与受控执行冲突)
- runner.rulesHeaderLines 注入 executor/planner/conflict;reviewer 同注入
- 顺序:全局规范(L4)→项目规范(L2)→任务内容→上次失败(L1)→执行约束

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-24 22:29:29 +08:00