harnessed 4.6.0 → 4.8.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 (48) hide show
  1. package/README.md +37 -3
  2. package/dist/cli.mjs +682 -433
  3. package/dist/cli.mjs.map +1 -1
  4. package/dist/index.mjs +1 -1
  5. package/dist/index.mjs.map +1 -1
  6. package/manifests/optional/codegraph.yaml +6 -4
  7. package/manifests/optional/ecc.ee5-answers.json +13 -0
  8. package/manifests/optional/ecc.yaml +64 -0
  9. package/messages/en.json +4 -1
  10. package/messages/zh-Hans.json +20 -3
  11. package/package.json +1 -1
  12. package/workflows/auto/SKILL.zh-Hans.md +129 -0
  13. package/workflows/capabilities.yaml +120 -0
  14. package/workflows/disciplines/doc-discipline.zh-Hans.yaml +49 -0
  15. package/workflows/disciplines/karpathy.yaml +5 -5
  16. package/workflows/disciplines/karpathy.zh-Hans.yaml +47 -0
  17. package/workflows/disciplines/operational.yaml +6 -6
  18. package/workflows/disciplines/operational.zh-Hans.yaml +79 -0
  19. package/workflows/disciplines/output-style.yaml +7 -7
  20. package/workflows/disciplines/output-style.zh-Hans.yaml +62 -0
  21. package/workflows/disciplines/priority.yaml +2 -2
  22. package/workflows/disciplines/priority.zh-Hans.yaml +28 -0
  23. package/workflows/discuss/auto/SKILL.zh-Hans.md +75 -0
  24. package/workflows/discuss/phase/SKILL.zh-Hans.md +73 -0
  25. package/workflows/discuss/strategic/SKILL.zh-Hans.md +78 -0
  26. package/workflows/discuss/subtask/SKILL.zh-Hans.md +79 -0
  27. package/workflows/plan/architecture/SKILL.zh-Hans.md +74 -0
  28. package/workflows/plan/auto/SKILL.zh-Hans.md +75 -0
  29. package/workflows/plan/phase/SKILL.zh-Hans.md +76 -0
  30. package/workflows/research/SKILL.zh-Hans.md +81 -0
  31. package/workflows/retro/SKILL.zh-Hans.md +71 -0
  32. package/workflows/role-prompts.zh-Hans.yaml +501 -0
  33. package/workflows/ship/auto/SKILL.zh-Hans.md +46 -0
  34. package/workflows/ship/preflight/SKILL.zh-Hans.md +38 -0
  35. package/workflows/task/auto/SKILL.zh-Hans.md +80 -0
  36. package/workflows/task/clarify/SKILL.zh-Hans.md +79 -0
  37. package/workflows/task/code/SKILL.zh-Hans.md +85 -0
  38. package/workflows/task/deliver/SKILL.zh-Hans.md +113 -0
  39. package/workflows/task/test/SKILL.zh-Hans.md +90 -0
  40. package/workflows/verify/auto/SKILL.zh-Hans.md +89 -0
  41. package/workflows/verify/code-review/SKILL.zh-Hans.md +71 -0
  42. package/workflows/verify/design/SKILL.zh-Hans.md +74 -0
  43. package/workflows/verify/multispec/SKILL.zh-Hans.md +88 -0
  44. package/workflows/verify/paranoid/SKILL.zh-Hans.md +74 -0
  45. package/workflows/verify/progress/SKILL.zh-Hans.md +69 -0
  46. package/workflows/verify/qa/SKILL.zh-Hans.md +76 -0
  47. package/workflows/verify/security/SKILL.zh-Hans.md +70 -0
  48. package/workflows/verify/simplify/SKILL.zh-Hans.md +70 -0
@@ -12,7 +12,7 @@ auto_enforce: true
12
12
  rules:
13
13
  - id: biome-preempt
14
14
  description: |
15
- TS/JS commit 前必跑 `pnpm exec biome check --write` (3 CI-red recurrences Phase 2.1.1/2.2/2.3 project memory)
15
+ Before any TS/JS commit you must run `pnpm exec biome check --write` (3 CI-red recurrences Phase 2.1.1/2.2/2.3 project memory)
16
16
  enforcement: auto-fix
17
17
  trigger: |
18
18
  phase.type == 'commit' AND
@@ -23,8 +23,8 @@ rules:
23
23
 
24
24
  - id: a7-adr-conservation
25
25
  description: |
26
- ADR 不动旧 ADR main body,baseline tag iterate,CI A7 step 守恒
27
- (sister Phase 1.3-2.6 ADR errata 路径)
26
+ A new ADR does not touch the main body of old ADRs; iterate via baseline tag, conserved by the CI A7 step
27
+ (sister Phase 1.3-2.6 ADR errata path)
28
28
  enforcement: warn
29
29
  trigger: phase.type == 'commit' AND changed_files contains 'docs/adr/'
30
30
  check_method: external-cmd
@@ -40,14 +40,14 @@ rules:
40
40
 
41
41
  - id: no-skip-hooks
42
42
  description: |
43
- 不允许 --no-verify / --no-gpg-sign skip hook flag,除非用户明确要求
43
+ Skip-hook flags such as --no-verify / --no-gpg-sign are not allowed, unless the user explicitly requests them
44
44
  enforcement: halt
