harnessed 3.5.0 → 3.6.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/THIRD-PARTY-NOTICES.md +34 -0
- package/dist/cli.mjs +224 -27
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
- package/workflows/disciplines/operational.yaml +18 -0
- package/workflows/judgments/user-overrides.yaml +82 -0
- package/workflows/role-prompts.yaml +47 -2
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,
|
|
1
|
+
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,OA+Fb,CAAA;;;AC5FO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"3.6.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 },\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 \"manifests\",\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 },\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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "harnessed",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "AI coding harness package manager + composition orchestrator",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -50,7 +50,8 @@
|
|
|
50
50
|
"schemas",
|
|
51
51
|
"README.md",
|
|
52
52
|
"LICENSE",
|
|
53
|
-
"NOTICE"
|
|
53
|
+
"NOTICE",
|
|
54
|
+
"THIRD-PARTY-NOTICES.md"
|
|
54
55
|
],
|
|
55
56
|
"scripts": {
|
|
56
57
|
"dev": "tsup --watch",
|
|
@@ -59,3 +59,21 @@ rules:
|
|
|
59
59
|
enforcement: warn
|
|
60
60
|
trigger: cmd.requires_approval == true AND session.has_prior_approval == true
|
|
61
61
|
check_method: heuristic
|
|
62
|
+
|
|
63
|
+
# v3.6.0 Phase 3 — transparent-skip discipline (P0b 下半,Audit § fallback
|
|
64
|
+
# 三条铁律 "拿不准 → 倾向跳过 + 透明声明"). prompt-inject method delivered
|
|
65
|
+
# via src/workflow/run.ts TRANSPARENT_SKIP_RULES const appended to
|
|
66
|
+
# criticalSystemReminder_EXPERIMENTAL alongside ESCALATION_RULES (v3.5.0
|
|
67
|
+
# Phase 2 sister). Spawned subagent reads the rule + emits the verbatim
|
|
68
|
+
# skip message when gate context is ambiguous instead of silent execution.
|
|
69
|
+
- id: transparent-skip-on-low-confidence
|
|
70
|
+
description: |
|
|
71
|
+
When a phase gate condition cannot be confidently evaluated (e.g.
|
|
72
|
+
expected context fields missing, default-valued, or contradictory),
|
|
73
|
+
prefer skip + transparent explanation over silent execution.
|
|
74
|
+
Verbatim format: "这次跳过了 <phase>, 因为 <reason>. 如果你认为
|
|
75
|
+
需要请明说" / English: "Skipped <phase> because <reason>. Tell me
|
|
76
|
+
if you actually need it."
|
|
77
|
+
enforcement: warn
|
|
78
|
+
trigger: gate_evaluation_low_confidence
|
|
79
|
+
check_method: prompt-inject
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# workflows/judgments/user-overrides.yaml
|
|
2
|
+
# v3.6.0 Phase 3 — user-override keyword → trigger gate refs lookup
|
|
3
|
+
# (P0b 上半,Audit § fallback 三条铁律 "用户明示 → 覆盖判据" mechanism)
|
|
4
|
+
#
|
|
5
|
+
# Runtime: CLI extracts keywords from user task description, matches against
|
|
6
|
+
# `keywords` substring patterns, collects matched `triggers[]` into
|
|
7
|
+
# gateContext.user_overrides[]. judgmentResolver pre-checks user_overrides[]
|
|
8
|
+
# before expression evaluation — if gateRef in user_overrides → fires=true bypass.
|
|
9
|
+
#
|
|
10
|
+
# Cross-validation status (Wave 1 灰区 #1/#2/#3 resolved per user ack 2026-05-25):
|
|
11
|
+
# - arch-review.triggers[0] points to stage-routing.plan-architecture-delegate
|
|
12
|
+
# (no architecture-gate.yaml exists; semantically nearest existing entry per
|
|
13
|
+
# 灰区 #2 Option C — no scope creep)
|
|
14
|
+
# - phase-discuss.triggers[0] points to phase-gate.gsd-discuss-phase (no
|
|
15
|
+
# `gray-areas` entry exists in phase-gate.yaml; renamed per 灰区 #1/#3
|
|
16
|
+
# Option A — naming drift fix, semantic equivalent)
|
|
17
|
+
|
|
18
|
+
schema_version: harnessed.user-overrides.v1
|
|
19
|
+
|
|
20
|
+
overrides:
|
|
21
|
+
- id: brainstorm
|
|
22
|
+
keywords:
|
|
23
|
+
- "先 brainstorm"
|
|
24
|
+
- "brainstorm 一下"
|
|
25
|
+
- "讨论一下"
|
|
26
|
+
- "先想想"
|
|
27
|
+
- "先讨论"
|
|
28
|
+
- "brainstorm first"
|
|
29
|
+
- "let's brainstorm"
|
|
30
|
+
triggers:
|
|
31
|
+
- judgments.subtask-gate.brainstorming.fires
|
|
32
|
+
- judgments.stage-routing.discuss-subtask-delegate.fires
|
|
33
|
+
|
|
34
|
+
- id: strategic-review
|
|
35
|
+
keywords:
|
|
36
|
+
- "跑 office-hours"
|
|
37
|
+
- "office-hours"
|
|
38
|
+
- "找 CEO"
|
|
39
|
+
- "战略层"
|
|
40
|
+
- "战略评估"
|
|
41
|
+
- "plan-ceo-review"
|
|
42
|
+
triggers:
|
|
43
|
+
- judgments.strategic-gate.office-hours.fires
|
|
44
|
+
- judgments.strategic-gate.plan-ceo-review.fires
|
|
45
|
+
- judgments.stage-routing.discuss-strategic-delegate.fires
|
|
46
|
+
|
|
47
|
+
- id: arch-review
|
|
48
|
+
keywords:
|
|
49
|
+
- "架构审查"
|
|
50
|
+
- "plan-eng-review"
|
|
51
|
+
- "复杂架构"
|
|
52
|
+
- "engineering review"
|
|
53
|
+
triggers:
|
|
54
|
+
- judgments.stage-routing.plan-architecture-delegate.fires
|
|
55
|
+
|
|
56
|
+
- id: phase-discuss
|
|
57
|
+
keywords:
|
|
58
|
+
- "phase 澄清"
|
|
59
|
+
- "灰色澄清"
|
|
60
|
+
- "discuss-phase"
|
|
61
|
+
- "gsd-discuss-phase"
|
|
62
|
+
triggers:
|
|
63
|
+
- judgments.phase-gate.gsd-discuss-phase.fires
|
|
64
|
+
- judgments.stage-routing.discuss-phase-delegate.fires
|
|
65
|
+
|
|
66
|
+
- id: paranoid-review
|
|
67
|
+
keywords:
|
|
68
|
+
- "关键模块"
|
|
69
|
+
- "paranoid review"
|
|
70
|
+
- "/review"
|
|
71
|
+
- "staff engineer review"
|
|
72
|
+
triggers:
|
|
73
|
+
- judgments.stage-routing.verify-paranoid-critical.fires
|
|
74
|
+
|
|
75
|
+
- id: tdd
|
|
76
|
+
keywords:
|
|
77
|
+
- "强制 TDD"
|
|
78
|
+
- "TDD first"
|
|
79
|
+
- "red-green-refactor"
|
|
80
|
+
- "test first"
|
|
81
|
+
triggers:
|
|
82
|
+
- judgments.tdd-gate.tdd-strongly-suggested.fires
|
|
@@ -17,6 +17,14 @@
|
|
|
17
17
|
# description: YAML frontmatter `description` for <claude-home>/commands/<x>.md.
|
|
18
18
|
#
|
|
19
19
|
# Karpathy simplicity: 1 small yaml beats 23 hardcoded strings in TS.
|
|
20
|
+
#
|
|
21
|
+
# Upstream attributions (v3.6.0 Phase 1):
|
|
22
|
+
# Portions of the `task-clarify` / `task-code` / `discuss-subtask` entries
|
|
23
|
+
# below are paraphrased from https://github.com/mattpocock/skills
|
|
24
|
+
# (MIT License, commit b8be62ffacb0118fa3eaa29a0923c87c8c11985c). The full
|
|
25
|
+
# upstream license is preserved at
|
|
26
|
+
# .planning/v3.6.0/mattpocock-source/LICENSE and a project-wide attribution
|
|
27
|
+
# summary is in THIRD-PARTY-NOTICES.md at the repo root.
|
|
20
28
|
|
|
21
29
|
schema_version: harnessed.role-prompts.v1
|
|
22
30
|
|
|
@@ -177,6 +185,16 @@ prompts:
|
|
|
177
185
|
Generate ≥2 implementation approaches for a single subtask and compare
|
|
178
186
|
tradeoffs. Fires when core algorithm / data structure / API contract /
|
|
179
187
|
high error-cost. Skip pure CRUD or single-obvious-path tasks.
|
|
188
|
+
|
|
189
|
+
# grill-me methodology paraphrased from mattpocock/skills (MIT, b8be62f)
|
|
190
|
+
# Source: skills/productivity/grill-me/SKILL.md
|
|
191
|
+
# When the user wants to stress-test a plan or asks to be grilled,
|
|
192
|
+
# interview them relentlessly about every aspect until shared
|
|
193
|
+
# understanding is reached. Walk down each branch of the decision tree,
|
|
194
|
+
# resolving dependencies between decisions one at a time. For each
|
|
195
|
+
# question, provide your recommended answer. Ask questions ONE at a
|
|
196
|
+
# time. If a question can be answered by exploring the codebase,
|
|
197
|
+
# explore the codebase instead of asking.
|
|
180
198
|
checklist:
|
|
181
199
|
- "State the subtask in one sentence; confirm scope with user if ambiguous"
|
|
182
200
|
- "Produce 2-4 distinct approaches (not just '2 flavors of the same idea')"
|
|
@@ -184,8 +202,11 @@ prompts:
|
|
|
184
202
|
- "Recommend one with 1-2 line reason; flag risks of the chosen path"
|
|
185
203
|
- "Output a `findings.md` block the implementer can paste into the task"
|
|
186
204
|
- "If options collapse to one (others clearly bad), say so and exit fast"
|
|
205
|
+
# grill-me additional checklist (paraphrased from mattpocock/skills)
|
|
206
|
+
- "Grill mode: walk the decision tree branch-by-branch, ONE question at a time, with your recommended answer"
|
|
207
|
+
- "Prefer codebase exploration over asking when a question can be answered from code"
|
|
187
208
|
severity: "recommended / acceptable / rejected"
|
|
188
|
-
description: "Generate 2-4 subtask approaches with tradeoffs and recommend one (brainstorming)."
|
|
209
|
+
description: "Generate 2-4 subtask approaches with tradeoffs and recommend one (brainstorming + grill-me on stress-test requests)."
|
|
189
210
|
|
|
190
211
|
# ============================================================================
|
|
191
212
|
# plan-* (2 subs)
|
|
@@ -239,6 +260,16 @@ prompts:
|
|
|
239
260
|
Surface ambiguity in a single subtask spec by asking ONE focused
|
|
240
261
|
question at a time. Fires when ≥2 approaches / core algorithm / API
|
|
241
262
|
contract / high error-cost. Skip if subtask is CRUD or already obvious.
|
|
263
|
+
|
|
264
|
+
# grill-with-docs methodology paraphrased from mattpocock/skills (MIT, b8be62f)
|
|
265
|
+
# Source: skills/engineering/grill-with-docs/SKILL.md
|
|
266
|
+
# When ambiguity overlaps with existing project docs / ADRs, run a
|
|
267
|
+
# grill-with-docs cycle: pressure-test the plan against the project's
|
|
268
|
+
# domain language (CONTEXT.md), sharpen terminology mismatches inline,
|
|
269
|
+
# and update ADRs as decisions crystallise. Challenge term conflicts
|
|
270
|
+
# immediately; sharpen vague/overloaded terms by proposing a canonical
|
|
271
|
+
# name; cross-reference user claims with code and surface contradictions.
|
|
272
|
+
# Output is BOTH a refined spec AND a doc-diff (CONTEXT.md / docs/adr/*.md).
|
|
242
273
|
checklist:
|
|
243
274
|
- "Read the subtask description; restate it in your own words to confirm"
|
|
244
275
|
- "List every assumption you would make; flag the ones the user must confirm"
|
|
@@ -246,6 +277,11 @@ prompts:
|
|
|
246
277
|
- "Stop asking when you have enough to write 80% of the code without guessing"
|
|
247
278
|
- "Record the resolved spec at the top of the subtask file before implementing"
|
|
248
279
|
- "If `phase.spec_ambiguous == true AND phase.no_docs == true`, request grill-me"
|
|
280
|
+
# grill-with-docs additional checklist (paraphrased from mattpocock/skills)
|
|
281
|
+
- "Cross-reference each assumption against CONTEXT.md domain language; flag terminology drift immediately"
|
|
282
|
+
- "Sharpen vague/overloaded terms (e.g. 'account' → Customer vs User) by proposing a canonical name"
|
|
283
|
+
- "If a decision crystallises mid-grill, draft the ADR delta inline (don't defer)"
|
|
284
|
+
- "Output BOTH the refined spec AND any doc-diff (CONTEXT.md / docs/adr/*.md)"
|
|
249
285
|
severity: "blocking-question / nice-to-know / resolved"
|
|
250
286
|
description: "Clarify subtask spec one question at a time (brainstorming + grill-with-docs on ambiguity)."
|
|
251
287
|
|
|
@@ -267,8 +303,17 @@ prompts:
|
|
|
267
303
|
- "No speculative abstractions (no 'just in case' generics)"
|
|
268
304
|
- "Edit with surgical precision: full path, exact selectors, no broad rewrites"
|
|
269
305
|
- "Update progress.md before declaring done (planning-with-files `/plan`)"
|
|
306
|
+
# zoom-out methodology paraphrased from mattpocock/skills (MIT, b8be62f)
|
|
307
|
+
# Source: skills/engineering/zoom-out/SKILL.md
|
|
308
|
+
- "zoom-out: when unfamiliar with an area, go up a layer of abstraction and map the relevant modules and callers using the project's CONTEXT.md domain glossary vocabulary"
|
|
309
|
+
# improve-codebase-architecture methodology paraphrased from mattpocock/skills (MIT, b8be62f)
|
|
310
|
+
# Source: skills/engineering/improve-codebase-architecture/SKILL.md
|
|
311
|
+
- "improve-arch: hunt deepening opportunities — modules whose interface is nearly as complex as their implementation are shallow; deep modules hide a lot of behaviour behind a small interface"
|
|
312
|
+
- "improve-arch deletion test: imagine deleting the module — if complexity vanishes it was a pass-through (delete it); if complexity reappears across N callers it was earning its keep (keep / deepen)"
|
|
313
|
+
- "improve-arch: name candidates using CONTEXT.md domain vocabulary (e.g. 'the Order intake module', not 'FooBarHandler'); if a candidate contradicts an existing ADR, only surface it when the friction is real enough to revisit the ADR"
|
|
314
|
+
- "improve-arch: present candidates as a before/after report and let the user pick which to explore before designing interfaces"
|
|
270
315
|
severity: "needs-fix / done / blocked"
|
|
271
|
-
description: "Implement a subtask under karpathy 4 心法 (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven); ≤200 LOC per file."
|
|
316
|
+
description: "Implement a subtask under karpathy 4 心法 (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven); ≤200 LOC per file. zoom-out for unfamiliar areas; improve-codebase-architecture for shallow-module deepening audits."
|
|
272
317
|
|
|
273
318
|
task-test:
|
|
274
319
|
primary_cap: "tdd"
|