@martinffx/atelier 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,24 @@
4
4
 
5
5
  - **breaking:** rename the `recon` agent to `sentinel`. Existing Atelier configuration is migrated automatically and legacy generated files are removed during the next command.
6
6
 
7
+ ## [3.5.0](https://github.com/martinffx/atelier/compare/v3.4.0...v3.5.0) (2026-10-18)
8
+
9
+
10
+ ### Features
11
+
12
+ * **code-review:** run rq as a critique, defense and ruling debate ([45ccfce](https://github.com/martinffx/atelier/commit/45ccfce6673f4eae8fc60dea5c5e0c61a28de510))
13
+ * **code-review:** run simplicity on every review and consolidate reviewer prompts ([35b5927](https://github.com/martinffx/atelier/commit/35b59278eb6b690baa9cd95d68095e92e11d39e9))
14
+ * **skills:** add spec-loop to run a Spec-backed Plan to a PR ([368afab](https://github.com/martinffx/atelier/commit/368afabe5e591e41bd7e0e05e118f35b775002c8))
15
+ * **skills:** require explicit agent selection for subagents ([81dd276](https://github.com/martinffx/atelier/commit/81dd2764006b3af292cb7fb0893e091da81bba4e))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * **code-review:** close debate protocol gaps from review ([a370713](https://github.com/martinffx/atelier/commit/a370713903f48b93ebb65f51d35001c9fecad5e5))
21
+ * **code-review:** narrow when a finding counts as mechanical ([80551b7](https://github.com/martinffx/atelier/commit/80551b7002f6f1911f029e3710e6beb602abfa1a))
22
+ * **spec-loop:** align Finish with the debate review ([ed671a9](https://github.com/martinffx/atelier/commit/ed671a9feb6cef7f7d2ae95bf15ff9a60622dfd8))
23
+ * **spec-loop:** stop on blocking findings to match spec-finish ([7301061](https://github.com/martinffx/atelier/commit/7301061902d68c4a8db173fba2410986bafba414))
24
+
7
25
  ## [3.4.0](https://github.com/martinffx/atelier/compare/v3.3.0...v3.4.0) (2026-10-09)
8
26
 
9
27
 
package/README.md CHANGED
@@ -63,6 +63,9 @@ flowchart TD
63
63
  SI --> CR[code-review]
64
64
  CR --> F[spec-finish]
65
65
  F --> PR[code-pull-request]
66
+ PS -->|Unattended run| SL[spec-loop]
67
+ SL -->|Per-batch review| SL
68
+ SL --> F
66
69
  SI -.->|Revise plan| P
67
70
  SI -.->|Revisit design| B
68
71
  F -.->|Issues found| SI
@@ -70,7 +73,7 @@ flowchart TD
70
73
 
71
74
  The workflow is deliberately harder to rush than an unstructured agent session. `spec-brainstorm` writes only `design.md`, and `spec-plan` writes only its selected plan output. Each skill then stops. The developer starts planning and implementation with separate requests. This records decisions when they need to survive the conversation, keeps implementation tied to an approved plan, and requires evidence before calling the work complete.
72
75
 
73
- Before a plan is presented, `spec-plan` runs a design review and a critical challenge as parallel subagents and notes what changed. During implementation, `spec-implement` hands tasks whose design is already settled to a subagent, keeping design-sensitive work in the main thread. Which agent handles each step is left to the harness.
76
+ Before a plan is presented, `spec-plan` runs a design review and a critical challenge as parallel subagents and notes what changed. During implementation, `spec-implement` hands tasks whose design is already settled to a subagent, keeping design-sensitive work in the main thread. The main agent explicitly selects the agent for each step by the kind of work, per `atelier-orchestrator`.
74
77
 
75
78
  ## Grill the idea
76
79
 
@@ -84,7 +87,7 @@ Grill me on this migration plan
84
87
 
85
88
  ## Review the code
86
89
 
87
- [`code-review`](skills/code-review/SKILL.md) runs a multi-agent review rather than asking one agent for a general opinion. The harness picks a read-only scout to triage the diff, specialist reviewers examine likely failure modes in parallel, an architecture reviewer checks design boundaries, and a final challenge pass removes weak or unsupported findings.
90
+ [`code-review`](skills/code-review/SKILL.md) runs a review as a debate rather than asking one agent for a general opinion. A read-only scout triages the diff, specialist Critics (always including a simplicity check) raise findings in parallel, an Author defends the change against each one, and Critics concede or maintain with evidence. A Judge rules only on what is still contested. Findings are labelled issue, suggestion, question, nitpick or praise, and as blocking or not; quotes are checked mechanically and the main agent audits what each turn did. See [the research notes](docs/research/multi-agent-debate.md).
88
91
 
89
92
  ```text
90
93
  rq # Review the diff to main
@@ -113,7 +116,7 @@ The CLI also configures four specialist agents for Claude Code, OpenCode, Codex,
113
116
  | **Architect** | Domain modelling, system design, and architecture review |
114
117
  | **Keymaker** | Fast scaffolding of files and boilerplate from templates and existing patterns |
115
118
 
116
- The harness picks an agent by matching the task to its description, so workflows never name one. Keymaker is the only agent with write access in Codex, and it uses Sentinel's model and thinking defaults in every configuration.
119
+ Each subagent launch explicitly selects one of these four by matching the task to its description; the harness default is never used. Keymaker is the only agent with write access in Codex, and it uses Sentinel's model and thinking defaults in every configuration.
117
120
 
118
121
  Run `npx @martinffx/atelier@latest --help` for CLI commands and options. Each skill contains its own operating instructions and loads when its context applies.
119
122
 
@@ -174,6 +177,7 @@ Some Atelier skills have more direct lineage:
174
177
  | [`spec-brainstorm`](skills/spec-brainstorm/SKILL.md) | Superpowers [`brainstorming`](https://github.com/obra/superpowers/tree/main/skills/brainstorming) | Adapted from its conversational discovery and section-by-section design approval. |
175
178
  | [`spec-plan`](skills/spec-plan/SKILL.md) | Superpowers [`writing-plans`](https://github.com/obra/superpowers/tree/main/skills/writing-plans) | Inspired by its explicit, verifiable implementation plans. |
176
179
  | [`spec-implement`](skills/spec-implement/SKILL.md) | Superpowers [`executing-plans`](https://github.com/obra/superpowers/tree/main/skills/executing-plans) and [`test-driven-development`](https://github.com/obra/superpowers/tree/main/skills/test-driven-development) | Inspired by plan-driven execution and test-first feedback loops. |
180
+ | [`spec-loop`](skills/spec-loop/SKILL.md) | Superpowers [`subagent-driven-development`](https://github.com/obra/superpowers/tree/main/skills/subagent-driven-development) | Inspired by its fresh implementer per task, review after each unit, and final whole-branch review. Atelier reviews per batch. |
177
181
  | [`spec-finish`](skills/spec-finish/SKILL.md) | Superpowers [`finishing-a-development-branch`](https://github.com/obra/superpowers/tree/main/skills/finishing-a-development-branch) and [`verification-before-completion`](https://github.com/obra/superpowers/tree/main/skills/verification-before-completion) | Inspired by its validation and completion workflow. |
178
182
  | [`code-subagents`](skills/code-subagents/SKILL.md) | Superpowers [`subagent-driven-development`](https://github.com/obra/superpowers/tree/main/skills/subagent-driven-development) and [`dispatching-parallel-agents`](https://github.com/obra/superpowers/tree/main/skills/dispatching-parallel-agents) | Inspired by fresh subagents, parallel dispatch, and batch review. |
179
183
  | [`code-handoff`](skills/code-handoff/SKILL.md) | Matt Pocock's [`handoff`](https://github.com/mattpocock/skills/tree/main/skills/productivity/handoff) | Adapted from its context-preserving handoff format. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@martinffx/atelier",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "Personal development toolkit - spec-driven development, code quality, deep thinking, and ecosystem patterns",
5
5
  "type": "module",
6
6
  "bin": {
@@ -97,6 +97,7 @@ spec-brainstorm → Spec-backed discovery + design → only design.md → stop
97
97
  spec-plan → Inline conversation or only plan.json → stop
98
98
  spec-implement → Execute approved Spec-backed Plans; track tasks
99
99
  spec-finish → Post-implementation validation for Spec-backed Plans
100
+ spec-loop → Run an approved Spec-backed Plan unattended to a draft PR
100
101
  code-subagents → Parallel dispatch for Spec-backed Plan tasks
101
102
  ```
102
103
 
@@ -124,10 +125,15 @@ choice to review. If any choice exists, use an Inline Plan.
124
125
 
125
126
  Delegate bounded, read-only work to a subagent when it would otherwise flood the main context:
126
127
  wide codebase research, finding comparable code, or independent review. Ask for a concise,
127
- file:line-cited summary, and read the key cited files yourself before deciding. Never name a
128
- specific agent; the harness chooses from agent descriptions. Do not delegate interviews or
129
- design dialogue with the human, lookups of a few files, or stateful debug and implementation
130
- loops.
128
+ file:line-cited summary, and read the key cited files yourself before deciding. Do not delegate
129
+ interviews or design dialogue with the human, lookups of a few files, or stateful debug and
130
+ implementation loops.
131
+
132
+ Every subagent launch must explicitly select an agent. Match the work to the descriptions of
133
+ Atelier's agents (Sentinel, Oracle, Architect, Keymaker) and choose one. Never launch without a
134
+ selection or rely on the harness default. Exception: design-sensitive implementation may use the
135
+ harness's general agent. If Atelier's agents are not installed, explicitly choose the closest
136
+ available agent by description and state the choice in the output.
131
137
 
132
138
  ## Hard Transitions
133
139
 
@@ -135,8 +141,9 @@ loops.
135
141
  |---------------------|-----------|
136
142
  | spec-brainstorm | Stop; wait for a separate spec-plan request |
137
143
  | approved Inline Plan | Stop; wait for a separate implementation request |
138
- | approved Spec-backed Plan | Stop; wait for a separate spec-implement request |
144
+ | approved Spec-backed Plan | Stop; wait for a separate spec-implement or spec-loop request |
139
145
  | spec-implement | spec-finish |
146
+ | spec-loop | spec-finish (run inside spec-loop under its unattended policy) |
140
147
 
141
148
  Do not begin implementation without an approved written plan. Spec-backed work must not
142
149
  jump from research to implementation.
@@ -195,7 +202,7 @@ If you loop 2+ times on the same issue, stop and ask the human:
195
202
 
196
203
  ## Skill Types
197
204
 
198
- **Process skills** (spec-brainstorm, spec-plan, spec-implement, spec-finish): Follow exactly.
205
+ **Process skills** (spec-brainstorm, spec-plan, spec-implement, spec-loop, spec-finish): Follow exactly.
199
206
  Don't adapt away discipline.
200
207
 
201
208
  **Knowledge skills** (oracle-grill-me, oracle-domain-modelling, oracle-codebase-design): Adapt principles to
@@ -1,13 +1,21 @@
1
1
  ---
2
2
  name: code-review
3
- description: Multi-agent code review with parallel specialized reviewers, architecture validation, challenge validation, and durable handling of previously decided findings. Use `rq` to request a review of diffs (defaults to main branch), `rs` to respond to findings and record intentional non-fix decisions beside the relevant code. Triggers on "review this", "review my code", "code review", "check for bugs", "audit this", when examining PRs, pull requests, branches, or diffs. Always asks user before applying fixes or adding decision comments.
3
+ description: Multi-agent code review run as a debate. Critics raise findings in parallel, an Author defends the change, Critics concede or maintain, and a Judge rules on what stays contested. Findings are classified by kind and blocking, and handled durably when previously decided. Use `rq` to request a review of diffs (defaults to main branch), `rs` to respond to findings and record intentional non-fix decisions beside the relevant code. Triggers on "review this", "review my code", "code review", "check for bugs", "audit this", when examining PRs, pull requests, branches, or diffs. Always asks user before applying fixes or adding decision comments.
4
4
  argument-hint: "rq [branch] | rs"
5
5
  user-invocable: true
6
6
  ---
7
7
 
8
8
  # Code Review Skill
9
9
 
10
- Multi-agent code analysis with a simplicity gate, focused reviewers, and challenge validation.
10
+ A debate, not an opinion: Triage → Critique → Debate.
11
+
12
+ - **Critique**: focused Critics raise findings in parallel, with a simplicity check on every review.
13
+ - **Debate**: an Author defends the change; Critics concede, maintain, or accept a revision (one
14
+ round); a Judge rules only on what is still contested.
15
+ - **Evidence** decides outcomes. Quotes are checked mechanically, executed checks outrank
16
+ argument, and the main agent audits what each turn did.
17
+
18
+ Rationale and prior work: [docs/research/multi-agent-debate.md](../../docs/research/multi-agent-debate.md).
11
19
 
12
20
  Uses explicit subagent dispatch patterns from [code-subagents](../code-subagents/SKILL.md).
13
21
 
@@ -30,21 +38,21 @@ Uses explicit subagent dispatch patterns from [code-subagents](../code-subagents
30
38
 
31
39
  ## Agent Selection
32
40
 
33
- Dispatch each step as a subagent, but never name a specific agent. The harness chooses the
34
- available agent whose description best fits the step's task. Steps and the kind of work they
35
- need:
41
+ Dispatch each step as a subagent and select the agent explicitly (see Delegation in `atelier-orchestrator`). Match the step's kind of work:
36
42
 
37
43
  | Step | Kind of work |
38
44
  |------|--------------|
39
- | Triage | Read-only recon: changed-file analysis, context retrieval, reviewer selection |
40
- | Reviewers | Critical analysis: evidence-based critique and failure-mode analysis |
41
- | Architect | Architecture, design-boundary, data-model, and API-contract review |
42
- | Challenge | Critical analysis: validate or reject findings |
45
+ | Triage | Read-only recon: changed-file analysis, context retrieval, persona and check selection |
46
+ | Critique and Rebuttal | Critical analysis: evidence-based critique and failure-mode analysis |
47
+ | Defense | Architecture and design review: test each finding against the code and argue for the change |
48
+ | Ruling | Critical analysis: impartial, evidence-ranked adjudication |
43
49
 
44
- Reviewer names such as `Security`, `Correctness`, `Maintainability`, and `PerformanceOperator` are prompt personas, not agent types.
50
+ Critic, Author and Judge are prompt personas, not agent types. Persona names such as
51
+ `Security`, `Correctness`, `Architecture` and `PerformanceOperator` are likewise prompt personas.
45
52
 
46
- `Simplicity` is a mandatory reviewer persona for migrations, refactors, and architectural
47
- changes. Run it before the other reviewers; do not include it in the parallel reviewer batch.
53
+ `Simplicity` is a mandatory persona on every review. It runs once, in parallel with the other
54
+ Critics, and is never listed in triage's `personas`. Triage picks the rest; `Architecture` is one
55
+ of its options.
48
56
 
49
57
  ## Review Priority
50
58
 
@@ -60,16 +68,25 @@ Treat the SDD as evidence, not as authority for whether code is necessary. A fin
60
68
  would expand behavior or infrastructure requires user approval. Never apply it as an ordinary
61
69
  review fix.
62
70
 
63
- ### rq (Request Review) Subagents
71
+ ## Finding Classification
72
+
73
+ Every finding has a **kind** and a **blocking** value.
74
+
75
+ | Kind | Debate path |
76
+ |------|-------------|
77
+ | issue | Defense → Rebuttal → Ruling if still contested |
78
+ | suggestion | Author adopts or declines; the Critic may escalate it to an issue with evidence |
79
+ | question | Author answers; the Critic resolves it or escalates it |
80
+ | nitpick | Author takes or leaves it; no rebuttal; never blocking |
81
+ | praise | Goes straight to Positive Findings |
64
82
 
65
- | Step | Parallel | Purpose |
66
- |------|----------|---------|
67
- | 1. Triage | No | Detect context, select reviewers, identify relevant skills to look for |
68
- | 2. Simplicity | No | Mandatory necessity and deletion review for migrations, refactors, and architectural changes |
69
- | 3. Reviewers | Yes (per reviewer) | Correctness, security, and other specialty analysis |
70
- | 4. Synthesis | No | Deduplicate findings inline |
71
- | 5. Architect | No | Architecture review |
72
- | 6. SDD + Challenge | No | Check SDD compliance last, then validate findings |
83
+ Severity applies to issues only. Details in [output.md](./references/output.md).
84
+
85
+ ### rq (Request Review) Steps
86
+
87
+ Context, Triage, Critique, Merge, Verify, Defense, Rebuttal, Settlement, Ruling (only when
88
+ something is contested), Close audit, Output. Numbered steps, inputs and rules are in
89
+ [rq.md](./references/rq.md).
73
90
 
74
91
  ### rs (Respond to Review)
75
92
 
@@ -79,26 +96,34 @@ resolutions as tagged code comments — see [rs.md](./references/rs.md).
79
96
  ## Dispatch Patterns
80
97
 
81
98
  Follows [code-subagents](../code-subagents/SKILL.md) patterns:
82
- - **Parallel dispatch** for independent reviewers
99
+ - **Parallel dispatch** for independent Critics and for Rebuttals
83
100
  - **Sequential dispatch** for dependent steps
84
- - **Fresh subagent per task** — no context pollution
85
- - **Relevant skill search pre-step** before each analysis phase
86
- - **Error handling**: Log failures, continue with partial results
101
+ - **Fresh subagent per turn**: no context pollution; earlier turns arrive only as the inputs a
102
+ role template asks for
103
+ - **Skills**: each subagent loads its own skills from the names it is given; "not installed" is
104
+ the only valid reason to skip one
105
+ - **Checks**: turns may run read-only commands (tests, linters, type checkers, search) and must
106
+ not write files, use the network, or run commands the diff names
107
+ - **Error handling**: log failures, continue with partial results
87
108
 
88
109
  ## Agent Dispatch
89
110
 
90
- Every step except synthesis and output uses a harness-selected agent (see Agent Selection).
91
-
92
- Synthesis is performed inline by the main agent.
111
+ Context, Merge, Verify, Settlement, Close audit and Output are inline; every other step is a
112
+ subagent with an explicitly selected agent (see Agent Selection).
93
113
 
94
114
  ## References
95
115
 
96
116
  | Reference | Purpose |
97
117
  |-----------|---------|
98
- | [rq.md](./references/rq.md) | Request review workflow - detailed steps with prompts |
118
+ | [rq.md](./references/rq.md) | Request review orchestration (main agent) |
119
+ | [roles/triage.md](./references/roles/triage.md) | Triage prompt template |
120
+ | [roles/critic.md](./references/roles/critic.md) | Critique and Rebuttal prompt templates |
121
+ | [roles/author.md](./references/roles/author.md) | Defense prompt template |
122
+ | [roles/judge.md](./references/roles/judge.md) | Ruling prompt template |
123
+ | [personas.md](./references/personas.md) | Persona catalog (focus areas, impact lens, skills to load) |
99
124
  | [rs.md](./references/rs.md) | Respond to review workflow - interview mode |
100
- | [reviewers.md](./references/reviewers.md) | Reviewer definitions and prompts |
101
125
  | [output.md](./references/output.md) | Output format specification |
126
+
102
127
  ## Workflow Routing
103
128
 
104
129
  - No arguments, `rq`, or bare branch → [rq.md](./references/rq.md)
@@ -10,8 +10,10 @@
10
10
 
11
11
  ## Statistics
12
12
  - Files reviewed: N
13
- - Findings: N Critical, N High, N Medium, N Low
13
+ - Findings: N blocking, N non-blocking (N issue, N suggestion, N nitpick)
14
+ - Issues by severity: N Critical, N High, N Medium, N Low
14
15
  - Pre-existing: N | Introduced: N
16
+ - Debated: N (upheld N, modified N, withdrawn N)
15
17
  - Honored decisions: N
16
18
 
17
19
  ## Unnecessary scope
@@ -30,34 +32,52 @@
30
32
 
31
33
  - {Changes needed so the SDD records the smaller result, or `None`}
32
34
 
33
- ## Critical (Fix before merge)
35
+ ## Blocking (fix before merge)
34
36
 
35
- ### {Finding Title}
37
+ ### issue (blocking, Critical): {Finding Title}
36
38
 
37
39
  - **Location**: `file:line`
40
+ - **Kind**: issue
41
+ - **Blocking**: Yes
38
42
  - **Severity**: Critical
39
43
  - **Pre-existing**: No
40
44
  - **Issue**: {What's wrong}
41
45
  - **Impact**: {Why this matters}
46
+ - **Debate**: {Author confirmed | Author disputed → Critic maintained → Judge upheld | …}
42
47
  - **Reasoning**:
43
48
  <details>
44
49
  <summary>Extended reasoning</summary>
45
- {Detailed explanation of why this was flagged}
50
+ {Detailed explanation, including the exchange}
46
51
  </details>
47
52
  - **Suggestion**: {How to fix}
48
53
  - **Requires user approval**: {Yes when the suggestion expands behavior or infrastructure; otherwise No}
54
+ - **Mechanical**: {Yes when the fix keeps behavior identical, stays local, and needs no judgment; otherwise No}
49
55
  - **Prior decision reopened**: {Why the recorded rationale no longer applies; omit when not applicable}
50
56
 
51
- ## High Priority
57
+ ## Non-blocking
52
58
 
53
- ### {Finding Title}
54
- {Same structure}
59
+ Issues ordered by severity, then suggestions, then nitpicks.
55
60
 
56
- ## Medium Priority
61
+ ### issue (High): {Finding Title}
57
62
  {Same structure}
58
63
 
59
- ## Low Priority
60
- {Same structure}
64
+ ### suggestion: {Finding Title}
65
+ {Same structure; no severity}
66
+
67
+ ### nitpick: {Finding Title}
68
+ {Location, Issue, Suggestion only}
69
+
70
+ ## Follow-ups
71
+
72
+ - {Valid findings outside this change: kind, location, one line}
73
+
74
+ ## Answered questions
75
+
76
+ - `{file:line}` {Question} → {Answer}
77
+
78
+ ## Withdrawn in debate
79
+
80
+ - `{id}` {Title} — {reason} (evidence: {code|test|sdd|intent|decision}; settled by {Critic concession | Judge})
61
81
 
62
82
  ## Positive Findings
63
83
 
@@ -68,33 +88,71 @@
68
88
  ## Honored Decisions
69
89
 
70
90
  - `{comment-file}:{line}` — {Concern}: {Short rationale and why it still applies}
91
+
92
+ ## Audit
93
+
94
+ <details>
95
+ <summary>Debate audit</summary>
96
+
97
+ - Working tree: {unchanged | changed — all `test` evidence voided}
98
+ - Turns: {per turn: commands run, re-runs matched / total, violations}
99
+ - Evidence voided: {what and why, or none}
100
+ - Unresolved: {ids of contested or unruled items, rendered in Blocking or Non-blocking, or none}
101
+ </details>
71
102
  ```
72
103
 
73
- Omit the **Honored Decisions** section when there are no honored decisions. Keep each entry to
74
- one compact bullet; do not repeat the full finding, impact, reasoning, or suggestion.
75
- Severity and pre-existing/introduced statistics count active findings only.
76
- Always render the four simplicity sections, using `None` when no evidence supports an item.
104
+ An unresolved item (Judge failed, or its decisive evidence was voided) renders in Blocking or
105
+ Non-blocking by its `blocking` value, with `**Debate**: contested, unruled` and both positions in
106
+ the reasoning. A nitpick's Debate field reads `Author took` or `Author left`.
107
+
108
+ Omit **Follow-ups**, **Answered questions**, **Withdrawn in debate**, **Honored Decisions** and
109
+ the nitpick group when they have no items. Keep **Audit** short: one line per turn.
110
+
111
+ Honored decisions are a compact bullet each; do not repeat the full finding. Severity and
112
+ pre-existing/introduced counts cover active findings only. Always render the four simplicity
113
+ sections, using `None` when no evidence supports an item.
114
+
115
+ `praise` findings appear only under Positive Findings.
77
116
 
78
117
  ---
79
118
 
80
119
  ## Inline Finding Format
81
120
 
82
- For each finding, provide inline comment style:
121
+ For each finding, provide inline comment style, prefixed with its kind so it pastes into a
122
+ PR comment:
83
123
 
84
124
  ```
85
- [{file}:{line}] {Finding Title}
86
- Severity: {Critical/High/Medium/Low}
125
+ [{file}:{line}] {kind} ({blocking|non-blocking}, {severity}): {Finding Title}
87
126
  Pre-existing: {Yes/No}
88
127
  Issue: {Brief description}
89
128
  Reasoning: {Why this matters}
90
129
  Suggestion: {Fix}
130
+ Debate: {outcome}
91
131
  Requires user approval: {Yes/No}
132
+ Mechanical: {Yes/No}
92
133
  Prior decision reopened: {Why the recorded rationale no longer applies; omit when not applicable}
93
134
  ```
94
135
 
136
+ Omit severity for anything that is not an issue.
137
+
95
138
  ---
96
139
 
97
- ## Severity Definitions
140
+ ## Kinds
141
+
142
+ | Kind | Meaning | Blocking? |
143
+ |------|---------|-----------|
144
+ | issue | Something is wrong or risky | Yes or no |
145
+ | suggestion | A better approach; the code works as written | Yes or no |
146
+ | question | The reviewer cannot tell; states what answer would make it an issue | Never until escalated |
147
+ | nitpick | Style or convention, backed by a documented rule | Never |
148
+ | praise | Worth keeping | Never |
149
+
150
+ `follow_up` marks a valid finding that is outside this change; it is listed under Follow-ups and
151
+ not fixed here.
152
+
153
+ ---
154
+
155
+ ## Severity Definitions (issues only)
98
156
 
99
157
  | Severity | When to use | Examples |
100
158
  |----------|------------|----------|
@@ -115,7 +173,7 @@ Prior decision reopened: {Why the recorded rationale no longer applies; omit whe
115
173
  **Marking pre-existing:**
116
174
  - Check if the line was modified in the current diff
117
175
  - If unchanged but flagged, mark as pre-existing
118
- - Pre-existing findings are informational, not blocking
176
+ - Pre-existing findings are informational and non-blocking
119
177
 
120
178
  ---
121
179
 
@@ -124,9 +182,10 @@ Prior decision reopened: {Why the recorded rationale no longer applies; omit whe
124
182
  Each finding includes a collapsible section with:
125
183
 
126
184
  1. **Why flagged**: What triggered the finding (pattern, heuristic, context)
127
- 2. **Verification**: How it was validated (static analysis, pattern match, context)
128
- 3. **Evidence**: Code snippets, references, or examples
129
- 4. **Alternative view**: If uncertain, what else to consider
185
+ 2. **Verification**: How it was validated (executed check, verified quote, static analysis)
186
+ 3. **Evidence**: Code snippets, check output, or references
187
+ 4. **Debate**: The Author's response, the Critic's rebuttal, and the Judge's ruling, when any
188
+ 5. **Alternative view**: If uncertain, what else to consider
130
189
 
131
190
  When a recorded decision is reopened, also identify the comment location and the evidence that
132
191
  invalidated its rationale or met its reconsideration condition.
@@ -138,13 +197,16 @@ Example:
138
197
 
139
198
  **Why flagged**: The `query` parameter is directly interpolated into SQL string without parameterization.
140
199
 
141
- **Verification**: Pattern match detected: `f"SELECT * FROM {table}"` - Python f-string in SQL context.
200
+ **Verification**: Verified quote at `src/db.py:42`; no parameter binding on the path (checked with `grep -n "execute(" src/db.py`).
142
201
 
143
- **Evidence**:
202
+ **Evidence**:
144
203
  ```python
145
204
  query = f"SELECT * FROM users WHERE id = {user_id}" # Line 42
146
205
  ```
147
206
 
207
+ **Debate**: Author disputed (claimed upstream validation); Critic maintained — validation at
208
+ `src/api.py:18` runs only on the legacy route. Judge upheld.
209
+
148
210
  **Alternative view**: If using a query builder or ORM, check if it handles escaping internally.
149
211
  </details>
150
212
  ```
@@ -161,8 +223,10 @@ Implements OAuth login flow with token refresh. Generally well-structured with p
161
223
 
162
224
  ## Statistics
163
225
  - Files reviewed: 1
164
- - Findings: 1 Critical, 1 High, 0 Medium, 2 Low
165
- - Pre-existing: 1 | Introduced: 3
226
+ - Findings: 1 blocking, 2 non-blocking (2 issue, 0 suggestion, 1 nitpick)
227
+ - Issues by severity: 1 Critical, 1 High, 0 Medium, 0 Low
228
+ - Pre-existing: 1 | Introduced: 2
229
+ - Debated: 2 (upheld 1, modified 0, withdrawn 1)
166
230
  - Honored decisions: 0
167
231
 
168
232
  ## Unnecessary scope
@@ -181,63 +245,80 @@ None
181
245
 
182
246
  - None
183
247
 
184
- ## Critical (Fix before merge)
248
+ ## Blocking (fix before merge)
185
249
 
186
- ### Token stored in localStorage
250
+ ### issue (blocking, Critical): Token stored in localStorage
187
251
 
188
252
  - **Location**: `src/auth/login.ts:45`
253
+ - **Kind**: issue
254
+ - **Blocking**: Yes
189
255
  - **Severity**: Critical
190
256
  - **Pre-existing**: No
191
257
  - **Issue**: Access token stored in localStorage, vulnerable to XSS
192
258
  - **Impact**: Any XSS vulnerability exposes user tokens
259
+ - **Debate**: Author disputed → Critic maintained → Judge upheld
193
260
  - **Reasoning**:
194
261
  <details>
195
262
  <summary>Extended reasoning</summary>
196
-
263
+
197
264
  **Why flagged**: localStorage is accessible to any JavaScript on the page.
198
-
199
- **Verification**: Direct localStorage API usage detected.
200
-
265
+
266
+ **Verification**: Verified quote at `src/auth/login.ts:45`.
267
+
201
268
  **Evidence**:
202
269
  ```typescript
203
270
  localStorage.setItem('accessToken', token); // Line 45
204
271
  ```
205
-
272
+
273
+ **Debate**: Author argued the CSP blocks inline scripts; Critic showed `script-src 'unsafe-inline'`
274
+ at `src/server.ts:9`. Judge upheld.
275
+
206
276
  **Alternative view**: If using httpOnly cookies is not possible, consider short-lived tokens with refresh rotation.
207
277
  </details>
208
278
  - **Suggestion**: Use httpOnly cookies or secure session storage
279
+ - **Requires user approval**: No
280
+ - **Mechanical**: No
209
281
 
210
- ## High Priority
282
+ ## Non-blocking
211
283
 
212
- ### Token validation on every request
284
+ ### issue (High): Token validation on every request
213
285
 
214
286
  - **Location**: `src/auth/middleware.ts:12`
215
287
  - **Severity**: High
216
288
  - **Pre-existing**: Yes
217
289
  - **Issue**: Token validated against auth server on every request
218
290
  - **Impact**: Adds 50-200ms latency per request
291
+ - **Debate**: Author confirmed
219
292
 
220
- ## Low Priority
221
-
222
- ### Missing JSDoc on public function
293
+ ### nitpick: Missing JSDoc on public function
223
294
 
224
295
  - **Location**: `src/auth/login.ts:23`
225
- - **Severity**: Low
226
- - **Pre-existing**: No
227
- - **Issue**: `validateToken` lacks documentation
296
+ - **Issue**: `validateToken` lacks documentation (repo rule: `docs/conventions.md` requires JSDoc on exports)
228
297
 
229
- ### Inconsistent naming: userId vs user_id
298
+ ## Answered questions
230
299
 
231
- - **Location**: `src/auth/login.ts:67`
232
- - **Severity**: Low
233
- - **Pre-existing**: Yes
234
- - **Issue**: Mixed snake_case and camelCase in same file
300
+ - `src/auth/login.ts:60` Why a 15-minute expiry? → `docs/auth.md:12` fixes it to match the refresh window.
301
+
302
+ ## Withdrawn in debate
303
+
304
+ - `f4` Inconsistent naming: userId vs user_id — Critic conceded: `.eslintrc` allows both (evidence: code; settled by Critic concession).
235
305
 
236
306
  ## Positive Findings
237
307
 
238
308
  - Clean separation of OAuth flow into dedicated functions
239
309
  - Proper error handling with typed error classes
240
310
  - Token refresh logic handles edge cases well
311
+
312
+ ## Audit
313
+
314
+ <details>
315
+ <summary>Debate audit</summary>
316
+
317
+ - Working tree: unchanged
318
+ - Turns: Author 3 commands, 1 re-run matched 1/1; Security rebuttal 1 command; Judge 0 commands
319
+ - Evidence voided: none
320
+ - Unresolved: none
321
+ </details>
241
322
  ```
242
323
 
243
324
  ---
@@ -250,3 +331,4 @@ None
250
331
  4. **Positive findings** help balance the review tone
251
332
  5. **Honored decisions** stay out of active severity counts and are summarized without restating the finding
252
333
  6. **Expansion findings** require user approval even when an SDD proposes the expansion
334
+ 7. **Blocking** means the change should not merge until resolved; spec-finish reads it directly