45
45
  trigger: cmd.type == 'git-commit' AND args contains '--no-verify'
46
46
  check_method: regex
47
47
 
48
48
  - id: destructive-ops-explicit
49
49
  description: |
50
- Destructive ops (git reset --hard / push --force / rm -rf / drop table) 必须用户 explicit 确认
50
+ Destructive ops (git reset --hard / push --force / rm -rf / drop table) require explicit user confirmation
51
51
  enforcement: halt
52
52
  trigger: cmd.is_destructive == true
53
53
  check_method: heuristic
@@ -55,7 +55,7 @@ rules:
55
55
 
56
56
  - id: authorization-not-transitive
57
57
  description: |
58
- 用户 approve 一次 push ≠ 全程 approve;每个 destructive / shared-state 操作单独确认
58
+ A user approving one push ≠ approval for the whole session; each destructive / shared-state operation needs separate confirmation
59
59
  enforcement: warn
60
60
  trigger: cmd.requires_approval == true AND session.has_prior_approval == true
61
61
  check_method: heuristic
@@ -0,0 +1,79 @@
1
+ # workflows/disciplines/operational.yaml
2
+ # 操作纪律 — bundled discipline (biome preempt + commit safety +
3
+ # A7 ADR + no-skip-hooks + authorization-not-transitive + destructive-ops-explicit)
4
+ # Phase v3.0-3.3 W0.4 ship per D-09
5
+ # Snapshot of CLAUDE.md as of v3.0 ship date (K7 mitigation, verbatim)
6
+
7
+ schema_version: harnessed.discipline.v1
8
+ discipline: operational
9
+ enforcement_layer: commit
10
+ auto_enforce: true
11
+
12
+ rules:
13
+ - id: biome-preempt
14
+ description: |
15
+ TS/JS commit 前必跑 `pnpm exec biome check --write` (3 CI-red recurrences Phase 2.1.1/2.2/2.3 project memory)
16
+ enforcement: auto-fix
17
+ trigger: |
18
+ phase.type == 'commit' AND
19
+ changed_files matches '\\.(ts|tsx|js|mjs)$'
20
+ check_method: external-cmd
21
+ auto_fix_cmd: 'corepack pnpm exec biome check --write'
22
+ # NEW src/discipline/enforcement/before-commit.ts hook; exit 0 才允许 commit
23
+
24
+ - id: a7-adr-conservation
25
+ description: |
26
+ 新 ADR 不动旧 ADR main body,baseline tag iterate,CI A7 step 守恒
27
+ (sister Phase 1.3-2.6 ADR errata 路径)
28
+ enforcement: warn
29
+ trigger: phase.type == 'commit' AND changed_files contains 'docs/adr/'
30
+ check_method: external-cmd
31
+ auto_fix_cmd: 'scripts/check-adr-conservation.sh'
32
+
33
+ - id: no-push-without-approval
34
+ description: |
35
+ NEVER push to remote without user explicit approval (project CLAUDE.md commit safety)
36
+ enforcement: halt
37
+ trigger: cmd.type == 'git-push'
38
+ check_method: external-cmd
39
+ # ralph-loop / subagent 自动调 git push → halt;user explicit `git push` 在主 session 允许
40
+
41
+ - id: no-skip-hooks
42
+ description: |
43
+ 不允许 --no-verify / --no-gpg-sign 等 skip hook flag,除非用户明确要求
44
+ enforcement: halt
45
+ trigger: cmd.type == 'git-commit' AND args contains '--no-verify'
46
+ check_method: regex
47
+
48
+ - id: destructive-ops-explicit
49
+ description: |
50
+ Destructive ops (git reset --hard / push --force / rm -rf / drop table) 必须用户 explicit 确认
51
+ enforcement: halt
52
+ trigger: cmd.is_destructive == true
53
+ check_method: heuristic
54
+ # heuristic — 命令含 'rm -rf' / 'reset --hard' / '--force' / 'DROP TABLE' / 'delete from'
55
+
56
+ - id: authorization-not-transitive
57
+ description: |
58
+ 用户 approve 一次 push ≠ 全程 approve;每个 destructive / shared-state 操作单独确认
59
+ enforcement: warn
60
+ trigger: cmd.requires_approval == true AND session.has_prior_approval == true
61
+ check_method: heuristic
62
+
63
+ # v3.6.0 Phase 3 — transparent-skip discipline (P0b 下半,Audit § fallback
64
+ # 三条铁律 "拿不准 → 倾向跳过 + 透明声明"). prompt-inject method delivered
65
+ # via src/workflow/run.ts TRANSPARENT_SKIP_RULES const appended to
66
+ # criticalSystemReminder_EXPERIMENTAL alongside ESCALATION_RULES (v3.5.0
67
+ # Phase 2 sister). Spawned subagent reads the rule + emits the verbatim
68
+ # skip message when gate context is ambiguous instead of silent execution.
69
+ - id: transparent-skip-on-low-confidence
70
+ description: |
71
+ When a phase gate condition cannot be confidently evaluated (e.g.
72
+ expected context fields missing, default-valued, or contradictory),
73
+ prefer skip + transparent explanation over silent execution.
74
+ Verbatim format: "这次跳过了 <phase>, 因为 <reason>. 如果你认为
75
+ 需要请明说" / English: "Skipped <phase> because <reason>. Tell me
76
+ if you actually need it."
77
+ enforcement: warn
78
+ trigger: gate_evaluation_low_confidence
79
+ check_method: prompt-inject
@@ -10,7 +10,7 @@ auto_enforce: true
10
10
 
