aigroup-workflow 2.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/.claude/commands/workflow-start.md +19 -15
  2. package/.codex/AGENTS.md +1 -1
  3. package/AGENTS.md +1 -1
  4. package/README.md +3 -5
  5. package/agents/seo-specialist.md +0 -3
  6. package/cli/commands/init.mjs +1 -1
  7. package/cli/utils/scaffold.mjs +1 -1
  8. package/docs/red-flags.md +1 -1
  9. package/docs/rules/README.md +3 -3
  10. package/docs/rules/web/design-quality.md +0 -1
  11. package/docs/templates/implementation-plan.md +1 -1
  12. package/docs/workflow-pipeline.md +41 -22
  13. package/manifests/install-modules.json +8 -3
  14. package/package.json +1 -1
  15. package/skills/SUPERPOWERS-LICENSE +21 -0
  16. package/skills/brainstorming/SKILL.md +164 -0
  17. package/skills/brainstorming/scripts/frame-template.html +214 -0
  18. package/skills/brainstorming/scripts/helper.js +88 -0
  19. package/skills/brainstorming/scripts/server.cjs +354 -0
  20. package/skills/brainstorming/scripts/start-server.sh +148 -0
  21. package/skills/brainstorming/scripts/stop-server.sh +56 -0
  22. package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  23. package/skills/brainstorming/visual-companion.md +287 -0
  24. package/skills/executing-plans/SKILL.md +70 -0
  25. package/skills/finishing-a-development-branch/SKILL.md +200 -112
  26. package/skills/receiving-code-review/SKILL.md +213 -0
  27. package/skills/requesting-code-review/SKILL.md +105 -0
  28. package/skills/requesting-code-review/code-reviewer.md +146 -0
  29. package/skills/systematic-debugging/CREATION-LOG.md +119 -0
  30. package/skills/systematic-debugging/SKILL.md +296 -208
  31. package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  32. package/skills/systematic-debugging/condition-based-waiting.md +115 -0
  33. package/skills/systematic-debugging/defense-in-depth.md +122 -0
  34. package/skills/systematic-debugging/find-polluter.sh +63 -0
  35. package/skills/systematic-debugging/root-cause-tracing.md +169 -0
  36. package/skills/systematic-debugging/test-academic.md +14 -0
  37. package/skills/systematic-debugging/test-pressure-1.md +58 -0
  38. package/skills/systematic-debugging/test-pressure-2.md +68 -0
  39. package/skills/systematic-debugging/test-pressure-3.md +69 -0
  40. package/skills/using-git-worktrees/SKILL.md +218 -0
  41. package/skills/verification-before-completion/SKILL.md +139 -120
  42. package/skills/writing-plans/SKILL.md +79 -94
  43. package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  44. package/skills/writing-skills/SKILL.md +655 -0
  45. package/skills/writing-skills/anthropic-best-practices.md +1150 -0
  46. package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  47. package/skills/writing-skills/graphviz-conventions.dot +172 -0
  48. package/skills/writing-skills/persuasion-principles.md +187 -0
  49. package/skills/writing-skills/render-graphs.js +168 -0
  50. package/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  51. package/skills/subagent-driven-development/SKILL.md +0 -173
  52. package/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-39.pyc +0 -0
  53. package/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-39.pyc +0 -0
@@ -29,25 +29,29 @@ argument-hint: <任务名>
29
29
  - **worker 目录**:`.orchestration/<session>/<worker>/`
30
30
  - **产物**:主会话把 agent 响应写入 `handoff.md`,然后 `session.cjs set-status <session> <worker> completed`
31
31
 
