@lvlup-sw/exarchos 2.8.1 → 2.8.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvlup-sw/exarchos",
3
- "version": "2.8.1",
3
+ "version": "2.8.3",
4
4
  "description": "Structure for agentic development — durable SDLC workflows, convergence gates, agent teams, and audit trails for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -93,7 +93,26 @@ Review the returned `actionItems` and `recommendation`:
93
93
 
94
94
  ### Step 2 — Fix
95
95
 
96
- Address each blocking action item from the assessment. Consult `references/fix-strategies.md` for detailed strategies per issue type.
96
+ Before iterating over individual action items, classify them so the loop
97
+ knows which to fix inline vs. delegate. Call `classify_review_items` on
98
+ the assessment's `actionItems` (the comment-reply subset is what the
99
+ classifier groups by file; CI-fix and review-address items are passed
100
+ through unchanged):
101
+
102
+ ```typescript
103
+ mcp__plugin_exarchos_exarchos__exarchos_orchestrate({
104
+ action: "classify_review_items",
105
+ featureId: "<id>",
106
+ actionItems: <actionItems from assess_stack>
107
+ })
108
+ ```
109
+
110
+ The result returns `groups: ClassificationGroup[]` with a `recommendation`
111
+ per group: `direct` (handle inline), `delegate-fixer` (spawn the fixer
112
+ subagent for batched/HIGH-severity work), or `delegate-scaffolder`
113
+ (cheap subagent for doc nits). Iterate the groups in order, applying
114
+ per-group strategy, then consult `references/fix-strategies.md` for
115
+ detailed per-issue-type instructions.
97
116
 
98
117
  **Remediation event protocol (FLYWHEEL):**
99
118
 
@@ -130,7 +149,7 @@ These events feed `selfCorrectionRate` and `avgRemediationAttempts` metrics in C
130
149
  | Type | Strategy |
131
150
  |------|----------|
132
151
  | `ci-fix` | Read logs, reproduce locally, fix, commit to stack branch |
133
- | `comment-reply` | Read context from `actionItem.context`, compose response, post via GitHub MCP |
152
+ | `comment-reply` | Use `actionItem.reviewer`, `normalizedSeverity`, `file`, `line`, and `raw` (full original comment) to compose a response. Provider adapters under `servers/exarchos-mcp/src/review/providers/` populate the input fields per #1159 — no manual tier parsing needed. **Posting:** PR-level summary comments use the provider-agnostic `add_pr_comment` orchestrate action; per-thread inline replies currently require the platform-specific MCP (e.g. `mcp__plugin_github_github__add_reply_to_pull_request_comment` for GitHub) until `VcsProvider` gains a thread-reply primitive — see [#1165](https://github.com/lvlup-sw/exarchos/issues/1165) for tracking. |
134
153
  | `review-address` | Fix code for CHANGES_REQUESTED, reply to each thread |
135
154
  | `restack` | Run `git rebase origin/<base>`, verify with `exarchos_orchestrate({ action: "list_prs" })` |
136
155
  | `escalate` | Consult `references/escalation-criteria.md` |
@@ -4,14 +4,16 @@ How to address common issues found during shepherd assessment.
4
4
 
5
5
  ## Decision: Fix Directly vs. Delegate
6
6
 