11
11
  rules:
12
12
  - id: bluf-conclusion-first
13
- description: 结论先行 (BLUF),每段先一句给答案/判断/推荐,再展开理由
13
+ description: Conclusion first (BLUF); each paragraph leads with one sentence giving the answer/judgment/recommendation, then expands the reasoning
14
14
  enforcement: warn
15
15
  trigger: always-on
16
16
  check_method: heuristic
@@ -18,7 +18,7 @@ rules:
18
18
  # 失败 → warn 'BLUF missing: first sentence is not a conclusion'
19
19
 
20
20
  - id: no-sycophantic-open-close
21
- description: 删除"好问题/太棒了/完美/希望对你有帮助/还需要别的吗"等开场闭合套话
21
+ description: Remove opening/closing filler phrases like "good question / awesome / perfect / hope this helps / anything else"
22
22
  enforcement: auto-fix
23
23
  trigger: always-on
24
24
  check_method: regex
@@ -26,14 +26,14 @@ rules:
26
26
  # NEW src/discipline/enforcement/strip-sycophantic.ts — regex strip 13 known phrase
27
27
 
28
28
  - id: no-emoji-unless-requested
29
- description: 禁用 emoji,除非用户明确要求 (项目 markdown 文件如 README/PR/CHANGELOG 不约束)
29
+ description: No emoji unless the user explicitly requests it (project markdown files such as README/PR/CHANGELOG are not constrained)
30
30
  enforcement: warn
31
31
  trigger: response.target == 'chat' AND user.requested_emoji == false
32
32
  check_method: regex
33
33
  # regex /\p{Emoji_Presentation}/u; 命中 + trigger fires → warn
34
34
 
35
35
  - id: no-em-dash
36
- description: 禁用 em-dash (—— / —);替代:补充用括号/冒号,并列用顿号,转折单独成句
36
+ description: No em-dash (—— / —); instead use parentheses or colons for asides, commas for lists, and a separate sentence for contrast
37
37
  enforcement: auto-fix
38
38
  trigger: response.target == 'chat'
39
39
  check_method: regex
@@ -41,13 +41,13 @@ rules:
41
41
  # auto-replace '——' → ', ' (单段内逗号);'—' → ':' OR ','
42
42
 
43
43
  - id: precise-quantifier
44
- description: 量词精确,能给具体数字/文件名/行号/commit hash 就不用"一些/几个/多个"
44
+ description: Precise quantifiers; when a concrete number/filename/line number/commit hash is available, do not say "some/a few/several"
45
45
  enforcement: info
46
46
  trigger: always-on
47
47
  check_method: llm-judge
48
48
 
49
49
  - id: no-end-recap
50
- description: 不做结尾总结,除非用户明确要求"汇总/recap"
50
+ description: No closing summary unless the user explicitly asks to "summarize/recap"
51
51
  enforcement: warn
52
52
  trigger: response.target == 'chat'
53
53
  check_method: heuristic
@@ -55,7 +55,7 @@ rules:
55
55
  # → warn 'redundant end recap'
56
56
 
57
57
  - id: no-empty-continuation-question
58
- description: 禁空洞续作询问 (要不要我帮你 X?/还需要别的吗?);保留工作流必要下一步指引
58
+ description: No empty continuation questions ("want me to help you X?" / "anything else?"); keep workflow-necessary next-step guidance
59
59
  enforcement: warn
60
60
  trigger: response.target == 'chat'
61
61
  check_method: regex
