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
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var package_default = {
3
- version: "3.4.2"};
3
+ version: "3.4.4"};
4
4
 
5
5
  // src/index.ts
6
6
  var VERSION = package_default.version;
@@ -1 +1 @@
1
- {"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,OA8Fb,CAAA;;;AC3FO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"3.4.2\",\n \"description\": \"AI coding harness package manager + composition orchestrator\",\n \"type\": \"module\",\n \"license\": \"Apache-2.0\",\n \"author\": \"easyinplay\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/easyinplay/harnessed.git\"\n },\n \"homepage\": \"https://github.com/easyinplay/harnessed#readme\",\n \"bugs\": \"https://github.com/easyinplay/harnessed/issues\",\n \"keywords\": [\n \"claude-code\",\n \"ai-harness\",\n \"package-manager\",\n \"composition\",\n \"skill-pack\",\n \"mcp\",\n \"orchestrator\"\n ],\n \"engines\": {\n \"node\": \">=22.0.0\"\n },\n \"packageManager\": \"pnpm@10.12.0\",\n \"bin\": {\n \"harnessed\": \"./dist/cli.mjs\"\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"default\": \"./dist/index.mjs\"\n },\n \"./schemas\": {\n \"types\": \"./dist/schemas/index.d.ts\",\n \"import\": \"./dist/schemas/index.mjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"manifests\",\n \"workflows\",\n \"routing\",\n \"config-templates\",\n \"schemas\",\n \"README.md\",\n \"LICENSE\",\n \"NOTICE\"\n ],\n \"scripts\": {\n \"dev\": \"tsup --watch\",\n \"build\": \"tsc --noEmit && tsup\",\n \"build:schema\": \"node ./scripts/build-schema.mjs\",\n \"validate:schema\": \"node ./scripts/validate-schema.mjs\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run --passWithNoTests\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage --passWithNoTests\",\n \"bench\": \"vitest bench --run\",\n \"lint\": \"biome check .\",\n \"lint:fix\": \"biome check --write .\",\n \"format\": \"biome format --write .\"\n },\n \"dependencies\": {\n \"@anthropic-ai/claude-agent-sdk\": \"0.3.142\",\n \"@clack/prompts\": \"^0.10.1\",\n \"@sinclair/typebox\": \"^0.34.49\",\n \"ajv\": \"^8.20.0\",\n \"ajv-errors\": \"^3.0.0\",\n \"ajv-formats\": \"^3.0.1\",\n \"commander\": \"^13.0.0\",\n \"diff\": \"^9.0.0\",\n \"expr-eval\": \"^2.0.2\",\n \"picocolors\": \"^1.1.1\",\n \"proper-lockfile\": \"^4.1.2\",\n \"yaml\": \"^2.9.0\"\n },\n \"devDependencies\": {\n \"@biomejs/biome\": \"^2.0.0\",\n \"@types/node\": \"^22.10.0\",\n \"@types/proper-lockfile\": \"^4.1.4\",\n \"@vitest/coverage-v8\": \"^4.0.0\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^5.6.0\",\n \"vitest\": \"^4.0.0\"\n },\n \"pnpm\": {\n \"onlyBuiltDependencies\": [\n \"esbuild\"\n ]\n }\n}\n","// Main library entry — re-exports public APIs.\n// phase 1.1 batch 1: skeleton only; schema validator wired in batch 2 (T3+).\n\nimport pkg from '../package.json' with { type: 'json' }\n\nexport const VERSION = pkg.version\n"]}
1
+ {"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,OA8Fb,CAAA;;;AC3FO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"3.4.4\",\n \"description\": \"AI coding harness package manager + composition orchestrator\",\n \"type\": \"module\",\n \"license\": \"Apache-2.0\",\n \"author\": \"easyinplay\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/easyinplay/harnessed.git\"\n },\n \"homepage\": \"https://github.com/easyinplay/harnessed#readme\",\n \"bugs\": \"https://github.com/easyinplay/harnessed/issues\",\n \"keywords\": [\n \"claude-code\",\n \"ai-harness\",\n \"package-manager\",\n \"composition\",\n \"skill-pack\",\n \"mcp\",\n \"orchestrator\"\n ],\n \"engines\": {\n \"node\": \">=22.0.0\"\n },\n \"packageManager\": \"pnpm@10.12.0\",\n \"bin\": {\n \"harnessed\": \"./dist/cli.mjs\"\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"default\": \"./dist/index.mjs\"\n },\n \"./schemas\": {\n \"types\": \"./dist/schemas/index.d.ts\",\n \"import\": \"./dist/schemas/index.mjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"manifests\",\n \"workflows\",\n \"routing\",\n \"config-templates\",\n \"schemas\",\n \"README.md\",\n \"LICENSE\",\n \"NOTICE\"\n ],\n \"scripts\": {\n \"dev\": \"tsup --watch\",\n \"build\": \"tsc --noEmit && tsup\",\n \"build:schema\": \"node ./scripts/build-schema.mjs\",\n \"validate:schema\": \"node ./scripts/validate-schema.mjs\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run --passWithNoTests\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage --passWithNoTests\",\n \"bench\": \"vitest bench --run\",\n \"lint\": \"biome check .\",\n \"lint:fix\": \"biome check --write .\",\n \"format\": \"biome format --write .\"\n },\n \"dependencies\": {\n \"@anthropic-ai/claude-agent-sdk\": \"0.3.142\",\n \"@clack/prompts\": \"^0.10.1\",\n \"@sinclair/typebox\": \"^0.34.49\",\n \"ajv\": \"^8.20.0\",\n \"ajv-errors\": \"^3.0.0\",\n \"ajv-formats\": \"^3.0.1\",\n \"commander\": \"^13.0.0\",\n \"diff\": \"^9.0.0\",\n \"expr-eval\": \"^2.0.2\",\n \"picocolors\": \"^1.1.1\",\n \"proper-lockfile\": \"^4.1.2\",\n \"yaml\": \"^2.9.0\"\n },\n \"devDependencies\": {\n \"@biomejs/biome\": \"^2.0.0\",\n \"@types/node\": \"^22.10.0\",\n \"@types/proper-lockfile\": \"^4.1.4\",\n \"@vitest/coverage-v8\": \"^4.0.0\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^5.6.0\",\n \"vitest\": \"^4.0.0\"\n },\n \"pnpm\": {\n \"onlyBuiltDependencies\": [\n \"esbuild\"\n ]\n }\n}\n","// Main library entry — re-exports public APIs.\n// phase 1.1 batch 1: skeleton only; schema validator wired in batch 2 (T3+).\n\nimport pkg from '../package.json' with { type: 'json' }\n\nexport const VERSION = pkg.version\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harnessed",
3
- "version": "3.4.2",
3
+ "version": "3.4.4",
4
4
  "description": "AI coding harness package manager + composition orchestrator",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -103,6 +103,21 @@ Sister `workflows/capabilities.yaml`:
103
103
  - 4 stage-master `/discuss /plan /task /verify` 仍可独立 invoke — `/auto` 是 opt-in NEW workflow
104
104
  - `--staged` opt-in for stage gate UX (每 stage 完停 user review)
105
105
 
106
+ ## How to invoke
107
+
108
+ Use the Bash tool to run:
109
+
110
+ ```bash
111
+ echo "$ARGUMENTS" | harnessed run auto --task-stdin
112
+ ```
113
+
114
+ If `$ARGUMENTS` is empty, run `harnessed run auto` (no stdin pipe).
115
+
116
+ 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.
117
+ - For stage-by-stage review, append `--staged` (pauses between stages for user review).
118
+
119
+ <!-- harnessed-generated:v3.4.4 -->
120
+
106
121
  ## References
107
122
 
108
123
  - D-01 master orchestrator delegation pattern
@@ -451,7 +451,7 @@ capabilities:
451
451
  since: v2.0
452
452
  category: tool-bundled-skill
453
453
  description: Sub-task completion gate (verbatim COMPLETE; max-iterations fallback)
454
- sdk_ref: src/routing/lib/ralphLoop.ts
454
+ sdk_ref: src/workflow/lib/ralphLoop.ts
455
455
  fires_when:
456
456
  - subtask.completion_required == true
457
457
 
@@ -5,7 +5,7 @@ description: |
5
5
  战略层 / Phase 层 / 子任务层独立判断 gate, 可能 3 个全跑 / 1-2 个 / 全跳 + 透明声明。
6
6
  schema_version: harnessed.workflow.v3 with delegates_to (3 sub: strategic + phase + subtask, mode parallel)
7
7
  + disciplines_applied (6 default) + tools_available (planning-with-files)。
8
- Triggered by harnessed CLI `harnessed discuss --topic <text>` or slash command `/discuss`
8
+ Triggered by slash command `/discuss`
9
9
  (bare per ADR 0030 namespace policy D-02 LOCK) after `harnessed setup`.
10
10
  trigger_phrases:
11
11
  - "discuss"
@@ -49,9 +49,22 @@ Sister `workflows/capabilities.yaml`:
49
49
 
50
50
  ## Invocation
51
51
 
52
- - CLI: `harnessed discuss --topic "<text>"`
53
52
  - Slash command: `/discuss <text>` (bare per ADR 0030 namespace policy D-02 LOCK after `harnessed setup`)
54
53
 
54
+ ## How to invoke
55
+
56
+ Use the Bash tool to run:
57
+
58
+ ```bash
59
+ echo "$ARGUMENTS" | harnessed run discuss --task-stdin
60
+ ```
61
+
62
+ If `$ARGUMENTS` is empty, run `harnessed run discuss` (no stdin pipe).
63
+
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.
65
+
66
+ <!-- harnessed-generated:v3.4.4 -->
67
+
55
68
  ## References
56
69
 
57
70
  - D-01 master orchestrator delegation pattern
@@ -41,7 +41,6 @@ Sister `workflows/judgments/phase-gate.yaml`:
41
41
 
42
42
  ## Invocation
43
43
 
44
- - CLI: `harnessed discuss-phase --phase <num>`
45
44
  - Slash command: `/discuss-phase <num>` (after `harnessed setup`)
46
45
 
47
46
  ## Routing rules
@@ -54,14 +53,17 @@ Sister `workflows/judgments/phase-gate.yaml`:
54
53
 
55
54
  ## How to invoke
56
55
 
57
- Use the SlashCommand tool to run: `{{ capabilities.gsd-discuss-phase.cmd }}`
56
+ Use the Bash tool to run:
58
57
 
59
- (If a `⚠️ ... not installed` warning was printed by `harnessed setup`, the backing
60
- capability is missing on disk. Install it (`claude plugin install <name>` for
61
- plugins, or follow the official install instructions for user-skills — e.g. for
62
- gstack: `git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack` then
63
- `cd ~/.claude/skills/gstack && ./setup`), then re-run `harnessed setup` to re-render
64
- this SKILL.md and clear the warning.)
58
+ ```bash
59
+ echo "$ARGUMENTS" | harnessed run discuss-phase --task-stdin
60
+ ```
61
+
62
+ If `$ARGUMENTS` is empty, run `harnessed run discuss-phase` (no stdin pipe).
63
+
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.
65
+
66
+ <!-- harnessed-generated:v3.4.4 -->
65
67
 
66
68
  ## References
67
69
 
@@ -6,7 +6,7 @@ description: |
6
6
  schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
7
7
  (gstack-office-hours + gstack-plan-ceo-review + planning-with-files) + 3 phases (gate
8
8
  judgments.strategic-gate.* fires + planning-with-files /plan findings.md 持久化)。
9
- Triggered by harnessed CLI `harnessed discuss-strategic --topic <text>` or slash command
9
+ Triggered by slash command
10
10
  `/discuss-strategic` after `harnessed setup`.
11
11
  trigger_phrases:
12
12
  - "discuss strategic"
@@ -45,7 +45,6 @@ Sister `workflows/judgments/strategic-gate.yaml`:
45
45
 
46
46
  ## Invocation
47
47
 
48
- - CLI: `harnessed discuss-strategic --topic "<text>"`
49
48
  - Slash command: `/discuss-strategic <text>` (after `harnessed setup`)
50
49
 
51
50
  ## Routing rules
@@ -58,14 +57,17 @@ Sister `workflows/judgments/strategic-gate.yaml`:
58
57
 
59
58
  ## How to invoke
60
59
 
61
- Use the SlashCommand tool to run: `{{ capabilities.gstack-office-hours.cmd }}`
60
+ Use the Bash tool to run:
62
61
 
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.)
62
+ ```bash
63
+ echo "$ARGUMENTS" | harnessed run discuss-strategic --task-stdin
64
+ ```
65
+
66
+ If `$ARGUMENTS` is empty, run `harnessed run discuss-strategic` (no stdin pipe).
67
+
68
+ 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.
69
+
70
+ <!-- harnessed-generated:v3.4.4 -->
69
71
 
