harnessed 1.0.4 → 2.0.1
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/README.md +1 -1
- package/dist/cli.mjs +532 -247
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
- package/workflows/capabilities.yaml +413 -0
- package/workflows/defaults.yaml +36 -0
- package/workflows/execute-task/SKILL.md +22 -9
- package/workflows/execute-task/phases.yaml +60 -14
- package/workflows/judgments/fallback.yaml +35 -0
- package/workflows/judgments/parallelism-gate.yaml +47 -0
- package/workflows/judgments/phase-gate.yaml +17 -0
- package/workflows/judgments/strategic-gate.yaml +25 -0
- package/workflows/judgments/subtask-gate.yaml +17 -0
- package/workflows/judgments/tdd-gate.yaml +17 -0
- package/workflows/plan-feature/SKILL.md +56 -14
- package/workflows/plan-feature/workflow.yaml +66 -25
- package/workflows/research/SKILL.md +35 -0
- package/workflows/research/workflow.yaml +18 -0
- package/workflows/verify-work/SKILL.md +92 -0
- package/workflows/verify-work/workflow.yaml +143 -0
package/dist/index.mjs
CHANGED
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,
|
|
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\": \"2.0.1\",\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
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "AI coding harness package manager + composition orchestrator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
"ajv-formats": "^3.0.1",
|
|
76
76
|
"commander": "^13.0.0",
|
|
77
77
|
"diff": "^9.0.0",
|
|
78
|
+
"expr-eval": "^2.0.2",
|
|
78
79
|
"picocolors": "^1.1.1",
|
|
79
80
|
"proper-lockfile": "^4.1.2",
|
|
80
81
|
"yaml": "^2.9.0"
|
|
@@ -0,0 +1,413 @@
|
|
|
1
|
+
# <packageRoot>/workflows/capabilities.yaml — harnessed v2.0 capabilities baseline
|
|
2
|
+
#
|
|
3
|
+
# Maintainer-curated static manifest mapping abstract capability name → concrete
|
|
4
|
+
# impl + slash-cmd. Consumed by workflows/*/workflow.yaml v2 via `{{ capabilities.<name>.cmd }}`
|
|
5
|
+
# template interpolation (per R20.2 flat yaml map + R20.5 static manifest + ADR per upgrade).
|
|
6
|
+
#
|
|
7
|
+
# Pure bundled distribution (per R20.1 + D-01): end-user 不 override; maintainer 改此文件 +
|
|
8
|
+
# ADR 0024+ + npm patch release (2-3 day cycle). Schema = harnessed.capabilities.v1 (sister
|
|
9
|
+
# Phase 2.2 schemaVersion 7 surface convention).
|
|
10
|
+
#
|
|
11
|
+
# Entry buckets (5, total 35):
|
|
12
|
+
# 1. mattpocock 12 高频招式 (D-09) — grill-with-docs / zoom-out / diagnose / caveman /
|
|
13
|
+
# grill-me / tdd / to-prd / to-issues /
|
|
14
|
+
# improve-codebase-architecture / code-review /
|
|
15
|
+
# code-simplifier / investigate
|
|
16
|
+
# 2. special-purpose tools 13+ (D-14) — ui-ux-pro-max / frontend-design / playwright-cli /
|
|
17
|
+
# playwright-test / webapp-testing /
|
|
18
|
+
# chrome-devtools-mcp / ctx7 / tavily-mcp /
|
|
19
|
+
# exa-mcp / gsd-review / gsd-debug /
|
|
20
|
+
# gsd-progress / gsd-verify-work
|
|
21
|
+
# 3. gstack 治理关卡 6 (D-12) — gstack-office-hours / gstack-plan-ceo-review /
|
|
22
|
+
# gstack-review / gstack-qa / gstack-cso /
|
|
23
|
+
# gstack-design-review
|
|
24
|
+
# 4. 核心 capability 4 — tdd (D-13 alias) / planning-with-files (D-15 +
|
|
25
|
+
# Q-AUDIT-5a claude-code-plugin reframe) /
|
|
26
|
+
# ralph-loop (D-10) / superpowers-brainstorming
|
|
27
|
+
# 5. Agent Teams 3 (D-11 + Q-AUDIT-5b) — agent-teams-create / agent-teams-send-message /
|
|
28
|
+
# agent-teams-shutdown
|
|
29
|
+
schema_version: harnessed.capabilities.v1
|
|
30
|
+
|
|
31
|
+
capabilities:
|
|
32
|
+
|
|
33
|
+
# ============================================================================
|
|
34
|
+
# Bucket 1 — mattpocock 12 高频招式 (per D-09 + RESEARCH § 2.1)
|
|
35
|
+
# ============================================================================
|
|
36
|
+
|
|
37
|
+
grill-with-docs:
|
|
38
|
+
impl: mattpocock-skills
|
|
39
|
+
cmd: /grill-with-docs
|
|
40
|
+
since: v2.0
|
|
41
|
+
description: 规格澄清 with docs (fires when phase.spec_ambiguous == true)
|
|
42
|
+
fires_when:
|
|
43
|
+
- phase.spec_ambiguous == true
|
|
44
|
+
|
|
45
|
+
zoom-out:
|
|
46
|
+
impl: mattpocock-skills
|
|
47
|
+
cmd: /zoom-out
|
|
48
|
+
since: v2.0
|
|
49
|
+
description: 陌生模块导航 (fires when subtask.unfamiliar_module == true)
|
|
50
|
+
fires_when:
|
|
51
|
+
- subtask.unfamiliar_module == true
|
|
52
|
+
|
|
53
|
+
diagnose:
|
|
54
|
+
impl: mattpocock-skills
|
|
55
|
+
cmd: /diagnose
|
|
56
|
+
since: v2.0
|
|
57
|
+
description: 系统化排错 (fires when test_fail OR debug context)
|
|
58
|
+
fires_when:
|
|
59
|
+
- subtask.test_fail == true
|
|
60
|
+
- subtask.type == 'debug'
|
|
61
|
+
|
|
62
|
+
caveman:
|
|
63
|
+
impl: mattpocock-skills
|
|
64
|
+
cmd: /caveman
|
|
65
|
+
since: v2.0
|
|
66
|
+
description: token 紧张时 surgical edit (fires when token_tight == true)
|
|
67
|
+
fires_when:
|
|
68
|
+
- subtask.token_tight == true
|
|
69
|
+
|
|
70
|
+
grill-me:
|
|
71
|
+
impl: mattpocock-skills
|
|
72
|
+
cmd: /grill-me
|
|
73
|
+
since: v2.0
|
|
74
|
+
description: 反向追问 (fires when spec_ambiguous AND no_docs)
|
|
75
|
+
fires_when:
|
|
76
|
+
- phase.spec_ambiguous == true AND phase.no_docs == true
|
|
77
|
+
|
|
78
|
+
to-prd:
|
|
79
|
+
impl: mattpocock-skills
|
|
80
|
+
cmd: /to-prd
|
|
81
|
+
since: v2.0
|
|
82
|
+
description: translate idea → PRD (fires when phase.translate_idea_to_prd == true)
|
|
83
|
+
fires_when:
|
|
84
|
+
- phase.translate_idea_to_prd == true
|
|
85
|
+
|
|
86
|
+
to-issues:
|
|
87
|
+
impl: mattpocock-skills
|
|
88
|
+
cmd: /to-issues
|
|
89
|
+
since: v2.0
|
|
90
|
+
description: translate PRD → issues (fires when phase.translate_prd_to_issues == true)
|
|
91
|
+
fires_when:
|
|
92
|
+
- phase.translate_prd_to_issues == true
|
|
93
|
+
|
|
94
|
+
improve-codebase-architecture:
|
|
95
|
+
impl: mattpocock-skills
|
|
96
|
+
cmd: /improve-codebase-architecture
|
|
97
|
+
since: v2.0
|
|
98
|
+
description: architecture health audit (fires when phase.architecture_health_audit == true)
|
|
99
|
+
fires_when:
|
|
100
|
+
- phase.architecture_health_audit == true
|
|
101
|
+
|
|
102
|
+
code-review:
|
|
103
|
+
impl: mattpocock-skills
|
|
104
|
+
cmd: /code-review
|
|
105
|
+
since: v2.0
|
|
106
|
+
description: verify-work parallel fan-out (multi-agent high-confidence findings)
|
|
107
|
+
fires_when:
|
|
108
|
+
- phase.stage == 'verify'
|
|
109
|
+
|
|
110
|
+
code-simplifier:
|
|
111
|
+
impl: mattpocock-skills
|
|
112
|
+
cmd: /code-simplifier
|
|
113
|
+
since: v2.0
|
|
114
|
+
description: verify-work tail step (移除重复、多余逻辑)
|
|
115
|
+
fires_when:
|
|
116
|
+
- phase.stage == 'verify' AND phase.is_final_step == true
|
|
117
|
+
|
|
118
|
+
investigate:
|
|
119
|
+
impl: mattpocock-skills
|
|
120
|
+
cmd: /investigate
|
|
121
|
+
since: v2.0
|
|
122
|
+
description: gstack-routed bug investigation (fires when bug_root_cause_unknown)
|
|
123
|
+
fires_when:
|
|
124
|
+
- subtask.bug_root_cause_unknown == true
|
|
125
|
+
|
|
126
|
+
# Note: 剩 11 mattpocock 招式 (e.g., /retro, /ship, /office-hours-alias 等) 推 v2.x patch
|
|
127
|
+
# release per D-09 (manifest-only since: v2.x — 实际未 wire 至 workflow.yaml 的 entry 不在
|
|
128
|
+
# v2.0 baseline 中)。
|
|
129
|
+
|
|
130
|
+
# ============================================================================
|
|
131
|
+
# Bucket 2 — special-purpose tools 13 (per D-14 + RESEARCH § 2.2)
|
|
132
|
+
# ============================================================================
|
|
133
|
+
|
|
134
|
+
ui-ux-pro-max:
|
|
135
|
+
impl: gstack
|
|
136
|
+
cmd: /ui-ux-pro-max
|
|
137
|
+
since: v2.0
|
|
138
|
+
description: UI/UX 默认主方案 数据驱动 (per ~/.claude/rules/web-design.md L5)
|
|
139
|
+
fires_when:
|
|
140
|
+
- phase.has_ui_changes == true
|
|
141
|
+
- subtask.type == 'ui_polish'
|
|
142
|
+
|
|
143
|
+
frontend-design:
|
|
144
|
+
impl: gstack
|
|
145
|
+
cmd: /frontend-design
|
|
146
|
+
since: v2.0
|
|
147
|
+
description: UI 创意/装饰补充 (per ~/.claude/rules/web-design.md L11)
|
|
148
|
+
fires_when:
|
|
149
|
+
- phase.has_ui_changes == true AND phase.requires_creative_polish == true
|
|
150
|
+
|
|
151
|
+
playwright-cli:
|
|
152
|
+
impl: npm-cli
|
|
153
|
+
cmd: playwright
|
|
154
|
+
since: v2.0
|
|
155
|
+
description: AI 实时操作浏览器 一行 Bash (per ~/.claude/rules/web-testing.md L8 手)
|
|
156
|
+
fires_when:
|
|
157
|
+
- subtask.type == 'browser_probe'
|
|
158
|
+
|
|
159
|
+
playwright-test:
|
|
160
|
+
impl: npm-cli
|
|
161
|
+
cmd: "@playwright/test"
|
|
162
|
+
since: v2.0
|
|
163
|
+
description: E2E test framework TypeScript (per ~/.claude/rules/web-testing.md L8 脑)
|
|
164
|
+
fires_when:
|
|
165
|
+
- subtask.type == 'e2e_test' AND subtask.language == 'typescript'
|
|
166
|
+
|
|
167
|
+
webapp-testing:
|
|
168
|
+
impl: gstack
|
|
169
|
+
cmd: /webapp-testing
|
|
170
|
+
since: v2.0
|
|
171
|
+
description: Python 后端联动 E2E (per ~/.claude/rules/web-testing.md L11 筋骨)
|
|
172
|
+
fires_when:
|
|
173
|
+
- subtask.type == 'e2e_test' AND subtask.language == 'python'
|
|
174
|
+
|
|
175
|
+
chrome-devtools-mcp:
|
|
176
|
+
impl: mcp
|
|
177
|
+
cmd: chrome-devtools
|
|
178
|
+
since: v2.0
|
|
179
|
+
description: 性能/a11y/内存泄漏诊断 (per ~/.claude/rules/web-testing.md L45 非功能性)
|
|
180
|
+
fires_when:
|
|
181
|
+
- subtask.type in ['perf_diagnose', 'a11y_audit', 'memory_leak']
|
|
182
|
+
|
|
183
|
+
ctx7:
|
|
184
|
+
impl: cli
|
|
185
|
+
cmd: ctx7
|
|
186
|
+
since: v2.0
|
|
187
|
+
description: 库 API/框架/SDK 文档抓取 (per ~/.claude/rules/context7.md)
|
|
188
|
+
fires_when:
|
|
189
|
+
- subtask.needs_library_docs == true
|
|
190
|
+
|
|
191
|
+
tavily-mcp:
|
|
192
|
+
impl: mcp
|
|
193
|
+
cmd: tavily_search
|
|
194
|
+
since: v2.0
|
|
195
|
+
description: Web 搜索默认 (关键词/库 API/时效) per ~/.claude/rules/web-search.md L17
|
|
196
|
+
fires_when:
|
|
197
|
+
- subtask.needs_web_search == true
|
|
198
|
+
|
|
199
|
+
exa-mcp:
|
|
200
|
+
impl: mcp
|
|
201
|
+
cmd: web_fetch_exa
|
|
202
|
+
since: v2.0
|
|
203
|
+
description: 描述式/学术 Web 搜索 per ~/.claude/rules/web-search.md L24
|
|
204
|
+
fires_when:
|
|
205
|
+
- subtask.needs_web_search == true AND subtask.search_type in ['descriptive', 'academic']
|
|
206
|
+
|
|
207
|
+
gsd-discuss-phase:
|
|
208
|
+
impl: gsd
|
|
209
|
+
cmd: /gsd-discuss-phase
|
|
210
|
+
since: v2.0
|
|
211
|
+
description: GSD discuss-phase 灰色澄清 (Phase 层判据 sister judgments/phase-gate.yaml)
|
|
212
|
+
fires_when:
|
|
213
|
+
- phase.open_decisions >= 2 OR phase.scope_days > 1
|
|
214
|
+
|
|
215
|
+
gsd-plan-phase:
|
|
216
|
+
impl: gsd
|
|
217
|
+
cmd: /gsd-plan-phase
|
|
218
|
+
since: v2.0
|
|
219
|
+
description: GSD plan-phase Wave A research + Wave B planner + Wave C plan-checker
|
|
220
|
+
fires_when:
|
|
221
|
+
- phase.stage == 'plan'
|
|
222
|
+
|
|
223
|
+
gsd-review:
|
|
224
|
+
impl: gsd
|
|
225
|
+
cmd: /gsd-review
|
|
226
|
+
since: v2.0
|
|
227
|
+
description: GSD cross-AI peer review
|
|
228
|
+
fires_when:
|
|
229
|
+
- phase.stage == 'verify' AND phase.requires_peer_review == true
|
|
230
|
+
|
|
231
|
+
gsd-debug:
|
|
232
|
+
impl: gsd
|
|
233
|
+
cmd: /gsd-debug
|
|
234
|
+
since: v2.0
|
|
235
|
+
description: GSD systematic debugging (overlap with mattpocock /diagnose — alias)
|
|
236
|
+
aliases:
|
|
237
|
+
- { impl: mattpocock-skills, cmd: /diagnose }
|
|
238
|
+
fires_when:
|
|
239
|
+
- subtask.type == 'debug'
|
|
240
|
+
|
|
241
|
+
gsd-progress:
|
|
242
|
+
impl: gsd
|
|
243
|
+
cmd: /gsd-progress
|
|
244
|
+
since: v2.0
|
|
245
|
+
description: GSD 状态同步 (verify-work serial after gsd-verify-work)
|
|
246
|
+
fires_when:
|
|
247
|
+
- phase.stage == 'verify'
|
|
248
|
+
|
|
249
|
+
gsd-verify-work:
|
|
250
|
+
impl: gsd
|
|
251
|
+
cmd: /gsd-verify-work
|
|
252
|
+
since: v2.0
|
|
253
|
+
description: verify-work entry (Stage ④ Verify 起点)
|
|
254
|
+
fires_when:
|
|
255
|
+
- phase.stage == 'verify'
|
|
256
|
+
|
|
257
|
+
# ============================================================================
|
|
258
|
+
# Bucket 3 — gstack 治理关卡 6 (per D-12 + CLAUDE.md "gstack 治理关卡")
|
|
259
|
+
# ============================================================================
|
|
260
|
+
|
|
261
|
+
gstack-office-hours:
|
|
262
|
+
impl: gstack
|
|
263
|
+
cmd: /office-hours
|
|
264
|
+
since: v2.0
|
|
265
|
+
description: 战略层产品理念/商业 scope 澄清 (sister CLAUDE.md "新功能启动前强制")
|
|
266
|
+
fires_when:
|
|
267
|
+
- phase.type in ['new_project', 'new_milestone', 'new_feature']
|
|
268
|
+
|
|
269
|
+
gstack-plan-ceo-review:
|
|
270
|
+
impl: gstack
|
|
271
|
+
cmd: /plan-ceo-review
|
|
272
|
+
since: v2.0
|
|
273
|
+
description: 战略评估 CEO 视角 (新功能启动前强制 sister CLAUDE.md)
|
|
274
|
+
fires_when:
|
|
275
|
+
- phase.type == 'new_feature' AND phase.has_business_decisions == true
|
|
276
|
+
|
|
277
|
+
gstack-review:
|
|
278
|
+
impl: gstack
|
|
279
|
+
cmd: /review
|
|
280
|
+
since: v2.0
|
|
281
|
+
description: Paranoid Staff Engineer 视角 (关键模块 PR 前强制 sister CLAUDE.md)
|
|
282
|
+
fires_when:
|
|
283
|
+
- phase.is_critical_module == true
|
|
284
|
+
|
|
285
|
+
gstack-qa:
|
|
286
|
+
impl: gstack
|
|
287
|
+
cmd: /qa
|
|
288
|
+
since: v2.0
|
|
289
|
+
description: 端到端 QA 验收 (可选 conditional)
|
|
290
|
+
fires_when:
|
|
291
|
+
- phase.stage == 'verify' AND phase.has_ui_changes == true
|
|
292
|
+
|
|
293
|
+
gstack-cso:
|
|
294
|
+
impl: gstack
|
|
295
|
+
cmd: /cso
|
|
296
|
+
since: v2.0
|
|
297
|
+
description: 安全审查 OWASP/auth/secrets (可选 conditional)
|
|
298
|
+
fires_when:
|
|
299
|
+
- phase.stage == 'verify' AND phase.has_auth_or_secrets == true
|
|
300
|
+
|
|
301
|
+
gstack-design-review:
|
|
302
|
+
impl: gstack
|
|
303
|
+
cmd: /design-review
|
|
304
|
+
since: v2.0
|
|
305
|
+
description: 设计系统一致性审查 + AI 审美问题识别 (可选 conditional)
|
|
306
|
+
fires_when:
|
|
307
|
+
- phase.stage == 'verify' AND phase.has_design_changes == true
|
|
308
|
+
|
|
309
|
+
# ============================================================================
|
|
310
|
+
# Bucket 4 — 核心 capability 4 (per D-10 + D-13 + D-15 Q-AUDIT-5a + RESEARCH § 2.3)
|
|
311
|
+
# ============================================================================
|
|
312
|
+
|
|
313
|
+
# D-13: tdd entry 2 impl 候选 alias (superpowers 主 + mattpocock /tdd 备)
|
|
314
|
+
tdd:
|
|
315
|
+
impl: superpowers
|
|
316
|
+
cmd: "superpowers:test-driven-development"
|
|
317
|
+
since: v2.0
|
|
318
|
+
description: TDD red-green-refactor (gated by judgments/tdd-gate.yaml fires_when)
|
|
319
|
+
aliases:
|
|
320
|
+
- { impl: mattpocock-skills, cmd: /tdd }
|
|
321
|
+
fires_when:
|
|
322
|
+
- subtask.is_core_business_logic == true
|
|
323
|
+
- subtask.is_algorithm == true
|
|
324
|
+
- subtask.is_data_processing == true
|
|
325
|
+
- subtask.regression_risk == 'high'
|
|
326
|
+
- subtask.reliability_required == true
|
|
327
|
+
|
|
328
|
+
# D-15 + Q-AUDIT-5a: planning-with-files impl = claude-code-plugin (NOT npm-sdk; verified
|
|
329
|
+
# 2026-05-20 npm registry 404 reframe terminology drift). Real Claude Code plugin slash
|
|
330
|
+
# cmd `/plan` invocation → plugin 真生成 3 file 持久化, NOT fs.writeFile self-impl。
|
|
331
|
+
planning-with-files:
|
|
332
|
+
impl: claude-code-plugin
|
|
333
|
+
cmd: /plan
|
|
334
|
+
since: v2.0
|
|
335
|
+
description: Manus-style persistent markdown planning (Claude Code plugin slash cmd)
|
|
336
|
+
requires:
|
|
337
|
+
plugin: planning-with-files >=2.2.0
|
|
338
|
+
plugin_path: ~/.claude/plugins/cache/planning-with-files/planning-with-files/2.34.0
|
|
339
|
+
outputs:
|
|
340
|
+
- task_plan.md
|
|
341
|
+
- progress.md
|
|
342
|
+
- findings.md
|
|
343
|
+
fires_when:
|
|
344
|
+
- phase.stage == 'plan' AND phase.requires_persisted_plan == true
|
|
345
|
+
|
|
346
|
+
# D-10: ralph-loop 真接 SDK wrapper (NOT mock reference; sister Phase 2.2 v0.2.0 ship)
|
|
347
|
+
ralph-loop:
|
|
348
|
+
impl: bundled-skill
|
|
349
|
+
cmd: ralph-loop
|
|
350
|
+
since: v2.0
|
|
351
|
+
description: Sub-task completion gate (verbatim COMPLETE; max-iterations fallback)
|
|
352
|
+
sdk_ref: src/routing/lib/ralphLoop.ts
|
|
353
|
+
fires_when:
|
|
354
|
+
- subtask.completion_required == true
|
|
355
|
+
|
|
356
|
+
superpowers-brainstorming:
|
|
357
|
+
impl: superpowers
|
|
358
|
+
cmd: "superpowers:brainstorming"
|
|
359
|
+
since: v2.0
|
|
360
|
+
description: 子任务级澄清 multi-approach 探索 (gated by judgments/subtask-gate.yaml)
|
|
361
|
+
fires_when:
|
|
362
|
+
- subtask.approaches >= 2
|
|
363
|
+
- subtask.core_algorithm == true
|
|
364
|
+
- subtask.has_api_contract == true
|
|
365
|
+
- subtask.error_cost == 'high'
|
|
366
|
+
|
|
367
|
+
# ============================================================================
|
|
368
|
+
# Bucket 5 — Agent Teams 3 升级触发 (per D-11 + Q-AUDIT-5b schema fix +
|
|
369
|
+
# ~/.claude/rules/agent-teams.md L7 prereq)
|
|
370
|
+
# ============================================================================
|
|
371
|
+
#
|
|
372
|
+
# Q-AUDIT-5b 2026-05-20 fix: settings_env_var root-level `env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS`
|
|
373
|
+
# (NOT nested experimental.* — Wave A 本地 settings.json 实证修正 prior schema 错误)。
|
|
374
|
+
# Per Q-AUDIT-2 D-11: harnessed doctor + setup 检查 env var present + cc_version ≥2.1.133。
|
|
375
|
+
#
|
|
376
|
+
# 5 fires_when OR-chain (multi-select per ~/.claude/rules/agent-teams.md 升级触发):
|
|
377
|
+
# 1. teammate_send_message_needed — teammate 间需 SendMessage 互通 (NOT fire-and-forget)
|
|
378
|
+
# 2. subagent_context_overflow — 某 subagent 撞 context 上限需分担
|
|
379
|
+
# 3. shared_task_list — 多 teammate 共享 task list 自协调
|
|
380
|
+
# 4. opposing_hypothesis_debate — 对立假设辩论 (两 teammate 各守一假说 + lead 裁判)
|
|
381
|
+
# 5. fullstack_three_way — 全栈三路协同 (前端 + 后端 + 测试同步 + API contract)
|
|
382
|
+
agent-teams-create:
|
|
383
|
+
impl: claude-platform
|
|
384
|
+
cmd: TeamCreate
|
|
385
|
+
since: v2.0
|
|
386
|
+
description: Agent Teams team 创建 (CC 2.1.133+ experimental; per agent-teams.md L7)
|
|
387
|
+
requires:
|
|
388
|
+
settings_env_var: env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS == "1"
|
|
389
|
+
cc_version: ">=2.1.133"
|
|
390
|
+
fires_when:
|
|
391
|
+
- teammate_send_message_needed == true
|
|
392
|
+
- subagent_context_overflow == true
|
|
393
|
+
- shared_task_list == true
|
|
394
|
+
- opposing_hypothesis_debate == true
|
|
395
|
+
- fullstack_three_way == true
|
|
396
|
+
|
|
397
|
+
agent-teams-send-message:
|
|
398
|
+
impl: claude-platform
|
|
399
|
+
cmd: SendMessage
|
|
400
|
+
since: v2.0
|
|
401
|
+
description: Agent Teams teammate 间通信 (round-trip 已验证 2026-05-19)
|
|
402
|
+
requires:
|
|
403
|
+
settings_env_var: env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS == "1"
|
|
404
|
+
cc_version: ">=2.1.133"
|
|
405
|
+
|
|
406
|
+
agent-teams-shutdown:
|
|
407
|
+
impl: claude-platform
|
|
408
|
+
cmd: TeamDelete
|
|
409
|
+
since: v2.0
|
|
410
|
+
description: Agent Teams cleanup (shutdown_request 之后 TeamDelete; sister agent-teams.md 防呆清单)
|
|
411
|
+
requires:
|
|
412
|
+
settings_env_var: env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS == "1"
|
|
413
|
+
cc_version: ">=2.1.133"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# harnessed v2.0 workflow defaults
|
|
2
|
+
# Phase v2.0-2.3 W1.2 ship — ralph_max_iterations table per R20.10 + D-10 fallback abort path
|
|
3
|
+
# Sister Phase 2.2 STRIDE T-2.2-05 DoS mitigation: hard_upper_limit = 100 caps any user override
|
|
4
|
+
# Phase 2.4 workflow.yaml v2 interpolation: {{ defaults.ralph_max_iterations.<workflow>.<phase> }}
|
|
5
|
+
|
|
6
|
+
schema_version: harnessed.defaults.v1
|
|
7
|
+
|
|
8
|
+
# Per-workflow per-phase ralph-loop iteration ceiling
|
|
9
|
+
# Values balance: completion guarantee vs DoS prevention; sister ADR 0011 v0.2.0 ralph-loop SDK pattern
|
|
10
|
+
ralph_max_iterations:
|
|
11
|
+
execute-task:
|
|
12
|
+
01-clarify: 5
|
|
13
|
+
02-code: 20
|
|
14
|
+
03-test: 15
|
|
15
|
+
04-deliver: 20
|
|
16
|
+
|
|
17
|
+
plan-feature:
|
|
18
|
+
01-gstack-decision: 1
|
|
19
|
+
02-brainstorm: 5
|
|
20
|
+
03-gsd-discuss: 3
|
|
21
|
+
04-gsd-plan: 3
|
|
22
|
+
05-persist: 5
|
|
23
|
+
|
|
24
|
+
research:
|
|
25
|
+
01-fan-out: 3
|
|
26
|
+
02-synth: 3
|
|
27
|
+
|
|
28
|
+
verify-work:
|
|
29
|
+
01-gsd-verify-work: 3
|
|
30
|
+
02-code-review: 5
|
|
31
|
+
03-gstack-review: 3
|
|
32
|
+
04-code-simplifier: 5
|
|
33
|
+
|
|
34
|
+
# Hard upper limit — workflow engine rejects any user override > this value
|
|
35
|
+
# Sister Phase 2.2 STRIDE T-2.2-05 DoS mitigation
|
|
36
|
+
hard_upper_limit: 100
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: execute-task
|
|
3
3
|
description: |
|
|
4
|
-
execute-task workflow — 4-phase chain (brainstorming → karpathy
|
|
4
|
+
execute-task workflow v2 — 4-phase chain (brainstorming → karpathy + mattpocock route → TDD + diagnose → ralph-loop COMPLETE)
|
|
5
5
|
triggered by harnessed CLI `harnessed execute-task --task <text>`.
|
|
6
|
+
v2 delta (Phase v2.0-2.4 W1.1): schema_version: harnessed.workflow.v2 + ralph-loop 真接 SDK wrapper +
|
|
7
|
+
tdd-gate conditional + mattpocock route by condition (grill-with-docs / zoom-out / diagnose) +
|
|
8
|
+
explicit max_iterations_exceeded fallback (R20.10 NOT silent abort).
|
|
6
9
|
trigger_phrases:
|
|
7
10
|
# forward-looking documentation — auto-invocation 实装推 Phase 2.3 extension category (B-28).
|
|
8
11
|
# Current enforced entry surface is the CLI subcommand below; these phrases are
|
|
@@ -13,23 +16,33 @@ trigger_phrases:
|
|
|
13
16
|
- "跑 execute-task"
|
|
14
17
|
---
|
|
15
18
|
|
|
16
|
-
# execute-task workflow
|
|
19
|
+
# execute-task workflow (v2)
|
|
17
20
|
|
|
18
21
|
## Overview
|
|
19
22
|
|
|
20
23
|
4-phase chain mapping the user's CLAUDE.md Execute-phase discipline onto the harnessed
|
|
21
|
-
runtime (ADR 0011 — SDK + ralph-loop integration):
|
|
24
|
+
runtime (ADR 0011 — SDK + ralph-loop integration; v2 schema upgrade T2.4.W1.1):
|
|
22
25
|
|
|
23
|
-
| phase | id | upstream | model (intel CD-2 § 第 4 条) |
|
|
26
|
+
| phase | id | upstream | model (intel CD-2 § 第 4 条) | v2 wiring |
|
|
24
27
|
| ----- | -- | -------- | ---------------------------- | --------- |
|
|
25
|
-
| 1 | `01-clarify` | `superpowers brainstorming` | opus |
|
|
26
|
-
| 2 | `02-code` | `karpathy` 心法 always-on | sonnet |
|
|
27
|
-
| 3 | `03-test` | `superpowers TDD` +
|
|
28
|
-
| 4 | `04-deliver` | `ralph-loop` | haiku |
|
|
28
|
+
| 1 | `01-clarify` | `superpowers brainstorming` | opus | `capability: superpowers-brainstorming` + `gate: judgments.subtask-gate.brainstorming.fires` |
|
|
29
|
+
| 2 | `02-code` | `karpathy` 心法 always-on | sonnet | `on[]` route to tdd-gate / grill-with-docs / zoom-out (D-09 + D-13) |
|
|
30
|
+
| 3 | `03-test` | `superpowers TDD` | sonnet | `capability: tdd` + `on[]` route to diagnose on test_fail (D-13 + D-09) |
|
|
31
|
+
| 4 | `04-deliver` | `ralph-loop` | haiku | `capability: ralph-loop` + `args: {completion_promise: COMPLETE}` + `gate/parallelism: judgments.parallelism-gate.*` + `fallback.max_iterations_exceeded: emit_warning_and_halt` (R20.10) |
|
|
32
|
+
|
|
33
|
+
v2 schema fields per `src/workflow/schema/workflow.ts` (T2.4.W0.1 16th surface — harnessed.workflow.v2):
|
|
34
|
+
- `capability: '{{ capabilities.<name>.cmd }}'` template interpolation (D-10 capability abstraction)
|
|
35
|
+
- `gate: judgments.<file>.<gate>.fires` 4-level ref (pre-resolved by T2.3.W0.4 judgmentResolver)
|
|
36
|
+
- `on: [{if, invoke|action}]` conditional clause (D-09 mattpocock route by condition)
|
|
37
|
+
- `args: {completion_promise, max_iterations}` ralph-loop SDK params (R20.10 verbatim COMPLETE gate)
|
|
38
|
+
- `parallelism: judgments.parallelism-gate.<route>.fires` (D-11 subagent / Agent Teams / main session route)
|
|
39
|
+
- `fallback.max_iterations_exceeded: {action, message, exit_code}` (R20.10 acceptance c "explicit NOT silent")
|
|
29
40
|
|
|
30
41
|
Per-phase models load from `workflows/execute-task/phases.yaml`; engine.runRouting
|
|
31
42
|
spawns each phase as a sub-agent via `@anthropic-ai/claude-agent-sdk` 0.3.142+
|
|
32
|
-
(`AgentDefinition` 5-字段 unpack — ADR 0011 § 4).
|
|
43
|
+
(`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
|
+
+ 4-layer dual-signal `isComplete` (NOT 重写 — per RESEARCH § 3.1).
|
|
33
46
|
|
|
34
47
|
## CLI invocation (the only enforced entry — B-28)
|
|
35
48
|
|
|
@@ -1,27 +1,73 @@
|
|
|
1
|
-
# execute-task
|
|
2
|
-
#
|
|
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).
|
|
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
|
|
4
20
|
workflow: execute-task
|
|
21
|
+
description: 子任务执行 workflow — 4-phase 真接 ralph-loop SDK + tdd-gate conditional + mattpocock route by condition
|
|
5
22
|
phases:
|
|
6
23
|
- id: 01-clarify
|
|
7
24
|
name: brainstorming
|
|
8
25
|
upstream: superpowers brainstorming
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
max_iterations:
|
|
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
|
+
|
|
12
31
|
- id: 02-code
|
|
13
|
-
name: code (karpathy 心法 always-on)
|
|
32
|
+
name: code (karpathy 心法 always-on + mattpocock conditional route)
|
|
14
33
|
upstream: karpathy
|
|
15
34
|
model: sonnet
|
|
16
|
-
max_iterations:
|
|
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
|
+
|
|
17
44
|
- id: 03-test
|
|
18
|
-
name: test (conditional TDD +
|
|
45
|
+
name: test (conditional TDD + diagnose on fail)
|
|
19
46
|
upstream: superpowers TDD
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
max_iterations:
|
|
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
|
+
|
|
23
54
|
- id: 04-deliver
|
|
24
|
-
name: deliver (ralph-loop COMPLETE)
|
|
55
|
+
name: deliver (ralph-loop COMPLETE gate + max-iter fallback)
|
|
25
56
|
upstream: ralph-loop
|
|
26
|
-
|
|
27
|
-
|
|
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
|