harnessed 5.0.5 → 5.0.6
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/CHANGELOG.md +3183 -0
- package/README-en.md +10 -1
- package/README-zh.md +10 -1
- package/README.md +10 -1
- package/bin/harnessed-check-docs.mjs +1 -0
- package/bin/harnessed-inject-state.mjs +57 -9
- package/bin/harnessed-stop-hook.mjs +51 -9
- package/bin/harnessed-update-reminder-worker.mjs +3 -1
- package/bin/harnessed-update-reminder.mjs +3 -1
- package/dist/cli.mjs +1952 -432
- 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 +2 -0
- package/manifests/skill-packs/gsd.yaml +5 -3
- package/manifests/skill-packs/mattpocock-skills.yaml +3 -3
- package/manifests/tools/playwright-cli.yaml +4 -0
- package/messages/en.json +1 -0
- package/messages/zh-Hans.json +3 -2
- package/package.json +3 -1
- package/workflows/auto/SKILL.md +1 -1
- package/workflows/auto/SKILL.zh-Hans.md +1 -1
- package/workflows/defaults.yaml +12 -0
- package/workflows/discuss/phase/SKILL.md +1 -1
- package/workflows/discuss/phase/SKILL.zh-Hans.md +1 -1
- package/workflows/discuss/subtask/SKILL.md +1 -1
- package/workflows/discuss/subtask/SKILL.zh-Hans.md +1 -1
- package/workflows/plan/ai-integration/SKILL.md +39 -0
- package/workflows/plan/ai-integration/SKILL.zh-Hans.md +38 -0
- package/workflows/plan/ai-integration/workflow.yaml +12 -0
- package/workflows/plan/auto/workflow.yaml +22 -2
- package/workflows/plan/phase/SKILL.md +2 -2
- package/workflows/plan/phase/SKILL.zh-Hans.md +2 -2
- package/workflows/plan/secure/SKILL.md +39 -0
- package/workflows/plan/secure/SKILL.zh-Hans.md +38 -0
- package/workflows/plan/secure/workflow.yaml +12 -0
- package/workflows/plan/spec/SKILL.md +39 -0
- package/workflows/plan/spec/SKILL.zh-Hans.md +38 -0
- package/workflows/plan/spec/workflow.yaml +12 -0
- package/workflows/plan/ui/SKILL.md +39 -0
- package/workflows/plan/ui/SKILL.zh-Hans.md +38 -0
- package/workflows/plan/ui/workflow.yaml +12 -0
- package/workflows/role-prompts.yaml +36 -6
- package/workflows/role-prompts.zh-Hans.yaml +36 -6
- package/workflows/ship/auto/SKILL.md +2 -1
- package/workflows/ship/auto/SKILL.zh-Hans.md +2 -1
- package/workflows/task/clarify/SKILL.md +2 -2
- package/workflows/task/clarify/SKILL.zh-Hans.md +2 -2
- package/workflows/task/code/SKILL.md +1 -1
- package/workflows/task/code/SKILL.zh-Hans.md +1 -1
- package/workflows/task/deliver/SKILL.md +1 -1
- package/workflows/task/deliver/SKILL.zh-Hans.md +1 -1
- package/workflows/task/test/SKILL.md +1 -1
- package/workflows/task/test/SKILL.zh-Hans.md +1 -1
- package/workflows/verify/auto/SKILL.md +1 -1
- package/workflows/verify/auto/SKILL.zh-Hans.md +1 -1
- package/workflows/verify/design/SKILL.md +1 -1
- package/workflows/verify/design/SKILL.zh-Hans.md +1 -1
- package/workflows/verify/progress/SKILL.md +1 -1
- package/workflows/verify/progress/SKILL.zh-Hans.md +1 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,3183 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [5.0.6] - 2026-10-31
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Uninstall now preserves user data, respects custom host roots, and writes settings atomically.
|
|
15
|
+
- Checkpoints now record failed states safely, serialize concurrent updates, and replay nested plans deterministically.
|
|
16
|
+
- Hooks now use stable identity checks with pinned platform behavior.
|
|
17
|
+
- GSD Codex uninstall now uses the official component allowlist.
|
|
18
|
+
- Published artifacts now bind immutable publish metadata to their SHA.
|
|
19
|
+
- POSIX and Windows path comparisons now follow platform-correct case semantics.
|
|
20
|
+
|
|
21
|
+
## [5.0.5] - 2026-10-29
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- Claude retained-version probes for `superpowers` and `planning-with-files` now validate the top-level array from `claude plugin list --json`, requiring an exact marketplace-qualified ID, settings enablement, an enabled CLI entry and a non-empty install path. CLI failures, invalid output and missing or mismatched entries fail closed. Native Claude marketplace presence detection is authoritative without a shell fallback; generic manifest verification is skipped while subsequent runtime/lease checks and provenance protections remain enforced.
|
|
26
|
+
|
|
27
|
+
## [5.0.4] - 2026-10-29
|
|
28
|
+
|
|
29
|
+
### Fixed
|
|
30
|
+
|
|
31
|
+
- Explicit `harnessed setup --system --non-interactive --update-installed` now reclassifies structured `update-unsupported` provenance refusals as `kept-existing` only after read-only active-host presence and runtime-health checks pass. Missing or unhealthy installs and other failures remain fatal; the single forced install pass and provenance protections are preserved.
|
|
32
|
+
- Claude Code npx skills with only a shared installation now materialize the active native skills root instead of treating the shared copy as host-ready. `webapp-testing` verification honors `CLAUDE_CONFIG_DIR` and checks the active Claude native root; provenance protections, dry-run behavior, Codex shared/legacy roots, and multi-pack indicator safety boundaries are preserved.
|
|
33
|
+
|
|
34
|
+
## [5.0.3] - 2026-10-29
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
|
|
38
|
+
- Windows `playwright-cli` `verify-failed` L4 repair now re-installs the eligible CLI with `--update-installed` after the user confirms system scope.
|
|
39
|
+
- Non-interactive and non-TTY setup output now prints the executable repair command: `harnessed setup --system --non-interactive --update-installed`.
|
|
40
|
+
- Node verify failures retain the exception's first line while preserving tail diagnostics.
|
|
41
|
+
|
|
42
|
+
## [5.0.2] - 2026-10-29
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
- `webapp-testing` setup verification no longer requires Python and checks only same-root installed resources, not project runtime dependencies.
|
|
47
|
+
- `playwright-cli` verification now works on Windows and is read-only and notifier-free. It checks exact version `0.1.22` and Chromium metadata without starting a browser or daemon.
|
|
48
|
+
- Force-update preserves the structured installer failure keyword and classifies prior-installed `update-unsupported` preflight refusals as `kept-existing` without a runtime re-probe. Fresh-install `update-unsupported` failures remain fatal, and generic failures retain the existing idempotent-probe safety boundary; provenance checks are unchanged.
|
|
49
|
+
|
|
50
|
+
## [5.0.1] - 2026-10-26
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
|
|
54
|
+
- Package-update dry-runs no longer reinstall upstream components when the selected npm version is current or ahead. The read-only guard now applies to default npm, explicit npm and explicit Bun selections under both supported package runtimes, including `--upstreams` and `--all`.
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
|
|
58
|
+
- Installation sections across all README translations now keep one Bun install/setup command and a short explicit-runner caveat. Removed the redundant AI installation guide and promotional instructions; README is the shared installation entry for people and AI assistants.
|
|
59
|
+
- Project-local `.claude/` content and the root `CLAUDE.md` are no longer tracked. Existing local copies remain intact and are ignored; generated user-level Claude Code installation targets are unchanged.
|
|
60
|
+
|
|
61
|
+
## [5.0.0] - 2026-10-24
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- Standalone binaries are the recommended distribution, an explicit Bun package route is the secondary recommendation, and npm remains compatible with supported Node.js installations. Binary and npm users do not need to install Bun for harnessed itself; upstream tools keep their own runtime requirements.
|
|
66
|
+
- The default README is English, with Simplified Chinese in `README-zh.md` and an English compatibility mirror. New commit descriptions and release records use English; historical records are unchanged.
|
|
67
|
+
- Host spawners and the Claude Agent SDK load only when their execution path is selected. Metadata, first-party hooks, injected test spawners and Codex dispatch no longer eagerly initialize the external Claude SDK. Existing permissions, cancellation, state and error contracts are retained.
|
|
68
|
+
|
|
69
|
+
### Fixed
|
|
70
|
+
|
|
71
|
+
- One-line installers distinguish a successfully installed binary from a failed setup, preserve setup failure evidence, and show a retry command instead of success-only update guidance.
|
|
72
|
+
- Setup includes failures of explicitly selected optional components in its final result, keeps optional counts separate from base configuration, and no longer prints a successful completion message when installation failed.
|
|
73
|
+
- PowerShell installer executable strings stay ASCII so legacy Windows PowerShell ANSI decoding cannot turn UTF-8 punctuation into a closing quote and reject the shadow/setup instructions before execution.
|
|
74
|
+
- Codex component teardown no longer inherits Claude commands or cleanup paths. Unknown inverse operations fail before execution; the reviewed global CLI exceptions and native resource operations retain separate safety policies.
|
|
75
|
+
- Captured installation targets thread through native CLI/RPC, verification, state and backup paths rather than reselecting another host after planning. Native home overrides remain independent of harnessed state roots and shared Codex workflow skills.
|
|
76
|
+
- Presence receipts do not authorize external updates or establish historical ownership. Explicit-context probes preserve existing receipt history, while unknown external update targets and disabled or unverified native components remain visible instead of being treated as ready.
|
|
77
|
+
|
|
78
|
+
### Added
|
|
79
|
+
|
|
80
|
+
- Explicit Bun first-party hook transport for Claude Code and Codex, including matching doctor, owned-artifact and teardown checks. Existing Node and binary hook command literals and consent boundaries remain unchanged.
|
|
81
|
+
- `update --package-manager bun` selects Bun package updates explicitly; running a package on Bun does not establish which manager installed it. Compiled binary updates retain their own channel and reject package-manager overrides.
|
|
82
|
+
- Reproducible runtime benchmark and controlled-PATH channel smoke scripts, including actual first-party hook behavior checks. Three-platform CI verifies Node/npm without Bun, standalone without external Node/Bun, and the optional Bun path without Node.
|
|
83
|
+
- A shared immutable host installation context and pure effective component-plan resolver for Claude Code and Codex, retaining the existing seven installer methods and package channels.
|
|
84
|
+
- Optional Codex uninstall declarations reuse the existing strict schema and command/path security screening; selecting a declaration is not authorization to remove unknown user content.
|
|
85
|
+
- Bidirectional contracts compare harnessed workflow, command, agent-role and first-party hook payload declarations with production writer output, without replacing the existing hash ledger or backup policy.
|
|
86
|
+
|
|
87
|
+
### Compatibility And Known Issues
|
|
88
|
+
|
|
89
|
+
- No state/schema migration, automatic Bun installation or implicit package-manager switch is introduced. Choose one distribution; npm and standalone behavior remain supported.
|
|
90
|
+
- Upstream gstack lease readiness remains blocked in the tested Windows Git Bash environment. This release does not change native symlink policy, bypass locking or replace an explicitly required upstream invocation with a static role review.
|
|
91
|
+
- MCP registration is not authenticated execution evidence. API keys, host approvals and upstream runtime prerequisites remain separate from harnessed installation.
|
|
92
|
+
|
|
93
|
+
## [4.49.2] - 2026-10-23
|
|
94
|
+
|
|
95
|
+
### Fixed
|
|
96
|
+
|
|
97
|
+
- Codex MCP and skill presence probes no longer accept another host's installation as proof; skill-pack indicators require readable `SKILL.md` files rather than empty directories.
|
|
98
|
+
- GSD Codex installation checks accept both current shared and legacy Codex skill layouts.
|
|
99
|
+
- `setup` returns exit 1 when base components failed, after completing workflow installation and recovery work.
|
|
100
|
+
- Codex update/rollback messages and missing-search-key hints name the active host and its usable configuration surface.
|
|
101
|
+
- Codex planning-with-files and UI/UX capabilities use their declared user-skill installation paths and native skill invocation; planning instructions no longer recurse through the harnessed plan master. Claude renderings stay unchanged.
|
|
102
|
+
- Existing npm, git, and npx-skill installations run verification before recording success; a plugin registration cannot substitute for a required CLI executable.
|
|
103
|
+
- Setup preserves approved L4 rescue and force-update outcomes instead of discarding later failures. Explicit `setup --system` authorization is propagated to base installers; the default still does not authorize global installs.
|
|
104
|
+
- Codex gstack setup preserves existing source checkouts, bridges missing runtime dependencies only after confirmation, and checks browser launch from the installed runtime rather than the source tree.
|
|
105
|
+
- GSD and Codex planning/UI helpers validate their required resources, interpreters, and data instead of accepting a lone skill file. Doctor output distinguishes partial content, registration, enablement, and unverified runtime/authentication evidence.
|
|
106
|
+
- Codex gstack readiness checks the upstream lease protocol in an isolated, bounded scratch directory. A lock-primitive failure is reported as an upstream blocker, not as a usable installation or assumed live-lock contention; no native symlink policy or user lease is changed.
|
|
107
|
+
- Verification subprocesses receive an exact runtime environment allowlist instead of unrelated provider credentials or startup hooks. Installation subprocesses keep their existing environment, and explicit empty `CODEX_HOME` follows the upstream default-home semantics.
|
|
108
|
+
- Lease readiness tests compare canonical paths on macOS and Windows runners, including `/var` aliases and Windows short-path names.
|
|
109
|
+
|
|
110
|
+
### Added
|
|
111
|
+
|
|
112
|
+
- `scripts/codex-live/installed-acceptance.mjs` verifies an installed binary against fresh Codex turns, checkpoint promise guards, and document-hook decisions in scratch repositories.
|
|
113
|
+
- A separate L4 `playwright-cli` manifest installs the pinned CLI and Chromium and verifies rendering in a uniquely named browser session. The legacy `playwright-test` manifest remains skill-only; project test dependencies are not installed globally or written into user projects.
|
|
114
|
+
- A separate L2 `webapp-testing` manifest installs the Anthropic skill and verifies its server helper. Its capability no longer points at a nonexistent gstack-bundled skill; Python Playwright remains a project dependency.
|
|
115
|
+
|
|
116
|
+
### Known Issues
|
|
117
|
+
|
|
118
|
+
- The upstream gstack lease implementation cannot create its dangling-symlink lock token in the tested Windows Git Bash environment. Setup now reports this blocker and exits 1 instead of claiming complete readiness. Browser launch may pass while lease readiness remains blocked; this release does not change native symlink policy or bypass locking.
|
|
119
|
+
- Exa authentication and Codex MCP approval remain user/environment prerequisites. MCP registration alone is not proof that an authenticated tool call will succeed.
|
|
120
|
+
|
|
121
|
+
## [4.49.1] - 2026-10-23
|
|
122
|
+
|
|
123
|
+
### Fixed
|
|
124
|
+
|
|
125
|
+
- **Codex `check-docs` hook 热路径不再加载完整 CLI bundle。** 新增专用
|
|
126
|
+
`bin/harnessed-check-docs.mjs`(约 20.8 KB,随 npm 与 compiled 资产分发),
|
|
127
|
+
由 Codex plugin shim 直接命中;`harnessed check-docs` CLI 与 hook 共享同一个
|
|
128
|
+
command body,行为保持同源。此前每次 `PreToolUse` 都要加载约 728 KB 的
|
|
129
|
+
`dist/cli.mjs`,Windows 冷启动可到 1.4-2.5 秒并触发 live p95 预算。真机
|
|
130
|
+
Codex 0.163 实测 `PreToolUse` 287ms,三 hook p95 327ms。
|
|
131
|
+
- **双宿主开发机上的 Vitest 不再读取真实 `~/.claude` 配置。** 全局 setup 在剥离
|
|
132
|
+
ambient host env 的同时改用空 `HOME` / `USERPROFILE`,避免平台探测落回本机
|
|
133
|
+
Claude 配置、把 GateGuard 输出泄漏进 eval goldens。
|
|
134
|
+
- **Codex live 测试在 win32 使用归一后的 workflow slot key。** Stage B seeding
|
|
135
|
+
与 Phase 67 后的 lowercase `repoKey` 契约对齐,`UserPromptSubmit` 可稳定注入
|
|
136
|
+
`<workflow-state>`。
|
|
137
|
+
|
|
138
|
+
### Changed
|
|
139
|
+
|
|
140
|
+
- 新增脱敏后的 Codex `0.163` hook payload fixtures。现场复验
|
|
141
|
+
`SessionStart` / `UserPromptSubmit` / `PreToolUse` / `PostToolUse` 字段集与
|
|
142
|
+
`0.154` 一致;`test:codex-live` 同时对 `inject-state` 与 `check-docs` 做宿主
|
|
143
|
+
shell 稳态计时,并在计时前 warm-up,避免把 OS 首次加载当作 hook 回归。
|
|
144
|
+
- `docs/host-contract.md` 记录 Codex `0.163.0` 复验结论与新的 `check-docs`
|
|
145
|
+
热路径证据。
|
|
146
|
+
|
|
147
|
+
## [4.49.0] - 2026-10-16
|
|
148
|
+
|
|
149
|
+
### Added
|
|
150
|
+
|
|
151
|
+
- **`harnessed checkpoint adopt [--from <host>]`:跨宿主接力(Phase 67,ADR-0043)。**
|
|
152
|
+
把另一宿主账本里本仓库的在途 workflow 槽位**只读复制**到当前宿主的状态根,
|
|
153
|
+
之后在目标宿主上 `checkpoint complete` 推进、新证据落目标根。源根**一个字节都不写**
|
|
154
|
+
(拒绝路径同样,测试逐条比对内容与 mtime)。原提案的「共享中立状态根」经评审否决
|
|
155
|
+
(它不在 `HARNESSED_ROOT_OVERRIDE` 沙箱覆盖内,且原第 3 条「裸键回退加宿主闸门」
|
|
156
|
+
会打断它要启用的接力),改为跨根拷贝。拒绝路径:源等于目标、目标宿主未 setup、
|
|
157
|
+
源账本损坏(与「不存在」区分)、零候选或多候选、目标槽位 `active`(`paused` 则归档到
|
|
158
|
+
`::displaced-<ts>`)。`retro_meta` 取最大值带走,`intents` 不带,证据指针原样保留指向源根。
|
|
159
|
+
- **`harnessed gc` 修剪账本槽位。** 超过 30 天且已完成的 `::<sid>` 会话槽位与同样超龄的
|
|
160
|
+
`::displaced-*` / `::premigrate-*` 归档键会被清掉;`active`、`paused`、裸 `repoKey`、
|
|
161
|
+
当前会话槽位、无法判断年龄的槽位一律不删。此前全仓没有任何地方删槽位,
|
|
162
|
+
会话一多 adopt 的多候选拒绝就成了常态。`adopt` 同时忽略陈旧的已完成会话槽位。
|
|
163
|
+
- **`harnessed update` 在受限网络下走系统代理**(Node 侧装 undici `EnvHttpProxyAgent`;
|
|
164
|
+
编译二进制由 bun 原生处理,不额外注入)。
|
|
165
|
+
|
|
166
|
+
### Fixed
|
|
167
|
+
|
|
168
|
+
- **win32 上 `repoKey` 大小写分裂。** Windows 不规范化 cwd 大小写,同一目录用不同大小写进入
|
|
169
|
+
会得到两个独立账本槽位,在途 workflow 静默消失。键现在在 win32 折叠为小写,
|
|
170
|
+
启动时一次性迁移既有键(撞键时保留较新、较旧的归档到 `::premigrate-<6hex>`)。
|
|
171
|
+
同批修正每轮 hook 用的无依赖 `repoKey` 复制品,否则 CLI 与 hook 的键会不相合。
|
|
172
|
+
- `harnessed resume` 提示与 `checkpoint` 命令描述不再写死 Claude Code 专属措辞与路径;
|
|
173
|
+
`session_id` 注明仅在创建它的宿主上可 resume。
|
|
174
|
+
|
|
175
|
+
### Changed
|
|
176
|
+
|
|
177
|
+
- 内部:`readStoreAt(root)`、`resolveHostWithReason()`、`HOST_IDS` 导出;
|
|
178
|
+
setup 的 `KNOWN_PLATFORMS` 改为消费 `HOST_IDS`。10 份 README 命令表新增 adopt 行。
|
|
179
|
+
|
|
180
|
+
## [4.48.0] - 2026-10-08
|
|
181
|
+
|
|
182
|
+
### Added
|
|
183
|
+
|
|
184
|
+
- **`harnessed agents-md`:把 harnessed 自己那段写进 `<CODEX_HOME>/AGENTS.md` 的标记区间。**
|
|
185
|
+
codex 在会话开始时读 AGENTS.md。此前要让 codex 知道 harnessed 装了什么、本宿主的工具叫什么,
|
|
186
|
+
只能手抄 —— 而手抄件会漂:实测某份 192 行的副本里 `/to-prd` / `/to-issues` / `/diagnose` /
|
|
187
|
+
`/zoom-out` 全是上游已改名或已删的,`TeamCreate` / `TeamDelete` 在 Claude Code 里已删除,
|
|
188
|
+
还有一处更坏:「**Codex** Agent Teams:`TeamCreate` + …」—— 名字本地化了但机制没换,
|
|
189
|
+
codex 根本没有 Agent Teams。这正是 Phase 65 在 harnessed 自己正文里修掉的那类错,发生在手抄件上。
|
|
190
|
+
区间内**事实零手打**:命令清单取自 `writeAllCommands` 渲染的同一个集合;原语对照表直接**嵌**
|
|
191
|
+
`buildHostMapSection()` 的输出(嵌套 marker 是故意的 —— AGENTS.md 里那张表和每份 SKILL 正文里
|
|
192
|
+
那张从此是同一个产物、同一个 yaml 源,不可能各自漂);caveat 取自 `host_map_notes.codex`。
|
|
193
|
+
**范围刻意不含你的个人方法论**(gstack 技能清单、三层栈路由偏好):harnessed 没有那份机器可读的
|
|
194
|
+
真相源,生成不了,它们留在标记区间**外**由你手写、一个字节都不碰。
|
|
195
|
+
也**不是**「把 CLAUDE.md 渲染成 AGENTS.md」:Phase 65 的渲染器替换的是 `{{ host.* }}` 占位符,
|
|
196
|
+
而 CLAUDE.md 是自由散文、零占位符 —— 要自动改写散文就得盲替换,而 Phase 65 的教训恰恰是
|
|
197
|
+
不能盲替换(当时四个调用点是重写的,机械替换会产出一条保证报错的指令)。
|
|
198
|
+
opt-in 的实现就是「它是一条要你自己敲的命令」:`setup` 不会顺手写你的 AGENTS.md。
|
|
199
|
+
`--dry-run` 只打**要写的那一段**(不是文件全文)并说明会 create / append / replace;
|
|
200
|
+
`--remove` 与 `harnessed uninstall` 都只剥标记区间、保留其余内容。
|
|
201
|
+
非 codex 宿主上**诚实拒绝**(`harness-mismatch`,退出码 1),不悄悄生成一份没人读的副本。
|
|
202
|
+
|
|
203
|
+
### Fixed
|
|
204
|
+
|
|
205
|
+
- **README 对比表里两处关于 Codex 的断言是错的,已按实测更正(10 个镜像同步)。**
|
|
206
|
+
原文写「原生 Codex:只有 `AGENTS.md` —— 无 skill/hook」和「无 subagent/team 原语」。
|
|
207
|
+
两条都被本项目自己的实测证伪:codex **有 hook**(v16.0 Phase 64 经本地 codex 插件承载,
|
|
208
|
+
live smoke 29/29、p95 765ms)、**读 skills**(`~/.agents/skills`,整个 `skillsDir` 接缝就是为它),
|
|
209
|
+
并且**有多 agent 原语** —— `spawn_agent` / `send_input` / `wait_agent` / `list_agents` /
|
|
210
|
+
`close_agent` / `resume_agent`(Phase 66 实测,当时的结论是它在某些方面比 Claude Code 更全)。
|
|
211
|
+
这不只是过时:**对上游的否定性断言出错**,而项目记忆里专门有一条要求此类断言必须有引文级来源。
|
|
212
|
+
第三处「Codex 经 platform 层」说轻了 —— v16.0 之后两个宿主都是一等的,改为点名
|
|
213
|
+
hook / agent role / spawn 分派 / `doctor --matrix` / 正文按宿主渲染。
|
|
214
|
+
更正保留了「原生两边都得手工接线、手工编排」这个真正的对比点 —— harnessed 的卖点是接线,
|
|
215
|
+
不是上游缺原语。
|
|
216
|
+
|
|
217
|
+
## [4.47.0] - 2026-10-07
|
|
218
|
+
|
|
219
|
+
### Added
|
|
220
|
+
|
|
221
|
+
- **codex 上的 subagent prompt 终于拿得到 `## Language` 节。** 该节由
|
|
222
|
+
`env.HARNESSED_USER_LANG` 驱动;claude 上 setup 把它写进 `~/.claude/settings.json` 的 `env` 块、
|
|
223
|
+
由宿主注入到它拉起的进程,而 codex 没有这个机制(`supportsEnvKeyWrite: false`、无 JSON settings 文件),
|
|
224
|
+
于是那个键从不被写到任何地方 —— 整节连同 `disciplines/language.yaml` 的「保留英文原文」类目一起消失。
|
|
225
|
+
现在在不支持 env-key 的宿主上,偏好写进 harnessed **自己的** state root(`<stateRoot>/user-lang`,
|
|
226
|
+
Phase 63 `.platform` pin 的邻居),`buildLanguageSection` 的取值顺序是 env → pin。
|
|
227
|
+
env 优先:claude 侧逐字节不变,且任一宿主上都保留单次覆盖的办法。
|
|
228
|
+
存放位置是被约束逼出来的:`~/.codex/config.toml` 不能碰(含凭据、且是 codex 自己写的),
|
|
229
|
+
codex 无 JSON settings 文件,改 shell profile 等于写一个 harnessed 并不拥有的文件。
|
|
230
|
+
**刻意不用已解析的 locale 顶替** —— `getLocale()` 回答的是「读哪个语言的 yaml 与 CLI 文案」,
|
|
231
|
+
而这里回答的是「模型用什么语言回话」(由 `setup --user-lang` 指定):在英文 locale 的机器上
|
|
232
|
+
跑 `--user-lang zh-Hans` 的人,会在 claude 上收到中文、在 codex 上收到英文。
|
|
233
|
+
pin 内容不是受支持的语言码时按「不存在」处理,不转发 —— 那个值会被拼进 `Respond in <name>`。
|
|
234
|
+
卸载无需改动:它本来就整删 state root。
|
|
235
|
+
|
|
236
|
+
- **「codex 产物里不许有 Claude Code 原语」这条契约的判据不再分叉。** 守它的闸门
|
|
237
|
+
(`check-host-primitives.mjs`)持有唯一的 token 清单,但只作用于 SKILL 正文与运行时 prompt 两个面;
|
|
238
|
+
生成命令体那个面另有一套在两个文件上手挑三个 token 的点查 —— 往清单里加一条只强化前两个面,
|
|
239
|
+
而命令体恰恰是出过真缺陷的地方(曾指向 codex 上不存在的 `~/.claude/rules/agent-teams.md`、
|
|
240
|
+
并命令模型去调 codex 没有的 `AskUserQuestion`)。现在命令体的检查**直接 import 闸门的清单与豁免逻辑**,
|
|
241
|
+
一处编辑同时覆盖三个面;闸门本身仍不需要 build。并带一条正向对照:同一条管道跑 claude 产物必须仍有命中,
|
|
242
|
+
否则 codex 那边的「零残留」什么都不证明。实测当前 codex 产物零残留。
|
|
243
|
+
|
|
244
|
+
### Changed
|
|
245
|
+
|
|
246
|
+
- **harnessed 在 codex 上不再读 `~/.codex/config.toml` —— 一处例外都不剩。** MCP 登记探测
|
|
247
|
+
(`isMcpServerRegistered`)此前把整个文件读进内存去匹配 `[mcp_servers.<name>]` 段头,而那文件存放
|
|
248
|
+
明文 `experimental_bearer_token`;现在改问 `codex mcp list --json`。顶层是**数组**(与
|
|
249
|
+
`codex plugin list --json` 的对象形状不同,照搬会解析成「什么都没注册」),形状实测于 codex-cli
|
|
250
|
+
0.155.1,用 `-c 'mcp_servers.<probe>={…}'` 的**内存内**配置覆盖探得 —— 没有写过任何文件、
|
|
251
|
+
没有在你的真实配置里留过探针。听不懂 `--json` 就返回「未知」并据此判未注册(fail-closed:
|
|
252
|
+
确认不了的 verify 不许放过);刻意不做表格回退 —— HTTP 传输的表格行可能带 bearer token。
|
|
253
|
+
一次 spawn 的结果按进程记忆,两个安装器在 `mcp add` 之后显式失效缓存(幂等预检发生在 add **之前**,
|
|
254
|
+
不失效则 verify 必然看一份不可能含新名字的集合)。
|
|
255
|
+
- 同一次迁移揪出**第二处**读取:`probeSearchMcpKey`(doctor 的 `check-mcp-availability` 与 setup
|
|
256
|
+
尾部提示)经 `readUserClaudeJson()` 读同一个文件,**只为了让 `JSON.parse` 失败**再落到 `{}`。
|
|
257
|
+
守卫下在 `readUserClaudeJson` 这个机制上而不是那个调用点,新增调用方自动继承;codex 上结论不变
|
|
258
|
+
(只有 process-env 一源能回答)。
|
|
259
|
+
|
|
260
|
+
### Fixed
|
|
261
|
+
|
|
262
|
+
- **gate 求值的 fail-closed 判据扩到三类静态配置错误(ADR-0042,amends ADR-0038)。** 此前只认
|
|
263
|
+
`undefined variable`,所以用 `in` 访问一个缺失或 null 的成员(`'x' in subtask.missing`)会抛
|
|
264
|
+
`TypeError: Cannot read properties of undefined (reading 'length')` —— 不匹配判据、落 ADR-0029 的
|
|
265
|
+
fail-soft、**子项照 fire**。这正是 issue #5 的形状(gate 越贵、误触越贵),只是换了一条触发路径。
|
|
266
|
+
表达式无法解析也归入同类:重试永远不会好的错误,当成「gate 已 fire」一定是错的。
|
|
267
|
+
三条消息都实测自本仓 pinned 的 expr-eval,测试断言真实抛出的文本,上游改措辞会红而不是静默退回。
|
|
268
|
+
判据改名 `isStaticGateConfigError`(语义变宽,名字跟着变),三处 catch 的 warn 文案一并泛化。
|
|
269
|
+
**ADR-0038 的一条前提被这次实测证伪**:它写「object member 缺失静默求 false」,对 `in` 不成立。
|
|
270
|
+
按项目惯例以新 ADR 承载更正、不改 0038 正文。
|
|
271
|
+
此前未触发只是因为当时没有 judgment 用数组 fact —— 引入第一个数组 fact 的那次改动本会同时激活它。
|
|
272
|
+
|
|
273
|
+
- **安装目录不再留下带未解析占位符的 locale 副本。** en 安装此前只渲染并写 `SKILL.md`,
|
|
274
|
+
把 `SKILL.zh-Hans.md` 以 `cp` 原样留在 `~/.claude/skills/<name>/`(codex 上是 `~/.agents/skills/`),
|
|
275
|
+
里面的 `{{ … }}` 一个都没解析。宿主只读 `SKILL.md` 所以无人读到、无实际危害,但打开它的人只会被误导,
|
|
276
|
+
而 codex 上那个目录还是**共享**约定目录。现在两个 locale 都剥除,安装目录的契约是「一份渲染好的 `SKILL.md`」。
|
|
277
|
+
剥除对两条返回路径都生效 —— 包括「正文无占位符因而无需写入」那条提前返回,此前恰恰是那批 skill
|
|
278
|
+
最容易留下残留(剥除原本写在该返回之后)。`SKILL.md` 的字节不受影响:en 安装仍逐字节不变。
|
|
279
|
+
两个候选里选剥除而不是「也渲染它」:locale 在安装时选定,换语言要重跑 setup(会重新从包里 cp),
|
|
280
|
+
第二份 locale 正文没有读者 —— 把垃圾渲染正确仍然是垃圾。
|
|
281
|
+
|
|
282
|
+
- **codex 上「插件类能力缺失」的告警不再给一个做不到的动作。** 这类能力(`code-review` /
|
|
283
|
+
`code-simplifier` / `ui-ux-pro-max` / `planning-with-files`,以及 `caveman` 的插件那一半)此前
|
|
284
|
+
告诉你去跑 `claude plugin install <id>`;但 codex 没有 Claude Code 插件注册表,这不是「没装」,
|
|
285
|
+
是**这个宿主上结构性不可用**,没有任何安装能改变。现在直说不可用、并要求把调用它的步骤记为 skip
|
|
286
|
+
而不是自行找等价物 —— 措辞与 codex 映射小节里既有的 caveat 同源,不另造一套说法。
|
|
287
|
+
claude 侧文案逐字节不变。
|
|
288
|
+
顺带把「噪音」量了一遍:`renderAllSkills` 全局去重、命令面不产告警,所以整次 setup 最多 5 行,
|
|
289
|
+
不是每个能力刷一条 —— 据此**没有**加聚合机制。
|
|
290
|
+
|
|
291
|
+
- codex 上 MCP 安装失败时的 verify 文案改为指名 `codex mcp list --json` 这个探针,不再说
|
|
292
|
+
「不在 `~/.codex/config.toml` 的 `[mcp_servers]` 表里」—— 那会把你指向一个 harnessed 根本没打开的文件。
|
|
293
|
+
claude 侧文案逐字节不变。
|
|
294
|
+
- doctor 的 search MCP 缺 key 提示在 codex 上不再叫你去改 `~/.claude/settings.json` 与 `~/.claude.json`
|
|
295
|
+
—— 那两个文件在 codex 上不起作用(`settingsPath` 为 null、MCP 配置是 TOML),改为直说
|
|
296
|
+
「在 shell 里 export,这是本宿主上这项检查唯一能读的源」。claude 侧文案不变。
|
|
297
|
+
这条是上一条的实测副产品:拿一个临时 `CODEX_HOME` 跑真实 doctor 时,提示的错处当场现形。
|
|
298
|
+
|
|
299
|
+
### Removed
|
|
300
|
+
|
|
301
|
+
- TOML 段头正则 `isMcpServerInToml` 及其测试整块删除,不留无调用方的导出
|
|
302
|
+
(`tests/unit/installers-lib-readClaudeConfig-toml.test.ts` 的 codex 半边随之删除并改名 `-mcp`;
|
|
303
|
+
那几条在迁移后其实是靠**真的 spawn 了 codex** 才碰巧变绿的)。
|
|
304
|
+
|
|
305
|
+
## [4.46.0] - 2026-09-30
|
|
306
|
+
|
|
307
|
+
### Added
|
|
308
|
+
|
|
309
|
+
- **codex 上的 CI / headless spawn 现在真的可达。** `harnessed run` 在 codex 宿主下改走子进程
|
|
310
|
+
`codex exec --ephemeral --json`(此前只有 Claude Agent SDK 的 in-process 路径,codex 上无从执行)。
|
|
311
|
+
分派按当前宿主自动选路,claude 侧行为逐字节不变。成功判据不看 exit code —— 沙箱拒掉工具调用、
|
|
312
|
+
引用了不存在的 agent role、模型放弃任务,这些都会以 exit 0 收场(实测),所以判据落在输出内容与事件流上。
|
|
313
|
+
注意这条路只补 CI / headless:交互面仍是「正文指挥模型自己用 `spawn_agent`」。
|
|
314
|
+
- **spawn 失败带具名分类进 leaf 账本**:`SpawnTimeout` / `SpawnExitNonZero` / `SpawnOutputMalformed` /
|
|
315
|
+
`SpawnAuthFailed` / `SpawnRefused`。此前所有 spawn 异常被压成一条字符串,类型信息丢失。
|
|
316
|
+
`SpawnRefused` 与 `SpawnOutputMalformed` 刻意分开:前者是「运行告诉了我们为什么失败」(沙箱拒、
|
|
317
|
+
unknown agent role),后者是「运行没给出任何可解析的东西」。超时重试一次。
|
|
318
|
+
`harnessed checkpoint fail` 新增 `--failure <kind>` 作为手工注入点,未知值在任何写入之前拒绝。
|
|
319
|
+
- **`harnessed doctor --matrix`**:一张「check × 宿主」的矩阵,一次看清每项检查在 claude 与 codex 上
|
|
320
|
+
各自的状态。`--host <claude|codex>` 只跑适用该宿主的检查(经 `HARNESSED_PLATFORM` 真实解析,
|
|
321
|
+
格子里是实测状态而非推断)。`--json` 下两者各有自己的结构。
|
|
322
|
+
|
|
323
|
+
### Changed
|
|
324
|
+
|
|
325
|
+
- **doctor 的 `skipped` 成为一等状态,不再伪装成 `pass`。** 「非本宿主 → 跳过」的 7 项检查此前返回 `pass`,
|
|
326
|
+
在汇总里与真正通过的项无法区分。`skipped` 不计票、不影响 exit code。默认输出**不按宿主过滤** ——
|
|
327
|
+
「这项在这里不适用」值它那一行;过滤只在显式 `--host` / `--matrix` 时生效。claude 上默认输出因此
|
|
328
|
+
只变一个字符(第 27 行的状态标记)。
|
|
329
|
+
- doctor 的检查注册表带上了宿主元数据,于是矩阵里 `n/a`(注册表没为该宿主声明)与 `skipped`
|
|
330
|
+
(声明了却被检查自己拒掉)可以区分 —— 后者即「声明与实际不符」的漂移信号,有测试双向咬住。
|
|
331
|
+
|
|
332
|
+
### Fixed
|
|
333
|
+
|
|
334
|
+
- **codex 上注册 MCP server 会把 `~/.codex/config.toml` 复制进备份目录,连里面的明文凭据一起。**
|
|
335
|
+
`mcp-stdio-add` / `mcp-http-add` 把该文件列进了 diff plan,而 `backup()` 会逐字节复制 plan 里的每个
|
|
336
|
+
target,于是凭据在 `~/.harnessed/backups/<id>/HOME/.codex/config.toml` 下多出一份,直到 gc 才消失。
|
|
337
|
+
换来的回滚能力是零 —— 那个文件由 `codex mcp add` 自己写,harnessed 从不编辑它,恢复整份反而会盖掉
|
|
338
|
+
别人的改动。v16.0 Phase 64 在 `cc-plugin-marketplace` 上修过同一条,漏扫了这两个姐妹安装器;
|
|
339
|
+
本次里程碑收口审计逐条核验硬边界时抓出。两条反证测试钉住判据(先验红后验绿)。
|
|
340
|
+
判据落在**写**而不是「不许读」—— 与 marketplace 那条不同,这条路上读是合法的:
|
|
341
|
+
`isMcpServerRegistered` 要探 `[mcp_servers.<name>]` 段头才能验证安装成功。
|
|
342
|
+
|
|
343
|
+
## [4.45.0] - 2026-09-30
|
|
344
|
+
|
|
345
|
+
### Added
|
|
346
|
+
|
|
347
|
+
- **codex 上 `harnessed setup` 会生成 agent role 文件**,写到 `<CODEX_HOME>/agents/harnessed-<sub>.toml`,于是 codex 会话里的模型可以用 `spawn_agent(agent_type: "harnessed-<sub>", …)` 直接起一个带 harnessed 角色指令的子 agent。内容取自 `workflows/role-prompts.yaml` 并经宿主原语渲染(所以里面指名的是 codex 的工具而非 Claude Code 的)。master 编排器不生成 —— 它们是纯 dispatcher,给它们一个可 spawn 的 `agent_type` 只会是死条目。卸载要求文件名前缀与文件头 marker **同时**命中才删,所以其它工具装在同一目录下的 role(本机有 33 个)碰不到;已存在但没有 marker 的同名文件只跳过并报告,不覆盖。codex 的 agent role 走目录发现,**不需要也不会写 `~/.codex/config.toml`**。
|
|
348
|
+
|
|
349
|
+
- **正文按宿主渲染:同一份 workflow 内容装到 Claude Code 或 codex 上,各自指名自己的原语。** 新增第二族占位符 `{{ host.<primitive>[.<variant>] }}`(与既有 `{{ capabilities.<x>.cmd }}` 同族,挂同一个渲染点),词表落 `workflows/host-primitives.yaml` + `.zh-Hans.yaml`(14 primitive / 39 占位符)。四个交付面全部接入:安装到 skills 目录的 SKILL 正文、生成的 `/<name>` 命令体、运行时交给 subagent 的 prompt(role-prompts / `disciplines/language.yaml`)、以及能力注册表。codex 侧工具名取自上游 `codex-rs/core/src/tools/handlers/multi_agents_spec.rs`(本机 codex-cli 0.155.1,`multi_agent` v1 生效):`spawn_agent(agent_type, message)` / `send_input` / `wait_agent` / `list_agents` / `close_agent` / `resume_agent`,以及 `request_user_input`。
|
|
350
|
+
- **`capabilities.yaml` 支持 `by_host` 按宿主取值。** 顶层 `impl` / `cmd` 仍是权威的 Claude Code 值,`by_host.<host>` 只替换它显式声明的字段;Bucket 5 的三个 agent-platform 能力据此在 codex 上解析为 `spawn_agent(agent_type, message)` / `send_input` / `close_agent`。宿主键是具名的(`claude` / `codex`)而非自由 record —— 写错宿主名在自由 record 下会静默永不命中、继续渲染 Claude 原语,具名 + `additionalProperties: false` 把拼写错误变成构建期错误。
|
|
351
|
+
- **codex 渲染产物带一段宿主映射小节**(`<!-- harnessed:host-map:start -->` … `end`,插在 frontmatter 之后)。内容是从词表派生的原语对照表,加三条 caveat:`request_user_input` 在本机是否默认启用未实测;`Claude Code plugin` 类组件在 codex 上并未安装(harnessed 会在能力解析阶段逐条告警),遇到这类步骤应记 skip 而不是自行找等价物;codex agent 的生命周期(session 作用域 / 退出是否自动回收 / 能否嵌套)全部未实测,产物不作任何断言,请显式 `close_agent`。claude 渲染**一个字节都不插**。
|
|
352
|
+
- **新门 `scripts/check-host-primitives.mjs`**(CI hard-fail):断言 codex 渲染产物在豁免区间外零 Claude Code 原语 token。门自己按安装器顺序跑两遍渲染(capabilities 含 `by_host` 覆盖 → host 占位符),不依赖 build;按**字段**选取 yaml 面而非整文件乱扫;allowlist 是短语级(`Claude Code plugin` 豁免,裸 `Claude Code` 不豁免),且**零命中的 allowlist 条目本身算违规**,避免它腐烂成墓碑。
|
|
353
|
+
- **`check-skill-i18n-parity` 纳入 `host.*` 占位符对等**,判据为 primitive 集合而非 variant 集合 —— 后者按设计必红(en 正文用 `.default` / `.plural`,zh 用 `.zh_tool`),而「中文把两处提及合成一处」是正常译文形态不是漂移。
|
|
354
|
+
- **`check-yaml-i18n-parity` 守到三层**:`primitives:` 的 primitive → variant → host 三层 key 对等,失败信息点名出错的层级与 key。此前 `host-primitives.yaml` 只有顶层 key 被守。
|
|
355
|
+
|
|
356
|
+
### Changed
|
|
357
|
+
|
|
358
|
+
- **`prompt.description` 按 locale 渲染。** 命令体模板恒为英文,所以走 en 词表;而 `description` 是这个面上唯一来自本地化 `role-prompts.<locale>.yaml` 的字段,走 en 表会把英文的 codex 说明塞进中文句子。现在它用 locale 匹配的第二张表、并在 body pass **之前**渲染 —— 这也是它能安全进 frontmatter 的原因(body pass 刻意不碰 frontmatter)。en 安装两表同源,行为不变。
|
|
359
|
+
- **Claude Code 侧的渲染产物逐字节不变**,由三份新金标锁住:skills 产物(en 91 条 / zh-Hans 62 条 sha256)、命令体(各 26 条)、`harnessed prompt` 的完整输出(61 个 sub × 2 locale)。金标在改写**之前**录制,批量改写期间它变红即表示还原有 bug,不是重录信号。
|
|
360
|
+
- `scripts/rewrite-skill-invoke-sections.mjs` 的 8 个 builder 与 5 对常量改为输出占位符;`generateCommands.ts` 中声称与它「保持 lockstep」的那段注释被替换 —— 逐字比对发现两侧**已经漂移 5 处**,现在两种措辞作为同一 primitive 的相邻 variant 共存,漂移肉眼可见。
|
|
361
|
+
- `generateCommands.ts` 生成的 sister SKILL 路径改由 `getSkillsDir()` 派生并波浪号化,codex 上正确指向 `~/.agents/skills`;此前硬编码 `~/.claude/skills`。codex 变体也不再引用 `~/.claude/rules/agent-teams.md`(该文件在 codex 上不存在),改为内联要点。
|
|
362
|
+
|
|
363
|
+
### Fixed
|
|
364
|
+
|
|
365
|
+
- codex 上生成的 `/<name>` 命令体此前整段是 Claude Code idiom,其中两处直接指向 codex 上不存在的东西(`~/.claude/rules/agent-teams.md` 与 `~/.claude/skills/<name>/SKILL.md`),并指挥模型调用 `AskUserQuestion` 这个 codex 上没有的工具。
|
|
366
|
+
|
|
367
|
+
## [4.44.0] - 2026-09-23
|
|
368
|
+
|
|
369
|
+
### Added
|
|
370
|
+
|
|
371
|
+
- **codex 上可安装 harnessed 的 hook(ADR 0041)。** 在 codex 宿主上,`harnessed install perturn-inject | perturn-inject-invalidate | doc-discipline-gate`(以及 setup 的 optional 勾选)不再返回 `harness-mismatch`,而是生成本地 codex 插件 `harnessed-<name>@harnessed-local`(本地 marketplace 位于 `~/.codex/harnessed/marketplace`,`CODEX_HOME` 优先),经 `codex plugin marketplace add` + `codex plugin add` 安装。不写 `~/.codex/hooks.json`,不读写 `~/.codex/config.toml`。hook 命令字面量固定(npm 模式 `node "${PLUGIN_ROOT}/hook.cjs" <id> …`,binary 模式 `harnessed <id> …`),harnessed 资产位置记在 `${PLUGIN_DATA}/install.json`,升级 / 重装不会让已信任的 hook 变成 `modified`。`stop-hook-recover` 在 codex 上仍诚实跳过(依赖 Claude Code transcript 形态)。
|
|
372
|
+
- **codex hook 信任须用户同意。** codex 静默跳过未信任的 hook。交互安装时询问是否信任;非交互默认不信任;`harnessed install <name> --trust-codex-hooks` / `harnessed setup --trust-codex-hooks` 为显式同意。信任经 `codex app-server` 的 `hooks/list` + `config/batchWrite` 写入,只触碰 `harnessed-*@harnessed-local` 的条目;RPC 不可用 / 超时时安装仍成功,但输出「NOT trusted yet」及处理办法,不报成功。`harnessed uninstall <name>` 在 codex 上移除插件、codex 残留的空 cache 目录、信任条目与插件数据目录。
|
|
373
|
+
- **doctor 新增 `codex hook plugins` 检查(第 24 项,warn-only)**:逐插件报告是否已装、信任状态(trusted / untrusted / modified / unknown)、npm shim 链路、binary 模式下 `harnessed` 是否在 PATH。非 codex 平台跳过。
|
|
374
|
+
- **`pnpm test:codex-live`**(`scripts/codex-live/run.mjs`,发版前手动):隔离 `CODEX_HOME` 跑真实安装 → 信任 → 卸载;真实 home 用 `harnessed-probe-*` 命名空间插件跑一轮真实会话,校验注入进上下文并记录每个 hook 的 `durationMs`,结束后清理。
|
|
375
|
+
|
|
376
|
+
### Changed
|
|
377
|
+
|
|
378
|
+
- **`inject-state` 接受 `--platform <id>`**:codex hook 进程没有 `CODEX_*` env,插件命令显式传 `--platform codex`,会话 id 取 hook stdin 的 `session_id`。不带该参数(Claude Code)时行为不变,也不读 stdin。
|
|
379
|
+
- **`check-docs --hook --platform codex` 以 stdout JSON 表达裁决**:codex 在 Windows 经 `pwsh -Command` 跑 hook,pwsh 把任何非零退出码报成 1,exit 2 的阻断到不了 codex;改为 `permissionDecision: "deny"`(halt)/ `systemMessage`(warn),退出码 0。Claude Code 下仍是 exit 2 / 1。
|
|
380
|
+
- **codex 插件「已装」判定改用 `codex plugin list --json`**(旧版回退表格输出),不再读 `~/.codex/config.toml` 的 `[plugins.*]` 段头;每个进程只列一次。
|
|
381
|
+
|
|
382
|
+
### Fixed
|
|
383
|
+
|
|
384
|
+
- **codex 上安装插件时不再备份 `~/.codex/config.toml`。** 该文件同时存放 API 凭据,而安装前的备份会把它整份复制到备份目录(`ccPluginMarketplace` 在 codex 上把 `config.toml` 当作待改文件纳入 backup plan)。现在 codex 路径不做该备份(变更预览不受影响 —— 文件本就只由 codex CLI 自己写),并加断言守住。建议已有用户自查备份目录并清理历史副本。
|
|
385
|
+
- **`harnessed uninstall <name>` 找不到 `manifests/optional/` 下的组件**(perturn-inject、doc-discipline-gate、ecc 等)—— 现在与 `install` 一样按 tools → skill-packs → optional 查找。
|
|
386
|
+
- **`perturn-inject-invalidate` manifest 无法通过校验**(4.38.0 起 `metadata.description` 149 字符,超过 120 上限):`harnessed install perturn-inject-invalidate` 报校验错误,setup 的 optional 勾选静默不列出它。描述已缩短,新增测试校验 `manifests/optional/` 全部 manifest。
|
|
387
|
+
|
|
388
|
+
## [4.43.1] - 2026-09-22
|
|
389
|
+
|
|
390
|
+
### Changed
|
|
391
|
+
|
|
392
|
+
- **宿主判定优先级重排(ADR 0040)。** `detectPlatform()` 改为:`HARNESSED_PLATFORM`(含 `setup --platform`)→ 宿主 env 嗅探(仅 `CLAUDE_CODE_SESSION_ID` 或仅 `CODEX_SESSION_ID` 存在时生效;两者同时存在 = 嵌套启动,判歧义下落)→ `.platform` pin(先读 `~/.codex/harnessed/.platform`,再读 `~/.claude/harnessed/.platform`)→ 目录探测(`~/.claude` 优先)→ claude。双宿主机器上,判定从「按机器」变为「按会话」:在 codex 会话里运行的 CLI 与 hook 解析到 codex,在 Claude Code 会话里解析到 claude,不再由一份机器级 pin 决定。无宿主 env、无 pin 的 claude 用户判定结果逐字节不变(`tests/installers/platform-golden.test.ts` 锁定)。`setup --platform <id>` 的 pin 写到所选宿主自己的 stateRoot,codex-only 机器不再为存 pin 创建 `~/.claude`;切换宿主时另一侧已存在的旧 pin 一并改写(不新建、不删除);旧版本写在 claude stateRoot 的 codex pin 仍被读取。
|
|
393
|
+
- **`HARNESSED_ROOT_OVERRIDE` 只替换状态根,不再短路平台判定。** 之前设置它会强制 claude descriptor(仅 stateRoot 被替换);现在平台照常按上面的优先级解析,override 只替换解析结果的 `stateRoot`,pin 仍从各宿主自己的 stateRoot 读取。对 claude 用户无差异;在 codex 环境下设置 override 的脚本 / 测试现在得到 codex descriptor。vitest 全局 setupFile 清除 `CODEX_*` / `CLAUDE_CODE_SESSION_ID` / `HARNESSED_PLATFORM`,测试在 Claude Code 或 codex shell 里跑都解析到同一宿主。
|
|
394
|
+
- **codex 会话内 `harnessed run` / `harnessed research` 被嵌套守卫拦截。** codex descriptor 的 `sessionIdEnv` 由 `null` 改为 `CODEX_SESSION_ID`(codex-cli 0.154 实测:codex shell 中存在且等于 hook stdin 的 `session_id`)。于是 issue #1 的嵌套守卫在 codex 会话里也生效(非 TTY 时退出 1,`HARNESSED_ALLOW_NESTED=1` 仍可覆盖);codex 下 workflow ledger 也按会话分槽。
|
|
395
|
+
- **codex descriptor 的 `settingsPath` 改为 `null`。** codex 没有 JSON settings 文件;hook 注册、settings env-key 写入、GateGuard / Agent Teams / stale-hook / inject 配对等探测在 codex 上显式跳过并给出原因,不抛错,也不再回退去打开 `~/.codex/config.toml`。MCP / 插件登记探测经 `mcpConfigPath` 读 `config.toml` 的既有行为不变。
|
|
396
|
+
- **hook bin 不再携带平台判定的复制品。** `bin/harnessed-{stop-hook,inject-state}.mjs` 直接打包 `src/platform/platform.ts`(仅依赖 `node:` 内置模块,bundle 仍不含 typebox),删除 `src/checkpoint/hookStateRoot.ts` 与 `sessionIdEnvName` 两份手工镜像,hook 与 CLI 的根目录 / 会话 env 解析不会再漂移。
|
|
397
|
+
|
|
398
|
+
## [4.43.0] - 2026-09-17
|
|
399
|
+
|
|
400
|
+
### Fixed
|
|
401
|
+
|
|
402
|
+
- **`check-schema-consumers` 的两处「悄悄变弱」缺陷,修复后暴露 14 个一直被掩盖的死字段。** 起因:4.42.0 删掉 before-commit hook 后,`auto_fix_cmd` 已无任何求值方,闸门却仍是绿的。
|
|
403
|
+
|
|
404
|
+
1. **yaml 的键被算成了「读取」。** workflow schema 集合把 `workflows/` 算作消费者目录(judgment 表达式确实在 yaml 里读事实),但 yaml 的**键**是写字段的地方,只有**值**才可能读。于是任何字段只要有 yaml 文件给它赋值,就显得活着。现在剥掉键、保留值;同理,TypeBox 声明行 `name: Type.X(...)` 也不再算读取 —— `scripts/check-workflow-schema.mjs` 逐行镜像了整份 workflow schema。
|
|
405
|
+
2. **注释剥离不认字符串。** 旧正则把字符串字面量里的块注释开头(`'workflows/judgments/*.yaml'`)当成注释,吞掉了 `check-workflow-schema.mjs` 23k 字符里的 13k。改为识别字符串的扫描器;yaml 不再经过 JS 注释剥离(yaml 正文里未加引号的 glob 同样会误伤,修复过程中实测吞掉了 5 个被明确引用的事实)。
|
|
406
|
+
|
|
407
|
+
纯函数抽到 `scripts/lib/schema-consumers-scan.mjs` 并补单测;用旧行为替换后 8 格中 6 格失败。
|
|
408
|
+
|
|
409
|
+
**暴露的 14 个字段**的去留由维护者裁定:去掉 13 个,保留 `routing_note`(见下方 Removed)。当初逐条核实后先进入豁免表,每条写明证据与待定决策,零删除(沿用 Phase 61 的做法:先把看不见的东西变得看得见,删不删单独决定):discipline 的 `auto_fix_cmd` / `check_method` / `auto_enforce` / `required_fields` / `forbidden_phrases` / `file_ownership`;`judgments/fallback.yaml` 三条铁律的 `fallback_action` / `message_template` / `override_signal` / `chain_isolation`(resolver 只读 `fires_when` / `skips_when`,行为实际由命令式代码实现);capabilities 的 `cc_version` / `settings_env_var` / `sdk_ref`;以及刻意保留为文档的 `routing_note`。其中 `cc_version` 已经漂移:capabilities 声明 `>=2.1.178`,doctor 提示写的是 `CC >= 2.1.133`。
|
|
410
|
+
|
|
411
|
+
- **Agent Teams 版本下界提示 2.1.133 → 2.1.178。** doctor 修复提示、setup 警告与 `missing_explanation` 文案仍写 2.1.133,而 CC 2.1.178 删除了显式建团 / 删团工具,harnessed 自那次迁移起只驱动隐式 teammate spawn API。2.1.133–2.1.177 的用户会被告知版本够用却跑不通。
|
|
412
|
+
|
|
413
|
+
### Removed
|
|
414
|
+
|
|
415
|
+
- **discipline schema 中从未被求值的字段(闸门扩展暴露,维护者裁定删除)。** `auto_enforce`(所有文件都填,没有加载器分支)、规则级 `check_method`(heuristic / llm-judge 等意图说明,标为必填)、`auto_fix_cmd` 连同 `enforcement: auto-fix` 取值(唯一执行者 before-commit hook 已于 4.42.0 删除;原 `auto-fix` 规则改为 `warn`),以及 protocols 的 `required_fields` / `forbidden_phrases` / `file_ownership`(内容并入各协议的 description 文本,信息不丢)。规则的 description 仍经 `harnessed prompt` 送达模型,行为不变。`additionalProperties: false` 下写回任一字段会校验失败,测试断言拒绝恰好落在被删字段的路径上。
|
|
416
|
+
- **`judgments/fallback.yaml` 三条铁律的结构化字段** `fallback_action` / `message_template` / `override_signal` / `chain_isolation`。judgmentResolver 只求值 `fires_when` / `skips_when`,这三条规则的行为一直由代码实现(跳过透明声明 `emitGateTransparency`、显式覆盖 `user-overrides.yaml` + `extract-user-overrides.ts`、各层 gate 独立求值)。声明副本已经漂移:`override_signal` 列的 6 个关键词里,单独的 `brainstorm` 与 `深度调研` 在真正生效的 `user-overrides.yaml` 中并不存在。规则保留为 description 文档,并注明各自的实现位置。
|
|
417
|
+
- **capabilities 的 `requires.settings_env_var` / `requires.cc_version` / `sdk_ref`。** 三者从未被读取。`cc_version` 已与代码漂移(见上方 Fixed),Agent Teams 前置条件现在只有一个家:`checkAgentTeams.ts` 的探测与提示。`sdk_ref` 是存成数据的代码导航注释,且已腐烂 —— `completion-gate` 的 `sdk_ref` 在 ADR 0039 之后仍指向 `ralphLoop.ts`,实际实现是 `harnessed checkpoint complete`。
|
|
418
|
+
|
|
419
|
+
闸门豁免表至此从 25 条回到 11 条(Phase 61 的 10 条 + 刻意保留为文档的 `routing_note`)。
|
|
420
|
+
|
|
421
|
+
## [4.42.0] - 2026-09-16
|
|
422
|
+
|
|
423
|
+
### Fixed
|
|
424
|
+
|
|
425
|
+
外部代码审查报告(39 项 + 2 处注释/实现矛盾)逐条对照本仓核验后整改(Phase 62)。原则:先证实再修;每个修复都带一个**在修复前代码上失败**的测试。逐项裁决、证据与未改理由见 `.planning/phases/62-code-review-remediation/FINDINGS.md`。以下按用户可感知程度排列。
|
|
426
|
+
|
|
427
|
+
- **Windows:harness CLI 参数被 cmd.exe 二次解析(H6,比报告更糟)。** 旧形状 `cmd.exe /c claude ...args` 让 `& | < > ^ %` 全部变成语法:URL 里的 `&` 可注入命令;shipped 参数 `tavily-mcp@^0.2.0` / `exa-mcp-server@^3.2.0` 的 `^` 被静默吞掉,semver 范围在每台 Windows 上变成精确 pin。现在 `.exe` 直接 spawn、不经 shell;只有 `.cmd` shim 走 cmd.exe,参数按 cross-spawn 算法加引号并双重转义。以真实 cmd.exe + `%*` shim 往返验证。
|
|
428
|
+
- **Windows:`harnessed update` 查询 npm 静默失效(H2)。** `npm.cmd` 无 shell spawn 在 Node 的 CVE-2024-27980 修复后抛 EINVAL。
|
|
429
|
+
- **`rollback` 对 git clone 类安装必然失败(H4)**;`checkpoint reopen` 把自己的修改写回被回滚(H1);`eval --filter --update-golden` 会改写**所有** golden(H3);`settings.json` 顶层为 `null` 时 `ccHookAdd` 崩溃(H5);安全门漏检 `hook_command` 与 `harness_overrides.*.cmd`(H7)。
|
|
430
|
+
- **codex 平台。** 插件幂等探测恒为假,每次 setup 重复 `codex plugin add`;codex verify 用 `codex plugin list` 子串匹配,而该列表同时打印**未安装**的插件,安装失败也能通过(M15,改读 `~/.codex/config.toml` 的 `[plugins."<p>@<m>"]`)。`setup --platform codex` 的 pin 写到了 `detectPlatform()` 从不读取的位置,机器上只要有 `~/.claude` 就静默回到 claude(L1 核验时发现)。hook bin 的状态根不跟随 pin,注入静默为空(L7)。**superpowers 的 codex 安装命令在当前 codex 上是坏的**:marketplace 已改名 `openai-api-curated`,旧名 `openai-curated` 报 not found(本机真实安装验证后修正)。
|
|
431
|
+
- **并发与状态一致性。** 其余「锁外读 → 整包写」全部改为单锁 read-modify-write(M1);master 并行 fan-out 的兄弟 sub 互相覆盖全局 workflow record、首个完成的 sub 把整条链置 complete(M2);4-phase workflow 第 1 个 phase 后就是 complete、phase 失败不留记录(M3);配错的 workflow(既无 phases 也无 delegates_to)返回 `complete` 绿灯(M4)。
|
|
432
|
+
- **进程与超时。** 库层 `process.exit()` 在并行路径上杀掉所有兄弟 sub,改抛 `WorkflowHaltError` 由 CLI 决定退出码(M7);`sdkSpawn` 无 wall-clock 上界,新增默认 1 小时、`HARNESSED_SPAWN_TIMEOUT_MS` 可调(M5);超时只杀 shell、真正干活的 npm/git 成孤儿继续写配置,改为杀整棵进程树(M13,本机复现);`runInstall` 无兜底,`install-base` 一次异常中断整批(M14)。
|
|
433
|
+
- **路径与校验。** `prompt` / `rollback` / `manifest-add` 的路径穿越,既有 `checkPathSafe` 挡不住裸 `..`(M9-M11);`git clone` 目标解析遇无值 flag 错位、SHA pin 校验降级为 warn(M12);`gc` 按字典序删掉较新的 bin 备份(M8);注入按子串匹配 phase 编号(M16);`install_type: hook` 可搭配任意 method(L10);eval `file` step 可写出临时目录(L15)。
|
|
434
|
+
- **其余低危。** `setup --dry-run` 不再写 pin(L1);`research` 补上嵌套会话防护(L3);`--max-iterations abc` 不再静默回落 20(L5);jq 过滤器语法错误不再显示为 `write EPIPE`(L4);STALE ledger 按 slot 自身活动时间判定,不再被其他 repo 的写入刷新(L8);aliases / known-good 按 assets root 定位(L9);原子写失败不留 `.tmp`(L12);已结清的 sub 不再每回合收到停机指令(L13);`initialPrompt` 不再挤掉角色提示词(L14);已注册的 hook 报 already-installed 并写回执(C2)。
|
|
435
|
+
- 声明的 `tools` / `disallowedTools` / `maxTurns` / `permissionMode` 现在真正落到 SDK query options(M6);`bypassPermissions` 永不转发。
|
|
436
|
+
|
|
437
|
+
### Removed
|
|
438
|
+
|
|
439
|
+
- **before-commit hook(审查 L11)。** 只在 `triggers_commit === true` 时触发,而没有任何生产路径设置该字段;即便触发,`changedFiles` 恒为空、biome 与 STATE.md 检查指向 harnessed 包根而非用户仓库。与 4.34.0 删除 after-output hook 同一处理。commit 时规则仍经 `harnessed prompt` 的 discipline 段送达模型,STATE.md 行数由 `harnessed check-docs` 检查。
|
|
440
|
+
|
|
441
|
+
### Added
|
|
442
|
+
|
|
443
|
+
- **`scripts/check-schema-consumers.mjs` —— 「声明了但没人求值」这一病族第一次有了闸门(Phase 61)。** harnessed 的核心赌注是「声明式描述组合比 bespoke 命令式安装器更可扩展」。这个赌注同时买进了一个命令式做法**不可能有**的失效模式:**一份没有任何东西求值的声明**。在 comet 的模型里安装器代码**就是**描述,不存在「声明了但是死的」字段 —— 因为根本没有字段。本仓已手工确证十三例(见 `docs/comparison.md`),这个闸门把这一类自动化。
|
|
444
|
+
|
|
445
|
+
**它证明什么、不证明什么**,写在脚本头部:它证明一个**充分**条件 —— 字段名在 schema 之外、在 `src/` 与 `scripts/` 的任何非注释行里都不出现,那它确定没被读。它**不是**存活性证明:已知假阴性是跨产物重名(`spec.decision_rules` 曾因 `scripts/migrate-decision-rules-v1-to-v2.mjs` 提到的 `routing/decision_rules.yaml` 而误判为 live),动态取值 `spec[key]` 同样绕得过。所以:**红灯永远是真发现,绿灯只是地板不是证书。**
|
|
446
|
+
|
|
447
|
+
搜索前剥注释,正是因为十三例里有几个只活在散文里 —— `component_type` 在 `src/cli/setup.ts:90` 有一句注释说「按 component_type 分组」,而代码实际按 `spec.type` 分组;把那句注释算作消费者就会盖住缺陷。
|
|
448
|
+
|
|
449
|
+
**「求值」有两种含义**,少了第二种闸门就会说谎:`license` 全仓无人读,但未在白名单里的取值会在 `Value.Check` 失败 —— 因为它的类型是字面量联合,声明在**做实事**,只是不靠被读。所以分三档报告:被代码读(57)/ 仅 schema 约束形状、无行为依赖其取值(14,advisory)/ **完全无人求值(硬失败)**。
|
|
450
|
+
|
|
451
|
+
建这个闸门的过程自身抓到两个它自己的缺陷,都已修:脚本把**自己错误提示里的字符串**算成了消费者(`marketplace_source` 因此凭空转绿);以及只识别 `name: Type.X(...)` 而漏掉 `name: NamedSchema` 形式,导致它一开始根本看不见 license / stability / fallback_action 这一族。
|
|
452
|
+
|
|
453
|
+
### Changed
|
|
454
|
+
|
|
455
|
+
- **删除 `tested_with_versions`(含 `cc_versions` / `node_versions`)与 `mutually_exclusive_with`(Phase 61)。** 前者被 ADR-0001 记载为「weekly CI 会回填」,而那条 weekly CI 从未存在 —— 与 Phase 55 里让 `upstream_health` 日期烂掉的是同一个幻影;一个 manifest(gsd)曾手工填过,没有任何东西读它。
|
|
456
|
+
|
|
457
|
+
后者是更锋利的教训:它被设计、进 schema、在 SCHEMA.md 里写着「v0.2+ 启用」,从未接线,而且**零个 manifest 声明过它**。当真实的互斥需求出现时(ECC 自带的 chrome-devtools 连接器 vs 独立的 `chrome-devtools-mcp` manifest),它被**手写命令式代码**解决在 `src/cli/lib/check-ecc.ts` 的双装检测里,没有任何地方注意到为这件事准备的声明式机制正躺着死。**更正我在 `docs/comparison.md` 里写的判断**:那里写的是「大概该接上」,但零声明意味着接线是为假想需求造机器 —— 删。真有第二个案例时再接,而且必须与接线在同一个 commit 里。
|
|
458
|
+
|
|
459
|
+
- **`marketplace_source` 接上了,不再被正则重新刨出来(Phase 61)。** 它自 ADR 0005 就在 schema 里,三个 manifest(ecc / ui-ux-pro-max / superpowers)声明了 `{source: github, repo: <owner/repo>}`,而 `ccPluginMarketplace` 安装器一直用 `parseCmd` 从命令字符串里正则解析同一个值。现在声明优先、正则降为回退(多数 manifest 只带命令串)。这是 `mutually_exclusive_with` 那个循环的第二次完整复现,区别只在于这次的需求是真的,所以解法是**接上**而不是删。
|
|
460
|
+
|
|
461
|
+
剩余三个已知死字段(`brainstorming_required` / `license_source` / `override_signals`)进了豁免表,每条都写明「KNOWN DEAD, decision pending」加上为什么还没定 —— 豁免表里不带理由的条目,本身就是这个闸门要抓的缺陷,只是升了一层。
|
|
462
|
+
|
|
463
|
+
- **闸门扩展到 `src/workflow/schema/`,覆盖面 77 → 214 个声明字段(Phase 61 续)。** 只盖住三分之一暴露面的闸门不算建完,而十三例里有三例(`capabilities.fires_when` / `max_iterations` 模板 / second-opinion sub)正是长在 workflow schema 上。
|
|
464
|
+
|
|
465
|
+
扩展需要一处设计改动:**消费者范围按 schema 集合分**。manifest 字段只被 TypeScript 读;workflow 与 fact 字段被 yaml 读的次数不比 TS 少 —— `requires_second_opinion` 是被 `workflows/judgments/*.yaml` 里的表达式读的,全仓没有任何 TS 属性访问碰它。只扫 `src/` 会把 `PhaseFactContext` 的 56 个字段全报成死的,而那正是一个闸门被静音的方式。
|
|
466
|
+
|
|
467
|
+
**抓到它自己的第三个假阳性**:`vetoed_at` 被报死,但它带 `pattern:` 约束 —— 分类器只读了声明的**第一行**,而那个字段跨行写;同文件的邻居 `vetoed_by` 仅仅因为 `maxLength` 写得下一行就通过了。已改为吞后续行直到括号平衡。三个自查缺陷(自指 / 半盲匹配 / 单行类型文本)有个共性:**每一个都会悄悄削弱它,而不是响亮地弄坏它。**
|
|
468
|
+
|
|
469
|
+
**先读再删又救了一次**:`plugin_namespace` 看着像又一个死字段,但它自己的声明处写着「刻意保留为死 Optional,以便解析旧 capabilities.yaml 形状的第三方消费者仍能通过;resolver 不再读它」。在 `additionalProperties: false` 下,**接受**一个旧文件就是它的功能 —— 声明在做实事,只是不靠被读。按此理由豁免而非删除。本次扩展**零删除**:它的价值在覆盖面,而在没考证过历史的字段上仓促删除,正是整个 phase 要防的那个失效模式。
|
|
470
|
+
|
|
471
|
+
## [4.41.0] - 2026-09-11
|
|
472
|
+
|
|
473
|
+
Phase 59-60,两条都出自对 `rpamis/comet` 与 `mindfold-ai/Trellis` 自 08-26 以来提交的情报读取。8 条候选里 1 条是真缺陷(幂等路径写不到安装收据)、1 条值得吸收但**换了形状**(总闸做成环境变量而非文件层事务)、5 条查证后排除、1 条上游架构不适用。排除的理由都记在 `.planning/phases/59-*/SPEC.md`,下次读同样的上游不必重查。
|
|
474
|
+
|
|
475
|
+
### Added
|
|
476
|
+
|
|
477
|
+
- **`HARNESSED_OFF=1` —— 总闸,用来跑「有 harnessed vs 没有」的对照实验(Phase 60)。** 此前要拿到一个干净的对照组,只能把 hook 卸掉再装回去。现在一个环境变量就够:
|
|
478
|
+
|
|
479
|
+
```bash
|
|
480
|
+
HARNESSED_OFF=1 claude # 对照组
|
|
481
|
+
claude # 实验组
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
覆盖面是**总是会跑**的那四个入口(五个 first-party manifest):`bin/harnessed-inject-state.mjs`(UserPromptSubmit 注入 + SessionStart `--invalidate` 两半)、`bin/harnessed-stop-hook.mjs`(Stop 恢复)、`harnessed check-docs --hook`(PreToolUse 文档闸,ablation 下**放行**而不是拦截)、`scripts/dashboard.mjs`(SessionStart 自动起面板)。显式 CLI 调用(`harnessed run` / `gates` / `checkpoint`)**刻意不管** —— 对照组本来就不会去调它们,而一个「跑了但什么都没做」的 `harnessed run` 比一个照常运行的更坑。零文件移动,因此不存在 restore 冲突这一整类问题。
|
|
485
|
+
|
|
486
|
+
**刻意没照抄 Trellis 的形状。** 它的 `trellis ablate` 要快照 + 移除文件 + crash-safe 事务 + 全路径冲突预检(那个 PR 是 29 文件 110 符号),因为 Trellis 把状态 **vendored 进你的项目**,对照实验必须destructive地移除。harnessed 装进宿主 `~/.claude/`,自身的 always-on 足迹就是上面那四个 hook —— 实测本机 harnessed 自己的 hook 数为 0、workflow skill 未装(`~/.claude/skills/ship` 是 gstack 的)。给一个当前不存在的足迹造事务机制,是拿别人架构的解法套自己的问题。
|
|
487
|
+
|
|
488
|
+
精确匹配 `=== '1'`,与兄弟开关 `HARNESSED_INJECT_PC_OFF`(4.38.0,只静音 `<project-context>` 那半)同约定 —— 这样 `HARNESSED_OFF=0` / `=false` 不会因为真值性被读成「开」(已测 7 种取值)。
|
|
489
|
+
|
|
490
|
+
配 doctor 第 23 项 `ablation switch`:开关开着时 warn 并给出复原方式。这条检查存在的理由是**失效模式是静默** —— 全部 hook 空转、什么都不打印,操作者会得出「harnessed 没用」的结论,与安装损坏无法区分。warn 不 fail:刻意 ablate 的机器不是不健康的机器。
|
|
491
|
+
|
|
492
|
+
### Fixed
|
|
493
|
+
|
|
494
|
+
- **安装收据在幂等路径上根本写不到,`harnessed status` 因此长期少报(Phase 59)。** 六个 installer 全都先探 `isAlreadyInstalled(ctx)` 再早退,而那个早退**位于成功路径末尾 `updateInstalled` 之前** —— 六个无一例外:
|
|
495
|
+
|
|
496
|
+
```
|
|
497
|
+
ccPluginMarketplace.ts 早退@119 写收据@271
|
|
498
|
+
gitCloneWithSetup.ts 早退@160 写收据@324
|
|
499
|
+
mcpHttpAdd.ts 早退@130 写收据@314
|
|
500
|
+
mcpStdioAdd.ts 早退@80 写收据@230
|
|
501
|
+
npmCli.ts 早退@61 写收据@157
|
|
502
|
+
npxSkillInstaller.ts 早退@85 写收据@244
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
也就是说收据只在**执行了写入**的那条路上产生。用户按上游文档手动装(例如 `claude plugin install`,ECC 与 superpowers 的 README 都这么写),或收据因故丢失,该组件就永远记不上,且**重跑多少次 `harnessed install` 都修不回来** —— 幂等探测命中,那行代码到不了。`state.json` 的唯一真实消费者 `harnessed status` 于是在一台装满组件的机器上报「no installs recorded」(本机实证)。
|
|
506
|
+
|
|
507
|
+
新增 `recordObservedInstall()` 并接进全部 8 个早退点(`mcpHttpAdd` / `mcpStdioAdd` 各有两个:预探测一个、spawn 后 `already exists` 一个)。与 `updateInstalled` 的两处差别都是**不多说**:已存在的条目**不重盖 `installedAt`**(不是我们现在装的,也无从知道何时装的,首次记录时间是这个字段能承载的最诚实的值);完全匹配的条目一字不动,所以在已是最新的树上重跑 `harnessed install` 不产生任何写入。失败全吞 —— 收据是账面记录,丢一次账不该把一次成功的幂等空操作变成安装失败。
|
|
508
|
+
|
|
509
|
+
端到端实证(本机):`harnessed install ctx7` 命中幂等 → `state.json` 出现条目 → `harnessed status` 从「no installs recorded」变为 `ctx7 @ ^0.5.0 (installed …)`;再跑一次时间戳不变。
|
|
510
|
+
|
|
511
|
+
兄弟缺陷:Trellis `fix(update): repair receipt entries for files already identical to a template` (#575) —— 它的回写只取自「变更集」,所以一条错的或缺失的收据躺在一个本来就正确的文件旁边时无法修复。同一形状,同一后果:漂移信号失效。
|
|
512
|
+
|
|
513
|
+
顺带记录一个**未修**的观察:`HarnessedStateEntry.manifestSha1` 注释写着「产生这次安装的 manifest yaml 的 sha1」,但全部 6 个调用点传的都是 `''`。又一个没有求值的声明,与 55-58 同族,本次不扩大范围。
|
|
514
|
+
|
|
515
|
+
## [4.40.0] - 2026-09-10
|
|
516
|
+
|
|
517
|
+
Phase 55-58。同一件事的四个面:**声明与现实之间没有人对账**。55 管「记录有没有人核实过」,56 管「机器有没有偷偷落后于记录」,57 是这两条撞出来的实际修复,58 是同一个病长在判断门上的形态 —— 一条写着「小任务不用讨论」的规则,实际执行成了「小任务不许讨论」。
|
|
518
|
+
|
|
519
|
+
### Added
|
|
520
|
+
|
|
521
|
+
- **doctor 第 22 项 `plugin install freshness` —— marketplace plugin 的静默陈旧第一次说得出口(Phase 56)。** `claude plugin install` 把 plugin 拷进带版本号的 cache 目录(`~/.claude/plugins/cache/<marketplace>/<plugin>/<version>/`)并**钉死在那里**;与 `npx --yes <pkg>@latest` 那批不同,后续 session 不会重新解析 latest。装的那天是什么版本,之后就一直是什么版本,Claude Code 不会提。本机 2026-09-10 实测四个 `cc-plugin-marketplace` 组件**全部落后**:`superpowers` 5.1.0(2026-05-27 装)vs 6.3.0、`planning-with-files` 2.34.0 vs 3.17.2、`ui-ux-pro-max` 2.5.0 vs 2.15.0(该记录本身写错了来源,见下方 Fixed)、`ecc` 2.1.0 vs 2.2.1。新 check 读 plugin registry 的 `version` 与 manifest 的 `last_known_good_version` 比对,落后则 warn 并给出实测存在的修复命令(`claude plugin update <plugin>`)。warn 不 fail:跑旧版是降级不是坏掉,而且 superpowers 5.1.0 → 6.3.0 会换掉用户正在用的技能集,升不升是用户的决定。
|
|
522
|
+
|
|
523
|
+
这也是代码库里**唯一**一处把真实探测到的版本与记录版本对比的地方。Phase 55 调查并否决了在 installer-state 层做同样的事:`HarnessedStateEntry.version` 看着像探测值,但它的 7 个调用点传的全是 manifest 声明值(`install.npm_version` / `install.git_ref` / `''`),比了等于拿记录比它自己。plugin registry 的 `version` 是从磁盘读出来的真实值,这才让这个 check 成立。
|
|
524
|
+
|
|
525
|
+
**顺带更正 Phase 55 的一句话**:那条 changelog 写「几乎每条 install.cmd 都解析 @latest,向下漂移本就是预期」—— 对 npm / git 那批成立,对这 4 个 plugin 装**不成立**。它们的漂移不是记录不准,是真的装旧了。
|
|
526
|
+
|
|
527
|
+
- **`scripts/check-upstream-freshness.mjs` — `upstream_health` 从此会被求值(Phase 55)。** `spec.upstream_health` 自 v0.1 起就是必填 schema 块(4 字段 × 19 manifest = 76 条声明),但**零代码消费者** —— 这是 Phase 54 同一病族的第四面。与 `routing_note` 的区别在于:`routing_note` 是被误读成机器输入(改名即解决),而 `last_check` / `last_known_good_version` 是被**人**读成关于上游的当前事实;它们变陈旧时没有任何东西提示读者停止那样读,所以删掉整块会丢失真实的供应链 provenance。新门把腐烂变响:第三方 manifest 的 `last_check` 超过 90 天即 CI 硬失败;first-party manifest(`metadata.upstream.repository` 指向本仓,实测 5 个)豁免 —— 它们的「上游」就是你正在看的这个 commit,日期戳不携带信息。**零网络、零协议适配器**:上游发新版**不应该**让 CI 变红,因为几乎每条 `install.cmd` 都解析 `@latest`,向下漂移本就是预期行为;本门断言的只是「近期有人重新核实过这一行」,恰是 `last_check` 的字面语义。`HARNESSED_FRESHNESS_TODAY` 可覆写「今天」以做确定性验证。CI 中位于 `check-yaml-i18n-parity` 之后(同样依赖 `yaml` 包,须在 `pnpm install` 之后)。
|
|
528
|
+
|
|
529
|
+
### Changed
|
|
530
|
+
|
|
531
|
+
- **四个 marketplace plugin 全部升到位,ECC 的 codex 通道换成原生 plugin(Phase 57)。** 本机执行 `claude plugin update`:superpowers 5.1.0 → 6.3.0、planning-with-files 2.34.0 → 3.17.2、ecc 2.1.0 → 2.2.1、ui-ux-pro-max 2.5.0 → **2.13.0**。Phase 56 的 doctor check 现在报 `4 marketplace plugin(s) current`。
|
|
532
|
+
- **`manifests/optional/ecc.yaml` 的 codex 通道:`git-clone + scripts/sync-ecc-to-codex.sh` → `codex plugin marketplace add affaan-m/ECC && codex plugin add ecc@ecc`。** 上游在 2.0 到 2.2 之间把推荐反转了,manifest 里 4.32.21 写的「codex marketplace route is experimental and NOT recommended upstream」现在与 README 原文相反:
|
|
533
|
+
|
|
534
|
+
> The older `scripts/sync-ecc-to-codex.sh` path is a **deprecated compatibility option** for users who intentionally need copied and merged configuration in `~/.codex`; it is not required for the native plugin.
|
|
535
|
+
|
|
536
|
+
原生路径对 harnessed 的契约也严格更好:sync 脚本的 `idempotent_check` / `verify` 只能探那个保留的 clone cache,**探不到** `~/.codex` 的合并状态(该流程没有稳定的钉住产物),而 `codex plugin list` 是真的注册表查询。`method` 仍是 `cc-plugin-marketplace` —— `src/installers/ccPluginMarketplace.ts` 早就按 platform 分派(`bin === 'codex'` 走 `plugin add` 且不带 `--scope`,因为 codex 每个 `CODEX_HOME` 只有一份 plugin 状态,没有 Claude 的三种 scope),两段式形态也已能解析,零代码改动。兄弟先例:`manifests/tools/superpowers.yaml` 的 codex override。
|
|
537
|
+
|
|
538
|
+
**迁移风险已在 manifest 内注明**,上游原话:"Do not add the native marketplace plugin on top of the sync flow." 跑过旧路径的用户必须先用上游自己的工具剥掉遗留层(`node scripts/ecc.js uninstall --legacy-codex-sync`),harnessed 不能代劳 —— 那次 sync 合并了它并不拥有的文件。
|
|
539
|
+
|
|
540
|
+
- **`src/cli/lib/check-ecc.ts` 的 codex 探测同步跟上。** 此前只探 `~/.codex/.cache/ecc/.git`(sync clone),换路径后会把走新路径的用户全部误报成「没装」。现在两种形态都认:原生的问 codex 自己(`codex plugin list`,与 manifest 的 verify 同一判据,不需要猜 codex 把启用状态落在磁盘哪里 —— 上游文档只说存在 active `CODEX_HOME`,没给形状),遗留的继续探 clone 并在消息里标明它已被上游弃用 + 给出迁移命令。**只在 `~/.codex/config.toml` 存在时才 spawn**,没装 codex 的机器零开销;探针可注入,测试永不 spawn 开发者真机的 codex(与 Phase 56 在 doctor 编排测试里避开机器依赖同一个理由)。
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
- **14 个第三方 manifest 的 `upstream_health` 全量重新核实并盖章 2026-09-10。** 逐行实拉 npm registry / git tag / HEAD sha,不是照抄:`gstack` 1.60.1.0 → **1.84.1.0**、`planning-with-files` 3.4.1 → 3.17.2、`ui-ux-pro-max` 2.5.0 → 2.15.0、`gsd` 1.7.0 → 1.13.0、`superpowers` 6.1.1 → 6.3.0、`ecc` 2.0.0-rc.1 → 2.2.1、`codegraph` 1.0.0 → 1.6.0、`exa-mcp` 3.2.1 → 3.4.1、`ctx7` 0.4.x → 0.5.11、`chrome-devtools-mcp` 1.6.0 → 1.9.0、`tavily-mcp` 0.2.19 → 0.2.22、`playwright-test` 1.5.7 → 1.5.25、`mattpocock-skills` main-391a2701 → main-3cca18b3、`design-taste-frontend` `v2-default` → main-ccbc1563(原值根本不是版本号)。最陈旧的两行(`ctx7` / `tavily-mcp`)距上次核实 121 天。
|
|
544
|
+
- **`manifests/SCHEMA.md` 修正 `last_check` / `last_known_good_version` 两行的说明。** 原文写「weekly CI 自动写入 / 自动维护」—— 那条 weekly CI 从未存在,而这句话正是让这两个字段可以静默腐烂的授权书。改为:`last_check` = 人工核实日期(第三方 >90 天硬失败,first-party 豁免);`last_known_good_version` = 上次核实时观察到的上游版本,**不是**安装时解析的版本(多数 cmd 走 `@latest`,实际装到的会更新)。ADR-0001 的同句不动(A7 守恒锁)。
|
|
545
|
+
|
|
546
|
+
### Fixed
|
|
547
|
+
|
|
548
|
+
- **brainstorming 的跳过条件曾是无条件否决,会压过全部风险信号(Phase 58)。** `workflows/judgments/subtask-gate.yaml` 的 `skips_when` 原为 `subtask.type in ['crud','standard_lib_call'] or subtask.lines < 20`,与四个风险事实**各自独立**求值。在真引擎上实测:一个 `approaches=3` / `core_algorithm=true` / `has_api_contract=true` / `error_cost='high'` —— 触发条件**全部为真**的子任务,在 `lines=15` 时仍被否决(引擎原话 `sub vetoed despite its gate firing`),`lines=25` 时才触发。**十行之差翻转一个治理门。**
|
|
549
|
+
|
|
550
|
+
根因是把**症状**编码成了条件。`~/.claude/CLAUDE.md` 的原文是「常规 CRUD」与「**单一明显实现**(< 20 行 / 一个文件)」—— 体量是「单一明显实现」的**修饰语**,不是判据本身;而 `approaches >= 2` 为真时,按定义就不是单一明显实现。上游 superpowers 6.3.0 在它自己的轴上划了同一条线(spike / bounded / architectural 量的是「这个 repo 里有没有现成的流可读」,从不看 diff 大小)。
|
|
551
|
+
|
|
552
|
+
新表达式把跳过与「且此处无设计决策」合取。**种子默认值刻意未收回**:在默认值下 `subtask.approaches < 2` 与 `subtask.has_api_contract == false` 均为假,所以一个未被测量的子任务无法跳过 —— 未知继续触发门,这是安全侧。(把两个钉子一并收回会让 `fires_when` 的四条分支全部变假,等于默认删掉这个门 —— ADR-0038 明确反对,也正是本次要避免的。)`error_cost in ['low','medium']` 而非 `!= 'high'`:该枚举恰为 low|medium|high,而 `in` 是这些文件里已验证过的运算符。
|
|
553
|
+
|
|
554
|
+
实测四格 + 两条不变量,全部用真 `workflows/judgments/subtask-gate.yaml` 跑真 resolver(`tests/workflow/subtask-gate-veto.test.ts`,7 cell):
|
|
555
|
+
|
|
556
|
+
| subtask | 改前 | 改后 |
|
|
557
|
+
|---|---|---|
|
|
558
|
+
| 15 行 + 高风险 | SKIP | **FIRE** |
|
|
559
|
+
| 15 行 + 无风险 | SKIP | SKIP |
|
|
560
|
+
| 500 行 crud + 高风险 | SKIP | **FIRE** |
|
|
561
|
+
| 500 行 crud + 无风险 | SKIP | SKIP |
|
|
562
|
+
| 15 行 + 仅 approaches≥2 | SKIP | **FIRE** |
|
|
563
|
+
| 默认(零事实) | FIRE | FIRE |
|
|
564
|
+
|
|
565
|
+
**同时更正我此前的说法**:我曾判断这条阈值「需要实测而不是改数字」。两者都不是 —— 缺的既不是更好的阈值也不是 A/B,是一个**合取**。上游 6.3.0 变便宜的是**文档**仪式而非**审批**闸门(README 原文:"a bounded task's approval is as hard a gate as an architectural one"),所以「上游变便宜了、harnessed 或许不该跳」这个推理前提本身不成立。
|
|
566
|
+
|
|
567
|
+
|
|
568
|
+
- **`ui-ux-pro-max` 的版本记录来源写错了,会造成永远清不掉的 doctor 告警。** Phase 55 把 `last_known_good_version` / `install.git_ref` 写成 2.15.0,那是 repo 最新的 **git tag**;而 `.claude-plugin/marketplace.json` 声明的是 **2.13.0**,`claude plugin install` 实际解析到的也是 2.13.0(本机升级实测落在 2.13.0)。tag 可以跑在已发布的 marketplace 条目前面,记 tag 会让 Phase 56 的 check 对着一个该渠道根本不供的版本永久报「落后」—— 一个用户无论如何都清不掉的警报。两处均改为 2.13.0。
|
|
569
|
+
- **`manifests/SCHEMA.md` 与陈旧门的失败提示补上取值来源规则**:`last_known_good_version` 按 `install.method` 分 —— `cc-plugin-marketplace` 取 marketplace 清单声明的 plugin 版本(**不是** git tag),npm 类取 registry `latest`,git 类取 tag 或 HEAD sha。
|
|
570
|
+
|
|
571
|
+
|
|
572
|
+
- **`ui-ux-pro-max` 的 `metadata.upstream` provenance 指错了仓库。** 4.32.21 把安装从 midway 自打包迁到 `nextlevelbuilder/ui-ux-pro-max-skill` plugin 后,`source` / `homepage` / `repository` 三个字段仍留在 `midwayjs/midway`,即 manifest 声明的上游不是它实际安装的上游 —— 供应链层的错误归属。改指 nextlevelbuilder(Claude Code 主路径);midway git-clone 只作为 codex `harness_overrides` 存活,已在该处注明。`install.git_ref` 一并 2.5.0 → 2.15.0。
|
|
573
|
+
- **`playwright-test` 是唯一把 `skills` 安装器 CLI 钉死到精确版本的 manifest。** `npx --yes skills@1.5.7` → `skills@latest`(`npm_version` `^1.5.7` → `^1.5.25`),与 `mattpocock-skills` / `design-taste-frontend` 两个兄弟 manifest 对齐。该钉子把安装器冻在上游 18 个 minor 之前且无理由 —— 被钉的产物应该是 SKILL 内容(来自 `microsoft/playwright-cli` 仓),不是安装器自身的版本。
|
|
574
|
+
- **`ctx7` 的 `npm_version: ^0.4.0` 连当前上游都覆盖不到。** 0.x major 上的 caret range 被锁在 minor,而上游已是 0.5.11。安装命令是无版本的 `npm install -g ctx7`,所以用户一直装的是 0.5.x,只有记录声称一个排除它的范围。改为 `^0.5.0`。
|
|
575
|
+
|
|
576
|
+
### Notes
|
|
577
|
+
|
|
578
|
+
- **ECC 的 Claude Code 通道刻意**未**改。** Phase 55 把「2.2 的 guided installer 可能取代两段式」列为 open item;读上游 README(而非 release notes)后结论相反,原文:
|
|
579
|
+
|
|
580
|
+
> **Both paths install the same `ecc@ecc` plugin.** Choose one and do not stack another manual Claude install on top.
|
|
581
|
+
|
|
582
|
+
README 还把原生 plugin 命令列在 "Also supported for Claude Code" 下,把「Claude Code plugin + the legacy Codex sync flow」列在 "Works" 下。所以换成 `npx ecc-universal install --guided` 会装出**同一个**产物,却把一条确定性的两段式命令换成交互式的 "reviewed flow" —— 对 harnessed 的非交互 spawn 是致命的(兄弟教训:skills CLI 当初就是为此加的 `-y`)。
|
|
583
|
+
|
|
584
|
+
## [4.39.0] - 2026-09-09
|
|
585
|
+
|
|
586
|
+
Phase 54「声明 / 求值一致性」。本仓的签名缺陷是「声明了机制,却没有代码求值它」 —— 4.36.0 失效的 eval trap、4.37.0 chrome-devtools 的散文承诺、4.38.0 verify 缺回退边,三次都是事故或审计倒推发现的。本轮把这条病族**成建制**清了一遍,其中一面有真实行为后果。
|
|
587
|
+
|
|
588
|
+
立项前提在执行中被实测推翻五条(112→108 计数 / 「14 个悬空事实」/ 断点行形态 / eval git fixture / DRY 抽取),全部显式更正未静默改写 —— 详 `.planning/phases/54-declaration-evaluation-parity/SPEC.md`。
|
|
589
|
+
|
|
590
|
+
### Added
|
|
591
|
+
|
|
592
|
+
- **`verify/second-opinion` —— 跨模型第二意见第一次成为会被求值的编排单元(Phase 54 T2+T3)**。`capabilities.yaml` 里的 `codex` 能力(第二意见 / cross-AI peer review)此前被锁在一条**死** `fires_when` 后面,而它引用的 `phase.requires_second_opinion` 全仓只出现那一次 —— 连事实都没声明过。
|
|
593
|
+
- **判据机械派生,不是判断题**:`harnessed facts` 取 `git diff --name-only <上一个 release tag>` 与 **ORCHESTRATION SURFACE**(`workflows/judgments/` · `capabilities.yaml` · `role-prompts` · `disciplines/` · `defaults.yaml` · `phaseFactContext.ts` · `judgmentResolver.ts` · `exprBuilder.ts` · `facts.ts` · `ledger.ts` · 任一 `workflows/**/SKILL*.md`)的交集。集合**从代码推导**,不是从样本拟合 —— 早先草案用的是「最近三次发版恰好碰过的四条路径」,那是在缺陷被发现的地方过拟合,既误报(一行 ADR 拼写修正命中)又漏报(200 行改注入语义不命中),而且把 `capabilities.yaml` / `facts.ts` 这两个缺陷出生地排除在外。
|
|
594
|
+
- **基准是 release tag,不是 `merge-base origin/main`**:后者在 commit-即-push-main 的纪律下塌缩成 HEAD,只看得见未提交改动,会漏掉多-commit milestone 的早期 commit。
|
|
595
|
+
- **条件性交付要求 = 条件性 fire 的 sub**(零新机制)。`artifacts_expected` 是 phase 级静态列表,直接声明会让第二意见记录**无条件必交**、判据没命中也卡住,`--force` 随即变成肌肉记忆。改为新 leaf `workflows/verify/second-opinion/`(serial order 90,在 code-review/paranoid 之后、simplify 之前),由 `delegates_to.gate` 控制它跑不跑;跑了就必交 `second-opinion.md`(evidence guard 已 fail-closed),没跑则 ledger 记 `status: skipped` + 原因。**跳过从隐形变成台账上一行。**
|
|
596
|
+
- `requires_second_opinion` 为 root-flat 裸标识符(sister `chrome_devtools_available`),`buildDefaultGateContext` 种 **`false`** —— 与 chrome-devtools 种 `true` 方向相反:那边未知不可**删**能力,这边未知不可**加**活。算不出来时 `harnessed facts` 的 `source` 直接写「criterion unavailable — <原因>」。
|
|
597
|
+
|
|
598
|
+
### Changed
|
|
599
|
+
|
|
600
|
+
- **`capabilities.yaml` 的 `fires_when` 改名 `routing_note`,并从 schema 删掉旧名(Phase 54 T1)**。judgment 文件里的 `fires_when` 是**真求值**的(`judgmentResolver` 读 `triggers`/`rules`);`capabilities.yaml` 里同名的 108 条**没有任何消费者** —— gate 引擎不读它,`prompt.ts:72-96` 只渲染 `cmd`/`impl`/`aliases`。同名异义就是误读的根源:读的人(包括未来的实施 subagent)会把它当生效路由,而项目 SPEC 检查表的 grep 恰恰会**放行**它们(检查表验「存在」,不验「被消费」)。
|
|
601
|
+
- 改名把 108 条一次性变得自明,并让 `additionalProperties: false` 承担守卫:写回 `fires_when` 直接是**构建期错误**,不是静默无效。门从「维护一张百条豁免表」缩成「schema 就是门」。
|
|
602
|
+
- 两处 schema 同步(`src/workflow/schema/capabilities.ts` + `scripts/check-workflow-schema.mjs` 的镜像);该 `.mjs` 里另一处 `fires_when: Type.String()` 是 **judgment trigger** 的真字段,未动。
|
|
603
|
+
|
|
604
|
+
### Fixed
|
|
605
|
+
|
|
606
|
+
- **21 处 per-phase 迭代上限第一次真的生效(Phase 54 T0)**。`workflows/**/workflow.yaml` 的 `phases[].max_iterations` 全部写成 `{{ defaults.ralph_max_iterations.<workflow>.<phase> }}`,而**没有任何一处被解析过**:`loadPhases` 的插值只覆盖 `ph.invokes`(实测 v3 下该字段恒为 `undefined`,分支从不触发),且 `interpolate` 的 `STRICT = /\{\{\s*(\w+)\s*\}\}/g` 不认 dot-path、残留即抛错 —— 接进去只会把 21 处全变成异常。21 处以字面串抵达 `resolveMaxIterations`,`parseInt` 得 NaN,统统落回 `RALPH_DEFAULT_MAX_ITER = 20`。声明 5 的 phase 实跑 20,四倍于写下的意图。
|
|
607
|
+
- 修法不是补模板层,而是**删掉 yaml 里的字段**,让值只走 `workflows/defaults.yaml` 查表 —— 与 `resolveAttemptBudget` 同一条已知能工作的路径,单一数据源。`resolveMaxIterations` 新增可选第三参数,优先级 CLI flag > yaml 字面量(向后兼容手写数字)> defaults 查表 > 20。
|
|
608
|
+
- **边界**:`checkpoint` 的 attempt budget(`budget.ts` 按 sub 直读 defaults)一直是好的;坏的是 run 引擎的 per-phase 上限。两个不同的天花板,不要混。
|
|
609
|
+
- 顺带修 **7 处键名漂移**:5 处 workflow 的 phase id 与 defaults 键早已分家(如 `verify-simplify` 的 `01-simplify` vs defaults 的 `01-code-simplifier`);`research` 的单个 `01-fan-out` 前缀键展开成 5 个真实 lane id(精确匹配下前缀键匹配不到任何 phase);`verify-progress.03-persist` 对齐为真实的 `03-progress-update`。
|
|
610
|
+
- 新增 `tests/workflow/template-ref-resolvable.test.ts`:defaults 表里的每个 `<workflow>.<phase>` 必须对应一个真实存在的 phase,且不得有 workflow.yaml 再写回不可解析的 `{{ defaults… }}`。零正则抓源码 —— 直接读两个 yaml 拿真数据。
|
|
611
|
+
|
|
612
|
+
## [4.38.0] - 2026-08-26
|
|
613
|
+
|
|
614
|
+
对手侧近 10 周提交的过读,挑出三条与本仓共享缺陷类的,逐条在本仓验证后落地。一条是把有意选的弱替代升级成真信号,一条是补一个会静默吃掉用户改动的删除路径,一条把 Trellis 的热路径方案换成零风险形态。
|
|
615
|
+
|
|
616
|
+
### Added
|
|
617
|
+
|
|
618
|
+
- **注入缓存的 compaction 失效钩子**(`manifests/optional/perturn-inject-invalidate.yaml` + `harnessed-inject-state --invalidate`)。per-turn hook 在 `<project-context>` 哈希不变时跳过重发,理由是那份内容还在对话里 —— 但 compaction 把它压掉了,缓存毫不知情,于是「跳过」继续替一份已经不存在的内容生效,最长 `HARNESSED_INJECT_REFRESH_TURNS - 1`(默认 9)轮。`injectCache.ts` 的 4.25.0 头注释把那个定时器称作 "a stateless alternative to a PreCompact hook we do not install";这次装的就是那个 hook。挂 SessionStart 不加 matcher:`compact` 压缩、`clear` 清空、`resume` 重建,都是上下文断点,而 `startup` 本就是空操作(新 session id 即新缓存键)。清整个 `inject-cache/` 而非单条 —— 条目文件名把 repoKey 与 sid 一起哈希,拿不到 sid 就单不出来;多注一次是本模块 fail-soft 契约允许的方向,少注不是。
|
|
619
|
+
- **doctor 第 21 项 `per-turn inject pairing`**(`src/cli/lib/check-inject-invalidate.ts`)。`cc-hook-add` 一个 manifest 只登记一个 hook,manifest schema 没有依赖字段,所以上面那对钩子只能是两个可选项。只装前一半 = 静默退回 4.25.0 的盲定时器行为,这条检查是唯一会说出来的地方。warn 不 fail:半装状态是旧行为,不是坏行为。
|
|
620
|
+
- **`HARNESSED_INJECT_PC_OFF=1`** —— per-turn 注入的 session 级静音开关。Trellis 用 in-prompt 关键词做同一件事,那要求 hook 每轮读 UserPromptSubmit 的 stdin;热路径上一次阻塞的读就是用户的 prompt 挂住,为省约 1500 token 不值。作用域是刻意窄的:`<workflow-state>` 不可静音 —— 它是把 agent 钉在状态机上的断点,关掉它买到的是漂移不是节省。只认字面 `'1'`。
|
|
621
|
+
|
|
622
|
+
- **`harnessed checkpoint reopen <sub> --reason "<哪里不对>"` —— verify 判否第一次有回退边**。`checkpoint fail` 的三条停机理由(`BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`)全是「停」,没有一条表示「这活儿回来了不对、重做」,于是判否之后怎么走一直只由 SKILL.md 散文承载 —— 本仓反复在修的 built-but-unwired 形态。comet 把同一条边做成 `--return-to-shape`(只接受来自 Verify/Archive)。新命令把 resolved 的 sub 打回 `pending`、记下原因,并**计入 attempt** —— 反复打回同一个 sub 会撞上与反复失败同样的 BUDGET-EXHAUSTED / BREAK-LOOP 机器,不引入第二个计数器。已处于 `complete` 的 workflow 被翻回 `active`(否则会出现一个「已完成」却挂着 pending sub 的 workflow)。被打回那次的 evidence 一并清除:pending 条目带着 `evidence_status: 'verified'` 是在声称正要重做的活儿已经验过。
|
|
623
|
+
- **刻意不叫 `reject`**:`harnessed reject <sub>` 已存在且语义相反 —— 终态放弃,schema 注释明写它不动 `fail_count`。返工计数,放弃不计。
|
|
624
|
+
- 每轮 `<workflow-state>` 断点新增 `REOPENED:` 行,带原因与 attempt 计数。此前断点只说这个 sub 又变成 `next`,不说为什么回来 —— 而那是唯一能改变下一次尝试该做什么的信息。
|
|
625
|
+
- `workflows/verify/auto/SKILL.md` 双语面新增「验证判否之后」一节,说明它与 `reject` / `fail` 的分界。
|
|
626
|
+
|
|
627
|
+
### Changed
|
|
628
|
+
|
|
629
|
+
- **`git-clone-with-setup` 卸载不再无条件 `rm -rf` clone 目录**。`gstack` / `ui-ux-pro-max` / `ecc` 都走这条安装路径,三个都是用户很可能就地改过的 skill pack,改动此前随卸载静默消失。现在只在**肯定的**脏信号(已跟踪文件被改,或存在未跟踪文件 —— 手工加的 skill 同样算用户工作)上拒绝,并指出 `HARNESSED_FORCE_UNINSTALL=1` 覆盖。未知状态(git 不可用、目标不是 worktree、目录已不在)照常放行:一个没有 git 就无法完成的卸载,拿罕见的数据丢失换来了常见的死路。
|
|
630
|
+
- 「这个目录本身是不是 repo 根」由目录里有没有 `.git` 判定,不问 git。git 会从 cwd 向上走:clone 目录本身不是 repo 时,只要任何祖先是(受版本控制的 home、repo 形状的 TMPDIR),它照样答 `true`,随后的 porcelain 报的是**外层** repo 的脏状态,一次无关的卸载被挡下。先写的 `git rev-parse --show-toplevel` 与目标目录比对在 Windows CI 上翻车 —— runner 的 `os.tmpdir()` 是 8.3 短名(`…/RUNNER~1/…`),git 打印长名,而 `realpathSync` 不展开短名,于是两边恒不相等、所有分支落到 `null`。文件系统探测没有路径形式可规范化。
|
|
631
|
+
|
|
632
|
+
### Notes
|
|
633
|
+
|
|
634
|
+
- 对手侧另两条候选**在本仓查证后判定不适用,未写代码**:(1) Trellis 的 `cap sub-agent context injection` 系列 —— 我们 `DEFAULT_INJECT_BUDGET = 1500` 与 `selectWithinBudget` 一直在;(2) comet 的 `exclude .comet runtime state from eval skill copies` —— `src/eval/runner.ts` 每个 scenario 起全新 tmp repo + tmp state root,并用 `GIT_CEILING_DIRECTORIES` 封住 git 上溯(同类泄漏本仓已踩过并修在注释里),`EVAL_OVERLAY` 是四条源码白名单,不递归拷贝任何运行产物。
|
|
635
|
+
- Trellis 的 `fix(scripts): drop invented platform session env var names` 是本仓**领先**的一条:`src/platform/platform.ts` 早已把「未经证实不得发明 session env 名」写进契约,codex 的 `sessionIdEnv` 就是 `null`。
|
|
636
|
+
- `src/checkpoint/budget.ts` 在开工时被发现于工作树中被清空(102 行全删,非本次改动,与上一轮两个 master `workflow.yaml` 凭空消失同型),已从 HEAD 恢复。
|
|
637
|
+
|
|
638
|
+
## [4.37.0] - 2026-08-01
|
|
639
|
+
|
|
640
|
+
两处「声明了能力,却没人验证它在不在」补上机器。chrome-devtools 从散文承诺变成会被求值的事实;CodeGraph 从只读的导航建议变成会自己建索引、会缩窄测试范围的接线。
|
|
641
|
+
|
|
642
|
+
### Added
|
|
643
|
+
|
|
644
|
+
- **`chrome_devtools_available` —— capability 可用性第一次被代码求值**。`workflows/verify/qa/` phase 05 声明「非功能性诊断**必用** chrome-devtools-mcp」,而它的两个 provider(`ecc` plugin 自带的 connector,或自装的 `manifests/optional/chrome-devtools-mcp.yaml`)**都是可选的** —— 两个都缺时 gate 照样 fire,模型被指向一个不存在的工具。`capabilities.yaml` 里那句「两者都缺时本 capability 不可用」是散文,零处代码读它。现新增 `src/cli/lib/probe-chrome-devtools.ts` 单一探针(plugin 注册 + stdio 注册两路,与 `check-ecc` 的双装探测共用),经 `harnessed facts` 自动填充为 gate 事实,`web-testing-routing.chrome-devtools-mcp-diagnostic` 的 `fires_when` 增加可用性臂。两条启用路径由单一常量承载,出现在事实 provenance、trigger description、doctor 消息和两面 SKILL 里。
|
|
645
|
+
- **CodeGraph `affected` 缩窄测试范围**(`workflows/task/test/SKILL.md` + zh 姊妹面):有 `.codegraph/` 索引且二进制在 PATH 时,先用 `git diff --name-only | codegraph affected --stdin --quiet` 跑受影响的测试。**空列表回退跑全量**,不是跑零个 —— 一个能静默跑零测试的缩窄启发式会把绿色变成谎言。完成证据仍必须来自全量运行,缩窄只是快速首轮。
|
|
646
|
+
- **首次索引在 task 收尾自动建立**(`src/checkpoint/codegraphInit.ts`)。`codegraph` 在 PATH 且项目无 `.codegraph/` 时,workflow 转 complete 后后台 `codegraph init`,下个 task 即可受益。挂在 `transitionWorkflowComplete` 的判定表达式上而非生成的散文步骤 —— 后者是模型要记得去跑的指令,正是本仓反复在修的形态。绝不阻塞、绝不非零退出;再入保护用按项目路径 hash 的 `flag: 'wx'` claim 文件(两次 `checkpoint complete` 是两个进程,进程内标志挡不住),30 分钟可重占以防索引器崩溃后永久堵死。auto-init 后 `.codegraph/` 未被忽略则向 `.gitignore` 追加一行并明示 —— 索引是 SQLite 文件,不忽略会被下一次 `git add -A` 卷进仓库。
|
|
647
|
+
|
|
648
|
+
### Changed
|
|
649
|
+
|
|
650
|
+
- `verify/qa` 的 SKILL 与 `capabilities.yaml` 不再声称无条件「必用」—— 无 provider 时那句话是假的。措辞改为随可用性限定,并列出两条启用方式。
|
|
651
|
+
- `check-ecc` 的 both-missing 分支此前只推销 ECC 的编排价值,对 chrome-devtools 此刻零 provider 只字未提 —— 而那是唯一需要提的分支。状态语义不变(可选工具缺席属信息而非健康故障,同 `check-codegraph`),只是消息补全。`check-mcp-availability` 对 chrome-devtools 的排除是对的,不动。
|
|
652
|
+
|
|
653
|
+
### Notes
|
|
654
|
+
|
|
655
|
+
- 探针故障(读不到 `~/.claude.json` / plugin 注册表)判为**可用**,与 ADR-0038 的 fail-closed 反向:0038 管的是静态配置错误(未定义裸变量),而读文件失败是运行期故障,属 ADR-0029 fail-soft;更要紧的是 `skipGate.ts` 的原则 —— 永远不许悄悄**删掉**一道声明过的步骤。探针把 `unknown` 与 `no provider` 分开携带,理由串会说明是哪种。
|
|
656
|
+
- 用的是 `fires_when` 增臂而非 `skip_gate`:`skip_gate` 只存在于 master 的 `delegates_to[]`(`DelegationClause`),`WorkflowPhaseV3` 是 `additionalProperties: false` 且引擎的 phase 循环根本没有 veto 路径 —— 写在 phase 上会被 schema 门直接打回,即便通过也是死配置。
|
|
657
|
+
- 诚实边界:`harnessed run` 没有 `--context` 入口,默认路径下 `subtask.test_type` 恒为 `'general'`,phase 05 本就全 skip(这是 `verify/qa` 明文设计的互斥单选,不是缺陷)。本次修复对今天可见行为的作用主要在散文与 doctor 报告;gate 臂是为任何真正传入 `test_type: 'perf-diagnostic'` 的调用方 correct-by-construction。
|
|
658
|
+
|
|
659
|
+
## [4.36.0] - 2026-08-01
|
|
660
|
+
|
|
661
|
+
摘掉 `ralph-loop` 上游依赖 —— base 组件 12 → 11。4.35.0 把交付保证内化到了 harnessed 自己的活路径上,这一版兑现内化的收益:交付闸门不再需要装任何插件。同时修掉 `harnessed setup` 把同一批组件印两遍的输出。
|
|
662
|
+
|
|
663
|
+
### Changed
|
|
664
|
+
|
|
665
|
+
- **`ralph-loop` 从 base manifest 摘除**(`manifests/tools/ralph-loop.yaml` 删除,5 tools + 6 skill-packs = 11)。它提供的三重停机现在由 harnessed 自有 CLI 承担:`harnessed checkpoint complete <sub> --result-file <path>` 三重 fail-closed(声明的产物 / TDD boundary / verbatim `<promise>COMPLETE</promise>`),`harnessed checkpoint fail <sub> --failing-tests <n>` 输出 `BUDGET-EXHAUSTED` / `NO-PROGRESS` / `BREAK-LOOP`。仅当三者都未触发才允许重 spawn。
|
|
666
|
+
- **capability `ralph-loop` → `completion-gate`**(`impl: harnessed-bundled`),trigger `parallelism-gate.ralph-loop-wrapper` → `completion-gate-wrapper`,phase `01-deliver` 的 `upstream:` 去掉(schema 里本就是 optional)—— 该 capability 是 harnessed 自己的 CLI,再指任何 upstream 都是把刚摘掉的依赖重新声明一遍。
|
|
667
|
+
- **`/goal` 兜底一并删除**。ADR 0036 的三级链(plugin → `/goal` → self-loop)存在的唯一理由是回答「插件没装怎么办」;自有 gate 成为主路径后这个问题连同两个兜底档一起消失。`/goal` 至今只有 ADR 0036 自述背书,从未实拉验证 —— 留一个未验证的第三档是负债不是保险。ADR 0036 转 `superseded`,新增 **ADR 0039** 记录内化与摘除(含旧 flag → 新停机理由的映射表,以及诚实的代价:失去进程级硬上界,`checkpoint complete` 成为单点)。
|
|
668
|
+
- 指令面 56 个 SKILL 文件经 `scripts/rewrite-skill-invoke-sections.mjs` 重渲染(marker v4.11.0 → v4.12.0),en / zh-Hans 双面同步;README 11 语种的组件清单与 capability 普查同步。
|
|
669
|
+
|
|
670
|
+
### Fixed
|
|
671
|
+
|
|
672
|
+
- **`harnessed setup` 把同一批组件印两遍**(用户 dogfood):逐组件进度行 `[n/13] status name` 与随后的分组表格是同一份数据。进度行的存在理由(v4.13.0:Step B 整段静默被当成卡死)只在活终端成立,故改为 **transient** —— TTY 上 `\r` 就地刷新单行、结束前擦除,非 TTY(CI / 重定向)零输出。捕获的日志里只剩表头与分组表格。
|
|
673
|
+
- **`scripts/verify-eval-traps.mjs` 的 overlay 路径失效**:`runDeps.ts` 早已移到 `src/platform/`,该清单还指着 `src/cli/lib/`,整个 trap 套件在 ENOENT 上静默跳过 —— 一道不再 gate 的 gate。修复后三个 trap 全部 TRAP-EFFECTIVE。
|
|
674
|
+
- **`.github/workflows/ci.yml` 的 Windows sentinel 步骤指着不存在的路径**(`tests/routing/` → 实际在 `tests/workflow/`),且用 `pnpm test -- <path>` 这一已知不可靠的过滤形式;改为 `vitest run <path>`。
|
|
675
|
+
- 恢复三个被遗留误删/回退的工作树文件:`workflows/{discuss,verify}/auto/workflow.yaml`(两个 master 缺失导致 K10 孤儿 trigger 门红 + 16 个测试 ENOENT)、`tests/dogfood/cycle-1-discuss.dogfood.test.ts`(盘上是 4.35.0 修复前的 `scope_days` 占位值,会让 skip_gate veto 用例因错误的原因变绿)。
|
|
676
|
+
- `provenance.schema.json` / `docs/INSTALLER-CONTRACT.md` / 项目 `CLAUDE.md` 里指向已删除插件的描述与示例。
|
|
677
|
+
|
|
678
|
+
## [4.35.0] - 2026-07-31
|
|
679
|
+
|
|
680
|
+
判据第一次真的有辨别力,完成保证第一次不依赖上游 plugin。承接 4.33/4.34 的框架约束(**普通用户没有作者本机那份 `~/.claude/CLAUDE.md`**),本版把「写了但从没通电」的最后几处接上,并摘掉一个早已冗余的上游依赖。
|
|
681
|
+
|
|
682
|
+
### Added
|
|
683
|
+
|
|
684
|
+
- **`harnessed facts <master>`(第 32 个子命令)+ `harnessed gates --context-file`。** 此前 gate 判据在运行时**没有辨别力**:`buildDefaultGateContext` 把判据 fact 全设成「会 fire」的一侧,而 `workflows/` 下零处传 `--context` —— 等价「永远 fire」。新子命令从 master yaml 的 `gate` / `skip_gate` 反查 judgment 表达式、再用 expr-eval 的变量提取器派生出**真正被 gate 的 fact 集**(不是把 40 个 fact 全塞给模型),自动填三项确定性推导(`subtask.lines` / `phase.files_touched` 从 `git diff --numstat` / `--name-only` 派生;`phase.stage` 取 master 实参),判断题留 `null` 并附一句人话解释它在判什么。fact 集**不硬编码**:对账测试用另一套独立的正则提取器重算期望集,两套算法不同源才检得出漂移。`--context-file` 避开 Windows 上嵌套 JSON 双层转义的老坑。**刻意不推** `open_decisions` / `error_cost` / `approaches` —— 从代码推是造假信号,比默认全开更危险。
|
|
685
|
+
- **`delegates_to[].skip_gate` —— judgment 的 `skips_when` 首次真正生效。** resolver 早就支持 `.skips`,但所有 `gate:` 一律引 `.fires`,所有 ❌ 跳过条件**从不被求值**。veto 语义**故意与 ADR-0038 反向**:撞 undefined 变量时**不 veto**(`fires` 侧 fail-closed 是「不确定就不跑」,veto 侧「不确定就不 veto」等于「不确定就跑」——两者同为「配置坏了就不多做事,也绝不静默删掉治理关卡」)。`gates.ts` 与 `masterOrchestrator.ts` 共用同一模块,并有一条五行真值表的**双引擎一致性测试**锁死(同一份 yaml + 同一 context,两条路径必须给出相同裁决)。
|
|
686
|
+
- **完成保证内化 —— 不装任何上游 plugin 也成立。** 此前 harnessed 自己的机器(`isComplete` 4 层双信号 / `promiseExtract` / `ralph_max_iterations`)齐全但长在 `harnessed run` 那条被每个 SKILL 明令禁用的死路上。现搬到 checkpoint / ledger 活路径,由**四个确定性检查**构成:产物存在性(`checkArtifacts` fail-closed)· **产物 boundary**(`tddBoundary.ts`:非空 / 红绿两侧俱在 / 测试文件未被删)· 迭代预算耗尽 · **无进展熔断**(连续 2 次失败测试数不降或证据 digest 不变)。`<promise>COMPLETE</promise>` 校验**不算进这四项** —— 它判的是自述,只在 `--result` 传入时武装。参考 ECC 2.1.0 的循环编排设计(`gan-harness.sh` 的三重停机 + `loop-design-check` 的「done-criterion 必须配 boundary」),但**不照搬**它那套「模型自述分数 + 三层正则抠 markdown、抠不到默认 0.0」的脆弱形态。
|
|
687
|
+
- **跨文件重复表达式的守卫测试。** 扫全部 `workflows/judgments/*.yaml` 的 `fires_when` / `skips_when`,规范化后分组,任何 ≥2 成员即失败。第三条断言是关键:**复合谓词(含 `and` / `or`)永不可豁免** —— 复合式正是「抄判据」的形态,给它开豁免等于废掉这道防线。
|
|
688
|
+
|
|
689
|
+
### Fixed
|
|
690
|
+
|
|
691
|
+
- **`stage-routing.yaml` 逐字复制了三个 gate 文件的判据,master 走副本、原文件成装饰品。** 后果刚被实证:新加的 `phase.files_touched > 5` 判据进了 `phase-gate.yaml`,但 discuss master 读的是三臂旧副本 —— **加了等于没加**(实测:改前 `files_touched: 9` 与 `2` 结果完全相同,改后才分开)。现删除三条副本、master delegate 直引 canonical,K10 孤儿 trigger 读数 `41 → 38` 零 orphan。strategic 那条**不是**逐字副本而是两条 trigger 的并集(直接指向任一条都会丢臂造成回归),改为在 `strategic-gate.yaml` 新增聚合 trigger 逐字搬迁、零行为变化。第三组重复(`phase.has_ui_changes` × 3)是原子单事实谓词、分属不同层,豁免并写明理由。
|
|
692
|
+
- **`resolveAttemptBudget` 的 key 永远查不中 → 迭代预算从未生效。** `defaults.yaml` 的 key 是完整 workflow 名(`task-test`),而 ledger 里的 `sub` 是叶名(`test`)—— 查不到就静默退回常量 20,**每个真实 sub 的预算都是 20**。改为 exact-match 优先 + 叶名后缀匹配,歧义叶取 MAX(fail-open:宁可晚停不可误停)。
|
|
693
|
+
- **`tddBoundary` 的 git 检查审判了错误的仓库。** `C:/Users/easyi` 本身是 git 仓库而 `%TEMP%` 在它里面,所以 fixture 的 tmpdir 落在该仓库工作树内 → `rev-parse --verify HEAD` 成功、fail-open 短路没机会触发,而两条 `git diff` **没带 pathspec**,报的是整个 home 仓库的 diff(其中一个历史误提交的已删除文件命中测试路径判定)。加 `-- .` 限定;这在语义上更正确 —— boundary 只该审判它被指向的那棵子树,不该审判碰巧包住它的仓库。补双向隔离性测试(子目录零 finding / 指向 cwd 仍 BLOCK),防止 scoping 把该检查静默阉割。
|
|
694
|
+
- **`phase.has_ai_phase` / `phase.requires_coverage_audit` 不在 schema 与默认 context 里**,导致 `verify-eval-review` 与 `verify-validate-phase` 在默认路径上永远是静默 false。补进 `PhaseShape` + gateContext(取不 fire 的一侧,靠 `harnessed facts` 列成 null 交模型填)。
|
|
695
|
+
- **摘掉 `karpathy-skills` 上游依赖(base manifest 13 → 12)。** 它其实早已内化完:`capabilities.yaml` 的条目是 `impl: harnessed-bundled` + `discipline_ref`,规则被全部 28 个 workflow 通过 `disciplines_applied` 引用,仓内零处调上游 slash command —— 那个 plugin 是冗余的。**但前置条件是补齐超额声称**:description 声称覆盖 `trust-internal-code` 与 `no-comments-default`,规则里根本没有。两条补进 discipline(5 → 7),其中 `no-comments-default` **改写不照搬** —— 上游主张「默认不写注释」,而 bundled 资产的注释是普通用户理解它的唯一途径,落地为「注释解释 why 不解释 what」。同时把 description 变成**机器可读契约**(`… — N rules: id / id / …`)并加双向集合对账测试,永久关掉超额声称这个洞。
|
|
696
|
+
- **`role-prompts.yaml` 的 4 行中文会进模型 prompt。** role prompt 是 subagent 的主体 prompt,英文用户会收到夹带中文的角色定义(v10.0 的 i18n 只修了 discipline 侧)。en base 改英文、中文留在 zh sibling;守卫测试**双向**断言(en 零 CJK **且** zh 仍含 CJK),防止靠删中文而不是搬中文把测试骗绿。
|
|
697
|
+
- **`generateCommands.ts` 未同步 facts 步骤**(与 SKILL 是声明了 MUST-stay-in-lockstep 的姊妹面)。对齐测试不硬编码句子,而是读活的 `SKILL.md` 抠出该行再断言生成器输出包含同一字符串。
|
|
698
|
+
- **`resolveHookCommand` 的 compiled 分支静默丢弃尾部 flag。** 该分支替换的是**传输方式**而非语义(compiled 形态没有宿主 `node`、且资产按版本分目录,写死路径会在升级后变孤儿),但「命令 = 传输 + 身份」这个假设只在前两个无参数 hook 上成立。4.34.0 的 `check-docs --hook` 一旦被识别为第一方 hook,`--hook` 会被丢掉 → 从「只在 git commit 时检查」变成**对每个 Bash 调用无条件阻断**。改为保留 marker 之后的所有 token(无参数时输出逐字节不变),`check-docs` 加入 `COMPILED_HOOK_IDENTITIES`,统一 uninstall 与 doctor 自愈现在都覆盖它。
|
|
699
|
+
|
|
700
|
+
### Notes
|
|
701
|
+
|
|
702
|
+
- **✅ 与 ❌ 同时成立时 `skips_when` 否决 `fires_when`** —— 这是显式决定,不是执行顺序的副作用,有专门测试锁定。依据:方法论的 Phase 层判据里两类条件本就不互斥(「≥2 open decisions」与「< 1 天工作量」可同真),而 fallback 铁律是「拿不准 → 倾向跳过」。连带修正两个 dogfood fixture —— 它们的 `scope_days` 是 `skips_when` 还是死配置时随手填的占位值,现在该字段有语义了。
|
|
703
|
+
- 撤下四个恒真默认值的行为影响:`verify-paranoid` 不再每次 verify 都跑,`/plan` 不再每次都 spawn 架构 review。这是本 slice 要的 —— 这些门第一次由判据决定而非恒真。
|
|
704
|
+
- 未纳入的后续项见 `.planning/phases/52-claude-md-gap-close/CONTEXT.md`:ralph-loop 依赖的实际摘除(等内化验证后)· `masterOrchestrator-helpers.ts` 的同构仲裁缺陷 · en base 资产约 500 行 `#` 注释中文 · checkpoint CLI 面整体未接 i18n。
|
|
705
|
+
|
|
706
|
+
## [4.34.0] - 2026-07-30
|
|
707
|
+
|
|
708
|
+
CLAUDE.md 差距审计第二梯队。本版把三类「写了但从没通电」的机制接上,并把一个上游已删除的 API 面迁完。承接 4.33.0 的框架约束:**普通用户没有作者本机那份 `~/.claude/CLAUDE.md`**,所以 bundled 资产不接线 = 用户永远得不到。
|
|
709
|
+
|
|
710
|
+
### Added
|
|
711
|
+
|
|
712
|
+
- **`harnessed check-docs`(第 31 个子命令)+ opt-in 的文档纪律 hook。** 此前唯一真正硬失败的文档纪律 gate 是 `scripts/check-state-archive-stale.mjs`,而 **`scripts/` 不在 npm `files` 白名单** → 用户装了 harnessed 得不到任何文档纪律守卫。现在规则实现落 `src/`(随 `dist/` 分发),`manifests/optional/doc-discipline-gate.yaml` 用 `cc-hook-add` 把它接成 `PreToolUse(Bash)` hook,`--hook` 内再判 `tool_name` 与 git commit 正则,其余 Bash 调用 no-op。**exit code 直接当 hook 契约**:0 清洁 / 1 warn(仅建议,不阻断)/ 2 halt(阻断工具调用),与 `doc-discipline.yaml` 的 `enforcement:` 字段一一对应。选 PreToolUse 而非 Stop:Stop 上 exit 2 会阻断回合结束并重新提示模型,而这是模型无法修复的确定性检查 → 无限循环。`--max-state-lines` 默认 100(等于 bundled yaml 的值 —— shipped 默认必须与用户读到的规则一致;`scripts/` 侧的 150 是本仓自己的收紧节奏,刻意不统一)。
|
|
713
|
+
- **孤儿 judgment trigger 的 CI gate(K10)。** `resolveJudgmentGate` 是纯 ref 驱动:没有 `workflow.yaml` 的 `gate:` / `parallelism:` 引用,judgment 文件永不加载。此前**没有任何机制能发现孤儿**(既有测试只校验 ref 形状)。新 gate 枚举全部 trigger 与全部引用点求差集,当前读数 `declared=41 / exempt=8`;8 条豁免各带理由,分两类:真·always-fire 语义的无条件 delegate(硬接 gate 会把无条件 sub 变成条件 sub,是行为回归)与对应 sub-workflow 尚不存在的 GSD phase。
|
|
714
|
+
|
|
715
|
+
### Fixed
|
|
716
|
+
|
|
717
|
+
- **三份 web routing judgment 是运行时孤儿 —— 12 个 trigger 零引用。** `web-search-routing` / `web-testing-routing` / `web-design-routing` 写得完整(fact 也都在 schema 与 gateContext 里备好),但 ADR-0032 描述过的那步 `gate:` 接线从未落地,所以整组「按需 rules 路由」从未通电。现全部接线:research 的 `01-fan-out` 拆成 5 条 gated lane(兑现该 phase 注释里承诺过、从未实现的「按 capability route 触发 source」)· verify/qa 补 4 条 lane · verify/design 换 ref(与 `stage-routing.verify-design-changes` 的 predicate 逐字相同,零行为变化)。连带 `chrome-devtools-mcp` 与 `browse` 补进 `verify/qa` 的 `tools_available` —— 此前「非功能性诊断必用 chrome-devtools-mcp」这条硬规则对模型完全不可见。
|
|
718
|
+
- **浏览器路由改为 `/browse` 主导**(用户裁决),`playwright-cli` 降为备选:`needs_browser_automation` 补进 `SubtaskShape` 与 gateContext(此前该 fact 不在 schema 里 → 求值撞 undefined-variable → 按 ADR-0038 fail-closed **永不 fire**),trigger 改名 `playwright-cli-probe` → `browse-probe`,降级链按既有手法用 prose 注记表达(`/browse` 来自 gstack,未装则退 `playwright-cli`,两者都缺退平台内置)。**刻意不引入 deny-list**:原方案里「禁 `mcp__claude-in-chrome__*`」依据的是作者本机实测,属个人环境偏好,bundle 一条硬 deny 等于把它塞进所有用户的引擎。
|
|
719
|
+
- **`Agent Teams` 指令面全线指向上游已删除的 API。** CC v2.1.178+ 删除了两个团生命周期工具:团在首个后台 teammate spawn 时隐式形成、`team_name` 被接受但忽略、关闭是**按名请求**而非工具调用、团目录 session 退出自动清理。此前 34 个 SKILL × 2 语言 + capabilities + role-prompts + `run.ts` + `verify/multispec` / `task/deliver` 的 workflow.yaml + `docs/WORKFLOW.md` 全部还写着旧 API,而 `workflows/auto/SKILL.md` 更把已不存在的删团工具定为 **MUST-in-finally 契约** —— 该分支一旦命中即不可执行。capability 的 `cmd` 字段改为承载调用形态(`Agent(name, run_in_background=true)` / `ask the <teammate-name> teammate to shut down`)而非编造工具名;`cc_version` 只声明 `>=2.1.178` 并说明不再支持旧路径。**连带修 `generateCommands.ts`** —— 它是 `~/.claude/commands/<name>.md` 的生成器、也就是用户实际读到的指令面,若留在旧 API 就会 ship 一个活的矛盾(SKILL 说「没有建团工具」而生成的命令文件说「调建团工具」)。新增守卫测试:死工具字面量不得出现在活指令面,迁移说明注释需在 ±1 行内带否定语(豁免藏不住真指令)。
|
|
720
|
+
- **删除 `after-output` 强制 hook(死代码)。** 它只在 `r.target === 'chat'` 时可达,而该字段除测试 stub 外**全仓从无赋值**,且所在的 `harnessed run` 路径被每个 SKILL 明令禁用 —— 在真实编排里执行次数为 0。它的职责(output-style 规则只约束对话回复、不约束 subagent 写的文件)已由 4.33.0 的 prompt 注入 scope 分组承担,确定性的文档检查则由本版的 `check-docs` 承担。同步清理其单测与两处 mock。`before-spawn` 保留(4.33.0 已修 tier bug)。
|
|
721
|
+
- **research 默认 fact 修正(防回归)。** `01-fan-out` 拆成 5 条 gated lane 后,若沿用旧默认 `needs_web_search: false`,每条 lane 都不 fire → research 退化成零来源,比接线前更糟。改为 `true` + `search_type: 'general' → 'keyword'`(顺带修一处 schema drift:`'general'` 根本不在 `SearchType` union 里),使默认恰好只 fire tavily lane,与接线前「一个 fan-out 步骤无条件跑一次」行为等价。
|
|
722
|
+
- **本仓 ROADMAP 的两处内联收尾叙事。** 新 `check-docs` 规则改对之后立刻发现自己的文档在违规:里程碑索引行里内联了 `CI green 3-OS`(该信息已被同行末尾的 SUMMARY / audit 指针覆盖)。同时把 `adr-ref` 从 ROADMAP narrative 信号里移除并加回归测试锁住 —— `ADR-0030` 这类引用**本身就是指针**,正是该规则希望概览层使用的形态,拿它当违规信号会惩罚正确行为、把规则意图弄反。
|
|
723
|
+
|
|
724
|
+
### Notes
|
|
725
|
+
|
|
726
|
+
- 未纳入本版的后续项见 `.planning/phases/52-claude-md-gap-close/CONTEXT.md`:`resolveHookCommand` 的 compiled 分支会**静默丢掉尾部 flag**(所以不能把 `check-docs` 直接加进 `COMPILED_HOOK_IDENTITIES`,否则 `--hook` 消失、hook 从「只在 git commit 时检查」变成对每个 Bash 调用无条件阻断)· `masterOrchestrator-helpers.ts` 的同构仲裁缺陷(先答「`order` 已决定次序处 tier 仲裁是否还有意义」)· en base 资产 597 行中文(其中 `role-prompts.yaml` 4 行在 body/description 里、会进模型 prompt)。
|
|
727
|
+
- T2.1(gate facts 生产链)与 T2.2(`enforcement: mandatory`)的 spec 已 ready-to-execute,裁决见 `T2.1-SPEC.md`;T2.7(完成保证内置化 / 摘 ralph-loop 与 karpathy-skills 两个上游依赖)spec 待裁决,见 `T2.7-SPEC-loop-internalization.md`。
|
|
728
|
+
|
|
729
|
+
## [4.33.0] - 2026-07-30
|
|
730
|
+
|
|
731
|
+
CLAUDE.md 差距审计第一梯队。四路并行只读审计(治理关卡 / 澄清判据与并行机制 / 文档纪律与 TDD / rules 路由与输出规范)逐条对齐三层栈方法论,产出 `.planning/CLAUDE-MD-GAP-AUDIT-2026-07-30.md`(五类系统性断裂 + 7 个确认 bug + 5 处文档失真,每条带 `file:line`);本版交付其中修复成本最低、影响最直接的四项。
|
|
732
|
+
|
|
733
|
+
**贯穿本版的框架约束**:普通用户没有类似作者本机那份 `~/.claude/CLAUDE.md`,所以方法论必须活在 harnessed 自己的 bundled 资产里 —— `harnessed prompt` 的注入是普通用户拿到这些规则的**唯一**通道。这条重排了修复优先级:注入层的正确性从「洁癖」升为「规则能否落地的唯一保障」。
|
|
734
|
+
|
|
735
|
+
### Fixed
|
|
736
|
+
|
|
737
|
+
- **discipline 的 scope 在 prompt 注入层被剥离(唯一会主动产生错误产物的缺口)。** `buildDisciplinesSection` 只渲染 `rules[].description`,把 `trigger` 与 `enforcement` 整个丢掉,再冠以 `## Disciplines (always-on — L0 substrate)` 表头。于是本该只约束对话回复的 output-style 规则(禁 em-dash / 禁结尾总结 / 禁 emoji / 段段 BLUF)被 subagent 无条件套到它自己写的 README / CHANGELOG / SUMMARY.md / PLAN.md 上。现在按 scope 分两组渲染,chat-scope 规则落在一个明确写着「govern how you talk to the user and do NOT constrain the files you write」的子块下;纯字符串匹配 `response.target == 'chat'`(不引 expr-eval),trigger 缺失/未知一律当 always-on(与该函数既有 fail-soft 一致)。连带纠正 `output-style.yaml` 三条错标 `always-on` 的规则归属:`bluf-conclusion-first` 与 `no-sycophantic-open-close` 改 chat-scope(后者是 `enforcement: auto-fix` + `strip-sycophantic`,无条件生效等于让改写器去动产物文案,三条里唯一会破坏交付物的),`precise-quantifier` **故意保持 always-on**(产物文件也该精确量词,且不产生错误产物)—— 该裁决由测试锁定,防后人顺手全改。
|
|
738
|
+
- **语言纪律的 8 类英文保留清单缺 3 类,且走硬编码而非 yaml SoT。** 8 类原本只是 `language.yaml` 的纯注释,真正到达 subagent 的是 `buildLanguageSection` 里一句硬编码,对照方法论原文缺第 3 类(工具/框架/库/产品/公司名)、第 7 类(业内固定缩写 TDD/CRUD/MCP/a11y)、第 8 类(引用原文 verbatim),第 1 类也漏了 regex / SQL / 配置文件内容。现在 8 类提升为 `preserve-english-categories` 规则 description 内的编号 data,`buildLanguageSection` 从 yaml 解析;yaml 缺失/损坏 → fail-soft 回退原句。(未做成顶层 `preserve_categories:` 字段:discipline schema 是 `additionalProperties: false` 且 CI 有逐字镜像,顶层新键会同时打红 schema gate,需 schema + 镜像 + 重生成 `schemas/` 三件套,单开 slice。)
|
|
739
|
+
- **`/task --skip-sub discuss` 命不中任何 delegation clause → 主 session 澄清后仍 spawn brainstorming subagent。** `task` 的 sub 名是 `clarify`,而 SKILL 文本传的是 `discuss`,`SKIP_SYNONYMS` 只有 `clarify → discuss` 单向,`matchSkipSub` 三路匹配全 false。后果是方法论明令禁止的退化:subagent 无法与用户对话,在其内部跑 brainstorming 会变成自闭式 question generation。4.32.20 那次改名只修了 `/auto`(它的 sub 就叫 `discuss`),漏了 `/task` —— 而 `/task` 是 Execute 阶段主入口,每个子任务走一次。同义词改为 **per-entry 双向且非传递**(将来加 `{ foo: 'discuss' }` 不会让 `foo` 成为 `clarify` 的同义词),返回值仍是**用户实际输入的拼写**(`warnUnmatchedSkips` 拿它做差集,返回 clause 名会误报)。端到端验证:`clarify` 落 `skip`、`fire` 里无 `task-clarify`、stderr 无 unmatched 警告;旧写法 `--skip-sub clarify` 与 `/auto` 路径均不回归。
|
|
740
|
+
- **优先级仲裁是 no-op。** `run.ts` 把 `tier` 填成工具名而非 `priority_hierarchy` 条目名 → `hierarchy.indexOf(tier)` 全部 -1 → 全落 `MAX_SAFE_INTEGER`,排序退化为恒等;且返回值未赋值使用,结果直接丢弃。现在 tier 从 capability 的 `impl` 解析(`gstack`/`gsd`/`superpowers`/`mattpocock-skills`→`mattpocock`/`claude-platform`→`parallel`),两条按 capability 名覆盖(`planning-with-files` / `karpathy-guidelines`,其 impl 桶是异质的不能整桶映射);未匹配 → `MAX_SAFE_INTEGER` + **稳定排序**(decorate-sort-undecorate,同 rank 保留输入顺序);`capabilities.yaml` 不可读 → warn + 空 map 不重排(ADR-0029 fail-soft)。tier 的语义定义为「owning upstream system」,即方法论优先级句排的东西。**已知残留**:`invokes_tools` 声明的工具从不被引擎 spawn(它们是给 subagent 用的 slash command),所以仲裁结果目前只落成确定性的 transparency 行;要让顺序真正决定行为需把 arbitrated 列表喂进 `buildAgentDef`,超出本版范围。
|
|
741
|
+
|
|
742
|
+
### Added
|
|
743
|
+
|
|
744
|
+
- **TDD 跳过声明协议的验收门(此前 0 机器化)。** 方法论要求「若评估无需 TDD 必须在文件里显式记录跳过理由;无声明且未执行测试验证则拒绝验收」,但 `workflows/task/test/workflow.yaml` 从未声明 `artifacts_expected` → `checkArtifacts` 返回 `none_declared` → `harnessed checkpoint complete task-test` 无任何拦点,既拦不住缺声明也拦不住没跑测试;skip reason 只落 ledger 的 `current-workflow.json`。现在声明 `artifacts_expected: [tdd-evidence.md]`,复用现成 fail-closed 证据门(缺失 → BLOCKED exit 1,`--force` 记 `evidence_status: overridden` 作为有审计痕迹的逃生口),**零 `src/` 改动**。二选一(红→绿记录 / `SKIPPED — <reason>` 声明)放在文件内容里,因为 `collectDeclared` 是纯 AND 语义无 OR;不复用 `findings.md` 是因为 discuss 阶段先写的同名文件会经由裸名的 phase 目录探测**直接满足**该门造成假绿。role prompt checklist(en + zh-Hans)同步加一条,写明无声明会被 BLOCKED。
|
|
745
|
+
|
|
746
|
+
### Notes
|
|
747
|
+
|
|
748
|
+
- 未纳入本版、已记入 `.planning/phases/52-claude-md-gap-close/CONTEXT.md` 的后续项:`masterOrchestrator-helpers.ts` 的同构仲裁缺陷(先答「`order` 已决定次序处 tier 仲裁是否还有意义」,若无则删 placeholder 优于补映射)· en base 资产 597 行中文(其中 `role-prompts.yaml` 4 行**在 body/description 里、会进模型 prompt**,英文用户的 subagent 会收到夹带中文的角色定义)· `task/test/SKILL.md` 表格缺 `artifacts_expected` 列且无 gate 校验 SKILL.md↔workflow.yaml 一致性。
|
|
749
|
+
- 审计中改判为 **out-of-scope** 的条目(属作者环境偏好,不该 bundle 强推):`CLI-TOOLS.md` 的 fd/rg/bat/eza 强制替换(用户机器上可能未安装)· RTK · `gws` 的操作 SOP。
|
|
750
|
+
|
|
751
|
+
## [4.32.23] - 2026-07-29
|
|
752
|
+
|
|
753
|
+
ECC 编排立项的产物 —— 但**不是**原计划那个。治理链(office-hours → design doc → plan-ceo-review → outside voice)裁出「降级链一等公民」B 方案后,立项要求的对照实测把它否了:同题同 diff 下 `ecc:typescript-reviewer` 的发现是通用 review 的真子集,零语言特有发现。于是砍掉 probe/resolver/语言推导器整套机器,改交付 prose 级路由(Approach A)+ 实测过程中打出的两个真 bug。决策与证据链:`.planning/phases/51-ecc-orchestration/`(findings F1-F9)。
|
|
754
|
+
|
|
755
|
+
### Added
|
|
756
|
+
|
|
757
|
+
- **capability `aliases` 首次进入 subagent prompt(prose 级专家路由)。** ADR-0034 起 `aliases` 就声明在 `workflows/capabilities.yaml` 里,却**零运行时消费者**(仅 schema + 测试断言读它)—— setup offer 文案承诺的「装 ECC 点亮更细化编排」对 subagent 完全不可见。现在 `harnessed prompt` 的 `## Tools` 段在每个 base cmd 下渲染其 alias 列表:`specialist alternatives: <cmd> (<impl>), … — pick at most ONE whose provider is installed AND whose language/stack matches the change; run it INSTEAD of the base cmd above (never both). Provider not installed or no match → just use <base cmd>.` 单火约束(ADR-0034)与降级链铁律(base entry 即链尾,ECC 是 bonus tier 永不硬依赖)写在指令里,语言匹配交给模型 —— 无 presence probe、无 git spawn、无新模块、无 schema 变更。
|
|
758
|
+
|
|
759
|
+
### Fixed
|
|
760
|
+
|
|
761
|
+
- **`gsd-debug` 的三个 ECC build alias 名上游根本不存在。** ECC 2.1.0 实拉验证:`ecc:rust-build` / `ecc:go-build` / `ecc:build-fix` 三个名全是臆造,真名为 `rust-build-resolver` / `go-build-resolver` / 通用 `build-error-resolver`(上游**无** python-build-resolver,该角色由 django/pytorch resolver 分担)。同时把 `code-review` 的 reviewer alias 从 command 面改到 **agent 面**(`ecc:<lang>-reviewer`):`ecc:<lang>-review` 只是薄壳命令,正文就是调同名 agent,且命令面有覆盖洞(无 typescript/java/swift/php/csharp/fsharp),而 agent 面 11 语言齐整;build-resolver 更是**只有** agent 面。新增两条守卫测试:ECC alias 必须匹配 agent-face 正则;任何带 ECC alias 的 entry 其 base `impl` 不得为 `ecc`(降级链链尾不变式)。
|
|
762
|
+
- **`workflows/capabilities.yaml` 的 stale 注释兑现。** 原注释称 "runtime/priority.yaml picks the language-matching one" —— 该文件从未存在(仓内只有 `workflows/disciplines/priority.yaml`,不做 alias 选择)。改写为指向本次落地的真实机制。
|
|
763
|
+
- **setup 的 MCP 串行化分区忽略 harness override(潜伏的写竞态回归)。** 4.32.22 把**显示分桶**改走 `effectiveInstallMethod`(应用 `spec.harness_overrides.codex`),却把 `runStepBInstall` 的**串行化分区**留在 raw `spec.install.method` 上,同一事实两个判定点:base 非 MCP + codex override 成 `mcp-stdio-add` 的 manifest 会被显示成 MCP 桶却混进并行组,重开 v4.13.0 的共享配置 lost-update 竞态(当年 dogfood:tavily 活下来、chrome-devtools + exa 被覆盖 verify-failed)。现网 7 个带 `harness_overrides` 的 manifest 都不跨 MCP 边界故未触发。补串行化断言测试(此前测试只断言分桶,反而把不一致固化了)。
|
|
764
|
+
- **`harnessed doctor` 任一 check 抛错即整体崩。** `readClaudeConfig` 对非 ENOENT 读错误(EACCES / EISDIR)**显式 re-throw**(反 silent-swallow 的有意设计),而 doctor 用 `Promise.all` 派发全部 20 个 check —— 一个抛错 → 裸 stack trace + 另外 19 个结果全丢。改 `Promise.allSettled`,崩掉的 check 降级为自己那一行 warn(`check crashed: <message>`),其余照常报告;warn ≠ fail 的退出码策略(B-06)不变。
|
|
765
|
+
|
|
766
|
+
## [4.32.22] - 2026-07-29
|
|
767
|
+
|
|
768
|
+
ECC 边界终裁:exa 恢复自装 + key 检测;chrome-devtools 二选一(ecc 承接为主 + optional 自装兜底);ecc 定为 **bonus tier**(不必装、offer 知情提示);doctor 新增 per-harness ecc 检测 + 双装检测;setup 分桶按 method。决策链:中途曾定「ecc 升 base 必装 + chrome-devtools 归 ECC 独供」,经实证研究(ECC 2.1.0 冲突矩阵破坏级冲突为零、静态列表税实测 ≈23-25k tokens/session、上游 hook 面随升级漂移)撤回 —— harnessed 不背 ECC 的安装/摩擦责任,环境里有就点亮更细化编排。
|
|
769
|
+
|
|
770
|
+
### Added
|
|
771
|
+
|
|
772
|
+
- **doctor 20th check `ecc`(per-harness 独立探测,bonus tier 语义)。** CC 侧探 `~/.claude/plugins/installed_plugins.json` 的 `ecc@ecc`(纯 fs,复用 `isPluginRegistered` 含 legacy settings fallback,不 spawn claude CLI);codex 侧探 `~/.codex/.cache/ecc/.git`(与 manifest `harness_overrides.codex` verify 同款);**两侧独立检测独立报告,不互相推断**;codex 平台缺 `~/.codex/config.toml` → 报 codex-not-present(不是 ecc-missing),孤儿 clone cache 不算已装。状态语义:任一侧装了 → pass(注明 chrome-devtools connector 由 ECC 提供);两侧都缺 → **pass-informational**(可选增强:装 ecc 解锁更细化编排,提示 ~20k+ tokens/session 静态列表代价,sister check-codegraph「optional 缺失不是健康问题」);CC 侧 ecc 与 chrome-devtools 其他渠道并存(4.32.21 过渡方案的官方 plugin `chrome-devtools-mcp@claude-plugins-official`,或 `~/.claude.json` mcpServers 里的 stdio 条目)→ warn 双装(同名双前缀调用歧义),remediation 卸残留留 ecc(`claude plugin uninstall ...` / `claude mcp remove chrome-devtools-mcp`)。doctor 19→20 checks。
|
|
773
|
+
- **search MCP API key 检测(doctor + setup 尾提示)。** 两个 search MCP 运行时才读 key,装了没 key 首次查询静默失败:tavily-mcp → `TAVILY_API_KEY`、exa-mcp → `EXA_API_KEY`。新 `src/cli/lib/search-mcp-keys.ts` 按来源优先级探测(`mcpServers.<name>.env` > `~/.claude/settings.json` env 块 > 进程 env);doctor 12th check 更名 `MCP servers (tavily/exa)`,对已装 server 检 key,缺 → warn + remediation(settings.json env 写法 / shell export);`harnessed setup` 摘要输出后,已装 search MCP 缺 key 时逐 key 打印配置提示(i18n en+zh-Hans,`setup.search_key_hint.*`)。
|
|
774
|
+
- **恢复 `manifests/tools/exa-mcp.yaml`(revert 4.32.21 删除,用户裁决「exa 我觉得还是需要的」)。** ECC 侧 exa 2026-06 connector audit 后已退役为 opt-in catalog,不构成承接。恢复 pre-删除形态 + `last_check: 2026-07-29`(npm latest 3.2.1,`^3.2.0` 范围已覆盖,cmd 不动);notice 注明运行需 `EXA_API_KEY`。连带恢复:`tavily-mcp.yaml` `upstream_health.alternative: ecc → exa-mcp`;capabilities.yaml / web-search-routing.yaml 的 exa provider 注记改回 base 组件语义(需 EXA_API_KEY,未配置 fallback tavily / 内置 WebSearch);CI exa dry-run 冒烟 cell 与 mock-claude `mcp list` exa 行恢复。base manifest 数回到 13(tools 6 + skill-packs 7)。
|
|
775
|
+
- **新 `manifests/optional/chrome-devtools-mcp.yaml`(自装兜底,与 ecc 二选一)。** ecc 降回 optional 后「不装 ecc 的用户无非功能性诊断(perf / a11y / memory)provider」缺口重现 → 恢复 mcp-stdio-add 形态自装 manifest 于 **optional/**(非 tools/,不进 Step B auto-glob,经 setup optional offer 勾选):`claude mcp add --scope project --transport stdio chrome-devtools-mcp -- npx --yes chrome-devtools-mcp@^1.6.0`(版本从 4.32.21 时代钉死的 ^0.1.0 升 ^1.6.0),verify/idempotent/uninstall 走 `claude mcp` 命令。notice 写明与 ecc **二选一**(ECC 已含同名 connector,双装同名双前缀歧义,doctor `ecc` check 会 warn)。dry-run 冒烟 cell 恢复(optional 路径)。
|
|
776
|
+
|
|
777
|
+
### Changed
|
|
778
|
+
|
|
779
|
+
- **ecc 定位终裁:bonus tier(留 `manifests/optional/`,不升 base)。** harnessed 不承诺必装/offer-by-default,不背 ECC 的安装与摩擦责任;但环境里有 ecc 时 capabilities.yaml Bucket 11 + verify aliases(`ecc:python-review` 等)自动点亮更细化编排 —— 点亮机制本体保留不动。manifest metadata 重写为 bonus tier 定位:(a)装后解锁语言级 review/build 专家路由等细化编排;(b)**代价 ~20k+ tokens/session 静态列表开销 —— 由 ECC 自身规模(281 skills/94 commands/67 agents 清单加载)决定,非 harnessed 引入**;(c)gateguard 等强意见 hooks 可用 `GATEGUARD_EXEMPT_GLOBS`(`harnessed exempt-gateguard` 写入)或 `ECC_GATEGUARD=off` 调节。setup optional offer 对 ecc 条目打**知情提示**(i18n en+zh-Hans,`setup.optional_offer.ecc_note`,含 (a)(b) 两点)。codex `harness_overrides` sync flow(4.32.21 补齐)保留。
|
|
780
|
+
- **chrome-devtools 供给改二选一(ecc 承接为主 + optional 自装兜底)。** 翻案链写清:4.32.21 mcp-stdio-add(钉 ^0.1.0)→ 官方 plugin(cc-plugin-marketplace)→ 4.32.22 官方 plugin 方案撤销、中途曾定 ECC 独供 → 终局:装 ecc 的用户由 ECC 承接(其唯一默认 MCP connector 即 chrome-devtools),不装 ecc 的用户走 optional 自装 manifest(上文);两渠道**二选一**,doctor `ecc` check 挡双装。`chrome-devtools-mcp` capability 与 web-testing-routing 分支**保留**(provider 注记改二选一语义,清除「必装」字样)。
|
|
781
|
+
|
|
782
|
+
### Fixed
|
|
783
|
+
|
|
784
|
+
- **setup 分组按 install CHANNEL(effective method)分桶,不再按 `component_type`。** `runStepBInstall` 的 `componentTypes` 改由 effective install method 派生(codex 平台先应用 `harness_overrides`):mcp-stdio-add / mcp-http-add → 「MCP servers」;cc-plugin-marketplace / git-clone-with-setup / npx-skill-installer / cc-hook-add → 「Commands & Skills」;npm-cli → 「CLI tools」;其余 → Other。force-update 排除集合同判据(仅 method-MCP 安装器忽略 `--update-installed`,plugin 形态可正常 force-update),update 提示的「MCP servers excluded」文案按桶派生并列出具体排除项、无排除项时不再出现。
|
|
785
|
+
|
|
786
|
+
## [4.32.21] - 2026-07-29
|
|
787
|
+
|
|
788
|
+
Manifest 层去重与升级(用户裁决锁定):ECC 承接 exa + chrome-devtools plugin 化。
|
|
789
|
+
|
|
790
|
+
### Changed
|
|
791
|
+
|
|
792
|
+
- **删 `manifests/tools/exa-mcp.yaml`,exa 由 ECC MCP catalog opt-in 承接。** ECC(`manifests/optional/ecc.yaml`,optional 档)的 MCP catalog(`mcp-configs/mcp-servers.json`,手动拷入 `.mcp.json`)提供 hosted exa MCP(`https://mcp.exa.ai/mcp`,同名工具 `web_search_exa` / `web_fetch_exa`;≤2.0.0-rc.1 旧版曾默认 bundle,上游 2026-06 MCP connector audit 后退役为 opt-in),setup Step B 自动 glob 安装 exa-mcp manifest 与之重复且钉旧。`exa-mcp` capability **保留**(3 处 yaml 引用 + check-workflow-schema cross-validate),description 注明 provider = ECC catalog opt-in;**fallback 语义**:未 opt-in 时 exa capability 不可用,web-search-routing 的 exa 分支不 fire,落 tavily-mcp 默认分支 / 内置 WebSearch(既有 fallback 分支,行为零回退)。连带:`tavily-mcp.yaml` `upstream_health.alternative: exa-mcp → ecc`;doctor 12th check `checkMcpAvailability` TARGET_SERVERS 收窄为 `tavily-mcp`(check 名 `MCP servers (tavily)`);CI 冒烟 exa-mcp dry-run cell 与 mock-claude `mcp list` 的 exa 行移除。
|
|
793
|
+
- **`manifests/tools/chrome-devtools-mcp.yaml` 改装官方 plugin(`cc-plugin-marketplace`)。** 原 mcp-stdio-add 钉死 npm `chrome-devtools-mcp@^0.1.0`(旧);官方内置 marketplace `claude-plugins-official` 已有 chrome-devtools-mcp plugin(自动更新、工具更全)。改:`type: cc-plugin` / `install_type: skill`(validate 层 install_type↔method 1:N 闭合中唯一允许 cc-plugin-marketplace 的值)/ `component_type: mcp-tool`(plugin 交付物仍是 MCP 工具);install cmd 单条 `claude plugin install chrome-devtools-mcp@claude-plugins-official`(内置 marketplace 无需 `marketplace add`,`marketplace_source` 省略);`git_ref: 1.6.0`(本机 marketplace cache 实测最新);verify/uninstall 走 `claude plugin` 命令。capability 名/触发不变(web-testing-routing `perf-a11y-memory` 路由零变化)。codex 语义:codex 无 claude plugin 生态,经 `harness_overrides.codex` 保留 mcp-stdio 路径(`npx chrome-devtools-mcp@^1.6.0`,顺带解旧 manifest 钉死 ^0.1.0)+ codex 分发测试 cell,消 plugin 化引入的 harness-mismatch 回归。另注:ECC 默认 bundle 同名 chrome-devtools connector,装 ecc 的用户以 `ECC_DISABLED_MCPS=chrome-devtools`(ECC install/sync 期过滤)避免双份(manifest notice 已注)。
|
|
794
|
+
- **`manifests/optional/ecc.yaml` 补 codex sync 通道(`harness_overrides.codex`)。** ECC 多 harness:CC 走 plugin marketplace(既有 cmd 不变);codex 走上游 README 推荐的 sync flow(clone + `bash scripts/sync-ecc-to-codex.sh`,merge AGENTS.md/skills/prompts/agents 进 `~/.codex`,timestamped backup;codex marketplace 路线 experimental 不推荐)。override 用 `git-clone-with-setup`(gstack 式 pre-clean 保留 clone cache 供 D-15 SHA-verify);idempotent/verify 为弱校验(探 clone cache 存在性,~/.codex merge 态无稳定 artifact 契约,manifest 注释已注明)+ codex 分发测试 cell。
|
|
795
|
+
- **`manifests/skill-packs/ui-ux-pro-max.yaml` 改装官方 plugin(`cc-plugin-marketplace`)。** 原 git-clone-with-setup 自打包(clone midwayjs/midway v4-next 拼 `.codex/skills/ui-ux-pro-max` 进 `~/.claude/skills/`);官方 plugin 渠道已存在(nextlevelbuilder/ui-ux-pro-max-skill marketplace),自打包与之双载。改:`type: cc-plugin` / `install_type: skill` / `component_type: command` 不变;第三方 marketplace ⇒ 两段式 cmd(`claude plugin marketplace add nextlevelbuilder/ui-ux-pro-max-skill && claude plugin install ui-ux-pro-max@ui-ux-pro-max-skill`,sister karpathy-skills.yaml)+ `marketplace_source`;`git_ref: 2.5.0`(本机 marketplace cache 实测);verify/idempotent/uninstall 走 `claude plugin` 命令;codex 经 `harness_overrides` 保留 midway git-clone 路径(`claude plugin` 为 Claude Code-only)。decision_rules 路由零变化。测试:git-clone-idempotent 的 ui-ux-pro-max cell 移除,dry-run 断言迁入 manifest-install-dry-run(expectedMethod `cc-plugin-marketplace`)+ codex 分发测试 cell。
|
|
796
|
+
- **mattpocock 招式名对齐上游 2026-07 重构(engine/doctor/README ×10)。** 上游改名 `/diagnose` → `/diagnosing-bugs`、`/to-prd` → `/to-spec`、`/to-issues` → `/to-tickets`,删除 `/zoom-out`。engine(capabilities.yaml alias 键 `diagnose` → cmd `/diagnosing-bugs`)与 doctor(check-mattpocock-skills 探测新名 + legacy fallback)已在 4.16.x/v15.0 落地;本次收尾传播:README.md 及 9 个语言 sibling(cn/tw/ja/ko/pt-BR/tr/ru/vi/th)招式列举改新名、`/zoom-out` 列举项移除(叙述句示例以 `/grill-with-docs` 顶替);workflows/task/test SKILL.md + SKILL.zh-Hans.md + workflow.yaml 注释中的 `/diagnose` 改 `/diagnosing-bugs`。.planning/ 与 docs/adr 历史文档不动。
|
|
797
|
+
|
|
798
|
+
TODOS P3 小件清理(Slice 3 维持用户 2026-07-12 裁决「等真实需求信号」不启动;E1 出采购决策清单)。
|
|
799
|
+
|
|
800
|
+
### Added
|
|
801
|
+
|
|
802
|
+
- **`harnessed update --rollback [version]`(compiled 二进制专属)。** bin-backup/(E4 回滚网)已存每次 update 换下的旧版;现一条命令原子恢复:`runBinaryRollback` 复用同款 same-dir rename dance(staging 失败原件不动、swap 失败自动还原),被换下的当前版**先 bank 回** `bin-backup/<curver>/` 保回滚可逆。缺省取最高 banked 版本,`--rollback <ver>` 指定;无候选/未知版本给可操作报错(列可用版本)。本地信任模型:backup 安装时已过完整性校验,恢复仅 `--version` smoke(backup 不携带 .sha256/.sig)。npm 模式明确拒绝并导向 `npm i -g harnessed@<version>`。测试 6 cell(最新版选择/指定版/无候选/未知版/smoke 失败/安全阀)。
|
|
803
|
+
- **`docs/e1-code-signing-options.md` — E1 采购决策清单。** OS code signing(Windows Authenticode / macOS notarization)三档预算路径(维持现状 $0 / Azure Trusted Signing ~$120 每年 / 双平台 ~$220 每年)+ 排除项(sigstore/自签名不解 SmartScreen)+ 三个拍板问题。采购动作留给用户;与 4.32.19 更新通道 ed25519 资产签名是两回事。
|
|
804
|
+
|
|
805
|
+
### Fixed
|
|
806
|
+
|
|
807
|
+
- **main CI 自 4.32.12 起持续红,两类根因均修(本地全绿 ≠ CI 绿的教训重演)。**
|
|
808
|
+
- **lint ×3 OS**:`biome check .` 覆盖 bin/*.mjs,而 codegen 后的 esbuild 输出不合 biome 格式(双引号/分号)。biome 的 formatter 不支持注释级文件豁免、config-protection 禁改 biome.json → 改为 **build:hooks 自格式化产物**(esbuild bundle 后跑 `biome format --write bin/*.mjs`;biome 对固定版本 deterministic,drift gate 仍 byte-exact);banner 保留 lint/assist 两条文件级 suppression。
|
|
809
|
+
- **binary-smoke ×3 OS**:4.32.19 把 `.sha256.sig` 强制到了 sourceDir 演习 seam,CI 演习 fixture 无 .sig 即挂。**收窄签名契约至 GitHub 模式**(真攻击面 = release 渠道);sourceDir seam 为本地信任(与 rollback 的 bin-backup 同模型),不验签。4 个 sig 测试 cell 改写为 GitHub-mode mock + 新增 sourceDir 免签 cell。
|
|
810
|
+
|
|
811
|
+
### Changed
|
|
812
|
+
|
|
813
|
+
- **SOP 文本 `--skip-sub clarify` → `--skip-sub discuss`(TODOS 34 渲染 pass)。** `clarify` 从来不是 /auto 的子项名(4.31.0 eval 首日战果);generator(generateCommands + rewrite-skill-invoke-sections)与全部 workflows/*/SKILL{,.zh-Hans}.md 教科书命令改为真名 `discuss`。engine 侧 `clarify→discuss` synonym **保留**(兼容所有已安装旧 SKILL 文本,行为零变化)。
|
|
814
|
+
|
|
815
|
+
## [4.32.19] - 2026-07-28
|
|
816
|
+
|
|
817
|
+
架构 code review MEDIUM(#12,B 路线 E1 签名落地)。
|
|
818
|
+
|
|
819
|
+
### Added
|
|
820
|
+
|
|
821
|
+
- **#12 — 二进制自更新通道加 ed25519 签名(cross-origin 第二因子)。** 自更新此前从**同一 origin**(GitHub release)下载 `<asset>` 与 `<asset>.sha256`,sha256 只防传输损坏:能替换 release 资产的攻击者两个文件一起换,校验照过。现:
|
|
822
|
+
- **CI 签名**:publish.yml binaries matrix 新增 sign 步(`scripts/sign-binaries.mjs`),用 `HARNESSED_SIGNING_KEY` repo secret(ed25519 私钥,2026-07-28 生成,仅存于 GitHub secret + 本机 `~/.claude/harnessed-signing/`)对每个 `.sha256` **内容**签名,产出 sibling `<asset>.sha256.sig`(base64);upload glob 自动带上。key 缺失或零输入 hard-fail(未签名 release 会 brick 所有 ≥4.32.19 客户端的 update)。
|
|
823
|
+
- **客户端验签**:`src/cli/lib/updateSignature.ts` 内嵌 release 公钥(SPKI PEM),`verifyShaSignature` 用 node:crypto 原生 ed25519 验证(零新依赖,malformed 输入一律 false 不 throw)。selfUpdateBinary 在 sha256 匹配后 fetch `${shaUrl}.sig`(sourceDir seam 读 `<asset>.sha256.sig` 文件)并验签;**缺失或验签失败均 hard error**,原二进制不动。签名自 4.32.19 起为契约(旧 4.32.18- 客户端不验,前向兼容)。
|
|
824
|
+
- 本地 rehearsal 闭环:真私钥跑 sign 脚本 → 内嵌公钥验 true。密钥轮换 = 新 key 随新 binary 发布、过渡期双签。
|
|
825
|
+
- 测试:updateSignature 4 cell(测试 keypair 往返/篡改/垃圾/错 key)+ selfUpdateBinary 新增 4 cell(缺 .sig / 陈旧 sig / 垃圾 sig / 错 key 均 error 且 exec 不动)+ deps 新增 `publicKeyPem` 测试 seam;GitHub-mode mock 改 URL-aware。
|
|
826
|
+
|
|
827
|
+
## [4.32.18] - 2026-07-28
|
|
828
|
+
|
|
829
|
+
架构 code review MEDIUM(#7,slice 2b — 上行 import 归零)。
|
|
830
|
+
|
|
831
|
+
### Changed
|
|
832
|
+
|
|
833
|
+
- **#7(slice 2b)— 剩余 4 处「核心 import 上行进 cli/」全部消除;`src/` 上行 import 现为 0。**
|
|
834
|
+
- `runDeps.ts`(process-IO 注入 seam,零依赖)整文件移 `src/platform/runDeps.ts` —— `eval/runner` 不再上行。
|
|
835
|
+
- `scan-nested.ts`(workflows/ 目录扫描,零依赖)整文件移 `src/workflow/scan-nested.ts` —— `installers/lib/packSkillAudit` 不再上行。
|
|
836
|
+
- `loadRolePrompts` + `RolePrompt` 从 `cli/lib/generateCommands.ts` 抽取为 `src/workflow/rolePrompts.ts`(registry 是 workflow-domain 数据,spawn 路径注入用)—— `workflow/run` 不再上行;generateCommands 5 个残留 dead import(readFile/parseYaml/getLocale/SupportedLocale/resolveLocaleYaml)一并清除。
|
|
837
|
+
- `resolveWorkflowYaml` 从 `cli/run.ts` 抽取为 `src/workflow/resolveYaml.ts`(3-tier workflows/ 布局查找是 workflow-domain 知识)—— `checkpoint/evidence` 不再上行;cli 6 面(run/prompt/research/checkpoint/gates/generateCommands)全部改从下层 import。
|
|
838
|
+
- 纯搬迁/抽取,零行为变更;5 个 test 文件 import 路径同步。#7 全部 slice(1 / 2a / 2b)交付完毕。
|
|
839
|
+
|
|
840
|
+
## [4.32.17] - 2026-07-28
|
|
841
|
+
|
|
842
|
+
架构 code review MEDIUM(#7,slice 2a — assetsRoot 出土,上行 import 9 处修 5)。
|
|
843
|
+
|
|
844
|
+
### Changed
|
|
845
|
+
|
|
846
|
+
- **#7(slice 2a)— `assetsRoot.ts` + `packagePath.ts` 从 `cli/lib/` 移至 `src/platform/`。** assetsRoot(npm/compiled 双通道的资产根解析)被 compile / installers / uninstallers 5 处非 cli 模块上行 import —— 基础设施住在 CLI feature 目录里。packagePath(package root 解析,assetsRoot 唯一 src 消费者)同移。9 处上行 import 修掉 5,cli/lib 对下层的暴露面随之收窄。
|
|
847
|
+
- **修 move-induced 潜伏 bug:`getPackageRoot()` source 分支上溯层数。** 该函数按 import.meta.url 上溯**固定层数**找 package root:dist 分支 1 层不变,source/test 分支原为 3 层(基于旧位置 `src/cli/lib/`);移到 `src/platform/` 后 3 层会越过 package root(tsc 静默)。改为 2 层,packagePath/assetsRoot/gates/setup-locale 等 86 定点测试全绿。
|
|
848
|
+
|
|
849
|
+
### Known / deferred
|
|
850
|
+
|
|
851
|
+
- **#7 slice 2b(上行 import 剩 4 处)**:`workflow/run` ← `cli/lib/generateCommands.loadRolePrompts`;`checkpoint/evidence` ← `cli/run.resolveWorkflowYaml`;`eval/runner` ← `cli/lib/runDeps`;`installers/lib/packSkillAudit` ← `cli/lib/scan-nested`。各需逐个抽取到下层模块(非机械移动),另行 slice。
|
|
852
|
+
|
|
853
|
+
## [4.32.16] - 2026-07-28
|
|
854
|
+
|
|
855
|
+
架构 code review MEDIUM(#7,slice 1/2 — 埋藏 infra 出土)。
|
|
856
|
+
|
|
857
|
+
### Changed
|
|
858
|
+
|
|
859
|
+
- **#7(slice 1)— `platform.ts` + `harnessedRoot.ts` 从 `installers/lib/` 移至 `src/platform/`。** 两模块是全 harness 的基础设施(PlatformDescriptor seam:state root / skills dir / settings path / session-id env;homedir 状态根 + 遗留迁移),被 checkpoint(7 文件)/ workflow / audit / cli(20+ 文件)/ uninstallers 消费,却埋在 `installers/lib/` 这个 feature 目录下 —— 层级上"所有人依赖 installers 的内部实现"。现出土为顶层 `src/platform/`(platform.ts 零依赖、harnessedRoot 只依赖 platform,干净 leaf 层),63 条 import 机械改写(同深度路径替换),tsc 强制验证,行为零变更。
|
|
860
|
+
- vitest tally 与移动前逐位一致(2271 pass);dist rebuild + hook drift gate CLEAN(inject/stop hook entry 本就不 import 这两模块,dep-free 复刻不受影响)。
|
|
861
|
+
- **slice 2(deferred)— 上行 import 9 处**:`cli/lib/assetsRoot`(5 处非 cli 消费)、`cli/lib/generateCommands.loadRolePrompts`(workflow/run)、`cli/run.resolveWorkflowYaml`(checkpoint/evidence)、`cli/lib/runDeps`(eval/runner)、`cli/lib/scan-nested`(installers/lib/packSkillAudit)。各需逐个抽取到合适下层,非机械移动,另行 slice。
|
|
862
|
+
|
|
863
|
+
## [4.32.15] - 2026-07-28
|
|
864
|
+
|
|
865
|
+
架构 code review MEDIUM(#10)。
|
|
866
|
+
|
|
867
|
+
### Added
|
|
868
|
+
|
|
869
|
+
- **#10 — `--json` 调用的逃逸错误现在 stdout 发 JSON 信封。** 带 `--json` 的 action 在 happy/handled 路径各自发结构化结果,但**逃逸**到 process-root `unhandledRejection`/`uncaughtException` handler 的错误(LockHeldError、fs fault、unknown master 等)此前只打 stderr 人类行 `error: …` —— 机器消费者(driver loop `while harnessed advance --json; do…`、生成的 /auto pre-exec、hooks)解析 stdout 时只见 exit 1 + 空 stdout,无法 surface 原因。现 root handler 在 argv 含 `--json` 时**先**向 stdout 打单行 `{"error":{"message":…}}` 信封(shape 与所有命令的 success payload 不相交,`JSON.parse(stdout).error` 可作可靠失败探针),stderr 人类行 + exit 1 不变。
|
|
870
|
+
- 可测核心提取为 `src/cli/lib/fatalError.ts`(`wantsJsonEnvelope` / `formatFatalEnvelope`,unit 3 cell);cli.ts root handler 接线。
|
|
871
|
+
- scope 限定字面 `--json` flag:stdout 天然为 JSON 契约但无 flag 的命令(gates)仍靠 exit code signal,不在 leaf 里嗅探命令名。
|
|
872
|
+
- 诚实声明:现存 `--json` 命令的错误路径实测全 fail-soft(resume/eval/audit-log/doctor 4 probe 无自然逃逸)——信封覆盖的是 root handler 存在理由的那类**不可预见** throw(EPERM/fs fault 野外类,v3.0.3 历史实锤)。
|
|
873
|
+
|
|
874
|
+
## [4.32.14] - 2026-07-28
|
|
875
|
+
|
|
876
|
+
架构 code review MEDIUM(#11)。
|
|
877
|
+
|
|
878
|
+
### Changed
|
|
879
|
+
|
|
880
|
+
- **#11 — `PARALLEL_MID_ANCHOR = 50` 三处副本收敛为单一源。** 该 mid anchor 被 copy-paste 进 `masterOrchestrator.ts`(serial/parallel 分带)、`ledger.ts`(serial-order guard 的 effective order)、`eval/record.ts`(record→replay 重建),每处各带一句「mirror of …」注释。改一处另两处静默分叉 → 三者对 parallel 带位置产生分歧(潜伏 correctness hazard)。现 hoist 到 `src/checkpoint/subAnchor.ts`,三处 import 同一值。
|
|
881
|
+
- leaf **zero-dependency**(仅裸 literal + doc):`ledger.ts` 在 dep-free 的 per-turn hook bundle(`bin/harnessed-inject-state.mjs`)内,故该模块不得拉 typebox;regen 后 bundle 仍 0 typebox refs,drift gate CLEAN。
|
|
882
|
+
- `masterOrchestrator`(workflow,上层)→ `checkpoint`(下层)为下行边,非 #7 类倒置;`eval→checkpoint` 边已存在。
|
|
883
|
+
|
|
884
|
+
## [4.32.13] - 2026-07-28
|
|
885
|
+
|
|
886
|
+
架构 code review HIGH(#5,slice 2/2 — inject-state 收尾)。
|
|
887
|
+
|
|
888
|
+
### Changed
|
|
889
|
+
|
|
890
|
+
- **#5(slice 2)— inject-state hook 改为 TS 单一源 + codegen,443 行手写镜像归零。** `bin/harnessed-inject-state.mjs` 曾把**整条 pure pipeline** 手写复刻为 plain JS(`workflowStateBlock` / `forwardPointer` / `scanPhases` / `parseLearnings` / inject 缓存 …),仅靠 parity test 焊接 —— fixture 未覆盖的 TS 分支会在每 turn 热路径静默分叉。现 `bin/harnessed-inject-state.mjs` 由 `scripts/build-hooks.mjs`(esbuild)从新 entry `src/checkpoint/injectStateMain.ts` bundle 生成,assembly **全权委托** `buildInjection`(单一源),inject 缓存 import 自 `injectCache.ts`;entry 只留无第二消费者的 hook-specific IO glue(`repoKey`/`harnessedRoot`/`sessionIdEnvName` 的 dep-free 复刻 + 原始 `workflows.json` 读取 + ledger mtime)。
|
|
891
|
+
- bundle **dep-free**(node: builtins + dep-light 的 `injectState`/`injectCache` 及其 sibling;currentWorkflow schema 仅 `import type` 擦除,无 typebox),per-prompt 热路径成本不变。
|
|
892
|
+
- 生成物 committed;esbuild deterministic(本地 build 两次 byte-identical)+ LF-only;slice 1 的 CI「Hook regen gate」(`build:hooks` + `git diff --exit-code bin/`)已自动覆盖本 bin。
|
|
893
|
+
|
|
894
|
+
### Fixed
|
|
895
|
+
|
|
896
|
+
- **#5 附带修复 `buildInjection` 丢 `ledgerAgeMs` 的潜伏分歧。** `buildInjection` 此前调 2 参 `buildWorkflowStateBlock(wf, forward)`,**丢弃** `ledgerAgeMs` —— 于是 STALE-ledger ENGINE 行(issue #3 req 3,>24h 无 checkpoint 活动的 pending sub 判「abandoned/bypassed run」而非「live state machine」)**只在手写 bin 里触发过**,TS builder 永不发,parity test 从未 exercise 到该分支。现 `buildInjection` 新增 `opts: { ledgerAgeMs?, pcGate? }`:`ledgerAgeMs` thread 进 `buildWorkflowStateBlock`(修 STALE 分歧),`pcGate` 让 hook 的 session-delta 缓存经**同一条** assembly 路径剥离 `<project-context>`(而非另写一份)。opts 缺省 → byte-identical 旧行为。
|
|
897
|
+
|
|
898
|
+
## [4.32.12] - 2026-07-27
|
|
899
|
+
|
|
900
|
+
架构 code review HIGH(#5,slice 1/2 — stop-hook)。
|
|
901
|
+
|
|
902
|
+
### Changed
|
|
903
|
+
|
|
904
|
+
- **#5(slice 1)— stop-hook 改为 TS 单一源 + build-time codegen,消除手写镜像。** `bin/harnessed-stop-hook.mjs` 曾是 `src/checkpoint/modeBDetect.ts` `detectModeB` 的手写 plain-JS 镜像(仅靠 parity test 焊接,新增 TS 分支若 fixture 未覆盖会静默分叉)。现 `bin/harnessed-stop-hook.mjs` 由 `scripts/build-hooks.mjs`(esbuild)从 `src/checkpoint/stopHookMain.ts` bundle 生成 —— `detectModeB` 直接 import 自 `modeBDetect.ts`(单一源),hook-specific 的 IO glue 也迁入该 TS entry。
|
|
905
|
+
- bundle **dep-free**(entry 仅 import node: builtins + dep-light 的 `modeBDetect.ts`,无 typebox),per-prompt 热路径启动成本不变。
|
|
906
|
+
- 生成物 committed(如 schemas/);esbuild 输出对固定版本 deterministic,新增 CI「Hook regen gate」(`build:hooks` + `git diff --exit-code bin/`)挡 TS 改而 .mjs 未重生成的漂移。
|
|
907
|
+
- `build` 脚本追加 `build:hooks`;`esbuild@0.27.7` 提为直接 devDependency。
|
|
908
|
+
- inject-state(443 行,slice 2)待续:需先调和 `buildInjection` 签名 thread `ledgerAgeMs`。
|
|
909
|
+
|
|
910
|
+
## [4.32.11] - 2026-07-27
|
|
911
|
+
|
|
912
|
+
架构 code review HIGH(#3,方向 C)。
|
|
913
|
+
|
|
914
|
+
### Fixed
|
|
915
|
+
|
|
916
|
+
- **#3 — 统一 completion 判定为单一 SoT(方向 C「原则中庸」)。** 同一 SDK envelope 之前在 `run.ts` 单发路径(`status==='COMPLETE' || subtype==='success'`,宽松)与 `ralphLoop.isComplete`(严格)得到相反判定 —— `{subtype:'success'}` 无 status 被单发判「完成」却被 ralph 判「未完成」→ 循环到 max-iter → fail。现两处共用 `isComplete`,语义:
|
|
917
|
+
- 显式结构化 status 为准:`COMPLETE` 且 `subtype==='success'` → 完成(errored run 上的 COMPLETE 不采信);`PARTIAL`/`BLOCKED` → 未完成(ralph 继续重试,单发判 fail)。
|
|
918
|
+
- status 缺失(SDK 未填 structured_output):干净 run(`subtype==='success'`)→ 完成;否则回落到 result text 里的 `<promise>COMPLETE</promise>`(B-07 降级路径)。
|
|
919
|
+
- 非 JSON raw string → 仅 `<promise>` tag。
|
|
920
|
+
- 净效果:保留「success 无 status → 完成」的韧性(不因 SDK 不填 structured_output 而虚假失败),只收紧「显式 PARTIAL/BLOCKED」与「errored+COMPLETE」两类(此前被 run.ts 误判 ok)。
|
|
921
|
+
|
|
922
|
+
## [4.32.10] - 2026-07-27
|
|
923
|
+
|
|
924
|
+
架构 code review HIGH(#4)。
|
|
925
|
+
|
|
926
|
+
### Fixed
|
|
927
|
+
|
|
928
|
+
- **#4 — COMPLETION_SCHEMA 不再把 task 链专用的 `phase` 强加给每个 spawn。** `sdkSpawn` 对所有 spawn 硬编码 `outputFormat: {json_schema, COMPLETION_SCHEMA}`,而该 schema 把 `phase` 设为 `required` 且 enum 锁死为 4-phase task 链(`01-clarify`/`02-code`/`03-test`/`04-deliver`)。discuss/plan/verify/research/retro 等非 task sub 无此标签 → 无法产出 schema-valid 的 `structured_output` → 结构化 completion 检测对它们不可达。而**没有任何 consumer 读 `phase`**(`isComplete` + run.ts 派生只看 `status`/`subtype`)。现 `required` 只留 `status`;`phase` 降为可选、无 enum 约束的自标签。
|
|
929
|
+
|
|
930
|
+
### Known / deferred
|
|
931
|
+
|
|
932
|
+
- **#3(completion 谓词分歧,未修 — 待决策)**:同一 SDK envelope 在 `run.ts` 单发路径(`status==='COMPLETE' || subtype==='success'`,宽松)与 `ralphLoop.isComplete`(`subtype==='success' && status==='COMPLETE'`,严格)得到相反判定。统一必然改一侧的**被测试钉死的**行为,且「正确」语义取决于 SDK 是否可靠填充 `structured_output`(本地无 live spawn 不可验)。属编排 pass/fail 语义决策,留待用户定夺 strict vs lenient。
|
|
933
|
+
|
|
934
|
+
## [4.32.9] - 2026-07-27
|
|
935
|
+
|
|
936
|
+
架构 code review HIGH(issue #10)。
|
|
937
|
+
|
|
938
|
+
### Fixed
|
|
939
|
+
|
|
940
|
+
- **issue #10 — 修 workflow 状态跨 repo 泄漏残留。** `workflowStore.readStoreRaw` 在 `workflows.json` 缺失/损坏时会读 legacy 单例 `current-workflow.json` 并把它挂到 `repoKey(cwd)`。该单例是**无 key 的全局文件**(每个 harness root 一份,所有 repo 共享),挂到当前 cwd 的 repoKey = 把一个 repo 的 workflow 归属到恰好先读它的另一个 repo —— 一个从没跑过 workflow 的新 repo 会看到幻象 `<workflow-state>` 注入。4.32.6 修了 `bin/harnessed-inject-state.mjs` 的 legacy reader,本次让 TS store 路径与之一致:`readStoreRaw` 不再读 legacy fallback,`workflows.json`(按 repoKey 分槽)是唯一读 SoT,隔离 by construction。
|
|
941
|
+
- state.ts 的 D7 镜像写保留(改注释澄清):现为**只写** artifact —— rollback anchor + `harnessed eval record --from <harness-root>` 的数据源;无任何路径把它读回 live state。
|
|
942
|
+
- 修 doc 漂移:`src/cli/lib/generateCommands.ts` 生成的 `/命令` 说明由「`current-workflow.json`(sole SoT)」改为「`workflows.json`(per-repo store, sole SoT)」。
|
|
943
|
+
|
|
944
|
+
## [4.32.8] - 2026-07-27
|
|
945
|
+
|
|
946
|
+
整体架构 code review(3 agent 分半区并行:orchestration-brain / package-manager / CLI-delivery)后修 CRITICAL C1(issue #9)。
|
|
947
|
+
|
|
948
|
+
### Fixed
|
|
949
|
+
|
|
950
|
+
- **C1 (issue #9) — uninstall 现在兑现 manifest 声明的 `spec.uninstall` 契约。** `spec.uninstall`(`cmd` + `cleanup_paths`)是 schema-REQUIRED 且过 security 安检,但从无执行者:`runUninstall` 只按 `install.method` 派发到 per-method 卸载器,而后者从 `spec.install` 反推 teardown。对两个最复杂的真实 manifest 卸载错误或空转 —— `gsd`(npm-cli `npx --yes` 被误判 ephemeral no-op,71 个 skill 目录留盘)、`ui-ux-pro-max`(自清理 clone,per-method rm 已消失的 cache 路径,真 skill 原地不动)。
|
|
951
|
+
- 新增 `src/uninstallers/lib/declaredTeardown.ts`:通过共享 spawn seam(复用 `checkCmdString` 安检)运行声明 `cmd`,再 **$HOME 限制 + 幂等 force-rm** 移除 `cleanup_paths`。声明 cmd fail-soft(非零退出 / 缺 Git Bash / timeout 均 warn + 继续到跨平台的 `cleanup_paths` fs 移除);`cleanup_path` 越出 `$HOME` 子树或触发路径穿越向量则 hard-fail(broken/hostile manifest 必须失败响亮)。
|
|
952
|
+
- `runUninstall` 把「装 skill 到目录」的 3 方法(`npm-cli` / `git-clone-with-setup` / `npx-skill-installer`)路由到声明式 teardown;`cc-hook-add`(settings.json JSON 手术,声明 cmd 是 `"true"` 占位)/ `cc-plugin-marketplace` / `mcp-*-add`(带平台门控,声明 cmd 仅镜像 per-method inverse)保留各自 per-method 卸载器。
|
|
953
|
+
|
|
954
|
+
## [4.32.7] - 2026-07-16
|
|
955
|
+
|
|
956
|
+
高置信度 code review(workflow 多 agent,17 agents / 每 finding 独立 verify)对 4.32.5 issue #8 hook teardown 代码的加固。修 5 类真 bug + 3 项 DRY,全在 `src/installers/lib/harnessedHookTeardown.ts` 及消费方。
|
|
957
|
+
|
|
958
|
+
### Fixed
|
|
959
|
+
|
|
960
|
+
- **group-level 误删**(CONFIRMED):`stripHarnessedHooks` 之前在 hook-**group** 粒度过滤,一个 group 同时含 harnessed hook 与用户 sibling hook 时整组删除 → 静默丢用户的 hook。改为 **inner `hooks[]` 粒度**过滤,保留 sibling;group 空了才删。
|
|
961
|
+
- **左边界缺失 → 误删**(CONFIRMED/PLAUSIBLE):identity regex 无左边界,`node ./scripts/team-harnessed-stop-hook.mjs` / `"C:/tools/myharnessed.exe" inject-state` 等用户自有 hook 被当成 harnessed 删掉。加 `(?:^|[\s"'=/\\])` 左边界锚定。
|
|
962
|
+
- **doctor 崩溃**(CONFIRMED):`entryCommands` 对 `null`/primitive 数组元素(手改坏的 settings.json,如 `"Stop":[null]`)解引用抛错 → `Promise.all(CHECKS)` reject → 整个 `harnessed doctor` 崩、丢弃所有其他 check(违反 warn-never-fail)。共享的 `entryCommands` 加 null guard + `check-stale-hooks` 加 try/catch。
|
|
963
|
+
- **带空格路径假全清**(CONFIRMED):`harnessedHookScriptPath` 的 `[^"'\s]*` 在空格处截断,`C:/Program Files/.../harnessed-inject-state.mjs` 被截成相对片段 → stale 检测跳过 → doctor 报"无 orphan"而 hook 每 prompt 仍 MODULE_NOT_FOUND。改为整段引号内捕获(含空格)。
|
|
964
|
+
- **relative orphan 漏报**(PLAUSIBLE):`harnessedStaleHookPaths` 只报绝对路径,pre-4.20.0 的相对 shape(`node bin/harnessed-inject-state.mjs`,cwd 相关必坏)uninstall 会删但 doctor 报 pass。现相对 `.mjs` 也报(bare `harnessed` PATH token 仍跳过,不误报)。
|
|
965
|
+
|
|
966
|
+
### Changed (DRY / simplify)
|
|
967
|
+
|
|
968
|
+
- **合并 SoT**:`COMPILED_HOOK_IDENTITIES` + `entryCommands` 从 `hookEntry.ts` **export 共享**,`harnessedHookTeardown.ts` 不再各自复制(消除 IDS / entryCommands / AnyEntry 三处副本 + 三处内联 id 正则 → 从 `ID_ALT` 派生)。防未来加第三个 hook 时两处 drift 漏删(正是 issue #8 的 bug 类)。
|
|
969
|
+
|
|
970
|
+
**保留决策**:review 提的"删 legacy fallback 致 pre-workflows.json 用户丢 breadcrumb"(4.32.6)属**刻意 tradeoff** —— 反例(保留 fallback)会重新引入跨 repo 泄漏;`readStoreRaw` 在下次 checkpoint 时迁移;4.32.x 机器上"只有 current-workflow.json 无 workflows.json"几乎不可能。不改。
|
|
971
|
+
|
|
972
|
+
新增回归测试:group sibling 保留 / 左边界拒斥 / null 元素不抛 / 带空格路径 / relative orphan 上报 / count==removed 粒度。CI 全套 2203 test 绿(+10)。tsc 0 / biome 0。
|
|
973
|
+
|
|
974
|
+
## [4.32.6] - 2026-07-16
|
|
975
|
+
|
|
976
|
+
修复 perturn-inject hook 跨 repo 状态泄漏(dogfood 发现):在一个**独立、未使用 harnessed** 的新 git repo 里,UserPromptSubmit hook 每回合仍注入**别的 repo 的** `<workflow-state>`。
|
|
977
|
+
|
|
978
|
+
### Fixed
|
|
979
|
+
|
|
980
|
+
- **`bin/harnessed-inject-state.mjs` `readWorkflow` 删掉 legacy 全局单例 fallback**:pre-Phase-15 的 `~/.claude/harnessed/current-workflow.json` **不带任何 repo 身份**,而 bin 之前"当前 repo 在 `workflows.json` 无 slot 就无条件退到该单例",于是把某个 repo 的 workflow-state 泄漏进**每一个没有自己 slot 的 repo**(独立新项目 → 每回合 phantom `<workflow-state>`)。hot-path hook 现在只读 per-repo 的 `workflows.json`,无 slot = 静默 exit 0。
|
|
981
|
+
- 迁移归属不变:真正的 pre-Phase-15 root 迁移仍由 `readStoreRaw`(`workflowStore.ts`)负责 —— 它只在 `workflows.json` **整个缺失**时才读单例,不是跨 repo 泄漏源。compiled-binary 的 `harnessed inject-state` 子命令 dynamic-import 同一个 bin,一处修复双通道覆盖。
|
|
982
|
+
|
|
983
|
+
parity test cell 由"falls back to legacy"改为"IGNORES legacy(anti cross-repo leak)→ 无 slot 时零注入";54 test 绿。tsc 0 / biome 0。
|
|
984
|
+
|
|
985
|
+
注:机器上残留的 `~/.claude/harnessed/current-workflow.json` 现已被 hook 忽略(inert),可安全手动删除(现代版本从不再写它,已被 `workflows.json` 取代;`harnessed update --migration-report` 也会列出)。
|
|
986
|
+
|
|
987
|
+
## [4.32.5] - 2026-07-16
|
|
988
|
+
|
|
989
|
+
修复 issue #8:卸载后残留 `Stop` / `UserPromptSubmit` hook 导致每次提交 prompt 报 `MODULE_NOT_FOUND`。此前 unified uninstall(`harnessed uninstall` 无参数)只清 workflows / commands / settings env vars / state dir,**不清 hooks**;用户直接 `npm uninstall -g harnessed` 后,`~/.claude/settings.json` 里指向已删除 `bin/*.mjs` 的 hook 每个 prompt / Stop 触发一次 `node:internal/modules/cjs/loader … MODULE_NOT_FOUND`。
|
|
990
|
+
|
|
991
|
+
### Added
|
|
992
|
+
|
|
993
|
+
- **`src/installers/lib/harnessedHookTeardown.ts`**:纯函数 SoT,从 hook command 字符串本身识别 harnessed 自有 hook —— 覆盖全部历史形态(npm 相对 `node bin/harnessed-inject-state.mjs`、npm 绝对含引号、compiled `"<binary>" inject-state`、bare `harnessed inject-state`、legacy flat `{command}`、nested `{hooks:[…]}`)。导出 `harnessedHookIdentity` / `harnessedHookScriptPath` / `stripHarnessedHooks`(mutate + 计数)/ `countHarnessedHooks`(非 mutate)/ `harnessedStaleHookPaths`(绝对路径不存在检测)。**关键**:`hookScriptMarker()` 对绝对路径 token 返回 null(只归一化相对 token),orphaned 绝对路径精确匹配会漏 —— 本模块按 script basename anchor 直接匹配,不依赖当前可解析的包路径。
|
|
994
|
+
- **doctor stale-hook 自愈 check**(`src/cli/lib/check-stale-hooks.ts`,第 19 项):检测 settings.json 中指向已删除脚本的 harnessed hook(warn-only;只报**绝对路径且确实不存在**的,bare/相对 token 跳过以免误报),`fix` 指向 `harnessed uninstall`。
|
|
995
|
+
- README `harnessed doctor` 行补 stale-hooks 说明 + `npm uninstall` 前先跑 `harnessed uninstall` 的提示。
|
|
996
|
+
|
|
997
|
+
### Changed
|
|
998
|
+
|
|
999
|
+
- **unified uninstall 补 hook teardown**(`src/cli/uninstall.ts`):discovery / summary / `--dry-run` / removal / completion 五处贯通;settings.json 单次 read-modify-write 同时清 env vars + strip hooks(`removeSettingsFootprint`)。新 i18n key `uninstall.unified.hooks` / `removed_hooks`(en + zh-Hans)。
|
|
1000
|
+
|
|
1001
|
+
新测试:`harnessedHookTeardown.test.ts`(16 cell,全形态 + stale 检测)、`check-stale-hooks.test.ts`(6 cell)、uninstall 补 2 cell(strip + dry-run surface)、doctor 注册表 18→19。tsc 0 / biome 0 / en↔zh key parity 绿。
|
|
1002
|
+
|
|
1003
|
+
## [4.32.4] - 2026-07-15
|
|
1004
|
+
|
|
1005
|
+
两种安装通道(npm-global + 独立二进制)互测。此前 shadow guard 只在 binary 安装器侧、且只在 PATH 遮蔽时触发;npm 方向零检测。现在两通道并存时明确提示"更新一个另一个会陈旧 → 二选一保留",双向覆盖。
|
|
1006
|
+
|
|
1007
|
+
### Added
|
|
1008
|
+
|
|
1009
|
+
- **`detectInstallChannels` + `checkInstallChannels`**(`src/cli/lib/check-install-channels.ts`):检测 npm-global 与独立二进制是否并存(运行中的通道由 `isCompiledRuntime()` 判定必然存在,另一条按平台规范路径 + `npm prefix -g` 探测)。并存 → warn(warn-only,不 fail),`fix` 给双通道二选一建议(留 npm 用 `npm install -g harnessed@latest` + 删二进制;或留二进制用 `harnessed update` + `npm uninstall -g harnessed`)。平台路径用 `win32.join`/`posix.join` 避免跨 OS 分隔符错乱。
|
|
1010
|
+
- **surface 到两个 chokepoint**:`harnessed doctor` 第 18 项 check(on-demand);`harnessed setup` 收尾(npm 与 binary-installer 两条安装流都经过 setup,一处覆盖双向)。
|
|
1011
|
+
- **install.ps1 / install.sh shadow guard 改口径**:从"删除或用绝对路径"改为双通道二选一(留旧的原地更新 / 或删旧装新),与 CLI 侧措辞统一。
|
|
1012
|
+
|
|
1013
|
+
新测试:`check-install-channels.test.ts`(9 cell,2×2×presence 矩阵 + CheckResult 映射 + dualChannelLines,注入 deps 纯逻辑);doctor 注册表 17→18(3 断言更新 + install-channels mock,理由同 sister check —— 真机 spawn/fs 依赖);installer 文本契约 4/4 仍绿。tsc 0 / biome 0。
|
|
1014
|
+
|
|
1015
|
+
gsd-core 1.7.0 GA re-sync。gsd-core 1.7.0 正式版已发(npm `latest`=1.7.0,`next`=1.7.0-rc.6 反成旧)。关闭 v15.0 记的 "1.7.0 GA watch"(TODOS)。
|
|
1016
|
+
|
|
1017
|
+
### Changed
|
|
1018
|
+
|
|
1019
|
+
- **gsd manifest re-sync 到 1.7.0 GA**(`manifests/skill-packs/gsd.yaml`):`npm_version` 基线 `^1.6.0` → `^1.7.0`(主 + codex override 两处);`upstream_health.last_known_good_version` `1.6.1` → `1.7.0`;`last_check` → `2026-07-15`。
|
|
1020
|
+
- **评估结论(write-confinement 无影响)**:1.7.0 的 host-integration interface(ADR-1239)+ destSubpath write-confinement **未改** claude runtime 的写入路径 —— 本机 1.7.0 GA 实测 gsd-* 仍装到 `~/.claude/skills/`(71 skill,`gsd-plan-phase/SKILL.md` 在),manifest 的 idempotent_check / verify 路径假设全部成立,无结构性改动。TODOS watch 项已关。
|
|
1021
|
+
|
|
1022
|
+
manifest-only(schema 校验 + install-type test 6/6 通过);无代码 / schema 结构变更。
|
|
1023
|
+
|
|
1024
|
+
`harnessed uninstall`(无参 unified)收尾补通道感知的 CLI 本体删除提示。此前 unified uninstall 只拆 setup 足迹(skills/commands/settings/state dir),不删 CLI 可执行本体,且收尾一句不提怎么删 —— 用户装了两种通道(npm-global / 独立二进制)时"卸载不统一":拆完 setup 仍留一个 CLI + PATH 条目,不知下一步。
|
|
1025
|
+
|
|
1026
|
+
### Fixed
|
|
1027
|
+
|
|
1028
|
+
- **unified uninstall 收尾追加 CLI 本体删除提示**(`printCliRemovalHint`):按运行进程的安装通道(`isCompiledRuntime()`)打印精确的最后一步 —— 编译二进制 → 删 `process.execPath` + 从 PATH 移除其 bin 目录;npm → `npm uninstall -g harnessed`;并附双通道装机的提醒(两种都装过则另一份也删)。不做危险自删(Windows 运行中 exe 被锁)。三处触发点(`nothing-to-do` / `--dry-run` / 正常完成)均打印。
|
|
1029
|
+
- 新 4 i18n key(en + zh-Hans,key parity 校验通过);4 新测试 cell(npm 通道 / 二进制通道命名 exe / dry-run / nothing-to-do 均带提示),vitest uninstall 套件 21/21。
|
|
1030
|
+
|
|
1031
|
+
## [4.32.1] - 2026-07-15
|
|
1032
|
+
|
|
1033
|
+
修复一行安装器(install.ps1 / install.sh)的两个 dogfood 缺陷:装完二进制后 `harnessed setup` 是纯手动 next-step,用户在**未重载/被遮蔽的 PATH** 下单独执行,bare `harnessed` 解析到**先前就在 PATH 上的另一份 harnessed**(npm-global 遮蔽新装二进制),于是 setup 跑的是**旧的那份**并打印过期版本号("版本不一样")。根因 = 安装与 setup 分离执行 + 安装器从不检测 PATH 遮蔽。
|
|
1034
|
+
|
|
1035
|
+
### Fixed
|
|
1036
|
+
|
|
1037
|
+
- **setup 按绝对路径征询后自动跑**:安装成功后,interactive session 提示 `run 'harnessed setup' now? (Y/n)`,同意则 `& $BinPath setup`(ps1)/ `"$BIN_PATH" setup`(sh)—— 直呼刚装的二进制,既提供"默认 setup"又**绕过任何 PATH 遮蔽**保证跑的是新构建。non-interactive / CI 保留手动 next-steps(与既有 PATH 征询同款门控)。curl|bash 下 stdin 被脚本占用,unix 侧 prompt 从 `/dev/tty` 读。
|
|
1038
|
+
- **shadow 守卫**:安装后用 `Get-Command harnessed`(ps1)/ `command -v harnessed`(sh)解析 bare `harnessed` 当前指向何处;若存在且 ≠ 新装 `$BinPath`,明确警告遮蔽路径 + 修法(`npm uninstall -g harnessed` 或按绝对路径调用)。遮蔽存在时,手动 next-steps 的命令自动改用绝对路径提示(bare `harnessed` 会跑错构建)。
|
|
1039
|
+
- **版本横幅无需改**:横幅诚实报告**运行中**二进制的 `pkg.version`;缺陷在于 setup 跑了错的二进制,绝对路径调用已修正。
|
|
1040
|
+
|
|
1041
|
+
新回归护栏 `tests/integration/installer-oneliner-setup-shadow.test.ts`(4 cell,ps1/sh 文本契约 + parity);两安装器无 spawn harness,以 `HARNESSED_INSTALLER_SOURCE_DIR` seam 手动彩排(ps1 非交互实测 shadow 命中 + 绝对路径 next-steps + exit 0;sh `bash -n` 语法验)。
|
|
1042
|
+
|
|
1043
|
+
## [4.32.0] - 2026-07-15
|
|
1044
|
+
|
|
1045
|
+
eval Slice C:显式录制导出 —— 把一次真实运行的 checkpoint 轨迹转成 Slice A 格式的可回放 trap scenario,trap 语料从 dogfood 自增长(不再全靠手写)。用户裁决:显式命令(非自动后台录制)+ 默认脱敏(刚发生 token 泄漏后隐私优先)。
|
|
1046
|
+
|
|
1047
|
+
### Added
|
|
1048
|
+
|
|
1049
|
+
- **`harnessed eval record --from <checkpoint-dir>`**:读一次真实运行的 checkpoint envelope/ledger → 生成 scenario.yaml + golden.json(`--out` 指定落点,`--name` 命名,`--include-text` opt-in 保留原文)。产出与现有 runner **逐字节兼容**,原样 replay —— round-trip by construction(record → replay → PASS 自身 golden,测试硬验收)。
|
|
1050
|
+
- **默认脱敏**(隐私优先,与 4.31.1 scrubSecrets 同哲学):task/summary free-text → 占位符;文件路径由 runner 归一(`<TMP>` 等,scenario 层不含真实路径);credential shape 复用 scrub;引擎元数据(skip reason / mode / order / evidence_status)保留以利 trap 可读性。真机 dogfood 验证:真实敏感路径未泄漏进 scenario。`--include-text` 才留原文(帮助明示风险)。
|
|
1051
|
+
- **已知边界**:record 还原引擎行为序列(gate/ledger/guard),不还原真实副作用(spawn/外部);`evidence_status: verified` 的 sub 标 KNOWN BOUNDARY 不重建 artifacts。
|
|
1052
|
+
|
|
1053
|
+
新模块 `src/eval/record.ts`;11 新测试 cell(脱敏四类 + round-trip + --include-text + 缺参报错)。schemas/ 零变更(复用现有 EvalScenario schema)。
|
|
1054
|
+
|
|
1055
|
+
## [4.31.2] - 2026-07-14
|
|
1056
|
+
|
|
1057
|
+
修复 issue #7:headless(`claude -p`)下 /auto 完工不退出(证据包实验 compound 任务两次挂起,r1 挂 11h — 工作全部完成、验收 7/7,但进程不退出)。根因 = /auto 的 spawn-based 编排(Agent Teams 背景 spawn / ralph-loop)遗留孤儿子进程,每个孤儿复制一套 MCP 子树,stdio 管道保持打开阻塞宿主退出。systematic-debugging 定位:H1(harnessed hook)代码级排除、H2(MCP 未关停)由 bare arm 同继承 MCP 却 0 挂起排除为根因、H3 有 SKILL.md 自述 "headless path hangs inside Claude Code" 内证。
|
|
1058
|
+
|
|
1059
|
+
### Fixed
|
|
1060
|
+
|
|
1061
|
+
- **headless 检测 → 禁 Agent Teams 升级**:`harnessed gates` 检出 headless(显式 `HARNESSED_HEADLESS=1` env — CC 无原生 headless 信号可辨,`harnessed gates` 是被 spawn 的子进程其 stdout 在交互/headless 两种 session 下都是 pipe,isTTY 不可区分,故用 opt-in env,保守宁漏不误伤正常 TTY session)→ `escalate_to_teams` 强制 false + reason 注明 "Agent Teams are session-scoped, incompatible with -p"。新模块 `src/cli/lib/detectHeadless.ts`。
|
|
1062
|
+
- **teardown finally 契约强化**:auto SKILL(en/zh)step 4 — Agent Teams 清理从"尽力而为"升为 MUST-in-finally:无论 max_iterations 是否耗尽 / 是否 done,收尾前必须 `SendMessage shutdown_request` 全 teammate + `TeamDelete`;并明写 headless session 绝不 `TeamCreate` / 背景 Agent spawn,顺序驱动 subs。
|
|
1063
|
+
- **evidence-pack runner** 设 `HARNESSED_HEADLESS=1`(消除实验复发面)。
|
|
1064
|
+
|
|
1065
|
+
### Notes
|
|
1066
|
+
|
|
1067
|
+
- 诚实约束:Agent Teams 是 CC 原生、harnessed 引擎看不到 team 生命周期,故"引擎强制 teardown"不可能 — 修复 = headless 禁 spawn(釜底抽薪)+ SKILL 契约层强化。真机 headless 闭环 CI 无法覆盖(CI 不跑 headless /auto),留 dogfood 验证。
|
|
1068
|
+
|
|
1069
|
+
## [4.31.1] - 2026-07-13
|
|
1070
|
+
|
|
1071
|
+
eval 首次 CI 运行(v4.31.0 tag)3-OS 红的 hotfix — 讽刺且合理:trap suite 第一个逮住的是自己 harness 的隔离缺陷。
|
|
1072
|
+
|
|
1073
|
+
### Fixed
|
|
1074
|
+
|
|
1075
|
+
- **eval runner 对祖先 git repo 的密封性**:scenario cwd 是裸 tmpdir,但 `checkpoint complete` 的 `defaultShipReady(cwd)` 会让 git 向上走父目录 — 录制机的 HOME(os.tmpdir() 的祖先)本身是个 git repo(1 commit 无 release tag),golden 把 `ship_ready:true/ship_commits:1` 的环境泄漏录了进去;CI 无祖先 repo → fail-soft false → 3 scenario 红。修复:runner 隔离期 pin `GIT_CEILING_DIRECTORIES=os.tmpdir()`(git 官方上行截止机制),ship 面全环境确定性化;5 个 golden 重录(纯 ship 字段变化,biome 归一)。
|
|
1076
|
+
- **hermeticity 回归测试**:故意把 OS temp 指进一个新建 git repo 内,断言 scenario 仍 PASS golden;mutation 验收 EFFECTIVE(撤修复必红 — 本地即可复现原 CI 失败)。
|
|
1077
|
+
|
|
1078
|
+
## [4.31.0] - 2026-07-13
|
|
1079
|
+
|
|
1080
|
+
**eval Slice A:编排器行为回归 trap suite**。治理门全链(office-hours 设计文档 APPROVED → plan-ceo-review CLEARED:spec loop 2 轮 + 深审 + outside voice 共 15 项发现消化,9 项用户裁决)。设计核心 = eureka:评编排器时其行为(gate/ledger/guard)是确定性的 — 回放断言零随机零跑分成本,事故即种子;真 agent benchmark(B 路线)冻结至获客假设验证。
|
|
1081
|
+
|
|
1082
|
+
### Added
|
|
1083
|
+
|
|
1084
|
+
- **`harnessed eval`(第 30 子命令)**:YAML scenario 驱动 wave0 提取的**真编排函数**(非 primitives 副本),golden 结构级比对(归一化:realpath+`<TMP>` 占位+分隔符+时间戳剥离);`--json` / `--coverage`(judgments triggers × scenario 命中矩阵,裸奔高亮 — 种子增长导航图)/ `--update-golden`(diff 人工过目)/ `--filter`;GITHUB_ACTIONS 下 `::error` 注释;错误三型(CONFIG-ERROR / MISSING-GOLDEN / ERROR vs FAIL)。
|
|
1085
|
+
- **wave0 守卫编排提取**(独立 commit `393f348`):runCheckpointStart/Complete/Fail + runGatesPlan(RunDeps 注入,ExitError sentinel);16 处 exit 调用点核验零副作用分叉;零测试文件修改硬验收。
|
|
1086
|
+
- **种子 scenario ×10**(每个头注逮的事故):issue #5 双缺陷 / 4.26.0 串行守卫 / 4.22.1 evidence 多基 / evidence 三态 / auto-lite 回归 / 台账 envelope / 四 master 广度基线 + 2 冒烟。coverage 14/41。
|
|
1087
|
+
- **mutation 验收 3/3 EFFECTIVE**(scripts/verify-eval-traps.mjs,local-only):反转 4.23.2/4.26.0 修复 → 对应 trap 必红(重引入 patch 留证 findings)— 探测器活性的行为级证明。
|
|
1088
|
+
- ci.yml eval 步(单 ubuntu,build→eval)。
|
|
1089
|
+
|
|
1090
|
+
### Fixed
|
|
1091
|
+
|
|
1092
|
+
- **eval 首日战果:`--skip-sub clarify` 从未生效**(存量缺陷,eval 录制时逮到):SOP 教科书命令的 `clarify` 不是 auto 的子项名(应为 `discuss`)— 合规 /auto 的 discuss master 一直在澄清已交互完成后**仍 fire 并递归重跑**;4.23.2 加警告后还每次打杂散 ignored。修复:skipSubs 加 `clarify→discuss` 同义词(兼容全部已装旧 SKILL 文本);SOP 文本改名记 TODOS 下次渲染 pass。**行为变化:合规 /auto 的 discuss 现在正确进 skip。**
|
|
1093
|
+
|
|
1094
|
+
## [4.30.0] - 2026-07-13
|
|
1095
|
+
|
|
1096
|
+
修复 GitHub issue #6(多用户反馈):静默 "mode-B" 工具调用损坏自动恢复。Claude Code 偶发把 tool-call 开启定界符误采样成随机垃圾词(count/court/…),整个 `<invoke>…</invoke>` 块降级为纯文本 — 无 tool 执行、无错误、turn 正常结束,模型收不到失败信号,只能靠用户手动"重试"。
|
|
1097
|
+
|
|
1098
|
+
### Added
|
|
1099
|
+
|
|
1100
|
+
- **Mode-B 自动恢复 Stop hook**(opt-in):`bin/harnessed-stop-hook.mjs` 在每次 turn 结束读取最后一条 assistant 消息,命中 mode-B 签名即返回 `{"decision":"block", reason}` 给模型一个新 turn 重发工具调用 — 无需用户介入。探测器 key 在结构不变量(`<invoke name="` / `<parameter name="` 只应存在于 structured tool_use block,出现在 TEXT 即损坏);假阳门:无 structured tool_use + 剥离 code fence + 尾锚(最后一个 tag 在消息末尾 200 字符内 — mode-B 截断于工具调用,元讨论继续写散文)。issue 实证 12,104-turn transcript:76/76 真阳、1 假阳(尾锚门消除)。
|
|
1101
|
+
- **循环护栏**:respect `stop_hook_active` + 每(session, 消息签名)重试上限 2;任何错误/非命中静默 exit 0(Stop hook 绝不 wedge 正常 turn end)。
|
|
1102
|
+
- **`harnessed stop-hook` 子命令**:compiled 二进制模式 hook 调二进制自身(`"<binary>" stop-hook`,4.27.0 inject-state 同款 parity-by-construction);hookEntry marker 身份表加 `stop-hook`,npm↔binary 双向迁移去重。
|
|
1103
|
+
- **`manifests/optional/stop-hook-recover.yaml`**:optional 组件(setup 自动 offer);`hook_event` schema 加 `Stop` 字面量(typebox regen)。
|
|
1104
|
+
- **`docs/STOP-HOOK-RECOVER.md`**:探测器原理 + `~/.claude/settings.json` 手动安装 snippet(第二台机器);与 `~/.claude/CLAUDE.md` 的 emission 规避(预防面)互补——本 hook 是恢复面。
|
|
1105
|
+
|
|
1106
|
+
### Notes
|
|
1107
|
+
|
|
1108
|
+
- Post-hoc:hook 自动恢复损坏后的一个浪费 turn,不预防误采样。预防是模型级的,损坏率随 context 增大而升,`/compact` 或新 session 仍是高发时的杠杆。
|
|
1109
|
+
|
|
1110
|
+
## [4.29.0] - 2026-07-13
|
|
1111
|
+
|
|
1112
|
+
v15.0 Upstream Re-sync(7 pin 全扫侦察 → 双主菜 + 三顺手;上次 re-sync = v13.0 2026-07-01)。**Installed users re-run `harnessed setup`**。
|
|
1113
|
+
|
|
1114
|
+
### Changed
|
|
1115
|
+
|
|
1116
|
+
- **planning-with-files v2.37.0 → v3.4.1**(主菜):Windows session-catchup(`/clear` 恢复)修复 — pin 的 2.37.0 在 win32 上该功能完全不工作;另获 opt-in `--autonomous`(砍 68% per-tool 重注入 token tax)、`--gated` 完成门、`PLANNING_DISABLED=1` 逃生口、Codex hooks Windows 修复。跨 major 但上游明示默认输出字节兼容;clone 实证安装布局零变化,claude/codex 双通道 cmd 不动。
|
|
1117
|
+
- **mattpocock/skills 改名对齐**(主菜):上游 `to-prd` → `to-spec`、`to-issues` → `to-tickets`,新增 `wayfinder`。installs_skills 清单按 clone 实测重建(22 项;deprecated/in-progress 分区不入);capabilities.yaml / decision_rules.yaml / WORKFLOW.md 全仓引用改名(grep 实证零残留;历史归档与 A7 守恒 ADR 按纪律未动);lkg pin → main-391a2701。
|
|
1118
|
+
- **superpowers v6.0.3 → v6.1.1**:`using-superpowers` bootstrap 压缩(每 session 固定 token 成本下降)+ Codex `hooks: {}` 修复(不再误注册 Claude SessionStart hook);claude/codex 双通道 pin 同步。
|
|
1119
|
+
- **gstack pin 11de390b → 7c9df1c5**(1.58.5.0 → 1.60.1.0):4 commits 纯 eval 测试基建,skill 面零变化(installs_skills 不动)。
|
|
1120
|
+
- **gsd-core last_known_good → 1.6.1**(hotfix,^1.6.0 semver 已覆盖零行为变化);TODOS 加 1.7.0 GA watch 项(其 host-integration interface 与 harnessed 安装通道直接相关,现处 rc.6)。
|
|
1121
|
+
- 零 delta 不动:karpathy-skills(上游休眠)、ui-ux-pro-max(skill 路径无 commit)。
|
|
1122
|
+
|
|
1123
|
+
## [4.28.0] - 2026-07-12
|
|
1124
|
+
|
|
1125
|
+
B 路线 Phase 3 Slice 2:一行安装器(CEO plan Deferred 首项,OV1 裁决"紧跟不拖")。原定落位目录 `~/.harnessed/bin` 被实施 fork 的真机演习证伪(遗留根,二进制启动迁移即改名,落位物蒸发)— 灰区协议回流,用户裁决改为平台惯例位置。
|
|
1126
|
+
|
|
1127
|
+
### Added
|
|
1128
|
+
|
|
1129
|
+
- **一行安装器(消灭 Node 22 前置)**:
|
|
1130
|
+
- unix:`curl -fsSL https://raw.githubusercontent.com/easyinplay/harnessed/main/install.sh | bash` → `~/.local/bin/harnessed`
|
|
1131
|
+
- Windows:`irm https://raw.githubusercontent.com/easyinplay/harnessed/main/install.ps1 | iex` → `%LOCALAPPDATA%\harnessed\bin\harnessed.exe`
|
|
1132
|
+
- 流程:平台检测(darwin 仅 arm64,其余明确指 npm 渠道;Git Bash/MSYS 指 install.ps1)→ `releases/latest/download` 稳定重定向下载 → per-asset `.sha256` 校验 → `--version` smoke → PATH 处理(unix 已在 PATH 零提示、否则按 $SHELL 打印 snippet 不改 rc;Windows 交互 consent 幂等追加 user PATH,非交互打印自包含指令)。任一步失败醒目报错不留半装。
|
|
1133
|
+
- **installer-smoke CI job**(3-OS):`HARNESSED_INSTALLER_SOURCE_DIR` 零网络 seam 跑完整安装,断言落位/版本/PATH 提示。
|
|
1134
|
+
- README Quick Install 节:一行安装器优先,npm 渠道并列(并行分发铁律)。
|
|
1135
|
+
|
|
1136
|
+
### Notes
|
|
1137
|
+
|
|
1138
|
+
- 真机持久性核验:安装后三次启动(--version ×2 + doctor)二进制存活、迁移逻辑不再触碰新目录;doctor 顺带完成 compiled 更新检查真实 GitHub 路径的首次实证(`✓ update — up to date (4.27.0)`)。
|
|
1139
|
+
- 安装脚本走 raw main 分支(薄逻辑),更新走 `harnessed update`(重逻辑在二进制)。
|
|
1140
|
+
|
|
1141
|
+
## [4.27.0] - 2026-07-12
|
|
1142
|
+
|
|
1143
|
+
B 路线 Phase 3 Slice 1:二进制正确性 + 自更新。立项走完整 `/plan-ceo-review`(SELECTIVE EXPANSION;3 轮对抗 spec loop 18 修 PASS 8.5/10 + outside voice 7 点;7 项用户裁决)— CEO plan 见 `~/.gstack/projects/easyinplay-harnessed/ceo-plans/2026-07-12-b5-phase3-slice1.md`,任务册 T1-T7。
|
|
1144
|
+
|
|
1145
|
+
### Added
|
|
1146
|
+
|
|
1147
|
+
- **`harnessed inject-state` 子命令(D6 hook 自包含)**:perturn hook 在 compiled 二进制模式下改写为 `"<binary>" inject-state`(执行解包资产内同一份 mjs — parity by construction),纯二进制用户不再依赖宿主 node;`hookScriptMarker` 身份归一化为 `inject-state`,npm↔binary 双向迁移去重,杜绝孤儿/双注册。npm 模式 hook 命令零变化。
|
|
1148
|
+
- **`harnessed update` compiled 分支**(并入既有命令,不新增 self-update):模式检测(`isCompiledRuntime()` NEW seam)在任何 npm 触碰之前;GitHub releases/latest 下载(pid 唯一 temp)→ per-asset `.sha256` 校验 → `--version` smoke → 同目录 rename dance 原子替换 → 回滚网 copy 到 `<stateRoot>/bin-backup/<旧ver>/`。`--dry-run` 双模式;安全阀(路径不可写/node_modules → 路由 npm 流);平台资产 404 → 可操作报错原件不动(绝不静默装旧版)。npm 流行为零变化。
|
|
1149
|
+
- **更新提醒改造(E2)**:`check-update.ts` 加 24h 缓存(`HARNESSED_UPDATE_CHECK_TIMEOUT_MS` 默认 2000)+ 按运行时分流数据源(compiled → GitHub / npm → npm view);status 顶部挂同一提醒;version-banner 按模式给正确升级命令。
|
|
1150
|
+
- **`harnessed gc` compiled 面(D7 + E4 收尾)**:assets/<ver> 保留集 = {运行中, 新装};bin-backup 保 1;同目录 `.bak-*` 清扫(Windows 删自身映像 EPERM 属预期,留档交 gc)。update 成功后机会性 gc。
|
|
1151
|
+
- **发布管线**:`build-binary.mjs` 产出 per-asset `.sha256`(sha256sum 兼容;publish.yml 的 `harnessed-*` glob 顺带上传,零管线改动);binary-smoke CI 扩展 — 真编译产物演习 `update --dry-run` + 本地源(`HARNESSED_UPDATE_SOURCE_DIR` seam)完整 swap,3-OS 覆盖 Bun runtime 语义。
|
|
1152
|
+
- 资产命名稳定契约冻结为公共 API:`harnessed-{darwin-arm64,linux-x64,windows-x64.exe}` + 各自 `.sha256`,变更需 major。
|
|
1153
|
+
|
|
1154
|
+
### Known limitations(CEO review 记录在案)
|
|
1155
|
+
|
|
1156
|
+
- 旧二进制(4.20.0-4.26.0)无 compiled update 分支,需手动重下载一次(鸡生蛋)。
|
|
1157
|
+
- 替换瞬间新起的 hook 调用可能撞毫秒级缺档窗口(hook 本身 fail-soft)。
|
|
1158
|
+
- 慢网络下更新提醒在 2s 预算内静默(env 可调);无签名 exe 可能被 Windows Defender/SmartScreen 拦(E1 签名重估时解)。
|
|
1159
|
+
- **手动回滚**:`copy <stateRoot>/bin-backup/<旧ver>/harnessed-windows-x64.exe <当前二进制路径>`(unix 同理 + chmod 755);`update --rollback` 子命令在 TODOS。
|
|
1160
|
+
|
|
1161
|
+
## [4.26.0] - 2026-07-12
|
|
1162
|
+
|
|
1163
|
+
intel 候选 P1 动工:A3 串行次序守卫(comet 0.3.9 phase-skip 教训 "enforcement 必须每个 transition 脚本级校验";我方 evidence guard 此前只在 complete 级守证据、不守次序)。
|
|
1164
|
+
|
|
1165
|
+
### Added
|
|
1166
|
+
|
|
1167
|
+
- **串行次序守卫(transition 级,fail-closed)**:`checkpoint complete/fail` 现在拦截"串行前置仍 pending 时结算后面的 sub"— BLOCK 块列出 pending 的串行前置 + 两条出路(先结算前置 / `--force` 有意越序并打印声明)。次序语义 = effective-order(镜像 masterOrchestrator `PARALLEL_MID_ANCHOR=50`:parallel 无 order 视为中锚),并行组内乱序合法放行,串行尾(如 verify 的 simplify order 99)在全前置 resolved 前被拦。
|
|
1168
|
+
- **ledger 携带串并行语义**:`SubProgressEntry` 新增可选 `mode`/`order`,`checkpoint start` seeding 从 gates plan fire 条目透传(FireEntry 原生携带,gates/masterOrchestrator 零改动;此前 seeding 丢弃)。pre-4.26.0 envelope 无字段合法 — 旧 ledger 守卫 no-op 不误拦;守卫内部任何异常 warn + 放行(运行时故障 fail-soft,4.23.2 分型立场)。
|
|
1169
|
+
|
|
1170
|
+
### Deferred
|
|
1171
|
+
|
|
1172
|
+
- **B2(ledger 消费面 hash 免重读)**:注入大头已由 4.25.0 B1 覆盖,status/prompt 消费面低频、收益边际 — YAGNI 记录不做。B5(自更新,bun track Phase 3)与 B4(eval harness)按优先级后续立项。
|
|
1173
|
+
|
|
1174
|
+
## [4.25.0] - 2026-07-11
|
|
1175
|
+
|
|
1176
|
+
intel 增补 3(comet/Trellis 近 10 版 changelog 分析)actionable 短清单动工:B1 注入 delta 化(Trellis byte-stable/memoize + comet hash 命中免重读合成)+ B3 不确定性分级(comet 0.3.5 原则)。
|
|
1177
|
+
|
|
1178
|
+
### Added
|
|
1179
|
+
|
|
1180
|
+
- **per-turn 注入 delta 化(B1)**:`<project-context>`(≤1500 token 的 learnings + CONTEXT 摘录)此前每轮全量重注;现改会话级缓存 — sha256 命中且未到刷新周期则本轮只发 `<workflow-state>`,默认每 10 轮强制重注一次(env `HARNESSED_INJECT_REFRESH_TURNS` 可调)对冲 compaction 丢历史。内容变化(learnings 追加/phase 推进)hash 自变 → 自动全量。新模块 `src/checkpoint/injectCache.ts` + bin 内联镜像(parity);缓存键 = sha256(repoKey::sessionId) 前 16 位,落 `<harnessedRoot>/inject-cache/`。无 session id 环境字节等同旧行为;缓存任何异常 fail-soft 回全量;skip 决策仅在缓存增量成功持久化后生效(写失败即全量,防 turns 冻结)。同内容会话内约省 10/11 重注开销。
|
|
1181
|
+
- **verify 家族 severity 纪律(B3)**:role-prompts verify-code-review / verify-paranoid / verify-qa / verify-security checklist(en/zh 各 +1 条)— "only reproducible build failures, test failures, and exploitable security vulnerabilities may take the top severity — ambiguous or judgment-call findings MUST be downgraded, never rounded up"。防模糊发现升格成阻塞。
|
|
1182
|
+
- **doctor fail 面 allowlist 测试(B3/D3)**:audit 全部 checks 的 `status: 'fail'` 使用面(共 4 处:node<22、WSL stub/无 bash ×2、自带 aliases.yaml 损坏)— 全部属"harnessed 自身无法工作"类,零降级;新增 fail 面须过 `doctorFailSurface.test.ts` allowlist。
|
|
1183
|
+
|
|
1184
|
+
## [4.24.0] - 2026-07-11
|
|
1185
|
+
|
|
1186
|
+
五家对照(OMC / omo / ECC / comet / Trellis,`.planning/intel/omc-comparison.md` 三题对照两轮实证)后的 gap 补齐:follow 更优方案(用户授权),逐候选采纳决策见 `_patch-4.24.0-intel-gap-close/task_plan.md`。
|
|
1187
|
+
|
|
1188
|
+
### Added
|
|
1189
|
+
|
|
1190
|
+
- **备份后再覆盖(G1,follow Trellis)**:setup 末尾完整性自愈重装前,先把被覆盖的 foreign/tampered skill 目录备份到 `~/.harnessed/backups/<ts>-skill-heal/`(heal 汇总行报备份路径);此前 `cp force:true` 直接覆盖,内容永久丢失。新模块 `src/cli/lib/skillBackup.ts`(目录树备份 + README 恢复提示;备份失败醒目警告后仍 heal — 引擎完整性优先)。
|
|
1191
|
+
- **Step A 装前变更检测 + 备份(G2,adapt comet)**:workflow 安装覆盖前对比目标 SKILL.md sha256 与 hash 台账 — 原样 → 静默覆盖零开销;已改/无基准(保守视为已改,Trellis "assume modified" 语义)→ 备份到 `<ts>-step-a/` 再覆盖 + 聚合警告块。不采 comet 的 throw 拒绝:引擎名按 4.23.0 契约归 harnessed,拒绝会 brick setup。
|
|
1192
|
+
- **Red Flags 反驳表(G3,follow comet decision-point 协议)**:role-prompts discuss-phase checklist(en/zh,9→10 条)预先驳斥四种 agent 自决借口(「改动很小,不用确认」/「用户大概率会同意」/「推荐答案很明显」/「问一下会打断节奏」)— "Decision points have no size exception — relay anyway"。
|
|
1193
|
+
- **doctor heal 预览(G4,adopt-light ECC repair --dry-run 语义)**:skill-integrity warn 的 fix 行改为 `would reinstall: <names>; run \`harnessed setup\` to heal (a backup of the current content is taken first)`。不加新命令(doctor 即 preview,setup 即 heal)。
|
|
1194
|
+
|
|
1195
|
+
### Deferred
|
|
1196
|
+
|
|
1197
|
+
- **ambiguity 量化阈值(G5,OMC deep-interview)**:把"该不该问"变成测量题是方向级设计,推迟 v5+ discuss;intel 实施回填表已记录。不借鉴声明(omo zod strict / comet 全量 FATAL / Trellis 3-way 全套)见 task_plan。
|
|
1198
|
+
|
|
1199
|
+
## [4.23.2] - 2026-07-11
|
|
1200
|
+
|
|
1201
|
+
修复 GitHub issue #5:gate 表达式引用上下文缺失变量时 fail-soft 误触最贵子项(`verify-multispec` 4-specialist Agent Team 在非关键发布也 fire)+ `--skip-sub` 对斜杠命令名静默失效。
|
|
1202
|
+
|
|
1203
|
+
### Fixed
|
|
1204
|
+
|
|
1205
|
+
- **`is_critical_release` 缺失注入(issue #5 缺陷 1 根因)**:root-flat `is_critical_release` 是 schema 契约(`phaseFactContext.ts` v3.3 W0.8 required boolean),v4.1.2 抽取 `buildDefaultGateContext` 时漏了它 → eval 抛 "undefined variable" → fail-soft 误 fire。补进默认上下文(默认 `false`,critical release 经 `--context '{"is_critical_release": true}'` opt-in);judgments yaml 表达式不动(与 issue 建议 1 相反 — 裸引用即契约)。普通 verify 现在干净 skip multispec(`gate ... = false`)。
|
|
1206
|
+
- **fail-soft 分型(issue #5 缺陷 1 策略,ADR 0038)**:三处 gate catch(`gates.ts` / `masterOrchestrator.ts` / `run.ts`)区分错误类别 — expr-eval "undefined variable"(静态配置 bug)改 **fail-closed**(视为 gate=false 不 fire + 醒目 warn 指向修复通道);其余 runtime 错误维持 ADR 0029 fail-soft fire。判别器 `isUndefinedVariableError` 出自 `exprBuilder.ts`。
|
|
1207
|
+
- **`--skip-sub` 别名 + 未命中警告(issue #5 缺陷 2)**:`--skip-sub verify-paranoid`(面向用户的斜杠命令名)现在在 master `verify` 下命中内名 `paranoid`(`<master>-<sub>` 别名,新模块 `src/workflow/skipSubs.ts`,gates CLI 与 masterOrchestrator 双通道共享);未命中任何 clause 的 skip 名打 stderr 警告(`ignored: not a sub of master <X>; valid subs: ...`),不再静默吞。auto lite 路径(`--skip-sub verify --skip-sub retro`)回归测试锁定不受影响。
|
|
1208
|
+
|
|
1209
|
+
### Added
|
|
1210
|
+
|
|
1211
|
+
- **ADR 0038** `gate-eval-undefined-variable-fail-closed`(Amends ADR-0029;0029 本体在 CI A7 守恒环内不可追加):undefined-variable 例外 fail-closed 的动机与边界。
|
|
1212
|
+
- **类杀审计测试** `tests/workflow/judgmentContextAudit.test.ts`:遍历全部 judgments yaml 的 43 条 fires_when/skips_when × 默认上下文求值,零 undefined-variable(此测在 v4.1.2 当场就会红);另实证 expr-eval 对 object member 缺失(`phase.x`)静默求 false,裸标识符是唯一 fail-open 面。
|
|
1213
|
+
- `tests/workflow/skipSubs.test.ts` 等 24 个新用例(fail-closed 三通道 / 别名 / 警告 / opt-in 通道 / lite 回归)。
|
|
1214
|
+
|
|
1215
|
+
## [4.23.1] - 2026-07-11
|
|
1216
|
+
|
|
1217
|
+
修复 GitHub issue #4:`deferrable` 灰区决策无用户 relay 门 — plan 阶段直接采纳 agent 建议默认值,用户全程不可见("可推迟排期"被静默升格为"agent 代决";报告案例中一个 deferrable 默认值把验收需求从可测试断言变成结构恒真,验收方法被无声改变)。
|
|
1218
|
+
|
|
1219
|
+
### Fixed
|
|
1220
|
+
|
|
1221
|
+
- **deferrable relay 契约(issue #4 req 1)**:`workflows/auto/SKILL.md` step 1 与 `workflows/discuss/auto/SKILL.md` step 2(含 zh-Hans 镜像)新增硬性行 — blocking 集锁定后,deferrable 集必须以**单轮批量 AskUserQuestion** 呈给用户(agent 建议默认值预选);deferrable 推迟的是排期,不是用户决策权;仅当用户明确再推迟才可跳过。
|
|
1222
|
+
- **deferrable 升格判据(issue #4 req 2)**:`workflows/role-prompts.yaml` discuss-phase checklist(+ zh-Hans 镜像,7→9 条)新增 — deferrable 仅当默认值可逆**且**不改变任何需求本质(可测试断言 → 结构恒真、验收方法变更、跨 phase 契约形变);否则必须标 blocking。"两个候选都满足现有需求"不足以 defer。同时把 relay 语义写进 checklist(deferrable = 用户有一次 override 机会后才可默认,非"无需用户"),spawn 出的 discuss-phase 子代理产物自带该契约。
|
|
1223
|
+
|
|
1224
|
+
### Added
|
|
1225
|
+
|
|
1226
|
+
- **回归测试** `tests/workflow/deferrableRelay.test.ts`(6 cells):en/zh role-prompts 关键词、en↔zh checklist 条目数相等(yaml-i18n-parity 防回归)、auto 与 discuss SKILL en/zh relay 行。
|
|
1227
|
+
|
|
1228
|
+
## [4.23.0] - 2026-07-10
|
|
1229
|
+
|
|
1230
|
+
修复 GitHub issue #3(严重:`harnessed setup` 自伤 — 扁平 `~/.claude/skills/` 命名空间下 skill pack 静默覆盖引擎 workflow)与 issue #2 残余,并按用户拍板将 GateGuard 豁免通道整体切换为上游 env 通道。
|
|
1231
|
+
|
|
1232
|
+
### Fixed
|
|
1233
|
+
|
|
1234
|
+
- **setup 安装顺序反转(issue #3 根因)**:Step A(28 个 workflow 安装 + A.5 渲染 + A.6 commands)移到 Step B(skill packs)之后 — 引擎面最后落笔,harnessed 成为自己名字的 last writer。实测冲突集为 {research←mattpocock-skills, retro←gstack, ship←gstack}(`ship` 为 issue 未报告的第三个)。
|
|
1235
|
+
- **staleness 升级(issue #3 stale-pending 场景)**:perturn 注入(`injectState.ts` 与 `bin/harnessed-inject-state.mjs` 双端 parity)对 pending sub 的 ledger 文件 mtime 超 24h(`STALE_LEDGER_MS`)输出 `ENGINE: STALE state machine` 措辞(引导 `status --recover` / `checkpoint fail`),替代误导性的 "mid state-machine" 直播态。
|
|
1236
|
+
- **issue #2 残余核验**:workflows/auto SKILL.md 已含完整内联可执行序列 + "Do NOT improvise" 硬前置(4.21/4.22 成果),经核验无需改动。
|
|
1237
|
+
|
|
1238
|
+
### Added
|
|
1239
|
+
|
|
1240
|
+
- **安装时 hash 台账 + 四态完整性校验自愈**(`skillIntegrity.ts`,新):setup Step A.5 渲染后把每个 workflow 渲染态 sha256 记入 `<stateRoot>/skill-hashes.json`;末尾全量审计(ok / foreign=marker 丢失即 pack 覆盖 / tampered=保留 marker 的手改 / stale=旧版本或无台账记录 / missing),坏项自动从 bundle 重装 + 重渲染 + 重记台账,并经 manifests 声明反查肇事 pack。保证链:bundled 源 → 安装时渲染(唯一合法差异)→ 台账钉住渲染态 → 任何第三方改动偏离台账即被抓。doctor 新增第 17 检查 `workflow skill integrity`(warn-only);`status --recover` 顶部同报。
|
|
1241
|
+
- **manifest `installs_skills` 声明**(schema 可选字段,6 个 manifest 已填):安装器 pre-install 做声明∩workflow 名冲突预警,post-install snapshot-diff 对未声明新名 warn(上游漂移探测)(`packSkillAudit.ts`,新)。
|
|
1242
|
+
- **GateGuard 豁免 env 通道(T8,supersede 4.22.2 yml 通道)**:最新 ECC 的 gateguard-fact-force.js 支持 `GATEGUARD_EXEMPT_GLOBS` env 豁免;`harnessed exempt-gateguard` 改为能力探测(定位已装 ecc hook 并 grep env key)后经 `mergeSettingsEnvKey` 写 `env.GATEGUARD_EXEMPT_GLOBS=".planning/**"`(幂等追加、备份先行、confirm 默认 Yes、codex 平台 `supportsEnvKeyWrite` 门降级为 shell export 提示);旧版 ecc → 提示 `claude plugin update ecc` 升级 + `ECC_GATEGUARD=off` 备选。4.22.2 的 `.gateguard.yml` 文本追加机械整体移除(单一通道降复杂度;pip gateguard-ai 变体非目标用户面)。doctor / `checkpoint start` / CLI 三入口分型同步。
|
|
1243
|
+
- **setup 末尾显式 GateGuard 冲突面(T7)**:setup 结束时完整打印 guard-conflict warn(message + 变体感知 fix);pass 静默 — 修复 4.22.x 该告警仅在 auto-install 场景可见的盲区。
|
|
1244
|
+
- **delivery-contract 文档面(T5)**:research SKILL(en/zh)spawn 步骤注明 blocking-Agent 契约(named/background teammate 最终文本被平台丢弃,必须 file-write 或 SendMessage 回主 session);role-prompts(en/zh)review-team checklist 加 delivery contract 行,teams cleanup 措辞改为 "TeamDelete 权威、shutdown_request 尽力而为"。
|
|
1245
|
+
|
|
1246
|
+
## [4.22.2] - 2026-07-09
|
|
1247
|
+
|
|
1248
|
+
### Added
|
|
1249
|
+
|
|
1250
|
+
- **GateGuard 豁免 consented auto-fix(双守卫冲突的一键解;用户拍板:默认 Yes + 拒绝须醒目).** 完整版 gateguard-ai 的 `.gateguard.yml` 官方支持 `ignore_paths`(上游 README 实证)— harnessed 现在能替用户完成 `.planning/**` 豁免,而不是只警告让用户自查:(1) 新 CLI `harnessed exempt-gateguard` — 备份先行(`<stateRoot>/backups/gateguard.yml.<ts>.bak`)、**文本级幂等追加**(注释/格式/EOL 原样保留,绝不整文件重序列化)、写前打印精确 diff 行 + 目标文件 + 备份路径(透明度不因默认 Yes 降级);(2) `checkpoint start` 预检升级为变体分型 — 检出未豁免的 `.gateguard.yml` 时 TTY 下 clack confirm(**默认 Yes**:豁免域仅一个 glob、可逆、是双守卫共存的唯一正确配置;默认 No 会被回车划过,verify 阶段五个 `*-report.md` 必然重演),拒绝则输出醒目 ⚠ 块(三条具体后果 + 手动命令);非 TTY 打印 diff 预览 + 手动命令,绝不无人值守修改;已豁免静默;无 `.gateguard.yml`(ecc bundled fact-force 变体,无文件名策略也无配置文件)维持 4.22.1 通用警告;(3) doctor 检查升级 — 未豁免时 warn 携带 `install_commands: ['harnessed exempt-gateguard']`(auto-install confirm 流,默认 Yes),**豁免完成即转 pass**(唠叨与冲突同生同灭);(4) 红线:改第三方 guard 配置必须备份 + 追加式 + diff 先行,静默修改绝对禁止。
|
|
1251
|
+
|
|
1252
|
+
## [4.22.1] - 2026-07-09
|
|
1253
|
+
|
|
1254
|
+
### Fixed
|
|
1255
|
+
|
|
1256
|
+
- **evidence guard 裸名解析基与 4.21.0 动态目录约定错位(dogfood:首个完整合规 /auto 运行被冤枉 fail-closed).** `artifacts_expected: [findings.md, knowledge.md]` 是字面量,guard 只 stat 项目 cwd 根;而 4.21.0 起写入约定是运行时动态的 `.planning/phases/<NN>-<slug>/` — 字面量表达不了动态目录,两契约从未对齐(此前无合规运行走到 `checkpoint complete`,首次暴露:agent 按 SKILL 指示写了 knowledge.md,guard 却在根目录找)。修复:**裸名(无路径分隔符)多基探测** — cwd 根(零回归,根优先)→ `.planning/phases/<dir>/`(文件 mtime 最新者胜)→ `.planning/<dir>/`(legacy 布局);含分隔符的声明维持精确 cwd 相对语义逐字节不变;`found[].path` 仍存绝对路径(drift 契约不变)。已接受弱化(记录):旧 phase 目录同名文件可满足新 sub 的 guard — 证据语义为"产物已持久化",mtime 最新优先缓解。
|
|
1257
|
+
- **step-0 骨架前移提示.** dogfood 中模型跳过 /auto step 0,`.planning/STATE.md` 缺失被 complete 侧 planning-sync 门正确拦截 — 但太晚。`checkpoint start` 现检测 `.planning/` 存在而 STATE.md / ROADMAP.md 缺失 → stderr 一行警告(stdout 不污染;fail-soft;无 `.planning/` 的非 GSD 用户静默)。
|
|
1258
|
+
|
|
1259
|
+
### Added
|
|
1260
|
+
|
|
1261
|
+
- **双守卫冲突预检(dogfood:ECC GateGuard × evidence guard 生态冲突).** GateGuard 的 PreToolUse 文件名策略(拦 report/findings/summary/analysis 类 Write)与 evidence guard 的 artifacts 契约名(findings.md、verify 阶段 5 个 *-report.md)相撞;主 session 可走 fact-retry 通道,subagent 无此通道 → 被迫改名 → `checkpoint complete` 永远 fail-closed。新增共享探测(`check-guard-conflict.ts`:kill-switch `GATEGUARD_DISABLED=1` / `ECC_GATEGUARD`∈{off,0,false,disabled} 优先;active 信号 = settings hooks 关键字 / ecc 插件注册 / env 显式启用):(1) `checkpoint start` stderr 预警 + 三选一建议(GateGuard 配置豁免 `.planning/` 优先 / `ECC_GATEGUARD=off` 次之 / 勿全量 `--force` 掏空证据门);(2) doctor 第 16 项检查(warn-only — 共装守卫是配置选择不是故障)。
|
|
1262
|
+
|
|
1263
|
+
## [4.22.0] - 2026-07-09
|
|
1264
|
+
|
|
1265
|
+
### Added
|
|
1266
|
+
|
|
1267
|
+
- **/auto 合规结构化 — 三层反 freestyle 防御(用户 dogfood:主 agent 判断"任务小"主动绕过全部 harnessed CLI,无 gates JSON / 无 ledger / 无 evidence guard;现有"勿 freestyle"强措辞被证伪).**
|
|
1268
|
+
- **L1 引擎预启动**:新 `harnessed checkpoint intent <master>` — 生成的 `/auto`(及 plan/task/verify master 命令与 SKILL)顶部经 CC `` !`cmd` `` 预执行,在模型看到任何内容**之前**把调用意图登记进 store(session-scoped key,`intents` sidecar,additive-optional 无 schema bump);`checkpoint start` 吸收(清除)intent。命令绝对 fail-soft(含自身 path guard,任何错误静默 exit 0 — CC 预执行失败行为未文档化,不能让报错污染 prompt)。任务文本不进预执行命令(`$ARGUMENTS` 转义规则未文档化,注入面为零)。
|
|
1269
|
+
- **L3 每 turn 护栏**:`bin/harnessed-inject-state.mjs` 与 `injectState.ts`(parity 契约)— fresh intent(TTL 24h)+ 未 seed 的 ledger → 每 turn 注入 `<workflow-intent>` 提醒(含 intent 年龄 + 精确的 gates→start 指令);ledger seeded 后回归现有 breadcrumb,无 intent 行为逐字节不变。`status --recover` 顶部同步报告 pending intent(仅 ledger 为空时,与 bin 口径一致)。
|
|
1270
|
+
- **L2 合规轻量路径(消除绕过动机)**:/auto 的 step 2(SKILL en/zh + 生成命令)写明 sanctioned lite —— 自包含小任务可 `--skip-sub verify --skip-sub retro`,被 skip 的 sub 仍带原因进 ledger;"lite ≠ freestyle,差别就在 ledger/evidence"。
|
|
1271
|
+
- **gates `--skip-sub` 可重复修复**:此前非收集型 option 只保留最后一个 flag(`--skip-sub a --skip-sub b` 静默丢 a);现 commander 累加器 + 逗号分隔兼容。
|
|
1272
|
+
- **leaf 级 intent 变体(T6 追加)**:单阶段命令直调(`/verify-qa`、`/task-code` 类)同构 freestyle 风险,但 master 文案(gates→start)对 leaf 是误导 — `checkpoint intent` 现按 role-prompts.yaml `is_master`(单一 SoT,未知名/读失败 fail-soft 按 leaf)自动分型:leaf 的 banner 与每 turn 唠叨指向 leaf SOP(`harnessed prompt <sub>` → spawn → `checkpoint complete <sub>`),吸收条件 = 该 sub 自身的 `complete`/`fail`(名字匹配,master 仍由 `start` 吸收;kind 为 store 的 additive-optional 字段,旧 intent 缺省视为 master)。`!` 预执行铺设:generateCommands 执行体 + 18 个 leaf SKILL(en/zh 成对)+ ship/auto master(前次遗漏);discuss master 及 discuss 子层维持排除(纯交互 SOP 无 checkpoint 步骤)。
|
|
1273
|
+
|
|
1274
|
+
## [4.21.0] - 2026-07-04
|
|
1275
|
+
|
|
1276
|
+
### Fixed
|
|
1277
|
+
|
|
1278
|
+
- **/auto 规划产物结构漂移(用户 dogfood:KidsTetris 项目产出自造的 `.planning/phase-0-discuss/` 布局,无 ROADMAP/REQUIREMENTS/phases/ 层级).** 三处根因三处修:(1) role-prompts(discuss-phase / plan-phase / research,en+zh)与 workflow SKILL 中的松散占位符 `.planning/<phase>/` 全部统一为 GSD 标准 `.planning/phases/<NN>-<slug>/`(命名规则写进指令:NN 两位数取现有最大 + 1、slug kebab 短名),`generateCommands` 共享模板同步;(2) 新项目引导 — discuss master 与生成的 `/discuss` 命令加 step 0:`.planning/ROADMAP.md` 缺失时优先调用 `/gsd-new-project`,不可用则按内嵌最小骨架先建 ROADMAP/STATE/REQUIREMENTS 再继续;(3) 调真命令优先 — discuss-phase / plan-phase checklist 首条要求 `/gsd-discuss-phase`、`/gsd-plan-phase` skill 可用时直接调用并沿用其产物结构,仅不可用时才按 checklist 手工执行。capabilityResolver 渲染层经查无责(user-skill cmd 保持正确)。
|
|
1279
|
+
- **perturn-inject hook 命令路径书写形式(用户 dogfood:每个 prompt 报 `UserPromptSubmit hook error` + `cjs/loader` MODULE_NOT_FOUND).** 4.20.0 的绝对化用 `path.join` 产出反斜杠且仅含空格才加引号;CC 经 shell 执行 hook 命令时未引号的 `C:\Users\...` 反斜杠被当转义吃掉(`C:Users...`)→ node 找不到脚本。`resolveHookCommand` 改为恒引号 + 正斜杠输出(与真实 settings.json 中其它可用 node hook 的书写惯例一致;Windows node 接受 `/`)。已装用户重跑 `harnessed setup` 经自愈迁移自动纠正。
|
|
1280
|
+
|
|
1281
|
+
## [4.20.1] - 2026-07-04
|
|
1282
|
+
|
|
1283
|
+
### Fixed
|
|
1284
|
+
|
|
1285
|
+
- **中性 spawn cwd — EBADDEVENGINES 环境污染免疫(用户 dogfood v4.20.0:gsd / playwright-test / mattpocock-skills / design-taste-frontend 四个 npm/npx 类 force-refresh 全灭).** 根因(本机复现实锤):`npm exec` 会从 spawn cwd 向上查找最近的 package.json 并强制校验其 `devEngines` — 用户从 home 目录跑 setup,home 里存在 bun 生成的 `devEngines: { runtime: { name: 'bun', onFail: 'download' } }` package.json,npm 只认 runtime name `node` → 该目录树下一切 npx 必死(上游三包经 `npm view` 核实均无 devEngines,纯环境污染;失败的 4 个全是 npm/npx 类,git / claude-plugin 类全过)。修复 = v3.0.2 `getMcpSpawnCwd` 先例推广:新 `getNeutralSpawnCwd()`(env `HARNESSED_SPAWN_CWD` 覆盖 → `<stateRoot>/.spawn/` + **哨兵 package.json**(name-only,截断 npm 向上查找 — stateRoot 本身就在被污染的 home 之下,没有哨兵子目录仍会被祖先命中)→ fs 失败回退 ctx.cwd fail-open)。接线:`npm-cli` / `npx-skill-installer` 的 install + verify spawn(`spawnCmd` 新 `neutralCwd` opt-in;manifest `install.cwd` 仍最高优先)与 auto-install 的 install_commands spawnSync;这些安装均为全局语义(`-g` / `--global` / `--copy`),cwd 本无意义,不再继承用户 shell cwd。端到端复现回归:污染目录直跑 `npx skills@1.5.7 --version` → EBADDEVENGINES;同一污染树下的哨兵子目录 → `1.5.7` exit 0。
|
|
1286
|
+
|
|
1287
|
+
## [4.20.0] - 2026-07-04
|
|
1288
|
+
|
|
1289
|
+
### Added
|
|
1290
|
+
|
|
1291
|
+
- **B2 — bun-compile 单文件二进制管线(路线 Phase 2;B1 seam 的解包数据源落地).** `bun scripts/build-binary.mjs`(`pnpm build:binary`,须 bun 运行)把资产集(workflows/manifests/messages/routing/config-templates/schemas/bin + CHANGELOG.md,157 文件 ~1.1MB)编成 v1 JSON bundle(`src/compile/bundleAssets.ts`,base64 + posix relPath + fileCount,零新依赖)嵌入 `src/compile/entry.ts` 编译产物;首跑经 `unpackAssets`(原子:`.unpack-tmp` 写入 + 计数完整性校验 + rename;损坏目标替换;relPath 逃逸硬拒)解包到 `compiledAssetsDir(version)` — 与 `getAssetsRoot()` compiled 分支同一路径 SoT。本机端到端(Windows + bun 1.3.14):97MB exe 异地 cwd 首跑解包 157 文件 → `setup --dry-run` 28 workflows;二次运行幂等跳过;哨兵改写解包目录 en.json 输出即变(compiled 全链路读解包目录实证)。npm 渠道(tsup dist)零接触;`assets-bundle.gen.json` / `dist-bin/` 均 .gitignore;`src/compile/entry.ts` 单文件 tsconfig exclude(gen.json 仅构建期存在)。
|
|
1292
|
+
- **messages/ 的 compiled 接线(B1 撤回项复活,惰性方案).** `wireMessagesDir(provider)`:src/cli.ts 进程入口注入 `() => join(getAssetsRoot(), 'messages')` thunk(首次 `t()` 才求值)— vitest setupFiles 预加载 i18n 不经 cli.ts,B1 击穿 gates/setup-locale 17 测试的 mock 时序问题由此规避(该 17 测试保持绿有断言);npm 模式候选等价,compiled 模式 zh-Hans 从解包目录可读。
|
|
1293
|
+
- **CI/发布管线.** ci.yml 新 `binary-smoke` job(3-OS 原生编译 + 异地 cwd 冒烟:--version 断言 + 28 workflows + 幂等解包;oven-sh/setup-bun SHA-pin v2.2.0);publish.yml 新 `binaries` job(needs: publish,per-OS 编译后 `gh release upload` 附到 release)— 二进制与 npm **并行**分发,签名/自更新属 Phase 3。
|
|
1294
|
+
|
|
1295
|
+
### Fixed
|
|
1296
|
+
|
|
1297
|
+
- **cc-hook-add 双重 bug(用户 dogfood,发版拦截修复;perturn-inject 装出的 settings.json hook 非法).** (1) 条目形状:旧 installer 写扁平 `{ command }`,而 Claude Code settings schema 要求 `{ matcher?, hooks: [{ type: 'command', command }] }` — 扁平形每个 session 都触发 CC 校验报错("hooks.UserPromptSubmit.1.hooks: Expected array");(2) 路径:`bin/harnessed-inject-state.mjs` 包内相对路径原样写入,仅 cwd 恰含该文件时可跑,其余项目每个 prompt hook 报错。修复(新 `src/installers/lib/hookEntry.ts` 单一 SoT):安装时把包内相对脚本段基于 `getAssetsRoot()` 解析为绝对路径(含空格加引号;manifest 保持可移植相对写法,installer authoritative — sister mcpStdioAdd);写入 CC 真实 schema 形状(matcher 未设则省略 key);**自愈迁移** — 安装时凡命中本注册脚本的条目(旧扁平形 / 手工修过但相对路径形 / 陈旧绝对形)统一收敛为一条修正条目,受损用户重跑 `harnessed setup` / `harnessed install perturn-inject` 即恢复;`isAlreadyInstalled` 对 cc-hook-add 改为形状感知的 authoritative 探测(不再落 shell grep — grep 会把坏条目误判为已装,恰好跳过最需要自愈的安装);卸载器同步识别新旧两种形状。verify 改嵌套形 + 解析后命令。
|
|
1298
|
+
|
|
1299
|
+
### Notes
|
|
1300
|
+
|
|
1301
|
+
- 已知限制(D6):perturn-inject hook 的 `node <abs>/bin/harnessed-inject-state.mjs` 仍需宿主 node;纯二进制用户装该 optional hook 前需自备 node。
|
|
1302
|
+
- follow-up(D7):`assets/<旧版本>/` 目录不自动清理,留 doctor/gc 承接。
|
|
1303
|
+
|
|
1304
|
+
## [4.19.0] - 2026-07-04
|
|
1305
|
+
|
|
1306
|
+
### Added
|
|
1307
|
+
|
|
1308
|
+
- **B1 — 资产解析 seam(bun-compile 单文件分发路线 Phase 1;spike: `.planning/phases/_spike-bun-compile/`).** 新 `getAssetsRoot()`(src/cli/lib/assetsRoot.ts,独立模块防 packagePath 既有 mock 面):env `HARNESSED_ASSETS_OVERRIDE` 覆盖 → compiled 运行时(bunfs 前缀检测,含实测 `%7EBUN` 百分号编码形)→ `<stateRoot>/assets/<version>/`,缺资产一次性 fail-loud 警告 + 调用方既有 missing-file 路径 → 默认严格等于 `getPackageRoot()`(npm/dev 逐字节不变,全量测试即等价性回归网)。10 个 CLI 消费文件的 workflows/manifests/messages/CHANGELOG 资产读取全部迁移到 seam;stateRoot 惰性求值(部分 mock 环境不触碰 detectPlatform)。资产解包数据源与编译管线属 Phase 2 — 本 seam 已实测:compiled exe + 手工铺设 `assets/<ver>/` 即恢复完整 setup,缺失则 exit 1 + 明确指路。
|
|
1309
|
+
- **i18n 内嵌 en 兜底(spike bug #1 根治).** `messages/en.json` 经 tsup json-import 打进 bundle;messages/ 不可读(compiled / 资产缺失)时 `t()` 兜底真实英文文案而非裸奔 key;zh-Hans 文件在场路径逐字节不变。注:i18n 不得静态依赖 assetsRoot(vitest 全局 setupFiles 预加载会击穿 packagePath mock,实测教训入注释)。
|
|
1310
|
+
|
|
1311
|
+
### Fixed
|
|
1312
|
+
|
|
1313
|
+
- **`harnessed install` already-installed 冒充新安装(spike bug #2).** idempotent 短路(含 ctx7→context7 插件别名命中)现打印 `already-installed <name>@<ver> (idempotent check hit; nothing to do)`,不再显示 `installed`;exit 0 语义不变。i18n keys en/zh 同步。
|
|
1314
|
+
- 勘误:spike 记录的 "workflows_not_found 时 exit 0" 为测量伪影(管道吞退出码),真实已 exit 1,无需修。
|
|
1315
|
+
|
|
1316
|
+
## [4.18.0] - 2026-07-04
|
|
1317
|
+
|
|
1318
|
+
### Added
|
|
1319
|
+
|
|
1320
|
+
- **setup optional-tier 推荐块(用户指示: setup 能装 codegraph).** `manifests/optional/`(codegraph / ecc / perturn-inject)per Phase 18 D2 特意不进 Step B auto-glob,但此前 setup 没有任何入口 — 唯一路径是用户自己知道 `harnessed install <name>`(三层解析早已打通却无人引导)。新增 `src/cli/lib/optional-offer.ts`(沿 l4-rescue 独立模块 + 动态 import 先例):setup 收尾前把未安装的 optional 组件放进一屏 clack `multiselect` 勾选(label = display_name、hint = description,`initialValues: []` + `required: false` — **默认全不选**,直接回车即全不装,opt-in 语义;Esc/Ctrl-C 同样全跳过),勾中项逐个执行前回显 `$ <install cmd>`(informed consent)再单 manifest `runInstall`(npm-cli → `system:true`,该勾选即 L4 显式 opt-in,`npm i -g` 缩写落 detectLevel 的 safest-default L4 分支;其余 method 不消费 system);codegraph 装毕追加 `codegraph init` 每项目建索引提示(上游两步语义)。已装项静默跳过;非 TTY / `--non-interactive` 只打一行 advisory(`install with \`harnessed install <name>\`: …`),不 prompt。
|
|
1321
|
+
|
|
1322
|
+
### Fixed
|
|
1323
|
+
|
|
1324
|
+
- **codegraph manifest verify 稳健化.** `codegraph status` → `codegraph --version`:verify 紧跟全局安装执行,此时每项目 `.codegraph/` 索引尚不存在,`status` 无项目上下文的语义上游未验;`--version` 只断言 binary 就位 — 恰是该安装步骤的全部保证。`upstream_health.last_check` 更新 2026-07-04。
|
|
1325
|
+
|
|
1326
|
+
## [4.17.0] - 2026-07-04
|
|
1327
|
+
|
|
1328
|
+
### Added
|
|
1329
|
+
|
|
1330
|
+
- **CodeGraph 编排轻接线(built-but-unwired 补线;用户选项 1).** `capabilities.yaml` 的 `codegraph` entry(Phase 18 编目,opt-in)此前零编排引用。现加条件优先指令:项目存在 `.codegraph/` 索引时,符号查找 / 调用链 / 影响面分析优先用 codegraph MCP 工具(`codegraph_explore`),替代 grep/glob/逐文件 Read 爬取;无索引则跳过(不做安装劝导)。落点:role-prompts(en+zh)`task-code` checklist + `workflows/task/code/SKILL(.zh-Hans).md` 新增 CodeGraph navigation 节;不建 judgment gate(轻量接线)。
|
|
1331
|
+
|
|
1332
|
+
### Fixed
|
|
1333
|
+
|
|
1334
|
+
- **doctor codegraph 启用提示补全第二步.** `npx @colbymchenry/codegraph` 只把 MCP server 接进 agent(上游 README step 2),**不建索引** — 每项目 `codegraph init`(step 3)才生成 `.codegraph/`;旧提示止步第一步,用户"启用"后 doctor 仍永远 "not configured"。现提示两步齐全。
|
|
1335
|
+
- **task/code SKILL(.zh-Hans).md 招式计数陈旧.** 4.16.3 移除 zoom-out 后 "3 mattpocock 招式 / 3 触发条件" 未同步 → 修正为 2。
|
|
1336
|
+
|
|
1337
|
+
### Notes
|
|
1338
|
+
|
|
1339
|
+
- **"每次 commit 触发 CodeGraph 重建" 评估后不做**:上游 auto-sync 默认开启(文件 watcher,"the index is never stale, and there is nothing to re-run",README § step 4)— 按 commit 粒度重建是逆上游设计的冗余且更迟钝。若实际使用观察到索引漂移再复议(依据记录于 `.planning/phases/_patch-4.17.0-codegraph-wiring/progress.md`)。
|
|
1340
|
+
|
|
1341
|
+
## [4.16.3] - 2026-07-04
|
|
1342
|
+
|
|
1343
|
+
### Changed
|
|
1344
|
+
|
|
1345
|
+
- **mattpocock 招式命令上游对账(登记 follow-up 落地;上游 2026-07 重构实证 gh api 全目录清单).** 三类失配处理:(1) `diagnose` capability 的 cmd/skill_dir 对齐上游改名(`/diagnose` → `/diagnosing-bugs`),KEY 保留不动引用面;role-prompts(en+zh)、routing/decision_rules、gsd-debug alias 链、manifest description 等全部字面 `/diagnose` 同步,残留 sweep 清零。(2) `zoom-out` capability **整体移除**(上游删除该 skill,无稳定后继;用户指示不做兼容性保留)— task/code、task/auto 的 tools_available / invokes_tools / SKILL(.zh-Hans).md 叙述、role-prompts 方法论条目(en+zh)、decision_rules 清单全部同步剔除,check-workflow-schema C1 交叉校验绿。(3) `investigate` capability 的 impl 由 mattpocock-skills 改为 gstack(上游已无该 skill;gstack `/investigate` 为现存实现),`investigate-gstack` 的失效 mattpocock alias 移除,改为 namespace-suffix 兼容别名。上游新增 skills(triage / research / implement 等)按 YAGNI 不扩容 capability。
|
|
1346
|
+
|
|
1347
|
+
### Fixed
|
|
1348
|
+
|
|
1349
|
+
- **mcp installer spawn 失败消息接入 `formatSpawnFail`(登记 follow-up 落地).** `claude|codex mcp add exited N: <stderr 头部截取>` 改为与其余 4 个 installer 一致的 tail-END + stdout 兜底格式 — CC CLI 把错误写到 stdout 且 stderr 为空时不再产生悬空冒号消息。
|
|
1350
|
+
|
|
1351
|
+
## [4.16.2] - 2026-07-03
|
|
1352
|
+
|
|
1353
|
+
### Fixed
|
|
1354
|
+
|
|
1355
|
+
- **ui-ux-pro-max 每轮 force-update 的 SHA "unverifiable" ⚠ 静音(设计内噪声).** 该 manifest 的 install cmd 本身就在结尾 `rm -rf` 自己的 clone cache 目录 — D-15 `git rev-parse` 天生无物可查,每轮 warn 是纯噪声(dogfood v4.16.1)。新 `isSelfCleaningCloneCmd`(clone 之后出现针对 clone dest 的 `rm -rf`,带词边界防前缀误匹配;gstack 式的 clone 前预清理不算)→ 判定 self-cleaning 即静默跳过 rev-parse,manifest verify 保持 install authority(ADR 0037 已录该模式)。非 self-cleaning cmd 的目录缺失仍保留 4.16.0 的 warn 降级。
|
|
1356
|
+
- **ctx7 在 force-update pass 显示裸 `level-flag-missing`(误读为反复失败).** force 语义 bypass 已装探测 → 已装的 L4 工具每次 force pass 都撞 `--system` 门。force pass 的 skip reason 改为自解释文案(`L4 system-scope — excluded from force-update; update manually: \`npm install -g ctx7\``);普通 pass 保持字面 `level-flag-missing`(l4-rescue 的过滤契约,仅消费首 pass)。
|
|
1357
|
+
- **gstack git_ref pin 过期(force-update ⚠ 提示的行动项).** 14fc0866(v1.52 时代)→ 11de390b(上游当前 HEAD,gh api 实证;`last_known_good_version` 1.58.0.0 → 1.58.5.0 按上游 VERSION 文件),base + codex override 两处同步。按 ADR 0037,pin 记录 install-time last-known-good,随发布节奏 bump。
|
|
1358
|
+
|
|
1359
|
+
## [4.16.1] - 2026-07-03
|
|
1360
|
+
|
|
1361
|
+
### Fixed
|
|
1362
|
+
|
|
1363
|
+
- **ctx7 重复 L4 prompt(dogfood v4.16.0:L4 rescue 装好 ctx7 后,每次 setup 仍报 `level-flag-missing` 并重复请求 L4 确认).** 根因:`detectNative` 的 npm-cli 分支只查 `<skillsDir>/<name>`(对全局 npm CLI 无意义),shell fallback `command -v` 在 cmd.exe 下也永远失败。新增 `binaryProbe`(src/installers/lib/binaryProbe.ts):从 manifest verify cmd 首 token 提取二进制名(`ctx7 --version` → `ctx7`;POSIX builtin / npx / node 等非组件 token 回退 metadata.name),`where`/`which` 原生探测 PATH — 第二次 setup 直接 already-installed,不再进 L4 gate。
|
|
1364
|
+
- **spawn/verify 失败消息改取输出尾部(gstack 真因曾被裁掉).** 上游 gstack `setup` 脚本首查 `command -v bun`,缺失 exit 1,"Error: bun is required but not installed." 在 stderr **尾部** — 旧的头部截取只留下 git 的 "Cloning into…" 进度噪声。新 `sanitizeOutputTailEnd`(从末行向前拼接,cap 300/160/200),`formatSpawnFail` / `formatVerifyFail` / spawn 超时消息全部接入;doctor `checkWinBash` 的单行消毒(`sanitizeOutputTail`)保持不变。
|
|
1365
|
+
- **↳ 全文原因块死区(90-100 字符 reason:note 显示被截断但详细块被抑制).** 旧门槛 `full.length <= 100` 与 kept-existing note 内嵌的 `slice(0, 90)` 之间存在死区(gstack dogfood 恰好落入)。改为"渲染后的 note 未携带完整 reason 即打印 ↳"。
|
|
1366
|
+
|
|
1367
|
+
### Added
|
|
1368
|
+
|
|
1369
|
+
- **doctor 第 15 项检查 `bun present`(warn-only).** bun 是 gstack 上游 setup 的硬性构建依赖(browse binary),缺失即 gstack refresh 必败;win/darwin 提供 `install_commands`(winget / brew)进 setup 末 auto-install,linux 官方路径为远程脚本管道、仅给 fix 文案不自动执行。
|
|
1370
|
+
|
|
1371
|
+
## [4.16.0] - 2026-07-03
|
|
1372
|
+
|
|
1373
|
+
### Fixed
|
|
1374
|
+
|
|
1375
|
+
- **force-refresh 四失败确诊修复(dogfood v4.15.2,kept-existing 带因面首次给出可诊断原因).** (1) **ui-ux-pro-max 结构性误报**:D-15 的 `git rev-parse HEAD` 在被 install cmd 自删的 `.cache` clone 目录上跑 → 必挂(4.10.1 起 latent,此前被 WSL verify 失败掩盖)— rev-parse 不可执行现降级 console.warn,以 manifest verify(native test 链)为准;(2) **SHA pin 与 force-update 语义矛盾**:force-update = 刷新到上游最新,install-time 的 git_ref pin 必然落后 HEAD — mismatch 在 `updateInstalled` 下降级 warn(提示 bump git_ref),fresh install 硬门不变(ADR 0037,amends ADR 0010 D-15);(3) **mattpocock 上游更名**:`diagnose` → `diagnosing-bugs`、`zoom-out` 已删(2026-07-03 实证)— manifest verify/idempotent、INSTALLED_INDICATORS、doctor indicators 全部对齐(legacy `diagnose` 保留探测,pre-rename 机器不误报);capabilities.yaml 招式 cmd 全量对账记 follow-up;(4) **design-taste npx 硬崩(exit 3221226505 / 0xC0000409)**:Windows NTSTATUS 硬崩类 exit 单次重试(POSIX exit ≤255,谓词天然 win32-only)。
|
|
1376
|
+
- **spawn 阶段错误消息 stdout 兜底.** 新 `formatSpawnFail` 统一 4 个 installer(npx-skill / git-clone / npm-cli / cc-plugin)的 install-spawn 失败消息(stderr → stdout → «no output»,sanitize)— 消灭 `npx skills add exited 3221226505: ` 空尾类。
|
|
1377
|
+
|
|
1378
|
+
### Added
|
|
1379
|
+
|
|
1380
|
+
- **失败/kept-existing 全文原因块.** 表格 note 列保持截断,组表格后对超长原因输出 `↳ <name>: <full ≤400>` 行(同流:failed→stderr,kept-existing→warn)— v4.15.2 的 90 char 截断恰好吃掉 gstack / mattpocock 的诊断部分,下轮 dogfood 直读真因。
|
|
1381
|
+
|
|
1382
|
+
## [4.15.2] - 2026-07-03
|
|
1383
|
+
|
|
1384
|
+
### Fixed
|
|
1385
|
+
|
|
1386
|
+
- **WSL app 别名漏网(用户 dogfood v4.15.1 同机:PATH bash = `C:\Users\<u>\AppData\Local\Microsoft\WindowsApps\bash.exe`,Microsoft Store WSL 执行别名).** 4.15.1 的已知-stub 正则只列 System32/Sysnative/SysWOW64,该别名在解析第 2 步被采纳,doctor 同步误报 "(Git Bash / native)" — ctx7 L4 verify 与 gstack / ui-ux-pro-max 的 force-refresh(git-clone posix cmd)仍打到 WSL。双修:(1) 正则增补 `Microsoft\WindowsApps` 位置;(2) 新增功能探针 — 每个候选 bash 跑一次 `-c` no-op,exit 非 0(无发行版 stub 的行为)即拒绝并继续解析链,未知位置的 stub / 损坏 bash 一并兜住(探针不可用时降级接受,保持 partial-mock 测试惰性;env `HARNESSED_BASH` 显式覆盖跳过探针)。
|
|
1387
|
+
- **非 POSIX verify 与 bash 解耦.** `posixShell` 改为能力提示而非硬路由:无 POSIX 依赖的纯 exe 调用(如 `ctx7 --version`)在 Windows 改走 cmd.exe(.cmd shim 本就更合适),bash 健康与否不再牵连这类 verify;含 shell 语法或 coreutil 首 token 的 cmd 保持 bash 路径。
|
|
1388
|
+
- **kept-existing 行携带底层失败原因.** 此前 reclassification 吞掉 reason,用户无法诊断 mattpocock refresh 为何失败;现在表格 note 列显示 `refresh failed: <原因≤90> — prior version retained`(`StepBResult.keptExisting` 形状 string[] → {name, reason}[])。
|
|
1389
|
+
- **错误尾巴消毒共享化.** ctx7 失败消息把 WSL stub 的 CP936 乱码原样嵌入;`sanitizeOutputTail`(首个非空行、仅可打印 ASCII、封顶)统一用于 verify 失败消息、spawn 超时消息与 doctor checkWinBash。
|
|
1390
|
+
|
|
1391
|
+
### Changed
|
|
1392
|
+
|
|
1393
|
+
- **doctor `jq present` 检查 fail → warn.** 消费方核查:jq 只被 `harnessed audit-log --filter`(自带 ENOENT 降级)与 ralph-loop plugin 的 Windows 运行时使用,非 setup / 核心链路依赖;附 install_commands 供 setup 末尾 auto-install 顺手补装。
|
|
1394
|
+
|
|
1395
|
+
## [4.15.1] - 2026-07-02
|
|
1396
|
+
|
|
1397
|
+
### Fixed
|
|
1398
|
+
|
|
1399
|
+
- **WSL-stub bash 根因(用户 dogfood v4.15.0:一台 PATH 上 bash = C:\\Windows\\System32\\bash.exe 且无发行版的机器,mattpocock-skills / design-taste-frontend / ctx7 verify 与 force-update refresh 全灭 — 组件实际装成功,doctor 也证实).** 三层修复:(1) 新 `resolveBash`(src/installers/lib/resolveBash.ts)显式解析 Git Bash — env `HARNESSED_BASH` 覆盖 → PATH 首个非 WSL bash(健康机器 byte-compatible)→ `where git` 派生 → 标准安装位置 → PATH 仅剩 WSL stub 时拒绝 spawn 并 fail-loud(含改 PATH / 设 HARNESSED_BASH 提示),结果 memoize;(2) 新 `evalTestChain`(nativeTest.ts)把 `test -f A || test -f B` 形态的 verify/idempotent 用 fs 原生求值 — 零 shell、跨 OS,顺带修复 cmd.exe idempotent fallback 从来跑不了 `test` 的旧问题(v3.9.9 已述),文法保守(管道/重定向/变量/glob 一律回落 spawn);(3) doctor `checkWinBash` 改用 resolveBash 单一 SoT(报告的就是 spawnCmd 真正会用的 bash),WSL stub 的 CP936 乱码输出消毒后再嵌入。
|
|
1400
|
+
- **doctor 假阳性 ×2(装完 MCP 必红 + gstack 误报).** `checkMcpScope` 语义与 installer 对齐 — v3.0.2 起 harnessed 自己就用 `--scope user` 装 MCP,旧检查恰好 FAIL 在 setup 产出的状态上;现改 informational(报告 user/project 两侧分布,永不 fail),名称 `mcp scope = project` → `mcp scope`。gstack 检查加文件系统分支(PATH 无 wrapper 但 `<skillsDir>/gstack/` 已装 → pass),移除指向不存在包的 `npm i -g @gstack/cli` 修复建议(改 `harnessed setup`)。
|
|
1401
|
+
- **空错误文本 + quiet 泄漏.** verify 失败消息统一为 `verify failed (exit N ≠ expected M): \`cmd\` — <stderr|stdout|(no output)>`(WSL stub 报错走 stdout,旧格式只截 stderr → 悬空冒号);spawn 超时消息同样 stdout 兜底;npmCli 的 "(L4 system install...)" 行加 quiet 门(不再错位插进 Step B 进度流)。
|
|
1402
|
+
|
|
1403
|
+
### Added
|
|
1404
|
+
|
|
1405
|
+
- **setup 输出打磨(用户反馈 "看看还能继续改进").** 分组表格分隔线按实际最宽行计算;force-update 二 pass 增加与首 pass 对称的 `force-updating N plugin(s)...` 头行;存在 failed 组件时在 "setup complete" 前输出诚实的失败摘要(计数 + 重试/诊断路径),失败的 setup 不再看起来全绿。
|
|
1406
|
+
|
|
1407
|
+
## [4.15.0] - 2026-07-02
|
|
1408
|
+
|
|
1409
|
+
### Added
|
|
1410
|
+
|
|
1411
|
+
- **Completion gate 交互面三级偏好链(ADR 0036,用户裁决:不替换 ralph-loop,做偏好链).** 28 workflow 的 SKILL.md 指令(23 en + 23 zh-Hans)与 `generateCommands` 生成的 commands/<x>.md 从两级(ralph-loop plugin → self-loop)升级为三级:plugin 优先(fail-closed 逐字匹配 + 硬 max-iterations)→ 未装时 native `/goal` gate(Claude Code 2.1.139+ / Codex 双平台内置零安装;条件句写 verbatim `<promise>COMPLETE</promise>` + turn 上界,并约束只在叶子 subtask 层设置——`/goal` 每 session 单槽)→ `/goal` 亦不可用时 self-loop 兜底。codex 平台由此获得原生 completion gate(ralph-loop plugin 无 codex 等价,4.14.0 起 harness-mismatch 跳过)。SDK 路径(`ralphLoopWrap` 硬上界 + 4-layer verbatim `isComplete`)与 ralph-loop manifest 零改动;trade-off(fail-open 余量 / 软上界 / 单槽覆盖 / 双平台实现差异)记录于 docs/adr/0036。
|
|
1412
|
+
|
|
1413
|
+
## [4.14.2] - 2026-07-02
|
|
1414
|
+
|
|
1415
|
+
### Fixed
|
|
1416
|
+
|
|
1417
|
+
- **gstack 多平台支持(用户指正 — README § Other AI Agents:官方支持 10 agents).** 4.14.0 误判 gstack CC-only 未加 override;现补 `harness_overrides.codex`(`git clone → ~/gstack && ./setup --host codex`,skills 落 `~/.codex/skills/gstack-*/`,verify/idempotent 探测该前缀)。同时发现上游两处 drift 并修正 claude 路径:setup.sh → setup 脚本改名(fresh install 会挂)、repo 布局改根级 skill dirs(verify `skills/office-hours.md` → `office-hours/SKILL.md`)(clone 保持无 flag 的 `git clone <url> <dest>` 形状,extractGitCloneTarget 解析依赖)。
|
|
1418
|
+
|
|
1419
|
+
## [4.14.1] - 2026-07-02
|
|
1420
|
+
|
|
1421
|
+
### Fixed
|
|
1422
|
+
|
|
1423
|
+
- **schemas/manifest.v1.schema.json 再生成遗漏(CI Schema regen gate 红 + npm 4.14.0 包内 schema 过期).** 4.14.0 在 typebox(src/manifest/schema/spec.ts)加了 `harness_overrides` 但未跑 `pnpm build && pnpm build:schema` 再生成静态 JSON 产物(build-schema.mjs 从 dist/ 读,本地陈旧 dist 掩盖了 drift,CI 全新 build 后抓到)。仅影响编辑器 yaml-language-server 提示;运行时校验(dist 内 typebox)在 4.14.0 已正确。
|
|
1424
|
+
|
|
1425
|
+
## [4.14.0] - 2026-07-02
|
|
1426
|
+
|
|
1427
|
+
### Added
|
|
1428
|
+
|
|
1429
|
+
- **codex MCP 写入路径 (cross-harness setup parity 根因 1).** `mcp-stdio-add` / `mcp-http-add` installer 按 `detectPlatform().id` 路由:claude 保持 `claude mcp add --scope user` 逐字节不变;codex 走 `codex mcp add <name> -- npx --yes <pkg>@<ver>`(stdio)/ `codex mcp add <name> --url <url>`(http),verify/idempotent 读侧用 `~/.codex/config.toml` 的 `[mcp_servers.<name>]` header 正则存在性探测(不引 TOML parser,零新依赖);codex 无 `--header` flag → 带 auth header 的 http manifest 在 codex 平台 fail-loud。`runClaudeArgs` 泛化为 `runHarnessArgs(bin, ...)`(codex 不在 PATH → 明确报错),`ProcResult` 增 `stdout`。
|
|
1430
|
+
- **manifest schema 新增 `spec.harness_overrides.codex`(install + 可选 verify 子块,复用现有判别 union).** `runInstall` dispatch 前按平台合并 override;无 override 的 claude-only method(`cc-plugin-marketplace` / `cc-hook-add`)在非 claude 平台 → `aborted 'harness-mismatch'` 诚实跳过(setup 显示 "claude-only install method (no codex equivalent)")。5 个 manifest 落 codex override(上游逐个实证):superpowers(`codex plugin add superpowers@openai-curated`)、karpathy-skills / planning-with-files(skills CLI 路径)、gsd(`@opengsd/gsd-core --codex --global` → ~/.codex/skills)、ui-ux-pro-max(git-clone cp 到 ~/.agents/skills);ralph-loop / gstack 无 codex 等价 → 跳过。`ccPluginMarketplace` installer 支持 codex verb(`plugin add`,verify 走 `codex plugin list` stdout 15s)。
|
|
1431
|
+
|
|
1432
|
+
### Fixed
|
|
1433
|
+
|
|
1434
|
+
- **setup 管线 8 处 CC-only 硬编码(codex 平台下错误执行或必失败).** (1) `--agent claude-code` 从 3 个 npx-skill manifest + doctor install_commands 撤下,installer 按平台注入 `--agent <claude-code|codex>`(显式 manifest --agent 优先);(2) `npxSkillInstaller` DiffPlan/backup 路径与 uninstall 侧(mcp remove bin / npx-skill skillDir / ccHookAdd settingsPath / unified uninstall 三路径)全部改走 descriptor resolver;(3) Agent Teams warn(setup + doctor)与 `setup.mcp_hint` 按平台门控(codex 提示 `codex mcp list`,新 i18n key `setup.mcp_hint_codex` 双语);(4) doctor checks(mattpocock / planning-with-files / mcp-scope / token-budget)plugin-cache 探测按 `getPluginsRegistry()` 门控、skills 探测遍历 `harnessSkillsDirs()`;(5) `harnessSkillsDirs()` 增 `~/.codex/skills` 探测项(gsd --codex 落点);(6) detectNative 增 MCP 原生注册探测(双平台,替代 shell `claude mcp list | grep` 主路径);(7) confirmAt L3 文案通用化。claude 平台行为逐字节回归保持(1760 tests)。
|
|
1435
|
+
|
|
1436
|
+
## [4.13.0] - 2026-07-02
|
|
1437
|
+
|
|
1438
|
+
### Fixed
|
|
1439
|
+
|
|
1440
|
+
- **MCP 并行安装 race — chrome-devtools-mcp / exa-mcp "verify: not found in mcpServers map" (findings 根因 1).** Step B 此前对全部 manifest `Promise.allSettled` 并行,3 个 `claude mcp add --scope user` 进程各自读-改-写整个 `~/.claude.json` → lost update,只有最后写入者幸存(用户 dogfood: tavily 存活,chrome-devtools + exa 被 clobber)。`runStepBInstall` 现按 install method 分区:`mcp-stdio-add` / `mcp-http-add` 严格串行(共享 writer),其余 manifest 保持全并行;两组彼此并发。
|
|
1441
|
+
- **`npx skills add` 交互提示挂死 300s — mattpocock-skills / design-taste-frontend spawn-timeout (根因 2).** 双修:(a) `spawnCmd` / `runArgs` 全部 spawn 改 `stdio: ['ignore','pipe','pipe']`,stdin 关闭后 prompt 型 CLI 快速失败而非死等;(b) 三个 npx-skill manifest cmd 追加 `-y --agent claude-code`(skills CLI 实测支持 `-y, --yes` Skip confirmation prompts),doctor `check-mattpocock-skills` 的 install_commands 同步。
|
|
1442
|
+
- **skill 检测/verify 与真实布局不符 — "总是检测不到" (根因 3).** `extractSkillName` 现优先解析 `--skill <name>` / `-s <name>`(design-taste-frontend 此前解析成 repo 段 `taste-skill`,永远查错目录);`INSTALLED_INDICATORS` 探测遍历 `~/.claude/skills` + `~/.agents/skills` 双目录;`npxSkillInstaller` 装后 real-path verify 改用与 idempotent 探测同源的 `detectSkillPresence`(indicators-aware + 双目录),多 skill pack(mattpocock 散装 `diagnose/` 等)不再必然 verify-failed;mattpocock / design-taste / playwright manifest 的 verify + idempotent_check 改为双路径真实布局。
|
|
1443
|
+
- **ctx7 永久 "skipped — level-flag-missing" (根因 4).** Step B 硬编码 nonInteractive 使 L4(`npm install -g`)manifest 无任何可交互安装路径。新增 L4 post-pass rescue(`src/cli/lib/l4-rescue.ts`):汇总输出后对每个 level-flag-missing 项展示 install cmd + Clack confirm,同意则以 `system: true` 单独重跑该 manifest(TTY-only;`--non-interactive` / `--dry-run` 不触发)。
|
|
1444
|
+
|
|
1445
|
+
### Added
|
|
1446
|
+
|
|
1447
|
+
- **Step B 实时进度输出 (根因 5 / 用户反馈 1).** `runStepBInstall` 新增 `onProgress` 回调,setup 打印起始行 `installing N upstream components (MCP serialized, rest parallel)...` + 每完成一个组件输出 `[done/total] <status> <name>`,非 TTY 同样生效——5 分钟静默假死感消除(叠加根因 2 修复后,最长等待回落到真实安装时长)。
|
|
1448
|
+
- **检查结果表格化输出 (用户反馈 3).** `printGrouped` 重写为对齐表格:glyph(✓ ✗ ↷ ○ ⚠)+ status + component + note 列,name 列宽按组计算,failed 的 reason 拆入 note 列并截断 100 字符;分组/流向(failed→stderr、kept-existing→warn)保持不变。
|
|
1449
|
+
|
|
1450
|
+
## [4.12.0] - 2026-07-01
|
|
1451
|
+
|
|
1452
|
+
### Changed
|
|
1453
|
+
|
|
1454
|
+
- **v13.0 Upstream Re-sync — gstack / gsd-core / superpowers pin bump.** 三核心上游 pin 自 v5.1 (2026-06-10) 起 stale,bump 继承上游对已编排能力的硬化(零新 wire 也受益): gstack 1.52.1.0→1.58.0.0 (commit `14fc0866`; token carving `/ship` -59% + redaction/staging/codex-auth guard + AskUserQuestion 文本 fallback) · gsd-core ^1.4.1→^1.6.0 (verify-work deterministic UAT routing + `plan:pre` 漂移预检 + gsd-review 强制源码核验) · superpowers v5.1.0→v6.0.3 (6.0 `subagent-driven-development` 重写对 harnessed 透明,cmd 名 + parallelism-gate wiring 不变)。2 spike 验证安装面/worktree 兼容。详 ADR-0035。
|
|
1455
|
+
|
|
1456
|
+
### Added
|
|
1457
|
+
|
|
1458
|
+
- **5 个上游能力引进编排 (v13.0 selective wire).** `verification-before-completion` (superpowers — task 级 per-claim 证据门,挂 `task/deliver` phase `01b-verify-evidence`,配 ralph-loop COMPLETE + karpathy 完成=验收通过) · `gsd-eval-review` (GSD — verify 侧 AI phase eval 覆盖审计 conditional sub `has_ai_phase`,配 plan 侧 `gsd-ai-integration-phase`) · `/diagram` (gstack 1.58 NEW — 英文/mermaid → 可编辑架构图 `.mmd`+`.excalidraw`+SVG, Bucket 7 optional) · `gsd-validate-phase` (GSD — Nyquist 覆盖后向查漏 conditional sub `requires_coverage_audit`) · `systematic-debugging` (superpowers — `gsd-debug` 双 impl alias,sister tdd superpowers主/mattpocock备)。`capabilities.yaml` 35→39 entry; verify conditional sub 5→7。**Installed users 需 re-run `harnessed setup`** 获取新 pin + 新 SKILL。
|
|
1459
|
+
- **Skipped (ADR-0035 D3):** gsd-mempalace (记忆双 home 违反一事实一个家) · sync-gbrain (不依赖 gbrain) · gstack ios-\* (stack 不匹配) · gsd ship/code-review/ns-router/autonomous (跨层重叠/与自有 execute keystone 冲突) · superpowers writing-plans/using-git-worktrees/finishing-branch (已禁/native 覆盖/与 ship 重叠)。
|
|
1460
|
+
|
|
1461
|
+
## [4.11.3] - 2026-06-30
|
|
1462
|
+
|
|
1463
|
+
### Added
|
|
1464
|
+
|
|
1465
|
+
- **ASCII wordmark atop `harnessed setup`.** The setup run now opens with a box-drawing `HARNESSED` wordmark + a parrot tagline ("parrots mimic — we orchestrate", nodding to the README), above the version banner. Cosmetic only.
|
|
1466
|
+
|
|
1467
|
+
## [4.11.2] - 2026-06-30
|
|
1468
|
+
|
|
1469
|
+
### Fixed
|
|
1470
|
+
|
|
1471
|
+
- **`design-taste-frontend` failed to install (4.11.0 regression).** The manifest installed it with `npx skills add https://github.com/Leonxlnx/taste-skill --skill design-taste-frontend --copy --global` — but `design-taste-frontend` (taste-skill's v2 default) is a **PromptScript** skill that rejects `--global` (`PromptScript does not support global skill installation`), and via the full GitHub URL the call hung to the full timeout (the reported `spawn timed out after 300000ms`). Fixes:
|
|
1472
|
+
- Manifest now uses the `owner/repo` shorthand + drops `--global`: `npx --yes skills@latest add Leonxlnx/taste-skill --skill design-taste-frontend --copy` — `--copy` alone materializes `SKILL.md` into `~/.claude/skills/design-taste-frontend/` (the verify path), installing in ~4s instead of timing out.
|
|
1473
|
+
- The `npx-skill-installer` flag guard now requires `--copy` (still fail-loud — it prevents Windows-broken symlink installs) but treats `--global` as **optional** (some skill types, e.g. PromptScript, don't support it; `--copy` already targets `~/.claude/skills/`). Manifests that already pass `--global` are unaffected.
|
|
1474
|
+
|
|
1475
|
+
The rest of the taste-skill pack (brandkit / minimalist / brutalist / imagegen / image-to-code / redesign / …) is intentionally not installed by harnessed — `design-taste-frontend` is the only routed capability; install the full pack yourself with `npx skills add Leonxlnx/taste-skill` if you want the others.
|
|
1476
|
+
|
|
1477
|
+
## [4.11.1] - 2026-06-30
|
|
1478
|
+
|
|
1479
|
+
### Added
|
|
1480
|
+
|
|
1481
|
+
- **`harnessed setup` prints its version + an update check.** Setup now opens with `harnessed setup v<version>`, then fetches the latest published version and shows `✓ latest (vX)` or `⚠ update available: X → Y — npm install -g harnessed@latest` (fail-soft + timeout-bounded; offline just notes it couldn't check). Removes the "which version am I actually running?" ambiguity when a stale global install is in play.
|
|
1482
|
+
|
|
1483
|
+
### Fixed
|
|
1484
|
+
|
|
1485
|
+
- **`state.json` write crash under parallel `setup` force-update.** The atomic write (`writeFileAtomic` / `writeFileSyncAtomic`) used a shared `<path>.tmp`, so concurrent force-update installers all writing `state.json` raced — the first rename moved the temp, the second hit `ENOENT` (surfaced as a `failed … rename 'state.json.tmp' -> 'state.json'` line). Two-part fix: each write now uses a **unique** temp name (pid + monotonic counter), and the rename **retries** on transient same-target contention (Windows `MoveFileEx` `EPERM`/`EACCES`/`EBUSY`). Concurrent writers now all succeed (last-writer-wins on content, which is acceptable for the best-effort `state.json`); no crash, no leftover temp.
|
|
1486
|
+
|
|
1487
|
+
## [4.11.0] - 2026-06-30
|
|
1488
|
+
|
|
1489
|
+
### Changed
|
|
1490
|
+
|
|
1491
|
+
- **Design capability: anthropic `frontend-design` → cross-agent `design-taste-frontend` (Leonxlnx/taste-skill), as a two-stage overlay.** The "creative / visual polish" design role was filled by Anthropic's `frontend-design` skill (git-cloned from `anthropics/skills`, a Claude-ecosystem `SKILL.md` install) — at odds with harnessed's cross-harness identity. It is replaced by `design-taste-frontend` from [Leonxlnx/taste-skill](https://github.com/Leonxlnx/taste-skill), an MIT, **cross-agent** (Claude Code + Codex, vercel-labs/agent-skills standard) anti-slop frontend framework installed via `npx skills add`.
|
|
1492
|
+
- **Role re-defined from XOR arbitration → two-stage pipeline** (`workflows/judgments/web-design-routing.yaml`). Previously it was "ui-ux-pro-max **or** frontend-design (when the user wants a creative style)". Now: **Stage 1 `ui-ux-pro-max`** clarifies audience / interaction logic / design axis (the data-driven structural backbone), then **Stage 2 `design-taste-frontend`** overlays detail + visual polish on top — turning a "usable page" into a premium, eye-catching result. Both fire whenever a phase has UI changes.
|
|
1493
|
+
- Removed `manifests/skill-packs/frontend-design.yaml`; added `manifests/skill-packs/design-taste-frontend.yaml` (`npx-skill-installer`, cross-agent). Swapped the `frontend-design` capability → `design-taste-frontend` in `capabilities.yaml`, `verify/design` (workflow + SKILL en/zh), README (en + 9 localized), and routing docs. `ui-ux-pro-max` (default structural plan) and `gstack-design-review` are unchanged.
|
|
1494
|
+
|
|
1495
|
+
Installed users re-run `harnessed setup` to pick up the new skill (the old `frontend-design` skill is no longer installed/refreshed by harnessed).
|
|
1496
|
+
|
|
1497
|
+
## [4.10.1] - 2026-06-30
|
|
1498
|
+
|
|
1499
|
+
### Fixed
|
|
1500
|
+
|
|
1501
|
+
- **`harnessed setup` force-update robustness** (a real install surfaced 6 of 14 already-installed components failing on the optional force-update pass; the core install — 26 workflows + commands — was unaffected). Learned from comet's idempotent + fail-soft installer:
|
|
1502
|
+
- **Re-runnable git-clone manifests (Fix A).** `gstack` / `frontend-design` / `ui-ux-pro-max` cloned/copied into their final skill dir without removing it first, so a force-update re-run hit `git clone`/`cp` into an existing directory and exited 1. Each manifest now `rm -rf <final-dest>` immediately before writing it.
|
|
1503
|
+
- **Longer install timeout (Fix B).** `DEFAULT_INSTALL_TIMEOUT_MS` 120s → 300s — `npx skills add …` cold-fetch + clone routinely exceeded 120s (the `playwright-test` / `mattpocock-skills` timeouts), matching comet's 300s for npx-based installs.
|
|
1504
|
+
- **Fail-soft "kept-existing" (Fix C).** When a force-update *refresh* of an already-installed component fails but the component is still present (its `idempotent_check` still passes), it is now reported as **`kept-existing`** (warning — prior version retained, re-run later to retry) instead of a red **`failed`**. A genuinely-removed component still reports `failed` (honest, via the presence probe). This turns the alarming "6 failed" into "6 kept existing — still usable", and absorbs upstream drift (e.g. a stale `verify` path) without going red.
|
|
1505
|
+
|
|
1506
|
+
Additive, no schema change. The optional force-update is now idempotent + degrades gracefully; installed users re-run `harnessed setup` to pick it up.
|
|
1507
|
+
|
|
1508
|
+
## [4.10.0] - 2026-06-30
|
|
1509
|
+
|
|
1510
|
+
### Added
|
|
1511
|
+
|
|
1512
|
+
- **Forward continuation — cross-task / cross-phase advance (v12.0).** harnessed's runtime ledger tracked only one workflow invocation's sub-workflows; after a task/phase finished, nothing advanced to the next — continuation was manual re-invocation. New engine, derived (not queued) from `.planning/` disk state:
|
|
1513
|
+
- `deriveNext()` (`src/checkpoint/deriveNext.ts`) + `scanPlanning()` (`src/checkpoint/planningScan.ts`) — a pure resolver over a disk snapshot returns the next unit (`sub` / `task` / `phase` / `blocked` / `done`). Stateless "first-incomplete" pointer: phase complete ⇔ every `NN-*-PLAN.md` has a matching `NN-*-SUMMARY.md` (artifact-derived, naturally skips shipped). Mid-inserted phases (incl. decimals like `16.1`) and resume are picked up automatically — no queue to sync.
|
|
1514
|
+
- `harnessed next` extended (`src/cli/next.ts`) — when the active workflow's subs are all resolved it falls through to the next cross-unit with an exit-code contract (`0` advance · `2` done · `10` blocked · `1` error). Mid-flight sub semantics (`auto|manual|done`) unchanged.
|
|
1515
|
+
- `harnessed advance` (NEW, `src/cli/advance.ts`) — print-only (does not auto-seed or spawn; the main session runs the next `/auto`), with an advance-gate that refuses to step past an incomplete earlier phase (`--force` overrides, recorded), and `--json` for a `while harnessed advance --json; do :; done` driver loop. Gate-reject exits `11`.
|
|
1516
|
+
- Per-turn `NEXT-UNIT:` breadcrumb (`injectState.ts` + `bin/harnessed-inject-state.mjs`, ts↔bin parity) — when a workflow completes, the next-turn injection points at the next phase ("current workflow complete → next is phase N …"), the cross-unit pointer the per-turn channel lacked.
|
|
1517
|
+
|
|
1518
|
+
Design = a 5-repo comparative study (gsd-pi · gsd-core · Trellis · comet · oh-my-pi) — all converge on "derive next from disk SoT, never maintain a queue". harnessed-native scan is the floor; optional `gsd_run query` reuse deferred to a follow-on. Spec: `.planning/specs/2026-06-30-forward-continuation-design.md`. Phase-level advance is the shipped floor; task-level checkbox iteration is supported in the resolver but not yet wired to the CLI surface.
|
|
1519
|
+
|
|
1520
|
+
### Fixed
|
|
1521
|
+
|
|
1522
|
+
- **SKILL.md injected philosophy, not the executable state-machine (issue #2).** Triggering `/auto` (and the other workflows) injected the philosophy-layer `SKILL.md`, whose "How to invoke" was a cross-file pointer to `commands/<name>.md` — so the agent read the philosophy and freestyled, bypassing the engine (no `gates`/`checkpoint`/ledger/evidence-guard). Fix: all 52 SKILL invoke sections now **inline** the deterministic engine sequence (per body type) + an anti-freestyle directive (a Trellis-style positive-invariant test guards drift); and the per-turn breadcrumb gained an `ENGINE:` enforcement line that pulls a started-but-drifting agent back to the state machine. Also **promoted `ship` to an orchestrator** (a documented stage-master that was missing its `role-prompts.yaml` entry, so `commands/ship.md` never generated and its SKILL rendered as a leaf execution body).
|
|
1523
|
+
|
|
1524
|
+
## [4.9.1] - 2026-06-26
|
|
1525
|
+
|
|
1526
|
+
**Fix (issue #1): `/auto` via SKILL.md drove the deprecated `harnessed run` and hung.** When triggered through a `SKILL.md` "How to invoke" section, `/auto` (and the sister stage skills) instructed the agent to Bash-run `harnessed run <name> --task-stdin`. Inside a Claude Code session that path does an in-process nested SDK spawn that cannot acquire an execution/auth context — it silently no-ops then hangs until timeout (the reported `EXIT=124` / 108s). Root cause: the v4.0 migration rewrote the sibling `~/.claude/commands/<name>.md` generator to CC-native orchestration but left all 48 `SKILL.md` invoke sections on the now-CI/headless-only `harnessed run`.
|
|
1527
|
+
|
|
1528
|
+
### Fixed
|
|
1529
|
+
|
|
1530
|
+
- **SKILL.md invoke drift → CC-native.** All 48 `SKILL.md` / `SKILL.zh-Hans.md` "How to invoke" sections now point to the CC-native `/<name>` slash command (`harnessed gates` → `harnessed prompt` → CC-native subagent spawn → `harnessed checkpoint`) instead of `harnessed run`. The rewrite script (`scripts/rewrite-skill-invoke-sections.mjs`) is footgun-anchored, bilingual (en + zh-Hans), heading-variant agnostic, and idempotent. A new `skill-invoke-parity` test is the durable anti-drift guard.
|
|
1531
|
+
- **`harnessed run` runtime hardening** (the retained CI/headless path):
|
|
1532
|
+
- **Fail-fast:** `defaultSpawnDriver` now throws when a sub-workflow returns `failed` / `paused-veto` (was silently discarded → master reported `Complete` with zero work). Parallel sub failures are surfaced instead of swallowed by `allSettled`. This matches the documented "Fail-fast default".
|
|
1533
|
+
- **Nested-CC guard:** invoked from inside an AI-harness session (session-id env set) without a TTY, `harnessed run` now exits non-zero with a pointer to the CC-native `/<name>` command instead of hanging (reuses the `PlatformDescriptor.sessionIdEnv` seam; `HARNESSED_ALLOW_NESTED=1` overrides for CI/e2e).
|
|
1534
|
+
- **Non-interactive guard:** the `--staged` / pre-flight readline prompts return their safe default when there is no TTY, instead of blocking forever.
|
|
1535
|
+
|
|
1536
|
+
Additive + behavior-preserving for the CI/headless path with `HARNESSED_ALLOW_NESTED=1`. 1470 tests at v11.0 → 1535 at this release.
|
|
1537
|
+
|
|
1538
|
+
## [4.9.0] - 2026-06-26
|
|
1539
|
+
|
|
1540
|
+
**v11.0 State Machine Completion** — closes the v5.0 state-machine's deferred Spec 2 + Spec 3 (the only un-shipped tail of the State Machine Core era; Spec 1 shipped in 4.2.0). Three phases (34–36), all additive: no schema bump, the claude default install and the English default path are byte-identical, and a single-session (no session id) run behaves exactly as before. 1446 tests at v10.0 → 1470 at v11.0.
|
|
1541
|
+
|
|
1542
|
+
### Added
|
|
1543
|
+
|
|
1544
|
+
- **Session-scoped workflow state (Phase 34, Spec 2/D)** — two concurrent Claude Code sessions in the same repo now hold independent active-task pointers. The per-repo `workflows.json` store gains a composite key `<repoKey>::<sessionId>` (`activeKey()` in `src/checkpoint/workflowStore.ts`); reads fall back session-key → bare `repoKey` → null so an in-flight single-session workflow stays visible. With no session id the key is the bare `repoKey` (byte-identical to before). `retro_meta` / `learnings` stay repo-keyed.
|
|
1545
|
+
- **Opt-in per-turn injection hook (Phase 35, Spec 3/G)** — `manifests/optional/perturn-inject.yaml` registers a `UserPromptSubmit` hook that runs `bin/harnessed-inject-state.mjs` each turn, injecting the active session's `<workflow-state>` breadcrumb + relevance-filtered `<project-context>`. Opt-in (`harnessed install perturn-inject`); the bin exits 0 silently when there is no workflow.
|
|
1546
|
+
- **Cross-harness session seam (Phase 35)** — new `PlatformDescriptor.sessionIdEnv` field (claude → `CLAUDE_CODE_SESSION_ID`, codex → `null`) resolves the session-id env through the platform descriptor instead of a hardcoded Claude-Code variable. The inject bin is session-aware via the same model (3-tier session → bare → legacy read).
|
|
1547
|
+
- **Scale-adaptive verify strength (Phase 36, Spec 3/H)** — the per-turn breadcrumb now surfaces a `VERIFY-MODE: <light|full> — <directive>` line from the `verify_mode` already computed by `assessScale` and stored on the envelope, mirroring the existing `SHIP-READY` / `RETRO-DUE` advisory lines. Absent `verify_mode` → no line (byte-identical).
|
|
1548
|
+
|
|
1549
|
+
## [4.8.0] - 2026-06-25
|
|
1550
|
+
|
|
1551
|
+
**v10.0 i18n Surface** — extends internationalization from the shipped CLI message layer (`messages/{en,zh-Hans}.json`) to the full skill / workflow / user-facing yaml surface, so Chinese-locale users get 中文 skills, slash-command descriptions, and subagent prompts. Five phases (29–33), all additive: the English default path is byte-identical and the claude default install is unchanged. Notably, Phase 33 also **fixes a pre-existing en-default bug** — English-locale users were receiving Chinese discipline text in spawned-subagent prompts because several discipline yaml were Chinese-authored. 1394 tests at v9.0 → 1446 at v10.0.
|
|
1552
|
+
|
|
1553
|
+
### Added
|
|
1554
|
+
|
|
1555
|
+
- **Locale-aware skill resolve layer (Phase 29)** — the skill render step selects `SKILL.md` vs `SKILL.zh-Hans.md` by resolved locale (reusing the `HARNESSED_LANG` → POSIX → Intl → en chain + `mapToSupported` zh*→zh-Hans), writing a single locale-correct `SKILL.md` to the destination. English default is byte-identical.
|
|
1556
|
+
- **en↔zh-Hans skill sync-guard (Phase 30)** — `scripts/check-skill-i18n-parity.mjs`, a dep-free CI hard-gate enforcing structural parity between every `SKILL.md` and its `SKILL.zh-Hans.md` sibling (frontmatter keys / `{{ capabilities.X }}` placeholders / heading-level shape). drift-only (a missing sibling is OK); runs before `pnpm install`.
|
|
1557
|
+
- **26 translated `SKILL.zh-Hans.md` siblings (Phase 31)** — the skill prompt bodies (~10,132 words) rendered in 简体中文 via parallel translation, structurally parity-checked by the Phase 30 guard. English bodies untouched.
|
|
1558
|
+
- **User-facing yaml i18n (Phase 33)** — `src/i18n/localeYaml.ts` `resolveLocaleYaml(dir, baseName, locale)` serves `<base>.zh-Hans.yaml` siblings under a zh locale (English base otherwise), wired into `loadRolePrompts` (→ `commands/*.md` descriptions + subagent prompts) and `buildDisciplinesSection` (→ `## Disciplines` prompt injection). Ships `role-prompts.zh-Hans.yaml` (24 roles) + 5 discipline zh siblings.
|
|
1559
|
+
- **en↔zh-Hans yaml sync-guard (Phase 33)** — `scripts/check-yaml-i18n-parity.mjs`, a CI hard-gate (post-`pnpm install`, sister to the workflow schema validate) enforcing structural parity of role-prompts + disciplines yaml pairs (top-level keys / role-key + rule-id sets / per-entry field presence). drift-only.
|
|
1560
|
+
|
|
1561
|
+
### Changed
|
|
1562
|
+
|
|
1563
|
+
- **CLI message table at full parity (Phase 32)** — `messages/zh-Hans.json` brought to 94/94 key parity with `en.json`, pinned both-direction by `tests/unit/i18n-parity.test.ts` (16 `uninstall.unified.*` keys added, 2 dead keys removed). English source unchanged.
|
|
1564
|
+
|
|
1565
|
+
### Fixed
|
|
1566
|
+
|
|
1567
|
+
- **en-default discipline language bug (Phase 33)** — English-locale users were receiving Chinese discipline text in spawned-subagent `## Disciplines` prompts because `karpathy` / `output-style` / `priority` / `operational` discipline yaml were Chinese-authored. Their bases are now English; the original Chinese is preserved byte-identically in `<name>.zh-Hans.yaml` siblings (zh users unchanged). `language.yaml` is deliberately untouched — it is never surfaced (filtered from the disciplines section; enforcement hooks read no description text).
|
|
1568
|
+
|
|
1569
|
+
## [4.7.0] - 2026-06-24
|
|
1570
|
+
|
|
1571
|
+
Three bundled milestones reach users in one release: **v8.0 Frictionless Entry** (single-command resume entry + value-prop legibility), **v9.0 Cross-Harness** (platform abstraction + a real Codex second-platform proof), and the **ECC selective assimilation** optional upstream. All additive and backward-compatible — the claude default path is byte-identical (proven by full suites green with existing tests unchanged: 1352 at v8.0 → 1394 at v9.0).
|
|
1572
|
+
|
|
1573
|
+
### Added
|
|
1574
|
+
|
|
1575
|
+
- **Single-command resume entry (v8.0 Phase 24)** — zero-arg `harnessed` now prints a "you-are-here" status digest (current milestone / phase / next action), a comet `/comet` analog. `NEXT: auto|manual|done` surfaces the recommended next step; `--json` emits the machine-readable form for tooling.
|
|
1576
|
+
- **Value-prop & quickstart legibility (v8.0 Phase 25)** — README leads with a 结果导向 (outcome-first) positioning sentence + a "First 5 Minutes" quickstart, so a new reader can tell what harnessed does and get running without spelunking the docs.
|
|
1577
|
+
- **`PlatformDescriptor` + `detectPlatform()` (v9.0 Phase 26/A)** — harnessed's own hardcoded `~/.claude/` layout is abstracted onto an 8-field descriptor + a claude-first detector (override → env → `.platform` pin → auto-probe → claude fallback). `getHarnessedRoot()` routes through it. Zero behavior change — the seam is transparent on the claude incumbent.
|
|
1578
|
+
- **Central config resolvers (v9.0 Phase 27/B)** — 5 resolvers (`getSettingsPath` / `getSkillsDir` / `getCommandsDir` / `getPluginsRegistry` / `getMcpConfigPath`) replace scattered path literals; the 2 near-duplicate env-key settings writers fold behind `settingsWriter.mergeSettingsEnvKey` (262→133 lines). 8 swap sites + 2 idempotent sites routed. Zero behavior change.
|
|
1579
|
+
- **Codex second-platform proof (v9.0 Phase 28/C)** — a real divergent second harness wired as a capability-aware platform: `PlatformDescriptor` gains `pluginsRegistry: string | null` + `supportsEnvKeyWrite`; a verified `codexDescriptor` (settings===mcp at `~/.codex/config.toml` TOML; skills at shared `~/.agents/skills`; commands at `~/.codex/prompts`; no plugin registry); `detectPlatform` 5-level precedence; `harnessed setup --platform codex`. Codex write surfaces are capability-absent (no TOML writer — the CC env keys are CC-specific). claude default byte-identical.
|
|
1580
|
+
- **ECC selective assimilation (ADR-0034)** — ECC (`affaan-m/ECC`) joins as an optional upstream via harnessed's assembly model, A posture (additive-first). New `manifests/optional/ecc.yaml` (cc-plugin-marketplace, pinned, stability=unstable) — opt-in: `harnessed setup` does NOT auto-install ECC (optional/ is not in the base glob; sister codegraph). `workflows/capabilities.yaml` gains Bucket 11: 10 additive entries (domain-pattern starter-set + cost-tracking + hookify-rules) on orthogonal `subtask.domain`/`needs_cost_report`/`needs_hook_authoring` axes. ECC per-language reviewers/build-resolvers fold as verify-dimension aliases under `code-review`/`gsd-debug` (single-fire). ECC's parallel orchestration/review/learning/multi-agent is NOT wired; checkpoint/ledger/compact/learning families are HARD-EXCLUDED (keystone engine collision). Governance: `/plan-eng-review` (5 findings absorbed) + inventory enumeration (246 skills/61 agents) + EE-5 gate. Opt-in: no-op for users without ECC installed.
|
|
1581
|
+
|
|
1582
|
+
## [4.6.0] - 2026-06-14
|
|
1583
|
+
|
|
1584
|
+
Smart reminders (Phase 22): the operating loop now nudges you to ship and to retro at the right moments, surfaced through the existing per-turn inject hook and judged by the AI.
|
|
1585
|
+
|
|
1586
|
+
### Added
|
|
1587
|
+
|
|
1588
|
+
- **Smart reminders (Phase 22)** — two AI-judged nudges surfaced by the G4 per-turn inject hook when a workflow completes. **SHIP-READY**: there are unshipped commits since the last `vX.Y.Z` tag (git-derived, self-heals after a release). **RETRO-DUE**: enough phases have completed since the last retro (per-repo counter; threshold `HARNESSED_RETRO_PHASE_THRESHOLD`, default 5). Both are hints, not gates. New `harnessed retro --done` (27th CLI) resets the retro counter after running `/retro`. Additive-optional schema (no version bump); the inject bin stays git-free + threshold-free (reads booleans only).
|
|
1589
|
+
|
|
1590
|
+
## [4.5.1] - 2026-06-14
|
|
1591
|
+
|
|
1592
|
+
Windows install reliability hotfix (Phase 23). Dogfooding the fresh v4.5.0 `harnessed setup` on Windows surfaced 6 force-update failures: manifests use POSIX shell builtins (`rm`/`cp`/`mkdir`/`test`/`grep`/`|`) but `spawnCmd` routed through `cmd.exe` on Windows. Surgical fix — route only the shell-dependent spawns through Git Bash; npm/npx install paths stay on `cmd.exe`. No behavior change on POSIX.
|
|
1593
|
+
|
|
1594
|
+
### Fixed
|
|
1595
|
+
|
|
1596
|
+
- **POSIX-shell routing on Windows** — `spawnCmd` gains a `posixShell` opt; on win32 it routes `git-clone-with-setup` install + every spawn-based verify cmd through `bash -c` (Git Bash, PATH-resolved). npm/npx/claude/mcp install spawns stay on `cmd.exe` (`.cmd` shims). If `bash` is absent on Windows, a clear `bash-missing` error names Git Bash + git-scm.com instead of an opaque "'rm' is not recognized". POSIX path unchanged (`/bin/sh -c`); the B1 shell-escape gate still runs before every spawn.
|
|
1597
|
+
- **backup EISDIR** — `backup()` records a sentinel entry instead of crashing "illegal operation on a directory, read" when a force-update overwrites an existing skill directory.
|
|
1598
|
+
- **stale setup message** — `setup.bundled_summary` dropped a hardcoded `v3.0` + stale `23 workflows` count (en + zh-Hans); `agent_teams.missing_explanation` dropped `v3.0`.
|
|
1599
|
+
|
|
1600
|
+
### Changed
|
|
1601
|
+
|
|
1602
|
+
- **install timeout 60s → 120s** — `DEFAULT_INSTALL_TIMEOUT_MS` raised for Windows cold npm/npx cache (`npx skills add …`). Verify timeout unchanged.
|
|
1603
|
+
|
|
1604
|
+
## [4.5.0] - 2026-06-14
|
|
1605
|
+
|
|
1606
|
+
v7.0 Gap-Close & Memory Loop (phases 13–19) + follow-ons (update command, ship stage). Closes the highest-value gaps vs comet / Trellis / Claude-Code-Harness: a cross-session learning loop, per-repo workflow isolation, a release stage, and an update flow. Additive except the on-disk workflow store (compat-read migrated). The operating loop is now 5-stage: Discuss → Plan → Build → Verify → Ship → Learn.
|
|
1607
|
+
|
|
1608
|
+
### Added
|
|
1609
|
+
|
|
1610
|
+
- **Learning loop (Phase 16–17)** — completed workflows append failure/loop/reject signals to a git-shareable `.planning/LEARNINGS.md` (`harnessed learn "<lesson>"` for prose); the per-turn G4 hook injects relevance-filtered learnings + the current phase's CONTEXT excerpt (`HARNESSED_INJECT_BUDGET`, default 1500 tokens).
|
|
1611
|
+
- **`harnessed update` (Phase 20)** — self-update (`npm i -g harnessed@latest`) + `--check` + `--upstreams` (re-run base manifests) + `--migration-report` (read-only stale-state inventory). A 14th doctor check surfaces "update available X→Y" (fail-soft).
|
|
1612
|
+
- **Ship stage (Phase 21)** — a 5th workflow stage after Verify. `harnessed release-preflight` is a read-only release-readiness gate (CHANGELOG `[Unreleased]`/version/git-clean/tag-absent); the `/ship` master delegates PR/deploy to gstack `/ship`. Deploy boundary = tag-ready (publish stays in `publish.yml` CI).
|
|
1613
|
+
- **CodeGraph catalog (Phase 18)** — opt-in `manifests/optional/codegraph.yaml` (never in the base profile) + an always-pass doctor detect; CodeGraph self-installs, harnessed only catalogs + detects.
|
|
1614
|
+
- **`harnessed compact` (Phase 14)** — real summarize+evict ledger compaction (G6-safe) + auto-trigger on `checkpoint complete --tokens`.
|
|
1615
|
+
- **`harnessed workflows` (Phase 15)** — list in-flight workflows (one per repo).
|
|
1616
|
+
- **`docs/comparison.md` (Phase 19)** — an honest, snapshot-dated harnessed-vs-comet-vs-Trellis comparison.
|
|
1617
|
+
|
|
1618
|
+
### Changed
|
|
1619
|
+
|
|
1620
|
+
- **Per-repo workflow store (Phase 15, BREAKING on-disk)** — the global singleton `current-workflow.json` is replaced by a per-repo multi-store `workflows.json` keyed by repo-root, so concurrent projects no longer clobber each other's checkpoint state. The 17 call sites and the envelope schema are unchanged (behind-API); a legacy singleton is compat-read migrated with a dual-write rollback window.
|
|
1621
|
+
- **Planning-doc debloat (Phase 13)** — trimmed the metastasized status blockquote and folded PROJECT-SPEC status into STATE.
|
|
1622
|
+
|
|
1623
|
+
### Fixed
|
|
1624
|
+
|
|
1625
|
+
- `release-preflight` recognizes a versioned CHANGELOG section (post-cut), not only `[Unreleased]`.
|
|
1626
|
+
- The G4 inject hook is repo-aware (reads `workflows.json[repoKey(cwd)]`, legacy fallback), fixing the Phase-15 gap where it blindly read the global singleton.
|
|
1627
|
+
|
|
1628
|
+
## [4.4.0] - 2026-06-11
|
|
1629
|
+
|
|
1630
|
+
Doc-Discipline Substrate (v6.0 milestone) — close the two highest-value gaps vs the three-layer-stack methodology: codify the documentation-discipline rules and finish the completion sentinel. Additive only; reuses the existing L0 discipline substrate and the v4.2 checkpoint ledger. No architecture change.
|
|
1631
|
+
|
|
1632
|
+
### Added
|
|
1633
|
+
|
|
1634
|
+
- **`doc-discipline` — 7th L0 discipline** (`workflows/disciplines/doc-discipline.yaml`). Six rules mechanizing the documentation-hygiene norms: `state-digest-line-limit` (**halt** — STATE.md over 100 lines, override via `HARNESSED_ALLOW_LONG_STATE`), `one-fact-per-file`, `overview-pointer-no-inline-narrative`, `transient-consume-then-archive`, `status-derived-from-artifacts` (warn), `responsibility-matrix-one-home` (info). Registered as a behavioral capability; `DEFAULT_APPLIED` now loads 7 disciplines.
|
|
1635
|
+
- **`.planning/` sync sentinel** at `harnessed checkpoint complete`. New pure `checkPlanningSync` (sibling to `checkArtifacts`) layered on the fail-closed evidence guard (ADR-0033): when `.planning/` exists but `STATE.md` is unsynced → completion is **BLOCKED** (exit 1) unless `--force` (records `evidence_status: overridden`). No `.planning/` dir → `none_declared` (non-GSD users unaffected). Reuses the checkpoint ledger; no new state store.
|
|
1636
|
+
|
|
1637
|
+
### Changed
|
|
1638
|
+
|
|
1639
|
+
- `before-commit` enforcement extended with the doc-discipline STATE-line halt (Windows-safe line counting).
|
|
1640
|
+
- `docs/WORKFLOW.md` counts refreshed to current: 24 workflows / 12 judgments / 102 capabilities / 7 L0 disciplines.
|
|
1641
|
+
- CI `publish.yml` now creates a GitHub release (notes from the matching CHANGELOG section) alongside the npm publish.
|
|
1642
|
+
|
|
1643
|
+
## [4.3.0] - 2026-06-10
|
|
1644
|
+
|
|
1645
|
+
Upstream Re-sync (v5.1 milestone) — track upstream drift in the composition registry. Additive config only; no runtime/architecture change.
|
|
1646
|
+
|
|
1647
|
+
### Changed
|
|
1648
|
+
|
|
1649
|
+
- **GSD upstream rename** — `get-shit-done-cc` → `@opengsd/gsd-core` 1.4.1 (repo `open-gsd/gsd-core`, "Get Shit Done" → "Git. Ship. Done."). `manifests/skill-packs/gsd.yaml` install (`npx --yes @opengsd/gsd-core@latest --claude --global`, non-interactive), `npm_version ^1.4.1`, per-skill idempotent path (old single `~/.claude/skills/gsd` dir gone → `gsd-*` per-skill dirs), file-existence verify, official `--uninstall`.
|
|
1650
|
+
- **gstack manifest bump** — `git_ref` → `1626d485` (current `garrytan/gstack` main), `last_known_good_version` `main-269-commits` → `1.52.1.0`. mattpocock manifest `last_check` refresh.
|
|
1651
|
+
- **`gsd-research-phase` → `gsd-explore`** — GSD Core 1.4.1 removed the standalone research-phase skill; remapped the orphan capability to the surviving `gsd-explore`.
|
|
1652
|
+
|
|
1653
|
+
### Added
|
|
1654
|
+
|
|
1655
|
+
- **12 GSD Core capabilities** wired into `workflows/capabilities.yaml` — `gsd-spec-phase` / `gsd-ui-phase` / `gsd-secure-phase` / `gsd-ai-integration-phase` (stage-gap phase skills) + `gsd-ingest-docs` / `gsd-new-project` / `gsd-new-milestone` (bootstrap) + `gsd-extract-learnings` / `gsd-audit-milestone` / `gsd-complete-milestone` / `gsd-milestone-summary` / `gsd-docs-update` (milestone lifecycle).
|
|
1656
|
+
- **`workflows/judgments/stage-phase-gate.yaml`** — 4 stage-gate triggers for the spec/ui/secure/ai-integration design-contract phase skills.
|
|
1657
|
+
- **6 gstack capabilities** — `spec` / `skillify` / `pair-agent` / `scrape` / `benchmark-models` / `landing-report` (non-iOS).
|
|
1658
|
+
|
|
1659
|
+
### Notes
|
|
1660
|
+
|
|
1661
|
+
- **Keystone decision:** execute mechanism stays harnessed self-owned (CC-native spawn + ralph-loop + v4.2 checkpoint ledger). `gsd-execute-phase` deliberately NOT wired (enforced by an automated guard in the capabilities schema check).
|
|
1662
|
+
- `.planning/` migrated to GSD-standard layout (completed-milestone phase dirs → `milestones/<version>-phases/`; active milestone → `.planning/phases/`; `MILESTONES.md` generated).
|
|
1663
|
+
- 1167 tests pass / biome clean / tsc 0.
|
|
1664
|
+
|
|
1665
|
+
## [4.2.0] - 2026-06-05
|
|
1666
|
+
|
|
1667
|
+
Workflow State Machine Core (v5.0 milestone, Spec 1) — absorbs structured-state
|
|
1668
|
+
patterns from Trellis + comet. Additive/non-breaking (semver minor).
|
|
1669
|
+
|
|
1670
|
+
### Added
|
|
1671
|
+
|
|
1672
|
+
- **Structured progress ledger** — `current-workflow.json` carries an optional
|
|
1673
|
+
`sub_progress[]` recording each sub in a master chain (`pending`/`done`/`failed`/
|
|
1674
|
+
`skipped` + `gate_fired` + `evidence`). Seeded from the `gates` plan at
|
|
1675
|
+
`checkpoint start <master> --plan <json>`. Closes the resume-granularity gap (a
|
|
1676
|
+
crash mid-chain now has a structured position, not just a free-text `last_task`).
|
|
1677
|
+
- **`harnessed status --recover`** — structured recovery output after compaction:
|
|
1678
|
+
per-sub status markers, three-state evidence posture, the next pending sub
|
|
1679
|
+
(`→ next: harnessed prompt <sub>`), and sha256 drift warnings. Degrades gracefully
|
|
1680
|
+
on an empty ledger.
|
|
1681
|
+
- **Fail-closed evidence guard** — `checkpoint complete <sub>` verifies the leaf's
|
|
1682
|
+
declared `artifacts_expected` exist (relative to the project cwd) before marking
|
|
1683
|
+
done; a missing artifact blocks completion (exit 1) unless `--force` (recorded as
|
|
1684
|
+
`evidence_status: overridden`). Three-state posture (`verified` / `missing` /
|
|
1685
|
+
`none_declared`) so "nothing declared" never reads as a verified pass. This is a
|
|
1686
|
+
deliberate fail-CLOSED exception to the ADR-0029 gate fail-soft posture (ADR-0033).
|
|
1687
|
+
- **Handoff drift detection** — evidence entries store `{path, sha256}`; `resume`
|
|
1688
|
+
and `status --recover` re-hash and warn on drift (scriptizes the cc-handoff
|
|
1689
|
+
integrity check). Verify-stage leafs backfilled with `artifacts_expected`.
|
|
1690
|
+
- **Deterministic ORCHESTRATOR command body** — generated master command bodies
|
|
1691
|
+
emit the `gates → checkpoint start --plan → per-sub prompt+spawn+complete/fail →
|
|
1692
|
+
status --recover` sequence so the main session drives the state machine without
|
|
1693
|
+
relying on memory.
|
|
1694
|
+
|
|
1695
|
+
### Fixed
|
|
1696
|
+
|
|
1697
|
+
- Workflow status now follows the ledger — `checkpoint complete <sub>` only
|
|
1698
|
+
transitions the whole workflow to `complete` when no sub remains pending
|
|
1699
|
+
(`nextPending === null`); a failed sub never flips it. (Caught by e2e dogfood.)
|
|
1700
|
+
- Path-traversal hardening — `sub`/`name`/`master` CLI args are now `checkPathSafe`
|
|
1701
|
+
guarded before path resolution (`checkpoint`/`run`/`gates`).
|
|
1702
|
+
- Global `unhandledRejection`/`uncaughtException` handler in the CLI entry converts
|
|
1703
|
+
escaped async errors into a clean `error: …` + exit 1 instead of a v8 stack dump.
|
|
1704
|
+
|
|
1705
|
+
### Schema
|
|
1706
|
+
|
|
1707
|
+
- `currentWorkflow.v1` gains optional `sub_progress` / `EvidenceRef` — additive,
|
|
1708
|
+
no `schemaVersion` bump; pre-v4.2 state files validate unchanged. `checkpoint.v1`
|
|
1709
|
+
is unchanged (ledger is single-SoT in `current-workflow.json`).
|
|
1710
|
+
|
|
1711
|
+
## [4.1.3] - 2026-06-04
|
|
1712
|
+
|
|
1713
|
+
P0 data-loss fixes from the pre-v4.0 code review (6 parallel reviewers over ~120 src files).
|
|
1714
|
+
|
|
1715
|
+
### Fixed
|
|
1716
|
+
|
|
1717
|
+
- **`harnessed gc` default deleted nothing.** `dirs.slice(-keepLast)` with the default `keepLast=0` → `slice(-0)` returns the WHOLE array (JS `-0===0`), protecting every snapshot, so the advertised disk-fill mitigation was a silent no-op. Guarded: `keepLast > 0 ? dirs.slice(-keepLast) : []`. (e2e verified: default gc now deletes aged snapshots)
|
|
1718
|
+
- **`harnessed rollback` half-restore data loss.** The restore loop verified+wrote one file at a time; a sha1 mismatch or unreadable backup at file N left files 1..N-1 already overwritten with no rollback-of-rollback. Now two-pass: read + sha1-verify EVERY backup into memory first, abort before touching any target, then apply all.
|
|
1719
|
+
- **Checkpoint / state / archive writes were non-atomic.** `writeFile`/`writeFileSync` directly over the live file → a crash mid-write corrupts `current-workflow.json` (the resume-critical SoT singleton) or a checkpoint envelope. New `src/checkpoint/atomicWrite.ts` (`writeFileAtomic` + `writeFileSyncAtomic`) writes to `<path>.tmp` then `rename` (atomic on same fs); wired into `state.ts`, `template.ts`, `archive.ts`. (unit tests + 5 fs-mock test files updated for the rename step)
|
|
1720
|
+
|
|
1721
|
+
### Review findings deferred (not data-loss; threat-model-gated)
|
|
1722
|
+
|
|
1723
|
+
The review also surfaced shell-injection/security findings in `security.ts`/`spawn.ts`/`path-guard.ts` (incomplete shell-metachar blocklist, unscreened `install.env` + `cc-hook-add hook_command`) and concurrency hazards in `sigintTrap.ts`/`before-commit.ts`. These are gated by the trust model (manifests are repo-controlled, not end-user input) — not active exploits — and are tracked for a dedicated hardening pass. See `.planning/` review notes.
|
|
1724
|
+
|
|
1725
|
+
1107 tests pass / biome clean / tsc 0 errors.
|
|
1726
|
+
|
|
1727
|
+
## [4.1.2] - 2026-06-04
|
|
1728
|
+
|
|
1729
|
+
Code-review + code-simplifier pass on the v4.0/v4.1 orchestration-brain CLIs.
|
|
1730
|
+
|
|
1731
|
+
### Fixed
|
|
1732
|
+
|
|
1733
|
+
- **BLOCKER — gates→prompt name handoff was broken for every stage master.** `harnessed gates <stage>` emitted *bare* `delegates_to[].sub` names (`code`, `strategic`), but `role-prompts.yaml` / `resolveWorkflowYaml` tier-3 / `defaults.yaml` are keyed by the *flattened* `<stage>-<sub>` name (`task-code`, `discuss-strategic`). So `harnessed prompt code` missed the role prompt → generic fallback body with **no tools, no disciplines, wrong max-iterations** — silently defeating the entire v4.1 SoT-injection. `gates` now emits the flattened name for stage-master leaf subs (`auto`'s top-level delegates stay bare). (4 tests + e2e)
|
|
1734
|
+
- **MEDIUM — `--context` shallow-merge clobbered nested defaults.** `Object.assign(ctx, extra)` wiped all 15 `phase.*` / 17 `subtask.*` defaults when a caller passed a partial `{phase:{x:true}}` → undefined vars → every gate threw → fail-soft fired ALL subs. Now deep-merges `phase`/`subtask`. (unit + cli tests)
|
|
1735
|
+
- **MEDIUM — parallelism gate was un-evaluable.** `agent-teams-upgrade.fires` references 5 team-routing facts (`teammate_send_message_needed`, etc.) absent from the default context → expr-eval threw on every eval → `escalate_to_teams` hard-false. Added the 5 facts (default false) so the gate is reachable.
|
|
1736
|
+
|
|
1737
|
+
### Changed (simplification)
|
|
1738
|
+
|
|
1739
|
+
- Extracted the duplicated ~40-line default gate context (verbatim copy across `gates.ts` + `run.ts`) into `src/cli/lib/gateContext.ts` (`buildDefaultGateContext` + `mergeGateContext`) — single SoT, kills drift.
|
|
1740
|
+
- Extracted the shared `resolve→read→parse` preamble of `buildToolsSection`/`buildDisciplinesSection` into `loadSubArrayField`.
|
|
1741
|
+
- Widened `HARNESSED_MARKER_RX` to digit-loose `v\d+\.\d+\.\d+` so a future major marker bump stays self-overwriting (was pinned to `v3.4.x`).
|
|
1742
|
+
- Refreshed stale v3.4.4 / `harnessed run` comments in `generateCommands.ts` to v4.0/v4.1 semantics; dropped dead `return` + redundant `undefined` args in `prompt.ts`.
|
|
1743
|
+
|
|
1744
|
+
### Deferred
|
|
1745
|
+
|
|
1746
|
+
5-arg `generateCommandFile` unused params (`_capabilities` / `_installedPlugins` / `_installedUserSkills`) — removal is a breaking signature change across ~30 test cells + setup.ts; left for a dedicated cleanup.
|
|
1747
|
+
|
|
1748
|
+
Re-run `harnessed setup`. 1107 tests pass / biome clean / tsc 0 errors.
|
|
1749
|
+
|
|
1750
|
+
## [4.1.1] - 2026-05-30
|
|
1751
|
+
|
|
1752
|
+
### Fixed
|
|
1753
|
+
|
|
1754
|
+
- **Same flatten bug as v4.1.0 tools, second dimension: `disciplines_applied` was never injected into the spawn prompt.** Every `workflow.yaml` declares `disciplines_applied: [karpathy, output-style, language, operational, priority, protocols]`, but v4.0 `harnessed prompt` dropped all of them — so spawned subagents ignored ≤200 LOC / surgical changes / simplicity-first (karpathy), BLUF / no-emoji / no-em-dash (output-style), biome-preempt / commit-safety / A7 (operational), skill-conflict arbitration (priority), and cc-handoff self-contained (protocols).
|
|
1755
|
+
- `harnessed prompt` now reads `disciplines_applied[]` → each `disciplines/<name>.yaml` rule list → emits a compact `## Disciplines (always-on — L0 substrate)` block. `language` is skipped (handled by the env-driven `## Language` section). Fail-soft → empty. (4 tests)
|
|
1756
|
+
|
|
1757
|
+
### Audit
|
|
1758
|
+
|
|
1759
|
+
Full SoT-injection audit confirmed the remaining dimensions are covered: per-phase conditional `invokes_tools` (zoom-out / improve-arch / diagnose) are already in the role-prompt checklists; `injects_rules` flows via `buildAgentDef` criticalReminder; `model` / `max_iterations` flow via `--json`. tools_available (v4.1.0) + disciplines_applied (v4.1.1) were the two flatten misses.
|
|
1760
|
+
|
|
1761
|
+
Re-run `harnessed setup`. 1099 tests pass / biome clean / tsc 0 errors.
|
|
1762
|
+
|
|
1763
|
+
## [4.1.0] - 2026-05-30
|
|
1764
|
+
|
|
1765
|
+
### Fixed
|
|
1766
|
+
|
|
1767
|
+
- **v4.0 flattened the yaml SoT — spawned subagents skipped GSD docs + planning-with-files.** `harnessed prompt` only emitted the role-prompt's soft prose ("persist via planning-with-files"), never the actual upstream tools, so CC improvised a lightweight `task_plan.md` instead of invoking `/gsd-plan-phase` + `/plan` and producing GSD-format artifacts.
|
|
1768
|
+
- **`harnessed prompt` (Part A)** now reads the sub's `workflow.yaml` `tools_available[]`, maps each to its `capabilities.yaml` `cmd`, and injects a mandatory `## Tools — invoke these (not optional)` block (e.g. `Invoke /gsd-plan-phase`, `Invoke /plan` → persist `PLAN.md` / `task_plan.md`). Fail-soft: unknown sub → no block. (4 tests)
|
|
1769
|
+
- **`/auto` master-recursion gap (Part B)** — `/auto`'s fired subs are stage **masters** (plan/task/verify), but the command body did `harnessed prompt plan` → a vague dispatcher prompt. `harnessed gates` now tags each fire entry with `is_master: true` for stage masters; the ORCHESTRATOR command body recurses (`harnessed gates <sub>` → orchestrate ITS subs) instead of prompt+spawning a master. Leaf subs still spawn. (2 gates + 1 body test)
|
|
1770
|
+
|
|
1771
|
+
### Migration
|
|
1772
|
+
|
|
1773
|
+
Re-run `harnessed setup` to regenerate `~/.claude/commands/*.md` with the recursion branch. 1095 tests pass / biome clean / tsc 0 errors.
|
|
1774
|
+
|
|
1775
|
+
## [4.0.1] - 2026-05-30
|
|
1776
|
+
|
|
1777
|
+
### Fixed
|
|
1778
|
+
|
|
1779
|
+
- **Language discipline lost in v4.0** — `HARNESSED_USER_LANG` (set by setup) was only written to settings.json, never injected into the v4.0 spawn path, so CC-native subagents (and the main session) defaulted to English even when the user configured `zh-Hans`.
|
|
1780
|
+
- `harnessed prompt` now appends a `## Language` section read from `env.HARNESSED_USER_LANG` (zh-Hans → 简体中文, etc.) with the 8-category English-preserve note. Unset → no section (mirror user input). (4 tests)
|
|
1781
|
+
- Generated command bodies (INTERACTIVE / ORCHESTRATOR / EXECUTION) now carry a `HARNESSED_USER_LANG` language directive so the CC main session narrates + clarifies in the configured language. (1 test)
|
|
1782
|
+
- Re-run `harnessed setup` to regenerate command files with the directive.
|
|
1783
|
+
|
|
1784
|
+
## [4.0.0] - 2026-05-30
|
|
1785
|
+
|
|
1786
|
+
### BREAKING
|
|
1787
|
+
|
|
1788
|
+
harnessed shifts from **execution engine** to **orchestration brain + prompt library**. Slash commands no longer pipe to `harnessed run` (in-process SDK spawn that blocked the session, bypassed CC-native Agent Teams, and could not do clarification round-trips). The CC main session now orchestrates CC-native subagent spawns using three new秒级 CLIs.
|
|
1789
|
+
|
|
1790
|
+
**Migration**: re-run `harnessed setup` after upgrading — it regenerates `~/.claude/commands/*.md` with the new orchestration bodies. User-authored command files (no harnessed marker) are preserved.
|
|
1791
|
+
|
|
1792
|
+
### Added
|
|
1793
|
+
|
|
1794
|
+
- `harnessed gates <master> [--task] [--skip-sub] [--context]` — evaluates which sub-workflows fire for a master stage. Outputs JSON `{fire, skip, parallelism}`. Reuses `resolveJudgmentGate` + master gate-eval loop, no spawn. Fail-soft fires=true on eval error (ADR 0029). `parallelism.escalate_to_teams` from `judgments.parallelism-gate.agent-teams-upgrade.fires`.
|
|
1795
|
+
- `harnessed prompt <sub> [--task] [--json]` — outputs a spawn-ready prompt (role + checklist + disciplines + task) with **COMPLETE** and **NEEDS_CLARIFICATION** protocols appended. Reuses `buildAgentDef` + `loadRolePrompts`.
|
|
1796
|
+
- `harnessed checkpoint <start|complete|fail> <sub> [--summary]` — records sub progress to `~/.claude/harnessed/checkpoints/`. Reuses `activatePhase`/`completePhase`.
|
|
1797
|
+
- `harnessed run --skip-sub <names>` flag (CI-mode parity with the orchestration path).
|
|
1798
|
+
|
|
1799
|
+
### Changed
|
|
1800
|
+
|
|
1801
|
+
- **Command body templates** (`generateCommands.ts`) rewritten into 3 types:
|
|
1802
|
+
- **INTERACTIVE** (discuss + discuss-* + task-clarify): main-session dialogue via AskUserQuestion, never spawn.
|
|
1803
|
+
- **ORCHESTRATOR** (auto / plan / task / verify): clarify in main session → `harnessed gates` → per fired sub `harnessed prompt` → CC-native Task spawn wrapped in ralph-loop → NEEDS_CLARIFICATION round-trip (AskUserQuestion → re-spawn) → `harnessed checkpoint`. `parallelism.escalate_to_teams` → CC-native Agent Teams.
|
|
1804
|
+
- **EXECUTION** (other subs): single `harnessed prompt` → native spawn → round-trip → checkpoint.
|
|
1805
|
+
- `harnessed run` retained but documented as **CI/headless-only** (header + `--description` + README ×10 + WORKFLOW.md).
|
|
1806
|
+
- `masterOrchestrator.ts` gate eval: `skip_subs` pre-gate filter (subs done interactively in main session skip without eval).
|
|
1807
|
+
|
|
1808
|
+
### Docs
|
|
1809
|
+
|
|
1810
|
+
- README ×10 (en + 9 langs): v4.0 orchestration-brain note + 3 new CLI rows.
|
|
1811
|
+
- `docs/WORKFLOW.md`: new §1.5 Execution Model (mermaid flow + CLI/body-type tables + Why); old run-based prose annotated superseded; yaml SoT (§2-8) unchanged. 425→505 lines.
|
|
1812
|
+
|
|
1813
|
+
### Tests
|
|
1814
|
+
|
|
1815
|
+
- W1 new CLIs: gates (11) + prompt (8) + checkpoint (7) = 26 tests.
|
|
1816
|
+
- W2 generate-commands cells 4-7/13/21-29 rewritten for v4.0 bodies.
|
|
1817
|
+
- 1083 tests pass / biome clean / tsc 0 errors.
|
|
1818
|
+
|
|
1819
|
+
## [3.9.10] - 2026-05-26
|
|
1820
|
+
|
|
1821
|
+
### Changed
|
|
1822
|
+
|
|
1823
|
+
- **Removed anthropics-skills-pptx / anthropics-skills-slide-deck manifests** — these are unrelated to harnessed (user has them installed separately). Removed manifest files + test references + routing rules.
|
|
1824
|
+
|
|
1825
|
+
- **idempotent detection improvements**:
|
|
1826
|
+
- `npx-skill-installer` now checks both `~/.claude/skills/` and `~/.agents/skills/` (skills CLI `--copy --global` default path)
|
|
1827
|
+
- Supplementary `isPluginRegistered()` check for ALL install methods (catches components installed both as plugins AND via other methods, e.g. ctx7 = context7@claude-plugins-official)
|
|
1828
|
+
- Name alias: ctx7 manifest also probes `context7` in plugin registry
|
|
1829
|
+
|
|
1830
|
+
- **Simplified setup output** — English-only, shorter messages, less verbose summary. Removed Chinese text, emoji, and unnecessary detail from setup output strings.
|
|
1831
|
+
|
|
1832
|
+
- **mattpocock-skills manifest** — updated `idempotent_check` to cover both `~/.claude/skills/` and `~/.agents/skills/` paths.
|
|
1833
|
+
|
|
1834
|
+
- **decision_rules.yaml** — removed pptx-file-task rule (dead reference after manifest deletion).
|
|
1835
|
+
|
|
1836
|
+
### Tests
|
|
1837
|
+
|
|
1838
|
+
- Updated assertions to match new i18n strings
|
|
1839
|
+
- Removed anthropics-skills references from test fixtures
|
|
1840
|
+
- 1123 pass / 0 fail
|
|
1841
|
+
|
|
1842
|
+
## [3.9.9] - 2026-05-26
|
|
1843
|
+
|
|
1844
|
+
### Fixed
|
|
1845
|
+
|
|
1846
|
+
Dogfood regression caught in v3.9.8 `harnessed setup` output: 10 of 15 Step B components showed wrong status (5 "installed" that were already installed, 4 "failed" that were already installed, 1 "skipped" that was already installed).
|
|
1847
|
+
|
|
1848
|
+
- **idempotent detection broken on Windows** — `isAlreadyInstalled()` spawned the manifest's `idempotent_check` shell command via `spawnCmd`, which on Windows routes through `cmd.exe /c`. `cmd.exe` does NOT understand `/plugin list` (CC slash command), `test`, `grep -q`, etc. — causing ALL idempotent probes to silently fail (exit 1), the installer to run the full install flow, and already-installed components to report as "[B] installed" or "[B] failed". **Fix**: `isAlreadyInstalled()` now uses native Node.js detection per install method BEFORE falling back to shell spawn:
|
|
1849
|
+
- `cc-plugin-marketplace` → `isPluginRegistered()` (reads `installed_plugins.json`)
|
|
1850
|
+
- `npx-skill-installer` → `fs.access()` on `~/.claude/skills/<name>/SKILL.md`
|
|
1851
|
+
- `git-clone-with-setup` → `fs.access()` on cloned target directory
|
|
1852
|
+
- `npm-cli` → `fs.access()` on `~/.claude/skills/<name>/`
|
|
1853
|
+
- Shell `idempotent_check` spawn retained as fallback for edge cases
|
|
1854
|
+
|
|
1855
|
+
- **superpowers timeout (15s)** — `ccPluginMarketplace.ts` called `runArgs()` with default 15s timeout for `claude plugin install`. Cold-start exceeds 15s on Windows (sister mcpStdioAdd v3.0.3 same fix was never ported). **Fix**: install step now passes explicit 60s timeout.
|
|
1856
|
+
|
|
1857
|
+
- **mattpocock-skills manifest** — `cmd` was missing `--copy` and `--global` flags required by `npxSkillInstaller` D2.1-5 (Windows symlink-safe + user-scope install). **Fix**: added `--copy --global` to manifest cmd.
|
|
1858
|
+
|
|
1859
|
+
- **`skills@latest` prohibition removed** — `npxSkillInstaller` preflight forbade `@latest` in `skills@<version>` per ADR 0001 reproducibility, but user instruction: "写死版本是不对的". Version pinning belongs in ADR/lockfile layer, not per-manifest cmd strings. **Fix**: removed the `skills-pin-required` preflight check. `@latest` is now accepted; `@1.5.7` and other pinned versions continue to work.
|
|
1860
|
+
|
|
1861
|
+
- **mattpocock-skills doctor hint** — `check-mattpocock-skills.ts` used `skills@latest` (no change needed — already matched manifest after `@latest` restoration).
|
|
1862
|
+
|
|
1863
|
+
### Tests
|
|
1864
|
+
|
|
1865
|
+
- Updated `D2.1-5 @latest forbidden` test → `@latest allowed` (verifies installer proceeds past preflight with `skills@latest`)
|
|
1866
|
+
- 1125 pass / 5 skipped / 1 todo (unchanged baseline)
|
|
1867
|
+
|
|
1868
|
+
## [3.9.8] - 2026-05-26
|
|
1869
|
+
|
|
1870
|
+
### Fixed
|
|
1871
|
+
|
|
1872
|
+
Systematic root-cause audit of 5 dogfood failure categories surfaced in `harnessed setup` Step B output (`fix(setup): v3.9.7` dogfood):
|
|
1873
|
+
|
|
1874
|
+
- **Cat A** — Plugin verify false-negative (ralph-loop / superpowers / planning-with-files). `isPluginRegistered` read `~/.claude.json.enabledPlugins` but Claude Code v2.1.133+ writes to `~/.claude/plugins/installed_plugins.json` (v2 schema `{ plugins: { "<name>@<marketplace>": [...] } }`). Three plugins reported failed verify despite `claude plugin list` showing them registered. **Fix**: `isPluginRegistered` now reads 3 sources in order: `installed_plugins.json` (primary, v2 schema) → `~/.claude/settings.json.enabledPlugins` → `~/.claude.json.enabledPlugins` (legacy/test compat).
|
|
1875
|
+
|
|
1876
|
+
- **Cat C** — Windows tilde `~` not expanded by `cmd.exe` (frontend-design "Permission denied" creating `~/.claude/skills/.cache/anthropics-skills-fe`). POSIX `/bin/sh` expands `~` natively; `cmd.exe /c <cmd>` treats `~` as a literal character → `mkdir` writes to relative-path `~/.claude/...` and fails. Affects all first-time installs of manifests using `~/` in install.cmd on Windows. **Fix**: `spawn.ts` pre-expands `~/` token (at start of string OR after whitespace/quote/paren) → `os.homedir()/` before `spawn('cmd.exe', ['/c', cmd, ...])`. Forward-slash homedir form (Windows tools accept both `/` and `\`).
|
|
1877
|
+
|
|
1878
|
+
- **Cat D** — 2 manifest content bugs that caused Step B to fail every run:
|
|
1879
|
+
- **karpathy-skills**: `install.method: git-clone-with-setup` but `install.cmd` was a migration script (`if [ -f ~/.claude/CLAUDE.md ]; then ...`) — gitCloneWithSetup installer rejected it as unparseable. Actual install path is `claude plugin install andrej-karpathy-skills@karpathy-skills` (verified via `claude plugin list`). **Fix**: manifest rewritten to `method: cc-plugin-marketplace` + sister ralph-loop / planning-with-files pattern.
|
|
1880
|
+
- **mattpocock-skills**: `cmd: "npx --yes skills@latest add mattpocock/skills"` — `@latest` rejected by `npxSkillInstaller` per ADR 0001 reproducibility (pinned version required). **Fix**: pinned to `skills@1.5.7` (current latest per npm registry).
|
|
1881
|
+
|
|
1882
|
+
- **Cat E** — `[B] skipped <name>` line had no reason (ctx7 skipped, user couldn't tell if expected). `StepBResult.skipped: string[]` → `{ name, reason }[]`; setup print now reads `[B] skipped <name> — <reason>` (e.g. `level-flag-missing: npm-cli L4 requires --system`). i18n wording also clarified.
|
|
1883
|
+
|
|
1884
|
+
- **Cat G** — MCP installers (mcpStdioAdd / mcpHttpAdd) rendered diff preview + ran `spawn('claude', ['mcp', 'add', ...])` even when server was already registered. User dogfood: "如果都已经安装了,为什么要修改". Pre-v3.9.8 relied on `claude mcp add` self-detecting "already exists" via stderr — but the diff render + spawn ran first, confusing users into thinking config would be overwritten. **Fix**: MCP installers now pre-probe `idempotent_check` (read-only, e.g. `claude mcp list | grep -q tavily-mcp`) AFTER preflight; if probe exits 0 → return `alreadyInstalled` immediately, skipping diff + spawn entirely. MCP variant ALWAYS honors user config (ignores `opts.updateInstalled` via new `isAlreadyInstalled(ctx, { honorUpdateFlag: false })` overload) — force-update flag never re-modifies `~/.claude.json.mcpServers` (sister v3.9.6 user concern: protect hand-tuned entries).
|
|
1885
|
+
|
|
1886
|
+
### Deferred (Cat B + Cat F)
|
|
1887
|
+
|
|
1888
|
+
- **Cat B** — `anthropics-skills-pptx` / `anthropics-skills-slide-deck` exit 1 with empty stderr. `npx skills@1.5.7 add anthropics/skills/pptx` sub-path syntax unverified upstream; may require git-clone fallback instead of skills CLI. Investigate empirically; manifests left as-is for now.
|
|
1889
|
+
- **Cat F** — `auto-install` dispatcher (v3.9.0 P4) redundancy with Step B. With Cat A + Cat G fixes, doctor checks now report `pass` correctly for installed items → dispatcher auto-skips. Keep dispatcher (harmless no-op when Step B covers).
|
|
1890
|
+
|
|
1891
|
+
### Tests
|
|
1892
|
+
|
|
1893
|
+
- 3 test files gained `vi.mock('../../src/installers/lib/idempotent.js')` returning `isAlreadyInstalled: false` so install-path is exercised end-to-end (probe would otherwise short-circuit via mocked spawn returning exit 0).
|
|
1894
|
+
- 2 karpathy assertion sentinels updated to reflect new `cc-plugin-marketplace` method.
|
|
1895
|
+
- 1125 pass / 5 skipped / 1 todo (unchanged baseline).
|
|
1896
|
+
|
|
1897
|
+
## [3.9.7] - 2026-05-26
|
|
1898
|
+
|
|
1899
|
+
### Fixed
|
|
1900
|
+
|
|
1901
|
+
- **`--update-installed` prompt UX — wrong position in setup flow**: v3.9.6 placed the "Update already-installed third-party plugins?" Clack prompt **before** Step B ran, so the user was asked to commit to force-update without seeing the concrete already-installed list. User dogfood feedback: "force update的流程位置错了, 他应该在我们目前setup出汇总结果的最后一步, 你现在在前面客户根本不之道你要强制更新哪些".
|
|
1902
|
+
- **Fix**: prompt moved to AFTER Step B summary (`src/cli/setup.ts`). Flow now:
|
|
1903
|
+
1. Step B first pass with default `updateInstalled=false` (idempotent_check probes short-circuit already-installed entries)
|
|
1904
|
+
2. Summary line + `[B] already-installed <name>` list printed
|
|
1905
|
+
3. If `alreadyInstalled.length > 0` AND TTY interactive AND `--update-installed` flag absent → prompt: `"Update N already-installed plugin(s) listed above?"` — user sees concrete list before deciding
|
|
1906
|
+
4. If user confirms → second pass with `updateInstalled=true` (forces re-install). Output uses `[B*]` prefix to distinguish from first pass.
|
|
1907
|
+
- **CLI flag preserved**: `harnessed setup --update-installed` still works for non-interactive / CI use — forces from first pass, skips prompt entirely.
|
|
1908
|
+
|
|
1909
|
+
### Behavior change
|
|
1910
|
+
|
|
1911
|
+
Before v3.9.7:
|
|
1912
|
+
```
|
|
1913
|
+
$ harnessed setup
|
|
1914
|
+
... (Steps A / A.5 / A.6 / C / D) ...
|
|
1915
|
+
? Update already-installed third-party plugins? [y/N] ← prompt BEFORE Step B (user blind)
|
|
1916
|
+
... (Step B runs) ...
|
|
1917
|
+
Step B complete: 1 installed / 13 already-installed / 0 skipped / 0 failed
|
|
1918
|
+
[B] already-installed gsd / chrome-devtools-mcp / ... 13 lines
|
|
1919
|
+
```
|
|
1920
|
+
|
|
1921
|
+
After v3.9.7:
|
|
1922
|
+
```
|
|
1923
|
+
$ harnessed setup
|
|
1924
|
+
... (Steps A / A.5 / A.6 / C / D) ...
|
|
1925
|
+
... (Step B first pass runs) ...
|
|
1926
|
+
Step B complete: 1 installed / 13 already-installed / 0 skipped / 0 failed
|
|
1927
|
+
[B] already-installed gsd / chrome-devtools-mcp / ... 13 lines
|
|
1928
|
+
? Update 13 already-installed plugin(s) listed above? (MCP servers excluded) [y/N] ← prompt AFTER summary
|
|
1929
|
+
→ No (default): setup continues
|
|
1930
|
+
→ Yes: second pass with force-update
|
|
1931
|
+
Force-update pass complete: N installed / M still-already-installed (MCP) / ...
|
|
1932
|
+
[B*] installed gsd / ralph-loop / ... (non-MCP forced)
|
|
1933
|
+
[B*] already-installed chrome-devtools-mcp / exa-mcp / tavily-mcp (MCP / no force-update)
|
|
1934
|
+
```
|
|
1935
|
+
|
|
1936
|
+
### Tests
|
|
1937
|
+
|
|
1938
|
+
No test changes — flow change is interactive UX only. Total: 1125 pass (unchanged).
|
|
1939
|
+
|
|
1940
|
+
## [3.9.6] - 2026-05-25
|
|
1941
|
+
|
|
1942
|
+
### Fixed
|
|
1943
|
+
|
|
1944
|
+
- **gsd (npm-cli installer) reinstalled every `harnessed setup` run**: Only `mcpStdioAdd` implemented idempotent handling (via stderr `"already exists"` string match). The other 5 installers — `npmCli` / `npxSkillInstaller` / `gitCloneWithSetup` / `ccPluginMarketplace` / `mcpHttpAdd` — ran their install commands unconditionally, ignoring the `spec.install.idempotent_check` field declared in every manifest. gsd dogfood symptom: `[B] installed gsd` every run, even when `~/.claude/skills/gsd` was already present.
|
|
1945
|
+
- **Fix**: new shared helper `src/installers/lib/idempotent.ts` (`isAlreadyInstalled(ctx)`) runs the manifest's `idempotent_check` shell command as a pre-install probe; exit 0 → return `{ ok: true, alreadyInstalled: true }`. Wired into 4 non-MCP installers (`npmCli` / `npxSkillInstaller` / `gitCloneWithSetup` / `ccPluginMarketplace`) immediately after `preflight`. MCP installers (`mcpStdioAdd` / `mcpHttpAdd`) keep their existing stderr-match idempotent path — they also avoid re-running `claude mcp add` to prevent overwriting user-tuned config.
|
|
1946
|
+
|
|
1947
|
+
### Added
|
|
1948
|
+
|
|
1949
|
+
- **`--update-installed` flag + interactive prompt**: opt-in force re-install for already-installed third-party plugins. CLI flag `harnessed setup --update-installed` (non-interactive / CI use); when TTY interactive and flag absent, a Clack `confirm()` prompt asks "Update already-installed third-party plugins? (excludes MCP servers)" — default No. User dogfood request: "对已安装的执行一遍正常的安装操作 ... mcp 不知道要不要这么做,因为修改配置可能造成用户已配置好的mcp不可用". MCP scope honored unconditionally — `updateInstalled` bypass is ignored by `mcpStdioAdd` / `mcpHttpAdd`; existing mcpServers entries are never overwritten by force-update.
|
|
1950
|
+
- **`InstallOpts.updateInstalled?: boolean`** field added to `src/installers/lib/types.ts` — plumbed through `runStepBInstall(paths, { updateInstalled })` to all installers via `InstallContext.opts`.
|
|
1951
|
+
|
|
1952
|
+
### Tests
|
|
1953
|
+
|
|
1954
|
+
- All 13 installer test files updated to include `updateInstalled: true` in their `InstallOpts` literals — preserves pre-v3.9.6 test semantics (verify install spawn behavior on the install path; idempotent skip behavior tested separately via the new fixture is left as v3.10+ follow-up).
|
|
1955
|
+
- Total: 1125 pass (unchanged baseline; idempotent helper additive).
|
|
1956
|
+
|
|
1957
|
+
### Behavior change summary
|
|
1958
|
+
|
|
1959
|
+
Before v3.9.6:
|
|
1960
|
+
```
|
|
1961
|
+
[B] installed gsd # every run, even if already at ~/.claude/skills/gsd
|
|
1962
|
+
[B] already-installed chrome-devtools-mcp / exa-mcp / tavily-mcp # only via mcpStdioAdd stderr match
|
|
1963
|
+
```
|
|
1964
|
+
|
|
1965
|
+
After v3.9.6:
|
|
1966
|
+
```
|
|
1967
|
+
[B] already-installed gsd # idempotent_check pre-probe
|
|
1968
|
+
[B] already-installed chrome-devtools-mcp / exa-mcp / tavily-mcp
|
|
1969
|
+
prompt: Update already-installed third-party plugins? [y/N] # interactive default No
|
|
1970
|
+
```
|
|
1971
|
+
|
|
1972
|
+
## [3.9.5] - 2026-05-25
|
|
1973
|
+
|
|
1974
|
+
### Fixed
|
|
1975
|
+
|
|
1976
|
+
3 inter-related bugs surfaced during v3.9.4 dogfood:
|
|
1977
|
+
|
|
1978
|
+
- **Bug A: Step B falsely reports 12+ manifests as "skipped"**. `install-base.ts:26-31` + `setup-helpers.ts:22-27` carried a hardcoded `PHASE_21` set marking 4 install methods (`cc-plugin-marketplace` / `git-clone-with-setup` / `npx-skill-installer` / `mcp-http-add`) as "deferred phase 2.1" — short-circuiting them as skipped before any installer ran. But `src/installers/index.ts:L1-2` notes "All 6 methods are now runtime-ready" — the deferred set was v1.0.2 placeholder code that was never cleaned up. User dogfood: `ralph-loop` / `superpowers` / `gstack` / `karpathy-skills` / `ui-ux-pro-max` / `frontend-design` / `mattpocock-skills` / `planning-with-files` / `anthropics-skills-*` / `playwright-test` all reported as "skipped" when in fact they were either already installed (most cases) or perfectly installable through the runtime-ready dispatchers.
|
|
1979
|
+
- **Fix A**: removed `PHASE_21` set from both `install-base.ts` and `setup-helpers.ts`. All manifests now run through `runInstall(manifest, opts)` which dispatches by method; each installer's own `idempotent_check` (declared verbatim in each manifest yaml) decides already-installed vs install-now. i18n `step_b_complete` wording updated: `"skipped (deferred installer methods awaiting phase 2.1)"` → `"skipped (user-aborted prompt)"` — accurate semantics of what skipped now means.
|
|
1980
|
+
|
|
1981
|
+
- **Bug B: auto-install prompts only mattpocock-skills, ignores other missing plugins**. Side effect of Bug A — Step B was reporting most plugins as skipped, doctor checks didn't cover them, so auto-install dispatcher had nothing to prompt. With Bug A fixed, Step B now installs (or detects already-installed) all manifests directly; auto-install dispatcher no longer needs to re-prompt for the same items.
|
|
1982
|
+
|
|
1983
|
+
- **Bug C: 3 MCP servers reported already-installed by Step B, but doctor still prompts to install**. `check-mcp-availability.ts` was reading `~/.claude/settings.json` mcpServers — wrong file. Step B `mcpStdioAdd` writes to `~/.claude.json` (user-scope, sister `--scope user` per src/installers/ccPluginMarketplace.ts L4-5). Additionally, `TARGET_SERVERS` names were drifting across releases (v3.6.0 `tavily-mcp`/`exa-mcp`/`chrome-devtools` → v3.9.3 `tavily-remote-mcp`/`exa`/`chrome-devtools`) — none matched the manifest install.cmd actual register name.
|
|
1984
|
+
- **Fix C**: `check-mcp-availability.ts` rewritten to use `isMcpServerRegistered` helper (sister `src/installers/lib/readClaudeConfig.ts:88` — reads `~/.claude.json` directly). `TARGET_SERVERS` aligned with manifest `install.cmd` register name verbatim: `['tavily-mcp', 'exa-mcp', 'chrome-devtools-mcp']` (the token immediately after `claude mcp add ... --transport stdio <name> --`). `install_commands` field removed from this check — Step B now owns MCP install path; doctor is detection-only.
|
|
1985
|
+
|
|
1986
|
+
### Tests
|
|
1987
|
+
|
|
1988
|
+
- 3 cells in `tests/cli/check-mcp-availability.test.ts` rewritten: mock now writes `~/.claude.json` (not `settings.json`); server names use manifest-cmd targets; assertions check that `install_commands` is undefined (Step B owns install).
|
|
1989
|
+
- `tests/unit/cli-install-base.test.ts` cell 3 + cell 5: previously verified PHASE_21 short-circuit (skip without runInstall call); now verify runInstall IS called for all 6 methods.
|
|
1990
|
+
- `tests/cli/setup.test.ts` cell 5 + cell 6: same — `npx-skill-installer` / `cc-plugin-marketplace` etc. now dispatch through runInstall; assertion counts + wording updated.
|
|
1991
|
+
- Total: 1125 pass (unchanged baseline; behavior change + assertion refactor).
|
|
1992
|
+
|
|
1993
|
+
### Behavior change summary
|
|
1994
|
+
|
|
1995
|
+
Before v3.9.5 (dogfood report):
|
|
1996
|
+
```
|
|
1997
|
+
[B] installed gsd
|
|
1998
|
+
[B] already-installed chrome-devtools-mcp / exa-mcp / tavily-mcp
|
|
1999
|
+
[B] skipped ctx7 / playwright-test / ralph-loop / superpowers / ...
|
|
2000
|
+
(12+ items, all "deferred phase 2.1")
|
|
2001
|
+
🔔 doctor still warns 3 MCP servers missing
|
|
2002
|
+
🔔 auto-install prompts only mattpocock-skills
|
|
2003
|
+
```
|
|
2004
|
+
|
|
2005
|
+
After v3.9.5:
|
|
2006
|
+
```
|
|
2007
|
+
[B] installed gsd / (any genuinely missing manifests)
|
|
2008
|
+
[B] already-installed chrome-devtools-mcp / exa-mcp / tavily-mcp /
|
|
2009
|
+
(anything detected via idempotent_check)
|
|
2010
|
+
[B] skipped (only items where user actively aborted a confirm prompt)
|
|
2011
|
+
✓ doctor MCP check passes (reads same ~/.claude.json as installer writes)
|
|
2012
|
+
✓ auto-install no longer re-prompts items Step B already handled
|
|
2013
|
+
```
|
|
2014
|
+
|
|
2015
|
+
## [3.9.4] - 2026-05-25
|
|
2016
|
+
|
|
2017
|
+
### Fixed
|
|
2018
|
+
|
|
2019
|
+
- **auto-install best-effort continue on per-command failure**: v3.9.1 SPEC abort-on-fail was over-protection. In practice a check's `install_commands` chain often represents **independent** installs (e.g. 3 MCP servers — tavily / exa / chrome-devtools — each its own `claude mcp add`), not a marketplace-add → plugin-install dependency. One failure should not block the others.
|
|
2020
|
+
- **Behavior change** (`src/cli/lib/auto-install.ts`):
|
|
2021
|
+
- Run ALL commands in `install_commands`; record per-command failures but do NOT abort the chain
|
|
2022
|
+
- Outcome reporting:
|
|
2023
|
+
- All succeeded → `installed` (was: same)
|
|
2024
|
+
- All failed → `failed` with reason "all commands failed (N)"
|
|
2025
|
+
- Mixed → `failed` with reason "partial: X/Y commands failed" + warning emoji (⚠) to distinguish from total failure
|
|
2026
|
+
- **User benefit**: when tavily fails (e.g. "already exists" from prior install), exa + chrome-devtools still proceed. User re-runs setup to retry the failed ones (idempotent — `claude mcp add` re-fails cleanly without side effect).
|
|
2027
|
+
|
|
2028
|
+
## [3.9.3] - 2026-05-25
|
|
2029
|
+
|
|
2030
|
+
### Fixed
|
|
2031
|
+
|
|
2032
|
+
- **MCP doctor check false-missing detection**: `TARGET_SERVERS` in `src/cli/lib/check-mcp-availability.ts` used names that didn't match the actual server names registered by their install commands (e.g. `tavily-mcp` vs actual `tavily-remote-mcp` registered by `claude mcp add tavily-remote-mcp ...`). After install, doctor still reported the server missing → auto-install retried → `claude mcp add` exited 1 with "MCP server already exists in local config". Dogfood symptom:
|
|
2033
|
+
```
|
|
2034
|
+
MCP server tavily-remote-mcp already exists in local config
|
|
2035
|
+
✗ failed MCP servers (tavily/exa/chrome-devtools) — exit code 1
|
|
2036
|
+
```
|
|
2037
|
+
- **Fix**: align `TARGET_SERVERS` with install-command target names (`tavily-remote-mcp` / `exa` / `chrome-devtools`); switch substring-match to exact-match (was forgiving but caused false negatives when registered name diverged from target name). `SERVER_INSTALL_COMMANDS` map keys updated to match. Test fixtures updated to use the corrected names.
|
|
2038
|
+
- **Note**: `tavily-mcp` / `exa-mcp` remain as `workflows/capabilities.yaml` capability entry names — those are harnessed-internal capability identifiers (consumed by workflow templates / routing yaml), independent of MCP server runtime names. No `capabilities.yaml` changes.
|
|
2039
|
+
|
|
2040
|
+
## [3.9.2] - 2026-05-25
|
|
2041
|
+
|
|
2042
|
+
### Fixed
|
|
2043
|
+
|
|
2044
|
+
- **chrome-devtools install command**: v3.9.1 SPEC assumed `npx chrome-devtools-mcp@latest` (empirical-pending). Dogfood confirmed actual install is official Claude marketplace direct: `claude plugin install chrome-devtools-mcp`. Updated `SERVER_INSTALL_COMMANDS['chrome-devtools']` in `src/cli/lib/check-mcp-availability.ts`. Test assertion unchanged (substring `chrome-devtools-mcp` still present in new command).
|
|
2045
|
+
|
|
2046
|
+
## [3.9.1] - 2026-05-25
|
|
2047
|
+
|
|
2048
|
+
### Fixed
|
|
2049
|
+
|
|
2050
|
+
- **setup (P4 auto-install command heterogeneity)**: v3.9.0 P4 hardcoded `claude plugin install <X>` for every missing plugin, but real install commands are heterogeneous across 4 patterns (default marketplace direct / 3rd-party marketplace 2-step / `claude mcp add --transport ...` per-server / upstream skill CLI like `npx skills@latest add owner/repo`). Discovered via dogfood: `claude plugin install mattpocock-skills` fails with "Plugin not found in any configured marketplace" because mattpocock lives in upstream `skills` npm package, not Claude marketplace.
|
|
2051
|
+
- **Schema**: `CheckResult` interface (`src/cli/lib/check-builtin.ts`) adds optional `install_commands?: readonly string[]` field — structured machine-executable install sequence (distinct from free-text `fix` hint). Each entry is a single shell command; multiple entries run sequentially, any non-zero exit aborts the chain.
|
|
2052
|
+
- **auto-install dispatcher** (`src/cli/lib/auto-install.ts`): rewritten to consume `install_commands` verbatim. Removed `extractPluginName` parser (no longer needed). UI now shows the full command list as `$ <cmd>` preview before the Clack confirm prompt (informed consent). `spawnSync` runs with `shell: true` for Windows `.cmd` shim resolution (`npx.cmd` / `claude.cmd`).
|
|
2053
|
+
- **Per-check install_commands**:
|
|
2054
|
+
- `mattpocock-skills`: `['npx skills@latest add mattpocock/skills']`
|
|
2055
|
+
- `planning-with-files`: `['claude plugin marketplace add OthmanAdi/planning-with-files', 'claude plugin install planning-with-files']`
|
|
2056
|
+
- MCP availability (per missing server): `tavily-mcp` → `claude mcp add tavily-remote-mcp --transport http https://mcp.tavily.com/mcp/` / `exa-mcp` → `claude mcp add --transport http exa https://mcp.exa.ai/mcp` / `chrome-devtools` → `npx chrome-devtools-mcp@latest` (empirical-pending, awaiting dogfood verification)
|
|
2057
|
+
|
|
2058
|
+
### Tests
|
|
2059
|
+
|
|
2060
|
+
- `tests/cli/lib/auto-install.test.ts` rewritten — 3 cells (opt-out / nonInteractive skip / warn-without-install_commands filtered out).
|
|
2061
|
+
- `tests/cli/check-mattpocock-skills.test.ts` cell 3 updated to assert `npx skills@latest add` wording + `install_commands` field.
|
|
2062
|
+
- `tests/cli/check-mcp-availability.test.ts` cells 2+3 updated to assert per-server `install_commands` array (tavily / exa / chrome-devtools URLs / npx commands).
|
|
2063
|
+
- Total: 1125 pass (unchanged from v3.9.0 baseline; refactor + 3 assertion updates).
|
|
2064
|
+
|
|
2065
|
+
## [3.9.0] - 2026-05-25
|
|
2066
|
+
|
|
2067
|
+
### Added
|
|
2068
|
+
|
|
2069
|
+
- **setup (P4 plugin auto-install)**: reverses v3.6.0 Phase 2 SPEC NO-auto-install decision per empirical sample-1 signal — `harnessed setup` now runs `doctor` checks at the end, filters `warn` entries whose `fix:` contains `claude plugin install <X>`, and prompts user via Clack `confirm()` per plugin. On consent, spawns `spawnSync('claude', ['plugin', 'install', plugin])` directly. Default opt-in. Three escape hatches: `--no-auto-install` (advisory-only, v3.8.x parity); `--non-interactive` (skip prompts for CI / scripts); non-TTY stdin/stdout auto-detected → fall back to advisory. New `src/cli/lib/auto-install.ts` (~110 LOC) reuses `@clack/prompts` v0.10 + `isCancel` guard pattern from `src/installers/lib/confirm.ts`. Real spawn integration deferred to manual dogfood post-ship.
|
|
2070
|
+
|
|
2071
|
+
### Tests
|
|
2072
|
+
|
|
2073
|
+
- 3 new cells in `tests/cli/lib/auto-install.test.ts`: extractPluginName parsing (plain / `@marketplace` suffix / embedded in REMEDIATION sentence / edge cases) + autoInstall:false opt-out + nonInteractive:true skip-without-spawn.
|
|
2074
|
+
- 2 cells in `tests/cli/setup-agent-teams.test.ts` get `--no-auto-install` flag (avoids double-counting agent-teams check when auto-install re-runs the doctor registry).
|
|
2075
|
+
- Total: 1125 pass (was 1122; +3 new, no regressions).
|
|
2076
|
+
|
|
2077
|
+
## [3.8.0] - 2026-05-25
|
|
2078
|
+
|
|
2079
|
+
### Added
|
|
2080
|
+
|
|
2081
|
+
- **workflow (P1 conditional RULES inject)**: `WorkflowPhaseV3` schema adds optional `injects_rules: Array(string)` field; `buildAgentDef` gains 5th param `injectsRules?: readonly string[]` and constructs `criticalSystemReminder_EXPERIMENTAL` dynamically via new `buildCriticalReminder()` function. Default (omitted / undefined) inject 2 RULES: `escalation` + `transparent-skip` (~470 tokens/spawn). Phases opting into Agent Teams escalation context — `task/deliver`, `task/test`, `verify/multispec` (both phases) — declare `injects_rules: [escalation, transparent-skip, agent-teams-prevention]` in their workflow.yaml to keep the full 670-token chain. Unknown rule names silently filtered (forward-compat). Weighted-avg across 24 sub-workflows: ~512 tokens/spawn (~24% reduction from v3.6.0 Phase 4 unconditional 670 tokens).
|
|
2082
|
+
- **setup (P3 doctor advisory)**: `harnessed setup` now prints a final-line advisory hint pointing user to `harnessed doctor` (12 preflight checks). NOT auto-invoke per v3.6.0 Phase 2 NO-auto-install design; user opts in. New i18n key `setup.doctor_hint` in en.json + zh-Hans.json.
|
|
2083
|
+
- **CLAUDE.md (P2 spec writing checklist)**: project-level discipline addendum capturing v3.6.0 cycle lessons — verify file paths / yaml entry names / TS function names / capability refs / plugin paths via grep before writing into a SPEC. Optional `verified_refs:` frontmatter field documents pre-commit verifications. Pure documentation; no runtime impact.
|
|
2084
|
+
|
|
2085
|
+
### Refactor
|
|
2086
|
+
|
|
2087
|
+
- **workflow**: removed `CRITICAL_SYSTEM_REMINDER` const (replaced by `RULES_MAP` lookup + `buildCriticalReminder(injects)` function). Existing callers continue to receive the same combined string when explicitly passing all 3 rule names.
|
|
2088
|
+
|
|
2089
|
+
### Tests
|
|
2090
|
+
|
|
2091
|
+
- 5 new cells in `tests/workflow/buildAgentDef.test.ts` (F9-F13): default 2-RULES / opt-in 3-RULES / single-rule / unknown-rule silent-skip / dispatchSkillStub passthrough.
|
|
2092
|
+
- F7/F8 (v3.6.0 Phase 4 chain-order) updated to explicitly opt phase into 3 RULES, preserving original assertion semantics.
|
|
2093
|
+
- Total: 1122 pass (was 1117; +5 cells, no regressions).
|
|
2094
|
+
|
|
2095
|
+
## [3.7.0] - 2026-05-25
|
|
2096
|
+
|
|
2097
|
+
### Refactor
|
|
2098
|
+
|
|
2099
|
+
- **doctor**: hoisted 12 preflight checks into `src/cli/lib/doctor-registry.ts` (single `CHECKS` array source of truth) + 4 built-in checks (Node ≥22 / MCP scope / jq presence / Win bash flavor) into `src/cli/lib/check-builtin.ts`. `src/cli/doctor.ts` shrunk from **247L → 47L** — now a thin dispatcher running `Promise.all(CHECKS.map(c => c()))` and rendering output. Resolves the v3.6.0 Phase 2 B-03 ≤225L hard limit exception accepted at ship time. Adding a new check is now one line in the CHECKS array + one assertion bump in `tests/cli/doctor.test.ts` cell 0 (`CHECKS.length === N`). Zero behavioral change: all 12 checks still fire in the same order, `--json` output shape identical, exit code policy unchanged. Tests: 1117 pass (+1 future-proof cell 0).
|
|
2100
|
+
|
|
2101
|
+
## [3.6.1] - 2026-05-25
|
|
2102
|
+
|
|
2103
|
+
### Fixed
|
|
2104
|
+
|
|
2105
|
+
- **setup**: dropped stale "⚠️ v3.0 BREAKING — v2 legacy slash cmd deprecated" block from `harnessed setup` output. `execute-task` / `plan-feature` / `verify-work` are active CLI subcommand aliases (`harnessed execute-task --task X` thin-shims into `runWorkflow`), not deprecated workflows. The v3.0 deprecation warning was a release-time misjudgement which emitted on every setup for 6 minor versions. Promoted to `FLAT_LEGACY_KEEP`; `harnessed setup` now installs them as standalone flat workflows alongside `research` / `retro` / `auto`. Dead code (`FLAT_LEGACY_DEPRECATED` set + `renderDeprecationBlock` function + `ScanResult.deprecated` field) removed.
|
|
2106
|
+
- **i18n**: clarified meaning of `Step B 完成: ... {{skipped}} 跳过` count. Now reads `{{skipped}} 跳过 (待 phase 2.1 实装的安装方式)` / English `{{skipped}} skipped (deferred installer methods awaiting phase 2.1)`. The old wording made users suspect manifests were silently broken when in fact they declared `npx-skill-installer` / `mcp-http-add` / `cc-plugin-marketplace` / `git-clone-with-setup` installer methods that are deferred to phase 2.1 (D-11 policy: deferred ≠ failed).
|
|
2107
|
+
|
|
2108
|
+
## [3.6.0] - 2026-05-25
|
|
2109
|
+
|
|
2110
|
+
### Phase 1 — mattpocock methodology inline (sub-workflow role-prompt enrichment)
|
|
2111
|
+
|
|
2112
|
+
- **role-prompts**: inlined paraphrased methodology excerpts from [mattpocock/skills](https://github.com/mattpocock/skills) (MIT, commit `b8be62ffacb0118fa3eaa29a0923c87c8c11985c`) into 3 sub-workflow entries in `workflows/role-prompts.yaml`, so spawned subagents inherit the methodology even when the upstream mattpocock plugin is absent. Pattern matches v3.5.0 Phase 2 `ESCALATION_RULES` inject (reuses the existing `buildAgentDef` splice pipeline in `src/workflow/run.ts` L94-103; **zero `src/` change** for Phase 1).
|
|
2113
|
+
- `task-clarify` (primary_cap `superpowers-brainstorming`): `+grill-with-docs` in `responsibility` (CONTEXT.md pressure-test, sharpen terminology, update ADRs inline) + 4 checklist items (cross-ref CONTEXT.md, sharpen vague terms, draft ADR inline, output doc-diff). Checklist count 6→10.
|
|
2114
|
+
- `task-code` (primary_cap `planning-with-files`): `+zoom-out` + `+improve-codebase-architecture` in checklist (5 new items — abstraction-layer mapping; shallow→deep deepening; deletion test; CONTEXT.md naming; before/after report). Checklist count 7→12.
|
|
2115
|
+
- `discuss-subtask` (primary_cap `superpowers-brainstorming`): `+grill-me` in `responsibility` (relentless branch-by-branch interview, ONE at a time, prefer codebase exploration over asking) + 2 checklist items. Checklist count 6→8.
|
|
2116
|
+
- **attribution**: 3-layer MIT compliance — (a) yaml header block in `workflows/role-prompts.yaml` naming source URL + pinned SHA + license + cross-ref to `THIRD-PARTY-NOTICES.md`; (b) inline `# … paraphrased from mattpocock/skills (MIT, b8be62f)` comment block above each enriched `responsibility` / `checklist` group with source SKILL.md path; (c) new `THIRD-PARTY-NOTICES.md` at repo root with per-source attribution table + scope-of-redistribution disclosure. Full upstream LICENSE text + vendored SKILL.md sources + provenance metadata preserved at `.planning/v3.6.0/mattpocock-source/` (audit trail; **not shipped** in the npm tarball).
|
|
2117
|
+
- **tests**: 5 new cells in `tests/workflow/rolePromptsMattpocock.test.ts` (regression guard for license + methodology integrity). Cells read the shipped `workflows/role-prompts.yaml` via `loadRolePrompts` (sister pattern to `tests/workflow/disciplineLoader.test.ts`) and assert: (1-2) task-clarify grill-with-docs methodology + checklist items; (3) task-code zoom-out + improve-arch checklist items; (4) discuss-subtask grill-me methodology; (5) yaml header carries the attribution comment block with pinned SHA (raw-file regex check, since `loadRolePrompts` strips comments). Total suite: 1092 → 1097 pass.
|
|
2118
|
+
- **regression**: Zero runtime behavior change — yaml schema unchanged, `loadRolePrompts` consumer unchanged, all v3.5.0 cells preserved. `pnpm build` 0 errors, `pnpm test` 1097 pass / 5 skipped / 1 todo, `pnpm pack` tarball 362 KB (was ~360 KB pre-Phase-1).
|
|
2119
|
+
- **deferred to Phase 5 Wave 0**: shipping `THIRD-PARTY-NOTICES.md` inside the npm tarball requires adding it to `package.json` `"files"` array (currently `dist / manifests / workflows / routing / config-templates / schemas / README.md / LICENSE / NOTICE` only). MIT-compliance shipped attribution is already satisfied through `workflows/role-prompts.yaml` (header block + 3 inline comment groups with pinned SHA — all in the tarball). The repo-root `THIRD-PARTY-NOTICES.md` aggregator file currently ships only via Git, not npm. Per Phase 1 `NEEDS_CLARIFICATION` resolution, this packaging fix is deferred to **Phase 5 Wave 0 "Packaging fix"** (no scope drift into Phase 1; `package.json` is out of Phase 1's scope per spec).
|
|
2120
|
+
|
|
2121
|
+
### Phase 2 — setup-time third-party doctor (mattpocock + MCP availability)
|
|
2122
|
+
|
|
2123
|
+
- **doctor**: expanded `harnessed doctor` from 10 → 12 checks per user reframe ("setup 时检测 mattpocock-skills 并安装") + `audit-harnessed-vs-user-rules-2026-05-25.md` P1a ("MCP 自动探测 + fallback hint"). Both checks are advisory `warn` (NOT `fail`) when missing — non-blocking per R2.4.1 (`warn ≠ fail / exit 0`). No auto-install (user explicit exclusion); checks surface REMEDIATION hints only.
|
|
2124
|
+
- **11th check — `mattpocock-skills` install probe** (`src/cli/lib/check-mattpocock-skills.ts`, new ~75 LOC): file-based probe of two dual-support locations — `~/.claude/plugins/cache/mattpocock-skills/mattpocock-skills/<version>/` (Claude Code plugin form) **or** `~/.claude/skills/mattpocock-skills/` (user-skill form). Either present → `pass`. Both missing → `warn` with REMEDIATION pointing to `claude plugin install mattpocock-skills` (or `git clone`) and a reminder that methodology fallback is already inline in `workflows/role-prompts.yaml` per Phase 1 — install is **optional**, but enables `/grill-with-docs` / `/zoom-out` / `/improve-codebase-architecture` SlashCommand acceleration.
|
|
2125
|
+
- **12th check — MCP servers availability** (`src/cli/lib/check-mcp-availability.ts`, new ~75 LOC): reads `~/.claude/settings.json` `mcpServers` block, checks for `tavily-mcp` / `exa-mcp` / `chrome-devtools` (substring match accepts forks/aliases). Distinct from existing `checkMcpScope` (scope-hygiene layer per CC #54803); this is the server-by-server availability layer. All 3 → `pass`. Partial → `warn` listing installed + missing. None → `warn` with REMEDIATION pointing to `claude mcp add <name>` and noting that harnessed web-search routing (`workflows/judgments/web-search-routing.yaml`) gracefully degrades to built-in `WebFetch` / `WebSearch` when tavily/exa absent.
|
|
2126
|
+
- **`doctor.ts` integration**: 100% delegate-helper pattern (sister `checkAgentTeamsEnv` / `checkPlanningPlugin` L161-166); +2 `Promise.all` entries + +2 `results` entries + description string `+1 + 1` surface mentions. Net: `doctor.ts` 226 → 247 LOC. B-03 `≤225L` hard limit **exception accepted** per PHASE-2-SPEC.md D3 option A: 12 checks all delegate to thin `check-*.ts` helpers; doctor.ts remains a thin dispatcher; refactor to `check-registry.ts` deferred to v3.7+ when checks reach ~14+ (karpathy YAGNI).
|
|
2127
|
+
- **tests**: 6 new PRIMARY-helper cells (`tests/cli/check-mattpocock-skills.test.ts` 3 cells + `tests/cli/check-mcp-availability.test.ts` 3 cells) using sister Phase 3.4 W1 T1.3 tmpdir + `HOME`/`USERPROFILE` redirect + `vi.resetModules` per-cell isolation pattern (real fs, NOT global mock). Existing dispatch tests updated 10 → 12: `tests/cli/doctor.test.ts` cell 1 + cell 5 + 2 new `toContain` assertions; `tests/cli/doctor-fixtures.test.ts` 6 scenarios × `toHaveLength(12)` + 2 new `arrayContaining` entries. Total suite: 1097 → **1103 pass** / 5 skipped / 1 todo / 0 fail.
|
|
2128
|
+
- **reality verification** (Wave 4): `node dist/cli.mjs doctor` output shows 12 checks human-readable; `node dist/cli.mjs doctor --json | .checks.length` = `12` machine-readable; real-env `mattpocock-skills = warn` + `MCP servers = warn` (both REMEDIATION-only, non-blocking exit 0 modulo unrelated pre-existing `mcp scope` + `gstack prefix` fail states that pre-date Phase 2).
|
|
2129
|
+
- **regression**: Zero functional change to existing 10 checks (Node / mcp-scope / jq / win-bash / origin / gstack-prefix / deprecations / token-budget / Agent Teams / planning-with-files). Phase 1 mattpocock methodology inline is preserved verbatim — Phase 2 only adds install-time advisory layer.
|
|
2130
|
+
|
|
2131
|
+
### Phase 3 — Clarification runtime detection (user-override + transparent skip)
|
|
2132
|
+
|
|
2133
|
+
- **user-override** (P0b 上半, Audit § fallback 三条铁律 "用户明示 → 覆盖判据"): new `workflows/judgments/user-overrides.yaml` (80 LOC) declares 6 override entries (`brainstorm` / `strategic-review` / `arch-review` / `phase-discuss` / `paranoid-review` / `tdd`) mapping keyword phrases (中英 2 语言) → trigger gate refs[]. CLI (`src/cli/run.ts`) extracts matched triggers from `--task <text>` via case-insensitive substring match (`src/cli/lib/extract-user-overrides.ts`, 76 LOC) and injects them into `gateContext.user_overrides[]`. `src/workflow/judgmentResolver.ts` checks the array at function entry — if `gateRef` present, bypasses expression evaluation and returns `fires=true`. Stderr emits `ℹ user-override detected: N trigger(s) ...` for transparency.
|
|
2134
|
+
- **transparent-skip** (P0b 下半, Audit § fallback 三条铁律 "拿不准 → 倾向跳过 + 透明声明"): new `transparent-skip-on-low-confidence` rule in `workflows/disciplines/operational.yaml` (`check_method: prompt-inject`); new `TRANSPARENT_SKIP_RULES` const in `src/workflow/run.ts` appended to `CRITICAL_SYSTEM_REMINDER = ${ESCALATION_RULES}\n\n${TRANSPARENT_SKIP_RULES}`. `buildAgentDef` both code paths (rolePrompt found + conservative fallback) swap `criticalSystemReminder_EXPERIMENTAL` from bare `ESCALATION_RULES` to combined `CRITICAL_SYSTEM_REMINDER`. Spawned subagent reads the rule + emits verbatim skip message ("Skipped <phase>, because <reason>. Tell me if you actually need it.") when gate context is ambiguous instead of silent execution. Phase 2 escalation rules preserved verbatim (append only, not modified).
|
|
2135
|
+
- **schema**: new `UserOverridesFile` + `UserOverrideEntry` TypeBox schemas (`src/workflow/schema/judgment.ts`, additive only — NOT in `JudgmentFile` union per Risk 3 mitigation). `schema_version: harnessed.user-overrides.v1` (15th surface; single-file consumer, not yet wired into `SCHEMA_VERSIONS`).
|
|
2136
|
+
- **灰区 resolutions** (per user ack 2026-05-25, sister v3.5.0 Phase 2 hotfix-transparent pattern): (a) 灰区 #2 Option C — `arch-review.triggers[0]` points to existing `judgments.stage-routing.plan-architecture-delegate.fires` (no `architecture-gate.yaml` exists; semantically nearest entry, no scope creep); (b) 灰区 #1/#3 Option A — `phase-discuss.triggers[0]` points to existing `judgments.phase-gate.gsd-discuss-phase.fires` (no `gray-areas` entry exists; naming drift fix). Cross-validation: 10/10 trigger refs across 6 overrides verified against shipped judgment yamls.
|
|
2137
|
+
- **tests**: 13 new/updated cells across 5 files. (a) NEW `tests/workflow/user-override-resolver.test.ts` (5 cells — bypass match / fall-through / empty / multi-trigger union / file-name independence). (b) NEW `tests/cli/lib/extract-user-overrides.test.ts` (5 cells — Chinese substring / English case-insensitive / multi-entry union dedupe / empty no-op / real shipped yaml load + cross-validation echo). (c) `tests/workflow/buildAgentDef.test.ts` +2 cells (F5/F6 — both code paths inject combined `CRITICAL_SYSTEM_REMINDER`). (d) Sister cell updates: `disciplineLoader.test.ts` 6→7 rules; `before-phase-execute.test.ts` 6→7 rules; `schema.test.ts` 10→11 yaml + new B3 cell for `UserOverridesFile` schema; `run.test.ts` cell 20 strict `.toBe(ESCALATION_RULES)` replaced with substring assertions on BOTH escalation triggers AND transparent-skip rule. Total suite: 1103 → **1116 pass** / 5 skipped / 1 todo / 0 fail.
|
|
2138
|
+
- **reality verification** (Wave 4): `corepack pnpm build` 0 红 (DTS + ESM both green); cross-validation script (parse `user-overrides.yaml` → grep target yaml entries) 10/10 PASS; dry-run smoke `node dist/cli.mjs run discuss --task "先 brainstorm 这个算法" --dry-run` emits stderr `ℹ user-override detected: 2 trigger(s) ...` + `gateContext.user_overrides` correctly populated with both `subtask-gate.brainstorming.fires` + `stage-routing.discuss-subtask-delegate.fires`.
|
|
2139
|
+
- **regression**: Zero functional change to existing judgment / discipline mechanisms. user-override bypass is additive (fail-soft per ADR 0029: empty/missing yaml → empty array → existing eval path); transparent-skip rule is prompt-inject only (no runtime gate change). v3.5.0 Phase 2 ESCALATION_RULES preserved byte-for-byte.
|
|
2140
|
+
|
|
2141
|
+
### Phase 4 — Agent Teams prevention discipline inject (P1b)
|
|
2142
|
+
|
|
2143
|
+
- **runtime**: spawned subagents now also carry the 4 Agent Teams 防呆 rules in their critical-system-reminder, so when they signal `needs_teams_escalation=true` they ALSO advise the user (via `escalation_reason` / summary) of the prevention checklist that gates Team API usage. Source: `~/.claude/rules/agent-teams.md` "防呆清单" — paraphrased for prompt injection (not verbatim user-private file). Per `audit-harnessed-vs-user-rules-2026-05-25.md` P1b. Like Phase 3, this is an inject-only advisory layer — harnessed runtime cannot itself enforce cleanup because Team APIs (`TeamCreate` / `SendMessage` / `TeamDelete`) are not exposed via SDK v0.3.142; the main session is the final backstop.
|
|
2144
|
+
- **runtime**: new `AGENT_TEAMS_PREVENTION_RULES` const in `src/workflow/run.ts` (~25 LOC, ~200 tokens) covers the 4 防呆 items: (1) **session-scoped** (teams die on `/resume`); (2) **cleanup mandatory** (send `shutdown_request` to each teammate + `TeamDelete` before session ends); (3) **token-cost estimation** (`team_cost ≈ N_teammates × N_rounds × avg_tokens_per_round + N_teammates × initial_brief_tokens`; prefer subagent fan-out unless `team_cost < 2 × subagent_cost`); (4) **brief must be self-contained** (each teammate launches WITHOUT main-session context). `CRITICAL_SYSTEM_REMINDER` composition extended to chain `ESCALATION_RULES` (Phase 2) → `TRANSPARENT_SKIP_RULES` (Phase 3) → `AGENT_TEAMS_PREVENTION_RULES` (Phase 4). Both `buildAgentDef` code paths (rolePrompt-found + conservative fallback) unchanged — they reference the `CRITICAL_SYSTEM_REMINDER` variable directly (Phase 3 indirection), so the new chain link propagates automatically.
|
|
2145
|
+
- **prompt budget**: total `criticalSystemReminder_EXPERIMENTAL` now ~670 tokens/spawn (v3.5.0 Phase 2 ESCALATION_RULES ~320 + v3.6.0 Phase 3 TRANSPARENT_SKIP_RULES ~150 + v3.6.0 Phase 4 AGENT_TEAMS_PREVENTION_RULES ~200). ~13% of a typical 5000-token spawn budget — acceptable per PHASE-4-SPEC § D4; v3.7+ candidate to conditionally inject Phase 4 block only when multi-spec / fullstack-three-way trigger context is detected.
|
|
2146
|
+
- **tests**: 2 new cells in `tests/workflow/buildAgentDef.test.ts` (sister Phase 3 F5/F6 location — buildAgentDef is private so exercised indirectly via `_dispatchSkillStub.fn` with `sdkSpawn` `vi.mock` capturing the `AgentDefinition`). (F7) all 4 prevention-rule key phrases verbatim present (`'Session-scoped'` / `'shutdown_request'` + `'TeamDelete'` / `'team_cost'` + `'subagent_cost'` / `'self-contained'`) + escalation-hint anchor `'needs_teams_escalation=true'`. (F8) chain order assertion via strict substring-index inequality: `'teammate_send_message_needed'` (ESCALATION anchor) < `'Chain-isolation rule'` (TRANSPARENT_SKIP anchor) < `'Session-scoped'` (PREVENTION anchor). Total suite: 1116 → **1118 pass** / 5 skipped / 1 todo / 0 fail.
|
|
2147
|
+
- **reality verification** (Wave 3): `corepack pnpm build` 0 红 (DTS + ESM both green); byte-level grep of `dist/cli.mjs` confirms all 6 anchor phrases shipped (Phase 2 + Phase 3 + Phase 4 each contribute 2 unique strings — 6/6 present). dry-run runtime spawn deferred (`sdkSpawn` requires `ANTHROPIC_API_KEY` to exercise end-to-end; reality verified via build-artifact byte-level inspection equivalent to runtime injection per the same template-literal path).
|
|
2148
|
+
- **regression**: Zero functional change to existing escalation / transparent-skip / judgment / discipline mechanisms. Phase 4 inject is additive (append-only chain extension); Phase 2 + Phase 3 const bodies preserved byte-for-byte. `runWorkflow` escalation hint (Phase 2 D4 `console.error`) unchanged — Phase 4 only enriches the advisory text the spawned subagent itself emits.
|
|
2149
|
+
|
|
2150
|
+
## 3.5.0 (Unreleased)
|
|
2151
|
+
|
|
2152
|
+
### Phase 1 — P0 private-file reference sweep
|
|
2153
|
+
|
|
2154
|
+
- **workflows**: stripped all `~/.claude/CLAUDE.md` / `~/.claude/rules/*.md` / `~/.claude/plugins/cache/.../X.Y.Z` / `~/.claude/settings.json` references from `workflows/` (65 files, ~150 hits across `capabilities.yaml` + 7 disciplines yaml + 8 judgments yaml + 25 sub-workflow `SKILL.md` + `workflow.yaml` + `role-prompts.yaml`). `npm install harnessed` now ships a self-contained package with zero references to maintainer's private home-directory files. **Net delta**: -48 LOC (mainly References-bullet deletions in `SKILL.md`). **Hard gate verified**: `grep -r "~/.claude" workflows/` = 0 hits.
|
|
2155
|
+
- **capabilities**: dropped `planning-with-files.plugin_path` field (runtime not consumed; environment-specific). Description fields cleaned of `(per ~/.claude/rules/X.md L*)` source-citation tails (maintainer index belongs in ADRs, not shipped yaml).
|
|
2156
|
+
- **disciplines + judgments**: yaml header comments rewritten to self-contained descriptions (no `~/.claude/CLAUDE.md` 节 references). `language.yaml` `check_method` field switched from `~/.claude/settings.json` path to `env.HARNESSED_USER_LANG` (env-var consistency).
|
|
2157
|
+
- **SKILL.md**: References sections stripped of `~/.claude/*` bullets (~30 occurrences across 25 sub-workflows). Plugin-path mentions replaced with install guidance ("Requires X plugin via Claude Code plugin marketplace"). `harnessed setup` slash-command sister references rewritten with `<claude-home>/commands/<x>.md` placeholders.
|
|
2158
|
+
- **regression**: Zero user-facing — yaml schema unchanged, runtime dispatcher unchanged, all 1087 tests pass. v3.4.4 capability cmd resolution paths preserved verbatim (only descriptive metadata stripped).
|
|
2159
|
+
|
|
2160
|
+
### Phase 2 — Option 1-Lite signal-driven Agent Teams escalation
|
|
2161
|
+
|
|
2162
|
+
- **runtime**: spawned-via-SDK subagents now identify Agent Teams upgrade triggers and signal back through `structured_output.needs_teams_escalation` (+ `escalation_reason`); `harnessed` runtime emits a one-line stderr hint after the phase completes so the user can decide whether to open a team in their main Claude Code session (`TeamCreate` is not exposed to spawned subagents via SDK v0.3.142 — this is a deliberate signal-only design). The 5 trigger names are transcribed verbatim from `workflows/judgments/parallelism-gate.yaml` (`teammate_send_message_needed` / `subagent_context_overflow` / `shared_task_list` / `opposing_hypothesis_debate` / `fullstack_three_way`).
|
|
2163
|
+
- **schema**: `COMPLETION_SCHEMA` extended with optional `needs_teams_escalation` (boolean) + `escalation_reason` (string) fields; absent fields default to no-op so existing phases are unaffected.
|
|
2164
|
+
- **runtime**: `buildAgentDef` now injects `criticalSystemReminder_EXPERIMENTAL = ESCALATION_RULES` on both code paths (rolePrompt-found + fallback stub), so escalation rules reach every spawned subagent uniformly via the existing `sdkReconcile` injection pipeline. ESCALATION_RULES (~1300 chars / ~320 tokens) explicitly tells the spawned subagent NOT to attempt calling Team APIs itself.
|
|
2165
|
+
- **runtime**: `DispatchStubResult` extended with `needsTeamsEscalation?` + `escalationReason?` (camel-renamed from envelope snake_case); `_dispatchSkillStub.fn` parses the new fields when present and `runWorkflow` emits `console.error` hint with trigger name + `parallelism-gate.yaml` reference. Non-blocking — phase still proceeds normally.
|
|
2166
|
+
|
|
2167
|
+
### Phase 3 — Verify + ship
|
|
2168
|
+
|
|
2169
|
+
- **release**: Tag `v3.5.0` pushed; GitHub Actions `publish.yml` auto-triggered npm publish with `--provenance` (sigstore rekor TLOG attestation per supply-chain hardening pattern延袭 since v3.4.x).
|
|
2170
|
+
- **package**: tarball verified `~/.claude` 0 hits in `workflows/` after pack; net package size delta ~-2 KB from Phase 1 deletions.
|
|
2171
|
+
- **CHANGELOG**: this entry + retroactive `## [3.4.4] - 2026-05-24` header backfill (release-time omission fixed; v3.4.4 release commit `650b7f6` only bumped `package.json` and left CHANGELOG header as `(Unreleased)`).
|
|
2172
|
+
|
|
2173
|
+
## [3.4.4] - 2026-05-24
|
|
2174
|
+
|
|
2175
|
+
- **runtime**: `harnessed run <name>` now drives real Claude subagent spawns (was placeholder `<stub for X>` in v3.4.3). 24 v3 workflow yamls load + execute through `loadPhases` + `runWorkflow` + `runMasterOrchestrator` end-to-end. `--dry-run` still bypasses spawn (Phase 1 behavior preserved).
|
|
2176
|
+
- **schema**: v3 dispatch arm added to `loadPhases` — yamls with `schema_version: harnessed.workflow.v3` validate against `WorkflowSchemaV3` (master shape with `delegates_to` + no phases supported).
|
|
2177
|
+
- **refactor**: `sdkSpawn` driver moved from `src/routing/lib/` to `src/workflow/lib/` (single SoT, prep for Phase 6 routing deletion).
|
|
2178
|
+
- **runtime**: `harnessed run <name>` now honors `--max-iterations <n>` end-to-end (Phase 1 stub fully wired). Resolution chain: CLI flag → `phase.max_iterations` → hardcoded 20, clamped at `hard_upper_limit = 100`.
|
|
2179
|
+
- **runtime**: phases with `max_iterations` / `fallback.max_iterations_exceeded` / `upstream: ralph-loop` yaml signals now spawn under `ralphLoopWrap` (retry until verbatim `COMPLETE` signal OR max-iter hit). Phases without these signals continue single-shot per Phase 2 (no behavior change).
|
|
2180
|
+
- **refactor**: `ralphLoop` driver moved from `src/routing/lib/` to `src/workflow/lib/` (single SoT, sister Phase 2 sdkSpawn pattern; `promiseExtract` + `fallbackHandlers` deferred to Phase 6 hoist).
|
|
2181
|
+
- **runtime**: on `MaxIterationsExceededError`, phases with `fallback.max_iterations_exceeded` config dispatch `handleMaxIterationsExceeded` (R20.10 c — `process.exit(exit_code)` + UX text), NOT silent abort.
|
|
2182
|
+
|
|
2183
|
+
### Phase 4 — research + execute-task migrate to harnessed run (Path A)
|
|
2184
|
+
|
|
2185
|
+
- **cli**: `harnessed research` + `harnessed execute-task` subcommands are now thin aliases that invoke `runWorkflow` (the Phase 1-3 universal runtime); `src/routing/runRouting` is no longer called from the CLI surface (Phase 6 will delete `src/routing/` + v2 `workflows/execute-task/phases.yaml`). Subcommand flags + exit codes + K5 before-commit hook unchanged → zero user-visible regression.
|
|
2186
|
+
- **workflow**: NEW `workflows/execute-task/workflow.yaml` v3 (mirrors v2 `phases.yaml` 4-phase chain: brainstorming → karpathy + mattpocock route → TDD + diagnose → ralph-loop COMPLETE; per-phase models opus/sonnet/sonnet/haiku per intel CD-2 § 第 4 条). V2 `phases.yaml` preserved through Phase 5.
|
|
2187
|
+
- **runtime**: `buildAgentDef` enriched with `workflows/role-prompts.yaml` lookup chain (`rolePrompts[skillName]` → `rolePrompts[workflowName]` → conservative 2-field stub). Resolved entries splice `responsibility` + `checklist` + `severity` + `specialist` into the AgentDefinition prompt. `gateContext.modelTierOverride` (`--model-tier inherit` B-10 escape hatch) consumed.
|
|
2188
|
+
- **runtime**: `MaxIterFallbackCtx.workflowName` plumbed end-to-end (`parsed.workflow` → `_dispatchSkillStub.fn` opts → `handleMaxIterationsExceeded`). Stderr UX text on max-iter halt now shows actual workflow name (e.g. `execute-task`, `verify-paranoid`) instead of hardcoded `'harnessed-run'`.
|
|
2189
|
+
|
|
2190
|
+
### Phase 5 — real getNextHint + formatted stderr stage hint
|
|
2191
|
+
|
|
2192
|
+
- **cli**: `getNextHint(workflowName)` replaced the Phase 1 stub: reads `workflows/auto/workflow.yaml` `delegates_to[]` (6 stages: research → discuss → plan → task → verify → retro) with lazy module-level cache (1 load per process).
|
|
2193
|
+
- **cli**: Sub-workflow parent-stage fallback (D-1 Option C): `verify-paranoid` → parent `verify` → hints `retro`; sister for `discuss-strategic` (→ plan) / `task-clarify` (→ verify) / `plan-architecture` (→ task).
|
|
2194
|
+
- **cli**: Stderr emits 3-line stage-complete envelope after every `harnessed run <name>` apply-path invocation: `[stage <name> complete]` + `Next stage: harnessed run <next>` + `(In Claude Code: /<next>)`. `--dry-run` path unchanged (exits before hint per Phase 1 behavior — keeps stdout JSON envelope machine-parseable).
|
|
2195
|
+
- **runtime**: ADR 0029 fail-soft preserved — yaml read / parse error returns null + 1-line stderr warn `⚠️ getNextHint failed (...); skipping hint.`, never crashes the run loop.
|
|
2196
|
+
|
|
2197
|
+
### Phase 6 — FINAL cleanup (delete `src/routing/` + hoist 5 deps + i18n & doc-path cleanup)
|
|
2198
|
+
|
|
2199
|
+
- **refactor**: Hoisted 5 cross-package dependency files from `src/routing/` to `src/workflow/lib/` (single SoT for workflow runtime extras): `agentDefinition.ts` (195L → 92L after zombie trim of `createAgent` + 4 error classes + 2 dead consts) + `completionSchema.ts` (33L) + `sdkReconcile.ts` (56L) + `promiseExtract.ts` (32L) + `fallbackHandlers.ts` (92L). `COMPLETE_INSTRUCTION` const + minimal `Rule` interface inlined into hoisted `agentDefinition.ts`.
|
|
2200
|
+
- **cleanup**: Deleted `src/routing/` (9 remaining files, 839 LOC) + `src/routing-engine/` (empty `.gitkeep`) + 4 `tests/routing/` engine-coupled tests + 6 `tests/unit/routing-*.test.ts` + 2 `tests/integration/routing-*.test.ts` + 2 legacy v2-specific test files (`load-phases.test.ts` + `execute-task-v2.test.ts`, superseded by Phase 2 + 4 v3 equivalents). Net **~3500 LOC dead-code removal**.
|
|
2201
|
+
- **tests**: Relocated 4 `tests/routing/` workflow-tier tests to `tests/workflow/` (`isComplete` + `ralph-loop-win-sentinel` + `sdk-spawn` + `sdk-reconcile`) with import path updates. 2 dogfood tests pivoted from v2 `phases.yaml` to v3 `workflow.yaml` (surgical cell-level).
|
|
2202
|
+
- **workflows**: Deleted `workflows/execute-task/phases.yaml` (v2 legacy SoT — Phase 4 v3 `workflow.yaml` is single dispatcher). Updated `workflows/execute-task/SKILL.md` + `workflows/execute-task/workflow.yaml` narrative + fixed 4 stale `src/routing/lib/` doc-path references in shipped yaml/md (post-Phase-2 doc-rot).
|
|
2203
|
+
- **i18n**: Removed 4 stale keys (`research.dry_run.matched_rule` + `research.dry_run.query` + `research.dry_run.run_hint` + `research.install_fix_hint`) from `messages/{en,zh-Hans}.json`. `install.aborted` PRESERVED (still live in `install.ts` + `uninstall.ts`).
|
|
2204
|
+
- **regression**: Zero user-facing — `harnessed run` / `harnessed research` / `harnessed execute-task` CLI surface + exit-code semantics + Phase 5 stage-complete envelope all preserved. Phase 4 alias migration leaves no `runRouting` consumer in production CLI.
|
|
2205
|
+
|
|
2206
|
+
## [3.4.3] - 2026-05-24 — Dual-source slash commands: `~/.claude/commands/<x>.md` + `~/.claude/skills/<x>/SKILL.md` (Option I); vapor CLI subcommand claims removed
|
|
2207
|
+
|
|
2208
|
+
**升级一行指令**: `npm install -g harnessed && harnessed setup` (重跑 setup 触发 commands/ 生成 + SKILL.md 重新渲染)
|
|
2209
|
+
|
|
2210
|
+
**Trigger**: 用户 dogfood v3.4.2 后 cross-session 反复报告 `/verify-paranoid` 仍不可用。另一 CC 实例诊断 (verbatim) 给出 root cause:
|
|
2211
|
+
|
|
2212
|
+
1. SKILL.md 里 `harnessed verify-paranoid --apply` **是 vapor** — `harnessed --help` 实际只有 `install / install-base / research / execute-task / manifest-add / doctor / audit / audit-log / rollback / status / backup`,**13+ sub-workflow CLI 子命令完全没实现**。
|
|
2213
|
+
2. SKILL.md 让 Claude 用 `SlashCommand /review` 来路由,但 gstack `/review` 是 user-skill subdir (`~/.claude/skills/gstack/review/SKILL.md`),**Claude Code 不 register subdir SKILL.md 为顶层 slash command** — 仅通过 CLAUDE.md 描述的 model-driven 路由间接调用。
|
|
2214
|
+
3. 同样 `/verify-paranoid` 本身的 `~/.claude/skills/verify-paranoid/SKILL.md` 只是 Skill 工具可加载入口,**不是 SlashCommand 工具可触发** 的真 slash command — 平台层 slash command 必须在 `~/.claude/commands/<x>.md` 才注册。
|
|
2215
|
+
|
|
2216
|
+
### Fixed
|
|
2217
|
+
|
|
2218
|
+
- **NEW `~/.claude/commands/<x>.md` generation (Step A.6)** — `harnessed setup` 现在 dual-source 输出:每个 sub-workflow 同时写两个文件,语义同源:
|
|
2219
|
+
- `~/.claude/skills/<x>/SKILL.md` — Skill 工具加载入口 (Claude 主动判断 `trigger_phrases:` 匹配时加载),既有路径。
|
|
2220
|
+
- `~/.claude/commands/<x>.md` — 平台 user-defined slash command 真注册 (filename = `/x`),用户输入 `/verify-paranoid` 时 SlashCommand 工具直接找到。Filename = bare slash name (e.g. `verify-paranoid.md` → `/verify-paranoid`,无 `harnessed-` 前缀,符合 D-02 bare cmd 政策)。
|
|
2221
|
+
- **Dual-path 内容同源**:两文件 body 都含同一段 `## How to invoke`:
|
|
2222
|
+
- **Preferred path** — `Use the SlashCommand tool to run \`{{ capabilities.<x>.cmd }}\`` — 通过 capabilityResolver 渲染成真 cmd (e.g. `/review` 当 gstack 已装)。
|
|
2223
|
+
- **Fallback path** — `Use the Task tool to spawn a general-purpose subagent with this prompt: ...` — self-contained role-prompt,从 gstack 上游专家提示词移植 (如 verify-paranoid 的 Pass 1 CRITICAL 9-item 清单,源 `~/.claude/skills/gstack/review/checklist.md`)。装了 plugin 走 preferred,没装走 fallback,**互不依赖**。
|
|
2224
|
+
- **NEW `workflows/role-prompts.yaml`** (~480 LOC) — 24 sub-workflow 的 role-prompt registry:`specialist` (专家头衔) + `responsibility` (一句话使命) + `checklist` (5-10 项审查清单) + `severity` (报告 severity 标签) + `description` (commands/ frontmatter)。Karpathy: 一个 yaml 比 24 处硬编码 TS 强。
|
|
2225
|
+
- **NEW `src/cli/lib/generateCommands.ts`** (~205 LOC,karpathy ≤200L 边界) — `loadRolePrompts` / `generateCommandFile` / `writeAllCommands`。复用 `renderSkillBody` 渲染 capability cmd 占位符;**`fileExists` 守门:已存在 user 写的 `~/.claude/commands/<x>.md` 则 skip + warn,绝不 overwrite** (additive only)。
|
|
2226
|
+
- **24 个 SKILL.md `## How to invoke` 段全重写** — `workflows/<stage>/<sub>/SKILL.md` (含 `auto` / `discuss/auto` / `plan/auto` / `task/auto` / `verify/auto` / `research` / `retro` 等 master + standalone) 通过 `scripts/rewrite-skill-invoke-sections.mjs` 一次性 idempotent 重写。
|
|
2227
|
+
- **Vapor CLI 字样全部清除** — 删除每个 SKILL.md 里的 `## CLI invocation` shell block (claim `harnessed verify-paranoid --apply` 等),以及 `## Invocation` bullet list 里的 `- CLI: \`harnessed ...\`` 行,以及 frontmatter `description:` 里的 `Triggered by harnessed CLI \`harnessed <x> ...\` or slash command` 字样改成 `Triggered by slash command`。**CLI 没动** — 那些 subcommand 至始至终不存在,这次只删除虚假广告,未来 v3.5+ 如要实装可走另一个 PR。
|
|
2228
|
+
|
|
2229
|
+
### Why
|
|
2230
|
+
|
|
2231
|
+
v3.4.0 / v3.4.1 / v3.4.2 反复 patch 都没解决问题,因为它们都假设 SKILL.md 改一下就能让 `/verify-paranoid` 出现。这次定位 root cause:**Claude Code 平台层 slash command 必须有 `~/.claude/commands/<x>.md` 文件才 register**,SKILL.md 只是 Skill 工具加载入口。两类文件性质不同,缺一不可。
|
|
2232
|
+
|
|
2233
|
+
### Added
|
|
2234
|
+
|
|
2235
|
+
- `src/cli/lib/generateCommands.ts` — NEW (~205 LOC)
|
|
2236
|
+
- `workflows/role-prompts.yaml` — NEW (~480 LOC, 24 entry)
|
|
2237
|
+
- `tests/unit/generate-commands.test.ts` — NEW (12 cell:loadRolePrompts 解析 / generateCommandFile body shape 含 master vs sub variant / writeAllCommands skip+warn 路径 / bare filename 验证)
|
|
2238
|
+
- `scripts/rewrite-skill-invoke-sections.mjs` — NEW (一次性 idempotent 重写器,标记 `<!-- v3.4.3-dual-path-invocation -->` 防重跑;后续可删,留作 audit trail)
|
|
2239
|
+
|
|
2240
|
+
### Changed
|
|
2241
|
+
|
|
2242
|
+
- `src/cli/setup.ts` — NEW Step A.6 between A.5 render placeholders 和 C Agent Teams enable;读 capabilities.yaml + role-prompts.yaml + installed plugins/user-skills,把 24 个 commands/<x>.md 写到 `~/.claude/commands/`。文件名 collision 时 skip + warn,绝不覆盖 user 文件。
|
|
2243
|
+
- `package.json` — version 3.4.2 → 3.4.3
|
|
2244
|
+
|
|
2245
|
+
### Files changed
|
|
2246
|
+
|
|
2247
|
+
- `src/cli/lib/generateCommands.ts` — ADDED
|
|
2248
|
+
- `src/cli/setup.ts` — Step A.6 wiring
|
|
2249
|
+
- `workflows/role-prompts.yaml` — ADDED
|
|
2250
|
+
- `workflows/<stage>/<sub>/SKILL.md` × 24 — `## How to invoke` 段 + vapor CLI claims 全重写
|
|
2251
|
+
- `tests/unit/generate-commands.test.ts` — ADDED (12 cell)
|
|
2252
|
+
- `scripts/rewrite-skill-invoke-sections.mjs` — ADDED (one-shot rewriter)
|
|
2253
|
+
- `package.json` — version bump 3.4.2 → 3.4.3
|
|
2254
|
+
- `CHANGELOG.md` — this entry
|
|
2255
|
+
|
|
2256
|
+
### Verification snippet for users
|
|
2257
|
+
|
|
2258
|
+
After `npm install -g harnessed@3.4.3 && harnessed setup`:
|
|
2259
|
+
|
|
2260
|
+
```bash
|
|
2261
|
+
# 1. 24 commands/<x>.md 已写入
|
|
2262
|
+
ls ~/.claude/commands/verify-paranoid.md ~/.claude/commands/verify.md ~/.claude/commands/auto.md
|
|
2263
|
+
|
|
2264
|
+
# 2. 在 Claude Code session 里直接试
|
|
2265
|
+
/verify-paranoid # SlashCommand 工具直接找到 (NOT model-driven 间接路由)
|
|
2266
|
+
/discuss # 同上
|
|
2267
|
+
/auto # 同上
|
|
2268
|
+
|
|
2269
|
+
# 3. 文件内容含双路径:
|
|
2270
|
+
head -50 ~/.claude/commands/verify-paranoid.md
|
|
2271
|
+
# ---
|
|
2272
|
+
# description: "Paranoid Staff Engineer pre-landing review ..."
|
|
2273
|
+
# ---
|
|
2274
|
+
# # /verify-paranoid
|
|
2275
|
+
# ## How to invoke
|
|
2276
|
+
# **Preferred path**: use the SlashCommand tool to run `/review` ...
|
|
2277
|
+
# **Fallback path**: use the Task tool to spawn ... You are a **Paranoid Staff Engineer** ...
|
|
2278
|
+
```
|
|
2279
|
+
|
|
2280
|
+
如已有 `~/.claude/commands/<x>.md` (e.g. 用户自己写过 `/verify-paranoid`),`harnessed setup` skip 并 warn,不会 overwrite。
|
|
2281
|
+
|
|
2282
|
+
### Plugin path future-proofing
|
|
2283
|
+
|
|
2284
|
+
每个 commands/<x>.md 的 body 都已 self-contained:**preferred path 调用上游 plugin / user-skill (若装了),fallback path 直接 spawn Task with role prompt (永远 work)**。这意味着用户:
|
|
2285
|
+
|
|
2286
|
+
- 装了 gstack / mattpocock / 其他 plugin → 走 preferred,gstack `/review` 等专家工具接管。
|
|
2287
|
+
- 没装 → 走 fallback,role prompt 是从 gstack 上游 checklist 移植的 self-contained 版本。
|
|
2288
|
+
- 未来 plugin API 变更或某 plugin 失效 → fallback 保护,workflow 永远不会因 plugin 失效而完全无法运行。
|
|
2289
|
+
|
|
2290
|
+
## [3.4.2] - 2026-05-24 — Resolver redesign: drop namespace prefix mutation; presence-check via install_type (plugin | user-skill)
|
|
2291
|
+
|
|
2292
|
+
**升级一行指令**: `npm install -g harnessed && harnessed setup` (重跑 setup 触发 SKILL.md 模板重新渲染)
|
|
2293
|
+
|
|
2294
|
+
**Trigger**: 用户 dogfood 安装 v3.4.1 后纠正,v3.4.1 的两条核心假设全错:
|
|
2295
|
+
|
|
2296
|
+
1. v3.4.1 假设 gstack / mattpocock / gsd 都是 Claude Code **plugin** (marketplace 安装),实际是 **user-skill** (git clone 进 `~/.claude/skills/<x>/`),从不出现在 `installed_plugins.json`。
|
|
2297
|
+
2. v3.4.1 假设 Claude Code plugin 的 slash command 形式是 `/<plugin>:<bare>`,实际是裸 `/x` —— plugin 的 `commands/<x>.md` 直接映射到 `/x`,无 `<plugin>:` 前缀 (实证: `code-review` plugin 的 `commands/code-review.md` → `/code-review`)。
|
|
2298
|
+
|
|
2299
|
+
因此 v3.4.1 整套 `/<ns>:<bare>` 渲染逻辑全错向。v3.4.2 重新设计 resolver: **不再 mutate cmd**,改成对 capability 做 presence-check,缺装就 emit warning。同时修 v3.4.1 引入的 5 个 mapping 错误 (`code-review` / `code-simplifier` / `frontend-design` / `ui-ux-pro-max` / `ralph-loop` 标错 impl)。
|
|
2300
|
+
|
|
2301
|
+
### Fixed
|
|
2302
|
+
|
|
2303
|
+
- **Resolver 不再 mutate cmd** — `resolveCapabilityCmd()` 返回 `{ renderedCmd: cmd 不变, warning?: 缺装提示 }`。capabilities.yaml 里 `cmd` 字段就是 verbatim 可调 slash command。
|
|
2304
|
+
- **NEW `install_type` 字段** (`'plugin' | 'user-skill'`) — 与 `plugin_id` (plugin lookup) 或 `skill_dir` (user-skill lookup) 配对。omit `install_type` 跳过检查 (built-in / cli / mcp / sentinel)。
|
|
2305
|
+
- **NEW `readInstalledUserSkills()`** — 扫 `~/.claude/skills/` 下 dir 名,返回 Set 用于 user-skill 检查。
|
|
2306
|
+
- **`workflows/capabilities.yaml` 全面更正**:
|
|
2307
|
+
- 移除所有 `plugin_namespace` 字段 (60+ entry)。
|
|
2308
|
+
- mattpocock-skills 系列 (`grill-with-docs` / `zoom-out` / `diagnose` / `caveman` / `grill-me` / `to-prd` / `to-issues` / `improve-codebase-architecture` / `investigate`) → `install_type: user-skill, skill_dir: <bare cmd>` (每个是独立 dir)。
|
|
2309
|
+
- gstack 治理系列 (35+ entry) → `install_type: user-skill, skill_dir: gstack` (gstack 一个 umbrella skill,内部 subdir 提供各 slash command)。
|
|
2310
|
+
- gsd-* 系列 → `install_type: user-skill, skill_dir: gsd-<x>` (每个是独立 dir)。
|
|
2311
|
+
- **mapping 错误修正** (5 处 v3.4.1 写错):
|
|
2312
|
+
- `code-review` impl 改 `mattpocock-skills` → `plugin` (实际 `code-review@claude-plugins-official`)
|
|
2313
|
+
- `code-simplifier` impl 改 `mattpocock-skills` → `plugin` (实际 `code-simplifier@claude-plugins-official`)
|
|
2314
|
+
- `frontend-design` impl 改 `gstack` → `plugin` (实际 `frontend-design@claude-plugins-official`)
|
|
2315
|
+
- `ui-ux-pro-max` impl 改 `gstack` → `plugin` (实际 `ui-ux-pro-max@ui-ux-pro-max-skill`)
|
|
2316
|
+
- `ralph-loop` impl 改 `bundled-skill` → `plugin` + cmd 改 `ralph-loop` → `/ralph-loop` (实际 `ralph-loop@claude-plugins-official`)
|
|
2317
|
+
- **18 sub-workflow SKILL.md `## How to invoke` 段重写** — 老 v3.4.1 段说 "install missing plugin... namespaced cmd" 全错。新版讲清两种 install path (`claude plugin install <name>` for plugins / git clone for user-skills)。
|
|
2318
|
+
- **`src/workflow/schema/capabilities.ts`** — 新增 Optional `install_type` (Union literal) + `plugin_id` + `skill_dir`;`plugin_namespace` 保留为 deprecated Optional (向后兼容,resolver 已不读)。
|
|
2319
|
+
|
|
2320
|
+
### Why
|
|
2321
|
+
|
|
2322
|
+
v3.4.1 用户实际 dogfood 测试发现两条核心架构假设错误。装 gstack 的官方方式是 `git clone https://github.com/garrytan/gstack.git ~/.claude/skills/gstack`,产生 user-skill 而非 plugin,故 v3.4.1 看不到 gstack 装了,把可正常调用的 `/review` 误写成不存在的 `/gstack:review`。同样错误也影响 mattpocock skills (`/diagnose` / `/zoom-out` 等)。
|
|
2323
|
+
|
|
2324
|
+
### Changed
|
|
2325
|
+
|
|
2326
|
+
- `src/cli/lib/capabilityResolver.ts` — 完全重写;新 API `resolveCapabilityCmd(cap, plugins, userSkills)` 三参,`readInstalledUserSkills()` 新增。
|
|
2327
|
+
- `src/cli/lib/renderSkillTemplates.ts` — `renderSkillFile()` 和 `renderAllSkills()` 都接 user-skill set 透传。
|
|
2328
|
+
- `tests/unit/capability-resolver.test.ts` — 重写 (21 cell,涵盖 plugin/user-skill 检测 + cmd 不变断言 + dedup warning + mixed install types)。
|
|
2329
|
+
|
|
2330
|
+
### Dual-install support ("互为补充" — same-release increment)
|
|
2331
|
+
|
|
2332
|
+
- **`install_type` 字段接受 string 或 array**(schema + resolver + 5 新 test cell)。
|
|
2333
|
+
- 单值(原行为):`install_type: plugin` 或 `install_type: user-skill` — 只检查那一条 path。
|
|
2334
|
+
- 数组形式:`install_type: [user-skill, plugin]` + 同时填 `plugin_id` 和 `skill_dir`。Resolver 探测每条 declared path,**任一 detected 即 OK 无 warning**;**仅当 ALL declared paths 全 miss 时 emit 合并 warning**,以 `[multi]` 前缀 + ` OR ` 连接每条 install hint。
|
|
2335
|
+
- 同一 capability 重复 type 自动 dedup(防 `['plugin','plugin']` 生成重复 hint)。
|
|
2336
|
+
- **首个示范 entry**: `caveman`(`workflows/capabilities.yaml:71`)— caveman 同时以 user-skill (git clone repo 到 `~/.claude/skills/caveman/`) 和 plugin (`caveman@caveman`) 两种方式发布,resolver 任一 detected 即 OK。
|
|
2337
|
+
- **未来扩展**:其他同时支持 plugin + user-skill 两种安装的 capability(如可能的 superpowers / planning-with-files / ralph-loop)由 future PR 按需添加 array `install_type`。Schema 已 ready。
|
|
2338
|
+
- **Schema change**:`install_type` 类型从 `Type.Union([plugin, user-skill])` 扩展为 `Type.Union([plugin, user-skill, Type.Array(...)])`,additive、backward-compat(老 single-value entry 行为零变化)。
|
|
2339
|
+
|
|
2340
|
+
### Migration
|
|
2341
|
+
|
|
2342
|
+
旧 v3.4.1 用户重跑:
|
|
2343
|
+
|
|
2344
|
+
```bash
|
|
2345
|
+
npm install -g harnessed@3.4.2 && harnessed setup
|
|
2346
|
+
# 输出含: [A.5] rendered capability placeholders in 18/25 SKILL.md file(s)
|
|
2347
|
+
# 若 gstack / mattpocock skills / gsd / 各 plugin 未装会输出 [plugin]/[user-skill] warning + 对应 install 提示
|
|
2348
|
+
# 已装的会渲染裸 cmd (e.g. /review for gstack), 无 warning
|
|
2349
|
+
```
|
|
2350
|
+
|
|
2351
|
+
### Verification snippet for users
|
|
2352
|
+
|
|
2353
|
+
After re-running `harnessed setup` post-v3.4.2:
|
|
2354
|
+
|
|
2355
|
+
- **若 gstack user-skill 已装** (`ls ~/.claude/skills/gstack/` exists) → SKILL.md 内 `## How to invoke` 渲染裸 `/review` (NOT `/gstack:review`),无 warning。
|
|
2356
|
+
- **若 code-review plugin 已装** (`installed_plugins.json` 有 `code-review@*`) → 渲染裸 `/code-review`,无 warning。
|
|
2357
|
+
- **若都未装** → 渲染裸 cmd + warning prefix `[plugin]` 或 `[user-skill]` 提示对应 install 方式。
|
|
2358
|
+
|
|
2359
|
+
### Files changed
|
|
2360
|
+
|
|
2361
|
+
- `src/cli/lib/capabilityResolver.ts` — REWRITTEN (presence-check, no cmd mutation)
|
|
2362
|
+
- `src/cli/lib/renderSkillTemplates.ts` — signature accepts user-skill set
|
|
2363
|
+
- `src/workflow/schema/capabilities.ts` — add `install_type` / `plugin_id` / `skill_dir` Optional
|
|
2364
|
+
- `workflows/capabilities.yaml` — remove `plugin_namespace`, add `install_type` discriminator, fix 5 mapping errors
|
|
2365
|
+
- 18 `workflows/<stage>/<sub>/SKILL.md` — `## How to invoke` section rewritten
|
|
2366
|
+
- `tests/unit/capability-resolver.test.ts` — REWRITTEN (21 cell coverage)
|
|
2367
|
+
- `package.json` — version 3.4.1 → 3.4.2
|
|
2368
|
+
- `CHANGELOG.md` — this entry
|
|
2369
|
+
|
|
2370
|
+
## [3.4.1] - 2026-05-24 — Setup hotfix: capability namespace resolver + sub-workflow SKILL.md imperative invoke step
|
|
2371
|
+
|
|
2372
|
+
**升级一行指令**: `npm install -g harnessed && harnessed setup` (重跑 setup 触发 SKILL.md 模板渲染)
|
|
2373
|
+
|
|
2374
|
+
**Trigger**: user 反馈 v3.4.0 ship 后两个 bug — (1) `/verify-paranoid` 等 sub-workflow SKILL.md 加载后不真正 invoke gstack `/review`,源文件 `{{ capabilities.gstack-review.cmd }}` 字面模板从未在 install 时渲染。(2) gstack 实际以 Claude Code plugin 形式安装 (`gstack@<marketplace>`),真正可调 slash-cmd 是 `/gstack:review` 而非裸 `/review`,所以即便没模板 bug 静态 `/review` 也 resolve 不了。
|
|
2375
|
+
|
|
2376
|
+
### Fixed
|
|
2377
|
+
|
|
2378
|
+
- **`harnessed setup` 渲染 SKILL.md capability 占位符** — NEW Step A.5 在 Step A (cp workflow skills) 之后 Step C (Agent Teams enable) 之前,扫描每个安装好的 `~/.claude/skills/<x>/SKILL.md`, 正则替换 `{{ capabilities.<name>.cmd }}` 为 resolver 输出 (e.g. `/gstack:review` 当 plugin 已装, `/review` + warning 当未装)
|
|
2379
|
+
- **NEW `src/cli/lib/capabilityResolver.ts`** (≤ 200L per karpathy hard limit) — `readInstalledPlugins()` 读 `~/.claude/plugins/installed_plugins.json` 解析 `<pluginName>@<marketplaceId>` 提取 namespace prefix Set; `resolveCapabilityCmd()` 5-rule 单 capability 渲染 (no_namespace / installed → namespaced / not_installed → bare + warn / already_namespaced / sentinel); `renderSkillBody()` 全 body 多 placeholder 渲染 + 警告去重
|
|
2380
|
+
- **NEW `src/cli/lib/renderSkillTemplates.ts`** (~120L) — `loadCapabilities()` 解析 `workflows/capabilities.yaml` → CapabilityMap; `renderSkillFile()` 单文件 in-place 替换 + non-fatal error 处理; `renderAllSkills()` 顺序处理 25 skills + warning 聚合
|
|
2381
|
+
- **`workflows/capabilities.yaml` Optional `plugin_namespace` 字段** (additive — 旧 consumer 忽略未知 key, schema v1 in-place extend NOT bump per Pattern A B.1) — 64 entry 加 field (impl=gstack / gsd / mattpocock-skills / claude-code-plugin / bundled-skill); 19 entry 不加 (impl=mcp / cli / npm-cli / claude-platform / harnessed-bundled / superpowers 已 pre-namespaced)
|
|
2382
|
+
- **17 sub-workflow SKILL.md 加 `## How to invoke` section** — 模板 `Use the SlashCommand tool to run: \`{{ capabilities.<X>.cmd }}\`` 配 install-time 渲染,LLM 看到具体可执行 slash cmd 不再只看 declarative description
|
|
2383
|
+
- `src/workflow/schema/capabilities.ts` — Optional `plugin_namespace` 字段加入 `CapabilityEntryBase` shape, 沿用 Pattern A B.1 in-place extend 不 bump schema version
|
|
2384
|
+
|
|
2385
|
+
### Why
|
|
2386
|
+
|
|
2387
|
+
v3.4.0 ship 时 setup 仅 `cp -r` 拷贝 workflow 目录到 `~/.claude/skills/`, 完全没渲染 SKILL.md 内的 Jinja-style 模板。LLM 加载 `verify-paranoid/SKILL.md` 看到 `{{ capabilities.gstack-review.cmd }}` 字面字符串,无法识别为 invocable slash cmd。即便修了模板渲染, gstack 是 Claude Code plugin 真正 cmd 是 `/<namespace>:<cmd>` 形式 (`gstack:review` 而非 `review`),所以需要双修。
|
|
2388
|
+
|
|
2389
|
+
### Changed
|
|
2390
|
+
|
|
2391
|
+
- `src/cli/setup.ts` — NEW Step A.5 `renderAllSkills()` invoke + i18n log line (`setup.step_a_render.complete` + `.warnings_header`); 17 sub-workflow SKILL.md (verify/{paranoid,code-review,qa,security,design,simplify,multispec,progress} + discuss/{strategic,phase,subtask} + plan/{architecture,phase} + task/{clarify,code,test,deliver} + retro) 加 `## How to invoke` section
|
|
2392
|
+
- `messages/en.json` + `messages/zh-Hans.json` — 2 NEW key (`setup.step_a_render.complete` / `.warnings_header`)
|
|
2393
|
+
- `tests/unit/capability-resolver.test.ts` NEW (16 cell): plugin file parsing (5 cell) + single resolve (5 cell) + body render (6 cell)
|
|
2394
|
+
|
|
2395
|
+
### Migration
|
|
2396
|
+
|
|
2397
|
+
旧 v3.4.0 user 重跑 `harnessed setup`:
|
|
2398
|
+
|
|
2399
|
+
```bash
|
|
2400
|
+
npm install -g harnessed@3.4.1 && harnessed setup
|
|
2401
|
+
# 输出含: [A.5] rendered capability placeholders in 17/25 SKILL.md file(s)
|
|
2402
|
+
# 若 plugin 未装会输出 warnings + suggested install cmd
|
|
2403
|
+
```
|
|
2404
|
+
|
|
2405
|
+
### Tests
|
|
2406
|
+
|
|
2407
|
+
- 1180 pass / 4 skip / 2 pre-existing baseline fail (research-v2 + special-purpose-fallback, 与本 hotfix 无关 — 早于 v3.4.0)
|
|
2408
|
+
- baseline v3.4.0 1153 → +16 NEW capability-resolver + 11 modified existing SKILL.md fixture re-validate
|
|
2409
|
+
- biome clean (3 pre-existing infos, capabilities literal key — 与本 hotfix 无关)
|
|
2410
|
+
- tsc --noEmit: 0 error
|
|
2411
|
+
- build success (cli.mjs 200KB)
|
|
2412
|
+
|
|
2413
|
+
### Files changed
|
|
2414
|
+
|
|
2415
|
+
- `src/cli/lib/capabilityResolver.ts` NEW
|
|
2416
|
+
- `src/cli/lib/renderSkillTemplates.ts` NEW
|
|
2417
|
+
- `src/cli/setup.ts` — Step A.5 wired
|
|
2418
|
+
- `src/workflow/schema/capabilities.ts` — `plugin_namespace` optional field
|
|
2419
|
+
- `workflows/capabilities.yaml` — 64 entry 加 `plugin_namespace`
|
|
2420
|
+
- 17 `workflows/<stage>/<sub>/SKILL.md` — `## How to invoke` section
|
|
2421
|
+
- `messages/en.json` + `messages/zh-Hans.json` — 2 NEW key
|
|
2422
|
+
- `tests/unit/capability-resolver.test.ts` NEW (16 cell)
|
|
2423
|
+
- `package.json` — version 3.4.0 → 3.4.1
|
|
2424
|
+
- `CHANGELOG.md` — this entry
|
|
2425
|
+
|
|
2426
|
+
## [3.4.0] - 2026-05-21 — NEW CLI i18n (en + zh-Hans) + setup writes user lang + universal language discipline
|
|
2427
|
+
|
|
2428
|
+
**升级一行指令**: `npm install -g harnessed && harnessed setup` (重跑 setup auto-write user lang config)
|
|
2429
|
+
|
|
2430
|
+
**Trigger**: user 反馈 — "harnessed CLI 应该跨语言友好;workflow artifacts 也应根据 user 系统语言"。v3.0+ 一直是 zh-first,英文 user 终端 experience 弱。
|
|
2431
|
+
|
|
2432
|
+
### Added
|
|
2433
|
+
|
|
2434
|
+
- **CLI i18n stage 1** — harnessed setup/install/uninstall/doctor/backup/rollback/audit-log/research/execute-task/manifest-add/gc/status/resume 等 user-facing strings 双语 (en + zh-Hans);auto-detect via `process.env.LANG` / `Intl.DateTimeFormat`;`--lang en|zh-Hans` flag override;**未来加 ko / ja / fr 等只需 NEW `messages/<code>.json` + `detectLocale()` 加 1 行**
|
|
2435
|
+
- **locale matching policy**: `zh-*` → `zh-Hans` (CN / TW / Hans 等);其他 (en / ko / ja / fr / 等) → `en` universal default
|
|
2436
|
+
- NEW `src/i18n/index.ts` lightweight loader (~50L) + `messages/{en,zh-Hans}.json` string table (~80+ keys)
|
|
2437
|
+
- NEW `src/cli/lib/enableUserLangInSettings.ts` (~80L) — setup 阶段写 `env.HARNESSED_USER_LANG` 到 `~/.claude/settings.json` (sister Q-AUDIT-5b root-level env.* schema + sister v3.3.1 Agent Teams enable pattern)
|
|
2438
|
+
- `harnessed setup --user-lang en|zh-Hans` flag — 显式 override OS locale detect
|
|
2439
|
+
- **NEW `README.md` = English default** (英文受众广), `README-cn.md` = 中文版本;两 README 顶部 language switcher (`English | 中文` toggle)
|
|
2440
|
+
- ≥7 NEW regression fixture (zh-CN / zh-TW / ko / ja / fr / en / undefined locale detect + enableUserLang idempotent / backup / malformed JSON)
|
|
2441
|
+
|
|
2442
|
+
### Changed
|
|
2443
|
+
|
|
2444
|
+
- `workflows/disciplines/language.yaml` — "zh-Hans default" → **"follow `env.HARNESSED_USER_LANG`, fallback to user's current conversation language"** (universal, Claude Code naturally mirrors user input lang);technical jargon English-preserve sub-rule 保留;NEW cross-cultural humor adaptation sub-rule
|
|
2445
|
+
- Sweep 13 CLI cmd + installer module console.log/error → `t(key, params)` 调用
|
|
2446
|
+
- `setup` 加 Step D "User language preference detection + write env.HARNESSED_USER_LANG" (sister Step C Agent Teams enable pattern)
|
|
2447
|
+
|
|
2448
|
+
### Architecture: 加新语言扩展成本
|
|
2449
|
+
|
|
2450
|
+
- 加 Korean / Japanese / French / etc. 翻译只需:
|
|
2451
|
+
1. NEW `messages/<code>.json` (~80 key 翻译, ~2-3h)
|
|
2452
|
+
2. `detectLocale()` 加 1 行 regex (e.g., `if (/^ko\b/i.test(raw)) return 'ko'`)
|
|
2453
|
+
3. TS union type extend
|
|
2454
|
+
4. Tests fixture
|
|
2455
|
+
Total ~3-4h per language
|
|
2456
|
+
- Workflow artifacts (findings.md / task_plan.md 等) 自动适配 — Claude polyglot 看 `env.HARNESSED_USER_LANG` 生成对应语言,**不需翻译 25 个 SKILL.md**
|
|
2457
|
+
|
|
2458
|
+
### Tests
|
|
2459
|
+
|
|
2460
|
+
- 1153 pass / 4 skip / 2 pre-existing baseline fail (research-v2 + special-purpose-fallback)
|
|
2461
|
+
- baseline 1122 → +31 NEW i18n + enableUserLang fixture
|
|
2462
|
+
- biome clean + tsc 0 error
|
|
2463
|
+
|
|
2464
|
+
### Migration
|
|
2465
|
+
|
|
2466
|
+
无 breaking — 旧 user 不带 flag → auto-detect OS locale 仍 work;CLI 输出可能从 zh 变 en (en 受众广 default),user 可:
|
|
2467
|
+
1. 接受 default (en if non-zh locale)
|
|
2468
|
+
2. 重跑 `harnessed setup` 让 detect locale 写 config
|
|
2469
|
+
3. 手动 `--lang zh-Hans` 或改 settings.json 显式指定
|
|
2470
|
+
|
|
2471
|
+
## [3.3.1] - 2026-05-21 — Setup hotfix: auto-enable Agent Teams in ~/.claude/settings.json
|
|
2472
|
+
|
|
2473
|
+
**升级一行指令**: `npm install -g harnessed && harnessed setup` (重跑 setup auto-apply Agent Teams config)
|
|
2474
|
+
|
|
2475
|
+
**Trigger**: user 反馈 — "setup 检查 ~/.claude/settings.json 吗? 没有 CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 需要添加或启用"。Agent Teams 是 Pattern A 3-teammate (Phase 3.3/3.4/3.5 ship 7 次用) + `/verify-multispec` 4-specialist Agent Teams Pattern C + masterOrchestrator delegates_to recursive 等关键 workflow 的前提, setup 不 auto-configure 导致 user 跑这些 workflow 时哑火 (TeamCreate / Agent Teams API 不可用)。
|
|
2476
|
+
|
|
2477
|
+
### Fixed
|
|
2478
|
+
|
|
2479
|
+
- **`harnessed setup` 自动 enable Agent Teams** — NEW Step C 在 Step A (workflow skills install) 之后 Step B (manifest install) 之前, 在 `~/.claude/settings.json` 写入 `env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: "1"` (sister Q-AUDIT-5b root-level env.* schema LOCKED Phase 2.3 W0.5)
|
|
2480
|
+
- 3 case 处理: (a) file 不存在 → create with key (b) file exists + key=1 → idempotent no-op (c) file exists 缺 key OR key !== "1" → backup original + merge add/update key
|
|
2481
|
+
- backup 走 `~/.claude/harnessed/backups/settings.json.{ISO-ts}.bak` (sister v3.0.3 `getHarnessedRoot()` + `harnessedSubdir('backups')` SoT, `:` → `-` for Win filename safety verbatim sister backup.ts)
|
|
2482
|
+
- atomic write 通过 `writeFile(tmpPath) + rename(tmpPath, realPath)` 防 partial write
|
|
2483
|
+
- Non-destructive merge — 不动 file 其他 env / hooks / 其他 top-level key (sister 现有 config preserve)
|
|
2484
|
+
- 任何 error (read/parse/write/backup fail) → warn + skip,**不阻断 setup** (sister fallback 铁律 1 透明声明)
|
|
2485
|
+
|
|
2486
|
+
### Why
|
|
2487
|
+
|
|
2488
|
+
Agent Teams Pattern A / Pattern C workflow (Phase 3.3/3.4/3.5 大量使用, masterOrchestrator delegates_to recursive + verify-multispec 4-specialist) 需 `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1`。v3.3.0 ship 的 setup 仅 detect + warn (sister `warnIfAgentTeamsMissing`) 不 auto-enable, user 手动配置门槛过高。
|
|
2489
|
+
|
|
2490
|
+
### Changed
|
|
2491
|
+
|
|
2492
|
+
- `src/cli/lib/enableAgentTeamsInSettings.ts` NEW (≤80L per karpathy hard limit) — `enableAgentTeamsInSettings()` helper + 3 case branch + atomic write + backup
|
|
2493
|
+
- `src/cli/setup.ts` — Step C invoke `enableAgentTeamsInSettings()` 在 Step A 后 Step B 前; 4 status log line (created / already-enabled / enabled+backup / warn skipped)
|
|
2494
|
+
- `tests/unit/cli-lib-enableAgentTeams.test.ts` NEW (6 fixture): file-missing create / idempotent no-op / key=0 backup+flip / missing-key non-destructive merge / malformed JSON warn / write fail warn
|
|
2495
|
+
- `tests/cli/setup.test.ts` — vi.mock fs/promises 加 `writeFile` / `rename` / `mkdir`; NEW cell 8 — Step C log line + A→C→B sequence assertion
|
|
2496
|
+
|
|
2497
|
+
### Migration
|
|
2498
|
+
|
|
2499
|
+
旧 v3.x user 重跑 `harnessed setup` 即可:
|
|
2500
|
+
|
|
2501
|
+
```bash
|
|
2502
|
+
npm install -g harnessed && harnessed setup
|
|
2503
|
+
# 输出含: [C] enabled Agent Teams in ~/.claude/settings.json (backup saved → ...)
|
|
2504
|
+
# 或 [C] Agent Teams already enabled (~/.claude/settings.json) — 若已手动配置 idempotent no-op
|
|
2505
|
+
# 或 [C] created ~/.claude/settings.json + enabled Agent Teams — 若 settings.json 不存在
|
|
2506
|
+
```
|
|
2507
|
+
|
|
2508
|
+
如果你已手动配置 → idempotent no-op,不会重复写。如果 settings.json 已有其他 env key → non-destructive merge 不破坏。
|
|
2509
|
+
|
|
2510
|
+
### Tests
|
|
2511
|
+
|
|
2512
|
+
- 1122 pass / 5 skip / 2 pre-existing baseline fail (`research-v2` + `special-purpose-fallback` dogfood, baseline 同 v3.3.0 main, 与本 hotfix 无关)
|
|
2513
|
+
- biome check: clean (3 pre-existing infos, capabilities literal key — 与本 hotfix 无关)
|
|
2514
|
+
- tsc --noEmit: 0 error
|
|
2515
|
+
- `node scripts/check-workflow-schema.mjs`: exit 0
|
|
2516
|
+
- 新增 7 test (6 unit + 1 cell 8): baseline v3.3.0 1115 → v3.3.1 1122
|
|
2517
|
+
|
|
2518
|
+
### Files changed
|
|
2519
|
+
|
|
2520
|
+
- `src/cli/lib/enableAgentTeamsInSettings.ts` NEW
|
|
2521
|
+
- `src/cli/setup.ts` — Step C wired
|
|
2522
|
+
- `tests/unit/cli-lib-enableAgentTeams.test.ts` NEW
|
|
2523
|
+
- `tests/cli/setup.test.ts` — vi.mock extend + cell 8
|
|
2524
|
+
- `package.json` — version 3.3.0 → 3.3.1
|
|
2525
|
+
- `CHANGELOG.md` — this entry
|
|
2526
|
+
|
|
2527
|
+
## [3.3.0] - 2026-05-21 — Cleanup: remove backward-compat flag aliases (BREAKING)
|
|
2528
|
+
|
|
2529
|
+
**升级一行指令**: `npm install -g harnessed` (无需重跑 setup)
|
|
2530
|
+
|
|
2531
|
+
**Trigger**: user 反馈 — "2 个 backward-compat alias 都是 24h 内 ship + 几乎无生产 user 在用, 清理 cost 0"。v3.0.1 `--apply` no-op alias + v3.1.0/3.2.0 `--pause-between-stages` 过渡完成, CLI surface 统一 single flag。
|
|
2532
|
+
|
|
2533
|
+
### BREAKING
|
|
2534
|
+
|
|
2535
|
+
- **Removed `--apply`** (v3.0.1 introduced as no-op backward-compat alias)。All CLI cmds (`install` / `uninstall` / `install-base` / `gc` / `manifest-add` / `research` / `execute-task`) 默认即 apply, 不需 flag。旧脚本 `harnessed install foo --apply` 改 `harnessed install foo`。
|
|
2536
|
+
- **Removed `--pause-between-stages`** (v3.1.0 introduced, v3.2.0 renamed to `--staged`)。`/auto --staged` 唯一 stage-gate flag。
|
|
2537
|
+
- **`validateNonInteractiveFlags` simplified to no-op** — `--non-interactive` 与 apply-immediate default 完全 compatible, 无需 `--apply` 或 `--dry-run` 显式;`--dry-run` 仍 opt-in preview。
|
|
2538
|
+
|
|
2539
|
+
### Changed
|
|
2540
|
+
|
|
2541
|
+
- 7 CLI cmd 删除 `--apply` flag declaration (sister setup.ts no-flag pattern 统一)
|
|
2542
|
+
- `workflows/auto/{workflow.yaml,SKILL.md}` 删除 4 处 `--pause-between-stages` mention
|
|
2543
|
+
- `masterOrchestrator.ts` + `masterOrchestrator-helpers.ts` 删除 alias parse logic + JSDoc 标 v3.3.0 cleanup
|
|
2544
|
+
- README sweep — 删除 25 workflow 总览表 `/auto` Brief 中 `--pause-between-stages` alias mention
|
|
2545
|
+
- Tests:删除 4 个 obsolete H1 gate test (gate now no-op) + 21 处 `--apply` test arg
|
|
2546
|
+
|
|
2547
|
+
### Migration
|
|
2548
|
+
|
|
2549
|
+
```bash
|
|
2550
|
+
# v3.2.x (旧) — 仍 work as backward-compat alias
|
|
2551
|
+
harnessed install foo --apply
|
|
2552
|
+
/auto "需求" --pause-between-stages
|
|
2553
|
+
|
|
2554
|
+
# v3.3.0+ (新, 旧 flag 报 unknown option)
|
|
2555
|
+
harnessed install foo # default apply, 无需 flag
|
|
2556
|
+
/auto "需求" --staged # 唯一 stage-gate flag
|
|
2557
|
+
```
|
|
2558
|
+
|
|
2559
|
+
### Tests
|
|
2560
|
+
|
|
2561
|
+
- 1115 pass / 4 skip / 2 pre-existing baseline fail (`research-v2` + `special-purpose-fallback`, 与本次 cleanup 无关)
|
|
2562
|
+
- biome clean + tsc 0 error
|
|
2563
|
+
- 21 处 `--apply` arg + 4 obsolete H1 gate test 删除 (sed sweep batch + Edit per-file)
|
|
2564
|
+
|
|
2565
|
+
## [3.2.0] - 2026-05-21 — /auto enhancement: complexity gate + research/retro flow + flag rename
|
|
2566
|
+
|
|
2567
|
+
**升级一行指令**: `npm install -g harnessed` (无需重跑 setup, `--staged` 是 NEW flag alias; `--pause-between-stages` 仍 work as backward-compat alias)
|
|
2568
|
+
|
|
2569
|
+
**Trigger**: user 测试 v3.1.0 `/auto` 反馈 — 大需求自动 bail 进 discuss 但 UX 不够 explicit; auto mode user hands-off 没明示理解度 / 结束总结。v3.2.0 强化 super-master:complexity gate 1-shot judge + understanding check 强制 prompt + retro mandatory 强制总结。
|
|
2570
|
+
|
|
2571
|
+
### Added
|
|
2572
|
+
|
|
2573
|
+
- **`/auto` Phase 0 complexity assessment** — AI 1-shot judge 需求 size (small / medium / large)。large → prompt user 切换 `--staged` 模式 (每 stage 完停 review) or abort 建议手动 `/discuss`; small/medium 自动 continue default 模式
|
|
2574
|
+
- **`/auto` Phase 0.5 understanding check** — complexity gate 后 prompt "对需求有清晰认知吗? [Y/n]"。n → 强制 spawn `/research` 多源调研 先,再 chain 进 `/discuss`; y → skip research 直接 `/discuss`
|
|
2575
|
+
- **`/auto` Phase 5 `/retro` mandatory** — `/verify` 完成后 auto mode 末尾强制 spawn `/retro` (sister CLAUDE.md "项目 / 里程碑结束:可选跑 /retro" 但 auto hands-off scenario mandatory — 无 opt-out flag)
|
|
2576
|
+
- **`--staged` flag** — short alias for `--pause-between-stages` (sister "staged rollout" 工程界熟概念,8 字符 ergonomic); `--pause-between-stages` 保留 backward-compat alias 不破旧脚本
|
|
2577
|
+
- **6-stage cadence**: research (conditional gate) → discuss → plan → task → verify → retro (mandatory)
|
|
2578
|
+
- **NEW `MasterRunOpts.assessComplexity` + `promptUserUnderstanding` + `prompter`** hooks — DI override 友好 (test fixture pattern verbatim); default impls in `masterOrchestrator-helpers.ts`
|
|
2579
|
+
- **NEW `workflows/judgments/stage-routing.yaml` trigger** `auto-research-unclear` — gate ref for research conditional spawn (`fires_when: user_understanding_unclear == true`)
|
|
2580
|
+
- 8 NEW regression fixture in `tests/workflow/masterOrchestrator.test.ts` (#32-39): complexity small/medium no-prompt / complexity large → staged switch on y / complexity large → abort on n / understanding y skip research / understanding n spawn research / retro mandatory 末尾 spawn / `--staged` flag alias works / `--pause-between-stages` alias backward-compat
|
|
2581
|
+
|
|
2582
|
+
### Changed
|
|
2583
|
+
|
|
2584
|
+
- `workflows/auto/workflow.yaml` delegates_to 加 2 row (research order 0 conditional gate + retro order 5 unconditional mandatory); 6-stage 总规模
|
|
2585
|
+
- `workflows/auto/SKILL.md` — 反映 6-stage cadence + complexity gate + understanding check + retro mandatory + `--staged` rename
|
|
2586
|
+
- `src/workflow/masterOrchestrator.ts` — extend `MasterRunOpts` 加 3 hook (assessComplexity + promptUserUnderstanding + prompter alias); pre-flight invoke `runAutoPreFlight()` before spawn loop (super-master `/auto` only); karpathy ≤200L hard limit hold via helpers.ts split
|
|
2587
|
+
- `src/workflow/masterOrchestrator-helpers.ts` — 加 `defaultAssessComplexity` + `defaultPromptUserUnderstanding` + `runAutoPreFlight` (super-master pre-spawn hook)
|
|
2588
|
+
- README.md — `/auto` 行 Brief 反映 6-stage; 🚀 快捷使用 加 `--staged` example; complexity gate 行加进抉择路由矩阵
|
|
2589
|
+
|
|
2590
|
+
### Migration
|
|
2591
|
+
|
|
2592
|
+
无 breaking — `--pause-between-stages` 仍 work as alias for `--staged`; default `/auto` 加 prompt 是 NEW interactive behavior 但不破 existing yaml/test。`--staged` 是 NEW shorter alias,8 字符 ergonomic。
|
|
2593
|
+
|
|
2594
|
+
### Tests
|
|
2595
|
+
|
|
2596
|
+
- Full suite 1119 pass / 4 skip / 2 pre-existing fail (research-v2 + special-purpose-fallback dogfood, baseline 与 NEW feature 无关)
|
|
2597
|
+
- biome check: clean
|
|
2598
|
+
- tsc --noEmit: 0 error
|
|
2599
|
+
- `node scripts/check-workflow-schema.mjs`: exit 0
|
|
2600
|
+
- masterOrchestrator.ts ≤200L hard limit hold via helpers split
|
|
2601
|
+
|
|
2602
|
+
### Files changed
|
|
2603
|
+
|
|
2604
|
+
- `workflows/auto/workflow.yaml` — delegates_to 4 → 6 row (research conditional + retro mandatory)
|
|
2605
|
+
- `workflows/auto/SKILL.md` — 6-stage + complexity gate + understanding check + retro mandatory + `--staged` rename
|
|
2606
|
+
- `workflows/judgments/stage-routing.yaml` — 加 `auto-research-unclear` trigger
|
|
2607
|
+
- `src/workflow/masterOrchestrator.ts` — `MasterRunOpts` extend + pre-flight hook invoke
|
|
2608
|
+
- `src/workflow/masterOrchestrator-helpers.ts` — defaults + runAutoPreFlight
|
|
2609
|
+
- `tests/workflow/masterOrchestrator.test.ts` — 8 NEW fixture (#32-39)
|
|
2610
|
+
- `README.md` — `/auto` Brief update + `--staged` example + complexity gate row
|
|
2611
|
+
- `package.json` — version 3.1.0 → 3.2.0
|
|
2612
|
+
- `CHANGELOG.md` — this entry
|
|
2613
|
+
|
|
2614
|
+
## [3.1.0] - 2026-05-21 — NEW /auto super-master orchestrator (4-stage continuous chain)
|
|
2615
|
+
|
|
2616
|
+
**升级一行指令**: `npm install -g harnessed` (v3.1.0 LATEST tag, 无需重跑 setup — setup --apply re-install bundled workflow 含 /auto)
|
|
2617
|
+
|
|
2618
|
+
**Trigger**: user 反馈 — "stage 内自动路由 + 整体 super-master 也自动"。v3.0.x 4 个 master `/discuss /plan /task /verify` 跨 stage 需手动串, 不便 trivial feature 开发场景。
|
|
2619
|
+
|
|
2620
|
+
### Added
|
|
2621
|
+
|
|
2622
|
+
- **NEW `/auto` super-master** (`workflows/auto/`) — 一行 `/auto` 自动 chain 4 stage (discuss → plan → task → verify serial order 1-4), 适合 trivial / well-defined feature OR hands-off use case
|
|
2623
|
+
- `workflows/auto/workflow.yaml` (54L) + `workflows/auto/SKILL.md` — top-level standalone (sister `workflows/research/` + `workflows/retro/` layout) per ADR 0030 namespace policy D-02 LOCK bare slash cmd `/auto`
|
|
2624
|
+
- `src/workflow/masterOrchestrator.ts` extend — 5th master `'auto'` literal + recursive spawn pattern (sister Phase 3.5 W0.1 verbatim); top-level invoke `/auto` spawn 4 stage-master `workflows/<sub>/auto/workflow.yaml` (一层抽象 verbatim — super-master → stage-master → sub-workflow)
|
|
2625
|
+
- **NEW `MasterRunOpts`** interface (`pauseBetweenStages` boolean + `pauseFn` test DI override)
|
|
2626
|
+
- **NEW `src/workflow/masterOrchestrator-helpers.ts`** (68L) — split per karpathy ≤200L hard limit; houses `resolveMasterYamlPath` + `resolveSubYamlPath` + `defaultSpawnDriver` + `defaultPauseFn` (readline stdin prompt)
|
|
2627
|
+
- `--pause-between-stages` opt-in flag — 重现 v3.0.x stage gate UX (每 stage 完成停, 等用户 review/confirm 后跑下 stage); default 缺省 fail-fast continuous chain
|
|
2628
|
+
- Fail-fast default — 任一 stage spawn throw 立即停 (NOT silent skip), `harnessed resume` 续
|
|
2629
|
+
- K8 ctx single snapshot — top-level invoke 1 snapshot, 跨 4 stage-master spawn 同 reference (NOT re-snapshot per stage) — sister Phase 3.5 W0.1 pattern verbatim
|
|
2630
|
+
- 6 NEW regression fixture in `tests/workflow/masterOrchestrator.test.ts` (#26-31): 4-stage serial spawn order / --pause-between-stages 4 calls / fail-fast halt / K8 ctx invariant / pause default off / top-level yaml path resolve
|
|
2631
|
+
- `FLAT_TOP_LEVEL_MASTERS` set in `src/cli/lib/scan-nested.ts` — `'auto'` flagged isMaster=true (cosmetic `(master)` tag in setup output); `FLAT_LEGACY_KEEP` 加 `'auto'`
|
|
2632
|
+
- `MASTER_NAMES` in `src/workflow/run.ts` 加 `'auto'` 让 master-detect 识别 super-master invoke
|
|
2633
|
+
|
|
2634
|
+
### Changed
|
|
2635
|
+
|
|
2636
|
+
- `src/workflow/masterOrchestrator.ts` — 197L → 199L (karpathy ≤200L hard limit hold)
|
|
2637
|
+
- `tests/dogfood/cycle-4-verify.dogfood.test.ts` F9 — Path B contract static-verify 扫源码并 concat `masterOrchestrator.ts` + `masterOrchestrator-helpers.ts` (karpathy split 是 implementation detail not contract)
|
|
2638
|
+
- workflow schema validation: workflow v3 count 23 → 24 (`/auto` cross-validate `delegates_to[].sub` ⊂ {discuss, plan, task, verify})
|
|
2639
|
+
|
|
2640
|
+
### Migration
|
|
2641
|
+
|
|
2642
|
+
无 breaking change。已有 4 master `/discuss /plan /task /verify` 不动 — 仍可独立 invoke。新增 `/auto` 是 opt-in NEW workflow。已有用户 `npm install -g harnessed@3.1.0` 即可,无需重跑 setup (re-run `harnessed setup` 才会 install `/auto` skill 到 `~/.claude/skills/auto/`)。
|
|
2643
|
+
|
|
2644
|
+
### Tests
|
|
2645
|
+
|
|
2646
|
+
- Full suite 1111 pass / 4 skip / 2 pre-existing fail (research-v2 + special-purpose-fallback dogfood, baseline v3.0.3 main 同 fail, 与此 NEW feature 无关)
|
|
2647
|
+
- biome check: clean (0 errors, 3 unrelated infos in test files)
|
|
2648
|
+
- tsc --noEmit: 0 error
|
|
2649
|
+
- `node scripts/check-workflow-schema.mjs`: exit 0 (workflow v2=3 / v3=24 cross-validated)
|
|
2650
|
+
- masterOrchestrator.ts 199L (karpathy ≤200L hard limit hold via helpers split)
|
|
2651
|
+
|
|
2652
|
+
### Files changed
|
|
2653
|
+
|
|
2654
|
+
- `workflows/auto/workflow.yaml` NEW (54L)
|
|
2655
|
+
- `workflows/auto/SKILL.md` NEW (~95L)
|
|
2656
|
+
- `src/workflow/masterOrchestrator.ts` — 5th master 'auto' literal + MasterRunOpts + pause hook fire (3 surgical edit, 199L hold)
|
|
2657
|
+
- `src/workflow/masterOrchestrator-helpers.ts` NEW (68L) — split per karpathy ≤200L hard limit
|
|
2658
|
+
- `src/workflow/run.ts` — `MASTER_NAMES` 加 `'auto'`
|
|
2659
|
+
- `src/cli/lib/scan-nested.ts` — `FLAT_LEGACY_KEEP` 加 `'auto'` + NEW `FLAT_TOP_LEVEL_MASTERS` set
|
|
2660
|
+
- `tests/workflow/masterOrchestrator.test.ts` — 6 NEW fixture (#26-31)
|
|
2661
|
+
- `tests/dogfood/cycle-4-verify.dogfood.test.ts` — F9 static-scan concat helpers file
|
|
2662
|
+
- `package.json` — version 3.0.3 → 3.1.0
|
|
2663
|
+
- `CHANGELOG.md` — this entry
|
|
2664
|
+
|
|
2665
|
+
## [3.0.3] - 2026-05-21 — Setup hotfix part 2: `.harnessed/` → `~/.claude/harnessed/` + MCP verify fs-based
|
|
2666
|
+
|
|
2667
|
+
**升级一行指令**: `npm install -g harnessed@3.0.3` (无需重跑 setup;v2.0.1+ 用户 `~/.harnessed/` 自动 migrate 到 `~/.claude/harnessed/`)
|
|
2668
|
+
|
|
2669
|
+
**Trigger**: 2026-05-21 user report v3.0.2 ship 后 setup 仍 hit 2 类 fail (`PS C:\Program Files\Warp\> harnessed setup`):
|
|
2670
|
+
- `chrome-devtools-mcp` / `exa-mcp` / `tavily-mcp` verify timeout — `verify exit -1 or '<name>' not in mcp list stdout: [timeout]` (v3.0.2 spawn-based verify 在 Windows 上 3 个 sequential `claude mcp add` 后冷启动超 15s 预算)
|
|
2671
|
+
- `[B] failed ?:` anonymous mkdir EPERM — `Error: EPERM: operation not permitted, mkdir 'C:\Program Files\Warp\.harnessed'` (state.json / checkpoints / audit.log 等仍 CWD-rooted,只有 backups v2.0.1 已 migrate)
|
|
2672
|
+
|
|
2673
|
+
### Fixed
|
|
2674
|
+
|
|
2675
|
+
- **Bug 1 (`.harnessed/` 主目录 EPERM in read-only CWD)** — 所有 harness-owned 状态目录从 `<cwd>/.harnessed/` 迁到 `~/.claude/harnessed/` (co-located with Claude Code state dir, sister `~/.claude/skills/` + `~/.claude.json`)。
|
|
2676
|
+
- **Root cause**: pre-v3.0.3 用 literal `.harnessed/...` 拼接 cwd-relative path。`updateInstalled(ctx.cwd, ...)` 在 verify 通过后写 `<cwd>/.harnessed/state.json` → 当 user CWD 是只读 (`C:\Program Files\Warp\`) mkdir 失败 → Promise.allSettled rejection 落到 `name: '?'` fallback。
|
|
2677
|
+
- **Fix**: NEW `src/installers/lib/harnessedRoot.ts` SoT helper `getHarnessedRoot()` + `harnessedSubdir(name)` + `harnessedFile(name)` 返回 `~/.claude/harnessed/...`。Sister v2.0.1 `getBackupRoot()` pattern verbatim,扩展到 8 surface (state.json + checkpoints/ + current-workflow.json + audit.log + governance.json + archive/ + .lock + backups/)。
|
|
2678
|
+
- **Migration** (auto): NEW `migrateLegacyHarnessedRoot()` 在 `src/cli.ts` startup 调用,detect `~/.harnessed/` (v2.0.1~v3.0.2 用户) 后 atomic rename 到 `~/.claude/harnessed/`。若 both exist,legacy → `~/.harnessed.legacy-bak/` 保留 + stderr warn (无数据丢失)。Idempotent 跨 CLI invocation。
|
|
2679
|
+
- **Bug 2 (MCP verify spawn timeout)** — 3 处 `mcpStdioAdd.ts` / `mcpHttpAdd.ts` / `ccPluginMarketplace.ts` verify 步骤从 `spawn('claude', ['mcp', 'list'])` + stdout match 改用 fs-based check 直读 `~/.claude.json`。
|
|
2680
|
+
- **Root cause**: v3.0.2 已 fix Windows `grep` 不可用,但用 native spawn `claude mcp list` 仍超 15s 冷启动预算 (3 个 sequential MCP installer 后 process pool 耗尽)。实际 `claude mcp add --scope user` 已成功写 `~/.claude.json`,verify 只是 timeout 误报 fail。
|
|
2681
|
+
- **Fix**: NEW `src/installers/lib/readClaudeConfig.ts` — `readUserClaudeJson()` + `isMcpServerRegistered(name)` + `isPluginRegistered(name)`。fs.readFile + JSON.parse + check `mcpServers[name]` / `enabledPlugins[name]`。跨平台、即时、无 timeout 风险,ENOENT + malformed JSON 优雅返回 `{}`,EACCES 等其他错误 propagate (karpathy fail-loud)。
|
|
2682
|
+
|
|
2683
|
+
### Changed
|
|
2684
|
+
|
|
2685
|
+
- `src/installers/lib/harnessedRoot.ts` NEW — `getHarnessedRoot()` (返回 `~/.claude/harnessed`) + `harnessedSubdir(name)` + `harnessedFile(name)` + `migrateLegacyHarnessedRoot()` + `HARNESSED_ROOT_OVERRIDE` env var (test-only isolation)
|
|
2686
|
+
- `src/installers/lib/readClaudeConfig.ts` NEW — `readUserClaudeJson()` + `isMcpServerRegistered()` + `isPluginRegistered()` (sister fs-based verify pattern)
|
|
2687
|
+
- `src/installers/lib/backup.ts` — `getBackupRoot()` 路由通过 `harnessedSubdir('backups')` SoT (path 从 `~/.harnessed/backups/` 迁到 `~/.claude/harnessed/backups/`)
|
|
2688
|
+
- `src/installers/lib/state.ts` — `statePath()` 用 `harnessedFile('state.json')` (cwd param 保留 signature backward-compat,但 ignore for path 计算)
|
|
2689
|
+
- `src/checkpoint/state.ts` — STATE_PATH + LOCK_TARGET + lockfilePath 全部 lazy resolve 通过 `harnessedRoot` SoT (e2e test override 友好);`withLock()` 加 `mkdir(target, { recursive: true })` 确保 lock parent 存在
|
|
2690
|
+
- `src/checkpoint/{engineHook,sigintTrap,template,archive,resume}.ts` — 全部 checkpoint / archive path 路由 `harnessedSubdir('checkpoints' / 'archive')` SoT
|
|
2691
|
+
- `src/audit/log.ts` + `src/cli/audit-log.ts` — audit.log path 用 `harnessedFile('audit.log')` (lazy 函数 wrap)
|
|
2692
|
+
- `src/cli/status.ts` — state.json + lock 路径用 `harnessedRoot` SoT
|
|
2693
|
+
- `src/workflow/governance.ts` — governance.json path 用 `harnessedFile('governance.json')`
|
|
2694
|
+
- `src/installers/mcpStdioAdd.ts` + `mcpHttpAdd.ts` + `ccPluginMarketplace.ts` — verify spawn 移除,改用 `isMcpServerRegistered()` / `isPluginRegistered()` fs check;error message 升级到 `not found in mcpServers map of ~/.claude.json` / `not found in enabledPlugins map`
|
|
2695
|
+
- `src/cli.ts` — startup 显式调用 `migrateLegacyHarnessedRoot()` (legacy `~/.harnessed/` auto-migrate)
|
|
2696
|
+
|
|
2697
|
+
### Migration (auto)
|
|
2698
|
+
|
|
2699
|
+
v2.0.1~v3.0.2 用户已有 `~/.harnessed/` 目录 (`backups/` 等)。v3.0.3 ship 后 first `harnessed <any-cmd>` 触发 `migrateLegacyHarnessedRoot()`:
|
|
2700
|
+
|
|
2701
|
+
- **Case 1 (常见)**: 仅 `~/.harnessed/` 存在 → `fs.renameSync(~/.harnessed, ~/.claude/harnessed)` atomic move
|
|
2702
|
+
- **Case 2**: 仅 `~/.claude/harnessed/` 存在 → no-op (fresh install)
|
|
2703
|
+
- **Case 3 (rare)**: both exist → legacy → `~/.harnessed.legacy-bak/` 保留 + stderr warn (review manually if needed)
|
|
2704
|
+
- **Case 4**: neither → no-op (fresh install,正常 first run 创建)
|
|
2705
|
+
|
|
2706
|
+
Filesystem error 不 catch-swallow (karpathy fail-loud),用户立刻看到 + 可手动修复。
|
|
2707
|
+
|
|
2708
|
+
### Tests
|
|
2709
|
+
|
|
2710
|
+
- **6 NEW regression fixture** for v3.0.3 contract:
|
|
2711
|
+
- `tests/unit/installers-lib-state.test.ts` + 1 cell — state path under `~/.claude/harnessed` NOT ctx.cwd (sister v2.0.1 backup regression)
|
|
2712
|
+
- `tests/unit/installers-mcpStdioAdd.test.ts` + 3 cells — fs-based verify (default valid mcpServers map / server missing / ENOENT graceful / malformed JSON graceful)
|
|
2713
|
+
- `tests/unit/installers-mcpHttpAdd.test.ts` + 2 cells — sister fs-based verify
|
|
2714
|
+
- `tests/unit/installers-ccPluginMarketplace.test.ts` + 1 cell — `enabledPlugins` map check
|
|
2715
|
+
- **20 test fixture path updates** — assertion 全 cross-platform path regex (`\.claude[/\\]harnessed`) + `HARNESSED_ROOT_OVERRIDE` env-var isolation for e2e integration tests (`phase-3.1-e2e` / `plan-feature-wired` / `plan-feature-prefix-e2e`)
|
|
2716
|
+
- Full suite 1105 pass / 4 skip / 2 pre-existing fail (research-v2 + special-purpose-fallback dogfood,baseline v3.0.2 main 同 fail,与 hotfix 无关)
|
|
2717
|
+
- biome check: clean
|
|
2718
|
+
- tsc --noEmit: 0 error
|
|
2719
|
+
- `node scripts/check-workflow-schema.mjs`: exit 0
|
|
2720
|
+
|
|
2721
|
+
### Files changed
|
|
2722
|
+
|
|
2723
|
+
- `src/installers/lib/harnessedRoot.ts` NEW (149L)
|
|
2724
|
+
- `src/installers/lib/readClaudeConfig.ts` NEW (101L)
|
|
2725
|
+
- `src/installers/lib/backup.ts` — `getBackupRoot()` 路由 SoT
|
|
2726
|
+
- `src/installers/lib/state.ts` — `statePath()` 用 SoT
|
|
2727
|
+
- `src/checkpoint/{state,engineHook,sigintTrap,template,archive,resume}.ts` — 6 file path SoT 迁移
|
|
2728
|
+
- `src/audit/log.ts` + `src/cli/audit-log.ts` + `src/cli/status.ts` + `src/workflow/governance.ts` — 4 file SoT 迁移
|
|
2729
|
+
- `src/installers/{mcpStdioAdd,mcpHttpAdd,ccPluginMarketplace}.ts` — 3 file verify fs-based
|
|
2730
|
+
- `src/cli.ts` — startup migration trigger
|
|
2731
|
+
- `tests/unit/{installers-lib-state,installers-mcpStdioAdd,installers-mcpHttpAdd,installers-ccPluginMarketplace,installers-lib-backup}.test.ts` — 5 unit test fixture refresh
|
|
2732
|
+
- `tests/{audit,checkpoint,workflow,cli}/...` — 8 test file path update
|
|
2733
|
+
- `tests/integration/{installer-contract,phase-3.1-e2e,plan-feature-wired,plan-feature-prefix-e2e}.test.ts` — 4 e2e test HARNESSED_ROOT_OVERRIDE isolation
|
|
2734
|
+
- `package.json` — version 3.0.2 → 3.0.3
|
|
2735
|
+
- `CHANGELOG.md` — this entry
|
|
2736
|
+
|
|
2737
|
+
## [3.0.2] - 2026-05-21 — Setup hotfix: MCP scope + grep verify + install timeout + stale v2.0 strings
|
|
2738
|
+
|
|
2739
|
+
**升级一行指令**: `npm install -g harnessed@3.0.2` (无需重跑 setup;若之前 MCP install fail 可手动重跑 `harnessed setup`)
|
|
2740
|
+
|
|
2741
|
+
**Trigger**: 2026-05-21 user-reported `harnessed setup` 4 失败 (`PS C:\Windows\System32> npm install -g harnessed && harnessed setup`):
|
|
2742
|
+
- `chrome-devtools-mcp` / `exa-mcp` failed: `claude mcp add exited 1: EPERM rename 'C:\Windows\System32\.mcp.json.tmp...' -> 'C:\Windows\System32\.mcp.json'`
|
|
2743
|
+
- `tavily-mcp` failed: `verify exit 255 'grep' is not recognized as an internal or external command`
|
|
2744
|
+
- `gsd` failed: `spawn timed out after 10000ms (cmd: npx --yes get-shit-done-cc@^1.41.0 install)`
|
|
2745
|
+
- 末尾输出 STALE `harnessed v2.0 三层栈方法论 bundled — 4 workflows + 6 judgments + 37 capabilities ready` (v3.0 已 ship 23 workflows / 6 disciplines / 10 judgments / 83 capabilities)
|
|
2746
|
+
|
|
2747
|
+
### Fixed
|
|
2748
|
+
|
|
2749
|
+
- **Bug 1 (MCP EPERM in read-only CWD)** — `mcpStdioAdd.ts` / `mcpHttpAdd.ts` / `ccPluginMarketplace.ts` 3 处 `claude mcp add` / `claude plugin install` 从 `--scope project` flip 到 `--scope user`。
|
|
2750
|
+
- **Root cause**: `--scope project` 写 `<cwd>/.mcp.json` 到 spawn cwd;user 在 `C:\Windows\System32` 跑 `harnessed setup` → EPERM。pre-v3.0.2 `CC #54803` "user scope broken" 注释假设已过时 (CC team 已修复 user scope read-back;verified via `claude mcp add --help` 2026-05-21)。
|
|
2751
|
+
- **Fix**: `--scope user` 写 `~/.claude.json` user-global config — CWD-independent + cross-project shared (harnessed setup 是 onboarding 命令,MCP 应该跨项目可用,不该 scope 到 ephemeral CWD)。
|
|
2752
|
+
- **Bug 2 (Windows `grep` not found)** — 3 处 installer verify step 从 `claude mcp list | grep -q <name>` shell pipe 改用 `spawn('claude', ['mcp', 'list'])` + Node `stdout.includes(name)`。
|
|
2753
|
+
- **Root cause**: `grep` 在 Windows cmd.exe / PowerShell 默认不可用 (只 Git-Bash/WSL/MSYS2 有);verify exit 255 `'grep' is not recognized`。
|
|
2754
|
+
- **Fix**: Node 内置 string-contains,跨平台,无 extra shell fork。`ccPluginMarketplace` verify 改用 `claude plugin list --json` + `stdout.includes(pluginName)`。
|
|
2755
|
+
- **Bug 3 (install spawn 10s timeout)** — `src/installers/lib/spawn.ts` `spawnCmd` 新增 explicit `timeoutMs` 参数;3 个 installer (`npmCli` / `gitCloneWithSetup` / `npxSkillInstaller`) 显式传 `DEFAULT_INSTALL_TIMEOUT_MS = 60_000ms` (install) 和 `verify.timeout_ms ?? DEFAULT_VERIFY_TIMEOUT_MS = 15_000ms` (verify)。
|
|
2756
|
+
- **Root cause**: pre-v3.0.2 `spawnCmd` 用 `spec.verify.timeout_ms ?? 15000ms` for BOTH install + verify。gsd manifest verify.timeout_ms=10000ms 是 `npx --version` fast verify 用,但被 install spawn 错读 → 10s 不够 Windows cold npm/npx 装 `get-shit-done-cc` (实测 30-45s)。
|
|
2757
|
+
- **Fix**: install + verify 用 separate timeout default (install 60s / verify 15s);manifest authors 仍可 override verify.timeout_ms。
|
|
2758
|
+
- **Bug 4 (STALE v2.0 strings + private rules ref)** — 4 处 user-visible message:
|
|
2759
|
+
- `src/cli/setup.ts:142` `harnessed v2.0 三层栈方法论 bundled — 4 workflows + 6 judgments + 37 capabilities ready` → `harnessed v3.0 ... — 23 workflows (4 master + 18 sub + 1 standalone) + 6 disciplines + 10 judgments + ~83 capabilities ready`
|
|
2760
|
+
- `src/cli/lib/setup-helpers.ts:41` `harnessed v2.0 ... (sister ~/.claude/rules/agent-teams.md)` → `harnessed v3.0 ...` 删除 maintainer-private rules ref (用户不知道作者 `~/.claude/rules/` 内容)
|
|
2761
|
+
- `workflows/defaults.yaml:1` + `workflows/capabilities.yaml:1` yaml header `harnessed v2.0` → `harnessed v3.0`
|
|
2762
|
+
|
|
2763
|
+
### Changed
|
|
2764
|
+
|
|
2765
|
+
- `src/installers/lib/spawn.ts` — `spawnCmd(ctx, cmd, args, timeoutMs?)` 新 4th 参数;`DEFAULT_INSTALL_TIMEOUT_MS = 60_000` + `DEFAULT_VERIFY_TIMEOUT_MS = 15_000` exported
|
|
2766
|
+
- `src/installers/lib/safeCwd.ts` NEW — `getMcpSpawnCwd()` returns `homedir()` (sister v2.0.1 `getBackupRoot()` 单一 SoT pattern);MCP installer spawn cwd 用它避免 read-only CWD EPERM
|
|
2767
|
+
- `src/installers/mcpStdioAdd.ts` / `mcpHttpAdd.ts` / `ccPluginMarketplace.ts` — 3 处 `--scope project` → `--scope user`;diff plan target 从 `<cwd>/.mcp.json` (PROJECT) / `<cwd>/.claude/settings.json` 改成 `<homedir>/.claude.json` (HOME);verify shell-grep-pipe 改用 native spawn + Node stdout match;idempotent error string check 从 `'already exists in .mcp.json'` 放宽到 `'already exists'`
|
|
2768
|
+
- `src/installers/npmCli.ts` / `gitCloneWithSetup.ts` / `npxSkillInstaller.ts` — spawnCmd 调用显式传 install timeout 60s + verify timeout 15s
|
|
2769
|
+
- `tests/unit/installers-mcpStdioAdd.test.ts` / `installers-mcpHttpAdd.test.ts` / `installers-ccPluginMarketplace.test.ts` — assertion flip `'project'` → `'user'` + explicit `not.toContain('--scope project')` + `appliedFiles endsWith '.claude.json'` + `not.toContain('grep')` regression fixture
|
|
2770
|
+
- `tests/unit/installers-lib-spawn.test.ts` — 2 NEW regression fixture (timeoutMs override honored + default 60s not 15s)
|
|
2771
|
+
|
|
2772
|
+
### Migration
|
|
2773
|
+
|
|
2774
|
+
旧用户升级仅 `npm install -g harnessed@3.0.2` 即可,无 schema 变更。若之前 `harnessed setup` Step B fail,可手动重跑;`harnessed install <name>` 单 manifest 重装也可。MCP 注册位置从 project-local `.mcp.json` 迁到 user-global `~/.claude.json` — Claude Code 跨项目自动读到 (不需手动迁移 .mcp.json)。
|
|
2775
|
+
|
|
2776
|
+
### Files changed
|
|
2777
|
+
|
|
2778
|
+
- `src/installers/lib/spawn.ts` — explicit `timeoutMs` 4th arg + 2 exported default const
|
|
2779
|
+
- `src/installers/lib/safeCwd.ts` NEW — `getMcpSpawnCwd()` (sister `backup.ts` `getBackupRoot()` pattern)
|
|
2780
|
+
- `src/installers/mcpStdioAdd.ts` / `mcpHttpAdd.ts` / `ccPluginMarketplace.ts` — `--scope user` + native verify + homedir spawn cwd
|
|
2781
|
+
- `src/installers/npmCli.ts` / `gitCloneWithSetup.ts` / `npxSkillInstaller.ts` — explicit timeout caller args
|
|
2782
|
+
- `src/cli/setup.ts` + `src/cli/lib/setup-helpers.ts` — v2.0 → v3.0 string update + remove private rules ref
|
|
2783
|
+
- `workflows/defaults.yaml` + `workflows/capabilities.yaml` — yaml header v2.0 → v3.0
|
|
2784
|
+
- `tests/unit/installers-{mcpStdioAdd,mcpHttpAdd,ccPluginMarketplace,lib-spawn}.test.ts` — fixture flip + NEW regression cells
|
|
2785
|
+
- `package.json` — version 3.0.1 → 3.0.2
|
|
2786
|
+
|
|
2787
|
+
## [3.0.1] - 2026-05-21 — Default behavior unified to apply-immediate (UX hotfix)
|
|
2788
|
+
|
|
2789
|
+
**升级一行指令**: `npm install -g harnessed@3.0.1` (无需重跑 `setup`,纯 CLI behavior flip)
|
|
2790
|
+
|
|
2791
|
+
**Trigger**: 2026-05-21 终端用户反馈 — "dry-run 是高级用户概念,默认应 apply"。v3.0.0 ship < 1 hour ago 全 CLI command 默认 dry-run + `--apply` opt-in 与 `setup` (v1.0.2 apply-immediate redesign 沿袭) 不一致。Sister `setup.ts` pattern (L5-7 IMPL NOTE) 验证 apply-immediate 是正确 default。
|
|
2792
|
+
|
|
2793
|
+
### Changed
|
|
2794
|
+
|
|
2795
|
+
- **`harnessed install` / `uninstall` / `install-base` / `gc` / `manifest-add` / `research` / `execute-task` 默认从 dry-run 改 apply (immediate write)** — sister `setup.ts` pattern verbatim,跨命令统一 setup-first UX
|
|
2796
|
+
- **`--dry-run` flag 仍 opt-in** 高级用户预览
|
|
2797
|
+
- **`--apply` 保留 backward-compat no-op alias** — 旧脚本仍 work (不破)
|
|
2798
|
+
- **`uninstall --yes + --dry-run` 互斥** — 新 H1 gate 替代旧 "--yes requires --apply" 检查 (semantic clearer: `--yes` skip prompt 与 `--dry-run` preview-only 互不兼容)
|
|
2799
|
+
- **`harnessed uninstall <name>` no-flag 仍 protect destructive op** — interactive p.confirm() default No,user 必须 y/yes 才真删
|
|
2800
|
+
|
|
2801
|
+
### Why
|
|
2802
|
+
|
|
2803
|
+
- 终端用户反馈 — "dry-run 是高级用户概念,默认应 apply"
|
|
2804
|
+
- `setup-first UX` 跨命令统一 (sister setup.ts v1.0.2 redesign 沿袭 verbatim)
|
|
2805
|
+
- destructive op safety contract 不变 (uninstall confirm prompt + gc keepLast + backup 机制全保留)
|
|
2806
|
+
|
|
2807
|
+
### Migration
|
|
2808
|
+
|
|
2809
|
+
旧脚本如 `harnessed install foo --apply` 仍 work (no-op alias);新脚本无需 `--apply`;需 preview 用 `--dry-run`:
|
|
2810
|
+
|
|
2811
|
+
```bash
|
|
2812
|
+
# v3.0.0 (旧)
|
|
2813
|
+
harnessed install foo --apply # 必须传 --apply 才真装
|
|
2814
|
+
harnessed install foo # dry-run preview 默认
|
|
2815
|
+
|
|
2816
|
+
# v3.0.1 (新)
|
|
2817
|
+
harnessed install foo # 默认立即装 (NEW default)
|
|
2818
|
+
harnessed install foo --dry-run # opt-in preview
|
|
2819
|
+
harnessed install foo --apply # 仍 work (legacy no-op alias)
|
|
2820
|
+
```
|
|
2821
|
+
|
|
2822
|
+
### Tests
|
|
2823
|
+
|
|
2824
|
+
- **6 NEW regression fixture** verify flipped default behavior + backward-compat `--apply` alias:
|
|
2825
|
+
- `tests/unit/cli-install.test.ts` + 2 cells (immediate default + --dry-run opt-in)
|
|
2826
|
+
- `tests/cli/uninstall.test.ts` Cell 1+3 flipped + Cell 15-16 NEW (no-flag immediate + legacy --apply alias)
|
|
2827
|
+
- `tests/cli/manifest-add-ee5.test.ts` + Cell 7 (no-flag immediate persist)
|
|
2828
|
+
- `tests/cli/execute-task.test.ts` + Cell 9 (legacy --apply alias still wires through hook)
|
|
2829
|
+
|
|
2830
|
+
### Files changed
|
|
2831
|
+
|
|
2832
|
+
- `src/cli/install.ts` + `uninstall.ts` + `install-base.ts` + `gc.ts` + `manifest-add.ts` + `research.ts` + `execute-task.ts` — 7 CLI cmd flipped
|
|
2833
|
+
- `src/cli/lib/validateFlags.ts` — H1 gate 注释 v3.0.1 update
|
|
2834
|
+
- `tests/{unit,cli}/*.test.ts` — 6 NEW regression fixture
|
|
2835
|
+
- `package.json` — version 3.0.0 → 3.0.1
|
|
2836
|
+
- `CHANGELOG.md` — this entry
|
|
2837
|
+
|
|
2838
|
+
## [3.0.0] - 2026-05-21 — v3.0 4-Stage Namespace-Layered Workflow Architecture (BREAKING)
|
|
2839
|
+
|
|
2840
|
+
**升级一行指令**: `npm install -g harnessed@3.0 && harnessed setup --apply`
|
|
2841
|
+
|
|
2842
|
+
**Trigger**: v2.0.0 GA post-ship architectural smell (2026-05-20 user catch) — `/plan-feature` 5-phase conflates 5 layer (Strategic + Phase + Subtask + Plan + Persist);心法招式 + planning-with-files 实为 cross-cutting NOT phase;subagent + Agent Teams orthogonal 但未 1st-class;CLAUDE.md routing rules 散在 prose 未机器化。
|
|
2843
|
+
|
|
2844
|
+
**Decision** (Phase v3.0-3.1 2026-05-20): Pure ship v3.0 deprecate v2.0 (release-notes-only migration per D-04) + 4-stage namespace-layered architecture (M-01) + L0 Discipline Substrate (D-09) + L5b Execution Mechanism Layer (D-10) + rules-based routing (D-11) + D-13 superset commitment。
|
|
2845
|
+
|
|
2846
|
+
### BREAKING CHANGES
|
|
2847
|
+
|
|
2848
|
+
**Alias map** (v2 slash cmd → v3 equivalent):
|
|
2849
|
+
|
|
2850
|
+
| v2 (DROPPED) | v3 master | v3 sub equivalents |
|
|
2851
|
+
|---|---|---|
|
|
2852
|
+
| `/plan-feature` | `/plan` | `/plan-architecture` + `/plan-phase` |
|
|
2853
|
+
| `/execute-task` | `/task` | `/task-clarify` + `/task-code` + `/task-test` + `/task-deliver` |
|
|
2854
|
+
| `/verify-work` | `/verify` | `/verify-progress` + `/verify-code-review` + `/verify-paranoid` + `/verify-qa` + `/verify-security` + `/verify-design` + `/verify-simplify` + `/verify-multispec` |
|
|
2855
|
+
|
|
2856
|
+
- **`/plan-feature` DROPPED** → use `/plan` master OR `/plan-phase` sub
|
|
2857
|
+
- **`/execute-task` DROPPED** → use `/task` master OR `/task-{clarify,code,test,deliver}` 4 sub
|
|
2858
|
+
- **`/verify-work` DROPPED** → use `/verify` master OR `/verify-{progress,code-review,paranoid,qa,security,design,simplify,multispec}` 8 sub
|
|
2859
|
+
- **Workflow schema v2 → v3** — NEW fields: `disciplines_applied: [karpathy, output-style, language, operational, priority, protocols]` (6 Literal Union) + `tools_available: [...]` (cross-validate ⊂ capabilities) + `delegates_to: [{sub, gate?, mode, order?}]` (master only) + phase-level `invokes_tools: [{if?, tool}]`
|
|
2860
|
+
- **capabilities.yaml v3** — 39 v2 entry backfill `category` field + 44 NEW entry (6 behavioral discipline-ref + 33 gstack optional NO prefix + 2 supplementary + 1 gsd-research-phase + 2 alias suffix) → total 83 entry
|
|
2861
|
+
- **End-user 影响**: `harnessed setup --apply` 重装 bundled v3 workflows;v2 SKILL.md dirs (`~/.claude/skills/{plan-feature,execute-task,verify-work}`) 不 auto-remove 仅 deprecation warn (K12 mitigation) — 可手动 `rm -rf` 清理
|
|
2862
|
+
|
|
2863
|
+
### Added — v3.0 24 workflow 4-stage namespace-layered + L0 Discipline Substrate + L5b Execution Mechanism
|
|
2864
|
+
|
|
2865
|
+
- **4 master orchestrator** NEW (Phase 3.5): `workflows/{discuss,plan,task,verify}/auto/` — auto gate-route + delegates_to declarative + `masterOrchestrator.ts` (197L Hybrid Option C 5-phase logic + Path A SDK default + Path B sub-shell fallback + K8 ctx single snapshot)
|
|
2866
|
+
- **18 sub-workflow** NEW (Phase 3.4): 3 discuss (strategic + phase + subtask) + 2 plan (architecture + phase) + 4 task (clarify + code + test + deliver) + 8 verify (progress + code-review + paranoid + qa + security + design + simplify + multispec) + 1 retro standalone NEW + research v2→v3 schema bump
|
|
2867
|
+
- **L0 Discipline Substrate** (Phase 3.3 W0.4): `workflows/disciplines/` NEW 6 yaml — karpathy (code-writing) + output-style (output) + language (output) + operational (commit) + priority (workflow) + protocols (workflow);`disciplineLoader.ts` (73L sister judgmentResolver pattern) + 4 hook helper (before-phase-execute + before-spawn + before-commit + after-output 各 ≤80L)
|
|
2868
|
+
- **L5b Execution Mechanism Layer** (Phase 3.3 W0.3): `workflows/judgments/` 4 NEW yaml — web-design-routing + web-testing-routing + web-search-routing + stage-routing (12 trigger covering 4 master delegation)
|
|
2869
|
+
- **Pattern A vs B Master spawn** LOCKED (Phase 3.5 W2.1 dogfood Cycle 4): Path A SDK recursive default + Path B sub-shell fallback when SDK error
|
|
2870
|
+
- **3 NEW ADR**: 0030 namespace policy bare slash cmd + 0031 4-stage namespace-layered architecture + 0032 cross-cutting disciplines + execution mechanism + D-13 1:1 mapping
|
|
2871
|
+
|
|
2872
|
+
### Changed
|
|
2873
|
+
|
|
2874
|
+
- **workflow.yaml schema** harnessed.workflow.v2 → v3 (18 schema_version surface: 16 v2 + workflow.v3 + discipline.v1)
|
|
2875
|
+
- **capabilities.ts** v1 in-place extend (discriminated union DisciplineCapabilityEntry vs ToolCapabilityEntry, additive Optional `category` per D-16 rule c, NOT bump)
|
|
2876
|
+
- **phaseFactContext** 13 NEW field MIN scope (K3 mitigation, defer gstack optional 35 fires_when v3.x)
|
|
2877
|
+
- **check-workflow-schema.mjs** extend 3 strict cross-validate contract (C1 tools_available + C2 disciplines_applied + C3 judgments invokes capability) + K9 master serial mode order invariant
|
|
2878
|
+
- **setup-helpers.ts** nested 2-level scan + flat name flatten (`workflows/discuss/strategic/` → `discuss-strategic` bare slash) + v2 legacy deprecation warn block (K12 mitigation NOT auto-remove)
|
|
2879
|
+
- **defaults.yaml** 36L → 103L extend ~26 NEW ralph_max_iterations entry (research v3 + retro 2 + discuss 4 + plan 3 + task 4 + verify 11)
|
|
2880
|
+
|
|
2881
|
+
### Tests
|
|
2882
|
+
|
|
2883
|
+
- **76 NEW fixture Phase 3.5** (22 masterOrchestrator + 14 hook + 40 dogfood 4-cycle × 10) sister Phase 2.5 46 fixture scope expanded
|
|
2884
|
+
- **54 NEW fixture Phase 3.3** (schema-v3 10 + discipline 15 + capabilities 6 + phaseFactContext 5 + disciplineLoader 10 + hook helper 25 + cross-validate 14)
|
|
2885
|
+
- **20 NEW fixture Phase 3.4** (schema-v3 10 + defaults 3 + setup-helpers nested 7)
|
|
2886
|
+
- **R8.1 dogfood-first methodology proven** (sister Phase 2.5 uppercase OR/AND benchmark verbatim) — Phase 3.5 W2.1 Cycle 4 caught masterOrchestrator spawn order divergence (serial order=99 末尾被一次跑完违反 yaml intent) + inline fix split serialLeading + serialTrailing via PARALLEL_MID_ANCHOR=50 阈值
|
|
2887
|
+
- Full suite 1087+ pass / 4 skip / 0 fail (was 900 baseline Phase 2.6, +150+ Phase 3.3-3.5 ship)
|
|
2888
|
+
|
|
2889
|
+
### Architecture Decisions (3 NEW ADR)
|
|
2890
|
+
|
|
2891
|
+
- **ADR 0030** [namespace policy bare slash cmd](docs/adr/0030-namespace-policy-bare-slash-cmd.md) — D-02 LOCK bare `/discuss-strategic` NOT `/discuss:strategic` NOT `/harnessed:discuss:strategic` (sister ADR 0009 v1.0.2 LOCK 沿袭)
|
|
2892
|
+
- **ADR 0031** [4-stage namespace-layered architecture](docs/adr/0031-4-stage-namespace-layered-architecture.md) — M-01 + D-03 + D-07 LOCK;23 v3 workflow (4 master + 18 sub + 2 standalone) + 3 v2 legacy keep release-notes-only
|
|
2893
|
+
- **ADR 0032** [cross-cutting disciplines and execution mechanism](docs/adr/0032-cross-cutting-disciplines-and-execution-mechanism.md) — D-05 + D-09 + D-10 + D-11 LOCK + D-13 superset 1:1 mapping table (CLAUDE.md 13 节 → L0 6 yaml + judgments 10 yaml + capabilities 83 entry + 20 workflow)
|
|
2894
|
+
|
|
2895
|
+
### Migration note
|
|
2896
|
+
|
|
2897
|
+
v2.0.0 / v2.0.1 用户升级:
|
|
2898
|
+
```bash
|
|
2899
|
+
npm install -g harnessed@3.0
|
|
2900
|
+
harnessed setup --apply
|
|
2901
|
+
# Optional: manually remove v2 skill dirs
|
|
2902
|
+
rm -rf ~/.claude/skills/{plan-feature,execute-task,verify-work}
|
|
2903
|
+
```
|
|
2904
|
+
|
|
2905
|
+
v2 SKILL.md dirs 不 auto-remove (K12 mitigation — `setup-helpers.ts` 仅 emit deprecation warn);v2 workflows/{plan-feature,execute-task,verify-work}/ in repo 保留 (legacy keep) per D-04 release-notes-only migration。
|
|
2906
|
+
|
|
2907
|
+
### Deferred to v3.x patch (拒绝清单 12 项, see PLAN.md L819-836)
|
|
2908
|
+
|
|
2909
|
+
- RX-3.1 余 11 mattpocock 全集 wire (12 高频已 ship, 余 v3.x)
|
|
2910
|
+
- RX-3.2 47 phaseFactContext FULL field set (gstack optional 35 fires_when)
|
|
2911
|
+
- RX-3.3 Cross-CC handoff Option B auto-hook
|
|
2912
|
+
- RX-3.4 `scripts/check-discipline-drift.mjs` CLAUDE.md sync diff
|
|
2913
|
+
- RX-3.5 Hierarchical 3-level slash cmd (取决于 Claude Code 平台 native)
|
|
2914
|
+
- RX-3.6 Plugin version-check + update semantic (UX redesign)
|
|
2915
|
+
- RX-3.7 Master orchestrator interactive mode toggle
|
|
2916
|
+
- RX-3.8 `/retro` complex cross-milestone trend analysis
|
|
2917
|
+
- RX-3.10 playwright-cli + webapp-testing reclass long-term evaluate
|
|
2918
|
+
- RX-3.11 biome preempt user 主 session enforcement (Option B harness commit wrapper)
|
|
2919
|
+
- RX-3.12 priority hierarchy pick-highest mode (token-saving arbitration)
|
|
2920
|
+
- RX-3.9 gstack 30+ optional wrap 为 sub-workflow — **NEVER** per D-12 LOCK
|
|
2921
|
+
|
|
2922
|
+
## [2.0.1] - 2026-05-20 — backup path EPERM patch
|
|
2923
|
+
|
|
2924
|
+
### Fixed
|
|
2925
|
+
- **P0 backup dir EPERM fix**: backup root migrated from `<process.cwd()>/.harnessed-backup/` → `<homedir()>/.harnessed/backups/`. User-reported v2.0.0 ship bug: `harnessed setup --apply` failed with `EPERM: operation not permitted, mkdir 'C:\Program Files\Warp\.harnessed-backup'` when user launched harness from Warp terminal (CWD = read-only `C:\Program Files\Warp\`). All MCP/plugin installs blocked because backup mkdir failure precedes idempotent skip check in `mcpStdioAdd.ts:122` (sister v1.0.4 idempotent contract bypassed at backup-fail). Fix migrates 4 file (`src/installers/lib/backup.ts` + `src/cli/{backup-list,gc,rollback}.ts`) to shared `getBackupRoot()` helper (new export from `backup.ts`).
|
|
2926
|
+
- Side benefit: backup snapshots now persist across project directories (no per-project `.harnessed-backup/` folder pollution); `harnessed backup list` / `gc` / `rollback` 全部跨项目 shared snapshot pool。
|
|
2927
|
+
|
|
2928
|
+
### Changed
|
|
2929
|
+
- `src/installers/lib/backup.ts`: NEW `getBackupRoot()` export (sister Phase 2.6 ADR 0024 capability abstraction single-source-of-truth pattern); `backup()` writer 用 homedir-based root NOT ctx.cwd
|
|
2930
|
+
- `src/cli/backup-list.ts` + `src/cli/gc.ts` + `src/cli/rollback.ts`: import + 用 `getBackupRoot()` (3 file)
|
|
2931
|
+
|
|
2932
|
+
### Tests
|
|
2933
|
+
- `tests/unit/installers-lib-backup.test.ts`: regex tighten `/.harnessed-backup/` → `/\.harnessed[/\\]backups/` (cross-platform path sep) + NEW v2.0.1 regression fixture (ctx.cwd = `C:\Program Files\Warp` should NOT appear in backup mkdir path)
|
|
2934
|
+
- `tests/integration/installer-contract.test.ts`: same regex tighten — 7 installer × 1 fixture each (npm-cli + mcp-stdio-add + mcp-http-add + git-clone-with-setup + cc-plugin-marketplace + npx-skill-installer + cc-hook-add)
|
|
2935
|
+
- Full suite 900 pass / 4 skip / 0 fail (was 899 baseline, +1 NEW regression fixture)
|
|
2936
|
+
|
|
2937
|
+
### Migration note
|
|
2938
|
+
Existing v1.0.x / v2.0.0 users with `<project>/.harnessed-backup/` directories: new install uses `~/.harnessed/backups/` instead. Old per-project directories remain on disk (harmless artifact); manually delete if desired. No data migration needed — backup snapshots are reproducible from manifest install.
|
|
2939
|
+
|
|
2940
|
+
### Deferred (sister deferred-items v2.x backlog)
|
|
2941
|
+
- **Plugin version-check + update semantic** (user feedback v2.0.0): non-MCP installer (e.g. gsd skills) currently install unconditionally OR skip-silent on existing dir; user expectation = version-check + update if newer available. Requires per-installer version-comparison logic (gstack via npm has version, GSD via git-clone has commit SHA, etc.) — defer to v2.1 minor patch (substantial UX redesign, sister ADR 0004 idempotent contract extension required).
|
|
2942
|
+
|
|
2943
|
+
## [2.0.0] - 2026-05-20 — v2.0 Architecture Refactor
|
|
2944
|
+
|
|
2945
|
+
**Trigger**: v1.0.0~v1.0.4 ship cycle 暴露 fundamental architectural flaw — workflow.yaml 是 build-artifact NOT runtime config; 上游 / Claude Code 平台 / 优秀新组件升级时调整需 1-2 day full npm release cycle (user catch 2026-05-22 post v1.0.4 ship)。
|
|
2946
|
+
|
|
2947
|
+
**Decision (user authorized 2026-05-22)**: 跳 v1.0.5 incremental → 直接 v2.0 大重构 + Pure bundled SoT mode + 完整三层栈方法论机器化 ship 给其他 user (per Phase v2.0-2.1 reframe 2026-05-20)。
|
|
2948
|
+
|
|
2949
|
+
### BREAKING CHANGES
|
|
2950
|
+
|
|
2951
|
+
升级一行指令: `npm install -g harnessed@2.0 && harnessed setup --apply`
|
|
2952
|
+
|
|
2953
|
+
- **workflow.yaml schema v1 → v2** — 全部 4 workflows (`plan-feature` / `execute-task` / `research` NEW / `verify-work` NEW) 升级 v2 schema; NEW fields: `schema_version: harnessed.workflow.v2` + `capability` (template interpolation) + `gate` (judgments 4-level ref) + `on[]` (conditional invoke) + `args` + `parallelism` + `fallback.max_iterations_exceeded`
|
|
2954
|
+
- **End-user 影响**: Pure bundled mode — user 不 customize yaml, 升级 = `harnessed setup --apply` 重新装 bundled defaults (NO migrate CLI 需要 per D-05; user v1.x 没 custom yaml 可 migrate)
|
|
2955
|
+
- **Maintainer 影响**: schema v1 PhasesSchema legacy 仍 supported (loadPhases.ts ifelse dispatch per Option A++); v2 path 主要走
|
|
2956
|
+
|
|
2957
|
+
### Added — 4 workflows 完整 4-stage 三层栈机器化
|
|
2958
|
+
|
|
2959
|
+
- `workflows/research/workflow.yaml` NEW (Stage ① Discuss 独立) — Tavily/Exa/ctx7 多源 fan-out + GSD discuss synth aggregate; sister ~/.claude/rules/web-search.md + context7.md routing 机器化 (R20.7)
|
|
2960
|
+
- `workflows/verify-work/workflow.yaml` NEW (Stage ④ Verify 9-phase) — gsd-verify-work + gsd-progress + code-review (并行) + gstack /review (关键模块强制) + 可选 /qa /cso /design-review + code-simplifier + 4-specialist Agent Team Pattern C 升级 conditional; sister CLAUDE.md Stage ④ verbatim 机器化 (R20.12)
|
|
2961
|
+
- `workflows/plan-feature/workflow.yaml` v2 — planning-with-files Claude Code plugin slash cmd `/plan` 真接 (Q-AUDIT-5a reframe; NOT npm SDK)
|
|
2962
|
+
- `workflows/execute-task/phases.yaml` v2 — ralph-loop completion-promise 真接 + tdd-gate conditional + mattpocock route by condition (R20.10 + R20.13 + R20.8)
|
|
2963
|
+
|
|
2964
|
+
### Added — Capability + Judgment SoT 机器化
|
|
2965
|
+
|
|
2966
|
+
- `workflows/capabilities.yaml` NEW 39 entry flat yaml map (D-02) — mattpocock 11 + special-purpose 13 + gstack 6 + core 4 + agent-teams 3 + gsd 2
|
|
2967
|
+
- `workflows/judgments/` NEW 6 file rule-style 分类 (D-04 + D-16) — strategic-gate / phase-gate / subtask-gate / parallelism-gate / tdd-gate / fallback
|
|
2968
|
+
- `workflows/defaults.yaml` NEW ralph_max_iterations 4 workflow × 14 entry + hard_upper_limit 100
|
|
2969
|
+
- 6 NEW src lib file: `exprBuilder.ts` (expr-eval Parser singleton) / `judgmentResolver.ts` (4-level ref dispatch) / `checkAgentTeams.ts` (Q-AUDIT-5b root-level env probe) / `fallbackHandlers.ts` (R20.10 explicit halt path) / `check-agent-teams-doctor.ts` (doctor wrapper) / `check-planning-with-files.ts` (doctor wrapper + real probe v2.34.0)
|
|
2970
|
+
- 4 NEW TypeBox schema surface (workflow.v2 + capabilities.v1 + judgment.v1 + defaults.v1)
|
|
2971
|
+
|
|
2972
|
+
### Added — Three-layer-stack methodology ship
|
|
2973
|
+
|
|
2974
|
+
v2.0 reframe (2026-05-20): 项目最终目的 = maintainer 三层栈方法论 ship 给其他 user via bundled defaults (NOT parse 其他 user CLAUDE.md)。其他 user `npm install -g harnessed@2.0` + `harnessed setup --apply` 后立即享用 maintainer 三层栈完整流程, 无需自己写 CLAUDE.md prose。
|
|
2975
|
+
|
|
2976
|
+
- 4-stage CLAUDE.md cadence 完整机器化: Discuss research + Plan plan-feature + Execute execute-task + Verify verify-work
|
|
2977
|
+
- 16 D-decision + 3 Q-AUDIT-5 schema fix LOCKED + 实装 (Phase v2.0-2.1 discuss-phase)
|
|
2978
|
+
- Pattern A 全栈三路 Agent Teams 升级 first-use validated (Phase v2.0-2.4 W1 `phase24-w1-execute-team` 3 teammate + 4 SendMessage round-trip + 2 architectural arbitration)
|
|
2979
|
+
- Pattern C 多维度 4-specialist verify-work 升级 conditional (sister ~/.claude/rules/agent-teams.md L52)
|
|
2980
|
+
|
|
2981
|
+
### Added — Dogfood-first methodology proven (R8.1)
|
|
2982
|
+
|
|
2983
|
+
- 46 NEW dogfood fixture across 5 cycle: parallelism-gate + Agent Teams (5) / verify-work 9-phase + Pattern C (6) / TDD + planning-with-files + ralph-loop (20) / mattpocock + special-purpose + fallback 3 铁律 (15)
|
|
2984
|
+
- 1 production bug caught via dogfood-first (NOT pass-by schema-shape regex test): 3 处 uppercase OR/AND in workflow.yaml runtime fail (expr-eval 2.0.2 case-sensitive) — fixed inline
|
|
2985
|
+
- 13/15 active R20.x inline dogfood-verified (R20.5 + R20.9 operational deferred ship verification)
|
|
2986
|
+
- `tests/dogfood/` NEW directory 4 file 46 fixture
|
|
2987
|
+
|
|
2988
|
+
### Added — Doctor MIN 8→10
|
|
2989
|
+
|
|
2990
|
+
- `harnessed doctor` 新增 2 check: Agent Teams env (root-level `env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS == "1"` per Q-AUDIT-5b schema fix) + planning-with-files plugin presence (real probe `~/.claude/plugins/cache/planning-with-files/planning-with-files/<version>/` v2.34.0 verified ≥ 2.2.0)
|
|
2991
|
+
- 2 NEW helper sister probe-gstack.ts pattern: `check-agent-teams-doctor.ts` (34L) + `check-planning-with-files.ts` (58L)
|
|
2992
|
+
|
|
2993
|
+
### Changed — Karpathy ≤200L hard limit cleanup (CK deferred resolved)
|
|
2994
|
+
|
|
2995
|
+
- `src/cli/setup.ts` 235L → 139L via split helper `src/cli/lib/setup-helpers.ts` NEW 128L (3 helper)
|
|
2996
|
+
- sister Phase 3.4 W1 doctor.ts inline shrink pattern follow
|
|
2997
|
+
|
|
2998
|
+
### Fixed — Q-AUDIT-5 post-LOCK schema corrections
|
|
2999
|
+
|
|
3000
|
+
- **Q-AUDIT-5a**: planning-with-files SDK → plugin terminology drift fix — capabilities.yaml entry impl=claude-code-plugin (NOT npm-sdk) + workflow.yaml 05-persist `invokes: '/plan'` literal
|
|
3001
|
+
- **Q-AUDIT-5b**: Agent Teams settings.json schema fix — root-level `env.CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` (NOT nested `experimental.*`); applied **before** v2.0 GA ship (0 user impact)
|
|
3002
|
+
- **Q-AUDIT-5c**: judgments/ multi-file 缺 judgmentResolver.ts → ship NEW 98L resolver + 12 fixture
|
|
3003
|
+
- **NS resolved**: capabilities.yaml add gsd-discuss-phase + gsd-plan-phase entries (37→39 entry)
|
|
3004
|
+
|
|
3005
|
+
### Removed
|
|
3006
|
+
|
|
3007
|
+
- R20.6 manifest user-dir hot-reload — DROPPED per Q-AUDIT-1 Q5b (Pure bundled mode supersede)
|
|
3008
|
+
|
|
3009
|
+
### ADR
|
|
3010
|
+
|
|
3011
|
+
ADR 0024-0029 全 6 NEW (backfill per ADR 0011 9-section pattern); ci.yml A7 step iter 0023→0029 sister F26 + Phase 5.2 W2 T2.7 pattern。
|
|
3012
|
+
|
|
3013
|
+
### Verification metrics
|
|
3014
|
+
|
|
3015
|
+
- Full test suite: **899 pass / 4 skip / 0 fail** (123 file pass + 1 skipped)
|
|
3016
|
+
- biome check: clean across all 52+ touched file
|
|
3017
|
+
- pnpm exec tsc --noEmit: 0 error
|
|
3018
|
+
- node scripts/check-workflow-schema.mjs: exit 0 (workflow.v2 validated=4)
|
|
3019
|
+
- Triple LOCAL tag: `v2.0.0-alpha.0-schema` (Phase 2.3) + `v2.0.0-alpha.1-workflows` (Phase 2.4) + `v2.0.0-rc.1` (Phase 2.5) + `v2.0.0` (Phase 2.6 close, GA target)
|
|
3020
|
+
|
|
3021
|
+
## [1.0.4] - 2026-05-20
|
|
3022
|
+
|
|
3023
|
+
### Fixed
|
|
3024
|
+
- MCP installer idempotent semantic — already-existing MCP servers (exit=1 + "already exists in .mcp.json" stderr) are no longer reported as failures; they return `ok: true, alreadyInstalled: true` per ADR 0004 contract (user v1.0.3 ship feedback: chrome-devtools-mcp / exa-mcp / tavily-mcp showing `[B] failed` on repeat `harnessed setup`)
|
|
3025
|
+
|
|
3026
|
+
### Changed
|
|
3027
|
+
- `src/cli/install-base.ts` + `src/cli/setup.ts` Step B output now uses 4-category format: `installed / already-installed / skipped / failed`; already-installed items print `[B] already-installed <name> — run /mcp in Claude Code to verify connection` instead of `[B] failed`
|
|
3028
|
+
- `src/installers/lib/types.ts` — `InstallResult` union extended with `{ ok: true; alreadyInstalled: true; backupId: string }` discriminant (ADR 0004 idempotent sub-state of success)
|
|
3029
|
+
|
|
3030
|
+
### Added
|
|
3031
|
+
- Post-setup hint message: "MCP servers configured. Run `/mcp` in Claude Code to verify each server's connection status. If a server shows disconnected, restart Claude Code or check the MCP command spec." — shown when any MCP server is installed or already-installed
|
|
3032
|
+
|
|
3033
|
+
## [1.0.3] - 2026-05-20
|
|
3034
|
+
|
|
3035
|
+
### Performance
|
|
3036
|
+
- `harnessed setup` Step B (install-base auto-glob) serial → parallel via `Promise.allSettled` (~75% speedup; 16 manifests 30-50 sec → 5-10 sec total; user feedback v1.0.2 ship)
|
|
3037
|
+
|
|
3038
|
+
### Changed
|
|
3039
|
+
- `src/cli/setup.ts` Step B — replaced serial for-loop with `Promise.allSettled` concurrent manifest install; per-manifest error isolation (allSettled never short-circuits); timing logged in summary line (`[parallel X.Xs]`)
|
|
3040
|
+
|
|
3041
|
+
## [1.0.2] - 2026-05-20
|
|
3042
|
+
|
|
3043
|
+
### Added
|
|
3044
|
+
- `workflows/plan-feature/SKILL.md` NEW — Claude Code slash command `/plan-feature` now available after `harnessed setup` (Gap B fix; previously only `workflow.yaml` existed, CC could not load the slash command)
|
|
3045
|
+
|
|
3046
|
+
### Changed
|
|
3047
|
+
- `harnessed setup` default behavior — now executes immediately (one-shot onboarding for non-expert users); `--dry-run` flag opt-in for advanced preview (previously dry-run was the default, `--apply` was required)
|
|
3048
|
+
- `harnessed setup` now chains `install-base` auto-glob after workflow skill copy (Step A: copy SKILL.md dirs → Step B: install all `manifests/{tools,skill-packs}/*.yaml`); single command installs complete three-layer-stack profile
|
|
3049
|
+
|
|
3050
|
+
### Fixed
|
|
3051
|
+
- README + `docs/WORKFLOW.md` namespace claim — `/harnessed:plan-feature` → `/plan-feature` to align with actual `SKILL.md` `name:` field (Gap A fix; Claude Code loads bare names, not namespaced)
|
|
3052
|
+
|
|
3053
|
+
## [1.0.1] - 2026-05-22
|
|
3054
|
+
|
|
3055
|
+
### Fixed
|
|
3056
|
+
- `install.ts` — manifest path resolution via `getPackageRoot()` instead of `process.cwd()` (global install users now work)
|
|
3057
|
+
- `install-base.ts` — `listBaseManifests` root via `getPackageRoot()` instead of `process.cwd()`
|
|
3058
|
+
- `uninstall.ts` — manifest path resolution via `getPackageRoot()` instead of `process.cwd()`
|
|
3059
|
+
|
|
3060
|
+
### Added
|
|
3061
|
+
- `harnessed setup` — new one-time onboarding command; copies `workflows/*/SKILL.md` directories to `~/.claude/skills/<name>/` (dry-run by default, `--apply` to execute); fixes critical gap where README documented `setup` but command was never implemented
|
|
3062
|
+
- `src/cli/lib/packagePath.ts` — `getPackageRoot()` helper; single source of truth for package root resolution via `import.meta.url` (bundler-safe ESM)
|
|
3063
|
+
- 8 new tests (764 total): `packagePath` 3 cells + `setup` 5 cells
|
|
3064
|
+
|
|
3065
|
+
## [1.0.0] - 2026-05-22
|
|
3066
|
+
|
|
3067
|
+
### Added
|
|
3068
|
+
- Released to npm registry — `npm install harnessed` or `npx harnessed@latest setup` now live
|
|
3069
|
+
- `.github/workflows/publish.yml` — tag-triggered OIDC trusted publishing + sigstore provenance (ADR 0023)
|
|
3070
|
+
- ADR 0023 — Phase 6.1 npm publish release process (OIDC trusted publishing + sigstore provenance architecture)
|
|
3071
|
+
- 21 phases complete (20/20 pre-GA + Phase 6.1 GA ship) — 23 ADRs (0001-0023)
|
|
3072
|
+
- 756 tests stable (CI 3-OS green: ubuntu / macOS / Windows native)
|
|
3073
|
+
|
|
3074
|
+
### Changed
|
|
3075
|
+
- `package.json` — `private: true` removed + version `0.3.0` → `1.0.0` + `author` field added (D-05)
|
|
3076
|
+
- `README.md` badge — pre-launch status badge replaced with npm version shield (auto-tracks; D-03)
|
|
3077
|
+
- `README.md` Status section — v1.0 GA SHIPPED 2026-05-22; npm publish stream live; maintenance-only mode forward
|
|
3078
|
+
- `.planning/ROADMAP.md` — Phase 6.1 row → 🎯 SHIPPED; v1.0+ Maintenance-Only Mode forward outline added (D-07)
|
|
3079
|
+
- `docs/MAINTAINER-ONBOARDING.md` — post-v1.0 forward visibility NOTE added (D-08)
|
|
3080
|
+
- `.github/workflows/ci.yml` — A7 step iter 0022→0023 (ADR 0023 baseline tag verify)
|
|
3081
|
+
|
|
3082
|
+
### Note
|
|
3083
|
+
- 6-month co-maintainer organic clock opened 2026-05-22 (closes ~2026-11 per ADR 0020 D-04 HYBRID 2-clock)
|
|
3084
|
+
- Post-clock decision: maintenance-only mode if no co-maintainer recruited; continued active if recruited + healthy
|
|
3085
|
+
- Forward visibility (not negative-framing): see ROADMAP.md § v1.0+ and MAINTAINER-ONBOARDING.md § Post-v1.0
|
|
3086
|
+
|
|
3087
|
+
## [0.5.0] - 2026-05-22
|
|
3088
|
+
|
|
3089
|
+
### Added
|
|
3090
|
+
- R10.1 `harnessed audit-log` CLI subcommand — `--filter <jq-expr>` + dual format + 3 pagination flags (ADR 0021 D-01~D-04)
|
|
3091
|
+
- R10.2 `src/checkpoint/state.ts` LockHeldError + `withLock<T>()` — `proper-lockfile@4.1.2` concurrent write lock (ADR 0021 D-05~D-08)
|
|
3092
|
+
- R10.3 `harnessed uninstall <name>` CLI subcommand — 14th subcommand, dry-run default (ADR 0022 D-01~D-07)
|
|
3093
|
+
- R10.4 `src/manifest/lib/path-guard.ts` — 5 OWASP A1 vectors pre-compiled RegExp + `PathTraversalError` (ADR 0022 D-03/D-04/D-08)
|
|
3094
|
+
- v0.5.0 milestone archive triplet — `.planning/milestones/v0.5.0-{ROADMAP,REQUIREMENTS,MILESTONE-AUDIT}.md`
|
|
3095
|
+
- ROADMAP.md v1.0 chapter NEW — 9 GA criteria + Phase 6.1 outline + scope freeze guard (D-03 v1.0ChapterTiming)
|
|
3096
|
+
|
|
3097
|
+
### Changed
|
|
3098
|
+
- `scripts/check-state-archive-stale.mjs` — SIZE_LIMIT 200→175→165→150 progressive tightening (4 rounds: Phase 4.3 RELAX + Phase 5.1 FLIP + Phase 5.2 FLIP + Phase 5.3 DEFER)
|
|
3099
|
+
- `.planning/STATE.md` — D2 cadence iter 5+6+7 GRADUATION; Phase 5.1+5.2 narratives archived to RETROSPECTIVE.md
|
|
3100
|
+
- ADR family 0017→0022 (ADR 0021+0022 NEW across v0.5.0)
|
|
3101
|
+
|
|
3102
|
+
### Fixed
|
|
3103
|
+
- `.github/workflows/ci.yml` — A7 step retroactive iter 0018→0021 (ADR 0019+0020 retroactive fix; Phase 5.1)
|
|
3104
|
+
- `.github/workflows/ci.yml` — A7 step iter 0021→0022 (Phase 5.2)
|
|
3105
|
+
|
|
3106
|
+
## [0.5.0-alpha.2] - 2026-05-19
|
|
3107
|
+
|
|
3108
|
+
### Added
|
|
3109
|
+
- `harnessed uninstall <name>` CLI subcommand — 14th subcommand, dry-run default (R10.3; ADR 0022 D-01 through D-07)
|
|
3110
|
+
- `src/cli/uninstall.ts` — 115L uninstall CLI register (D-05 --dry-run default + D-06 --yes bypass + D-07 NO --keep-backup)
|
|
3111
|
+
- `src/uninstallers/` — 7 per-method uninstallers symmetric inverse of `src/installers/` (npmCli / mcpStdioAdd / mcpHttpAdd / ccPluginMarketplace / gitCloneWithSetup / npxSkillInstaller / ccHookAdd)
|
|
3112
|
+
- `src/manifest/lib/path-guard.ts` — NEW 36L path traversal guard: 5 OWASP A1 vectors pre-compiled RegExp + `PathTraversalError` D-08 + `checkPathSafe()` (R10.4; ADR 0022 D-03/D-04/D-08)
|
|
3113
|
+
- `src/cli/lib/validateFlags.ts` — NEW 27L extract: `validateNonInteractiveFlags()` dedup 5-site H1 gate (W0 #BH absorb)
|
|
3114
|
+
- `src/uninstallers/lib/runOrPreview.ts` — NEW dry-run gate helper for uninstaller dispatch (W0 #BI absorb)
|
|
3115
|
+
- ADR 0022 — Phase 5.2 R10.3 uninstall + R10.4 path traversal hardening (9-section format sister ADR 0021延袭)
|
|
3116
|
+
- `tests/manifest/lib/path-guard.test.ts` — 9 TDD cells (5 OWASP A1 vectors + D-08 safe-message + 3 negative controls)
|
|
3117
|
+
- `tests/cli/uninstall.test.ts` — 14 TDD cells (7-method dispatch + ephemeral + --yes + --apply matrix)
|
|
3118
|
+
|
|
3119
|
+
### Changed
|
|
3120
|
+
- `src/manifest/aliases.ts` `resolveAlias()` — +`checkPathSafe(name)` R10.4 D-04 site 1 (guard before yaml lookup)
|
|
3121
|
+
- `src/cli/install.ts` — +`checkPathSafe(resolvedName)` R10.4 D-04 site 2 (alias redirect defense-in-depth)
|
|
3122
|
+
- `src/cli/uninstall.ts` — +`checkPathSafe(resolvedName)` R10.4 D-04 site 2 (symmetric install.ts hardening)
|
|
3123
|
+
- `scripts/check-state-archive-stale.mjs` — SIZE_LIMIT 165→150 round 3 FLIP (W0 #BA resolve; 15L headroom)
|
|
3124
|
+
- `.github/workflows/ci.yml` — A7 step iter ADR 0001-0021 → ADR 0001-0022 single extend (NOT retroactive)
|
|
3125
|
+
- `src/cli/install.ts` + `install-base.ts` + `research.ts` + `manifest-add.ts` + `execute-task.ts` — H1 gate replaced with `validateNonInteractiveFlags()` import (#BH dedup)
|
|
3126
|
+
- `.planning/STATE.md` — D2 cadence iter 6 REINFORCE: Phase 5.1 narrative archived (141L ≤150L PASS)
|
|
3127
|
+
|
|
3128
|
+
## [0.5.0-alpha.1] - 2026-05-19
|
|
3129
|
+
|
|
3130
|
+
### Added
|
|
3131
|
+
- `harnessed audit-log` CLI subcommand — 13th subcommand, `--filter <jq-expr>` + dual format + 3 pagination flags (R10.1; ADR 0021 D-01 through D-04)
|
|
3132
|
+
- `src/cli/audit-log.ts` — 162L audit log consumer (D-01 jq subprocess + D-04 5-pattern redact + D-02 dual format)
|
|
3133
|
+
- `src/checkpoint/state.ts` LockHeldError + `withLock<T>()` + `writeCurrentWorkflow` wrap — proper-lockfile dir-level concurrent write lock (R10.2; ADR 0021 D-05 through D-08)
|
|
3134
|
+
- `proper-lockfile@4.1.2` runtime dependency — MIT, 5M weekly downloads, cross-OS
|
|
3135
|
+
- `src/cli/status.ts` — lockfile.check + mtime + STALE indicator (D-07 lock holder display)
|
|
3136
|
+
- ADR 0021 — Phase 5.1 R10.2 state lock + R10.1 audit consumer (9-section format)
|
|
3137
|
+
- `src/installers/lib/runClaudeArgs.ts` — reusable CC CLI spawn helper extract (W0 #BF absorb)
|
|
3138
|
+
- `src/installers/lib/err.ts` — reusable error constructor helper extract (W0 #BG absorb)
|
|
3139
|
+
|
|
3140
|
+
### Changed
|
|
3141
|
+
- `.github/workflows/ci.yml` — A7 step retroactive iter 0018→0021 (ADR 0019+0020 retroactive fix)
|
|
3142
|
+
- `scripts/check-state-archive-stale.mjs` — SIZE_LIMIT 175→165 round 2 (W0 #BA Phase 5.1 resolve)
|
|
3143
|
+
|
|
3144
|
+
## [0.4.0] - 2026-05-19
|
|
3145
|
+
|
|
3146
|
+
### Added
|
|
3147
|
+
- Routing audit log (`.harnessed/audit.log`) — JSONL append-only, 12-field schema, forward-only (R8.1)
|
|
3148
|
+
- `src/audit/log.ts` — JSONL append-only writer + AuditRecordSchema TypeBox (D-01)
|
|
3149
|
+
- `src/audit/hook.ts` — thin engine integration wrapper (5th PRIMARY helper family member)
|
|
3150
|
+
- ADR 0018 — routing audit log architecture (Phase 4.3 PRIMARY)
|
|
3151
|
+
- ADR 0019 — STATE dual-SoT 5-recurrence terminus COLLAPSE pattern (Phase 3.3 backfill)
|
|
3152
|
+
- ADR 0020 — HYBRID 2-clock disambiguation pattern (Phase 4.2 backfill)
|
|
3153
|
+
- `CHANGELOG.md` (this file) — Keep-a-Changelog format
|
|
3154
|
+
- v0.4.0 milestone archive triplet — `.planning/milestones/v0.4.0-{ROADMAP,REQUIREMENTS,MILESTONE-AUDIT}.md`
|
|
3155
|
+
- `docs/MAINTAINER-ONBOARDING.md` expanded — 50L → 111L additive (Phase 4.2; R8.2)
|
|
3156
|
+
- `.github/workflows/stale.yml` — 60-day mark + 90-day close on issue+PR (Phase 4.2; R8.3)
|
|
3157
|
+
- `.github/ISSUE_TEMPLATE/{01-bug,02-feature,03-question}.yml` + `config.yml` — yml form-based (Phase 4.2; R8.3)
|
|
3158
|
+
- `.github/FUNDING.yml` — single tier $1+ Karpathy YAGNI (Phase 4.2; R8.5)
|
|
3159
|
+
- GitHub Sponsors badge in README (Phase 4.2; R8.5)
|
|
3160
|
+
- `docs/benchmarks/v0.4.md` — 30-row dogfooding benchmark FULL per-task disclosure (Phase 4.1; R8.1 anchor)
|
|
3161
|
+
- `docs/benchmarks/v0.4-upgrade-e2e.log` — TEXT LOG zero-dep portable (Phase 4.1)
|
|
3162
|
+
- `docs/CONTRIBUTING-BENCHMARK.md` — MANUAL re-run cadence (Phase 4.1)
|
|
3163
|
+
|
|
3164
|
+
### Changed
|
|
3165
|
+
- `src/routing/engine.ts` — 4 `emitAudit` call sites + surgical comment shrink (200L EXACT ≤200L Karpathy hard limit; Phase 4.3 W1 T1.3)
|
|
3166
|
+
- `src/cli/doctor.ts` — 5 async checks parallelized via `Promise.all` (Phase 4.2 sister 3rd-cycle absorb #BT)
|
|
3167
|
+
- `scripts/check-state-archive-stale.mjs` — SIZE_LIMIT 200→175 round 2 RELAX (Phase 4.3 W0.2 #BA resolve)
|
|
3168
|
+
- `.github/workflows/ci.yml` — A7 step iter ADR 0001-0017 → ADR 0001-0018 integrity gate
|
|
3169
|
+
|
|
3170
|
+
### Fixed
|
|
3171
|
+
- Version sync drift across `src/index.ts` + `src/cli.ts` + `package.json` — both files now import `pkg.version` from package.json single SoT (Phase 4.2 ship sister H1 5996ea1)
|
|
3172
|
+
- `src/cli/audit.ts` N+1 file read in `auditOne` — refactored to accept optional pre-read src (Phase 4.2 ship sister H2 5996ea1)
|
|
3173
|
+
|
|
3174
|
+
[Unreleased]: https://github.com/easyinplay/harnessed/compare/v5.0.0...HEAD
|
|
3175
|
+
[5.0.0]: https://github.com/easyinplay/harnessed/compare/v4.49.2...v5.0.0
|
|
3176
|
+
[1.0.3]: https://github.com/easyinplay/harnessed/compare/v1.0.2...v1.0.3
|
|
3177
|
+
[1.0.2]: https://github.com/easyinplay/harnessed/compare/v1.0.1...v1.0.2
|
|
3178
|
+
[1.0.1]: https://github.com/easyinplay/harnessed/compare/v1.0.0...v1.0.1
|
|
3179
|
+
[1.0.0]: https://github.com/easyinplay/harnessed/compare/v0.5.0...v1.0.0
|
|
3180
|
+
[0.5.0]: https://github.com/easyinplay/harnessed/releases/tag/v0.5.0
|
|
3181
|
+
[0.5.0-alpha.2]: https://github.com/easyinplay/harnessed/releases/tag/v0.5.0-alpha.2
|
|
3182
|
+
[0.5.0-alpha.1]: https://github.com/easyinplay/harnessed/releases/tag/v0.5.0-alpha.1
|
|
3183
|
+
[0.4.0]: https://github.com/easyinplay/harnessed/releases/tag/v0.4.0
|