@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,336 @@
1
+ ---
2
+ name: paw-review-github
3
+ description: Posts finalized review comments to GitHub as a pending review after critique iteration is complete.
4
+ metadata:
5
+ version: "0.0.1"
6
+ type: activity
7
+ artifacts: none
8
+ updates: ReviewComments.md
9
+ stage: output
10
+ ---
11
+
12
+ # PAW Review GitHub Skill
13
+
14
+ Post finalized review comments to GitHub as a pending review. This skill only posts comments marked as ready, filtering out skipped comments while preserving the complete review history in ReviewComments.md.
15
+
16
+ > **Reference**: Follow Core Review Principles from `paw-review-workflow` skill.
17
+
18
+ ## Prerequisites
19
+
20
+ Verify `ReviewComments.md` exists in `.paw/reviews/<identifier>/` with:
21
+ - Status: `finalized`
22
+ - All comments have `**Final**:` markers
23
+ - At least one comment marked `**Final**: ✓ Ready for GitHub posting`
24
+
25
+ Also verify:
26
+ - GitHub PR context available (owner, repo, PR number)
27
+ - For multi-repo reviews: PR context available for each repository
28
+
29
+ If ReviewComments.md is not finalized or missing `**Final**:` markers, report blocked status—Critique Response pass must complete first.
30
+
31
+ **Non-GitHub Context**: If this is not a GitHub PR review (e.g., local branch diff), skip GitHub posting and provide manual posting instructions instead.
32
+
33
+ ## Core Responsibilities
34
+
35
+ - Read all comments from finalized ReviewComments.md
36
+ - Filter to only comments marked `**Final**: ✓ Ready for GitHub posting`
37
+ - Create GitHub pending review with filtered comments
38
+ - Update ReviewComments.md with posted status and review IDs
39
+ - Handle multi-PR scenarios (create pending review per PR)
40
+ - Provide manual posting instructions for non-GitHub contexts
41
+
42
+ ## Process Steps
43
+
44
+ ### Step 1: Load ReviewComments.md
45
+
46
+ Read the finalized ReviewComments.md and verify:
47
+ - Status field shows `finalized`
48
+ - All comments have `**Final**:` markers
49
+ - Extract GitHub PR context (owner, repo, PR number)
50
+
51
+ If not finalized:
52
+ ```
53
+ Blocked: ReviewComments.md status is not 'finalized'.
54
+ Run paw-review-feedback in Critique Response Mode first.
55
+ ```
56
+
57
+ ### Step 2: Filter Postable Comments
58
+
59
+ Identify comments to post:
60
+
61
+ **Include** comments where `**Final**:` contains:
62
+ - `✓ Ready for GitHub posting`
63
+ - `Ready for GitHub posting`
64
+
65
+ **Exclude** comments where `**Final**:` contains:
66
+ - `Skipped per critique`
67
+ - `Skipped`
68
+ - Any other status not explicitly "Ready for GitHub posting"
69
+
70
+ Build list of postable comments with:
71
+ - File path
72
+ - Line number or range
73
+ - Comment text (use `**Updated Comment:**` if present, otherwise original description)
74
+ - Suggestion code (use `**Updated Suggestion:**` if present, otherwise original)
75
+
76
+ ### Step 3: Create Pending Review (GitHub PRs)
77
+
78
+ Use GitHub MCP tools to create pending review:
79
+
80
+ **3.1 Create Pending Review:**
81
+ ```
82
+ mcp_github_pull_request_review_write(
83
+ owner: "<owner>",
84
+ repo: "<repo>",
85
+ pullNumber: <number>,
86
+ method: "create"
87
+ // Note: event omitted to create pending (draft) review
88
+ )
89
+ ```
90
+
91
+ Record the pending review ID.
92
+
93
+ **3.2 Add Comments to Pending Review:**
94
+
95
+ For EACH postable comment:
96
+ ```
97
+ mcp_github_add_comment_to_pending_review(
98
+ owner: "<owner>",
99
+ repo: "<repo>",
100
+ pullNumber: <number>,
101
+ path: "<file-path>",
102
+ line: <line-number>, // or startLine/line for multi-line
103
+ body: "<comment-text-and-suggestion>",
104
+ side: "RIGHT",
105
+ subjectType: "LINE" // or "FILE" for file-level comments
106
+ )
107
+ ```
108
+
109
+ **Comment Body Construction:**
110
+ - Include description text (updated if modified, original otherwise)
111
+ - Include code suggestion in markdown code block
112
+ - Do NOT include rationale, assessment, or internal markers
113
+ - Do NOT include `**Final**:` or other PAW-specific formatting
114
+
115
+ **Example Posted Comment:**
116
+ ```markdown
117
+ Missing null check before accessing user.profile could cause runtime error.
118
+
119
+ ```suggestion
120
+ if (user?.profile) {
121
+ return user.profile.name;
122
+ }
123
+ return 'Anonymous';
124
+ ```
125
+ ```
126
+
127
+ ### Step 4: Update ReviewComments.md
128
+
129
+ After posting, update each posted comment in ReviewComments.md:
130
+
131
+ **Add Posted Status:**
132
+ ```markdown
133
+ **Final**: ✓ Ready for GitHub posting
134
+ **Posted**: ✓ GitHub pending review (Review ID: 12345678, Comment ID: abc123)
135
+ ```
136
+
137
+ **For Skipped Comments:**
138
+ ```markdown
139
+ **Final**: Skipped per critique - stylistic preference
140
+ **Posted**: — (not posted per critique)
141
+ ```
142
+
143
+ Update the file header:
144
+ ```markdown
145
+ **Status**: Posted to GitHub pending review
146
+ **Pending Review ID**: 12345678
147
+ **Comments Posted**: 6 of 8 (2 skipped per critique)
148
+ ```
149
+
150
+ ### Step 5: Multi-PR Pending Reviews
151
+
152
+ When reviewing PRs across multiple repositories:
153
+
154
+ **Detection:**
155
+ Multi-PR mode applies when:
156
+ - Multiple artifact directories exist (`.paw/reviews/PR-<number>-<repo-slug>/`)
157
+ - ReviewComments.md files exist in multiple PR directories
158
+ - ReviewContext.md contains `related_prs` entries
159
+
160
+ **Per-PR Processing:**
161
+
162
+ 1. **Iterate PRs**: For each PR in the review set:
163
+ - Read ReviewComments.md from that PR's artifact directory
164
+ - Filter to postable comments for that PR
165
+ - Create separate pending review on that PR
166
+ - Update that PR's ReviewComments.md with posted status
167
+
168
+ 2. **Cross-Reference in Comments**: When posting cross-repo comments:
169
+ - Include cross-reference notation from the comment
170
+ - Example: `(See also: owner/other-repo#456 for related change)`
171
+
172
+ **GitHub Tool Calls for Multiple PRs:**
173
+ ```
174
+ # PR 1: repo-a
175
+ mcp_github_pull_request_review_write(owner, "repo-a", 123, method="create")
176
+ mcp_github_add_comment_to_pending_review(...) # postable comments for PR-123
177
+
178
+ # PR 2: repo-b
179
+ mcp_github_pull_request_review_write(owner, "repo-b", 456, method="create")
180
+ mcp_github_add_comment_to_pending_review(...) # postable comments for PR-456
181
+ ```
182
+
183
+ **Error Handling:**
184
+ If pending review creation fails for one PR:
185
+ - Document the failure in that PR's ReviewComments.md
186
+ - Continue with other PRs
187
+ - Provide manual posting instructions for failed PR
188
+ - Report partial success in completion response
189
+
190
+ ### Step 6: Non-GitHub Context
191
+
192
+ For non-GitHub workflows (local branch review):
193
+
194
+ **Skip GitHub Posting:**
195
+ - Do not attempt to call GitHub MCP tools
196
+ - Update ReviewComments.md status to `finalized (non-GitHub)`
197
+
198
+ **Provide Manual Posting Instructions:**
199
+
200
+ Append to ReviewComments.md:
201
+ ```markdown
202
+ ---
203
+
204
+ ## Manual Posting Instructions
205
+
206
+ This review was conducted on a non-GitHub context. To post comments manually:
207
+
208
+ ### Comments Ready for Posting (X total)
209
+
210
+ 1. **File: auth.ts, Lines 45-50**
211
+ > Missing null check before accessing user.profile could cause runtime error.
212
+
213
+ Suggestion:
214
+ ```typescript
215
+ if (user?.profile) {
216
+ return user.profile.name;
217
+ }
218
+ return 'Anonymous';
219
+ ```
220
+
221
+ 2. **File: db.ts, Lines 120-125**
222
+ > [Comment text...]
223
+
224
+ ### Skipped Comments (Y total)
225
+ These comments were evaluated as low-value by the critique process and are not recommended for posting:
226
+ - File: api.ts L88 - Skipped: stylistic preference
227
+ ```
228
+
229
+ ## Guardrails
230
+
231
+ **Post Only Finalized Comments:**
232
+ - NEVER post comments without `**Final**: ✓ Ready for GitHub posting`
233
+ - Comments marked Skip must NOT be posted
234
+ - Respect critique recommendations
235
+
236
+ **Pending Review Only:**
237
+ - NEVER submit the pending review automatically
238
+ - Use `method: "create"` without event parameter
239
+ - Human reviewer must explicitly submit
240
+
241
+ **No Rationale in Posted Comments:**
242
+ - Posted comments contain only description and suggestion
243
+ - Rationale, assessment, and internal markers stay in ReviewComments.md
244
+ - PAW artifacts never referenced in posted comments
245
+
246
+ **Preserve History:**
247
+ - Do not modify original comment text when adding Posted status
248
+ - Keep all history: original → assessment → updated → posted
249
+ - Skipped comments remain in artifact for documentation
250
+
251
+ **Human Control:**
252
+ - Pending review is a draft—reviewer can edit/delete before submitting
253
+ - Reviewer can manually add skipped comments if they disagree with critique
254
+ - Final submission decision rests with human reviewer
255
+
256
+ ## Validation Checklist
257
+
258
+ Before completing, verify:
259
+
260
+ - [ ] ReviewComments.md was finalized (had `**Final**:` markers on all comments)
261
+ - [ ] Only comments marked "Ready for GitHub posting" were posted
262
+ - [ ] Skipped comments NOT posted to GitHub
263
+ - [ ] Pending review created (not submitted)
264
+ - [ ] All posted comments have `**Posted**:` status in ReviewComments.md
265
+ - [ ] ReviewComments.md header updated with Pending Review ID and counts
266
+ - [ ] Posted comment bodies contain only description + suggestion (no rationale)
267
+ - [ ] Multi-PR: Each PR has its own pending review
268
+ - [ ] Non-GitHub: Manual posting instructions provided
269
+
270
+ ## Completion Response
271
+
272
+ **GitHub PRs (Success):**
273
+ ```
274
+ Activity complete.
275
+ Artifact updated: .paw/reviews/<identifier>/ReviewComments.md
276
+
277
+ GitHub Posting Summary:
278
+ - Pending Review Created: Review ID 12345678
279
+ - Comments Posted: 6 of 8 (2 skipped per critique)
280
+ - Status: Pending review awaiting human submission
281
+
282
+ Posted comments:
283
+ | Comment | GitHub ID |
284
+ |---------|-----------|
285
+ | auth.ts L45-50 | comment-abc |
286
+ | db.ts L120-125 | comment-def |
287
+ | ... | ... |
288
+
289
+ Skipped (not posted):
290
+ - api.ts L88 - stylistic preference
291
+ - utils.ts L200 - already addressed
292
+
293
+ NOTE: The pending review is ready for your review in GitHub.
294
+ Edit or delete any comments, then submit when satisfied.
295
+ ```
296
+
297
+ **Multi-PR (Success):**
298
+ ```
299
+ Activity complete.
300
+
301
+ GitHub Posting Summary:
302
+ - PR repo-a#123: Pending review created (Review ID: 111), 4 comments posted
303
+ - PR repo-b#456: Pending review created (Review ID: 222), 3 comments posted
304
+ - Total: 7 comments posted, 2 skipped
305
+
306
+ Artifacts updated:
307
+ - .paw/reviews/PR-123-repo-a/ReviewComments.md
308
+ - .paw/reviews/PR-456-repo-b/ReviewComments.md
309
+
310
+ NOTE: Review pending reviews in GitHub for each PR before submitting.
311
+ ```
312
+
313
+ **Non-GitHub:**
314
+ ```
315
+ Activity complete.
316
+ Artifact updated: .paw/reviews/<identifier>/ReviewComments.md
317
+
318
+ Non-GitHub Context - Manual Posting Required:
319
+ - Comments ready for posting: 6
320
+ - Comments skipped per critique: 2
321
+ - Manual posting instructions added to ReviewComments.md
322
+
323
+ Review the Manual Posting Instructions section to post comments to your review platform.
324
+ ```
325
+
326
+ **Partial Failure:**
327
+ ```
328
+ Activity complete with errors.
329
+
330
+ GitHub Posting Summary:
331
+ - PR repo-a#123: ✓ Success (Review ID: 111, 4 comments)
332
+ - PR repo-b#456: ✗ Failed - permission denied
333
+
334
+ Partial success: 1 of 2 PRs posted.
335
+ Manual posting instructions added for failed PR.
336
+ ```