@pieerry/harness-kit 3.3.0 → 4.0.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/.claude/{plugins → agents}/product-manager/README.md +32 -30
- package/.claude/{plugins → agents}/product-manager/guides/examples/good-prp-example.md +2 -2
- package/.claude/{plugins → agents}/product-manager/guides/pipeline.md +7 -7
- package/.claude/{plugins → agents}/product-manager/sensors/prp-links.md +1 -1
- package/.claude/{plugins → agents}/product-manager/skills/prd/SKILL.md +2 -2
- package/.claude/{plugins → agents}/product-manager/skills/prp/SKILL.md +4 -4
- package/.claude/agents/product-manager.md +2 -2
- package/.claude/agents/staff-software-engineer/README.md +87 -0
- package/.claude/{plugins → agents}/staff-software-engineer/guides/conventions-override.md +3 -3
- package/.claude/{plugins → agents}/staff-software-engineer/guides/pipeline.md +11 -7
- package/.claude/{plugins → agents}/staff-software-engineer/sensors/dev-structure.md +2 -2
- package/.claude/{plugins → agents}/staff-software-engineer/sensors/pr-structure.md +3 -3
- package/.claude/{plugins → agents}/staff-software-engineer/sensors/test-structure.md +2 -2
- package/.claude/agents/staff-software-engineer.md +4 -4
- package/.claude/commands/pipeline/reset.md +1 -1
- package/.claude/commands/product-manager/prd.md +11 -11
- package/.claude/commands/product-manager/prp.md +12 -12
- package/.claude/commands/product-manager/run.md +8 -4
- package/.claude/commands/sse/dev.md +11 -11
- package/.claude/commands/sse/plan.md +11 -12
- package/.claude/commands/sse/pr.md +6 -7
- package/.claude/commands/sse/run.md +12 -5
- package/.claude/commands/sse/test.md +5 -5
- package/.claude/conventions/README.md +1 -1
- package/.claude/hooks/activity-pre-read.sh +4 -4
- package/.claude/hooks/status-line.sh +11 -11
- package/.claude/{plugins/product-manager/hooks → runtime/hooks/product-manager}/post-eval-prd.sh +11 -9
- package/.claude/{plugins/product-manager/hooks → runtime/hooks/product-manager}/post-eval-prp.sh +11 -9
- package/.claude/{plugins/product-manager/hooks → runtime/hooks/product-manager}/post-write-prd.sh +7 -5
- package/.claude/{plugins/product-manager/hooks → runtime/hooks/product-manager}/post-write-prp.sh +8 -6
- package/.claude/{plugins/product-manager/hooks → runtime/hooks/product-manager}/pre-prp-check.sh +5 -3
- package/.claude/{plugins/staff-software-engineer/hooks → runtime/hooks/staff-software-engineer}/post-eval-sse.sh +13 -11
- package/.claude/{plugins/staff-software-engineer/hooks → runtime/hooks/staff-software-engineer}/post-write-sse.sh +11 -9
- package/.claude/runtime/scripts/product-manager/__pycache__/confluence-publish.cpython-314.pyc +0 -0
- package/.claude/runtime/scripts/product-manager/__pycache__/link-validator.cpython-314.pyc +0 -0
- package/.claude/runtime/scripts/product-manager/__pycache__/sensor-runner.cpython-314.pyc +0 -0
- package/.claude/runtime/scripts/product-manager/__pycache__/token-phase.cpython-314.pyc +0 -0
- package/.claude/runtime/scripts/product-manager/confluence-publish.py +206 -0
- package/.claude/{plugins/product-manager/scripts → runtime/scripts/product-manager}/link-validator.py +1 -1
- package/.claude/{plugins/product-manager/scripts → runtime/scripts/product-manager}/token-phase.py +2 -2
- package/.claude/scripts/__pycache__/activity.cpython-314.pyc +0 -0
- package/.claude/scripts/__pycache__/pipeline.cpython-314.pyc +0 -0
- package/.claude/scripts/__pycache__/pr-monitor.cpython-314.pyc +0 -0
- package/.claude/scripts/pipeline.py +6 -6
- package/.claude/settings.json +7 -7
- package/.claude/settings.local.json +11 -3
- package/AGENTS.md +141 -0
- package/CLAUDE.md +9 -7
- package/README.md +88 -290
- package/VERSION +1 -1
- package/bin/hk.js +16 -8
- package/package.json +5 -3
- package/setup/install.sh +59 -40
- package/setup/update.sh +5 -0
- package/.claude/plugins/product-manager/scripts/confluence-publish.py +0 -205
- package/.claude/plugins/staff-software-engineer/README.md +0 -90
- /package/.claude/{plugins → agents}/product-manager/evals/prd-quality.md +0 -0
- /package/.claude/{plugins → agents}/product-manager/evals/prd-readiness.md +0 -0
- /package/.claude/{plugins → agents}/product-manager/evals/prp-context-readiness.md +0 -0
- /package/.claude/{plugins → agents}/product-manager/evals/prp-quality.md +0 -0
- /package/.claude/{plugins → agents}/product-manager/guides/examples/good-prd-example.md +0 -0
- /package/.claude/{plugins → agents}/product-manager/guides/prd-guidelines.md +0 -0
- /package/.claude/{plugins → agents}/product-manager/guides/product-guidelines.md +0 -0
- /package/.claude/{plugins → agents}/product-manager/guides/prp-guidelines.md +0 -0
- /package/.claude/{plugins → agents}/product-manager/guides/templates/prd.md +0 -0
- /package/.claude/{plugins → agents}/product-manager/guides/templates/prp.md +0 -0
- /package/.claude/{plugins → agents}/product-manager/guides/writing-style.md +0 -0
- /package/.claude/{plugins → agents}/product-manager/sensors/prd-acceptance-criteria.md +0 -0
- /package/.claude/{plugins → agents}/product-manager/sensors/prd-structure.md +0 -0
- /package/.claude/{plugins → agents}/product-manager/sensors/prp-context-quality.md +0 -0
- /package/.claude/{plugins → agents}/product-manager/sensors/prp-structure.md +0 -0
- /package/.claude/{plugins → agents}/staff-software-engineer/evals/dev-quality.md +0 -0
- /package/.claude/{plugins → agents}/staff-software-engineer/evals/plan-quality.md +0 -0
- /package/.claude/{plugins → agents}/staff-software-engineer/evals/pr-quality.md +0 -0
- /package/.claude/{plugins → agents}/staff-software-engineer/evals/test-quality.md +0 -0
- /package/.claude/{plugins → agents}/staff-software-engineer/guides/coding-style.md +0 -0
- /package/.claude/{plugins → agents}/staff-software-engineer/guides/commit-style.md +0 -0
- /package/.claude/{plugins → agents}/staff-software-engineer/sensors/code-conventions.md +0 -0
- /package/.claude/{plugins → agents}/staff-software-engineer/sensors/plan-structure.md +0 -0
- /package/.claude/{plugins → agents}/staff-software-engineer/sensors/test-coverage.md +0 -0
- /package/.claude/{plugins → agents}/staff-software-engineer/skills/backend/SKILL.md +0 -0
- /package/.claude/{plugins → agents}/staff-software-engineer/skills/devops/SKILL.md +0 -0
- /package/.claude/{plugins → agents}/staff-software-engineer/skills/mobile/SKILL.md +0 -0
- /package/.claude/{plugins → agents}/staff-software-engineer/skills/web/SKILL.md +0 -0
- /package/.claude/{plugins/product-manager/outputs → runtime/outputs/pm}/.markers/.gitkeep +0 -0
- /package/.claude/{plugins/staff-software-engineer/outputs → runtime/outputs/sse}/.markers/.gitkeep +0 -0
- /package/.claude/{plugins/product-manager/scripts → runtime/scripts/product-manager}/sensor-runner.py +0 -0
package/README.md
CHANGED
|
@@ -2,365 +2,162 @@
|
|
|
2
2
|
|
|
3
3
|
# harness-kit
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
From idea to merged PR, one pipeline.
|
|
5
|
+
From idea to merged PR. One pipeline. Six stages.
|
|
7
6
|
|
|
8
|
-
[](#usage)
|
|
7
|
+
[](VERSION)
|
|
8
|
+
[](https://claude.ai/code)
|
|
9
|
+
[](#agents)
|
|
12
10
|
[](LICENSE)
|
|
13
11
|
|
|
14
12
|
<br/>
|
|
15
13
|
|
|
16
14
|

|
|
17
15
|
|
|
18
|
-
<sub
|
|
16
|
+
<sub>~2min walkthrough · agents · skills · install · 6 commands · sensors+evals matrix · auto-watch PR until merged.</sub>
|
|
19
17
|
|
|
20
18
|
</div>
|
|
21
19
|
|
|
22
20
|
---
|
|
23
21
|
|
|
24
|
-
## What
|
|
22
|
+
## What it is
|
|
25
23
|
|
|
26
|
-
|
|
24
|
+
Two Claude Code agents — `product-manager` and `staff-software-engineer` — sharing one pipeline:
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
**What it's not:** a code generator, a CI replacement, or an opinionated agent framework. It's a thin harness that defers all model work to Claude Code and all VCS work to `git`/`gh`.
|
|
33
|
-
|
|
34
|
-
**Internal docs use caveman-full style** (drop articles + filler, fragments OK) to save input tokens — see [CLAUDE.md](CLAUDE.md). Generated artifacts (PRDs, PRPs, plans, dev/test/pr reports) stay natural English for external stakeholders. Reference templates and good-example artifacts are deliberately left in natural prose so produced docs inherit the right pattern.
|
|
35
|
-
|
|
36
|
-
---
|
|
26
|
+
```
|
|
27
|
+
prd → prp → plan → dev → test → pr
|
|
28
|
+
```
|
|
37
29
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- [Getting Started](#getting-started)
|
|
41
|
-
- [Install](#install)
|
|
42
|
-
- [Update](#update)
|
|
43
|
-
- [Usage](#usage)
|
|
44
|
-
- [Workflow](#workflow)
|
|
45
|
-
- [Samples](#samples)
|
|
46
|
-
- [How it works](#how-it-works)
|
|
47
|
-
- [Anatomy of a stage](#anatomy-of-a-stage)
|
|
48
|
-
- [Sensors + evals matrix](#sensors--evals-matrix)
|
|
49
|
-
- [Status bar](#status-bar)
|
|
50
|
-
- [Live activity indicator](#live-activity-indicator)
|
|
51
|
-
- [PR monitor](#pr-monitor)
|
|
52
|
-
- [Token accounting](#token-accounting)
|
|
53
|
-
- [Session-start auto-clear](#session-start-auto-clear)
|
|
54
|
-
- [Layout](#layout)
|
|
55
|
-
- [Project conventions](#project-conventions)
|
|
56
|
-
- [Tooling](#tooling)
|
|
30
|
+
Each stage produces a markdown artifact, gated by **deterministic sensors** (pass/fail) and a **scored eval** (≥ 8.0). After the PR opens, an in-session monitor watches for merge.
|
|
57
31
|
|
|
58
32
|
---
|
|
59
33
|
|
|
60
|
-
##
|
|
61
|
-
|
|
62
|
-
### Install
|
|
34
|
+
## Install
|
|
63
35
|
|
|
64
36
|
```bash
|
|
65
37
|
npm i -g @pieerry/harness-kit
|
|
66
38
|
hk install
|
|
67
39
|
```
|
|
68
40
|
|
|
69
|
-
|
|
41
|
+
Restart Claude Code. Done.
|
|
70
42
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
CLI subcommands:
|
|
74
|
-
|
|
75
|
-
| Command | What it does |
|
|
76
|
-
|---------|--------------|
|
|
77
|
-
| `hk install [target]` | install plugins into target repo (default: cwd) |
|
|
78
|
-
| `hk update [target]` | pull latest source and reinstall |
|
|
79
|
-
| `hk uninstall [target]` | remove plugins, hooks, settings, agents (keeps `outputs/` and `conventions/`) |
|
|
80
|
-
| `hk status [target]` | installed version + active pipeline stage |
|
|
81
|
-
| `hk version` | source version |
|
|
82
|
-
|
|
83
|
-
No-npm path:
|
|
43
|
+
Without npm:
|
|
84
44
|
|
|
85
45
|
```bash
|
|
86
46
|
git clone https://github.com/Pierry/harness-kit ~/.harness-kit
|
|
87
47
|
bash ~/.harness-kit/setup/install.sh
|
|
88
48
|
```
|
|
89
49
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
For npm installs:
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
npm i -g @pieerry/harness-kit@latest
|
|
96
|
-
hk update
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
For git-clone installs:
|
|
50
|
+
CLI: `hk install` · `hk update` · `hk uninstall` · `hk status` · `hk version`.
|
|
100
51
|
|
|
101
|
-
|
|
102
|
-
hk update
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
`hk update` pulls latest source (git installs only) and reinstalls. Idempotent. Version is read from the package `VERSION` and recorded in your target at `.claude/.hk-version`. npm users must bump the package first — `hk update` alone won't reach the registry.
|
|
106
|
-
|
|
107
|
-
### Usage
|
|
108
|
-
|
|
109
|
-
| Command | What it does |
|
|
110
|
-
|---------|--------------|
|
|
111
|
-
| `/product-manager:prd` | Draft a PRD |
|
|
112
|
-
| `/product-manager:prp` | Draft a PRP (needs an approved PRD) |
|
|
113
|
-
| `/product-manager:run` | Full PM pipeline (PRD then PRP) |
|
|
114
|
-
| `/sse:plan` | Generate plan from an approved PRP |
|
|
115
|
-
| `/sse:dev` | Implement the plan, run convention + structure + quality gates |
|
|
116
|
-
| `/sse:test` | Run the project test suite + write a structured test report |
|
|
117
|
-
| `/sse:pr` | Open the draft PR, then auto-arm `pr-monitor` |
|
|
118
|
-
| `/sse:pr-monitor` | Watch the active PR for merge with backoff polling (auto-invoked by `/sse:pr`) |
|
|
119
|
-
| `/sse:run` | Full SSE pipeline (plan, dev, test, pr) |
|
|
120
|
-
| `/pipeline:continue` | Resume the active pipeline at its next pending stage |
|
|
121
|
-
| `/pipeline:reset` | Abandon the active pipeline run (clears state, keeps artifacts) |
|
|
122
|
-
|
|
123
|
-
Pipeline order: `prd → prp → plan → dev → test → pr`. Each stage gets an approval marker. Approval requires both the sensor gate (pass) and the eval gate (score ≥ 8.0).
|
|
124
|
-
|
|
125
|
-
You can enter the pipeline at any stage:
|
|
126
|
-
|
|
127
|
-
- `prd → prp → plan → dev → test → pr` (full PM + SSE)
|
|
128
|
-
- `prd → prp` (PM only, hand off to a separate engineering process)
|
|
129
|
-
- `plan → dev → test → pr` (SSE only, when discovery already happened elsewhere)
|
|
130
|
-
|
|
131
|
-
Status bar tracks the shape you started with. Close the session and reopen later — `/pipeline:continue` picks up at the next pending stage. `/pipeline:reset` clears the run if you decide to abandon it.
|
|
132
|
-
|
|
133
|
-
### Workflow
|
|
134
|
-
|
|
135
|
-
PM session in this workspace:
|
|
136
|
-
|
|
137
|
-
```
|
|
138
|
-
$ /product-manager:run
|
|
139
|
-
> squad? billing
|
|
140
|
-
> problem? invoice generation fails for multi-currency customers
|
|
141
|
-
> ...
|
|
142
|
-
PRD saved at outputs/prd/2026-05-12-billing-multi-currency.md.
|
|
143
|
-
sensors: prd-structure ok, prd-acceptance-criteria ok
|
|
144
|
-
eval: prd-quality 8.6/10, prd-readiness 8.9/10
|
|
145
|
-
guides: prd-guidelines.md, writing-style.md, templates/prd.md
|
|
146
|
-
refs: business-info.md, squads/billing/context.md
|
|
147
|
-
next: /product-manager:prp
|
|
148
|
-
|
|
149
|
-
PRP saved at outputs/prp/2026-05-12-billing-multi-currency.md.
|
|
150
|
-
sensors: prp-structure ok, prp-context-quality ok, prp-links ok
|
|
151
|
-
eval: prp-quality 8.4/10, prp-context-readiness 9.0/10
|
|
152
|
-
guides: prp-guidelines.md, templates/prp.md
|
|
153
|
-
refs: prd/2026-05-12-billing-multi-currency.md
|
|
154
|
-
next: /sse:plan (ready for handoff)
|
|
155
|
-
```
|
|
52
|
+
---
|
|
156
53
|
|
|
157
|
-
|
|
54
|
+
## Use it
|
|
158
55
|
|
|
159
56
|
```
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
sensors: plan-structure ok (problem, files, gates, scope)
|
|
165
|
-
eval: plan-quality 8.3/10
|
|
166
|
-
guides: pipeline.md, coding-style.md, skills/backend/SKILL.md
|
|
167
|
-
refs: prp/..., conventions/backend.md
|
|
168
|
-
next: /sse:dev
|
|
169
|
-
|
|
170
|
-
Dev complete. branch feat/PROJ-123-multi-currency.
|
|
171
|
-
files changed: 5
|
|
172
|
-
commits: 3 (a1b2c3d, d4e5f6g, h7i8j9k)
|
|
173
|
-
sensors: code-conventions ok, test-coverage ok, dev-structure ok
|
|
174
|
-
eval: dev-quality 8.4/10
|
|
175
|
-
guides: coding-style.md, commit-style.md, skills/backend/SKILL.md
|
|
176
|
-
next: /sse:test
|
|
177
|
-
|
|
178
|
-
Tests passed.
|
|
179
|
-
command: ./mvnw test
|
|
180
|
-
passed: 24, failed: 0
|
|
181
|
-
duration: 12.4s
|
|
182
|
-
sensors: test-structure ok
|
|
183
|
-
eval: test-quality 8.7/10
|
|
184
|
-
next: /sse:pr
|
|
185
|
-
|
|
186
|
-
PR opened: https://github.com/your-org/billing-service/pull/567
|
|
187
|
-
title: feat(PROJ-123): timezone-aware deadline check
|
|
188
|
-
draft: yes
|
|
189
|
-
sensors: pr-structure ok
|
|
190
|
-
eval: pr-quality 8.9/10
|
|
191
|
-
|
|
192
|
-
PR monitor armed for #567. First check in 3min, escalates to 30min cap.
|
|
57
|
+
/product-manager:run draft PRD then PRP
|
|
58
|
+
/sse:run plan, dev, test, open PR, watch for merge
|
|
59
|
+
/pipeline:continue resume next pending stage
|
|
60
|
+
/pipeline:reset abandon active run
|
|
193
61
|
```
|
|
194
62
|
|
|
195
|
-
|
|
63
|
+
Need just one stage? Each is its own slash command:
|
|
196
64
|
|
|
197
|
-
|
|
65
|
+
| Stage | Command | Gates |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| `prd` | `/product-manager:prd` | `prd-structure`, `prd-acceptance-criteria` · `prd-quality`, `prd-readiness` |
|
|
68
|
+
| `prp` | `/product-manager:prp` | `prp-structure`, `prp-context-quality`, `prp-links`, `link-validator` · `prp-quality`, `prp-context-readiness` |
|
|
69
|
+
| `plan` | `/sse:plan` | `plan-structure` · `plan-quality` |
|
|
70
|
+
| `dev` | `/sse:dev` | `code-conventions`, `test-coverage`, `dev-structure` · `dev-quality` |
|
|
71
|
+
| `test` | `/sse:test` | `test-structure` · `test-quality` |
|
|
72
|
+
| `pr` | `/sse:pr` | `pr-structure` · `pr-quality` · auto-arms `/sse:pr-monitor` |
|
|
198
73
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
- [good PRD example](.claude/plugins/product-manager/guides/examples/good-prd-example.md)
|
|
202
|
-
- [good PRP example](.claude/plugins/product-manager/guides/examples/good-prp-example.md)
|
|
74
|
+
Sensors block on failure (Claude regenerates). Evals score; threshold 8.0; retried up to 3 times.
|
|
203
75
|
|
|
204
76
|
---
|
|
205
77
|
|
|
206
|
-
##
|
|
207
|
-
|
|
208
|
-
### Anatomy of a stage
|
|
78
|
+
## Agents
|
|
209
79
|
|
|
210
|
-
|
|
80
|
+
Registered in [`AGENTS.md`](./AGENTS.md) at the repo root. Each ships its own sensors, evals, guides, skills.
|
|
211
81
|
|
|
212
|
-
|
|
213
|
-
|-----------|------------|---------|
|
|
214
|
-
| **guide** | How to write the artifact. Style + structure rules the LLM follows. | `prd-guidelines.md`, `coding-style.md` |
|
|
215
|
-
| **ref** | Context pulled in before drafting. Org/squad data + prior artifacts. | `business-info.md`, `outputs/prp/...md`, `.claude/conventions/backend.md` |
|
|
216
|
-
| **sensor** | Must-pass structural check. Deterministic, fast. Blocks approval. | `prd-structure`, `prp-links`, `dev-structure`, `test-structure`, `pr-structure`, `code-conventions`, `test-coverage` |
|
|
217
|
-
| **eval** | Scored quality rubric. LLM-judge, threshold 8.0, retried until pass or max attempts. | `prd-quality`, `prp-context-readiness`, `plan-quality`, `dev-quality`, `test-quality`, `pr-quality` |
|
|
82
|
+
### `product-manager` — turns a problem into an engineering-ready spec
|
|
218
83
|
|
|
219
|
-
|
|
84
|
+
- Skills: `prd`, `prp`
|
|
85
|
+
- Sensors: 5 (structure + acceptance criteria + cross-links)
|
|
86
|
+
- Evals: 4 (quality + readiness for each of PRD, PRP)
|
|
87
|
+
- Guides: `pipeline.md`, `prd-guidelines.md`, `prp-guidelines.md`, `writing-style.md`, `templates/`, `examples/`
|
|
88
|
+
- [Full docs →](.claude/agents/product-manager/README.md)
|
|
220
89
|
|
|
221
|
-
###
|
|
90
|
+
### `staff-software-engineer` — turns an approved PRP into a merged PR
|
|
222
91
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
| `dev` | `code-conventions`, `test-coverage`, `dev-structure` | `dev-quality` |
|
|
229
|
-
| `test` | `test-structure` | `test-quality` |
|
|
230
|
-
| `pr` | `pr-structure` | `pr-quality` |
|
|
92
|
+
- Skills: `backend`, `web`, `mobile`, `devops` (auto-detected from repo)
|
|
93
|
+
- Sensors: 6 (`plan-structure`, `code-conventions`, `test-coverage`, `dev-structure`, `test-structure`, `pr-structure`)
|
|
94
|
+
- Evals: 4 (`plan`, `dev`, `test`, `pr` quality)
|
|
95
|
+
- Guides: `pipeline.md`, `coding-style.md`, `commit-style.md`, `conventions-override.md`
|
|
96
|
+
- [Full docs →](.claude/agents/staff-software-engineer/README.md)
|
|
231
97
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
### Status bar
|
|
98
|
+
---
|
|
235
99
|
|
|
236
|
-
|
|
100
|
+
## Anatomy of every stage
|
|
237
101
|
|
|
238
102
|
```
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
multi-currency [prd+prp+plan+dev+test+pr] · prp approved · plan drafting · next /sse:plan
|
|
244
|
-
multi-currency · complete (prd+prp+plan+dev+test+pr)
|
|
103
|
+
GUIDE how to write it pipeline.md · coding-style.md
|
|
104
|
+
REF context to pull in AGENTS.md · prp/<feature>.md · conventions/{area}.md
|
|
105
|
+
SENSOR must-pass structure deterministic, blocks approval
|
|
106
|
+
EVAL scored rubric LLM-judge, threshold 8.0
|
|
245
107
|
```
|
|
246
108
|
|
|
247
|
-
|
|
109
|
+
Approval marker (`<!-- approved: -->`) gates the next stage. Token spend per phase appended as inline `<!-- tokens: ... -->`.
|
|
248
110
|
|
|
249
|
-
|
|
111
|
+
---
|
|
250
112
|
|
|
251
|
-
|
|
113
|
+
## Status bar
|
|
252
114
|
|
|
253
|
-
|
|
115
|
+
Live indicator at the bottom of every Claude Code session:
|
|
254
116
|
|
|
255
117
|
```
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
118
|
+
idle · /product-manager:run · /sse:run · /pipeline:continue
|
|
119
|
+
billing-fix [prd+prp+plan+dev+test+pr] · prp approved · plan drafting · next /sse:plan · sensor: plan-structure
|
|
120
|
+
billing-fix · complete (prd/prp/plan/dev/test/pr)
|
|
259
121
|
```
|
|
260
122
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
### PR monitor
|
|
264
|
-
|
|
265
|
-
After `/sse:pr` opens a PR, it auto-invokes `/sse:pr-monitor`, which polls `gh pr view --json state` on backoff and stays in the session until the PR transitions out of `OPEN`.
|
|
266
|
-
|
|
267
|
-
| Rung | Interval | Attempts | Cumulative |
|
|
268
|
-
|------|----------|----------|------------|
|
|
269
|
-
| 1 | 3 min | 5 | 15 min |
|
|
270
|
-
| 2 | 6 min | 5 | 45 min |
|
|
271
|
-
| 3 | 12 min | 5 | 1h 45m |
|
|
272
|
-
| 4 | 24 min | 5 | 3h 45m |
|
|
273
|
-
| 5 (cap) | 30 min | ∞ | until merged/closed |
|
|
274
|
-
|
|
275
|
-
On `MERGED`: notifies and clears both `.pipeline-state.json` and `.pr-monitor-state.json`. On `CLOSED` without merge: stops cleanly. Mechanism: `ScheduleWakeup` in the active session — closing the session ends the monitor.
|
|
276
|
-
|
|
277
|
-
State: `.claude/.pr-monitor-state.json` records PR number, URL, branch, current interval, and attempt counts.
|
|
278
|
-
|
|
279
|
-
### Token accounting
|
|
280
|
-
|
|
281
|
-
Every phase has its own start/end marker written to `outputs/.markers/{feature_id}.{phase}-{generate|validate}.{start|end}`. When the artifact is approved, the post-eval hook runs `scripts/token-phase.py` for both phases — it reads the Claude session transcript JSONL, sums input/output/cache-read/cache-creation tokens within each window, and appends an entry to `outputs/tokens/{feature_id}.json`.
|
|
282
|
-
|
|
283
|
-
Schema:
|
|
123
|
+
State persists at `.claude/.pipeline-state.json`. Close the session and reopen — `/pipeline:continue` picks up at the next pending stage. When the PR merges, state auto-clears.
|
|
284
124
|
|
|
285
|
-
|
|
286
|
-
{
|
|
287
|
-
"feature_id": "2026-05-12-billing-multi-currency",
|
|
288
|
-
"files": { "prd": "outputs/prd/...md", "prp": "outputs/prp/...md" },
|
|
289
|
-
"phases": [
|
|
290
|
-
{ "phase": "prd-generate", "started_at": "...", "ended_at": "...", "tokens": { "input": 1234, "output": 567, "cache_read": 8910, "cache_creation": 234 }, "attempts": 1 }
|
|
291
|
-
],
|
|
292
|
-
"totals": { "input": 0, "output": 0, "cache_read": 0, "cache_creation": 0 }
|
|
293
|
-
}
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
Each plugin keeps its own `outputs/tokens/{feature_id}.json`. The artifact gets an inline `<!-- tokens: outputs/tokens/{feature_id}.json in=N out=N cache_r=N -->` reference appended after approval so the totals are visible from the artifact itself. Query examples in the [product-manager README](.claude/plugins/product-manager/README.md#token-accounting).
|
|
125
|
+
---
|
|
297
126
|
|
|
298
|
-
|
|
127
|
+
## Project conventions
|
|
299
128
|
|
|
300
|
-
|
|
129
|
+
The SSE agent has defaults per area. Override per repo:
|
|
301
130
|
|
|
302
131
|
```
|
|
303
|
-
|
|
304
|
-
start next with /product-manager:run or /sse:run
|
|
132
|
+
{your-repo}/.claude/conventions/{backend,web,mobile,devops}.md
|
|
305
133
|
```
|
|
306
134
|
|
|
307
|
-
|
|
135
|
+
Only the area files you need. The agent reads them on top of defaults. See [`conventions-override.md`](.claude/agents/staff-software-engineer/guides/conventions-override.md).
|
|
308
136
|
|
|
309
137
|
---
|
|
310
138
|
|
|
311
139
|
## Layout
|
|
312
140
|
|
|
313
|
-
|
|
314
|
-
.
|
|
315
|
-
├── .claude/
|
|
316
|
-
│ ├── plugins/
|
|
317
|
-
│ │ ├── product-manager/ PRD + PRP plugin
|
|
318
|
-
│ │ └── staff-software-engineer/ plan, dev, test, pr plugin
|
|
319
|
-
│ ├── commands/ slash commands per plugin namespace
|
|
320
|
-
│ ├── agents/ Task-tool-invokable orchestrators
|
|
321
|
-
│ ├── hooks/
|
|
322
|
-
│ │ ├── status-line.sh pipeline status indicator (with cyan activity)
|
|
323
|
-
│ │ ├── pipeline-prompt.sh slash-command intent tracking
|
|
324
|
-
│ │ ├── pipeline-postwrite.sh stage-state from artifact writes
|
|
325
|
-
│ │ ├── pipeline-postedit.sh stage-state from approval marker
|
|
326
|
-
│ │ ├── pipeline-session-start.sh resume hint + PR-merged auto-clear
|
|
327
|
-
│ │ └── activity-pre-read.sh surfaces current sensor/eval/guide
|
|
328
|
-
│ ├── scripts/
|
|
329
|
-
│ │ ├── pipeline.py pipeline state CRUD
|
|
330
|
-
│ │ ├── activity.py live activity CRUD (60s TTL)
|
|
331
|
-
│ │ ├── pr-monitor.py PR-watch state + backoff schedule
|
|
332
|
-
│ │ └── stage-card.md header/footer card convention
|
|
333
|
-
│ ├── .pipeline-state.json active feature + per-stage state
|
|
334
|
-
│ ├── .pr-monitor-state.json PR being watched
|
|
335
|
-
│ ├── .activity current sensor/eval/guide being touched
|
|
336
|
-
│ └── settings.json hooks wiring + permissions
|
|
337
|
-
├── context-library/ reusable org/squad context
|
|
338
|
-
├── setup/
|
|
339
|
-
│ ├── install.sh target-repo installer
|
|
340
|
-
│ └── update.sh pull + reinstall
|
|
341
|
-
└── VERSION source of truth for installer
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
Plugin documentation:
|
|
345
|
-
|
|
346
|
-
- [product-manager](.claude/plugins/product-manager/README.md): PRD and PRP generation, sensor and eval gates, retry loop, token accounting, optional Confluence publish.
|
|
347
|
-
- [staff-software-engineer](.claude/plugins/staff-software-engineer/README.md): plan, dev, test, pr stages with per-project conventions override, document + code sensors, quality evals, PR monitor.
|
|
348
|
-
|
|
349
|
-
---
|
|
350
|
-
|
|
351
|
-
## Project conventions
|
|
352
|
-
|
|
353
|
-
Each target repo can override the SSE plugin defaults with its own files:
|
|
141
|
+
What `hk install` lays down in your repo:
|
|
354
142
|
|
|
355
143
|
```
|
|
356
|
-
{repo}
|
|
357
|
-
├──
|
|
358
|
-
├──
|
|
359
|
-
|
|
360
|
-
|
|
144
|
+
{your-repo}/
|
|
145
|
+
├── AGENTS.md agent registry + routing
|
|
146
|
+
├── CLAUDE.md workspace style + role
|
|
147
|
+
└── .claude/
|
|
148
|
+
├── agents/ agent definitions (sensors, evals, guides, skills)
|
|
149
|
+
├── commands/ slash command entry points
|
|
150
|
+
├── hooks/ status-line + lifecycle hooks
|
|
151
|
+
├── scripts/ pipeline.py · activity.py · pr-monitor.py
|
|
152
|
+
├── runtime/
|
|
153
|
+
│ ├── hooks/<agent>/ per-agent lifecycle (post-write, post-eval, pre-prp-check)
|
|
154
|
+
│ ├── scripts/<agent>/ per-agent utilities (sensor-runner, token-phase, link-validator)
|
|
155
|
+
│ └── outputs/{pm,sse}/ generated artifacts, markers, tokens
|
|
156
|
+
├── conventions/ your per-repo overrides
|
|
157
|
+
└── settings.json hook wiring
|
|
361
158
|
```
|
|
362
159
|
|
|
363
|
-
|
|
160
|
+
Full path-by-path map in [`AGENTS.md`](./AGENTS.md).
|
|
364
161
|
|
|
365
162
|
---
|
|
366
163
|
|
|
@@ -368,12 +165,13 @@ The installer scaffolds `.claude/conventions/README.md` to remind you of the con
|
|
|
368
165
|
|
|
369
166
|
| Tool | Why |
|
|
370
167
|
|------|-----|
|
|
371
|
-
| [Claude Code](https://claude.ai/code) |
|
|
372
|
-
|
|
|
373
|
-
| [
|
|
374
|
-
|
|
|
168
|
+
| [Claude Code](https://claude.ai/code) | agent runtime |
|
|
169
|
+
| python3 | sensors, token accounting, pipeline state |
|
|
170
|
+
| [gh CLI](https://cli.github.com/) | opens PR, polls for merge |
|
|
171
|
+
| git | branch + commit ops |
|
|
172
|
+
|
|
173
|
+
Optional: `jq` for token JSON queries. `JIRA_USERNAME` + `JIRA_API_TOKEN` to publish PRD/PRP to Confluence.
|
|
375
174
|
|
|
376
|
-
|
|
175
|
+
---
|
|
377
176
|
|
|
378
|
-
|
|
379
|
-
- `JIRA_USERNAME` and `JIRA_API_TOKEN` env vars to enable Confluence publish (details in the [product-manager README](.claude/plugins/product-manager/README.md#confluence-publish))
|
|
177
|
+
MIT. Built on [Claude Code](https://claude.ai/code). Works in any repo Claude Code touches.
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4.0.0
|
package/bin/hk.js
CHANGED
|
@@ -58,13 +58,18 @@ function cmdUninstall(target) {
|
|
|
58
58
|
process.exit(1);
|
|
59
59
|
}
|
|
60
60
|
const toRemove = [
|
|
61
|
-
'.
|
|
62
|
-
'.claude/
|
|
61
|
+
'AGENTS.md',
|
|
62
|
+
'.claude/agents/product-manager',
|
|
63
|
+
'.claude/agents/staff-software-engineer',
|
|
64
|
+
'.claude/agents/product-manager.md',
|
|
65
|
+
'.claude/agents/staff-software-engineer.md',
|
|
63
66
|
'.claude/commands/product-manager',
|
|
64
67
|
'.claude/commands/sse',
|
|
65
68
|
'.claude/commands/pipeline',
|
|
66
|
-
'.claude/
|
|
67
|
-
'.claude/
|
|
69
|
+
'.claude/runtime/hooks/product-manager',
|
|
70
|
+
'.claude/runtime/hooks/staff-software-engineer',
|
|
71
|
+
'.claude/runtime/scripts/product-manager',
|
|
72
|
+
'.claude/runtime/scripts/staff-software-engineer',
|
|
68
73
|
'.claude/hooks/status-line.sh',
|
|
69
74
|
'.claude/hooks/pipeline-prompt.sh',
|
|
70
75
|
'.claude/hooks/pipeline-postwrite.sh',
|
|
@@ -80,6 +85,9 @@ function cmdUninstall(target) {
|
|
|
80
85
|
'.claude/.activity',
|
|
81
86
|
'.claude/settings.json',
|
|
82
87
|
'.claude/.hk-version',
|
|
88
|
+
// legacy v3.x layout (best-effort cleanup if still present)
|
|
89
|
+
'.claude/plugins/product-manager',
|
|
90
|
+
'.claude/plugins/staff-software-engineer',
|
|
83
91
|
];
|
|
84
92
|
for (const rel of toRemove) {
|
|
85
93
|
const p = path.join(target, rel);
|
|
@@ -89,7 +97,7 @@ function cmdUninstall(target) {
|
|
|
89
97
|
}
|
|
90
98
|
}
|
|
91
99
|
console.log(`uninstalled harness-kit v${v} from ${target}`);
|
|
92
|
-
console.log(`note: .claude/conventions/ and
|
|
100
|
+
console.log(`note: CLAUDE.md, .claude/conventions/, .claude/runtime/outputs/, and .claude/.legacy-v3-backup/ kept. delete manually if desired.`);
|
|
93
101
|
}
|
|
94
102
|
|
|
95
103
|
function cmdStatus(target) {
|
|
@@ -117,9 +125,9 @@ function cmdHelp() {
|
|
|
117
125
|
console.log(`hk - harness-kit CLI (v${pkgVersion()})
|
|
118
126
|
|
|
119
127
|
usage:
|
|
120
|
-
hk install [target] install
|
|
121
|
-
hk update [target] pull latest source and reinstall
|
|
122
|
-
hk uninstall [target] remove installed
|
|
128
|
+
hk install [target] install harness into target repo (default: cwd)
|
|
129
|
+
hk update [target] pull latest source and reinstall (auto-backs up v3.x plugins/)
|
|
130
|
+
hk uninstall [target] remove installed harness from target
|
|
123
131
|
hk status [target] show installed version + active pipeline stage
|
|
124
132
|
hk version source version
|
|
125
133
|
hk help this message
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pieerry/harness-kit",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Claude Code harness for product + engineering delivery. From idea to merged PR, one pipeline.",
|
|
5
5
|
"author": "Space Metrics AI",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"product-management",
|
|
22
22
|
"delivery",
|
|
23
23
|
"pipeline",
|
|
24
|
-
"
|
|
24
|
+
"agents-md",
|
|
25
|
+
"subagent"
|
|
25
26
|
],
|
|
26
27
|
"bin": {
|
|
27
28
|
"hk": "bin/hk.js",
|
|
@@ -35,7 +36,8 @@
|
|
|
35
36
|
"VERSION",
|
|
36
37
|
"README.md",
|
|
37
38
|
"LICENSE",
|
|
38
|
-
"CLAUDE.md"
|
|
39
|
+
"CLAUDE.md",
|
|
40
|
+
"AGENTS.md"
|
|
39
41
|
],
|
|
40
42
|
"engines": {
|
|
41
43
|
"node": ">=14.0.0"
|