@tianhai/pi-workflow-kit 2.6.0 → 2.8.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/agents/pwk-hazard-reviewer.md +2 -0
- package/agents/pwk-recon-scout.md +2 -0
- package/agents/pwk-smell-reviewer.md +2 -0
- package/agents/pwk-spec-reviewer.md +2 -0
- package/agents/pwk-tracing-reviewer.md +2 -0
- package/package.json +1 -1
- package/skills/pwk-brainstorming/SKILL.md +2 -0
- package/skills/pwk-code-review/SKILL.md +2 -0
- package/skills/pwk-executing-tasks/SKILL.md +5 -0
- package/skills/pwk-executing-tasks/references/progress-format.md +6 -1
- package/skills/pwk-executing-tasks/scripts/build-review-packet.py +3 -1
- package/skills/pwk-finalizing/SKILL.md +7 -1
- package/skills/pwk-status/SKILL.md +2 -0
- package/skills/pwk-walkthrough/SKILL.md +2 -0
|
@@ -12,6 +12,8 @@ max_turns: 20
|
|
|
12
12
|
|
|
13
13
|
You are a read-only code reviewer. Execute the task instructions below faithfully using the host’s read-only tools. **Report findings only — do not modify files.**
|
|
14
14
|
|
|
15
|
+
The `tools:` frontmatter is the minimum grant requested of the delegation provider, not a prescription — use any tool your host actually grants.
|
|
16
|
+
|
|
15
17
|
## Authority boundary
|
|
16
18
|
|
|
17
19
|
The host must enforce read-only execution. Do not create, modify, delete, move, or copy files, and do not run commands that mutate system or repository state.
|
|
@@ -11,6 +11,8 @@ You are a codebase recon scout requested during brainstorming before design work
|
|
|
11
11
|
|
|
12
12
|
**You are observations only.** No design recommendations, no preferred-approach opinion, no code beyond one-line excerpts. Every claim must cite a `file:line` so the main agent can drill in if it needs to.
|
|
13
13
|
|
|
14
|
+
The `tools:` frontmatter is the minimum grant requested of the delegation provider, not a prescription — use any tool your host actually grants.
|
|
15
|
+
|
|
14
16
|
## Authority boundary
|
|
15
17
|
|
|
16
18
|
You are a read-only reporter. The host must enforce the requested read-only boundary; do not create, modify, delete, move, or copy files, and do not run commands that mutate system or repository state.
|
|
@@ -12,6 +12,8 @@ max_turns: 20
|
|
|
12
12
|
|
|
13
13
|
You are a read-only code reviewer. Execute the task instructions below faithfully using the host’s read-only tools. **Report findings only — do not modify files.**
|
|
14
14
|
|
|
15
|
+
The `tools:` frontmatter is the minimum grant requested of the delegation provider, not a prescription — use any tool your host actually grants.
|
|
16
|
+
|
|
15
17
|
## Authority boundary
|
|
16
18
|
|
|
17
19
|
The host must enforce read-only execution. Do not create, modify, delete, move, or copy files, and do not run commands that mutate system or repository state.
|
|
@@ -10,6 +10,8 @@ max_turns: 40
|
|
|
10
10
|
|
|
11
11
|
You are a read-only code reviewer. Execute the task instructions below faithfully using the host’s read-only tools. **Report findings only — do not modify files.**
|
|
12
12
|
|
|
13
|
+
The `tools:` frontmatter is the minimum grant requested of the delegation provider, not a prescription — use any tool your host actually grants.
|
|
14
|
+
|
|
13
15
|
## Authority boundary
|
|
14
16
|
|
|
15
17
|
The host must enforce read-only execution. Do not create, modify, delete, move, or copy files, and do not run commands that mutate system or repository state.
|
|
@@ -10,6 +10,8 @@ max_turns: 40
|
|
|
10
10
|
|
|
11
11
|
You are a read-only code reviewer. Execute the task instructions below faithfully using the host’s read-only tools. **Report findings only — do not modify files.**
|
|
12
12
|
|
|
13
|
+
The `tools:` frontmatter is the minimum grant requested of the delegation provider, not a prescription — use any tool your host actually grants.
|
|
14
|
+
|
|
13
15
|
## Authority boundary
|
|
14
16
|
|
|
15
17
|
The host must enforce read-only execution. Do not create, modify, delete, move, or copy files, and do not run commands that mutate system or repository state.
|
package/package.json
CHANGED
|
@@ -7,6 +7,8 @@ description: "Use this before any creative work — creating features, building
|
|
|
7
7
|
|
|
8
8
|
Read-only exploration of source code; every file you create or edit goes under `docs/plans/`. (An approved ADR goes to `docs/adr/`, which sits outside the writable boundary — the human writes it themselves or briefly runs `/pwk-guard off`; the design phase never unlocks it.) The design doc is the **single buildable artifact** — each requirement carries its own acceptance criteria and review tags, and the executor builds straight from it; nothing is re-derived into a second document later. Source-writing happens in `pwk-executing-tasks`.
|
|
9
9
|
|
|
10
|
+
Any command or tool recipe in this skill is an example, not the requirement — when your host grants a better tool for an operation (a sandboxed batch executor, a structured file API), use the better tool and treat the recipe as a fallback; the only exact exceptions are this kit's `scripts/` helpers and plain `git` invocations, whose deterministic output is the point.
|
|
11
|
+
|
|
10
12
|
## Proportionality: trivial vs non-trivial
|
|
11
13
|
|
|
12
14
|
Classify the change at the start.
|
|
@@ -7,6 +7,8 @@ description: "Review a completed requirement's code — trace the logic, check s
|
|
|
7
7
|
|
|
8
8
|
Review the code just implemented — one tagged requirement, or the whole feature at the feature-level review. **Unlocked** — you may edit code to apply smell fixes; flag everything else as a follow-up.
|
|
9
9
|
|
|
10
|
+
Any command or tool recipe in this skill is an example, not the requirement — when your host grants a better tool for an operation (a sandboxed batch executor, a structured file API), use the better tool and treat the recipe as a fallback; the only exact exceptions are this kit's `scripts/` helpers and plain `git` invocations, whose deterministic output is the point.
|
|
11
|
+
|
|
10
12
|
## Process
|
|
11
13
|
|
|
12
14
|
1. **Identify the scope** — in the feature-gate flow (the default), you review the **whole feature diff** at the feature-level review (`git diff $FEATURE_BASE...HEAD` — the parent of the first Commit-column entry; see the executing skill's packet recipe); all acceptance criteria in the design doc and the `## Feature acceptance` E2E are in scope. When invoked per-requirement (`Review: inline` on a tagged requirement — or inline-completing a missing delegated role when the tag is `parallel`), scope is just that requirement — read its acceptance criteria from the design doc, run `git log --oneline -5` and `git diff` to see what changed for it. Invoked standalone — no invoking skill, no design doc, no packet — review the span the user names (the working-tree diff, or the branch's commits against its parent branch): tracing, smell fixes, and the hazard check run as usual, while spec alignment has no acceptance criteria to key on — say so and judge the diff against its stated intent instead of manufacturing a coverage table. When the invoking skill already assembled a review packet (the feature packet, or the requirement-scoped `<leaf>-review-packet-r<N>.md`), work from the packet — it is the scope of record; re-derive nothing the packet already states.
|
|
@@ -7,6 +7,8 @@ description: "Implement a design doc via the feature-gate flow: write the featur
|
|
|
7
7
|
|
|
8
8
|
Implement the design doc found under `docs/plans/` via the **feature-gate flow**. The design doc is the single buildable artifact — its `### R<n>` blocks carry each requirement's acceptance criteria and tags. The criteria define *what*, you decide *how*: structure, signatures, internals are yours.
|
|
9
9
|
|
|
10
|
+
Any command or tool recipe in this skill is an example, not the requirement — when your host grants a better tool for an operation (a sandboxed batch executor, a structured file API), use the better tool and treat the recipe as a fallback; the only exact exceptions are this kit's `scripts/` helpers and plain `git` invocations, whose deterministic output is the point.
|
|
11
|
+
|
|
10
12
|
The feature-acceptance E2E test is the primary enforced gate and the primary enforced spec for the feature. The flow is always on: write the E2E first (red), implement the requirements back-to-back, then run the feature review and pause at the **ship checkpoint** — one fully-informed stop where you present the execution summary and the reviewer coverage table, with the full diff on request. Per-requirement checkpoints and reviews are **opt-in** — they fire only for requirements the design doc tags (default off); the feature gate covers everything else. A trivial design doc (no `## Feature acceptance`, per brainstorming's proportionality rule) skips the E2E steps and ships on the full suite; the one whole-feature review still runs at its ship checkpoint, its missing `### Feature review` tag defaulting to `auto`.
|
|
11
13
|
|
|
12
14
|
## Before you start
|
|
@@ -179,8 +181,11 @@ key files capped `at 5`.
|
|
|
179
181
|
|
|
180
182
|
```markdown
|
|
181
183
|
# Progress: <topic>
|
|
184
|
+
|
|
182
185
|
Design: docs/plans/<date>-<topic>/<leaf>-design.md
|
|
186
|
+
|
|
183
187
|
Feature phase: e2e-written
|
|
188
|
+
|
|
184
189
|
## Requirements
|
|
185
190
|
| # | Done | Requirement | Per-req ceremony | Commit |
|
|
186
191
|
## Execution summary
|
|
@@ -2,16 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Read before creating or changing progress rows, or writing/re-presenting the code digest. This reference owns the unchanged progress artifact schema.
|
|
4
4
|
|
|
5
|
-
2. **Create the progress file** `docs/plans/<date>-<topic>/<leaf>-progress.md`, beside the design doc it belongs to (`<leaf>` is `<topic>` for a single-part topic; an umbrella part uses its roster slug), so `pwk-finalizing` finds it inside the topic folder:
|
|
5
|
+
2. **Create the progress file** `docs/plans/<date>-<topic>/<leaf>-progress.md`, beside the design doc it belongs to (`<leaf>` is `<topic>` for a single-part topic; an umbrella part uses its roster slug), so `pwk-finalizing` finds it inside the topic folder. Keep the blank lines between the header fields: the blank lines are load-bearing, because CommonMark merges consecutive plain lines into one paragraph, so without them every preview renders the whole header as a single run-on line.
|
|
6
6
|
|
|
7
7
|
```markdown
|
|
8
8
|
# Progress: <topic>
|
|
9
9
|
|
|
10
10
|
Design: docs/plans/<date>-<topic>/<leaf>-design.md
|
|
11
|
+
|
|
11
12
|
Branch: <branch>
|
|
13
|
+
|
|
12
14
|
Setup: n/a
|
|
15
|
+
|
|
13
16
|
Started: <ISO timestamp>
|
|
17
|
+
|
|
14
18
|
Last updated: <ISO timestamp>
|
|
19
|
+
|
|
15
20
|
Feature phase: e2e-written
|
|
16
21
|
|
|
17
22
|
<!-- a trivial design doc (no `## Feature acceptance`) starts at `implementing (0/N)` instead — there is no E2E to write -->
|
|
@@ -266,7 +266,9 @@ def build(args):
|
|
|
266
266
|
('Diff', git(project, 'diff', '--no-ext-diff', '--no-textconv', '--no-color', span, *pathspec)),
|
|
267
267
|
]
|
|
268
268
|
label = 'feature review' if args.scope == 'feature' else f'requirement R{args.requirement} review'
|
|
269
|
-
|
|
269
|
+
# The blank line between Base and Head is load-bearing: CommonMark merges
|
|
270
|
+
# consecutive plain lines into one paragraph in every preview.
|
|
271
|
+
packet = f'# Review packet: {design_path.parent.name} — {label}\n\nBase: {base}\n\nHead: {head}\n\n'
|
|
270
272
|
for title, content in sections:
|
|
271
273
|
packet += f'## {title}\n\n{content}\n'
|
|
272
274
|
# All parsing and Git reads finish before a temporary file exists. A failure in
|
|
@@ -7,6 +7,8 @@ description: "Use after all requirements are complete to archive or delete consu
|
|
|
7
7
|
|
|
8
8
|
Ship the completed work.
|
|
9
9
|
|
|
10
|
+
Any command or tool recipe in this skill is an example, not the requirement — when your host grants a better tool for an operation (a sandboxed batch executor, a structured file API), use the better tool and treat the recipe as a fallback; the only exact exceptions are this kit's `scripts/` helpers and plain `git` invocations, whose deterministic output is the point.
|
|
11
|
+
|
|
10
12
|
## Pre-finalization checks
|
|
11
13
|
|
|
12
14
|
1. **Verify the repo root** — run `pwd` (or your shell's equivalent) and `git rev-parse --show-toplevel`; mismatch → report both paths and stop; never `cd` (a worktree root counts).
|
|
@@ -33,6 +35,8 @@ Ship the completed work.
|
|
|
33
35
|
|
|
34
36
|
- **Delete (default)** — code + tests are the source of truth; removing the scaffold prevents stale plan docs from misleading future sessions:
|
|
35
37
|
|
|
38
|
+
The invariant: the topic folder `docs/plans/<date>-<topic>/` is the disposal unit — delete it entirely, nothing more and nothing less; any single operation achieving exactly this is correct, and the bash below is one canonical example.
|
|
39
|
+
|
|
36
40
|
```bash
|
|
37
41
|
# the topic folder goes as one unit (every leaf, plus overview.md if it has one).
|
|
38
42
|
# The folder path is taken verbatim from discovery — never typed or
|
|
@@ -45,6 +49,8 @@ Ship the completed work.
|
|
|
45
49
|
|
|
46
50
|
- **Archive** — keep the planning history for future readers (e.g. a complex design worth preserving) by moving the artifacts into `docs/plans/completed/`:
|
|
47
51
|
|
|
52
|
+
The invariant: the topic folder `docs/plans/<date>-<topic>/` moves whole into `docs/plans/completed/` and the destination is verified before committing; any single operation achieving exactly this is correct, and the bash below is one canonical example.
|
|
53
|
+
|
|
48
54
|
```bash
|
|
49
55
|
mkdir -p docs/plans/completed
|
|
50
56
|
# the topic folder goes as one unit (every leaf, plus overview.md if it has one).
|
|
@@ -68,7 +74,7 @@ Ship the completed work.
|
|
|
68
74
|
3. **Squash & merge** — squash onto parent, push, delete branch.
|
|
69
75
|
4. **Merge commit** — `--no-ff` merge, push parent, delete branch.
|
|
70
76
|
|
|
71
|
-
For 2–4, confirm the detected parent branch before proceeding. When a worktree was used, the parent-side commands (merge onto parent, push parent, branch deletion) run from the main working tree — the topic worktree holds the feature-branch checkout, so the parent cannot be checked out there (`git -C ../<repo> …` drives the main side without moving the session; the root check's never
|
|
77
|
+
For 2–4, confirm the detected parent branch before proceeding. When a worktree was used, the parent-side commands (merge onto parent, push parent, branch deletion) run from the main working tree — the topic worktree holds the feature-branch checkout, so the parent cannot be checked out there (`git -C ../<repo> …` drives the main side without moving the session; the root check's never-cd rule still holds) — and step 7's worktree removal comes **first**: a branch checked out in a worktree cannot be deleted.
|
|
72
78
|
7. **Clean up** — if a worktree was used, verify presence first (`git worktree list`): when the topic's worktree exists, remove it (`git worktree remove ../<repo>-<topic>`, where `<topic>` is the folder slug — the same one `pwk-executing-tasks` created the branch under, never a leaf slug). The `../` path is written from the main working tree, and the removal runs from there — `git -C ../<repo> worktree remove ../<repo>-<topic>` when the session stands inside the worktree, which git refuses to remove under itself. When absent, cleanup is a silent no-op — never a failure.
|
|
73
79
|
|
|
74
80
|
## Principles
|
|
@@ -7,6 +7,8 @@ description: "Show all active pipeline topics and their phase/progress. Use when
|
|
|
7
7
|
|
|
8
8
|
Report on in-flight pipelines in this working tree (a worktree has its own `docs/plans/`, so run status in each). Read-only. This skill **does not unlock the guard** — it needs no writes, so it runs fine inside the design read-only phase. If you want source edits after a status check, invoke the skill for the next phase yourself (the guard follows the skill).
|
|
9
9
|
|
|
10
|
+
Any command or tool recipe in this skill is an example, not the requirement — when your host grants a better tool for an operation (a sandboxed batch executor, a structured file API), use the better tool and treat the recipe as a fallback; the only exact exceptions are this kit's `scripts/` helpers and plain `git` invocations, whose deterministic output is the point.
|
|
11
|
+
|
|
10
12
|
## Process
|
|
11
13
|
|
|
12
14
|
0. **Verify the root** — run `pwd` (or your shell's equivalent) and `git rev-parse --show-toplevel`; mismatch → report both paths and stop; never `cd` (a worktree root counts).
|
|
@@ -7,6 +7,8 @@ description: "Generate a detailed, file-referenced walkthrough of a shipped feat
|
|
|
7
7
|
|
|
8
8
|
Explain a shipped feature in code-level detail, for a human reading with the files open.
|
|
9
9
|
|
|
10
|
+
Any command or tool recipe in this skill is an example, not the requirement — when your host grants a better tool for an operation (a sandboxed batch executor, a structured file API), use the better tool and treat the recipe as a fallback; the only exact exceptions are this kit's `scripts/` helpers and plain `git` invocations, whose deterministic output is the point.
|
|
11
|
+
|
|
10
12
|
**Not a pipeline phase** — never auto-run, never blocks anything. The skill is generated on demand and invoking it exits any gated design phase (it writes outside `docs/plans/`).
|
|
11
13
|
|
|
12
14
|
Five sections, always: Summary / How it works / Key flows / Gotchas & invariants / Change map.
|