harnessed 3.1.0 → 3.3.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/README.md +46 -40
- package/dist/cli.mjs +10 -38
- 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 +48 -32
- package/workflows/auto/workflow.yaml +28 -14
- package/workflows/judgments/stage-routing.yaml +11 -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,OA8Fb,CAAA;;;AC3FO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"3.
|
|
1
|
+
{"version":3,"sources":["../package.json","../src/index.ts"],"names":[],"mappings":";AAAA,IAAA,eAAA,GAAA;AAAA,EAEE,OAAA,EAAW,OA8Fb,CAAA;;;AC3FO,IAAM,UAAU,eAAA,CAAI","file":"index.mjs","sourcesContent":["{\n \"name\": \"harnessed\",\n \"version\": \"3.3.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 ],\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
package/workflows/auto/SKILL.md
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: auto
|
|
3
3
|
description: |
|
|
4
|
-
Super-master orchestrator — 一行命令跑完整
|
|
5
|
-
适合 trivial / well-defined feature OR
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
Super-master orchestrator — 一行命令跑完整 6-stage feature 开发流 (research conditional →
|
|
5
|
+
discuss → plan → task → verify → retro mandatory), 适合 trivial / well-defined feature OR 你
|
|
6
|
+
想 hands-off。每 stage 内部仍 fan-out sub-workflow per 现有 stage-master orchestrator pattern。
|
|
7
|
+
v3.2.0 强化:Phase 0 AI 1-shot complexity assessment + Phase 0.5 understanding check prompt
|
|
8
|
+
+ Phase 5 `/retro` mandatory。
|
|
9
|
+
schema_version: harnessed.workflow.v3 with delegates_to (6 sub: research conditional order 0 +
|
|
10
|
+
4 stage-master order 1-4 + retro mandatory order 5) + disciplines_applied (6 default)
|
|
10
11
|
+ tools_available (agent-teams-create + planning-with-files)。Fail-fast default; opt-in
|
|
11
|
-
`--
|
|
12
|
-
(bare per ADR 0030 namespace policy D-02 LOCK)
|
|
12
|
+
`--staged` flag 重现 stage gate UX (每 stage 完停 user review)。
|
|
13
|
+
Triggered by slash command `/auto` (bare per ADR 0030 namespace policy D-02 LOCK)
|
|
14
|
+
after `harnessed setup`.
|
|
13
15
|
trigger_phrases:
|
|
14
16
|
- "auto"
|
|
15
17
|
- "自动跑完"
|
|
@@ -19,43 +21,50 @@ trigger_phrases:
|
|
|
19
21
|
- "super master"
|
|
20
22
|
---
|
|
21
23
|
|
|
22
|
-
# auto super-master orchestrator (v3.
|
|
24
|
+
# auto super-master orchestrator (v3.2.0 enhanced)
|
|
23
25
|
|
|
24
26
|
## Overview
|
|
25
27
|
|
|
26
|
-
v3.
|
|
27
|
-
|
|
28
|
+
v3.2.0 NEW — 6-stage cadence (research conditional → discuss → plan → task → verify → retro
|
|
29
|
+
mandatory), sister 4 stage-master `/discuss /plan /task /verify` 独立 invoke 仍 work;
|
|
30
|
+
`/auto` 是 opt-in 一行命令 chain。
|
|
28
31
|
|
|
29
|
-
| order | sub
|
|
30
|
-
| ----- |
|
|
32
|
+
| order | sub | gate ref | mode | when fires |
|
|
33
|
+
| ----- | --- | -------- | ---- | ---------- |
|
|
34
|
+
| 0 | `research` | `judgments.stage-routing.auto-research-unclear.fires` | serial | user_understanding_unclear == true (Phase 0.5 prompt n) |
|
|
31
35
|
| 1 | `discuss` | (unconditional — 4-stage chain 起点) | serial | always |
|
|
32
36
|
| 2 | `plan` | (unconditional — stage 2) | serial | always |
|
|
33
37
|
| 3 | `task` | (unconditional — stage 3) | serial | always |
|
|
34
38
|
| 4 | `verify` | (unconditional — stage 4 收尾) | serial | always |
|
|
39
|
+
| 5 | `retro` | (unconditional — auto mode mandatory) | serial | always |
|
|
35
40
|
|
|
36
|
-
Engine runtime spawns
|
|
37
|
-
T3.5.W0.1 — recursive 一层抽象 (super-master → stage-master → sub-workflow):
|
|
41
|
+
Engine runtime spawns 6 sub workflow.yaml via `runMasterOrchestrator` per
|
|
42
|
+
T3.5.W0.1 — recursive 一层抽象 (super-master → stage-master OR standalone → sub-workflow):
|
|
38
43
|
|
|
39
|
-
- top-level invoke `/auto` → load `workflows/auto/workflow.yaml`
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
+
- top-level invoke `/auto` → load `workflows/auto/workflow.yaml` → runAutoPreFlight hook
|
|
45
|
+
- pre-flight Phase 0: `assessComplexity(taskDescription)` → small/medium auto continue;
|
|
46
|
+
large → prompt user 切 `--staged` (y) OR abort 建议手动 (n)
|
|
47
|
+
- pre-flight Phase 0.5: `promptUserUnderstanding()` → y skip research; n set
|
|
48
|
+
`user_understanding_unclear = true` 进 ctx → research gate fires
|
|
49
|
+
- spawn order 0: `workflows/research/workflow.yaml` (if gate fires)
|
|
50
|
+
- spawn order 1-4: 4 stage-master `workflows/<sub>/auto/workflow.yaml`
|
|
51
|
+
- spawn order 5: `workflows/retro/workflow.yaml` (mandatory unconditional)
|
|
44
52
|
|
|
45
|
-
K8 ctx single snapshot:auto top-level invoke 1 snapshot, pass to all
|
|
53
|
+
K8 ctx single snapshot:auto top-level invoke 1 snapshot, pass to all 6 spawn
|
|
46
54
|
(sister Phase 3.5 W0.1 pattern verbatim, 1 snapshot per top-level invoke 跨整个 cycle)。
|
|
47
55
|
|
|
48
56
|
## Default behavior
|
|
49
57
|
|
|
50
|
-
- **
|
|
58
|
+
- **Pre-flight gates**: complexity assessment + understanding check (interactive prompts)
|
|
59
|
+
- **Continuous chain**: 6 stage 一行命令跑完, 中间不停
|
|
51
60
|
- **Fail-fast**: 任一 stage fail 立即停, `harnessed resume` 续
|
|
52
61
|
- **Context 自动传递**: planning-with-files `.planning/<phase>/` 喂下 stage
|
|
62
|
+
- **Retro mandatory**: auto mode hands-off scenario,末尾强制 `/retro` 总结 (无 opt-out flag)
|
|
53
63
|
- **沿用 sister planning-with-files /plan 持久化 cadence**
|
|
54
64
|
|
|
55
65
|
## Optional flag
|
|
56
66
|
|
|
57
|
-
- `--
|
|
58
|
-
(重现 v3.0.x stage gate UX)
|
|
67
|
+
- `--staged` opt-in: 每 stage-master 跑完停, 等用户 review/confirm 后跑下 stage (stage gate UX)
|
|
59
68
|
|
|
60
69
|
## When to use `/auto` vs 4 stage-master 手动
|
|
61
70
|
|
|
@@ -63,12 +72,14 @@ K8 ctx single snapshot:auto top-level invoke 1 snapshot, pass to all 4 stage-mas
|
|
|
63
72
|
- Trivial / well-defined feature (e.g. CRUD endpoint + standard pattern)
|
|
64
73
|
- Hands-off use case (你想"跑完再回来看")
|
|
65
74
|
- 跨 stage decision 都明显 (无 open question)
|
|
75
|
+
- AI 自动判断需求复杂度 small/medium → 直接 continue;large → 自动建议 `--staged`
|
|
66
76
|
|
|
67
77
|
❌ **跳过 `/auto` → 分阶段手动 `/discuss` → `/plan` → `/task` → `/verify`**:
|
|
68
78
|
- 关键发布 / 大重构 (需 stage gate review)
|
|
69
79
|
- 跨 stage 有 open implementation decisions
|
|
70
80
|
- 你想 stage 之间 hands-on review
|
|
71
81
|
- 不确定整体方向 (此时手动 `/discuss` 强 grill)
|
|
82
|
+
- AI complexity gate 判定 large 且 user 不切 `--staged` → 建议 abort 手动
|
|
72
83
|
|
|
73
84
|
## Capability refs
|
|
74
85
|
|
|
@@ -76,24 +87,29 @@ Sister `workflows/capabilities.yaml`:
|
|
|
76
87
|
- `agent-teams-create` — Bucket 5 agent-platform (multispec Pattern C 4-specialist team
|
|
77
88
|
in verify stage if critical-release-upgrade gate fires)
|
|
78
89
|
- `planning-with-files` — Bucket 4 核心 capability (持久化 task_plan.md + progress.md
|
|
79
|
-
跨
|
|
80
|
-
- Downstream
|
|
81
|
-
- sub `
|
|
82
|
-
- sub `
|
|
83
|
-
- sub `
|
|
84
|
-
- sub `
|
|
90
|
+
跨 6 stage 自动 context 传递)
|
|
91
|
+
- Downstream sub refs:
|
|
92
|
+
- sub `research` upstream → `workflows/research/workflow.yaml` (standalone)
|
|
93
|
+
- sub `discuss` upstream → `workflows/discuss/auto/workflow.yaml` (stage-master)
|
|
94
|
+
- sub `plan` upstream → `workflows/plan/auto/workflow.yaml` (stage-master)
|
|
95
|
+
- sub `task` upstream → `workflows/task/auto/workflow.yaml` (stage-master)
|
|
96
|
+
- sub `verify` upstream → `workflows/verify/auto/workflow.yaml` (stage-master)
|
|
97
|
+
- sub `retro` upstream → `workflows/retro/workflow.yaml` (standalone)
|
|
85
98
|
|
|
86
99
|
## Invocation
|
|
87
100
|
|
|
88
101
|
- Slash command: `/auto <feature description>` (bare per ADR 0030 namespace policy D-02 LOCK
|
|
89
102
|
after `harnessed setup`)
|
|
90
103
|
- 4 stage-master `/discuss /plan /task /verify` 仍可独立 invoke — `/auto` 是 opt-in NEW workflow
|
|
104
|
+
- `--staged` opt-in for stage gate UX (每 stage 完停 user review)
|
|
91
105
|
|
|
92
106
|
## References
|
|
93
107
|
|
|
94
108
|
- D-01 master orchestrator delegation pattern
|
|
95
109
|
- D-02 bare slash cmd convention (ADR 0030 namespace policy LOCK)
|
|
96
110
|
- D-13 declarative SoT (delegates_to[] 声明 + engine consume)
|
|
111
|
+
- workflows/{research,retro}/workflow.yaml — 2 standalone (research conditional + retro mandatory)
|
|
97
112
|
- workflows/{discuss,plan,task,verify}/auto/workflow.yaml — 4 stage-master Phase 3.5 SHIPPED
|
|
98
|
-
-
|
|
99
|
-
-
|
|
113
|
+
- workflows/judgments/stage-routing.yaml — auto-research-unclear trigger (v3.2.0 NEW)
|
|
114
|
+
- src/workflow/masterOrchestrator.ts — 'auto' literal + recursive spawn + runAutoPreFlight hook
|
|
115
|
+
- CHANGELOG [3.2.0] — complexity gate + research/retro flow + `--staged` rename
|
|
@@ -1,31 +1,38 @@
|
|
|
1
|
-
# workflows/auto/workflow.yaml — v3.
|
|
1
|
+
# workflows/auto/workflow.yaml — v3.2.0 enhanced super-master orchestrator
|
|
2
2
|
#
|
|
3
3
|
# Top-level standalone (sister workflows/research/ + workflows/retro/ layout) —
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
4
|
+
# 6-stage chain (research conditional → discuss → plan → task → verify → retro
|
|
5
|
+
# mandatory) one-shot auto orchestrate。
|
|
6
|
+
#
|
|
7
|
+
# v3.2.0 delta (sister v3.1.0 ship):
|
|
8
|
+
# ADD research order 0 (gate auto-research-unclear — fires when user_understanding_unclear)
|
|
9
|
+
# ADD retro order 5 (unconditional — mandatory in auto mode per CLAUDE.md hands-off scenario)
|
|
10
|
+
# NOTE complexity gate + understanding check 是 runtime pre-flight hook (NOT yaml decl)
|
|
11
|
+
# sister masterOrchestrator.ts runAutoPreFlight invoke
|
|
7
12
|
#
|
|
8
13
|
# Sister refs:
|
|
9
14
|
# - workflows/discuss/auto/workflow.yaml (stage-master sister fan-out delegates_to pattern)
|
|
10
15
|
# - workflows/research/workflow.yaml + workflows/retro/workflow.yaml (top-level standalone sister)
|
|
11
|
-
# -
|
|
16
|
+
# - workflows/judgments/stage-routing.yaml auto-research-unclear trigger (v3.2.0 NEW)
|
|
17
|
+
# - src/workflow/masterOrchestrator.ts ('auto' literal + recursive spawn + runAutoPreFlight hook)
|
|
12
18
|
# - src/workflow/schema/workflow.ts WorkflowSchemaV3 + DelegationClause (Phase 3.3 W0.5 SHIPPED)
|
|
13
19
|
#
|
|
14
20
|
# Super-master invariant (per WorkflowSchemaV3 runtime + check-workflow-schema.mjs K9):
|
|
15
21
|
# - phases 缺省 (master only has delegates_to[])
|
|
16
|
-
# -
|
|
17
|
-
# - delegates_to[].sub ∈ {discuss, plan, task, verify}
|
|
18
|
-
#
|
|
19
|
-
#
|
|
22
|
+
# - 6 delegates_to mode serial — 必带 explicit order (K9 invariant T3.3.W0.10)
|
|
23
|
+
# - delegates_to[].sub ∈ {research, discuss, plan, task, verify, retro}
|
|
24
|
+
# (research + retro are top-level standalone; discuss/plan/task/verify are 4 stage-master)
|
|
25
|
+
# - K8 ctx single snapshot: top-level invoke 1 snapshot, pass to all 6 spawn
|
|
20
26
|
|
|
21
27
|
schema_version: harnessed.workflow.v3
|
|
22
28
|
workflow: auto
|
|
23
29
|
description: |
|
|
24
|
-
Super-master orchestrator — 自动 chain
|
|
25
|
-
|
|
26
|
-
use case; 关键 PR / 大重构推荐分阶段手动 (`/discuss` →
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
Super-master orchestrator (v3.2.0 enhanced) — 自动 chain 6 stage (research conditional →
|
|
31
|
+
discuss → plan → task → verify → retro mandatory)。一行命令跑完整 feature 开发流, 适合 trivial
|
|
32
|
+
/ well-defined feature OR hands-off use case; 关键 PR / 大重构推荐分阶段手动 (`/discuss` →
|
|
33
|
+
`/plan` → `/task` → `/verify`)。AI 自动判断需求复杂度,大需求建议切 `--staged` 模式 (每 stage
|
|
34
|
+
完停 review)。Fail-fast default:任一 stage fail 立即停, `harnessed resume` 续。Opt-in
|
|
35
|
+
`--staged` flag 重现 stage gate UX (每 stage 完停 user review)。
|
|
29
36
|
|
|
30
37
|
disciplines_applied: [karpathy, output-style, language, operational, priority, protocols]
|
|
31
38
|
tools_available:
|
|
@@ -33,6 +40,10 @@ tools_available:
|
|
|
33
40
|
- planning-with-files
|
|
34
41
|
|
|
35
42
|
delegates_to:
|
|
43
|
+
- sub: research
|
|
44
|
+
mode: serial
|
|
45
|
+
order: 0
|
|
46
|
+
gate: judgments.stage-routing.auto-research-unclear.fires
|
|
36
47
|
- sub: discuss
|
|
37
48
|
mode: serial
|
|
38
49
|
order: 1
|
|
@@ -45,3 +56,6 @@ delegates_to:
|
|
|
45
56
|
- sub: verify
|
|
46
57
|
mode: serial
|
|
47
58
|
order: 4
|
|
59
|
+
- sub: retro
|
|
60
|
+
mode: serial
|
|
61
|
+
order: 5
|
|
@@ -91,3 +91,14 @@ triggers:
|
|
|
91
91
|
fires_when: "phase.stage == 'verify' and phase.is_final_step == true"
|
|
92
92
|
invokes:
|
|
93
93
|
- capability: code-simplifier
|
|
94
|
+
|
|
95
|
+
# v3.2.0 NEW — /auto super-master Phase 0.5 understanding check gate
|
|
96
|
+
auto-research-unclear:
|
|
97
|
+
description: |
|
|
98
|
+
/auto super-master → /research conditional spawn 当 user_understanding_unclear == true
|
|
99
|
+
(Phase 0.5 understanding check prompt n → ctx fact set)。sister CLAUDE.md research routing。
|
|
100
|
+
fires_when: "user_understanding_unclear == true"
|
|
101
|
+
invokes:
|
|
102
|
+
- capability: tavily-mcp
|
|
103
|
+
- capability: exa-mcp
|
|
104
|
+
- capability: ctx7
|