harnessed 4.49.2 → 5.0.1
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-en.md +34 -15
- package/README-zh.md +634 -0
- package/README.md +300 -281
- package/dist/cli.mjs +2950 -1404
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/schemas/index.mjs +3 -2
- package/dist/schemas/index.mjs.map +1 -1
- package/manifests/SCHEMA.md +5 -0
- package/package.json +5 -1
- package/schemas/manifest.v1.schema.json +19 -0
package/README.md
CHANGED
|
@@ -2,31 +2,23 @@
|
|
|
2
2
|
<img src="./assets/logo.svg" alt="harnessed" width="440">
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
|
-
[
|
|
5
|
+
**English** | [简体中文](./README-zh.md) | [繁體中文](./README-tw.md) | [日本語](./README-ja.md) | [한국어](./README-ko.md) | [Português (Brasil)](./README-pt-BR.md) | [Türkçe](./README-tr.md) | [Русский](./README-ru.md) | [Tiếng Việt](./README-vi.md) | [ไทย](./README-th.md)
|
|
6
6
|
|
|
7
|
-
> _AI coding harness
|
|
7
|
+
> _AI coding harness package manager + composition orchestrator_ — it assembles the best of the open-source ecosystem into one executable engine, wired by the three-layer **BDD → SDD → TDD** methodology.
|
|
8
8
|
|
|
9
|
-
> **harnessed
|
|
9
|
+
> **harnessed is an orchestration brain + prompt library**, driving native subagent spawn through three fast, pure-function CLIs — `harnessed gates` (which sub-workflows fire), `harnessed prompt` (spawn-ready prompt for a sub), and `harnessed checkpoint` (record progress).
|
|
10
10
|
|
|
11
11
|
[](https://npmjs.com/package/harnessed)
|
|
12
12
|
[](./LICENSE)
|
|
13
13
|
[](https://github.com/sponsors/easyinplay)
|
|
14
14
|
|
|
15
|
-
> Not affiliated with, endorsed by, or sponsored by Harness Inc. (
|
|
15
|
+
> Not affiliated with, endorsed by, or sponsored by Harness Inc. (see [NOTICE](./NOTICE))
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
## 📦
|
|
19
|
+
## 📦 Quick Install
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npm install -g harnessed && harnessed setup
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
> Windows PowerShell 5.x 不支持 `&&` 链接 —— 改用 `;` 或分两行 (`npm install -g harnessed; harnessed setup`)。bash / zsh / PowerShell 7+ / cmd.exe 都正常。
|
|
28
|
-
|
|
29
|
-
**没有 Node.js?独立二进制** —— 分平台安装,后续用 `harnessed update` 自更新:
|
|
21
|
+
**Standalone binary (recommended)** - per-platform, self-updates via `harnessed update`:
|
|
30
22
|
|
|
31
23
|
```bash
|
|
32
24
|
# macOS (Apple Silicon) / Linux (x64)
|
|
@@ -38,183 +30,210 @@ curl -fsSL https://raw.githubusercontent.com/easyinplay/harnessed/main/install.s
|
|
|
38
30
|
irm https://raw.githubusercontent.com/easyinplay/harnessed/main/install.ps1 | iex
|
|
39
31
|
```
|
|
40
32
|
|
|
41
|
-
|
|
33
|
+
> The standalone binary embeds its runtime: harnessed itself needs neither external Node.js nor Bun. Upstream components may still require Node/npm, Git, Bun, Python, or browser system libraries.
|
|
34
|
+
|
|
35
|
+
The binary installer offers setup with your consent in interactive sessions. Do not repeat it if it completed successfully. If setup was skipped or failed, or you installed noninteractively, run `harnessed setup`.
|
|
36
|
+
|
|
37
|
+
**Via Bun (secondary recommendation; optional)**:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
bun install -g harnessed && bun run --bun harnessed setup
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
For later Bun commands, use `bun run --bun harnessed`; the bare `harnessed` shim may still invoke Node.js.
|
|
44
|
+
|
|
45
|
+
**Via npm (supported alternative; Node.js >= 22 required)**:
|
|
46
|
+
|
|
47
|
+
Bun is not required for this channel; Node.js >= 22 remains supported.
|
|
42
48
|
|
|
43
|
-
|
|
49
|
+
```bash
|
|
50
|
+
npm install -g harnessed && harnessed setup
|
|
51
|
+
```
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
> Windows PowerShell 5.x does not support `&&`. For either package channel, run the install command first, then run setup only if installation succeeds. bash / zsh / PowerShell 7+ / cmd.exe support the chain.
|
|
46
54
|
|
|
47
55
|
> [!TIP]
|
|
48
|
-
> 🚀
|
|
49
|
-
>
|
|
56
|
+
> 🚀 **The much-loved Agent Teams and Subagent features are auto-enabled in harnessed based on the task!**
|
|
57
|
+
> No need to manually configure `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` — `harnessed setup` writes it to `~/.claude/settings.json` automatically. Pattern A full-stack three-way / Pattern C 4-specialist and other multi-agent workflows work out of the box.
|
|
50
58
|
|
|
51
59
|
---
|
|
52
60
|
|
|
53
61
|
## ⏱️ First 5 Minutes
|
|
54
62
|
|
|
55
|
-
|
|
63
|
+
The shortest path from zero to a running workflow:
|
|
56
64
|
|
|
65
|
+
Step 1 is a prompt inside your host, not a shell command. In **Claude Code**, use:
|
|
66
|
+
|
|
67
|
+
```text
|
|
68
|
+
/auto "your first requirement"
|
|
57
69
|
```
|
|
58
|
-
|
|
59
|
-
|
|
70
|
+
|
|
71
|
+
In **Codex**, use:
|
|
72
|
+
|
|
73
|
+
```text
|
|
74
|
+
$auto "your first requirement"
|
|
60
75
|
```
|
|
61
76
|
|
|
77
|
+
Both start the default end-to-end workflow after setup for that host. The shell examples below use the binary/npm channel; for a Bun-managed install, replace the leading `harnessed` with `bun run --bun harnessed`.
|
|
78
|
+
|
|
62
79
|
```bash
|
|
63
|
-
# 2.
|
|
80
|
+
# 2. Lost? Run harnessed with no arguments — it tells you where you are + what's next
|
|
64
81
|
harnessed
|
|
65
|
-
# → you-are-here
|
|
66
|
-
#
|
|
67
|
-
#
|
|
82
|
+
# → you-are-here dashboard (active phase + per-step status) + a NEXT: auto|manual|done line
|
|
83
|
+
# no need to remember status / next / resume — one command (comet `/comet` analog, read-only)
|
|
84
|
+
# add --json for machine-readable output
|
|
68
85
|
```
|
|
69
86
|
|
|
70
87
|
```bash
|
|
71
|
-
# 3.
|
|
72
|
-
harnessed #
|
|
73
|
-
harnessed resume #
|
|
88
|
+
# 3. Resume any time after an interruption
|
|
89
|
+
harnessed # same you-are-here view
|
|
90
|
+
harnessed resume # continue from the latest checkpoint
|
|
74
91
|
```
|
|
75
92
|
|
|
76
|
-
>
|
|
93
|
+
> Want finer control over which stage runs and when? See the 3 modes below.
|
|
77
94
|
|
|
78
95
|
---
|
|
79
96
|
|
|
80
97
|
## ✨ TL;DR
|
|
81
98
|
|
|
82
|
-
|
|
99
|
+
**How it works**: harnessed **assembles** the best open-source Claude Code agents (gstack, GSD, superpowers, planning-with-files) and **orchestrates** them into one workflow via opinionated composition skills. It does **not** vendor upstream code — manifests describe install/check, and composition skills conduct the multi-upstream collaboration (so an upstream upgrade is just a re-install, never a manual code sync).
|
|
83
100
|
|
|
84
|
-
### 🔁
|
|
101
|
+
### 🔁 The operating loop
|
|
85
102
|
|
|
86
|
-
> **Discuss → Plan → Build → Verify → Ship
|
|
103
|
+
> **Discuss → Plan → Build → Verify → Ship**, closed by a **Learn** loop — machine-executed across the three-layer stack (gstack governance · GSD orchestration · superpowers TDD · checkpoint evidence). Raw agent work drifts; harnessed turns it into a source-of-truth path where progress and evidence persist instead of living in chat. **Learning is automatic**: every completed workflow appends its failure/loop/reject signals to `.planning/LEARNINGS.md`, which are injected into the next cycle — this is always-on, **not** gated on the optional Retro. Retro (`/retro`) is a separate, optional milestone summary.
|
|
87
104
|
|
|
88
105
|
```mermaid
|
|
89
106
|
flowchart LR
|
|
90
|
-
R(["⓪ Research
|
|
91
|
-
D(["① Discuss
|
|
92
|
-
P --> T(["③ Task
|
|
93
|
-
T --> V(["④ Verify
|
|
94
|
-
V --> S(["⑤ Ship
|
|
95
|
-
S -. "
|
|
96
|
-
V -. "
|
|
97
|
-
S == "🔁 Learn —
|
|
107
|
+
R(["⓪ Research<br/>multi-source investigate<br/>(optional)"]):::opt --> D
|
|
108
|
+
D(["① Discuss<br/>3-layer clarify"]) --> P(["② Plan<br/>persist spec + tasks"])
|
|
109
|
+
P --> T(["③ Task<br/>TDD build + checkpoint"])
|
|
110
|
+
T --> V(["④ Verify<br/>independent review + evidence gate"])
|
|
111
|
+
V --> S(["⑤ Ship<br/>release-preflight → tag-ready (publish via CI)"])
|
|
112
|
+
S -. "milestone summary" .-> RT(["Retro<br/>(optional)"]):::opt
|
|
113
|
+
V -. "fail / gap" .-> T
|
|
114
|
+
S == "🔁 Learn — learnings captured on every workflow completion → injected next cycle" ==> D
|
|
98
115
|
classDef opt stroke-dasharray:5,opacity:0.8
|
|
99
116
|
```
|
|
100
117
|
|
|
101
118
|
---
|
|
102
119
|
|
|
103
|
-
## 🧱
|
|
120
|
+
## 🧱 What is the three-layer stack?
|
|
104
121
|
|
|
105
|
-
harnessed
|
|
122
|
+
harnessed's three-layer stack is a software-engineering implementation of the established **BDD → SDD → TDD** nesting: three nested feedback loops, each answering a different question. The **three layers are the loops** (the stable theory); harnessed **composes** the open-source ecosystem into each loop — and the components **overlap**, which is exactly what a composition orchestrator arbitrates.
|
|
106
123
|
|
|
107
|
-
|
|
|
124
|
+
| Layer | Loop | Question it answers | Composed from (overlapping) |
|
|
108
125
|
|---|---|---|---|
|
|
109
|
-
| **① Behavior** | BDD |
|
|
110
|
-
| **② Spec** | SDD |
|
|
111
|
-
| **③ Implementation** | TDD |
|
|
126
|
+
| **① Behavior** | BDD | *What* to build + how we know it's done | gstack `/office-hours` governance · GSD discuss · superpowers brainstorming → acceptance criteria |
|
|
127
|
+
| **② Spec** | SDD | *How* it's structured | GSD plan-phase → requirements / design / tasks · contracts (Spec Kit / ECC patterns) |
|
|
128
|
+
| **③ Implementation** | TDD | Does it actually *work* | superpowers TDD red-green · subagent execution · GSD verify-work · harnessed completion gate |
|
|
112
129
|
|
|
113
|
-
|
|
130
|
+
The loops are **nested lenses, not phases** — the classic Cucumber BDD-outer + TDD-inner double-loop, extended with a GenAI-era SDD spec ring into a triple-loop. harnessed runs the default outer→inner traversal as its 5-stage cadence, plus the **back-edges it ships today**: Verify kicks failing work back to Task, a subagent that hits a gray area round-trips to clarification before continuing, and every shipped cycle feeds learnings back into the next Discuss. (Finer-grained structured back-edges — e.g. a contract contradiction routing straight to Spec, an ambiguous requirement to Behavior — are on the roadmap, not shipped. harnessed is the linear-cadence realization of the triple-loop; the full routed graph is its evolution path.)
|
|
114
131
|
|
|
115
|
-
|
|
132
|
+
**The components overlap — that's the point.** **GSD** threads through all three loops as the orchestration backbone, **gstack** spans Behavior + Review, **superpowers** spans Behavior (brainstorm) + Implementation (TDD). harnessed wires them — and arbitrates the overlap — into one engine. Two **cross-cutting disciplines** run through every layer: **karpathy principles** (*how* to code — simplicity-first, surgical diffs) + **mattpocock moves** (on-demand tactical tools like `/diagnosing-bugs`, `/grill-with-docs`).
|
|
116
133
|
|
|
117
|
-
|
|
134
|
+
Mapped to the runtime loop above: **Discuss = Behavior (BDD) · Plan = Spec (SDD) · Build = Implementation (TDD)**, then **Verify + Ship** close it with evidence gates.
|
|
118
135
|
|
|
119
136
|
---
|
|
120
137
|
|
|
121
|
-
>
|
|
122
|
-
>
|
|
123
|
-
>
|
|
124
|
-
>
|
|
138
|
+
> Wait — can harnessed really go toe-to-toe with upstream giants like superpowers / gstack / GSD?
|
|
139
|
+
> Of course — we **stand on the shoulders of giants**. See further, Newton said. 🧐
|
|
140
|
+
> ... *(whispers)* Though on closer look, more like the parrot perched on said shoulder.
|
|
141
|
+
> Eh — parrots mimic; we **orchestrate**. 🦜
|
|
125
142
|
|
|
126
143
|
---
|
|
127
144
|
|
|
128
|
-
## 🎯
|
|
145
|
+
## 🎯 Key Differentiators
|
|
129
146
|
|
|
130
|
-
-
|
|
131
|
-
-
|
|
132
|
-
- **Composition Skill**
|
|
133
|
-
- **L0 Discipline Substrate**
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
- **Forward continuation
|
|
147
|
+
- **Three-layer stack machine-executed** — the **BDD→SDD→TDD nested triple-loop** ([what's that?](#-what-is-the-three-layer-stack)), composed from `gstack` + `GSD` + `superpowers` (overlapping, GSD as the backbone) with `karpathy 4 principles` + `mattpocock 23 moves` as cross-cutting disciplines
|
|
148
|
+
- **No vendoring of upstream** — manifests describe install/check; on upstream upgrade users just re-install to get the latest version
|
|
149
|
+
- **Composition Skill** — in-house workflow skills act as the conductor's baton, orchestrating multiple upstreams in concert. **1 super-master `/auto` + 5 stage masters + 20 sub-workflows + 2 standalones = 28 namespace-layered workflows**, full 5-stage machine-execution (`/auto` one-shot across stages / `/discuss /plan /task /verify /ship` single stage / 20 three-layer-stack subs / `/research /retro` 2 standalones)
|
|
150
|
+
- **L0 Discipline Substrate** — global cross-stage behavior baseline (karpathy principles + output-style + language + operational + priority + protocols), applied universally
|
|
151
|
+
- **Package manager mindset** — install dependency graph auto-resolves, doctor health check, install-base one-shot full install
|
|
152
|
+
- **Unified entry point** — users face `/discuss /plan /task /verify /ship` master slash commands without learning each upstream's terminology; sub commands explicitly invoke a single stage (e.g. `/discuss-strategic` runs only the strategic-layer clarification)
|
|
153
|
+
- **Forward continuation** — `harnessed next` / `harnessed advance` carry you across tasks and phases: when one finishes, the next is **derived from `.planning/` disk state** (a phase is done when its `PLAN` has a matching `SUMMARY`) — no queue to maintain, so a mid-stream new phase is picked up automatically, and resume re-derives from disk. A per-turn `NEXT-UNIT` breadcrumb points at what's next
|
|
137
154
|
|
|
138
155
|
---
|
|
139
156
|
|
|
140
|
-
## 🆚
|
|
157
|
+
## 🆚 vs Native Claude Code / Codex
|
|
141
158
|
|
|
142
|
-
|
|
159
|
+
Native agents give you primitives; harnessed wires them into a methodology. Where a native cell says a primitive "exists," you still design, wire, and maintain it yourself per project — harnessed ships it pre-composed and engine-driven.
|
|
143
160
|
|
|
144
|
-
|
|
|
161
|
+
| Dimension | Native Claude Code | Native Codex | harnessed |
|
|
145
162
|
|---|---|---|---|
|
|
146
|
-
|
|
|
147
|
-
|
|
|
148
|
-
|
|
|
149
|
-
|
|
|
150
|
-
|
|
|
151
|
-
| **Subagent
|
|
152
|
-
|
|
|
153
|
-
|
|
|
163
|
+
| **Workflow / methodology** | Primitives only — you design the flow each time | Fewer primitives — freestyle per prompt | Codified **Discuss→Ship** 5-stage three-layer-stack engine — BDD + SDD + TDD loops + 2 cross-cutting (Review + Ship) |
|
|
164
|
+
| **Instruction injection** | `CLAUDE.md` + skills + hooks exist, but static & wired by hand | `AGENTS.md` + skills (`~/.agents/skills`) + hooks — also static & wired by hand | Per-turn breadcrumb hook + task-scoped routing + learnings injected each cycle |
|
|
165
|
+
| **State / progress** | Chat context — lost on `/clear` / compaction | Chat context — no persistence layer | On-disk `.planning/` + `workflows.json` per-repo ledger + checkpoint evidence |
|
|
166
|
+
| **Cross-session recovery** | Re-explain the context by hand | Re-explain the context by hand | `harnessed status --recover`: you-are-here + next step |
|
|
167
|
+
| **Verification / "done"** | Agent self-reports "done" | Agent self-reports "done" | Independent review subagents + **fail-CLOSED evidence guard** (missing artifact = not done) |
|
|
168
|
+
| **Subagent orchestration** | Subagents + Agent Teams available, but orchestrated by hand | `spawn_agent` / `send_input` / `wait_agent` exist — also orchestrated by hand; no Agent-Teams equivalent | `gates → prompt → spawn → checkpoint`; Agent Teams auto-enabled per task |
|
|
169
|
+
| **Learning loop** | None | None | `LEARNINGS.md` auto-captured + injected into the next cycle |
|
|
170
|
+
| **Platform reach** | Claude Code only | Codex only | **Cross-harness** — Claude Code and Codex both first-class (hooks / agent roles / spawn dispatch / `doctor --matrix` / host-rendered prose) |
|
|
171
|
+
|
|
172
|
+
> Native agents win on zero-setup, zero-overhead for trivial one-off edits. harnessed earns its keep the moment work spans multiple steps, sessions, or subagents — where freestyle drift and lost-in-chat state start costing you.
|
|
154
173
|
|
|
155
|
-
|
|
174
|
+
**Don't take our word for it — we ran the experiment.** A published A/B evidence pack ([docs/evidence/2026-07-b1/](./docs/evidence/2026-07-b1/)) compares `/auto` against bare Claude Code on 4 machine-graded tasks, full transcripts included. Honest headline: on small, fully-specified tasks both arms score 100% and bare is 4-5× cheaper — use bare (or auto-lite) there. The orchestration value claim lives in fuzzy-spec / multi-session territory, which that experiment deliberately does not cover; bring us a real task from that territory and we'll run the same protocol on it.
|
|
156
175
|
|
|
157
176
|
---
|
|
158
177
|
|
|
159
|
-
## 🚀
|
|
178
|
+
## 🚀 Quick Start — 3 Options
|
|
160
179
|
|
|
161
|
-
|
|
180
|
+
In order of increasing user intervention:
|
|
162
181
|
|
|
163
|
-
### 🎯 Auto Mode (
|
|
182
|
+
### 🎯 Auto Mode (Recommended for newcomers / don't want to think hard)
|
|
164
183
|
|
|
165
184
|
```
|
|
166
|
-
/auto "
|
|
185
|
+
/auto "requirement X"
|
|
167
186
|
|
|
168
|
-
#
|
|
169
|
-
#
|
|
170
|
-
/auto "
|
|
187
|
+
# For large requirements you can explicitly stage (usually not needed — AI auto-judges and routes in;
|
|
188
|
+
# force it if you believe it's a large requirement):
|
|
189
|
+
/auto "requirement X" --staged
|
|
171
190
|
```
|
|
172
191
|
|
|
173
|
-
>
|
|
192
|
+
> Don't want to think hard, or just getting started — let harnessed handle everything. Runs the full 6 stages (research conditional → discuss → plan → task → verify → retro mandatory) without stopping. AI 1-shot auto-judges requirement complexity, suggests switching to `--staged` mode for large requirements (stops after each stage for review); before starting prompts "Do you have a clear understanding of the requirement?" — if no → auto-runs `/research` multi-source investigation; ends with mandatory `/retro` summary. Fail-fast on failure, resume via `harnessed resume`.
|
|
174
193
|
|
|
175
|
-
### 📂 Stage Mode (
|
|
194
|
+
### 📂 Stage Mode (Recommended for power users / want to review intermediate results)
|
|
176
195
|
|
|
177
196
|
```
|
|
178
|
-
/discuss "
|
|
179
|
-
/plan "
|
|
180
|
-
/task "subtask-1"
|
|
181
|
-
/verify "phase-1"
|
|
197
|
+
/discuss "requirement X" # Strategic + Phase + Subtask 3-layer clarification
|
|
198
|
+
/plan "requirement X" # Architecture (conditional) + plan persistence
|
|
199
|
+
/task "subtask-1" # 4 subs serial (clarify → code → test → deliver)
|
|
200
|
+
/verify "phase-1" # 10 subs conditional verification
|
|
182
201
|
```
|
|
183
202
|
|
|
184
|
-
>
|
|
203
|
+
> Want to decide which stage to start from / review intermediate outputs — 5 masters callable independently, and each master still auto-fans-out all of that stage's subs internally.
|
|
185
204
|
|
|
186
|
-
### 🔬 Surgical Mode (
|
|
205
|
+
### 🔬 Surgical Mode (Expert mode / you know what you want)
|
|
187
206
|
|
|
188
207
|
```
|
|
189
|
-
/discuss-phase "..." #
|
|
190
|
-
/plan-architecture "..." #
|
|
191
|
-
/verify-paranoid "..." #
|
|
192
|
-
# ...
|
|
208
|
+
/discuss-phase "..." # Run only Phase-layer clarification
|
|
209
|
+
/plan-architecture "..." # Run only architecture review
|
|
210
|
+
/verify-paranoid "..." # Run only the Paranoid Staff Engineer review
|
|
211
|
+
# ... pick any of the other 20 sub-workflows
|
|
193
212
|
```
|
|
194
213
|
|
|
195
|
-
>
|
|
214
|
+
> "I'm an expert, I'll decide myself" — skip the master, invoke a sub-workflow directly. Suits advanced users who know exactly which sub they need, or reuse of a single step.
|
|
196
215
|
|
|
197
216
|
---
|
|
198
217
|
|
|
199
|
-
## 📐 5-
|
|
218
|
+
## 📐 5-Stage Flow Diagram
|
|
200
219
|
|
|
201
220
|
```mermaid
|
|
202
221
|
graph TD
|
|
203
|
-
RS([⓪ /research —
|
|
204
|
-
subgraph Discuss[① Discuss
|
|
222
|
+
RS([⓪ /research — pre-stage multi-source investigation, optional]):::optional
|
|
223
|
+
subgraph Discuss[① Discuss — Strategic Clarification]
|
|
205
224
|
DM[/discuss master/]
|
|
206
225
|
DS[discuss-strategic]
|
|
207
226
|
DP[discuss-phase]
|
|
208
227
|
DT[discuss-subtask]
|
|
209
228
|
DM --> DS & DP & DT
|
|
210
229
|
end
|
|
211
|
-
subgraph Plan[② Plan
|
|
230
|
+
subgraph Plan[② Plan — Task Planning]
|
|
212
231
|
PM[/plan master/]
|
|
213
232
|
PA[plan-architecture]
|
|
214
233
|
PP[plan-phase]
|
|
215
234
|
PM --> PA & PP
|
|
216
235
|
end
|
|
217
|
-
subgraph Task[③ Task
|
|
236
|
+
subgraph Task[③ Task — Execution]
|
|
218
237
|
TM[/task master/]
|
|
219
238
|
TC[task-clarify]
|
|
220
239
|
TCo[task-code]
|
|
@@ -222,7 +241,7 @@ graph TD
|
|
|
222
241
|
TD[task-deliver]
|
|
223
242
|
TM --> TC --> TCo --> TT --> TD
|
|
224
243
|
end
|
|
225
|
-
subgraph Verify[④ Verify
|
|
244
|
+
subgraph Verify[④ Verify — Verification]
|
|
226
245
|
VMs[/verify master/]
|
|
227
246
|
VP[verify-progress]
|
|
228
247
|
VC[verify-code-review]
|
|
@@ -236,147 +255,147 @@ graph TD
|
|
|
236
255
|
VM[verify-multispec]
|
|
237
256
|
VMs --> VP & VC & VPa & VQ & VS & VD & VE & VV & VSi & VM
|
|
238
257
|
end
|
|
239
|
-
subgraph Ship[⑤ Ship
|
|
258
|
+
subgraph Ship[⑤ Ship — Release]
|
|
240
259
|
SMs[/ship master/]
|
|
241
260
|
SP[ship-preflight]
|
|
242
261
|
SMs --> SP
|
|
243
262
|
end
|
|
244
|
-
RT([⑥ /retro —
|
|
263
|
+
RT([⑥ /retro — milestone summary, optional]):::optional
|
|
245
264
|
RS --> Discuss
|
|
246
265
|
Discuss --> Plan --> Task --> Verify --> Ship
|
|
247
266
|
Ship --> RT
|
|
248
267
|
classDef optional stroke-dasharray:5 5,fill:#f5f5f5,color:#666
|
|
249
268
|
```
|
|
250
269
|
|
|
251
|
-
>
|
|
270
|
+
> Dashed boxes = optional standalones (`/research` pre-strategic investigation / `/retro` post-milestone summary); solid boxes = main 5-stage cadence (Ship stops at tag-ready; `publish.yml` CI does the actual publish).
|
|
252
271
|
|
|
253
|
-
### 28-Workflow
|
|
272
|
+
### 28-Workflow Overview Table
|
|
254
273
|
|
|
255
274
|
| Slash cmd | Stage | Type | Capability / Upstream | Brief |
|
|
256
275
|
|-----------|-------|------|----------------------|-------|
|
|
257
|
-
| `/auto` | All | **Super-master** | masterOrchestrator (
|
|
258
|
-
| `/discuss` | ① Discuss | Master | masterOrchestrator | 3
|
|
259
|
-
| `/discuss-strategic` | ① Discuss | Sub | gstack `/office-hours` + `/plan-ceo-review` + planning-with-files |
|
|
260
|
-
| `/discuss-phase` | ① Discuss | Sub | GSD `/gsd-discuss-phase` + planning-with-files | Phase
|
|
261
|
-
| `/discuss-subtask` | ① Discuss | Sub | superpowers brainstorming + `/grill-with-docs` |
|
|
262
|
-
| `/plan` | ② Plan | Master | masterOrchestrator |
|
|
263
|
-
| `/plan-architecture` | ② Plan | Sub | gstack `/plan-eng-review` |
|
|
264
|
-
| `/plan-phase` | ② Plan | Sub | GSD `/gsd-plan-phase` + planning-with-files `/plan` |
|
|
265
|
-
| `/task` | ③ Task | Master | masterOrchestrator |
|
|
266
|
-
| `/task-clarify` | ③ Task | Sub | superpowers brainstorming + `/grill-with-docs` conditional |
|
|
267
|
-
| `/task-code` | ③ Task | Sub | karpathy 4
|
|
268
|
-
| `/task-test` | ③ Task | Sub | superpowers TDD red-green-refactor + `/diagnosing-bugs` conditional |
|
|
269
|
-
| `/task-deliver` | ③ Task | Sub | `harnessed checkpoint` completion gate + Agent Teams conditional |
|
|
270
|
-
| `/verify` | ④ Verify | Master | masterOrchestrator | 10
|
|
271
|
-
| `/verify-progress` | ④ Verify | Sub | GSD `/gsd-verify-work` + `/gsd-progress` |
|
|
272
|
-
| `/verify-code-review` | ④ Verify | Sub | `code-review`
|
|
273
|
-
| `/verify-paranoid` | ④ Verify | Sub | gstack `/review` (Paranoid Staff Engineer) |
|
|
274
|
-
| `/verify-qa` | ④ Verify | Sub | gstack `/qa` + playwright-cli / `@playwright/test` / webapp-testing |
|
|
276
|
+
| `/auto` | All | **Super-master** | masterOrchestrator (across 6 stages) | One-shot full 6-stage run (research conditional → discuss → plan → task → verify → retro mandatory); AI 1-shot complexity judge + understanding check + mandatory retro; `--staged` opt-in stage gate |
|
|
277
|
+
| `/discuss` | ① Discuss | Master | masterOrchestrator | 3 subs parallel gate-eval (chain-isolation rule) |
|
|
278
|
+
| `/discuss-strategic` | ① Discuss | Sub | gstack `/office-hours` + `/plan-ceo-review` + planning-with-files | Strategic layer — mandatory governance for new features / new milestones / product direction (findings.md persisted) |
|
|
279
|
+
| `/discuss-phase` | ① Discuss | Sub | GSD `/gsd-discuss-phase` + planning-with-files | Phase layer — ≥2 open decisions / gray-area clarification (findings.md + knowledge.md persisted) |
|
|
280
|
+
| `/discuss-subtask` | ① Discuss | Sub | superpowers brainstorming + `/grill-with-docs` | Subtask layer — ≥2 approaches / core algorithm / API contract (ephemeral short discussion, not persisted) |
|
|
281
|
+
| `/plan` | ② Plan | Master | masterOrchestrator | Serial invoke of 2 subs (architecture conditional → phase always) |
|
|
282
|
+
| `/plan-architecture` | ② Plan | Sub | gstack `/plan-eng-review` | Architecture layer — mandatory governance gate for complex architecture |
|
|
283
|
+
| `/plan-phase` | ② Plan | Sub | GSD `/gsd-plan-phase` + planning-with-files `/plan` | Plan layer — persists `task_plan.md` + `progress.md` |
|
|
284
|
+
| `/task` | ③ Task | Master | masterOrchestrator | Serial invoke of 4 subs per subtask (clarify → code → test → deliver) |
|
|
285
|
+
| `/task-clarify` | ③ Task | Sub | superpowers brainstorming + `/grill-with-docs` conditional | Subtask startup clarification gate |
|
|
286
|
+
| `/task-code` | ③ Task | Sub | karpathy 4 principles + `/improve-codebase-architecture` / `/diagnosing-bugs` conditional | Subtask coding + cross-session progress.md sync |
|
|
287
|
+
| `/task-test` | ③ Task | Sub | superpowers TDD red-green-refactor + `/diagnosing-bugs` conditional | TDD mandatory for core logic (alias mattpocock `/tdd`) |
|
|
288
|
+
| `/task-deliver` | ③ Task | Sub | `harnessed checkpoint` completion gate + Agent Teams conditional | Until verbatim `COMPLETE` + R20.10 max_iter fallback |
|
|
289
|
+
| `/verify` | ④ Verify | Master | masterOrchestrator | 10 subs conditional dispatch by scenario |
|
|
290
|
+
| `/verify-progress` | ④ Verify | Sub | GSD `/gsd-verify-work` + `/gsd-progress` | Mandatory serial starting point — UAT acceptance + state sync |
|
|
291
|
+
| `/verify-code-review` | ④ Verify | Sub | `code-review` multi-subagent fan-out | High-confidence findings in parallel |
|
|
292
|
+
| `/verify-paranoid` | ④ Verify | Sub | gstack `/review` (Paranoid Staff Engineer) | Mandatory for critical-module pre-PR |
|
|
293
|
+
| `/verify-qa` | ④ Verify | Sub | gstack `/qa` + playwright-cli / `@playwright/test` / webapp-testing | End-to-end QA (has_ui_changes conditional) |
|
|
275
294
|
| `/verify-security` | ④ Verify | Sub | gstack `/cso` | OWASP / auth / secrets (has_auth_or_secrets conditional) |
|
|
276
|
-
| `/verify-design` | ④ Verify | Sub | gstack `/design-review` + ui-ux-pro-max + design-taste-frontend |
|
|
277
|
-
| `/verify-eval-review` | ④ Verify | Sub | GSD `/gsd-eval-review` | AI phase eval
|
|
278
|
-
| `/verify-validate-phase` | ④ Verify | Sub | GSD `/gsd-validate-phase` | Nyquist requirement→test
|
|
279
|
-
| `/verify-simplify` | ④ Verify | Sub | `code-simplifier` |
|
|
280
|
-
| `/verify-multispec` | ④ Verify | Sub | 4-specialist Agent Team Pattern C |
|
|
281
|
-
| `/ship` | ⑤ Ship | Master | masterOrchestrator |
|
|
282
|
-
| `/ship-preflight` | ⑤ Ship | Sub | `harnessed release-preflight` | Read-only
|
|
283
|
-
| `/research` | Standalone | Standalone | Tavily / Exa MCP + ctx7 + GSD `/gsd-discuss-phase` |
|
|
284
|
-
| `/retro` | Standalone | Standalone | gstack `/retro` + planning-with-files RETROSPECTIVE.md |
|
|
285
|
-
|
|
286
|
-
> Master orchestrator
|
|
287
|
-
>
|
|
295
|
+
| `/verify-design` | ④ Verify | Sub | gstack `/design-review` + ui-ux-pro-max + design-taste-frontend | Design system consistency (has_design_changes conditional) |
|
|
296
|
+
| `/verify-eval-review` | ④ Verify | Sub | GSD `/gsd-eval-review` | AI phase eval coverage audit (has_ai_phase conditional; pairs with plan-side gsd-ai-integration-phase) |
|
|
297
|
+
| `/verify-validate-phase` | ④ Verify | Sub | GSD `/gsd-validate-phase` | Nyquist requirement→test coverage backfill (requires_coverage_audit conditional) |
|
|
298
|
+
| `/verify-simplify` | ④ Verify | Sub | `code-simplifier` | Final serial simplification |
|
|
299
|
+
| `/verify-multispec` | ④ Verify | Sub | 4-specialist Agent Team Pattern C | Critical release / large refactor PR escalation (mutual SendMessage cross-examination) |
|
|
300
|
+
| `/ship` | ⑤ Ship | Master | masterOrchestrator | Release stage after Verify — preflight → delegate PR/deploy to gstack `/ship` → publish via CI (tag-ready boundary) |
|
|
301
|
+
| `/ship-preflight` | ⑤ Ship | Sub | `harnessed release-preflight` | Read-only release-readiness gate (CHANGELOG `[Unreleased]` / version / git-clean / tag-absent); blocks on failure |
|
|
302
|
+
| `/research` | Standalone | Standalone | Tavily / Exa MCP + ctx7 + GSD `/gsd-discuss-phase` | Multi-source investigation (Stage ① alternate) |
|
|
303
|
+
| `/retro` | Standalone | Standalone | gstack `/retro` + planning-with-files RETROSPECTIVE.md | Project / milestone close-out summary |
|
|
304
|
+
|
|
305
|
+
> Master orchestrator auto gate-routes to the right sub (chain-isolation rule — non-firing subs are transparently declared skipped).
|
|
306
|
+
> Direct sub invocation also bypasses the master to run a single stage, e.g. `/discuss-strategic "new feature X"`.
|
|
288
307
|
|
|
289
308
|
---
|
|
290
309
|
|
|
291
|
-
## ⚡
|
|
310
|
+
## ⚡ Usage Flow
|
|
292
311
|
|
|
293
|
-
5-stage
|
|
312
|
+
5-stage three-layer-stack methodology — recommended driving via the 5 master orchestrators in series:
|
|
294
313
|
|
|
295
314
|
```
|
|
296
315
|
/discuss → /plan → /task → /verify → /ship
|
|
297
316
|
① ② ③ ④ ⑤
|
|
298
317
|
```
|
|
299
318
|
|
|
300
|
-
| Stage | Master |
|
|
319
|
+
| Stage | Master | Main sub-workflows | Upstream collaboration |
|
|
301
320
|
| ---- | ---- | ---- | ---- |
|
|
302
|
-
| ① **Discuss** | `/discuss` | strategic / phase / subtask (3
|
|
321
|
+
| ① **Discuss** | `/discuss` | strategic / phase / subtask (3 in parallel) | gstack `/office-hours` + GSD `/gsd-discuss-phase` + superpowers brainstorming |
|
|
303
322
|
| ② **Plan** | `/plan` | architecture (conditional) → phase | gstack `/plan-eng-review` + GSD `/gsd-plan-phase` + planning-with-files |
|
|
304
|
-
| ③ **Task** | `/task` | clarify → code → test → deliver (
|
|
305
|
-
| ④ **Verify** | `/verify` | progress → 5
|
|
306
|
-
| ⑤ **Ship** | `/ship` | preflight (
|
|
323
|
+
| ③ **Task** | `/task` | clarify → code → test → deliver (4 serial per subtask) | karpathy principles + mattpocock moves + superpowers TDD + harnessed completion gate |
|
|
324
|
+
| ④ **Verify** | `/verify` | progress → 5 parallel conditional → simplify (+ multispec critical) | GSD `/gsd-verify-work` + code-review + gstack `/review` / `/qa` / `/cso` / `/design-review` + code-simplifier |
|
|
325
|
+
| ⑤ **Ship** | `/ship` | preflight (release-readiness gate) → delegate PR/deploy | `harnessed release-preflight` + gstack `/ship` + `publish.yml` CI (tag-ready boundary) |
|
|
307
326
|
|
|
308
|
-
|
|
327
|
+
Practical example:
|
|
309
328
|
|
|
310
329
|
```bash
|
|
311
|
-
# 1.
|
|
330
|
+
# 1. Install workflow upstreams (one line installs gstack + GSD + superpowers + planning-with-files)
|
|
312
331
|
harnessed setup
|
|
313
332
|
|
|
314
|
-
# 2.
|
|
315
|
-
/discuss "
|
|
316
|
-
/plan "
|
|
317
|
-
/task "subtask-1: API contract" #
|
|
318
|
-
/verify "phase-1" # 10
|
|
319
|
-
/ship # release-preflight
|
|
333
|
+
# 2. Run the 5-stage cadence inside Claude Code
|
|
334
|
+
/discuss "new feature X" # Strategic + Phase + Subtask 3-layer clarification
|
|
335
|
+
/plan "new feature X" # Architecture (conditional) + plan (task graph persisted)
|
|
336
|
+
/task "subtask-1: API contract" # 4 subs serial per subtask
|
|
337
|
+
/verify "phase-1" # 10 subs conditional
|
|
338
|
+
/ship # release-preflight gate → PR/deploy (tag-ready; publish via CI)
|
|
320
339
|
|
|
321
|
-
# 3.
|
|
340
|
+
# 3. Resume after interruption (any time)
|
|
322
341
|
harnessed resume
|
|
323
342
|
```
|
|
324
343
|
|
|
325
|
-
>
|
|
344
|
+
> You can also invoke subs directly to bypass the master and run just one layer, e.g. `/verify-paranoid` runs only the Paranoid Staff Engineer review.
|
|
326
345
|
|
|
327
|
-
📊
|
|
346
|
+
📊 Detailed mermaid + full stage walkthroughs: [docs/WORKFLOW.md](./docs/WORKFLOW.md)
|
|
328
347
|
|
|
329
348
|
---
|
|
330
349
|
|
|
331
|
-
## 🗂️
|
|
350
|
+
## 🗂️ Architecture (5-stage namespace-layered)
|
|
332
351
|
|
|
333
|
-
### 1.
|
|
352
|
+
### 1. Directory Structure
|
|
334
353
|
|
|
335
354
|
```
|
|
336
355
|
harnessed/
|
|
337
|
-
├── manifests/ # L1:
|
|
338
|
-
├── workflows/ # L6: composition
|
|
339
|
-
│ ├── discuss/ # Stage ① 3
|
|
356
|
+
├── manifests/ # L1: upstream description layer (NOT vendored)
|
|
357
|
+
├── workflows/ # L6: composition skills (5-stage conductor's baton)
|
|
358
|
+
│ ├── discuss/ # Stage ① 3 layers (strategic + phase + subtask)
|
|
340
359
|
│ │ ├── auto/ # /discuss master gate-route
|
|
341
360
|
│ │ ├── strategic/ # /discuss-strategic (gstack /office-hours + /plan-ceo-review)
|
|
342
361
|
│ │ ├── phase/ # /discuss-phase (GSD /gsd-discuss-phase)
|
|
343
362
|
│ │ └── subtask/ # /discuss-subtask (superpowers brainstorming)
|
|
344
|
-
│ ├── plan/ # Stage ② (architecture + phase
|
|
363
|
+
│ ├── plan/ # Stage ② (architecture + phase task graph)
|
|
345
364
|
│ ├── task/ # Stage ③ (clarify + code + test + deliver)
|
|
346
365
|
│ ├── verify/ # Stage ④ (progress + code-review + paranoid + qa + cso + design + simplify + multispec)
|
|
347
|
-
│ ├── ship/ # Stage ⑤ (preflight
|
|
366
|
+
│ ├── ship/ # Stage ⑤ (preflight release-readiness gate → delegate PR/deploy to gstack /ship; tag-ready)
|
|
348
367
|
│ ├── research/ # standalone Stage ① alternate
|
|
349
368
|
│ ├── retro/ # standalone post-⑤ milestone close
|
|
350
|
-
│ ├── capabilities.yaml # L5a: ~100
|
|
369
|
+
│ ├── capabilities.yaml # L5a: ~100 entries, 7 categories SoT
|
|
351
370
|
│ ├── defaults.yaml # ralph_max_iterations per workflow phase
|
|
352
|
-
│ ├── judgments/ # L5a:
|
|
371
|
+
│ ├── judgments/ # L5a: three-layer-stack criteria + parallelism + tdd + fallback + rules-routing
|
|
353
372
|
│ │ ├── strategic-gate.yaml
|
|
354
373
|
│ │ ├── phase-gate.yaml
|
|
355
374
|
│ │ ├── subtask-gate.yaml
|
|
356
375
|
│ │ ├── parallelism-gate.yaml # L5b execution mechanism routing
|
|
357
376
|
│ │ ├── tdd-gate.yaml
|
|
358
|
-
│ │ ├── fallback.yaml # 3
|
|
359
|
-
│ │ ├── web-design-routing.yaml # UI
|
|
360
|
-
│ │ ├── web-testing-routing.yaml # E2E /
|
|
361
|
-
│ │ ├── web-search-routing.yaml #
|
|
362
|
-
│ │ └── stage-routing.yaml # master orchestrator sub-stage
|
|
363
|
-
│ └── disciplines/ # L0:
|
|
364
|
-
│ ├── karpathy.yaml # 4
|
|
377
|
+
│ │ ├── fallback.yaml # 3 rules: skip_with_transparency + override + chain_isolation
|
|
378
|
+
│ │ ├── web-design-routing.yaml # UI design tool routing
|
|
379
|
+
│ │ ├── web-testing-routing.yaml # E2E / browser testing tool routing
|
|
380
|
+
│ │ ├── web-search-routing.yaml # Web search / doc fetch routing
|
|
381
|
+
│ │ └── stage-routing.yaml # master orchestrator sub-stage routing
|
|
382
|
+
│ └── disciplines/ # L0: global cross-stage behavior baseline
|
|
383
|
+
│ ├── karpathy.yaml # 4 principles + ≤200L
|
|
365
384
|
│ ├── output-style.yaml # BLUF + no-emoji + no-em-dash
|
|
366
385
|
│ ├── language.yaml # zh-Hans default + English preserve
|
|
367
386
|
│ ├── operational.yaml # biome preempt + A7 + commit safety
|
|
368
|
-
│ ├── priority.yaml # skill conflict
|
|
369
|
-
│ └── protocols.yaml # cc-handoff design doc
|
|
387
|
+
│ ├── priority.yaml # skill conflict arbitration
|
|
388
|
+
│ └── protocols.yaml # cc-handoff design doc self-contained
|
|
370
389
|
├── routing/ # L4: routing engine SSOT (decision_rules.yaml)
|
|
371
390
|
├── schemas/ # L3: JSON Schema (IDE / CI consume)
|
|
372
391
|
├── src/ # L4: TS engine (platform + workflow + routing + cli + installers + checkpoint + audit + state)
|
|
373
392
|
├── tests/ # vitest unit + integration + dogfood (R8.1 dogfood-first)
|
|
374
393
|
├── scripts/ # CI gate (check-workflow-schema, transparency-verdict, state-archive)
|
|
375
394
|
├── .planning/ # project memory (STATE + ROADMAP + REQUIREMENTS + per-phase + milestones)
|
|
376
|
-
└── docs/adr/ #
|
|
395
|
+
└── docs/adr/ # architecture decision records
|
|
377
396
|
```
|
|
378
397
|
|
|
379
|
-
### 2.
|
|
398
|
+
### 2. Logical Layering (8 layers)
|
|
380
399
|
|
|
381
400
|
```
|
|
382
401
|
┌────────────────────────────────────────────────────────────┐
|
|
@@ -387,12 +406,12 @@ harnessed/
|
|
|
387
406
|
│ L6 Workflow orchestration (workflows/<stage>/<sub>/) │
|
|
388
407
|
├────────────────────────────────────────────────────────────┤
|
|
389
408
|
│ L5b Execution Mechanism (orthogonal): subagent / Agent Teams │
|
|
390
|
-
│ /
|
|
391
|
-
│ parallelism-gate.yaml:
|
|
392
|
-
│ Pattern A
|
|
409
|
+
│ / main session + harnessed completion gate │
|
|
410
|
+
│ parallelism-gate.yaml: default subagent → escalate 5 triggers │
|
|
411
|
+
│ Pattern A full-stack three-way / B opposing hypotheses / C multi-dim review │
|
|
393
412
|
├────────────────────────────────────────────────────────────┤
|
|
394
413
|
│ L5a Capability + Judgment + Defaults SoT │
|
|
395
|
-
│ capabilities.yaml (7
|
|
414
|
+
│ capabilities.yaml (7 categories) + judgments/ (10 files) + │
|
|
396
415
|
│ defaults.yaml │
|
|
397
416
|
├────────────────────────────────────────────────────────────┤
|
|
398
417
|
│ L4 Runtime engine (workflow / routing / handlers) │
|
|
@@ -403,17 +422,17 @@ harnessed/
|
|
|
403
422
|
├────────────────────────────────────────────────────────────┤
|
|
404
423
|
│ L1 Upstream components (NOT vendored) │
|
|
405
424
|
├────────────────────────────────────────────────────────────┤
|
|
406
|
-
│ L0 Discipline Substrate (
|
|
407
|
-
│ karpathy
|
|
425
|
+
│ L0 Discipline Substrate (applies globally) │
|
|
426
|
+
│ karpathy principles + output-style + language + operational + │
|
|
408
427
|
│ priority + protocols (applied universally to L1-L7) │
|
|
409
428
|
└────────────────────────────────────────────────────────────┘
|
|
410
429
|
```
|
|
411
430
|
|
|
412
|
-
### 3. Cross-cutting Capabilities (capabilities.yaml — 7
|
|
431
|
+
### 3. Cross-cutting Capabilities (capabilities.yaml — 7 categories, ~100 entries)
|
|
413
432
|
|
|
414
433
|
```
|
|
415
434
|
behavioral (6): karpathy-guidelines + output-style + language + operational + priority + protocols
|
|
416
|
-
tool-slash-cmd (~60): gstack 30+ optional + gsd 10+ + mattpocock 12
|
|
435
|
+
tool-slash-cmd (~60): gstack 30+ optional + gsd 10+ + mattpocock 12 high-frequency + etc.
|
|
417
436
|
tool-mcp (3): chrome-devtools-mcp / tavily-mcp / exa-mcp
|
|
418
437
|
tool-cli (3): ctx7 / gws / completion-gate
|
|
419
438
|
tool-plugin (2): planning-with-files / @playwright/test
|
|
@@ -421,18 +440,18 @@ tool-bundled (2): webapp-testing / playwright-cli
|
|
|
421
440
|
agent-platform (3): agent-teams-create / send-message / shutdown
|
|
422
441
|
```
|
|
423
442
|
|
|
424
|
-
### 4.
|
|
443
|
+
### 4. Data Flow Example (user invokes `/discuss "new feature X"`)
|
|
425
444
|
|
|
426
445
|
```
|
|
427
|
-
[L7] User invokes /discuss "
|
|
446
|
+
[L7] User invokes /discuss "new feature X"
|
|
428
447
|
↓
|
|
429
448
|
[L6] workflows/discuss/auto/workflow.yaml master orchestrator
|
|
430
449
|
↓
|
|
431
|
-
[L5a] judgments.strategic-gate.fires + phase-gate.fires + subtask-gate.fires (3-way
|
|
450
|
+
[L5a] judgments.strategic-gate.fires + phase-gate.fires + subtask-gate.fires (3-way parallel eval)
|
|
432
451
|
↓
|
|
433
452
|
[L4] judgmentResolver.ts (4-level ref split) + exprBuilder.ts (expr-eval evaluate)
|
|
434
453
|
↓
|
|
435
|
-
[L0] discipline.priority-hierarchy
|
|
454
|
+
[L0] discipline.priority-hierarchy arbitrates tool conflicts / output-style formats output
|
|
436
455
|
↓
|
|
437
456
|
[fires=true sub] → invoke sub-workflow (/discuss-strategic / /discuss-phase / /discuss-subtask)
|
|
438
457
|
↓ for each sub:
|
|
@@ -441,91 +460,91 @@ agent-platform (3): agent-teams-create / send-message / shutdown
|
|
|
441
460
|
├─ parallelism: judgments.parallelism-gate.<route>.fires (L5b mechanism)
|
|
442
461
|
└─ phase invocations execute via capability template interpolation
|
|
443
462
|
↓
|
|
444
|
-
[fallback.yaml chain-isolation]
|
|
445
|
-
[Skip
|
|
463
|
+
[fallback.yaml chain-isolation] 3 layers judged independently, not serially dependent
|
|
464
|
+
[Skip transparency declaration] non-firing subs → "⚠️ Skipped <sub> because <reason>"
|
|
446
465
|
↓
|
|
447
466
|
planning-with-files /plan (cross-cutting tool) → write artifacts to .planning/<phase-id>/
|
|
448
467
|
↓
|
|
449
468
|
[L4] state.ts writeCurrentWorkflow (proper-lockfile) + audit.append (12-field JSONL)
|
|
450
469
|
```
|
|
451
470
|
|
|
452
|
-
### 5.
|
|
471
|
+
### 5. Decision Routing Matrix (rules-based, codified in judgments + capabilities)
|
|
453
472
|
|
|
454
|
-
|
|
|
473
|
+
| Scenario | Default → Escalate |
|
|
455
474
|
|------|---------------------|
|
|
456
|
-
|
|
|
457
|
-
| UI
|
|
458
|
-
| E2E
|
|
459
|
-
| E2E commit-able TS | @playwright/test
|
|
460
|
-
| E2E Python
|
|
461
|
-
|
|
|
462
|
-
| Web
|
|
463
|
-
| Web
|
|
464
|
-
|
|
|
475
|
+
| Parallelism mechanism | subagent → Agent Teams Pattern A/B/C (5 triggers) |
|
|
476
|
+
| UI design primary plan | **two-stage**: ui-ux-pro-max (audience / interaction logic / design axis — structure) → design-taste-frontend (anti-slop visual polish overlay, cross-agent taste-skill) |
|
|
477
|
+
| E2E browser exploration | playwright-cli (one-line Bash, token-efficient) |
|
|
478
|
+
| E2E commit-able TS | @playwright/test default |
|
|
479
|
+
| E2E Python backend linkage | webapp-testing |
|
|
480
|
+
| Performance / a11y / memory diagnostics | chrome-devtools-mcp |
|
|
481
|
+
| Web search (keyword) | Tavily MCP default |
|
|
482
|
+
| Web search (descriptive / academic) | Exa MCP |
|
|
483
|
+
| Library API docs | ctx7 CLI |
|
|
465
484
|
| GitHub URL | gh CLI |
|
|
466
|
-
|
|
|
485
|
+
| Single URL fetch | WebFetch built-in |
|
|
467
486
|
| Gmail / Drive / Calendar | gws CLI |
|
|
468
|
-
|
|
|
469
|
-
| TDD
|
|
470
|
-
|
|
|
471
|
-
|
|
|
472
|
-
|
|
|
473
|
-
| `/auto`
|
|
474
|
-
| `/auto`
|
|
487
|
+
| Architecture review (complex) | gstack /plan-eng-review |
|
|
488
|
+
| TDD mandatory (core algorithm) | superpowers TDD OR mattpocock /tdd |
|
|
489
|
+
| Critical module PR | gstack /review |
|
|
490
|
+
| Large refactor PR multi-dim review | 4-specialist Agent Team Pattern C |
|
|
491
|
+
| Cross-session hand-off | discipline.protocols self-contained design doc |
|
|
492
|
+
| `/auto` complexity for large requirements | AI 1-shot judge → auto-suggest `--staged` (n abort suggests manual `/discuss`) |
|
|
493
|
+
| `/auto` requirement understanding | prompt before start → n auto-adds `/research` multi-source investigation |
|
|
475
494
|
|
|
476
495
|
---
|
|
477
496
|
|
|
478
|
-
## 🛠️
|
|
497
|
+
## 🛠️ Operational Commands
|
|
479
498
|
|
|
480
|
-
>
|
|
499
|
+
> These are harnessed's own maintenance commands (setup / health check / backup-rollback / state recovery, etc.). For day-to-day feature development just use the slash commands above — you usually don't need these.
|
|
481
500
|
|
|
482
|
-
**v4.0 —
|
|
501
|
+
**v4.0 — orchestration brain.** Slash commands run clarification in the main Claude Code session (so questions reach you), then spawn CC-native subagents (enabling Agent Teams + clarification round-trips). harnessed provides the gate evaluation (`harnessed gates`) and spawn-ready prompts (`harnessed prompt`); the main session does the spawning. `harnessed run` remains for CI/headless use.
|
|
483
502
|
|
|
484
|
-
### CLI
|
|
503
|
+
### CLI Commands
|
|
485
504
|
|
|
486
|
-
|
|
|
505
|
+
| Command | Description |
|
|
487
506
|
| ---- | ---- |
|
|
488
|
-
| `harnessed setup` |
|
|
489
|
-
| `harnessed gates <master>` |
|
|
490
|
-
| `harnessed prompt <sub>` |
|
|
491
|
-
| `harnessed checkpoint <action> <sub>` |
|
|
492
|
-
| `harnessed checkpoint adopt [--from <host>]` |
|
|
493
|
-
| `harnessed` (
|
|
494
|
-
| `harnessed next` |
|
|
495
|
-
| `harnessed advance` | Forward continuation
|
|
496
|
-
| `harnessed reject <sub>` |
|
|
497
|
-
| `harnessed compact [--tokens <n>]` |
|
|
498
|
-
| `harnessed workflows` |
|
|
499
|
-
| `harnessed learn "<lesson>"` |
|
|
500
|
-
| `harnessed run <name>` |
|
|
501
|
-
| `harnessed resume` |
|
|
502
|
-
| `harnessed status` |
|
|
503
|
-
| `harnessed doctor` |
|
|
504
|
-
| `harnessed update [--check\|--rollback [version]\|--upstreams\|--migration-report]` |
|
|
505
|
-
| `harnessed release-preflight` | Read-only
|
|
506
|
-
| `harnessed retro --done` |
|
|
507
|
-
| `harnessed install <name>` |
|
|
508
|
-
| `harnessed uninstall [name]` |
|
|
509
|
-
| `harnessed backup` |
|
|
510
|
-
| `harnessed rollback <timestamp>` |
|
|
511
|
-
| `harnessed gc` |
|
|
512
|
-
| `harnessed audit-log` |
|
|
513
|
-
|
|
514
|
-
###
|
|
515
|
-
|
|
516
|
-
>
|
|
517
|
-
|
|
518
|
-
| Flag |
|
|
507
|
+
| `harnessed setup` | One-time setup; installs workflow skills to `~/.claude/skills/` + MCP to `~/.claude.json` |
|
|
508
|
+
| `harnessed gates <master>` | Evaluate which sub-workflows fire for a master stage (JSON: fire/skip/parallelism). Used by slash commands to orchestrate native spawns. |
|
|
509
|
+
| `harnessed prompt <sub>` | Output a spawn-ready prompt (role + checklist + disciplines + completion/clarification protocols) for a sub-workflow. |
|
|
510
|
+
| `harnessed checkpoint <action> <sub>` | Record sub-workflow start/complete/fail to `~/.claude/harnessed/checkpoints/`. |
|
|
511
|
+
| `harnessed checkpoint adopt [--from <host>]` | Cross-host relay: read-only copy of the other host's active workflow slot into this host's state root; the source is never modified; `--from <host>` overrides the inferred source host. |
|
|
512
|
+
| `harnessed` (no args) | Zero-arg you-are-here: active-workflow dashboard + `NEXT: auto\|manual\|done` + run hint; `--json` machine-readable; no active workflow → onboarding hint (comet `/comet` analog, read-only). |
|
|
513
|
+
| `harnessed next` | Deterministic next-step contract. Within a workflow: `NEXT: auto\|manual\|done`. When the workflow's subs are all resolved it falls through to the next **cross-unit** (next phase/task derived from `.planning/` disk state) with an exit-code contract (`0` advance · `2` done · `10` blocked). |
|
|
514
|
+
| `harnessed advance` | Forward continuation — print the next work unit (next phase/task) across the milestone and the command to run it. Print-only (the main session runs the next `/auto`); refuses to step past an incomplete earlier phase (`--force` overrides); `--json` drives a `while harnessed advance --json; do :; done` loop. |
|
|
515
|
+
| `harnessed reject <sub>` | Mark a sub as user-rejected (terminal, distinct from `failed`). |
|
|
516
|
+
| `harnessed compact [--tokens <n>]` | Summarize+evict resolved ledger entries (G6-safe: `fail_count>0` never evicted); auto-triggers on `checkpoint complete --tokens`. |
|
|
517
|
+
| `harnessed workflows` | List in-flight workflows (one per repo). |
|
|
518
|
+
| `harnessed learn "<lesson>"` | Append a prose learning to this repo's `.planning/LEARNINGS.md`. |
|
|
519
|
+
| `harnessed run <name>` | Run a workflow via in-process SDK spawn (CI/headless mode). Slash commands use CC-native spawn instead. |
|
|
520
|
+
| `harnessed resume` | Resume from the most recent checkpoint after a session interruption |
|
|
521
|
+
| `harnessed status` | Current phase + lock holder |
|
|
522
|
+
| `harnessed doctor` | Health check (Node / MCP / jq / Win bash / routing / token budget / skill integrity / GateGuard conflict / update-available / stale hooks, etc.). The **stale hooks** check flags orphaned harnessed `Stop`/`UserPromptSubmit` entries in `~/.claude/settings.json` that point at a deleted `bin/*.mjs` — the cause of a `MODULE_NOT_FOUND` error on every prompt after a raw `npm uninstall -g harnessed`. Fix: run `harnessed uninstall` (it strips them) **before** removing the package. |
|
|
523
|
+
| `harnessed update [--check\|--rollback [version]\|--upstreams\|--migration-report]` | Self-update, channel-aware: binary installs replace themselves in place from GitHub releases (sha256 + ed25519-signature verified — releases ship `<asset>.sha256.sig`, signed-release contract since 4.32.19; the replaced version is banked for rollback); npm installs run `npm i -g harnessed@latest`. `--check` reports the latest version; `--rollback [version]` (binary installs only) atomically restores a banked previous binary — npm installs are pointed at `npm i -g harnessed@<version>`; `--upstreams` re-runs the base manifests; `--migration-report` is a read-only stale-state inventory |
|
|
524
|
+
| `harnessed release-preflight` | Read-only release-readiness gate (CHANGELOG `[Unreleased]` / version / git-clean / tag-absent); exits 1 if not ready. The Ship-stage gate. |
|
|
525
|
+
| `harnessed retro --done` | Reset the retro-reminder phase counter after running `/retro` (clears the per-turn RETRO-DUE nudge). |
|
|
526
|
+
| `harnessed install <name>` | Install an upstream manifest |
|
|
527
|
+
| `harnessed uninstall [name]` | Reverse uninstall — runs the manifest's declared `spec.uninstall` teardown (cmd + `$HOME`-confined, idempotent `cleanup_paths`) for the skill-installing methods (`npm-cli` / `git-clone-with-setup` / `npx-skill-installer`); other methods keep their per-method reverse |
|
|
528
|
+
| `harnessed backup` | Snapshot backup management |
|
|
529
|
+
| `harnessed rollback <timestamp>` | One-line rollback of a **backup snapshot** (EOL preserve + sha1 verify) — distinct from `update --rollback`, which restores a previous **compiled binary** |
|
|
530
|
+
| `harnessed gc` | Clean up expired backups |
|
|
531
|
+
| `harnessed audit-log` | Routing transparency log query (supports `--filter` jq expression) |
|
|
532
|
+
|
|
533
|
+
### Flags
|
|
534
|
+
|
|
535
|
+
> All commands **apply (immediate write)** by default — no flag needed. Advanced users can add `--dry-run` to preview.
|
|
536
|
+
|
|
537
|
+
| Flag | Description |
|
|
519
538
|
| ---- | ---- |
|
|
520
|
-
| `--dry-run` |
|
|
521
|
-
| `--non-interactive` | CI /
|
|
522
|
-
| `--system` |
|
|
523
|
-
| `--yes` |
|
|
524
|
-
| `--json` |
|
|
525
|
-
| `--full-diff` |
|
|
526
|
-
| `--no-color` |
|
|
527
|
-
| `--task <text>` | `run`
|
|
528
|
-
| `--task-stdin` | `run`
|
|
539
|
+
| `--dry-run` | Preview without writing to disk (advanced opt-in) |
|
|
540
|
+
| `--non-interactive` | CI / scripted scenarios |
|
|
541
|
+
| `--system` | Allow L4 global install (otherwise downgrade to L1 npx ephemeral) |
|
|
542
|
+
| `--yes` | Skip interactive confirm on uninstall |
|
|
543
|
+
| `--json` | Machine-readable stdout (zero-arg dashboard / `next` / `advance`, etc.); errors that escape to the process root also emit a single-line `{"error":{"message":…}}` envelope on stdout, so `JSON.parse(stdout).error` is a reliable failure probe |
|
|
544
|
+
| `--full-diff` | Expand diffs folded above 200 lines |
|
|
545
|
+
| `--no-color` | Force nocolor (even on TTY) |
|
|
546
|
+
| `--task <text>` | `run` — task description (passed as workflow `gateContext.task`) |
|
|
547
|
+
| `--task-stdin` | `run` — read task description from stdin until EOF (avoids shell-escape on quotes/$/`) |
|
|
529
548
|
|
|
530
549
|
|
|
531
550
|
---
|
|
@@ -533,77 +552,77 @@ planning-with-files /plan (cross-cutting tool) → write artifacts to .planning/
|
|
|
533
552
|
## ❓ FAQ
|
|
534
553
|
|
|
535
554
|
<details>
|
|
536
|
-
<summary><b>Q1.
|
|
555
|
+
<summary><b>Q1. Do I still need to install superpowers / gstack / GSD upstreams after installing harnessed?</b></summary>
|
|
537
556
|
|
|
538
557
|
<br>
|
|
539
558
|
|
|
540
|
-
|
|
559
|
+
Yes, but **the user experience = one command**:
|
|
541
560
|
|
|
542
561
|
```bash
|
|
543
|
-
harnessed setup #
|
|
562
|
+
harnessed setup # Auto-installs gstack + GSD + superpowers + planning-with-files; 28 workflow skills land in ~/.claude/skills/ + Agent Teams env var auto-written to ~/.claude/settings.json
|
|
544
563
|
```
|
|
545
564
|
|
|
546
|
-
|
|
565
|
+
Think `brew install <formula>` pulling the full dependency set — you don't need to `brew install` each dependency separately.
|
|
547
566
|
|
|
548
567
|
</details>
|
|
549
568
|
|
|
550
569
|
<details>
|
|
551
|
-
<summary><b>Q2.
|
|
570
|
+
<summary><b>Q2. Why not just vendor superpowers / gstack into the harnessed repo?</b></summary>
|
|
552
571
|
|
|
553
572
|
<br>
|
|
554
573
|
|
|
555
|
-
4
|
|
574
|
+
4 reasons:
|
|
556
575
|
|
|
557
|
-
1.
|
|
558
|
-
2. **License + attribution
|
|
559
|
-
3.
|
|
560
|
-
4. **Bus factor 1**
|
|
576
|
+
1. **Differentiation philosophy** — harnessed is the "assembly-ist package manager" counterposed to the "all-in-one self-built" camp. Vendoring = losing the wedge → becoming yet another plugin pack
|
|
577
|
+
2. **License + attribution nightmare** — vendoring 4-5 actively maintained upstreams = a complex license patchwork
|
|
578
|
+
3. **Upstream upgrades flip direction** — current manifest description lets users re-install for the latest version on upstream upgrade; vendoring forces manual code sync and falls perpetually behind
|
|
579
|
+
4. **Bus factor 1** — a single maintainer keeping 4-5 vendored upstreams in sync = accelerated burnout
|
|
561
580
|
|
|
562
581
|
</details>
|
|
563
582
|
|
|
564
583
|
<details>
|
|
565
|
-
<summary><b>Q3. gstack / GSD / superpowers
|
|
584
|
+
<summary><b>Q3. gstack / GSD / superpowers all look like plan/discuss tools — aren't they overlapping?</b></summary>
|
|
566
585
|
|
|
567
586
|
<br>
|
|
568
587
|
|
|
569
|
-
|
|
588
|
+
**No**. They are different stages of the three-layer stack:
|
|
570
589
|
|
|
571
|
-
|
|
|
590
|
+
| Stage | Upstream | Responsibility |
|
|
572
591
|
| ---- | ---- | ---- |
|
|
573
|
-
| Governance | gstack |
|
|
574
|
-
| Brainstorming | superpowers |
|
|
575
|
-
| Orchestration | GSD |
|
|
576
|
-
| Persistence | planning-with-files |
|
|
592
|
+
| Governance | gstack | Multi-role decision gates (CEO / EM / Designer / Paranoid Engineer) |
|
|
593
|
+
| Brainstorming | superpowers | Subtask design clarification, alternative comparison |
|
|
594
|
+
| Orchestration | GSD | High-level phase task graph + dependency analysis |
|
|
595
|
+
| Persistence | planning-with-files | Persists `task_plan.md` / `progress.md` / `findings.md` |
|
|
577
596
|
|
|
578
|
-
`/discuss /plan /task /verify /ship`
|
|
597
|
+
`/discuss /plan /task /verify /ship` — the 5 masters string the 5 stages together; each master internally delegates to its sub. Each stage does a different thing and feeds the next. **No merging**.
|
|
579
598
|
|
|
580
599
|
</details>
|
|
581
600
|
|
|
582
601
|
<details>
|
|
583
|
-
<summary><b>Q4. workflow
|
|
602
|
+
<summary><b>Q4. Do workflow phases run automatically or wait for the user?</b></summary>
|
|
584
603
|
|
|
585
604
|
<br>
|
|
586
605
|
|
|
587
|
-
|
|
606
|
+
Depends on the `pause` field in `workflows/<name>/SKILL.md` frontmatter:
|
|
588
607
|
|
|
589
|
-
- `pause: human_review` →
|
|
590
|
-
-
|
|
608
|
+
- `pause: human_review` → blocks waiting for user approval (governance gate / final lock, e.g. `/discuss-strategic` gstack `/office-hours` + `/plan-architecture` `/plan-eng-review` lock-in gate)
|
|
609
|
+
- No `pause` → auto-chains to the next phase
|
|
591
610
|
|
|
592
|
-
|
|
611
|
+
Each phase output is written to `~/.claude/harnessed/checkpoints/`; after a session interruption `harnessed resume` continues from the latest checkpoint.
|
|
593
612
|
|
|
594
613
|
</details>
|
|
595
614
|
|
|
596
615
|
<details>
|
|
597
|
-
<summary><b>Q5. harnessed
|
|
616
|
+
<summary><b>Q5. Is harnessed itself a CC plugin?</b></summary>
|
|
598
617
|
|
|
599
618
|
<br>
|
|
600
619
|
|
|
601
|
-
|
|
620
|
+
A hybrid:
|
|
602
621
|
|
|
603
|
-
- `npx harnessed@latest setup`
|
|
604
|
-
- setup
|
|
605
|
-
- `/discuss` / `/plan` / `/task` / `/verify`
|
|
606
|
-
- CLI
|
|
622
|
+
- `npx harnessed@latest setup` runs the **Node.js CLI** (`bin/harnessed`) — or use the standalone binary from the one-line installer (no Node.js required)
|
|
623
|
+
- setup installs **workflow skills** (markdown) into `~/.claude/skills/`, loaded by the Claude Code runtime
|
|
624
|
+
- `/discuss` / `/plan` / `/task` / `/verify` etc. are slash commands inside CC that trigger skill execution
|
|
625
|
+
- The CLI and the CC skills share the `~/.claude/harnessed/checkpoints/` state directory
|
|
607
626
|
|
|
608
627
|
</details>
|
|
609
628
|
|
|
@@ -612,6 +631,6 @@ harnessed setup # 自动装齐 gstack + GSD + superpowers + planning-with-files
|
|
|
612
631
|
|
|
613
632
|
## License
|
|
614
633
|
|
|
615
|
-
[Apache-2.0](./LICENSE)
|
|
634
|
+
[Apache-2.0](./LICENSE) — see [NOTICE](./NOTICE) (includes Harness Inc. trademark disclaimer)
|
|
616
635
|
|
|
617
|
-
|
|
636
|
+
Support development: [](https://github.com/sponsors/easyinplay)
|