70
72
  ## References
71
73
 
@@ -46,7 +46,6 @@ Sister `workflows/judgments/subtask-gate.yaml`:
46
46
 
47
47
  ## Invocation
48
48
 
49
- - CLI: `harnessed discuss-subtask --task "<text>"`
50
49
  - Slash command: `/discuss-subtask <text>` (after `harnessed setup`)
51
50
 
52
51
  ## Routing rules
@@ -59,14 +58,17 @@ Sister `workflows/judgments/subtask-gate.yaml`:
59
58
 
60
59
  ## How to invoke
61
60
 
62
- Use the SlashCommand tool to run: `{{ capabilities.superpowers-brainstorming.cmd }}`
61
+ Use the Bash tool to run:
63
62
 
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.)
63
+ ```bash
64
+ echo "$ARGUMENTS" | harnessed run discuss-subtask --task-stdin
65
+ ```
66
+
67
+ If `$ARGUMENTS` is empty, run `harnessed run discuss-subtask` (no stdin pipe).
68
+
69
+ 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.
70
+
71
+ <!-- harnessed-generated:v3.4.4 -->
70
72
 
71
73
  ## References
72
74
 
@@ -38,10 +38,11 @@ v2 schema fields per `src/workflow/schema/workflow.ts` (T2.4.W0.1 16th surface
38
38
  - `parallelism: judgments.parallelism-gate.<route>.fires` (D-11 subagent / Agent Teams / main session route)
39
39
  - `fallback.max_iterations_exceeded: {action, message, exit_code}` (R20.10 acceptance c "explicit NOT silent")
40
40
 
41
- Per-phase models load from `workflows/execute-task/phases.yaml`; engine.runRouting
42
- spawns each phase as a sub-agent via `@anthropic-ai/claude-agent-sdk` 0.3.142+
41
+ Per-phase models load from `workflows/execute-task/workflow.yaml` (v3 SoT post
42
+ v3.4.4 Phase 6 — v2 phases.yaml deleted); runWorkflow spawns each phase as a
43
+ sub-agent via `@anthropic-ai/claude-agent-sdk` 0.3.142+
43
44
  (`AgentDefinition` 5-字段 unpack — ADR 0011 § 4). ralph-loop SDK wrapper at 04-deliver
44
- reuses sister Phase 2.2 v0.2.0 ship: `src/routing/lib/ralphLoop.ts` (54L) + `sdkSpawn.ts` (91L)
45
+ reuses sister Phase 2.2 v0.2.0 ship: `src/workflow/lib/ralphLoop.ts` (54L) + `sdkSpawn.ts` (91L)
45
46
  + 4-layer dual-signal `isComplete` (NOT 重写 — per RESEARCH § 3.1).
46
47
 
47
48
  ## CLI invocation (the only enforced entry — B-28)
@@ -78,6 +79,6 @@ the CLI subcommand above (B-28 single-entry contract).
78
79
  - ADR 0011 — execute-task SDK + ralph-loop integration (phase 2.2 W6 — finalize)
79
80
  - `.planning/intel/omc-comparison.md` § CD-2 — per-phase model tier defaults
80
81
  - `src/cli/execute-task.ts` — CLI implementation (T5.1)
81
- - `workflows/execute-task/phases.yaml` — 4-phase config (T3.3)
82
- - `src/routing/lib/sdkSpawn.ts` — SDK query() consumer (T4.1)
83
- - `src/routing/lib/ralphLoop.ts` — verbatim COMPLETE round-trip
82
+ - `workflows/execute-task/workflow.yaml` — 4-phase config (v3 SoT; v3.4.4 Phase 6 ship — v2 phases.yaml deleted)
83
+ - `src/workflow/lib/sdkSpawn.ts` — SDK query() consumer (T4.1)
84
+ - `src/workflow/lib/ralphLoop.ts` — verbatim COMPLETE round-trip
@@ -0,0 +1,93 @@
1
+ # workflows/execute-task/workflow.yaml — v3.4.4 Phase 4 Commit 1 NEW (Path A)
2
+ # Former v2 `phases.yaml` (74L) deleted v3.4.4 Phase 6 Wave 3c — this v3
3
+ # workflow.yaml is now the single SoT. Authored fresh per HANDOFF-v3.4.4 L745
4
+ # Path A decision + PHASE-4-SPEC L101-180 verbatim.
5
+ #
6
+ # 4-phase chain mirrors v2 verbatim:
7
+ # 01-clarify superpowers-brainstorming opus gate: subtask-gate.brainstorming.fires
8
+ # 02-code karpathy 心法 + on[] sonnet conditional: tdd / grill-with-docs / zoom-out
9
+ # 03-test superpowers TDD sonnet on: test_fail → diagnose
10
+ # 04-deliver ralph-loop haiku args.completion_promise=COMPLETE + fallback
11
+ #
12
+ # v2 → v3 字段 delta (PHASE-4-SPEC L13 + L116-178):
13
+ # BUMP `schema_version: harnessed.workflow.v3` (sister Phase 3.3 W0.5 WorkflowSchemaV3)
14
+ # ADD `disciplines_applied: [6 basename]` (D-09 L0 Discipline Substrate, Pattern A A.1 strict Literal Union)
15
+ # ADD `tools_available: [7 capabilities.yaml entry name]` (D-05 Contract C1 cross-validate)
16
+ # KEEP phases verbatim from former v2 phases.yaml (Path A1 — coexisted through Phase 5; v2 deleted Phase 6 Wave 3c)
17
+ #
18
+ # Per-phase model tier (intel CD-2 § 第 4 条) preserved verbatim from v2:
19
+ # opus / sonnet / sonnet / haiku
20
+ # Override via CLI: `--model-tier inherit` (B-10 escape hatch).
21
+ #
22
+ # Sister refs:
23
+ # - .planning/v3.4.4/PHASE-4-SPEC.md L101-180 (NEW yaml shape verbatim)
24
+ # - workflows/execute-task/phases.yaml (former v2 SoT — DELETED v3.4.4 Phase 6 Wave 3c; this workflow.yaml is sole SoT)
25
+ # - workflows/research/workflow.yaml (v3 standalone shape reference)
26
+ # - workflows/verify/simplify/workflow.yaml (v3 sub-workflow shape reference)
27
+ # - workflows/capabilities.yaml (7 capability refs: superpowers-brainstorming/tdd/grill-with-docs/zoom-out/diagnose/ralph-loop/planning-with-files)
28
+ # - workflows/defaults.yaml ralph_max_iterations.execute-task.{01..04}
29
+ # - workflows/disciplines/{karpathy,output-style,language,operational,priority,protocols}.yaml (L0 substrate)
30
+ # - src/workflow/schema/workflow.ts WorkflowSchemaV3 (Phase 3.3 W0.5 SHIPPED 122L)
31
+
32
+ schema_version: harnessed.workflow.v3
33
+ workflow: execute-task
34
+ description: |
35
+ 子任务执行 workflow — 4-phase chain (brainstorming → karpathy + mattpocock route by
36
+ condition → TDD + diagnose → ralph-loop COMPLETE) triggered by harnessed CLI
37
+ `harnessed execute-task --task <text>` OR universal `harnessed run execute-task`.
38
+
39
+ disciplines_applied: [karpathy, output-style, language, operational, priority, protocols]
40
+ tools_available: [superpowers-brainstorming, tdd, grill-with-docs, zoom-out, diagnose, ralph-loop, planning-with-files]
41
+
42
+ phases:
43
+ - id: 01-clarify
44
+ name: brainstorming
45
+ upstream: superpowers brainstorming
46
+ capability: '{{ capabilities.superpowers-brainstorming.cmd }}'
47
+ model: opus
48
+ max_iterations: '{{ defaults.ralph_max_iterations.execute-task.01-clarify }}'
49
+ gate: judgments.subtask-gate.brainstorming.fires
50
+
51
+ - id: 02-code
52
+ name: code (karpathy 心法 always-on + mattpocock conditional route)
53
+ upstream: karpathy
54
+ model: sonnet
55
+ max_iterations: '{{ defaults.ralph_max_iterations.execute-task.02-code }}'
56
+ on:
57
+ - if: 'judgments.tdd-gate.tdd-strongly-suggested.fires'
58
+ invoke: '{{ capabilities.tdd.cmd }}'
59
+ - if: 'phase.spec_ambiguous == true'
60
+ invoke: '{{ capabilities.grill-with-docs.cmd }}'
61
+ - if: 'phase.unfamiliar_module == true'
62
+ invoke: '{{ capabilities.zoom-out.cmd }}'
63
+
64
+ - id: 03-test
65
+ name: test (conditional TDD + diagnose on fail)
66
+ upstream: superpowers TDD
67
+ capability: '{{ capabilities.tdd.cmd }}'
68
+ model: sonnet
69
+ max_iterations: '{{ defaults.ralph_max_iterations.execute-task.03-test }}'
70
+ on:
71
+ - if: 'test_fail == true'
72
+ invoke: '{{ capabilities.diagnose.cmd }}'
73
+
74
+ - id: 04-deliver
75
+ name: deliver (ralph-loop COMPLETE gate + max-iter fallback)
76
+ upstream: ralph-loop
77
+ capability: '{{ capabilities.ralph-loop.cmd }}'
78
+ model: haiku
79
+ args:
80
+ completion_promise: COMPLETE
81
+ max_iterations: '{{ defaults.ralph_max_iterations.execute-task.04-deliver }}'
82
+ gate: judgments.parallelism-gate.fires
83
+ parallelism: judgments.parallelism-gate.ralph-loop-wrapper.fires
84
+ on:
85
+ - if: 'subtask.lines >= 20 and subtask.type != "single_command_query"'
86
+ invoke: '{{ capabilities.ralph-loop.cmd }}'
87
+ - if: 'subtask.lines < 20 or subtask.type == "single_command_query"'
88
+ action: skip
89
+ fallback:
90
+ max_iterations_exceeded:
91
+ action: emit_warning_and_halt
92
+ 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.'
93
+ exit_code: 1
@@ -42,7 +42,6 @@ trigger `is-complex-architecture` 重构 ref。
42
42
 
43
43
  ## Invocation
44
44
 
45
- - CLI: `harnessed plan-architecture --module "<name>"`
46
45
  - Slash command: `/plan-architecture <name>` (after `harnessed setup`)
47
46
 
48
47
  ## Routing rules
@@ -55,14 +54,17 @@ trigger `is-complex-architecture` 重构 ref。
55
54
 
56
55
  ## How to invoke
57
56
 
58
- Use the SlashCommand tool to run: `{{ capabilities.plan-eng-review.cmd }}`
57
+ Use the Bash tool to run:
59
58
 
60
- (If a `⚠️ ... not installed` warning was printed by `harnessed setup`, the backing
61
- capability is missing on disk. Install it (`claude plugin install <name>` for
62
- plugins, or follow the official install instructions for user-skills — e.g. for
63
- gstack: `git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack` then
64
- `cd ~/.claude/skills/gstack && ./setup`), then re-run `harnessed setup` to re-render
65
- this SKILL.md and clear the warning.)
59
+ ```bash
60
+ echo "$ARGUMENTS" | harnessed run plan-architecture --task-stdin
61
+ ```
62
+
63
+ If `$ARGUMENTS` is empty, run `harnessed run plan-architecture` (no stdin pipe).
64
+
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.
66
+
67
+ <!-- harnessed-generated:v3.4.4 -->
66
68
 
67
69
  ## References
68
70
 
@@ -6,7 +6,7 @@ description: |
6
6
  task_plan.md。schema_version: harnessed.workflow.v3 with delegates_to (2 sub: architecture
7
7
  serial order 1 + phase serial order 2) + disciplines_applied (6 default) + tools_available
8
8
  (planning-with-files + plan-eng-review + gsd-plan-phase)。
9
- Triggered by harnessed CLI `harnessed plan --topic <text>` or slash command `/plan`
9
+ Triggered by slash command `/plan`
10
10
  (bare per ADR 0030 namespace policy D-02 LOCK) after `harnessed setup`.
11
11
  trigger_phrases:
12
12
  - "plan"
@@ -50,9 +50,22 @@ Sister `workflows/capabilities.yaml`:
50
50
 
51
51
  ## Invocation
52
52
 
53
- - CLI: `harnessed plan --topic "<text>"`
54
53
  - Slash command: `/plan <text>` (bare per ADR 0030 namespace policy D-02 LOCK after `harnessed setup`)
55
54
 
55
+ ## How to invoke
56
+
57
+ Use the Bash tool to run:
58
+
59
+ ```bash
60
+ echo "$ARGUMENTS" | harnessed run plan --task-stdin
61
+ ```
62
+
63
+ If `$ARGUMENTS` is empty, run `harnessed run plan` (no stdin pipe).
64
+
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.
66
+
67
+ <!-- harnessed-generated:v3.4.4 -->
68
+
56
69
  ## References
57
70
 
58
71
  - D-01 master orchestrator delegation pattern
@@ -46,7 +46,6 @@ reframe)。
46
46
 
