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,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Severity Rubric
|
|
3
|
+
description: Authoritative reference for the Analyze phase (severity assignment) and the Report phase (rollup). Defines the four severity levels (blocker / major / minor / nit), their criteria, the borderline-default rule, and how tool corroboration affects severity. Analyze assigns severities from this rubric; Report aggregates them and never re-encodes the levels.
|
|
4
|
+
type: reference
|
|
5
|
+
version: 1.0
|
|
6
|
+
timestamp: "2026-08-08"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Severity Rubric
|
|
10
|
+
|
|
11
|
+
Authoritative reference for the **Analyze** phase (Step 2, severity assignment) and the **Report** phase (Step 1, rollup by severity). Defines the four severity levels, their criteria, the borderline-default rule, and how tool corroboration affects severity. Analyze assigns severities from this rubric; Report aggregates the counts and derives approval per [approval-criteria.md](approval-criteria.md); neither re-encodes the levels.
|
|
12
|
+
|
|
13
|
+
## The Four Severities
|
|
14
|
+
|
|
15
|
+
| Severity | Merge impact | Default category pairing (guidance, not rule) |
|
|
16
|
+
| ---------- | ------------------------------------------- | ---------------------------------------------------------------------- |
|
|
17
|
+
| `blocker` | Must fix before merge; do not merge | Security hole, data-loss risk, broken core flow, regression in green-baseline suite |
|
|
18
|
+
| `major` | Should fix before merge | Significant quality/test/integration issue causing maintenance pain |
|
|
19
|
+
| `minor` | Nice to fix; non-blocking | Small quality or documentation issue |
|
|
20
|
+
| `nit` | Style/preference; optional | Cosmetic, style, minor naming |
|
|
21
|
+
|
|
22
|
+
## Criteria (authoritative)
|
|
23
|
+
|
|
24
|
+
### blocker
|
|
25
|
+
|
|
26
|
+
A `blocker` finding means the change **must not merge as-is**. Assign `blocker` when **any** of:
|
|
27
|
+
|
|
28
|
+
- A **security** hole was introduced: secret leakage, injection, missing authn/authz on a protected path, unsafe deserialization of untrusted input.
|
|
29
|
+
- A **data-loss risk** exists: a destructive migration without safety, a write path that can corrupt state.
|
|
30
|
+
- A **core flow is broken** by the change: the change breaks a previously-working primary user/code path.
|
|
31
|
+
- A **regression** in the `green`-baseline suite (a test that was green is now red because of this change).
|
|
32
|
+
- The change **silently breaks a documented public contract** (consumers will fail at runtime).
|
|
33
|
+
|
|
34
|
+
### major
|
|
35
|
+
|
|
36
|
+
A `major` finding means the change should fix the issue before merge but it is not a hard block. Assign `major` when **any** of:
|
|
37
|
+
|
|
38
|
+
- A **significant quality** issue: introduced duplication across multiple files, a new overlarge unit, a design that won't scale with the change's intent.
|
|
39
|
+
- A **tests** issue: production-code change with **no** accompanying test (or a test that asserts the wrong thing and would still pass if the behavior regressed).
|
|
40
|
+
- An **integration** issue: a non-silent contract change that will cause maintenance pain for callers (but compiles/works today).
|
|
41
|
+
- A **scope-creep** finding that introduces a **new public API/behavior/dependency** outside the requirements (per [scope-creep-detection.md](scope-creep-detection.md)).
|
|
42
|
+
- A **security** issue that is real but not a hole (e.g. weak validation that is not yet exploitable in the current call path).
|
|
43
|
+
|
|
44
|
+
### minor
|
|
45
|
+
|
|
46
|
+
A `minor` finding is a non-blocking improvement. Assign `minor` when **any** of:
|
|
47
|
+
|
|
48
|
+
- A **small quality** issue: a locally duplicated block, a slightly-too-large function, a missing helper extraction.
|
|
49
|
+
- A **documentation** issue: a public export lacks a docstring, a behavior change isn't in the CHANGELOG, a stale comment.
|
|
50
|
+
- A small **integration** deviation from project conventions (naming/layering) that compiles and works.
|
|
51
|
+
- An incidental **scope-creep** edit (a stray unrelated formatting change in a touched file) per [scope-creep-detection.md](scope-creep-detection.md).
|
|
52
|
+
|
|
53
|
+
### nit
|
|
54
|
+
|
|
55
|
+
A `nit` is purely stylistic — optional, never blocks. Assign `nit` when:
|
|
56
|
+
|
|
57
|
+
- Cosmetic/style preferences: formatting, minor naming taste, comment wording.
|
|
58
|
+
- The reviewer would phrase a thing differently but there is no correctness/quality impact.
|
|
59
|
+
|
|
60
|
+
## Borderline-Default Rule
|
|
61
|
+
|
|
62
|
+
> **When a finding's severity is borderline between two levels, default to the LOWER severity.** Do not over-escalate. Report derives the approval status from the tallies; an over-escalated `blocker`/`major` count causes spurious `changes-requested`/`rejected` verdicts.
|
|
63
|
+
|
|
64
|
+
This is the deliberate counterweight to reviewer tendency to escalate. Examples:
|
|
65
|
+
|
|
66
|
+
- A `blocker`/`major` borderline → assign `major`.
|
|
67
|
+
- A `major`/`minor` borderline → assign `minor`.
|
|
68
|
+
- A `minor`/`nit` borderline → assign `nit`.
|
|
69
|
+
|
|
70
|
+
The exception to the downward default is the **security** category: a borderline `blocker`/`major` **security** finding defaults to `blocker` (security findings default upward, because the cost of a missed block is far higher than the cost of a false alarm). Document the reasoning on the finding either way.
|
|
71
|
+
|
|
72
|
+
## Tool Corroboration
|
|
73
|
+
|
|
74
|
+
A configured tool (linter/type-checker/test run) can **corroborate** a finding and **sharpen its severity**, never inflate it unjustly:
|
|
75
|
+
|
|
76
|
+
- A `minor` quality finding that a linter flags as an **error** (not warning) for this repo → sharpen to `major` (the codebase treats it as an error).
|
|
77
|
+
- A `major` tests claim corroborated by an actual **test run failing** (regression confirmed) → sharpen to `blocker` (confirmed regression).
|
|
78
|
+
- A tool flag with **no change-boundary warrant** (a pre-existing repo condition, or a style rule the change didn't worsen) → **no** finding; do not let Review become a repo-wide audit.
|
|
79
|
+
|
|
80
|
+
Corroboration is recorded on the finding (`corroborated-by: <tool> <rule>`); un-corroborated findings carry no such field. Tools never create findings on their own outside the change boundary.
|
|
81
|
+
|
|
82
|
+
## Category × Severity Guidance Matrix
|
|
83
|
+
|
|
84
|
+
This matrix pairs the [review-categories.md](review-categories.md) categories with typical severity bands (guidance, not a hard rule — the criteria above govern):
|
|
85
|
+
|
|
86
|
+
| Category | Typical blocker | Typical major | Typical minor / nit |
|
|
87
|
+
| --------------- | -------------------------- | ----------------------------------- | ------------------------------- |
|
|
88
|
+
| `quality` | (rare; via core-flow) | Duplication, overlarge units, design | Local smell, naming |
|
|
89
|
+
| `security` | Hole, secret, injection | Weak validation (not yet exploitable) | (rare) |
|
|
90
|
+
| `tests` | Regression in green suite | No test for new behavior; wrong assertion | Missing edge case |
|
|
91
|
+
| `documentation`| Silently alters a documented contract | Change not in CHANGELOG | Missing docstring, stale comment |
|
|
92
|
+
| `integration` | Silent contract break | Caller maintenance pain | Convention deviation |
|
|
93
|
+
| `scope-creep` | Creep causes core-flow break | New public API/behavior/dep outside reqs | Incidental stray edit |
|
|
94
|
+
|
|
95
|
+
## Validation (Analyze Step 2 re-checks)
|
|
96
|
+
|
|
97
|
+
Every emitted finding carries a `severity` from this rubric. A finding:
|
|
98
|
+
|
|
99
|
+
- **without** a `severity` → reject (Category 2 / Category 6 recovery).
|
|
100
|
+
- whose `severity` is not one of `blocker`/`major`/`minor`/`nit` → reject.
|
|
101
|
+
- that is a borderline case must record the applied default (lower, except security-→-blocker) implicitly — Analyze does **not** emit a textual "defaulted" note per finding, but the borderline-default rule is the conscious policy.
|
|
102
|
+
|
|
103
|
+
## Notes
|
|
104
|
+
|
|
105
|
+
- This reference is the single source of truth for severity levels, their criteria, and the borderline-default rule. Analyze assigns; Report aggregates and derives approval per [approval-criteria.md](approval-criteria.md); neither re-encodes the levels.
|
|
106
|
+
- The security-upward-default exception is the **only** place severity defaults upward; all other borderline cases default downward.
|
|
107
|
+
- Tallies feed directly into [approval-criteria.md](approval-criteria.md): `blocker` count → `rejected`; otherwise `major` count > 0 → `changes-requested`; otherwise → `approved`.
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Findings Artifact
|
|
3
|
+
description: Template for the Findings Artifact produced by the Analyze phase. Carries the per-finding list (severity + category + repo-relative location + message + a requirement trace OR a scope-creep flag + optional non-binding suggested-fix + optional tool corroboration), the per-category and per-severity tallies, and the scope-creep-ran flag; consumed by Report.
|
|
4
|
+
type: template
|
|
5
|
+
version: 1.0
|
|
6
|
+
timestamp: "2026-08-08"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Findings Artifact
|
|
10
|
+
|
|
11
|
+
The product of the **Analyze** phase is the Findings set: a per-finding list where each finding carries a **severity** (`blocker` / `major` / `minor` / `nit`), a **category** (`quality` / `security` / `tests` / `documentation` / `integration` / `scope-creep`), a repository-relative **location**, a `message`, and **either** a **requirement `trace`** **or** a **`scope-creep: true`** flag (orchestrator quality gate #5), plus aggregator tallies. Report consumes it.
|
|
12
|
+
|
|
13
|
+
## Schema
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
analyze-id: YYYY-MM-DD-NNN-analyze
|
|
17
|
+
prepare-id: YYYY-MM-DD-NNN-prepare
|
|
18
|
+
scope-id: YYYY-MM-DD-NNN-scope
|
|
19
|
+
review-id: YYYY-MM-DD-NNN
|
|
20
|
+
input-shape: change-set | work-linked | ad-hoc
|
|
21
|
+
interactionMode: detailed | smart | autopilot
|
|
22
|
+
status: complete
|
|
23
|
+
timestamp: ISO-8601 timestamp
|
|
24
|
+
|
|
25
|
+
findings: [] | # empty list when the review was clean or nothing-to-review
|
|
26
|
+
- id: F01
|
|
27
|
+
severity: blocker | major | minor | nit
|
|
28
|
+
category: quality | security | tests | documentation | integration | scope-creep
|
|
29
|
+
location: "src/lib/redis-client.ts:42" | "src/lib/redis-client.ts:hunk-2" # repository-relative
|
|
30
|
+
message: "[1-2 sentence description of the issue]"
|
|
31
|
+
trace: "C1" | "general-quality" | "no-requirements" # present when in-scope (NOT scope-creep)
|
|
32
|
+
scope-creep: true | false # opposite of trace: a finding with scope-creep: true carries NO trace
|
|
33
|
+
suggested-fix: "[non-binding suggestion; Review is read-only]" # optional
|
|
34
|
+
corroborated-by: "eslint rule @typescript-eslint/no-explicit-any" | null # optional; tool evidence
|
|
35
|
+
tentative-file: false | true # echoes the boundary's tentative flag (work-linked blocked/skipped file)
|
|
36
|
+
|
|
37
|
+
tallies:
|
|
38
|
+
by-severity:
|
|
39
|
+
blocker: <N>
|
|
40
|
+
major: <N>
|
|
41
|
+
minor: <N>
|
|
42
|
+
nit: <N>
|
|
43
|
+
by-category:
|
|
44
|
+
quality: <N>
|
|
45
|
+
security: <N>
|
|
46
|
+
tests: <N>
|
|
47
|
+
documentation: <N>
|
|
48
|
+
integration: <N>
|
|
49
|
+
scope-creep: <N>
|
|
50
|
+
|
|
51
|
+
scope-creep-ran: true | "skipped (no requirements)" # false only via the skipped string; never silently absent
|
|
52
|
+
|
|
53
|
+
work-id: YYYY-MM-DD-NNN | null # work-linked only; null otherwise
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Also save the Findings to `docs/plans/.review/.analyze/<analyze-id>.md`.
|
|
57
|
+
|
|
58
|
+
## Validation Rules
|
|
59
|
+
|
|
60
|
+
- **analyze-id:** Required. Format `YYYY-MM-DD-NNN-analyze`.
|
|
61
|
+
- **prepare-id, scope-id, review-id, input-shape:** Required, inherited (cross-phase consistency).
|
|
62
|
+
- **interactionMode:** Required, identical to the upstream artifacts.
|
|
63
|
+
- **findings:** Required (may be empty — a clean review or nothing-to-review). Each finding must carry:
|
|
64
|
+
- `id` unique within this set (`F01`, `F02`, …)
|
|
65
|
+
- `severity` one of `blocker`/`major`/`minor`/`nit` (per [severity-rubric.md](../../severity-rubric.md))
|
|
66
|
+
- `category` one of the six (per [review-categories.md](../../review-categories.md))
|
|
67
|
+
- `location` repository-relative (`file:line` or `file:hunk`)
|
|
68
|
+
- `message` (1–2 sentences)
|
|
69
|
+
- **exactly one of** `trace` **or** `scope-creep: true` (findings coherence, orchestrator gate #5). A `trace: no-requirements` is used for non-creep findings when `spec-content: none`. A `scope-creep: true` finding carries **no** `trace`.
|
|
70
|
+
- `suggested-fix` and `corroborated-by` optional (suggested-fix is non-binding — Review is read-only)
|
|
71
|
+
- `tentative-file` echoes the boundary's `tentative` flag for work-linked blocked/skipped files
|
|
72
|
+
- **tallies.by-severity / by-category:** Required. Counts must match the findings list exactly.
|
|
73
|
+
- **scope-creep-ran:** Required. `true` only when the scope-creep category actually ran (i.e., `spec-content` was present); otherwise `skipped (no requirements)`. Never silently `false`-absent.
|
|
74
|
+
- **work-id:** Required for work-linked input; `null` otherwise.
|
|
75
|
+
- **status:** Required. `complete`.
|
|
76
|
+
|
|
77
|
+
## Example (mixed severities, one scope-creep finding)
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
analyze-id: 2026-08-08-001-analyze
|
|
81
|
+
prepare-id: 2026-08-08-001-prepare
|
|
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-08T15:00:00Z
|
|
88
|
+
findings:
|
|
89
|
+
- id: F01
|
|
90
|
+
severity: major
|
|
91
|
+
category: tests
|
|
92
|
+
location: "src/lib/session-store.ts:22"
|
|
93
|
+
message: "Production-code change to get/save/delete ships no test for the new behavior."
|
|
94
|
+
trace: C2
|
|
95
|
+
scope-creep: false
|
|
96
|
+
suggested-fix: "Add session-store.test.ts covering get/save/delete per C2."
|
|
97
|
+
corroborated-by: null
|
|
98
|
+
tentative-file: false
|
|
99
|
+
- id: F02
|
|
100
|
+
severity: major
|
|
101
|
+
category: scope-creep
|
|
102
|
+
location: "src/lib/cache.ts:hunk-1"
|
|
103
|
+
message: "Adds a new TTL cache layer beyond C1/C2; no requirement it serves."
|
|
104
|
+
trace: null
|
|
105
|
+
scope-creep: true
|
|
106
|
+
suggested-fix: "Split the cache layer into its own task with its own AC, or roll back here."
|
|
107
|
+
corroborated-by: null
|
|
108
|
+
tentative-file: false
|
|
109
|
+
- id: F03
|
|
110
|
+
severity: minor
|
|
111
|
+
category: quality
|
|
112
|
+
location: "src/lib/redis-client.ts:42"
|
|
113
|
+
message: "Magic number 3 for retry count; extract to a named constant."
|
|
114
|
+
trace: C1
|
|
115
|
+
scope-creep: false
|
|
116
|
+
suggested-fix: "const MAX_RETRIES = 3;"
|
|
117
|
+
corroborated-by: null
|
|
118
|
+
tentative-file: false
|
|
119
|
+
tallies:
|
|
120
|
+
by-severity: { blocker: 0, major: 2, minor: 1, nit: 0 }
|
|
121
|
+
by-category: { quality: 1, security: 0, tests: 1, documentation: 0, integration: 0, scope-creep: 1 }
|
|
122
|
+
scope-creep-ran: true
|
|
123
|
+
work-id: null
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Example (ad-hoc, no requirements — scope-creep skipped)
|
|
127
|
+
|
|
128
|
+
```yaml
|
|
129
|
+
analyze-id: 2026-08-08-002-analyze
|
|
130
|
+
prepare-id: 2026-08-08-002-prepare
|
|
131
|
+
scope-id: 2026-08-08-002-scope
|
|
132
|
+
review-id: 2026-08-08-002
|
|
133
|
+
input-shape: ad-hoc
|
|
134
|
+
interactionMode: autopilot
|
|
135
|
+
status: complete
|
|
136
|
+
timestamp: 2026-08-08T15:30:00Z
|
|
137
|
+
findings:
|
|
138
|
+
- id: F01
|
|
139
|
+
severity: nit
|
|
140
|
+
category: documentation
|
|
141
|
+
location: "src/auth/session.ts:8"
|
|
142
|
+
message: "Public export lacks a docstring."
|
|
143
|
+
trace: no-requirements
|
|
144
|
+
scope-creep: false
|
|
145
|
+
suggested-fix: null
|
|
146
|
+
corroborated-by: null
|
|
147
|
+
tentative-file: false
|
|
148
|
+
tallies:
|
|
149
|
+
by-severity: { blocker: 0, major: 0, minor: 0, nit: 1 }
|
|
150
|
+
by-category: { quality: 0, security: 0, tests: 0, documentation: 1, integration: 0, scope-creep: 0 }
|
|
151
|
+
scope-creep-ran: "skipped (no requirements)"
|
|
152
|
+
work-id: null
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Notes
|
|
156
|
+
|
|
157
|
+
- **Findings coherence** (orchestrator gate #5): every finding has a `severity`, a `category`, a repo-relative `location`, and **exactly one of** `trace` / `scope-creep: true`. Report refuses a Findings set that violates this (Category 2 recovery — re-run Analyze).
|
|
158
|
+
- `trace: no-requirements` is the correct trace for any non-creep finding when `spec-content: none` (scope-creep cannot be assessed; never set `scope-creep: true` without a spec).
|
|
159
|
+
- `suggested-fix` is **non-binding** — Review is read-only; the user turns it into a follow-up `/plan` + `/work` or a manual edit, never applied inline.
|
|
160
|
+
- `corroborated-by` records tool evidence; tools corroborate, never create findings outside the change boundary (see [severity-rubric.md](../../severity-rubric.md)).
|
|
161
|
+
- `scope-creep-ran` must be `skipped (no requirements)` exactly when `spec-content` was `none`; the tallies `scope-creep: 0` in that case is consistent (no creep findings emitted).
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Review Input Artifact
|
|
3
|
+
description: Template for the Review Input Artifact produced by the Orchestrator. Carries the input shape (change-set, work-id/Work review-id, or ad-hoc) and interactionMode, plus an optional requirements ref; consumed by Scope.
|
|
4
|
+
type: template
|
|
5
|
+
version: 1.0
|
|
6
|
+
timestamp: "2026-08-08"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Review Input Artifact
|
|
10
|
+
|
|
11
|
+
The Orchestrator produces a Review Input Artifact as the entry point to the Review workflow. It carries the input shape (one of change-set, work-id/Work review-id, or ad-hoc) and the user-selected `interactionMode`, plus an optional requirements ref that sharpens scope-creep detection. Scope consumes it.
|
|
12
|
+
|
|
13
|
+
## Schema
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
type: review-input
|
|
17
|
+
timestamp: ISO-8601 timestamp (e.g., 2026-08-08T14:30:00Z)
|
|
18
|
+
source: user | saved-prompt | document | combination
|
|
19
|
+
status: complete
|
|
20
|
+
interactionMode: detailed | smart | autopilot
|
|
21
|
+
|
|
22
|
+
# Input shape — exactly one of the following:
|
|
23
|
+
change-set: "<git spec>" | null # change-set: diff range ("<base>..<head>"), commit range ("A..B"), "HEAD", staged, branch-vs-base, or paths/globs
|
|
24
|
+
work-id: YYYY-MM-DD-NNN | null # work-linked: reviews a /work run's changes
|
|
25
|
+
work-review-id: YYYY-MM-DD-NNN-review | null # work-linked: scopes to a specific Work review run (resolved to its work-id)
|
|
26
|
+
ad-hoc: "<target description>" | null # ad-hoc input (a module/symbol/path described in prose)
|
|
27
|
+
|
|
28
|
+
# Optional requirements ref — sharpens scope-creep detection (Scope runs the category only when present)
|
|
29
|
+
requirements-ref:
|
|
30
|
+
type: plan-id | task-criterion | spec-doc | null
|
|
31
|
+
path: "docs/plans/<plan-id>.md | docs/tasks/<plan-id>/T<NN>-<name>.md | <spec-doc path> | null"
|
|
32
|
+
|
|
33
|
+
# Optional context carried:
|
|
34
|
+
goals: [ ... ]
|
|
35
|
+
constraints: [ ... ]
|
|
36
|
+
references: [ ... ]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Validation Rules
|
|
40
|
+
|
|
41
|
+
- **type:** Required. Must be `review-input`.
|
|
42
|
+
- **timestamp:** Required. ISO-8601.
|
|
43
|
+
- **source:** Required. One of `user`, `saved-prompt`, `document`, `combination`.
|
|
44
|
+
- **status:** Required. `complete` (the Orchestrator marks it complete once it has the input and the interaction mode).
|
|
45
|
+
- **interactionMode:** Required. One of `detailed`, `smart`, `autopilot`. (If missing, default to `smart`; see [error-handling.md](../../error-handling.md) Category 5.)
|
|
46
|
+
- **Input shape:** Exactly one of `change-set`, `work-id` (or `work-review-id`), `ad-hoc` must be non-null. If all three are null/empty, the Orchestrator asks: "What would you like to review? Provide a git ref/range, a work-id, or describe a target." (Category 3.)
|
|
47
|
+
- **change-set:** When present, parses to a concrete git invocation (the repo must be a git working tree); an empty diff is accepted (Scope records `change-boundary.empty: true`).
|
|
48
|
+
- **work-id / work-review-id:** When present, resolves to a non-empty `docs/tasks/<work-id>/index.md` (and, for `work-review-id`, to `docs/plans/.work/.review/<review-id>.md`). If not, ask to run `/work <work-id>` first or switch to change-set input.
|
|
49
|
+
- **ad-hoc:** When present, a non-empty target description; Scope maps it to concrete files/paths (asks the user to name a file/module/path if it maps to none).
|
|
50
|
+
- **requirements-ref:** Optional. `type` is one of `plan-id` / `task-criterion` / `spec-doc` / `null` with a matching `path`; when `null`, scope-creep detection is skipped (legitimate, not an error).
|
|
51
|
+
|
|
52
|
+
## Example (change-set, with a requirements ref)
|
|
53
|
+
|
|
54
|
+
```yaml
|
|
55
|
+
type: review-input
|
|
56
|
+
timestamp: 2026-08-08T09:00:00Z
|
|
57
|
+
source: user
|
|
58
|
+
status: complete
|
|
59
|
+
interactionMode: smart
|
|
60
|
+
change-set: "main..feature/redis-session"
|
|
61
|
+
work-id: null
|
|
62
|
+
work-review-id: null
|
|
63
|
+
ad-hoc: null
|
|
64
|
+
requirements-ref:
|
|
65
|
+
type: plan-id
|
|
66
|
+
path: "docs/plans/2026-07-10-001-redis-session-store.md"
|
|
67
|
+
goals: null
|
|
68
|
+
constraints: null
|
|
69
|
+
references: null
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Example (work-linked, no requirements ref)
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
type: review-input
|
|
76
|
+
timestamp: 2026-08-08T09:05:00Z
|
|
77
|
+
source: user
|
|
78
|
+
status: complete
|
|
79
|
+
interactionMode: detailed
|
|
80
|
+
change-set: null
|
|
81
|
+
work-id: 2026-07-10-001
|
|
82
|
+
work-review-id: null
|
|
83
|
+
ad-hoc: null
|
|
84
|
+
requirements-ref:
|
|
85
|
+
type: plan-id
|
|
86
|
+
path: "docs/tasks/2026-07-10-001/index.md"
|
|
87
|
+
goals: null
|
|
88
|
+
constraints: null
|
|
89
|
+
references: null
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Example (ad-hoc, no requirements ref)
|
|
93
|
+
|
|
94
|
+
```yaml
|
|
95
|
+
type: review-input
|
|
96
|
+
timestamp: 2026-08-08T09:10:00Z
|
|
97
|
+
source: user
|
|
98
|
+
status: complete
|
|
99
|
+
interactionMode: autopilot
|
|
100
|
+
change-set: null
|
|
101
|
+
work-id: null
|
|
102
|
+
work-review-id: null
|
|
103
|
+
ad-hoc: "review the auth module — src/auth/*"
|
|
104
|
+
requirements-ref:
|
|
105
|
+
type: null
|
|
106
|
+
path: null
|
|
107
|
+
goals: null
|
|
108
|
+
constraints: null
|
|
109
|
+
references: null
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Notes
|
|
113
|
+
|
|
114
|
+
- The Orchestrator's Pre-Flight Check ensures `docs/plans/.review/.{scope,prepare,analyze,report}/` and `docs/plans/.review/index.md` exist (self-healing via `mkdir -p`) before handing the Review Input Artifact to Scope.
|
|
115
|
+
- `interactionMode` flows from this artifact into every downstream artifact (Scope → Prepare → Analyze → Report); the orchestrator quality gate #2 cross-checks it is identical across all.
|
|
116
|
+
- For work-linked input, the Work `review-id` and the Review skill's own `review-id` are **distinct** (see [id-generation.md](../../id-generation.md)); the `work-review-id` here is only an input resolver, never reused as the Review skill's umbrella id.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Review Kit Artifact
|
|
3
|
+
description: Template for the Review Kit Artifact produced by the Prepare phase. Carries the gathered diffs/hunks for the change boundary, the enriched context callers, the resolved spec-content, the derived test context (runner + per-file covering tests + ships-own-tests), and the static-analysis tool inventory; consumed by Analyze.
|
|
4
|
+
type: template
|
|
5
|
+
version: 1.0
|
|
6
|
+
timestamp: "2026-08-08"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Review Kit Artifact
|
|
10
|
+
|
|
11
|
+
The product of the **Prepare** phase is a Review Kit: the gathered **diffs/hunks** for the change boundary's `required` files (with the enriched `context` callers/importers), the resolved **spec-content** (when `requirements-source` is not `none`), the derived **test context** (test runner + per-file covering tests + whether the change ships its own tests), and the **tool inventory** (linters / type-checkers / test runner). Analyze consumes it. Prepare gathers materials; it does not run the analysis.
|
|
12
|
+
|
|
13
|
+
## Schema
|
|
14
|
+
|
|
15
|
+
```yaml
|
|
16
|
+
prepare-id: YYYY-MM-DD-NNN-prepare
|
|
17
|
+
scope-id: YYYY-MM-DD-NNN-scope
|
|
18
|
+
review-id: YYYY-MM-DD-NNN
|
|
19
|
+
input-shape: change-set | work-linked | ad-hoc
|
|
20
|
+
interactionMode: detailed | smart | autopilot
|
|
21
|
+
status: complete
|
|
22
|
+
timestamp: ISO-8601 timestamp
|
|
23
|
+
|
|
24
|
+
diffs: none | # "none" when change-boundary.empty was true
|
|
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 # carried from the change boundary
|
|
29
|
+
added-lines: N
|
|
30
|
+
removed-lines: M
|
|
31
|
+
hunks: # omitted for `current-contents` attribution / deleted files
|
|
32
|
+
- { start: <line>, body: "<hunk text>" }
|
|
33
|
+
diff-source: "<base>..<head>" | working-tree | working-tree-fallback | current-contents
|
|
34
|
+
|
|
35
|
+
context: # enriched from Scope's seed — callers/importers
|
|
36
|
+
- path: "src/api/session.ts"
|
|
37
|
+
role: "caller of redis-client.connect()"
|
|
38
|
+
|
|
39
|
+
spec-content: none | # "none" when requirements-source.type == none
|
|
40
|
+
- criterion: "C1: <short criterion>"
|
|
41
|
+
expected-behavior:
|
|
42
|
+
- "<observable behavior>"
|
|
43
|
+
|
|
44
|
+
test-context:
|
|
45
|
+
test-runner: npm | pnpm | pytest | go | cargo | rspec | phpunit | mvn | gradle | unknown
|
|
46
|
+
package-manager: npm | pnpm | null # Node.js only; null otherwise
|
|
47
|
+
per-changed-file:
|
|
48
|
+
- path: "src/lib/redis-client.ts"
|
|
49
|
+
covering-tests: [ "src/lib/redis-client.test.ts" ] # may be empty
|
|
50
|
+
ships-own-tests: true | false # true if a test file appears in the required (added/modified) set covering this file
|
|
51
|
+
change-ships-tests: true | false # true if ANY test file is in the required set
|
|
52
|
+
|
|
53
|
+
tool-inventory:
|
|
54
|
+
linters:
|
|
55
|
+
- { name: "eslint", command: "npx eslint", configured: true }
|
|
56
|
+
type-checkers:
|
|
57
|
+
- { name: "tsc", command: "npx tsc --noEmit", configured: true }
|
|
58
|
+
test-runner-present: true | false # whether a runner was detected (echoes test-runner != unknown)
|
|
59
|
+
|
|
60
|
+
work-id: YYYY-MM-DD-NNN | null # work-linked only; null otherwise
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Also save the Review Kit to `docs/plans/.review/.prepare/<prepare-id>.md`.
|
|
64
|
+
|
|
65
|
+
## Validation Rules
|
|
66
|
+
|
|
67
|
+
- **prepare-id:** Required. Format `YYYY-MM-DD-NNN-prepare`.
|
|
68
|
+
- **scope-id, review-id, input-shape:** Required, inherited from Scope (cross-phase consistency).
|
|
69
|
+
- **interactionMode:** Required, identical to the Scope artifact.
|
|
70
|
+
- **diffs:** Required. `none` only when the change boundary was `empty: true`; otherwise one entry per `required` file. Each entry has a repo-relative `path`, a `status`, `added-lines`/`removed-lines` counts, and `hunks` (omitted for `current-contents`/deleted); `diff-source` matches the boundary's attribution.
|
|
71
|
+
- **context:** Required (may be empty). Enriched from Scope's seed; each entry repo-relative with a one-line `role`.
|
|
72
|
+
- **spec-content:** Required. `none` when `requirements-source.type: none`; otherwise the structured criteria list (so Analyze skips the scope-creep category deterministically).
|
|
73
|
+
- **test-context.test-runner:** Required (may be `unknown` if undetected). Informs the tests category; not an authoritative gate.
|
|
74
|
+
- **test-context.per-changed-file:** Required. One entry per changed file with `covering-tests` (may be empty) and `ships-own-tests`. A production-code file with `covering-tests: []` and `ships-own-tests: false` is a Prepare Smart pause trigger (test-gap).
|
|
75
|
+
- **test-context.change-ships-tests:** Required. `true` if any test file is in the `required` set.
|
|
76
|
+
- **tool-inventory:** Required (each list may be empty). Each tool has a `configured` flag. An all-empty inventory is a Prepare Smart pause trigger (warn, do not block).
|
|
77
|
+
- **work-id:** Required for work-linked input; `null` otherwise.
|
|
78
|
+
- **status:** Required. `complete`.
|
|
79
|
+
|
|
80
|
+
## Example (change-set, with requirements)
|
|
81
|
+
|
|
82
|
+
```yaml
|
|
83
|
+
prepare-id: 2026-08-08-001-prepare
|
|
84
|
+
scope-id: 2026-08-08-001-scope
|
|
85
|
+
review-id: 2026-08-08-001
|
|
86
|
+
input-shape: change-set
|
|
87
|
+
interactionMode: smart
|
|
88
|
+
status: complete
|
|
89
|
+
timestamp: 2026-08-08T14:35:00Z
|
|
90
|
+
diffs:
|
|
91
|
+
- path: "src/lib/redis-client.ts"
|
|
92
|
+
status: added
|
|
93
|
+
tentative: false
|
|
94
|
+
added-lines: 64
|
|
95
|
+
removed-lines: 0
|
|
96
|
+
hunks:
|
|
97
|
+
- { start: 1, body: "+export function connect(url: string) { ... }" }
|
|
98
|
+
diff-source: "main..feature/redis-session"
|
|
99
|
+
- path: "src/lib/session-store.ts"
|
|
100
|
+
status: modified
|
|
101
|
+
tentative: false
|
|
102
|
+
added-lines: 12
|
|
103
|
+
removed-lines: 4
|
|
104
|
+
hunks:
|
|
105
|
+
- { start: 22, body: " ... get/save/delete ..." }
|
|
106
|
+
diff-source: "main..feature/redis-session"
|
|
107
|
+
context:
|
|
108
|
+
- { path: "src/api/session.ts", role: "caller of session-store.get()" }
|
|
109
|
+
spec-content:
|
|
110
|
+
- criterion: "C1: Redis client connects with retry"
|
|
111
|
+
expected-behavior:
|
|
112
|
+
- "connect() reads REDIS_URL"
|
|
113
|
+
- "connect() retries up to 3 times on connection failure"
|
|
114
|
+
test-context:
|
|
115
|
+
test-runner: pnpm
|
|
116
|
+
package-manager: pnpm
|
|
117
|
+
per-changed-file:
|
|
118
|
+
- { path: "src/lib/redis-client.ts", covering-tests: ["src/lib/redis-client.test.ts"], ships-own-tests: true }
|
|
119
|
+
- { path: "src/lib/session-store.ts", covering-tests: [], ships-own-tests: false }
|
|
120
|
+
change-ships-tests: true
|
|
121
|
+
tool-inventory:
|
|
122
|
+
linters:
|
|
123
|
+
- { name: "eslint", command: "npx eslint", configured: true }
|
|
124
|
+
type-checkers:
|
|
125
|
+
- { name: "tsc", command: "npx tsc --noEmit", configured: true }
|
|
126
|
+
test-runner-present: true
|
|
127
|
+
work-id: null
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Notes
|
|
131
|
+
|
|
132
|
+
- The orchestrator's quality gate #2 cross-checks `interactionMode` is identical across Scope/Prepare/Analyze/Report artifacts.
|
|
133
|
+
- `spec: none` (from `requirements-source.type: none`) propagates deterministically so Analyze skips the scope-creep category — Prepare does not guess requirements.
|
|
134
|
+
- `test-context.covering-tests: []` with `ships-own-tests: false` is the test-gap signal Analyze elevates to a `tests`-category finding (often `major` per [severity-rubric.md](../../severity-rubric.md)).
|
|
135
|
+
- Tools are **corroborative only**; Prepare inventories them but does not run them. Analyze may run a tool to corroborate a finding, never to create one outside the change boundary.
|