@nklisch/pi-agile-workflow 0.15.3 → 0.16.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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/CHANGELOG.md +8 -0
- package/docs/ARCHITECTURE.md +97 -57
- package/docs/SPEC.md +53 -2
- package/docs/VISION.md +24 -8
- package/package.json +1 -1
- package/scripts/tests/convert-content-integrity.test.sh +4 -4
- package/scripts/tests/convert-review-weight.test.sh +61 -0
- package/scripts/work-view.sh +1 -1
- package/skills/autopilot/SKILL.md +103 -71
- package/skills/convert/SKILL.md +28 -8
- package/skills/epic-design/SKILL.md +19 -70
- package/skills/feature-design/SKILL.md +18 -57
- package/skills/fix/SKILL.md +52 -34
- package/skills/implement/SKILL.md +61 -50
- package/skills/implement-orchestrator/SKILL.md +274 -587
- package/skills/perf-design/SKILL.md +11 -12
- package/skills/principles/SKILL.md +120 -378
- package/skills/principles/references/advisory-review.md +69 -0
- package/skills/principles/references/code-design.md +107 -0
- package/skills/principles/references/models.md +42 -63
- package/skills/prose-author/SKILL.md +9 -4
- package/skills/refactor-design/SKILL.md +3 -4
- package/skills/review/SKILL.md +132 -46
- package/work-view/crates/cli/.work-view-version +1 -1
- package/work-view/dist/aarch64-apple-darwin/work-view +0 -0
- package/work-view/dist/aarch64-unknown-linux-musl/work-view +0 -0
- package/work-view/dist/x86_64-apple-darwin/work-view +0 -0
- package/work-view/dist/x86_64-unknown-linux-musl/work-view +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Advisory Review Mechanics
|
|
2
|
+
|
|
3
|
+
The detailed companion to the risk-driven invariants in
|
|
4
|
+
`principles/SKILL.md` Part IV. Model classes, host-to-peer pairing, and concrete
|
|
5
|
+
peer mechanism flags remain in [models.md](models.md).
|
|
6
|
+
|
|
7
|
+
## Review weight and scope defaults
|
|
8
|
+
|
|
9
|
+
Start from the effective `review_weight` in Part IV (`standard` when unset), then
|
|
10
|
+
adapt to risk. `light` narrows independent breadth, `thorough` raises
|
|
11
|
+
fresh-context scrutiny, and `maximum` permits multi-class multi-pass depth;
|
|
12
|
+
`none` skips this independent-review table without skipping implementation
|
|
13
|
+
verification or acceptance evidence. These are ceilings and intent, never fixed
|
|
14
|
+
reviewer or pass counts.
|
|
15
|
+
|
|
16
|
+
Apply the scope defaults below in both direct and autopilot design modes.
|
|
17
|
+
Explicit caller and project review rules override them.
|
|
18
|
+
|
|
19
|
+
| Scope and risk | Default |
|
|
20
|
+
|---|---|
|
|
21
|
+
| Small, low-risk | Skip advisory review. |
|
|
22
|
+
| Small or medium with material uncertainty | Optionally run one focused different-class pass. |
|
|
23
|
+
| Large, risky, or architectural, without prior `--only-questions` / `## Design decisions` alignment | Run one focused different-class pass when available. |
|
|
24
|
+
| Deep or complex | Use two different model classes across the two phases when available. |
|
|
25
|
+
| Completed feature or epic in a deep review lane | Use a fresh-context lens review; prefer different-class, otherwise strongest same-harness fresh context. |
|
|
26
|
+
| Final autopilot completion | Run the required fresh-context completion path described in Part IV. |
|
|
27
|
+
|
|
28
|
+
Stories normally fast-advance on recorded green verification, but risk can
|
|
29
|
+
escalate them. Use a full iterative review loop for a completed substantial
|
|
30
|
+
artifact or explicit review request only when that depth is warranted.
|
|
31
|
+
|
|
32
|
+
## Two-phase mechanics
|
|
33
|
+
|
|
34
|
+
Always run completeness before attack:
|
|
35
|
+
|
|
36
|
+
1. **Completeness / complementary / advisory.** Ask what is missing, which
|
|
37
|
+
alternatives strengthen the artifact, and which questions or risks deserve
|
|
38
|
+
weight. An open design gets one pass before decisions lock. A complete
|
|
39
|
+
artifact can iterate until substantive findings stabilize; when a dedicated
|
|
40
|
+
iterative mechanism exists, converge to nits and cap the loop at roughly five
|
|
41
|
+
passes rather than chasing perfection.
|
|
42
|
+
2. **Adversarial.** After Phase 1, ask what is broken, contradictory, based on a
|
|
43
|
+
false assumption, or likely to fail in operation. Open designs get a focused
|
|
44
|
+
attack pass; completed artifacts may use the same bounded convergence shape.
|
|
45
|
+
Verify concrete claims before accepting them.
|
|
46
|
+
|
|
47
|
+
For deep or complex work, use a different model class for Phase 2 than Phase 1
|
|
48
|
+
when two classes are available. Their disagreement is evidence to investigate,
|
|
49
|
+
not a vote. For routine design, do not turn a focused advisory pass into a
|
|
50
|
+
multi-pass review loop.
|
|
51
|
+
|
|
52
|
+
## Recording the result
|
|
53
|
+
|
|
54
|
+
Summarize evidence and decisions in the item body; never paste transcripts:
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
## Other agent review
|
|
58
|
+
- Invoked because: <risk or uncertainty>
|
|
59
|
+
- Phase 1 — advisory/completeness: <reviewer class and useful gaps>
|
|
60
|
+
- Phase 2 — adversarial: <reviewer class and failure modes>
|
|
61
|
+
- Accepted: <adjustments with phase>
|
|
62
|
+
- Rejected: <points and reasons with phase>
|
|
63
|
+
- Skipped/degraded: <phase and reason, if any>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
If only one phase or class was warranted or reachable, record that fact. Limit
|
|
67
|
+
normal design to one advisory pass per item per design stage. The final
|
|
68
|
+
autopilot completion review is separate and follows the stricter completion
|
|
69
|
+
invariant in Part IV.
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Code-Design Mechanics
|
|
2
|
+
|
|
3
|
+
The detailed companion to the load-bearing code-design capsule in
|
|
4
|
+
`principles/SKILL.md` Part I. Load this when a design or implementation needs
|
|
5
|
+
concrete boundary guidance, checklists, or examples.
|
|
6
|
+
|
|
7
|
+
## Contents
|
|
8
|
+
|
|
9
|
+
1. [Ports & Adapters](#1-ports--adapters)
|
|
10
|
+
2. [Single Source of Truth](#2-single-source-of-truth)
|
|
11
|
+
3. [Generated Contracts](#3-generated-contracts)
|
|
12
|
+
4. [Fail Fast](#4-fail-fast)
|
|
13
|
+
|
|
14
|
+
## 1. Ports & Adapters
|
|
15
|
+
|
|
16
|
+
At design time, identify every database, filesystem, HTTP, queue, clock, and
|
|
17
|
+
randomness dependency. Define the interface the domain needs in the domain
|
|
18
|
+
layer; implement it in infrastructure; wire the adapter only at a composition
|
|
19
|
+
root. Domain functions receive ports as typed parameters and never import
|
|
20
|
+
adapters directly.
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
src/
|
|
24
|
+
domain/ports.ts # UserRepository, EmailSender
|
|
25
|
+
domain/user-service.ts # imports ports, not infrastructure
|
|
26
|
+
infrastructure/db.ts # implements UserRepository
|
|
27
|
+
app/wire.ts # assembles domain + adapters
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
// Domain
|
|
32
|
+
export function createUser(repo: UserRepository, email: string) {
|
|
33
|
+
return repo.insert({ email })
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Composition root
|
|
37
|
+
const repo = new DrizzleUserRepo(db)
|
|
38
|
+
app.post('/users', (c) => createUser(repo, c.req.body.email))
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Checklist:
|
|
42
|
+
- Every external dependency has a domain-owned interface.
|
|
43
|
+
- Domain modules do not import databases, filesystems, or transport adapters.
|
|
44
|
+
- Infrastructure is referenced only from composition roots.
|
|
45
|
+
|
|
46
|
+
## 2. Single Source of Truth
|
|
47
|
+
|
|
48
|
+
When a variant set can grow, define one typed registry and derive types,
|
|
49
|
+
validation, routing, and display from it. Do not repeat unions or literals in
|
|
50
|
+
consumers.
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
const ROLE_CONFIG = {
|
|
54
|
+
admin: { level: 2, canDelete: true },
|
|
55
|
+
editor: { level: 1, canDelete: false },
|
|
56
|
+
viewer: { level: 0, canDelete: false },
|
|
57
|
+
} as const satisfies Record<string, RoleConfig>
|
|
58
|
+
|
|
59
|
+
type Role = keyof typeof ROLE_CONFIG
|
|
60
|
+
const ROLES = Object.keys(ROLE_CONFIG) as Role[]
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Checklist:
|
|
64
|
+
- One authoritative constant or schema owns the variants.
|
|
65
|
+
- Downstream types and behavior derive from that registry.
|
|
66
|
+
- Adding a variant changes the registry, not a collection of switches and
|
|
67
|
+
validators.
|
|
68
|
+
|
|
69
|
+
## 3. Generated Contracts
|
|
70
|
+
|
|
71
|
+
Choose one source for each system boundary and derive consumers from it:
|
|
72
|
+
|
|
73
|
+
- HTTP API: OpenAPI schema to generated client.
|
|
74
|
+
- Typed router: share or infer the router contract.
|
|
75
|
+
- Database: infer application types from the schema.
|
|
76
|
+
- GraphQL: generate types from SDL.
|
|
77
|
+
|
|
78
|
+
Build generation into the normal pipeline. Consumers import generated or
|
|
79
|
+
inferred types rather than maintaining mirrors. Extend a generated type with
|
|
80
|
+
intersection/composition when needed; do not replace it with a hand copy.
|
|
81
|
+
|
|
82
|
+
Checklist:
|
|
83
|
+
- Every cross-boundary interface names its source of truth.
|
|
84
|
+
- Generation or inference is part of the build path.
|
|
85
|
+
- No hand-written type mirrors a schema, router, or database definition.
|
|
86
|
+
|
|
87
|
+
## 4. Fail Fast
|
|
88
|
+
|
|
89
|
+
Validate unknown input at system boundaries before domain logic runs. Assert
|
|
90
|
+
internal preconditions at function entry with specific guard errors and early
|
|
91
|
+
returns; do not propagate invalid state into deeper call chains.
|
|
92
|
+
|
|
93
|
+
```typescript
|
|
94
|
+
function processOrder(input: unknown) {
|
|
95
|
+
const order = OrderSchema.parse(input)
|
|
96
|
+
return computeTotal(order)
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function applyDiscount(order: Order, pct: number) {
|
|
100
|
+
if (pct < 0 || pct > 1) throw new Error(`Invalid discount: ${pct}`)
|
|
101
|
+
// ...
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Boundary examples include HTTP handlers, CLI arguments, external API responses,
|
|
106
|
+
and configuration files. Internal checks should report the violated
|
|
107
|
+
precondition and received value whenever that is safe.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Model Selection & Decision Matrix
|
|
2
2
|
|
|
3
3
|
> The concrete model-layer companion to the **model-agnostic** dispatch and
|
|
4
|
-
> cross-model policy in `principles/SKILL.md`
|
|
4
|
+
> cross-model policy in `principles/SKILL.md` Part IV and the
|
|
5
5
|
> "different model class" decision points across the plugin. In-skill prose is
|
|
6
6
|
> deliberately written in capability/role terms; **this file is where those
|
|
7
7
|
> capabilities map to actual models and `peeragent` flags.** Load it whenever a
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
> "use a different model class".
|
|
10
10
|
|
|
11
11
|
Model generations move fast — the *families and classes* below are the durable
|
|
12
|
-
abstraction; specific
|
|
13
|
-
GLM-5.2) are
|
|
12
|
+
abstraction; specific versions and names (for example Claude Fable, GPT-5.6
|
|
13
|
+
Luna/Terra/Sol, GPT-5.x-Codex, Gemini 3.5, and GLM-5.2) are current resolutions
|
|
14
|
+
of each class as of writing. Always resolve
|
|
14
15
|
the concrete model against current sources when the choice is load-bearing.
|
|
15
16
|
|
|
16
17
|
## Contents
|
|
@@ -51,11 +52,26 @@ the in-skill prose names; this is what they mean.
|
|
|
51
52
|
## 2. Model-family cards
|
|
52
53
|
|
|
53
54
|
**Claude (Anthropic)** — `--agent claude`
|
|
54
|
-
- Tiers
|
|
55
|
-
(strong coding + speed; 1M beta), `haiku` (fast, near-frontier, cheap).
|
|
55
|
+
- Tiers include `opus`, `sonnet`, `haiku`, and Claude Fable where available.
|
|
56
56
|
- Effort: `high | xhigh` (default `xhigh`).
|
|
57
|
-
-
|
|
58
|
-
|
|
57
|
+
- Recommendations: Opus for deep review/adversarial work, Sonnet for primary
|
|
58
|
+
work and scouting, Haiku for cheap leaf fan-out. Fable is a strong but
|
|
59
|
+
expensive design, orchestration, and review choice; it can implement, but its
|
|
60
|
+
cost usually makes another capable worker preferable.
|
|
61
|
+
|
|
62
|
+
**GPT-5.6 (OpenAI; host-native where available)**
|
|
63
|
+
- **Luna** is the recommended implementation workhorse: medium thinking for
|
|
64
|
+
simple/routine work, scaling through xhigh for fairly complicated work short
|
|
65
|
+
of the hardest tier.
|
|
66
|
+
- **Terra** remains a situational middle pick. Current practitioner preference
|
|
67
|
+
often favors Sol at low thinking as the bridge above Luna rather than treating
|
|
68
|
+
Terra as a mandatory rung.
|
|
69
|
+
- **Sol** is preferred for design, review, and complex/large implementation. Low
|
|
70
|
+
thinking bridges above Luna; raise thinking for the hardest architecture,
|
|
71
|
+
review, and coding work.
|
|
72
|
+
- These are recommendations, not fixed capability facts. Discover current host
|
|
73
|
+
availability before selection. Luna, Terra, Sol, and Codex share OpenAI
|
|
74
|
+
lineage, so switching among them is not cross-model evidence.
|
|
59
75
|
|
|
60
76
|
**Codex (OpenAI)** — `--agent codex`
|
|
61
77
|
- Current class: GPT-5.x-Codex (model auto-selected; no `--model` flag).
|
|
@@ -83,9 +99,9 @@ the in-skill prose names; this is what they mean.
|
|
|
83
99
|
|
|
84
100
|
| Role | Needs (capability) | Primary models |
|
|
85
101
|
|---|---|---|
|
|
86
|
-
| Primary worker | write fidelity, agentic stamina | Sonnet-class / Codex high / GLM-5.2 high |
|
|
87
|
-
| Scanner/scout (deep read-only fan-out) | domain inspection, evidence, scoped artifacts | Haiku /
|
|
88
|
-
| Deep reviewer | reasoning depth, fresh context |
|
|
102
|
+
| Primary worker | write fidelity, agentic stamina | GPT-5.6 Luna medium→xhigh / Sonnet-class / Codex high / GLM-5.2 high; Sol for complex/large implementation |
|
|
103
|
+
| Scanner/scout (deep read-only fan-out) | domain inspection, evidence, scoped artifacts | Haiku / Luna or Sonnet for volume; Sol/Opus/Codex xhigh/GLM xhigh for subtle gates |
|
|
104
|
+
| Deep reviewer | reasoning depth, fresh context | GPT-5.6 Sol / Claude Fable or Opus / Codex xhigh / GLM-5.2 xhigh |
|
|
89
105
|
| Advisory peer (Phase 1) | blind-spot diversity, augmentation | a **different class** than the host |
|
|
90
106
|
| Adversarial peer (Phase 2) | blind-spot diversity, attack posture | a **different class** than host + than Phase 1 |
|
|
91
107
|
|
|
@@ -98,67 +114,30 @@ diversity**, and for deep work use **two distinct peer classes** (§5).
|
|
|
98
114
|
|
|
99
115
|
| Host class | Valid peer classes (any different class) |
|
|
100
116
|
|---|---|
|
|
101
|
-
| Claude |
|
|
102
|
-
| Codex | claude
|
|
103
|
-
| Gemini | claude
|
|
104
|
-
| Z.AI GLM | claude
|
|
117
|
+
| Claude (including Fable) | openai · gemini · zai |
|
|
118
|
+
| OpenAI (GPT-5.6 or Codex) | claude · gemini · zai |
|
|
119
|
+
| Gemini | claude · openai · zai |
|
|
120
|
+
| Z.AI GLM | claude · openai · gemini |
|
|
105
121
|
|
|
106
122
|
When the natural pair is unavailable, fall through to the next class; never
|
|
107
|
-
peer
|
|
123
|
+
peer within the host lineage and call it cross-model. A same-lineage reviewer
|
|
124
|
+
may still provide fresh context when labeled accurately.
|
|
108
125
|
|
|
109
126
|
## 5. Multi-class review for deep/complex work
|
|
110
127
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
themselves signal (re-read both before deciding).
|
|
117
|
-
|
|
118
|
-
Concretely: pair the two peers across the two review phases in §6 — one class
|
|
119
|
-
runs the **advisory** pass, a *different* class runs the **adversarial** pass.
|
|
120
|
-
That realizes the 2-class rule through the phase ordering and maximizes both
|
|
121
|
-
augmentation diversity and adversarial independence. For routine/small work a
|
|
122
|
-
single peer (or none) remains correct — this escalation is for deep/complex
|
|
123
|
-
scope only.
|
|
128
|
+
The risk and `review_weight` policy lives in
|
|
129
|
+
[advisory-review.md](advisory-review.md). At model-selection time, when that
|
|
130
|
+
policy calls for two classes, choose two distinct training lineages that also
|
|
131
|
+
differ from the host where availability permits. Pair one with each phase;
|
|
132
|
+
disagreement is evidence to investigate, not a vote.
|
|
124
133
|
|
|
125
134
|
## 6. Two-phase design review: advisory then adversarial
|
|
126
135
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
artifact is a design (open) or a review (complete)**:
|
|
133
|
-
|
|
134
|
-
**Phase 1 — Completeness / Complementary / Advisory.** Augmentation, not
|
|
135
|
-
judgment. Ask what is missing, what alternatives strengthen it, and what
|
|
136
|
-
questions/risks should be weighed.
|
|
137
|
-
- *Design (open artifact, before decisions lock)*: **a single pass.** You don't
|
|
138
|
-
iterate an open design to convergence. The host chooses and records rationale.
|
|
139
|
-
This is the default autopilot design-time peer ask.
|
|
140
|
-
- *Review (complete artifact — feature/epic/out-of-band review)*: **a multi-step
|
|
141
|
-
convergence loop**, not a single ask — the artifact is complete, so iterate
|
|
142
|
-
until findings stabilize. The ideal is the full `peer-review` convergence loop
|
|
143
|
-
(≥3 review→refine passes, continue while substantive issues surface, stop on
|
|
144
|
-
nits, cap ~5); run that loop in the advisory/complementary posture when
|
|
145
|
-
`peer-review` is available. When only a single peer pass is available, run as
|
|
146
|
-
many rounds as the mechanism allows and say it did not reach full convergence.
|
|
147
|
-
|
|
148
|
-
**Phase 2 — Adversarial (after Phase 1 converges or, for designs, completes).**
|
|
149
|
-
Attack posture. Ask a **different** reviewer (ideally a different class than
|
|
150
|
-
Phase 1, per the 2-class rule in §5) what is broken, contradictory, built on a
|
|
151
|
-
false assumption, or will fail in operation. For reviews this is the same
|
|
152
|
-
`peer-review`-style convergence loop applied in the attack posture; for designs
|
|
153
|
-
it is a focused adversarial pass. Verify concrete claims against code/foundation
|
|
154
|
-
docs before accepting or rejecting.
|
|
155
|
-
|
|
156
|
-
Record both phases in the item body under `## Other agent review`, labeling each
|
|
157
|
-
finding's phase, the reviewer class, and (for reviews) how far the convergence
|
|
158
|
-
loop ran (converged on nits / hit cap / single pass only). Peer failures in
|
|
159
|
-
either phase are non-blocking (fall back to a fresh same-class sub-agent); the
|
|
160
|
-
final autopilot completion review must still clear through at least one
|
|
161
|
-
cross-class pass.
|
|
136
|
+
The phase order, artifact-specific loop shapes, ceilings, and recording format
|
|
137
|
+
live in [advisory-review.md](advisory-review.md). This model-layer reference adds
|
|
138
|
+
one constraint: when two classes are selected, Phase 2 should differ from both
|
|
139
|
+
the host and Phase 1 where the available class set permits it. Never label an
|
|
140
|
+
unknown or same-class reviewer cross-model.
|
|
162
141
|
|
|
163
142
|
## 7. peeragent invocation cheatsheet
|
|
164
143
|
|
|
@@ -160,10 +160,15 @@ fan-out. Do not route prose features to `/agile-workflow:implement-orchestrator`
|
|
|
160
160
|
(agent-spawning + worktrees) just because they exceed a line count; the
|
|
161
161
|
orchestrator's value is parallel coordination, which prose work does not need.
|
|
162
162
|
|
|
163
|
-
For a large deliverable,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
163
|
+
For a large deliverable, inline `implement` is the **write** stride and the
|
|
164
|
+
review lane is a genuine **revise/coherence** pass — never a rubber stamp. For a
|
|
165
|
+
small deliverable, the same review may be light, but it still evaluates the work.
|
|
166
|
+
In both cases, `/agile-workflow:implement` continues through that review lane to
|
|
167
|
+
`done` by default in one invocation, forwarding the effective review weight, or
|
|
168
|
+
returns with a documented bounce or blocker. Even when policy skips independent
|
|
169
|
+
review, closure still requires green verification and acceptance evidence. The
|
|
170
|
+
lane stops at `review` only when the caller explicitly requests `stop-at-review`
|
|
171
|
+
(or the project convention sets that boundary).
|
|
167
172
|
|
|
168
173
|
## Output
|
|
169
174
|
|
|
@@ -143,14 +143,13 @@ drafting features. Iterate over the target set:
|
|
|
143
143
|
3. Read-first map of the feature's area; use one exploratory sub-agent only if the
|
|
144
144
|
area is still unclear. Include `.agents/skills/refactor-conventions/` as
|
|
145
145
|
context when present.
|
|
146
|
-
4.
|
|
147
|
-
|
|
148
|
-
strategy when atomic?"). Use structured question tool.
|
|
146
|
+
4. Use the structured question tool for refactor-specific strategic ambiguities
|
|
147
|
+
such as API compatibility, migration shape, or rollback strategy.
|
|
149
148
|
5. Capture answers under `## Design decisions` in the feature body
|
|
150
149
|
6. Do NOT design or advance stage — let the design family pick up later
|
|
151
150
|
7. Commit per feature: `refactor-design --only-questions: <id>`
|
|
152
151
|
|
|
153
|
-
Requires interactive mode; refuse
|
|
152
|
+
Requires interactive mode; refuse under autopilot. Otherwise defer question and advisory policy to `principles/SKILL.md` Parts III–IV.
|
|
154
153
|
|
|
155
154
|
## Workflow — per-feature mode
|
|
156
155
|
|
package/skills/review/SKILL.md
CHANGED
|
@@ -44,45 +44,82 @@ Load only the reference needed for the selected lane:
|
|
|
44
44
|
| `review --all` | Drain every item at `stage: review`. |
|
|
45
45
|
| `review <NL filter>` | Drain a filtered subset of the review queue. Interpret the filter against item bodies, tags, and parent chains. |
|
|
46
46
|
| `review <branch/commit/range/PR/wip>` | Out-of-band review. Review the target diff and print a verdict. |
|
|
47
|
-
| `
|
|
47
|
+
| `review --review-weight <level> <target>` | Set independent-review effort: `none`, `light`, `standard`, `thorough`, or `maximum`. An explicit selector wins over caller notes and project configuration. |
|
|
48
|
+
| `deep review <target>` / `review --deep <target>` | Request deep risk coverage; reviewer topology still respects the effective review weight. |
|
|
48
49
|
|
|
49
50
|
In batch modes (`--all` / NL filter), loop through the matched set and output a
|
|
50
51
|
single consolidated summary at the end: verdicts per item plus total finding
|
|
51
52
|
counts.
|
|
52
53
|
|
|
53
|
-
## Review Lanes
|
|
54
|
+
## Review Weight And Lanes
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
Resolve one effective `review_weight` before choosing a lane. The valid scale is
|
|
57
|
+
`none | light | standard | thorough | maximum`; reject unknown values at the
|
|
58
|
+
boundary. Precedence is:
|
|
57
59
|
|
|
58
|
-
|
|
60
|
+
1. explicit `--review-weight <level>` or an unambiguous natural-language caller selector
|
|
61
|
+
2. an autopilot/production-skill caller note carrying the effective level
|
|
62
|
+
3. `review_weight` in `.work/CONVENTIONS.md`
|
|
63
|
+
4. `standard`
|
|
64
|
+
|
|
65
|
+
The weight is an effort budget, not a verdict and not a fixed orchestration
|
|
66
|
+
recipe. Risk, evidence, and item tier determine how to spend it; current models
|
|
67
|
+
choose the exact topology within the stated ceiling/intent. Record the effective
|
|
68
|
+
weight, its source, selected lane, and decisive risk/evidence signals in Review
|
|
69
|
+
Notes.
|
|
70
|
+
|
|
71
|
+
| Weight | High-level review intent |
|
|
72
|
+
|---|---|
|
|
73
|
+
| `none` | No independent reviewer. Perform an administrative review of the target's own green verification and acceptance evidence; close only when both are sufficient. |
|
|
74
|
+
| `light` | Stories remain verification-only. Larger items receive at most one focused fresh-context pass. |
|
|
75
|
+
| `standard` | Balanced risk-based default: fast low-risk stories, focused Standard work out of band, and fresh-context Deep review for features, epics, and escalated stories. |
|
|
76
|
+
| `thorough` | Increase independent coverage with additional fresh-context passes or reviewers where the risk surface benefits; keep complementary before adversarial. |
|
|
77
|
+
| `maximum` | For features/epics, use multi-model, multi-pass complementary → adversarial review when those capabilities exist. Dynamically escalate stories according to risk rather than reviewing every story identically. |
|
|
78
|
+
|
|
79
|
+
Lane selection is `weight + risk + evidence + kind-as-heuristic`. Resolve mode
|
|
80
|
+
first, gather enough context to identify risk, then choose:
|
|
81
|
+
|
|
82
|
+
| Starting point | Default lane | Evidence or risk adjustment |
|
|
59
83
|
|---|---|---|
|
|
60
|
-
| **story item** | **Fast** |
|
|
61
|
-
| **out-of-band target** | **Standard** |
|
|
62
|
-
| **feature / epic item** | **Deep** |
|
|
63
|
-
| **explicit `--deep` target** | **Deep** |
|
|
84
|
+
| **story item** | **Fast** | Keep Fast only with recorded green verification and no escalation signal. Escalate to Deep for a caller-interface change, security or correctness surface, cross-cutting scope, a touched foundation-doc claim, or explicit `--deep`. |
|
|
85
|
+
| **out-of-band target** | **Standard** | Use Deep only when explicitly requested; otherwise calibrate the Standard lens walk to the observed risk. |
|
|
86
|
+
| **feature / epic item** | **Deep** | Kind signals aggregate contract risk; green child evidence informs the review but does not replace the parent's own review. |
|
|
87
|
+
| **explicit `--deep` target** | **Deep** | Request the strongest depth the effective weight permits; depth overrides the kind heuristic, not an explicit weight ceiling. |
|
|
88
|
+
|
|
89
|
+
Risk is not inferred from size alone. A tiny authentication or public-contract
|
|
90
|
+
change can require Deep; a broad mechanical change can remain Standard when its
|
|
91
|
+
evidence and contracts make that safe. `none` is the explicit exception to
|
|
92
|
+
independent fresh-context review: it still performs the item's own acceptance
|
|
93
|
+
check and records a verdict, so it never turns child completion into automatic
|
|
94
|
+
parent approval.
|
|
64
95
|
|
|
65
96
|
### Fast Lane
|
|
66
97
|
|
|
67
|
-
|
|
98
|
+
A genuinely low-risk story uses the fast lane; `none` also uses this
|
|
99
|
+
administrative shape for every tier:
|
|
68
100
|
|
|
69
|
-
1. Read the
|
|
101
|
+
1. Read the item body, recorded implementation scope, and acceptance criteria.
|
|
70
102
|
2. Confirm an implementation/verification record exists and reports green build
|
|
71
|
-
and tests.
|
|
72
|
-
3.
|
|
103
|
+
and tests (or an explicit reason the change needs no executable checks).
|
|
104
|
+
3. Confirm the recorded evidence addresses the item's acceptance criteria.
|
|
105
|
+
4. Check explicitly for the escalation signals above. At `standard` or higher,
|
|
106
|
+
switch a risky story to Deep before issuing a verdict. At `none` or `light`,
|
|
107
|
+
stay within the selected effort ceiling and record the unexamined risk.
|
|
108
|
+
5. If verification and acceptance evidence are green, load
|
|
73
109
|
[substrate-side-effects.md](references/substrate-side-effects.md) and advance
|
|
74
|
-
`review -> done` with a one-line record
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
110
|
+
`review -> done` with a one-line record naming the weight and evidence.
|
|
111
|
+
6. If evidence is absent or failing, run only cheap verification that fits the
|
|
112
|
+
selected weight or bounce `review -> implementing` with a
|
|
113
|
+
`## Review findings` note.
|
|
78
114
|
|
|
79
|
-
Skip the lens walk
|
|
80
|
-
|
|
115
|
+
Skip the lens walk only when evidence and the effective weight permit it. Kind
|
|
116
|
+
alone never grants an advance, and `none` never means "done because children
|
|
117
|
+
are done."
|
|
81
118
|
|
|
82
119
|
### Standard Lane
|
|
83
120
|
|
|
84
|
-
Standalone reviews use the standard lane
|
|
85
|
-
[target-resolution.md](references/target-resolution.md) and
|
|
121
|
+
Standalone reviews use the standard lane unless the caller explicitly requests
|
|
122
|
+
Deep. Load [target-resolution.md](references/target-resolution.md) and
|
|
86
123
|
[review-lenses.md](references/review-lenses.md), read enough surrounding code to
|
|
87
124
|
understand the change, then print the structured review. Do not create `.work`
|
|
88
125
|
items, advance stages, archive files, or commit metadata unless the user
|
|
@@ -90,37 +127,48 @@ explicitly converts the findings into substrate work.
|
|
|
90
127
|
|
|
91
128
|
### Deep Lane
|
|
92
129
|
|
|
93
|
-
Feature, epic, and explicit deep reviews use the deep lane
|
|
130
|
+
Feature, epic, escalated-story, and explicit deep reviews use the deep lane when
|
|
131
|
+
the effective weight permits independent review. Load
|
|
94
132
|
[deep-review.md](references/deep-review.md) plus any target or lens reference it
|
|
95
|
-
points to.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
133
|
+
points to. The evaluation must run in fresh context: use a different-class peer
|
|
134
|
+
when reachable; otherwise use the strongest same-harness fresh-context
|
|
135
|
+
sub-agent prompted with the reviewer posture. If the selected weight calls for
|
|
136
|
+
fresh review and neither is available, record the limitation and block rather
|
|
137
|
+
than approving from the host context. Deep reviews never become inline
|
|
138
|
+
self-review; this requirement overrides any older inline-fallback wording in a
|
|
139
|
+
lane reference.
|
|
140
|
+
|
|
141
|
+
Calibrate depth from the weight table instead of treating Deep as one fixed
|
|
142
|
+
recipe. `light` caps a larger item's review at one fresh pass; `standard`
|
|
143
|
+
balances coverage against observed risk; `thorough` adds complementary and
|
|
144
|
+
adversarial coverage where useful; `maximum` seeks multi-model, multi-pass
|
|
145
|
+
complementary → adversarial convergence for features/epics and dynamically
|
|
146
|
+
escalates risky stories. These are ceilings and intent, not mandatory agent
|
|
147
|
+
counts. Preserve complementary-before-adversarial order whenever both run (see
|
|
148
|
+
[../principles/references/models.md](../principles/references/models.md) §6).
|
|
105
149
|
|
|
106
150
|
## Workflow
|
|
107
151
|
|
|
108
|
-
### Phase 0: Resolve Mode And Depth
|
|
152
|
+
### Phase 0: Resolve Mode, Weight, And Depth
|
|
109
153
|
|
|
110
154
|
Default to substrate mode when the target looks like a work item id, when any
|
|
111
155
|
item is at `stage: review`, or when autopilot delegated the review. Use
|
|
112
156
|
standalone mode when the user names a branch, commit, commit range, PR number,
|
|
113
157
|
`wip`, working tree, or otherwise asks for an out-of-band code review.
|
|
114
158
|
|
|
159
|
+
Resolve and validate effective `review_weight` using the precedence above before
|
|
160
|
+
any mutation. Explicit caller selection always wins.
|
|
161
|
+
|
|
115
162
|
If both interpretations are plausible, prefer substrate mode but ask the user
|
|
116
163
|
before mutating `.work`. If the caller is autopilot or a harness goal, do not
|
|
117
164
|
ask: choose substrate mode and the next review item.
|
|
118
165
|
|
|
119
|
-
Depth:
|
|
120
|
-
- **Fast**: story
|
|
121
|
-
|
|
122
|
-
- **
|
|
123
|
-
|
|
166
|
+
Depth after applying the weight ceiling:
|
|
167
|
+
- **Fast/administrative**: low-risk story with green evidence, any story at
|
|
168
|
+
`light`, or any tier at `none`.
|
|
169
|
+
- **Standard**: out-of-band target unless explicitly deep.
|
|
170
|
+
- **Deep**: feature/epic item, risk-escalated story, explicit `--deep`, or a
|
|
171
|
+
robustness request when the weight permits fresh-context evaluation.
|
|
124
172
|
|
|
125
173
|
### Phase 1: Identify The Target
|
|
126
174
|
|
|
@@ -139,8 +187,10 @@ Standalone mode:
|
|
|
139
187
|
|
|
140
188
|
Substrate mode:
|
|
141
189
|
- Read the item file.
|
|
142
|
-
- Internalize the brief, design, implementation notes,
|
|
143
|
-
|
|
190
|
+
- Internalize the brief, design, implementation notes, acceptance criteria, and
|
|
191
|
+
verification evidence.
|
|
192
|
+
- For a feature or epic, read direct child bodies and their review evidence;
|
|
193
|
+
children inform but never replace the parent's own review.
|
|
144
194
|
|
|
145
195
|
Standalone mode:
|
|
146
196
|
- Read the user's stated target.
|
|
@@ -156,8 +206,11 @@ All modes:
|
|
|
156
206
|
|
|
157
207
|
### Phase 3: Determine The Change Scope
|
|
158
208
|
|
|
159
|
-
|
|
160
|
-
|
|
209
|
+
For Standard and Deep lanes, load
|
|
210
|
+
[target-resolution.md](references/target-resolution.md). Use it to gather the
|
|
211
|
+
diff, PR metadata, commit messages, or epic aggregate scope. Fast uses the
|
|
212
|
+
recorded implementation scope and verification instead of re-analyzing the
|
|
213
|
+
diff.
|
|
161
214
|
|
|
162
215
|
If the non-epic diff is empty:
|
|
163
216
|
- Autopilot substrate mode: advance only if the item has complete green
|
|
@@ -176,8 +229,9 @@ Standard lane:
|
|
|
176
229
|
|
|
177
230
|
Deep lane:
|
|
178
231
|
- Load [deep-review.md](references/deep-review.md).
|
|
179
|
-
-
|
|
180
|
-
|
|
232
|
+
- Run the evaluation in fresh context at the effective weight; do not approve
|
|
233
|
+
inline when the selected weight requires a fresh reviewer and none is available.
|
|
234
|
+
- Apply the core lenses plus the applicable deep dimensions.
|
|
181
235
|
|
|
182
236
|
### Phase 5: Classify Findings
|
|
183
237
|
|
|
@@ -207,8 +261,35 @@ Substrate mode:
|
|
|
207
261
|
- Load [substrate-side-effects.md](references/substrate-side-effects.md).
|
|
208
262
|
- File above-nit findings into the substrate.
|
|
209
263
|
- Advance the item if there are no blockers, or bounce it if blockers exist.
|
|
210
|
-
- Append the review record.
|
|
211
|
-
-
|
|
264
|
+
- Append the review record and commit the reviewed item's transition.
|
|
265
|
+
- After an approval reaches `done`, run Conservative Parent Roll-Up below.
|
|
266
|
+
|
|
267
|
+
### Conservative Parent Roll-Up
|
|
268
|
+
|
|
269
|
+
A child's approval is evidence that an ancestor may be ready for review; it is
|
|
270
|
+
never approval of the ancestor itself. After advancing any item to `done`:
|
|
271
|
+
|
|
272
|
+
1. Find its immediate parent. If there is none, stop.
|
|
273
|
+
2. Count all direct children across active and terminal tiers. If any child is
|
|
274
|
+
non-terminal, stop the entire roll-up at this ancestor.
|
|
275
|
+
3. If the parent is `implementing`, advance it to `review`, append a `Children
|
|
276
|
+
complete` note, and commit that transition. If it is already `review`, leave
|
|
277
|
+
the stage unchanged. Never change an implementing/review parent directly to
|
|
278
|
+
`done` just because its children are done.
|
|
279
|
+
4. Run this skill on the parent using the normal weight/risk/evidence lane
|
|
280
|
+
selection. Features and epics therefore receive their own Deep review when
|
|
281
|
+
independent review is enabled, or their own administrative acceptance review
|
|
282
|
+
at `none`.
|
|
283
|
+
5. Only an Approve or Approve-with-comments verdict may advance the parent to
|
|
284
|
+
`done`; commit that review transition. A bounce or block stops roll-up.
|
|
285
|
+
6. Once the parent is approved and `done`, repeat from step 1 for its parent.
|
|
286
|
+
|
|
287
|
+
This recursion can complete story → feature → epic in one review invocation,
|
|
288
|
+
but every ancestor crosses its own real `review` stage and receives its own
|
|
289
|
+
selected review lane at the same effective weight. Preserve active parent bodies
|
|
290
|
+
while walking the chain; terminal retention/archive handling applies only where
|
|
291
|
+
the substrate-side-effects contract says the item is no longer needed for an
|
|
292
|
+
active parent.
|
|
212
293
|
|
|
213
294
|
## Output
|
|
214
295
|
|
|
@@ -240,6 +321,8 @@ Approve | Approve with comments | Request changes | Block
|
|
|
240
321
|
|
|
241
322
|
If no findings above nit level in substrate mode: "This change looks good.
|
|
242
323
|
Nothing blocking or significant to flag. Item advanced to `stage: done`."
|
|
324
|
+
Also report each ancestor moved to `review`, approved to `done`, bounced, or
|
|
325
|
+
left waiting on a non-terminal child.
|
|
243
326
|
|
|
244
327
|
If no findings above nit level in standalone mode: "This change looks good.
|
|
245
328
|
Nothing blocking or significant to flag."
|
|
@@ -265,3 +348,6 @@ Nothing blocking or significant to flag."
|
|
|
265
348
|
rule.
|
|
266
349
|
- Do not advance an item past review unless the verdict is Approve or Approve
|
|
267
350
|
with comments. Pushing through blockers defeats the point of the stage.
|
|
351
|
+
- Child completion never substitutes for a parent's review. Roll-up may move an
|
|
352
|
+
implementing parent to `review`, but only that parent's selected lane may move
|
|
353
|
+
it to `done`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.
|
|
1
|
+
0.16.1
|
|
Binary file
|
|
Binary file
|