harnessed 4.20.0 → 4.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +46 -17
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/workflows/auto/SKILL.md +2 -1
- package/workflows/auto/SKILL.zh-Hans.md +2 -1
- package/workflows/discuss/auto/SKILL.md +5 -1
- package/workflows/discuss/auto/SKILL.zh-Hans.md +5 -1
- package/workflows/role-prompts.yaml +5 -3
- package/workflows/role-prompts.zh-Hans.yaml +5 -3
- package/workflows/task/code/SKILL.md +1 -1
- package/workflows/task/code/SKILL.zh-Hans.md +1 -1
package/dist/index.mjs
CHANGED
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,QAmGb,CAAA;;;AChGO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"4.
|
|
1
|
+
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,QAmGb,CAAA;;;AChGO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"4.21.0\",\n \"description\": \"AI coding harness package manager + composition orchestrator\",\n \"type\": \"module\",\n \"license\": \"Apache-2.0\",\n \"author\": \"easyinplay\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/easyinplay/harnessed.git\"\n },\n \"homepage\": \"https://github.com/easyinplay/harnessed#readme\",\n \"bugs\": \"https://github.com/easyinplay/harnessed/issues\",\n \"keywords\": [\n \"claude-code\",\n \"ai-harness\",\n \"package-manager\",\n \"composition\",\n \"skill-pack\",\n \"mcp\",\n \"orchestrator\"\n ],\n \"engines\": {\n \"node\": \">=22.0.0\"\n },\n \"packageManager\": \"pnpm@10.12.0\",\n \"bin\": {\n \"harnessed\": \"./dist/cli.mjs\",\n \"harnessed-inject-state\": \"./bin/harnessed-inject-state.mjs\"\n },\n \"main\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/index.d.ts\",\n \"import\": \"./dist/index.mjs\",\n \"default\": \"./dist/index.mjs\"\n },\n \"./schemas\": {\n \"types\": \"./dist/schemas/index.d.ts\",\n \"import\": \"./dist/schemas/index.mjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"bin\",\n \"manifests\",\n \"messages\",\n \"workflows\",\n \"routing\",\n \"config-templates\",\n \"schemas\",\n \"README.md\",\n \"LICENSE\",\n \"NOTICE\",\n \"THIRD-PARTY-NOTICES.md\"\n ],\n \"scripts\": {\n \"dev\": \"tsup --watch\",\n \"build\": \"tsc --noEmit && tsup\",\n \"build:schema\": \"node ./scripts/build-schema.mjs\",\n \"validate:schema\": \"node ./scripts/validate-schema.mjs\",\n \"typecheck\": \"tsc --noEmit\",\n \"test\": \"vitest run --passWithNoTests\",\n \"test:watch\": \"vitest\",\n \"test:coverage\": \"vitest run --coverage --passWithNoTests\",\n \"bench\": \"vitest bench --run\",\n \"lint\": \"biome check .\",\n \"lint:fix\": \"biome check --write .\",\n \"format\": \"biome format --write .\",\n \"build:binary\": \"bun scripts/build-binary.mjs\"\n },\n \"dependencies\": {\n \"@anthropic-ai/claude-agent-sdk\": \"0.3.142\",\n \"@clack/prompts\": \"^0.10.1\",\n \"@sinclair/typebox\": \"^0.34.49\",\n \"ajv\": \"^8.20.0\",\n \"ajv-errors\": \"^3.0.0\",\n \"ajv-formats\": \"^3.0.1\",\n \"commander\": \"^13.0.0\",\n \"diff\": \"^9.0.0\",\n \"expr-eval\": \"^2.0.2\",\n \"picocolors\": \"^1.1.1\",\n \"proper-lockfile\": \"^4.1.2\",\n \"yaml\": \"^2.9.0\"\n },\n \"devDependencies\": {\n \"@biomejs/biome\": \"^2.0.0\",\n \"@types/node\": \"^22.10.0\",\n \"@types/proper-lockfile\": \"^4.1.4\",\n \"@vitest/coverage-v8\": \"^4.0.0\",\n \"tsup\": \"^8.3.0\",\n \"typescript\": \"^5.6.0\",\n \"vitest\": \"^4.0.0\"\n },\n \"pnpm\": {\n \"onlyBuiltDependencies\": [\n \"esbuild\"\n ]\n }\n}\n","// Main library entry — re-exports public APIs.\n// phase 1.1 batch 1: skeleton only; schema validator wired in batch 2 (T3+).\n\nimport pkg from '../package.json' with { type: 'json' }\n\nexport const VERSION = pkg.version\n"]}
|
package/package.json
CHANGED
package/workflows/auto/SKILL.md
CHANGED
|
@@ -58,7 +58,8 @@ K8 ctx single snapshot:auto top-level invoke 1 snapshot, pass to all 6 spawn
|
|
|
58
58
|
- **Pre-flight gates**: complexity assessment + understanding check (interactive prompts)
|
|
59
59
|
- **Continuous chain**: 6 stage 一行命令跑完, 中间不停
|
|
60
60
|
- **Fail-fast**: 任一 stage fail 立即停, `harnessed resume` 续
|
|
61
|
-
- **
|
|
61
|
+
- **New-project bootstrap**: `.planning/ROADMAP.md` missing → stage ① runs `/gsd-new-project` (when available) or creates the minimal ROADMAP/STATE/REQUIREMENTS skeleton first
|
|
62
|
+
- **Context 自动传递**: planning-with-files `.planning/phases/<NN>-<slug>/` 喂下 stage
|
|
62
63
|
- **Retro mandatory**: auto mode hands-off scenario,末尾强制 `/retro` 总结 (无 opt-out flag)
|
|
63
64
|
- **沿用 sister planning-with-files /plan 持久化 cadence**
|
|
64
65
|
|
|
@@ -58,7 +58,8 @@ K8 ctx single snapshot:auto 顶层调用 1 个 snapshot,传递给全部 6
|
|
|
58
58
|
- **Pre-flight 关卡**: complexity assessment + understanding check (交互式提示)
|
|
59
59
|
- **连续 chain**: 6 个 stage 一行命令跑完,中间不停
|
|
60
60
|
- **Fail-fast**: 任一 stage 失败立即停止,`harnessed resume` 续跑
|
|
61
|
-
-
|
|
61
|
+
- **新项目引导**: `.planning/ROADMAP.md` 缺失时 stage ① 先跑 `/gsd-new-project`(可用时)或先创建 ROADMAP/STATE/REQUIREMENTS 最小骨架
|
|
62
|
+
- **Context 自动传递**: planning-with-files `.planning/phases/<NN>-<slug>/` 喂给下游 stage
|
|
62
63
|
- **Retro mandatory**: auto mode hands-off 场景,末尾强制 `/retro` 总结 (无 opt-out flag)
|
|
63
64
|
- **沿用 sister planning-with-files /plan 持久化 cadence**
|
|
64
65
|
|
|
@@ -57,13 +57,17 @@ Clarification needs real user dialogue, so run this stage directly in THIS sessi
|
|
|
57
57
|
spawn it, and do NOT improvise: follow these steps so the locked spec is persisted for the
|
|
58
58
|
execution stages.
|
|
59
59
|
|
|
60
|
+
0. **New-project bootstrap** — if `.planning/ROADMAP.md` does not exist: invoke `/gsd-new-project` when that skill is available; otherwise create the minimal skeleton before continuing (then phase dirs follow `.planning/phases/<NN>-<slug>/`):
|
|
61
|
+
- `ROADMAP.md`: `# Roadmap` + one table row per phase: `| 01 | <slug> | <one-line goal> | in-progress |`
|
|
62
|
+
- `STATE.md`: `# STATE (digest — keep <100 lines)` + `current: phase 01-<slug> / stage discuss` + `next: <action>`
|
|
63
|
+
- `REQUIREMENTS.md`: `# Requirements` + numbered rows `- R1: <verifiable acceptance criterion>`
|
|
60
64
|
1. Evaluate the clarification criteria for "$ARGUMENTS":
|
|
61
65
|
- **Strategic** — new feature / milestone / unclear business scope → gstack `/office-hours` + `/plan-ceo-review`
|
|
62
66
|
- **Phase** — ≥2 open implementation decisions / unclear cross-phase API contract → GSD `/gsd-discuss-phase`
|
|
63
67
|
- **Subtask** — ≥2 distinct approaches / core algorithm / API contract design / high error cost → superpowers brainstorming
|
|
64
68
|
2. For each layer that fires, hold the dialogue with the user (use AskUserQuestion for option-style decisions) and lock every open decision.
|
|
65
69
|
3. Transparent-skip layers that don't fire — state which were skipped and why.
|
|
66
|
-
4. Persist the locked decisions to `.planning
|
|
70
|
+
4. Persist the locked decisions to `.planning/phases/<NN>-<slug>/` via planning-with-files (`findings.md` / `task_plan.md`; NN = two-digit, one above the highest existing phase dir).
|
|
67
71
|
|
|
68
72
|
Output: a locked spec the execution stages (`/plan` → `/task` → `/verify`) consume without further user input.
|
|
69
73
|
|
|
@@ -56,13 +56,17 @@ Sister `workflows/capabilities.yaml`:
|
|
|
56
56
|
澄清需要真实用户对话,所以本阶段直接在**本 session** 跑 —— **不要** spawn,也**不要**自行演绎:
|
|
57
57
|
按以下步骤走,把 locked spec 持久化给执行阶段。
|
|
58
58
|
|
|
59
|
+
0. **新项目引导** —— 若 `.planning/ROADMAP.md` 不存在:`/gsd-new-project` skill 可用则先调用它;不可用则先创建最小骨架再继续(后续 phase 目录遵循 `.planning/phases/<NN>-<slug>/`):
|
|
60
|
+
- `ROADMAP.md`:`# Roadmap` + 每 phase 一行表:`| 01 | <slug> | <一行目标> | in-progress |`
|
|
61
|
+
- `STATE.md`:`# STATE (digest — 保持 <100 行)` + `current: phase 01-<slug> / stage discuss` + `next: <动作>`
|
|
62
|
+
- `REQUIREMENTS.md`:`# Requirements` + 编号行 `- R1: <可验证的验收标准>`
|
|
59
63
|
1. 对 "$ARGUMENTS" 评估澄清判据:
|
|
60
64
|
- **战略层** —— 新功能 / 新 milestone / 商业 scope 不清 → gstack `/office-hours` + `/plan-ceo-review`
|
|
61
65
|
- **Phase 层** —— ≥2 个 open implementation decision / 跨 phase API contract 不清 → GSD `/gsd-discuss-phase`
|
|
62
66
|
- **子任务层** —— ≥2 个不同方案 / 核心算法 / API contract 设计 / 高错误成本 → superpowers brainstorming
|
|
63
67
|
2. 对每个 fire 的层与用户对话(option 型决策用 AskUserQuestion),锁定每个 open decision。
|
|
64
68
|
3. 不 fire 的层透明 skip —— 说明哪些被 skip 及原因。
|
|
65
|
-
4. 把 locked 决策持久化到 `.planning
|
|
69
|
+
4. 把 locked 决策持久化到 `.planning/phases/<NN>-<slug>/`(planning-with-files 的 `findings.md` / `task_plan.md`;NN = 两位数,取现有最大 phase 目录号 + 1)。
|
|
66
70
|
|
|
67
71
|
产出:一份 locked spec,执行阶段(`/plan` → `/task` → `/verify`)无需再问用户即可消费。
|
|
68
72
|
|
|
@@ -132,7 +132,7 @@ prompts:
|
|
|
132
132
|
- "Cite version explicitly when discussing library / framework APIs (training cutoff may be stale)"
|
|
133
133
|
- "Capture conflicting sources side-by-side; do not silently pick one"
|
|
134
134
|
- "Flag `OPEN: <question>` for items the user must decide; never paper over"
|
|
135
|
-
- "Persist results to `.planning/<
|
|
135
|
+
- "Persist results to `.planning/phases/<NN>-<slug>/findings.md` for cross-session handoff (NN = two-digit, one above the highest existing phase dir; slug = kebab-case short name)"
|
|
136
136
|
severity: "verified / unverified / conflicting / open"
|
|
137
137
|
description: "Multi-source research producing a citation-backed findings.md (no speculation)."
|
|
138
138
|
|
|
@@ -183,11 +183,12 @@ prompts:
|
|
|
183
183
|
enters planning. Fires when ≥2 open decisions, cross-phase data flow is
|
|
184
184
|
unclear, or scope spans >1 day. Adapted from GSD `/gsd-discuss-phase`.
|
|
185
185
|
checklist:
|
|
186
|
+
- "If the `/gsd-discuss-phase` skill is available, invoke it directly and adopt its output structure; only fall back to the steps below when it is not"
|
|
186
187
|
- "List every open decision as a single question (1 line each)"
|
|
187
188
|
- "For each, list 2-4 candidate answers with one-line tradeoffs"
|
|
188
189
|
- "Identify cross-phase contracts (data flow / API shape / migration order)"
|
|
189
190
|
- "Flag decisions blocking start (must answer before plan) vs. deferrable"
|
|
190
|
-
- "Persist to `.planning/<
|
|
191
|
+
- "Persist to `.planning/phases/<NN>-<slug>/findings.md` + `knowledge.md` for hand-off (NN = two-digit, one above the highest existing phase dir; slug = kebab-case short name)"
|
|
191
192
|
- "If the layer is genuinely clear, say 'no clarification needed' and exit"
|
|
192
193
|
severity: "blocking / deferrable / resolved"
|
|
193
194
|
description: "Surface gray-area phase decisions, list candidate answers, mark blocking vs. deferrable."
|
|
@@ -253,12 +254,13 @@ prompts:
|
|
|
253
254
|
plugin. Adapted from GSD `/gsd-plan-phase` (Wave A research → Wave B
|
|
254
255
|
planner → Wave C plan-checker).
|
|
255
256
|
checklist:
|
|
257
|
+
- "If the `/gsd-plan-phase` skill is available, invoke it directly and adopt its output structure; only fall back to the steps below when it is not"
|
|
256
258
|
- "Each task names the exact files it touches (NOT just 'auth module')"
|
|
257
259
|
- "Each task has acceptance criteria a third party can verify"
|
|
258
260
|
- "Dependencies are explicit (task N requires task M output)"
|
|
259
261
|
- "Tasks are ≤1 day each; split if larger"
|
|
260
262
|
- "Identify the verification step (test / lint / typecheck) for each task"
|
|
261
|
-
- "Persist as `task_plan.md` + `progress.md` via planning-with-files `/plan`"
|
|
263
|
+
- "Persist as `task_plan.md` + `progress.md` under `.planning/phases/<NN>-<slug>/` via planning-with-files `/plan`"
|
|
262
264
|
- "Final pass: a fresh agent should be able to execute from these files alone"
|
|
263
265
|
severity: "ready-to-execute / needs-revision / blocked"
|
|
264
266
|
description: "Break a phase into ordered tasks with file paths + acceptance criteria; persist via planning-with-files."
|
|
@@ -119,7 +119,7 @@ prompts:
|
|
|
119
119
|
- "讨论 library / framework API 时显式标注版本(训练截止可能已过时)"
|
|
120
120
|
- "把相互冲突的来源并列呈现;不要悄悄只选一个"
|
|
121
121
|
- "用户必须裁决的事项标 `OPEN: <问题>`;绝不掩盖"
|
|
122
|
-
- "结果持久化到 `.planning/<
|
|
122
|
+
- "结果持久化到 `.planning/phases/<NN>-<slug>/findings.md`,供跨 session 交接(NN = 两位数,取现有最大 phase 目录号 + 1;slug = kebab 短名)"
|
|
123
123
|
severity: "verified / unverified / conflicting / open"
|
|
124
124
|
description: "多源调研产出带引用支撑的 findings.md(不臆测)。"
|
|
125
125
|
|
|
@@ -169,11 +169,12 @@ prompts:
|
|
|
169
169
|
待决决策、跨 phase 数据流不清,或范围跨度 >1 天。改写自 GSD
|
|
170
170
|
`/gsd-discuss-phase`。
|
|
171
171
|
checklist:
|
|
172
|
+
- "若 `/gsd-discuss-phase` skill 可用,直接调用它并沿用其产物结构;仅在不可用时按以下步骤手工执行"
|
|
172
173
|
- "把每个待决决策列成一个单独问题(每条 1 行)"
|
|
173
174
|
- "对每个问题,列 2-4 个候选答案并附一行 tradeoff"
|
|
174
175
|
- "识别跨 phase 契约(数据流 / API 形态 / 迁移顺序)"
|
|
175
176
|
- "标出阻塞启动的决策(规划前必须答)vs. 可延后的"
|
|
176
|
-
- "持久化到 `.planning/<
|
|
177
|
+
- "持久化到 `.planning/phases/<NN>-<slug>/findings.md` + `knowledge.md` 以便交接(NN = 两位数,取现有最大 phase 目录号 + 1;slug = kebab 短名)"
|
|
177
178
|
- "若该层确实已清晰,直说『无需澄清』并退出"
|
|
178
179
|
severity: "blocking / deferrable / resolved"
|
|
179
180
|
description: "浮现灰区 phase 决策,列出候选答案,标明阻塞 vs. 可延后。"
|
|
@@ -236,12 +237,13 @@ prompts:
|
|
|
236
237
|
`/gsd-plan-phase`(Wave A research → Wave B planner → Wave C
|
|
237
238
|
plan-checker)。
|
|
238
239
|
checklist:
|
|
240
|
+
- "若 `/gsd-plan-phase` skill 可用,直接调用它并沿用其产物结构;仅在不可用时按以下步骤手工执行"
|
|
239
241
|
- "每个任务点名它触碰的确切文件(不是只写『auth 模块』)"
|
|
240
242
|
- "每个任务有第三方可验证的验收标准"
|
|
241
243
|
- "依赖显式化(任务 N 需要任务 M 的产出)"
|
|
242
244
|
- "每个任务 ≤1 天;更大就拆"
|
|
243
245
|
- "为每个任务指明验证步骤(test / lint / typecheck)"
|
|
244
|
-
- "经 planning-with-files `/plan` 持久化为 `task_plan.md` + `progress.md
|
|
246
|
+
- "经 planning-with-files `/plan` 持久化为 `task_plan.md` + `progress.md`,目录为 `.planning/phases/<NN>-<slug>/`"
|
|
245
247
|
- "最后过一遍:一个全新 agent 仅凭这些文件就能执行"
|
|
246
248
|
severity: "ready-to-execute / needs-revision / blocked"
|
|
247
249
|
description: "把 phase 拆成带文件路径 + 验收标准的有序任务;经 planning-with-files 持久化。"
|
|
@@ -61,7 +61,7 @@ grep/glob/file-by-file Read crawling. No `.codegraph/` → skip this (no install
|
|
|
61
61
|
## Phase 02-progress planning-with-files plugin 真接 (Q-AUDIT-5a LOCKED Option A)
|
|
62
62
|
|
|
63
63
|
02-progress invokes the **Claude Code plugin** slash command `/plan` to update
|
|
64
|
-
`progress.md` in `.planning/<
|
|
64
|
+
`progress.md` in `.planning/phases/<NN>-<slug>/` — 跟踪 subtask 完成 / blocked / next step
|
|
65
65
|
per bundled "跨 session 恢复" 模式 + R20.6 Manus-style 持久化. Requires the
|
|
66
66
|
`planning-with-files` Claude Code plugin (install via Claude Code plugin
|
|
67
67
|
marketplace).
|
|
@@ -61,7 +61,7 @@ codegraph MCP 工具(`codegraph_explore`),替代 grep/glob/逐文件 Read
|
|
|
61
61
|
## Phase 02-progress planning-with-files plugin 直接对接 (Q-AUDIT-5a LOCKED Option A)
|
|
62
62
|
|
|
63
63
|
02-progress 调用 **Claude Code plugin** slash command `/plan` 更新
|
|
64
|
-
`.planning/<
|
|
64
|
+
`.planning/phases/<NN>-<slug>/` 下的 `progress.md`——跟踪 subtask 完成 / blocked / next step,
|
|
65
65
|
遵循捆绑的「跨 session 恢复」模式 + R20.6 Manus-style 持久化。需要安装
|
|
66
66
|
`planning-with-files` Claude Code plugin(通过 Claude Code plugin marketplace 安装)。
|
|
67
67
|
|