pi-feature-dev 1.2.0 → 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/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # pi-feature-dev
2
2
 
3
- Portable guided feature development workflow, packaged as a Pi skill.
3
+ Portable coding-agent workflows, packaged as Pi skills.
4
4
 
5
- The skill describes a tool-agnostic process for non-trivial feature work:
5
+ The `feature-dev` skill describes a tool-agnostic process for non-trivial
6
+ feature work:
6
7
 
7
8
  - clarify requirements before coding
8
9
  - explore the existing codebase before design
@@ -13,8 +14,17 @@ The skill describes a tool-agnostic process for non-trivial feature work:
13
14
 
14
15
  It does not require specific task-tracking, question, delegation, or review tools. If the current environment provides equivalent capabilities, use them; otherwise follow the same workflow directly in chat and with normal code tools.
15
16
 
17
+ The `plan-exec` skill executes implementation plan files task by task with
18
+ isolated workers, Git task commits, internal reviews, finalize, and a portable
19
+ run summary. It is portable across host agents that provide fresh-context
20
+ isolated workers and Git access.
21
+
16
22
  ## Install
17
23
 
24
+ ```
25
+ npx skills add https://github.com/r13v/pi-feature-dev
26
+ ```
27
+
18
28
  From npm:
19
29
 
20
30
  ```bash
@@ -43,6 +53,14 @@ pi install -l ~/Projects/pi-feature-dev
43
53
 
44
54
  No companion package is required. Optional Pi packages can improve specific parts of the workflow, such as progress tracking, structured choices, delegation, large-output handling, web/code research, or session coordination.
45
55
 
56
+ ## Credits
57
+
58
+ The original Claude Code skills and workflows that informed these portable
59
+ versions came from:
60
+
61
+ - [umputun/cc-thingz](https://github.com/umputun/cc-thingz)
62
+ - [anthropics/claude-code feature-dev plugin](https://github.com/anthropics/claude-code/tree/main/plugins/feature-dev)
63
+
46
64
  ## Usage
47
65
 
48
66
  Skill command in Pi:
@@ -59,11 +77,17 @@ Use feature-dev to implement API rate limiting.
59
77
 
60
78
  The `skills/feature-dev/SKILL.md` file is portable markdown and can be adapted for other coding assistant environments.
61
79
 
62
- This package is intentionally skill-only. It does not provide a `/feature-dev` prompt template shortcut; use `/skill:feature-dev` for explicit Pi invocation.
80
+ Run a plan with `plan-exec`:
81
+
82
+ ```text
83
+ /skill:plan-exec docs/plans/20260518-example.md
84
+ ```
85
+
86
+ This package is intentionally skill-only. It does not provide prompt template shortcuts; use `/skill:<name>` for explicit Pi invocation.
63
87
 
64
- ## What it does
88
+ ## Feature-dev workflow
65
89
 
66
- The skill guides a coding assistant through a seven-phase process:
90
+ The `feature-dev` skill guides a coding assistant through a seven-phase process:
67
91
 
68
92
  1. Discovery — understand the feature and establish lightweight progress tracking
69
93
  2. Codebase exploration — inspect relevant code and patterns, optionally with read-only helper passes
@@ -79,7 +103,15 @@ The skill guides a coding assistant through a seven-phase process:
79
103
  pi-feature-dev/
80
104
  ├── package.json
81
105
  └── skills/
82
- └── feature-dev/
106
+ ├── feature-dev/
107
+ │ └── SKILL.md
108
+ ├── plan-exec/
109
+ │ ├── SKILL.md
110
+ │ ├── references/
111
+ │ └── scripts/
112
+ ├── plan-make/
113
+ │ └── SKILL.md
114
+ └── plan-review/
83
115
  └── SKILL.md
84
116
  ```
85
117
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pi-feature-dev",
3
- "version": "1.2.0",
4
- "description": "Portable guided feature development workflow for coding assistants, packaged as a Pi skill.",
3
+ "version": "1.4.0",
4
+ "description": "Portable coding-agent workflows packaged as skills.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "repository": {
@@ -17,6 +17,7 @@
17
17
  },