7
- | Condition | Approach |
8
- |-----------|----------|
9
- | Single file, < 20 lines changed | Fix directly in the stack branch |
10
- | Multiple files, contained concern | Fix directly if < 5 files |
11
- | Cross-cutting or architectural | Route to `/exarchos:delegate --fixes` for subagent dispatch |
12
- | Test changes needed | Fix directly (keep TDD cycle tight) |
7
+ The `classify_review_items` orchestrate action owns this decision (#1159).
8
+ Pass it the `actionItems` from `assess_stack` and consume the
9
+ `recommendation` field on each returned group:
13
10
 
14
- **Default to fixing directly** delegation adds overhead. Only delegate when the fix scope warrants it.
11
+ - `direct`handle inline in the shepherd loop
12
+ - `delegate-fixer` — spawn the fixer subagent (batched / HIGH severity)
13
+ - `delegate-scaffolder` — cheap scaffolder dispatch for doc nits
14
+
15
+ Test changes still warrant inline handling regardless of recommendation —
16
+ keep the TDD cycle tight rather than delegating test edits.
15
17
 
16
18
  ## Remediation Event Emission
17
19
 
@@ -154,52 +156,23 @@ For each comment, determine the appropriate response:
154
156
  | Already fixed (outdated) | Reply confirming | "Fixed in [commit/PR description] — [brief explanation]." |
155
157
  | False positive | Reply explaining | "[Explanation of why this doesn't apply in this context]." |
156
158
 
157
- ### Sentry Comments
158
-
159
- Sentry's `[bot]` leaves **bug predictions** — AI-generated analysis of potential runtime issues. These appear as inline review comments with severity tags (CRITICAL, MEDIUM, etc.).
160
-
161
- **Sentry comments deserve careful attention because they often identify real bugs** (field name mismatches, type coercion issues, null reference risks).
162
-
163
- How to handle:
164
- 1. Read the full comment body Sentry includes a "Suggested Fix" section
165
- 2. Evaluate whether the bug is real:
166
- - Check if the code path is actually reachable
167
- - Check if the field names/types match what the data actually provides
168
- - Check existing tests — does any test exercise this path?
169
- 3. If real: fix the bug, add a test, reply confirming
170
- 4. If false positive: reply explaining why (e.g., "This path is guarded by X" or "The field is validated at Y before reaching this code")
171
-
172
- **Common Sentry findings:**
173
- - Field name mismatches between producers and consumers
174
- - Missing null checks on optional fields
175
- - Type mismatches (string vs. enum, array vs. object)
176
- - Unreachable error paths due to upstream validation
177
-
178
- ### CodeRabbit Comments
179
-
180
- CodeRabbit leaves detailed code review suggestions with severity indicators. It re-reviews automatically on push, so code fixes may auto-resolve threads.
181
-
182
- How to handle:
183
- 1. Read all CodeRabbit comments, noting severity (Critical, Major, Minor)
184
- 2. Critical/Major: Must address — fix or provide strong rationale for not fixing
185
- 3. Minor: Fix if low-effort, otherwise acknowledge
186
- 4. CodeRabbit marks threads as "Addressed in commits" when it detects the code changed — but always verify with a reply
187
-
188
- **Common CodeRabbit findings:**
189
- - Error handling gaps (missing try/catch, bare catches)
190
- - Code duplication (DRY violations)
191
- - Style/naming suggestions
192
- - Performance optimizations
193
- - Security concerns
194
-
195
- ### Human Reviewer Comments
196
-
197
- Human comments require the most careful handling:
198
- 1. Read comments carefully — understand the full context
199
- 2. For required changes: fix the code, reply confirming
200
- 3. For questions: answer directly on the PR
201
- 4. For suggestions: discuss or implement, reply with decision
202
- 5. For approval with minor nits: fix nits, note the approval
159
+ ### Per-reviewer parsing (Sentry, CodeRabbit, Human, GitHub-Copilot)
160
+
161
+ Severity normalization and per-reviewer comment parsing live in the
162
+ provider adapters under `servers/exarchos-mcp/src/review/providers/` (#1159).
163
+ `assess_stack` dispatches each PR comment through the adapter registry
164
+ and attaches a normalized `ActionItem` (with `normalizedSeverity` and
165
+ `reviewer` fields) to each unresolved comment. Use that signal when
166
+ deciding response strategy below; you do not need to re-parse tier
167
+ markers in the shepherd loop.
168
+
169
+ If a *recognised* reviewer (e.g. CodeRabbit) ships a new severity tier
170
+ that the adapter does not match, the `provider.unknown-tier` event
171
+ surfaces the unrecognised tier marker for follow-up the comment is
172
+ processed as MEDIUM in the meantime. Unknown *reviewers* (authors that
173
+ don't match any typed adapter) are routed silently to the `unknown`
174
+ adapter and never trigger this event; their comments are also processed
175
+ as MEDIUM by default.
203
176
 
204
177
  ### GitHub Actions Bot Comments
205
178
 
@@ -93,7 +93,26 @@ Review the returned `actionItems` and `recommendation`:
93
93
 
94
94
  ### Step 2 — Fix
95
95
 
96
- Address each blocking action item from the assessment. Consult `references/fix-strategies.md` for detailed strategies per issue type.
96
+ Before iterating over individual action items, classify them so the loop
97
+ knows which to fix inline vs. delegate. Call `classify_review_items` on
98
+ the assessment's `actionItems` (the comment-reply subset is what the
99
+ classifier groups by file; CI-fix and review-address items are passed
100
+ through unchanged):
101
+
102
+ ```typescript
103
+ mcp__exarchos__exarchos_orchestrate({
104
+ action: "classify_review_items",
105
+ featureId: "<id>",
106
+ actionItems: <actionItems from assess_stack>
107
+ })
108
+ ```
109
+
110
+ The result returns `groups: ClassificationGroup[]` with a `recommendation`
111
+ per group: `direct` (handle inline), `delegate-fixer` (spawn the fixer
112
+ subagent for batched/HIGH-severity work), or `delegate-scaffolder`
113
+ (cheap subagent for doc nits). Iterate the groups in order, applying
114
+ per-group strategy, then consult `references/fix-strategies.md` for
115
+ detailed per-issue-type instructions.
97
116
 
98
117
  **Remediation event protocol (FLYWHEEL):**
99
118
 
@@ -130,7 +149,7 @@ These events feed `selfCorrectionRate` and `avgRemediationAttempts` metrics in C
130
149
  | Type | Strategy |
131
150
  |------|----------|
132
151
  | `ci-fix` | Read logs, reproduce locally, fix, commit to stack branch |
133
- | `comment-reply` | Read context from `actionItem.context`, compose response, post via GitHub MCP |
152
+ | `comment-reply` | Use `actionItem.reviewer`, `normalizedSeverity`, `file`, `line`, and `raw` (full original comment) to compose a response. Provider adapters under `servers/exarchos-mcp/src/review/providers/` populate the input fields per #1159 — no manual tier parsing needed. **Posting:** PR-level summary comments use the provider-agnostic `add_pr_comment` orchestrate action; per-thread inline replies currently require the platform-specific MCP (e.g. `mcp__plugin_github_github__add_reply_to_pull_request_comment` for GitHub) until `VcsProvider` gains a thread-reply primitive — see [#1165](https://github.com/lvlup-sw/exarchos/issues/1165) for tracking. |
134
153
  | `review-address` | Fix code for CHANGES_REQUESTED, reply to each thread |
135
154
  | `restack` | Run `git rebase origin/<base>`, verify with `exarchos_orchestrate({ action: "list_prs" })` |
136
155
  | `escalate` | Consult `references/escalation-criteria.md` |
@@ -4,14 +4,16 @@ How to address common issues found during shepherd assessment.
4
4
 
5
5
  ## Decision: Fix Directly vs. Delegate
6
6
 
7
- | Condition | Approach |
8
- |-----------|----------|
9
- | Single file, < 20 lines changed | Fix directly in the stack branch |
10
- | Multiple files, contained concern | Fix directly if < 5 files |
11
- | Cross-cutting or architectural | Route to `/exarchos:delegate --fixes` for subagent dispatch |
12
- | Test changes needed | Fix directly (keep TDD cycle tight) |
7
+ The `classify_review_items` orchestrate action owns this decision (#1159).
8
+ Pass it the `actionItems` from `assess_stack` and consume the
9
+ `recommendation` field on each returned group:
13
10
 
14
- **Default to fixing directly** delegation adds overhead. Only delegate when the fix scope warrants it.
11
+ - `direct`handle inline in the shepherd loop
12
+ - `delegate-fixer` — spawn the fixer subagent (batched / HIGH severity)
13
+ - `delegate-scaffolder` — cheap scaffolder dispatch for doc nits
14
+
15
+ Test changes still warrant inline handling regardless of recommendation —
16
+ keep the TDD cycle tight rather than delegating test edits.
15
17
 
16
18
  ## Remediation Event Emission
17
19
 
@@ -154,52 +156,23 @@ For each comment, determine the appropriate response:
154
156
  | Already fixed (outdated) | Reply confirming | "Fixed in [commit/PR description] — [brief explanation]." |
155
157
  | False positive | Reply explaining | "[Explanation of why this doesn't apply in this context]." |
156
158
 
157
- ### Sentry Comments
158
-
159
- Sentry's `[bot]` leaves **bug predictions** — AI-generated analysis of potential runtime issues. These appear as inline review comments with severity tags (CRITICAL, MEDIUM, etc.).
160
-
161
- **Sentry comments deserve careful attention because they often identify real bugs** (field name mismatches, type coercion issues, null reference risks).
162
-
163
- How to handle:
164
- 1. Read the full comment body Sentry includes a "Suggested Fix" section
165
- 2. Evaluate whether the bug is real:
166
- - Check if the code path is actually reachable
167
- - Check if the field names/types match what the data actually provides
168
- - Check existing tests — does any test exercise this path?
169
- 3. If real: fix the bug, add a test, reply confirming
170
- 4. If false positive: reply explaining why (e.g., "This path is guarded by X" or "The field is validated at Y before reaching this code")
171
-
172
- **Common Sentry findings:**
173
- - Field name mismatches between producers and consumers
174
- - Missing null checks on optional fields
175
- - Type mismatches (string vs. enum, array vs. object)
176
- - Unreachable error paths due to upstream validation
177
-
178
- ### CodeRabbit Comments
179
-
180
- CodeRabbit leaves detailed code review suggestions with severity indicators. It re-reviews automatically on push, so code fixes may auto-resolve threads.
181
-
182
- How to handle:
183
- 1. Read all CodeRabbit comments, noting severity (Critical, Major, Minor)
184
- 2. Critical/Major: Must address — fix or provide strong rationale for not fixing
185
- 3. Minor: Fix if low-effort, otherwise acknowledge
186
- 4. CodeRabbit marks threads as "Addressed in commits" when it detects the code changed — but always verify with a reply
187
-
188
- **Common CodeRabbit findings:**
189
- - Error handling gaps (missing try/catch, bare catches)
190
- - Code duplication (DRY violations)
191
- - Style/naming suggestions
192
- - Performance optimizations
193
- - Security concerns
194
-
195
- ### Human Reviewer Comments
196
-
197
- Human comments require the most careful handling:
198
- 1. Read comments carefully — understand the full context
199
- 2. For required changes: fix the code, reply confirming
200
- 3. For questions: answer directly on the PR
201
- 4. For suggestions: discuss or implement, reply with decision
202
- 5. For approval with minor nits: fix nits, note the approval
159
+ ### Per-reviewer parsing (Sentry, CodeRabbit, Human, GitHub-Copilot)
160
+
161
+ Severity normalization and per-reviewer comment parsing live in the
162
+ provider adapters under `servers/exarchos-mcp/src/review/providers/` (#1159).
163
+ `assess_stack` dispatches each PR comment through the adapter registry
164
+ and attaches a normalized `ActionItem` (with `normalizedSeverity` and
165
+ `reviewer` fields) to each unresolved comment. Use that signal when
166
+ deciding response strategy below; you do not need to re-parse tier
167
+ markers in the shepherd loop.
168
+
169
+ If a *recognised* reviewer (e.g. CodeRabbit) ships a new severity tier
170
+ that the adapter does not match, the `provider.unknown-tier` event
171
+ surfaces the unrecognised tier marker for follow-up the comment is
172
+ processed as MEDIUM in the meantime. Unknown *reviewers* (authors that
173
+ don't match any typed adapter) are routed silently to the `unknown`
174
+ adapter and never trigger this event; their comments are also processed
175
+ as MEDIUM by default.
203
176
 
204
177
  ### GitHub Actions Bot Comments
205
178
 
@@ -93,7 +93,26 @@ Review the returned `actionItems` and `recommendation`:
93
93
 
94
94
  ### Step 2 — Fix
95
95
 
96
- Address each blocking action item from the assessment. Consult `references/fix-strategies.md` for detailed strategies per issue type.
96
+ Before iterating over individual action items, classify them so the loop
97
+ knows which to fix inline vs. delegate. Call `classify_review_items` on
98
+ the assessment's `actionItems` (the comment-reply subset is what the
99
+ classifier groups by file; CI-fix and review-address items are passed
100
+ through unchanged):
101
+
102
+ ```typescript
103
+ mcp__exarchos__exarchos_orchestrate({
104
+ action: "classify_review_items",
105
+ featureId: "<id>",
106
+ actionItems: <actionItems from assess_stack>
107
+ })
108
+ ```
109
+
110
+ The result returns `groups: ClassificationGroup[]` with a `recommendation`
111
+ per group: `direct` (handle inline), `delegate-fixer` (spawn the fixer
112
+ subagent for batched/HIGH-severity work), or `delegate-scaffolder`
113
+ (cheap subagent for doc nits). Iterate the groups in order, applying
114
+ per-group strategy, then consult `references/fix-strategies.md` for
115
+ detailed per-issue-type instructions.
97
116
 
98
117
  **Remediation event protocol (FLYWHEEL):**
99
118
 
@@ -130,7 +149,7 @@ These events feed `selfCorrectionRate` and `avgRemediationAttempts` metrics in C
130
149
  | Type | Strategy |
131
150
  |------|----------|
132
151
  | `ci-fix` | Read logs, reproduce locally, fix, commit to stack branch |
133
- | `comment-reply` | Read context from `actionItem.context`, compose response, post via GitHub MCP |
152
+ | `comment-reply` | Use `actionItem.reviewer`, `normalizedSeverity`, `file`, `line`, and `raw` (full original comment) to compose a response. Provider adapters under `servers/exarchos-mcp/src/review/providers/` populate the input fields per #1159 — no manual tier parsing needed. **Posting:** PR-level summary comments use the provider-agnostic `add_pr_comment` orchestrate action; per-thread inline replies currently require the platform-specific MCP (e.g. `mcp__plugin_github_github__add_reply_to_pull_request_comment` for GitHub) until `VcsProvider` gains a thread-reply primitive — see [#1165](https://github.com/lvlup-sw/exarchos/issues/1165) for tracking. |
134
153
  | `review-address` | Fix code for CHANGES_REQUESTED, reply to each thread |
135
154
  | `restack` | Run `git rebase origin/<base>`, verify with `exarchos_orchestrate({ action: "list_prs" })` |
136
155
  | `escalate` | Consult `references/escalation-criteria.md` |
@@ -4,14 +4,16 @@ How to address common issues found during shepherd assessment.
4
4
 
5
5
  ## Decision: Fix Directly vs. Delegate
6
6
 
7
- | Condition | Approach |
8
- |-----------|----------|
9
- | Single file, < 20 lines changed | Fix directly in the stack branch |
10
- | Multiple files, contained concern | Fix directly if < 5 files |
11
- | Cross-cutting or architectural | Route to `/exarchos:delegate --fixes` for subagent dispatch |
12
- | Test changes needed | Fix directly (keep TDD cycle tight) |
7
+ The `classify_review_items` orchestrate action owns this decision (#1159).
8
+ Pass it the `actionItems` from `assess_stack` and consume the
9
+ `recommendation` field on each returned group:
13
10
 
14
- **Default to fixing directly** delegation adds overhead. Only delegate when the fix scope warrants it.
11
+ - `direct`handle inline in the shepherd loop
12
+ - `delegate-fixer` — spawn the fixer subagent (batched / HIGH severity)
13
+ - `delegate-scaffolder` — cheap scaffolder dispatch for doc nits
14
+
15
+ Test changes still warrant inline handling regardless of recommendation —
16
+ keep the TDD cycle tight rather than delegating test edits.
15
17
 
16
18
  ## Remediation Event Emission
17
19
 
@@ -154,52 +156,23 @@ For each comment, determine the appropriate response:
154
156
  | Already fixed (outdated) | Reply confirming | "Fixed in [commit/PR description] — [brief explanation]." |
155
157
  | False positive | Reply explaining | "[Explanation of why this doesn't apply in this context]." |
156
158
 
157
- ### Sentry Comments
158
-
159
- Sentry's `[bot]` leaves **bug predictions** — AI-generated analysis of potential runtime issues. These appear as inline review comments with severity tags (CRITICAL, MEDIUM, etc.).
160
-
161
- **Sentry comments deserve careful attention because they often identify real bugs** (field name mismatches, type coercion issues, null reference risks).
162
-
163
- How to handle:
164
- 1. Read the full comment body Sentry includes a "Suggested Fix" section
165
- 2. Evaluate whether the bug is real:
166
- - Check if the code path is actually reachable
167
- - Check if the field names/types match what the data actually provides
168
- - Check existing tests — does any test exercise this path?
169
- 3. If real: fix the bug, add a test, reply confirming
170
- 4. If false positive: reply explaining why (e.g., "This path is guarded by X" or "The field is validated at Y before reaching this code")
171
-
172
- **Common Sentry findings:**
173
- - Field name mismatches between producers and consumers
174
- - Missing null checks on optional fields
175
- - Type mismatches (string vs. enum, array vs. object)
176
- - Unreachable error paths due to upstream validation
177
-
178
- ### CodeRabbit Comments
179
-
180
- CodeRabbit leaves detailed code review suggestions with severity indicators. It re-reviews automatically on push, so code fixes may auto-resolve threads.
181
-
182
- How to handle:
183
- 1. Read all CodeRabbit comments, noting severity (Critical, Major, Minor)
184
- 2. Critical/Major: Must address — fix or provide strong rationale for not fixing
185
- 3. Minor: Fix if low-effort, otherwise acknowledge
186
- 4. CodeRabbit marks threads as "Addressed in commits" when it detects the code changed — but always verify with a reply
187
-
188
- **Common CodeRabbit findings:**
189
- - Error handling gaps (missing try/catch, bare catches)
190
- - Code duplication (DRY violations)
191
- - Style/naming suggestions
192
- - Performance optimizations
193
- - Security concerns
194
-
195
- ### Human Reviewer Comments
196
-
197
- Human comments require the most careful handling:
198
- 1. Read comments carefully — understand the full context
199
- 2. For required changes: fix the code, reply confirming
200
- 3. For questions: answer directly on the PR
201
- 4. For suggestions: discuss or implement, reply with decision
202
- 5. For approval with minor nits: fix nits, note the approval
159
+ ### Per-reviewer parsing (Sentry, CodeRabbit, Human, GitHub-Copilot)
160
+
161
+ Severity normalization and per-reviewer comment parsing live in the
162
+ provider adapters under `servers/exarchos-mcp/src/review/providers/` (#1159).
163
+ `assess_stack` dispatches each PR comment through the adapter registry
164
+ and attaches a normalized `ActionItem` (with `normalizedSeverity` and
165
+ `reviewer` fields) to each unresolved comment. Use that signal when
166
+ deciding response strategy below; you do not need to re-parse tier
167
+ markers in the shepherd loop.
168
+
169
+ If a *recognised* reviewer (e.g. CodeRabbit) ships a new severity tier
170
+ that the adapter does not match, the `provider.unknown-tier` event
171
+ surfaces the unrecognised tier marker for follow-up the comment is
172
+ processed as MEDIUM in the meantime. Unknown *reviewers* (authors that
173
+ don't match any typed adapter) are routed silently to the `unknown`
174
+ adapter and never trigger this event; their comments are also processed
175
+ as MEDIUM by default.
203
176
 
204
177
  ### GitHub Actions Bot Comments
205
178
 
@@ -93,7 +93,26 @@ Review the returned `actionItems` and `recommendation`:
93
93
 
94
94
  ### Step 2 — Fix
95
95
 
96
- Address each blocking action item from the assessment. Consult `references/fix-strategies.md` for detailed strategies per issue type.
96
+ Before iterating over individual action items, classify them so the loop
97
+ knows which to fix inline vs. delegate. Call `classify_review_items` on
98
+ the assessment's `actionItems` (the comment-reply subset is what the
99
+ classifier groups by file; CI-fix and review-address items are passed
100
+ through unchanged):
101
+
102
+ ```typescript
103
+ mcp__exarchos__exarchos_orchestrate({
104
+ action: "classify_review_items",
105
+ featureId: "<id>",
106
+ actionItems: <actionItems from assess_stack>
107
+ })
108
+ ```
109
+
110
+ The result returns `groups: ClassificationGroup[]` with a `recommendation`
111
+ per group: `direct` (handle inline), `delegate-fixer` (spawn the fixer
112
+ subagent for batched/HIGH-severity work), or `delegate-scaffolder`
113
+ (cheap subagent for doc nits). Iterate the groups in order, applying
114
+ per-group strategy, then consult `references/fix-strategies.md` for
115
+ detailed per-issue-type instructions.
97
116
 
98
117
  **Remediation event protocol (FLYWHEEL):**
99
118
 
@@ -130,7 +149,7 @@ These events feed `selfCorrectionRate` and `avgRemediationAttempts` metrics in C
130
149
  | Type | Strategy |
131
150
  |------|----------|
132
151
  | `ci-fix` | Read logs, reproduce locally, fix, commit to stack branch |
133
- | `comment-reply` | Read context from `actionItem.context`, compose response, post via GitHub MCP |
152
+ | `comment-reply` | Use `actionItem.reviewer`, `normalizedSeverity`, `file`, `line`, and `raw` (full original comment) to compose a response. Provider adapters under `servers/exarchos-mcp/src/review/providers/` populate the input fields per #1159 — no manual tier parsing needed. **Posting:** PR-level summary comments use the provider-agnostic `add_pr_comment` orchestrate action; per-thread inline replies currently require the platform-specific MCP (e.g. `mcp__plugin_github_github__add_reply_to_pull_request_comment` for GitHub) until `VcsProvider` gains a thread-reply primitive — see [#1165](https://github.com/lvlup-sw/exarchos/issues/1165) for tracking. |
134
153
  | `review-address` | Fix code for CHANGES_REQUESTED, reply to each thread |
135
154
  | `restack` | Run `git rebase origin/<base>`, verify with `exarchos_orchestrate({ action: "list_prs" })` |
136
155
  | `escalate` | Consult `references/escalation-criteria.md` |
@@ -4,14 +4,16 @@ How to address common issues found during shepherd assessment.
4
4
 
5
5
  ## Decision: Fix Directly vs. Delegate
6
6
 
7
- | Condition | Approach |
8
- |-----------|----------|
9
- | Single file, < 20 lines changed | Fix directly in the stack branch |
10
- | Multiple files, contained concern | Fix directly if < 5 files |
11
- | Cross-cutting or architectural | Route to `/exarchos:delegate --fixes` for subagent dispatch |
12
- | Test changes needed | Fix directly (keep TDD cycle tight) |
7
+ The `classify_review_items` orchestrate action owns this decision (#1159).
8
+ Pass it the `actionItems` from `assess_stack` and consume the
9
+ `recommendation` field on each returned group:
13
10
 
14
- **Default to fixing directly** delegation adds overhead. Only delegate when the fix scope warrants it.
11
+ - `direct`handle inline in the shepherd loop
12
+ - `delegate-fixer` — spawn the fixer subagent (batched / HIGH severity)
13
+ - `delegate-scaffolder` — cheap scaffolder dispatch for doc nits
14
+
15
+ Test changes still warrant inline handling regardless of recommendation —
16
+ keep the TDD cycle tight rather than delegating test edits.
15
17
 
16
18
  ## Remediation Event Emission
17
19
 
@@ -154,52 +156,23 @@ For each comment, determine the appropriate response:
154
156
  | Already fixed (outdated) | Reply confirming | "Fixed in [commit/PR description] — [brief explanation]." |
155
157
  | False positive | Reply explaining | "[Explanation of why this doesn't apply in this context]." |
156
158
 
157
- ### Sentry Comments
158
-
159
- Sentry's `[bot]` leaves **bug predictions** — AI-generated analysis of potential runtime issues. These appear as inline review comments with severity tags (CRITICAL, MEDIUM, etc.).
160
-
161
- **Sentry comments deserve careful attention because they often identify real bugs** (field name mismatches, type coercion issues, null reference risks).
162
-
163
- How to handle:
164
- 1. Read the full comment body Sentry includes a "Suggested Fix" section
165
- 2. Evaluate whether the bug is real:
166
- - Check if the code path is actually reachable
167
- - Check if the field names/types match what the data actually provides
168
- - Check existing tests — does any test exercise this path?
169
- 3. If real: fix the bug, add a test, reply confirming
170
- 4. If false positive: reply explaining why (e.g., "This path is guarded by X" or "The field is validated at Y before reaching this code")
171
-
172
- **Common Sentry findings:**
173
- - Field name mismatches between producers and consumers
174
- - Missing null checks on optional fields
175
- - Type mismatches (string vs. enum, array vs. object)
176
- - Unreachable error paths due to upstream validation
177
-
178
- ### CodeRabbit Comments
179
-
180
- CodeRabbit leaves detailed code review suggestions with severity indicators. It re-reviews automatically on push, so code fixes may auto-resolve threads.
181
-
182
- How to handle:
183
- 1. Read all CodeRabbit comments, noting severity (Critical, Major, Minor)
184
- 2. Critical/Major: Must address — fix or provide strong rationale for not fixing
185
- 3. Minor: Fix if low-effort, otherwise acknowledge
186
- 4. CodeRabbit marks threads as "Addressed in commits" when it detects the code changed — but always verify with a reply
187
-
188
- **Common CodeRabbit findings:**
189
- - Error handling gaps (missing try/catch, bare catches)
190
- - Code duplication (DRY violations)
191
- - Style/naming suggestions
192
- - Performance optimizations
193
- - Security concerns
194
-
195
- ### Human Reviewer Comments
196
-
197
- Human comments require the most careful handling:
198
- 1. Read comments carefully — understand the full context
199
- 2. For required changes: fix the code, reply confirming
200
- 3. For questions: answer directly on the PR
201
- 4. For suggestions: discuss or implement, reply with decision
202
- 5. For approval with minor nits: fix nits, note the approval
159
+ ### Per-reviewer parsing (Sentry, CodeRabbit, Human, GitHub-Copilot)
160
+
161
+ Severity normalization and per-reviewer comment parsing live in the
162
+ provider adapters under `servers/exarchos-mcp/src/review/providers/` (#1159).
163
+ `assess_stack` dispatches each PR comment through the adapter registry
164
+ and attaches a normalized `ActionItem` (with `normalizedSeverity` and
165
+ `reviewer` fields) to each unresolved comment. Use that signal when
166
+ deciding response strategy below; you do not need to re-parse tier
167
+ markers in the shepherd loop.
168
+
169
+ If a *recognised* reviewer (e.g. CodeRabbit) ships a new severity tier
170
+ that the adapter does not match, the `provider.unknown-tier` event
171
+ surfaces the unrecognised tier marker for follow-up the comment is
172
+ processed as MEDIUM in the meantime. Unknown *reviewers* (authors that
173
+ don't match any typed adapter) are routed silently to the `unknown`
174
+ adapter and never trigger this event; their comments are also processed
175
+ as MEDIUM by default.
203
176
 
204
177
  ### GitHub Actions Bot Comments
205
178
 
@@ -93,7 +93,26 @@ Review the returned `actionItems` and `recommendation`:
93
93
 
94
94
  ### Step 2 — Fix
95
95
 
96
- Address each blocking action item from the assessment. Consult `references/fix-strategies.md` for detailed strategies per issue type.
96
+ Before iterating over individual action items, classify them so the loop
97
+ knows which to fix inline vs. delegate. Call `classify_review_items` on
98
+ the assessment's `actionItems` (the comment-reply subset is what the
99
+ classifier groups by file; CI-fix and review-address items are passed
100
+ through unchanged):
101
+
102
+ ```typescript
103
+ mcp__exarchos__exarchos_orchestrate({
104
+ action: "classify_review_items",
105
+ featureId: "<id>",
106
+ actionItems: <actionItems from assess_stack>
107
+ })
108
+ ```
109
+
110
+ The result returns `groups: ClassificationGroup[]` with a `recommendation`
111
+ per group: `direct` (handle inline), `delegate-fixer` (spawn the fixer
112
+ subagent for batched/HIGH-severity work), or `delegate-scaffolder`
113
+ (cheap subagent for doc nits). Iterate the groups in order, applying
114
+ per-group strategy, then consult `references/fix-strategies.md` for
115
+ detailed per-issue-type instructions.
97
116
 
98
117
  **Remediation event protocol (FLYWHEEL):**
99
118
 
@@ -130,7 +149,7 @@ These events feed `selfCorrectionRate` and `avgRemediationAttempts` metrics in C
130
149
  | Type | Strategy |
131
150
  |------|----------|
132
151
  | `ci-fix` | Read logs, reproduce locally, fix, commit to stack branch |
133
- | `comment-reply` | Read context from `actionItem.context`, compose response, post via GitHub MCP |
152
+ | `comment-reply` | Use `actionItem.reviewer`, `normalizedSeverity`, `file`, `line`, and `raw` (full original comment) to compose a response. Provider adapters under `servers/exarchos-mcp/src/review/providers/` populate the input fields per #1159 — no manual tier parsing needed. **Posting:** PR-level summary comments use the provider-agnostic `add_pr_comment` orchestrate action; per-thread inline replies currently require the platform-specific MCP (e.g. `mcp__plugin_github_github__add_reply_to_pull_request_comment` for GitHub) until `VcsProvider` gains a thread-reply primitive — see [#1165](https://github.com/lvlup-sw/exarchos/issues/1165) for tracking. |
134
153
  | `review-address` | Fix code for CHANGES_REQUESTED, reply to each thread |
135
154
  | `restack` | Run `git rebase origin/<base>`, verify with `exarchos_orchestrate({ action: "list_prs" })` |
136
155
  | `escalate` | Consult `references/escalation-criteria.md` |