47
47
  ## Invocation
48
48
 
49
- - CLI: `harnessed plan-phase --phase <num>`
50
49
  - Slash command: `/plan-phase <num>` (after `harnessed setup`)
51
50
 
52
51
  ## Output artifacts
@@ -57,14 +56,17 @@ reframe)。
57
56
 
58
57
  ## How to invoke
59
58
 
60
- Use the SlashCommand tool to run: `{{ capabilities.gsd-plan-phase.cmd }}`
59
+ Use the Bash tool to run:
61
60
 
62
- (If a `⚠️ ... not installed` warning was printed by `harnessed setup`, the backing
63
- capability is missing on disk. Install it (`claude plugin install <name>` for
64
- plugins, or follow the official install instructions for user-skills — e.g. for
65
- gstack: `git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack` then
66
- `cd ~/.claude/skills/gstack && ./setup`), then re-run `harnessed setup` to re-render
67
- this SKILL.md and clear the warning.)
61
+ ```bash
62
+ echo "$ARGUMENTS" | harnessed run plan-phase --task-stdin
63
+ ```
64
+
65
+ If `$ARGUMENTS` is empty, run `harnessed run plan-phase` (no stdin pipe).
66
+
67
+ 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
+
69
+ <!-- harnessed-generated:v3.4.4 -->
68
70
 
