swift-code-reviewer-skill 1.2.1 → 1.4.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 +53 -0
- package/CONTRIBUTING.md +86 -3
- package/README.md +315 -118
- package/SKILL.md +122 -4
- package/bin/install.js +71 -90
- package/bin/lib/agents.js +134 -0
- package/bin/lib/prompt.js +58 -0
- package/core/swift-code-reviewer.core.md +281 -0
- package/examples/README.md +35 -0
- package/examples/claude-tca-review.md +140 -0
- package/examples/codex-async-algorithms-review.md +208 -0
- package/examples/gemini-isowords-review.md +207 -0
- package/package.json +6 -1
- package/references/agent-loop-feedback.md +148 -0
- package/references/spec-adherence.md +157 -0
- package/templates/agents/claude/swift-code-reviewer.md +78 -0
- package/templates/agents/codex/swift-code-reviewer.md +211 -0
- package/templates/agents/gemini/swift-code-reviewer.md +211 -0
- package/templates/agents/kiro/swift-code-reviewer.md +218 -0
- package/templates/commands/claude/review.md +56 -0
- package/templates/commands/gemini/review.toml +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,57 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.4.0] - 2026-05-07
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Multi-agent installer** — `npx swift-code-reviewer-skill init` now prompts to select one or more
|
|
15
|
+
agent targets (Claude Code, OpenAI Codex CLI, Google Gemini CLI, Kiro) via an interactive
|
|
16
|
+
`@inquirer/prompts` checkbox; `--agent <name[,name]>` and `--all` flags bypass the prompt for
|
|
17
|
+
CI/scripted use; non-TTY without flags defaults to `claude` (preserves all existing CI scripts)
|
|
18
|
+
- **Canonical core** (`core/swift-code-reviewer.core.md`) — agent-agnostic source of truth with
|
|
19
|
+
`<PROJECT_STANDARDS_FILE>` and `<COMPANION_REF:...>` tokens; per-agent wrappers substitute back
|
|
20
|
+
- **Per-agent sidecar templates** under `templates/agents/{claude,codex,gemini,kiro}/`:
|
|
21
|
+
- `claude/swift-code-reviewer.md` — loads from `~/.claude/skills/` with full companion-skill refs
|
|
22
|
+
- `codex/swift-code-reviewer.md` — standalone, references `AGENTS.md`, condensed rules inlined
|
|
23
|
+
- `gemini/swift-code-reviewer.md` — standalone, references `GEMINI.md`, condensed rules inlined
|
|
24
|
+
- `kiro/swift-code-reviewer.md` — `inclusion: fileMatch` + `fileMatchPattern: "**/*.swift"`,
|
|
25
|
+
auto-activates on any Swift file; workspace-scoped (global steering has known bug #6171)
|
|
26
|
+
- **Per-agent command templates** under `templates/commands/{claude,gemini}/`:
|
|
27
|
+
- `claude/review.md` — `/review` slash command (unchanged behavior)
|
|
28
|
+
- `gemini/review.toml` — Gemini custom command; `prompt` uses `@./swift-code-reviewer.md`
|
|
29
|
+
- **`examples/`** directory — three real review reports against pinned OSS PRs (cited by commit SHA)
|
|
30
|
+
- **`assets/init-demo.tape`** — VHS tape script to regenerate the interactive-install GIF
|
|
31
|
+
- `bin/lib/agents.js` — idempotent per-agent install functions (Created / Updated / Skipped logging)
|
|
32
|
+
- `bin/lib/prompt.js` — TTY-aware agent selection (`selectAgents`)
|
|
33
|
+
- `__tests__/installer.test.js` — installer tests using Node's built-in `node:test`
|
|
34
|
+
- `CONTRIBUTING.md` "Adding a new agent target" section documents the contribution path
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
|
|
38
|
+
- `bin/install.js` refactored: argv parse for flags, delegates to `bin/lib/agents.js` and
|
|
39
|
+
`bin/lib/prompt.js`; post-install hint is now per-agent (Codex shows AGENTS.md snippet,
|
|
40
|
+
Gemini shows TOML command hint, Kiro notes workspace-scoped steering)
|
|
41
|
+
- `templates/agents/swift-code-reviewer.md` and `templates/commands/review.md` moved to
|
|
42
|
+
`templates/agents/claude/` and `templates/commands/claude/` respectively
|
|
43
|
+
- README fully rewritten: monozukuri spine, per-agent capability matrix, per-agent quirks section,
|
|
44
|
+
real review excerpt replacing synthetic `LoginViewModel.swift` block
|
|
45
|
+
|
|
46
|
+
### Notes
|
|
47
|
+
|
|
48
|
+
- New runtime dependency: `@inquirer/prompts@^7` (~200 KB added to install size)
|
|
49
|
+
- Codex does not support `/review` slash commands; `@`-mentions in `AGENTS.md` are not
|
|
50
|
+
auto-resolved — the post-install hint provides the exact snippet to paste
|
|
51
|
+
- Kiro global-steering has a known bug ([#6171](https://github.com/kirodotdev/Kiro/issues/6171));
|
|
52
|
+
the installer uses workspace-scoped `fileMatch` steering instead
|
|
53
|
+
|
|
54
|
+
## [1.3.0] - 2026-05-07
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
|
|
58
|
+
- **Spec adherence review** (`references/spec-adherence.md`) — validates implementation against PR description and linked issues, flagging scope drift and unimplemented requirements
|
|
59
|
+
- **Agent-loop feedback** (`references/agent-loop-feedback.md`) — meta-review layer that identifies recurring patterns suggesting gaps in the agent's own instructions, improving future AI-generated code quality
|
|
60
|
+
|
|
10
61
|
## [1.2.1] - 2026-04-21
|
|
11
62
|
|
|
12
63
|
### Fixed
|
|
@@ -113,6 +164,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
113
164
|
|
|
114
165
|
## Version History Summary
|
|
115
166
|
|
|
167
|
+
- **1.4.0** (2026-05-07): Multi-agent installer (Claude/Codex/Gemini/Kiro), canonical core, per-agent sidecar templates, real examples, VHS tape
|
|
168
|
+
- **1.3.0** (2026-05-07): Add spec adherence review and agent-loop meta-feedback layer
|
|
116
169
|
- **1.2.1** (2026-04-21): Fix installer not copying `skills/` and `templates/` directories
|
|
117
170
|
- **1.2.0** (2026-04-21): Bundle five companion Swift skills, add `init` scaffolding command, skill-review CI action, SKILL.md condensed 71%
|
|
118
171
|
- **1.1.1** (2026-03-24): Fix incorrect `install-skill.sh` (was XcodeBuildMCP installer)
|
package/CONTRIBUTING.md
CHANGED
|
@@ -33,6 +33,7 @@ We welcome suggestions for:
|
|
|
33
33
|
|
|
34
34
|
1. Fork the repository
|
|
35
35
|
2. Clone your fork:
|
|
36
|
+
|
|
36
37
|
```bash
|
|
37
38
|
git clone https://github.com/yourusername/swift-code-reviewer-skill.git
|
|
38
39
|
cd swift-code-reviewer-skill
|
|
@@ -54,7 +55,7 @@ When modifying the main skill file:
|
|
|
54
55
|
3. Update table of contents if adding sections
|
|
55
56
|
4. Test with real Swift/SwiftUI code
|
|
56
57
|
|
|
57
|
-
**Reference Files (references
|
|
58
|
+
**Reference Files (references/\*.md)**
|
|
58
59
|
|
|
59
60
|
When updating reference documentation:
|
|
60
61
|
|
|
@@ -79,23 +80,28 @@ When updating reference documentation:
|
|
|
79
80
|
|
|
80
81
|
Always use this format for examples:
|
|
81
82
|
|
|
82
|
-
|
|
83
|
+
````markdown
|
|
83
84
|
**Check for:**
|
|
85
|
+
|
|
84
86
|
- [ ] Pattern or rule to check
|
|
85
87
|
|
|
86
88
|
**Examples:**
|
|
87
89
|
|
|
88
90
|
❌ **Bad: [Description]**
|
|
91
|
+
|
|
89
92
|
```swift
|
|
90
93
|
// Code showing the anti-pattern
|
|
91
94
|
```
|
|
95
|
+
````
|
|
92
96
|
|
|
93
97
|
✅ **Good: [Description]**
|
|
98
|
+
|
|
94
99
|
```swift
|
|
95
100
|
// Code showing the correct pattern
|
|
96
101
|
```
|
|
97
102
|
|
|
98
103
|
**Why This Matters**: [Explanation of impact]
|
|
104
|
+
|
|
99
105
|
```
|
|
100
106
|
|
|
101
107
|
#### Testing Your Changes
|
|
@@ -123,11 +129,13 @@ Always use this format for examples:
|
|
|
123
129
|
Write clear, descriptive commit messages:
|
|
124
130
|
|
|
125
131
|
```
|
|
132
|
+
|
|
126
133
|
Add force unwrap detection in security checklist
|
|
127
134
|
|
|
128
135
|
- Added pattern detection for !, as!, and try!
|
|
129
136
|
- Included examples of safe alternatives
|
|
130
137
|
- Updated security-checklist.md with new section
|
|
138
|
+
|
|
131
139
|
```
|
|
132
140
|
|
|
133
141
|
**Format:**
|
|
@@ -150,6 +158,78 @@ Add force unwrap detection in security checklist
|
|
|
150
158
|
5. **Respond to feedback** from reviewers
|
|
151
159
|
6. **Keep commits clean** (squash if needed)
|
|
152
160
|
|
|
161
|
+
## Adding a New Agent Target
|
|
162
|
+
|
|
163
|
+
The skill ships with four built-in targets (Claude, Codex, Gemini, Kiro). Adding another
|
|
164
|
+
follows a four-step checklist:
|
|
165
|
+
|
|
166
|
+
### 1. Create the agent template
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
templates/agents/<agent>/swift-code-reviewer.md
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Base it on `core/swift-code-reviewer.core.md`. Substitute:
|
|
175
|
+
- `<PROJECT_STANDARDS_FILE>` → the path your agent reads for project standards
|
|
176
|
+
- `<COMPANION_REF:...>` → inline the key excerpt or omit if the agent can read
|
|
177
|
+
the file at `~/.claude/skills/swift-code-reviewer-skill/…`
|
|
178
|
+
|
|
179
|
+
Add agent-specific frontmatter if required (e.g., Kiro's `inclusion: fileMatch`).
|
|
180
|
+
|
|
181
|
+
If your agent supports slash commands, also create:
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
templates/commands/<agent>/review.<ext>
|
|
185
|
+
|
|
186
|
+
````
|
|
187
|
+
|
|
188
|
+
### 2. Add an install function in `bin/lib/agents.js`
|
|
189
|
+
|
|
190
|
+
```js
|
|
191
|
+
function installMyAgent(packageRoot, cwd, { dryRun = false, force = false } = {}) {
|
|
192
|
+
// copy template(s), print post-install hints
|
|
193
|
+
}
|
|
194
|
+
````
|
|
195
|
+
|
|
196
|
+
Export it and add it to `AGENT_INSTALLERS`:
|
|
197
|
+
|
|
198
|
+
```js
|
|
199
|
+
const AGENT_INSTALLERS = {
|
|
200
|
+
claude: installClaude,
|
|
201
|
+
codex: installCodex,
|
|
202
|
+
gemini: installGemini,
|
|
203
|
+
kiro: installKiro,
|
|
204
|
+
myagent: installMyAgent, // ← add here
|
|
205
|
+
};
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### 3. Update the README
|
|
209
|
+
|
|
210
|
+
- Add a row to the **Capability matrix** table.
|
|
211
|
+
- Add a subsection under **Per-agent quirks & limitations** documenting
|
|
212
|
+
any behavioral differences or known issues.
|
|
213
|
+
|
|
214
|
+
### 4. Add tests in `__tests__/installer.test.js`
|
|
215
|
+
|
|
216
|
+
Cover at minimum: file creation, idempotency (skip on second run), dry-run
|
|
217
|
+
creates no files, and any frontmatter assertions specific to your agent.
|
|
218
|
+
|
|
219
|
+
### Checklist
|
|
220
|
+
|
|
221
|
+
- [ ] `templates/agents/<agent>/swift-code-reviewer.md` created
|
|
222
|
+
- [ ] Command template created (if supported)
|
|
223
|
+
- [ ] `bin/lib/agents.js` `installMyAgent` function added and exported
|
|
224
|
+
- [ ] `AGENT_INSTALLERS` map updated
|
|
225
|
+
- [ ] `VALID_AGENTS` implicitly updated (it's `Object.keys(AGENT_INSTALLERS)`)
|
|
226
|
+
- [ ] README capability matrix row added
|
|
227
|
+
- [ ] README per-agent quirks section added
|
|
228
|
+
- [ ] Tests added in `__tests__/installer.test.js`
|
|
229
|
+
- [ ] `CHANGELOG.md` updated
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
153
233
|
## What to Contribute
|
|
154
234
|
|
|
155
235
|
### High Priority
|
|
@@ -198,7 +278,7 @@ Add force unwrap detection in security checklist
|
|
|
198
278
|
- **Clear and concise**: Avoid unnecessary words
|
|
199
279
|
- **Active voice**: "Use @Observable" not "@ Observable should be used"
|
|
200
280
|
- **Specific**: "View body exceeds 50 lines" not "View is too large"
|
|
201
|
-
- **Educational**: Explain
|
|
281
|
+
- **Educational**: Explain _why_, not just _what_
|
|
202
282
|
- **Respectful**: Assume good intentions, be constructive
|
|
203
283
|
|
|
204
284
|
## Review Criteria
|
|
@@ -214,6 +294,7 @@ Pull requests are evaluated on:
|
|
|
214
294
|
## Recognition
|
|
215
295
|
|
|
216
296
|
Contributors will be:
|
|
297
|
+
|
|
217
298
|
- Listed in the README
|
|
218
299
|
- Credited in release notes
|
|
219
300
|
- Thanked in the community
|
|
@@ -232,6 +313,7 @@ Significant contributions may result in becoming a maintainer.
|
|
|
232
313
|
### Our Pledge
|
|
233
314
|
|
|
234
315
|
We are committed to providing a welcoming and inclusive environment for all contributors, regardless of:
|
|
316
|
+
|
|
235
317
|
- Experience level
|
|
236
318
|
- Background
|
|
237
319
|
- Identity
|
|
@@ -256,6 +338,7 @@ We are committed to providing a welcoming and inclusive environment for all cont
|
|
|
256
338
|
### Enforcement
|
|
257
339
|
|
|
258
340
|
Violations will result in:
|
|
341
|
+
|
|
259
342
|
1. Warning
|
|
260
343
|
2. Temporary ban
|
|
261
344
|
3. Permanent ban (severe or repeated violations)
|