awesome-slash 2.4.2

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 (95) hide show
  1. package/.claude-plugin/marketplace.json +54 -0
  2. package/.claude-plugin/plugin.json +11 -0
  3. package/.mcp.json +8 -0
  4. package/CHANGELOG.md +261 -0
  5. package/LICENSE +21 -0
  6. package/README.md +363 -0
  7. package/SECURITY.md +101 -0
  8. package/adapters/README.md +256 -0
  9. package/adapters/codex/README.md +272 -0
  10. package/adapters/codex/install.sh +179 -0
  11. package/adapters/opencode/README.md +301 -0
  12. package/adapters/opencode/install.sh +223 -0
  13. package/lib/patterns/review-patterns.js +511 -0
  14. package/lib/patterns/slop-patterns.js +647 -0
  15. package/lib/platform/detect-platform.js +535 -0
  16. package/lib/platform/verify-tools.js +235 -0
  17. package/lib/state/workflow-state.js +635 -0
  18. package/lib/state/workflow-state.schema.json +282 -0
  19. package/lib/utils/context-optimizer.js +227 -0
  20. package/mcp-server/index.js +303 -0
  21. package/mcp-server/package.json +23 -0
  22. package/package.json +63 -0
  23. package/plugins/deslop-around/.claude-plugin/plugin.json +20 -0
  24. package/plugins/deslop-around/commands/deslop-around.md +220 -0
  25. package/plugins/deslop-around/lib/patterns/review-patterns.js +511 -0
  26. package/plugins/deslop-around/lib/patterns/slop-patterns.js +641 -0
  27. package/plugins/deslop-around/lib/platform/detect-platform.js +514 -0
  28. package/plugins/deslop-around/lib/platform/verify-tools.js +235 -0
  29. package/plugins/deslop-around/lib/state/workflow-state.js +635 -0
  30. package/plugins/deslop-around/lib/state/workflow-state.schema.json +282 -0
  31. package/plugins/deslop-around/lib/utils/context-optimizer.js +222 -0
  32. package/plugins/next-task/.claude-plugin/plugin.json +24 -0
  33. package/plugins/next-task/agents/ci-fixer.md +236 -0
  34. package/plugins/next-task/agents/ci-monitor.md +291 -0
  35. package/plugins/next-task/agents/delivery-validator.md +451 -0
  36. package/plugins/next-task/agents/deslop-work.md +272 -0
  37. package/plugins/next-task/agents/docs-updater.md +506 -0
  38. package/plugins/next-task/agents/exploration-agent.md +277 -0
  39. package/plugins/next-task/agents/implementation-agent.md +427 -0
  40. package/plugins/next-task/agents/planning-agent.md +236 -0
  41. package/plugins/next-task/agents/policy-selector.md +248 -0
  42. package/plugins/next-task/agents/review-orchestrator.md +521 -0
  43. package/plugins/next-task/agents/simple-fixer.md +136 -0
  44. package/plugins/next-task/agents/task-discoverer.md +357 -0
  45. package/plugins/next-task/agents/test-coverage-checker.md +447 -0
  46. package/plugins/next-task/agents/worktree-manager.md +419 -0
  47. package/plugins/next-task/commands/delivery-approval.md +331 -0
  48. package/plugins/next-task/commands/next-task.md +627 -0
  49. package/plugins/next-task/commands/update-docs-around.md +418 -0
  50. package/plugins/next-task/hooks/hooks.json +14 -0
  51. package/plugins/next-task/lib/patterns/review-patterns.js +511 -0
  52. package/plugins/next-task/lib/patterns/slop-patterns.js +641 -0
  53. package/plugins/next-task/lib/platform/detect-platform.js +514 -0
  54. package/plugins/next-task/lib/platform/verify-tools.js +235 -0
  55. package/plugins/next-task/lib/state/tasks-registry.schema.json +85 -0
  56. package/plugins/next-task/lib/state/workflow-state.js +635 -0
  57. package/plugins/next-task/lib/state/workflow-state.schema.json +282 -0
  58. package/plugins/next-task/lib/state/worktree-status.schema.json +219 -0
  59. package/plugins/next-task/lib/utils/context-optimizer.js +222 -0
  60. package/plugins/project-review/.claude-plugin/plugin.json +20 -0
  61. package/plugins/project-review/commands/project-review-agents.md +286 -0
  62. package/plugins/project-review/commands/project-review-github.md +142 -0
  63. package/plugins/project-review/commands/project-review.md +273 -0
  64. package/plugins/project-review/lib/patterns/review-patterns.js +511 -0
  65. package/plugins/project-review/lib/patterns/slop-patterns.js +641 -0
  66. package/plugins/project-review/lib/platform/detect-platform.js +514 -0
  67. package/plugins/project-review/lib/platform/verify-tools.js +235 -0
  68. package/plugins/project-review/lib/state/workflow-state.js +635 -0
  69. package/plugins/project-review/lib/state/workflow-state.schema.json +282 -0
  70. package/plugins/project-review/lib/utils/context-optimizer.js +222 -0
  71. package/plugins/reality-check/.claude-plugin/plugin.json +23 -0
  72. package/plugins/reality-check/README.md +156 -0
  73. package/plugins/reality-check/agents/code-explorer.md +353 -0
  74. package/plugins/reality-check/agents/doc-analyzer.md +337 -0
  75. package/plugins/reality-check/agents/issue-scanner.md +231 -0
  76. package/plugins/reality-check/agents/plan-synthesizer.md +479 -0
  77. package/plugins/reality-check/commands/scan.md +242 -0
  78. package/plugins/reality-check/commands/set.md +203 -0
  79. package/plugins/reality-check/lib/state/reality-check-state.js +509 -0
  80. package/plugins/reality-check/skills/reality-analysis/SKILL.md +317 -0
  81. package/plugins/ship/.claude-plugin/plugin.json +21 -0
  82. package/plugins/ship/commands/ship-ci-review-loop.md +443 -0
  83. package/plugins/ship/commands/ship-deployment.md +330 -0
  84. package/plugins/ship/commands/ship-error-handling.md +254 -0
  85. package/plugins/ship/commands/ship.md +370 -0
  86. package/plugins/ship/lib/patterns/review-patterns.js +511 -0
  87. package/plugins/ship/lib/patterns/slop-patterns.js +641 -0
  88. package/plugins/ship/lib/platform/detect-platform.js +514 -0
  89. package/plugins/ship/lib/platform/verify-tools.js +235 -0
  90. package/plugins/ship/lib/state/workflow-state.js +635 -0
  91. package/plugins/ship/lib/state/workflow-state.schema.json +282 -0
  92. package/plugins/ship/lib/utils/context-optimizer.js +222 -0
  93. package/scripts/install/claude.sh +50 -0
  94. package/scripts/install/codex.sh +181 -0
  95. package/scripts/install/opencode.sh +211 -0
