Skip to content

Commit e5b94c5

Browse files
nsheapsautomation-nsheaps[bot]
authored andcommitted
chore: auto-bump plugin versions and update marketplace
1 parent f97c75f commit e5b94c5

5 files changed

Lines changed: 127 additions & 65 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@
454454
{
455455
"name": "scm-utils",
456456
"description": "Source control management utilities for improving interactions with branches and PRs, both locally and in CI environments",
457-
"version": "0.1.14",
457+
"version": "0.2.0",
458458
"author": {
459459
"name": "Nathan Heaps"
460460
},

docs/review-system-analysis.md

Lines changed: 55 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ The ai-mktpl review system is a multi-layered automated PR review pipeline built
1616

1717
### Components
1818

19-
| Component | Location | Purpose |
20-
|-----------|----------|---------|
21-
| **CI Workflow** | `.github/workflows/claude-code-review.yaml` | GitHub Actions workflow triggered on PR events |
22-
| **Review Prompt** | `.github/prompts/claude-code-review.md` | Detailed prompt template for CI review bot |
23-
| **Shared Self-Review Skill** | `shared/skills/self-review/SKILL.md` | Multi-agent review procedure (scoring, dimensions, format) |
24-
| **Shared Parallel-Review Skill** | `shared/skills/parallel-review/SKILL.md` | Agent Teams fan-out review orchestration |
25-
| **Plugin Code-Review Skill** | `plugins/scm-utils/skills/code-review/SKILL.md` | Entry point: triggers CI or falls back to self-review |
26-
| **Plugin Template** | `plugins/scm-utils/skills/code-review/references/prompt-template.md` | Prompt template for other repos |
27-
| **Workflow Template** | `plugins/scm-utils/skills/code-review/references/workflow-template.yaml` | Workflow template for other repos |
28-
| **Interpolation Action** | `.github/actions/interpolate-prompt/action.yml` | `envsubst`-based template interpolation |
29-
| **Agent Trigger** | `.github/workflows/claude-agent-trigger.yaml` | Detects @claude mentions, dispatches to agent |
30-
| **Agent Workflow** | `.github/workflows/claude-agent.yaml` | Handles repository_dispatch from @claude mentions |
19+
| Component | Location | Purpose |
20+
| -------------------------------- | ------------------------------------------------------------------------ | ---------------------------------------------------------- |
21+
| **CI Workflow** | `.github/workflows/claude-code-review.yaml` | GitHub Actions workflow triggered on PR events |
22+
| **Review Prompt** | `.github/prompts/claude-code-review.md` | Detailed prompt template for CI review bot |
23+
| **Shared Self-Review Skill** | `shared/skills/self-review/SKILL.md` | Multi-agent review procedure (scoring, dimensions, format) |
24+
| **Shared Parallel-Review Skill** | `shared/skills/parallel-review/SKILL.md` | Agent Teams fan-out review orchestration |
25+
| **Plugin Code-Review Skill** | `plugins/scm-utils/skills/code-review/SKILL.md` | Entry point: triggers CI or falls back to self-review |
26+
| **Plugin Template** | `plugins/scm-utils/skills/code-review/references/prompt-template.md` | Prompt template for other repos |
27+
| **Workflow Template** | `plugins/scm-utils/skills/code-review/references/workflow-template.yaml` | Workflow template for other repos |
28+
| **Interpolation Action** | `.github/actions/interpolate-prompt/action.yml` | `envsubst`-based template interpolation |
29+
| **Agent Trigger** | `.github/workflows/claude-agent-trigger.yaml` | Detects @claude mentions, dispatches to agent |
30+
| **Agent Workflow** | `.github/workflows/claude-agent.yaml` | Handles repository_dispatch from @claude mentions |
3131

3232
### Flow: CI-Triggered Review
3333

@@ -98,81 +98,100 @@ User invokes /parallel-review (requires CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1)
9898
## 2. Strengths
9999

100100
### 2.1 Structured Review Process
101+
101102
The 11-step review process in the CI prompt is well-thought-out. It enforces:
103+
102104
- Local doc tracking (compensates for context window volatility)
103105
- Previous review management (minimize, resolve, update)
104106
- Post-review verification
105107
- Clear verdict criteria
106108

107109
### 2.2 GitHub Integration Depth
110+
108111
The system leverages GitHub's full review API surface:
112+
109113
- Pending reviews with inline comments (not just PR comments)
110114
- GraphQL for minimizing comments and resolving threads
111115
- `gh-pr-review` extension for better review comment access
112116
- Proper bot identity management (`bot_id`, `bot_name`, `allowed_bots`)
113117

114118
### 2.3 Concurrency Safety
119+
115120
The workflow uses `cancel-in-progress: false` with PR-scoped concurrency groups, preventing review waste while avoiding stale reviews from racing.
116121

117122
### 2.4 Flexible Trigger System
123+
118124
Supports multiple trigger patterns:
125+
119126
- Automatic on non-draft PR open/sync
120127
- Manual via `request-review` label (auto-removed)
121128
- Persistent via `always-review` label for drafts
122129

123130
### 2.5 Security Consciousness
131+
124132
- Git push denied in CI context
125133
- CI status checks denied (prevents self-referential loop)
126134
- GitHub App auth (not PAT) for proper identity
127135
- Separate secrets for review vs general CI
128136

129137
### 2.6 Distributable via Plugin
138+
130139
The scm-utils plugin packages the review system for reuse across repos with templates, setup guide, and clear secret requirements.
131140

132141
---
133142

134143
## 3. Weaknesses
135144

136145
### 3.1 Review Logic Split (Improved in v2)
146+
137147
Previously, review instructions existed in three divergent places. In v2, the architecture was restructured:
138148

139-
| Location | Purpose | Status |
140-
|----------|---------|--------|
141-
| `.github/prompts/claude-code-review.md` | Active CI prompt (comprehensive) | Updated with fixes |
142-
| `plugins/scm-utils/.../prompt-template.md` | Template for other repos | Updated with fixes |
143-
| `shared/skills/self-review/SKILL.md` | Shared review procedure | **NEW** — extracted from project skill |
144-
| `shared/skills/parallel-review/SKILL.md` | Agent Teams fan-out | **NEW** |
145-
| `.claude/skills/code-review/SKILL.md` | (Removed) | **REMOVED** — replaced by shared skills |
149+
| Location | Purpose | Status |
150+
| ------------------------------------------ | -------------------------------- | --------------------------------------- |
151+
| `.github/prompts/claude-code-review.md` | Active CI prompt (comprehensive) | Updated with fixes |
152+
| `plugins/scm-utils/.../prompt-template.md` | Template for other repos | Updated with fixes |
153+
| `shared/skills/self-review/SKILL.md` | Shared review procedure | **NEW** — extracted from project skill |
154+
| `shared/skills/parallel-review/SKILL.md` | Agent Teams fan-out | **NEW** |
155+
| `.claude/skills/code-review/SKILL.md` | (Removed) | **REMOVED** — replaced by shared skills |
146156

147157
The CI prompt and plugin template still need to be kept in sync manually. A future improvement could generate both from a single source.
148158

149159
### 3.2 Single-Agent CI Review Bottleneck
160+
150161
The CI workflow runs a single Claude session. For large PRs, this means:
162+
151163
- Long review times (often 10-20+ minutes)
152164
- Risk of context window exhaustion on complex changes
153165
- No parallelism for independent review concerns (security vs. quality vs. patterns)
154166

155167
The project-level SKILL.md already describes a multi-agent approach, but this architecture hasn't been brought to the CI workflow.
156168

157169
### 3.3 No Structured Output Validation
170+
158171
The review output format (badges, details/summary, footnotes) relies entirely on prompt instructions. There's no post-processing to validate that the output is well-formed markdown before posting. This has led to issues like CDATA wrappers appearing in posted reviews.
159172

160173
### 3.4 COMMENT Verdict Overuse
174+
161175
The original guidance made it too easy to use `COMMENT` (non-blocking) when `REQUEST_CHANGES` would be more appropriate. The threshold was "won't break if merged" rather than "would the code be better if this were addressed." This resulted in reviews that identified real improvements but didn't enforce them.
162176

163177
### 3.5 Template Synchronization Problem
178+
164179
The `interpolate-prompt` action uses `envsubst`, which means the prompt template is a flat markdown file with `${VAR}` placeholders. There's no mechanism to:
180+
165181
- Share common sections between the CI prompt and scm-utils template
166182
- Version the prompt independently from the workflow
167183
- Test prompt changes before deploying
168184

169185
### 3.6 Missing Review State Persistence
186+
170187
The CI review runs in a fresh environment every time. While the prompt instructs the agent to review previous reviews, there's no persistent memory of past review decisions. Each review re-evaluates from scratch, which can lead to:
188+
171189
- Score inconsistency across reviews
172190
- Re-raising issues that were already discussed and resolved
173191
- Missing context from conversations that happened between reviews
174192

175193
### 3.7 No Inline Comment Deduplication
194+
176195
The prompt says "future reviews don't need to re-post in-line comments" but there's no mechanism to enforce this. The agent must discover its previous inline comments via API calls during the review, adding complexity and unreliability.
177196

178197
---
@@ -181,13 +200,13 @@ The prompt says "future reviews don't need to re-post in-line comments" but ther
181200

182201
### scm-utils (Plugin) vs. ai-mktpl (Project)
183202

184-
| Aspect | scm-utils Plugin | ai-mktpl Project |
185-
|--------|-----------------|------------------|
186-
| **Purpose** | Distributable review setup for any repo | This repo's specific review instance |
187-
| **Skill** | `code-review` — triggers CI or falls back to local review | `code-review` — multi-agent local review |
188-
| **Prompt** | Template for new repos | Active CI prompt |
189-
| **Workflow** | Template for new repos | Active CI workflow |
190-
| **Audience** | Plugin consumers (other repos) | ai-mktpl itself |
203+
| Aspect | scm-utils Plugin | ai-mktpl Project |
204+
| ------------ | --------------------------------------------------------- | ---------------------------------------- |
205+
| **Purpose** | Distributable review setup for any repo | This repo's specific review instance |
206+
| **Skill** | `code-review` — triggers CI or falls back to local review | `code-review` — multi-agent local review |
207+
| **Prompt** | Template for new repos | Active CI prompt |
208+
| **Workflow** | Template for new repos | Active CI workflow |
209+
| **Audience** | Plugin consumers (other repos) | ai-mktpl itself |
191210

192211
The scm-utils plugin is the **distribution mechanism**. It contains templates and a skill that knows how to trigger the CI bot (via label) or fall back to local review. The ai-mktpl project has its own instantiated copies that have evolved beyond the templates.
193212

@@ -203,32 +222,42 @@ The scm-utils plugin is the **distribution mechanism**. It contains templates an
203222
## 5. Suggested Improvements
204223

205224
### 5.1 Unify Prompt Templates (High Priority)
225+
206226
Extract the shared review logic into a single source of truth. The scm-utils template should be the canonical version, with the ai-mktpl prompt generated from it (or symlinked).
207227

208228
### 5.2 Multi-Agent CI Review (High Priority)
229+
209230
Bring the parallel agent architecture from the project SKILL.md into the CI workflow. Use Claude Code's Agent Teams or sub-agent fan-out to parallelize review by category. See the migration guide for details.
210231

211232
### 5.3 Output Validation Gate
233+
212234
Add a post-processing step (or hook) that validates the review markdown before posting:
235+
213236
- Strip any CDATA wrappers
214237
- Verify `<details>/<summary>` structure
215238
- Validate shields.io badge URLs return 200
216239
- Check footnote references are complete
217240

218241
### 5.4 Review State Persistence
242+
219243
Store review decisions in a structured format (e.g., `.claude/pr-reviews/<pr>/<timestamp>/decision.json`) that subsequent reviews can reference. This enables:
244+
220245
- Consistent scoring across iterations
221246
- Awareness of which issues were previously raised and addressed
222247
- Faster subsequent reviews (skip validated categories)
223248

224249
### 5.5 Prompt Versioning
250+
225251
Version the review prompt independently from the workflow. Tag prompt versions and include the version in the review footnotes so authors know which review criteria were applied.
226252

227253
### 5.6 Strengthen Non-Blocking Criteria
254+
228255
The non-blocking feedback fix applied in this changeset raises the bar for `COMMENT` verdicts. Monitor subsequent reviews to confirm the model respects the new criteria and adjusts to REQUEST_CHANGES for actionable improvements.
229256

230257
### 5.7 Review Metrics Dashboard
258+
231259
Instrument reviews to track:
260+
232261
- Review duration
233262
- Verdict distribution (APPROVE/COMMENT/REQUEST_CHANGES)
234263
- Score distributions by category

docs/review-system-v2-migration-guide.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ v2 of the review system introduces:
2525
**What changed:** The project-level `.claude/skills/code-review/SKILL.md` has been removed. Its content has been refactored into the shared `self-review` skill.
2626

2727
**Action required:**
28+
2829
```bash
2930
# If you have a project-level code-review skill, remove it
3031
rm -rf .claude/skills/code-review/
@@ -35,10 +36,12 @@ rm -rf .claude/skills/code-review/
3536
### Step 2: Update scm-utils Plugin
3637

3738
**What changed:** scm-utils v0.2.0 adds two new shared skills:
39+
3840
- `self-review` — the multi-agent review procedure (was the project-level `code-review` skill)
3941
- `parallel-review` — Agent Teams-based fan-out review
4042

4143
**Action required:**
44+
4245
- Update scm-utils to v0.2.0 or later
4346
- The `code-review` skill continues to work as before (triggers CI review or falls back to local review)
4447
- The new `self-review` skill is used as the fallback when CI is unavailable
@@ -66,6 +69,7 @@ CRITICAL: NEVER wrap any part of your review output in `<![CDATA[...]]>` tags.
6669
...
6770

6871
Your footnotes MUST NOT include:
72+
6973
- Links to your previous reviews
7074
- Links to individual comments you made in the review
7175
```
@@ -74,6 +78,7 @@ And the verdict section:
7478

7579
```markdown
7680
Use **"COMMENT"** only when ALL of these are true:
81+
7782
- The code won't break if merged as-is
7883
- The suggestions are genuinely optional improvements
7984
- There is a clear, specific reason why each suggestion should NOT be addressed in this PR
@@ -84,15 +89,19 @@ Use **"COMMENT"** only when ALL of these are true:
8489
**What changed:** Non-blocking follow-up items now MUST include a reason.
8590

8691
**Before (v1):**
92+
8793
```markdown
8894
**Recommended follow-ups** (non-blocking):
95+
8996
- Consider adding unit tests for the new helper function
9097
- The error message could be more descriptive
9198
```
9299

93100
**After (v2):**
101+
94102
```markdown
95103
**Recommended follow-ups** (non-blocking — each item MUST explain why it shouldn't be addressed in this PR):
104+
96105
- Consider adding unit tests — out of scope for this bugfix PR, tracked in #456
97106
- The error message could be more descriptive — requires UX discussion on error messaging standards
98107
```
@@ -104,6 +113,7 @@ Use **"COMMENT"** only when ALL of these are true:
104113
**To enable:**
105114

106115
1. Enable Agent Teams:
116+
107117
```json
108118
// .claude/settings.json or ~/.claude/settings.json
109119
{
@@ -114,6 +124,7 @@ Use **"COMMENT"** only when ALL of these are true:
114124
```
115125

116126
2. Use tmux mode for visual monitoring:
127+
117128
```bash
118129
claude --teammate-mode tmux
119130
```
@@ -141,6 +152,7 @@ plugins/scm-utils/.../prompt-template.md ← Plugin (prompt template)
141152
```
142153

143154
Problems:
155+
144156
- Review logic duplicated between project and plugin
145157
- Project skill not shareable
146158
- Prompt templates diverge over time
@@ -158,6 +170,7 @@ plugins/scm-utils/.../prompt-template.md ← Plugin (prompt template, updat
158170
```
159171

160172
Benefits:
173+
161174
- Single source of truth for review logic (shared skills)
162175
- Plugin distributes via symlinks (no duplication)
163176
- CI prompt and template kept in sync
@@ -167,11 +180,11 @@ Benefits:
167180

168181
## Skill Responsibility Matrix
169182

170-
| Skill | Purpose | Where It Lives | Used By |
171-
|-------|---------|----------------|---------|
172-
| `self-review` | Multi-agent review procedure (scoring, dimensions, output format) | `shared/skills/self-review/` | CI workflow, local fallback, any plugin |
173-
| `parallel-review` | Agent Teams fan-out orchestration | `shared/skills/parallel-review/` | Interactive use with agent teams enabled |
174-
| `code-review` | Trigger CI review or fall back to local review | `plugins/scm-utils/skills/code-review/` | User-facing entry point |
183+
| Skill | Purpose | Where It Lives | Used By |
184+
| ----------------- | ----------------------------------------------------------------- | --------------------------------------- | ---------------------------------------- |
185+
| `self-review` | Multi-agent review procedure (scoring, dimensions, output format) | `shared/skills/self-review/` | CI workflow, local fallback, any plugin |
186+
| `parallel-review` | Agent Teams fan-out orchestration | `shared/skills/parallel-review/` | Interactive use with agent teams enabled |
187+
| `code-review` | Trigger CI review or fall back to local review | `plugins/scm-utils/skills/code-review/` | User-facing entry point |
175188

176189
### How They Interact
177190

@@ -208,7 +221,7 @@ Currently, the CI workflow runs a single Claude session. A future v3 could adopt
208221
- name: Run Claude Code Review
209222
uses: anthropics/claude-code-action@v1
210223
env:
211-
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: '1'
224+
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS: "1"
212225
with:
213226
prompt: ${{ steps.prompt.outputs.prompt }}
214227
settings: |
@@ -221,6 +234,7 @@ Currently, the CI workflow runs a single Claude session. A future v3 could adopt
221234
This would enable true parallel review in CI, reducing review time for large PRs from 15-20 minutes to 5-8 minutes.
222235
223236
**Blockers for CI agent teams:**
237+
224238
- `claude-code-action` needs to support `CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` environment variable
225239
- In-process teammate mode must work in GitHub Actions runners
226240
- Token cost needs to be justified by review quality improvement
@@ -229,11 +243,11 @@ This would enable true parallel review in CI, reducing review time for large PRs
229243

230244
## Breaking Changes
231245

232-
| Change | Impact | Migration |
233-
|--------|--------|-----------|
234-
| Project-level `code-review` skill removed | Local `/review` commands may not trigger | Use scm-utils `code-review` or `self-review` skill instead |
235-
| Non-blocking feedback requires justification | Reviews will have fewer COMMENT verdicts | Update prompt templates per Step 3 |
236-
| Footnote structure changed | Existing prompt templates won't match new format | Replace prompt template per Step 3 |
246+
| Change | Impact | Migration |
247+
| -------------------------------------------- | ------------------------------------------------ | ---------------------------------------------------------- |
248+
| Project-level `code-review` skill removed | Local `/review` commands may not trigger | Use scm-utils `code-review` or `self-review` skill instead |
249+
| Non-blocking feedback requires justification | Reviews will have fewer COMMENT verdicts | Update prompt templates per Step 3 |
250+
| Footnote structure changed | Existing prompt templates won't match new format | Replace prompt template per Step 3 |
237251

238252
---
239253

0 commit comments

Comments
 (0)