awesome-slash 2.5.0 → 2.5.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 (44) hide show
  1. package/.claude-plugin/marketplace.json +6 -6
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +35 -0
  4. package/README.md +23 -8
  5. package/lib/platform/state-dir.js +122 -0
  6. package/lib/sources/source-cache.js +26 -11
  7. package/lib/state/workflow-state.js +18 -13
  8. package/mcp-server/index.js +7 -11
  9. package/package.json +1 -1
  10. package/plugins/deslop-around/.claude-plugin/plugin.json +1 -1
  11. package/plugins/deslop-around/lib/patterns/slop-patterns.js +2 -3
  12. package/plugins/deslop-around/lib/platform/detect-platform.js +44 -287
  13. package/plugins/deslop-around/lib/platform/state-dir.js +122 -0
  14. package/plugins/deslop-around/lib/platform/verify-tools.js +11 -88
  15. package/plugins/deslop-around/lib/schemas/validator.js +44 -2
  16. package/plugins/deslop-around/lib/sources/source-cache.js +26 -11
  17. package/plugins/deslop-around/lib/state/workflow-state.js +18 -13
  18. package/plugins/next-task/.claude-plugin/plugin.json +1 -1
  19. package/plugins/next-task/lib/patterns/slop-patterns.js +2 -3
  20. package/plugins/next-task/lib/platform/detect-platform.js +44 -287
  21. package/plugins/next-task/lib/platform/state-dir.js +122 -0
  22. package/plugins/next-task/lib/platform/verify-tools.js +11 -88
  23. package/plugins/next-task/lib/schemas/validator.js +44 -2
  24. package/plugins/next-task/lib/sources/source-cache.js +26 -11
  25. package/plugins/next-task/lib/state/workflow-state.js +18 -13
  26. package/plugins/project-review/.claude-plugin/plugin.json +1 -1
  27. package/plugins/project-review/lib/patterns/slop-patterns.js +2 -3
  28. package/plugins/project-review/lib/platform/detect-platform.js +44 -287
  29. package/plugins/project-review/lib/platform/state-dir.js +122 -0
  30. package/plugins/project-review/lib/platform/verify-tools.js +11 -88
  31. package/plugins/project-review/lib/schemas/validator.js +44 -2
  32. package/plugins/project-review/lib/sources/source-cache.js +26 -11
  33. package/plugins/project-review/lib/state/workflow-state.js +18 -13
  34. package/plugins/reality-check/.claude-plugin/plugin.json +1 -1
  35. package/plugins/ship/.claude-plugin/plugin.json +1 -1
  36. package/plugins/ship/lib/patterns/slop-patterns.js +2 -3
  37. package/plugins/ship/lib/platform/detect-platform.js +44 -287
  38. package/plugins/ship/lib/platform/state-dir.js +122 -0
  39. package/plugins/ship/lib/platform/verify-tools.js +11 -88
  40. package/plugins/ship/lib/schemas/validator.js +44 -2
  41. package/plugins/ship/lib/sources/source-cache.js +26 -11
  42. package/plugins/ship/lib/state/workflow-state.js +18 -13
  43. package/scripts/install/codex.sh +216 -72
  44. package/scripts/install/opencode.sh +197 -21
@@ -4,8 +4,18 @@
4
4
 
5
5
  set -e
6
6
 
7
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
- PLUGIN_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
7
+ # Detect plugin root - works whether run directly or via bash -c
8
+ if [ -n "${BASH_SOURCE[0]}" ] && [ -f "${BASH_SOURCE[0]}" ]; then
9
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10
+ PLUGIN_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
11
+ elif [ -f "scripts/install/codex.sh" ]; then
12
+ PLUGIN_ROOT="$(pwd)"
13
+ elif [ -f "package.json" ] && grep -q "awesome-slash" package.json 2>/dev/null; then
14
+ PLUGIN_ROOT="$(pwd)"
15
+ else
16
+ echo "Error: Cannot detect plugin root. Run from the awesome-slash directory."
17
+ exit 1
18
+ fi
9
19
 
10
20
  echo "Installing awesome-slash for Codex CLI..."
11
21
  echo "Plugin root: $PLUGIN_ROOT"