@@ -0,0 +1,370 @@
1
+ ---
2
+ description: Complete PR workflow from commit to production with validation
3
+ argument-hint: "[--strategy STRATEGY] [--skip-tests] [--dry-run] [--state-file PATH]"
4
+ allowed-tools: Bash(git:*), Bash(gh:*), Bash(npm:*), Bash(node:*), Read, Write, Edit, Glob, Grep, Task
5
+ ---
6
+
7
+ # /ship - Complete PR Workflow
8
+
9
+ End-to-end workflow: commit → PR → CI → review → merge → deploy → validate → production.
10
+
11
+ Auto-adapts to your project's CI platform, deployment platform, and branch strategy.
12
+
13
+ ## Quick Reference
14
+
15
+ | Phase | Description | Details |
16
+ |-------|-------------|---------|
17
+ | 1-3 | Pre-flight, Commit, Create PR | This file |
18
+ | 4 | CI & Review Monitor Loop | See `ship-ci-review-loop.md` |
19
+ | 5 | Subagent Review (standalone) | This file |
20
+ | 6 | Merge PR | This file |
21
+ | 7-10 | Deploy & Validate | See `ship-deployment.md` |
22
+ | 11-12 | Cleanup & Report | This file |
23
+ | Errors | Error handling & rollback | See `ship-error-handling.md` |
24
+
25
+ ## Integration with /next-task
26
+
27
+ When called from `/next-task` workflow (via `--state-file`):
28
+ - **SKIPS Phase 5** internal review agents (already done by review-orchestrator)
29
+ - **SKIPS deslop/docs** (already done by deslop-work, docs-updater)
30
+ - **Trusts** that all quality gates passed
31
+
32
+ **CRITICAL: Phase 4 ALWAYS runs** - even from /next-task. External auto-reviewers (Gemini, Copilot, CodeRabbit) comment AFTER PR creation and must be addressed.
33
+
34
+ When called standalone, runs full workflow including review.
35
+
36
+ ## Arguments
37
+
38
+ Parse from $ARGUMENTS:
39
+ - **--strategy**: Merge strategy: `squash` (default) | `merge` | `rebase`
40
+ - **--skip-tests**: Skip test validation (dangerous)
41
+ - **--dry-run**: Show what would happen without executing
42
+ - **--state-file**: Path to workflow state file (for /next-task integration)
43
+
44
+ ## State Integration
45
+
46
+ ```javascript
47
+ const args = '$ARGUMENTS'.split(' ');
48
+ const stateIdx = args.indexOf('--state-file');
49
+ const workflowState = stateIdx >= 0 ? require('${CLAUDE_PLUGIN_ROOT}/lib/state/workflow-state.js') : null;
50
+
51
+ function updatePhase(phase, result) {
52
+ if (!workflowState) return;
53
+ workflowState.startPhase(phase);
54
+ if (result) workflowState.completePhase(result);
55
+ }
56
+ ```
57
+
58
+ ## Phase 1: Pre-flight Checks
59
+
60
+ ```bash
61
+ # Detect platform and project configuration
62
+ PLATFORM=$(node ${CLAUDE_PLUGIN_ROOT}/lib/platform/detect-platform.js)
63
+ TOOLS=$(node ${CLAUDE_PLUGIN_ROOT}/lib/platform/verify-tools.js)
64
+
65
+ # Extract critical info
66
+ CI_PLATFORM=$(echo $PLATFORM | jq -r '.ci')
67
+ DEPLOYMENT=$(echo $PLATFORM | jq -r '.deployment')
68
+ BRANCH_STRATEGY=$(echo $PLATFORM | jq -r '.branchStrategy')
69
+ MAIN_BRANCH=$(echo $PLATFORM | jq -r '.mainBranch')
70
+
71
+ # Check required tools
72
+ GH_AVAILABLE=$(echo $TOOLS | jq -r '.gh.available')
73
+ if [ "$GH_AVAILABLE" != "true" ]; then
74
+ echo "ERROR: GitHub CLI (gh) required for PR workflow"
75
+ exit 1
76
+ fi
77
+
78
+ # Determine workflow type
79
+ if [ "$BRANCH_STRATEGY" = "multi-branch" ]; then
80
+ WORKFLOW="dev-prod"
81
+ PROD_BRANCH="stable"
82
+ else
83
+ WORKFLOW="single-branch"
84
+ fi
85
+ ```
86
+
87
+ ### Verify Git Status
88
+
89
+ ```bash
90
+ # Check for uncommitted changes
91
+ if [ -n "$(git status --porcelain)" ]; then
92
+ NEEDS_COMMIT="true"
93
+ else
94
+ NEEDS_COMMIT="false"
95
+ fi
96
+
97
+ # Must be on feature branch
98
+ CURRENT_BRANCH=$(git branch --show-current)
99
+ if [ "$CURRENT_BRANCH" = "$MAIN_BRANCH" ]; then
100
+ echo "ERROR: Cannot ship from $MAIN_BRANCH, must be on feature branch"
101
+ exit 1
102
+ fi
103
+ ```
104
+
105
+ ### Dry Run Mode
106
+
107
+ If `--dry-run` provided, show plan and exit:
108
+ ```markdown
109
+ ## Dry Run: What Would Happen
110
+ **Branch**: ${CURRENT_BRANCH} → **Target**: ${MAIN_BRANCH}
111
+ **Workflow**: ${WORKFLOW} | **CI**: ${CI_PLATFORM} | **Deploy**: ${DEPLOYMENT}
112
+ ```
113
+
114
+ ## Phase 2: Commit Current Work
115
+
116
+ Only if `NEEDS_COMMIT=true`:
117
+
118
+ ```bash
119
+ # Stage relevant files (exclude secrets)
120
+ git status --porcelain | awk '{print $2}' | grep -v '\.env' | xargs git add
121
+
122
+ # Generate semantic commit message
123
+ # Format: <type>(<scope>): <subject>
124
+ # Types: feat, fix, docs, refactor, test, chore
125
+
126
+ git commit -m "$(cat <<'EOF'
127
+ ${COMMIT_MESSAGE}
128
+ EOF
129
+ )"
130
+
131
+ COMMIT_SHA=$(git rev-parse HEAD)
132
+ echo "✓ Committed: $COMMIT_SHA"
133
+ ```
134
+
135
+ ## Phase 3: Create Pull Request
136
+
137
+ ```bash
138
+ # Push to remote
139
+ git push -u origin $CURRENT_BRANCH
140
+
141
+ # Create PR
142
+ PR_URL=$(gh pr create \
143
+ --base "$MAIN_BRANCH" \
144
+ --title "$PR_TITLE" \
145
+ --body "$(cat <<'EOF'
146
+ ## Summary
147
+ - Bullet points of changes
148
+
149
+ ## Test Plan
150
+ - How to test
151
+
152
+ ## Related Issues
153
+ Closes #X
154
+ EOF
155
+ )")
156
+
157
+ PR_NUMBER=$(echo $PR_URL | grep -oP '/pull/\K\d+')
158
+ echo "✓ Created PR #$PR_NUMBER: $PR_URL"
159
+ ```
160
+
161
+ ## Phase 4: CI & Review Monitor Loop
162
+
163
+ **This is the most critical phase.** See `ship-ci-review-loop.md` for full details.
164
+
165
+ ### Summary
166
+
167
+ The monitor loop waits for:
168
+ 1. CI to pass
169
+ 2. ALL comments resolved (addressed or replied to)
170
+ 3. No "changes requested" reviews remain
171
+
172
+ ```
173
+ ╔══════════════════════════════════════════════════════════════════════════╗
174
+ ║ EVERY COMMENT MUST BE ADDRESSED ║
175
+ ╠══════════════════════════════════════════════════════════════════════════╣
176
+ ║ • Critical/High issues → Fix immediately ║
177
+ ║ • Medium/Minor issues → Fix (shows quality) ║
178
+ ║ • Questions → Answer with explanation ║
179
+ ║ • False positives → Reply explaining why, then resolve ║
180
+ ║ NEVER ignore a comment. NEVER leave comments unresolved. ║
181
+ ╚══════════════════════════════════════════════════════════════════════════╝
182
+ ```
183
+
184
+ ### Loop Structure
185
+
186
+ ```bash
187
+ MAX_ITERATIONS=10
188
+ INITIAL_WAIT=${SHIP_INITIAL_WAIT:-180} # 3 min for auto-reviews
189
+
190
+ while [ $iteration -lt $MAX_ITERATIONS ]; do
191
+ # 1. Wait for CI
192
+ wait_for_ci || { fix_ci_failures; continue; }
193
+
194
+ # 2. First iteration: wait for auto-reviews
195
+ [ $iteration -eq 1 ] && sleep $INITIAL_WAIT
196
+
197
+ # 3. Check feedback
198
+ FEEDBACK=$(check_pr_feedback $PR_NUMBER)
199
+ UNRESOLVED=$(echo "$FEEDBACK" | jq -r '.unresolvedThreads')
200
+
201
+ [ "$UNRESOLVED" -eq 0 ] && break # Ready to merge!
202
+
203
+ # 4. Address all feedback (see ship-ci-review-loop.md)
204
+ # 5. Commit and push fixes
205
+ # 6. Sleep before next check
206
+ done
207
+ ```
208
+
209
+ ## Phase 5: Review Loop (Standalone Only)
210
+
211
+ **Skip if called from /next-task** (review already done).
212
+
213
+ ```javascript
214
+ if (workflowState) {
215
+ const state = workflowState.readState();
216
+ const reviewPhase = state?.phases?.history?.find(p => p.phase === 'review-loop');
217
+ if (reviewPhase?.result?.approved) {
218
+ SKIP_REVIEW = true; // Skip to Phase 6
219
+ }
220
+ }
221
+ ```
222
+
223
+ When running standalone, launch 3 review agents in parallel:
224
+
225
+ ```javascript
226
+ // 1. Code Reviewer
227
+ Task({ subagent_type: "pr-review-toolkit:code-reviewer", prompt: `Review PR #${PR_NUMBER}...` })
228
+
229
+ // 2. Silent Failure Hunter
230
+ Task({ subagent_type: "pr-review-toolkit:silent-failure-hunter", prompt: `Review PR #${PR_NUMBER}...` })
231
+
232
+ // 3. Test Analyzer
233
+ Task({ subagent_type: "pr-review-toolkit:pr-test-analyzer", prompt: `Review PR #${PR_NUMBER}...` })
234
+ ```
235
+
236
+ Iterate until all critical/high issues resolved (max 3 iterations).
237
+
238
+ ## Phase 6: Merge PR
239
+
240
+ **MANDATORY PRE-MERGE CHECKS** - Do NOT skip these:
241
+
242
+ ```bash
243
+ # 1. Verify mergeable status
244
+ MERGEABLE=$(gh pr view $PR_NUMBER --json mergeable --jq '.mergeable')
245
+ [ "$MERGEABLE" != "MERGEABLE" ] && { echo "✗ PR not mergeable"; exit 1; }
246
+
247
+ # 2. MANDATORY: Verify ALL comments resolved (zero unresolved threads)
248
+ # Use separate gh calls for cleaner extraction (avoids cut parsing issues)
249
+ OWNER=$(gh repo view --json owner --jq '.owner.login')
250
+ REPO=$(gh repo view --json name --jq '.name')
251
+
252
+ # NOTE: Fetches first 100 threads. For PRs with >100 comment threads (rare),
253
+ # implement pagination using pageInfo.hasNextPage and pageInfo.endCursor.
254
+ # This covers 99.9% of PRs - pagination is left as a future enhancement.
255
+ UNRESOLVED=$(gh api graphql -f query='
256
+ query($owner: String!, $repo: String!, $pr: Int!) {
257
+ repository(owner: $owner, name: $repo) {
258
+ pullRequest(number: $pr) {
259
+ reviewThreads(first: 100) {
260
+ nodes { isResolved }
261
+ }
262
+ }
263
+ }
264
+ }
265
+ ' -f owner="$OWNER" -f repo="$REPO" -F pr=$PR_NUMBER \
266
+ --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)] | length')
267
+
268
+ if [ "$UNRESOLVED" -gt 0 ]; then
269
+ echo "✗ CANNOT MERGE: $UNRESOLVED unresolved comment threads"
270
+ echo "Go back to Phase 4 and address ALL comments"
271
+ exit 1
272
+ fi
273
+
274
+ echo "✓ All comments resolved"
275
+
276
+ # 3. Merge with strategy (default: squash)
277
+ STRATEGY=${STRATEGY:-squash}
278
+ gh pr merge $PR_NUMBER --$STRATEGY --delete-branch
279
+
280
+ # Update local
281
+ git checkout $MAIN_BRANCH
282
+ git pull origin $MAIN_BRANCH
283
+ MERGE_SHA=$(git rev-parse HEAD)
284
+ echo "✓ Merged PR #$PR_NUMBER at $MERGE_SHA"
285
+ ```
286
+
287
+ ## Phases 7-10: Deploy & Validate
288
+
289
+ **Skip if `WORKFLOW="single-branch"`**
290
+
291
+ See `ship-deployment.md` for platform-specific details:
292
+ - Phase 7: Deploy to Development (Railway, Vercel, Netlify)
293
+ - Phase 8: Validate Development (health checks, smoke tests)
294
+ - Phase 9: Deploy to Production (merge to prod branch)
295
+ - Phase 10: Validate Production (with auto-rollback on failure)
296
+
297
+ ## Phase 11: Cleanup
298
+
299
+ ```bash
300
+ # Clean up worktrees
301
+ git worktree list --porcelain | grep "worktree" | grep -v "$(git rev-parse --show-toplevel)" | while read -r wt; do
302
+ WORKTREE_PATH=$(echo $wt | awk '{print $2}')
303
+ git worktree remove $WORKTREE_PATH --force 2>/dev/null || true
304
+ done
305
+ ```
306
+
307
+ ### Remove Task from Registry
308
+
309
+ ```javascript
310
+ // Remove completed task from .claude/tasks.json
311
+ if (workflowState) {
312
+ const state = workflowState.readState();
313
+ const mainRepoPath = state?.git?.mainRepoPath || process.cwd();
314
+ const taskId = state?.task?.id;
315
+
316
+ if (taskId) {
317
+ const registryPath = path.join(mainRepoPath, '.claude', 'tasks.json');
318
+ const registry = JSON.parse(fs.readFileSync(registryPath, 'utf8'));
319
+ registry.tasks = registry.tasks.filter(t => t.id !== taskId);
320
+ fs.writeFileSync(registryPath, JSON.stringify(registry, null, 2));
321
+ console.log(`✓ Removed task #${taskId} from registry`);
322
+ }
323
+ }
324
+ ```
325
+
326
+ ### Local Branch Cleanup
327
+
328
+ ```bash
329
+ git checkout $MAIN_BRANCH
330
+ # Feature branch already deleted by --delete-branch
331
+ git branch -D $CURRENT_BRANCH 2>/dev/null || true
332
+ ```
333
+
334
+ ## Phase 12: Completion Report
335
+
336
+ ```markdown
337
+ # Deployment Complete
338
+
339
+ ## Pull Request
340
+ **Number**: #${PR_NUMBER} | **Status**: Merged to ${MAIN_BRANCH}
341
+
342
+ ## Review Results
343
+ - Code Quality: ✓ | Error Handling: ✓ | Test Coverage: ✓ | CI: ✓
344
+
345
+ ## Deployments
346
+ ${WORKFLOW === 'dev-prod' ?
347
+ `Development: ${DEV_URL} ✓ | Production: ${PROD_URL} ✓` :
348
+ `Production: Deployed to ${MAIN_BRANCH}`}
349
+
350
+ ✓ Successfully shipped!
351
+ ```
352
+
353
+ ## Error Handling
354
+
355
+ See `ship-error-handling.md` for detailed error handling:
356
+ - GitHub CLI not available
357
+ - CI failures
358
+ - Merge conflicts
359
+ - Deployment failures
360
+ - Production validation failures with rollback
361
+
362
+ ## Important Notes
363
+
364
+ - Requires GitHub CLI (gh) for PR workflow
365
+ - Auto-adapts to single-branch or multi-branch workflow
366
+ - Platform-specific CI and deployment monitoring
367
+ - Automatic rollback on production failures
368
+ - Respects project conventions (commit style, PR format)
369
+
370
+ Begin Phase 1 now.