arreio 1.0.0-dev.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/README.md +81 -0
- package/package.json +42 -0
- package/scripts/postinstall.js +50 -0
- package/skills/arreio-init/SKILL.md +214 -0
- package/skills/arreio-init/references/architecture-template.md +85 -0
- package/skills/arreio-init/references/learn-index-template.md +15 -0
- package/skills/arreio-init/references/plan-index-template.md +29 -0
- package/skills/arreio-init/references/tasks-index-template.md +15 -0
- package/skills/learn/SKILL.md +151 -0
- package/skills/learn/modules/capture.md +108 -0
- package/skills/learn/modules/index.md +94 -0
- package/skills/learn/modules/maintain.md +116 -0
- package/skills/learn/modules/refine.md +104 -0
- package/skills/learn/references/dedup-rules.md +129 -0
- package/skills/learn/references/entry-schema.md +152 -0
- package/skills/learn/references/error-handling.md +178 -0
- package/skills/learn/references/id-generation.md +114 -0
- package/skills/learn/references/index-format.md +140 -0
- package/skills/learn/references/interaction-mode-propagation.md +89 -0
- package/skills/learn/references/migration-bootstrap.md +142 -0
- package/skills/learn/references/templates/artifacts/captured-entry.md +172 -0
- package/skills/learn/references/templates/artifacts/index-update.md +135 -0
- package/skills/learn/references/templates/artifacts/learn-input.md +100 -0
- package/skills/learn/references/templates/artifacts/maintain-log.md +142 -0
- package/skills/learn/references/templates/artifacts/refined-entry.md +168 -0
- package/skills/plan/SKILL.md +129 -0
- package/skills/plan/modules/design.md +140 -0
- package/skills/plan/modules/generate.md +156 -0
- package/skills/plan/modules/research.md +122 -0
- package/skills/plan/modules/scope.md +121 -0
- package/skills/plan/modules/tasks.md +190 -0
- package/skills/plan/references/design-complexity-assessment.md +118 -0
- package/skills/plan/references/error-handling.md +155 -0
- package/skills/plan/references/external-research-guidance.md +61 -0
- package/skills/plan/references/high-risk-detection.md +111 -0
- package/skills/plan/references/id-generation.md +55 -0
- package/skills/plan/references/interaction-mode-propagation.md +75 -0
- package/skills/plan/references/learnings-gate-logic.md +93 -0
- package/skills/plan/references/plan-tier-selection.md +174 -0
- package/skills/plan/references/task-slicing-rules.md +220 -0
- package/skills/plan/references/templates/artifacts/design.md +134 -0
- package/skills/plan/references/templates/artifacts/final-plan.md +265 -0
- package/skills/plan/references/templates/artifacts/research-findings.md +50 -0
- package/skills/plan/references/templates/artifacts/scoped-context.md +53 -0
- package/skills/plan/references/templates/artifacts/task.md +192 -0
- package/skills/plan/references/templates/artifacts/user-input.md +112 -0
- package/skills/review/SKILL.md +163 -0
- package/skills/review/modules/analyze.md +104 -0
- package/skills/review/modules/prepare.md +103 -0
- package/skills/review/modules/report.md +109 -0
- package/skills/review/modules/scope.md +126 -0
- package/skills/review/references/approval-criteria.md +101 -0
- package/skills/review/references/change-set-resolution.md +126 -0
- package/skills/review/references/error-handling.md +172 -0
- package/skills/review/references/id-generation.md +80 -0
- package/skills/review/references/interaction-mode-propagation.md +80 -0
- package/skills/review/references/review-categories.md +124 -0
- package/skills/review/references/scope-creep-detection.md +120 -0
- package/skills/review/references/severity-rubric.md +107 -0
- package/skills/review/references/templates/artifacts/findings.md +161 -0
- package/skills/review/references/templates/artifacts/review-input.md +116 -0
- package/skills/review/references/templates/artifacts/review-kit.md +135 -0
- package/skills/review/references/templates/artifacts/review-report.md +175 -0
- package/skills/review/references/templates/artifacts/review-scope.md +146 -0
- package/skills/work/SKILL.md +163 -0
- package/skills/work/modules/execute.md +109 -0
- package/skills/work/modules/prepare.md +140 -0
- package/skills/work/modules/review.md +164 -0
- package/skills/work/modules/triage.md +181 -0
- package/skills/work/references/ad-hoc-input-resolution.md +122 -0
- package/skills/work/references/error-handling.md +183 -0
- package/skills/work/references/execution-mode-selection.md +95 -0
- package/skills/work/references/id-generation.md +85 -0
- package/skills/work/references/interaction-mode-propagation.md +80 -0
- package/skills/work/references/review-checklist.md +94 -0
- package/skills/work/references/task-execution-rules.md +116 -0
- package/skills/work/references/templates/artifacts/execution-log.md +123 -0
- package/skills/work/references/templates/artifacts/execution-plan.md +111 -0
- package/skills/work/references/templates/artifacts/work-input.md +78 -0
- package/skills/work/references/templates/artifacts/work-manifest.md +119 -0
- package/skills/work/references/templates/artifacts/work-report.md +143 -0
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Review Report Artifact
|
|
3
|
+
description: Template for the Review Report Artifact produced by the Report phase. Carries the approval status (approved / changes-requested / rejected) with rationale, the findings rollup (counts by severity and by category), non-binding recommendations, the scope-creep summary, learnings-to-capture for /learn, and the registry/work-index registration state. The Review skill's final deliverable.
|
|
4
|
+
type: template
|
|
5
|
+
version: 1.0
|
|
6
|
+
timestamp: "2026-08-08"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Review Report Artifact
|
|
10
|
+
|
|
11
|
+
The product of the **Report** phase is the Review Report — the Review skill's final deliverable. It records the **approval status** (`approved` / `changes-requested` / `rejected`) derived deterministically from the Findings tallies per [approval-criteria.md](../../approval-criteria.md), with a one-line rationale tied to the counts; the findings rollup (by severity and by category); non-binding **recommendations**; the **scope-creep summary**; **learnings-to-capture** candidates (handed to `/learn`); and the registration state. A registry row is appended to `docs/plans/.review/index.md` always; for work-linked input, a distinct `## Review Report — <report-id>` block is appended to `docs/tasks/<work-id>/index.md`.
|
|
12
|
+
|
|
13
|
+
## Schema
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
report-id: YYYY-MM-DD-NNN-report
|
|
17
|
+
analyze-id: YYYY-MM-DD-NNN-analyze
|
|
18
|
+
prepare-id: YYYY-MM-DD-NNN-prepare
|
|
19
|
+
scope-id: YYYY-MM-DD-NNN-scope
|
|
20
|
+
review-id: YYYY-MM-DD-NNN
|
|
21
|
+
input-shape: change-set | work-linked | ad-hoc
|
|
22
|
+
interactionMode: detailed | smart | autopilot
|
|
23
|
+
status: complete
|
|
24
|
+
timestamp: ISO-8601 timestamp
|
|
25
|
+
|
|
26
|
+
approval-status: approved | changes-requested | rejected
|
|
27
|
+
rationale: "[one-line, tied to the driving counts]"
|
|
28
|
+
|
|
29
|
+
findings-rollup:
|
|
30
|
+
by-severity: { blocker: <N>, major: <N>, minor: <N>, nit: <N> }
|
|
31
|
+
by-category: { quality: <N>, security: <N>, tests: <N>, documentation: <N>, integration: <N>, scope-creep: <N> }
|
|
32
|
+
total: <N>
|
|
33
|
+
|
|
34
|
+
recommendations:
|
|
35
|
+
blocking: [ "F<NN> @ <location>: <action>" # for changes-requested/rejected — actionable blocker/major fixes
|
|
36
|
+
| null ]
|
|
37
|
+
polish: [ "F<NN> @ <location>: <optional improvement>" # for approved (minor/nit) suggestions
|
|
38
|
+
| null ]
|
|
39
|
+
|
|
40
|
+
scope-creep-summary: none | "<count> finding(s)" | "skipped (no requirements)"
|
|
41
|
+
|
|
42
|
+
learnings-to-capture:
|
|
43
|
+
- title: "[working title]"
|
|
44
|
+
domain: [primary domain]
|
|
45
|
+
source: { finding-id } # the finding id where this surfaced
|
|
46
|
+
summary: "[1-2 sentence summary]"
|
|
47
|
+
type: confirmed-pattern | refuted-assumption | gotcha | forced-decision
|
|
48
|
+
|
|
49
|
+
learning-gaps:
|
|
50
|
+
- gap_name: "[Domain] — [what's missing]"
|
|
51
|
+
domain: [primary domain]
|
|
52
|
+
suggested_action: "Research external resource" | "Document post-review"
|
|
53
|
+
|
|
54
|
+
work-id: YYYY-MM-DD-NNN | null # work-linked only; null otherwise
|
|
55
|
+
|
|
56
|
+
registration:
|
|
57
|
+
registry-row-appended: true # appended to docs/plans/.review/index.md (idempotent on report-id)
|
|
58
|
+
work-index-block-appended: true | skipped # work-linked only; skipped if the work index is missing
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Also save the Review Report to `docs/plans/.review/.report/<report-id>.md`.
|
|
62
|
+
|
|
63
|
+
## Closing Blocks
|
|
64
|
+
|
|
65
|
+
### Registry row (appended to `docs/plans/.review/index.md`, always)
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
- <report-id> — <target-summary> — <approval-status> — docs/plans/.review/.report/<report-id>.md
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Work-index block (appended to `docs/tasks/<work-id>/index.md`, work-linked only)
|
|
72
|
+
|
|
73
|
+
```markdown
|
|
74
|
+
## Review Report — <report-id>
|
|
75
|
+
|
|
76
|
+
- **Status:** approved | changes-requested | rejected
|
|
77
|
+
- **Findings:** <blocker> blocker, <major> major, <minor> minor, <nit> nit
|
|
78
|
+
- **Scope creep:** none | <count> | skipped (no requirements)
|
|
79
|
+
- **Learnings to capture:** <count> (run `/learn` to persist)
|
|
80
|
+
- **Review Report:** docs/plans/.review/.report/<report-id>.md
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Both the registry row and the work-index block are **append-only** and **idempotent on `report-id`**: a re-run overwrites the entry with the same id, never duplicates it. The work-index block is deliberately distinct from Work's own `## Work Report — <review-id>` block (different label, different skill, different `report-id`).
|
|
84
|
+
|
|
85
|
+
## Validation Rules
|
|
86
|
+
|
|
87
|
+
- **report-id:** Required. Format `YYYY-MM-DD-NNN-report`.
|
|
88
|
+
- **analyze-id, prepare-id, scope-id, review-id, input-shape:** Required, inherited (cross-phase consistency).
|
|
89
|
+
- **interactionMode:** Required, identical across Prepare/Analyze/Report (orchestrator quality gate #2).
|
|
90
|
+
- **approval-status:** Required. One of `approved`, `changes-requested`, `rejected`, derived per [approval-criteria.md](../../approval-criteria.md) (the derivation is non-discretionary: `rejected` iff blocker ≥ 1; `changes-requested` iff no blocker and (major ≥ 1 or scope-creep present); `approved` otherwise).
|
|
91
|
+
- **rationale:** Required. One line surfacing the driving counts.
|
|
92
|
+
- **findings-rollup:** Required. Counts by severity and by category must match the Findings artifact's tallies.
|
|
93
|
+
- **recommendations:** Required. `blocking` populated for `changes-requested`/`rejected` (actionable blocker/major fixes); `polish` populated for `approved` (minor/nit). Either list may be empty (e.g. a genuinely clean approved review has `blocking: null`, `polish: []`).
|
|
94
|
+
- **scope-creep-summary:** Required. `none`, `"<count> finding(s)"`, or `skipped (no requirements)` (consistent with the Findings `scope-creep-ran`).
|
|
95
|
+
- **learnings-to-capture:** Required (may be empty). Each candidate has title/domain/source/summary/type. Review does not write `docs/learn/` directly — these are handed to `/learn`.
|
|
96
|
+
- **learning-gaps:** Required (may be empty).
|
|
97
|
+
- **work-id:** Required for work-linked input (and the work-index block is then expected); `null` otherwise (and the work-index block is `skipped`).
|
|
98
|
+
- **registration.registry-row-appended:** Required, must be `true`.
|
|
99
|
+
- **registration.work-index-block-appended:** Required for work-linked input (`true` or `skipped`); `skipped` for other input.
|
|
100
|
+
- **status:** Required. `complete`.
|
|
101
|
+
|
|
102
|
+
## Example (changes-requested — two majors, one scope-creep)
|
|
103
|
+
|
|
104
|
+
```yaml
|
|
105
|
+
report-id: 2026-08-08-001-report
|
|
106
|
+
analyze-id: 2026-08-08-001-analyze
|
|
107
|
+
prepare-id: 2026-08-08-001-prepare
|
|
108
|
+
scope-id: 2026-08-08-001-scope
|
|
109
|
+
review-id: 2026-08-08-001
|
|
110
|
+
input-shape: change-set
|
|
111
|
+
interactionMode: smart
|
|
112
|
+
status: complete
|
|
113
|
+
timestamp: 2026-08-08T15:45:00Z
|
|
114
|
+
approval-status: changes-requested
|
|
115
|
+
rationale: "2 major finding(s) and 1 scope-creep finding(s); no blocker"
|
|
116
|
+
findings-rollup:
|
|
117
|
+
by-severity: { blocker: 0, major: 2, minor: 1, nit: 0 }
|
|
118
|
+
by-category: { quality: 1, security: 0, tests: 1, documentation: 0, integration: 0, scope-creep: 1 }
|
|
119
|
+
total: 3
|
|
120
|
+
recommendations:
|
|
121
|
+
blocking:
|
|
122
|
+
- "F01 @ src/lib/session-store.ts:22: Add tests for get/save/delete per C2"
|
|
123
|
+
- "F02 @ src/lib/cache.ts:hunk-1: Split the cache layer off into its own task or roll back"
|
|
124
|
+
polish:
|
|
125
|
+
- "F03 @ src/lib/redis-client.ts:42: Extract MAX_RETRIES constant"
|
|
126
|
+
scope-creep-summary: "1 finding(s)"
|
|
127
|
+
learnings-to-capture:
|
|
128
|
+
- title: "TTL cache layers tend to creep into session-store changes — split before estimating"
|
|
129
|
+
domain: data-storage
|
|
130
|
+
source: { finding-id: F02 }
|
|
131
|
+
summary: "Scope-creep finding F02 recurred; confirming the pattern of cache layers bundling into session work."
|
|
132
|
+
type: confirmed-pattern
|
|
133
|
+
learning-gaps: []
|
|
134
|
+
work-id: null
|
|
135
|
+
registration:
|
|
136
|
+
registry-row-appended: true
|
|
137
|
+
work-index-block-appended: skipped
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Example (approved — clean review)
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
report-id: 2026-08-08-002-report
|
|
144
|
+
analyze-id: 2026-08-08-002-analyze
|
|
145
|
+
prepare-id: 2026-08-08-002-prepare
|
|
146
|
+
scope-id: 2026-08-08-002-scope
|
|
147
|
+
review-id: 2026-08-08-002
|
|
148
|
+
input-shape: ad-hoc
|
|
149
|
+
interactionMode: autopilot
|
|
150
|
+
status: complete
|
|
151
|
+
timestamp: 2026-08-08T15:50:00Z
|
|
152
|
+
approval-status: approved
|
|
153
|
+
rationale: "no blocker, no major, no scope-creep (0 minor, 0 nit)"
|
|
154
|
+
findings-rollup:
|
|
155
|
+
by-severity: { blocker: 0, major: 0, minor: 0, nit: 0 }
|
|
156
|
+
by-category: { quality: 0, security: 0, tests: 0, documentation: 0, integration: 0, scope-creep: 0 }
|
|
157
|
+
total: 0
|
|
158
|
+
recommendations:
|
|
159
|
+
blocking: null
|
|
160
|
+
polish: []
|
|
161
|
+
scope-creep-summary: "skipped (no requirements)"
|
|
162
|
+
learnings-to-capture: []
|
|
163
|
+
learning-gaps: []
|
|
164
|
+
work-id: null
|
|
165
|
+
registration:
|
|
166
|
+
registry-row-appended: true
|
|
167
|
+
work-index-block-appended: skipped
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Notes
|
|
171
|
+
|
|
172
|
+
- The Review Report is the primary deliverable of the Review skill. The Orchestrator marks the workflow complete and may chain to `/learn` when `learnings-to-capture` is non-empty.
|
|
173
|
+
- Approval is **non-discretionary**: the same tallies always produce the same status. Reviewer judgment lives in finding severities and the scope-creep flag, not in the approval derivation (see [approval-criteria.md](../../approval-criteria.md)).
|
|
174
|
+
- **No GitHub sync:** this skill does not post comments/reviews/labels. The registry row + (work-linked) work-index block are the only outbound writes — both local, both on disk.
|
|
175
|
+
- For work-linked input, Review's `approval-status` is **independent** of Work's own `work-state`; the two verdicts coexist (the `## Review Report` block sits next to Work's `## Work Report` block).
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Review Scope Artifact
|
|
3
|
+
description: Template for the Review Scope Artifact produced by the Scope phase. Carries the resolved change boundary (required files with status + context callers + attribution), the requirements source and parsed spec-content, the preliminary scope-creep check, related learnings, and the allocated review-id umbrella; consumed by Prepare.
|
|
4
|
+
type: template
|
|
5
|
+
version: 1.0
|
|
6
|
+
timestamp: "2026-08-08"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Review Scope Artifact
|
|
10
|
+
|
|
11
|
+
The product of the **Scope** phase is a resolved Review Scope: a concrete **change boundary** (`required` files with status, an optional `context` list, an `attribution`/`diff-source`), the resolved **requirements source** (and parsed `spec-content` when present), the **preliminary scope-creep** check, related learnings, and the allocated **`review-id` umbrella** (Scope is the allocating phase). Prepare consumes it.
|
|
12
|
+
|
|
13
|
+
## Schema
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
scope-id: YYYY-MM-DD-NNN-scope
|
|
17
|
+
review-id: YYYY-MM-DD-NNN # umbrella id, allocated here, carried through all 4 artifacts
|
|
18
|
+
input-shape: change-set | work-linked | ad-hoc
|
|
19
|
+
interactionMode: detailed | smart | autopilot
|
|
20
|
+
status: complete
|
|
21
|
+
timestamp: ISO-8601 timestamp
|
|
22
|
+
|
|
23
|
+
change-boundary:
|
|
24
|
+
required:
|
|
25
|
+
- path: "src/lib/redis-client.ts"
|
|
26
|
+
status: added | modified | deleted | renamed
|
|
27
|
+
renamed-from: "<old path>" # only for renamed
|
|
28
|
+
tentative: false | true # true only for work-linked blocked/skipped-task files
|
|
29
|
+
context:
|
|
30
|
+
- path: "src/api/session.ts"
|
|
31
|
+
role: "caller of redis-client.connect()"
|
|
32
|
+
attribution: commits | working-tree | task-files | current-contents
|
|
33
|
+
empty: false # true when a spec parses but touches no files
|
|
34
|
+
diff-source: "<base>..<head>" | working-tree | working-tree-fallback | current-contents
|
|
35
|
+
|
|
36
|
+
requirements-source:
|
|
37
|
+
type: plan-id | task-criterion | spec-doc | none
|
|
38
|
+
path: "<repo-relative path> | none"
|
|
39
|
+
spec-content: # only when type != none
|
|
40
|
+
- criterion: "C1: <short criterion>"
|
|
41
|
+
expected-behavior:
|
|
42
|
+
- "<observable behavior>"
|
|
43
|
+
- "<observable behavior>"
|
|
44
|
+
|
|
45
|
+
preliminary-scope-creep: [ { file, candidate-reason } ] | none | "skipped (no requirements)"
|
|
46
|
+
|
|
47
|
+
related-learnings: # scoped to the change boundary (whole review, not per file)
|
|
48
|
+
- "docs/learn/XXX.md — [1-line applicability note]"
|
|
49
|
+
|
|
50
|
+
learning-gaps:
|
|
51
|
+
- gap_name: "[Domain] — [what's missing]"
|
|
52
|
+
domain: [primary domain]
|
|
53
|
+
relevance: why this matters for the review
|
|
54
|
+
suggested_action: "Research external resource" | "Document post-review"
|
|
55
|
+
|
|
56
|
+
work-id: YYYY-MM-DD-NNN | null # work-linked only, for the index cross-link; null otherwise
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Also save the Review Scope to `docs/plans/.review/.scope/<scope-id>.md`.
|
|
60
|
+
|
|
61
|
+
## Validation Rules
|
|
62
|
+
|
|
63
|
+
- **scope-id:** Required. Format `YYYY-MM-DD-NNN-scope`.
|
|
64
|
+
- **review-id:** Required. Allocated by Scope (umbrella); format `YYYY-MM-DD-NNN`. For work-linked, **distinct from** any Work `review-id` (the two skills' artifacts are independent; `work-id` is carried separately here).
|
|
65
|
+
- **input-shape:** Required. One of `change-set`, `work-linked`, `ad-hoc`.
|
|
66
|
+
- **interactionMode:** Required, propagated from the Review Input Artifact.
|
|
67
|
+
- **status:** Required. `complete`.
|
|
68
|
+
- **change-boundary.required:** Required (may be empty only when `empty: true`). Each entry has a repo-relative `path` and a `status`; `renamed-from` only for `renamed`; `tentative: true` only for work-linked blocked/skipped-task files.
|
|
69
|
+
- **change-boundary.context:** Required (may be empty). Separated from `required`; each entry has a repo-relative `path` and a one-line `role`.
|
|
70
|
+
- **change-boundary.attribution & diff-source:** Required and consistent (`commits` ⇄ real range; `current-contents` ⇄ `current-contents`).
|
|
71
|
+
- **change-boundary.empty:** Required. `true` is accepted (nothing-to-review; Prepare/Analyze/Report carry the empty outcome through); never silently empty.
|
|
72
|
+
- **requirements-source.type:** Required. One of `plan-id`, `task-criterion`, `spec-doc`, `none`.
|
|
73
|
+
- **spec-content:** Required present when `type != none` (a structured list); omitted/empty when `type: none`.
|
|
74
|
+
- **preliminary-scope-creep:** Required. A list, `none`, or `skipped (no requirements)` — the last only when `requirements-source.type: none`.
|
|
75
|
+
- **related-learnings:** Required (may be empty). References `docs/learn/index.md` entries.
|
|
76
|
+
- **learning-gaps:** Required (may be empty).
|
|
77
|
+
- **work-id:** Required (= the `work-id`) for work-linked input; `null` otherwise.
|
|
78
|
+
|
|
79
|
+
## Example (change-set, with requirements)
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
scope-id: 2026-08-08-001-scope
|
|
83
|
+
review-id: 2026-08-08-001
|
|
84
|
+
input-shape: change-set
|
|
85
|
+
interactionMode: smart
|
|
86
|
+
status: complete
|
|
87
|
+
timestamp: 2026-08-08T14:30:00Z
|
|
88
|
+
change-boundary:
|
|
89
|
+
required:
|
|
90
|
+
- { path: "src/lib/redis-client.ts", status: added, tentative: false }
|
|
91
|
+
- { path: "src/lib/session-store.ts", status: modified, tentative: false }
|
|
92
|
+
context:
|
|
93
|
+
- { path: "src/api/session.ts", role: "caller of session-store.get()" }
|
|
94
|
+
attribution: commits
|
|
95
|
+
empty: false
|
|
96
|
+
diff-source: "main..feature/redis-session"
|
|
97
|
+
requirements-source:
|
|
98
|
+
type: plan-id
|
|
99
|
+
path: "docs/plans/2026-07-10-001-redis-session-store.md"
|
|
100
|
+
spec-content:
|
|
101
|
+
- criterion: "C1: Redis client connects with retry"
|
|
102
|
+
expected-behavior:
|
|
103
|
+
- "connect() reads REDIS_URL"
|
|
104
|
+
- "connect() retries up to 3 times on connection failure"
|
|
105
|
+
- criterion: "C2: SessionStore exports get/save/delete"
|
|
106
|
+
expected-behavior:
|
|
107
|
+
- "get(key) returns the stored value or null"
|
|
108
|
+
preliminary-scope-creep: none
|
|
109
|
+
related-learnings:
|
|
110
|
+
- "docs/learn/pattern/redis-retry-2026-07-02.md — connection retry pattern applies"
|
|
111
|
+
learning-gaps: []
|
|
112
|
+
work-id: null
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Example (work-linked, no requirements ref)
|
|
116
|
+
|
|
117
|
+
```yaml
|
|
118
|
+
scope-id: 2026-08-08-002-scope
|
|
119
|
+
review-id: 2026-08-08-002
|
|
120
|
+
input-shape: work-linked
|
|
121
|
+
interactionMode: detailed
|
|
122
|
+
status: complete
|
|
123
|
+
timestamp: 2026-08-08T15:00:00Z
|
|
124
|
+
change-boundary:
|
|
125
|
+
required:
|
|
126
|
+
- { path: "src/lib/redis-config.ts", status: added, tentative: false }
|
|
127
|
+
- { path: "src/lib/redis-client.ts", status: modified, tentative: true }
|
|
128
|
+
context: []
|
|
129
|
+
attribution: task-files
|
|
130
|
+
empty: false
|
|
131
|
+
diff-source: working-tree-fallback
|
|
132
|
+
requirements-source:
|
|
133
|
+
type: none
|
|
134
|
+
path: none
|
|
135
|
+
preliminary-scope-creep: "skipped (no requirements)"
|
|
136
|
+
related-learnings: []
|
|
137
|
+
learning-gaps: []
|
|
138
|
+
work-id: 2026-07-10-001
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Notes
|
|
142
|
+
|
|
143
|
+
- Scope is the **allocating phase** for the `review-id` umbrella; Prepare/Analyze/Report inherit it. The `review-id` shares the scope counter's NNN (see [id-generation.md](../../id-generation.md)).
|
|
144
|
+
- `required` vs `context` is a hard separation: Analyze files findings only against `required` files; `context` is reviewer aid.
|
|
145
|
+
- `requirements-source.type: none` is a legitimate input (the scope-creep category is skipped with a recorded note) — not an error (see [error-handling.md](../../error-handling.md)).
|
|
146
|
+
- `tentative: true` flags work-linked blocked/skipped-task files so Analyze treats their findings with the note that the file may be partial.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: work
|
|
3
|
+
description: "Execute implementation work through a deterministic pipeline of micro-skills: Triage -> Prepare -> Execute -> Review. Consumes /plan task artifacts, a single task file, or ad-hoc work input; runs each task test-first (Red -> Green -> Refactor) and updates task status and the index checklist. No agent dependency, no fallback paths."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Work
|
|
8
|
+
|
|
9
|
+
Orchestrates a deterministic pipeline of micro-skills: `Triage -> Prepare -> Execute -> Review`. Consumes `/plan` task artifacts, a single task file, **or** ad-hoc work input, executes each task test-first (Red → Green → Refactor), and updates task status and the `docs/tasks/<id>/index.md` checklist. No agent dependency, no fallback paths.
|
|
10
|
+
|
|
11
|
+
## Skill Invocation
|
|
12
|
+
|
|
13
|
+
This skill is invoked by prompting:
|
|
14
|
+
|
|
15
|
+
- `/work <plan-id>` — execute the task list for an existing plan, sourced from `docs/tasks/<plan-id>/index.md` (produced by the `/plan` Tasks phase).
|
|
16
|
+
- `/work <task file>` — execute a single task file (e.g. `docs/tasks/<plan-id>/T<NN>-<name>.md`, or a task-id like `<plan-id>-T03`). Runs **only that one task's** Red → Green → Refactor cycle, never its downstream dependents.
|
|
17
|
+
- `/work <task description>` — execute ad-hoc work; Triage resolves the description into an executable task list (no full plan required).
|
|
18
|
+
|
|
19
|
+
This skill runs the work pipeline, executing tasks and updating artifacts, acting as the Orchestrator.
|
|
20
|
+
|
|
21
|
+
## Interaction Method
|
|
22
|
+
|
|
23
|
+
- Ask the user one structured question at a time (2–4 concrete options) using the agent's interactive question capability; never hardcode a specific tool name.
|
|
24
|
+
- If input is empty, ask: "What would you like to work on? Provide a plan-id, a task file, or describe the task."
|
|
25
|
+
|
|
26
|
+
Before starting the workflow, ask the user to choose an interaction mode:
|
|
27
|
+
|
|
28
|
+
- **Detailed** — Confirm at each phase transition and before each task's destructive step; inspect artifacts; maximum control. Best for HIGH-risk or unfamiliar work.
|
|
29
|
+
- **Autopilot** — All phases run automatically; only the final Work Report is presented. Fastest. Best for straightforward, well-planned task lists.
|
|
30
|
+
- **Smart** — Phases run automatically; pause only on HIGH-risk operations or tasks that fail their gates.
|
|
31
|
+
|
|
32
|
+
Store in the context object:
|
|
33
|
+
|
|
34
|
+
```yaml
|
|
35
|
+
interactionMode: detailed | smart | autopilot
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Propagation:** `interactionMode` flows into the `triage`, `prepare`, `execute`, and `review` artifacts; each downstream phase reads it to adjust confirmation behaviour (detailed = pause every transition; autopilot = run all; smart = pause only on HIGH-risk).
|
|
39
|
+
|
|
40
|
+
> **Interaction mode is distinct from execution mode.** `interactionMode` governs _when to pause for the user_ (the same three modes as the `/plan` skill). **Execution mode** (inline / serial / parallel) governs _how multiple tasks are run_ and is selected in the Prepare phase. The two are carried independently through the pipeline.
|
|
41
|
+
|
|
42
|
+
## Orchestration Implementation
|
|
43
|
+
|
|
44
|
+
Each phase runs sequentially: the orchestrator calls the phase module, receives the output artifact, validates it with a quality gate, and passes it to the next phase.
|
|
45
|
+
|
|
46
|
+
### INPUT
|
|
47
|
+
|
|
48
|
+
- Receives a context object (a plan-id, a task file, **or** a raw work description, plus optional goals, constraints, references) from the user, a saved prompt, a document, or a combination.
|
|
49
|
+
- **Three input shapes:**
|
|
50
|
+
1. **Plan-based** — a `plan-id` referencing `docs/tasks/<plan-id>/index.md`. Executes the full task list in dependency order. Each task carries exactly one Acceptance Criterion, one test file, and Red → Green → Refactor steps (as produced by `/plan`'s Tasks phase).
|
|
51
|
+
2. **Task-file** — a path to a single task file (e.g. `docs/tasks/<plan-id>/T<NN>-<name>.md`) or a task-id (e.g. `<plan-id>-T03`). Executes **only that one task's** Red → Green → Refactor cycle, never its downstream dependents. `work-id` is inherited from the file's folder (the `plan-id`). Before running, Triage checks the task's `dependencies`: if any upstream task is **not** `completed`, it warns and asks the user whether to (a) proceed anyway, (b) run the missing upstream task(s) first, or (c) abort.
|
|
52
|
+
3. **Ad-hoc** — a raw work description (bug, feature, change). Triage classifies it and resolves it into the same task-shaped work (one AC → one task → one test, Red-first), registered under a fresh `work-id` at `docs/tasks/<work-id>/`.
|
|
53
|
+
- **If no context is provided**, ask: "What would you like to work on? Provide a plan-id, a task file, or describe the task."
|
|
54
|
+
- **Unified key:** downstream phases always key off a `work-id`. For plan-based and task-file input, `work-id = plan-id` (the task file's folder). For ad-hoc input, Triage allocates a `work-id` of the form `YYYY-MM-DD-NNN` (counting existing `docs/tasks/YYYY-MM-DD-NNN/` folders for that date), reusing the plan-id format so the `docs/tasks/<id>/` convention holds uniformly. The task manifest differs by shape (full list vs single task vs resolved list), but the artifact and index paths are identical.
|
|
55
|
+
- Output: [Work Input Artifact](references/templates/artifacts/work-input.md)
|
|
56
|
+
|
|
57
|
+
### Pre-Flight Check
|
|
58
|
+
|
|
59
|
+
Before starting the work pipeline, the orchestrator verifies that required folders exist:
|
|
60
|
+
|
|
61
|
+
- `docs/tasks/` — must exist for reading (plan-based) or creating (ad-hoc) the task list
|
|
62
|
+
- `docs/plans/.work/.triage/`, `docs/plans/.work/.prepare/`, `docs/plans/.work/.execute/`, `docs/plans/.work/.review/` — must exist for saving the four phase artifacts
|
|
63
|
+
|
|
64
|
+
**Self-Healing:** If any are missing, the orchestrator automatically creates them (`mkdir -p`). This allows the work skill to run even if `arreio-init` wasn't explicitly run.
|
|
65
|
+
|
|
66
|
+
For plan-based input, additionally verify that `docs/tasks/<plan-id>/index.md` exists and is non-empty; if not, ask the user to run `/plan <plan-id>` (with the Tasks phase) first or switch to ad-hoc input.
|
|
67
|
+
|
|
68
|
+
For task-file input, verify the task file exists and parses with valid task frontmatter (`id`, `plan-id`, `status`, `files.test`); infer `plan-id` from its folder. If missing or malformed, ask the user to locate the file or re-run the relevant `/plan` Tasks phase.
|
|
69
|
+
|
|
70
|
+
### Work Branch
|
|
71
|
+
|
|
72
|
+
Every new feature or plan runs on its own git branch:
|
|
73
|
+
|
|
74
|
+
- **Name:** `work/<short-description>` — a kebab-case slug derived from the plan name (plan-based/task-file) or the work description (ad-hoc), capped at 50 characters.
|
|
75
|
+
- **When:** created or checked out in Triage (Step 2d), right after the `work-id` is resolved and **before any task file or index is written**.
|
|
76
|
+
- **Idempotent:** re-running Work resumes on the same branch (already on it → no-op; branch exists → check it out; otherwise create from the default branch).
|
|
77
|
+
- **Dirty working tree:** uncommitted changes fail branch creation with an explicit error — never stashed, committed, or carried silently.
|
|
78
|
+
- **Not a git repository:** one explicit warning; the pipeline continues without a branch (`work-branch: null`).
|
|
79
|
+
- **Recording:** the branch name is stored as `work-branch` in the Work Manifest (with `work-branch-base` and `work-branch-state`) and carried through the Prepare/Execute/Review artifacts; the orchestrator's quality gate verifies branch coherence before Execute.
|
|
80
|
+
|
|
81
|
+
### Phases
|
|
82
|
+
|
|
83
|
+
| Phase | Phase Module | Output Artifact | Saved to |
|
|
84
|
+
| ----- | ----------------------------- | ------------------------------------------------------------------ | ----------------------------------- |
|
|
85
|
+
| 1 | [Triage](modules/triage.md) | [Work manifest](references/templates/artifacts/work-manifest.md) + `work/<slug>` branch | `docs/plans/.work/.triage/<id>.md` |
|
|
86
|
+
| 2 | [Prepare](modules/prepare.md) | [Execution plan](references/templates/artifacts/execution-plan.md) | `docs/plans/.work/.prepare/<id>.md` |
|
|
87
|
+
| 3 | [Execute](modules/execute.md) | [Execution log](references/templates/artifacts/execution-log.md) | `docs/plans/.work/.execute/<id>.md` |
|
|
88
|
+
| 4 | [Review](modules/review.md) | [Work report](references/templates/artifacts/work-report.md) | `docs/plans/.work/.review/<id>.md` |
|
|
89
|
+
|
|
90
|
+
### Quality Gates
|
|
91
|
+
|
|
92
|
+
Between phases, the orchestrator validates the output artifact before passing it to the next phase:
|
|
93
|
+
|
|
94
|
+
1. **Schema validation** — required fields present and well-formed (see [error-handling.md](references/error-handling.md) for the per-type field list).
|
|
95
|
+
2. **Cross-phase consistency** — IDs (`work-id`, `triage-id`, `prepare-id`, `execute-id`, `review-id`) match the upstream artifacts; `interactionMode` and `executionMode` are identical across artifacts.
|
|
96
|
+
3. **Status check** — the artifact's `status` is `complete` (not `pending` or `failed`).
|
|
97
|
+
4. **Task-status coherence** (after Execute) — every task in the work list is `completed`, `blocked` (with a recorded reason), or `skipped` (with a recorded reason); the `docs/tasks/<work-id>/index.md` checklist state matches the task files' frontmatter `status`. No task is left `in-progress`.
|
|
98
|
+
5. **Branch coherence** (after Triage, before Execute) — when `work-branch` is not `null`, the repository's current branch matches the Work Manifest's `work-branch`; a mismatch returns to Triage with the error context.
|
|
99
|
+
|
|
100
|
+
If a gate fails, the orchestrator returns to the producing phase with the error context (per the recovery workflow in [error-handling.md](references/error-handling.md)).
|
|
101
|
+
|
|
102
|
+
### Index Registration
|
|
103
|
+
|
|
104
|
+
Each phase is responsible for its own index updates:
|
|
105
|
+
|
|
106
|
+
| Phase | Registers To | Update |
|
|
107
|
+
| ------- | ------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
108
|
+
| Triage | `docs/tasks/<work-id>/index.md` | Ad-hoc only: create folder + index with the resolved task checklist (`- [ ]`). Plan-based: read only. |
|
|
109
|
+
| Execute | `docs/tasks/<work-id>/index.md` + each task file | Flip frontmatter `status` and the task file's `## Acceptance Criteria` checkbox; tick the index checklist (`- [ ]` → `- [x]`) as tasks complete. Idempotent on retry. |
|
|
110
|
+
| Review | `docs/tasks/<work-id>/index.md` | Append a closing `## Work Report — <review-id>` status block; optionally note learnings to capture via `/learn`. |
|
|
111
|
+
|
|
112
|
+
**Idempotency rule:** re-running Work resumes from incomplete tasks. The orchestrator reads each task file's `status`; a `completed` task is never re-opened, and index checkboxes are only ticked forward, never reset.
|
|
113
|
+
|
|
114
|
+
### FINAL OUTPUT
|
|
115
|
+
|
|
116
|
+
- **Task files:** Updated at `docs/tasks/<work-id>/T<NN>-<name>.md` with final `status` (`completed` / `blocked` / `skipped`) — frontmatter and the `## Acceptance Criteria` checkbox both updated.
|
|
117
|
+
- **Task index:** `docs/tasks/<work-id>/index.md` checklist ticked to match task outcomes (`- [x]` complete; remaining `- [ ]` for `blocked`/`skipped`).
|
|
118
|
+
- **Work branch:** `work/<short-description>` created (or checked out) during Triage Step 2d, recorded as `work-branch` in the Work Manifest; re-runs resume on the same branch.
|
|
119
|
+
- **Work Report:** Saved to `docs/plans/.work/.review/<review-id>.md`, with a consolidation/simplification summary, test-regression check, any scope-creep notes, and learnings surfaced for `/learn`.
|
|
120
|
+
- **(Optional) Learnings:** New learnings discovered during execution are handed to the Learn skill (`/learn`) to persist — Work does not write `docs/learn/` directly.
|
|
121
|
+
|
|
122
|
+
## References
|
|
123
|
+
|
|
124
|
+
The orchestrator and phase modules share these reference files:
|
|
125
|
+
|
|
126
|
+
| Reference | Used By |
|
|
127
|
+
| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
|
|
128
|
+
| [error-handling.md](references/error-handling.md) | All phases (Step 0 verification) |
|
|
129
|
+
| [id-generation.md](references/id-generation.md) | Triage, Prepare, Execute, Review (ID assignment, including `work-id` allocation) |
|
|
130
|
+
| [interaction-mode-propagation.md](references/interaction-mode-propagation.md) | All phases (Step N confirmation) |
|
|
131
|
+
| [execution-mode-selection.md](references/execution-mode-selection.md) | Prepare (choose inline / serial / parallel) |
|
|
132
|
+
| [ad-hoc-input-resolution.md](references/ad-hoc-input-resolution.md) | Triage (resolve raw work into task-shaped work) |
|
|
133
|
+
| [task-execution-rules.md](references/task-execution-rules.md) | Execute (Red → Green → Refactor enforcement, per-task gates, blocked-task handling) |
|
|
134
|
+
| [review-checklist.md](references/review-checklist.md) | Review (simplification, consolidation, learnings capture) |
|
|
135
|
+
|
|
136
|
+
Artifact templates live in [references/templates/artifacts/](references/templates/artifacts/):
|
|
137
|
+
|
|
138
|
+
| Template | Produced By |
|
|
139
|
+
| --------------------------------------------------------------------- | ------------ |
|
|
140
|
+
| [work-input.md](references/templates/artifacts/work-input.md) | Orchestrator |
|
|
141
|
+
| [work-manifest.md](references/templates/artifacts/work-manifest.md) | Triage |
|
|
142
|
+
| [execution-plan.md](references/templates/artifacts/execution-plan.md) | Prepare |
|
|
143
|
+
| [execution-log.md](references/templates/artifacts/execution-log.md) | Execute |
|
|
144
|
+
| [work-report.md](references/templates/artifacts/work-report.md) | Review |
|
|
145
|
+
|
|
146
|
+
## Core Principles
|
|
147
|
+
|
|
148
|
+
- **Deterministic Pipeline:** Phases always execute in sequence (no agent switching, no fallback paths).
|
|
149
|
+
- **Test-First Execution:** Every task runs Red → Green → Refactor — the failing test is written/confirmed **before** implementation. A task is not `completed` until its single test is green.
|
|
150
|
+
- **One Acceptance Criterion per Task:** Preserve the `/plan` invariant — one AC → one task → one test. Ad-hoc work is resolved to the same shape by Triage; never bundle criteria during execution.
|
|
151
|
+
- **Work Branch:** Every new feature or plan executes on its own git branch `work/<short-description>` (slug derived from the plan name or work description). The branch is created or checked out in Triage before any artifact is written, the setup is idempotent for resume, and a dirty working tree fails explicitly instead of stashing or carrying changes.
|
|
152
|
+
- **Separate Execution from Planning:** Execute the plan as sliced; do not re-plan during execution. Surface scope changes to the user instead of silently expanding a task.
|
|
153
|
+
- **Quality Gates (Work Review Phase 4):** After Execute completes, Phase 4 Review runs a lightweight pre-check: simplify/consolidate, run regression test (binary: any failure = gate), detect scope-creep (binary: any finding = gate). If gate fails → tasks enter `status: for-review` (not `completed`) and await Standalone Review approval. If gate passes → tasks move to `status: completed`. This decouples execution quality from final approval authority.
|
|
154
|
+
- **Learnings Orthogonal to Approval:** Work Report surfaces `learnings-to-capture` candidates (from Execute + Review phases) for later `/learn` invocation. Learnings are separate from approval gates; the Learn skill is the single authoritative source for durable knowledge.
|
|
155
|
+
- **Idempotent Status Updates:** Resume-safe — re-running Work picks up at the first non-`completed` task; `completed` and `for-review` tasks are never reverted (their status is idempotent on `review-id` in Review Phase 4).
|
|
156
|
+
- **Error Handling:** Fail explicitly, not silently; each phase has clear error handling with recovery suggestions.
|
|
157
|
+
- **Be Concrete:** Use specific files, components, and dependencies from the task artifacts.
|
|
158
|
+
- **Stay Portable:** Use repository-relative paths only.
|
|
159
|
+
- **Transparent Artifacts:** Each phase produces an explicit output artifact for the next phase.
|
|
160
|
+
- **Interaction Mode Propagation:** `interactionMode` is read at the start of each subsequent phase and determines whether confirmation steps execute.
|
|
161
|
+
- **Single Source of Truth:** This skill defines all its own rules; it does not depend on any external agent rule file.
|
|
162
|
+
- **Behavior-Described, Tool-Agnostic:** Steps describe required capabilities ("run the test", "update the task file"), not specific tool names; each agent maps to its native tools.
|
|
163
|
+
- **Next Workflow Step (Task-in-Review):** If Work Report's `work-state: for-review`, user runs `/review <work-id>` next. Review discovers `status: for-review` tasks (task-in-review input shape) and gates their approval: approved → `status: completed`, changes-requested → `status: blocked`. Optional GitHub Sync:\*\* When GitHub integration is enabled, task status may be mirrored to GitHub Issues (via the sync-status micro-skill); this is integration-gated and never required to run Work.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Execute
|
|
3
|
+
description: Run the Execution Plan's ordered task list per the selected execution mode, enforcing each task's Red -> Green -> Refactor gates (definitions authoritative in task-execution-rules), updating task files and the index checklist idempotently, and producing an Execution Log for the Review phase.
|
|
4
|
+
type: module
|
|
5
|
+
version: 1.0
|
|
6
|
+
timestamp: "2026-08-07"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Phase 3 - Execute
|
|
10
|
+
|
|
11
|
+
**Purpose:** Third step in the Work workflow. Reads the [Execution Plan](../references/templates/artifacts/execution-plan.md) from Prepare, runs its `execution-list` according to the selected `executionMode` (`inline` / `serial` / `parallel`), enforces each task's Red → Green → Refactor gates and resume/blocked/skip transitions (definitions authoritative in [task-execution-rules.md](../references/task-execution-rules.md) — this phase enforces them, it does not re-encode them), and updates each task file's status and the `docs/tasks/<work-id>/index.md` checklist idempotently. Returns an [Execution Log](../references/templates/artifacts/execution-log.md) for the Review phase.
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
This is the Phase 3 pipeline for the Work Skill. It orchestrates the following steps:
|
|
16
|
+
|
|
17
|
+
### Step 0: Verification
|
|
18
|
+
|
|
19
|
+
Run the **[Step 0 verification](../references/error-handling.md)**. Required input: a valid **Execution Plan** from Prepare. Specifically verify:
|
|
20
|
+
|
|
21
|
+
1. The Execution Plan carries `prepare-id`, `triage-id`, `work-id`, `input-shape`, `interactionMode`, `executionMode`, `execution-list`, `runner`, `baseline`, and `applicable-gates`.
|
|
22
|
+
2. `executionMode` is one of `inline` / `serial` / `parallel` (and resolves per the risk floor in [execution-mode-selection.md](../references/execution-mode-selection.md) — any HIGH-risk task must have `inline` treatment).
|
|
23
|
+
3. `interactionMode` is present and valid (default to `smart` if missing; log warning).
|
|
24
|
+
4. Cross-phase consistency: `work-id`, `triage-id` match the upstream artifacts.
|
|
25
|
+
|
|
26
|
+
If `work-state: nothing-ready`, the execution-list is empty — record an empty Execution Log (Step 5) and return to the Orchestrator; do not run any test.
|
|
27
|
+
|
|
28
|
+
### Step 1: Resolve the Test Command Per Task
|
|
29
|
+
|
|
30
|
+
1. **Read `runner` and (for Node.js) `packageManager`** from the Execution Plan (Prepare detected them). Build the per-task test invocation from the task's `files.test`:
|
|
31
|
+
- Node.js (npm): `npm test -- <test-path>` (or `npx jest <test-path>` / `npx vitest run <test-path>` when `scripts.test` is absent).
|
|
32
|
+
- Node.js (pnpm): `pnpm test -- <test-path>` (or `pnpm exec jest <test-path>` / `pnpm exec vitest run <test-path>`).
|
|
33
|
+
- Python: `pytest <test-path>`; Go: `go test <test-path>`; Rust: `cargo test <test-path>`; Ruby: `bundle exec rspec <test-path>`; PHP: `vendor/bin/phpunit <test-path>`; Java/Kotlin: `mvn -Dtest=<...> test` / `gradle test --tests <...>`.
|
|
34
|
+
2. If `runner: unknown`, stop and ask the user for the project's test command before proceeding (Prepare should have resolved this; treat its absence here as a Category 2 recovery per [error-handling.md](../references/error-handling.md)).
|
|
35
|
+
3. If a task's production code needs a dependency not yet installed (e.g., a new package add in a Red/Green step), install it with the resolved package manager (`pnpm add` / `npm install`) only when the task's Green step requires it — not preemptively.
|
|
36
|
+
|
|
37
|
+
### Step 2: Execute the List Per Execution Mode
|
|
38
|
+
|
|
39
|
+
Run `execution-list` according to `executionMode`. The mode flows are defined canonically in **[execution-mode-selection.md](../references/execution-mode-selection.md)** — Execute follows them; it does not re-derive them:
|
|
40
|
+
|
|
41
|
+
- **`inline`** — one task at a time. After each task completes or blocks, pause for the user (the `single-task-pause: true` flag) and re-confirm before the next task's Red (destructive) step. Best when `interactionMode: detailed` or any task is HIGH-risk; it is the only mode allowed for a HIGH-risk task.
|
|
42
|
+
- **`serial`** — run the flat ordered list sequentially. Do **not** pause between tasks; stop only when a task becomes `blocked` (then surface the reason and ask the user whether to continue with remaining independent tasks, retry, or abort).
|
|
43
|
+
- **`parallel`** — run each wave's independent tasks concurrently; waves run in order (Wave 0 fully settles before Wave 1 starts). A blocked task blocks only its dependents in later waves, not the whole wave.
|
|
44
|
+
|
|
45
|
+
**Resume at entry:** before running each task, read its task-file frontmatter `status`. A `completed` task is skipped (never re-opened). A `blocked` or `skipped` task is carried with its recorded reason and not auto-retried. Only `not-started` / `in-progress` tasks in `execution-list` are run. (Definitions authoritative in [task-execution-rules.md](../references/task-execution-rules.md).)
|
|
46
|
+
|
|
47
|
+
### Step 3: Per-Task Execution Cycle (Red → Green → Refactor)
|
|
48
|
+
|
|
49
|
+
For each runnable task, run the three-phase cycle and enforce the gates. The gate criteria and the retry-limit / blocked / skip thresholds are recorded read-only in the Execution Plan (Prepare read them from [task-execution-rules.md](../references/task-execution-rules.md)) — Execute applies them, it does not redefine them:
|
|
50
|
+
|
|
51
|
+
1. **Red** — write (or, on resume, confirm) the task's single Acceptance-Criterion test at its `files.test[0]`; run it and confirm it **fails for the right reason** (not a setup/import/compile error). Gate: failing assertion matches the AC. If the test passes immediately (already green), log it and re-check whether the AC is genuinely satisfied — the task may already be done (status `completed` on resume).
|
|
52
|
+
|
|
53
|
+
2. **Green** — implement the minimum code in the task's `files.create` / `files.modify` to make the AC test pass. Gate: the task's single test is green **and** there is no regression beyond the Step 1 baseline — if `baseline: snapshot-and-continue`, the regression gate ignores the known-failing test set recorded in the Execution Plan.
|
|
54
|
+
|
|
55
|
+
3. **Refactor** — clean up naming, duplication, and structure while keeping the AC test green. Gate: the test stays green and there is no regression. No behavior change.
|
|
56
|
+
|
|
57
|
+
### Step 4: Status Updates (Per Task)
|
|
58
|
+
|
|
59
|
+
After each task's gates pass (or a transition fires), update its artifacts. Updates are **idempotent** — re-running Execute never resets a `completed` task or a `- [x]` checkbox:
|
|
60
|
+
|
|
61
|
+
1. **On `completed`:**
|
|
62
|
+
- Set the task-file frontmatter `status: completed` and flip the `## Acceptance Criteria` checkbox to `- [x]`.
|
|
63
|
+
- In `docs/tasks/<work-id>/index.md`, tick that task's row from `- [ ]` to `- [x]`.
|
|
64
|
+
2. **On `blocked`** (Green gate not reached within the retry-limit recorded in the Execution Plan):
|
|
65
|
+
- Set frontmatter `status: blocked`, record a `reason` (the failing assertion snapshot and which gate failed).
|
|
66
|
+
- Leave the index checkbox as `- [ ]` and append a `— blocked: <reason>` note.
|
|
67
|
+
- Per the mode flow: `inline`/`serial` pause and surface; `parallel` blocks only dependents in later waves.
|
|
68
|
+
3. **On `skip`** (explicit user confirmation only — never auto-skip):
|
|
69
|
+
- Set frontmatter `status: skipped` with a recorded `reason`.
|
|
70
|
+
- Leave the index checkbox as `- [ ]` and append a `— skipped: <reason>` note.
|
|
71
|
+
4. **Mid-task (`in-progress`):** if Execute is interrupted mid-task, set frontmatter `status: in-progress` so a resume re-enters the cycle at the right gate; do **not** tick the checkbox.
|
|
72
|
+
|
|
73
|
+
> Task-status coherence: the orchestrator's post-Execute quality gate (#4) requires every task to be `completed`, `blocked`, or `skipped` (with reasons) — none left `in-progress` — and the index checklist state must match the task files' frontmatter. Execute is responsible for leaving the state coherent at the end of the run.
|
|
74
|
+
|
|
75
|
+
### Step 5: Generate the Execution Log Artifact
|
|
76
|
+
|
|
77
|
+
1. **Assign an `execute-id`** per [id-generation.md](../references/id-generation.md) (format `YYYY-MM-DD-NNN-execute`, saved to `docs/plans/.work/.execute/`). Reuse it if the user later picks **Edit & Retry**.
|
|
78
|
+
|
|
79
|
+
2. Produce an **Execution Log** block (as markdown) following the schema in [execution-log.md](../references/templates/artifacts/execution-log.md). Include:
|
|
80
|
+
- `execute-id`, inherited `prepare-id`, `triage-id`, `work-id`, `input-shape`
|
|
81
|
+
- `interactionMode` and `executionMode` (both carried)
|
|
82
|
+
- a per-task result table: `task-id`, `outcome` (`completed` / `blocked` / `skipped`), gate trace (Red/Green/Refactor pass timestamps), and any `reason`
|
|
83
|
+
- aggregator counts: `completed`/`blocked`/`skipped` counts and the regression-detection summary (any new failures beyond the baseline snapshot)
|
|
84
|
+
- final index-checklist state (matches the task files)
|
|
85
|
+
|
|
86
|
+
### Step 6: Present, Confirm, and Save
|
|
87
|
+
|
|
88
|
+
Apply the **[phase confirmation behavior](../references/interaction-mode-propagation.md)** for the current `interactionMode`, using these execute-specific **Smart pause triggers** (in addition to the per-task pauses mandated by `inline` mode and by a `blocked` task):
|
|
89
|
+
|
|
90
|
+
- A task hit the retry-limit and went `blocked` (decide before auto-continuing remaining independent tasks), or
|
|
91
|
+
- A new regression beyond the baseline snapshot appears on a `completed` task's Refactor re-run, or
|
|
92
|
+
- `executionMode: parallel` and a blocked task in an earlier wave leaves later dependent tasks unable to run.
|
|
93
|
+
|
|
94
|
+
- **Detailed:** summarize the Execution Log and ask one question with options *(1) Proceed to Review, (2) Edit & Retry, (3) Abort*. On **Edit & Retry**, loop back through Steps 1–5 reusing the `execute-id`. On **Abort**, stop and inform the Orchestrator.
|
|
95
|
+
- **Smart:** pause only when a pause trigger above is true; otherwise auto-proceed.
|
|
96
|
+
- **Autopilot:** auto-proceed (no confirmation).
|
|
97
|
+
|
|
98
|
+
Then save the artifact to `docs/plans/.work/.execute/<execute-id>.md` (ensure `interactionMode` and `executionMode` are included) and return it, with both mode values, to the Orchestrator for the transition to Phase 4 (Review).
|
|
99
|
+
|
|
100
|
+
## Output: Execution Log Artifact
|
|
101
|
+
|
|
102
|
+
- Verify that the Execution Log is complete and valid: `execute-id`, `prepare-id`, `triage-id`, `work-id`, `input-shape`, `interactionMode`, `executionMode`, the per-task result table, and the aggregator counts.
|
|
103
|
+
- Verify **task-status coherence**: every task in `execution-list` ended `completed`, `blocked` (with reason), or `skipped` (with reason) — none left `in-progress` — and `docs/tasks/<work-id>/index.md` checklist state matches the task files' frontmatter `status`.
|
|
104
|
+
- Verify that each `completed` task has its `## Acceptance Criteria` checkbox flipped to `- [x]` and the index ticked `- [ ] → - [x]` (forward only — never reset).
|
|
105
|
+
- Verify that every `completed` task's single AC test is green with no new regression beyond the recorded baseline snapshot.
|
|
106
|
+
- Verify that the gate/transition behavior was **enforced from** [task-execution-rules.md](../references/task-execution-rules.md) and [execution-mode-selection.md](../references/execution-mode-selection.md) rather than re-defined inline.
|
|
107
|
+
- Verify that the artifact is saved to `docs/plans/.work/.execute/<execute-id>.md`.
|
|
108
|
+
|
|
109
|
+
> Pass the Execution Log to `review` (Phase 4) for the simplification, consolidation, and learnings-capture pass.
|