harnessed 3.0.2 → 3.1.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 +75 -36
- package/dist/cli.mjs +174 -133
- 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 +99 -0
- package/workflows/auto/workflow.yaml +47 -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.0
|
|
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.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
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: auto
|
|
3
|
+
description: |
|
|
4
|
+
Super-master orchestrator — 一行命令跑完整 4-stage feature 开发流 (discuss → plan → task → verify),
|
|
5
|
+
适合 trivial / well-defined feature OR 你想 hands-off。每 stage 内部仍 fan-out sub-workflow per
|
|
6
|
+
现有 stage-master orchestrator pattern (一层抽象 verbatim — top-master /auto → stage-master /discuss
|
|
7
|
+
→ sub-workflow discuss-strategic + discuss-phase + discuss-subtask)。
|
|
8
|
+
schema_version: harnessed.workflow.v3 with delegates_to (4 sub: discuss serial order 1 + plan
|
|
9
|
+
serial order 2 + task serial order 3 + verify serial order 4) + disciplines_applied (6 default)
|
|
10
|
+
+ tools_available (agent-teams-create + planning-with-files)。Fail-fast default; opt-in
|
|
11
|
+
`--pause-between-stages` flag 重现 v3.0.x stage gate UX。Triggered by slash command `/auto`
|
|
12
|
+
(bare per ADR 0030 namespace policy D-02 LOCK) after `harnessed setup`.
|
|
13
|
+
trigger_phrases:
|
|
14
|
+
- "auto"
|
|
15
|
+
- "自动跑完"
|
|
16
|
+
- "完整流程"
|
|
17
|
+
- "一键开发"
|
|
18
|
+
- "auto chain"
|
|
19
|
+
- "super master"
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# auto super-master orchestrator (v3.1.0 NEW)
|
|
23
|
+
|
|
24
|
+
## Overview
|
|
25
|
+
|
|
26
|
+
v3.1.0 NEW — 5th master 跨 4 stage chain (sister 4 stage-master `/discuss /plan /task /verify`
|
|
27
|
+
独立 invoke 仍 work, `/auto` 是 opt-in 一行命令 chain)。
|
|
28
|
+
|
|
29
|
+
| order | sub (stage-master) | gate ref | mode | when fires |
|
|
30
|
+
| ----- | ------------------ | -------- | ---- | ---------- |
|
|
31
|
+
| 1 | `discuss` | (unconditional — 4-stage chain 起点) | serial | always |
|
|
32
|
+
| 2 | `plan` | (unconditional — stage 2) | serial | always |
|
|
33
|
+
| 3 | `task` | (unconditional — stage 3) | serial | always |
|
|
34
|
+
| 4 | `verify` | (unconditional — stage 4 收尾) | serial | always |
|
|
35
|
+
|
|
36
|
+
Engine runtime spawns 4 stage-master workflow.yaml via `runMasterOrchestrator` per
|
|
37
|
+
T3.5.W0.1 — recursive 一层抽象 (super-master → stage-master → sub-workflow):
|
|
38
|
+
|
|
39
|
+
- top-level invoke `/auto` → load `workflows/auto/workflow.yaml`
|
|
40
|
+
- spawn stage 1: `workflows/discuss/auto/workflow.yaml` (discuss master) → 内部 fan-out 3 sub
|
|
41
|
+
- spawn stage 2: `workflows/plan/auto/workflow.yaml` (plan master) → 内部 fan-out 2 sub
|
|
42
|
+
- spawn stage 3: `workflows/task/auto/workflow.yaml` (task master) → 内部 fan-out 4 sub
|
|
43
|
+
- spawn stage 4: `workflows/verify/auto/workflow.yaml` (verify master) → 内部 fan-out 7 sub
|
|
44
|
+
|
|
45
|
+
K8 ctx single snapshot:auto top-level invoke 1 snapshot, pass to all 4 stage-master spawn
|
|
46
|
+
(sister Phase 3.5 W0.1 pattern verbatim, 1 snapshot per top-level invoke 跨整个 cycle)。
|
|
47
|
+
|
|
48
|
+
## Default behavior
|
|
49
|
+
|
|
50
|
+
- **Continuous chain**: 4 stage 一行命令跑完, 中间不停
|
|
51
|
+
- **Fail-fast**: 任一 stage fail 立即停, `harnessed resume` 续
|
|
52
|
+
- **Context 自动传递**: planning-with-files `.planning/<phase>/` 喂下 stage
|
|
53
|
+
- **沿用 sister planning-with-files /plan 持久化 cadence**
|
|
54
|
+
|
|
55
|
+
## Optional flag
|
|
56
|
+
|
|
57
|
+
- `--pause-between-stages` opt-in: 每 stage-master 跑完停, 等用户 review/confirm 后跑下 stage
|
|
58
|
+
(重现 v3.0.x stage gate UX)
|
|
59
|
+
|
|
60
|
+
## When to use `/auto` vs 4 stage-master 手动
|
|
61
|
+
|
|
62
|
+
✅ **触发 `/auto`**:
|
|
63
|
+
- Trivial / well-defined feature (e.g. CRUD endpoint + standard pattern)
|
|
64
|
+
- Hands-off use case (你想"跑完再回来看")
|
|
65
|
+
- 跨 stage decision 都明显 (无 open question)
|
|
66
|
+
|
|
67
|
+
❌ **跳过 `/auto` → 分阶段手动 `/discuss` → `/plan` → `/task` → `/verify`**:
|
|
68
|
+
- 关键发布 / 大重构 (需 stage gate review)
|
|
69
|
+
- 跨 stage 有 open implementation decisions
|
|
70
|
+
- 你想 stage 之间 hands-on review
|
|
71
|
+
- 不确定整体方向 (此时手动 `/discuss` 强 grill)
|
|
72
|
+
|
|
73
|
+
## Capability refs
|
|
74
|
+
|
|
75
|
+
Sister `workflows/capabilities.yaml`:
|
|
76
|
+
- `agent-teams-create` — Bucket 5 agent-platform (multispec Pattern C 4-specialist team
|
|
77
|
+
in verify stage if critical-release-upgrade gate fires)
|
|
78
|
+
- `planning-with-files` — Bucket 4 核心 capability (持久化 task_plan.md + progress.md
|
|
79
|
+
跨 4 stage 自动 context 传递)
|
|
80
|
+
- Downstream stage-master refs:
|
|
81
|
+
- sub `discuss` upstream → `workflows/discuss/auto/workflow.yaml`
|
|
82
|
+
- sub `plan` upstream → `workflows/plan/auto/workflow.yaml`
|
|
83
|
+
- sub `task` upstream → `workflows/task/auto/workflow.yaml`
|
|
84
|
+
- sub `verify` upstream → `workflows/verify/auto/workflow.yaml`
|
|
85
|
+
|
|
86
|
+
## Invocation
|
|
87
|
+
|
|
88
|
+
- Slash command: `/auto <feature description>` (bare per ADR 0030 namespace policy D-02 LOCK
|
|
89
|
+
after `harnessed setup`)
|
|
90
|
+
- 4 stage-master `/discuss /plan /task /verify` 仍可独立 invoke — `/auto` 是 opt-in NEW workflow
|
|
91
|
+
|
|
92
|
+
## References
|
|
93
|
+
|
|
94
|
+
- D-01 master orchestrator delegation pattern
|
|
95
|
+
- D-02 bare slash cmd convention (ADR 0030 namespace policy LOCK)
|
|
96
|
+
- D-13 declarative SoT (delegates_to[] 声明 + engine consume)
|
|
97
|
+
- workflows/{discuss,plan,task,verify}/auto/workflow.yaml — 4 stage-master Phase 3.5 SHIPPED
|
|
98
|
+
- src/workflow/masterOrchestrator.ts — 'auto' literal + recursive spawn driver
|
|
99
|
+
- CHANGELOG [3.1.0] — NEW super-master + --pause-between-stages opt-in
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# workflows/auto/workflow.yaml — v3.1.0 NEW super-master orchestrator
|
|
2
|
+
#
|
|
3
|
+
# Top-level standalone (sister workflows/research/ + workflows/retro/ layout) —
|
|
4
|
+
# 5th master 跨 4 stage chain (discuss → plan → task → verify) one-shot auto orchestrate。
|
|
5
|
+
# 适合 trivial / well-defined feature 一行命令跑完整开发流; 关键 PR / 大重构推荐
|
|
6
|
+
# 分阶段手动 (`/discuss` → `/plan` → `/task` → `/verify`)。
|
|
7
|
+
#
|
|
8
|
+
# Sister refs:
|
|
9
|
+
# - workflows/discuss/auto/workflow.yaml (stage-master sister fan-out delegates_to pattern)
|
|
10
|
+
# - workflows/research/workflow.yaml + workflows/retro/workflow.yaml (top-level standalone sister)
|
|
11
|
+
# - src/workflow/masterOrchestrator.ts ('auto' literal + recursive spawn — spawn stage-master /auto)
|
|
12
|
+
# - src/workflow/schema/workflow.ts WorkflowSchemaV3 + DelegationClause (Phase 3.3 W0.5 SHIPPED)
|
|
13
|
+
#
|
|
14
|
+
# Super-master invariant (per WorkflowSchemaV3 runtime + check-workflow-schema.mjs K9):
|
|
15
|
+
# - phases 缺省 (master only has delegates_to[])
|
|
16
|
+
# - 4 delegates_to mode serial — 必带 explicit order (K9 invariant T3.3.W0.10)
|
|
17
|
+
# - delegates_to[].sub ∈ {discuss, plan, task, verify} (4 stage-master cross-validate)
|
|
18
|
+
# - K8 ctx single snapshot: top-level invoke 1 snapshot, pass to all 4 stage-master spawn
|
|
19
|
+
# (sister Phase 3.5 W0.1 pattern verbatim, 1 snapshot per top-level invoke 跨整个 cycle)
|
|
20
|
+
|
|
21
|
+
schema_version: harnessed.workflow.v3
|
|
22
|
+
workflow: auto
|
|
23
|
+
description: |
|
|
24
|
+
Super-master orchestrator — 自动 chain 4 stage (discuss → plan → task → verify serial
|
|
25
|
+
order 1-4)。一行命令跑完整 feature 开发流, 适合 trivial / well-defined feature OR hands-off
|
|
26
|
+
use case; 关键 PR / 大重构推荐分阶段手动 (`/discuss` → `/plan` → `/task` → `/verify`)。
|
|
27
|
+
Fail-fast default: 任一 stage fail 立即停, `harnessed resume` 续。Opt-in `--pause-between-stages`
|
|
28
|
+
flag 重现 v3.0.x stage gate UX (每 master 跑完停, 等用户 review/confirm 后跑下 stage)。
|
|
29
|
+
|
|
30
|
+
disciplines_applied: [karpathy, output-style, language, operational, priority, protocols]
|
|
31
|
+
tools_available:
|
|
32
|
+
- agent-teams-create
|
|
33
|
+
- planning-with-files
|
|
34
|
+
|
|
35
|
+
delegates_to:
|
|
36
|
+
- sub: discuss
|
|
37
|
+
mode: serial
|
|
38
|
+
order: 1
|
|
39
|
+
- sub: plan
|
|
40
|
+
mode: serial
|
|
41
|
+
order: 2
|
|
42
|
+
- sub: task
|
|
43
|
+
mode: serial
|
|
44
|
+
order: 3
|
|
45
|
+
- sub: verify
|
|
46
|
+
mode: serial
|
|
47
|
+
order: 4
|