@@ -0,0 +1,62 @@
1
+ # workflows/disciplines/output-style.yaml
2
+ # 对话回答风格 — bundled discipline (BLUF + no-sycophantic + no-emoji + no-em-dash + 量词精确 + no-end-recap + no-empty-continuation-question)
3
+ # Phase v3.0-3.3 W0.4 ship per D-09
4
+ # Snapshot of CLAUDE.md as of v3.0 ship date (K7 mitigation, verbatim)
5
+
6
+ schema_version: harnessed.discipline.v1
7
+ discipline: output-style
8
+ enforcement_layer: output
9
+ auto_enforce: true
10
+
11
+ rules:
12
+ - id: bluf-conclusion-first
13
+ description: 结论先行 (BLUF),每段先一句给答案/判断/推荐,再展开理由
14
+ enforcement: warn
15
+ trigger: always-on
16
+ check_method: heuristic
17
+ # heuristic — 第一句长度 ≤ 100 char + 含答案动词 ('是' / '不是' / '推荐' / '应该' / 'use X')
18
+ # 失败 → warn 'BLUF missing: first sentence is not a conclusion'
19
+
20
+ - id: no-sycophantic-open-close
21
+ description: 删除"好问题/太棒了/完美/希望对你有帮助/还需要别的吗"等开场闭合套话
22
+ enforcement: auto-fix
23
+ trigger: always-on
24
+ check_method: regex
25
+ auto_fix_cmd: 'strip-sycophantic'
26
+ # NEW src/discipline/enforcement/strip-sycophantic.ts — regex strip 13 known phrase
27
+
28
+ - id: no-emoji-unless-requested
29
+ description: 禁用 emoji,除非用户明确要求 (项目 markdown 文件如 README/PR/CHANGELOG 不约束)
30
+ enforcement: warn
31
+ trigger: response.target == 'chat' AND user.requested_emoji == false
32
+ check_method: regex
33
+ # regex /\p{Emoji_Presentation}/u; 命中 + trigger fires → warn
34
+
35
+ - id: no-em-dash
36
+ description: 禁用 em-dash (—— / —);替代:补充用括号/冒号,并列用顿号,转折单独成句
37
+ enforcement: auto-fix
38
+ trigger: response.target == 'chat'
39
+ check_method: regex
40
+ auto_fix_cmd: 'replace-em-dash'
41
+ # auto-replace '——' → ', ' (单段内逗号);'—' → ':' OR ','
42
+
43
+ - id: precise-quantifier
44
+ description: 量词精确,能给具体数字/文件名/行号/commit hash 就不用"一些/几个/多个"
45
+ enforcement: info
46
+ trigger: always-on
47
+ check_method: llm-judge
48
+
49
+ - id: no-end-recap
50
+ description: 不做结尾总结,除非用户明确要求"汇总/recap"
51
+ enforcement: warn
52
+ trigger: response.target == 'chat'
53
+ check_method: heuristic
54
+ # heuristic — 末尾 200 char 含 '## 总结' / '## Summary' / 'In summary' / '综上所述'
55
+ # → warn 'redundant end recap'
56
+
57
+ - id: no-empty-continuation-question
58
+ description: 禁空洞续作询问 (要不要我帮你 X?/还需要别的吗?);保留工作流必要下一步指引
59
+ enforcement: warn
60
+ trigger: response.target == 'chat'
61
+ check_method: regex
62
+ # regex /要不要|还需要别的|希望对你有帮助/ + trigger fires → warn
@@ -20,8 +20,8 @@ priority_hierarchy:
20
20
  rules:
21
21
  - id: multi-capability-arbitration
22
22
  description: |
23
- capability fires_when 同时 true → priority_hierarchy order 选最高
24
- e.g., gstack /office-hours + GSD /gsd-discuss-phase fire → gstack 先跑
23
+ Multiple capabilities fires_when true at once pick the highest by priority_hierarchy order
24
+ e.g., gstack /office-hours + GSD /gsd-discuss-phase fire together → gstack runs first
25
25
  enforcement: warn
26
26
  trigger: capabilities.fired_count > 1
27
27
  check_method: heuristic