32
- | # | Phase | 负责 agent / skill | worker 目录 |
33
- |---|-------|--------------------|-------------|
34
- | 1 | 需求收集 | 主会话 + `skills/requirement-engineering` | `.orchestration/<session>/architect/` (requirements.md) |
35
- | 2 | 需求验证 | 主会话 + `skills/requirement-engineering` | 同上,追加验证结论 |
36
- | 3 | 方案设计 | `architect` | `.orchestration/<session>/architect/handoff.md` |
37
- | 4 | 任务拆解 | `planner` | `.orchestration/<session>/planner/handoff.md` |
38
- | 5 | 实施开发(TDD) | `tdd-guide` | `.orchestration/<session>/tdd-guide/handoff.md` |
39
- | 6 | 测试验证 | `code-reviewer`(安全敏感加 `security-reviewer`、`e2e-runner` `rust-reviewer` 等) | `.orchestration/<session>/code-reviewer/handoff.md` |
40
- | 7 | 文档更新 | 主会话(必要时派实现 agent 协助) | 直接改 docs/;在 session README 留笔记 |
41
- | 8 | 分支收尾 | 主会话 + `skills/finishing-a-development-branch` | session README 总结 |
32
+ | # | Phase | 主导 skill | 负责 agent | worker 目录 |
33
+ |---|-------|-----------|-----------|-------------|
34
+ | 1 | 需求收集 | `brainstorming`(前段) | 主会话 | `.orchestration/<session>/architect/requirements.md` |
35
+ | 2 | 需求验证 | `brainstorming`(中段) | 主会话 | 同上,追加验证结论 |
36
+ | 3 | 方案设计 | `brainstorming`(终段) | `architect` | `.orchestration/<session>/architect/handoff.md` |
37
+ | 4 | 任务拆解 | `writing-plans` | `planner` | `.orchestration/<session>/planner/handoff.md` |
38
+ | 4→5 | 隔离工作区 | `using-git-worktrees` | 主会话执行 git | session `README.md` 记录 worktree 路径 |
39
+ | 5 | 实施开发 | subagent 派遣(推荐)/ `executing-plans` | `tdd-guide` 或语言专项 reviewer | `.orchestration/<session>/<agent>/handoff.md` |
40
+ | 6a | 审查发起 | `requesting-code-review` | `code-reviewer`(敏感场景加 `security-reviewer` / `e2e-runner` / 语言专项 reviewer) | `.orchestration/<session>/code-reviewer/request.md` |
41
+ | 6b | 审查反馈处理 | `receiving-code-review` | 主会话逐条决议 | `.orchestration/<session>/code-reviewer/handoff.md` |
42
+ | 7 | 文档更新 | (无强制 skill) | `doc-updater` 或主会话 | 直接改 docs/;在 session README 留笔记 |
43
+ | 8 | 分支收尾 | `finishing-a-development-branch` | 主会话 | 在 session README 总结 |
44
+
45
+ > **人工 checkpoint**:phase 4 末(计划批准)、phase 5 起点(实施模式选择)、phase 8(集成方式 4 选 1 / discard 确认)、phase 6b 审查分歧——orchestrator 暂停等用户决策。详见 `docs/workflow-pipeline.md`。
42
46
 
43
47
  ## 裁剪示例
44
48
 
45
49
  | 任务类型 | 建议 phases |
46
50
  |---------|------------|
47
- | 纯 bugfix | 4 → 5 → 6 |
48
- | 小功能增补 | 3 → 4 → 5 → 6 |
49
- | 新模块 / 架构决策 | 1 → 2 → 3 → 4 → 5 → 6 → 7 → 8 |
50
- | 重构 | 3 → 4 → 5 → 6 |
51
+ | 纯 bugfix | 4 → 5 → 6a → 6b |
52
+ | 小功能增补 | 3 → 4 → (4→5 桥) 5 → 6a → 6b |
53
+ | 新模块 / 架构决策 | 1 → 2 → 3 → 4 → (4→5 桥) 56a → 6b → 7 → 8 |
54
+ | 重构 | 3 → 4 → (4→5 桥) 5 → 6a → 6b |
51
55
  | 纯文档 | 7(直接做,不用走 session) |
52
56
 
53
57
  ## 状态真相源
@@ -57,7 +61,7 @@ argument-hint: <任务名>
57
61
  ## 横切 skill(任何 phase 可触发)
58
62
 
59
63
  - `skills/systematic-debugging`(调试时)
60
- - `skills/verification-before-completion`(声称完成前)
64
+ - `skills/verification-before-completion`(强制触发:phase 5 末 / 6b 末 / 8 入前)
61
65
  - `skills/entropy-management`(感知到漂移时)
62
66
 
63
67
  ## 不启动 session 的情况
package/.codex/AGENTS.md CHANGED
@@ -48,7 +48,7 @@ Skills 主源位于 `skills/<name>/SKILL.md`,跨平台共享。Codex 端**按
48
48
  /agent docs_researcher
