harnessed 4.23.0 → 4.23.2
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 +142 -60
- 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 +1 -1
- package/workflows/auto/SKILL.zh-Hans.md +1 -1
- package/workflows/discuss/auto/SKILL.md +1 -1
- package/workflows/discuss/auto/SKILL.zh-Hans.md +1 -1
- package/workflows/role-prompts.yaml +2 -0
- package/workflows/role-prompts.zh-Hans.yaml +2 -0
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.23.
|
|
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.23.2\",\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
|
@@ -119,7 +119,7 @@ Do NOT improvise an equivalent flow from the Overview above: freelancing bypasse
|
|
|
119
119
|
Do NOT pipe to `harnessed run auto` — that is the CI/headless path (in-process SDK spawn
|
|
120
120
|
that blocks the session, bypasses Agent Teams, and hangs inside Claude Code).
|
|
121
121
|
|
|
122
|
-
1. FIRST run the discuss stage interactively in THIS session (spawned subagents cannot ask the user questions). Evaluate strategic / phase / subtask clarification criteria for "$ARGUMENTS"; dialogue with the user (AskUserQuestion) for each layer that fires, lock decisions, transparent-skip the rest. Produce a locked spec.
|
|
122
|
+
1. FIRST run the discuss stage interactively in THIS session (spawned subagents cannot ask the user questions). Evaluate strategic / phase / subtask clarification criteria for "$ARGUMENTS"; dialogue with the user (AskUserQuestion) for each layer that fires, lock decisions, transparent-skip the rest. After locking blocking decisions, relay the deferrable set to the user in a single batched AskUserQuestion with each agent-recommended default pre-selected — deferrable defers scheduling, not user authority; only skip an item if the user explicitly defers it again. Produce a locked spec.
|
|
123
123
|
2. Bash: `harnessed gates auto --task "<locked spec>" --skip-sub clarify` → parse the JSON `{fire, skip, parallelism}`. This is the plan SoT (no spawn). Keep the verbatim JSON. For a small self-contained task (single-file / single-page class), the sanctioned lite path is adding `--skip-sub verify --skip-sub retro` (repeatable / comma-separated) — skipped subs are still recorded in the ledger with reasons; lite ≠ freestyle (the ledger/evidence IS the difference).
|
|
124
124
|
3. Bash: `harnessed checkpoint start auto --plan '<the verbatim gates JSON from step 2>'` → seeds the per-sub ledger so `harnessed status --recover` can re-orient you after compaction.
|
|
125
125
|
4. If `parallelism.escalate_to_teams === true`: read `~/.claude/rules/agent-teams.md`, then drive the fired subs as an Agent Team (`TeamCreate` → `Agent(name, team_name, …)` per sub with its `harnessed prompt <sub>` prompt → coordinate via `SendMessage` → `SendMessage shutdown_request` + `TeamDelete`). Still checkpoint each sub (`complete` / `fail`) as below.
|
|
@@ -117,7 +117,7 @@ Sister `workflows/capabilities.yaml`:
|
|
|
117
117
|
**不要** pipe 到 `harnessed run auto` —— 那是 CI/headless 路径(in-process SDK spawn,会阻塞
|
|
118
118
|
session、绕过 Agent Teams,在 Claude Code 内部调用时会挂死)。
|
|
119
119
|
|
|
120
|
-
1. 先在**本 session** 交互式跑 discuss 阶段(spawned subagent 无法向用户提问):对 "$ARGUMENTS" 评估 strategic / phase / subtask 澄清判据,对每个 fire 的层用 AskUserQuestion 与用户对话锁决策,其余透明 skip
|
|
120
|
+
1. 先在**本 session** 交互式跑 discuss 阶段(spawned subagent 无法向用户提问):对 "$ARGUMENTS" 评估 strategic / phase / subtask 澄清判据,对每个 fire 的层用 AskUserQuestion 与用户对话锁决策,其余透明 skip。blocking 集锁定后,把 deferrable 集以单轮批量 AskUserQuestion 转达给用户(各项 agent 推荐默认值预选)—— deferrable 推迟的是排期,不是用户决策权;仅当用户明确再次推迟才可跳过该项。产出 locked spec。
|
|
121
121
|
2. Bash: `harnessed gates auto --task "<locked spec>" --skip-sub clarify` → 解析 JSON `{fire, skip, parallelism}`。这是 plan SoT(不 spawn)。保留 verbatim JSON。自包含小任务(单文件/单页面级)的合规轻量路径:追加 `--skip-sub verify --skip-sub retro`(可重复/逗号分隔)——被 skip 的 sub 仍带原因进 ledger;lite ≠ freestyle(差别就在 ledger/evidence)。
|
|
122
122
|
3. Bash: `harnessed checkpoint start auto --plan '<step 2 的 verbatim gates JSON>'` → seed per-sub ledger,让 `harnessed status --recover` 能在 compaction 后给你重新定位。
|
|
123
123
|
4. 若 `parallelism.escalate_to_teams === true`:读 `~/.claude/rules/agent-teams.md`,然后把 fired subs 作为 Agent Team 驱动(`TeamCreate` → 每个 sub `Agent(name, team_name, …)` + 其 `harnessed prompt <sub>` prompt → 用 `SendMessage` 协调 → `SendMessage shutdown_request` + `TeamDelete`)。每个 sub 仍按下方 checkpoint(`complete` / `fail`)。
|
|
@@ -65,7 +65,7 @@ execution stages.
|
|
|
65
65
|
- **Strategic** — new feature / milestone / unclear business scope → gstack `/office-hours` + `/plan-ceo-review`
|
|
66
66
|
- **Phase** — ≥2 open implementation decisions / unclear cross-phase API contract → GSD `/gsd-discuss-phase`
|
|
67
67
|
- **Subtask** — ≥2 distinct approaches / core algorithm / API contract design / high error cost → superpowers brainstorming
|
|
68
|
-
2. For each layer that fires, hold the dialogue with the user (use AskUserQuestion for option-style decisions) and lock every open decision.
|
|
68
|
+
2. For each layer that fires, hold the dialogue with the user (use AskUserQuestion for option-style decisions) and lock every open decision. After locking blocking decisions, relay the deferrable set to the user in a single batched AskUserQuestion with each agent-recommended default pre-selected — only skip an item if the user explicitly defers it again; a deferrable item is never resolved without the user seeing it.
|
|
69
69
|
3. Transparent-skip layers that don't fire — state which were skipped and why.
|
|
70
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).
|
|
71
71
|
|
|
@@ -64,7 +64,7 @@ Sister `workflows/capabilities.yaml`:
|
|
|
64
64
|
- **战略层** —— 新功能 / 新 milestone / 商业 scope 不清 → gstack `/office-hours` + `/plan-ceo-review`
|
|
65
65
|
- **Phase 层** —— ≥2 个 open implementation decision / 跨 phase API contract 不清 → GSD `/gsd-discuss-phase`
|
|
66
66
|
- **子任务层** —— ≥2 个不同方案 / 核心算法 / API contract 设计 / 高错误成本 → superpowers brainstorming
|
|
67
|
-
2. 对每个 fire 的层与用户对话(option 型决策用 AskUserQuestion),锁定每个 open decision。
|
|
67
|
+
2. 对每个 fire 的层与用户对话(option 型决策用 AskUserQuestion),锁定每个 open decision。blocking 集锁定后,把 deferrable 集以单轮批量 AskUserQuestion 转达给用户(各项 agent 推荐默认值预选)—— 仅当用户明确再次推迟才可跳过该项;deferrable 项绝不允许在用户未见的情况下被 resolve。
|
|
68
68
|
3. 不 fire 的层透明 skip —— 说明哪些被 skip 及原因。
|
|
69
69
|
4. 把 locked 决策持久化到 `.planning/phases/<NN>-<slug>/`(planning-with-files 的 `findings.md` / `task_plan.md`;NN = 两位数,取现有最大 phase 目录号 + 1)。
|
|
70
70
|
|
|
@@ -188,6 +188,8 @@ prompts:
|
|
|
188
188
|
- "For each, list 2-4 candidate answers with one-line tradeoffs"
|
|
189
189
|
- "Identify cross-phase contracts (data flow / API shape / migration order)"
|
|
190
190
|
- "Flag decisions blocking start (must answer before plan) vs. deferrable"
|
|
191
|
+
- "Deferrable = safe to default only AFTER the user has one chance to override: the orchestrator relays the deferrable set in ONE batched AskUserQuestion with recommended defaults pre-selected — a deferrable item is NOT resolved without the user"
|
|
192
|
+
- "Deferrable only if the default is reversible AND does not change the nature of any requirement (testable assertion → structural identity, changed acceptance method, altered cross-phase contract shape); if it does, mark it blocking. 'Both candidates satisfy the requirement as written' is NOT sufficient to defer"
|
|
191
193
|
- "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)"
|
|
192
194
|
- "If the layer is genuinely clear, say 'no clarification needed' and exit"
|
|
193
195
|
severity: "blocking / deferrable / resolved"
|
|
@@ -174,6 +174,8 @@ prompts:
|
|
|
174
174
|
- "对每个问题,列 2-4 个候选答案并附一行 tradeoff"
|
|
175
175
|
- "识别跨 phase 契约(数据流 / API 形态 / 迁移顺序)"
|
|
176
176
|
- "标出阻塞启动的决策(规划前必须答)vs. 可延后的"
|
|
177
|
+
- "deferrable = 仅在用户有一次 override 机会之后才可采用默认值:orchestrator 必须把 deferrable 集以单轮批量 AskUserQuestion 转达给用户(推荐默认值预选)—— deferrable 项不允许在用户不知情时被 resolve"
|
|
178
|
+
- "仅当默认值可逆且不会改变任何需求的本质(可测试断言 → 结构恒真、验收方法变更、跨 phase contract 形态改变)时才可标 deferrable;若会改变,升格为 blocking。『两个候选都满足现有需求原文』不足以 defer"
|
|
177
179
|
- "持久化到 `.planning/phases/<NN>-<slug>/findings.md` + `knowledge.md` 以便交接(NN = 两位数,取现有最大 phase 目录号 + 1;slug = kebab 短名)"
|
|
178
180
|
- "若该层确实已清晰,直说『无需澄清』并退出"
|
|
179
181
|
severity: "blocking / deferrable / resolved"
|