harnessed 3.9.13 → 3.9.15

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.13"};
3
+ version: "3.9.15"};
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.13\",\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.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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "harnessed",
3
- "version": "3.9.13",
3
+ "version": "3.9.15",
4
4
  "description": "AI coding harness package manager + composition orchestrator",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -1,84 +0,0 @@
1
- ---
2
- name: execute-task
3
- description: |
4
- execute-task workflow v2 — 4-phase chain (brainstorming → karpathy + mattpocock route → TDD + diagnose → ralph-loop COMPLETE)
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).
9
- trigger_phrases:
10
- # forward-looking documentation — auto-invocation 实装推 Phase 2.3 extension category (B-28).
11
- # Current enforced entry surface is the CLI subcommand below; these phrases are
12
- # documentation-only hints for the eventual GSD orchestration agent.
13
- - "execute this task"
14
- - "implement this feature"
15
- - "execute-task workflow"
16
- - "跑 execute-task"
17
- ---
18
-
19
- # execute-task workflow (v2)
20
-
21
- ## Overview
22
-
23
- 4-phase chain mapping the user's CLAUDE.md Execute-phase discipline onto the harnessed
24
- runtime (ADR 0011 — SDK + ralph-loop integration; v2 schema upgrade T2.4.W1.1):
25
-
26
- | phase | id | upstream | model (intel CD-2 § 第 4 条) | v2 wiring |
27
- | ----- | -- | -------- | ---------------------------- | --------- |
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")
40
-
41
- Per-phase models load from `workflows/execute-task/workflow.yaml` (v3 SoT post
42
- v3.4.4 Phase 6 — v2 phases.yaml deleted); runWorkflow spawns each phase as a
43
- sub-agent via `@anthropic-ai/claude-agent-sdk` 0.3.142+
44
- (`AgentDefinition` 5-字段 unpack — ADR 0011 § 4). ralph-loop SDK wrapper at 04-deliver
45
- reuses sister Phase 2.2 v0.2.0 ship: `src/workflow/lib/ralphLoop.ts` (54L) + `sdkSpawn.ts` (91L)
46
- + 4-layer dual-signal `isComplete` (NOT 重写 — per RESEARCH § 3.1).
47
-
48
- ## CLI invocation (the only enforced entry — B-28)
49
-
50
- ```bash
51
- # Dry-run preview — arbitrate-only, never spawns SDK.
52
- harnessed execute-task --task "<text>" --dry-run --non-interactive
53
-
54
- # Apply path — real SDK spawn + ralph-loop COMPLETE round-trip.
55
- harnessed execute-task --task "<text>" --apply
56
-
57
- # `--model-tier inherit` escape hatch (B-10) — override per-phase models with
58
- # SDK 'inherit' (parent-thread model resolution).
59
- harnessed execute-task --task "<text>" --apply --model-tier inherit
60
- ```
61
-
62
- H1 gate: `--non-interactive` requires `--apply` or `--dry-run` (exit 2 otherwise);
63
- sibling install-base.ts L51-56 + research.ts L37-43 pattern.
64
-
65
- EngineResult three-state → exit code mapping:
66
- - `0` — ok (ralph-loop returned verbatim `<promise>COMPLETE</promise>` round-trip)
67
- - `1` — ok:false {phase: arbitrate|install|spawn|verbatim} (typed error)
68
- - `2` — aborted {reason} (max-iter exceeded OR usage/config error)
69
-
70
- ## Forward-looking note
71
-
72
- The `trigger_phrases:` frontmatter is currently **documentation purpose only** —
73
- auto-invocation by the GSD orchestration agent (skill auto-discovery) is deferred
74
- to Phase 2.3 extension category. In Phase 2.2 the only enforced entry surface is
75
- the CLI subcommand above (B-28 single-entry contract).
76
-
77
- ## References
78
-
79
- - ADR 0011 — execute-task SDK + ralph-loop integration (phase 2.2 W6 — finalize)
80
- - `.planning/intel/omc-comparison.md` § CD-2 — per-phase model tier defaults
81
- - `src/cli/execute-task.ts` — CLI implementation (T5.1)
82
- - `workflows/execute-task/workflow.yaml` — 4-phase config (v3 SoT; v3.4.4 Phase 6 ship — v2 phases.yaml deleted)
83
- - `src/workflow/lib/sdkSpawn.ts` — SDK query() consumer (T4.1)
84
- - `src/workflow/lib/ralphLoop.ts` — verbatim COMPLETE round-trip
@@ -1,98 +0,0 @@
1
- ---
2
- name: plan-feature
3
- description: |
4
- plan-feature workflow v2 — 5-phase 三层栈 composition (gstack governance gate →
5
- superpowers brainstorm → GSD /gsd-discuss-phase → GSD /gsd-plan-phase →
6
- planning-with-files Claude Code plugin slash cmd `/plan` 持久化 task_plan.md +
7
- progress.md + findings.md). schema_version: harnessed.workflow.v2 with
8
- capability template interpolation + 4-level gate refs + conditional `on` clauses.
9
- Triggered by harnessed CLI `harnessed plan-feature --task <text>` or slash command
10
- `/plan-feature` after `harnessed setup`.
11
- trigger_phrases:
12
- - "plan this feature"
13
- - "design new feature"
14
- - "plan-feature workflow"
15
- - "跑 plan-feature"
16
- ---
17
-
18
- # plan-feature workflow (v2)
19
-
20
- ## Overview
21
-
22
- 5-phase chain mapping the user's CLAUDE.md Discuss + Plan discipline onto the harnessed
23
- runtime, upgraded to `harnessed.workflow.v2` schema (Phase v2.0-2.4 W1 T2.4.W1.3 —
24
- D-15 + Q-AUDIT-5a Option A: planning-with-files = Claude Code plugin slash cmd
25
- `/plan` 真接, **NOT** npm SDK call, **NOT** fs.writeFile self-impl).
26
-
27
- | phase | id | upstream | model | capability / invokes | gate / on |
28
- | ----- | -- | -------- | ----- | -------------------- | --------- |
29
- | 1 | `01-gstack-decision` | gstack | opus | `{{ capabilities.gstack-office-hours.cmd }}` / `{{ gstack_prefix }}office-hours` | `gate: judgments.strategic-gate.office-hours.fires` |
30
- | 2 | `02-brainstorm` | superpowers | sonnet | `{{ capabilities.superpowers-brainstorming.cmd }}` | `on: judgments.subtask-gate.brainstorming.fires → invoke` |
31
- | 3 | `03-gsd-discuss` | gsd | sonnet | `{{ capabilities.gsd-discuss-phase.cmd }}` | `on: judgments.phase-gate.gsd-discuss-phase.fires → invoke` |
32
- | 4 | `04-gsd-plan` | gsd | sonnet | `invokes: gsd-plan-phase` (literal — v2.x patch followup capabilities entry) | — |
33
- | 5 | `05-persist` | planning-with-files | haiku | `{{ capabilities.planning-with-files.cmd }}` / `invokes: /plan` | `on: phase.scope_days > 1 or phase.is_critical_module → invoke` |
34
-
35
- Per-phase config loads from `workflows/plan-feature/workflow.yaml`; engine.runRouting
36
- spawns each phase as a sub-agent via `@anthropic-ai/claude-agent-sdk` 0.3.142+.
37
-
38
- ### v1 → v2 字段 delta
39
-
40
- - ADD `schema_version: harnessed.workflow.v2` (T2.4.W0.1 16th surface — first .v2)
41
- - ADD `description` root field (workflow purpose summary)
42
- - ADD `phase.capability: '{{ capabilities.<name>.cmd }}'` template interpolation (D-10)
43
- - ADD `phase.gate: judgments.<file>.<trigger>.fires` 4-level ref (D-04, pre-resolved by `judgmentResolver`)
44
- - ADD `phase.on: [{if, invoke|action}]` conditional clause (D-09)
45
- - ADD `phase.artifacts_expected: [...]` 3-file persistence list (D-15)
46
- - CHANGE `max_iterations` 改用 `{{ defaults.ralph_max_iterations.plan-feature.<phase> }}` jinja ref (T2.3.W1.2 ship)
47
- - KEEP `invokes: '/plan'` literal at 05-persist (Q-AUDIT-5a anti-pattern guard)
48
-
49
- ### Phase 1 governance gate
50
-
51
- Phase 1 (gstack governance) uses workflow-level `on_veto: halt_workflow` — any
52
- CEO/EM/Designer/Paranoid/QA/CSO veto halts the entire workflow before proceeding
53
- to brainstorm or planning (D-04 PUSH 任 1 phase 转换前 read = vetoed → 全 halt).
54
-
55
- ### Phase 5 planning-with-files plugin 真接 (Q-AUDIT-5a LOCKED Option A)
56
-
57
- 05-persist invokes the **Claude Code plugin** slash command `/plan`. Requires
58
- the `planning-with-files` Claude Code plugin to be installed via the Claude Code
59
- plugin marketplace. The plugin generates 3 markdown files in
60
- `.planning/<phase-id>/`:
61
-
62
- - `task_plan.md` — 主计划 (task 列表 + 文件路径 + 依赖顺序 + 验收标准)
63
- - `progress.md` — 跨 session 进度跟踪
64
- - `findings.md` — 调研发现 / 知识沉淀
65
-
66
- Q-AUDIT-5a rejected alternatives (anti-pattern guard verified by
67
- `tests/workflow/plan-feature-v2.test.ts`):
68
-
69
- - (b) plugin script direct spawn — Windows PowerShell 跨平台不友好
70
- - (c) `fs.writeFile` self-implementation — duplicates plugin functionality, breaks
71
- multi-IDE compatibility (sister .continue / .factory / .gemini / .codebuddy /
72
- .cursor structure 已就绪)
73
-
74
- ## CLI invocation
75
-
76
- ```bash
77
- # Dry-run preview — arbitrate-only, never spawns SDK.
78
- harnessed plan-feature --task "<text>" --dry-run --non-interactive
79
-
80
- # Apply path — real SDK spawn + 5-phase chain.
81
- harnessed plan-feature --task "<text>" --apply
82
- ```
83
-
84
- ## Forward-looking note
85
-
86
- The `trigger_phrases:` frontmatter is active after `harnessed setup` copies this
87
- SKILL.md to `<claude-home>/skills/plan-feature/` — Claude Code then loads the slash
88
- command `/plan-feature` automatically (Gap B fix — v1.0.2).
89
-
90
- ## References
91
-
92
- - ADR 0011 — SDK + ralph-loop integration
93
- - `workflows/plan-feature/workflow.yaml` — 5-phase config (v2 schema)
94
- - `workflows/capabilities.yaml` — capability manifest (35 entry baseline)
95
- - `workflows/judgments/{strategic-gate,phase-gate,subtask-gate}.yaml` — gate refs
96
- - `workflows/defaults.yaml` — ralph_max_iterations.plan-feature.* values
97
- - `docs/WORKFLOW.md` — 4-stage workflow mermaid + gap analysis
98
- - `.planning/phase-v2.0-2.2/RESEARCH.md` § 5.3 — D-15 实装路径 reframe
@@ -1,90 +0,0 @@
1
- ---
2
- name: verify-work
3
- description: |
4
- verify-work workflow v2 — Stage ④ Verify 9-phase composition per CLAUDE.md verbatim
5
- (gsd-verify-work + gsd-progress 必跑串行 → code-review 多 agent 并行 fan-out → gstack /review
6
- 关键模块强制 → 可选 /qa /cso /design-review conditional → code-simplifier 末尾串行 →
7
- 关键发布/大重构 PR 升级 4-specialist Agent Team Pattern C 多维度审查 互相质询)。
8
- schema_version: harnessed.workflow.v2 with capability template interpolation + parallelism
9
- gate refs + conditional `on` clauses. Triggered by harnessed CLI `harnessed verify-work
10
- --phase <num>` or slash command `/verify-work` after `harnessed setup`.
11
- trigger_phrases:
12
- - "verify work"
13
- - "verify-work workflow"
14
- - "Stage 4 verify"
15
- - "跑 verify-work"
16
- ---
17
-
18
- # verify-work workflow (v2)
19
-
20
- ## Overview
21
-
22
- 9-phase chain mapping the user's CLAUDE.md Stage ④ Verify discipline onto the harnessed
23
- runtime, fully `harnessed.workflow.v2` schema (Phase v2.0-2.4 W2 T2.4.W2.2 — D-12
24
- Q-AUDIT-2 amend + R20.12 + R20.11 + R20.14).
25
-
26
- | phase | id | upstream | model | capability / invokes | gate / on / parallelism |
27
- | ----- | -- | -------- | ----- | -------------------- | ----------------------- |
28
- | 1 | `01-gsd-verify-work` | gsd | sonnet | `{{ capabilities.gsd-verify-work.cmd }}` | serial — `max_iterations: 3` |
29
- | 2 | `02-gsd-progress` | gsd | haiku | `{{ capabilities.gsd-progress.cmd }}` | serial — `max_iterations: 2` |
30
- | 3 | `03-code-review-parallel` | mattpocock-skills | sonnet | `{{ capabilities.code-review.cmd }}` | `parallelism: judgments.parallelism-gate.subagent-default.fires` |
31
- | 4 | `04-gstack-review-conditional` | gstack | opus | `{{ capabilities.gstack-review.cmd }}` | `on: phase.is_critical_module → invoke / else skip` |
32
- | 5 | `05-qa-conditional` | gstack | sonnet | `{{ capabilities.gstack-qa.cmd }}` | `on: phase.has_ui_changes → invoke / else skip` |
33
- | 6 | `06-cso-conditional` | gstack | opus | `{{ capabilities.gstack-cso.cmd }}` | `on: phase.has_auth_or_secrets → invoke / else skip` |
34
- | 7 | `07-design-review-conditional` | gstack | sonnet | `{{ capabilities.gstack-design-review.cmd }}` | `on: phase.has_design_changes → invoke / else skip` |
35
- | 8 | `08-code-simplifier` | mattpocock-skills | sonnet | `{{ capabilities.code-simplifier.cmd }}` | serial 末尾 — `max_iterations: 5` |
36
- | 9 | `09-agent-team-multispecialist` | claude-platform | opus | `{{ capabilities.agent-teams-create.cmd }}` | `parallelism: judgments.parallelism-gate.agent-teams-upgrade.fires`; `on: is_major_release OR is_large_refactor → invoke` |
37
-
38
- Per-phase config loads from `workflows/verify-work/workflow.yaml`; engine.runRouting
39
- spawns each phase as a sub-agent via `@anthropic-ai/claude-agent-sdk` 0.3.142+.
40
-
41
- ## Phase 9 Pattern C 4-specialist Agent Team (D-11 + R20.11)
42
-
43
- The Agent Team upgrade phase (`09-agent-team-multispecialist`) follows the
44
- bundled Agent Teams Pattern C 多维度审查 — 4 teammate
45
- (code-review + gstack-review + gstack-cso + gstack-qa) 互相 SendMessage 质询
46
- findings 是否真问题 (NOT fire-and-forget subagent fan-out)。Token estimate
47
- `team_cost < 2 × subagent_cost` is a prereq (bundled cost guideline; engine-level
48
- check, NOT yaml schema scope). Cleanup mandatory: `SendMessage shutdown_request`
49
- + `TeamDelete` after round-trip complete (bundled cleanup discipline).
50
-
51
- Trigger condition: `phase.is_major_release == true OR phase.is_large_refactor
52
- == true`. 常规 PR / 单点任务**不触发** Pattern C — code-review fan-out (phase 3)
53
- + gstack-review conditional (phase 4) 已够用且更省 token (per CLAUDE.md "Verify
54
- 阶段" 末段 "关键发布 / 大重构 PR" 限定语)。
55
-
56
- ## R20.16 chain_isolation 实装 (3 铁律 fallback)
57
-
58
- 每个 conditional phase (4-7, 9) 都实装 `on: [{if: ..., action: invoke}, {if:
59
- ..., action: skip}]` — skip 04-gstack-review **不**级联跳过 06-cso-conditional,
60
- 等等。验证脚本 `node scripts/check-workflow-schema.mjs` 严格 schema 校验 +
61
- runtime engine 独立判 condition。
62
-
63
- ## CLI invocation
64
-
65
- ```bash
66
- # Dry-run preview — arbitrate-only, never spawns SDK.
67
- harnessed verify-work --phase <num> --dry-run --non-interactive
68
-
69
- # Apply path — real SDK spawn + 9-phase chain (conditional phases evaluate by phase fact context).
70
- harnessed verify-work --phase <num> --apply
71
- ```
72
-
73
- ## Forward-looking note
74
-
75
- The `trigger_phrases:` frontmatter is active after `harnessed setup` copies this
76
- SKILL.md to `<claude-home>/skills/verify-work/` — Claude Code then loads the slash
77
- command `/verify-work` automatically (Gap B fix — v1.0.2 sister mechanism).
78
-
79
- ## References
80
-
81
- - D-12 (Q-AUDIT-2 amend) — verify-work 7+ phase 完整 4-stage 重定
82
- - R20.12 — verify-work full scope acceptance
83
- - R20.11 — 4-specialist Agent Team upgrade
84
- - R20.14 — special-purpose /qa /cso /design-review conditional
85
- - R20.7 — D-08 verify-work NEW 2 之一
86
- - R20.16 — fallback 3 铁律 chain_isolation
87
- - `workflows/capabilities.yaml` — gsd-verify-work / gsd-progress / code-review / gstack-{review,qa,cso,design-review} / code-simplifier / agent-teams-create entries
88
- - `workflows/judgments/parallelism-gate.yaml` — subagent-default + agent-teams-upgrade.fires
89
- - `workflows/defaults.yaml` — ralph_max_iterations.verify-work.* values
90
- - `docs/WORKFLOW.md` — 4-stage workflow mermaid + Stage ④ Verify 章节