harnessed 3.9.15 → 3.9.17

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.
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  // package.json
2
2
  var package_default = {
3
- version: "3.9.15"};
3
+ version: "3.9.17"};
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,QAgGb,CAAA;;;AC7FO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"3.9.15\",\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 \"messages\",\n \"workflows\",\n \"routing\",\n \"config-templates\",\n \"schemas\",\n \"README.md\",\n \"LICENSE\",\n \"NOTICE\",\n \"THIRD-PARTY-NOTICES.md\"\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,QAgGb,CAAA;;;AC7FO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"3.9.17\",\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 \"messages\",\n \"workflows\",\n \"routing\",\n \"config-templates\",\n \"schemas\",\n \"README.md\",\n \"LICENSE\",\n \"NOTICE\",\n \"THIRD-PARTY-NOTICES.md\"\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.9.15",
3
+ "version": "3.9.17",
4
4
  "description": "AI coding harness package manager + composition orchestrator",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -5,8 +5,8 @@
5
5
  ## v0.1 MVP Workflows
6
6
 
7
7
  - `research/` — 多源调研路由(Tavily / Exa / ctx7) — v0.1.0
8
- - `execute-task/` — 子任务执行(superpowers + karpathy + mattpocock + ralph-loop) — v0.2.0
9
- - `plan-feature/` — 三层栈编排(gstack + GSD + planning-with-files) — v0.3.0(**phases schema reference implementation**)
8
+ - `task/` — 子任务执行(superpowers + karpathy + mattpocock + ralph-loop) — v3.0.0
9
+ - `plan/` — 三层栈编排(gstack + GSD + planning-with-files) — v3.0.0
10
10
 
11
11
  ## Phases Schema
12
12
 
@@ -69,65 +69,30 @@ phases: # 必填,至少 1 个 phase
69
69
 
70
70
  ---
71
71
 
72
- ## 4. plan-feature reference implementation
72
+ ## 4. Reference implementation
73
73
 
74
- 完整 5-phase 示例(摘录自 `WORKFLOWS-MVP.md` Workflow 3 + `PROJECT-SPEC.md` § 10)。所有其他 workflow 套此范式。
74
+ v3 workflow yaml 示例(摘录自 `workflows/verify/paranoid/workflow.yaml`)。所有 v3 sub-workflow 套此范式。
75
75
 
76
76
  ```yaml
77
- # workflows/plan-feature/SKILL.md
78
- ---
79
- name: plan-feature
80
- namespace: /harnessed:plan-feature
77
+ # workflows/verify/paranoid/workflow.yaml
78
+ schema_version: harnessed.workflow.v3
79
+ workflow: verify-paranoid
80
+ description: |
81
+ Stage ④.c gstack /review Paranoid Staff Engineer
82
+
83
+ disciplines_applied: [karpathy, output-style, language, operational, priority, protocols]
84
+ tools_available: [gstack-review]
85
+
81
86
  phases:
82
- - id: 01-gstack-decision
83
- layer: governance
87
+ - id: 01-review
88
+ name: gstack-review
84
89
  upstream: gstack
85
- invokes: [/office-hours, /plan-ceo-review, /plan-eng-review]
86
- inputs: [user_request]
87
- outputs: .harnessed/checkpoints/01-decision.md
88
- pause: human_review
89
- on_veto: halt_workflow
90
-
91
- - id: 02-brainstorm
92
- layer: execution
93
- upstream: superpowers
94
- invokes: [brainstorming]
95
- inputs: [user_request, $01.outputs]
96
- outputs: .harnessed/checkpoints/02-design-memo.md
97
- conditional:
98
- if: ui_task_detected # 来自 routing/ui.md
99
- then_also_invoke: [ui-ux-pro-max]
100
-
101
- - id: 03-gsd-discuss
102
- layer: orchestration
103
- upstream: GSD
104
- invokes: [/gsd-discuss-phase]
105
- inputs: [$01.outputs, $02.outputs]
106
- outputs: gsd_phase_doc
107
-
108
- - id: 04-gsd-plan
109
- layer: orchestration
110
- upstream: GSD
111
- invokes: [/gsd-plan-phase]
112
- inputs: [$03.outputs]
113
- outputs: [PLAN.md, ROADMAP.md, REQUIREMENTS.md]
114
-
115
- - id: 05-persist
116
- layer: execution
117
- upstream: planning-with-files
118
- inputs: [$04.outputs]
119
- outputs: [task_plan.md, progress.md, findings.md]
120
- pause: human_review
121
- ---
90
+ capability: '{{ capabilities.gstack-review.cmd }}'
91
+ model: opus
92
+ gate: judgments.stage-routing.verify-paranoid-critical.fires
93
+ max_iterations: '{{ defaults.ralph_max_iterations.verify-paranoid.01-review }}'
122
94
  ```
