diff --git a/docs/todo/dynamic-work-graph-design-skill-design.md b/docs/done/dynamic-work-graph-design-skill-design.md index 17fe841..d763fd6 100644 --- a/docs/todo/dynamic-work-graph-design-skill-design.md +++ b/docs/done/dynamic-work-graph-design-skill-design.md @@ -1,7 +1,7 @@ # 跨 Org Agent 的动态 Work Graph 设计能力——详细设计(SDD) **日期**: 2026-08-06 -**性质**: 详细设计,对应需求文档 `docs/todo/dynamic-work-graph-design-skill-requirements.md`(条目 E,已确认)。回答该需求文档第 8 节的开放问题。 +**性质**: 详细设计,对应需求文档 `docs/done/dynamic-work-graph-design-skill-requirements.md`(条目 E,已确认)。回答该需求文档第 8 节的开放问题。 **依赖**:条目 G(`docs/work-graph-parallel-execution-design.md`)已实现——`topological_layers()`/`run_graph()` 已经在生产代码里。 **状态**: 设计草案,待评审后实施。 diff --git a/docs/todo/dynamic-work-graph-design-skill-requirements.md b/docs/done/dynamic-work-graph-design-skill-requirements.md index a64ce76..a64ce76 100644 --- a/docs/todo/dynamic-work-graph-design-skill-requirements.md +++ b/docs/done/dynamic-work-graph-design-skill-requirements.md diff --git a/docs/todo/role-package-abstraction-design.md b/docs/done/role-package-abstraction-design.md index 44805be..650685b 100644 --- a/docs/todo/role-package-abstraction-design.md +++ b/docs/done/role-package-abstraction-design.md @@ -1,7 +1,7 @@ # 统一 Role Package 抽象层——详细设计(SDD) **日期**: 2026-08-06 -**性质**: 详细设计,对应需求文档 `docs/todo/role-package-abstraction-requirements.md`(条目 H,需求评审已通过,见 `docs/todo/graph-engineering-open-items.md` H 节的评审记录)。回答该需求文档第 8 节的开放问题。 +**性质**: 详细设计,对应需求文档 `docs/done/role-package-abstraction-requirements.md`(条目 H,需求评审已通过,见 `docs/todo/graph-engineering-open-items.md` H 节的评审记录)。回答该需求文档第 8 节的开放问题。 **范围确认(用户 2026-08-06)**:FR-3 的 4 张 CHECK 约束表一次性全改,不分阶段。 **状态**: 设计草案,实施中。 diff --git a/docs/todo/role-package-abstraction-requirements.md b/docs/done/role-package-abstraction-requirements.md index 00ee4f0..0704a5a 100644 --- a/docs/todo/role-package-abstraction-requirements.md +++ b/docs/done/role-package-abstraction-requirements.md @@ -16,7 +16,7 @@ | **context** | `memory: project` → `.claude/agent-memory/{role}/`,git 版本化;但 Work Node 执行时塞进 prompt 的内容是每个调用点临时拼的(`build_prompt(node, outputs)`),没有独立的"context 组装层"抽象 | 局部实现,无统一抽象 | | **skills** | `skills//SKILL.md`,按名字挂进角色的 `skills:` frontmatter | 七项里最成熟、最像"可复用打包单元"的一个 | | **applications** | 没有对应的一等概念。架构文档 §7.2 提到 `mcpServers` 字段可以挂专属 MCP server,但 `agent_profile.py::FRONTMATTER` 里三个角色**一个都没配** | 基本空白 | -| **workflows** | Claude Code 原生 Dynamic Workflows 机制在,但只有 Planner 真正用——`work_graph_plan.py::plan_work_graph()` 的提示词硬编码永远只生成 brd/prd/sdd/benchmark 四个节点,Coder/Validator 走的是更简化的单次 `trigger_org_node()` 调用,没有"先规划图再执行"这条路径(见 `docs/todo/dynamic-work-graph-design-skill-requirements.md`,即条目 E,已确认待做) | 机制存在,不是每个角色都能复用的打包能力 | +| **workflows** | Claude Code 原生 Dynamic Workflows 机制在,但只有 Planner 真正用——`work_graph_plan.py::plan_work_graph()` 的提示词硬编码永远只生成 brd/prd/sdd/benchmark 四个节点,Coder/Validator 走的是更简化的单次 `trigger_org_node()` 调用,没有"先规划图再执行"这条路径(见 `docs/done/dynamic-work-graph-design-skill-requirements.md`,即条目 E,已确认待做) | 机制存在,不是每个角色都能复用的打包能力 | | **permissions** | `tools`/`disallowedTools` per role(如 Validator `disallowedTools: [Edit, Write]`) | 有格式,但有记录在案的真实漏洞:`agent_profile.py` 注释明确写了"scoped Bash patterns(如 `Bash(git commit:*)`)会把 Bash 整个禁掉",Validator 的 git-mutation 限制实际上退化成了 SOUL.md 里的文字约定,不是工具层强制 | | **acceptance criteria** | Benchmark、PASS/FAIL/INCONCLUSIVE、SDD REQ-01~15、`root_cause_trace` 根因归属 | 七项里最成熟的一环 | @@ -32,7 +32,7 @@ ## 3. 非目标 1. **不要求第一版就实现"运行时自主创建新角色"**。架构文档 §3"关键设计原则 1"明确 Org Graph 结构是人工定义、代码级固定,改动属于架构变更需要人工评审——这条决策不动。本需求要解决的是"人工新增一个角色时,需要改多少处代码/schema"这个摩擦,而不是让系统自己决定要不要新增角色。新增角色依然是人工发起的动作,只是发起方式从"改代码"变成"写一份声明式的 package"。 -2. **不在本文档里解决 workflows 维度的具体落地**——Coder/Validator 缺少动态 Work Graph 规划能力这件事,已经是条目 E(`docs/todo/dynamic-work-graph-design-skill-requirements.md`)的范围,本文档只要求"Role Package 里要有一个字段/引用指向这个角色的 workflow 规划能力",不重复设计 E 已经在做的事。 +2. **不在本文档里解决 workflows 维度的具体落地**——Coder/Validator 缺少动态 Work Graph 规划能力这件事,已经是条目 E(`docs/done/dynamic-work-graph-design-skill-requirements.md`)的范围,本文档只要求"Role Package 里要有一个字段/引用指向这个角色的 workflow 规划能力",不重复设计 E 已经在做的事。 3. **不在本文档里重新解决 permissions 维度的已知漏洞**(scoped Bash disallowedTools 不生效)——这是 Claude Code 平台本身的行为限制,本文档只要求 Role Package 的 permissions 字段要能诚实反映"这条限制实际上是工具层强制还是仅靠文字约定",不假装这个漏洞已经修复。 4. **不要求一次性覆盖全部七个维度到同等成熟度**。applications 维度目前是空白,第一版只需要定义清楚"这个维度存在、字段长什么样、允许为空",不要求马上有真实的 MCP server 集成可用。 5. **不做通用的"角色市场/角色商店"之类的产品化能力**。这是纯粹的内部抽象层重构,不涉及把角色包装成可分发、可交易的产品单元。 diff --git a/docs/todo/validator-loop-until-dry-skill-design.md b/docs/done/validator-loop-until-dry-skill-design.md index ce26137..4e93ec0 100644 --- a/docs/todo/validator-loop-until-dry-skill-design.md +++ b/docs/done/validator-loop-until-dry-skill-design.md @@ -1,7 +1,7 @@ # Validator "未知规模扫描收敛" Skill——详细设计(SDD) **日期**: 2026-08-06 -**性质**: 详细设计,对应需求文档 `docs/todo/validator-loop-until-dry-skill-requirements.md`(条目 B,已确认)。回答该需求文档第 8 节的开放问题。 +**性质**: 详细设计,对应需求文档 `docs/done/validator-loop-until-dry-skill-requirements.md`(条目 B,已确认)。回答该需求文档第 8 节的开放问题。 **状态**: 设计草案,实施中。 ## 1. 范围确认:纯 Skill,不动执行引擎 diff --git a/docs/todo/validator-loop-until-dry-skill-requirements.md b/docs/done/validator-loop-until-dry-skill-requirements.md index fa295d1..fa295d1 100644 --- a/docs/todo/validator-loop-until-dry-skill-requirements.md +++ b/docs/done/validator-loop-until-dry-skill-requirements.md diff --git a/docs/todo/verifier-fan-out-jury-design.md b/docs/done/verifier-fan-out-jury-design.md index aac956f..0be4e4e 100644 --- a/docs/todo/verifier-fan-out-jury-design.md +++ b/docs/done/verifier-fan-out-jury-design.md @@ -1,7 +1,7 @@ # 三视角评审团——Work Graph Fan-out 实现——详细设计(SDD) **日期**: 2026-08-06 -**性质**: 详细设计,对应需求文档 `docs/todo/verifier-fan-out-jury-requirements.md`(条目 F,已确认)。回答该需求文档第 8 节的开放问题。 +**性质**: 详细设计,对应需求文档 `docs/done/verifier-fan-out-jury-requirements.md`(条目 F,已确认)。回答该需求文档第 8 节的开放问题。 **依赖代码**:`src/root_cause_trace.py`(`judge_root_cause`/`_PERSPECTIVE_FRAMINGS`)、`src/org_level_loop.py`(`run_fix_loop`,唯一真实生产调用方)、`src/work_graph_orchestrate.py`(G 已实现的 `run_graph()`/`topological_layers()`)。 **状态**: 设计草案,待评审后实施。 diff --git a/docs/todo/verifier-fan-out-jury-requirements.md b/docs/done/verifier-fan-out-jury-requirements.md index 39eba7a..39eba7a 100644 --- a/docs/todo/verifier-fan-out-jury-requirements.md +++ b/docs/done/verifier-fan-out-jury-requirements.md diff --git a/docs/todo/work-graph-parallel-execution-design.md b/docs/done/work-graph-parallel-execution-design.md index ed6fe2e..ed6fe2e 100644 --- a/docs/todo/work-graph-parallel-execution-design.md +++ b/docs/done/work-graph-parallel-execution-design.md diff --git a/docs/todo/work-graph-parallel-execution-requirements.md b/docs/done/work-graph-parallel-execution-requirements.md index 6f70eba..6f70eba 100644 --- a/docs/todo/work-graph-parallel-execution-requirements.md +++ b/docs/done/work-graph-parallel-execution-requirements.md diff --git a/docs/todo/work-graph-time-travel-debugging-design.md b/docs/done/work-graph-time-travel-debugging-design.md index 178d5e8..4b31a09 100644 --- a/docs/todo/work-graph-time-travel-debugging-design.md +++ b/docs/done/work-graph-time-travel-debugging-design.md @@ -1,7 +1,7 @@ # Work Graph 执行历史 Time-Travel 调试——详细设计(SDD) **日期**: 2026-08-06 -**性质**: 详细设计,对应需求文档 `docs/todo/work-graph-time-travel-debugging-requirements.md`(条目 D,已确认)。回答该需求文档第 8 节的开放问题。 +**性质**: 详细设计,对应需求文档 `docs/done/work-graph-time-travel-debugging-requirements.md`(条目 D,已确认)。回答该需求文档第 8 节的开放问题。 **状态**: 设计草案,实施中,后端+控制台一起做(用户 2026-08-06 确认)。 ## 1. `ux_work_graph_run_active` 比需求文档描述的风险更小 diff --git a/docs/todo/work-graph-time-travel-debugging-requirements.md b/docs/done/work-graph-time-travel-debugging-requirements.md index bf7a295..bf7a295 100644 --- a/docs/todo/work-graph-time-travel-debugging-requirements.md +++ b/docs/done/work-graph-time-travel-debugging-requirements.md diff --git a/docs/todo/graph-engineering-open-items.md b/docs/todo/graph-engineering-open-items.md index a3c8276..31daa93 100644 --- a/docs/todo/graph-engineering-open-items.md +++ b/docs/todo/graph-engineering-open-items.md @@ -1,7 +1,7 @@ # Graph Engineering 系列对照笔记——待确认事项清单 -**日期**: 2026-08-04(2026-08-05 更新:A/B/D/E/F/G 已确认方向,C 已确认暂不做) -**性质**: 从三份对照笔记里提取出的全部"待讨论的开放问题",去重合并后按主题整理,供逐条确认方案。每条确认后会展开成独立的需求文档(参考 `docs/work-graph-parallel-execution-requirements.md` 的产出方式),本文件本身只做索引和现状追踪,不写详细方案。 +**日期**: 2026-08-04(2026-08-06 更新:A/B/D/E/F/G/H 全部已实现,C 已确认不做——全部条目均已resolve,本文件继续作为这条主线的活索引保留在 `docs/todo/`,不迁入 `docs/done/`,因为它会随新一批对照笔记/差距检查持续追加条目,见 H 的加入方式) +**性质**: 从三份对照笔记里提取出的全部"待讨论的开放问题",去重合并后按主题整理,供逐条确认方案。每条确认后会展开成独立的需求文档(参考 `docs/done/work-graph-parallel-execution-requirements.md` 的产出方式,条目落地后连同设计文档一并移入 `docs/done/`),本文件本身只做索引和现状追踪,不写详细方案。 **来源文档**: - `docs/reference/graph-engineering-1000-agents-5-steps.diff-with-graphlemon.md`(简称"5 步版对照") - `docs/reference/graph-engineering-vs-loop-engineering-overview.diff-with-graphlemon.md`(简称"综述版对照") @@ -36,7 +36,7 @@ ## B. loop-until-dry 要不要在 Validator 落地 -**状态**:✅ 已实现(2026-08-06)→ 需求文档 `docs/todo/validator-loop-until-dry-skill-requirements.md` + 设计文档 `docs/todo/validator-loop-until-dry-skill-design.md` +**状态**:✅ 已实现(2026-08-06)→ 需求文档 `docs/done/validator-loop-until-dry-skill-requirements.md` + 设计文档 `docs/done/validator-loop-until-dry-skill-design.md` **来源**:5 步版对照 §4 开放问题 1 @@ -62,7 +62,7 @@ ## D. Time-travel 调试要不要立项 -**状态**:✅ 已实现(2026-08-06)→ 需求文档 `docs/todo/work-graph-time-travel-debugging-requirements.md` + 设计文档 `docs/todo/work-graph-time-travel-debugging-design.md` +**状态**:✅ 已实现(2026-08-06)→ 需求文档 `docs/done/work-graph-time-travel-debugging-requirements.md` + 设计文档 `docs/done/work-graph-time-travel-debugging-design.md` **来源**:综述版对照 §6 @@ -78,7 +78,7 @@ ## E. Planning Skill 提示词强化——识别可并行节点 + 通用 Work Graph 设计能力 -**状态**:✅ 已实现(2026-08-06)→ 需求文档 `docs/todo/dynamic-work-graph-design-skill-requirements.md` + 设计文档 `docs/todo/dynamic-work-graph-design-skill-design.md` +**状态**:✅ 已实现(2026-08-06)→ 需求文档 `docs/done/dynamic-work-graph-design-skill-requirements.md` + 设计文档 `docs/done/dynamic-work-graph-design-skill-design.md` **来源**:综述版对照 §7 开放问题 3 + 14 步版对照 §3 开放问题 2(同一主题:让 Planning 阶段更早识别并行机会) @@ -92,7 +92,7 @@ ## F. 三视角评审团机制要不要推广到其他验证点 -**状态**:✅ 已实现(2026-08-06)→ 需求文档 `docs/todo/verifier-fan-out-jury-requirements.md` + 设计文档 `docs/todo/verifier-fan-out-jury-design.md` +**状态**:✅ 已实现(2026-08-06)→ 需求文档 `docs/done/verifier-fan-out-jury-requirements.md` + 设计文档 `docs/done/verifier-fan-out-jury-design.md` **来源**:综述版对照 §7 开放问题 4 + 14 步版对照 §3 开放问题 4(同一主题) @@ -106,7 +106,7 @@ ## G. Work Graph 节点并行执行(Python 线程池方案) -**状态**:✅ 已实现(2026-08-06)→ 需求文档见 `docs/work-graph-parallel-execution-requirements.md` +**状态**:✅ 已实现(2026-08-06)→ 需求文档 `docs/done/work-graph-parallel-execution-requirements.md` + 设计文档 `docs/done/work-graph-parallel-execution-design.md` **来源**:14 步版对照 §3 开放问题 1 @@ -120,7 +120,7 @@ ## H. 统一 Role Package 抽象层 -**状态**:✅ 已实现(2026-08-06)→ 需求文档 `docs/todo/role-package-abstraction-requirements.md` + 设计文档 `docs/todo/role-package-abstraction-design.md` +**状态**:✅ 已实现(2026-08-06)→ 需求文档 `docs/done/role-package-abstraction-requirements.md` + 设计文档 `docs/done/role-package-abstraction-design.md` **来源**:不属于三份 Graph Engineering 对照笔记,是用户对照 Agentic Enterprise 产品目标("role + context + skills + applications + workflows + permissions + acceptance criteria;all essentially are context for intelligent computing")单独提出的差距检查,2026-08-06。 diff --git a/skills/design-dynamic-work-graph/SKILL.md b/skills/design-dynamic-work-graph/SKILL.md index 5b7a589..8296a74 100644 --- a/skills/design-dynamic-work-graph/SKILL.md +++ b/skills/design-dynamic-work-graph/SKILL.md @@ -11,7 +11,7 @@ tags: - orchestration metadata: origin: graphlemon-native - related: [G(并行执行)docs/work-graph-parallel-execution-design.md, E docs/todo/dynamic-work-graph-design-skill-design.md] + related: [G(并行执行)docs/work-graph-parallel-execution-design.md, E docs/done/dynamic-work-graph-design-skill-design.md] platforms: [linux, macos, windows] --- diff --git a/skills/unknown-scope-defect-sweep/SKILL.md b/skills/unknown-scope-defect-sweep/SKILL.md index a321ec2..0c98aaa 100644 --- a/skills/unknown-scope-defect-sweep/SKILL.md +++ b/skills/unknown-scope-defect-sweep/SKILL.md @@ -11,7 +11,7 @@ tags: - sweep metadata: origin: graphlemon-native - related: [qa-task-validation, docs/todo/validator-loop-until-dry-skill-design.md] + related: [qa-task-validation, docs/done/validator-loop-until-dry-skill-design.md] platforms: [linux, macos, windows] --- diff --git a/src/agent_profile.py b/src/agent_profile.py index a696eaf..07bba91 100644 --- a/src/agent_profile.py +++ b/src/agent_profile.py @@ -33,7 +33,7 @@ read by this module's own Python code; `json.load` is the zero-risk choice, no hand-rolled parser. role.json content is deliberately a REFERENCE manifest, not a content copy: `identity.soul_md_path`/`agents_md_path` still point at the same `agents//SOUL.md`/`AGENTS.md` files, unmoved -- -see docs/todo/role-package-abstraction-design.md §2 for why keeping the +see docs/done/role-package-abstraction-design.md §2 for why keeping the existing identity files as the single source of prose content makes the migration's "deployed output must stay byte-identical" requirement close to automatic (only the frontmatter's data SOURCE changed, not the body-assembly diff --git a/src/org_level_loop.py b/src/org_level_loop.py index 740b479..6def114 100644 --- a/src/org_level_loop.py +++ b/src/org_level_loop.py @@ -17,7 +17,7 @@ def run_fix_loop(conn, task_id, target_folder_path, bug_description, context, fi function doesn't add its own fallback for that, matching 04-P's own "升级人工" answer to disagreement). - **F (2026-08-06, docs/todo/verifier-fan-out-jury-design.md)**: root + **F (2026-08-06, docs/done/verifier-fan-out-jury-design.md)**: root cause judgment now runs as a real Work Graph fan-out (each perspective is its own Work Node with its own clean context) instead of three sequential Python closures calling org_node_trigger.trigger_org_node -- diff --git a/src/root_cause_trace.py b/src/root_cause_trace.py index 72f616d..7e5be79 100644 --- a/src/root_cause_trace.py +++ b/src/root_cause_trace.py @@ -15,7 +15,7 @@ concrete question each perspective asks is a prompt-engineering concern for the caller (see real_validator_perspective below for the real-call version), not this module's. -**F (2026-08-06, docs/todo/verifier-fan-out-jury-design.md)**: judge_root_cause +**F (2026-08-06, docs/done/verifier-fan-out-jury-design.md)**: judge_root_cause above is the closure-based implementation -- each perspective is a Python function call, sequentially, in the SAME process/context. Kept as-is (not replaced): it's the cheap path for scenarios that don't need worktree/Work diff --git a/src/schema.py b/src/schema.py index 1cc0ed1..4270e0c 100644 --- a/src/schema.py +++ b/src/schema.py @@ -84,7 +84,7 @@ CREATE TABLE skill ( -- ('planner','coder','validator')) -- relaxed to a plain non-empty-string -- check so a new role, added purely via roles//role.json (no -- schema.py/agent_profile.py code change), isn't rejected by a stale - -- hardcoded enum. See docs/todo/role-package-abstraction-design.md §4. + -- hardcoded enum. See docs/done/role-package-abstraction-design.md §4. owner_org_node TEXT NOT NULL CHECK (owner_org_node != ''), file_path TEXT NOT NULL, current_git_commit_sha TEXT NOT NULL, diff --git a/src/test_org_level_loop.py b/src/test_org_level_loop.py index 2eb4833..2d54200 100644 --- a/src/test_org_level_loop.py +++ b/src/test_org_level_loop.py @@ -5,7 +5,7 @@ Testing constraint). Real coverage is in src/test_org_level_loop_e2e.py **F (2026-08-06)**: root-cause judgment now runs through root_cause_trace.judge_root_cause_via_work_graph (a real Work Graph fan-out, -see docs/todo/verifier-fan-out-jury-design.md), so the 3 perspective calls +see docs/done/verifier-fan-out-jury-design.md), so the 3 perspective calls are mocked at work_graph_execute.write_workflow_script/execute_work_graph (same boundary as test_work_graph_orchestrate.py), not at org_node_trigger.trigger_org_node -- that mock is now only used for the diff --git a/src/test_work_graph_fork.py b/src/test_work_graph_fork.py index 5eb95ef..f5f4613 100644 --- a/src/test_work_graph_fork.py +++ b/src/test_work_graph_fork.py @@ -1,7 +1,7 @@ """D (2026-08-06) tests: work_graph_fork.py, mocked at the claude subprocess boundary (CLAUDE.md Testing constraint) -- same pattern as test_work_graph_orchestrate.py. Covers the requirements doc's acceptance -standards 1-3 (docs/todo/work-graph-time-travel-debugging-requirements.md). +standards 1-3 (docs/done/work-graph-time-travel-debugging-requirements.md). Run: python3 -m unittest src.test_work_graph_fork -v """ diff --git a/src/work_graph_fork.py b/src/work_graph_fork.py index 9393665..14a1f1f 100644 --- a/src/work_graph_fork.py +++ b/src/work_graph_fork.py @@ -3,7 +3,7 @@ work_graph_run from an already-'done' work_node_execution, substituting a human-provided output for that node and re-executing everything strictly downstream of it for real, while every other node reuses the original run's persisted output_payload untouched. See -docs/todo/work-graph-time-travel-debugging-design.md for the full design. +docs/done/work-graph-time-travel-debugging-design.md for the full design. **Output substitution, not re-prompting** (design doc §2, resolving the requirements doc's FR-1 ambiguity): the fork point's own output_payload is diff --git a/src/work_graph_orchestrate.py b/src/work_graph_orchestrate.py index a870b3f..21fab05 100644 --- a/src/work_graph_orchestrate.py +++ b/src/work_graph_orchestrate.py @@ -352,7 +352,7 @@ def run_graph( independent work, no reason to throw away completed work), then raised together as `WorkGraphLayerError` once the whole layer has settled. One real limitation, accepted deliberately (see - `docs/todo/work-graph-parallel-execution-design.md` §6): a node + `docs/done/work-graph-parallel-execution-design.md` §6): a node waiting on a quota-backoff sleep inside `run_work_node` blocks the thread pool worker running it, which in turn blocks the layer barrier even after every sibling has finished -- Python threads have no clean diff --git a/src/work_graph_plan.py b/src/work_graph_plan.py index 8a26d16..e4fa23e 100644 --- a/src/work_graph_plan.py +++ b/src/work_graph_plan.py @@ -80,7 +80,7 @@ _PROMPT_TEMPLATE = ( # E (2026-08-06): the generic, cross-Org-Agent path -- used for every # org_node OTHER than 'planner'. Planner's own doc-writing chain stays on # _PROMPT_TEMPLATE above unchanged (zero regression risk, see -# docs/todo/dynamic-work-graph-design-skill-design.md §3): that chain is a +# docs/done/dynamic-work-graph-design-skill-design.md §3): that chain is a # fixed architectural constant (brd->prd->sdd->benchmark->...), not # something that should vary call to call, whereas Coder/Validator's # sub-tasks have no such fixed small vocabulary of node types. Each node