69
71
  ## References
70
72
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: research
3
- description: 多源调研 workflow — Tavily/Exa/ctx7 多源 fan-out + GSD discuss synth aggregate; harnessed v2.0 NEW per R20.7 (Stage ① Discuss 独立 call); schema bumped to harnessed.workflow.v3 in Phase v3.0-3.4 W1.1 (T3.4.W1.1) with disciplines_applied [6] + tools_available [tavily-mcp, exa-mcp, ctx7, gsd-discuss-phase], phases reuse v2 verbatim. Triggered by harnessed CLI `harnessed research --topic <text>` or slash command `/research` after `harnessed setup`.
3
+ description: 多源调研 workflow — Tavily/Exa/ctx7 多源 fan-out + GSD discuss synth aggregate; harnessed v2.0 NEW per R20.7 (Stage ① Discuss 独立 call); schema bumped to harnessed.workflow.v3 in Phase v3.0-3.4 W1.1 (T3.4.W1.1) with disciplines_applied [6] + tools_available [tavily-mcp, exa-mcp, ctx7, gsd-discuss-phase], phases reuse v2 verbatim. Triggered by slash command `/research` after `harnessed setup`.
4
4
  preamble-tier: 2
5
5
  schema_version: harnessed.workflow.v3
6
6
  ---
