harnessed 3.4.3 → 3.5.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/README.md +3 -0
- package/dist/cli.mjs +1119 -745
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/workflows/auto/SKILL.md +10 -4
- package/workflows/capabilities.yaml +18 -19
- package/workflows/disciplines/karpathy.yaml +1 -1
- package/workflows/disciplines/language.yaml +1 -1
- package/workflows/disciplines/operational.yaml +2 -2
- package/workflows/disciplines/output-style.yaml +1 -1
- package/workflows/disciplines/priority.yaml +1 -1
- package/workflows/disciplines/protocols.yaml +1 -1
- package/workflows/discuss/auto/SKILL.md +10 -6
- package/workflows/discuss/auto/workflow.yaml +1 -2
- package/workflows/discuss/phase/SKILL.md +11 -30
- package/workflows/discuss/phase/workflow.yaml +1 -1
- package/workflows/discuss/strategic/SKILL.md +12 -33
- package/workflows/discuss/strategic/workflow.yaml +2 -3
- package/workflows/discuss/subtask/SKILL.md +11 -30
- package/workflows/discuss/subtask/workflow.yaml +1 -1
- package/workflows/execute-task/SKILL.md +7 -6
- package/workflows/execute-task/workflow.yaml +93 -0
- package/workflows/judgments/fallback.yaml +1 -1
- package/workflows/judgments/parallelism-gate.yaml +4 -3
- package/workflows/judgments/phase-gate.yaml +2 -2
- package/workflows/judgments/strategic-gate.yaml +2 -2
- package/workflows/judgments/subtask-gate.yaml +2 -2
- package/workflows/judgments/tdd-gate.yaml +2 -2
- package/workflows/judgments/web-design-routing.yaml +1 -1
- package/workflows/judgments/web-search-routing.yaml +1 -1
- package/workflows/judgments/web-testing-routing.yaml +1 -1
- package/workflows/plan/architecture/SKILL.md +13 -34
- package/workflows/plan/architecture/workflow.yaml +2 -2
- package/workflows/plan/auto/SKILL.md +10 -6
- package/workflows/plan/auto/workflow.yaml +1 -2
- package/workflows/plan/phase/SKILL.md +14 -35
- package/workflows/plan/phase/workflow.yaml +3 -3
- package/workflows/plan-feature/SKILL.md +4 -4
- package/workflows/research/SKILL.md +19 -6
- package/workflows/research/workflow.yaml +4 -4
- package/workflows/retro/SKILL.md +13 -32
- package/workflows/retro/workflow.yaml +1 -2
- package/workflows/role-prompts.yaml +4 -3
- package/workflows/task/auto/SKILL.md +11 -7
- package/workflows/task/auto/workflow.yaml +2 -3
- package/workflows/task/clarify/SKILL.md +11 -30
- package/workflows/task/code/SKILL.md +14 -35
- package/workflows/task/code/workflow.yaml +0 -1
- package/workflows/task/deliver/SKILL.md +15 -38
- package/workflows/task/deliver/workflow.yaml +7 -6
- package/workflows/task/test/SKILL.md +11 -32
- package/workflows/task/test/workflow.yaml +1 -2
- package/workflows/verify/auto/SKILL.md +14 -10
- package/workflows/verify/auto/workflow.yaml +4 -5
- package/workflows/verify/code-review/SKILL.md +14 -38
- package/workflows/verify/code-review/workflow.yaml +1 -3
- package/workflows/verify/design/SKILL.md +14 -38
- package/workflows/verify/design/workflow.yaml +4 -5
- package/workflows/verify/multispec/SKILL.md +17 -39
- package/workflows/verify/multispec/workflow.yaml +5 -8
- package/workflows/verify/paranoid/SKILL.md +13 -38
- package/workflows/verify/paranoid/workflow.yaml +1 -2
- package/workflows/verify/progress/SKILL.md +13 -32
- package/workflows/verify/progress/workflow.yaml +0 -1
- package/workflows/verify/qa/SKILL.md +15 -36
- package/workflows/verify/qa/workflow.yaml +1 -2
- package/workflows/verify/security/SKILL.md +12 -35
- package/workflows/verify/security/workflow.yaml +1 -2
- package/workflows/verify/simplify/SKILL.md +13 -34
- package/workflows/verify/simplify/workflow.yaml +1 -2
- package/workflows/verify-work/SKILL.md +5 -7
- package/workflows/verify-work/workflow.yaml +5 -7
- package/workflows/execute-task/phases.yaml +0 -73
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: verify-simplify
|
|
3
3
|
description: |
|
|
4
|
-
Stage ④.g verify sub-workflow — code-simplifier 末尾串行 (移除重复 /
|
|
5
|
-
|
|
4
|
+
Stage ④.g verify sub-workflow — code-simplifier 末尾串行 (移除重复 / 多余逻辑;
|
|
5
|
+
bundled verify-stage cadence — tail-step code-simplifier).
|
|
6
6
|
schema_version: harnessed.workflow.v3 with disciplines_applied (6 default) + tools_available
|
|
7
7
|
(code-simplifier) + 1 phase (gate ref is_final_step 末尾串行)。
|
|
8
8
|
Triggered by slash command
|
|
@@ -47,44 +47,23 @@ Sister `workflows/judgments/stage-routing.yaml`:
|
|
|
47
47
|
- ✅ **触发**: verify chain 末尾步骤 (所有其他 verify sub 已 ship, 准备 code 简化收尾)
|
|
48
48
|
- ❌ **跳过**: verify chain 中间步骤 (避免过早简化干扰后续 review)
|
|
49
49
|
|
|
50
|
-
<!-- v3.4.3-dual-path-invocation -->
|
|
51
50
|
## How to invoke
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
> 1. Look only at files changed in this phase — don't simplify unrelated code
|
|
65
|
-
>
|
|
66
|
-
> 2. Duplication: same logic in 2+ places → extract once, but only if both sites benefit
|
|
67
|
-
>
|
|
68
|
-
> 3. Dead code: unused exports / unreachable branches / commented-out blocks
|
|
69
|
-
>
|
|
70
|
-
> 4. Magic numbers used in >1 place → named constant
|
|
71
|
-
>
|
|
72
|
-
> 5. Over-abstraction: generics / interfaces with 1 implementer → inline
|
|
73
|
-
>
|
|
74
|
-
> 6. Comments that lie or duplicate the code → delete (no-comments-default karpathy rule)
|
|
75
|
-
>
|
|
76
|
-
> 7. Run tests after each simplification; revert if anything fails
|
|
77
|
-
>
|
|
78
|
-
> **Output format**: structured report with severity-classified findings (applied / candidate-flagged / skipped (too risky for final step)). One finding per line: `[severity] file:line — problem (one sentence); fix: suggested change`. If no findings, say so explicitly. No preamble, no end-of-report summary.
|
|
79
|
-
|
|
80
|
-
(Role prompt is self-contained — works even when the upstream `code-simplifier` user-skill / plugin isn't installed.)
|
|
81
|
-
|
|
82
|
-
(Sister `~/.claude/commands/verify-simplify.md` is also generated by `harnessed setup` so `/verify-simplify` is a real platform slash command — both files carry the same dual-path instruction. Previous v3.4.x `harnessed verify-simplify --apply` CLI claims are removed; that subcommand was never implemented.)
|
|
52
|
+
Use the Bash tool to run:
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
echo "$ARGUMENTS" | harnessed run verify-simplify --task-stdin
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
If `$ARGUMENTS` is empty, run `harnessed run verify-simplify` (no stdin pipe).
|
|
59
|
+
|
|
60
|
+
After completion, the Bash output prints a `Next:` hint on stderr suggesting the next stage. Decide whether to invoke based on conversation context — the hint is informational, not prescriptive.
|
|
61
|
+
|
|
62
|
+
<!-- harnessed-generated:v3.4.4 -->
|
|
83
63
|
|
|
84
64
|
## References
|
|
85
65
|
|
|
86
66
|
- D-04 Stage ④ Verify 7 sub 分解
|
|
87
|
-
- ~/.claude/CLAUDE.md "Verify 阶段 — 末尾 code-simplifier" verbatim
|
|
88
67
|
- workflows/capabilities.yaml — code-simplifier
|
|
89
68
|
- workflows/judgments/stage-routing.yaml — verify-simplify-tail trigger
|
|
90
69
|
- workflows/defaults.yaml — ralph_max_iterations.verify-simplify.* values (W2.2 backfill)
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# workflows/verify/simplify/workflow.yaml — Phase v3.0-3.4 W0 T3.4.W0.13d
|
|
2
2
|
#
|
|
3
3
|
# Stage ④.g verify sub-workflow — code-simplifier 末尾串行 (移除重复 / 多余逻辑)
|
|
4
|
-
# (
|
|
4
|
+
# (bundled verify-stage cadence — tail-step code-simplifier).
|
|
5
5
|
#
|
|
6
6
|
# Sister refs:
|
|
7
|
-
# - ~/.claude/CLAUDE.md "Verify 阶段 — code-simplifier 末尾串行" 章节
|
|
8
7
|
# - workflows/judgments/stage-routing.yaml verify-simplify-tail trigger (is_final_step)
|
|
9
8
|
# - workflows/capabilities.yaml — code-simplifier (Bucket 1 mattpocock, fires_when stage=='verify' AND is_final_step)
|
|
10
9
|
# - workflows/verify-work/workflow.yaml v2 SHIPPED phase 08-code-simplifier sister pattern
|
|
@@ -40,13 +40,13 @@ spawns each phase as a sub-agent via `@anthropic-ai/claude-agent-sdk` 0.3.142+.
|
|
|
40
40
|
|
|
41
41
|
## Phase 9 Pattern C 4-specialist Agent Team (D-11 + R20.11)
|
|
42
42
|
|
|
43
|
-
The Agent Team upgrade phase (`09-agent-team-multispecialist`) follows
|
|
44
|
-
|
|
43
|
+
The Agent Team upgrade phase (`09-agent-team-multispecialist`) follows the
|
|
44
|
+
bundled Agent Teams Pattern C 多维度审查 — 4 teammate
|
|
45
45
|
(code-review + gstack-review + gstack-cso + gstack-qa) 互相 SendMessage 质询
|
|
46
46
|
findings 是否真问题 (NOT fire-and-forget subagent fan-out)。Token estimate
|
|
47
|
-
`team_cost < 2 × subagent_cost` is a prereq
|
|
47
|
+
`team_cost < 2 × subagent_cost` is a prereq (bundled cost guideline; engine-level
|
|
48
48
|
check, NOT yaml schema scope). Cleanup mandatory: `SendMessage shutdown_request`
|
|
49
|
-
+ `TeamDelete` after round-trip complete (
|
|
49
|
+
+ `TeamDelete` after round-trip complete (bundled cleanup discipline).
|
|
50
50
|
|
|
51
51
|
Trigger condition: `phase.is_major_release == true OR phase.is_large_refactor
|
|
52
52
|
== true`. 常规 PR / 单点任务**不触发** Pattern C — code-review fan-out (phase 3)
|
|
@@ -73,7 +73,7 @@ harnessed verify-work --phase <num> --apply
|
|
|
73
73
|
## Forward-looking note
|
|
74
74
|
|
|
75
75
|
The `trigger_phrases:` frontmatter is active after `harnessed setup` copies this
|
|
76
|
-
SKILL.md to
|
|
76
|
+
SKILL.md to `<claude-home>/skills/verify-work/` — Claude Code then loads the slash
|
|
77
77
|
command `/verify-work` automatically (Gap B fix — v1.0.2 sister mechanism).
|
|
78
78
|
|
|
79
79
|
## References
|
|
@@ -84,8 +84,6 @@ command `/verify-work` automatically (Gap B fix — v1.0.2 sister mechanism).
|
|
|
84
84
|
- R20.14 — special-purpose /qa /cso /design-review conditional
|
|
85
85
|
- R20.7 — D-08 verify-work NEW 2 之一
|
|
86
86
|
- R20.16 — fallback 3 铁律 chain_isolation
|
|
87
|
-
- ~/.claude/CLAUDE.md "Verify 阶段" 7-step verbatim
|
|
88
|
-
- ~/.claude/rules/agent-teams.md Pattern C 多维度审查
|
|
89
87
|
- `workflows/capabilities.yaml` — gsd-verify-work / gsd-progress / code-review / gstack-{review,qa,cso,design-review} / code-simplifier / agent-teams-create entries
|
|
90
88
|
- `workflows/judgments/parallelism-gate.yaml` — subagent-default + agent-teams-upgrade.fires
|
|
91
89
|
- `workflows/defaults.yaml` — ralph_max_iterations.verify-work.* values
|
|
@@ -4,8 +4,6 @@
|
|
|
4
4
|
# 必跑串行 (01-02) → 并行 fan-out (03) → 强制 conditional (04) → 可选 conditional (05-07) → 末尾串行 (08) → Agent Team 升级 (09)
|
|
5
5
|
#
|
|
6
6
|
# Sister refs:
|
|
7
|
-
# - ~/.claude/CLAUDE.md "Verify 阶段" 章节 verbatim 7-step 列表 (gsd-verify-work + gsd-progress + code-review 多 agent + 关键模块 gstack /review 强制 + 可选 /qa /cso /design-review + code-simplifier + 4-specialist Agent Team 升级)
|
|
8
|
-
# - ~/.claude/rules/agent-teams.md Pattern C 多维度审查 (4-specialist 互相质询, NOT fire-and-forget; lead 委派 + cleanup mandatory)
|
|
9
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)
|
|
10
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)
|
|
11
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)
|
|
@@ -26,8 +24,8 @@ description: |
|
|
|
26
24
|
→ gstack /review Paranoid Staff Eng 关键模块强制 → 可选 /qa /cso /design-review conditional
|
|
27
25
|
→ code-simplifier 末尾串行 → 关键发布/大重构 PR 升级 4-specialist Agent Team Pattern C
|
|
28
26
|
多维度审查 (code-review + gstack-review + gstack-cso + gstack-qa 互相质询, NOT fire-and-forget)。
|
|
29
|
-
Cleanup mandatory
|
|
30
|
-
TeamDelete
|
|
27
|
+
Cleanup mandatory (bundled Agent Teams discipline): SendMessage shutdown_request +
|
|
28
|
+
TeamDelete — engine-level wiring, NOT yaml v2 schema scope.
|
|
31
29
|
|
|
32
30
|
phases:
|
|
33
31
|
# ============================================================================
|
|
@@ -125,9 +123,9 @@ phases:
|
|
|
125
123
|
# ============================================================================
|
|
126
124
|
# Agent Team 升级 (1 phase) — 关键发布 / 大重构 PR 4-specialist Pattern C
|
|
127
125
|
# ============================================================================
|
|
128
|
-
#
|
|
129
|
-
#
|
|
130
|
-
# team_cost < 2 × subagent_cost 估算前置 (开 team
|
|
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)
|
|
131
129
|
# cleanup mandatory: SendMessage shutdown_request + TeamDelete (engine-level wiring)
|
|
132
130
|
- id: 09-agent-team-multispecialist
|
|
133
131
|
name: agent-team-upgrade (4-specialist Pattern C — 关键发布/大重构 多维度审查 互相质询)
|
|
@@ -1,73 +0,0 @@
|
|
|
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).
|
|
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
|
|
20
|
-
workflow: execute-task
|
|
21
|
-
description: 子任务执行 workflow — 4-phase 真接 ralph-loop SDK + tdd-gate conditional + mattpocock route by condition
|
|
22
|
-
phases:
|
|
23
|
-
- id: 01-clarify
|
|
24
|
-
name: brainstorming
|
|
25
|
-
upstream: superpowers brainstorming
|
|
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
|
-
|
|
31
|
-
- id: 02-code
|
|
32
|
-
name: code (karpathy 心法 always-on + mattpocock conditional route)
|
|
33
|
-
upstream: karpathy
|
|
34
|
-
model: sonnet
|
|
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
|
-
|
|
44
|
-
- id: 03-test
|
|
45
|
-
name: test (conditional TDD + diagnose on fail)
|
|
46
|
-
upstream: superpowers TDD
|
|
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
|
-
|
|
54
|
-
- id: 04-deliver
|
|
55
|
-
name: deliver (ralph-loop COMPLETE gate + max-iter fallback)
|
|
56
|
-
upstream: ralph-loop
|
|
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
|