@paw-workflow/cli 0.0.1

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.
Files changed (38) hide show
  1. package/README.md +124 -0
  2. package/bin/paw.js +82 -0
  3. package/dist/agents/PAW-Review.agent.md +86 -0
  4. package/dist/agents/PAW.agent.md +171 -0
  5. package/dist/skills/paw-code-research/SKILL.md +209 -0
  6. package/dist/skills/paw-docs-guidance/SKILL.md +163 -0
  7. package/dist/skills/paw-git-operations/SKILL.md +196 -0
  8. package/dist/skills/paw-impl-review/SKILL.md +178 -0
  9. package/dist/skills/paw-implement/SKILL.md +153 -0
  10. package/dist/skills/paw-init/SKILL.md +118 -0
  11. package/dist/skills/paw-plan-review/SKILL.md +117 -0
  12. package/dist/skills/paw-planning/SKILL.md +217 -0
  13. package/dist/skills/paw-pr/SKILL.md +157 -0
  14. package/dist/skills/paw-review-baseline/SKILL.md +268 -0
  15. package/dist/skills/paw-review-correlation/SKILL.md +307 -0
  16. package/dist/skills/paw-review-critic/SKILL.md +373 -0
  17. package/dist/skills/paw-review-feedback/SKILL.md +437 -0
  18. package/dist/skills/paw-review-gap/SKILL.md +639 -0
  19. package/dist/skills/paw-review-github/SKILL.md +336 -0
  20. package/dist/skills/paw-review-impact/SKILL.md +569 -0
  21. package/dist/skills/paw-review-response/SKILL.md +118 -0
  22. package/dist/skills/paw-review-understanding/SKILL.md +372 -0
  23. package/dist/skills/paw-review-workflow/SKILL.md +239 -0
  24. package/dist/skills/paw-spec/SKILL.md +257 -0
  25. package/dist/skills/paw-spec-research/SKILL.md +138 -0
  26. package/dist/skills/paw-spec-review/SKILL.md +101 -0
  27. package/dist/skills/paw-status/SKILL.md +160 -0
  28. package/dist/skills/paw-transition/SKILL.md +134 -0
  29. package/dist/skills/paw-work-shaping/SKILL.md +99 -0
  30. package/dist/skills/paw-workflow/SKILL.md +142 -0
  31. package/lib/commands/install.js +103 -0
  32. package/lib/commands/list.js +18 -0
  33. package/lib/commands/uninstall.js +95 -0
  34. package/lib/commands/upgrade.js +119 -0
  35. package/lib/manifest.js +42 -0
  36. package/lib/paths.js +42 -0
  37. package/lib/registry.js +41 -0
  38. package/package.json +40 -0
