harnessed 4.16.2 → 4.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +418 -112
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/manifests/optional/codegraph.yaml +8 -2
- package/manifests/skill-packs/mattpocock-skills.yaml +1 -1
- package/messages/en.json +2 -0
- package/messages/zh-Hans.json +2 -0
- package/package.json +1 -1
- package/routing/decision_rules.yaml +2 -5
- package/workflows/capabilities.yaml +25 -24
- package/workflows/role-prompts.yaml +9 -10
- package/workflows/role-prompts.zh-Hans.yaml +8 -10
- package/workflows/task/auto/SKILL.md +1 -2
- package/workflows/task/auto/SKILL.zh-Hans.md +1 -2
- package/workflows/task/auto/workflow.yaml +1 -2
- package/workflows/task/code/SKILL.md +13 -7
- package/workflows/task/code/SKILL.zh-Hans.md +13 -7
- package/workflows/task/code/workflow.yaml +6 -9
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,QAkGb,CAAA;;;AC/FO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"4.
|
|
1
|
+
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,QAkGb,CAAA;;;AC/FO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"4.19.0\",\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 \"harnessed-inject-state\": \"./bin/harnessed-inject-state.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 \"bin\",\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"]}
|
|
@@ -31,14 +31,20 @@ spec:
|
|
|
31
31
|
npm_version: ^1.0.0
|
|
32
32
|
idempotent_check: "command -v codegraph"
|
|
33
33
|
verify:
|
|
34
|
-
|
|
34
|
+
# v4.18.0 — `--version` instead of `status`: verify runs right after the
|
|
35
|
+
# global install (setup optional-offer / harnessed install), where no
|
|
36
|
+
# per-project .codegraph/ index exists yet — `status` semantics without a
|
|
37
|
+
# project context are unverified upstream; `--version` only asserts the
|
|
38
|
+
# binary is on PATH, which is exactly what this install step guarantees.
|
|
39
|
+
# The per-project index is the separate `codegraph init` (doctor hint).
|
|
40
|
+
cmd: "codegraph --version"
|
|
35
41
|
timeout_ms: 10000
|
|
36
42
|
expected_exit_code: 0
|
|
37
43
|
uninstall:
|
|
38
44
|
cmd: "codegraph uninstall --yes"
|
|
39
45
|
upstream_health:
|
|
40
46
|
stability: stable
|
|
41
|
-
last_check: "2026-
|
|
47
|
+
last_check: "2026-07-04"
|
|
42
48
|
last_known_good_version: "1.0.0"
|
|
43
49
|
fallback_action: warn
|
|
44
50
|
signed_by: easyinplay
|
|
@@ -4,7 +4,7 @@ kind: Manifest
|
|
|
4
4
|
metadata:
|
|
5
5
|
name: mattpocock-skills
|
|
6
6
|
display_name: mattpocock-skills
|
|
7
|
-
description:
|
|
7
|
+
description: Engineering/productivity skill pack (/diagnosing-bugs /tdd /grill-with-docs /to-prd etc.) by Matt Pocock.
|
|
8
8
|
upstream:
|
|
9
9
|
source: mattpocock/skills
|
|
10
10
|
homepage: https://github.com/mattpocock/skills
|
package/messages/en.json
CHANGED
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
"install.audit_hint": " fix: run 'harnessed audit' to inspect manifest issues",
|
|
34
34
|
"install.success": "installed {{name}}",
|
|
35
35
|
"install.success_with_version": "installed {{name}}@{{version}}",
|
|
36
|
+
"install.already_installed": "already-installed {{name}} (idempotent check hit; nothing to do)",
|
|
37
|
+
"install.already_installed_with_version": "already-installed {{name}}@{{version}} (idempotent check hit; nothing to do)",
|
|
36
38
|
"install.aborted": "aborted: {{reason}}",
|
|
37
39
|
|
|
38
40
|
"uninstall.dry_run.preview": "[dry-run] would uninstall '{{name}}' via method '{{method}}'",
|
package/messages/zh-Hans.json
CHANGED
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
"install.audit_hint": " fix: run 'harnessed audit' to inspect manifest issues",
|
|
34
34
|
"install.success": "installed {{name}}",
|
|
35
35
|
"install.success_with_version": "installed {{name}}@{{version}}",
|
|
36
|
+
"install.already_installed": "already-installed {{name}} (idempotent check hit; nothing to do)",
|
|
37
|
+
"install.already_installed_with_version": "already-installed {{name}}@{{version}} (idempotent check hit; nothing to do)",
|
|
36
38
|
"install.aborted": "aborted: {{reason}}",
|
|
37
39
|
|
|
38
40
|
"uninstall.dry_run.preview": "[dry-run] would uninstall '{{name}}' via method '{{method}}'",
|
package/package.json
CHANGED
|
@@ -269,8 +269,7 @@ rules:
|
|
|
269
269
|
ref: mattpocock_phases.execute.skills
|
|
270
270
|
primary_skills:
|
|
271
271
|
- diagnose
|
|
272
|
-
|
|
273
|
-
rationale: 系统化排错 — gsd execute-task + diagnose/zoom-out 招式主导
|
|
272
|
+
rationale: 系统化排错 — gsd execute-task + diagnose(/diagnosing-bugs)招式主导
|
|
274
273
|
|
|
275
274
|
- id: engineering-verify-pr
|
|
276
275
|
priority: 60
|
|
@@ -326,15 +325,13 @@ mattpocock_phases:
|
|
|
326
325
|
skills:
|
|
327
326
|
- tdd
|
|
328
327
|
- diagnose
|
|
329
|
-
- zoom-out
|
|
330
328
|
- caveman
|
|
331
329
|
- grill-with-docs
|
|
332
330
|
- playwright-cli
|
|
333
331
|
- improve-codebase-architecture
|
|
334
332
|
triggers:
|
|
335
333
|
- /tdd
|
|
336
|
-
- /
|
|
337
|
-
- /zoom-out
|
|
334
|
+
- /diagnosing-bugs
|
|
338
335
|
- /caveman
|
|
339
336
|
- /grill-with-docs
|
|
340
337
|
- /playwright-cli
|
|
@@ -8,11 +8,12 @@
|
|
|
8
8
|
# ADR 0024+ + npm patch release (2-3 day cycle). Schema = harnessed.capabilities.v1 (sister
|
|
9
9
|
# Phase 2.2 schemaVersion 7 surface convention).
|
|
10
10
|
#
|
|
11
|
-
# Entry buckets (5, total
|
|
12
|
-
#
|
|
11
|
+
# Entry buckets (5, total 38 — v13.0 P42 +gsd-eval-review[B2] +verification-before-completion[B4]; P43 +diagram[B7] +gsd-validate-phase[B2], +systematic-debugging alias on gsd-debug;
|
|
12
|
+
# 4.16.3 上游对账: -zoom-out[上游删除] / diagnose cmd → /diagnosing-bugs[上游改名] / investigate impl → gstack[mattpocock 上游消失]):
|
|
13
|
+
# 1. mattpocock 高频招式 (D-09) — grill-with-docs / diagnose(→/diagnosing-bugs) / caveman /
|
|
13
14
|
# grill-me / tdd / to-prd / to-issues /
|
|
14
15
|
# improve-codebase-architecture / code-review /
|
|
15
|
-
# code-simplifier
|
|
16
|
+
# code-simplifier
|
|
16
17
|
# 2. special-purpose tools 13+ (D-14) — ui-ux-pro-max / design-taste-frontend / playwright-cli /
|
|
17
18
|
# playwright-test / webapp-testing /
|
|
18
19
|
# chrome-devtools-mcp / ctx7 / tavily-mcp /
|
|
@@ -45,22 +46,17 @@ capabilities:
|
|
|
45
46
|
fires_when:
|
|
46
47
|
- phase.spec_ambiguous == true
|
|
47
48
|
|
|
48
|
-
zoom-out
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
skill_dir: zoom-out
|
|
52
|
-
cmd: /zoom-out
|
|
53
|
-
since: v2.0
|
|
54
|
-
category: tool-slash-cmd
|
|
55
|
-
description: 陌生模块导航 (fires when subtask.unfamiliar_module == true)
|
|
56
|
-
fires_when:
|
|
57
|
-
- subtask.unfamiliar_module == true
|
|
49
|
+
# v4.16.3 — zoom-out entry REMOVED (mattpocock 上游 2026-07 重构删除该 skill,无稳定
|
|
50
|
+
# 后继;用户指示不做兼容性保留)。引用面(task/code、task/auto、role-prompts、
|
|
51
|
+
# decision_rules)已同步清理。
|
|
58
52
|
|
|
59
53
|
diagnose:
|
|
60
54
|
impl: mattpocock-skills
|
|
61
55
|
install_type: user-skill
|
|
62
|
-
|
|
63
|
-
cmd
|
|
56
|
+
# v4.16.3 — 上游 2026-07 重构改名 diagnose → diagnosing-bugs(skills/engineering/
|
|
57
|
+
# diagnosing-bugs);capability KEY 保留 diagnose(引用面稳定),cmd/skill_dir 对齐上游。
|
|
58
|
+
skill_dir: diagnosing-bugs
|
|
59
|
+
cmd: /diagnosing-bugs
|
|
64
60
|
since: v2.0
|
|
65
61
|
category: tool-slash-cmd
|
|
66
62
|
description: 系统化排错 (fires when test_fail OR debug context)
|
|
@@ -160,13 +156,17 @@ capabilities:
|
|
|
160
156
|
- phase.stage == 'verify' AND phase.is_final_step == true
|
|
161
157
|
|
|
162
158
|
investigate:
|
|
163
|
-
impl
|
|
159
|
+
# v4.16.3 — impl mattpocock-skills → gstack:上游 mattpocock/skills 2026-07 重构后
|
|
160
|
+
# 不再有 investigate skill;gstack 的 /investigate(系统化根因调试)是现存实现。
|
|
161
|
+
# KEY 保留 investigate(引用面稳定);sister Bucket 7 investigate-gstack 为同实现的
|
|
162
|
+
# namespace-suffix 兼容别名。
|
|
163
|
+
impl: gstack
|
|
164
164
|
install_type: user-skill
|
|
165
|
-
skill_dir:
|
|
165
|
+
skill_dir: gstack
|
|
166
166
|
cmd: /investigate
|
|
167
167
|
since: v2.0
|
|
168
168
|
category: tool-slash-cmd
|
|
169
|
-
description: gstack
|
|
169
|
+
description: gstack bug investigation (fires when bug_root_cause_unknown)
|
|
170
170
|
fires_when:
|
|
171
171
|
- subtask.bug_root_cause_unknown == true
|
|
172
172
|
|
|
@@ -318,12 +318,13 @@ capabilities:
|
|
|
318
318
|
cmd: /gsd-debug
|
|
319
319
|
since: v2.0
|
|
320
320
|
category: tool-slash-cmd
|
|
321
|
-
description: GSD systematic debugging (overlap with mattpocock /
|
|
321
|
+
description: GSD systematic debugging (overlap with mattpocock /diagnosing-bugs + superpowers systematic-debugging — alias)
|
|
322
322
|
# ADR-0034 Finding 1 — ECC per-language build-resolvers收编 as debug/verify-dimension
|
|
323
323
|
# aliases (build-failure fix; runtime picks language-matching one). Opt-in: no-op
|
|
324
324
|
# when ECC absent.
|
|
325
325
|
aliases:
|
|
326
|
-
|
|
326
|
+
# v4.16.3 — 上游改名 diagnose → diagnosing-bugs
|
|
327
|
+
- { impl: mattpocock-skills, cmd: /diagnosing-bugs }
|
|
327
328
|
# v13.0 P43 — superpowers-native debug alias (双 impl 备选, sister tdd superpowers主/mattpocock备)
|
|
328
329
|
- { impl: superpowers, cmd: "superpowers:systematic-debugging" }
|
|
329
330
|
- { impl: ecc, cmd: "ecc:rust-build" }
|
|
@@ -658,7 +659,7 @@ capabilities:
|
|
|
658
659
|
# (sister project CLAUDE.md gstack skill routing 直接 invoke cmd 名)。
|
|
659
660
|
# 例外 2 alias suffix `-gstack` 避免命名冲突:
|
|
660
661
|
# - retro-gstack (alias to harnessed standalone /retro)
|
|
661
|
-
# - investigate-gstack (alias
|
|
662
|
+
# - investigate-gstack (namespace-suffix alias of Bucket 1 investigate; v4.16.3 起同为 gstack impl)
|
|
662
663
|
# carrier name 自带 `gstack` 字符串 (NOT prefix policy): open-gstack-browser, gstack-upgrade
|
|
663
664
|
|
|
664
665
|
autoplan:
|
|
@@ -1069,9 +1070,9 @@ capabilities:
|
|
|
1069
1070
|
cmd: /investigate
|
|
1070
1071
|
since: v3.0
|
|
1071
1072
|
category: tool-slash-cmd
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1073
|
+
# v4.16.3 — mattpocock alias 移除(上游重构后无 investigate skill);本 entry 现为
|
|
1074
|
+
# Bucket 1 investigate(同 gstack 实现)的 namespace-suffix 兼容别名。
|
|
1075
|
+
description: gstack bug investigation (namespace-suffix alias of investigate)
|
|
1075
1076
|
fires_when:
|
|
1076
1077
|
- subtask.bug_root_cause_unknown == true
|
|
1077
1078
|
|
|
@@ -305,21 +305,20 @@ prompts:
|
|
|
305
305
|
responsibility: |
|
|
306
306
|
Implement a single subtask under karpathy 4 心法 (Think Before Coding /
|
|
307
307
|
Simplicity First / Surgical Changes / Goal-Driven Execution) with
|
|
308
|
-
≤200 LOC per file. Conditionally invoke `/
|
|
309
|
-
|
|
310
|
-
|
|
308
|
+
≤200 LOC per file. Conditionally invoke `/improve-codebase-architecture`
|
|
309
|
+
for periodic health audits, `/diagnosing-bugs` for unknown bug root
|
|
310
|
+
causes. Update `progress.md` via
|
|
311
311
|
planning-with-files `/plan` when done.
|
|
312
312
|
checklist:
|
|
313
313
|
- "Before any edit: read the file you intend to change end-to-end"
|
|
314
|
+
# v4.17.0 — CodeGraph light wiring (opt-in; sister capabilities.yaml `codegraph` entry)
|
|
315
|
+
- "Codebase navigation: if the project has a `.codegraph/` index, prefer the codegraph MCP tools (`codegraph_explore`) for symbol lookup / call paths / impact analysis instead of grep/glob/file-by-file Read crawling"
|
|
314
316
|
- "Smallest change that satisfies the acceptance criteria — no scope creep"
|
|
315
317
|
- "≤200 LOC per file (split modules if growing past it)"
|
|
316
318
|
- "Trust internal code: don't re-validate already-checked inputs at every layer"
|
|
317
319
|
- "No speculative abstractions (no 'just in case' generics)"
|
|
318
320
|
- "Edit with surgical precision: full path, exact selectors, no broad rewrites"
|
|
319
321
|
- "Update progress.md before declaring done (planning-with-files `/plan`)"
|
|
320
|
-
# zoom-out methodology paraphrased from mattpocock/skills (MIT, b8be62f)
|
|
321
|
-
# Source: skills/engineering/zoom-out/SKILL.md
|
|
322
|
-
- "zoom-out: when unfamiliar with an area, go up a layer of abstraction and map the relevant modules and callers using the project's CONTEXT.md domain glossary vocabulary"
|
|
323
322
|
# improve-codebase-architecture methodology paraphrased from mattpocock/skills (MIT, b8be62f)
|
|
324
323
|
# Source: skills/engineering/improve-codebase-architecture/SKILL.md
|
|
325
324
|
- "improve-arch: hunt deepening opportunities — modules whose interface is nearly as complex as their implementation are shallow; deep modules hide a lot of behaviour behind a small interface"
|
|
@@ -327,7 +326,7 @@ prompts:
|
|
|
327
326
|
- "improve-arch: name candidates using CONTEXT.md domain vocabulary (e.g. 'the Order intake module', not 'FooBarHandler'); if a candidate contradicts an existing ADR, only surface it when the friction is real enough to revisit the ADR"
|
|
328
327
|
- "improve-arch: present candidates as a before/after report and let the user pick which to explore before designing interfaces"
|
|
329
328
|
severity: "needs-fix / done / blocked"
|
|
330
|
-
description: "Implement a subtask under karpathy 4 心法 (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven); ≤200 LOC per file.
|
|
329
|
+
description: "Implement a subtask under karpathy 4 心法 (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven); ≤200 LOC per file. improve-codebase-architecture for shallow-module deepening audits."
|
|
331
330
|
|
|
332
331
|
task-test:
|
|
333
332
|
primary_cap: "tdd"
|
|
@@ -336,7 +335,7 @@ prompts:
|
|
|
336
335
|
Drive red-green-refactor for core business logic / algorithms / data
|
|
337
336
|
processing / regression-risk / reliability-required subtasks. Skip
|
|
338
337
|
pure CRUD / UI polish / docs-only. On test failure, hand off to
|
|
339
|
-
`/
|
|
338
|
+
`/diagnosing-bugs` for systematic root-cause.
|
|
340
339
|
checklist:
|
|
341
340
|
- "Red: write ONE failing test for the smallest behavior increment; run, watch it fail"
|
|
342
341
|
- "Green: write the minimum code that makes it pass — nothing more"
|
|
@@ -344,9 +343,9 @@ prompts:
|
|
|
344
343
|
- "Loop. Each cycle ≤10 min; if longer, the increment is too big — split"
|
|
345
344
|
- "Negative cases matter: at least 1 test per error / edge / boundary"
|
|
346
345
|
- "Test name = expected behavior, not 'test1', not 'should work'"
|
|
347
|
-
- "On unexpected failure: stop adding tests; route to `/
|
|
346
|
+
- "On unexpected failure: stop adding tests; route to `/diagnosing-bugs` for root cause"
|
|
348
347
|
severity: "red / green / refactored / blocked"
|
|
349
|
-
description: "Enforce red-green-refactor TDD for core logic; `/
|
|
348
|
+
description: "Enforce red-green-refactor TDD for core logic; `/diagnosing-bugs` handoff on test failures."
|
|
350
349
|
|
|
351
350
|
task-deliver:
|
|
352
351
|
primary_cap: "ralph-loop"
|
|
@@ -286,21 +286,19 @@ prompts:
|
|
|
286
286
|
responsibility: |
|
|
287
287
|
在 karpathy 4 心法(Think Before Coding / Simplicity First /
|
|
288
288
|
Surgical Changes / Goal-Driven Execution)约束下实现单个子任务,
|
|
289
|
-
每个文件 ≤200 LOC。视情况调用 `/
|
|
290
|
-
|
|
291
|
-
`/diagnose`(未知 bug 根因)。完成时经 planning-with-files `/plan`
|
|
289
|
+
每个文件 ≤200 LOC。视情况调用 `/improve-codebase-architecture`
|
|
290
|
+
(周期性健康审计)、`/diagnosing-bugs`(未知 bug 根因)。完成时经 planning-with-files `/plan`
|
|
292
291
|
更新 `progress.md`。
|
|
293
292
|
checklist:
|
|
294
293
|
- "任何编辑前:把你打算改的文件从头到尾读一遍"
|
|
294
|
+
# v4.17.0 — CodeGraph light wiring (opt-in; sister capabilities.yaml `codegraph` entry)
|
|
295
|
+
- "代码库导航:项目存在 `.codegraph/` 索引时,符号查找 / 调用链 / 影响面分析优先用 codegraph MCP 工具(`codegraph_explore`),替代 grep/glob/逐文件 Read 爬取"
|
|
295
296
|
- "满足验收标准的最小改动 —— 不要范围蔓延"
|
|
296
297
|
- "每个文件 ≤200 LOC(超过就拆模块)"
|
|
297
298
|
- "信任内部代码:别在每一层重复校验已检查过的输入"
|
|
298
299
|
- "不做投机性抽象(不写『以防万一』的泛型)"
|
|
299
300
|
- "外科手术式编辑:完整路径、精确选择器,不做大范围重写"
|
|
300
301
|
- "宣告完成前更新 progress.md(planning-with-files `/plan`)"
|
|
301
|
-
# zoom-out methodology paraphrased from mattpocock/skills (MIT, b8be62f)
|
|
302
|
-
# Source: skills/engineering/zoom-out/SKILL.md
|
|
303
|
-
- "zoom-out:对某区域不熟悉时,上升一层抽象,用项目 CONTEXT.md 领域术语词汇表映射相关模块及其调用方"
|
|
304
302
|
# improve-codebase-architecture methodology paraphrased from mattpocock/skills (MIT, b8be62f)
|
|
305
303
|
# Source: skills/engineering/improve-codebase-architecture/SKILL.md
|
|
306
304
|
- "improve-arch:猎取加深机会 —— 接口几乎和实现一样复杂的模块是浅模块;深模块在小接口背后藏了大量行为"
|
|
@@ -308,7 +306,7 @@ prompts:
|
|
|
308
306
|
- "improve-arch:用 CONTEXT.md 领域词汇给候选命名(如『the Order intake 模块』,而非『FooBarHandler』);若某候选与既有 ADR 冲突,只在摩擦真大到值得重审该 ADR 时才提出"
|
|
309
307
|
- "improve-arch:把候选呈现为 before/after 报告,让用户在设计接口前先挑要探索哪些"
|
|
310
308
|
severity: "needs-fix / done / blocked"
|
|
311
|
-
description: "在 karpathy 4 心法(Think Before Coding、Simplicity First、Surgical Changes、Goal-Driven)下实现子任务;每个文件 ≤200 LOC
|
|
309
|
+
description: "在 karpathy 4 心法(Think Before Coding、Simplicity First、Surgical Changes、Goal-Driven)下实现子任务;每个文件 ≤200 LOC。浅模块加深审计用 improve-codebase-architecture。"
|
|
312
310
|
|
|
313
311
|
task-test:
|
|
314
312
|
primary_cap: "tdd"
|
|
@@ -316,7 +314,7 @@ prompts:
|
|
|
316
314
|
responsibility: |
|
|
317
315
|
为核心业务逻辑 / 算法 / 数据处理 / 回归风险 / 需高可靠性的子任务
|
|
318
316
|
驱动 red-green-refactor。纯 CRUD / UI 打磨 / 仅文档则跳过。测试失败时,
|
|
319
|
-
交给 `/
|
|
317
|
+
交给 `/diagnosing-bugs` 做系统化根因分析。
|
|
320
318
|
checklist:
|
|
321
319
|
- "Red:为最小行为增量写一个失败测试;运行,看着它失败"
|
|
322
320
|
- "Green:写让它通过的最少代码 —— 一点都不多"
|
|
@@ -324,9 +322,9 @@ prompts:
|
|
|
324
322
|
- "循环。每轮 ≤10 分钟;更久说明增量太大 —— 拆"
|
|
325
323
|
- "负面用例很重要:每个 error / edge / boundary 至少 1 个测试"
|
|
326
324
|
- "测试名 = 预期行为,不是 'test1',不是 'should work'"
|
|
327
|
-
- "遇到意外失败:停止加测试;转 `/
|
|
325
|
+
- "遇到意外失败:停止加测试;转 `/diagnosing-bugs` 找根因"
|
|
328
326
|
severity: "red / green / refactored / blocked"
|
|
329
|
-
description: "为核心逻辑执行 red-green-refactor TDD;测试失败时交接 `/
|
|
327
|
+
description: "为核心逻辑执行 red-green-refactor TDD;测试失败时交接 `/diagnosing-bugs`。"
|
|
330
328
|
|
|
331
329
|
task-deliver:
|
|
332
330
|
primary_cap: "ralph-loop"
|
|
@@ -6,7 +6,7 @@ description: |
|
|
|
6
6
|
fire on test sub。schema_version: harnessed.workflow.v3 with delegates_to (4 sub: clarify order 1
|
|
7
7
|
conditional + code order 2 + test order 3 conditional + deliver order 4) + disciplines_applied
|
|
8
8
|
(6 default) + tools_available (8 entry: superpowers-brainstorming + tdd + grill-with-docs +
|
|
9
|
-
|
|
9
|
+
improve-codebase-architecture + diagnose + ralph-loop + planning-with-files)。
|
|
10
10
|
Triggered by slash command `/task`
|
|
11
11
|
(bare per ADR 0030 namespace policy D-02 LOCK) after `harnessed setup`.
|
|
12
12
|
trigger_phrases:
|
|
@@ -47,7 +47,6 @@ Sister `workflows/capabilities.yaml`:
|
|
|
47
47
|
- `superpowers-brainstorming` — Bucket 4 核心 capability (sub clarify upstream)
|
|
48
48
|
- `tdd` — Bucket 4 核心 capability TDD red-green-refactor (sub test upstream)
|
|
49
49
|
- `grill-with-docs` — Bucket 1 mattpocock conditional invoke (clarify)
|
|
50
|
-
- `zoom-out` — Bucket 1 mattpocock conditional invoke (code, unfamiliar_module)
|
|
51
50
|
- `improve-codebase-architecture` — Bucket 1 mattpocock conditional invoke (code, architecture_health_audit)
|
|
52
51
|
- `diagnose` — Bucket 1 mattpocock conditional invoke (code/test, bug_root_cause_unknown / test_fail)
|
|
53
52
|
- `ralph-loop` — Bucket 4 核心 capability orthogonal wrapper (deliver)
|
|
@@ -6,7 +6,7 @@ description: |
|
|
|
6
6
|
fire on test sub。schema_version: harnessed.workflow.v3 with delegates_to (4 sub: clarify order 1
|
|
7
7
|
conditional + code order 2 + test order 3 conditional + deliver order 4) + disciplines_applied
|
|
8
8
|
(6 default) + tools_available (8 entry: superpowers-brainstorming + tdd + grill-with-docs +
|
|
9
|
-
|
|
9
|
+
improve-codebase-architecture + diagnose + ralph-loop + planning-with-files)。
|
|
10
10
|
Triggered by slash command `/task`
|
|
11
11
|
(bare per ADR 0030 namespace policy D-02 LOCK) after `harnessed setup`.
|
|
12
12
|
trigger_phrases:
|
|
@@ -47,7 +47,6 @@ Sister `workflows/capabilities.yaml`:
|
|
|
47
47
|
- `superpowers-brainstorming` — Bucket 4 核心 capability (sub clarify upstream)
|
|
48
48
|
- `tdd` — Bucket 4 核心 capability TDD red-green-refactor (sub test upstream)
|
|
49
49
|
- `grill-with-docs` — Bucket 1 mattpocock conditional invoke (clarify)
|
|
50
|
-
- `zoom-out` — Bucket 1 mattpocock conditional invoke (code, unfamiliar_module)
|
|
51
50
|
- `improve-codebase-architecture` — Bucket 1 mattpocock conditional invoke (code, architecture_health_audit)
|
|
52
51
|
- `diagnose` — Bucket 1 mattpocock conditional invoke (code/test, bug_root_cause_unknown / test_fail)
|
|
53
52
|
- `ralph-loop` — Bucket 4 核心 capability orthogonal wrapper (deliver)
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
# - workflows/judgments/subtask-gate.yaml — brainstorming trigger (clarify)
|
|
11
11
|
# - workflows/judgments/tdd-gate.yaml — tdd-strongly-suggested trigger (test conditional)
|
|
12
12
|
# - workflows/task/{clarify,code,test,deliver}/workflow.yaml — 4 sub-workflow Phase 3.4 SHIPPED
|
|
13
|
-
# - workflows/capabilities.yaml — superpowers-brainstorming + tdd + grill-with-docs +
|
|
13
|
+
# - workflows/capabilities.yaml — superpowers-brainstorming + tdd + grill-with-docs +
|
|
14
14
|
# improve-codebase-architecture + diagnose + ralph-loop + planning-with-files
|
|
15
15
|
# - .planning/phase-v3.0-3.2/RESEARCH-workflows.md § Area 2 Master Orchestrator yaml Examples
|
|
16
16
|
# - src/workflow/schema/workflow.ts WorkflowSchemaV3 + DelegationClause (Phase 3.3 W0.5 SHIPPED)
|
|
@@ -33,7 +33,6 @@ tools_available:
|
|
|
33
33
|
- superpowers-brainstorming
|
|
34
34
|
- tdd
|
|
35
35
|
- grill-with-docs
|
|
36
|
-
- zoom-out
|
|
37
36
|
- improve-codebase-architecture
|
|
38
37
|
- diagnose
|
|
39
38
|
- ralph-loop
|
|
@@ -3,11 +3,11 @@ name: task-code
|
|
|
3
3
|
description: |
|
|
4
4
|
task-code workflow v3 — Stage ③.b 子任务编码 sub-workflow (karpathy 4 心法
|
|
5
5
|
always-on + mattpocock conditional route + planning-with-files progress.md update)。
|
|
6
|
-
2-phase composition: 01-code (karpathy 心法 +
|
|
6
|
+
2-phase composition: 01-code (karpathy 心法 + improve-arch
|
|
7
7
|
周期审查 / diagnose bug conditional invokes_tools) → 02-progress (Claude Code plugin
|
|
8
8
|
/plan 更新 progress.md 跨 session 进度同步)。
|
|
9
9
|
schema_version: harnessed.workflow.v3 with disciplines_applied [6] + tools_available
|
|
10
|
-
[
|
|
10
|
+
[improve-codebase-architecture, diagnose, planning-with-files]. Triggered
|
|
11
11
|
by harnessed CLI `harnessed task-code --task <text>` or slash command `/task-code`
|
|
12
12
|
after `harnessed setup`.
|
|
13
13
|
trigger_phrases:
|
|
@@ -28,7 +28,7 @@ planning-with-files plugin).
|
|
|
28
28
|
|
|
29
29
|
| phase | id | upstream | model | capability / invokes_tools |
|
|
30
30
|
| ----- | -- | -------- | ----- | -------------------------- |
|
|
31
|
-
| 1 | `01-code` | karpathy | sonnet | `invokes_tools: [{if: phase.
|
|
31
|
+
| 1 | `01-code` | karpathy | sonnet | `invokes_tools: [{if: phase.architecture_health_audit, tool: improve-codebase-architecture}, {if: subtask.bug_root_cause_unknown, tool: diagnose}]` |
|
|
32
32
|
| 2 | `02-progress` | planning-with-files | haiku | `{{ capabilities.planning-with-files.cmd }}` / `invokes: /plan` / `artifacts_expected: [progress.md]` |
|
|
33
33
|
|
|
34
34
|
Per-phase config loads from `workflows/task/code/workflow.yaml`; engine.runRouting
|
|
@@ -44,14 +44,20 @@ behavioral rule per D-09 L0 Discipline Substrate.
|
|
|
44
44
|
|
|
45
45
|
## mattpocock conditional route (D-05 invokes_tools)
|
|
46
46
|
|
|
47
|
-
Phase 01-code 按 phase fact context 条件性 fire
|
|
48
|
-
- `zoom-out` — 陌生模块导航 (when `phase.unfamiliar_module == true`)
|
|
47
|
+
Phase 01-code 按 phase fact context 条件性 fire 2 mattpocock 招式:
|
|
49
48
|
- `improve-codebase-architecture` — 周期架构健康审查 (when `phase.architecture_health_audit == true`)
|
|
50
49
|
- `diagnose` — bug 系统化排错 (when `subtask.bug_root_cause_unknown == true`)
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
2 触发条件 OR-chain, 任 1 fire 即 invoke 对应招式 — 不互斥 (sister CLAUDE.md
|
|
53
52
|
"mattpocock 招式按需召唤" pattern, NOT exclusive). 无触发 = pure karpathy 心法 only.
|
|
54
53
|
|
|
54
|
+
## CodeGraph navigation (opt-in, v4.17.0)
|
|
55
|
+
|
|
56
|
+
If the project has a `.codegraph/` index (opt-in CodeGraph semantic index — sister
|
|
57
|
+
`capabilities.yaml` `codegraph` entry), prefer the codegraph MCP tools
|
|
58
|
+
(`codegraph_explore`) for symbol lookup / call paths / impact analysis instead of
|
|
59
|
+
grep/glob/file-by-file Read crawling. No `.codegraph/` → skip this (no install nag).
|
|
60
|
+
|
|
55
61
|
## Phase 02-progress planning-with-files plugin 真接 (Q-AUDIT-5a LOCKED Option A)
|
|
56
62
|
|
|
57
63
|
02-progress invokes the **Claude Code plugin** slash command `/plan` to update
|
|
@@ -84,6 +90,6 @@ that blocks the session inside Claude Code).
|
|
|
84
90
|
- D-15 + Q-AUDIT-5a — planning-with-files = Claude Code plugin slash cmd `/plan`
|
|
85
91
|
- D-02 — SKILL.md `name:` bare slash cmd (`task-code` NOT `task/code`) per ADR 0030
|
|
86
92
|
- `workflows/disciplines/karpathy.yaml` — 4 心法 + ≤200L hard limit 等 rules (L0 substrate)
|
|
87
|
-
- `workflows/capabilities.yaml` —
|
|
93
|
+
- `workflows/capabilities.yaml` — improve-codebase-architecture / diagnose / planning-with-files entries
|
|
88
94
|
- `workflows/defaults.yaml` — ralph_max_iterations.task-code.* values (T3.4.W2.2 followup)
|
|
89
95
|
- `docs/WORKFLOW.md` — 4-stage workflow mermaid + Stage ③ Execute 章节
|
|
@@ -3,11 +3,11 @@ name: task-code
|
|
|
3
3
|
description: |
|
|
4
4
|
task-code workflow v3 — Stage ③.b 子任务编码 sub-workflow (karpathy 4 心法
|
|
5
5
|
always-on + mattpocock conditional route + planning-with-files progress.md update)。
|
|
6
|
-
2-phase composition: 01-code (karpathy 心法 +
|
|
6
|
+
2-phase composition: 01-code (karpathy 心法 + improve-arch
|
|
7
7
|
周期审查 / diagnose bug conditional invokes_tools) → 02-progress (Claude Code plugin
|
|
8
8
|
/plan 更新 progress.md 跨 session 进度同步)。
|
|
9
9
|
schema_version: harnessed.workflow.v3 with disciplines_applied [6] + tools_available
|
|
10
|
-
[
|
|
10
|
+
[improve-codebase-architecture, diagnose, planning-with-files]. Triggered
|
|
11
11
|
by harnessed CLI `harnessed task-code --task <text>` or slash command `/task-code`
|
|
12
12
|
after `harnessed setup`.
|
|
13
13
|
trigger_phrases:
|
|
@@ -28,7 +28,7 @@ planning-with-files plugin)。
|
|
|
28
28
|
|
|
29
29
|
| phase | id | upstream | model | capability / invokes_tools |
|
|
30
30
|
| ----- | -- | -------- | ----- | -------------------------- |
|
|
31
|
-
| 1 | `01-code` | karpathy | sonnet | `invokes_tools: [{if: phase.
|
|
31
|
+
| 1 | `01-code` | karpathy | sonnet | `invokes_tools: [{if: phase.architecture_health_audit, tool: improve-codebase-architecture}, {if: subtask.bug_root_cause_unknown, tool: diagnose}]` |
|
|
32
32
|
| 2 | `02-progress` | planning-with-files | haiku | `{{ capabilities.planning-with-files.cmd }}` / `invokes: /plan` / `artifacts_expected: [progress.md]` |
|
|
33
33
|
|
|
34
34
|
每阶段配置从 `workflows/task/code/workflow.yaml` 加载;engine.runRouting 通过
|
|
@@ -44,14 +44,20 @@ behavioral rule,遵循 D-09 L0 Discipline Substrate。
|
|
|
44
44
|
|
|
45
45
|
## mattpocock conditional route (D-05 invokes_tools)
|
|
46
46
|
|
|
47
|
-
Phase 01-code 根据 phase fact context 条件性 fire
|
|
48
|
-
- `zoom-out` — 陌生模块导航(当 `phase.unfamiliar_module == true`)
|
|
47
|
+
Phase 01-code 根据 phase fact context 条件性 fire 2 个 mattpocock 招式:
|
|
49
48
|
- `improve-codebase-architecture` — 周期架构健康审查(当 `phase.architecture_health_audit == true`)
|
|
50
49
|
- `diagnose` — bug 系统化排错(当 `subtask.bug_root_cause_unknown == true`)
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
2 个触发条件 OR-chain,任 1 触发即 invoke 对应招式——互不排斥(对应 CLAUDE.md
|
|
53
52
|
「mattpocock 招式按需召唤」模式,NOT exclusive)。无触发 = pure karpathy 心法 only。
|
|
54
53
|
|
|
54
|
+
## CodeGraph navigation (opt-in, v4.17.0)
|
|
55
|
+
|
|
56
|
+
项目存在 `.codegraph/` 索引时(opt-in 的 CodeGraph 语义索引 — 对应
|
|
57
|
+
`capabilities.yaml` 的 `codegraph` entry),符号查找 / 调用链 / 影响面分析优先用
|
|
58
|
+
codegraph MCP 工具(`codegraph_explore`),替代 grep/glob/逐文件 Read 爬取。
|
|
59
|
+
无 `.codegraph/` 则跳过(不做安装劝导)。
|
|
60
|
+
|
|
55
61
|
## Phase 02-progress planning-with-files plugin 直接对接 (Q-AUDIT-5a LOCKED Option A)
|
|
56
62
|
|
|
57
63
|
02-progress 调用 **Claude Code plugin** slash command `/plan` 更新
|
|
@@ -82,6 +88,6 @@ Code 内部会阻塞 session)。
|
|
|
82
88
|
- D-15 + Q-AUDIT-5a — planning-with-files = Claude Code plugin slash cmd `/plan`
|
|
83
89
|
- D-02 — SKILL.md `name:` bare slash cmd (`task-code` NOT `task/code`) per ADR 0030
|
|
84
90
|
- `workflows/disciplines/karpathy.yaml` — 4 心法 + ≤200L hard limit 等 rules (L0 substrate)
|
|
85
|
-
- `workflows/capabilities.yaml` —
|
|
91
|
+
- `workflows/capabilities.yaml` — improve-codebase-architecture / diagnose / planning-with-files entries
|
|
86
92
|
- `workflows/defaults.yaml` — ralph_max_iterations.task-code.* values (T3.4.W2.2 followup)
|
|
87
93
|
- `docs/WORKFLOW.md` — 4-stage workflow mermaid + Stage ③ Execute 章节
|
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
# workflows/task/code/workflow.yaml — Phase v3.0-3.4 W0 T3.4.W0.7 (D-09 + D-05 + D-15)
|
|
2
2
|
#
|
|
3
3
|
# Stage ③.b 子任务编码 — karpathy 4 心法 always-on (Think Before Coding / Simplicity First /
|
|
4
|
-
# Surgical Changes / Goal-Driven Execution) + mattpocock conditional route
|
|
5
|
-
# improve-codebase-architecture 周期审查 / diagnose bug root cause unknown
|
|
4
|
+
# Surgical Changes / Goal-Driven Execution) + mattpocock conditional route
|
|
5
|
+
# (improve-codebase-architecture 周期审查 / diagnose bug root cause unknown;
|
|
6
|
+
# v4.16.3: zoom-out 上游删除已移除)。
|
|
6
7
|
# 02-progress: planning-with-files Claude Code plugin /plan slash cmd 更新 progress.md
|
|
7
8
|
# (per D-15 + Q-AUDIT-5a Option A — plugin 真接, NOT npm SDK NOT fs.writeFile self-impl)。
|
|
8
9
|
#
|
|
9
10
|
# Sister refs:
|
|
10
11
|
# - .planning/phase-v3.0-3.2/RESEARCH-workflows.md § Area 2 task/code sub yaml example
|
|
11
|
-
# - workflows/capabilities.yaml
|
|
12
|
+
# - workflows/capabilities.yaml improve-codebase-architecture + diagnose +
|
|
12
13
|
# planning-with-files (Phase 2.3 W0.1 SHIPPED)
|
|
13
14
|
# - workflows/disciplines/karpathy.yaml (Phase 3.3 W0.4 SHIPPED, L0 substrate always-on)
|
|
14
15
|
# - src/workflow/schema/workflow.ts WorkflowSchemaV3 (Phase 3.3 W0.5 SHIPPED)
|
|
15
16
|
#
|
|
16
17
|
# disciplines_applied: 6 default 全开 per D-09 L0 Discipline Substrate always-on
|
|
17
|
-
# tools_available:
|
|
18
|
+
# tools_available: 3 entry ∈ capabilities.yaml entry set (T3.3.W0.10 Contract C1 catch)
|
|
18
19
|
|
|
19
20
|
schema_version: harnessed.workflow.v3
|
|
20
21
|
workflow: task-code
|
|
21
22
|
description: |
|
|
22
23
|
Stage ③.b 子任务编码 — karpathy 4 心法 always-on + mattpocock conditional route
|
|
23
|
-
(
|
|
24
|
-
unknown)。02-progress: planning-with-files Claude Code plugin slash cmd `/plan`
|
|
24
|
+
(improve-codebase-architecture 周期审查 / diagnose bug root cause unknown)。02-progress: planning-with-files Claude Code plugin slash cmd `/plan`
|
|
25
25
|
更新 progress.md 跟踪 subtask 进度 (per D-15 + Q-AUDIT-5a Option A LOCKED)。
|
|
26
26
|
|
|
27
27
|
disciplines_applied: [karpathy, output-style, language, operational, priority, protocols]
|
|
28
28
|
tools_available:
|
|
29
|
-
- zoom-out
|
|
30
29
|
- improve-codebase-architecture
|
|
31
30
|
- diagnose
|
|
32
31
|
- planning-with-files
|
|
@@ -38,8 +37,6 @@ phases:
|
|
|
38
37
|
model: sonnet
|
|
39
38
|
max_iterations: '{{ defaults.ralph_max_iterations.task-code.01-code }}'
|
|
40
39
|
invokes_tools:
|
|
41
|
-
- if: 'phase.unfamiliar_module == true'
|
|
42
|
-
tool: zoom-out
|
|
43
40
|
- if: 'phase.architecture_health_audit == true'
|
|
44
41
|
tool: improve-codebase-architecture
|
|
45
42
|
- if: 'subtask.bug_root_cause_unknown == true'
|