@@ -22,22 +32,56 @@ echo "Installing MCP server dependencies..."
22
32
  cd "$PLUGIN_ROOT/mcp-server"
23
33
  npm install --production
24
34
 
25
- # Add MCP server using codex mcp add command
35
+ # Configure MCP server in config.toml
26
36
  echo "Configuring MCP server..."
27
37
 
28
- # Remove existing awesome-slash MCP server if present
29
- codex mcp remove awesome-slash 2>/dev/null || true
38
+ CODEX_HOME="${CODEX_HOME:-$HOME/.codex}"
39
+ CONFIG_FILE="$CODEX_HOME/config.toml"
40
+
41
+ # Ensure config directory exists
42
+ mkdir -p "$CODEX_HOME"
43
+
44
+ # Create config file if it doesn't exist
45
+ if [ ! -f "$CONFIG_FILE" ]; then
46
+ touch "$CONFIG_FILE"
47
+ fi
48
+
49
+ # Backup existing config
50
+ cp "$CONFIG_FILE" "$CONFIG_FILE.backup"
30
51
 
31
- # Add the MCP server with environment variable
32
- codex mcp add awesome-slash \
33
- --env "PLUGIN_ROOT=$PLUGIN_ROOT" \
34
- -- node "$PLUGIN_ROOT/mcp-server/index.js"
52
+ # Remove existing awesome-slash MCP server section if present
53
+ if grep -q "\[mcp_servers.awesome-slash\]" "$CONFIG_FILE" 2>/dev/null; then
54
+ # Use sed to remove the section (from [mcp_servers.awesome-slash] to next section or EOF)
55
+ sed -i '/\[mcp_servers\.awesome-slash\]/,/^\[/{/^\[mcp_servers\.awesome-slash\]/d;/^\[/!d}' "$CONFIG_FILE"
56
+ # Clean up any trailing empty lines
57
+ sed -i '/^$/N;/^\n$/d' "$CONFIG_FILE"
58
+ fi
59
+
60
+ # Convert Git Bash path to Windows path for TOML
61
+ # /c/Users/... -> C:/Users/...
62
+ if [[ "$PLUGIN_ROOT" == /[a-z]/* ]]; then
63
+ DRIVE_LETTER=$(echo "$PLUGIN_ROOT" | cut -c2 | tr '[:lower:]' '[:upper:]')
64
+ PLUGIN_ROOT_WIN="${DRIVE_LETTER}:${PLUGIN_ROOT:2}"
65
+ else
66
+ PLUGIN_ROOT_WIN="$PLUGIN_ROOT"
67
+ fi
68
+ MCP_SERVER_PATH="$PLUGIN_ROOT_WIN/mcp-server/index.js"
69
+
70
+ # Append MCP server configuration
71
+ cat >> "$CONFIG_FILE" << EOF
72
+
73
+ [mcp_servers.awesome-slash]
74
+ command = "node"
75
+ args = ["$MCP_SERVER_PATH"]
76
+ env = { PLUGIN_ROOT = "$PLUGIN_ROOT_WIN", AI_STATE_DIR = ".codex" }
77
+ enabled = true
78
+ EOF
35
79
 
36
- echo "MCP server configured."
80
+ echo "MCP server configured in $CONFIG_FILE"
37
81
 
38
82
  # Create skills directory
39
- CODEX_CONFIG="${CODEX_CONFIG:-$HOME/.codex}"
40
- SKILLS_DIR="$CODEX_CONFIG/skills"
83
+ CODEX_HOME="${CODEX_HOME:-$HOME/.codex}"
84
+ SKILLS_DIR="$CODEX_HOME/skills"
41
85
 
42
86
  echo "Installing Codex skills..."
43
87
 
@@ -46,35 +90,48 @@ mkdir -p "$SKILLS_DIR/next-task"
46
90
  cat > "$SKILLS_DIR/next-task/SKILL.md" << 'EOF'
47
91
  ---
48
92
  name: next-task
49
- description: Master workflow orchestrator for task-to-production automation. Use when users want to find their next task, prioritize work, start a new workflow, or ask "what should I work on". Integrates with GitHub Issues, Linear, and PLAN.md for task discovery.
93
+ description: Master workflow orchestrator for task-to-production automation. Use this skill when users want to find their next task, prioritize work, start a new workflow, resume an interrupted workflow, or ask "what should I work on next". Integrates with GitHub Issues, Linear, and local task files for task discovery.
50
94
  ---
51
95
 
52
96
  # Next Task Workflow
53
97
 
54
98
  Find and implement the next priority task with full workflow automation.
55
99
 
56
- ## Capabilities
100
+ ## CRITICAL: Always Ask User First
101
+
102
+ **DO NOT auto-select options.** You MUST ask the user:
103
+
104
+ 1. First call `workflow_status` MCP tool to check for existing workflow
105
+ 2. If resumable, ASK: "Resume existing workflow or start fresh?"
106
+ 3. For new workflows, ASK user to choose:
107
+ - **Task Source**: GitHub Issues, GitLab, Local files, or Custom?
108
+ - **Priority Filter**: Bugs, Security, Features, or All?
109
+ - **Stopping Point**: PR created, Merged, or Deployed?
110
+
111
+ ## MCP Tools
57
112
 
58
- Use the awesome-slash MCP tools:
59
113
  - `workflow_status` - Check current workflow state
60
- - `workflow_start` - Start a new workflow
114
+ - `workflow_start` - Start workflow (params: taskSource, priorityFilter, stoppingPoint)
61
115
  - `workflow_resume` - Resume from checkpoint
62
116
  - `workflow_abort` - Cancel and cleanup
63
- - `task_discover` - Find and prioritize tasks
117
+ - `task_discover` - Find tasks (params: source, filter, limit)
64
118
 
65
- ## Workflow
119
+ ## Task Sources (ask user)
66
120
 
67
- 1. Check `workflow_status` for existing workflow
68
- 2. If none exists, use `workflow_start` to begin
69
- 3. Use `task_discover` to find priority tasks from configured source
70
- 4. Guide through task selection and implementation
71
- 5. Use `workflow_resume` if interrupted
121
+ - `gh-issues` - GitHub Issues
122
+ - `glab-issues` - GitLab Issues
123
+ - `tasks-md` - Local TASKS.md/PLAN.md/TODO.md
124
+ - `custom` - Custom file path
72
125
 
73
- ## Task Sources
126
+ ## Stopping Points (ask user)
74
127
 
75
- - GitHub Issues (default)
76
- - Linear issues
77
- - PLAN.md file
128
+ - `pr-created` - Stop after PR
129
+ - `merged` - Stop after merge
130
+ - `deployed` - Stop after deployment
131
+
132
+ ## State Directory
133
+
134
+ State stored in `.codex/` (flow.json, tasks.json)
78
135
  EOF
79
136
 
80
137
  # Create ship skill
@@ -82,31 +139,44 @@ mkdir -p "$SKILLS_DIR/ship"
82
139
  cat > "$SKILLS_DIR/ship/SKILL.md" << 'EOF'
83
140
  ---
84
141
  name: ship
85
- description: Complete PR workflow from commit to production with validation. Use when users want to ship code, create a PR, merge changes, or deploy. Handles commit, PR creation, CI monitoring, review, merge, and deployment.
142
+ description: Complete PR workflow from commit to production with validation. Use this skill when users want to ship code, create a pull request, merge changes, deploy to production, or finish their current work. Handles commit creation, PR creation, CI monitoring, code review, merge, and deployment validation.
86
143
  ---
87
144
 
88
145
  # Ship Workflow
89
146
 
90
147
  Complete PR workflow from commit to production.
91
148
 
92
- ## Capabilities
149
+ ## MCP Tools Available
93
150
 
94
- Use the awesome-slash MCP tools:
95
151
  - `workflow_status` - Check current state
96
- - `review_code` - Run multi-agent review
97
-
98
- ## Workflow
99
-
100
- 1. Stage and commit changes with AI-generated message
101
- 2. Create PR with context
102
- 3. Run `review_code` for multi-agent review
103
- 4. Monitor CI status
104
- 5. Merge when approved
105
- 6. Deploy if configured
106
-
107
- ## Platforms
108
-
109
- Supports: GitHub Actions, GitLab CI, CircleCI, Railway, Vercel, Netlify, Fly.io
152
+ - `review_code` - Run multi-agent code review
153
+
154
+ ## Workflow Instructions
155
+
156
+ 1. Check `workflow_status` for current state
157
+ 2. Stage and commit changes with a clear, descriptive message
158
+ 3. Create PR using `gh pr create` with context
159
+ 4. Run `review_code` MCP tool for multi-agent review
160
+ 5. Monitor CI status and fix any failures
161
+ 6. Merge when approved
162
+ 7. Validate deployment if configured
163
+
164
+ ## Supported Platforms
165
+
166
+ **CI Platforms:**
167
+ - GitHub Actions
168
+ - GitLab CI
169
+ - CircleCI
170
+ - Jenkins
171
+ - Travis CI
172
+
173
+ **Deployment Platforms:**
174
+ - Railway
175
+ - Vercel
176
+ - Netlify
177
+ - Fly.io
178
+ - Platform.sh
179
+ - Render
110
180
  EOF
111
181
 
112
182
  # Create review skill
@@ -114,30 +184,43 @@ mkdir -p "$SKILLS_DIR/review"
114
184
  cat > "$SKILLS_DIR/review/SKILL.md" << 'EOF'
115
185
  ---
116
186
  name: review
117
- description: Run multi-agent code review on changes. Use when users want to review code, check code quality, or run code analysis before committing or creating a PR.
187
+ description: Run multi-agent code review on changes. Use this skill when users want to review code, check code quality, run code analysis, find bugs, check for security issues, or validate changes before committing or creating a pull request.
118
188
  ---
119
189
 
120
190
  # Code Review
121
191
 
122
192
  Run multi-agent code review on changes.
123
193
 
124
- ## Capabilities
194
+ ## How To Run
125
195
 
126
- Use the awesome-slash MCP tools:
127
- - `review_code` - Run multi-agent review
196
+ **Step 1: Get files to review**
128
197
 
129
- ## Review Agents
198
+ If user provided files, use those. Otherwise get changed files:
199
+ ```bash
200
+ git diff --name-only HEAD
201
+ ```
130
202
 
131
- - Code quality analysis
132
- - Silent failure detection
133
- - Test coverage analysis
134
- - Security review
203
+ **Step 2: Call review_code MCP tool**
204
+ ```
205
+ review_code({ files: ["src/file1.ts", "src/file2.ts"] })
206
+ ```
135
207
 
136
- ## Usage
208
+ ## Review Checks
137
209
 
138
- Run `review_code` tool with the files to review.
139
- Auto-fixes critical and high severity issues.
140
- Reports medium and low severity for manual review.
210
+ - Console debugging statements (console.log, print, dbg!)
211
+ - TODO/FIXME comments
212
+ - Commented-out code
213
+ - Debugger statements
214
+ - Empty catch blocks
215
+ - TypeScript `any` types
216
+ - Hardcoded secrets
217
+
218
+ ## Default Behavior
219
+
220
+ If no files specified:
221
+ 1. Get changed files via `git diff --name-only HEAD`
222
+ 2. If no changes, ASK user: "Which files should I review?"
223
+ 3. Never review 0 files silently
141
224
  EOF
142
225
 
143
226
  # Create deslop skill
@@ -145,37 +228,98 @@ mkdir -p "$SKILLS_DIR/deslop"
145
228
  cat > "$SKILLS_DIR/deslop/SKILL.md" << 'EOF'
146
229
  ---
147
230
  name: deslop
148
- description: Clean AI slop from codebase - console.log statements, TODO comments, placeholder text, empty catch blocks, and other debugging artifacts. Use when users want to clean up code, remove debugging statements, or prepare code for production.
231
+ description: Clean AI slop from codebase. Use this skill when users want to clean up code, remove debugging statements, delete console.log calls, remove TODO comments, clean placeholder text, remove empty catch blocks, or prepare code for production by removing development artifacts.
149
232
  ---
150
233
 
151
234
  # Deslop - AI Slop Cleanup
152
235
 
153
- Remove debugging code, old TODOs, and AI-generated slop from codebase.
236
+ Remove debugging code, old TODOs, and AI-generated slop from the codebase.
237
+
238
+ ## How To Run
239
+
240
+ **Step 1: Get files to analyze**
241
+
242
+ If user provided a path, use that. Otherwise:
243
+ ```bash
244
+ # Get changed files (staged + unstaged)
245
+ git diff --name-only HEAD
246
+ # Or get all source files in a directory
247
+ find src -type f \( -name "*.ts" -o -name "*.js" -o -name "*.py" \)
248
+ ```
249
+
250
+ **Step 2: Call review_code MCP tool with files**
251
+ ```
252
+ review_code({ files: ["src/file1.ts", "src/file2.ts"] })
253
+ ```
254
+
255
+ **Step 3: Fix issues found**
256
+
257
+ Review findings by severity and apply fixes.
154
258
 
155
259
  ## Detection Patterns
156
260
 
157
- - Console debugging (console.log, print, dbg!)
261
+ - Console debugging (console.log, print(), dbg!())
158
262
  - Placeholder text (TODO, FIXME, lorem ipsum)
159
263
  - Empty catch blocks
160
- - Commented-out code
161
- - Magic numbers
162
- - Disabled linters
264
+ - Commented-out code blocks
265
+ - Disabled linters (eslint-disable, @ts-ignore)
266
+
267
+ ## Default Behavior
268
+
269
+ If no path specified:
270
+ 1. First check `git diff --name-only` for changed files
271
+ 2. If no changes, ASK user: "Which directory should I scan?"
272
+ 3. Never scan 0 files silently
273
+ EOF
274
+
275
+ # Create workflow-status skill for quick status checks
276
+ mkdir -p "$SKILLS_DIR/workflow-status"
277
+ cat > "$SKILLS_DIR/workflow-status/SKILL.md" << 'EOF'
278
+ ---
279
+ name: workflow-status
280
+ description: Check the current workflow status. Use this skill when users ask about current task status, workflow progress, what phase they're in, or want to see the state of their work.
281
+ ---
282
+
283
+ # Workflow Status
284
+
285
+ Quick check of the current workflow state.
163
286
 
164
- ## Usage
287
+ ## MCP Tools Available
165
288
 
166
- 1. Analyze codebase or specific files
167
- 2. Report issues found with severity
168
- 3. Apply fixes with verification when requested
289
+ - `workflow_status` - Get current workflow state
290
+
291
+ ## Instructions
292
+
293
+ Simply call the `workflow_status` MCP tool to retrieve:
294
+ - Current task being worked on
295
+ - Current workflow phase
296
+ - Resume capability
297
+ - PR status if applicable
298
+ - Last update timestamp
299
+
300
+ ## Status Information
301
+
302
+ The status includes:
303
+ - **task** - Current task title and ID
304
+ - **phase** - Current workflow phase (exploration, planning, implementation, etc.)
305
+ - **status** - Current status (in_progress, completed, failed)
306
+ - **pr** - Pull request number and URL if created
307
+ - **canResume** - Whether the workflow can be resumed
169
308
  EOF
170
309
 
171
310
  echo ""
172
311
  echo "✓ Installation complete!"
173
312
  echo ""
313
+ echo "Installed:"
314
+ echo " - MCP server: awesome-slash"
315
+ echo " - Skills: next-task, ship, review, deslop, workflow-status"
316
+ echo ""
174
317
  echo "Usage:"
175
- echo " 1. Start Codex: codex --enable skills"
176
- echo " 2. Skills available: \$next-task, \$ship, \$review, \$deslop"
177
- echo " 3. MCP tools: workflow_status, workflow_start, task_discover, review_code"
318
+ echo " 1. Start Codex: codex"
319
+ echo " 2. Skills are automatically selected based on your request"
320
+ echo " 3. Or invoke directly: \$next-task, \$ship, \$review, \$deslop"
321
+ echo " 4. MCP tools: workflow_status, workflow_start, task_discover, review_code"
178
322
  echo ""
179
323
  echo "To verify installation:"
180
- echo " codex mcp list"
181
- echo " ls ~/.codex/skills/"
324
+ echo " cat ~/.codex/config.toml # Check MCP server config"
325
+ echo " ls ~/.codex/skills/ # Check installed skills"
@@ -4,8 +4,18 @@
4
4
 
5
5
  set -e
6
6
 
7
- SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8
- PLUGIN_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
7
+ # Detect plugin root - works whether run directly or via bash -c
8
+ if [ -n "${BASH_SOURCE[0]}" ] && [ -f "${BASH_SOURCE[0]}" ]; then
9
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
10
+ PLUGIN_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
11
+ elif [ -f "scripts/install/opencode.sh" ]; then
12
+ PLUGIN_ROOT="$(pwd)"
13
+ elif [ -f "package.json" ] && grep -q "awesome-slash" package.json 2>/dev/null; then
14
+ PLUGIN_ROOT="$(pwd)"
15
+ else
16
+ echo "Error: Cannot detect plugin root. Run from the awesome-slash directory."
17
+ exit 1
18
+ fi
9
19
 
10
20
  echo "Installing awesome-slash for OpenCode..."
11
21
  echo "Plugin root: $PLUGIN_ROOT"
@@ -38,24 +48,33 @@ if [ -f "$CONFIG_FILE" ]; then
38
48
  echo "Backed up existing config to $CONFIG_FILE.backup"
39
49
  fi
40
50
 
51
+ # Convert Git Bash path to Windows path
52
+ # /c/Users/... -> C:/Users/...
53
+ if [[ "$PLUGIN_ROOT" == /[a-z]/* ]]; then
54
+ DRIVE_LETTER=$(echo "$PLUGIN_ROOT" | cut -c2 | tr '[:lower:]' '[:upper:]')
55
+ PLUGIN_ROOT_WIN="${DRIVE_LETTER}:${PLUGIN_ROOT:2}"
56
+ else
57
+ PLUGIN_ROOT_WIN="$PLUGIN_ROOT"
58
+ fi
59
+
41
60
  # Check if jq is available for JSON manipulation
42
61
  if command -v jq &> /dev/null; then
43
62
  if [ -f "$CONFIG_FILE.backup" ]; then
44
63
  # Merge with existing config
45
- jq --arg root "$PLUGIN_ROOT" '.mcp["awesome-slash"] = {
64
+ jq --arg root "$PLUGIN_ROOT_WIN" '.mcp["awesome-slash"] = {
46
65
  "type": "local",
47
66
  "command": ["node", ($root + "/mcp-server/index.js")],
48
- "environment": {"PLUGIN_ROOT": $root},
67
+ "environment": {"PLUGIN_ROOT": $root, "AI_STATE_DIR": ".opencode"},
49
68
  "enabled": true
50
69
  }' "$CONFIG_FILE.backup" > "$CONFIG_FILE"
51
70
  else
52
71
  # Create new config
53
- jq -n --arg root "$PLUGIN_ROOT" '{
72
+ jq -n --arg root "$PLUGIN_ROOT_WIN" '{
54
73
  "mcp": {
55
74
  "awesome-slash": {
56
75
  "type": "local",
57
76
  "command": ["node", ($root + "/mcp-server/index.js")],
58
- "environment": {"PLUGIN_ROOT": $root},
77
+ "environment": {"PLUGIN_ROOT": $root, "AI_STATE_DIR": ".opencode"},
59
78
  "enabled": true
60
79
  }
61
80
  }
@@ -68,9 +87,10 @@ else
68
87
  "mcp": {
69
88
  "awesome-slash": {
70
89
  "type": "local",
71
- "command": ["node", "$PLUGIN_ROOT/mcp-server/index.js"],
90
+ "command": ["node", "$PLUGIN_ROOT_WIN/mcp-server/index.js"],
72
91
  "environment": {
73
- "PLUGIN_ROOT": "$PLUGIN_ROOT"
92
+ "PLUGIN_ROOT": "$PLUGIN_ROOT_WIN",
93
+ "AI_STATE_DIR": ".opencode"
74
94
  },
75
95
  "enabled": true
76
96
  }
@@ -79,17 +99,168 @@ else
79
99
  EOF
80
100
  fi
81
101
 
82
- # Create agent definitions
83
- AGENT_DIR="$OPENCODE_CONFIG/agent"
84
- mkdir -p "$AGENT_DIR"
102
+ # Create commands directory (for slash commands)
103
+ COMMANDS_DIR="$OPENCODE_CONFIG/commands"
104
+ mkdir -p "$COMMANDS_DIR"
105
+
106
+ echo "Installing slash commands..."
107
+
108
+ # /next-task command
109
+ cat > "$COMMANDS_DIR/next-task.md" << 'EOF'
110
+ ---
111
+ description: Start the next-task workflow for task-to-production automation
112
+ agent: workflow
113
+ ---
114
+
115
+ # Next Task Workflow
116
+
117
+ Start or resume the awesome-slash next-task workflow.
118
+
119
+ ## CRITICAL: Always Ask User First
120
+
121
+ **DO NOT auto-select options.** You MUST ask the user before proceeding:
122
+
123
+ 1. First, use `workflow_status` MCP tool to check for existing workflow
124
+ 2. If resumable workflow exists, ASK user: "Resume existing workflow or start fresh?"
125
+ 3. For new workflows, ASK user to choose:
126
+ - **Task Source**: GitHub Issues, GitLab, Local files (TASKS.md), or Custom?
127
+ - **Priority Filter**: Bugs, Security, Features, or All?
128
+ - **Stopping Point**: PR created, Merged, or Deployed?
129
+
130
+ ## Available MCP Tools
131
+
132
+ - `workflow_status` - Check current workflow state
133
+ - `workflow_start` - Start new workflow (params: taskSource, priorityFilter, stoppingPoint)
134
+ - `workflow_resume` - Resume from checkpoint
135
+ - `workflow_abort` - Cancel and cleanup
136
+ - `task_discover` - Find tasks (params: source, filter, limit)
137
+
138
+ ## Task Sources (ask user to pick)
139
+
140
+ - `gh-issues` - GitHub Issues
141
+ - `glab-issues` - GitLab Issues
142
+ - `tasks-md` - Local TASKS.md/PLAN.md/TODO.md
143
+ - `custom` - Custom CLI tool or file
144
+
145
+ ## Stopping Points (ask user to pick)
146
+
147
+ - `pr-created` - Stop after PR creation
148
+ - `merged` - Stop after merge
149
+ - `deployed` - Stop after deployment
150
+
151
+ ## State Directory
152
+
153
+ State is stored in `.opencode/` directory (flow.json, tasks.json).
154
+
155
+ $ARGUMENTS
156
+ EOF
157
+
158
+ # /ship command
159
+ cat > "$COMMANDS_DIR/ship.md" << 'EOF'
160
+ ---
161
+ description: Ship code from commit to production with full validation
162
+ agent: ship
163
+ ---
164
+
165
+ # Ship Workflow
166
+
167
+ Complete PR workflow from commit to production.
168
+
169
+ ## Instructions
170
+
171
+ 1. Check `workflow_status` for current state
172
+ 2. Stage and commit changes with a clear message
173
+ 3. Create PR using `gh pr create`
174
+ 4. Run `review_code` MCP tool for multi-agent review
175
+ 5. Monitor CI status and fix any failures
176
+ 6. Merge when approved
177
+
178
+ ## MCP Tools
179
+
180
+ - `workflow_status` - Check current state
181
+ - `review_code` - Run multi-agent code review on changed files
182
+
183
+ ## Platforms Supported
184
+
185
+ - CI: GitHub Actions, GitLab CI, CircleCI, Jenkins
186
+ - Deploy: Railway, Vercel, Netlify, Fly.io
187
+
188
+ $ARGUMENTS
189
+ EOF
190
+
191
+ # /review command
192
+ cat > "$COMMANDS_DIR/review.md" << 'EOF'
193
+ ---
194
+ description: Run multi-agent code review on changes
195
+ agent: review
196
+ ---
197
+
198
+ # Code Review
199
+
200
+ Run comprehensive multi-agent code review.
201
+
202
+ ## Instructions
203
+
204
+ Use the `review_code` MCP tool to analyze changed files.
205
+
206
+ The review checks for:
207
+ - Console debugging statements
208
+ - TODO/FIXME comments
209
+ - Commented-out code
210
+ - Debugger statements
211
+ - Empty catch blocks
212
+ - TypeScript `any` types
213
+ - Hardcoded secrets
214
+
215
+ ## Usage
216
+
217
+ Call `review_code` with optional parameters:
218
+ - `files` - Array of specific files to review (defaults to git diff)
219
+ - `maxIterations` - Maximum review iterations (default: 3)
220
+
221
+ $ARGUMENTS
222
+ EOF
223
+
224
+ # /deslop command
225
+ cat > "$COMMANDS_DIR/deslop.md" << 'EOF'
226
+ ---
227
+ description: Clean AI slop from codebase - debug statements, TODOs, placeholder text
228
+ agent: general
229
+ ---
230
+
231
+ # Deslop - AI Slop Cleanup
232
+
233
+ Remove debugging code, old TODOs, and AI-generated slop from the codebase.
234
+
235
+ ## Detection Patterns
236
+
237
+ - Console debugging (console.log, print, dbg!)
238
+ - Placeholder text (TODO, FIXME, lorem ipsum)
239
+ - Empty catch blocks
240
+ - Commented-out code
241
+ - Magic numbers
242
+ - Disabled linters
243
+
244
+ ## Instructions
245
+
246
+ 1. Use the `review_code` MCP tool to detect issues
247
+ 2. Review the findings by severity (error, warning, info)
248
+ 3. Fix critical and high severity issues
249
+ 4. Report medium and low severity for manual review
250
+
251
+ $ARGUMENTS
252
+ EOF
253
+
254
+ # Create agents directory (for agent definitions)
255
+ AGENTS_DIR="$OPENCODE_CONFIG/agents"
256
+ mkdir -p "$AGENTS_DIR"
85
257
 
86
258
  echo "Installing agent configurations..."
87
259
 
88
- # Workflow orchestrator agent (primary)
89
- cat > "$AGENT_DIR/workflow.md" << 'EOF'
260
+ # Workflow orchestrator agent
261
+ cat > "$AGENTS_DIR/workflow.md" << 'EOF'
90
262
  ---
91
263
  description: Master workflow orchestrator for task-to-production automation with MCP tools
92
- mode: primary
93
264
  tools:
94
265
  read: true
95
266
  write: true
@@ -129,10 +300,9 @@ When starting, check for existing workflow with `workflow_status` first.
129
300
  EOF
130
301
 
131
302
  # Review agent (subagent)
132
- cat > "$AGENT_DIR/review.md" << 'EOF'
303
+ cat > "$AGENTS_DIR/review.md" << 'EOF'
133
304
  ---
134
305
  description: Multi-agent code reviewer for quality analysis
135
- mode: subagent
136
306
  tools:
137
307
  read: true
138
308
  write: false
@@ -162,10 +332,9 @@ Run comprehensive code review using the awesome-slash `review_code` MCP tool.
162
332
  EOF
163
333
 
164
334
  # Ship agent (subagent)
165
- cat > "$AGENT_DIR/ship.md" << 'EOF'
335
+ cat > "$AGENTS_DIR/ship.md" << 'EOF'
166
336
  ---
167
337
  description: Complete PR workflow from commit to production
168
- mode: subagent
169
338
  tools:
170
339
  read: true
171
340
  write: true
@@ -201,11 +370,18 @@ EOF
201
370
  echo ""
202
371
  echo "✓ Installation complete!"
203
372
  echo ""
373
+ echo "Installed:"
374
+ echo " - MCP server: awesome-slash"
375
+ echo " - Commands: /next-task, /ship, /review, /deslop"
376
+ echo " - Agents: workflow, review, ship"
377
+ echo ""
204
378
  echo "Usage:"
205
379
  echo " 1. Start OpenCode: opencode"
206
- echo " 2. Switch agents with Tab: workflow, review, ship"
207
- echo " 3. MCP tools: workflow_status, workflow_start, task_discover, etc."
380
+ echo " 2. Use slash commands: /next-task, /ship, /review, /deslop"
381
+ echo " 3. Switch agents with Tab: workflow, review, ship"
382
+ echo " 4. MCP tools available in prompts: workflow_status, task_discover, etc."
208
383
  echo ""
209
384
  echo "To verify installation:"
210
385
  echo " opencode mcp list"
211
- echo " ls ~/.config/opencode/agent/"
386
+ echo " ls ~/.config/opencode/commands/"
387
+ echo " ls ~/.config/opencode/agents/"