harnessed 4.23.2 → 4.25.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/bin/harnessed-inject-state.mjs +63 -2
- package/dist/cli.mjs +122 -3
- 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/role-prompts.yaml +5 -0
- package/workflows/role-prompts.zh-Hans.yaml +5 -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.
|
|
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.25.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
|
@@ -190,6 +190,7 @@ prompts:
|
|
|
190
190
|
- "Flag decisions blocking start (must answer before plan) vs. deferrable"
|
|
191
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
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"
|
|
193
|
+
- "Red flags — all invalid excuses to skip the relay: 'small change, no confirmation needed' / 'the user would probably agree' / 'the recommendation is obvious, adopt the default' / 'asking interrupts the flow'. Decision points have no size exception — relay anyway"
|
|
193
194
|
- "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)"
|
|
194
195
|
- "If the layer is genuinely clear, say 'no clarification needed' and exit"
|
|
195
196
|
severity: "blocking / deferrable / resolved"
|
|
@@ -409,6 +410,7 @@ prompts:
|
|
|
409
410
|
- "Inline code comments / docstrings — does the change violate stated invariants?"
|
|
410
411
|
- "Score each finding 0-100; drop <80; cite file:line for kept findings"
|
|
411
412
|
- "Avoid: pre-existing issues, linter-catchable nits, lines user did not modify"
|
|
413
|
+
- "Severity discipline: 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"
|
|
412
414
|
severity: "critical / high / medium (only findings ≥80 confidence are reported)"
|
|
413
415
|
description: "Multi-agent code review fan-out — diff vs base branch with confidence-filtered findings."
|
|
414
416
|
|
|
@@ -430,6 +432,7 @@ prompts:
|
|
|
430
432
|
- "Column/field name safety — ORM .select/.eq columns match schema"
|
|
431
433
|
- "Type coercion at boundaries — hash/digest inputs normalized before serialize"
|
|
432
434
|
- "Time window safety — date-key lookups assuming 24h coverage; mismatched buckets between features"
|
|
435
|
+
- "Severity discipline: 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"
|
|
433
436
|
severity: "CRITICAL / INFORMATIONAL (Fix-First Heuristic — critical → ASK, informational → AUTO-FIX)"
|
|
434
437
|
description: "Paranoid Staff Engineer pre-landing review (default-suspect mode, critical+informational two-pass)."
|
|
435
438
|
|
|
@@ -449,6 +452,7 @@ prompts:
|
|
|
449
452
|
- "States: empty, loading, error, overflow — none look like AI placeholder"
|
|
450
453
|
- "Mobile: 375x812 viewport — real layout, not stacked desktop"
|
|
451
454
|
- "Authenticated paths if creds / cookies provided; depth > breadth on core flows"
|
|
455
|
+
- "Severity discipline: 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"
|
|
452
456
|
severity: "blocker / major / minor / nit"
|
|
453
457
|
description: "End-to-end QA pass — orient / explore / forms / states / responsive (depth > breadth on core flows)."
|
|
454
458
|
|
|
@@ -468,6 +472,7 @@ prompts:
|
|
|
468
472
|
- "Dockerfiles: missing USER (root), secrets as ARG, .env in image, exposed ports without purpose"
|
|
469
473
|
- "IaC: wildcard IAM, hardcoded secrets in .tfvars, privileged containers, hostNetwork in K8s"
|
|
470
474
|
- "Dependency audit (npm audit / pip-audit / bundler-audit) — note SKIPPED tools rather than fail audit"
|
|
475
|
+
- "Severity discipline: 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"
|
|
471
476
|
severity: "CRITICAL / HIGH / MEDIUM / LOW / INFO"
|
|
472
477
|
description: "CSO security audit — OWASP Top 10 + secrets archaeology + CI/CD / Docker / IaC hardening."
|
|
473
478
|
|
|
@@ -176,6 +176,7 @@ prompts:
|
|
|
176
176
|
- "标出阻塞启动的决策(规划前必须答)vs. 可延后的"
|
|
177
177
|
- "deferrable = 仅在用户有一次 override 机会之后才可采用默认值:orchestrator 必须把 deferrable 集以单轮批量 AskUserQuestion 转达给用户(推荐默认值预选)—— deferrable 项不允许在用户不知情时被 resolve"
|
|
178
178
|
- "仅当默认值可逆且不会改变任何需求的本质(可测试断言 → 结构恒真、验收方法变更、跨 phase contract 形态改变)时才可标 deferrable;若会改变,升格为 blocking。『两个候选都满足现有需求原文』不足以 defer"
|
|
179
|
+
- "Red flags —— 以下全是跳过 relay 的无效借口:『改动很小,不用确认』/『用户大概率会同意』/『推荐答案很明显,直接采用默认』/『问一下会打断节奏』。决策点没有大小豁免 —— 一律 relay"
|
|
179
180
|
- "持久化到 `.planning/phases/<NN>-<slug>/findings.md` + `knowledge.md` 以便交接(NN = 两位数,取现有最大 phase 目录号 + 1;slug = kebab 短名)"
|
|
180
181
|
- "若该层确实已清晰,直说『无需澄清』并退出"
|
|
181
182
|
severity: "blocking / deferrable / resolved"
|
|
@@ -386,6 +387,7 @@ prompts:
|
|
|
386
387
|
- "内联代码注释 / docstring —— 改动是否违反声明的不变量?"
|
|
387
388
|
- "每条发现打 0-100 分;<80 丢弃;保留的发现引用 file:line"
|
|
388
389
|
- "避免:既有问题、linter 能抓的吹毛求疵、用户没改的行"
|
|
390
|
+
- "Severity 纪律:只有可复现的 build 失败、测试失败、可利用的安全漏洞可标最高级 —— 模糊 / 判断类发现必须降级,绝不就高"
|
|
389
391
|
severity: "critical / high / medium(只报告置信度 ≥80 的发现)"
|
|
390
392
|
description: "多 agent code review fan-out —— 对照 base 分支的 diff,带置信度过滤的发现。"
|
|
391
393
|
|
|
@@ -406,6 +408,7 @@ prompts:
|
|
|
406
408
|
- "列 / 字段名安全 —— ORM .select/.eq 的列与 schema 匹配"
|
|
407
409
|
- "边界处的类型强转 —— hash/digest 输入在序列化前已归一化"
|
|
408
410
|
- "时间窗口安全 —— 假设 24h 覆盖的 date-key 查询;feature 间桶不匹配"
|
|
411
|
+
- "Severity 纪律:只有可复现的 build 失败、测试失败、可利用的安全漏洞可标最高级 —— 模糊 / 判断类发现必须降级,绝不就高"
|
|
409
412
|
severity: "CRITICAL / INFORMATIONAL(Fix-First 启发式 —— critical → ASK,informational → AUTO-FIX)"
|
|
410
413
|
description: "偏执狂 Staff Engineer 落地前审查(默认存疑模式,critical+informational 两轮)。"
|
|
411
414
|
|
|
@@ -425,6 +428,7 @@ prompts:
|
|
|
425
428
|
- "State:empty、loading、error、overflow —— 没有一个像 AI placeholder"
|
|
426
429
|
- "Mobile:375x812 视口 —— 真实布局,不是堆叠的桌面版"
|
|
427
430
|
- "若提供 creds / cookies 则验证已登录路径;核心流程深度 > 广度"
|
|
431
|
+
- "Severity 纪律:只有可复现的 build 失败、测试失败、可利用的安全漏洞可标最高级 —— 模糊 / 判断类发现必须降级,绝不就高"
|
|
428
432
|
severity: "blocker / major / minor / nit"
|
|
429
433
|
description: "端到端 QA 跑查 —— orient / explore / form / state / 响应式(核心流程深度 > 广度)。"
|
|
430
434
|
|
|
@@ -444,6 +448,7 @@ prompts:
|
|
|
444
448
|
- "Dockerfile:缺 USER(以 root 跑)、secrets 作为 ARG、镜像里有 .env、无意义暴露的端口"
|
|
445
449
|
- "IaC:通配符 IAM、.tfvars 里硬编码 secrets、特权容器、K8s 里的 hostNetwork"
|
|
446
450
|
- "依赖审计(npm audit / pip-audit / bundler-audit)—— 标记 SKIPPED 的工具,而非让审计失败"
|
|
451
|
+
- "Severity 纪律:只有可复现的 build 失败、测试失败、可利用的安全漏洞可标最高级 —— 模糊 / 判断类发现必须降级,绝不就高"
|
|
447
452
|
severity: "CRITICAL / HIGH / MEDIUM / LOW / INFO"
|
|
448
453
|
description: "CSO 安全审计 —— OWASP Top 10 + secrets 考古 + CI/CD / Docker / IaC 加固。"
|
|
449
454
|
|