49
49
  ```
50
50
 
51
- **其他工作(planning / implementation / build-fixing)由 Codex 主对话直接做**——加载对应 skill 即可,无需切 persona。这也是与 ECC 一致的做法。
51
+ **其他工作(planning / implementation / build-fixing)由 Codex 主对话直接做**——加载对应 skill 即可,无需切 persona
52
52
 
53
53
  ## MCP 服务器
54
54
 
package/AGENTS.md CHANGED
@@ -30,7 +30,7 @@ aiGroup is a **dual-harness AI team collaboration framework**. The main agent de
30
30
 
31
31
  | 模块 | 默认 | 数量 | 说明 |
32
32
  |------|------|------|------|
33
- | `agents-core` | ✅ | 12 | ECC 派遣规则的 10 个 + init-architect / get-current-datetime |
33
+ | `agents-core` | ✅ | 12 | 派遣规则定义的 10 个 + init-architect / get-current-datetime |
34
34
  | `agents-quality` | ⏤ | 9 | 代码质量分析 |
35
35
  | `agents-language` | ⏤ | 16 | 各语言 reviewer / build-resolver |
36
36
  | `agents-ops` | ⏤ | 8 | 运维与工作流操作 |
package/README.md CHANGED
@@ -83,7 +83,7 @@ agent 体系**两端共享一份**——单一 manifest 驱动的源池 + 选装
83
83
  | `init-architect` | 项目专属(`/init-project` 用) |
84
84
  | `get-current-datetime` | 工具 agent |
85
85
 
86
- > 派遣规则采用 ECC 风格 `docs/rules/agents.md`。详细 handoff 内容、并行场景、反模式见 `docs/rules/agents.md`。
86
+ > 详细 handoff 内容、并行场景、反模式见 `docs/rules/agents.md`。
87
87
 
88
88
  ### 可选扩展模块(按需装)
89
89
 
@@ -267,11 +267,9 @@ aiGroup/
267
267
  └── .codex-plugin/plugin.json
268
268
  ```
269
269
 
270
- ## Harness Engineering
270
+ ## Agent 架构
271
271
 
272
- ```
273
- Agent = Model + Harness
274
- ```
272
+ Agent 行为由四层机制约束:行动前的提示引导、行动中的确定性检查、行动后的 AI 审查,以及防止长期漂移的熵管理。
275
273
 
276
274
  | 层级 | 机制 | 实现 |
277
275
  |------|------|------|
@@ -57,6 +57,3 @@ Fix: Exact change to make
57
57
  - no advice detached from the actual site structure
58
58
  - recommendations should be implementable by the receiving engineer or content owner
59
59
 
