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.
- package/.claude-plugin/marketplace.json +6 -6
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +35 -0
- package/README.md +23 -8
- package/lib/platform/state-dir.js +122 -0
- package/lib/sources/source-cache.js +26 -11
- package/lib/state/workflow-state.js +18 -13
- package/mcp-server/index.js +7 -11
- package/package.json +1 -1
- package/plugins/deslop-around/.claude-plugin/plugin.json +1 -1
- package/plugins/deslop-around/lib/patterns/slop-patterns.js +2 -3
- package/plugins/deslop-around/lib/platform/detect-platform.js +44 -287
- package/plugins/deslop-around/lib/platform/state-dir.js +122 -0
- package/plugins/deslop-around/lib/platform/verify-tools.js +11 -88
- package/plugins/deslop-around/lib/schemas/validator.js +44 -2
- package/plugins/deslop-around/lib/sources/source-cache.js +26 -11
- package/plugins/deslop-around/lib/state/workflow-state.js +18 -13
- package/plugins/next-task/.claude-plugin/plugin.json +1 -1
- package/plugins/next-task/lib/patterns/slop-patterns.js +2 -3
- package/plugins/next-task/lib/platform/detect-platform.js +44 -287
- package/plugins/next-task/lib/platform/state-dir.js +122 -0
- package/plugins/next-task/lib/platform/verify-tools.js +11 -88
- package/plugins/next-task/lib/schemas/validator.js +44 -2
- package/plugins/next-task/lib/sources/source-cache.js +26 -11
- package/plugins/next-task/lib/state/workflow-state.js +18 -13
- package/plugins/project-review/.claude-plugin/plugin.json +1 -1
- package/plugins/project-review/lib/patterns/slop-patterns.js +2 -3
- package/plugins/project-review/lib/platform/detect-platform.js +44 -287
- package/plugins/project-review/lib/platform/state-dir.js +122 -0
- package/plugins/project-review/lib/platform/verify-tools.js +11 -88
- package/plugins/project-review/lib/schemas/validator.js +44 -2
- package/plugins/project-review/lib/sources/source-cache.js +26 -11
- package/plugins/project-review/lib/state/workflow-state.js +18 -13
- package/plugins/reality-check/.claude-plugin/plugin.json +1 -1
- package/plugins/ship/.claude-plugin/plugin.json +1 -1
- package/plugins/ship/lib/patterns/slop-patterns.js +2 -3
- package/plugins/ship/lib/platform/detect-platform.js +44 -287
- package/plugins/ship/lib/platform/state-dir.js +122 -0
- package/plugins/ship/lib/platform/verify-tools.js +11 -88
- package/plugins/ship/lib/schemas/validator.js +44 -2
- package/plugins/ship/lib/sources/source-cache.js +26 -11
- package/plugins/ship/lib/state/workflow-state.js +18 -13
- package/scripts/install/codex.sh +216 -72
- package/scripts/install/opencode.sh +197 -21
package/scripts/install/codex.sh
CHANGED
|
@@ -4,8 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
set -e
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
#
|
|
35
|
+
# Configure MCP server in config.toml
|
|
26
36
|
echo "Configuring MCP server..."
|
|
27
37
|
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
#
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
40
|
-
SKILLS_DIR="$
|
|
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
|
|
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
|
-
##
|
|
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
|
|
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
|
|
117
|
+
- `task_discover` - Find tasks (params: source, filter, limit)
|
|
64
118
|
|
|
65
|
-
##
|
|
119
|
+
## Task Sources (ask user)
|
|
66
120
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
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
|
-
##
|
|
126
|
+
## Stopping Points (ask user)
|
|
74
127
|
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
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
|
|
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
|
-
##
|
|
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.
|
|
101
|
-
2.
|
|
102
|
-
3.
|
|
103
|
-
4.
|
|
104
|
-
5.
|
|
105
|
-
6.
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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,
|
|
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
|
-
##
|
|
194
|
+
## How To Run
|
|
125
195
|
|
|
126
|
-
|
|
127
|
-
- `review_code` - Run multi-agent review
|
|
196
|
+
**Step 1: Get files to review**
|
|
128
197
|
|
|
129
|
-
|
|
198
|
+
If user provided files, use those. Otherwise get changed files:
|
|
199
|
+
```bash
|
|
200
|
+
git diff --name-only HEAD
|
|
201
|
+
```
|
|
130
202
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
203
|
+
**Step 2: Call review_code MCP tool**
|
|
204
|
+
```
|
|
205
|
+
review_code({ files: ["src/file1.ts", "src/file2.ts"] })
|
|
206
|
+
```
|
|
135
207
|
|
|
136
|
-
##
|
|
208
|
+
## Review Checks
|
|
137
209
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
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
|
|
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
|
-
-
|
|
162
|
-
|
|
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
|
-
##
|
|
287
|
+
## MCP Tools Available
|
|
165
288
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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
|
|
176
|
-
echo " 2. Skills
|
|
177
|
-
echo " 3.
|
|
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
|
|
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
|
-
|
|
8
|
-
|
|
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 "$
|
|
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 "$
|
|
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", "$
|
|
90
|
+
"command": ["node", "$PLUGIN_ROOT_WIN/mcp-server/index.js"],
|
|
72
91
|
"environment": {
|
|
73
|
-
"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
|
|
83
|
-
|
|
84
|
-
mkdir -p "$
|
|
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
|
|
89
|
-
cat > "$
|
|
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 > "$
|
|
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 > "$
|
|
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.
|
|
207
|
-
echo " 3.
|
|
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/
|
|
386
|
+
echo " ls ~/.config/opencode/commands/"
|
|
387
|
+
echo " ls ~/.config/opencode/agents/"
|