@@ -0,0 +1,28 @@
1
+ # workflows/disciplines/priority.yaml
2
+ # 优先级仲裁 — bundled discipline (7-tier hierarchy: gstack > gsd > superpowers > planning-with-files > karpathy > mattpocock > parallel)
3
+ # Phase v3.0-3.3 W0.4 ship per D-09
4
+ # Snapshot of CLAUDE.md as of v3.0 ship date (K7 mitigation, verbatim)
5
+
6
+ schema_version: harnessed.discipline.v1
7
+ discipline: priority
8
+ enforcement_layer: workflow
9
+ auto_enforce: true
10
+
11
+ priority_hierarchy:
12
+ - gstack # 决策层 最高优先
13
+ - gsd # 整体 orchestration
14
+ - superpowers # 子任务执行质量
15
+ - planning-with-files # 计划持久化
16
+ - karpathy # 编码行为
17
+ - mattpocock # 招式 by-demand
18
+ - parallel # subagent / Agent Teams / ralph-loop 执行机制
19
+
20
+ rules:
21
+ - id: multi-capability-arbitration
22
+ description: |
23
+ 多 capability fires_when 同时 true → 按 priority_hierarchy order 选最高
24
+ e.g., gstack /office-hours + GSD /gsd-discuss-phase 同 fire → gstack 先跑
25
+ enforcement: warn
26
+ trigger: capabilities.fired_count > 1
27
+ check_method: heuristic
28
+ # NEW src/discipline/enforcement/before-spawn.ts hook — sort fired capabilities by tier rank
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: discuss
3
+ description: |
4
+ Stage ① Discuss 主控编排器 — 3 个子工作流并行门控评估(chain-isolation 铁律)。
5
+ 战略层 / Phase 层 / 子任务层独立判断 gate, 可能 3 个全跑 / 1-2 个 / 全跳 + 透明声明。
6
+ schema_version: harnessed.workflow.v3 with delegates_to (3 sub: strategic + phase + subtask, mode parallel)
7
+ + disciplines_applied (6 default) + tools_available (planning-with-files)。
8
+ Triggered by slash command `/discuss`
9
+ (bare per ADR 0030 namespace policy D-02 LOCK) after `harnessed setup`.
10
+ trigger_phrases:
11
+ - "discuss"
12
+ - "讨论澄清"
13
+ - "新功能澄清"
14
+ - "stage 1 discuss"
15
+ - "三层澄清"
16
+ ---
17
+
18
+ # discuss 主控编排器 (v3)
19
+
20
+ ## 概述
21
+
22
+ 4-stage cadence Stage ① 主控编排器,委托给 3 个独立子工作流
23
+ (打包三层独立澄清:战略层 / phase 层 / 子任务层):
24
+
25
+ | 子工作流 | gate ref | mode | 触发时机 |
26
+ | --- | -------- | ---- | ---------- |
27
+ | `strategic` | `judgments.stage-routing.discuss-strategic-delegate.fires` | parallel | new_project / new_milestone / new_feature / is_major_release |
28
+ | `phase` | `judgments.stage-routing.discuss-phase-delegate.fires` | parallel | open_decisions ≥ 2 / cross_phase_data_flow / scope_days > 1 |
29
+ | `subtask` | `judgments.stage-routing.discuss-subtask-delegate.fires` | parallel | approaches ≥ 2 / core_algorithm / has_api_contract / error_cost=high |
30
+
31
+ 引擎运行时通过 `runMasterOrchestrator` 以
32
+ T3.5.W0.1(sister sub-workflow `runWorkflow` SDK pattern,并行 fan-out 通过
33
+ subagent 默认方式 — Path A `query()` 并行 OR Path B sub-shell 兜底,per
34
+ T3.5.W2.1 dogfood cycle decision LOCK)生成 3 个子工作流阶段。
35
+
36
+ ## Chain-isolation 铁律(sister CLAUDE.md "Fallback 三条铁律")
37
+
38
+ - 拿不准 → 倾向跳过, 但在响应里**透明声明**: "这次跳过了 X, 因为 Y。如果你认为需要请明说"
39
+ - 用户明示 → 覆盖判据 (用户说 "先 brainstorm" / "跑 office-hours" / "讨论一下" 时无条件激活)
40
+ - **链式互不前置**: 跳过战略层 ≠ 必须跳过 phase 层; 每层独立判断 (防止 "上层没跑下层不敢跑" 的死板)
41
+
42
+ ## 能力引用
43
+
44
+ Sister `workflows/capabilities.yaml`:
45
+ - `planning-with-files` — Bucket 4 核心能力(impl: claude-code-plugin, cmd: /plan,discuss 汇入 findings.md)
46
+ - sub `strategic` upstream → `gstack-office-hours` + `gstack-plan-ceo-review`
47
+ - sub `phase` upstream → `gsd-discuss-phase`
48
+ - sub `subtask` upstream → `superpowers-brainstorming` + `grill-with-docs` + `grill-me`
49
+
50
+ ## 调用方式
51
+
52
+ - Slash command: `/discuss <text>`(bare per ADR 0030 namespace policy D-02 LOCK,`harnessed setup` 后可用)
53
+
54
+ ## 如何调用
55
+
56
+ 使用 Bash 工具运行:
57
+
58
+ ```bash
59
+ echo "$ARGUMENTS" | harnessed run discuss --task-stdin
60
+ ```
61
+
62
+ 若 `$ARGUMENTS` 为空,运行 `harnessed run discuss`(不带 stdin pipe)。
63
+
64
+ 执行完成后,Bash 输出会在 stderr 打印 `Next:` 提示,建议下一个阶段。请根据对话上下文决定是否调用——该提示仅供参考,非强制指令。
65
+
66
+ <!-- harnessed-generated:v3.4.4 -->
67
+
68
+ ## 参考资料
69
+
70
+ - D-01 主控编排器委托模式
71
+ - D-02 bare slash cmd 约定(ADR 0030 namespace policy LOCK)
72
+ - D-04 Stage ① Discuss 三层独立判
73
+ - workflows/judgments/stage-routing.yaml — discuss-{strategic,phase,subtask}-delegate triggers
74
+ - workflows/discuss/{strategic,phase,subtask}/workflow.yaml — 3 个子工作流 Phase 3.4 已发布
75
+ - workflows/judgments/fallback.yaml — 链式互不前置 chain-isolation 铁律
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: discuss-phase
3
+ description: |
4
+ Stage ①.b Phase 层 discuss 子工作流 — GSD /gsd-discuss-phase 灰色澄清(≥2 个开放
5
+ 实现决策 / 跨 phase API contract 不清 / phase scope > 1 天 / 灰色地带)。
6
+ schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
7
+ (gsd-discuss-phase + planning-with-files) + 2 phases(01-gsd-discuss + 02-persist findings.md
8
+ + knowledge.md)。Triggered by harnessed CLI `harnessed discuss-phase --phase <num>` or slash
9
+ command `/discuss-phase` after `harnessed setup`.
10
+ trigger_phrases:
11
+ - "discuss phase"
12
+ - "phase 层澄清"
13
+ - "gsd discuss phase"
14
+ - "灰色地带澄清"
15
+ - "跑 discuss-phase"
16
+ ---
17
+
18
+ # discuss-phase 工作流 (v3)
19
+
20
+ ## 概述
21
+
22
+ 2 阶段子工作流,将 CLAUDE.md "Stage ①.b Phase 层 — GSD /gsd-discuss-phase 灰色澄清"
23
+ 映射到 harnessed 运行时(Phase v3.0-3.4 W0.2 — D-04 Stage ① Discuss 三层 + Pattern A
24
+ 子工作流发布)。
25
+
26
+ | 阶段 | id | upstream | model | 能力 / 调用 | 门控 / 产物 |
27
+ | ----- | -- | -------- | ----- | -------------------- | ---------------- |
28
+ | 1 | `01-gsd-discuss` | gsd | sonnet | `{{ capabilities.gsd-discuss-phase.cmd }}` | `gate: judgments.phase-gate.gsd-discuss-phase.fires` |
29
+ | 2 | `02-persist` | planning-with-files | haiku | `{{ capabilities.planning-with-files.cmd }}` + `invokes: /plan` | `artifacts_expected: [findings.md, knowledge.md]` |
30
+
31
+ ## 能力引用
32
+
33
+ Sister `workflows/capabilities.yaml` 条目:
34
+ - `gsd-discuss-phase` — Bucket 2(impl: gsd, cmd: /gsd-discuss-phase)
35
+ - `planning-with-files` — Bucket 4(impl: claude-code-plugin, cmd: /plan)
36
+
37
+ ## 门控引用
38
+
39
+ Sister `workflows/judgments/phase-gate.yaml`:
40
+ - `gsd-discuss-phase.fires` — `phase.open_decisions >= 2 or phase.has_cross_phase_data_flow == true or phase.scope_days > 1`
41
+
42
+ ## 调用方式
43
+
44
+ - Slash command: `/discuss-phase <num>`(`harnessed setup` 后可用)
45
+
46
+ ## 路由规则
47
+
48
+ 跳过条件(sister CLAUDE.md "Phase 层 ❌ 跳过"):
49
+ - 单一明确子任务
50
+ - 跟前 phase 同 module 同 pattern
51
+ - < 1 天工作量
52
+ - bug 修复且已有最小复现
53
+
54
+ ## 如何调用
55
+
56
+ 使用 Bash 工具运行:
57
+
58
+ ```bash
59
+ echo "$ARGUMENTS" | harnessed run discuss-phase --task-stdin
60
+ ```
61
+
62
+ 若 `$ARGUMENTS` 为空,运行 `harnessed run discuss-phase`(不带 stdin pipe)。
63
+
64
+ 执行完成后,Bash 输出会在 stderr 打印 `Next:` 提示,建议下一个阶段。请根据对话上下文决定是否调用——该提示仅供参考,非强制指令。
65
+
66
+ <!-- harnessed-generated:v3.4.4 -->
67
+
68
+ ## 参考资料
69
+
70
+ - D-04 Stage ① Discuss 三层(战略层 / phase 层 / 子任务层)
71
+ - workflows/capabilities.yaml — gsd-discuss-phase / planning-with-files
72
+ - workflows/judgments/phase-gate.yaml — gsd-discuss-phase trigger
73
+ - workflows/defaults.yaml — ralph_max_iterations.discuss-phase.* values (W2.2 backfill)
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: discuss-strategic
3
+ description: |
4
+ Stage ①.a 战略层 discuss 子工作流 — gstack /office-hours + /plan-ceo-review 新功能 / 新
5
+ milestone / 新产品方向启动前强制治理关卡(打包 gstack governance gate,新功能前必跑)。
6
+ schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
7
+ (gstack-office-hours + gstack-plan-ceo-review + planning-with-files) + 3 phases(gate
8
+ judgments.strategic-gate.* fires + planning-with-files /plan findings.md 持久化)。
9
+ Triggered by slash command
10
+ `/discuss-strategic` after `harnessed setup`.
11
+ trigger_phrases:
12
+ - "discuss strategic"
13
+ - "战略层澄清"
14
+ - "office hours"
15
+ - "新功能启动"
16
+ - "跑 discuss-strategic"
17
+ ---
18
+
19
+ # discuss-strategic 工作流 (v3)
20
+
21
+ ## 概述
22
+
23
+ 3 阶段子工作流,将 CLAUDE.md "Stage ①.a 战略层 — 新功能启动前强制 🔒"
24
+ 映射到 harnessed 运行时(Phase v3.0-3.4 W0.1 — D-04 Stage ① Discuss 三层 + D-12 gstack
25
+ 治理关卡 + Pattern A 子工作流发布)。
26
+
27
+ | 阶段 | id | upstream | model | 能力 / 调用 | 门控 / 产物 |
28
+ | ----- | -- | -------- | ----- | -------------------- | ---------------- |
29
+ | 1 | `01-office-hours` | gstack | opus | `{{ capabilities.gstack-office-hours.cmd }}` | `gate: judgments.strategic-gate.office-hours.fires` |
30
+ | 2 | `02-plan-ceo-review` | gstack | opus | `{{ capabilities.gstack-plan-ceo-review.cmd }}` | `gate: judgments.strategic-gate.plan-ceo-review.fires` |
31
+ | 3 | `03-persist` | planning-with-files | haiku | `{{ capabilities.planning-with-files.cmd }}` + `invokes: /plan` | `artifacts_expected: [findings.md]` |
32
+
33
+ ## 能力引用
34
+
35
+ Sister `workflows/capabilities.yaml` 条目:
36
+ - `gstack-office-hours` — Bucket 3 治理关卡(impl: gstack, cmd: /office-hours)
37
+ - `gstack-plan-ceo-review` — Bucket 3 治理关卡(impl: gstack, cmd: /plan-ceo-review)
38
+ - `planning-with-files` — Bucket 4 核心能力(impl: claude-code-plugin, cmd: /plan)
39
+
40
+ ## 门控引用
41
+
42
+ Sister `workflows/judgments/strategic-gate.yaml`:
43
+ - `office-hours.fires` — `phase.type in ['new_project', 'new_milestone', 'new_feature']`
44
+ - `plan-ceo-review.fires` — `phase.type == 'new_project' or phase.is_major_release == true`
45
+
46
+ ## 调用方式
47
+
48
+ - Slash command: `/discuss-strategic <text>`(`harnessed setup` 后可用)
49
+
50
+ ## 路由规则
51
+
52
+ 跳过条件(sister CLAUDE.md "战略层 ❌ 跳过"):
53
+ - bug 修复 / 技术债 / 实现细节
54
+ - scope 已在历史 `.planning/` 或 design doc 定义
55
+ - continuing 已有 phase 的执行
56
+ - 用户已给明确 ticket / spec
57
+
58
+ ## 如何调用
59
+
60
+ 使用 Bash 工具运行:
61
+
62
+ ```bash
63
+ echo "$ARGUMENTS" | harnessed run discuss-strategic --task-stdin
64
+ ```
65
+
66
+ 若 `$ARGUMENTS` 为空,运行 `harnessed run discuss-strategic`(不带 stdin pipe)。
67
+
68
+ 执行完成后,Bash 输出会在 stderr 打印 `Next:` 提示,建议下一个阶段。请根据对话上下文决定是否调用——该提示仅供参考,非强制指令。
69
+
70
+ <!-- harnessed-generated:v3.4.4 -->
71
+
72
+ ## 参考资料
73
+
74
+ - D-04 Stage ① Discuss 三层(战略层 / phase 层 / 子任务层)
75
+ - D-12 gstack 治理关卡强制
76
+ - workflows/capabilities.yaml — gstack-office-hours / gstack-plan-ceo-review / planning-with-files
77
+ - workflows/judgments/strategic-gate.yaml — office-hours / plan-ceo-review triggers
78
+ - workflows/defaults.yaml — ralph_max_iterations.discuss-strategic.* values (W2.2 backfill)
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: discuss-subtask
3
+ description: |
4
+ Stage ①.c 子任务层 discuss 子工作流 — superpowers brainstorming(≥2 种方案 / 核心算法 /
5
+ API contract / 错误成本高)。schema_version: harnessed.workflow.v3 with disciplines_applied (6
6
+ default) + tools_available (superpowers-brainstorming + grill-with-docs + grill-me) + 1 phase
7
+ (01-brainstorm,含 spec_ambiguous + no_docs 条件调用 invokes_tools)。Triggered by
8
+ harnessed CLI `harnessed discuss-subtask --task <text>` or slash command `/discuss-subtask`
9
+ after `harnessed setup`.
10
+ trigger_phrases:
11
+ - "discuss subtask"
12
+ - "子任务澄清"
13
+ - "brainstorm"
14
+ - "多 approach 探索"
15
+ - "跑 discuss-subtask"
16
+ ---
17
+
18
+ # discuss-subtask 工作流 (v3)
19
+
20
+ ## 概述
21
+
22
+ 1 阶段子工作流,将 CLAUDE.md "Stage ①.c 子任务层 — superpowers brainstorming"
23
+ 映射到 harnessed 运行时(Phase v3.0-3.4 W0.3 — D-04 Stage ① Discuss 三层 + D-05
24
+ phase.invokes_tools 条件触发 + Pattern A 子工作流发布)。
25
+
26
+ | 阶段 | id | upstream | model | 能力 / invokes_tools | 门控 |
27
+ | ----- | -- | -------- | ----- | -------------------------- | ---- |
28
+ | 1 | `01-brainstorm` | superpowers | opus | `{{ capabilities.superpowers-brainstorming.cmd }}` + conditional `invokes_tools[grill-with-docs, grill-me]` | `gate: judgments.subtask-gate.brainstorming.fires` |
29
+
30
+ ## 能力引用
31
+
32
+ Sister `workflows/capabilities.yaml` 条目:
33
+ - `superpowers-brainstorming` — Bucket 4(impl: superpowers, cmd: superpowers:brainstorming)
34
+ - `grill-with-docs` — Bucket 1 mattpocock(impl: mattpocock-skills, cmd: /grill-with-docs)
35
+ - `grill-me` — Bucket 1 mattpocock(impl: mattpocock-skills, cmd: /grill-me)
36
+
37
+ ## 门控引用
38
+
39
+ Sister `workflows/judgments/subtask-gate.yaml`:
40
+ - `brainstorming.fires` — `subtask.approaches >= 2 or subtask.core_algorithm == true or subtask.has_api_contract == true or subtask.error_cost == 'high'`
41
+
42
+ ## 条件工具调用(D-05 invokes_tools)
43
+
44
+ - `phase.spec_ambiguous == true` → 触发 `grill-with-docs`
45
+ - `phase.spec_ambiguous == true AND phase.no_docs == true` → 触发 `grill-me`
46
+
47
+ ## 调用方式
48
+
49
+ - Slash command: `/discuss-subtask <text>`(`harnessed setup` 后可用)
50
+
51
+ ## 路由规则
52
+
53
+ 跳过条件(sister CLAUDE.md "子任务层 ❌ 跳过"):
54
+ - 常规 CRUD / 跟现有模式一致
55
+ - 单一明显实现(< 20 行 / 一个文件)
56
+ - 标准库直接调用
57
+ - bug 修复且已知根因
58
+
59
+ ## 如何调用
60
+
61
+ 使用 Bash 工具运行:
62
+
63
+ ```bash
64
+ echo "$ARGUMENTS" | harnessed run discuss-subtask --task-stdin
65
+ ```
66
+
67
+ 若 `$ARGUMENTS` 为空,运行 `harnessed run discuss-subtask`(不带 stdin pipe)。
68
+
69
+ 执行完成后,Bash 输出会在 stderr 打印 `Next:` 提示,建议下一个阶段。请根据对话上下文决定是否调用——该提示仅供参考,非强制指令。
70
+
71
+ <!-- harnessed-generated:v3.4.4 -->
72
+
73
+ ## 参考资料
74
+
75
+ - D-04 Stage ① Discuss 三层(战略层 / phase 层 / 子任务层)
76
+ - D-05 phase.invokes_tools 条件触发(NEW v3)
77
+ - workflows/capabilities.yaml — superpowers-brainstorming / grill-with-docs / grill-me
78
+ - workflows/judgments/subtask-gate.yaml — brainstorming trigger
79
+ - workflows/defaults.yaml — ralph_max_iterations.discuss-subtask.* values (W2.2 backfill)
@@ -0,0 +1,74 @@
1
+ ---
2
+ name: plan-architecture
3
+ description: |
4
+ Stage ②.a 架构层 plan 子工作流 — gstack /plan-eng-review(复杂架构强制治理关卡;
5
+ 打包的 plan-stage 节奏:复杂架构阶段前必须执行)。schema_version:
6
+ harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
7
+ [plan-eng-review] + 1 phase (01-plan-eng-review) + gate literal expr
8
+ `phase.is_complex_architecture == true`。Triggered by harnessed CLI `harnessed
9
+ plan-architecture --module <name>` or slash command `/plan-architecture` after
10
+ `harnessed setup`.
11
+ trigger_phrases:
12
+ - "plan architecture"
13
+ - "架构审查"
14
+ - "plan eng review"
15
+ - "复杂架构"
16
+ - "跑 plan-architecture"
17
+ ---
18
+
19
+ # plan-architecture 工作流 (v3)
20
+
21
+ ## 概述
22
+
23
+ 1 阶段子工作流,将 CLAUDE.md "⚠️ 复杂架构前 — plan-eng-review" 映射到 harnessed
24
+ 运行时(Phase v3.0-3.4 W0.4 — D-04 Stage ② Plan 二层 + D-12 gstack 治理关卡 + Pattern A
25
+ sub-workflow ship)。
26
+
27
+ | phase | id | upstream | model | capability | gate |
28
+ | ----- | -- | -------- | ----- | ---------- | ---- |
29
+ | 1 | `01-plan-eng-review` | gstack | opus | `{{ capabilities.plan-eng-review.cmd }}` | `gate: phase.is_complex_architecture == true` (literal expr) |
30
+
31
+ ## 能力引用
32
+
33
+ Sister `workflows/capabilities.yaml` 条目:
34
+ - `plan-eng-review` — Bucket 7 gstack 33 optional (impl: gstack, cmd: /plan-eng-review)
35
+ - Pattern A E.2 LOCK:无 `gstack-` 前缀,遵循 CLAUDE.md gstack skill 路由约定
36
+
37
+ ## 门控引用
38
+
39
+ 内联 literal expr `phase.is_complex_architecture == true` — sister capability
40
+ `fires_when` 子句原文。W2.2 backfill 可加 `judgments/phase-gate.yaml`
41
+ trigger `is-complex-architecture` 重构 ref。
42
+
43
+ ## 调用方式
44
+
45
+ - Slash command:`/plan-architecture <name>`(`harnessed setup` 后生效)
46
+
47
+ ## 路由规则
48
+
49
+ 触发条件(sister CLAUDE.md "⚠️ 复杂架构前"):
50
+ - 涉及多模块跨界设计(≥3 模块协同)
51
+ - 新引入核心抽象(新 framework / 新数据模型 / 新协议)
52
+ - 性能 / scaling 关键路径
53
+ - 引入显著技术债 / migration 风险
54
+
55
+ ## 如何调用
56
+
57
+ 使用 Bash 工具运行:
58
+
59
+ ```bash
60
+ echo "$ARGUMENTS" | harnessed run plan-architecture --task-stdin
61
+ ```
62
+
63
+ 若 `$ARGUMENTS` 为空,运行 `harnessed run plan-architecture`(不带 stdin pipe)。
64
+
65
+ 完成后,Bash 输出会在 stderr 打印 `Next:` 提示,建议下一阶段。是否调用由对话上下文决定——该提示仅供参考,非强制指令。
66
+
67
+ <!-- harnessed-generated:v3.4.4 -->
68
+
69
+ ## 参考文档
70
+
71
+ - D-04 Stage ② Plan 二层(架构 / 计划)
72
+ - D-12 gstack 治理关卡(复杂架构强制)
73
+ - workflows/capabilities.yaml — plan-eng-review (Bucket 7)
74
+ - workflows/defaults.yaml — ralph_max_iterations.plan-architecture.* values (W2.2 backfill)