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,303 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * MCP Server for awesome-slash-commands
4
+ *
5
+ * Exposes workflow tools to any MCP-compatible AI coding assistant:
6
+ * - Claude Code (native)
7
+ * - OpenCode
8
+ * - Codex CLI
9
+ *
10
+ * Run: node mcp-server/index.js
11
+ */
12
+
13
+ const { Server } = require('@modelcontextprotocol/sdk/server/index.js');
14
+ const { StdioServerTransport } = require('@modelcontextprotocol/sdk/server/stdio.js');
15
+ const {
16
+ CallToolRequestSchema,
17
+ ListToolsRequestSchema,
18
+ } = require('@modelcontextprotocol/sdk/types.js');
19
+
20
+ const path = require('path');
21
+ const workflowState = require('../lib/state/workflow-state.js');
22
+
23
+ // Plugin root for relative paths
24
+ const PLUGIN_ROOT = process.env.PLUGIN_ROOT || path.join(__dirname, '..');
25
+
26
+ // Define available tools
27
+ const TOOLS = [
28
+ {
29
+ name: 'workflow_status',
30
+ description: 'Get the current workflow state, including active task, phase, and resume capability',
31
+ inputSchema: {
32
+ type: 'object',
33
+ properties: {},
34
+ required: []
35
+ }
36
+ },
37
+ {
38
+ name: 'workflow_start',
39
+ description: 'Start a new workflow with specified policy settings',
40
+ inputSchema: {
41
+ type: 'object',
42
+ properties: {
43
+ taskSource: {
44
+ type: 'string',
45
+ enum: ['gh-issues', 'linear', 'tasks-md', 'custom'],
46
+ description: 'Where to look for tasks'
47
+ },
48
+ priorityFilter: {
49
+ type: 'string',
50
+ enum: ['continue', 'bugs', 'security', 'features', 'all'],
51
+ description: 'What type of tasks to prioritize'
52
+ },
53
+ stoppingPoint: {
54
+ type: 'string',
55
+ enum: ['implemented', 'pr-created', 'all-green', 'merged', 'deployed', 'production'],
56
+ description: 'How far to take the task'
57
+ }
58
+ },
59
+ required: []
60
+ }
61
+ },
62
+ {
63
+ name: 'workflow_resume',
64
+ description: 'Resume an interrupted workflow from its last checkpoint',
65
+ inputSchema: {
66
+ type: 'object',
67
+ properties: {},
68
+ required: []
69
+ }
70
+ },
71
+ {
72
+ name: 'workflow_abort',
73
+ description: 'Abort the current workflow and cleanup resources (worktree, branches)',
74
+ inputSchema: {
75
+ type: 'object',
76
+ properties: {},
77
+ required: []
78
+ }
79
+ },
80
+ {
81
+ name: 'task_discover',
82
+ description: 'Discover and prioritize available tasks from configured sources',
83
+ inputSchema: {
84
+ type: 'object',
85
+ properties: {
86
+ source: {
87
+ type: 'string',
88
+ enum: ['gh-issues', 'linear', 'tasks-md'],
89
+ description: 'Task source to search'
90
+ },
91
+ filter: {
92
+ type: 'string',
93
+ description: 'Filter tasks by type (bug, feature, security, etc.)'
94
+ },
95
+ limit: {
96
+ type: 'number',
97
+ description: 'Maximum number of tasks to return'
98
+ }
99
+ },
100
+ required: []
101
+ }
102
+ },
103
+ {
104
+ name: 'review_code',
105
+ description: 'Run multi-agent code review on changed files',
106
+ inputSchema: {
107
+ type: 'object',
108
+ properties: {
109
+ files: {
110
+ type: 'array',
111
+ items: { type: 'string' },
112
+ description: 'Files to review (defaults to git diff)'
113
+ },
114
+ maxIterations: {
115
+ type: 'number',
116
+ description: 'Maximum review iterations (default: 3)'
117
+ }
118
+ },
119
+ required: []
120
+ }
121
+ }
122
+ ];
123
+
124
+ // Tool handlers
125
+ const toolHandlers = {
126
+ async workflow_status() {
127
+ const state = workflowState.readState();
128
+
129
+ if (state instanceof Error) {
130
+ return {
131
+ content: [{ type: 'text', text: `Error: ${state.message}` }],
132
+ isError: true
133
+ };
134
+ }
135
+ if (!state) {
136
+ return { content: [{ type: 'text', text: 'No active workflow.' }] };
137
+ }
138
+
139
+ const summary = workflowState.getWorkflowSummary();
140
+ return {
141
+ content: [{
142
+ type: 'text',
143
+ text: JSON.stringify(summary, null, 2)
144
+ }]
145
+ };
146
+ },
147
+
148
+ async workflow_start({ taskSource, priorityFilter, stoppingPoint }) {
149
+ // Check for existing workflow
150
+ if (workflowState.hasActiveWorkflow()) {
151
+ return {
152
+ content: [{
153
+ type: 'text',
154
+ text: 'Error: Active workflow exists. Use workflow_abort to cancel or workflow_resume to continue.'
155
+ }],
156
+ isError: true
157
+ };
158
+ }
159
+
160
+ const policy = {
161
+ ...workflowState.DEFAULT_POLICY,
162
+ taskSource: taskSource || 'gh-issues',
163
+ priorityFilter: priorityFilter || 'continue',
164
+ stoppingPoint: stoppingPoint || 'merged'
165
+ };
166
+
167
+ const state = workflowState.createState('next-task', policy);
168
+ workflowState.writeState(state);
169
+
170
+ return {
171
+ content: [{
172
+ type: 'text',
173
+ text: `Workflow started: ${state.workflow.id}\nPolicy: ${JSON.stringify(policy, null, 2)}`
174
+ }]
175
+ };
176
+ },
177
+
178
+ async workflow_resume() {
179
+ const state = workflowState.readState();
180
+
181
+ if (state instanceof Error) {
182
+ return {
183
+ content: [{ type: 'text', text: `Error: ${state.message}` }],
184
+ isError: true
185
+ };
186
+ }
187
+ if (!state) {
188
+ return {
189
+ content: [{ type: 'text', text: 'No workflow to resume.' }],
190
+ isError: true
191
+ };
192
+ }
193
+
194
+ if (!state.checkpoints?.canResume) {
195
+ return {
196
+ content: [{ type: 'text', text: 'Workflow cannot be resumed from current state.' }],
197
+ isError: true
198
+ };
199
+ }
200
+
201
+ return {
202
+ content: [{
203
+ type: 'text',
204
+ text: `Resuming workflow ${state.workflow.id} from phase: ${state.checkpoints.resumeFrom}`
205
+ }]
206
+ };
207
+ },
208
+
209
+ async workflow_abort() {
210
+ const state = workflowState.readState();
211
+
212
+ if (state instanceof Error) {
213
+ return {
214
+ content: [{ type: 'text', text: `Error: ${state.message}` }],
215
+ isError: true
216
+ };
217
+ }
218
+ if (!state) {
219
+ return {
220
+ content: [{ type: 'text', text: 'No workflow to abort.' }]
221
+ };
222
+ }
223
+
224
+ workflowState.abortWorkflow('User requested abort');
225
+
226
+ return {
227
+ content: [{
228
+ type: 'text',
229
+ text: `Workflow ${state.workflow.id} aborted. Cleanup: worktree and branches should be removed manually.`
230
+ }]
231
+ };
232
+ },
233
+
234
+ async task_discover({ source, filter, limit }) {
235
+ // This would integrate with gh/linear/etc
236
+ // For now, return placeholder
237
+ return {
238
+ content: [{
239
+ type: 'text',
240
+ text: `Task discovery would search ${source || 'gh-issues'} with filter "${filter || 'all'}" (limit: ${limit || 10})`
241
+ }]
242
+ };
243
+ },
244
+
245
+ async review_code({ files, maxIterations }) {
246
+ return {
247
+ content: [{
248
+ type: 'text',
249
+ text: `Code review would analyze ${files?.length || 'changed'} files with max ${maxIterations || 3} iterations.`
250
+ }]
251
+ };
252
+ }
253
+ };
254
+
255
+ // Create and run server
256
+ async function main() {
257
+ const server = new Server(
258
+ {
259
+ name: 'awesome-slash',
260
+ version: '2.0.0',
261
+ },
262
+ {
263
+ capabilities: {
264
+ tools: {},
265
+ },
266
+ }
267
+ );
268
+
269
+ // List available tools
270
+ server.setRequestHandler(ListToolsRequestSchema, async () => {
271
+ return { tools: TOOLS };
272
+ });
273
+
274
+ // Handle tool calls
275
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
276
+ const { name, arguments: args } = request.params;
277
+
278
+ const handler = toolHandlers[name];
279
+ if (!handler) {
280
+ return {
281
+ content: [{ type: 'text', text: `Unknown tool: ${name}` }],
282
+ isError: true
283
+ };
284
+ }
285
+
286
+ try {
287
+ return await handler(args || {});
288
+ } catch (error) {
289
+ return {
290
+ content: [{ type: 'text', text: `Error: ${error.message}` }],
291
+ isError: true
292
+ };
293
+ }
294
+ });
295
+
296
+ // Connect via stdio
297
+ const transport = new StdioServerTransport();
298
+ await server.connect(transport);
299
+
300
+ console.error('awesome-slash MCP server running');
301
+ }
302
+
303
+ main().catch(console.error);
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "awesome-slash-mcp-server",
3
+ "version": "2.0.0",
4
+ "description": "MCP server for awesome-slash-commands - enables cross-platform AI assistant integration",
5
+ "main": "index.js",
6
+ "bin": {
7
+ "awesome-slash-mcp": "./index.js"
8
+ },
9
+ "scripts": {
10
+ "start": "node index.js"
11
+ },
12
+ "dependencies": {
13
+ "@modelcontextprotocol/sdk": "^1.0.0"
14
+ },
15
+ "keywords": [
16
+ "mcp",
17
+ "claude",
18
+ "opencode",
19
+ "codex",
20
+ "ai-coding"
21
+ ],
22
+ "license": "MIT"
23
+ }
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "awesome-slash",
3
+ "version": "2.4.2",
4
+ "description": "Professional-grade slash commands for Claude Code that work across any project",
5
+ "main": "lib/platform/detect-platform.js",
6
+ "type": "commonjs",
7
+ "files": [
8
+ ".claude-plugin/",
9
+ ".mcp.json",
10
+ "lib/",
11
+ "mcp-server/index.js",
12
+ "mcp-server/package.json",
13
+ "plugins/",
14
+ "scripts/install/",
15
+ "adapters/",
16
+ "README.md",
17
+ "LICENSE",
18
+ "CHANGELOG.md",
19
+ "SECURITY.md"
20
+ ],
21
+ "scripts": {
22
+ "test": "jest",
23
+ "test:watch": "jest --watch",
24
+ "test:coverage": "jest --coverage",
25
+ "detect": "node lib/platform/detect-platform.js",
26
+ "verify": "node lib/platform/verify-tools.js"
27
+ },
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "git+https://github.com/avifenesh/awesome-slash.git"
31
+ },
32
+ "keywords": [
33
+ "claude",
34
+ "claude-code",
35
+ "claude-plugin",
36
+ "anthropic",
37
+ "slash-commands",
38
+ "ai-coding",
39
+ "workflow-automation",
40
+ "ci-cd",
41
+ "deployment",
42
+ "code-review",
43
+ "mcp",
44
+ "developer-tools",
45
+ "opencode",
46
+ "codex-cli"
47
+ ],
48
+ "author": {
49
+ "name": "Avi Fenesh",
50
+ "url": "https://github.com/avifenesh"
51
+ },
52
+ "license": "MIT",
53
+ "bugs": {
54
+ "url": "https://github.com/avifenesh/awesome-slash/issues"
55
+ },
56
+ "homepage": "https://github.com/avifenesh/awesome-slash#readme",
57
+ "engines": {
58
+ "node": ">=18.0.0"
59
+ },
60
+ "devDependencies": {
61
+ "jest": "^29.7.0"
62
+ }
63
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "deslop-around",
3
+ "version": "2.3.1",
4
+ "description": "AI slop cleanup with minimal diffs and behavior preservation",
5
+ "author": {
6
+ "name": "Avi Fenesh",
7
+ "email": "[email protected]",
8
+ "url": "https://github.com/avifenesh"
9
+ },
10
+ "homepage": "https://github.com/avifenesh/awesome-slash#deslop-around",
11
+ "repository": "https://github.com/avifenesh/awesome-slash",
12
+ "license": "MIT",
13
+ "keywords": [
14
+ "code-quality",
15
+ "cleanup",
16
+ "refactoring",
17
+ "maintenance",
18
+ "slop-detection"
19
+ ]
20
+ }
@@ -0,0 +1,220 @@
1
+ ---
2
+ description: Cleanup AI slop with minimal diffs and behavior preservation
3
+ argument-hint: "[report|apply] [scope-path] [max-changes]"
4
+ ---
5
+
6
+ # /deslop-around - AI Slop Cleanup
7
+
8
+ You are a senior maintainer doing periodic repo hygiene. Your mission: remove "AI slop" while preserving behavior and minimizing diffs.
9
+
10
+ ## Arguments
11
+
12
+ - **Mode**: `report` (default) or `apply`
13
+ - **Scope**: Path or glob pattern (default: `.`)
14
+ - **Max changes**: Number of changesets (default: 5)
15
+
16
+ Parse from $ARGUMENTS or use defaults.
17
+
18
+ ## Pre-Context: Platform Detection
19
+
20
+ ```bash
21
+ # Detect project type and test command
22
+ if [ -f "package.json" ]; then
23
+ PROJECT_TYPE="nodejs"
24
+ if command -v npm &> /dev/null; then
25
+ TEST_CMD="npm test"
26
+ elif command -v pnpm &> /dev/null; then
27
+ TEST_CMD="pnpm test"
28
+ elif command -v yarn &> /dev/null; then
29
+ TEST_CMD="yarn test"
30
+ fi
31
+ elif [ -f "requirements.txt" ] || [ -f "pyproject.toml" ]; then
32
+ PROJECT_TYPE="python"
33
+ TEST_CMD="pytest"
34
+ elif [ -f "Cargo.toml" ]; then
35
+ PROJECT_TYPE="rust"
36
+ TEST_CMD="cargo test"
37
+ elif [ -f "go.mod" ]; then
38
+ PROJECT_TYPE="go"
39
+ TEST_CMD="go test ./..."
40
+ else
41
+ PROJECT_TYPE="unknown"
42
+ TEST_CMD=""
43
+ fi
44
+ ```
45
+
46
+ ## Non-Negotiable Constraints
47
+
48
+ 1. Preserve behavior and public APIs
49
+ 2. Minimal diffs - don't reformat unrelated code
50
+ 3. Prefer deletion over invention
51
+ 4. Do NOT add dependencies or new abstractions
52
+ 5. Respect repo conventions (check CLAUDE.md if present)
53
+
54
+ ## Ignore Zones
55
+
56
+ - Build artifacts: `dist/`, `build/`, `target/`, `out/`, `.next/`, coverage/
57
+ - Vendored/generated: `vendor/`, `third_party/`, `node_modules/`, `**/*.min.*`, `**/*.gen.*`
58
+ - Lockfiles (unless explicitly in scope)
59
+
60
+ ## Pre-Context Commands
61
+
62
+ Run these and analyze output:
63
+
64
+ ```bash
65
+ git rev-parse --show-toplevel # Repo root
66
+ git branch --show-current # Current branch
67
+ git status --porcelain=v1 # Dirty status
68
+ git log --oneline -15 # Recent commits
69
+ git ls-files | wc -l # File count
70
+ ```
71
+
72
+ ## AI Slop Definitions
73
+
74
+ Detect and remove:
75
+
76
+ - **Console Debugging**: `console.log()`, `print()`, `println!()`, `dbg!()`
77
+ - **Old TODOs**: Comments >90 days old (check line age)
78
+ - **Commented Code**: >5 consecutive commented lines
79
+ - **Placeholder Text**: "lorem ipsum", "test test", "TODO: implement"
80
+ - **Empty Catch**: Empty catch/except blocks without logging
81
+ - **Magic Numbers**: Large hardcoded numbers (>1000)
82
+ - **Disabled Linters**: eslint-disable, pylint: disable, #noqa
83
+ - **Trailing Whitespace**: Whitespace at end of lines
84
+ - **Mixed Indentation**: Tabs and spaces mixed
85
+ - **Unused Imports**: Imports marked as unused
86
+ - **Hardcoded URLs**: URLs that should be config
87
+ - **Debug Imports**: `import pdb`, `import ipdb`
88
+
89
+ Reference patterns from `${CLAUDE_PLUGIN_ROOT}/lib/patterns/slop-patterns.js`
90
+
91
+ ## Phase A: Map + Diagnose (Always)
92
+
93
+ 1. Scan files in scope using slop patterns
94
+ 2. Identify top 10 "Slop Hotspots":
95
+ - File path
96
+ - What's wrong (specific line numbers)
97
+ - Risk level (low/medium/high)
98
+ - Proposed fix type (remove/replace/flag)
99
+ 3. Sort by smallest-first (lowest risk, highest confidence)
100
+
101
+ ## Phase B: Report Mode (Default)
102
+
103
+ Output:
104
+ - Prioritized cleanup plan (3-7 steps)
105
+ - For each step:
106
+ - Files affected
107
+ - Expected diff size
108
+ - Estimated risk
109
+ - Verification command
110
+ - "Do Next" checklist
111
+
112
+ **Do NOT modify files in report mode.**
113
+
114
+ ## Phase C: Apply Mode
115
+
116
+ Implement up to MAX_CHANGES changesets:
117
+
118
+ ### Rules for Apply
119
+
120
+ 1. One changeset at a time
121
+ 2. Show diff summary after each
122
+ 3. Explain verification
123
+ 4. Don't mix unrelated changes
124
+ 5. Verify with tests/typecheck/lint if available
125
+ 6. Stop early if detecting brittle code
126
+
127
+ ### Per Changeset Deliverables
128
+
129
+ 1. What changed (1-3 bullets)
130
+ 2. Why it's slop + why new shape is better
131
+ 3. Verification commands + results
132
+ 4. Concise diff (`git diff --stat` + key hunks)
133
+
134
+ ### Verification Strategy
135
+
136
+ ```bash
137
+ # Run test command if available
138
+ if command -v $TEST_CMD >/dev/null 2>&1; then
139
+ $TEST_CMD
140
+ fi
141
+
142
+ # Run type check if available
143
+ if [ "$PROJECT_TYPE" = "nodejs" ] && [ -f tsconfig.json ]; then
144
+ ${PACKAGE_MGR} run check-types || tsc --noEmit
145
+ fi
146
+
147
+ # Run linter if available
148
+ if [ -f .eslintrc.js ] || [ -f .eslintrc.json ]; then
149
+ ${PACKAGE_MGR} run lint || eslint .
150
+ fi
151
+ ```
152
+
153
+ ### Rollback on Failure
154
+
155
+ If verification fails:
156
+ ```bash
157
+ git restore .
158
+ ```
159
+
160
+ Report which changes failed verification and recommend manual review.
161
+
162
+ ## Final Rollup Summary
163
+
164
+ After all changesets (apply mode only):
165
+
166
+ ```markdown
167
+ ## Cleanup Summary
168
+
169
+ **Files Changed**: X
170
+ **Lines Deleted**: Y
171
+ **Lines Added**: Z
172
+ **Net Change**: Y - Z
173
+
174
+ ### Verification Results
175
+ - Tests: ✓ Passed / ✗ Failed
176
+ - Type Check: ✓ Passed / ✗ Failed
177
+ - Lint: ✓ Passed / ✗ Failed
178
+
179
+ ### Remaining Hotspots
180
+ 1. File: path/to/file.js - Issue description (needs manual review)
181
+ 2. ...
182
+ ```
183
+
184
+ ## Output Style
185
+
186
+ Be direct, skeptical, and pragmatic. No fluff. Concrete references only (paths, line numbers, commands).
187
+
188
+ ## Example Usage
189
+
190
+ ```bash
191
+ /deslop-around
192
+ # Report mode: analyze and generate cleanup plan
193
+
194
+ /deslop-around apply
195
+ # Apply mode: fix up to 5 changesets with verification
196
+
197
+ /deslop-around apply src/ 10
198
+ # Apply mode: fix up to 10 changesets in src/ directory
199
+
200
+ /deslop-around report tests/
201
+ # Report mode: analyze only tests/ directory
202
+ ```
203
+
204
+ ## Error Handling
205
+
206
+ - If git not available: Fail with "Git required"
207
+ - If not in git repo: Fail with "Must run in git repository"
208
+ - If scope path doesn't exist: Fail with "Invalid scope path"
209
+ - If verification fails in apply mode: Rollback and report
210
+
211
+ ## Important Notes
212
+
213
+ - Use slop patterns from library (don't hardcode)
214
+ - Adapt verification to detected project type
215
+ - Respect test command from platform detection
216
+ - Always preserve behavior
217
+ - Minimal diffs only
218
+ - No speculation - only fix confirmed slop
219
+
220
+ Begin Phase A now.