arreio 1.0.5 → 1.2.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/README.md +55 -2
- package/package.json +1 -1
- package/skills/arreio-init/SKILL.md +33 -46
- package/skills/learn/SKILL.md +21 -7
- package/skills/learn/modules/capture.md +6 -6
- package/skills/learn/modules/index.md +3 -3
- package/skills/learn/modules/maintain.md +3 -3
- package/skills/learn/modules/refine.md +3 -3
- package/skills/learn/references/id-generation.md +14 -12
- package/skills/learn/references/interaction-mode-propagation.md +21 -1
- package/skills/learn/references/templates/artifacts/captured-entry.md +1 -1
- package/skills/learn/references/templates/artifacts/index-update.md +1 -1
- package/skills/learn/references/templates/artifacts/learn-input.md +1 -1
- package/skills/learn/references/templates/artifacts/maintain-log.md +1 -1
- package/skills/learn/references/templates/artifacts/refined-entry.md +1 -1
- package/skills/plan/SKILL.md +29 -4
- package/skills/plan/modules/design.md +9 -5
- package/skills/plan/modules/generate.md +9 -9
- package/skills/plan/modules/research.md +2 -2
- package/skills/plan/modules/scope.md +2 -2
- package/skills/plan/references/design-complexity-assessment.md +16 -7
- package/skills/plan/references/error-handling.md +1 -0
- package/skills/plan/references/id-generation.md +3 -1
- package/skills/plan/references/interaction-mode-propagation.md +25 -1
- package/skills/plan/references/plan-tier-selection.md +95 -48
- package/skills/plan/references/templates/artifacts/design.md +1 -1
- package/skills/plan/references/templates/artifacts/scoped-context.md +1 -1
- package/skills/review/SKILL.md +24 -9
- package/skills/review/modules/analyze.md +3 -3
- package/skills/review/modules/prepare.md +3 -3
- package/skills/review/modules/report.md +9 -9
- package/skills/review/modules/scope.md +4 -4
- package/skills/review/references/error-handling.md +1 -1
- package/skills/review/references/id-generation.md +18 -16
- package/skills/review/references/interaction-mode-propagation.md +21 -1
- package/skills/review/references/templates/artifacts/findings.md +1 -1
- package/skills/review/references/templates/artifacts/review-input.md +1 -1
- package/skills/review/references/templates/artifacts/review-kit.md +1 -1
- package/skills/review/references/templates/artifacts/review-report.md +6 -6
- package/skills/review/references/templates/artifacts/review-scope.md +1 -1
- package/skills/work/SKILL.md +19 -4
- package/skills/work/modules/execute.md +2 -2
- package/skills/work/modules/prepare.md +3 -3
- package/skills/work/modules/triage.md +2 -2
- package/skills/work/references/execution-mode-selection.md +21 -2
- package/skills/work/references/id-generation.md +3 -1
- package/skills/work/references/interaction-mode-propagation.md +21 -1
- package/skills/work/references/templates/artifacts/execution-log.md +1 -1
- package/skills/work/references/templates/artifacts/execution-plan.md +1 -1
- package/skills/work/references/templates/artifacts/work-manifest.md +1 -1
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
title: Plan Tier Selection
|
|
3
3
|
description: Reference for the Generate phase. Defines the Fast/Standard/Deep tier model, the selection algorithm that combines complexity, risk, and user preference, and the template sections each tier requires.
|
|
4
4
|
type: reference
|
|
5
|
-
version: 1.
|
|
6
|
-
timestamp: "2026-
|
|
5
|
+
version: 1.2
|
|
6
|
+
timestamp: "2026-10-01"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# Plan Tier Selection
|
|
@@ -24,40 +24,45 @@ Tier selection happens at the start of the Generate phase, after reading the Des
|
|
|
24
24
|
|
|
25
25
|
## Selection Algorithm
|
|
26
26
|
|
|
27
|
+
Tier selection is **two pure functions**. Run them step by step with the real values; never shortcut to a "typical" tier.
|
|
28
|
+
|
|
29
|
+
Values are compared case-insensitively (`HIGH` = `High`). `risk_level` comes from the Research Findings; `complexity` from the Design Artifact.
|
|
30
|
+
|
|
27
31
|
```
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
else: # HIGH or VERY_HIGH
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if risk_level ==
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
if
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
return base_tier
|
|
32
|
+
# A. Recommendation — computed in the Design phase (Step 4) and re-computed in Generate (Step 1).
|
|
33
|
+
# Depends ONLY on complexity and risk. Never on user input or --deep.
|
|
34
|
+
function recommend_tier(complexity, risk_level):
|
|
35
|
+
# 1. Complexity-driven default
|
|
36
|
+
if complexity in [TRIVIAL, LOW]: tier = Fast
|
|
37
|
+
elif complexity == MEDIUM: tier = Standard
|
|
38
|
+
else: # HIGH or VERY_HIGH tier = Deep
|
|
39
|
+
|
|
40
|
+
# 2. Risk floor (see table below) — may only raise the tier
|
|
41
|
+
if risk_level == HIGH and tier == Fast: tier = Standard
|
|
42
|
+
if risk_level == CRITICAL: tier = Deep
|
|
43
|
+
return tier
|
|
44
|
+
|
|
45
|
+
# B. Selection — computed in the Generate phase (Step 1).
|
|
46
|
+
function select_tier(complexity, risk_level, user_preference, force_deep):
|
|
47
|
+
recommended = recommend_tier(complexity, risk_level)
|
|
48
|
+
floor = risk_floor(risk_level) # Fast | Standard | Deep
|
|
49
|
+
|
|
50
|
+
if force_deep: return Deep # explicit user request; always honored
|
|
51
|
+
if user_preference == "auto": return recommended # Auto = the algorithm, NOT a fixed tier
|
|
52
|
+
# Explicit tier: honor it, but never go below the risk floor
|
|
53
|
+
return max(user_preference, floor) # order: Fast < Standard < Deep
|
|
52
54
|
```
|
|
53
55
|
|
|
56
|
+
`tier_recommended` is **always** `recommend_tier(...)` — it is never changed by user preference or `--deep`. `tier` is `select_tier(...)`. When they differ, the plan records an auditable override.
|
|
57
|
+
|
|
54
58
|
### Inputs
|
|
55
59
|
|
|
56
|
-
| Input | Source
|
|
57
|
-
| ----------------- |
|
|
58
|
-
| `complexity` | Design Artifact
|
|
59
|
-
| `risk_level` | Research Findings Artifact
|
|
60
|
-
| `user_preference` | User (asked in Generate Step 1)
|
|
60
|
+
| Input | Source | Values |
|
|
61
|
+
| ----------------- | --------------------------------------------------- | ------------------------------------- |
|
|
62
|
+
| `complexity` | Design Artifact | TRIVIAL, LOW, MEDIUM, HIGH, VERY_HIGH |
|
|
63
|
+
| `risk_level` | Research Findings Artifact | LOW, MEDIUM, HIGH, CRITICAL |
|
|
64
|
+
| `user_preference` | User (asked in Generate Step 1; see mode behavior) | `fast`, `standard`, `deep`, or `auto` |
|
|
65
|
+
| `force_deep` | Orchestrator context (`--deep` flag, SKILL.md) | `true` or `false` (default `false`) |
|
|
61
66
|
|
|
62
67
|
### Risk Floor
|
|
63
68
|
|
|
@@ -72,6 +77,22 @@ The risk level sets a **minimum tier** that user preference cannot override:
|
|
|
72
77
|
|
|
73
78
|
Rationale: High/critical risk mandates enough structure to capture alternatives, rollout, and rollback — even if the user wants a short plan.
|
|
74
79
|
|
|
80
|
+
### Anti-Default Rules (read before computing)
|
|
81
|
+
|
|
82
|
+
- **`Standard` is not a neutral default.** It is the result only for `MEDIUM` complexity (or a `HIGH` risk floor lifting a Fast result). `HIGH`/`VERY_HIGH` complexity → **Deep**; `TRIVIAL`/`LOW` → **Fast** unless risk lifts it.
|
|
83
|
+
- **Compute, then write.** Fill the function inputs with the actual `complexity` and `risk_level`, evaluate, and only then write `tier_recommended`. Do not copy a tier from an example in this file.
|
|
84
|
+
- **Auto means "use `tier_recommended`".** Never substitute `Standard` because it is the middle option.
|
|
85
|
+
|
|
86
|
+
### Deep Override (`--deep`)
|
|
87
|
+
|
|
88
|
+
The user can force a Deep plan in **any** interaction mode (including Autopilot and Smart) by invoking `/plan --deep <task>` (parsing rules in [SKILL.md](../SKILL.md#skill-invocation)).
|
|
89
|
+
|
|
90
|
+
- `force_deep = true` → `tier = deep`, regardless of complexity, risk, or `user_preference`. The tier question is **not asked**, in any mode.
|
|
91
|
+
- `tier_recommended` still holds the algorithm's result, so the override is auditable (`tier: deep`, `tier_recommended: fast`, etc.).
|
|
92
|
+
- Deep only adds structure, so it never violates the risk floor.
|
|
93
|
+
- The Smart-mode "tier is Deep" pause does **not** fire for a `--deep` plan (the user already chose it). CRITICAL-risk pause still applies.
|
|
94
|
+
- Because Design runs before Generate, the Design phase also receives `force_deep` so it produces the material a Deep plan needs (≥ 2 alternatives, rollout draft, integration map) — see [design.md](../modules/design.md) Steps 4–5.
|
|
95
|
+
|
|
75
96
|
## Tier Section Requirements
|
|
76
97
|
|
|
77
98
|
### Fast Tier
|
|
@@ -109,33 +130,42 @@ Required sections (all Standard sections, plus):
|
|
|
109
130
|
- Explicit complexity and tier in frontmatter
|
|
110
131
|
- Cross-system integration map (data-flow or sequence diagram)
|
|
111
132
|
|
|
133
|
+
**Required does not mean invented.** On a Deep plan forced by `--deep` for a small change, a required item that genuinely does not apply (e.g., data migration for a doc-only change) is written as `Not applicable — <one-line reason>`. Never omit the item and never fabricate content to fill it.
|
|
134
|
+
|
|
112
135
|
## Interaction Mode Behavior
|
|
113
136
|
|
|
114
|
-
| Mode | Tier Selection Behavior
|
|
115
|
-
| --------- |
|
|
116
|
-
| Detailed | Ask the user to
|
|
117
|
-
| Smart |
|
|
118
|
-
| Autopilot | Auto-select
|
|
137
|
+
| Mode | `user_preference` | Tier Selection Behavior |
|
|
138
|
+
| --------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------- |
|
|
139
|
+
| Detailed | Asked (prompt below), unless `force_deep` | Ask the user; offer to override. `force_deep` → no question, announce "Deep plan forced by `--deep`" |
|
|
140
|
+
| Smart | `auto` (asked only if a pause trigger fires) | Auto-select; pause **only** on the triggers below |
|
|
141
|
+
| Autopilot | `auto` | Auto-select; never pause |
|
|
142
|
+
|
|
143
|
+
`force_deep = true` overrides `user_preference` in every row.
|
|
119
144
|
|
|
120
145
|
**Smart mode pause triggers:**
|
|
121
146
|
|
|
122
|
-
- Selected tier is Deep (signals complex work worth a review)
|
|
147
|
+
- Selected tier is Deep **and `force_deep` is false** (signals complex work worth a review)
|
|
123
148
|
- User preference conflicts with risk floor (e.g., user wants Fast but risk is HIGH)
|
|
124
149
|
- Research phase reported CRITICAL risk (Security or Payments)
|
|
125
150
|
|
|
126
151
|
## Asking the User for Preference
|
|
127
152
|
|
|
128
|
-
In Detailed mode (or when Smart mode pauses), ask the
|
|
153
|
+
In Detailed mode (or when Smart mode pauses), ask one question. **Build it from the computed values — every `<…>` placeholder below must be replaced; never print an example tier.**
|
|
129
154
|
|
|
130
155
|
```
|
|
131
|
-
|
|
156
|
+
Design complexity is <complexity> (score <total>/15) and risk level is <risk_level>.
|
|
157
|
+
I recommend the <tier_recommended> tier.
|
|
132
158
|
Which tier would you like for the plan?
|
|
133
159
|
- Fast: Short plan, minimal structure (1-2 pages)
|
|
134
|
-
- Standard: Full plan with phased units and risk table (2-4 pages)
|
|
160
|
+
- Standard: Full plan with phased units and risk table (2-4 pages)
|
|
135
161
|
- Deep: Comprehensive plan with alternatives and rollout ops (4+ pages)
|
|
136
|
-
- Auto:
|
|
162
|
+
- Auto: Use the recommendation (result: <tier_recommended>)
|
|
137
163
|
```
|
|
138
164
|
|
|
165
|
+
- Append ` [Recommended]` to the option that equals `tier_recommended`.
|
|
166
|
+
- If the risk floor makes an option unavailable (e.g., Fast at HIGH risk), keep it listed but say "(below risk floor — will be raised to <floor>)".
|
|
167
|
+
- Tip to include once in the question text: `/plan --deep` forces a Deep plan without this question.
|
|
168
|
+
|
|
139
169
|
Record the user's choice as the selected **`tier`** in the final plan frontmatter; preserve the algorithm's suggestion as **`tier_recommended`** so an override is auditable.
|
|
140
170
|
|
|
141
171
|
## Worked Examples
|
|
@@ -143,19 +173,34 @@ Record the user's choice as the selected **`tier`** in the final plan frontmatte
|
|
|
143
173
|
### Example 1: Low complexity, low risk
|
|
144
174
|
|
|
145
175
|
- `complexity = LOW`, `risk_level = LOW`, `user_preference = auto`
|
|
146
|
-
-
|
|
176
|
+
- `recommend_tier` → Fast. Auto → **Fast** (`tier_recommended: fast`).
|
|
177
|
+
|
|
178
|
+
### Example 2: Medium complexity, medium risk, auto
|
|
179
|
+
|
|
180
|
+
- `complexity = MEDIUM`, `risk_level = MEDIUM`, `user_preference = auto`
|
|
181
|
+
- `recommend_tier` → Standard. Auto → **Standard** (`tier_recommended: standard`).
|
|
147
182
|
|
|
148
|
-
### Example
|
|
183
|
+
### Example 3: Medium complexity, high risk, user wants fast
|
|
149
184
|
|
|
150
185
|
- `complexity = MEDIUM`, `risk_level = HIGH`, `user_preference = fast`
|
|
151
|
-
-
|
|
186
|
+
- `recommend_tier` → Standard. Floor (HIGH) = Standard. `max(Fast, Standard)` → **Standard**.
|
|
152
187
|
- Smart mode would pause (preference conflicts with risk floor).
|
|
153
188
|
|
|
154
|
-
### Example
|
|
189
|
+
### Example 4: High complexity, high risk, auto
|
|
190
|
+
|
|
191
|
+
- `complexity = HIGH` (score 8), `risk_level = HIGH`, `user_preference = auto`
|
|
192
|
+
- `recommend_tier` → **Deep** (HIGH complexity → Deep; not Standard). Auto → **Deep** (`tier_recommended: deep`).
|
|
193
|
+
- Smart mode pauses (Deep tier).
|
|
194
|
+
|
|
195
|
+
### Example 5: High complexity, critical risk (payments)
|
|
155
196
|
|
|
156
197
|
- `complexity = HIGH`, `risk_level = CRITICAL`, `user_preference = auto`
|
|
157
|
-
-
|
|
158
|
-
|
|
198
|
+
- `recommend_tier` → Deep. Auto → **Deep**. Smart mode pauses (Deep + CRITICAL).
|
|
199
|
+
|
|
200
|
+
### Example 6: `--deep` on a small change, Autopilot
|
|
201
|
+
|
|
202
|
+
- `complexity = LOW`, `risk_level = LOW`, `force_deep = true`, mode = autopilot
|
|
203
|
+
- `tier_recommended: fast`, `tier: deep`. No question asked, no pause. Required Deep sections without real content are written as `Not applicable — <reason>`.
|
|
159
204
|
|
|
160
205
|
## Error Handling
|
|
161
206
|
|
|
@@ -165,10 +210,12 @@ Record the user's choice as the selected **`tier`** in the final plan frontmatte
|
|
|
165
210
|
| `risk_level` missing from Research | Default to MEDIUM; log warning |
|
|
166
211
|
| User provides invalid preference value | Treat as `auto`; log warning |
|
|
167
212
|
| Selected tier conflicts with risk floor | Enforce risk floor; inform user of the override |
|
|
213
|
+
| Design's `tier_recommended` differs from `recommend_tier(complexity, risk_level)` | Recompute in Generate; the recomputed value is authoritative; log warning |
|
|
214
|
+
| `--deep` given but the phase artifact lacks the rollout/alternatives material | Generate writes `Not applicable — <reason>` for items that do not apply; never invents content |
|
|
168
215
|
|
|
169
216
|
## Notes
|
|
170
217
|
|
|
171
218
|
- Tier choice is recorded in the final plan's frontmatter as `tier: fast | standard | deep`
|
|
172
219
|
- The tier also influences the Tasks phase: Fast tier often produces 1–3 tasks; Standard 4–8; Deep 8+
|
|
173
|
-
- If the user overrides the tier, preserve the algorithm's recommendation in a `tier_recommended` field for audit
|
|
220
|
+
- If the user overrides the tier (explicit choice or `--deep`), preserve the algorithm's recommendation in a `tier_recommended` field for audit
|
|
174
221
|
- Tier selection is the primary "right-sizing" mechanism — Small tasks → short plans; complex work → more structure (per Plan Skill core principles)
|
|
@@ -98,7 +98,7 @@ tier_recommended: fast | standard | deep
|
|
|
98
98
|
- [Gap name] — [Follow-up action via /learn]
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
In `detailed` mode only, also save the design artifact to `docs/plans/.design/<design-id>.md` for future reference or reuse. The `interactionMode` and `complexity` values flow into the Generate artifact for tier selection. In `smart`/`autopilot` mode, do not write it; pass it to the next phase in context.
|
|
102
102
|
|
|
103
103
|
## Validation Rules
|
|
104
104
|
|
|
@@ -50,4 +50,4 @@ action: resume | review | archive | delete | create-new | none
|
|
|
50
50
|
- (Empty list if none found)
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
In `detailed` mode only, also save the scoped context to `docs/plans/.scope/<scope-id>.md` for future reference or reuse. The `interactionMode` value flows into `research`, `design`, and `generate` artifacts. In `smart`/`autopilot` mode, do not write it; pass it to the next phase in context.
|
package/skills/review/SKILL.md
CHANGED
|
@@ -35,6 +35,8 @@ Store in the context object:
|
|
|
35
35
|
interactionMode: detailed | smart | autopilot
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
**Artifact persistence:** intermediate phase artifacts are written to disk **only in `detailed` mode**. In `smart`/`autopilot` they are passed between phases in context and never written (see `references/interaction-mode-propagation.md#artifact-persistence`). Final deliverables are always written.
|
|
39
|
+
|
|
38
40
|
**Propagation:** `interactionMode` flows into the `scope`, `prepare`, `analyze`, and `report` artifacts; each downstream phase reads it to adjust confirmation behaviour (detailed = pause every transition; autopilot = run all; smart = pause only on `blocker`/`major` findings or detected scope creep).
|
|
39
41
|
|
|
40
42
|
## Orchestration Implementation
|
|
@@ -58,8 +60,9 @@ Each phase runs sequentially: the orchestrator calls the phase module, receives
|
|
|
58
60
|
|
|
59
61
|
Before starting the review pipeline, the orchestrator verifies that required folders exist:
|
|
60
62
|
|
|
61
|
-
- `docs/
|
|
62
|
-
- `docs/
|
|
63
|
+
- `docs/review/.report/` — must exist for saving the Review Report (always written)
|
|
64
|
+
- `docs/review/.scope/`, `docs/review/.prepare/`, `docs/review/.analyze/` — **`detailed` mode only**, for saving the intermediate phase artifacts; do not create them in `smart`/`autopilot`
|
|
65
|
+
- `docs/review/index.md` — must exist as the review registry (Report appends to it)
|
|
63
66
|
|
|
64
67
|
**Self-Healing:** If any are missing, the orchestrator automatically creates them (`mkdir -p`, and a seed `index.md` with a registry header). This allows the Review skill to run even if `arreio-init` wasn't explicitly run.
|
|
65
68
|
|
|
@@ -73,10 +76,10 @@ For **task-in-review** input, verify the `work-id` exists and contains at least
|
|
|
73
76
|
|
|
74
77
|
| Phase | Phase Module | Output Artifact | Saved to |
|
|
75
78
|
| ----- | ----------------------------- | ---------------------------------------------------------------- | ------------------------------------- |
|
|
76
|
-
| 1 | [Scope](modules/scope.md) | [Review scope](references/templates/artifacts/review-scope.md) | `docs/
|
|
77
|
-
| 2 | [Prepare](modules/prepare.md) | [Review kit](references/templates/artifacts/review-kit.md) | `docs/
|
|
78
|
-
| 3 | [Analyze](modules/analyze.md) | [Findings](references/templates/artifacts/findings.md) | `docs/
|
|
79
|
-
| 4 | [Report](modules/report.md) | [Review report](references/templates/artifacts/review-report.md) | `docs/
|
|
79
|
+
| 1 | [Scope](modules/scope.md) | [Review scope](references/templates/artifacts/review-scope.md) | `docs/review/.scope/<id>.md` _(detailed only)_ |
|
|
80
|
+
| 2 | [Prepare](modules/prepare.md) | [Review kit](references/templates/artifacts/review-kit.md) | `docs/review/.prepare/<id>.md` _(detailed only)_ |
|
|
81
|
+
| 3 | [Analyze](modules/analyze.md) | [Findings](references/templates/artifacts/findings.md) | `docs/review/.analyze/<id>.md` _(detailed only)_ |
|
|
82
|
+
| 4 | [Report](modules/report.md) | [Review report](references/templates/artifacts/review-report.md) | `docs/review/.report/<id>.md` |
|
|
80
83
|
|
|
81
84
|
### Quality Gates
|
|
82
85
|
|
|
@@ -99,7 +102,7 @@ Each phase is responsible for its own index updates:
|
|
|
99
102
|
| Scope | _(none — produces artifact only)_ | Allocates the `review-id`; no index write. |
|
|
100
103
|
| Prepare | _(none)_ | Gathers the review kit; no index write. |
|
|
101
104
|
| Analyze | _(none)_ | Produces findings; no index write. |
|
|
102
|
-
| Report | `docs/
|
|
105
|
+
| Report | `docs/review/index.md` | Append a registry row: `<report-id>`, review target summary, approval status, link to the report file. |
|
|
103
106
|
| Report | `docs/tasks/<work-id>/index.md` _(work-linked or task-in-review only)_ | Append a distinct `## Review Report — <report-id>` block (separate from Work's own `## Work Report` block). |
|
|
104
107
|
| Report | Task frontmatter _(task-in-review only)_ | Update task file `status:` field to `completed` (if approved) or `blocked` (if changes-requested, with reason in frontmatter). |
|
|
105
108
|
|
|
@@ -107,8 +110,8 @@ Each phase is responsible for its own index updates:
|
|
|
107
110
|
|
|
108
111
|
### FINAL OUTPUT
|
|
109
112
|
|
|
110
|
-
- **Review Report:** Saved to `docs/
|
|
111
|
-
- **Registry row:** `docs/
|
|
113
|
+
- **Review Report:** Saved to `docs/review/.report/<report-id>.md`, with: the change boundary, the approval status (`approved` / `changes-requested` / `rejected`), the graded findings rollup, recommendations, and (when requirements were available) the scope-creep summary.
|
|
114
|
+
- **Registry row:** `docs/review/index.md` updated with the new review.
|
|
112
115
|
- **(Work-linked or task-in-review only) Index cross-link:** `docs/tasks/<work-id>/index.md` gets a `## Review Report — <report-id>` block so a future glance at the work index shows that an external Review ran over it.
|
|
113
116
|
- **(Task-in-review only) Task Status Update:** ✅ **NEW**: For each task with `status: for-review`:
|
|
114
117
|
- If approval status = `approved` → update task file's frontmatter `status: completed`
|
|
@@ -143,6 +146,17 @@ Artifact templates live in [references/templates/artifacts/](references/template
|
|
|
143
146
|
| [findings.md](references/templates/artifacts/findings.md) | Analyze |
|
|
144
147
|
| [review-report.md](references/templates/artifacts/review-report.md) | Report |
|
|
145
148
|
|
|
149
|
+
## Execution Rules
|
|
150
|
+
|
|
151
|
+
Follow these literally; they exist to keep runs consistent across agents.
|
|
152
|
+
|
|
153
|
+
1. **Run each module's steps in order**, starting with its Step 0 verification. Do not skip, merge, or reorder steps.
|
|
154
|
+
2. **Never invent values.** If a required input is missing, apply the recovery in [error-handling.md](references/error-handling.md) or ask the user; do not fill it with a plausible guess.
|
|
155
|
+
3. **Compute, don't copy.** Values defined by a rule (finding severity, `approval-status`, scope-creep flag) must be derived from the cited rubric and the real findings — never judged by feel, and never copied from an example. Example values in references and templates are illustrations, never defaults.
|
|
156
|
+
4. **One question at a time**, with 2–4 concrete options; build the question text from the current values.
|
|
157
|
+
5. **Announce phase transitions in one line** (e.g., "Phase 2/4 Analyze complete: <key result>") so the user can follow progress, even in Autopilot.
|
|
158
|
+
6. **Honor write rules:** intermediate phase artifacts only in `detailed` mode; final deliverables always.
|
|
159
|
+
|
|
146
160
|
## Core Principles
|
|
147
161
|
|
|
148
162
|
- **Deterministic Pipeline:** Phases always execute in sequence (no agent switching, no fallback paths).
|
|
@@ -155,6 +169,7 @@ Artifact templates live in [references/templates/artifacts/](references/template
|
|
|
155
169
|
- **Test the Tests:** Reviewing changes includes evaluating the tests that accompany them — coverage, correctness of assertions, and whether they assert the intended Acceptance Criterion — not just production code.
|
|
156
170
|
- **Read-Only Review:** Review analyzes and reports; it never edits the code under review. Required changes become a follow-up task (a new `/plan` + `/work`, or manual edits) — never applied inline here.
|
|
157
171
|
- **Single Source of Truth:** This skill defines all its own rules; it does not depend on any external agent rule file. Category, severity, and approval definitions live once in their authoritative references and are never re-encoded inline in the modules.
|
|
172
|
+
- **Lean Persistence:** Phase artifacts hit disk only in `detailed` mode; `smart`/`autopilot` pass them in context to save tokens and time.
|
|
158
173
|
- **Transparent Artifacts:** Each phase produces an explicit output artifact for the next phase.
|
|
159
174
|
- **Behavior-Described, Tool-Agnostic:** Steps describe required capabilities ("read the diff", "run the test suite", "update the index"), not specific tool names; each agent maps to its native tools.
|
|
160
175
|
- **Interaction Mode Propagation:** `interactionMode` is read at the start of each subsequent phase and determines whether confirmation steps execute.
|
|
@@ -69,7 +69,7 @@ Tools never **create** a finding on their own outside the change boundary; they
|
|
|
69
69
|
### Step 5: Aggregate Tallies and Generate the Findings Artifact
|
|
70
70
|
|
|
71
71
|
1. **Aggregate** findings by category and count by severity. Compute preliminary tallies (Report derives the final approval status from these — Analyze does not pre-derive approval).
|
|
72
|
-
2. **Assign an `analyze-id`** per [id-generation.md](../references/id-generation.md) (format `YYYY-MM-DD-NNN-analyze`, saved to `docs/
|
|
72
|
+
2. **Assign an `analyze-id`** per [id-generation.md](../references/id-generation.md) (format `YYYY-MM-DD-NNN-analyze`, saved to `docs/review/.analyze/`). Reuse it if the user later picks **Edit & Retry**.
|
|
73
73
|
3. Produce a **Findings** block (as markdown) following the schema in [findings.md](../references/templates/artifacts/findings.md). Include:
|
|
74
74
|
- `analyze-id`, inherited `prepare-id`, `scope-id`, `review-id`, `input-shape`, `interactionMode`
|
|
75
75
|
- the findings list: per finding — `id`, `severity`, `category`, `location` (repository-relative `file:line` or `file:hunk`), `message`, `trace` **or** `scope-creep: true`, and an optional non-binding `suggested-fix` (Review is read-only — suggestions are informational, never applied)
|
|
@@ -90,7 +90,7 @@ Apply the **[phase confirmation behavior](../references/interaction-mode-propaga
|
|
|
90
90
|
- **Smart:** pause only when a pause trigger above is true; otherwise auto-proceed.
|
|
91
91
|
- **Autopilot:** auto-proceed (no confirmation).
|
|
92
92
|
|
|
93
|
-
Then save the artifact to `docs/
|
|
93
|
+
Then, **in `detailed` mode only**, save the artifact to `docs/review/.analyze/<analyze-id>.md` (ensure `interactionMode` included) and return it, with the `interactionMode` value, to the Orchestrator for the transition to Phase 4 (Report). In `smart` and `autopilot` mode, do **not** write the file; pass the artifact to the next phase in context (see [Artifact Persistence](../references/interaction-mode-propagation.md#artifact-persistence)).
|
|
94
94
|
|
|
95
95
|
## Output: Findings Artifact
|
|
96
96
|
|
|
@@ -99,6 +99,6 @@ Then save the artifact to `docs/plans/.review/.analyze/<analyze-id>.md` (ensure
|
|
|
99
99
|
- Verify the **scope-creep** category either ran (with `spec-content` not `none`) or is recorded `skipped (no requirements)` — never silently absent, never inventing requirements.
|
|
100
100
|
- Verify severities were **assigned from** [severity-rubric.md](../references/severity-rubric.md) rather than re-defined inline (no second rubric contradicting the authoritative reference).
|
|
101
101
|
- Verify the category checks were **run from** [review-categories.md](../references/review-categories.md) rather than re-encoded inline.
|
|
102
|
-
- Verify that the artifact is saved to `docs/
|
|
102
|
+
- Verify that, in `detailed` mode, the artifact is saved to `docs/review/.analyze/<analyze-id>.md`; in `smart`/`autopilot` mode, verify that **no** file was written and the artifact was passed to the next phase in context.
|
|
103
103
|
|
|
104
104
|
> Pass the Findings to `report` (Phase 4) for the approval-status derivation, the report write, and the registry / work-index cross-link.
|
|
@@ -68,7 +68,7 @@ If **no** linter/type-checker is configured for the repo, that is a Smart pause
|
|
|
68
68
|
|
|
69
69
|
### Step 5: Generate the Review Kit Artifact
|
|
70
70
|
|
|
71
|
-
1. **Assign a `prepare-id`** per [id-generation.md](../references/id-generation.md) (format `YYYY-MM-DD-NNN-prepare`, saved to `docs/
|
|
71
|
+
1. **Assign a `prepare-id`** per [id-generation.md](../references/id-generation.md) (format `YYYY-MM-DD-NNN-prepare`, saved to `docs/review/.prepare/`). Reuse it if the user later picks **Edit & Retry**.
|
|
72
72
|
|
|
73
73
|
2. Produce a **Review Kit** block (as markdown) following the schema in [review-kit.md](../references/templates/artifacts/review-kit.md). Include:
|
|
74
74
|
- `prepare-id`, inherited `scope-id` and `review-id`, `input-shape`, `interactionMode`
|
|
@@ -90,7 +90,7 @@ Apply the **[phase confirmation behavior](../references/interaction-mode-propaga
|
|
|
90
90
|
- **Smart:** pause only when a pause trigger above is true; otherwise auto-proceed.
|
|
91
91
|
- **Autopilot:** auto-proceed (no confirmation).
|
|
92
92
|
|
|
93
|
-
Then save the artifact to `docs/
|
|
93
|
+
Then, **in `detailed` mode only**, save the artifact to `docs/review/.prepare/<prepare-id>.md` (ensure `interactionMode` included) and return it, with the `interactionMode` value, to the Orchestrator for the transition to Phase 3 (Analyze). In `smart` and `autopilot` mode, do **not** write the file; pass the artifact to the next phase in context (see [Artifact Persistence](../references/interaction-mode-propagation.md#artifact-persistence)).
|
|
94
94
|
|
|
95
95
|
## Output: Review Kit Artifact
|
|
96
96
|
|
|
@@ -98,6 +98,6 @@ Then save the artifact to `docs/plans/.review/.prepare/<prepare-id>.md` (ensure
|
|
|
98
98
|
- Verify that every `required` file has a diff entry (or is recorded as deleted / `current-contents`) and that `context` is separated from `required`.
|
|
99
99
|
- Verify that `test-context` records covering tests per changed file and whether the change ships its own tests.
|
|
100
100
|
- Verify that `requirements-source: none` propagated as `spec: none` (so Analyze skips the requirements-vs-scope-creep category rather than guessing).
|
|
101
|
-
- Verify that the artifact is saved to `docs/
|
|
101
|
+
- Verify that, in `detailed` mode, the artifact is saved to `docs/review/.prepare/<prepare-id>.md`; in `smart`/`autopilot` mode, verify that **no** file was written and the artifact was passed to the next phase in context.
|
|
102
102
|
|
|
103
103
|
> Pass the Review Kit to `analyze` (Phase 3) for the categorized, severity-graded review of the diffs.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Report
|
|
3
|
-
description: Fourth and final step in the Review workflow. Derives the final approval status (approved / changes-requested / rejected) from the Findings per the authoritative approval criteria, composes non-binding recommendations, generates the Review Report, registers it in docs/
|
|
3
|
+
description: Fourth and final step in the Review workflow. Derives the final approval status (approved / changes-requested / rejected) from the Findings per the authoritative approval criteria, composes non-binding recommendations, generates the Review Report, registers it in docs/review/index.md, and (work-linked only) appends a distinct ## Review Report — <report-id> block to the work task index. Returns the Review Report as the Review skill's final deliverable.
|
|
4
4
|
type: module
|
|
5
5
|
version: 1.0
|
|
6
6
|
timestamp: "2026-08-08"
|
|
@@ -8,7 +8,7 @@ timestamp: "2026-08-08"
|
|
|
8
8
|
|
|
9
9
|
# Phase 4 - Report
|
|
10
10
|
|
|
11
|
-
**Purpose:** Fourth and final step in the Review workflow. Reads the [Findings](../references/templates/artifacts/findings.md) from Analyze, derives the final **approval status** (`approved` / `changes-requested` / `rejected`) per the authoritative criteria, composes non-binding recommendations, writes the [Review Report](../references/templates/artifacts/review-report.md), registers it in `docs/
|
|
11
|
+
**Purpose:** Fourth and final step in the Review workflow. Reads the [Findings](../references/templates/artifacts/findings.md) from Analyze, derives the final **approval status** (`approved` / `changes-requested` / `rejected`) per the authoritative criteria, composes non-binding recommendations, writes the [Review Report](../references/templates/artifacts/review-report.md), registers it in `docs/review/index.md`, and — for work-linked input only — appends a distinct `## Review Report — <report-id>` block to `docs/tasks/<work-id>/index.md` (clearly separate from Work's own `## Work Report` block). Returns the Review Report as the Review skill's final deliverable.
|
|
12
12
|
|
|
13
13
|
## Workflow
|
|
14
14
|
|
|
@@ -44,7 +44,7 @@ Derive the status deterministically from the tallies (count of `blocker`/`major`
|
|
|
44
44
|
|
|
45
45
|
### Step 3: Generate the Review Report Artifact
|
|
46
46
|
|
|
47
|
-
1. **Assign a `report-id`** per [id-generation.md](../references/id-generation.md) (format `YYYY-MM-DD-NNN-report`, saved to `docs/
|
|
47
|
+
1. **Assign a `report-id`** per [id-generation.md](../references/id-generation.md) (format `YYYY-MM-DD-NNN-report`, saved to `docs/review/.report/`). Reuse it if the user later picks **Edit & Retry**.
|
|
48
48
|
|
|
49
49
|
2. Produce a **Review Report** block (as markdown) following the schema in [review-report.md](../references/templates/artifacts/review-report.md). Include:
|
|
50
50
|
- `report-id`, inherited `analyze-id`, `prepare-id`, `scope-id`, `review-id`, `input-shape`, `interactionMode`
|
|
@@ -57,10 +57,10 @@ Derive the status deterministically from the tallies (count of `blocker`/`major`
|
|
|
57
57
|
|
|
58
58
|
### Step 4: Register in the Review Registry
|
|
59
59
|
|
|
60
|
-
Append a registry row to `docs/
|
|
60
|
+
Append a registry row to `docs/review/index.md`:
|
|
61
61
|
|
|
62
62
|
```
|
|
63
|
-
- <report-id> — <target-summary> — <approval-status> — docs/
|
|
63
|
+
- <report-id> — <target-summary> — <approval-status> — docs/review/.report/<report-id>.md
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
Create the index with a registry header (`# Reviews`) if it does not yet exist. The row is **idempotent on `report-id`**: a re-run overwrites the row with the same id, never duplicates it.
|
|
@@ -76,7 +76,7 @@ When `input-shape: work-linked`, append a **distinct** status block to `docs/tas
|
|
|
76
76
|
- **Findings:** <blocker> blocker, <major> major, <minor> minor, <nit> nit
|
|
77
77
|
- **Scope creep:** none | <count> | skipped (no requirements)
|
|
78
78
|
- **Learnings to capture:** <count> (run `/learn` to persist)
|
|
79
|
-
- **Review Report:** docs/
|
|
79
|
+
- **Review Report:** docs/review/.report/<report-id>.md
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
The block is **append-only** and **idempotent on `report-id`** (a re-run overwrites the block with the same id, never duplicates it). If the work index does not exist, skip the cross-link and note it in the report (do not fabricate a work index).
|
|
@@ -92,7 +92,7 @@ Apply the **[phase confirmation behavior](../references/interaction-mode-propaga
|
|
|
92
92
|
- **Smart:** pause only when a pause trigger above is true; otherwise auto-proceed.
|
|
93
93
|
- **Autopilot:** auto-proceed (no confirmation).
|
|
94
94
|
|
|
95
|
-
Then save the artifact to `docs/
|
|
95
|
+
Then save the artifact to `docs/review/.report/<report-id>.md` (ensure `interactionMode` included).
|
|
96
96
|
|
|
97
97
|
### Step 7: Return to Orchestrator
|
|
98
98
|
|
|
@@ -103,7 +103,7 @@ Return the Review Report to the Orchestrator — `path`, `report-id`, `review-id
|
|
|
103
103
|
- Verify that the Review Report is complete and valid: `report-id`, `analyze-id`, `prepare-id`, `scope-id`, `review-id`, `input-shape`, `interactionMode`, `approval-status`, the findings rollup, `recommendations`, `scope-creep-summary`, and `learnings-to-capture`.
|
|
104
104
|
- Verify that **findings coherence** held (re-verified in Step 0): every finding has a severity, category, repo-relative location, and a `trace` or `scope-creep: true`.
|
|
105
105
|
- Verify that the approval status was **derived from** [approval-criteria.md](../references/approval-criteria.md) rather than re-defined inline (no second rule contradicting the authoritative reference).
|
|
106
|
-
- Verify the registry row was appended to `docs/
|
|
107
|
-
- Verify that the artifact is saved to `docs/
|
|
106
|
+
- Verify the registry row was appended to `docs/review/index.md` (idempotent on `report-id`), and — for work-linked input — the distinct `## Review Report — <report-id>` block was appended to `docs/tasks/<work-id>/index.md` (idempotent, never colliding with Work's `## Work Report` block).
|
|
107
|
+
- Verify that the artifact is saved to `docs/review/.report/<report-id>.md`.
|
|
108
108
|
|
|
109
109
|
> The Review Report is the primary deliverable of the Review Skill. The Orchestrator marks the workflow complete; optionally chains to `/learn` when learnings were surfaced.
|
|
@@ -89,9 +89,9 @@ Search `docs/learn/index.md` for entries relevant to the review domains (the cha
|
|
|
89
89
|
|
|
90
90
|
### Step 6: Allocate review-id and Generate the Review Scope Artifact
|
|
91
91
|
|
|
92
|
-
1. **Allocate a `review-id`** of the form `YYYY-MM-DD-NNN` per [id-generation.md](../references/id-generation.md), counting existing `docs/
|
|
92
|
+
1. **Allocate a `review-id`** of the form `YYYY-MM-DD-NNN` per [id-generation.md](../references/id-generation.md), counting existing `docs/review/.scope/YYYY-MM-DD-NNN-scope.md` files (or registry rows) for today in `detailed` mode, or existing `docs/review/.report/` files in `smart`/`autopilot` (no scope file is written; see id-generation.md). This is the pipeline umbrella id (distinct from any Work `review-id` for work-linked input — the two skills produce independent artifacts; the `work-id` is carried alongside for traceability).
|
|
93
93
|
|
|
94
|
-
2. **Assign a `scope-id`** per [id-generation.md](../references/id-generation.md) (format `YYYY-MM-DD-NNN-scope`, saved to `docs/
|
|
94
|
+
2. **Assign a `scope-id`** per [id-generation.md](../references/id-generation.md) (format `YYYY-MM-DD-NNN-scope`, saved to `docs/review/.scope/`). Reuse it if the user later picks **Edit & Retry**.
|
|
95
95
|
|
|
96
96
|
3. Produce a **Review Scope Artifact** block (as markdown) following the schema in [review-scope.md](../references/templates/artifacts/review-scope.md). Include:
|
|
97
97
|
- `scope-id`, `review-id`, `input-shape`, `interactionMode`
|
|
@@ -113,7 +113,7 @@ Apply the **[phase confirmation behavior](../references/interaction-mode-propaga
|
|
|
113
113
|
- **Smart:** pause only when a pause trigger above is true; otherwise auto-proceed.
|
|
114
114
|
- **Autopilot:** auto-proceed (no confirmation).
|
|
115
115
|
|
|
116
|
-
Then save the artifact to `docs/
|
|
116
|
+
Then, **in `detailed` mode only**, save the artifact to `docs/review/.scope/<scope-id>.md` (ensure `interactionMode`, `input-shape`, and `review-id` are included) and return it, with the `interactionMode` value, to the Orchestrator for the transition to Phase 2 (Prepare). In `smart` and `autopilot` mode, do **not** write the file; pass the artifact to the next phase in context (see [Artifact Persistence](../references/interaction-mode-propagation.md#artifact-persistence)).
|
|
117
117
|
|
|
118
118
|
## Output: Review Scope Artifact
|
|
119
119
|
|
|
@@ -121,6 +121,6 @@ Then save the artifact to `docs/plans/.review/.scope/<scope-id>.md` (ensure `int
|
|
|
121
121
|
- Verify that the change boundary is in **dependency-safe** form: `required` files are repository-relative and carry a status; `context` is separated from `required`.
|
|
122
122
|
- Verify that `review-id` was allocated (scope is the allocating phase) and that `work-id` is carried for work-linked input.
|
|
123
123
|
- Verify that scope-creep detection was run only when requirements were present (else explicitly skipped with a note), per [scope-creep-detection.md](../references/scope-creep-detection.md).
|
|
124
|
-
- Verify that the artifact is saved to `docs/
|
|
124
|
+
- Verify that, in `detailed` mode, the artifact is saved to `docs/review/.scope/<scope-id>.md`; in `smart`/`autopilot` mode, verify that **no** file was written and the artifact was passed to the next phase in context.
|
|
125
125
|
|
|
126
126
|
> Pass the Review Scope to `prepare` (Phase 2) to gather the diffs, spec content, test context, and tool inventory.
|
|
@@ -85,7 +85,7 @@ Errors encountered while saving or reading artifact files.
|
|
|
85
85
|
| Target directory does not exist | Create directory (`mkdir -p`); treat counter as 0; start from 001 | No |
|
|
86
86
|
| Counter directory exists but no files match date | Start counter at 001 | No |
|
|
87
87
|
| File write permission denied | Log error; ask user to check permissions; retry once | Yes, after 1 retry |
|
|
88
|
-
| `docs/
|
|
88
|
+
| `docs/review/index.md` registry missing | Create it with a `# Reviews` header (Pre-Flight already creates; idempotent) | No |
|
|
89
89
|
| `docs/tasks/<work-id>/index.md` missing (Report cross-link) | Skip the cross-link; note the absence in the report (do not fabricate a work index) | No |
|
|
90
90
|
|
|
91
91
|
### Category 5: Interaction Mode Errors
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Artifact ID Generation
|
|
3
|
-
description: Reference for Scope, Prepare, Analyze, and Report phases. Defines the daily-counter algorithm for unique artifact IDs, the review-id umbrella allocation (distinct from a Work review-id), the recycle-on-edit rule, and the shared counter layout under docs/
|
|
3
|
+
description: Reference for Scope, Prepare, Analyze, and Report phases. Defines the daily-counter algorithm for unique artifact IDs, the review-id umbrella allocation (distinct from a Work review-id), the recycle-on-edit rule, and the shared counter layout under docs/review/.
|
|
4
4
|
type: reference
|
|
5
5
|
version: 1.0
|
|
6
6
|
timestamp: "2026-08-08"
|
|
@@ -12,12 +12,12 @@ Shared ID algorithm for the `scope`, `prepare`, `analyze`, and `report` phases,
|
|
|
12
12
|
|
|
13
13
|
## ID Format by Phase
|
|
14
14
|
|
|
15
|
-
| Phase | ID format | Saved to |
|
|
15
|
+
| Phase | ID format | Saved to (detailed only) |
|
|
16
16
|
| -------- | ----------------------------------- | ----------------------------------- |
|
|
17
|
-
| Scope | `YYYY-MM-DD-NNN-scope` | `docs/
|
|
18
|
-
| Prepare | `YYYY-MM-DD-NNN-prepare` | `docs/
|
|
19
|
-
| Analyze | `YYYY-MM-DD-NNN-analyze` | `docs/
|
|
20
|
-
| Report | `YYYY-MM-DD-NNN-report` | `docs/
|
|
17
|
+
| Scope | `YYYY-MM-DD-NNN-scope` | `docs/review/.scope/<id>.md` |
|
|
18
|
+
| Prepare | `YYYY-MM-DD-NNN-prepare` | `docs/review/.prepare/<id>.md` |
|
|
19
|
+
| Analyze | `YYYY-MM-DD-NNN-analyze` | `docs/review/.analyze/<id>.md` |
|
|
20
|
+
| Report | `YYYY-MM-DD-NNN-report` | `docs/review/.report/<id>.md` |
|
|
21
21
|
|
|
22
22
|
`review-id` (see below) is the umbrella shared across all four artifacts of a single review run.
|
|
23
23
|
|
|
@@ -25,19 +25,21 @@ Shared ID algorithm for the `scope`, `prepare`, `analyze`, and `report` phases,
|
|
|
25
25
|
|
|
26
26
|
The `review-id` is the umbrella key that ties all four phase artifacts together and keys the registry row / work-index block. It is allocated **once** in Scope Step 2 (the allocating phase) and carried through Prepare/Analyze/Report unchanged.
|
|
27
27
|
|
|
28
|
-
**Format:** `YYYY-MM-DD-NNN` (date + zero-padded 3-digit daily counter), counting existing `docs/
|
|
28
|
+
**Format:** `YYYY-MM-DD-NNN` (date + zero-padded 3-digit daily counter), counting existing `docs/review/.scope/YYYY-MM-DD-NNN-scope.md` files for that date (the scope phase is the allocating phase, so its counter is the source of truth for the umbrella id).
|
|
29
29
|
|
|
30
|
-
> **Distinct from a Work `review-id`.** When Review is invoked over a `/work` run (`input-shape: work-linked`), the Work skill's own `review-id` (`docs/plans/.work/.review/...`) **already exists**. The Review skill allocates its **own** `review-id` (`docs/
|
|
30
|
+
> **Distinct from a Work `review-id`.** When Review is invoked over a `/work` run (`input-shape: work-linked`), the Work skill's own `review-id` (`docs/plans/.work/.review/...`) **already exists**. The Review skill allocates its **own** `review-id` (`docs/review/...`) — the two skills produce independent artifacts and never share an id. The `work-id` is carried alongside in the Review artifacts for traceability and the work-index cross-link, but `review-id` ≠ Work `review-id`.
|
|
31
|
+
|
|
32
|
+
> **Persistence by mode.** The "Saved to" column and the directory-listing algorithm below apply **only in `detailed` mode**. In `smart`/`autopilot` mode phase artifacts are not written, so no directory is listed: Allocate `review-id` NNN by counting today's files in `docs/review/.report/` (+1); `scope-id`/`prepare-id`/`analyze-id` reuse that NNN as in-memory labels. See [Artifact Persistence](interaction-mode-propagation.md#artifact-persistence).
|
|
31
33
|
|
|
32
34
|
## Algorithm (new phase artifact)
|
|
33
35
|
|
|
34
36
|
```
|
|
35
37
|
1. Get the current date in UTC (e.g., 2026-08-08)
|
|
36
38
|
2. List existing files for today in the phase's save directory:
|
|
37
|
-
- scope -> docs/
|
|
38
|
-
- prepare -> docs/
|
|
39
|
-
- analyze -> docs/
|
|
40
|
-
- report -> docs/
|
|
39
|
+
- scope -> docs/review/.scope/ matching YYYY-MM-DD-*-scope.md
|
|
40
|
+
- prepare -> docs/review/.prepare/ matching YYYY-MM-DD-*-prepare.md
|
|
41
|
+
- analyze -> docs/review/.analyze/ matching YYYY-MM-DD-*-analyze.md
|
|
42
|
+
- report -> docs/review/.report/ matching YYYY-MM-DD-*-report.md
|
|
41
43
|
3. NNN = (count + 1), zero-padded to 3 digits (001, 002, ..., 010, ...)
|
|
42
44
|
4. id = "<date>-<NNN>-<phase>"
|
|
43
45
|
```
|
|
@@ -50,7 +52,7 @@ Allocated **only** in Scope Step 2:
|
|
|
50
52
|
|
|
51
53
|
```
|
|
52
54
|
1. Get the current date in UTC
|
|
53
|
-
2. List existing files under docs/
|
|
55
|
+
2. List existing files under docs/review/.scope/ matching YYYY-MM-DD-NNN-scope.md for that date
|
|
54
56
|
3. NNN = (highest existing NNN for that date), zero-padded to 3 digits
|
|
55
57
|
- if none exist for that date, start at 001
|
|
56
58
|
4. review-id = "<date>-<NNN>" (the same NNN as the scope-id being allocated)
|
|
@@ -61,7 +63,7 @@ Because `review-id` reuses the scope counter's NNN, the umbrella id and the `sco
|
|
|
61
63
|
|
|
62
64
|
## Recycle on Edit & Retry
|
|
63
65
|
|
|
64
|
-
When the user picks **Edit & Retry** at a phase confirmation, **reuse the original ID** and overwrite the existing artifact file. Do **not** increment the counter. This keeps IDs stable across iterations and prevents orphaned artifacts. The Report phase's registry row in `docs/
|
|
66
|
+
When the user picks **Edit & Retry** at a phase confirmation, **reuse the original ID** and overwrite the existing artifact file. Do **not** increment the counter. This keeps IDs stable across iterations and prevents orphaned artifacts. The Report phase's registry row in `docs/review/index.md` and the `## Review Report — <report-id>` block in the work index are likewise idempotent on `report-id` (overwritten, never duplicated).
|
|
65
67
|
|
|
66
68
|
## Error Handling
|
|
67
69
|
|
|
@@ -69,12 +71,12 @@ When the user picks **Edit & Retry** at a phase confirmation, **reuse the origin
|
|
|
69
71
|
| ----------------------------------------------- | -------------------------------------------- |
|
|
70
72
|
| Phase save directory does not exist | Create it; treat count as 0; start from 001 |
|
|
71
73
|
| Directory exists but no files match today's date | Start counter at 001 |
|
|
72
|
-
| `docs/
|
|
74
|
+
| `docs/review/` missing | Create it (Pre-Flight already creates; idempotent) |
|
|
73
75
|
| Write permission denied | Log error; ask the user; retry once |
|
|
74
76
|
|
|
75
77
|
## Notes
|
|
76
78
|
|
|
77
|
-
- IDs reuse the daily-counter algorithm for cross-skill consistency with `/plan` and `/work`; the Review skill's counters are independent from those skills (separate save directories under `docs/
|
|
79
|
+
- IDs reuse the daily-counter algorithm for cross-skill consistency with `/plan` and `/work`; the Review skill's counters are independent from those skills (separate save directories under `docs/review/` vs `.work/`).
|
|
78
80
|
- `review-id` carries through every artifact (`scope-id` artifacts record it; Prepare/Analyze/Report inherit it), so cross-phase chaining is `scope-id → prepare-id → analyze-id → report-id`, all sharing one `review-id` (see [error-handling.md](error-handling.md) "Cross-Phase Consistency Checks").
|
|
79
81
|
- For work-linked input, `work-id` is **additionally** carried (inherited from the Review Input Artifact), distinct from `review-id`, for the registry cross-link only.
|
|
80
82
|
- Counter collisions are impossible within a date because each phase writes to its own directory and recomputes the count from the directory listing.
|
|
@@ -77,4 +77,24 @@ Review deliberately has **no** `executionMode`:
|
|
|
77
77
|
| Invalid mode value | Reject; re-prompt Orchestrator |
|
|
78
78
|
| Artifact missing mode field | Assume "smart"; log warning; continue |
|
|
79
79
|
| User selects "Abort" | Stop immediately; inform Orchestrator |
|
|
80
|
-
| Timeout/connection lost | Pause; ask user to retry or abort |
|
|
80
|
+
| Timeout/connection lost | Pause; ask user to retry or abort |
|
|
81
|
+
|
|
82
|
+
## Artifact Persistence
|
|
83
|
+
|
|
84
|
+
Phase artifacts (Scope, Prepare, Analyze) are **handoff data between phases**, not deliverables. Whether they are written to disk depends on `interactionMode`:
|
|
85
|
+
|
|
86
|
+
| Mode | Phase artifacts (`docs/review/.scope/`, `.prepare/`, `.analyze/`) | Phase handoff |
|
|
87
|
+
| ------------- | ---------------------------------------- | ---------------------------------------------- |
|
|
88
|
+
| **Detailed** | Written to the hidden directories (audit trail; creating the directory on first use) | Artifact is written, shown, then passed on |
|
|
89
|
+
| **Smart** | **Not written** | Artifact is held in context and passed in-memory to the next phase |
|
|
90
|
+
| **Autopilot** | **Not written** | Artifact is held in context and passed in-memory to the next phase |
|
|
91
|
+
|
|
92
|
+
**Always written, in every mode:** the Review Report in `docs/review/.report/<report-id>.md` and its row in `docs/review/index.md` (a cross-skill handoff read by `/learn`).
|
|
93
|
+
|
|
94
|
+
**Rules:**
|
|
95
|
+
|
|
96
|
+
- The artifact schema, quality gates, cross-phase ID checks, and pause triggers are **unchanged** — only the disk write is skipped. Validate and pass the in-memory artifact exactly as you would the file.
|
|
97
|
+
- Never create the hidden directories in `smart`/`autopilot`; no placeholder or empty files.
|
|
98
|
+
- **ID allocation without files:** Allocate `review-id` NNN by counting today's files in `docs/review/.report/` (+1); `scope-id`/`prepare-id`/`analyze-id` reuse that NNN as in-memory labels.
|
|
99
|
+
- If the user switches to `detailed` mid-run, write the artifacts produced so far, then continue writing.
|
|
100
|
+
- Because nothing is on disk, **Edit & Retry** reuses the in-memory artifact and its id (no file to overwrite).
|