@pieerry/harness-kit 3.1.2 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/.hk-version +1 -0
- package/.claude/agents/product-manager.md +2 -2
- package/.claude/agents/staff-software-engineer.md +2 -2
- package/.claude/commands/pipeline/continue.md +8 -8
- package/.claude/commands/pipeline/reset.md +4 -4
- package/.claude/commands/product-manager/prd.md +4 -4
- package/.claude/commands/product-manager/prp.md +7 -7
- package/.claude/commands/product-manager/run.md +5 -5
- package/.claude/commands/sse/dev.md +17 -12
- package/.claude/commands/sse/plan.md +8 -8
- package/.claude/commands/sse/pr-monitor.md +56 -0
- package/.claude/commands/sse/pr.md +21 -11
- package/.claude/commands/sse/run.md +7 -7
- package/.claude/commands/sse/test.md +15 -9
- package/.claude/conventions/README.md +12 -0
- package/.claude/hooks/activity-pre-read.sh +18 -0
- package/.claude/hooks/pipeline-session-start.sh +26 -2
- package/.claude/hooks/status-line.sh +17 -1
- package/.claude/plugins/product-manager/evals/prd-quality.md +3 -3
- package/.claude/plugins/product-manager/evals/prd-readiness.md +1 -1
- package/.claude/plugins/product-manager/evals/prp-context-readiness.md +5 -5
- package/.claude/plugins/product-manager/evals/prp-quality.md +1 -1
- package/.claude/plugins/product-manager/guides/pipeline.md +14 -14
- package/.claude/plugins/product-manager/guides/prd-guidelines.md +4 -4
- package/.claude/plugins/product-manager/guides/product-guidelines.md +16 -16
- package/.claude/plugins/product-manager/guides/prp-guidelines.md +16 -16
- package/.claude/plugins/product-manager/guides/writing-style.md +9 -9
- package/.claude/plugins/product-manager/sensors/prd-acceptance-criteria.md +6 -6
- package/.claude/plugins/product-manager/sensors/prd-structure.md +2 -2
- package/.claude/plugins/product-manager/sensors/prp-context-quality.md +6 -6
- package/.claude/plugins/product-manager/sensors/prp-links.md +2 -2
- package/.claude/plugins/product-manager/sensors/prp-structure.md +1 -1
- package/.claude/plugins/staff-software-engineer/evals/dev-quality.md +48 -0
- package/.claude/plugins/staff-software-engineer/evals/plan-quality.md +6 -6
- package/.claude/plugins/staff-software-engineer/evals/pr-quality.md +48 -0
- package/.claude/plugins/staff-software-engineer/evals/test-quality.md +48 -0
- package/.claude/plugins/staff-software-engineer/guides/coding-style.md +7 -7
- package/.claude/plugins/staff-software-engineer/guides/commit-style.md +3 -3
- package/.claude/plugins/staff-software-engineer/guides/conventions-override.md +13 -13
- package/.claude/plugins/staff-software-engineer/guides/pipeline.md +12 -12
- package/.claude/plugins/staff-software-engineer/hooks/post-eval-sse.sh +65 -0
- package/.claude/plugins/staff-software-engineer/hooks/post-write-sse.sh +60 -0
- package/.claude/plugins/staff-software-engineer/sensors/code-conventions.md +4 -4
- package/.claude/plugins/staff-software-engineer/sensors/dev-structure.md +46 -0
- package/.claude/plugins/staff-software-engineer/sensors/pr-structure.md +49 -0
- package/.claude/plugins/staff-software-engineer/sensors/test-coverage.md +6 -6
- package/.claude/plugins/staff-software-engineer/sensors/test-structure.md +46 -0
- package/.claude/plugins/staff-software-engineer/skills/backend/SKILL.md +8 -8
- package/.claude/plugins/staff-software-engineer/skills/devops/SKILL.md +3 -3
- package/.claude/plugins/staff-software-engineer/skills/mobile/SKILL.md +3 -3
- package/.claude/plugins/staff-software-engineer/skills/web/SKILL.md +2 -2
- package/.claude/scripts/activity.py +68 -0
- package/.claude/scripts/pr-monitor.py +113 -0
- package/.claude/scripts/stage-card.md +37 -34
- package/.claude/settings.json +74 -0
- package/.claude/settings.local.json +13 -1
- package/CLAUDE.md +6 -0
- package/README.md +161 -61
- package/VERSION +1 -1
- package/bin/hk.js +6 -1
- package/package.json +1 -1
- package/setup/install.sh +16 -8
- package/.claude/plugins/staff-software-engineer/hooks/post-eval-plan.sh +0 -43
- package/.claude/plugins/staff-software-engineer/hooks/post-write-plan.sh +0 -49
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.1.2
|
|
@@ -12,9 +12,9 @@ When invoked, run /product-manager:run end to end. Follow .claude/plugins/produc
|
|
|
12
12
|
Ask once if missing: team or squad, problem in 1-2 sentences, customers, hypothesis, bet link.
|
|
13
13
|
|
|
14
14
|
Operating rules:
|
|
15
|
-
- English by default. Domain terms stay native if
|
|
15
|
+
- English by default. Domain terms stay native if team uses them.
|
|
16
16
|
- Never invent. Mark gaps with `NOT FOUND - NEEDS REVIEW: {detail}`.
|
|
17
17
|
- Voice: read .claude/plugins/product-manager/guides/writing-style.md. No em-dashes. Mermaid not ASCII.
|
|
18
|
-
- Specific over generic. Real numbers,
|
|
18
|
+
- Specific over generic. Real numbers, names, quotes.
|
|
19
19
|
|
|
20
20
|
Return format: see .claude/commands/product-manager/run.md. Include paths, scores, attempts, publish status, blockers.
|
|
@@ -15,8 +15,8 @@ Ask once if missing:
|
|
|
15
15
|
- area: backend, web, mobile, or devops (auto-detect from repo files if possible)
|
|
16
16
|
|
|
17
17
|
Operating rules:
|
|
18
|
-
- English by default. Domain terms stay native if
|
|
19
|
-
- Read project conventions first.
|
|
18
|
+
- English by default. Domain terms stay native if team uses them.
|
|
19
|
+
- Read project conventions first. Repo's .claude/conventions/{area}.md (if present) overrides plugin defaults. See .claude/plugins/staff-software-engineer/guides/conventions-override.md.
|
|
20
20
|
- Match repo style. Read 3+ similar files before writing.
|
|
21
21
|
- Never invent class names, file paths, helpers. If unknown, `TBD - verify with tech lead`.
|
|
22
22
|
- Voice: read .claude/plugins/staff-software-engineer/guides/coding-style.md and .claude/plugins/staff-software-engineer/guides/commit-style.md. No em-dashes. Mermaid not ASCII.
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
description: Resume the active pipeline at the next pending stage.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Resume
|
|
5
|
+
Resume active pipeline.
|
|
6
6
|
|
|
7
|
-
1. Read state: `python3 .claude/scripts/pipeline.py read`.
|
|
8
|
-
2. Read
|
|
9
|
-
3. Show
|
|
10
|
-
4. Invoke
|
|
11
|
-
5. After
|
|
7
|
+
1. Read state: `python3 .claude/scripts/pipeline.py read`. No `feature_id` or `current`, tell user pipeline idle. Suggest `/product-manager:run` or `/sse:run`.
|
|
8
|
+
2. Read next command: `python3 .claude/scripts/pipeline.py next`. Prints slash command to invoke.
|
|
9
|
+
3. Show current status line: `python3 .claude/scripts/pipeline.py render`.
|
|
10
|
+
4. Invoke next-stage command. Use recorded `feature_id` so artifacts land under same name.
|
|
11
|
+
5. After stage completes (file written, approval marker applied), post-write/post-edit hooks update state. Run `/pipeline:continue` again to chain next stage, or stop.
|
|
12
12
|
|
|
13
|
-
If state has `pipeline` but no `feature_id` yet (intent recorded, first stage not started), invoke
|
|
13
|
+
If state has `pipeline` but no `feature_id` yet (intent recorded, first stage not started), invoke first stage in `pipeline`.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
User wants to abandon run, suggest `/pipeline:reset`.
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
description: Clear the pipeline state file. Abandons the active feature run.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Reset
|
|
5
|
+
Reset pipeline.
|
|
6
6
|
|
|
7
|
-
1. Confirm
|
|
7
|
+
1. Confirm user wants to abandon active pipeline. Show `python3 .claude/scripts/pipeline.py render` so they see what they drop.
|
|
8
8
|
2. On confirmation: `python3 .claude/scripts/pipeline.py clear`.
|
|
9
|
-
3. Output files under `.claude/plugins/*/outputs/`
|
|
9
|
+
3. Output files under `.claude/plugins/*/outputs/` not deleted. Only in-memory state cleared.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Status bar returns to idle after reset.
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
description: Generate a Product Requirements Document for an team squad. Business-facing artifact. Sensors and evals gate.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Generate
|
|
5
|
+
Generate PRD. Follow .claude/plugins/product-manager/guides/pipeline.md for retry, approval, publish.
|
|
6
6
|
|
|
7
|
-
Print
|
|
7
|
+
Print header card before drafting and footer card after gates run. Format: .claude/scripts/stage-card.md.
|
|
8
8
|
|
|
9
9
|
Ask once if missing: squad, problem in 1-2 sentences, customers, hypothesis, bet link, stage.
|
|
10
10
|
|
|
11
|
-
Compute feature_id = {YYYY-MM-DD}-{squad}-{slug}. Before generating, write
|
|
11
|
+
Compute feature_id = {YYYY-MM-DD}-{squad}-{slug}. Before generating, write phase start marker:
|
|
12
12
|
|
|
13
13
|
```
|
|
14
14
|
.claude/plugins/product-manager/outputs/.markers/{feature_id}.prd-generate.start
|
|
@@ -30,7 +30,7 @@ Sensors: .claude/plugins/product-manager/sensors/prd-structure.md, .claude/plugi
|
|
|
30
30
|
|
|
31
31
|
Evals: .claude/plugins/product-manager/evals/prd-quality.md, .claude/plugins/product-manager/evals/prd-readiness.md.
|
|
32
32
|
|
|
33
|
-
After save, reply with this exact shape (name
|
|
33
|
+
After save, reply with this exact shape (name actual sensors/evals/guides that ran, don't abbreviate):
|
|
34
34
|
|
|
35
35
|
```
|
|
36
36
|
PRD saved at {path}.
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
description: Generate a Product Requirements Prompt for engineering handoff. Needs an approved PRD. Sensors, link validation, and eval gates.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Generate
|
|
5
|
+
Generate PRP. Follow .claude/plugins/product-manager/guides/pipeline.md for retry, approval, publish.
|
|
6
6
|
|
|
7
|
-
Print
|
|
7
|
+
Print header card before drafting and footer card after gates run. Format: .claude/scripts/stage-card.md.
|
|
8
8
|
|
|
9
|
-
Source PRD:
|
|
9
|
+
Source PRD: user passes path, use it. Else pick most recent in .claude/plugins/product-manager/outputs/prd/. None found, abort. Tell user to run /product-manager:prd first. .claude/plugins/product-manager/hooks/pre-prp-check.sh blocks if PRD lacks approved marker.
|
|
10
10
|
|
|
11
|
-
Compute feature_id from
|
|
11
|
+
Compute feature_id from source PRD filename (basename without .md). Save PRP to .claude/plugins/product-manager/outputs/prp/{feature_id}.md so it matches.
|
|
12
12
|
|
|
13
|
-
Before generating, write
|
|
13
|
+
Before generating, write phase start marker:
|
|
14
14
|
|
|
15
15
|
```
|
|
16
16
|
.claude/plugins/product-manager/outputs/.markers/{feature_id}.prp-generate.start
|
|
@@ -19,7 +19,7 @@ Before generating, write the phase start marker:
|
|
|
19
19
|
Content: `{"timestamp": "<ISO-8601 UTC now>", "session_id": ""}`
|
|
20
20
|
|
|
21
21
|
Read:
|
|
22
|
-
-
|
|
22
|
+
- source PRD
|
|
23
23
|
- .claude/plugins/product-manager/guides/prp-guidelines.md
|
|
24
24
|
- .claude/plugins/product-manager/guides/writing-style.md
|
|
25
25
|
- .claude/plugins/product-manager/guides/templates/prp.md
|
|
@@ -34,7 +34,7 @@ Sensors: .claude/plugins/product-manager/sensors/prp-structure.md, .claude/plugi
|
|
|
34
34
|
|
|
35
35
|
Evals: .claude/plugins/product-manager/evals/prp-quality.md, .claude/plugins/product-manager/evals/prp-context-readiness.md.
|
|
36
36
|
|
|
37
|
-
After save, reply with this exact shape (name
|
|
37
|
+
After save, reply with this exact shape (name actual sensors/evals/guides that ran):
|
|
38
38
|
|
|
39
39
|
```
|
|
40
40
|
PRP saved at {path}.
|
|
@@ -4,14 +4,14 @@ description: Run the full PM pipeline. PRD then PRP, with sensor and eval gates
|
|
|
4
4
|
|
|
5
5
|
Run end to end.
|
|
6
6
|
|
|
7
|
-
1. Invoke /product-manager:prd. Wait for
|
|
8
|
-
2. .claude/plugins/product-manager/hooks/pre-prp-check.sh validates
|
|
9
|
-
3. Invoke /product-manager:prp using
|
|
7
|
+
1. Invoke /product-manager:prd. Wait for approval marker.
|
|
8
|
+
2. .claude/plugins/product-manager/hooks/pre-prp-check.sh validates PRD.
|
|
9
|
+
3. Invoke /product-manager:prp using just-approved PRD.
|
|
10
10
|
4. Return summary.
|
|
11
11
|
|
|
12
12
|
Follow .claude/plugins/product-manager/guides/pipeline.md. Read .claude/agents/product-manager.md for inputs and rules.
|
|
13
13
|
|
|
14
|
-
Return format. Name every sensor, eval,
|
|
14
|
+
Return format. Name every sensor, eval, guide that ran. Generic summaries not acceptable — list specifics so user sees what was checked and loaded.
|
|
15
15
|
|
|
16
16
|
```
|
|
17
17
|
Pipeline complete.
|
|
@@ -34,4 +34,4 @@ Blockers:
|
|
|
34
34
|
- {file:line, issue, fix}
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Phase has no sensors/eval/guides/refs, omit line rather than print empty one.
|
|
@@ -2,37 +2,37 @@
|
|
|
2
2
|
description: Implement the approved plan in code. Writes commits, runs gates, returns diff summary.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Implement
|
|
5
|
+
Implement plan. Follow .claude/plugins/staff-software-engineer/guides/pipeline.md.
|
|
6
6
|
|
|
7
|
-
Print
|
|
7
|
+
Print header card before coding and footer card after gates run. Format: .claude/scripts/stage-card.md.
|
|
8
8
|
|
|
9
|
-
Source plan: latest in .claude/plugins/staff-software-engineer/outputs/plan/ with approved marker.
|
|
9
|
+
Source plan: latest in .claude/plugins/staff-software-engineer/outputs/plan/ with approved marker. None, abort. Ask user to run /sse:plan first.
|
|
10
10
|
|
|
11
|
-
Before coding, write
|
|
11
|
+
Before coding, write phase start marker:
|
|
12
12
|
|
|
13
13
|
```
|
|
14
14
|
.claude/plugins/staff-software-engineer/outputs/.markers/{feature_id}.dev.start
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
Read:
|
|
18
|
-
-
|
|
19
|
-
-
|
|
18
|
+
- source plan
|
|
19
|
+
- area skill: .claude/plugins/staff-software-engineer/skills/{area}/SKILL.md
|
|
20
20
|
- .claude/plugins/staff-software-engineer/guides/coding-style.md
|
|
21
21
|
- .claude/plugins/staff-software-engineer/guides/commit-style.md
|
|
22
22
|
- project conventions: {repo}/.claude/conventions/{area}.md if present
|
|
23
23
|
|
|
24
|
-
Read 3+ similar files in
|
|
24
|
+
Read 3+ similar files in target repo before writing. Match conventions:
|
|
25
25
|
- framework version (Spring 4.3 no-Boot vs Spring Boot, Vue 2 vs 3)
|
|
26
26
|
- build tool (Maven, Gradle, npm)
|
|
27
27
|
- package layout, test framework, helpers
|
|
28
28
|
|
|
29
29
|
Write code in small commits (1-4 files, < 100 lines ideal). Conventional Commits format.
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
Code gates (run after each implementation step):
|
|
32
32
|
- .claude/plugins/staff-software-engineer/sensors/code-conventions.md (lint, formatting, banned patterns)
|
|
33
33
|
- .claude/plugins/staff-software-engineer/sensors/test-coverage.md (every feature/bugfix has tests)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
Any gate fails, fix and retry. Max 3 attempts. Hard stop after 3.
|
|
36
36
|
|
|
37
37
|
After done, write `.claude/plugins/staff-software-engineer/outputs/dev/{feature_id}.md` with summary:
|
|
38
38
|
- files changed
|
|
@@ -40,19 +40,24 @@ After done, write `.claude/plugins/staff-software-engineer/outputs/dev/{feature_
|
|
|
40
40
|
- gate results
|
|
41
41
|
- blockers if any
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Document gates (run on saved summary):
|
|
44
|
+
- Sensor: .claude/plugins/staff-software-engineer/sensors/dev-structure.md (auto-run by post-write hook)
|
|
45
|
+
- Eval: .claude/plugins/staff-software-engineer/evals/dev-quality.md (you score it; threshold 8.0)
|
|
46
|
+
|
|
47
|
+
Append approval marker only when code gates pass and dev-quality eval is >= 8.0:
|
|
44
48
|
|
|
45
49
|
```
|
|
46
50
|
<!-- approved: {YYYY-MM-DD} -->
|
|
47
51
|
```
|
|
48
52
|
|
|
49
|
-
After approval, reply with this exact shape (name
|
|
53
|
+
After approval, reply with this exact shape (name actual sensors/evals/guides that ran):
|
|
50
54
|
|
|
51
55
|
```
|
|
52
56
|
Dev complete. branch {branch}.
|
|
53
57
|
files changed: {N}
|
|
54
58
|
commits: {M} ({short-sha}, {short-sha}, ...)
|
|
55
|
-
sensors: code-conventions ok, test-coverage ok
|
|
59
|
+
sensors: code-conventions ok, test-coverage ok, dev-structure ok
|
|
60
|
+
eval: dev-quality {N}/10
|
|
56
61
|
guides: coding-style.md, commit-style.md, skills/{area}/SKILL.md
|
|
57
62
|
refs: plan/{feature_id}.md, conventions/{area}.md
|
|
58
63
|
next: /sse:test
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
description: Generate an implementation plan from an approved PRP. Sensors and evals gate.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Generate
|
|
5
|
+
Generate technical plan. Follow .claude/plugins/staff-software-engineer/guides/pipeline.md for retry, approval, publish.
|
|
6
6
|
|
|
7
|
-
Print
|
|
7
|
+
Print header card before drafting and footer card after gates run. Format: .claude/scripts/stage-card.md.
|
|
8
8
|
|
|
9
|
-
Source PRP:
|
|
9
|
+
Source PRP: user passes path, use it. Else pick most recent in .claude/plugins/product-manager/outputs/prp/. None found, abort. Tell user to run /product-manager:prp first.
|
|
10
10
|
|
|
11
|
-
Compute feature_id from
|
|
11
|
+
Compute feature_id from source PRP filename (basename without .md). Save plan to .claude/plugins/staff-software-engineer/outputs/plan/{feature_id}.md so it matches.
|
|
12
12
|
|
|
13
|
-
Before generating, write
|
|
13
|
+
Before generating, write phase start marker:
|
|
14
14
|
|
|
15
15
|
```
|
|
16
16
|
.claude/plugins/staff-software-engineer/outputs/.markers/{feature_id}.plan-generate.start
|
|
@@ -19,11 +19,11 @@ Before generating, write the phase start marker:
|
|
|
19
19
|
Content: `{"timestamp": "<ISO-8601 UTC now>", "session_id": ""}`
|
|
20
20
|
|
|
21
21
|
Read:
|
|
22
|
-
-
|
|
22
|
+
- source PRP
|
|
23
23
|
- .claude/plugins/staff-software-engineer/guides/pipeline.md
|
|
24
24
|
- .claude/plugins/staff-software-engineer/guides/coding-style.md
|
|
25
25
|
- .claude/plugins/staff-software-engineer/guides/examples/good-plan-example.md
|
|
26
|
-
-
|
|
26
|
+
- area-specific skill: .claude/plugins/staff-software-engineer/skills/{area}/SKILL.md (area = backend, web, mobile, devops)
|
|
27
27
|
- project conventions if present: {repo}/.claude/conventions/{area}.md (see .claude/plugins/staff-software-engineer/guides/conventions-override.md)
|
|
28
28
|
|
|
29
29
|
Save to .claude/plugins/staff-software-engineer/outputs/plan/{feature_id}.md.
|
|
@@ -32,7 +32,7 @@ Sensors: .claude/plugins/staff-software-engineer/sensors/plan-structure.md.
|
|
|
32
32
|
|
|
33
33
|
Evals: .claude/plugins/staff-software-engineer/evals/plan-quality.md.
|
|
34
34
|
|
|
35
|
-
After save, reply with this exact shape (name
|
|
35
|
+
After save, reply with this exact shape (name actual sensors/evals/guides that ran):
|
|
36
36
|
|
|
37
37
|
```
|
|
38
38
|
Plan saved at {path}.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Watch the active PR for merge with backoff polling. Auto-invoked after /sse:pr. Clears pipeline state on merge.
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
Monitor active PR until it merges. Polls with backoff: 3min → 6min → 12min → 24min → 30min cap, escalating after 5 attempts at each rung.
|
|
6
|
+
|
|
7
|
+
Runs in active session via ScheduleWakeup. Closing session ends monitor.
|
|
8
|
+
|
|
9
|
+
## Flow
|
|
10
|
+
|
|
11
|
+
1. **Read state** from `.claude/.pr-monitor-state.json`.
|
|
12
|
+
- Missing → first run. Detect PR from current branch:
|
|
13
|
+
```
|
|
14
|
+
gh pr view --json number,url,headRefName,state
|
|
15
|
+
```
|
|
16
|
+
No PR or state already MERGED → exit silently (nothing to watch).
|
|
17
|
+
Otherwise initialize state:
|
|
18
|
+
```
|
|
19
|
+
.claude/scripts/pr-monitor.py init <number> <url> <branch>
|
|
20
|
+
```
|
|
21
|
+
Script prints next-delay in seconds.
|
|
22
|
+
- Present → use `state.pr_number`.
|
|
23
|
+
|
|
24
|
+
2. **Check merge status**:
|
|
25
|
+
```
|
|
26
|
+
gh pr view <pr_number> --json state -q .state
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
3. **If `MERGED`**:
|
|
30
|
+
- Print one line: `PR #<n> merged → <url>. Pipeline state cleared. Start next: /product-manager:run`
|
|
31
|
+
- Clear monitor state: `.claude/scripts/pr-monitor.py clear`
|
|
32
|
+
- Clear pipeline state: `.claude/scripts/pipeline.py clear`
|
|
33
|
+
- **Do not** call ScheduleWakeup. Done.
|
|
34
|
+
|
|
35
|
+
4. **If `CLOSED` (not merged)**:
|
|
36
|
+
- Print: `PR #<n> closed without merge. Monitor stopped.`
|
|
37
|
+
- Clear monitor state only. Done.
|
|
38
|
+
|
|
39
|
+
5. **If `OPEN`**:
|
|
40
|
+
- Bump attempt counter, get next interval:
|
|
41
|
+
```
|
|
42
|
+
.claude/scripts/pr-monitor.py bump
|
|
43
|
+
```
|
|
44
|
+
Script prints next-delay in seconds (e.g. `180`, `360`, `720`, `1440`, `1800`).
|
|
45
|
+
- Read state with `.claude/scripts/pr-monitor.py read` for `current_interval_min` and `total_attempts` to include in user-facing line.
|
|
46
|
+
- Print one line: `PR #<n> still open (attempt <total>, next check in <m>min).`
|
|
47
|
+
- Schedule next wake:
|
|
48
|
+
- Load `ScheduleWakeup` via ToolSearch: `select:ScheduleWakeup`
|
|
49
|
+
- Call with `delaySeconds=<next>`, `prompt="/sse:pr-monitor"`, `reason="watching PR #<n> for merge, interval <m>min"`.
|
|
50
|
+
|
|
51
|
+
## First invocation (right after /sse:pr)
|
|
52
|
+
|
|
53
|
+
No state file yet. Initialize then schedule first wake at 3min (180s). Print:
|
|
54
|
+
```
|
|
55
|
+
PR monitor armed for #<n>. First check in 3min, escalates to 30min cap.
|
|
56
|
+
```
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
description: Open a Pull Request on GitHub following team conventions. Draft by default.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Open
|
|
5
|
+
Open Pull Request.
|
|
6
6
|
|
|
7
|
-
Print
|
|
7
|
+
Print header card before opening and footer card after gh returns. Format: .claude/scripts/stage-card.md.
|
|
8
8
|
|
|
9
9
|
Prerequisites:
|
|
10
10
|
- All previous gates passed (plan approved, dev approved, test approved).
|
|
11
11
|
- Branch pushed to origin with current changes.
|
|
12
12
|
|
|
13
|
-
Before opening, write
|
|
13
|
+
Before opening, write phase start marker:
|
|
14
14
|
|
|
15
15
|
```
|
|
16
16
|
.claude/plugins/staff-software-engineer/outputs/.markers/{feature_id}.pr.start
|
|
@@ -19,9 +19,9 @@ Before opening, write the phase start marker:
|
|
|
19
19
|
Read:
|
|
20
20
|
- .claude/plugins/staff-software-engineer/guides/pr-template.md
|
|
21
21
|
- .claude/plugins/staff-software-engineer/guides/commit-style.md
|
|
22
|
-
-
|
|
22
|
+
- latest plan and dev outputs (for body content)
|
|
23
23
|
|
|
24
|
-
Detect ticket id from branch name (e.g., `feat/PROJ-123-foo` -> `PROJ-123`).
|
|
24
|
+
Detect ticket id from branch name (e.g., `feat/PROJ-123-foo` -> `PROJ-123`). Branch has none, ask user once. Never call Jira API.
|
|
25
25
|
|
|
26
26
|
Compose:
|
|
27
27
|
- Title: conventional commit prefix + short description (e.g., `feat(PROJ-123): add timezone-aware deadline check`)
|
|
@@ -35,8 +35,14 @@ Save .claude/plugins/staff-software-engineer/outputs/pr/{feature_id}.md with:
|
|
|
35
35
|
- title
|
|
36
36
|
- draft status
|
|
37
37
|
- summary
|
|
38
|
+
- test plan checklist
|
|
39
|
+
- refs (plan + dev paths)
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
Document gates (run on saved record):
|
|
42
|
+
- Sensor: .claude/plugins/staff-software-engineer/sensors/pr-structure.md (auto-run by post-write hook)
|
|
43
|
+
- Eval: .claude/plugins/staff-software-engineer/evals/pr-quality.md (you score it; threshold 8.0)
|
|
44
|
+
|
|
45
|
+
Append approval marker only when sensor passes and pr-quality eval is >= 8.0:
|
|
40
46
|
|
|
41
47
|
```
|
|
42
48
|
<!-- approved: {YYYY-MM-DD} ready-for-handoff: true -->
|
|
@@ -46,9 +52,13 @@ Reply with this exact shape:
|
|
|
46
52
|
|
|
47
53
|
```
|
|
48
54
|
PR opened: {url}
|
|
49
|
-
title:
|
|
50
|
-
draft:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
55
|
+
title: {title}
|
|
56
|
+
draft: {yes|no}
|
|
57
|
+
sensors: pr-structure ok
|
|
58
|
+
eval: pr-quality {N}/10
|
|
59
|
+
guides: pr-template.md, commit-style.md
|
|
60
|
+
refs: plan/{feature_id}.md, dev/{feature_id}.md
|
|
61
|
+
next: request review (if draft, mark ready when checks pass)
|
|
54
62
|
```
|
|
63
|
+
|
|
64
|
+
After replying, **auto-invoke `/sse:pr-monitor`** so session watches PR for merge with backoff polling. Skip if user passed `--no-monitor` or PR already MERGED.
|
|
@@ -4,15 +4,15 @@ description: Run the full engineering pipeline. Plan, dev, test, pr in sequence.
|
|
|
4
4
|
|
|
5
5
|
Run end to end.
|
|
6
6
|
|
|
7
|
-
1. Invoke /sse:plan. Wait for
|
|
8
|
-
2. Invoke /sse:dev. Implements
|
|
9
|
-
3. Invoke /sse:test. Runs
|
|
10
|
-
4. Invoke /sse:pr. Opens
|
|
7
|
+
1. Invoke /sse:plan. Wait for approval marker on plan.
|
|
8
|
+
2. Invoke /sse:dev. Implements plan in code.
|
|
9
|
+
3. Invoke /sse:test. Runs project test suite.
|
|
10
|
+
4. Invoke /sse:pr. Opens pull request.
|
|
11
11
|
5. Return summary.
|
|
12
12
|
|
|
13
|
-
Follow .claude/plugins/staff-software-engineer/guides/pipeline.md for retry, approval markers, token accounting,
|
|
13
|
+
Follow .claude/plugins/staff-software-engineer/guides/pipeline.md for retry, approval markers, token accounting, publish behavior.
|
|
14
14
|
|
|
15
|
-
Return format. Name every sensor, eval,
|
|
15
|
+
Return format. Name every sensor, eval, guide that ran. Generic summaries not acceptable — list specifics so user sees what was checked and loaded.
|
|
16
16
|
|
|
17
17
|
```
|
|
18
18
|
Engineering pipeline complete.
|
|
@@ -47,4 +47,4 @@ Blockers:
|
|
|
47
47
|
- {file:line, issue, fix}
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
Phase has no sensors/eval/guides/refs, omit line for that phase rather than print empty one.
|
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
description: Run the project test suite. Reports results to .claude/plugins/staff-software-engineer/outputs/test/.
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
Run
|
|
5
|
+
Run test suite for current repo.
|
|
6
6
|
|
|
7
|
-
Print
|
|
7
|
+
Print header card before running and footer card after suite finishes. Format: .claude/scripts/stage-card.md.
|
|
8
8
|
|
|
9
|
-
Detect
|
|
9
|
+
Detect project test command (in order):
|
|
10
10
|
1. Check README.md or CONTRIBUTING.md for explicit test instructions.
|
|
11
11
|
2. Maven (pom.xml present): `./mvnw test` or `mvn test`
|
|
12
12
|
3. Gradle (build.gradle present): `./gradlew test`
|
|
13
13
|
4. npm (package.json with "test" script): `npm test`
|
|
14
14
|
5. pytest (pyproject.toml or pytest.ini): `pytest`
|
|
15
|
-
6. Other: ask
|
|
15
|
+
6. Other: ask user.
|
|
16
16
|
|
|
17
|
-
Before running, write
|
|
17
|
+
Before running, write phase start marker:
|
|
18
18
|
|
|
19
19
|
```
|
|
20
20
|
.claude/plugins/staff-software-engineer/outputs/.markers/{feature_id}.test.start
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Run
|
|
23
|
+
Run test command. Capture stdout and stderr.
|
|
24
24
|
|
|
25
25
|
Save .claude/plugins/staff-software-engineer/outputs/test/{feature_id}.md with:
|
|
26
26
|
- command run
|
|
@@ -29,13 +29,17 @@ Save .claude/plugins/staff-software-engineer/outputs/test/{feature_id}.md with:
|
|
|
29
29
|
- failing test names (if any)
|
|
30
30
|
- duration
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Document gates (run on saved report):
|
|
33
|
+
- Sensor: .claude/plugins/staff-software-engineer/sensors/test-structure.md (auto-run by post-write hook)
|
|
34
|
+
- Eval: .claude/plugins/staff-software-engineer/evals/test-quality.md (you score it; threshold 8.0)
|
|
35
|
+
|
|
36
|
+
Append approval marker only when exit code is 0 and test-quality eval is >= 8.0:
|
|
33
37
|
|
|
34
38
|
```
|
|
35
39
|
<!-- approved: {YYYY-MM-DD} -->
|
|
36
40
|
```
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
Tests fail, return blocker with failing test names and snippet of failure output. Don't retry automatically; let user decide.
|
|
39
43
|
|
|
40
44
|
Reply with this exact shape:
|
|
41
45
|
|
|
@@ -45,8 +49,10 @@ Tests {passed|failed}.
|
|
|
45
49
|
passed: {N}
|
|
46
50
|
failed: {M}
|
|
47
51
|
duration: {seconds}s
|
|
52
|
+
sensors: test-structure ok
|
|
53
|
+
eval: test-quality {N}/10
|
|
48
54
|
output: {path/to/test/output.md}
|
|
49
55
|
next: /sse:pr (if passed) | fix failing tests (if failed)
|
|
50
56
|
```
|
|
51
57
|
|
|
52
|
-
|
|
58
|
+
Failed, append `failures:` block listing each failing test name with one-line snippet from failure output.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Project Conventions
|
|
2
|
+
|
|
3
|
+
Override staff-software-engineer plugin defaults for this repo. Create files as needed:
|
|
4
|
+
|
|
5
|
+
- backend.md
|
|
6
|
+
- web.md
|
|
7
|
+
- mobile.md
|
|
8
|
+
- devops.md
|
|
9
|
+
|
|
10
|
+
When a file exists here, plugin reads it on top of defaults. Rules in this folder win.
|
|
11
|
+
|
|
12
|
+
See `.claude/plugins/staff-software-engineer/guides/conventions-override.md` for the full reference.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
# PreToolUse hook on Read. If the file being read is a sensor/eval/guide
|
|
3
|
+
# under any plugin, mark current activity so status-line.sh can surface it.
|
|
4
|
+
|
|
5
|
+
FILE_PATH="${CLAUDE_TOOL_FILE_PATH:-}"
|
|
6
|
+
[ -z "$FILE_PATH" ] && exit 0
|
|
7
|
+
|
|
8
|
+
KIND=""
|
|
9
|
+
case "$FILE_PATH" in
|
|
10
|
+
*/plugins/*/sensors/*.md) KIND=sensor ;;
|
|
11
|
+
*/plugins/*/evals/*.md) KIND=eval ;;
|
|
12
|
+
*/plugins/*/guides/*.md) KIND=guide ;;
|
|
13
|
+
*) exit 0 ;;
|
|
14
|
+
esac
|
|
15
|
+
|
|
16
|
+
NAME="$(basename "$FILE_PATH" .md)"
|
|
17
|
+
[ -x ".claude/scripts/activity.py" ] && python3 .claude/scripts/activity.py set "$KIND" "$NAME" 2>/dev/null
|
|
18
|
+
exit 0
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
|
-
# SessionStart hook.
|
|
3
|
-
#
|
|
2
|
+
# SessionStart hook.
|
|
3
|
+
# 1. If current branch has a MERGED/CLOSED PR and pipeline state looks stale
|
|
4
|
+
# (no feature_id), clear state — the work shipped, nothing to resume.
|
|
5
|
+
# 2. Otherwise, if a pipeline state exists with an incomplete pipeline,
|
|
6
|
+
# print a resume hint.
|
|
4
7
|
|
|
5
8
|
set -e
|
|
6
9
|
|
|
@@ -9,6 +12,27 @@ STATE_FILE=".claude/.pipeline-state.json"
|
|
|
9
12
|
[ -x "$PIPELINE_PY" ] || exit 0
|
|
10
13
|
[ -f "$STATE_FILE" ] || exit 0
|
|
11
14
|
|
|
15
|
+
# Stale-state auto-clear: branch has terminal PR + no feature_id recorded.
|
|
16
|
+
if command -v gh >/dev/null 2>&1 && command -v python3 >/dev/null 2>&1; then
|
|
17
|
+
FID="$(python3 -c 'import json,sys
|
|
18
|
+
try:
|
|
19
|
+
s=json.load(open(".claude/.pipeline-state.json"))
|
|
20
|
+
print(s.get("feature_id") or "")
|
|
21
|
+
except Exception:
|
|
22
|
+
pass' 2>/dev/null || true)"
|
|
23
|
+
if [ -z "$FID" ]; then
|
|
24
|
+
PR_STATE="$(gh pr view --json state -q .state 2>/dev/null || true)"
|
|
25
|
+
PR_NUM="$(gh pr view --json number -q .number 2>/dev/null || true)"
|
|
26
|
+
case "$PR_STATE" in
|
|
27
|
+
MERGED|CLOSED)
|
|
28
|
+
python3 "$PIPELINE_PY" clear >/dev/null 2>&1 || true
|
|
29
|
+
printf 'previous feature shipped (PR #%s %s). pipeline state cleared.\nstart next with /product-manager:run or /sse:run\n' "$PR_NUM" "$PR_STATE"
|
|
30
|
+
exit 0
|
|
31
|
+
;;
|
|
32
|
+
esac
|
|
33
|
+
fi
|
|
34
|
+
fi
|
|
35
|
+
|
|
12
36
|
CURRENT="$(python3 "$PIPELINE_PY" next 2>/dev/null || true)"
|
|
13
37
|
[ -z "$CURRENT" ] && exit 0
|
|
14
38
|
|
|
@@ -1,14 +1,29 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
# Status line for the harness-kit pipeline. Reads .claude/.pipeline-state.json
|
|
3
3
|
# (managed by .claude/scripts/pipeline.py) for live state. Falls back to a
|
|
4
|
-
# file-scan if state is absent.
|
|
4
|
+
# file-scan if state is absent. Appends current activity (sensor/eval/guide)
|
|
5
|
+
# in cyan when one is active.
|
|
5
6
|
|
|
6
7
|
PIPELINE_PY=".claude/scripts/pipeline.py"
|
|
8
|
+
ACTIVITY_PY=".claude/scripts/activity.py"
|
|
9
|
+
|
|
10
|
+
CYAN=$(printf '\033[36m')
|
|
11
|
+
RESET=$(printf '\033[0m')
|
|
12
|
+
|
|
13
|
+
append_activity() {
|
|
14
|
+
if [ -x "$ACTIVITY_PY" ]; then
|
|
15
|
+
A="$(python3 "$ACTIVITY_PY" read 2>/dev/null || true)"
|
|
16
|
+
if [ -n "$A" ]; then
|
|
17
|
+
printf ' · %s%s%s' "$CYAN" "$A" "$RESET"
|
|
18
|
+
fi
|
|
19
|
+
fi
|
|
20
|
+
}
|
|
7
21
|
|
|
8
22
|
if [ -x "$PIPELINE_PY" ] && [ -f ".claude/.pipeline-state.json" ]; then
|
|
9
23
|
OUT="$(python3 "$PIPELINE_PY" render 2>/dev/null)"
|
|
10
24
|
if [ -n "$OUT" ]; then
|
|
11
25
|
printf '%s' "$OUT"
|
|
26
|
+
append_activity
|
|
12
27
|
exit 0
|
|
13
28
|
fi
|
|
14
29
|
fi
|
|
@@ -99,3 +114,4 @@ if [ -z "$OUT" ]; then
|
|
|
99
114
|
else
|
|
100
115
|
printf '%s' "$OUT"
|
|
101
116
|
fi
|
|
117
|
+
append_activity
|
|
@@ -9,21 +9,21 @@ Score each dimension 0-10. Cite line numbers when scoring below 7. Weighted tota
|
|
|
9
9
|
## Rubric
|
|
10
10
|
|
|
11
11
|
### Clarity (weight 20%)
|
|
12
|
-
|
|
12
|
+
Problem stated in 1-2 sentences? Names who suffers, how often, what it costs?
|
|
13
13
|
|
|
14
14
|
- 10: crisp, specific, evidence-backed
|
|
15
15
|
- 5: present but generic
|
|
16
16
|
- 0: missing or vague
|
|
17
17
|
|
|
18
18
|
### Hypothesis (weight 15%)
|
|
19
|
-
|
|
19
|
+
"If we X, then Y will Z, because W" hypothesis with numeric target?
|
|
20
20
|
|
|
21
21
|
- 10: falsifiable, numeric, evidence-tied
|
|
22
22
|
- 5: directional but missing target or evidence
|
|
23
23
|
- 0: aspirational, no measurable claim
|
|
24
24
|
|
|
25
25
|
### Customer specificity (weight 10%)
|
|
26
|
-
Real customers named with reasons each
|
|
26
|
+
Real customers named with reasons each matters?
|
|
27
27
|
|
|
28
28
|
- 10: concrete, differentiated
|
|
29
29
|
- 5: segments named but thin
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Type: rule-based stage gate
|
|
4
4
|
Mode: advisory
|
|
5
5
|
|
|
6
|
-
Decides whether
|
|
6
|
+
Decides whether PRD has enough content for declared stage to advance. Run after prd-quality passes.
|
|
7
7
|
|
|
8
8
|
## Stage gates
|
|
9
9
|
|