60
- ## Reference
61
-
62
- Use `skills/seo` for the canonical ECC SEO workflow and implementation guidance.
@@ -117,7 +117,7 @@ export async function init(ctx) {
117
117
  log.step('安装清单')
118
118
  log.dim('基础组件(必装):')
119
119
  log.dim(' • CLAUDE.md + AGENTS.md(双端入口)')
120
- log.dim(' • docs/(rules/agents(ECC 派遣)+ rules/<lang>(13 语言)+ workflow-pipeline + red-flags)')
120
+ log.dim(' • docs/(rules/agents(派遣规则)+ rules/<lang>(13 语言)+ workflow-pipeline + red-flags)')
121
121
  log.dim(' • scripts/hooks/(dispatcher + checks)+ scripts/orchestration/(session.cjs)')
122
122
  log.dim(' • manifests/install-modules.json(跨端清单)')
123
123
  log.dim(' • .orchestration/<session>/(产物工作区)')
@@ -27,7 +27,7 @@ export const BASE_FILES = [
27
27
  'manifests/install-modules.json',
28
28
  ]
29
29
 
30
- /** 语言专项规则目录(采用 ECC 原版,按需复制整个目录) */
30
+ /** 语言专项规则目录(按需复制整个目录) */
31
31
  export const RULES_LANGUAGE_DIRS = [
32
32
  'docs/rules/cpp',
33
33
  'docs/rules/csharp',
package/docs/red-flags.md CHANGED
@@ -26,4 +26,4 @@
26
26
 
27
27
  - 🔴 高:立即中断当前流程,回到正确阶段
28
28
  - 🟡 中:在当前阶段结束前处理
29
- - 信号 #8 是 Harness Engineering 的核心:**重复问题不应靠人工反复修正,而应编码为自动化约束**
29
+ - 信号 #8 的根本原则:**重复问题不应靠人工反复修正,而应编码为自动化约束**
@@ -1,13 +1,13 @@
1
1
  # Rules
2
2
 
3
3
  > 短小、强制、可勾选的规则集。Skills 告诉你"怎么做",Rules 告诉你"必须做什么"。
4
- > 通用规则按领域切分(agents / coding-style / git / testing / security / performance / hooks),语言专项按栈分目录(采用 ECC 规则原版)。
4
+ > 通用规则按领域切分(agents / coding-style / git / testing / security / performance / hooks),语言专项按栈分目录。
5
5
 
6
6
  ## 通用规则(所有项目)
7
7
 
8
8
  | 文件 | 主题 |
9
9
  |------|------|
10
- | [agents.md](agents.md) | Agent 派遣规则(采用 ECC zh) |
10
+ | [agents.md](agents.md) | Agent 派遣规则 |
11
11
  | [coding-style.md](coding-style.md) | 编码风格、命名、错误处理、中文注释 |
12
12
  | [git-workflow.md](git-workflow.md) | Conventional Commits、Git 安全 |
13
13
  | [testing.md](testing.md) | TDD、覆盖率、测试结构 |
@@ -15,7 +15,7 @@
15
15
  | [performance.md](performance.md) | MCP / tool 预算、上下文卫生、长任务拆分 |
16
16
  | [hooks.md](hooks.md) | Hooks 使用规则(Claude 自动 / Codex 手动) |
17
17
 
18
- ## 语言专项(按栈加载,采用 ECC 规则原版)
18
+ ## 语言专项(按栈加载)
19
19
 
20
20
  每个语言目录含 5 个标准维度:`coding-style.md` / `patterns.md` / `testing.md` / `security.md` / `hooks.md`。`web` 额外含 `design-quality.md` / `performance.md`。
21
21
 
@@ -38,7 +38,6 @@ Every meaningful frontend surface should demonstrate at least four of these:
38
38
  2. Define a palette intentionally.
39
39
  3. Choose typography deliberately.
40
40
  4. Gather at least a small set of real references.
41
- 5. Use ECC design/frontend skills where relevant.
42
41
 
43
42
  ## Worthwhile Style Directions
44
43
 
@@ -8,7 +8,7 @@ META:
8
8
  design: .orchestration/<session>/architect/xxx-design.md
9
9
  -->
10
10
 
11
- > **执行方式**:推荐使用 subagent-driven-development 技能按任务派遣子代理执行。
11
+ > **执行方式**:按 `docs/rules/agents.md` 派遣子代理执行(每任务独立上下文,`code-reviewer` 双阶段审查)。
12
12
  > 步骤使用 checkbox (`- [ ]`) 语法追踪进度。
13
13
 
14
14
  **目标**:[一句话描述构建什么]
@@ -6,38 +6,41 @@
6
6
  ## 完整路径
7
7
 
8
8
  ```
9
- 需求收集 → 需求验证 → 方案设计 → 任务拆解 → 实施开发测试验证 → 文档更新 → 分支收尾
9
+ 需求收集 → 需求验证 → 方案设计 → 任务拆解 → [隔离工作区]实施开发
10
+ → 审查发起 → 审查反馈处理 → 文档更新 → 分支收尾
10
11
  ```
11
12
 
12
13
  按序推进、不可跳步的假设**已废弃**。实际:
13
14
 
14
15
  - 大部分 bugfix 只需要 planning + development + testing
15
16
  - 探索性调研不需要任何 phase(直接读文件)
16
- - 架构性任务才需要完整 8 phase
17
+ - 架构性任务才需要完整路径
17
18
 
18
19
  ## Phase 清单
19
20
 
20
- | # | Phase | 负责者 | worker 目录(session 下) | 完成标志 |
21
- |---|-------|--------|---------------------------|---------|
22
- | 1 | 需求收集 | 主会话 | `architect/requirements.md` | 需求文档包含目标 / 用户场景 / 成功标准 |
23
- | 2 | 需求验证 | 主会话 | 在 requirements.md 追加验证结论 | 无歧义、无矛盾、用户确认 |
24
- | 3 | 方案设计 | `architect` | `architect/handoff.md`(ADR 格式) | 至少 2 个候选方案 + 推荐理由 |
25
- | 4 | 任务拆解 | `planner` | `planner/handoff.md` | 3–7 个阶段,每个含 agent / 验证命令 |
26
- | 5 | 实施开发 | `tdd-guide`(TDD 路径)/ 主对话直接实现 | `<agent>/handoff.md` 或直接改代码 | 改动文件清单 + 验证证据(typecheck / test) |
27
- | 6 | 测试验证 | `code-reviewer`(安全敏感 + `security-reviewer`、关键路径 + `e2e-runner`) | `code-reviewer/handoff.md` Stage 1 + Stage 2 | 规格符合性 ✓ 代码质量 ✓ |
28
- | 7 | 文档更新 | `doc-updater` 或主会话直接改 | 直接改 `docs/`;session `README.md` 留笔记 | docs/ARCHITECTURE / docs/PROJECT_CONTEXT / API 文档已同步 |
29
- | 8 | 分支收尾 | 主会话 | session `README.md` 总结 | 集成 / PR / 归档 |
21
+ | # | Phase | 主导 skill | 负责者 | worker 目录(session 下) | 完成标志 |
22
+ |---|-------|-----------|--------|---------------------------|---------|
23
+ | 1 | 需求收集 | `brainstorming`(前段) | 主会话 | `architect/requirements.md` | 需求文档包含目标 / 用户场景 / 成功标准 |
24
+ | 2 | 需求验证 | `brainstorming`(中段:challenge) | 主会话 | 在 requirements.md 追加验证结论 | 无歧义、无矛盾、用户确认 |
25
+ | 3 | 方案设计 | `brainstorming`(终段:spec 锁定) | `architect` | `architect/handoff.md`(ADR 格式) | 至少 2 个候选方案 + 推荐理由 |
26
+ | 4 | 任务拆解 | `writing-plans` | `planner` | `planner/handoff.md` | 3–7 个阶段,每个含 agent / 验证命令 |
27
+ | 4→5 | 隔离工作区 | `using-git-worktrees` | 主会话执行 git | session `README.md` 记录 worktree 路径 | worktree 创建、依赖装好、测试基线通过 |
28
+ | 5 | 实施开发 | subagent 派遣(推荐)/ `executing-plans` | `tdd-guide`(TDD 路径)/ 语言专项 reviewer | `<agent>/handoff.md` 或直接改代码 | 改动文件清单 + 验证证据(typecheck / test) |
29
+ | 6a | 审查发起 | `requesting-code-review` | 主会话向 `code-reviewer` 派遣(敏感场景加 `security-reviewer`、关键路径加 `e2e-runner`、按栈加语言专项 reviewer) | `code-reviewer/request.md` | 审查范围 / 验收点 / 关注项清单完整 |
30
+ | 6b | 审查反馈处理 | `receiving-code-review` | 主会话逐条决议 | `code-reviewer/handoff.md`(含决议) | 每条反馈有"采纳/反驳/记录"决议且证据闭环(Stage 1 规格 Stage 2 代码质量 ✓) |
31
+ | 7 | 文档更新 | (无强制 skill) | `doc-updater` 或主会话直接改 | 直接改 `docs/`;session `README.md` 留笔记 | docs/ARCHITECTURE / docs/PROJECT_CONTEXT / API 文档已同步 |
32
+ | 8 | 分支收尾 | `finishing-a-development-branch` | 主会话 | session `README.md` 总结 | 集成 / PR / 归档 |
30
33
 
31
34
  > **派遣的具体 agent 选择**见 `docs/rules/agents.md`。
32
35
  > **按语言栈的实施开发约束**见 `docs/rules/<lang>/`(cpp / golang / java / python / rust / typescript / web 等)。
33
36
 
34
37
  ## 横切关注点(任何 phase 可触发)
35
38
 
36
- | 关注点 | 触发场景 |
37
- |--------|---------|
38
- | 系统化调试 | bug、测试失败、异常行为 |
39
- | 完成前验证 | 任何"完成 / 通过 / 修复"声明前 |
40
- | 熵管理 | 代码库漂移、规则模糊、文档与代码不一致 |
39
+ | 关注点 | 主导 skill | 触发场景 |
40
+ |--------|-----------|---------|
41
+ | 系统化调试 | `systematic-debugging` | bug、测试失败、异常行为 |
42
+ | 完成前验证 | `verification-before-completion` | **强制触发点**:phase 5 末(声称实现完成前)、phase 6b 末(声称审查处理完前)、phase 8 进入前 |
43
+ | 熵管理 | `entropy-management` | 代码库漂移、规则模糊、文档与代码不一致 |
41
44
 
42
45
  ## 裁剪示例
43
46
 
@@ -45,11 +48,27 @@
45
48
  |---------|------------|------|
46
49
  | 配置项调整 / 笔误修正 | 直接做 | 主对话 |
47
50
  | 纯文档 | 7 | 主对话或 `doc-updater` |
48
- | 纯 bugfix(单文件,已知根因) | 5 → 6 | `/tdd` + `/review` |
49
- | 有根因待查的 bugfix | 4 → 5 → 6 | `/plan` 然后 `/tdd` |
50
- | 小功能增补 | 3 → 4 → 5 → 6 | `/workflow-start` |
51
- | 重构 | 3 → 4 → 5 → 6 | `/workflow-start` |
52
- | 新模块 / 架构决策 | 1 → 2 → 3 → 4 → 5 → 6 → 7 → 8 | `/workflow-start` |
51
+ | 纯 bugfix(单文件,已知根因) | 5 → 6a → 6b | `/tdd` + `/review` |
52
+ | 有根因待查的 bugfix | 4 → 5 → 6a → 6b | `/plan` 然后 `/tdd` |
53
+ | 小功能增补 | 3 → 4 → (4→5 桥) 5 → 6a → 6b | `/workflow-start` |
54
+ | 重构 | 3 → 4 → (4→5 桥) 5 → 6a → 6b | `/workflow-start` |
55
+ | 新模块 / 架构决策 | 1 → 2 → 3 → 4 → (4→5 桥) 56a → 6b → 7 → 8 | `/workflow-start` |
56
+
57
+ > 跳过"4→5 桥"= 在主仓库 working tree 直接改。仅在改动 ≤ 单文件且无并行任务风险时可省。
58
+
59
+ ## 人工 checkpoint(orchestrator 不替用户做的决定)
60
+
61
+ `/workflow-start` 是命令驱动的自动 orchestrator,但以下决策点**必须保留人工**——这些位置涉及不可逆操作或契约错误向后传播,自动跳过会丢失安全网。
62
+
63
+ | Checkpoint | 触发位置 | 暂停原因 | orchestrator 行为 |
64
+ |-----------|---------|---------|-----------------|
65
+ | 计划批准 | phase 4 末(`writing-plans` 产出后) | 计划是后续所有 phase 的契约,错误会扩散到实施和审查 | 暂停,向用户展示 plan 摘要,等待"批准 / 修订"回应 |
66
+ | 实施模式选择 | phase 5 起点 | subagent 派遣 vs `executing-plans` 影响代价、速度、上下文清洁度 | 暂停 1 次询问;用户未指定时默认 subagent 派遣并明确告知 |
67
+ | 集成方式选择 | phase 8(`finishing-a-development-branch` Step 3) | merge / PR / keep / discard 是不可逆的对外操作 | 暂停展示 4 选项,不替用户选 |
68
+ | Discard 确认 | phase 8 选项 4 | 删除分支 + worktree 不可恢复 | 必须用户键入 `discard` 字面量;其他输入一律视为放弃 |
69
+ | 审查反馈分歧 | phase 6b(`receiving-code-review` 中) | reviewer 与实施 agent 对同一问题给出冲突结论时 | 暂停,把分歧摘要呈给用户决议 |
70
+
71
+ **自动决策**(不打断用户):phase 间流转、handoff 文件生成、`status.md` 推进、worktree 路径分配、`session.cjs` 状态写入、phase 内的子 agent 派遣。
53
72
 
54
73
  ## Session 存在条件
55
74
 
@@ -5,15 +5,20 @@
5
5
  {
6
6
  "id": "workflow",
7
7
  "kind": "skills",
8
- "description": "跨阶段工作流 skill — 需求工程、规划、调试、文档、验证、收尾。",
8
+ "description": "跨阶段工作流 skill — 需求工程、规划、调试、审查、worktree、文档、验证、收尾。",
9
9
  "paths": [
10
10
  "skills/requirement-engineering",
11
+ "skills/brainstorming",
11
12
  "skills/writing-plans",
12
- "skills/subagent-driven-development",
13
+ "skills/executing-plans",
14
+ "skills/using-git-worktrees",
13
15
  "skills/systematic-debugging",
16
+ "skills/requesting-code-review",
17
+ "skills/receiving-code-review",
14
18
  "skills/documentation",
15
19
  "skills/verification-before-completion",
16
20
  "skills/finishing-a-development-branch",
21
+ "skills/writing-skills",
17
22
  "skills/entropy-management"
18
23
  ],
19
24
  "targets": [
@@ -178,7 +183,7 @@
178
183
  {
179
184
  "id": "agents-core",
180
185
  "kind": "agents",
181
- "description": "核心 agent — 对齐 ECC 派遣规则(docs/rules/agents.md)。",
186
+ "description": "核心 agent — 对齐 docs/rules/agents.md 派遣规则。",
182
187
  "agents": [
183
188
  "planner",
184
189
  "architect",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aigroup-workflow",
3
- "version": "2.0.2",
3
+ "version": "2.1.0",
4
4
  "description": "AI 团队协作框架 — 通过角色派遣、工作流管道和 Harness 传感器驱动 AI 协作开发",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jesse Vincent
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,164 @@
1
+ ---
2
+ name: brainstorming
3
+ description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
4
+ ---
5
+
6
+ # Brainstorming Ideas Into Designs
7
+
8
+ Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
9
+
10
+ Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
11
+
12
+ <HARD-GATE>
13
+ Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
14
+ </HARD-GATE>
15
+
16
+ ## Anti-Pattern: "This Is Too Simple To Need A Design"
17
+
18
+ Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
19
+
20
+ ## Checklist
21
+
22
+ You MUST create a task for each of these items and complete them in order:
23
+
24
+ 1. **Explore project context** — check files, docs, recent commits
25
+ 2. **Offer visual companion** (if topic will involve visual questions) — this is its own message, not combined with a clarifying question. See the Visual Companion section below.
26
+ 3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
27
+ 4. **Propose 2-3 approaches** — with trade-offs and your recommendation
28
+ 5. **Present design** — in sections scaled to their complexity, get user approval after each section
29
+ 6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
30
+ 7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
31
+ 8. **User reviews written spec** — ask user to review the spec file before proceeding
32
+ 9. **Transition to implementation** — invoke writing-plans skill to create implementation plan
33
+
34
+ ## Process Flow
35
+
36
+ ```dot
37
+ digraph brainstorming {
38
+ "Explore project context" [shape=box];
39
+ "Visual questions ahead?" [shape=diamond];
40
+ "Offer Visual Companion\n(own message, no other content)" [shape=box];
41
+ "Ask clarifying questions" [shape=box];
42
+ "Propose 2-3 approaches" [shape=box];
43
+ "Present design sections" [shape=box];
44
+ "User approves design?" [shape=diamond];
45
+ "Write design doc" [shape=box];
46
+ "Spec self-review\n(fix inline)" [shape=box];
47
+ "User reviews spec?" [shape=diamond];
48
+ "Invoke writing-plans skill" [shape=doublecircle];
49
+
50
+ "Explore project context" -> "Visual questions ahead?";
51
+ "Visual questions ahead?" -> "Offer Visual Companion\n(own message, no other content)" [label="yes"];
52
+ "Visual questions ahead?" -> "Ask clarifying questions" [label="no"];
53
+ "Offer Visual Companion\n(own message, no other content)" -> "Ask clarifying questions";
54
+ "Ask clarifying questions" -> "Propose 2-3 approaches";
55
+ "Propose 2-3 approaches" -> "Present design sections";
56
+ "Present design sections" -> "User approves design?";
57
+ "User approves design?" -> "Present design sections" [label="no, revise"];
58
+ "User approves design?" -> "Write design doc" [label="yes"];
59
+ "Write design doc" -> "Spec self-review\n(fix inline)";
60
+ "Spec self-review\n(fix inline)" -> "User reviews spec?";
61
+ "User reviews spec?" -> "Write design doc" [label="changes requested"];
62
+ "User reviews spec?" -> "Invoke writing-plans skill" [label="approved"];
63
+ }
64
+ ```
65
+
66
+ **The terminal state is invoking writing-plans.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skill you invoke after brainstorming is writing-plans.
67
+
68
+ ## The Process
69
+
70
+ **Understanding the idea:**
71
+
72
+ - Check out the current project state first (files, docs, recent commits)
73
+ - Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
74
+ - If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own spec → plan → implementation cycle.
75
+ - For appropriately-scoped projects, ask questions one at a time to refine the idea
76
+ - Prefer multiple choice questions when possible, but open-ended is fine too
77
+ - Only one question per message - if a topic needs more exploration, break it into multiple questions
78
+ - Focus on understanding: purpose, constraints, success criteria
79
+
80
+ **Exploring approaches:**
81
+
82
+ - Propose 2-3 different approaches with trade-offs
83
+ - Present options conversationally with your recommendation and reasoning
84
+ - Lead with your recommended option and explain why
85
+
86
+ **Presenting the design:**
87
+
88
+ - Once you believe you understand what you're building, present the design
89
+ - Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
90
+ - Ask after each section whether it looks right so far
91
+ - Cover: architecture, components, data flow, error handling, testing
92
+ - Be ready to go back and clarify if something doesn't make sense
93
+
94
+ **Design for isolation and clarity:**
95
+
96
+ - Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
97
+ - For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
98
+ - Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
99
+ - Smaller, well-bounded units are also easier for you to work with - you reason better about code you can hold in context at once, and your edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.
100
+
101
+ **Working in existing codebases:**
102
+
103
+ - Explore the current structure before proposing changes. Follow existing patterns.
104
+ - Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design - the way a good developer improves code they're working in.
105
+ - Don't propose unrelated refactoring. Stay focused on what serves the current goal.
106
+
107
+ ## After the Design
108
+
109
+ **Documentation:**
110
+
111
+ - Write the validated design (spec) to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
112
+ - (User preferences for spec location override this default)
113
+ - Use elements-of-style:writing-clearly-and-concisely skill if available
114
+ - Commit the design document to git
115
+
116
+ **Spec Self-Review:**
117
+ After writing the spec document, look at it with fresh eyes:
118
+
119
+ 1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
120
+ 2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
121
+ 3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
122
+ 4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.
123
+
124
+ Fix any issues inline. No need to re-review — just fix and move on.
125
+
126
+ **User Review Gate:**
127
+ After the spec review loop passes, ask the user to review the written spec before proceeding:
128
+
129
+ > "Spec written and committed to `<path>`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
130
+
131
+ Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user approves.
132
+
133
+ **Implementation:**
134
+
135
+ - Invoke the writing-plans skill to create a detailed implementation plan
136
+ - Do NOT invoke any other skill. writing-plans is the next step.
137
+
138
+ ## Key Principles
139
+
140
+ - **One question at a time** - Don't overwhelm with multiple questions
141
+ - **Multiple choice preferred** - Easier to answer than open-ended when possible
142
+ - **YAGNI ruthlessly** - Remove unnecessary features from all designs
143
+ - **Explore alternatives** - Always propose 2-3 approaches before settling
144
+ - **Incremental validation** - Present design, get approval before moving on
145
+ - **Be flexible** - Go back and clarify when something doesn't make sense
146
+
147
+ ## Visual Companion
148
+
149
+ A browser-based companion for showing mockups, diagrams, and visual options during brainstorming. Available as a tool — not a mode. Accepting the companion means it's available for questions that benefit from visual treatment; it does NOT mean every question goes through the browser.
150
+
151
+ **Offering the companion:** When you anticipate that upcoming questions will involve visual content (mockups, layouts, diagrams), offer it once for consent:
152
+ > "Some of what we're working on might be easier to explain if I can show it to you in a web browser. I can put together mockups, diagrams, comparisons, and other visuals as we go. This feature is still new and can be token-intensive. Want to try it? (Requires opening a local URL)"
153
+
154
+ **This offer MUST be its own message.** Do not combine it with clarifying questions, context summaries, or any other content. The message should contain ONLY the offer above and nothing else. Wait for the user's response before continuing. If they decline, proceed with text-only brainstorming.
155
+
156
+ **Per-question decision:** Even after the user accepts, decide FOR EACH QUESTION whether to use the browser or the terminal. The test: **would the user understand this better by seeing it than reading it?**
157
+
158
+ - **Use the browser** for content that IS visual — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
159
+ - **Use the terminal** for content that is text — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
160
+
161
+ A question about a UI topic is not automatically a visual question. "What does personality mean in this context?" is a conceptual question — use the terminal. "Which wizard layout works better?" is a visual question — use the browser.
162
+
163
+ If they agree to the companion, read the detailed guide before proceeding:
164
+ `skills/brainstorming/visual-companion.md`