harnessed 3.9.15 → 3.9.16

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.16"};
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.16\",\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.16",
4
4
  "description": "AI coding harness package manager + composition orchestrator",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -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