18
18
  "keywords": [
19
19
  "feature-development",
20
+ "plan-execution",
20
21
  "coding-assistants",
21
22
  "workflow",
22
23
  "skills"
@@ -0,0 +1,322 @@
1
+ ---
2
+ name: plan-exec
3
+ description: Execute implementation plan files task by task with isolated workers, task commits, internal reviews, finalize, and a portable run summary.
4
+ compatibility: "Portable across coding assistant environments that support fresh-context isolated workers, repository file access, shell commands, and Git commits. If isolated workers are unavailable, stop instead of running inline."
5
+ ---
6
+
7
+ # Plan Exec
8
+
9
+ Execute a plan file one task section at a time. The main session is the
10
+ orchestrator. Implementation, fixing, finalization, and summary work happens in
11
+ fresh-context isolated workers.
12
+
13
+ This skill is agent-agnostic, but not lowest-common-denominator. It requires a
14
+ host agent that can launch isolated workers with repository access.
15
+
16
+ ## Required Capabilities
17
+
18
+ Before starting, verify that the current host agent supports all required
19
+ capabilities:
20
+
21
+ - Read and edit files in the repository.
22
+ - Run shell commands in the repository.
23
+ - Launch fresh-context isolated workers.
24
+ - Give implementation and fixer workers write authority.
25
+ - Give review and summary workers read-only authority.
26
+ - Commit selected files with Git.
27
+
28
+ If any required capability is missing, stop and explain which capability is not
29
+ available. Do not perform implementation work in the main orchestrating session.
30
+
31
+ ## Compatibility Boundaries
32
+
33
+ - Git only. Stop if the current directory is not inside a Git repository.
34
+ - In-place execution only. Do not create Git worktrees.
35
+ - No prompt overrides. Always use the bundled prompt and reviewer files shipped
36
+ inside this skill.
37
+ - No custom rules loading. Follow the host agent, user, and repository
38
+ instructions that are already in effect.
39
+ - No external review tools. All reviews are performed by isolated workers in the
40
+ current host agent.
41
+ - Do not push, open pull requests, or move the plan file unless the plan itself
42
+ explicitly requires it.
43
+
44
+ ## Arguments
45
+
46
+ - Optional plan path. If omitted, choose from `docs/plans/`.
47
+
48
+ ## Bundled Files
49
+
50
+ Set `PLAN_EXEC_ROOT` to the absolute path of the directory containing this
51
+ `SKILL.md`. Read bundled files directly from:
52
+
53
+ - `PLAN_EXEC_ROOT/references/prompts/task.md`
54
+ - `PLAN_EXEC_ROOT/references/prompts/review.md`
55
+ - `PLAN_EXEC_ROOT/references/prompts/fixer.md`
56
+ - `PLAN_EXEC_ROOT/references/prompts/finalizer.md`
57
+ - `PLAN_EXEC_ROOT/references/prompts/stats.md`
58
+ - `PLAN_EXEC_ROOT/references/agents/*.txt`
59
+ - `PLAN_EXEC_ROOT/scripts/*.sh`
60
+
61
+ After reading a bundled prompt, replace all placeholders before passing it to a
62
+ worker:
63
+
64
+ - `PLAN_FILE_PATH`
65
+ - `PROGRESS_FILE_PATH`
66
+ - `DEFAULT_BRANCH`
67
+ - `PLAN_EXEC_ROOT`
68
+ - `FINDINGS_LIST` when using the fixer prompt
69
+ - `REVIEW_PHASE` when using the review playbook
70
+
71
+ ## Process
72
+
73
+ ### Step 1. Resolve Plan File
74
+
75
+ If a plan path was provided, use it. Otherwise, list markdown files in
76
+ `docs/plans/`, excluding `docs/plans/completed/`.
77
+
78
+ - If exactly one plan is found, use it.
79
+ - If multiple plans are found, ask the user to choose one.
80
+ - If no plan is found, stop and ask for a plan path.
81
+
82
+ Read the plan file. Count all `### Task N:` and `### Iteration N:` sections so
83
+ the run has a visible scope.
84
+
85
+ Determine the default branch:
86
+
87
+ ```bash
88
+ bash PLAN_EXEC_ROOT/scripts/detect-branch.sh
89
+ ```
90
+
91
+ Capture the result as `DEFAULT_BRANCH`.
92
+
93
+ ### Step 2. Create Or Update Progress Tracking
94
+
95
+ Use any host-provided task/progress UI when available. Otherwise keep a concise
96
+ checklist in chat. Track one item per plan task plus these fixed phases:
97
+
98
+ - Review phase 1: comprehensive and critical re-checks
99
+ - Review phase 2: code smells
100
+ - Review phase 3: critical only
101
+ - Finalize
102
+ - Run summary
103
+
104
+ ### Step 3. Create Or Reuse Feature Branch
105
+
106
+ Run in the current checkout only. Do not create or enter a worktree.
107
+
108
+ Create a feature branch when currently on the default branch, or keep using the
109
+ current branch when already on a non-default branch:
110
+
111
+ ```bash
112
+ bash PLAN_EXEC_ROOT/scripts/create-branch.sh PLAN_FILE_PATH
113
+ ```
114
+
115
+ The script derives a branch name from the plan filename by stripping a leading
116
+ date prefix. Capture the branch name it prints.
117
+
118
+ ### Step 4. Initialize Progress File
119
+
120
+ Create a progress file in `/tmp` using the plan filename stem, for example
121
+ `/tmp/progress-fix-issues.txt`:
122
+
123
+ ```bash
124
+ bash PLAN_EXEC_ROOT/scripts/init-progress.sh /tmp/progress-<plan-name>.txt PLAN_FILE_PATH <branch-name>
125
+ ```
126
+
127
+ Report the full progress file path to the user.
128
+
129
+ After initialization, append only through:
130
+
131
+ ```bash
132
+ bash PLAN_EXEC_ROOT/scripts/append-progress.sh PROGRESS_FILE_PATH "message"
133
+ ```
134
+
135
+ or by piping multiline content into that script.
136
+
137
+ ### Step 5. Task Loop
138
+
139
+ Repeat until no unchecked checkboxes remain in any `### Task N:` or
140
+ `### Iteration N:` section.
141
+
142
+ 1. Re-read the plan file. Workers may have modified it.
143
+ 2. Find the first task or iteration section containing `[ ]`.
144
+ 3. If no such section exists, continue to review phase 1.
145
+ 4. Announce the task to the user before launching the worker:
146
+
147
+ ```text
148
+ --- Task N: <title> ---
149
+ - [ ] <unchecked item>
150
+ - [ ] <unchecked item>
151
+ ```
152
+
153
+ 5. Spawn one isolated implementation worker with the bundled `task.md` prompt.
154
+ Substitute `PLAN_FILE_PATH`, `PROGRESS_FILE_PATH`, and `PLAN_EXEC_ROOT`.
155
+ 6. After the worker returns, re-read the plan file and verify that the task
156
+ section has no remaining `[ ]` items.
157
+ 7. If the task is complete, report `Task N completed` and continue.
158
+ 8. If the task still has unchecked items, retry with a fresh isolated worker up
159
+ to `task_retries` times. Default `task_retries` is `1` if the host or user did
160
+ not configure it.
161
+ 9. If all retries fail, stop and report the failure.
162
+
163
+ The only success signal is the plan file state. Do not rely on the worker's
164
+ final message alone.
165
+
166
+ Orchestrator constraints:
167
+
168
+ - Do not implement code yourself.
169
+ - Do not debug or fix worker failures yourself.
170
+ - If a worker leaves compiler errors, test failures, or incomplete checkboxes,
171
+ retry with a fresh worker and include the failure details in the prompt.
172
+ - Do not modify the plan file yourself; implementation workers own plan
173
+ checkbox updates.
174
+
175
+ Maximum task loop iterations: 50. If reached, stop and report the safety limit.
176
+
177
+ ### Step 6. Review Phase 1 - Comprehensive Then Critical Re-Checks
178
+
179
+ Report:
180
+
181
+ ```text
182
+ --- Review phase 1: comprehensive ---
183
+ ```
184
+
185
+ Loop up to `review_iterations` times. Default `review_iterations` is `5` if the
186
+ host or user did not configure it.
187
+
188
+ For iteration 1, use `REVIEW_PHASE=comprehensive` in the bundled `review.md`
189
+ playbook. It launches five read-only review workers:
190
+
191
+ - quality
192
+ - implementation
193
+ - testing
194
+ - simplification
195
+ - documentation
196
+
197
+ For iteration 2 and later, report:
198
+
199
+ ```text
200
+ --- Review phase 1: critical re-check (iteration N) ---
201
+ ```
202
+
203
+ Use `REVIEW_PHASE=critical`. It launches two read-only review workers:
204
+
205
+ - quality
206
+ - implementation
207
+
208
+ Parallel review workers are preferred when the host supports parallel isolated
209
+ workers. If parallel launch is unavailable, run the review workers sequentially,
210
+ but they must still be isolated read-only workers.
211
+
212
+ Collect the complete output from all review workers. Do not summarize, filter,
213
+ verify, dismiss, or reclassify findings. Log the collected findings to the
214
+ progress file, then pass the full unedited finding list to a fixer worker using
215
+ the bundled `fixer.md` prompt.
216
+
217
+ If all review workers report no issues, report `Review phase 1: clean` and move
218
+ to review phase 2.
219
+
220
+ After the fixer returns, show its `FIXES:` section to the user, report
221
+ `Review phase 1: iteration N fixes applied`, and loop back for a re-check.
222
+
223
+ If `review_iterations` is reached with issues still found, report
224
+ `Review phase 1: max iterations reached, moving on` and continue.
225
+
226
+ ### Step 7. Review Phase 2 - Code Smells
227
+
228
+ Report:
229
+
230
+ ```text
231
+ --- Review phase 2: code smells analysis ---
232
+ ```
233
+
234
+ Run one read-only isolated worker with
235
+ `PLAN_EXEC_ROOT/references/agents/smells.txt`.
236
+
237
+ The smells worker must inspect the diff against `DEFAULT_BRANCH`, read changed
238
+ files for context, and report only problems.
239
+
240
+ If no issues are found, report `Smells analysis: clean` and continue.
241
+
242
+ If issues are found, log the full output to the progress file and launch a fixer
243
+ worker with the bundled `fixer.md` prompt. Pass the full smells output as
244
+ `FINDINGS_LIST`. Show the fixer's `FIXES:` section when it returns.
245
+
246
+ ### Step 8. Review Phase 3 - Critical Only
247
+
248
+ Report:
249
+
250
+ ```text
251
+ --- Review phase 3: critical/major only ---
252
+ ```
253
+
254
+ Use the bundled `review.md` playbook with `REVIEW_PHASE=critical` for one final
255
+ single pass. Launch the quality and implementation read-only workers. Pass any
256
+ critical or major findings to a fixer worker. Ignore minor findings in this
257
+ phase.
258
+
259
+ If neither worker reports critical or major findings, report
260
+ `Review phase 3: clean`.
261
+
262
+ ### Step 9. Finalize
263
+
264
+ Check `finalize_enabled`. Default is `true` if the host or user did not
265
+ configure it. If false, skip this step.
266
+
267
+ Report:
268
+
269
+ ```text
270
+ --- Finalize: rebase and clean up commits ---
271
+ ```
272
+
273
+ Spawn one isolated finalizer worker with the bundled `finalizer.md` prompt.
274
+ Substitute `DEFAULT_BRANCH`, `PLAN_FILE_PATH`, `PROGRESS_FILE_PATH`, and
275
+ `PLAN_EXEC_ROOT`.
276
+
277
+ Finalize is best-effort. If rebase or commit cleanup fails, the finalizer must
278
+ leave the branch in a coherent state and report the issue. Do not block the run
279
+ only because commit cleanup was not possible.
280
+
281
+ ### Step 10. Portable Run Summary
282
+
283
+ Spawn one read-only isolated summary worker with the bundled `stats.md` prompt.
284
+ Substitute `DEFAULT_BRANCH`, `PLAN_FILE_PATH`, and `PROGRESS_FILE_PATH`.
285
+
286
+ The summary worker reads only the plan file, progress file, and Git state. It
287
+ must not read host-specific telemetry logs or token accounting files.
288
+
289
+ Show the summary worker's full markdown output to the user.
290
+
291
+ If the summary worker fails, report the failure but do not block completion.
292
+
293
+ ### Step 11. Completion
294
+
295
+ Append completion to the progress file:
296
+
297
+ ```bash
298
+ bash PLAN_EXEC_ROOT/scripts/append-progress.sh PROGRESS_FILE_PATH "completed"
299
+ ```
300
+
301
+ Report:
302
+
303
+ ```text
304
+ All N tasks completed, reviews passed, branch finalized
305
+ ```
306
+
307
+ Do not push, create a pull request, or move the plan file unless the user or the
308
+ plan explicitly asked for that.
309
+
310
+ ## Key Rules
311
+
312
+ - The main session is the orchestrator.
313
+ - Isolated workers do implementation, fixes, finalization, reviews, and summary.
314
+ - Each implementation worker handles exactly one task section.
315
+ - Each implementation or fixer worker must commit its own changes before
316
+ reporting success.
317
+ - The plan file is the source of truth for task completion.
318
+ - The progress file carries context between phases.
319
+ - Review findings are passed in full to fixer workers.
320
+ - All prompts come from the bundled prompt set.
321
+ - Git worktrees, prompt overrides, custom rules loading, Mercurial support, and
322
+ external review tools are out of scope.
@@ -0,0 +1,55 @@
1
+ Review code changes and identify missing documentation updates.
2
+
3
+ ## README.md (Human Documentation)
4
+
5
+ Check if changes require README updates:
6
+
7
+ Must document:
8
+ - New features or capabilities
9
+ - New CLI flags or command-line options
10
+ - New API endpoints or interfaces
11
+ - New configuration options
12
+ - Changed behavior that affects users
13
+ - New dependencies or system requirements
14
+ - Breaking changes
15
+
16
+ Skip:
17
+ - Internal refactoring with no user-visible changes
18
+ - Bug fixes that restore documented behavior
19
+ - Test additions
20
+ - Code style changes
21
+
22
+ ## Agent and Project Guidance
23
+
24
+ Check if changes require updates to repository guidance files such as AGENTS.md,
25
+ CLAUDE.md, CONTRIBUTING.md, developer docs, or local conventions docs:
26
+
27
+ Must document:
28
+ - New architectural patterns discovered/established
29
+ - New conventions or coding standards
30
+ - New build/test commands
31
+ - New libraries or tools integrated
32
+ - Project structure changes
33
+ - Workflow changes
34
+ - Non-obvious debugging techniques
35
+
36
+ Skip:
37
+ - Standard code additions following existing patterns
38
+ - Simple bug fixes
39
+ - Test additions using existing patterns
40
+
41
+ ## Plan Files
42
+
43
+ If changes relate to an existing plan:
44
+ - Mark completed items as done
45
+ - Update plan status if needed
46
+ - Note which plan items this change addresses
47
+
48
+ ## What to Report
49
+
50
+ For each gap:
51
+ - Missing: what needs to be documented
52
+ - Section: where in the documentation it should go
53
+ - Suggested content: draft text or outline
54
+
55
+ Report problems only - no positive observations.
@@ -0,0 +1,26 @@
1
+ Review whether the implementation achieves the stated goal/requirement.
2
+
3
+ ## Core Review Responsibilities
4
+
5
+ 1. Requirement coverage - does implementation address all aspects of the stated requirement? Are there edge cases or scenarios not handled?
6
+
7
+ 2. Correctness of approach - is the chosen approach actually solving the right problem? Could it fail to achieve the goal in certain conditions?
8
+
9
+ 3. Wiring and integration - is everything connected properly? Are new components registered, routes added, handlers wired, configs updated?
10
+
11
+ 4. Completeness - are there missing pieces that would prevent the feature from working? Missing imports, unimplemented interfaces, incomplete migrations?
12
+
13
+ 5. Logic flow - does data flow correctly from input to output? Are transformations correct? Is state managed properly?
14
+
15
+ 6. Edge cases - are boundary conditions handled? Empty inputs, null values, concurrent access, error paths?
16
+
17
+ ## What to Report
18
+
19
+ For each issue found:
20
+ - Issue: clear description of what's wrong
21
+ - Impact: how this prevents achieving the goal
22
+ - Location: file and line reference
23
+ - Fix: what needs to be added or changed
24
+
25
+ Focus on correctness of approach, not code style.
26
+ Report problems only - no positive observations.
@@ -0,0 +1,37 @@
1
+ Review code for bugs, security issues, and quality problems.
2
+
3
+ ## Correctness Review
4
+
5
+ 1. Logic errors - off-by-one errors, incorrect conditionals, wrong operators
6
+ 2. Edge cases - empty inputs, nil/null values, boundary conditions, concurrent access
7
+ 3. Error handling - all errors checked, appropriate error wrapping, no silent failures
8
+ 4. Resource management - proper cleanup, no leaks, correct resource release
9
+ 5. Concurrency issues - race conditions, deadlocks, thread/coroutine leaks
10
+ 6. Data integrity - validation, sanitization, consistent state management
11
+
12
+ ## Security Analysis
13
+
14
+ 1. Input validation - all user inputs validated and sanitized
15
+ 2. Authentication/authorization - proper checks in place
16
+ 3. Injection vulnerabilities - SQL, command, path traversal
17
+ 4. Secret exposure - no hardcoded credentials or keys
18
+ 5. Information disclosure - error messages, logs, debug info
19
+
20
+ ## Simplicity Assessment
21
+
22
+ 1. Direct solutions first - if simple approach works, don't use complex pattern
23
+ 2. No enterprise patterns for simple problems - avoid factories, builders for straightforward code
24
+ 3. Question every abstraction - each interface/abstraction must solve real problem
25
+ 4. No scope creep - changes solve only the stated problem
26
+ 5. No premature optimization - unless addressing proven bottlenecks
27
+
28
+ ## What to Report
29
+
30
+ For each issue:
31
+ - Location: exact file path and line number
32
+ - Issue: clear description
33
+ - Impact: how this affects the code
34
+ - Fix: specific suggestion
35
+
36
+ Focus on defects that would cause runtime failures, security vulnerabilities, or maintainability problems.
37
+ Report problems only - no positive observations.
@@ -0,0 +1,54 @@
1
+ Detect over-engineered and overcomplicated code - code that works but is more complex than necessary.
2
+
3
+ ## Excessive Abstraction Layers
4
+
5
+ - Wrapper adds nothing - method just calls another method with same signature
6
+ - Factory for single implementation - factory pattern when only one concrete type exists
7
+ - Interface on producer side - interface defined where implemented, not where consumed
8
+ - Layer cake anti-pattern - handler -> service -> repository when each just passes through
9
+ - DTO/Mapper overkill - multiple types representing same data with conversion functions
10
+
11
+ ## Premature Generalization
12
+
13
+ - Generic solution for specific problem - event bus for one event type
14
+ - Config objects for 2-3 options - options pattern when direct parameters suffice
15
+ - Plugin architecture for fixed functionality - extension points nothing extends
16
+ - Overloaded struct - one type handling all variations with many optional fields
17
+
18
+ ## Unnecessary Indirection
19
+
20
+ - Pass-through wrappers - methods that only delegate to dependencies
21
+ - Excessive method chaining - builder pattern for simple constructions
22
+ - Interface wrapping primitives - custom types for standard library types
23
+ - Middleware stacking - multiple middlewares that could be one
24
+
25
+ ## Future-Proofing Excess
26
+
27
+ - Unused extension points - hooks, callbacks, plugins with no callers
28
+ - Versioned internal APIs - v1/v2 when only one version used
29
+ - Feature flags for permanent decisions - flags always on/off
30
+
31
+ ## Unnecessary Fallbacks
32
+
33
+ - Fallback that never triggers - default path conditions never met
34
+ - Legacy mode kept just in case - old code path always disabled
35
+ - Dual implementations - old + new logic when old has no callers
36
+ - Silent fallbacks hiding problems - catching errors and falling back instead of failing fast
37
+
38
+ ## Premature Optimization
39
+
40
+ - Caching rarely-accessed data - cache for data read once at startup
41
+ - Custom data structures - complex structures when arrays/maps work
42
+ - Worker pools for occasional tasks - pooling for operations/hour
43
+ - Connection pooling overkill - complex pooling for single connection
44
+
45
+ ## What to Report
46
+
47
+ For each finding:
48
+ - Location: file and line reference
49
+ - Pattern: which over-engineering pattern detected
50
+ - Problem: why this adds unnecessary complexity
51
+ - Simplification: what simpler code would look like
52
+ - Effort: trivial/small/medium/large
53
+
54
+ Report problems only - no positive observations.
@@ -0,0 +1,43 @@
1
+ Review code for style consistency, convention adherence, and code smells.
2
+
3
+ ## Project Convention Check
4
+
5
+ 1. Read repository guidance files when present, such as AGENTS.md, CLAUDE.md, CONTRIBUTING.md, README.md, or local docs, to understand project rules
6
+ 2. Read any documentation files referenced by those guidance files (coding standards, style guides)
7
+ 3. Check if changed code follows the established conventions
8
+
9
+ ## Style Consistency
10
+
11
+ 1. Naming conventions - do new names follow the same patterns as existing code?
12
+ 2. Code organization - is new code structured like existing code in the same package/module?
13
+ 3. Import ordering - does it match the rest of the project?
14
+ 4. Comment style - do comments follow project conventions?
15
+ 5. Error handling patterns - does error handling match the project's established patterns?
16
+ 6. Logging patterns - are log calls consistent with the rest of the codebase?
17
+
18
+ ## Code Smells
19
+
20
+ 1. Dead code - unused functions, variables, imports, parameters
21
+ 2. Duplicated logic - copy-paste code that should be consolidated
22
+ 3. Long functions - functions doing too many things
23
+ 4. Deep nesting - excessive if/else or loop nesting
24
+ 5. Magic numbers/strings - unexplained literal values
25
+ 6. Inconsistent abstraction levels - mixing high and low level operations
26
+
27
+ ## Anti-patterns
28
+
29
+ 1. God objects - types with too many responsibilities
30
+ 2. Shotgun surgery - one change requires touching many unrelated files
31
+ 3. Feature envy - code that uses another module's data more than its own
32
+ 4. Primitive obsession - using primitives where a domain type would be clearer
33
+
34
+ ## What to Report
35
+
36
+ For each finding:
37
+ - Location: file and line reference
38
+ - Issue: what's inconsistent or smelly
39
+ - Convention: what the project convention is (cite CLAUDE.md or existing code as evidence)
40
+ - Fix: specific suggestion to align with conventions
41
+
42
+ Report problems only - no positive observations.
43
+ Focus on consistency with existing code, not personal preferences.
@@ -0,0 +1,51 @@
1
+ Review test coverage and quality.
2
+
3
+ ## Test Existence and Coverage
4
+
5
+ 1. Missing tests - new code paths without corresponding tests
6
+ 2. Untested error paths - error conditions not verified
7
+ 3. Coverage gaps - functions or branches without test coverage
8
+ 4. Integration test needs - system boundaries requiring integration tests
9
+
10
+ ## Test Quality
11
+
12
+ 1. Tests verify behavior, not implementation details
13
+ 2. Each test is independent, can run in any order
14
+ 3. Descriptive test names that explain what is being tested
15
+ 4. Both success and error paths tested
16
+ 5. Edge cases and boundary conditions covered
17
+
18
+ ## Fake Test Detection
19
+
20
+ Watch for tests that don't actually verify code:
21
+ - Tests that always pass regardless of code changes
22
+ - Tests checking hardcoded values instead of actual output
23
+ - Tests verifying mock behavior instead of code using the mock
24
+ - Ignored errors with _ or empty error checks
25
+ - Conditional assertions that always pass
26
+ - Commented out failing test cases
27
+
28
+ ## Test Independence
29
+
30
+ 1. No shared mutable state between tests
31
+ 2. Proper setup and teardown
32
+ 3. No order dependencies between tests
33
+ 4. Resources properly cleaned up
34
+
35
+ ## Edge Case Coverage
36
+
37
+ 1. Empty inputs and collections
38
+ 2. Null/nil values
39
+ 3. Boundary values (zero, max, min)
40
+ 4. Concurrent access scenarios
41
+ 5. Timeout and cancellation handling
42
+
43
+ ## What to Report
44
+
45
+ For each finding:
46
+ - Location: test file and function
47
+ - Issue: what's wrong with the test
48
+ - Impact: what bugs could slip through
49
+ - Fix: how to improve the test
50
+
51
+ Report problems only - no positive observations.