awesome-slash 2.4.3 → 2.5.0

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 (146) hide show
  1. package/.claude-plugin/marketplace.json +6 -6
  2. package/.claude-plugin/plugin.json +1 -1
  3. package/CHANGELOG.md +99 -1
  4. package/README.md +173 -161
  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/verify-tools.js +10 -78
  14. package/lib/schemas/README.md +195 -0
  15. package/lib/schemas/validator.js +247 -0
  16. package/lib/sources/custom-handler.js +199 -0
  17. package/lib/sources/policy-questions.js +239 -0
  18. package/lib/sources/source-cache.js +149 -0
  19. package/lib/state/workflow-state.js +363 -665
  20. package/lib/types/README.md +292 -0
  21. package/lib/types/agent-frontmatter.d.ts +134 -0
  22. package/lib/types/command-frontmatter.d.ts +107 -0
  23. package/lib/types/hook-frontmatter.d.ts +115 -0
  24. package/lib/types/index.d.ts +84 -0
  25. package/lib/types/plugin-manifest.d.ts +102 -0
  26. package/lib/types/skill-frontmatter.d.ts +89 -0
  27. package/lib/utils/cache-manager.js +154 -0
  28. package/lib/utils/context-optimizer.js +5 -36
  29. package/lib/utils/deprecation.js +37 -0
  30. package/lib/utils/shell-escape.js +88 -0
  31. package/mcp-server/index.js +513 -18
  32. package/package.json +6 -2
  33. package/plugins/deslop-around/.claude-plugin/plugin.json +1 -1
  34. package/plugins/deslop-around/lib/index.js +170 -0
  35. package/plugins/deslop-around/lib/patterns/review-patterns.js +58 -11
  36. package/plugins/deslop-around/lib/patterns/slop-patterns.js +170 -129
  37. package/plugins/deslop-around/lib/platform/detect-platform.js +212 -123
  38. package/plugins/deslop-around/lib/platform/detection-configs.js +93 -0
  39. package/plugins/deslop-around/lib/platform/verify-tools.js +10 -1
  40. package/plugins/deslop-around/lib/schemas/README.md +195 -0
  41. package/plugins/deslop-around/lib/schemas/validator.js +205 -0
  42. package/plugins/deslop-around/lib/sources/custom-handler.js +199 -0
  43. package/plugins/deslop-around/lib/sources/policy-questions.js +239 -0
  44. package/plugins/deslop-around/lib/sources/source-cache.js +149 -0
  45. package/plugins/deslop-around/lib/state/workflow-state.js +382 -484
  46. package/plugins/deslop-around/lib/types/README.md +292 -0
  47. package/plugins/deslop-around/lib/types/agent-frontmatter.d.ts +134 -0
  48. package/plugins/deslop-around/lib/types/command-frontmatter.d.ts +107 -0
  49. package/plugins/deslop-around/lib/types/hook-frontmatter.d.ts +115 -0
  50. package/plugins/deslop-around/lib/types/index.d.ts +84 -0
  51. package/plugins/deslop-around/lib/types/plugin-manifest.d.ts +102 -0
  52. package/plugins/deslop-around/lib/types/skill-frontmatter.d.ts +89 -0
  53. package/plugins/deslop-around/lib/utils/cache-manager.js +154 -0
  54. package/plugins/deslop-around/lib/utils/context-optimizer.js +115 -37
  55. package/plugins/deslop-around/lib/utils/deprecation.js +37 -0
  56. package/plugins/deslop-around/lib/utils/shell-escape.js +88 -0
  57. package/plugins/next-task/.claude-plugin/plugin.json +1 -1
  58. package/plugins/next-task/agents/ci-monitor.md +19 -0
  59. package/plugins/next-task/agents/delivery-validator.md +2 -2
  60. package/plugins/next-task/agents/implementation-agent.md +3 -4
  61. package/plugins/next-task/agents/planning-agent.md +77 -19
  62. package/plugins/next-task/agents/review-orchestrator.md +21 -122
  63. package/plugins/next-task/agents/task-discoverer.md +164 -23
  64. package/plugins/next-task/commands/next-task.md +180 -14
  65. package/plugins/next-task/lib/index.js +170 -0
  66. package/plugins/next-task/lib/patterns/review-patterns.js +58 -11
  67. package/plugins/next-task/lib/patterns/slop-patterns.js +170 -129
  68. package/plugins/next-task/lib/platform/detect-platform.js +212 -123
  69. package/plugins/next-task/lib/platform/detection-configs.js +93 -0
  70. package/plugins/next-task/lib/platform/verify-tools.js +10 -1
  71. package/plugins/next-task/lib/schemas/README.md +195 -0
  72. package/plugins/next-task/lib/schemas/validator.js +205 -0
  73. package/plugins/next-task/lib/sources/custom-handler.js +199 -0
  74. package/plugins/next-task/lib/sources/policy-questions.js +239 -0
  75. package/plugins/next-task/lib/sources/source-cache.js +149 -0
  76. package/plugins/next-task/lib/state/workflow-state.js +382 -484
  77. package/plugins/next-task/lib/types/README.md +292 -0
  78. package/plugins/next-task/lib/types/agent-frontmatter.d.ts +134 -0
  79. package/plugins/next-task/lib/types/command-frontmatter.d.ts +107 -0
  80. package/plugins/next-task/lib/types/hook-frontmatter.d.ts +115 -0
  81. package/plugins/next-task/lib/types/index.d.ts +84 -0
  82. package/plugins/next-task/lib/types/plugin-manifest.d.ts +102 -0
  83. package/plugins/next-task/lib/types/skill-frontmatter.d.ts +89 -0
  84. package/plugins/next-task/lib/utils/cache-manager.js +154 -0
  85. package/plugins/next-task/lib/utils/context-optimizer.js +115 -37
  86. package/plugins/next-task/lib/utils/deprecation.js +37 -0
  87. package/plugins/next-task/lib/utils/shell-escape.js +88 -0
  88. package/plugins/project-review/.claude-plugin/plugin.json +1 -1
  89. package/plugins/project-review/lib/index.js +170 -0
  90. package/plugins/project-review/lib/patterns/review-patterns.js +58 -11
  91. package/plugins/project-review/lib/patterns/slop-patterns.js +170 -129
  92. package/plugins/project-review/lib/platform/detect-platform.js +212 -123
  93. package/plugins/project-review/lib/platform/detection-configs.js +93 -0
  94. package/plugins/project-review/lib/platform/verify-tools.js +10 -1
  95. package/plugins/project-review/lib/schemas/README.md +195 -0
  96. package/plugins/project-review/lib/schemas/validator.js +205 -0
  97. package/plugins/project-review/lib/sources/custom-handler.js +199 -0
  98. package/plugins/project-review/lib/sources/policy-questions.js +239 -0
  99. package/plugins/project-review/lib/sources/source-cache.js +149 -0
  100. package/plugins/project-review/lib/state/workflow-state.js +382 -484
  101. package/plugins/project-review/lib/types/README.md +292 -0
  102. package/plugins/project-review/lib/types/agent-frontmatter.d.ts +134 -0
  103. package/plugins/project-review/lib/types/command-frontmatter.d.ts +107 -0
  104. package/plugins/project-review/lib/types/hook-frontmatter.d.ts +115 -0
  105. package/plugins/project-review/lib/types/index.d.ts +84 -0
  106. package/plugins/project-review/lib/types/plugin-manifest.d.ts +102 -0
  107. package/plugins/project-review/lib/types/skill-frontmatter.d.ts +89 -0
  108. package/plugins/project-review/lib/utils/cache-manager.js +154 -0
  109. package/plugins/project-review/lib/utils/context-optimizer.js +115 -37
  110. package/plugins/project-review/lib/utils/deprecation.js +37 -0
  111. package/plugins/project-review/lib/utils/shell-escape.js +88 -0
  112. package/plugins/reality-check/.claude-plugin/plugin.json +1 -1
  113. package/plugins/reality-check/agents/code-explorer.md +1 -1
  114. package/plugins/ship/.claude-plugin/plugin.json +1 -1
  115. package/plugins/ship/commands/ship-ci-review-loop.md +19 -0
  116. package/plugins/ship/lib/index.js +170 -0
  117. package/plugins/ship/lib/patterns/review-patterns.js +58 -11
  118. package/plugins/ship/lib/patterns/slop-patterns.js +170 -129
  119. package/plugins/ship/lib/platform/detect-platform.js +212 -123
  120. package/plugins/ship/lib/platform/detection-configs.js +93 -0
  121. package/plugins/ship/lib/platform/verify-tools.js +10 -1
  122. package/plugins/ship/lib/schemas/README.md +195 -0
  123. package/plugins/ship/lib/schemas/validator.js +205 -0
  124. package/plugins/ship/lib/sources/custom-handler.js +199 -0
  125. package/plugins/ship/lib/sources/policy-questions.js +239 -0
  126. package/plugins/ship/lib/sources/source-cache.js +149 -0
  127. package/plugins/ship/lib/state/workflow-state.js +382 -484
  128. package/plugins/ship/lib/types/README.md +292 -0
  129. package/plugins/ship/lib/types/agent-frontmatter.d.ts +134 -0
  130. package/plugins/ship/lib/types/command-frontmatter.d.ts +107 -0
  131. package/plugins/ship/lib/types/hook-frontmatter.d.ts +115 -0
  132. package/plugins/ship/lib/types/index.d.ts +84 -0
  133. package/plugins/ship/lib/types/plugin-manifest.d.ts +102 -0
  134. package/plugins/ship/lib/types/skill-frontmatter.d.ts +89 -0
  135. package/plugins/ship/lib/utils/cache-manager.js +154 -0
  136. package/plugins/ship/lib/utils/context-optimizer.js +115 -37
  137. package/plugins/ship/lib/utils/deprecation.js +37 -0
  138. package/plugins/ship/lib/utils/shell-escape.js +88 -0
  139. package/lib/state/workflow-state.schema.json +0 -282
  140. package/plugins/deslop-around/lib/state/workflow-state.schema.json +0 -282
  141. package/plugins/next-task/agents/policy-selector.md +0 -248
  142. package/plugins/next-task/lib/state/tasks-registry.schema.json +0 -85
  143. package/plugins/next-task/lib/state/workflow-state.schema.json +0 -282
  144. package/plugins/next-task/lib/state/worktree-status.schema.json +0 -219
  145. package/plugins/project-review/lib/state/workflow-state.schema.json +0 -282
  146. package/plugins/ship/lib/state/workflow-state.schema.json +0 -282
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Deprecation Warning Utility
3
+ * Centralized utility for handling deprecation warnings across the codebase
4
+ *
5
+ * @author Avi Fenesh
6
+ * @license MIT
7
+ */
8
+
9
+ // Track which functions have already shown deprecation warnings (once per function)
10
+ const _deprecationWarned = new Set();
11
+
12
+ /**
13
+ * Show deprecation warning for sync functions (once per function name)
14
+ * @param {string} funcName - Name of the deprecated sync function
15
+ * @param {string} asyncAlt - Name of the async alternative
16
+ */
17
+ function warnDeprecation(funcName, asyncAlt) {
18
+ if (_deprecationWarned.has(funcName)) return;
19
+ _deprecationWarned.add(funcName);
20
+ console.warn(
21
+ `DEPRECATED: ${funcName}() is synchronous and blocks the event loop. ` +
22
+ `Use ${asyncAlt}() instead. Will be removed in v3.0.0.`
23
+ );
24
+ }
25
+
26
+ /**
27
+ * Reset deprecation warnings (for testing only)
28
+ * @private
29
+ */
30
+ function _resetDeprecationWarnings() {
31
+ _deprecationWarned.clear();
32
+ }
33
+
34
+ module.exports = {
35
+ warnDeprecation,
36
+ _resetDeprecationWarnings
37
+ };
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Shell Escaping Utilities
3
+ * Centralized string escaping functions for safe shell command construction
4
+ *
5
+ * @module lib/utils/shell-escape
6
+ * @author Avi Fenesh
7
+ * @license MIT
8
+ */
9
+
10
+ /**
11
+ * Escape shell special characters for safe command interpolation
12
+ * Handles all dangerous shell metacharacters including command injection vectors
13
+ * Optimized: uses single regex test instead of multiple .includes() calls
14
+ * @param {string} str - String to escape
15
+ * @returns {string} Escaped string safe for shell use
16
+ * @throws {Error} If string contains null bytes or newlines
17
+ */
18
+ function escapeShell(str) {
19
+ if (typeof str !== 'string') return '';
20
+
21
+ // Reject null bytes and newlines which could be used for injection
22
+ // Optimized: single regex test instead of 3 separate .includes() scans
23
+ // Use \x00 instead of \0 for better portability across JS engines
24
+ if (/[\x00\n\r]/.test(str)) {
25
+ throw new Error('Input contains invalid characters (null bytes or newlines)');
26
+ }
27
+
28
+ // Escape all shell metacharacters: " $ ` \ ! ; | & > < ( ) { } [ ] * ? ~ # ' space tab
29
+ return str.replace(/["\$`\\!;|&><(){}[\]*?~#'\s]/g, '\\$&');
30
+ }
31
+
32
+ /**
33
+ * Escape single quotes for shell (replace ' with '\''
34
+ * Use this for strings that will be wrapped in single quotes
35
+ * @param {string} str - String to escape
36
+ * @returns {string} Escaped string safe for single-quoted shell use
37
+ */
38
+ function escapeSingleQuotes(str) {
39
+ if (typeof str !== 'string') return '';
40
+ return str.replace(/'/g, "'\\''");
41
+ }
42
+
43
+ /**
44
+ * Validate and sanitize file extension
45
+ * Removes all non-alphanumeric characters
46
+ * @param {string} ext - Extension to validate
47
+ * @returns {string} Safe extension (alphanumeric only), defaults to 'ts' if empty
48
+ */
49
+ function sanitizeExtension(ext) {
50
+ if (typeof ext !== 'string') return 'ts';
51
+ const safe = ext.replace(/[^a-zA-Z0-9]/g, '');
52
+ return safe || 'ts';
53
+ }
54
+
55
+ /**
56
+ * Escape a string for use in a double-quoted shell context
57
+ * More permissive than escapeShell but still safe
58
+ * @param {string} str - String to escape
59
+ * @returns {string} Escaped string safe for double-quoted shell use
60
+ */
61
+ function escapeDoubleQuotes(str) {
62
+ if (typeof str !== 'string') return '';
63
+
64
+ // In double quotes, we need to escape: $ ` " \ and newlines
65
+ return str.replace(/[$`"\\\n]/g, '\\$&');
66
+ }
67
+
68
+ /**
69
+ * Quote a string for safe shell use
70
+ * Wraps in single quotes and escapes any embedded single quotes
71
+ * This is often safer than escapeShell for complex strings
72
+ * @param {string} str - String to quote
73
+ * @returns {string} Safely quoted string
74
+ */
75
+ function quoteShell(str) {
76
+ if (typeof str !== 'string') return "''";
77
+
78
+ // Wrap in single quotes and escape any embedded single quotes
79
+ return "'" + str.replace(/'/g, "'\\''") + "'";
80
+ }
81
+
82
+ module.exports = {
83
+ escapeShell,
84
+ escapeSingleQuotes,
85
+ sanitizeExtension,
86
+ escapeDoubleQuotes,
87
+ quoteShell
88
+ };
@@ -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
- }
@@ -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
- }