awesome-slash 2.4.4 → 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 (151) hide show
  1. package/.claude-plugin/marketplace.json +6 -6
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +123 -1
  4. package/README.md +186 -159
  5. package/SECURITY.md +25 -81
  6. package/adapters/codex/install.sh +58 -16
  7. package/adapters/opencode/install.sh +92 -23
  8. package/lib/index.js +47 -4
  9. package/lib/patterns/review-patterns.js +58 -11
  10. package/lib/patterns/slop-patterns.js +154 -147
  11. package/lib/platform/detect-platform.js +99 -350
  12. package/lib/platform/detection-configs.js +93 -0
  13. package/lib/platform/state-dir.js +122 -0
  14. package/lib/platform/verify-tools.js +10 -78
  15. package/lib/schemas/README.md +195 -0
  16. package/lib/schemas/validator.js +247 -0
  17. package/lib/sources/custom-handler.js +199 -0
  18. package/lib/sources/policy-questions.js +239 -0
  19. package/lib/sources/source-cache.js +164 -0
  20. package/lib/state/workflow-state.js +368 -665
  21. package/lib/types/README.md +292 -0
  22. package/lib/types/agent-frontmatter.d.ts +134 -0
  23. package/lib/types/command-frontmatter.d.ts +107 -0
  24. package/lib/types/hook-frontmatter.d.ts +115 -0
  25. package/lib/types/index.d.ts +84 -0
  26. package/lib/types/plugin-manifest.d.ts +102 -0
  27. package/lib/types/skill-frontmatter.d.ts +89 -0
  28. package/lib/utils/cache-manager.js +154 -0
  29. package/lib/utils/context-optimizer.js +5 -36
  30. package/lib/utils/deprecation.js +37 -0
  31. package/lib/utils/shell-escape.js +88 -0
  32. package/mcp-server/index.js +513 -22
  33. package/package.json +6 -2
  34. package/plugins/deslop-around/.claude-plugin/plugin.json +1 -1
  35. package/plugins/deslop-around/lib/index.js +170 -0
  36. package/plugins/deslop-around/lib/patterns/review-patterns.js +58 -11
  37. package/plugins/deslop-around/lib/patterns/slop-patterns.js +169 -129
  38. package/plugins/deslop-around/lib/platform/detect-platform.js +162 -316
  39. package/plugins/deslop-around/lib/platform/detection-configs.js +93 -0
  40. package/plugins/deslop-around/lib/platform/state-dir.js +122 -0
  41. package/plugins/deslop-around/lib/platform/verify-tools.js +10 -78
  42. package/plugins/deslop-around/lib/schemas/README.md +195 -0
  43. package/plugins/deslop-around/lib/schemas/validator.js +247 -0
  44. package/plugins/deslop-around/lib/sources/custom-handler.js +199 -0
  45. package/plugins/deslop-around/lib/sources/policy-questions.js +239 -0
  46. package/plugins/deslop-around/lib/sources/source-cache.js +164 -0
  47. package/plugins/deslop-around/lib/state/workflow-state.js +387 -484
  48. package/plugins/deslop-around/lib/types/README.md +292 -0
  49. package/plugins/deslop-around/lib/types/agent-frontmatter.d.ts +134 -0
  50. package/plugins/deslop-around/lib/types/command-frontmatter.d.ts +107 -0
  51. package/plugins/deslop-around/lib/types/hook-frontmatter.d.ts +115 -0
  52. package/plugins/deslop-around/lib/types/index.d.ts +84 -0
  53. package/plugins/deslop-around/lib/types/plugin-manifest.d.ts +102 -0
  54. package/plugins/deslop-around/lib/types/skill-frontmatter.d.ts +89 -0
  55. package/plugins/deslop-around/lib/utils/cache-manager.js +154 -0
  56. package/plugins/deslop-around/lib/utils/context-optimizer.js +115 -37
  57. package/plugins/deslop-around/lib/utils/deprecation.js +37 -0
  58. package/plugins/deslop-around/lib/utils/shell-escape.js +88 -0
  59. package/plugins/next-task/.claude-plugin/plugin.json +1 -1
  60. package/plugins/next-task/agents/delivery-validator.md +2 -2
  61. package/plugins/next-task/agents/implementation-agent.md +3 -4
  62. package/plugins/next-task/agents/planning-agent.md +77 -19
  63. package/plugins/next-task/agents/review-orchestrator.md +21 -122
  64. package/plugins/next-task/agents/task-discoverer.md +164 -23
  65. package/plugins/next-task/commands/next-task.md +180 -14
  66. package/plugins/next-task/lib/index.js +170 -0
  67. package/plugins/next-task/lib/patterns/review-patterns.js +58 -11
  68. package/plugins/next-task/lib/patterns/slop-patterns.js +169 -129
  69. package/plugins/next-task/lib/platform/detect-platform.js +162 -316
  70. package/plugins/next-task/lib/platform/detection-configs.js +93 -0
  71. package/plugins/next-task/lib/platform/state-dir.js +122 -0
  72. package/plugins/next-task/lib/platform/verify-tools.js +10 -78
  73. package/plugins/next-task/lib/schemas/README.md +195 -0
  74. package/plugins/next-task/lib/schemas/validator.js +247 -0
  75. package/plugins/next-task/lib/sources/custom-handler.js +199 -0
  76. package/plugins/next-task/lib/sources/policy-questions.js +239 -0
  77. package/plugins/next-task/lib/sources/source-cache.js +164 -0
  78. package/plugins/next-task/lib/state/workflow-state.js +387 -484
  79. package/plugins/next-task/lib/types/README.md +292 -0
  80. package/plugins/next-task/lib/types/agent-frontmatter.d.ts +134 -0
  81. package/plugins/next-task/lib/types/command-frontmatter.d.ts +107 -0
  82. package/plugins/next-task/lib/types/hook-frontmatter.d.ts +115 -0
  83. package/plugins/next-task/lib/types/index.d.ts +84 -0
  84. package/plugins/next-task/lib/types/plugin-manifest.d.ts +102 -0
  85. package/plugins/next-task/lib/types/skill-frontmatter.d.ts +89 -0
  86. package/plugins/next-task/lib/utils/cache-manager.js +154 -0
  87. package/plugins/next-task/lib/utils/context-optimizer.js +115 -37
  88. package/plugins/next-task/lib/utils/deprecation.js +37 -0
  89. package/plugins/next-task/lib/utils/shell-escape.js +88 -0
  90. package/plugins/project-review/.claude-plugin/plugin.json +1 -1
  91. package/plugins/project-review/lib/index.js +170 -0
  92. package/plugins/project-review/lib/patterns/review-patterns.js +58 -11
  93. package/plugins/project-review/lib/patterns/slop-patterns.js +169 -129
  94. package/plugins/project-review/lib/platform/detect-platform.js +162 -316
  95. package/plugins/project-review/lib/platform/detection-configs.js +93 -0
  96. package/plugins/project-review/lib/platform/state-dir.js +122 -0
  97. package/plugins/project-review/lib/platform/verify-tools.js +10 -78
  98. package/plugins/project-review/lib/schemas/README.md +195 -0
  99. package/plugins/project-review/lib/schemas/validator.js +247 -0
  100. package/plugins/project-review/lib/sources/custom-handler.js +199 -0
  101. package/plugins/project-review/lib/sources/policy-questions.js +239 -0
  102. package/plugins/project-review/lib/sources/source-cache.js +164 -0
  103. package/plugins/project-review/lib/state/workflow-state.js +387 -484
  104. package/plugins/project-review/lib/types/README.md +292 -0
  105. package/plugins/project-review/lib/types/agent-frontmatter.d.ts +134 -0
  106. package/plugins/project-review/lib/types/command-frontmatter.d.ts +107 -0
  107. package/plugins/project-review/lib/types/hook-frontmatter.d.ts +115 -0
  108. package/plugins/project-review/lib/types/index.d.ts +84 -0
  109. package/plugins/project-review/lib/types/plugin-manifest.d.ts +102 -0
  110. package/plugins/project-review/lib/types/skill-frontmatter.d.ts +89 -0
  111. package/plugins/project-review/lib/utils/cache-manager.js +154 -0
  112. package/plugins/project-review/lib/utils/context-optimizer.js +115 -37
  113. package/plugins/project-review/lib/utils/deprecation.js +37 -0
  114. package/plugins/project-review/lib/utils/shell-escape.js +88 -0
  115. package/plugins/reality-check/.claude-plugin/plugin.json +1 -1
  116. package/plugins/reality-check/agents/code-explorer.md +1 -1
  117. package/plugins/ship/.claude-plugin/plugin.json +1 -1
  118. package/plugins/ship/lib/index.js +170 -0
  119. package/plugins/ship/lib/patterns/review-patterns.js +58 -11
  120. package/plugins/ship/lib/patterns/slop-patterns.js +169 -129
  121. package/plugins/ship/lib/platform/detect-platform.js +162 -316
  122. package/plugins/ship/lib/platform/detection-configs.js +93 -0
  123. package/plugins/ship/lib/platform/state-dir.js +122 -0
  124. package/plugins/ship/lib/platform/verify-tools.js +10 -78
  125. package/plugins/ship/lib/schemas/README.md +195 -0
  126. package/plugins/ship/lib/schemas/validator.js +247 -0
  127. package/plugins/ship/lib/sources/custom-handler.js +199 -0
  128. package/plugins/ship/lib/sources/policy-questions.js +239 -0
  129. package/plugins/ship/lib/sources/source-cache.js +164 -0
  130. package/plugins/ship/lib/state/workflow-state.js +387 -484
  131. package/plugins/ship/lib/types/README.md +292 -0
  132. package/plugins/ship/lib/types/agent-frontmatter.d.ts +134 -0
  133. package/plugins/ship/lib/types/command-frontmatter.d.ts +107 -0
  134. package/plugins/ship/lib/types/hook-frontmatter.d.ts +115 -0
  135. package/plugins/ship/lib/types/index.d.ts +84 -0
  136. package/plugins/ship/lib/types/plugin-manifest.d.ts +102 -0
  137. package/plugins/ship/lib/types/skill-frontmatter.d.ts +89 -0
  138. package/plugins/ship/lib/utils/cache-manager.js +154 -0
  139. package/plugins/ship/lib/utils/context-optimizer.js +115 -37
  140. package/plugins/ship/lib/utils/deprecation.js +37 -0
  141. package/plugins/ship/lib/utils/shell-escape.js +88 -0
  142. package/scripts/install/codex.sh +216 -72
  143. package/scripts/install/opencode.sh +197 -21
  144. package/lib/state/workflow-state.schema.json +0 -282
  145. package/plugins/deslop-around/lib/state/workflow-state.schema.json +0 -282
  146. package/plugins/next-task/agents/policy-selector.md +0 -248
  147. package/plugins/next-task/lib/state/tasks-registry.schema.json +0 -85
  148. package/plugins/next-task/lib/state/workflow-state.schema.json +0 -282
  149. package/plugins/next-task/lib/state/worktree-status.schema.json +0 -219
  150. package/plugins/project-review/lib/state/workflow-state.schema.json +0 -282
  151. package/plugins/ship/lib/state/workflow-state.schema.json +0 -282