123
95
 
124
- **关键设计点**(决策已敲定,见 WORKFLOWS-MVP § Workflow 3):
125
-
126
- - gstack 命令前缀通过变量插值 `{{gstack.command_prefix}}/office-hours`,**禁止硬编码** — `harnessed doctor` 探测 plugin 化路径与 git-clone-with-setup 路径,写 `.harnessed/config.json` 供 workflow 引擎读取
127
- - `01` 阶段 veto → `halt_workflow`,不自动回滚;用户决定是否重新构思
128
- - `02` 阶段 UI 任务识别完全走 `routing/ui.md` 的 `trigger.keywords` + `file_globs` 规则(B+C 混合)
129
- - `pause: human_review` 强制 checkpoint compact —— 写 `.harnessed/checkpoints/<id>.md`(≤ 1k token),原文留 `.harnessed/archive/<id>-full.md` 不进后续 context(PROJECT-SPEC § 12)
130
-
131
96
  ---
132
97
 
133
98
  ## 5. 收益(schema-driven 设计动机)
@@ -137,14 +102,15 @@ schema 校验保证 `upstream` 引用在 manifests/ 真实存在(防"引用一
137
102
 
138
103
  ---
139
104
 
140
- ## 6. 当前 status(v0.1 phase 1.1
105
+ ## 6. 当前 status(v3.9.16
141
106
 
142
107
  - ✅ 字段定义已锁定(本文件 + SPEC § 10)
143
- - JSON Schema artifact `schemas/workflow.v1.schema.json` **未生成** — 由 v0.3 phase 1.4+ 配 plan-feature 落地时一并实装
144
- - workflow yaml fixtures **未起草** — v0.1 phase 1.4 起草 `research`,v0.2 phase 起草 `execute-task`,v0.3 phase 起草 `plan-feature`
145
- - workflow validator **未实装** TypeBox + Ajv 同样模式(参考 `src/manifest/schema/`),落入 `src/workflow/schema.ts` + `src/workflow/validate.ts`
108
+ - workflow yaml v3 schema 已实装 (`src/workflow/schema/workflow.ts`)
109
+ - 24 sub-workflow SHIPPED (discuss/plan/task/verify stages)
110
+ - workflow validator 已实装 (TypeBox, `src/workflow/schema/`)
111
+ - ❌ JSON Schema artifact `schemas/workflow.v1.schema.json` **未生成** — deferred
146
112
 
147
- 任何字段语义冲突以本文件 + SPEC § 10 为准;机器层级冲突时(v0.3+)以 `schemas/workflow.v1.schema.json` 为准。
113
+ 任何字段语义冲突以本文件 + SPEC § 10 为准;机器层级冲突时(v3.0+)以 TypeBox schema 为准。
148
114
 
149
115
  ---
150
116
 
@@ -154,4 +120,4 @@ schema 校验保证 `upstream` 引用在 manifests/ 真实存在(防"引用一
154
120
  - **三层栈职责**:用户全局 `CLAUDE.md` § "角色与框架定位"
155
121
  - **路由 yaml frontmatter SSOT**:`routing/SCHEMA.md`(B+C 共享同一 frontmatter 块)
156
122
  - **manifest 上游引用目标**:`manifests/SCHEMA.md`
157
- - **ROADMAP 落地节奏**:v0.1 = `research` workflow / v0.2 = `execute-task` / v0.3 = `plan-feature`(reference)
123
+ - **ROADMAP 落地节奏**:v0.1 = `research` / v0.2 = `task` / v0.3 = `plan` / v3.0 = full stage-based workflow system
@@ -9,26 +9,6 @@ schema_version: harnessed.defaults.v1
9
9
  # Per-workflow per-phase ralph-loop iteration ceiling
10
10
  # Values balance: completion guarantee vs DoS prevention; sister ADR 0011 v0.2.0 ralph-loop SDK pattern
11
11
  ralph_max_iterations:
12
- # v2 legacy (Phase 2.3 W1.2 SHIPPED, deprecated v3.0 per D-04 release-notes-only migration)
13
- execute-task:
14
- 01-clarify: 5
15
- 02-code: 20
16
- 03-test: 15
17
- 04-deliver: 20
18
-
19
- plan-feature:
20
- 01-gstack-decision: 1
21
- 02-brainstorm: 5
22
- 03-gsd-discuss: 3
23
- 04-gsd-plan: 3
24
- 05-persist: 5
25
-
26
- verify-work:
27
- 01-gsd-verify-work: 3
28
- 02-code-review: 5
29
- 03-gstack-review: 3
30
- 04-code-simplifier: 5
31
-
32
12
  # v3 standalone (research v3 schema bump + retro NEW per Phase 3.4 W1.1+W1.2)
33
13
  research:
34
14
  01-fan-out: 3
@@ -1,93 +0,0 @@
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
@@ -1,81 +0,0 @@
1
- # workflows/plan-feature/workflow.yaml — Phase v2.0-2.4 W1 T2.4.W1.3 (D-15 + Q-AUDIT-5a LOCKED)
2
- # 5-phase 三层栈 composition: gstack governance → superpowers brainstorm → GSD discuss/plan → planning-with-files plugin /plan persist
3
- # v1 → v2 delta (sister L1-40):
4
- # ADD `schema_version: harnessed.workflow.v2` (T2.4.W0.1 16th surface)
5
- # ADD `description` root field (workflow purpose)
6
- # ADD `capability: '{{ capabilities.<name>.cmd }}'` 各 phase (D-10 template interpolation)
7
- # ADD `gate: judgments.<file>.<trigger>.fires` 01-gstack-decision (D-04 gate reference)
8
- # ADD `on: [{if, invoke}]` 02-brainstorm + 03-gsd-discuss (D-09 conditional clause)
9
- # ADD `artifacts_expected: [...]` 05-persist (D-15 planning-with-files 3 file 持久化)
10
- # ADD `max_iterations: '{{ defaults.ralph_max_iterations.plan-feature.<phase> }}'` (T2.3.W1.2 ship)
11
- # KEEP `invokes: '/plan'` literal at 05-persist (Q-AUDIT-5a Claude Code plugin slash cmd, NOT npm SDK NOT fs.writeFile)
12
- # Q-AUDIT-5a anti-pattern guard (verified by tests/workflow/plan-feature-v2.test.ts):
13
- # - NO npm SDK call (no `import` / `require` planning-with-files — yaml syntax natively absent)
14
- # - NO fs.writeFile self-impl (no `fs.writeFile` / `writeFile` reference — anti-pattern reviewer guard)
15
- # - YES `invokes: '/plan'` literal at 05-persist (plugin slash cmd 真接 path a)
16
- # - YES `capability: '{{ capabilities.planning-with-files.cmd }}'` template ref (resolve to /plan via capabilities.yaml L317)
17
- # 04-gsd-plan phase: `gsd-plan-phase` 在 capabilities.yaml 中暂未单独 entry — 沿袭 v1 L32 literal pattern (D-08 v2.x patch followup
18
- # 添加 gsd-plan-phase capability entry; v2.0 baseline 不阻塞 ship per T2.4.W1.3 Implementation Tasks #4-#5 scope)
19
-
20
- schema_version: harnessed.workflow.v2
21
- workflow: plan-feature
22
- description: |
23
- plan-feature 5-phase 三层栈 workflow — gstack governance gate (CEO/EM/Designer/Paranoid/QA/CSO)
24
- → superpowers brainstorm 子任务级澄清 → GSD /gsd-discuss-phase 灰色澄清 → GSD /gsd-plan-phase
25
- Wave A/B/C planning → planning-with-files Claude Code plugin slash cmd `/plan` 持久化 3 file
26
- (task_plan.md + progress.md + findings.md) 在 .planning/<phase-id>/.
27
- Phase 1 gstack governance veto halts the entire workflow (D-04 PUSH) — engine-level
28
- on_veto wiring lives in runtime, NOT yaml v2 root schema (WorkflowSchemaV2 strict
29
- additionalProperties:false per T2.4.W0.1 + STRIDE T-2.2-02).
30
-
31
- phases:
32
- - id: 01-gstack-decision
33
- name: gstack-decision (governance gate — CEO/EM/Designer/Paranoid/QA/CSO)
34
- upstream: gstack
35
- capability: '{{ capabilities.gstack-office-hours.cmd }}'
36
- invokes: '{{ gstack_prefix }}office-hours'
37
- model: opus
38
- gate: judgments.strategic-gate.office-hours.fires
39
- max_iterations: '{{ defaults.ralph_max_iterations.plan-feature.01-gstack-decision }}'
40
-
41
- - id: 02-brainstorm
42
- name: brainstorm (子任务级澄清 multi-approach)
43
- upstream: superpowers
44
- capability: '{{ capabilities.superpowers-brainstorming.cmd }}'
45
- model: sonnet
46
- on:
47
- - if: judgments.subtask-gate.brainstorming.fires
48
- invoke: '{{ capabilities.superpowers-brainstorming.cmd }}'
49
- max_iterations: '{{ defaults.ralph_max_iterations.plan-feature.02-brainstorm }}'
50
-
51
- - id: 03-gsd-discuss
52
- name: gsd-discuss (orchestration — phase 灰色澄清 4-question batch)
53
- upstream: gsd
54
- capability: '{{ capabilities.gsd-discuss-phase.cmd }}'
55
- model: sonnet
56
- on:
57
- - if: judgments.phase-gate.gsd-discuss-phase.fires
58
- invoke: '{{ capabilities.gsd-discuss-phase.cmd }}'
59
- max_iterations: '{{ defaults.ralph_max_iterations.plan-feature.03-gsd-discuss }}'
60
-
61
- - id: 04-gsd-plan
62
- name: gsd-plan (orchestration — Wave A research + Wave B planner + Wave C checker)
63
- upstream: gsd
64
- invokes: 'gsd-plan-phase'
65
- model: sonnet
66
- max_iterations: '{{ defaults.ralph_max_iterations.plan-feature.04-gsd-plan }}'
67
-
68
- - id: 05-persist
69
- name: persist (planning-with-files plugin /plan — Manus-style markdown persistence)
70
- upstream: planning-with-files
71
- capability: '{{ capabilities.planning-with-files.cmd }}'
72
- invokes: '/plan'
73
- model: haiku
74
- on:
75
- - if: phase.scope_days > 1 or phase.is_critical_module == true
76
- action: invoke
77
- artifacts_expected:
78
- - task_plan.md
79
- - progress.md
80
- - findings.md
81
- max_iterations: '{{ defaults.ralph_max_iterations.plan-feature.05-persist }}'
@@ -1,141 +0,0 @@
1
- # workflows/verify-work/workflow.yaml — Phase v2.0-2.4 W2 T2.4.W2.2 (D-12 + R20.12 + R20.11 + R20.14)
2
- #
3
- # Stage ④ Verify 完整 workflow — 9-phase composition per D-12 (Q-AUDIT-2 amend) verbatim + R20.12 acceptance:
4
- # 必跑串行 (01-02) → 并行 fan-out (03) → 强制 conditional (04) → 可选 conditional (05-07) → 末尾串行 (08) → Agent Team 升级 (09)
5
- #
6
- # Sister refs:
7
- # - workflows/capabilities.yaml — gsd-verify-work / gsd-progress / code-review / gstack-review / gstack-qa / gstack-cso / gstack-design-review / code-simplifier / agent-teams-create 9 entry (Phase 2.3 W0.1 SHIPPED)
8
- # - workflows/judgments/parallelism-gate.yaml — subagent-default.fires (default fan-out) + agent-teams-upgrade.fires (5 触发 OR-chain; Phase 2.3 W0.2 SHIPPED)
9
- # - workflows/defaults.yaml — ralph_max_iterations.verify-work.{01-gsd-verify-work=3, 02-code-review=5, 03-gstack-review=3, 04-code-simplifier=5} (Phase 2.3 W1.2 SHIPPED)
10
- # - src/workflow/schema/workflow.ts WorkflowSchemaV2 (Phase 2.4 W0.1 SHIPPED 86L)
11
- # - Sister pattern workflows/plan-feature/workflow.yaml v2 + workflows/execute-task/phases.yaml v2 (Phase 2.4 W1 SHIPPED)
12
- #
13
- # Workflow-level on_veto: halt_workflow (D-04 PUSH 任 1 phase veto → 全 halt; engine-level wiring,
14
- # NOT yaml v2 root schema strict additionalProperties:false per T2.4.W0.1 + STRIDE T-2.2-02)。
15
- #
16
- # Fallback 3 铁律 chain_isolation (R20.16): phase ≥04 各 conditional `on: [..., {action: skip}]` 实装 —
17
- # skip 04-gstack-review ≠ skip 08-code-simplifier 等 (条件式 fallback, 非互相级联跳过)。
18
-
19
- schema_version: harnessed.workflow.v2
20
- workflow: verify-work
21
- description: |
22
- verify-work Stage ④ Verify 完整 workflow — 9-phase composition per CLAUDE.md verbatim:
23
- gsd-verify-work UAT-driven + gsd-progress 状态同步 必跑串行 → code-review 多 agent 并行 fan-out
24
- → gstack /review Paranoid Staff Eng 关键模块强制 → 可选 /qa /cso /design-review conditional
25
- → code-simplifier 末尾串行 → 关键发布/大重构 PR 升级 4-specialist Agent Team Pattern C
26
- 多维度审查 (code-review + gstack-review + gstack-cso + gstack-qa 互相质询, NOT fire-and-forget)。
27
- Cleanup mandatory (bundled Agent Teams discipline): SendMessage shutdown_request +
28
- TeamDelete — engine-level wiring, NOT yaml v2 schema scope.
29
-
30
- phases:
31
- # ============================================================================
32
- # 必跑串行 (2 phase) — gsd-verify-work 起点 + gsd-progress 状态同步
33
- # ============================================================================
34
- - id: 01-gsd-verify-work
35
- name: gsd-verify-work (UAT-driven conversational verification + acceptance criteria check)
36
- upstream: gsd
37
- capability: '{{ capabilities.gsd-verify-work.cmd }}'
38
- model: sonnet
39
- max_iterations: '{{ defaults.ralph_max_iterations.verify-work.01-gsd-verify-work }}'
40
-
41
- - id: 02-gsd-progress
42
- name: gsd-progress (状态同步 — ROADMAP/STATE/REQUIREMENTS 更新)
43
- upstream: gsd
44
- capability: '{{ capabilities.gsd-progress.cmd }}'
45
- model: haiku
46
- max_iterations: 2
47
-
48
- # ============================================================================
49
- # 并行 fan-out (1 phase) — code-review 多 agent (subagent default per CLAUDE.md 子任务并行机制)
50
- # ============================================================================
51
- - id: 03-code-review-parallel
52
- name: code-review (multi-agent 并行 fan-out — 高置信度 finding)
53
- upstream: mattpocock-skills
54
- capability: '{{ capabilities.code-review.cmd }}'
55
- model: sonnet
56
- max_iterations: '{{ defaults.ralph_max_iterations.verify-work.02-code-review }}'
57
- parallelism: judgments.parallelism-gate.subagent-default.fires
58
-
59
- # ============================================================================
60
- # 关键模块强制 conditional (1 phase) — gstack /review Paranoid Staff Engineer
61
- # ============================================================================
62
- - id: 04-gstack-review-conditional
63
- name: gstack-review (Paranoid Staff Engineer 视角 — 关键模块 PR 前强制)
64
- upstream: gstack
65
- capability: '{{ capabilities.gstack-review.cmd }}'
66
- model: opus
67
- max_iterations: '{{ defaults.ralph_max_iterations.verify-work.03-gstack-review }}'
68
- on:
69
- - if: 'phase.is_critical_module == true'
70
- action: invoke
71
- - if: 'phase.is_critical_module == false'
72
- action: skip
73
-
74
- # ============================================================================
75
- # 可选 conditional (3 phase) — /qa /cso /design-review (按 phase fact context 独立触发)
76
- # ============================================================================
77
- - id: 05-qa-conditional
78
- name: gstack-qa (E2E QA 验收 — has_ui_changes 触发)
79
- upstream: gstack
80
- capability: '{{ capabilities.gstack-qa.cmd }}'
81
- model: sonnet
82
- max_iterations: 3
83
- on:
84
- - if: 'phase.has_ui_changes == true'
85
- action: invoke
86
- - if: 'phase.has_ui_changes == false'
87
- action: skip
88
-
89
- - id: 06-cso-conditional
90
- name: gstack-cso (安全审查 OWASP/auth/secrets — has_auth_or_secrets 触发)
91
- upstream: gstack
92
- capability: '{{ capabilities.gstack-cso.cmd }}'
93
- model: opus
94
- max_iterations: 3
95
- on:
96
- - if: 'phase.has_auth_or_secrets == true'
97
- action: invoke
98
- - if: 'phase.has_auth_or_secrets == false'
99
- action: skip
100
-
101
- - id: 07-design-review-conditional
102
- name: gstack-design-review (设计系统一致性 + AI 审美问题 — has_design_changes 触发)
103
- upstream: gstack
104
- capability: '{{ capabilities.gstack-design-review.cmd }}'
105
- model: sonnet
106
- max_iterations: 3
107
- on:
108
- - if: 'phase.has_design_changes == true'
109
- action: invoke
110
- - if: 'phase.has_design_changes == false'
111
- action: skip
112
-
113
- # ============================================================================
114
- # 末尾串行 (1 phase) — code-simplifier (移除重复/多余逻辑)
115
- # ============================================================================
116
- - id: 08-code-simplifier
117
- name: code-simplifier (末尾串行 — 简化 + 移除重复)
118
- upstream: mattpocock-skills
119
- capability: '{{ capabilities.code-simplifier.cmd }}'
120
- model: sonnet
121
- max_iterations: '{{ defaults.ralph_max_iterations.verify-work.04-code-simplifier }}'
122
-
123
- # ============================================================================
124
- # Agent Team 升级 (1 phase) — 关键发布 / 大重构 PR 4-specialist Pattern C
125
- # ============================================================================
126
- # Bundled Agent Teams Pattern C — 多维度审查 (≥3 specialist 需要互相质询而非
127
- # fire-and-forget): code-review + gstack-review + gstack-cso + gstack-qa
128
- # team_cost < 2 × subagent_cost 估算前置 (开 team 前必估算; bundled cost guideline)
129
- # cleanup mandatory: SendMessage shutdown_request + TeamDelete (engine-level wiring)
130
- - id: 09-agent-team-multispecialist
131
- name: agent-team-upgrade (4-specialist Pattern C — 关键发布/大重构 多维度审查 互相质询)
132
- upstream: claude-platform
133
- capability: '{{ capabilities.agent-teams-create.cmd }}'
134
- model: opus
135
- max_iterations: 1
136
- parallelism: judgments.parallelism-gate.agent-teams-upgrade.fires
137
- on:
138
- - if: 'phase.is_major_release == true or phase.is_large_refactor == true'
139
- action: invoke
140
- - if: 'phase.is_major_release == false and phase.is_large_refactor == false'
141
- action: skip