@@ -0,0 +1,437 @@
1
+ ---
2
+ name: paw-review-feedback
3
+ description: Transforms gap analysis findings into structured review comments with comprehensive rationale. Handles both initial draft generation and critique response iteration.
4
+ metadata:
5
+ version: "0.0.1"
6
+ ---
7
+
8
+ # PAW Review Feedback Skill
9
+
10
+ Transform gap analysis findings into structured review comments with comprehensive rationale sections that cite evidence, baseline patterns, impact, and best practices.
11
+
12
+ > **Reference**: Follow Core Review Principles from `paw-review-workflow` skill.
13
+
14
+ ## Prerequisites
15
+
16
+ Verify these artifacts exist in `.paw/reviews/<identifier>/`:
17
+ - `ReviewContext.md` (PR metadata and parameters)
18
+ - `CodeResearch.md` (baseline codebase understanding)
19
+ - `DerivedSpec.md` (what the PR is trying to achieve)
20
+ - `ImpactAnalysis.md` (system-wide impact assessment)
21
+ - `GapAnalysis.md` (categorized findings with evidence)
22
+ - `CrossRepoAnalysis.md` (optional—only for multi-repo reviews)
23
+
24
+ If any required artifact is missing, report blocked status—earlier stages must complete first.
25
+
26
+ **Multi-repo detection**: Check if `CrossRepoAnalysis.md` exists. If present, incorporate cross-repo gaps into comment generation.
27
+
28
+ ## Core Responsibilities
29
+
30
+ - Batch related findings into coherent comments (One Issue, One Comment principle)
31
+ - Transform findings into clear, actionable review comments
32
+ - Generate comprehensive rationale sections citing evidence, baseline patterns, impact, and best practices
33
+ - Create `ReviewComments.md` with all comments, rationale, and metadata
34
+ - **Critique Response Mode**: Update comments based on critic assessment, marking each with `**Final**:` status
35
+ - Enable tone adjustment while preserving evidence and IDs
36
+
37
+ **Note**: GitHub posting is handled by the `paw-review-github` skill after critique iteration completes.
38
+
39
+ ## Process Steps
40
+
41
+ ### Step 1: Batch Related Findings (One Issue, One Comment)
42
+
43
+ Group findings that share the same root cause:
44
+
45
+ **Batching Criteria:**
46
+ - Same underlying issue manifesting in multiple locations
47
+ - Related error handling gaps across a module
48
+ - Consistent pattern violations throughout changed files
49
+ - Missing tests for related functionality
50
+
51
+ **Batching Approach:**
52
+ - Create single comment referencing multiple file:line locations, OR
53
+ - Create linked comments (note relationship in comment text)
54
+ - Avoid scattering feedback for one logical issue across multiple disconnected comments
55
+
56
+ **Examples:**
57
+ - Multiple null checks missing in same class → One comment listing all locations
58
+ - Architectural concern spanning 3 files → One thread comment discussing the pattern
59
+ - Missing tests for several related methods → One comment about test coverage gap
60
+
61
+ ### Step 1.5: Incorporate Cross-Repository Correlation Findings (Multi-Repo Only)
62
+
63
+ **Condition**: Only if `CrossRepoAnalysis.md` exists in the artifact directory.
64
+
65
+ When `CrossRepoAnalysis.md` is present, add cross-repo gaps to the findings list:
66
+
67
+ **Load Cross-Repo Gaps:**
68
+ 1. Read `CrossRepoAnalysis.md` → extract "Cross-Repository Gaps" section
69
+ 2. For each gap, create a finding entry with:
70
+ - Severity from gap (Must/Should/Could)
71
+ - Evidence from gap's file:line references
72
+ - Cross-reference notation from the gap's related PR
73
+
74
+ **Cross-Repo Finding Format:**
75
+ ```markdown
76
+ **Type**: Must (from CrossRepoAnalysis.md)
77
+ **Category**: Cross-Repository Coordination
78
+ **Files**: [repo-b/src/api/client.ts:8](repo-b/src/api/client.ts#L8)
79
+ **Issue**: Missing consumer update for `lastLogin` field
80
+ **Evidence**:
81
+ - Added in repo-a: [repo-a/src/types/user.ts:22](repo-a/src/types/user.ts#L22)
82
+ - Missing in repo-b: [repo-b/src/api/client.ts](repo-b/src/api/client.ts)
83
+ **Cross-Reference**: (Cross-repo: see repo-a#123 for interface change)
84
+ ```
85
+
86
+ **Routing Cross-Repo Comments:**
87
+ - Post cross-repo findings to the PR that needs to make the change
88
+ - Include cross-reference notation: `(Cross-repo: see owner/other-repo#NNN for [context])`
89
+ - Note deployment order in comment if relevant from CrossRepoAnalysis.md
90
+
91
+ ### Step 2: Build Comment Objects
92
+
93
+ For each finding or batched group of findings, create structured comment:
94
+
95
+ **Required Fields:**
96
+ - **Type**: `inline` (line-specific) or `thread` (file/concept-level)
97
+ - **File(s) and line range(s)**: Specific locations from GapAnalysis.md
98
+ - **Severity**: Must/Should/Could (from GapAnalysis categorization)
99
+ - **Category**: Correctness, Safety, Testing, Maintainability, Performance, etc.
100
+ - **Description**: Clear, specific explanation of the issue
101
+ - **Suggestion**: Code example or recommended approach
102
+ - **Rationale**: (generated in next step)
103
+
104
+ **Inline vs Thread Determination:**
105
+
106
+ Use **Inline** for:
107
+ - Issue specific to particular lines of code
108
+ - Logic error in a function
109
+ - Missing check at a specific location
110
+ - Performance issue in a specific loop
111
+ - Test gap for a specific method
112
+
113
+ Use **Thread** for:
114
+ - Architectural concern across >3 files
115
+ - Missing integration tests spanning components
116
+ - Consistent pattern violation throughout the PR
117
+ - Cross-cutting concerns (logging, error handling approach)
118
+ - General discussion about design decisions
119
+
120
+ ### Step 3: Generate Rationale Sections
121
+
122
+ For EVERY comment, create comprehensive rationale with four components:
123
+
124
+ **Evidence:**
125
+ - File:line references from GapAnalysis.md findings
126
+ - Specific code snippets showing the issue
127
+ - Concrete examples of the problem
128
+
129
+ **Baseline Pattern:**
130
+ - Reference existing code in the codebase to show how similar situations are handled
131
+ - Cite established conventions and patterns from the codebase
132
+ - Show consistency/inconsistency with existing code
133
+ - **Important**: Do NOT reference CodeResearch.md or other PAW artifacts in comments—cite actual file:line locations instead
134
+
135
+ **Impact:**
136
+ - Explain what could go wrong (for Must items: specific failure modes)
137
+ - Describe user/system impact of not addressing
138
+ - Note performance, security, or maintainability implications
139
+ - Reference impact findings from analysis where applicable
140
+ - **Important**: Do NOT reference ImpactAnalysis.md or other PAW artifacts in comments—describe impacts directly
141
+
142
+ **Best Practice Citation:**
143
+ - Reference industry best practices from review-research-notes.md (if available)
144
+ - Cite language/framework conventions
145
+ - Link to relevant documentation or style guides
146
+ - Note security/safety standards
147
+
148
+ **Example Rationale:**
149
+ ```markdown
150
+ **Rationale:**
151
+ - **Evidence**: `auth.ts:45` shows user input passed directly to SQL query without validation
152
+ - **Baseline Pattern**: Similar code in `database.ts:120-130` uses parameterized queries
153
+ - **Impact**: SQL injection vulnerability allowing unauthorized data access or modification
154
+ - **Best Practice**: OWASP Top 10 - Always use parameterized queries for user input
155
+ ```
156
+
157
+ ### Step 4: Create ReviewComments.md
158
+
159
+ Generate comprehensive markdown document:
160
+
161
+ ```markdown
162
+ ---
163
+ date: <timestamp>
164
+ git_commit: <sha>
165
+ branch: <branch>
166
+ repository: <repo>
167
+ topic: "Review Comments for <PR/Branch>"
168
+ tags: [review, comments, feedback]
169
+ status: draft
170
+ ---
171
+
172
+ # Review Comments for <PR Number or Branch Slug>
173
+
174
+ **Context**: GitHub PR #X OR Non-GitHub branch feature/...
175
+ **Base Branch**: <base>
176
+ **Head Branch**: <head>
177
+ **Review Date**: <date>
178
+ **Reviewer**: <git user>
179
+ **Status**: ⏳ Pending critique
180
+
181
+ ## Summary Comment
182
+
183
+ <Brief, positive opening acknowledging the work and effort>
184
+
185
+ <Overview of feedback scope and organization>
186
+
187
+ **Findings**: X Must-address items, Y Should-address items, Z optional suggestions
188
+
189
+ ---
190
+
191
+ ## Inline Comments
192
+
193
+ ### File: `path/to/file.ts` | Lines: 45-50
194
+
195
+ **Type**: Must
196
+ **Category**: Safety
197
+
198
+ <Clear explanation of the issue>
199
+
200
+ **Suggestion:**
201
+ ```typescript
202
+ // Proposed fix or approach with code example
203
+ ```
204
+
205
+ **Rationale:**
206
+ - **Evidence**: `file.ts:45` shows unchecked null access
207
+ - **Baseline Pattern**: Similar code in `file.ts:100` uses null checks before accessing properties
208
+ - **Impact**: Potential null pointer exception causing crash in production
209
+ - **Best Practice**: Defensive programming - validate inputs before use
210
+
211
+ ---
212
+
213
+ ### File: `path/to/another.ts` | Lines: 88
214
+
215
+ **Type**: Could
216
+ **Category**: Performance
217
+
218
+ <Suggestion for potential optimization>
219
+
220
+ **Suggestion:**
221
+ ```typescript
222
+ // Optional improvement example
223
+ ```
224
+
225
+ **Rationale:**
226
+ - **Evidence**: `another.ts:88` shows inefficient pattern
227
+ - **Baseline Pattern**: More efficient approach used in `optimized.ts:42`
228
+ - **Impact**: Minor performance improvement in non-critical path
229
+ - **Best Practice**: Optimization best practice reference
230
+
231
+ ---
232
+
233
+ ## Thread Comments
234
+
235
+ ### File: `path/to/module/` (Overall Architecture)
236
+
237
+ **Type**: Should
238
+ **Category**: Maintainability
239
+
240
+ <Discussion about broader architectural or design pattern concern>
241
+
242
+ **Rationale:**
243
+ ...
244
+
245
+ ---
246
+
247
+ ## Questions for Author
248
+
249
+ 1. <Question about intent or design decision - reference specific file:line>
250
+ 2. <Clarification needed on edge case handling>
251
+ ```
252
+
253
+ **Key Requirements:**
254
+ - Summary must be positive and constructive
255
+ - Every comment has rationale with all four components
256
+ - File:line references for all evidence
257
+ - Code examples for non-trivial suggestions
258
+
259
+ ## Critique Response Mode
260
+
261
+ When ReviewComments.md already contains Assessment sections (from `paw-review-critic`), enter Critique Response Mode to incorporate feedback and finalize comments.
262
+
263
+ ### Detection
264
+
265
+ - Check if comments have `**Assessment:**` sections
266
+ - If assessments exist, this is a second pass to incorporate critique
267
+ - Skip to Critique Response Mode steps below
268
+
269
+ ### Process
270
+
271
+ For each comment with an assessment:
272
+
273
+ 1. **Preserve Original**: Keep the original comment text intact
274
+ 2. **Include Critique**: The Assessment section remains as-is
275
+ 3. **Add Updated Version**: Based on the recommendation:
276
+ - **Include as-is**: Add `**Final**: ✓ Ready for GitHub posting`
277
+ - **Modify**: Add `**Updated Comment:**` section with revised text addressing critique feedback, then `**Final**: ✓ Ready for GitHub posting`
278
+ - **Skip**: Add `**Final**: Skipped per critique - [reason]` (comment remains in artifact but won't post to GitHub)
279
+
280
+ ### Updated Comment Structure
281
+
282
+ ```markdown
283
+ ### File: `auth.ts` | Lines: 45-50
284
+
285
+ **Type**: Must
286
+ **Category**: Safety
287
+
288
+ [Original comment text - preserved exactly]
289
+
290
+ **Suggestion:**
291
+ [Original suggestion code]
292
+
293
+ **Rationale:**
294
+ [Original rationale]
295
+
296
+ **Assessment:**
297
+ - **Usefulness**: Medium - [critique justification]
298
+ - **Accuracy**: [validation]
299
+ - **Alternative Perspective**: [alternatives considered]
300
+ - **Trade-offs**: [trade-off analysis]
301
+ - **Recommendation**: Modify to soften tone
302
+
303
+ **Updated Comment:**
304
+ [Revised comment text incorporating critique feedback]
305
+
306
+ **Updated Suggestion:**
307
+ [Revised suggestion if needed]
308
+
309
+ **Final**: ✓ Ready for GitHub posting
310
+ ```
311
+
312
+ ### Skip Handling
313
+
314
+ For comments with `Recommendation: Skip`:
315
+ - Do NOT remove the comment from ReviewComments.md
316
+ - Add `**Final**: Skipped per critique - [reason from assessment]`
317
+ - These comments provide documentation but won't be posted to GitHub
318
+ - Reviewer can override by changing Final to "✓ Ready for GitHub posting"
319
+
320
+ ### Critique Response Completion
321
+
322
+ After processing all comments with assessments:
323
+ - Update ReviewComments.md status from `draft` to `finalized`
324
+ - All comments must have `**Final**:` markers
325
+ - Report count of comments: Include as-is, Modified, Skipped
326
+
327
+ ## Tone Adjustment
328
+
329
+ Support tone adjustments while preserving evidence and IDs:
330
+
331
+ **Default Tone:**
332
+ - Professional and constructive
333
+ - Inclusive language: "we", "let's", "this code" (not "you didn't")
334
+ - Balanced: acknowledge good work, suggest improvements
335
+ - Specific: cite exact locations and evidence
336
+
337
+ **Tone Adjustment Parameters:**
338
+ | Parameter | Low | High |
339
+ |-----------|-----|------|
340
+ | Directness | More diplomatic | More direct |
341
+ | Encouragement | Matter-of-fact | More encouraging |
342
+ | Formality | More casual | More formal |
343
+ | Conciseness | More explanatory | More concise |
344
+
345
+ **Adjustment Process:**
346
+ 1. Accept tone parameters from reviewer
347
+ 2. Regenerate comment TEXT ONLY (description + suggestion)
348
+ 3. Preserve: File:line locations, rationale, evidence, categorization
349
+ 4. Update ReviewComments.md with new text
350
+
351
+ ## Guardrails
352
+
353
+ **No PAW Artifact References in Comments:**
354
+ - NEVER reference PAW artifacts (ReviewContext.md, CodeResearch.md, DerivedSpec.md, ImpactAnalysis.md, GapAnalysis.md, etc.) in comments
355
+ - These files are NOT committed to the branch and are NOT accessible to the PR submitter
356
+ - Instead: Cite actual codebase files with file:line references
357
+ - PAW artifacts are for YOUR internal use and for the reviewer's understanding only
358
+
359
+ **Rationale Required:**
360
+ - EVERY comment must have complete rationale section
361
+ - All four components (Evidence, Baseline Pattern, Impact, Best Practice) required
362
+ - No suggestions without justification
363
+
364
+ **Evidence-Based:**
365
+ - All recommendations informed by existing codebase patterns
366
+ - File:line references for all claims
367
+ - Code examples from actual codebase when citing patterns
368
+
369
+ **Human Control:**
370
+ - Reviewer can modify any comment before GitHub posting
371
+ - Reviewer can override Skip recommendations
372
+ - Final decisions rest with human reviewer
373
+
374
+ **Comprehensive Coverage:**
375
+ - ALL findings from GapAnalysis.md must be transformed into comments
376
+ - No cherry-picking or filtering
377
+ - Positive observations included in summary
378
+ - Questions documented in dedicated section
379
+
380
+ **One Issue, One Comment:**
381
+ - Related findings batched into single coherent comment
382
+ - Clear linking when related comments must be separate
383
+ - Avoid fragmenting feedback for same root cause
384
+
385
+ ## Validation Checklist
386
+
387
+ ### Initial Pass (Draft Generation)
388
+
389
+ Before completing initial pass, verify:
390
+
391
+ - [ ] All GapAnalysis.md findings transformed into comments
392
+ - [ ] Related issues batched appropriately (not scattered)
393
+ - [ ] Every comment has complete rationale (Evidence, Baseline Pattern, Impact, Best Practice)
394
+ - [ ] Code examples included for non-trivial suggestions
395
+ - [ ] Inline vs thread distinction applied correctly
396
+ - [ ] Summary comment is positive and constructive
397
+ - [ ] ReviewComments.md complete with all sections and metadata
398
+ - [ ] ReviewComments.md status is `draft`
399
+ - [ ] No PAW artifact references in comment text
400
+
401
+ ### Critique Response Pass (Finalization)
402
+
403
+ Before completing critique response, verify:
404
+
405
+ - [ ] All comments with Assessment sections processed
406
+ - [ ] `**Final**:` marker added to every comment
407
+ - [ ] `**Updated Comment:**` added where Recommendation was Modify
408
+ - [ ] Skip reasons documented for all skipped comments
409
+ - [ ] ReviewComments.md status updated to `finalized`
410
+ - [ ] Comment counts accurate: Include as-is, Modified, Skipped
411
+
412
+ ## Completion Response
413
+
414
+ **Initial Pass (Draft):**
415
+ ```
416
+ Activity complete.
417
+ Artifact saved: .paw/reviews/<identifier>/ReviewComments.md
418
+ Status: Draft - awaiting critique
419
+
420
+ Summary:
421
+ - Total comments generated: N
422
+ - Must: X, Should: Y, Could: Z
423
+ - Awaiting paw-review-critic assessment
424
+ ```
425
+
426
+ **Critique Response (Finalized):**
427
+ ```
428
+ Activity complete.
429
+ Artifact saved: .paw/reviews/<identifier>/ReviewComments.md
430
+ Status: Finalized - ready for GitHub posting
431
+
432
+ Summary:
433
+ - Comments ready for posting: X
434
+ - Comments modified per critique: Y
435
+ - Comments skipped per critique: Z
436
+
437
+ Next: Run paw-review-github to post finalized comments to GitHub pending review.