harnessed 3.4.2 → 3.4.4

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 (35) hide show
  1. package/README.md +3 -0
  2. package/dist/cli.mjs +1218 -733
  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/package.json +1 -1
  7. package/workflows/auto/SKILL.md +15 -0
  8. package/workflows/capabilities.yaml +1 -1
  9. package/workflows/discuss/auto/SKILL.md +15 -2
  10. package/workflows/discuss/phase/SKILL.md +10 -8
  11. package/workflows/discuss/strategic/SKILL.md +11 -9
  12. package/workflows/discuss/subtask/SKILL.md +10 -8
  13. package/workflows/execute-task/SKILL.md +7 -6
  14. package/workflows/execute-task/workflow.yaml +93 -0
  15. package/workflows/plan/architecture/SKILL.md +10 -8
  16. package/workflows/plan/auto/SKILL.md +15 -2
  17. package/workflows/plan/phase/SKILL.md +10 -8
  18. package/workflows/research/SKILL.md +44 -2
  19. package/workflows/retro/SKILL.md +7 -14
  20. package/workflows/role-prompts.yaml +477 -0
  21. package/workflows/task/auto/SKILL.md +15 -2
  22. package/workflows/task/clarify/SKILL.md +7 -20
  23. package/workflows/task/code/SKILL.md +7 -20
  24. package/workflows/task/deliver/SKILL.md +8 -21
  25. package/workflows/task/test/SKILL.md +7 -20
  26. package/workflows/verify/auto/SKILL.md +14 -1
  27. package/workflows/verify/code-review/SKILL.md +8 -15
  28. package/workflows/verify/design/SKILL.md +7 -14
  29. package/workflows/verify/multispec/SKILL.md +8 -15
  30. package/workflows/verify/paranoid/SKILL.md +8 -15
  31. package/workflows/verify/progress/SKILL.md +7 -14
  32. package/workflows/verify/qa/SKILL.md +8 -15
  33. package/workflows/verify/security/SKILL.md +8 -15
  34. package/workflows/verify/simplify/SKILL.md +8 -15
  35. package/workflows/execute-task/phases.yaml +0 -73
