harnessed 3.4.1 → 3.4.3

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.
@@ -5,7 +5,7 @@ description: |
5
5
  sister ~/.claude/CLAUDE.md "Verify 阶段 — 末尾 code-simplifier" verbatim)。
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
- Triggered by harnessed CLI `harnessed verify-simplify --phase <num>` or slash command
8
+ Triggered by slash command
9
9
  `/verify-simplify` after `harnessed setup`.
10
10
  trigger_phrases:
11
11
  - "verify simplify"
@@ -47,23 +47,39 @@ Sister `workflows/judgments/stage-routing.yaml`:
47
47
  - ✅ **触发**: verify chain 末尾步骤 (所有其他 verify sub 已 ship, 准备 code 简化收尾)
48
48
  - ❌ **跳过**: verify chain 中间步骤 (避免过早简化干扰后续 review)
49
49
 
50
- ## CLI invocation
51
-
52
- ```bash
53
- # Dry-run preview — arbitrate-only, never spawns SDK.
54
- harnessed verify-simplify --phase <num> --dry-run --non-interactive
55
-
56
- # Apply path — real SDK spawn (gate eval true 时).
57
- harnessed verify-simplify --phase <num> --apply
58
- ```
59
-
50
+ <!-- v3.4.3-dual-path-invocation -->
60
51
  ## How to invoke
61
52
 
62
- Use the SlashCommand tool to run: `{{ capabilities.code-simplifier.cmd }}`
63
-
64
- (If the rendered cmd above is the bare `/code-simplifier` accompanied by a `⚠️ ... not installed`
65
- warning from `harnessed setup`, install the missing plugin first then re-run
66
- `harnessed setup` to re-render this SKILL.md with the full namespaced cmd.)
53
+ **Preferred path** (when the upstream specialist is installed): use the SlashCommand tool to run `{{ capabilities.code-simplifier.cmd }}` — the upstream specialist takes over.
54
+
55
+ **Fallback path** (when the upstream isn't installed or returns no result): use the Task tool to spawn a general-purpose subagent with this prompt:
56
+
57
+ > You are a **Code Simplifier (tail step)**.
58
+ >
59
+ > **Mission**: Last step of verify chain (`phase.is_final_step == true`) after all reviews ship. Remove duplication / multi-purpose helpers / unused code / over-abstraction from the diff. Keep tests passing.
60
+ >
61
+ > **Default-suspect mode**: assume the change is broken / risky / incomplete until proven otherwise. Cite `file:line` for every finding; do not generalize.
62
+ >
63
+ > **Review checklist**:
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.)
67
83
 
68
84
  ## References
69
85