@@ -28,7 +28,6 @@ Sister `workflows/capabilities.yaml` entries:
28
28
  - `gsd-discuss-phase` (synth aggregate)
29
29
 
30
30
  ## Invocation
31
- - CLI: `harnessed research --topic "<topic>"`
32
31
  - Slash command: `/research <topic>` (after `harnessed setup`)
33
32
 
34
33
  ## Routing rules (sister ~/.claude/rules/web-search.md)
@@ -37,3 +36,46 @@ Sister `workflows/capabilities.yaml` entries:
37
36
  - 库 / API 文档 → ctx7 CLI (per ~/.claude/rules/context7.md)
38
37
  - 关键词 / 时效内容 → Tavily MCP (默认)
39
38
  - 抓整站 / 站点结构 → Tavily crawl/map
39
+
40
+ ## How to invoke
41
+
42
+ **Preferred path** (master orchestrator): dispatch to the per-sub-workflow slash commands in the order this stage prescribes. Each sub command lives at `~/.claude/commands/<sub-name>.md` with its own dual-path fallback.
43
+
44
+ **Fallback path** (when the upstream isn't installed or returns no result): use the Task tool to spawn a general-purpose subagent with this prompt:
45
+
46
+ > You are a **Research analyst**.
47
+ >
48
+ > **Mission**: Multi-source investigation (docs / web search / codebase grep / library probe) producing a `findings.md` with citations, NOT speculation. Use `ctx7` for library docs, `tavily-mcp` / `exa-mcp` for web, `gh` CLI for GitHub artifacts, and codebase `Grep` for internal references.
49
+ >
50
+ > **Default-suspect mode**: assume the change is broken / risky / incomplete until proven otherwise. Cite `file:line` for every finding; do not generalize.
51
+ >
52
+ > **Review checklist**:
53
+ > 1. Resolve each unknown claim to a citable source (URL, file:line, or `ctx7` doc id)
54
+ >
55
+ > 2. Cite version explicitly when discussing library / framework APIs (training cutoff may be stale)
56
+ >
57
+ > 3. Capture conflicting sources side-by-side; do not silently pick one
58
+ >
59
+ > 4. Flag `OPEN: <question>` for items the user must decide; never paper over
60
+ >
61
+ > 5. Persist results to `.planning/<phase>/findings.md` for cross-session handoff
62
+ >
63
+ > **Output format**: structured report with severity-classified findings (verified / unverified / conflicting / open). One finding per line: `[severity] file:line — problem (one sentence); fix: suggested change`. If no findings, say so explicitly. No preamble, no end-of-report summary.
64
+
65
+ (Role prompt is self-contained — works even when the upstream `specialist` user-skill / plugin isn't installed.)
66
+
67
+ (Sister `~/.claude/commands/research.md` is also generated by `harnessed setup` so `/research` is a real platform slash command — both files carry the same dual-path instruction. Previous v3.4.x `harnessed research --apply` CLI claims are removed; that subcommand was never implemented.)
68
+
69
+ ## How to invoke
70
+
71
+ Use the Bash tool to run:
72
+
73
+ ```bash
74
+ echo "$ARGUMENTS" | harnessed run research --task-stdin
75
+ ```
76
+
77
+ If `$ARGUMENTS` is empty, run `harnessed run research` (no stdin pipe).
78
+
79
+ 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
+
81
+ <!-- harnessed-generated:v3.4.4 -->
@@ -47,26 +47,19 @@ Sister `workflows/capabilities.yaml` entries:
47
47
  - ✅ **触发**: 项目结束 / 里程碑结束 / 用户明示 "复盘 / retro / lessons learned"
48
48
  - ❌ **跳过**: 日常 PR / 单 phase 完成 (常规 verify-progress 已够用)
49
49
 
50
- ## CLI invocation
50
+ ## How to invoke
51
51
 
52
- ```bash
53
- # Dry-run preview — arbitrate-only, never spawns SDK.
54
- harnessed retro --milestone <name> --dry-run --non-interactive
52
+ Use the Bash tool to run:
55
53
 
56
- # Apply path — real SDK spawn + 2-phase serial (gstack /retro → planning-with-files RETROSPECTIVE.md sink).
57
- harnessed retro --milestone <name> --apply
54
+ ```bash
55
+ echo "$ARGUMENTS" | harnessed run retro --task-stdin
58
56
  ```
59
57
 
60
- ## How to invoke
58
+ If `$ARGUMENTS` is empty, run `harnessed run retro` (no stdin pipe).
61
59
 
62
- Use the SlashCommand tool to run: `{{ capabilities.retro-gstack.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