@@ -63,32 +63,19 @@ Phase 01-test 条件性 fire `diagnose` (capabilities.yaml L55-64 mattpocock-ski
63
63
  test fail 时进入 diagnose loop (reproduce → minimise → hypothesise → instrument →
64
64
  fix → regression-test), 测试通过则 skip diagnose entirely。
65
65
 
66
- ## CLI invocation
66
+ ## How to invoke
67
67
 
68
- ```bash
69
- # Dry-run preview — arbitrate-only, never spawns SDK.
70
- harnessed task-test --task "<text>" --dry-run --non-interactive
68
+ Use the Bash tool to run:
71
69
 
72
- # Apply path — real SDK spawn + 1-phase (TDD gate evaluation conditional).
73
- harnessed task-test --task "<text>" --apply
70
+ ```bash
71
+ echo "$ARGUMENTS" | harnessed run task-test --task-stdin
74
72
  ```
75
73
 
76
- ## Forward-looking note
77
-
78
- The `trigger_phrases:` frontmatter is active after `harnessed setup` copies this
79
- SKILL.md to `~/.claude/skills/task-test/` — Claude Code then loads the slash
80
- command `/task-test` automatically (Gap B fix — sister v1.0.2 mechanism).
81
-
82
- ## How to invoke
74
+ If `$ARGUMENTS` is empty, run `harnessed run task-test` (no stdin pipe).
83
75
 
84
- Use the SlashCommand tool to run: `{{ capabilities.tdd.cmd }}`
76
+ After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
85
77
 
86
- (If a `⚠️ ... not installed` warning was printed by `harnessed setup`, the backing
87
- capability is missing on disk. Install it (`claude plugin install <name>` for
88
- plugins, or follow the official install instructions for user-skills — e.g. for
89
- gstack: `git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack` then
90
- `cd ~/.claude/skills/gstack && ./setup`), then re-run `harnessed setup` to re-render
91
- this SKILL.md and clear the warning.)
78
+ <!-- harnessed-generated:v3.4.4 -->
92
79
 
93
80
  ## References
94
81
 
@@ -62,9 +62,22 @@ Sister `workflows/capabilities.yaml`:
62
62
 
63
63
  ## Invocation
64
64
 
65
- - CLI: `harnessed verify --phase <num>`
66
65
  - Slash command: `/verify` (bare per ADR 0030 namespace policy D-02 LOCK after `harnessed setup`)
67
66
 
67
+ ## How to invoke
68
+
69
+ Use the Bash tool to run:
70
+
71
+ ```bash
72
+ echo "$ARGUMENTS" | harnessed run verify --task-stdin
73
+ ```
74
+
75
+ If `$ARGUMENTS` is empty, run `harnessed run verify` (no stdin pipe).
76
+
77
+ After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
78
+
79
+ <!-- harnessed-generated:v3.4.4 -->
80
+
68
81
  ## References
69
82
 
70
83
  - D-01 master orchestrator delegation pattern
@@ -6,7 +6,7 @@ description: |
6
6
  多 subagent fan-out, context 隔离, token 敏感)。
7
7
  schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
8
8
  (code-review) + 1 phase (parallelism ref judgments.parallelism-gate.subagent-default.fires)。
9
- Triggered by harnessed CLI `harnessed verify-code-review --phase <num>` or slash command
9
+ Triggered by slash command
10
10
  `/verify-code-review` after `harnessed setup`.
11
11
  trigger_phrases:
12
12
  - "verify code review"
@@ -48,26 +48,19 @@ Sister `workflows/judgments/parallelism-gate.yaml`:
48
48
  总 fire 当 `phase.stage == 'verify'` 后必跑串行 (verify-progress) 之后并行 fan-out。无 skip
49
49
  条件 — code-review 多 agent 是 verify-work 第 3 phase 默认 fan-out (sister CLAUDE.md verbatim)。
50
50
 
51
- ## CLI invocation
51
+ ## How to invoke
52
52
 
53
- ```bash
54
- # Dry-run preview — arbitrate-only, never spawns SDK.
55
- harnessed verify-code-review --phase <num> --dry-run --non-interactive
53
+ Use the Bash tool to run:
56
54
 
57
- # Apply path — real SDK spawn + parallel fan-out subagent.
58
- harnessed verify-code-review --phase <num> --apply
55
+ ```bash
56
+ echo "$ARGUMENTS" | harnessed run verify-code-review --task-stdin
59
57
  ```
60
58
 
61
- ## How to invoke
59
+ If `$ARGUMENTS` is empty, run `harnessed run verify-code-review` (no stdin pipe).
62
60
 
63
- Use the SlashCommand tool to run: `{{ capabilities.code-review.cmd }}`
61
+ After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
64
62
 
65
- (If a `⚠️ ... not installed` warning was printed by `harnessed setup`, the backing
66
- capability is missing on disk. Install it (`claude plugin install <name>` for
67
- plugins, or follow the official install instructions for user-skills — e.g. for
68
- gstack: `git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack` then
69
- `cd ~/.claude/skills/gstack && ./setup`), then re-run `harnessed setup` to re-render
70
- this SKILL.md and clear the warning.)
63
+ <!-- harnessed-generated:v3.4.4 -->
71
64
 
72
65
  ## References
73
66
 
@@ -51,26 +51,19 @@ Sister `workflows/judgments/stage-routing.yaml`:
51
51
  - 创意补充 / 不要 AI 味 → `frontend-design`
52
52
  - 用户明示「独特 / 不要 AI 感」→ frontend-design 主导, 否则 ui-ux-pro-max 优先
53
53
 
54
- ## CLI invocation
54
+ ## How to invoke
55
55
 
56
- ```bash
57
- # Dry-run preview — arbitrate-only, never spawns SDK.
58
- harnessed verify-design --phase <num> --dry-run --non-interactive
56
+ Use the Bash tool to run:
59
57
 
60
- # Apply path — real SDK spawn (gate eval true 时).
61
- harnessed verify-design --phase <num> --apply
58
+ ```bash
59
+ echo "$ARGUMENTS" | harnessed run verify-design --task-stdin
62
60
  ```
63
61
 
64
- ## How to invoke
62
+ If `$ARGUMENTS` is empty, run `harnessed run verify-design` (no stdin pipe).
65
63
 
66
- Use the SlashCommand tool to run: `{{ capabilities.gstack-design-review.cmd }}`
64
+ After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
67
65
 
68
- (If a `⚠️ ... not installed` warning was printed by `harnessed setup`, the backing
69
- capability is missing on disk. Install it (`claude plugin install <name>` for
70
- plugins, or follow the official install instructions for user-skills — e.g. for
71
- gstack: `git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack` then
72
- `cd ~/.claude/skills/gstack && ./setup`), then re-run `harnessed setup` to re-render
73
- this SKILL.md and clear the warning.)
66
+ <!-- harnessed-generated:v3.4.4 -->
74
67
 
75
68
  ## References
76
69
 
@@ -8,7 +8,7 @@ description: |
8
8
  schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
9
9
  (agent-teams 3 + 4 specialist capability) + 2 phase (01-team-create on critical-release
10
10
  invoke / 02-team-cleanup mandatory shutdown)。
11
- Triggered by harnessed CLI `harnessed verify-multispec --phase <num>` or slash command
11
+ Triggered by slash command
12
12
  `/verify-multispec` after `harnessed setup`.
13
13
  trigger_phrases:
14
14
  - "verify multispec"
@@ -64,26 +64,19 @@ Phase-level `on` clause (critical-release 升级触发):
64
64
  - **Token 估算 prereq**: `team_cost < 2 × subagent_cost` (engine-level check per agent-teams.md L34)
65
65
  - **Cleanup mandatory**: phase 02-team-cleanup `agent-teams-shutdown` 必跑 (防呆清单)
66
66
 
67
- ## CLI invocation
67
+ ## How to invoke
68
68
 
69
- ```bash
70
- # Dry-run preview — arbitrate-only, never spawns SDK.
71
- harnessed verify-multispec --phase <num> --dry-run --non-interactive
69
+ Use the Bash tool to run:
72
70
 
73
- # Apply path — real SDK spawn + TeamCreate 4 specialist + 互相 SendMessage 质询 + 末尾 TeamDelete。
74
- harnessed verify-multispec --phase <num> --apply
71
+ ```bash
72
+ echo "$ARGUMENTS" | harnessed run verify-multispec --task-stdin
75
73
  ```
76
74
 
77
- ## How to invoke
75
+ If `$ARGUMENTS` is empty, run `harnessed run verify-multispec` (no stdin pipe).
78
76
 
79
- Use the SlashCommand tool to run: `{{ capabilities.agent-teams-create.cmd }}`
77
+ After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
80
78
 
81
- (If a `⚠️ ... not installed` warning was printed by `harnessed setup`, the backing
82
- capability is missing on disk. Install it (`claude plugin install <name>` for
83
- plugins, or follow the official install instructions for user-skills — e.g. for
84
- gstack: `git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack` then
85
- `cd ~/.claude/skills/gstack && ./setup`), then re-run `harnessed setup` to re-render
86
- this SKILL.md and clear the warning.)
79
+ <!-- harnessed-generated:v3.4.4 -->
87
80
 
88
81
  ## References
89
82
 
@@ -7,7 +7,7 @@ description: |
7
7
  默认 critical fire only; 非关键模块 skip (sister CLAUDE.md "关键模块" 限定语)。
8
8
  schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
9
9
  (gstack-review) + 1 phase (gate ref is_critical_module conditional)。
10
- Triggered by harnessed CLI `harnessed verify-paranoid --phase <num>` or slash command
10
+ Triggered by slash command
11
11
  `/verify-paranoid` after `harnessed setup`.
12
12
  trigger_phrases:
13
13
  - "verify paranoid"
@@ -50,26 +50,19 @@ Sister `workflows/judgments/stage-routing.yaml`:
50
50
  - ✅ **触发**: 关键模块 PR 前 (auth / payment / data migration / core algorithm 等)
51
51
  - ❌ **跳过**: 常规 PR / docs / config / 非核心 module
52
52
 
53
- ## CLI invocation
53
+ ## How to invoke
54
54
 
55
- ```bash
56
- # Dry-run preview — arbitrate-only, never spawns SDK.
57
- harnessed verify-paranoid --phase <num> --dry-run --non-interactive
55
+ Use the Bash tool to run:
58
56
 
59
- # Apply path — real SDK spawn (gate eval true 时).
60
- harnessed verify-paranoid --phase <num> --apply
57
+ ```bash
58
+ echo "$ARGUMENTS" | harnessed run verify-paranoid --task-stdin
61
59
  ```
62
60
 
63
- ## How to invoke
61
+ If `$ARGUMENTS` is empty, run `harnessed run verify-paranoid` (no stdin pipe).
64
62
 
65
- Use the SlashCommand tool to run: `{{ capabilities.gstack-review.cmd }}`
63
+ After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
66
64
 
67
- (If a `⚠️ ... not installed` warning was printed by `harnessed setup`, the backing
68
- capability is missing on disk. Install it (`claude plugin install <name>` for
69
- plugins, or follow the official install instructions for user-skills — e.g. for
70
- gstack: `git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack` then
71
- `cd ~/.claude/skills/gstack && ./setup`), then re-run `harnessed setup` to re-render
72
- this SKILL.md and clear the warning.)
65
+ <!-- harnessed-generated:v3.4.4 -->
73
66
 
74
67
  ## References
75
68
 
@@ -46,26 +46,19 @@ Sister `workflows/capabilities.yaml` entries:
46
46
  总 fire 当 `phase.stage == 'verify'` (sister `workflows/judgments/stage-routing.yaml`
47
47
  verify-progress-always trigger)。无 skip 条件 — verify-work 起点必跑。
48
48
 
49
- ## CLI invocation
49
+ ## How to invoke
50
50
 
51
- ```bash
52
- # Dry-run preview — arbitrate-only, never spawns SDK.
53
- harnessed verify-progress --phase <num> --dry-run --non-interactive
51
+ Use the Bash tool to run:
54
52
 
55
- # Apply path — real SDK spawn + 3-phase serial chain.
56
- harnessed verify-progress --phase <num> --apply
53
+ ```bash
54
+ echo "$ARGUMENTS" | harnessed run verify-progress --task-stdin
57
55
  ```
58
56
 
59
- ## How to invoke
57
+ If `$ARGUMENTS` is empty, run `harnessed run verify-progress` (no stdin pipe).
60
58
 
61
- Use the SlashCommand tool to run: `{{ capabilities.gsd-verify-work.cmd }}`
59
+ After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
62
60
 
63
- (If a `⚠️ ... not installed` warning was printed by `harnessed setup`, the backing
64
- capability is missing on disk. Install it (`claude plugin install <name>` for
65
- plugins, or follow the official install instructions for user-skills — e.g. for
66
- gstack: `git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack` then
67
- `cd ~/.claude/skills/gstack && ./setup`), then re-run `harnessed setup` to re-render
68
- this SKILL.md and clear the warning.)
61
+ <!-- harnessed-generated:v3.4.4 -->
69
62
 
70
63
  ## References
71
64
 
@@ -6,7 +6,7 @@ description: |
6
6
  schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
7
7
  (gstack-qa + playwright-cli + playwright-test + webapp-testing) + 1 phase (gate ref
8
8
  has_ui_changes conditional)。
9
- Triggered by harnessed CLI `harnessed verify-qa --phase <num>` or slash command
9
+ Triggered by slash command
10
10
  `/verify-qa` after `harnessed setup`.
11
11
  trigger_phrases:
12
12
  - "verify qa"
@@ -52,26 +52,19 @@ Sister `workflows/judgments/stage-routing.yaml`:
52
52
  - setup 需 Python 后端 (Tortoise ORM / pandas) → `webapp-testing` skill
53
53
  - 性能 / a11y / 内存诊断 → 不在此 sub-workflow,用 `chrome-devtools-mcp`
54
54
 
55
- ## CLI invocation
55
+ ## How to invoke
56
56
 
57
- ```bash
58
- # Dry-run preview — arbitrate-only, never spawns SDK.
59
- harnessed verify-qa --phase <num> --dry-run --non-interactive
57
+ Use the Bash tool to run:
60
58
 
61
- # Apply path — real SDK spawn (gate eval true 时).
62
- harnessed verify-qa --phase <num> --apply
59
+ ```bash
60
+ echo "$ARGUMENTS" | harnessed run verify-qa --task-stdin
63
61
  ```
64
62
 
65
- ## How to invoke
63
+ If `$ARGUMENTS` is empty, run `harnessed run verify-qa` (no stdin pipe).
66
64
 
67
- Use the SlashCommand tool to run: `{{ capabilities.gstack-qa.cmd }}`
65
+ After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
68
66
 
69
- (If a `⚠️ ... not installed` warning was printed by `harnessed setup`, the backing
70
- capability is missing on disk. Install it (`claude plugin install <name>` for
71
- plugins, or follow the official install instructions for user-skills — e.g. for
72
- gstack: `git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack` then
73
- `cd ~/.claude/skills/gstack && ./setup`), then re-run `harnessed setup` to re-render
74
- this SKILL.md and clear the warning.)
67
+ <!-- harnessed-generated:v3.4.4 -->
75
68
 
76
69
  ## References
77
70
 
@@ -5,7 +5,7 @@ description: |
5
5
  触发, 可选 conditional, sister ~/.claude/CLAUDE.md "Verify 阶段 — 可选 /cso" verbatim)。
6
6
  schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
7
7
  (gstack-cso) + 1 phase (gate ref has_auth_or_secrets conditional)。
8
- Triggered by harnessed CLI `harnessed verify-security --phase <num>` or slash command
8
+ Triggered by slash command
9
9
  `/verify-security` after `harnessed setup`.
10
10
  trigger_phrases:
11
11
  - "verify security"
@@ -47,26 +47,19 @@ Sister `workflows/judgments/stage-routing.yaml`:
47
47
  - ✅ **触发**: auth flow / session / credentials / API keys / SQL injection 路径 / OWASP top 10 area
48
48
  - ❌ **跳过**: docs / 纯 UI styling / 内部 refactor / non-security PR
49
49
 
50
- ## CLI invocation
50
+ ## How to invoke
51
51
 
52
- ```bash
53
- # Dry-run preview — arbitrate-only, never spawns SDK.
54
- harnessed verify-security --phase <num> --dry-run --non-interactive
52
+ Use the Bash tool to run:
55
53
 
56
- # Apply path — real SDK spawn (gate eval true 时).
57
- harnessed verify-security --phase <num> --apply
54
+ ```bash
55
+ echo "$ARGUMENTS" | harnessed run verify-security --task-stdin
58
56
  ```
59
57
 
60
- ## How to invoke
58
+ If `$ARGUMENTS` is empty, run `harnessed run verify-security` (no stdin pipe).
61
59
 
62
- Use the SlashCommand tool to run: `{{ capabilities.gstack-cso.cmd }}`
60
+ After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
63
61
 
64
- (If a `⚠️ ... not installed` warning was printed by `harnessed setup`, the backing
65
- capability is missing on disk. Install it (`claude plugin install <name>` for
66
- plugins, or follow the official install instructions for user-skills — e.g. for
67
- gstack: `git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack` then
68
- `cd ~/.claude/skills/gstack && ./setup`), then re-run `harnessed setup` to re-render
69
- this SKILL.md and clear the warning.)
62
+ <!-- harnessed-generated:v3.4.4 -->
70
63
 
71
64
  ## References
72
65
 
@@ -5,7 +5,7 @@ description: |
5
5
  sister ~/.claude/CLAUDE.md "Verify 阶段 — 末尾 code-simplifier" verbatim)。