@@ -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/"
@@ -1,282 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "workflow-state.schema.json",
4
- "title": "Workflow State",
5
- "description": "Schema for next-task workflow orchestration state",
6
- "type": "object",
7
- "required": ["version", "workflow"],
8
- "properties": {
9
- "version": {
10
- "type": "string",
11
- "pattern": "^\\d+\\.\\d+\\.\\d+$",
12
- "description": "Schema version for migrations"
13
- },
14
- "workflow": {
15
- "type": "object",
16
- "required": ["id", "type", "status", "startedAt"],
17
- "properties": {
18
- "id": {
19
- "type": "string",
20
- "pattern": "^workflow-\\d{8}-\\d{6}-[a-z0-9]+$",
21
- "description": "Unique workflow identifier"
22
- },
23
- "type": {
24
- "type": "string",
25
- "enum": ["next-task", "ship", "manual"],
26
- "description": "Workflow type"
27
- },
28
- "status": {
29
- "type": "string",
30
- "enum": ["pending", "in_progress", "paused", "completed", "failed", "aborted"],
31
- "description": "Current workflow status"
32
- },
33
- "startedAt": {
34
- "type": "string",
35
- "format": "date-time",
36
- "description": "Workflow start timestamp"
37
- },
38
- "lastUpdatedAt": {
39
- "type": "string",
40
- "format": "date-time",
41
- "description": "Last state update timestamp"
42
- },
43
- "completedAt": {
44
- "type": ["string", "null"],
45
- "format": "date-time",
46
- "description": "Workflow completion timestamp"
47
- }
48
- }
49
- },
50
- "policy": {
51
- "type": "object",
52
- "properties": {
53
- "taskSource": {
54
- "type": "string",
55
- "enum": ["defaults", "gh-issues", "linear", "tasks-md", "custom"],
56
- "default": "gh-issues"
57
- },
58
- "priorityFilter": {
59
- "type": "string",
60
- "enum": ["continue", "bugs", "security", "features", "all"],
61
- "default": "continue"
62
- },
63
- "platform": {
64
- "type": "string",
65
- "enum": ["detected", "manual"],
66
- "default": "detected"
67
- },
68
- "stoppingPoint": {
69
- "type": "string",
70
- "enum": ["implemented", "pr-created", "all-green", "merged", "deployed", "production"],
71
- "default": "merged"
72
- },
73
- "mergeStrategy": {
74
- "type": "string",
75
- "enum": ["squash", "merge", "rebase"],
76
- "default": "squash"
77
- },
78
- "autoFix": {
79
- "type": "boolean",
80
- "default": true
81
- },
82
- "maxReviewIterations": {
83
- "type": "integer",
84
- "minimum": 1,
85
- "maximum": 10,
86
- "default": 3
87
- }
88
- }
89
- },
90
- "task": {
91
- "type": ["object", "null"],
92
- "properties": {
93
- "id": {
94
- "type": "string",
95
- "description": "Task identifier (issue number, Linear ID, etc.)"
96
- },
97
- "source": {
98
- "type": "string",
99
- "enum": ["github", "linear", "tasks-md", "manual"]
100
- },
101
- "title": {
102
- "type": "string"
103
- },
104
- "description": {
105
- "type": "string"
106
- },
107
- "labels": {
108
- "type": "array",
109
- "items": { "type": "string" }
110
- },
111
- "url": {
112
- "type": ["string", "null"],
113
- "format": "uri"
114
- },
115
- "linearId": {
116
- "type": ["string", "null"]
117
- }
118
- }
119
- },
120
- "git": {
121
- "type": ["object", "null"],
122
- "properties": {
123
- "originalBranch": {
124
- "type": "string",
125
- "description": "Branch before workflow started"
126
- },
127
- "workingBranch": {
128
- "type": "string",
129
- "description": "Feature branch for this task"
130
- },
131
- "worktreePath": {
132
- "type": ["string", "null"],
133
- "description": "Path to worktree if using isolated development"
134
- },
135
- "baseSha": {
136
- "type": "string",
137
- "description": "Base commit SHA when branched"
138
- },
139
- "currentSha": {
140
- "type": "string",
141
- "description": "Current HEAD commit SHA"
142
- },
143
- "isWorktree": {
144
- "type": "boolean",
145
- "default": false
146
- }
147
- }
148
- },
149
- "pr": {
150
- "type": ["object", "null"],
151
- "properties": {
152
- "number": {
153
- "type": "integer"
154
- },
155
- "url": {
156
- "type": "string",
157
- "format": "uri"
158
- },
159
- "state": {
160
- "type": "string",
161
- "enum": ["draft", "open", "merged", "closed"]
162
- },
163
- "ciStatus": {
164
- "type": "string",
165
- "enum": ["pending", "running", "success", "failure", "unknown"]
166
- },
167
- "reviewState": {
168
- "type": "string",
169
- "enum": ["pending", "changes_requested", "approved", "dismissed"]
170
- },
171
- "lastCheckedAt": {
172
- "type": "string",
173
- "format": "date-time"
174
- },
175
- "checksWaitingCount": {
176
- "type": "integer",
177
- "default": 0
178
- }
179
- }
180
- },
181
- "phases": {
182
- "type": "object",
183
- "properties": {
184
- "current": {
185
- "type": "string",
186
- "enum": [
187
- "policy-selection",
188
- "task-discovery",
189
- "worktree-setup",
190
- "exploration",
191
- "planning",
192
- "user-approval",
193
- "implementation",
194
- "review-loop",
195
- "delivery-approval",
196
- "ship-prep",
197
- "create-pr",
198
- "ci-wait",
199
- "comment-fix",
200
- "merge",
201
- "production-ci",
202
- "deploy",
203
- "production-release",
204
- "complete"
205
- ]
206
- },
207
- "currentIteration": {
208
- "type": "integer",
209
- "minimum": 0,
210
- "default": 0
211
- },
212
- "history": {
213
- "type": "array",
214
- "items": {
215
- "type": "object",
216
- "required": ["phase", "status", "startedAt"],
217
- "properties": {
218
- "phase": { "type": "string" },
219
- "status": {
220
- "type": "string",
221
- "enum": ["pending", "in_progress", "completed", "failed", "skipped"]
222
- },
223
- "startedAt": { "type": "string", "format": "date-time" },
224
- "completedAt": { "type": ["string", "null"], "format": "date-time" },
225
- "duration": { "type": "integer", "description": "Duration in milliseconds" },
226
- "iteration": { "type": "integer" },
227
- "result": { "type": "object" }
228
- }
229
- }
230
- }
231
- }
232
- },
233
- "agents": {
234
- "type": ["object", "null"],
235
- "properties": {
236
- "lastRun": {
237
- "type": "object",
238
- "additionalProperties": {
239
- "type": "object",
240
- "properties": {
241
- "status": { "type": "string", "enum": ["pending", "running", "completed", "failed"] },
242
- "issues": { "type": "integer" },
243
- "critical": { "type": "integer" },
244
- "high": { "type": "integer" }
245
- }
246
- }
247
- },
248
- "totalIterations": { "type": "integer", "default": 0 },
249
- "totalIssuesFound": { "type": "integer", "default": 0 },
250
- "totalIssuesFixed": { "type": "integer", "default": 0 }
251
- }
252
- },
253
- "checkpoints": {
254
- "type": "object",
255
- "properties": {
256
- "canResume": {
257
- "type": "boolean",
258
- "default": true
259
- },
260
- "resumeFrom": {
261
- "type": ["string", "null"],
262
- "description": "Phase to resume from"
263
- },
264
- "resumeContext": {
265
- "type": ["object", "null"],
266
- "description": "Additional context needed for resume"
267
- }
268
- }
269
- },
270
- "metrics": {
271
- "type": ["object", "null"],
272
- "properties": {
273
- "totalDuration": { "type": "integer", "description": "Total duration in milliseconds" },
274
- "tokensUsed": { "type": "integer" },
275
- "toolCalls": { "type": "integer" },
276
- "filesModified": { "type": "integer" },
277
- "linesAdded": { "type": "integer" },
278
- "linesRemoved": { "type": "integer" }
279
- }
280
- }
281
- }
282
- }