@nklisch/pi-agile-workflow 0.16.1 → 0.16.4
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/docs/ARCHITECTURE.md +42 -21
- package/docs/PRINCIPLES.md +108 -38
- package/docs/SPEC.md +19 -2
- package/docs/VISION.md +17 -10
- package/hooks/scripts/prompt-context.py +8 -1
- package/hooks/scripts/test_prompt_context.py +16 -0
- package/package.json +1 -1
- package/scripts/work-view.sh +1 -1
- package/skills/autopilot/SKILL.md +54 -37
- package/skills/convert/SKILL.md +30 -4
- package/skills/epic-design/SKILL.md +21 -3
- package/skills/feature-design/SKILL.md +34 -11
- package/skills/gate-cruft/SKILL.md +69 -24
- package/skills/gate-docs/SKILL.md +56 -30
- package/skills/gate-patterns/SKILL.md +7 -3
- package/skills/gate-refactor/SKILL.md +18 -6
- package/skills/gate-security/SKILL.md +16 -7
- package/skills/gate-tests/SKILL.md +86 -71
- package/skills/implement/SKILL.md +18 -8
- package/skills/principles/SKILL.md +76 -21
- package/skills/principles/references/advisory-review.md +8 -1
- package/skills/principles/references/code-design.md +62 -5
- package/skills/principles/references/models.md +69 -57
- package/skills/refactor-design/SKILL.md +23 -13
- package/skills/review/SKILL.md +39 -19
- package/skills/review/references/review-lenses.md +14 -4
- package/skills/review/references/substrate-side-effects.md +17 -10
- package/skills/review/references/target-resolution.md +2 -1
- package/skills/scope/SKILL.md +20 -7
- 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
|
@@ -9,7 +9,10 @@ concrete boundary guidance, checklists, or examples.
|
|
|
9
9
|
1. [Ports & Adapters](#1-ports--adapters)
|
|
10
10
|
2. [Single Source of Truth](#2-single-source-of-truth)
|
|
11
11
|
3. [Generated Contracts](#3-generated-contracts)
|
|
12
|
-
4. [Fail Fast](#4-fail-
|
|
12
|
+
4. [Fail Fast—Where It Matters](#4-fail-fastwhere-it-matters)
|
|
13
|
+
5. [Code Economy](#5-code-economy)
|
|
14
|
+
6. [Tests Earn Their Keep](#6-tests-earn-their-keep)
|
|
15
|
+
7. [Leave It Simpler](#7-leave-it-simpler)
|
|
13
16
|
|
|
14
17
|
## 1. Ports & Adapters
|
|
15
18
|
|
|
@@ -84,11 +87,13 @@ Checklist:
|
|
|
84
87
|
- Generation or inference is part of the build path.
|
|
85
88
|
- No hand-written type mirrors a schema, router, or database definition.
|
|
86
89
|
|
|
87
|
-
## 4. Fail Fast
|
|
90
|
+
## 4. Fail Fast—Where It Matters
|
|
88
91
|
|
|
89
|
-
Validate
|
|
90
|
-
|
|
91
|
-
|
|
92
|
+
Validate untrusted input and required external contracts at system boundaries
|
|
93
|
+
before domain logic runs. Add internal guards when a violated precondition is
|
|
94
|
+
plausible and consequential; do not turn every helper into a defensive boundary.
|
|
95
|
+
The project decides how much invariant enforcement, edge handling, and
|
|
96
|
+
determinism it actually needs.
|
|
92
97
|
|
|
93
98
|
```typescript
|
|
94
99
|
function processOrder(input: unknown) {
|
|
@@ -105,3 +110,55 @@ function applyDiscount(order: Order, pct: number) {
|
|
|
105
110
|
Boundary examples include HTTP handlers, CLI arguments, external API responses,
|
|
106
111
|
and configuration files. Internal checks should report the violated
|
|
107
112
|
precondition and received value whenever that is safe.
|
|
113
|
+
|
|
114
|
+
Checklist:
|
|
115
|
+
- Validate real trust boundaries and explicit contracts.
|
|
116
|
+
- Match defensive rigor to failure consequences and project scope.
|
|
117
|
+
- Do not add checks, retries, invariants, or determinism only because a more
|
|
118
|
+
general system might need them.
|
|
119
|
+
|
|
120
|
+
## 5. Code Economy
|
|
121
|
+
|
|
122
|
+
Prefer the shortest clear expression of the project's actual requirements.
|
|
123
|
+
Every abstraction, option, layer, fallback, and branch creates maintenance cost;
|
|
124
|
+
it must earn that cost in current scope rather than a hypothetical future.
|
|
125
|
+
Terse does not mean cryptic: optimize for fewer concepts, then fewer lines.
|
|
126
|
+
|
|
127
|
+
Checklist:
|
|
128
|
+
- Choose the direct solution before a configurable framework.
|
|
129
|
+
- Avoid extension points without a current second use or committed need.
|
|
130
|
+
- Delete incidental machinery made obsolete by the change.
|
|
131
|
+
|
|
132
|
+
## 6. Tests Earn Their Keep
|
|
133
|
+
|
|
134
|
+
Automated tests are maintained code. Prioritize stable public interfaces,
|
|
135
|
+
important cross-component seams, high-consequence behavior, and regression tests
|
|
136
|
+
for real bugs. Unit tests belong around genuinely complex logic where isolated
|
|
137
|
+
examples add confidence; simple wrappers and implementation details usually do
|
|
138
|
+
not need their own tests.
|
|
139
|
+
|
|
140
|
+
Checklist:
|
|
141
|
+
- Name the interface, risk, or regression each test protects.
|
|
142
|
+
- Prefer a useful interface test over several implementation-bound unit tests.
|
|
143
|
+
- Do not chase line coverage or enumerate every possible surface by default.
|
|
144
|
+
- Remove duplicate, tautological, brittle, or low-value tests when they no
|
|
145
|
+
longer justify upkeep.
|
|
146
|
+
|
|
147
|
+
## 7. Leave It Simpler
|
|
148
|
+
|
|
149
|
+
Treat elimination as part of feature work, not a separate activity reserved for
|
|
150
|
+
refactors. During exploration and design, identify code, tests, checks,
|
|
151
|
+
abstractions, compatibility paths, and configuration that the proposed feature
|
|
152
|
+
can make unnecessary. During implementation, perform safe cohesive cleanup in
|
|
153
|
+
the touched area and create explicit cleanup/refactor stories for larger work.
|
|
154
|
+
|
|
155
|
+
Question whole systems as well as local fragments. Removing behavior,
|
|
156
|
+
guarantees, validation, determinism, compatibility, or safety is a product
|
|
157
|
+
choice: explain the trade-off and ask the user rather than silently weakening
|
|
158
|
+
it.
|
|
159
|
+
|
|
160
|
+
Checklist:
|
|
161
|
+
- Record what the feature can delete or consolidate.
|
|
162
|
+
- Prefer deletion and inlining before extraction or another abstraction.
|
|
163
|
+
- Leave touched code simpler unless doing so would blur scope or alter behavior.
|
|
164
|
+
- Park broader opportunities; ask before reducing meaningful guarantees.
|
|
@@ -9,8 +9,8 @@
|
|
|
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 versions and names (for example Claude Fable, GPT-5.6
|
|
13
|
-
Luna/Terra/Sol,
|
|
12
|
+
abstraction; specific versions and names (for example Claude Fable 5, GPT-5.6
|
|
13
|
+
Luna/Terra/Sol, Gemini 3.5, and GLM-5.2) are current resolutions
|
|
14
14
|
of each class as of writing. Always resolve
|
|
15
15
|
the concrete model against current sources when the choice is load-bearing.
|
|
16
16
|
|
|
@@ -19,11 +19,12 @@ the concrete model against current sources when the choice is load-bearing.
|
|
|
19
19
|
1. [Capability axes (the decision vocabulary)](#1-capability-axes-the-decision-vocabulary)
|
|
20
20
|
2. [Model-family cards](#2-model-family-cards)
|
|
21
21
|
3. [Role → capability → model](#3-role--capability--model)
|
|
22
|
-
4. [
|
|
23
|
-
5. [
|
|
24
|
-
6. [
|
|
25
|
-
7. [
|
|
26
|
-
8. [
|
|
22
|
+
4. [Conditional prompt tuning](#4-conditional-prompt-tuning)
|
|
23
|
+
5. [Host → cross-class peer pairing](#5-host--cross-class-peer-pairing)
|
|
24
|
+
6. [Multi-class review for deep/complex work](#6-multi-class-review-for-deepcomplex-work)
|
|
25
|
+
7. [Two-phase design review: advisory then adversarial](#7-two-phase-design-review-advisory-then-adversarial)
|
|
26
|
+
8. [peeragent invocation cheatsheet](#8-peeragent-invocation-cheatsheet)
|
|
27
|
+
9. [Fallbacks when no peer is reachable](#9-fallbacks-when-no-peer-is-reachable)
|
|
27
28
|
|
|
28
29
|
---
|
|
29
30
|
|
|
@@ -36,49 +37,47 @@ the in-skill prose names; this is what they mean.
|
|
|
36
37
|
entire value of a cross-model peer is independent blind spots, *not* a more
|
|
37
38
|
authoritative answer. Two models that share training add little over one.
|
|
38
39
|
- **Reasoning depth** — multi-step deduction, proof-like correctness, holding a
|
|
39
|
-
large logical structure. Raised by high/xhigh effort tiers;
|
|
40
|
-
Opus
|
|
40
|
+
large logical structure. Raised by high/xhigh effort tiers; high-capability
|
|
41
|
+
choices include Fable 5, Opus 4.8, GPT-5.6 Sol, and GLM-5.2.
|
|
41
42
|
- **Long-horizon agentic stamina** — sustained self-correcting multi-step tool
|
|
42
|
-
use over many turns / long autonomous runs.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
use over many turns / long autonomous runs. Fable 5, Opus 4.8, GPT-5.6 Sol,
|
|
44
|
+
and GLM-5.2 are credible choices, but none makes weak approval or verification
|
|
45
|
+
boundaries safe.
|
|
46
|
+
- **Context window** — how much the model can hold at once. GLM-5.2 (1M maximum;
|
|
47
|
+
stable full-window fidelity remains under-tested independently), Fable 5 / Opus
|
|
48
|
+
4.8 / Sonnet 5 (1M), Gemini 3.5 (2M, Deep Think).
|
|
49
|
+
- **Latency budget** — wall-clock cost. Top-tier reasoning peers (Fable 5,
|
|
50
|
+
Opus 4.8, Sol, and xhigh GLM) commonly take **10–30 minutes** for large reviews
|
|
51
|
+
and may be quiet for most of it. Budget for it; do not treat a long quiet
|
|
52
|
+
period as a hang.
|
|
49
53
|
- **Write fidelity** — code-writing accuracy and instruction-following for
|
|
50
54
|
production edits. The property that earns a model a *worker* role.
|
|
51
55
|
|
|
52
56
|
## 2. Model-family cards
|
|
53
57
|
|
|
54
58
|
**Claude (Anthropic)** — `--agent claude`
|
|
55
|
-
-
|
|
56
|
-
- Effort: `high | xhigh` (default `xhigh`).
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
- Current upper tiers are Fable 5, Opus 4.8, and Sonnet 5; Haiku remains the
|
|
60
|
+
cheap leaf-fan-out tier. Effort: `high | xhigh` (wrapper default `xhigh`).
|
|
61
|
+
- Sonnet 5 high is the capable high-throughput worker/scout; use xhigh for its
|
|
62
|
+
hardest coding. Opus 4.8 xhigh is the stable premium default for complex
|
|
63
|
+
coding, debugging, and deep review. Fable 5 high/xhigh is the expensive
|
|
64
|
+
escalation for the hardest ambiguous, long-running, orchestration, design,
|
|
65
|
+
and review work—not the routine implementer. Prefer Opus for security-adjacent
|
|
66
|
+
work where Fable's safety classifier/fallback could interrupt the run.
|
|
61
67
|
|
|
62
68
|
**GPT-5.6 (OpenAI; host-native where available)**
|
|
63
|
-
- **Luna** is the
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
- **Terra** remains a situational middle pick
|
|
67
|
-
|
|
68
|
-
Terra
|
|
69
|
-
- **Sol** is
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
lineage, so switching among them is not cross-model evidence.
|
|
75
|
-
|
|
76
|
-
**Codex (OpenAI)** — `--agent codex`
|
|
77
|
-
- Current class: GPT-5.x-Codex (model auto-selected; no `--model` flag).
|
|
78
|
-
- Effort: `medium | high | xhigh` (default `high`).
|
|
79
|
-
- Strengths: top-tier long-horizon agentic coding, multi-step tool use.
|
|
80
|
-
- Best roles: cross-class peer from a Claude/Gemini/GLM host; highest-tier
|
|
81
|
-
worker for long agentic write paths.
|
|
69
|
+
- **Luna** is the cost-efficient routine implementation and fan-out workhorse:
|
|
70
|
+
start at medium, then raise effort for bounded work that still benefits from
|
|
71
|
+
the cheaper tier. Do not make it the default for every implementation task.
|
|
72
|
+
- **Terra** remains a situational middle pick for moderate work and bounded
|
|
73
|
+
context reading. Luna at more effort or Sol at less effort often gives a
|
|
74
|
+
better cost/capability point, so Terra is not a mandatory rung.
|
|
75
|
+
- **Sol** is the quality-first general coding default at medium/high and the
|
|
76
|
+
preferred model for design, review, and complex/large implementation at
|
|
77
|
+
higher effort. Reserve max-like modes for measured quality gains behind tight
|
|
78
|
+
action boundaries; documented over-persistence grows at the highest efforts.
|
|
79
|
+
- Discover current host availability before selection. Luna, Terra, Sol, and
|
|
80
|
+
Codex share OpenAI lineage, so switching among them is not cross-model evidence.
|
|
82
81
|
|
|
83
82
|
**Gemini (Google)** — `--agent gemini`
|
|
84
83
|
- Model: `gemini-3.5` (2M context, Deep Think mode).
|
|
@@ -86,31 +85,44 @@ the in-skill prose names; this is what they mean.
|
|
|
86
85
|
- Best roles: cross-class peer; large-context review where 2M context matters.
|
|
87
86
|
|
|
88
87
|
**Z.AI GLM 5.2** — `--agent zai`
|
|
89
|
-
- Model: `glm-5.2` only (MoE 744B / 40B-active;
|
|
90
|
-
Sparse Attention
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
- Model: `glm-5.2` only (MoE 744B / 40B-active; 1M maximum context; DeepSeek
|
|
89
|
+
Sparse Attention). Effort: `medium | high | xhigh` (wrapper default `high`).
|
|
90
|
+
- Best roles: cross-class peer; cost-efficient localized implementation and
|
|
91
|
+
parallel inspection; high-tier reviewer when the relevant behavior is named.
|
|
92
|
+
Independent evidence is strong but variable: use a second pass or stronger
|
|
93
|
+
model when correctness depends on product rules distributed across files.
|
|
94
|
+
- The peeragent `zai` adapter runs GLM 5.2 **through Pi** and needs a current
|
|
95
|
+
peeragent build (`zai` agent). Older cached builds only list
|
|
96
96
|
`codex|claude|gemini`.
|
|
97
97
|
|
|
98
98
|
## 3. Role → capability → model
|
|
99
99
|
|
|
100
100
|
| Role | Needs (capability) | Primary models |
|
|
101
101
|
|---|---|---|
|
|
102
|
-
| Primary worker | write fidelity, agentic stamina |
|
|
103
|
-
| Scanner/scout (deep read-only fan-out) | domain inspection, evidence, scoped artifacts | Haiku / Luna
|
|
104
|
-
| Deep reviewer | reasoning depth, fresh context | GPT-5.6 Sol / Claude
|
|
102
|
+
| Primary worker | write fidelity, agentic stamina | Luna medium→xhigh for routine/high-volume work; Sonnet 5 high or Sol medium/high for substantial work; Opus 4.8 xhigh / Fable 5 high→xhigh / GLM-5.2 high when complexity or horizon earns it |
|
|
103
|
+
| Scanner/scout (deep read-only fan-out) | domain inspection, evidence, scoped artifacts | Haiku / Luna / Sonnet 5 for volume; Sol / Opus 4.8 / Fable 5 / GLM xhigh for subtle gates |
|
|
104
|
+
| Deep reviewer | reasoning depth, fresh context | GPT-5.6 Sol / Claude Opus 4.8 or Fable 5 / GLM-5.2 xhigh, with a second pass for distributed invariants |
|
|
105
105
|
| Advisory peer (Phase 1) | blind-spot diversity, augmentation | a **different class** than the host |
|
|
106
106
|
| Adversarial peer (Phase 2) | blind-spot diversity, attack posture | a **different class** than host + than Phase 1 |
|
|
107
107
|
|
|
108
|
-
## 4.
|
|
108
|
+
## 4. Conditional prompt tuning
|
|
109
|
+
|
|
110
|
+
Apply these only when the task shape or an observed trace warrants them; effort
|
|
111
|
+
and a clear success criterion usually beat permanent model-specific boilerplate.
|
|
112
|
+
|
|
113
|
+
| Model / symptom | Small adjustment |
|
|
114
|
+
|---|---|
|
|
115
|
+
| GPT-5.6 prompt bloat or scope drift | State outcome, success criteria, constraints, approval boundaries, and stop rules once; expose only relevant tools. Avoid generic persistence language. Require tool/diff/test evidence before claiming completion. |
|
|
116
|
+
| Opus 4.8 / Sonnet 5 literalism or low review recall | State the rule's full scope explicitly. For review, ask for coverage first and rank/filter findings afterward. Raise effort before adding process prose; add tool triggers only when tool use is actually weak. |
|
|
117
|
+
| Fable 5 over-planning or unrequested work | Ask for the simplest in-scope result; forbid speculative features/refactors and unrequested side actions. Ground progress claims in tool results. Never request hidden chain-of-thought reproduction. |
|
|
118
|
+
| GLM-5.2 cross-file review misses | Name the behavioral invariant and every surface that must agree. Generic “strict production review” can divert into hardening checklists; for distributed correctness, require explicit validation plus an independent second pass. |
|
|
119
|
+
|
|
120
|
+
## 5. Host → cross-class peer pairing
|
|
109
121
|
|
|
110
122
|
The rule: the peer must be a **different model class** than the host, or it is
|
|
111
123
|
not cross-model evidence (fall back to a fresh same-class sub-agent instead).
|
|
112
124
|
For each host, several valid peer classes exist — pick by **maximum blind-spot
|
|
113
|
-
diversity**, and for deep work use **two distinct peer classes** (§
|
|
125
|
+
diversity**, and for deep work use **two distinct peer classes** (§6).
|
|
114
126
|
|
|
115
127
|
| Host class | Valid peer classes (any different class) |
|
|
116
128
|
|---|---|
|
|
@@ -123,7 +135,7 @@ When the natural pair is unavailable, fall through to the next class; never
|
|
|
123
135
|
peer within the host lineage and call it cross-model. A same-lineage reviewer
|
|
124
136
|
may still provide fresh context when labeled accurately.
|
|
125
137
|
|
|
126
|
-
##
|
|
138
|
+
## 6. Multi-class review for deep/complex work
|
|
127
139
|
|
|
128
140
|
The risk and `review_weight` policy lives in
|
|
129
141
|
[advisory-review.md](advisory-review.md). At model-selection time, when that
|
|
@@ -131,7 +143,7 @@ policy calls for two classes, choose two distinct training lineages that also
|
|
|
131
143
|
differ from the host where availability permits. Pair one with each phase;
|
|
132
144
|
disagreement is evidence to investigate, not a vote.
|
|
133
145
|
|
|
134
|
-
##
|
|
146
|
+
## 7. Two-phase design review: advisory then adversarial
|
|
135
147
|
|
|
136
148
|
The phase order, artifact-specific loop shapes, ceilings, and recording format
|
|
137
149
|
live in [advisory-review.md](advisory-review.md). This model-layer reference adds
|
|
@@ -139,7 +151,7 @@ one constraint: when two classes are selected, Phase 2 should differ from both
|
|
|
139
151
|
the host and Phase 1 where the available class set permits it. Never label an
|
|
140
152
|
unknown or same-class reviewer cross-model.
|
|
141
153
|
|
|
142
|
-
##
|
|
154
|
+
## 8. peeragent invocation cheatsheet
|
|
143
155
|
|
|
144
156
|
Resolve the wrapper before calling — never assume `peeragent` is on `PATH`
|
|
145
157
|
(`PEERAGENT_BIN` → bundled `bin/peeragent` → bare `peeragent`). Run in the
|
|
@@ -157,7 +169,7 @@ host harness's outside-sandbox mode; never `--full-access` for review.
|
|
|
157
169
|
Always tell the reviewer **not** to recurse back through peeragent's own
|
|
158
170
|
`peer`/`peer-review` skills or the wrapper — the reviewer is the endpoint.
|
|
159
171
|
|
|
160
|
-
##
|
|
172
|
+
## 9. Fallbacks when no peer is reachable
|
|
161
173
|
|
|
162
174
|
When peeragent is unavailable, fails, would be same-class, or the needed class
|
|
163
175
|
isn't reachable: spawn a **fresh max-effort generic sub-agent** at the highest
|
|
@@ -195,8 +195,8 @@ across the lenses below and skip exploratory fanout. If one area is unclear, use
|
|
|
195
195
|
focused exploratory sub-agent. Use parallel exploratory sub-agents only when the lenses need separate
|
|
196
196
|
attention across a medium/large target.
|
|
197
197
|
|
|
198
|
-
The first
|
|
199
|
-
refactor-conventions catalog exists. The catalog adds a
|
|
198
|
+
The first five scan axes are mandatory. Run them even when a project-specific
|
|
199
|
+
refactor-conventions catalog exists. The catalog adds a sixth scan axis; it
|
|
200
200
|
does not narrow or disable the default refactor judgment.
|
|
201
201
|
|
|
202
202
|
- Use the host's generic/general-purpose subagent prompted with the scanner
|
|
@@ -207,28 +207,35 @@ does not narrow or disable the default refactor judgment.
|
|
|
207
207
|
deployment-provided read-only role only if it is already available; otherwise
|
|
208
208
|
keep the host-local scan fallback.
|
|
209
209
|
|
|
210
|
-
1. **
|
|
210
|
+
1. **Elimination First** — "Before proposing extraction or a new abstraction,
|
|
211
|
+
find code, tests, checks, wrappers, options, compatibility paths, and files
|
|
212
|
+
that can be deleted, inlined, merged, or made unnecessary. Include whole
|
|
213
|
+
subsystems whose maintenance cost may exceed their current value, but mark
|
|
214
|
+
any removal that changes behavior or guarantees as a user decision rather
|
|
215
|
+
than a pure refactor."
|
|
216
|
+
|
|
217
|
+
2. **Code Smells** — "Find code that smells off in <area>. Look for: duplicated
|
|
211
218
|
logic across files; long files (>500 lines); deep nesting (>4 levels); god
|
|
212
219
|
functions (>100 lines doing multiple distinct things); god modules (>15
|
|
213
220
|
methods or multiple responsibilities); leaky abstractions (consumers reaching
|
|
214
221
|
past a module's public API). Report each with file:line and a one-line
|
|
215
222
|
explanation."
|
|
216
223
|
|
|
217
|
-
|
|
224
|
+
3. **Missing Abstractions** — "Find places where multiple modules implement
|
|
218
225
|
similar logic that could be extracted. Report each with file:line references
|
|
219
226
|
and which modules would benefit."
|
|
220
227
|
|
|
221
|
-
|
|
228
|
+
4. **Pattern Violations & Naming Inconsistencies** — "Read
|
|
222
229
|
`.agents/skills/patterns/*.md` and legacy `.claude/skills/patterns/*.md` if
|
|
223
230
|
they exist. Find code that deviates from established patterns. Report
|
|
224
231
|
naming inconsistencies — same concept named differently across modules. Report
|
|
225
232
|
each with file:line."
|
|
226
233
|
|
|
227
|
-
|
|
234
|
+
5. **Dead Weight** — "Find dead code: unused exports (cross-check against grep
|
|
228
235
|
for importers), commented-out blocks, TODO/FIXME where the work is clearly
|
|
229
236
|
already done, files with very few callers. Report each with file:line."
|
|
230
237
|
|
|
231
|
-
|
|
238
|
+
6. **Project Refactor Conventions** — Run only when
|
|
232
239
|
`.agents/skills/refactor-conventions/` exists. "Read
|
|
233
240
|
`.agents/skills/refactor-conventions/SKILL.md`, its referenced rule files,
|
|
234
241
|
and the `## Refactor Style Conventions` section in AGENTS.md if present.
|
|
@@ -245,7 +252,7 @@ findings.
|
|
|
245
252
|
### Phase 4: Categorize findings
|
|
246
253
|
|
|
247
254
|
Sort the findings into:
|
|
248
|
-
- **High value** —
|
|
255
|
+
- **High value** — eliminates code or concepts, reduces duplication, consolidates
|
|
249
256
|
similar code, or corrects convention drift that materially improves module
|
|
250
257
|
boundaries or repeated project workflow
|
|
251
258
|
- **Medium value** — improves consistency, aligns with established patterns
|
|
@@ -262,14 +269,15 @@ run summary.
|
|
|
262
269
|
|
|
263
270
|
For each step, specify:
|
|
264
271
|
- **Step name and value tier** (High / Medium / Low)
|
|
265
|
-
- **Source lens**: code smell / missing abstraction / pattern drift /
|
|
272
|
+
- **Source lens**: elimination / code smell / missing abstraction / pattern drift /
|
|
266
273
|
dead weight / refactor convention `<rule>` (if applicable)
|
|
267
274
|
- **Files affected**: paths
|
|
268
275
|
- **Current state**: actual code showing what exists now
|
|
269
276
|
- **Target state**: exact code showing what it should look like after
|
|
270
277
|
- **Implementation notes**: how to get from current to target; non-obvious considerations
|
|
271
|
-
- **Acceptance criteria**:
|
|
272
|
-
check
|
|
278
|
+
- **Acceptance criteria**: relevant verification passes plus a specific
|
|
279
|
+
structural/behavioral check; add or retain tests only where they protect an
|
|
280
|
+
important interface, complex unit, or regression
|
|
273
281
|
- **Risk**: Low / Medium / High — what could go wrong
|
|
274
282
|
- **Rollback**: how to revert this step if it breaks something
|
|
275
283
|
|
|
@@ -308,7 +316,7 @@ Append to the feature file's body:
|
|
|
308
316
|
### Step 1: <name>
|
|
309
317
|
**Priority**: High/Medium/Low
|
|
310
318
|
**Risk**: Low/Medium/High
|
|
311
|
-
**Source Lens**: code smell / missing abstraction / pattern drift / dead weight / refactor convention `<rule>`
|
|
319
|
+
**Source Lens**: elimination / code smell / missing abstraction / pattern drift / dead weight / refactor convention `<rule>`
|
|
312
320
|
**Files**: `src/path/file.ext`, ...
|
|
313
321
|
**Story**: `<story-id>` (if spawned)
|
|
314
322
|
|
|
@@ -369,7 +377,9 @@ In conversation:
|
|
|
369
377
|
add — escalate via `/agile-workflow:scope` instead.
|
|
370
378
|
- Each step is self-contained and committable in isolation. Multi-step PRs lose the
|
|
371
379
|
ability to roll back individual steps.
|
|
372
|
-
- Specify
|
|
380
|
+
- Specify proportionate verification for every step. Do not require a new unit
|
|
381
|
+
test for simple structural edits when build, type, integration, or existing
|
|
382
|
+
interface evidence is more useful.
|
|
373
383
|
- Prioritize measurable improvements (less duplication, clearer boundaries) over
|
|
374
384
|
aesthetic preferences. Beauty that doesn't reduce complexity isn't worth the risk.
|
|
375
385
|
- Project-specific refactor conventions extend the defaults; they never replace
|
package/skills/review/SKILL.md
CHANGED
|
@@ -233,19 +233,32 @@ Deep lane:
|
|
|
233
233
|
inline when the selected weight requires a fresh reviewer and none is available.
|
|
234
234
|
- Apply the core lenses plus the applicable deep dimensions.
|
|
235
235
|
|
|
236
|
-
### Phase 5: Classify Findings
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
- **
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
236
|
+
### Phase 5: Adjudicate And Classify Findings
|
|
237
|
+
|
|
238
|
+
The host/receiving agent owns classification. Treat fresh-reviewer severities as
|
|
239
|
+
proposals, verify concrete claims, and weigh each finding against repository
|
|
240
|
+
context: acceptance criteria, supported deployment and users, likelihood, blast
|
|
241
|
+
radius, recoverability, existing safeguards, and delay cost. Reviewer confidence,
|
|
242
|
+
model strength, or repeated mention does not make a finding blocking.
|
|
243
|
+
|
|
244
|
+
- **Blocker**: a credible, material current-cycle risk to required correctness,
|
|
245
|
+
security, data integrity, public contracts, acceptance criteria, release
|
|
246
|
+
safety, or trustworthy verification. It must be fixed or kept active before
|
|
247
|
+
advancing. Examples include a demonstrated correctness bug, exploitable
|
|
248
|
+
vulnerability, unintended breaking change, a false/stale/contradictory
|
|
249
|
+
foundation-doc assertion, or a test that proves required behavior is wrong.
|
|
250
|
+
- **Important**: valid work below the current-cycle blocker bar. Park it in the
|
|
251
|
+
unbound backlog with the risk rationale and advance the reviewed item. Examples
|
|
252
|
+
include unlikely low-consequence edges, worthwhile hardening, nonessential
|
|
253
|
+
tests, design cleanup, naming, or refactor opportunities.
|
|
254
|
+
- **Nit**: optional polish that does not warrant a substrate item.
|
|
255
|
+
- **Rejected**: unsupported, inapplicable, or cost-disproportionate advice;
|
|
256
|
+
record a brief reason when it came from an independent reviewer.
|
|
257
|
+
|
|
258
|
+
Rarity alone is not dismissal: a corner case with severe consequences may still
|
|
259
|
+
block. Conversely, a real issue does not block merely because a reviewer found
|
|
260
|
+
it. If there are zero receiver-confirmed blockers and zero important findings,
|
|
261
|
+
say so plainly. Do not pad the review with invented concerns.
|
|
249
262
|
|
|
250
263
|
### Phase 6: Finish
|
|
251
264
|
|
|
@@ -259,8 +272,10 @@ Standalone mode:
|
|
|
259
272
|
|
|
260
273
|
Substrate mode:
|
|
261
274
|
- Load [substrate-side-effects.md](references/substrate-side-effects.md).
|
|
262
|
-
- File
|
|
263
|
-
|
|
275
|
+
- File receiver-accepted findings according to their disposition: current-cycle
|
|
276
|
+
blockers active, important findings in the unbound backlog, and nits nowhere.
|
|
277
|
+
- Advance the item if there are no receiver-confirmed blockers, or bounce it if
|
|
278
|
+
blockers exist.
|
|
264
279
|
- Append the review record and commit the reviewed item's transition.
|
|
265
280
|
- After an approval reaches `done`, run Conservative Parent Roll-Up below.
|
|
266
281
|
|
|
@@ -315,8 +330,11 @@ Approve | Approve with comments | Request changes | Block
|
|
|
315
330
|
### Nits
|
|
316
331
|
- Nit: <brief note> (`file:line`)
|
|
317
332
|
|
|
333
|
+
### Rejected proposals
|
|
334
|
+
- <reviewer proposal>: <repository-context rationale>
|
|
335
|
+
|
|
318
336
|
## Notes
|
|
319
|
-
<mode, depth, skipped lenses, limitations, or anything else worth recording>
|
|
337
|
+
<mode, depth, risk context, skipped lenses, limitations, or anything else worth recording>
|
|
320
338
|
```
|
|
321
339
|
|
|
322
340
|
If no findings above nit level in substrate mode: "This change looks good.
|
|
@@ -344,10 +362,12 @@ Nothing blocking or significant to flag."
|
|
|
344
362
|
concerns evaporate into review prose.
|
|
345
363
|
- Review's security check is lightweight. For a full security gate, use
|
|
346
364
|
`/agile-workflow:gate-security`.
|
|
347
|
-
-
|
|
348
|
-
|
|
365
|
+
- A false, stale, or contradictory foundation-doc assertion is a blocker, not a
|
|
366
|
+
nit. Missing coverage and future-state claims whose implementation has not yet
|
|
367
|
+
landed are not drift and must not be flagged or changed.
|
|
349
368
|
- Do not advance an item past review unless the verdict is Approve or Approve
|
|
350
|
-
with comments. Pushing through blockers defeats
|
|
369
|
+
with comments. Pushing through receiver-confirmed material blockers defeats
|
|
370
|
+
the point of the stage; parking lower-risk findings does not.
|
|
351
371
|
- Child completion never substitutes for a parent's review. Roll-up may move an
|
|
352
372
|
implementing parent to `review`, but only that parent's selected lane may move
|
|
353
373
|
it to `done`.
|
|
@@ -43,10 +43,20 @@ lenses and note any lens skipped with the reason.
|
|
|
43
43
|
|
|
44
44
|
## Foundation-Doc Alignment
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
46
|
+
Foundation docs may describe current state or intended future state and need not
|
|
47
|
+
cover every capability. Review assertions, not omissions:
|
|
48
|
+
|
|
49
|
+
- Does implementation make an existing current-state assertion in
|
|
50
|
+
`docs/VISION.md`, `docs/SPEC.md`, `docs/ARCHITECTURE.md`, or another foundation
|
|
51
|
+
doc false or stale?
|
|
52
|
+
- Does an existing future-state assertion contradict newer accepted intent or
|
|
53
|
+
another authoritative foundation claim? Lack of implementation alone is not a
|
|
54
|
+
contradiction.
|
|
55
|
+
- If an assertion is false, stale, or contradictory, did the implementer roll it
|
|
56
|
+
forward in the same change?
|
|
57
|
+
- Never request a foundation-doc addition merely because the change is missing
|
|
58
|
+
from those docs. Assertion drift is a blocker in substrate mode; omission is
|
|
59
|
+
not a finding.
|
|
50
60
|
|
|
51
61
|
## Naming And Comments
|
|
52
62
|
|
|
@@ -8,15 +8,21 @@ commit unless the user explicitly asks for that side effect.
|
|
|
8
8
|
|
|
9
9
|
## Triage Findings Into Items
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
The receiving agent first adjudicates reviewer proposals under
|
|
12
|
+
`principles/SKILL.md` Part IV. Reviewer severity labels are not authoritative.
|
|
13
|
+
For each accepted finding above nit level, preserve the chosen disposition so it
|
|
14
|
+
does not disappear into prose:
|
|
15
|
+
|
|
16
|
+
- **Blocker**: a receiver-confirmed material current-cycle risk. Either fix
|
|
17
|
+
inline if small, or create a story in `.work/active/stories/` with
|
|
18
|
+
`stage: implementing` and tags such as `[bug]`, `[security]`, `[tests]`, or the
|
|
19
|
+
appropriate category. It prevents the reviewed item from advancing.
|
|
20
|
+
- **Important**: valid work below the blocker bar. Park it as an unbound backlog
|
|
21
|
+
item in `.work/backlog/` with the contextual risk rationale; do not scope it
|
|
22
|
+
active merely because it is substantial or a reviewer called it blocking.
|
|
23
|
+
- **Nit**: keep in review notes only; nits do not warrant items.
|
|
24
|
+
- **Rejected**: create no item; record a brief reason in the review record when
|
|
25
|
+
independent review proposed it.
|
|
20
26
|
|
|
21
27
|
Review-created items use `gate_origin: null`; gate-produced findings set
|
|
22
28
|
`gate_origin`.
|
|
@@ -140,8 +146,9 @@ Append this section to the reviewed item:
|
|
|
140
146
|
**Blockers**: <list with item ids> (or "none")
|
|
141
147
|
**Important**: <list with item ids> (or "none")
|
|
142
148
|
**Nits**: <inline notes - not items>
|
|
149
|
+
**Rejected**: <reviewer proposals and brief reasons> (or "none")
|
|
143
150
|
|
|
144
|
-
**Notes**: <mode, depth, skipped lenses, limitations, or anything else worth recording>
|
|
151
|
+
**Notes**: <mode, depth, risk context, skipped lenses, limitations, or anything else worth recording>
|
|
145
152
|
```
|
|
146
153
|
|
|
147
154
|
## Commit
|
|
@@ -40,7 +40,8 @@ or story should already have passed review. Gather:
|
|
|
40
40
|
children.
|
|
41
41
|
|
|
42
42
|
Use the aggregate scope to spot cross-cutting concerns: public API shifts,
|
|
43
|
-
foundation-doc
|
|
43
|
+
false/stale/contradictory foundation-doc assertions (not omissions or
|
|
44
|
+
unimplemented future intent), release gaps, and capability completeness.
|
|
44
45
|
|
|
45
46
|
## Empty Diff Handling
|
|
46
47
|
|
package/skills/scope/SKILL.md
CHANGED
|
@@ -170,18 +170,21 @@ second confirmation round.
|
|
|
170
170
|
|
|
171
171
|
### Phase B8: Promote each confirmed cluster
|
|
172
172
|
|
|
173
|
-
For each cluster, run the single-idea-mode Phases 3-6 inline:
|
|
173
|
+
For each cluster, run the single-idea-mode Phase 1.9 and Phases 3-6 inline:
|
|
174
174
|
|
|
175
|
-
1. **
|
|
175
|
+
1. **Frame simplification opportunities** — record what the cluster can delete,
|
|
176
|
+
consolidate, replace, or make unnecessary; separate cohesive cleanup from
|
|
177
|
+
unrelated backlog work.
|
|
178
|
+
2. **Declare dependencies** — within-cluster (child stories under a feature)
|
|
176
179
|
and cross-cluster (one feature depends on another's output). Use
|
|
177
180
|
`work-view --blocking` for cycle detection.
|
|
178
|
-
|
|
181
|
+
3. **Foundation-doc roll-forward** (large clusters only) — full Phase 4 of
|
|
179
182
|
single-idea mode, scoped to that cluster's impact.
|
|
180
|
-
|
|
183
|
+
4. **Write item files** — the parent (epic or feature) plus any child files.
|
|
181
184
|
Use `git mv` to move backlog files into the new structure where they map
|
|
182
185
|
1:1; reference the backlog idea in the parent's brief and `git rm` the
|
|
183
186
|
backlog file where it was absorbed without a direct child.
|
|
184
|
-
|
|
187
|
+
5. **Commit per cluster** — `scope: <cluster-id> (<kind>, <size>)` with a
|
|
185
188
|
foundation-doc roll-forward note where applicable.
|
|
186
189
|
|
|
187
190
|
Promote leftovers per the Phase B7 decision (one commit per promoted leftover,
|
|
@@ -267,7 +270,7 @@ interfaces).
|
|
|
267
270
|
Aim for 2-5 questions. Zero is fine if the user's brief and foundation docs
|
|
268
271
|
already pin every strategic choice. For small (story) and medium (feature)
|
|
269
272
|
scope, the bar is higher — only ask if a strategic ambiguity genuinely
|
|
270
|
-
affects framing; otherwise
|
|
273
|
+
affects framing; otherwise continue through Phases 1.8 and 1.9 without questions.
|
|
271
274
|
|
|
272
275
|
Use `structured question tool` to ask. Capture answers in the item body under a
|
|
273
276
|
`## Strategic decisions` section so the downstream design family inherits
|
|
@@ -306,7 +309,14 @@ journey before the item is written.
|
|
|
306
309
|
|
|
307
310
|
Skip this phase if `ux-ui-design` is not installed.
|
|
308
311
|
|
|
309
|
-
Then proceed to Phase
|
|
312
|
+
Then proceed to Phase 1.9.
|
|
313
|
+
|
|
314
|
+
### Phase 1.9: Frame simplification opportunities
|
|
315
|
+
|
|
316
|
+
Record what the idea could delete, consolidate, replace, or make unnecessary—code,
|
|
317
|
+
tests, checks, abstractions, compatibility paths, configuration, or whole subsystems.
|
|
318
|
+
Fold cohesive cleanup into the brief, note independent `[refactor]`/`[cleanup]`
|
|
319
|
+
children, and park unrelated work. Removing guarantees requires a strategic decision.
|
|
310
320
|
|
|
311
321
|
### Phase 2: Size the scope
|
|
312
322
|
|
|
@@ -414,6 +424,9 @@ updated: YYYY-MM-DD
|
|
|
414
424
|
## Brief
|
|
415
425
|
<one to three paragraphs describing what this is and why it exists>
|
|
416
426
|
|
|
427
|
+
## Simplification opportunity
|
|
428
|
+
<what this work may delete, consolidate, replace, or deliberately retain; "none identified" is valid>
|
|
429
|
+
|
|
417
430
|
<!-- Subsequent sections (Design, Implementation Notes, etc.) accumulate as
|
|
418
431
|
work progresses. -->
|
|
419
432
|
```
|
|
@@ -1 +1 @@
|
|
|
1
|
-
0.16.
|
|
1
|
+
0.16.4
|
|
Binary file
|