6
6
  schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
7
7
  (code-simplifier) + 1 phase (gate ref is_final_step 末尾串行)。
8
- Triggered by harnessed CLI `harnessed verify-simplify --phase <num>` or slash command
8
+ Triggered by slash command
9
9
  `/verify-simplify` after `harnessed setup`.
10
10
  trigger_phrases:
11
11
  - "verify simplify"
@@ -47,26 +47,19 @@ Sister `workflows/judgments/stage-routing.yaml`:
47
47
  - ✅ **触发**: verify chain 末尾步骤 (所有其他 verify sub 已 ship, 准备 code 简化收尾)
48
48
  - ❌ **跳过**: verify chain 中间步骤 (避免过早简化干扰后续 review)
49
49
 
50
- ## CLI invocation
50
+ ## How to invoke
51
51
 
52
- ```bash
53
- # Dry-run preview — arbitrate-only, never spawns SDK.
54
- harnessed verify-simplify --phase <num> --dry-run --non-interactive
52
+ Use the Bash tool to run:
55
53
 
56
- # Apply path — real SDK spawn (gate eval true 时).
57
- harnessed verify-simplify --phase <num> --apply
54
+ ```bash
55
+ echo "$ARGUMENTS" | harnessed run verify-simplify --task-stdin
58
56
  ```
59
57
 
60
- ## How to invoke
58
+ If `$ARGUMENTS` is empty, run `harnessed run verify-simplify` (no stdin pipe).
61
59
 
62
- Use the SlashCommand tool to run: `{{ capabilities.code-simplifier.cmd }}`
60
+ After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
63
61
 
64
- (If a `⚠️ ... not installed` warning was printed by `harnessed setup`, the backing
65
- capability is missing on disk. Install it (`claude plugin install <name>` for
66
- plugins, or follow the official install instructions for user-skills — e.g. for
67
- gstack: `git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack` then
68
- `cd ~/.claude/skills/gstack && ./setup`), then re-run `harnessed setup` to re-render
69
- this SKILL.md and clear the warning.)
62
+ <!-- harnessed-generated:v3.4.4 -->
70
63
 
71
64
  ## References
72
65
 
@@ -1,73 +0,0 @@
1
- # workflows/execute-task/phases.yaml — Phase v2.0-2.4 W1.1 v2 schema upgrade
2
- # Sister v1 (28L, ADR 0011 errata Phase 2.2 W3 T3.3 ship) → v2 (~60L, T2.4.W1.1).
3
- #
4
- # v2 delta (per PLAN.md L327-330 verbatim + RESEARCH § 3.3 + D-09 + D-10 + D-13):
5
- # - schema_version: harnessed.workflow.v2 (sister Phase 2.2 schemaVersion 7 surface)
6
- # - 02-code: on[] mattpocock route by condition (tdd-gate / grill-with-docs / zoom-out)
7
- # - 03-test: on[] diagnose if test_fail
8
- # - 04-deliver: capability + args + gate + parallelism + on[] + fallback (R20.10 explicit halt)
9
- #
10
- # Per-phase model tier (ADR 0011 errata / intel CD-2 § 第 4 条) — unchanged from v1.
11
- # Default table sourced from `.planning/intel/omc-comparison.md` § CD-2 (phase 2.2 W3 T3.3).
12
- # Override via CLI: `--model-tier inherit` (B-10 escape hatch).
13
- #
14
- # capability template — '{{ capabilities.<name>.cmd }}' resolves at workflow runtime
15
- # (sister D-02 gstack_prefix interpolation pattern from workflows/plan-feature/workflow.yaml).
16
- # gate / parallelism — 4-level ref 'judgments.<file>.<gate>.fires' pre-resolves via
17
- # T2.3.W0.4 judgmentResolver BEFORE expr-eval (per src/workflow/schema/workflow.ts L18-19).
18
-
19
- schema_version: harnessed.workflow.v2
20
- workflow: execute-task
21
- description: 子任务执行 workflow — 4-phase 真接 ralph-loop SDK + tdd-gate conditional + mattpocock route by condition
22
- phases:
23
- - id: 01-clarify
24
- name: brainstorming
25
- upstream: superpowers brainstorming
26
- capability: '{{ capabilities.superpowers-brainstorming.cmd }}'
27
- model: opus
28
- max_iterations: '{{ defaults.ralph_max_iterations.execute-task.01-clarify }}'
29
- gate: judgments.subtask-gate.brainstorming.fires
30
-
31
- - id: 02-code
32
- name: code (karpathy 心法 always-on + mattpocock conditional route)
33
- upstream: karpathy
34
- model: sonnet
35
- max_iterations: '{{ defaults.ralph_max_iterations.execute-task.02-code }}'
36
- on:
37
- - if: 'judgments.tdd-gate.tdd-strongly-suggested.fires'
38
- invoke: '{{ capabilities.tdd.cmd }}'
39
- - if: 'phase.spec_ambiguous == true'
40
- invoke: '{{ capabilities.grill-with-docs.cmd }}'
41
- - if: 'phase.unfamiliar_module == true'
42
- invoke: '{{ capabilities.zoom-out.cmd }}'
43
-
44
- - id: 03-test
45
- name: test (conditional TDD + diagnose on fail)
46
- upstream: superpowers TDD
47
- capability: '{{ capabilities.tdd.cmd }}'
48
- model: sonnet
49
- max_iterations: '{{ defaults.ralph_max_iterations.execute-task.03-test }}'
50
- on:
51
- - if: 'test_fail == true'
52
- invoke: '{{ capabilities.diagnose.cmd }}'
53
-
54
- - id: 04-deliver
55
- name: deliver (ralph-loop COMPLETE gate + max-iter fallback)
56
- upstream: ralph-loop
57
- capability: '{{ capabilities.ralph-loop.cmd }}'
58
- model: haiku
59
- args:
60
- completion_promise: COMPLETE
61
- max_iterations: '{{ defaults.ralph_max_iterations.execute-task.04-deliver }}'
62
- gate: judgments.parallelism-gate.fires
63
- parallelism: judgments.parallelism-gate.ralph-loop-wrapper.fires
64
- on:
65
- - if: 'subtask.lines >= 20 and subtask.type != "single_command_query"'
66
- invoke: '{{ capabilities.ralph-loop.cmd }}'
67
- - if: 'subtask.lines < 20 or subtask.type == "single_command_query"'
68
- action: skip
69
- fallback:
70
- max_iterations_exceeded:
71
- action: emit_warning_and_halt
72
- message: '⚠️ ralph-loop max-iterations ({{ args.max_iterations }}) exceeded for execute-task 04-deliver. Sub-task likely incomplete — see workflow engine catch handler for manual options.'
73
- exit_code: 1