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.
- package/.claude-plugin/marketplace.json +6 -6
- package/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +123 -1
- package/README.md +186 -159
- package/SECURITY.md +25 -81
- package/adapters/codex/install.sh +58 -16
- package/adapters/opencode/install.sh +92 -23
- package/lib/index.js +47 -4
- package/lib/patterns/review-patterns.js +58 -11
- package/lib/patterns/slop-patterns.js +154 -147
- package/lib/platform/detect-platform.js +99 -350
- package/lib/platform/detection-configs.js +93 -0
- package/lib/platform/state-dir.js +122 -0
- package/lib/platform/verify-tools.js +10 -78
- package/lib/schemas/README.md +195 -0
- package/lib/schemas/validator.js +247 -0
- package/lib/sources/custom-handler.js +199 -0
- package/lib/sources/policy-questions.js +239 -0
- package/lib/sources/source-cache.js +164 -0
- package/lib/state/workflow-state.js +368 -665
- package/lib/types/README.md +292 -0
- package/lib/types/agent-frontmatter.d.ts +134 -0
- package/lib/types/command-frontmatter.d.ts +107 -0
- package/lib/types/hook-frontmatter.d.ts +115 -0
- package/lib/types/index.d.ts +84 -0
- package/lib/types/plugin-manifest.d.ts +102 -0
- package/lib/types/skill-frontmatter.d.ts +89 -0
- package/lib/utils/cache-manager.js +154 -0
- package/lib/utils/context-optimizer.js +5 -36
- package/lib/utils/deprecation.js +37 -0
- package/lib/utils/shell-escape.js +88 -0
- package/mcp-server/index.js +513 -22
- package/package.json +6 -2
- package/plugins/deslop-around/.claude-plugin/plugin.json +1 -1
- package/plugins/deslop-around/lib/index.js +170 -0
- package/plugins/deslop-around/lib/patterns/review-patterns.js +58 -11
- package/plugins/deslop-around/lib/patterns/slop-patterns.js +169 -129
- package/plugins/deslop-around/lib/platform/detect-platform.js +162 -316
- package/plugins/deslop-around/lib/platform/detection-configs.js +93 -0
- package/plugins/deslop-around/lib/platform/state-dir.js +122 -0
- package/plugins/deslop-around/lib/platform/verify-tools.js +10 -78
- package/plugins/deslop-around/lib/schemas/README.md +195 -0
- package/plugins/deslop-around/lib/schemas/validator.js +247 -0
- package/plugins/deslop-around/lib/sources/custom-handler.js +199 -0
- package/plugins/deslop-around/lib/sources/policy-questions.js +239 -0
- package/plugins/deslop-around/lib/sources/source-cache.js +164 -0
- package/plugins/deslop-around/lib/state/workflow-state.js +387 -484
- package/plugins/deslop-around/lib/types/README.md +292 -0
- package/plugins/deslop-around/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/deslop-around/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/deslop-around/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/deslop-around/lib/types/index.d.ts +84 -0
- package/plugins/deslop-around/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/deslop-around/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/deslop-around/lib/utils/cache-manager.js +154 -0
- package/plugins/deslop-around/lib/utils/context-optimizer.js +115 -37
- package/plugins/deslop-around/lib/utils/deprecation.js +37 -0
- package/plugins/deslop-around/lib/utils/shell-escape.js +88 -0
- package/plugins/next-task/.claude-plugin/plugin.json +1 -1
- package/plugins/next-task/agents/delivery-validator.md +2 -2
- package/plugins/next-task/agents/implementation-agent.md +3 -4
- package/plugins/next-task/agents/planning-agent.md +77 -19
- package/plugins/next-task/agents/review-orchestrator.md +21 -122
- package/plugins/next-task/agents/task-discoverer.md +164 -23
- package/plugins/next-task/commands/next-task.md +180 -14
- package/plugins/next-task/lib/index.js +170 -0
- package/plugins/next-task/lib/patterns/review-patterns.js +58 -11
- package/plugins/next-task/lib/patterns/slop-patterns.js +169 -129
- package/plugins/next-task/lib/platform/detect-platform.js +162 -316
- package/plugins/next-task/lib/platform/detection-configs.js +93 -0
- package/plugins/next-task/lib/platform/state-dir.js +122 -0
- package/plugins/next-task/lib/platform/verify-tools.js +10 -78
- package/plugins/next-task/lib/schemas/README.md +195 -0
- package/plugins/next-task/lib/schemas/validator.js +247 -0
- package/plugins/next-task/lib/sources/custom-handler.js +199 -0
- package/plugins/next-task/lib/sources/policy-questions.js +239 -0
- package/plugins/next-task/lib/sources/source-cache.js +164 -0
- package/plugins/next-task/lib/state/workflow-state.js +387 -484
- package/plugins/next-task/lib/types/README.md +292 -0
- package/plugins/next-task/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/next-task/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/next-task/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/next-task/lib/types/index.d.ts +84 -0
- package/plugins/next-task/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/next-task/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/next-task/lib/utils/cache-manager.js +154 -0
- package/plugins/next-task/lib/utils/context-optimizer.js +115 -37
- package/plugins/next-task/lib/utils/deprecation.js +37 -0
- package/plugins/next-task/lib/utils/shell-escape.js +88 -0
- package/plugins/project-review/.claude-plugin/plugin.json +1 -1
- package/plugins/project-review/lib/index.js +170 -0
- package/plugins/project-review/lib/patterns/review-patterns.js +58 -11
- package/plugins/project-review/lib/patterns/slop-patterns.js +169 -129
- package/plugins/project-review/lib/platform/detect-platform.js +162 -316
- package/plugins/project-review/lib/platform/detection-configs.js +93 -0
- package/plugins/project-review/lib/platform/state-dir.js +122 -0
- package/plugins/project-review/lib/platform/verify-tools.js +10 -78
- package/plugins/project-review/lib/schemas/README.md +195 -0
- package/plugins/project-review/lib/schemas/validator.js +247 -0
- package/plugins/project-review/lib/sources/custom-handler.js +199 -0
- package/plugins/project-review/lib/sources/policy-questions.js +239 -0
- package/plugins/project-review/lib/sources/source-cache.js +164 -0
- package/plugins/project-review/lib/state/workflow-state.js +387 -484
- package/plugins/project-review/lib/types/README.md +292 -0
- package/plugins/project-review/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/project-review/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/project-review/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/project-review/lib/types/index.d.ts +84 -0
- package/plugins/project-review/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/project-review/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/project-review/lib/utils/cache-manager.js +154 -0
- package/plugins/project-review/lib/utils/context-optimizer.js +115 -37
- package/plugins/project-review/lib/utils/deprecation.js +37 -0
- package/plugins/project-review/lib/utils/shell-escape.js +88 -0
- package/plugins/reality-check/.claude-plugin/plugin.json +1 -1
- package/plugins/reality-check/agents/code-explorer.md +1 -1
- package/plugins/ship/.claude-plugin/plugin.json +1 -1
- package/plugins/ship/lib/index.js +170 -0
- package/plugins/ship/lib/patterns/review-patterns.js +58 -11
- package/plugins/ship/lib/patterns/slop-patterns.js +169 -129
- package/plugins/ship/lib/platform/detect-platform.js +162 -316
- package/plugins/ship/lib/platform/detection-configs.js +93 -0
- package/plugins/ship/lib/platform/state-dir.js +122 -0
- package/plugins/ship/lib/platform/verify-tools.js +10 -78
- package/plugins/ship/lib/schemas/README.md +195 -0
- package/plugins/ship/lib/schemas/validator.js +247 -0
- package/plugins/ship/lib/sources/custom-handler.js +199 -0
- package/plugins/ship/lib/sources/policy-questions.js +239 -0
- package/plugins/ship/lib/sources/source-cache.js +164 -0
- package/plugins/ship/lib/state/workflow-state.js +387 -484
- package/plugins/ship/lib/types/README.md +292 -0
- package/plugins/ship/lib/types/agent-frontmatter.d.ts +134 -0
- package/plugins/ship/lib/types/command-frontmatter.d.ts +107 -0
- package/plugins/ship/lib/types/hook-frontmatter.d.ts +115 -0
- package/plugins/ship/lib/types/index.d.ts +84 -0
- package/plugins/ship/lib/types/plugin-manifest.d.ts +102 -0
- package/plugins/ship/lib/types/skill-frontmatter.d.ts +89 -0
- package/plugins/ship/lib/utils/cache-manager.js +154 -0
- package/plugins/ship/lib/utils/context-optimizer.js +115 -37
- package/plugins/ship/lib/utils/deprecation.js +37 -0
- package/plugins/ship/lib/utils/shell-escape.js +88 -0
- package/scripts/install/codex.sh +216 -72
- package/scripts/install/opencode.sh +197 -21
- package/lib/state/workflow-state.schema.json +0 -282
- package/plugins/deslop-around/lib/state/workflow-state.schema.json +0 -282
- package/plugins/next-task/agents/policy-selector.md +0 -248
- package/plugins/next-task/lib/state/tasks-registry.schema.json +0 -85
- package/plugins/next-task/lib/state/workflow-state.schema.json +0 -282
- package/plugins/next-task/lib/state/worktree-status.schema.json +0 -219
- package/plugins/project-review/lib/state/workflow-state.schema.json +0 -282
- package/plugins/ship/lib/state/workflow-state.schema.json +0 -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
|
-
}
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: policy-selector
|
|
3
|
-
description: Configure workflow policy via checkbox selection. Use this agent at the start of /next-task to gather user preferences for task source, priority, and stopping point.
|
|
4
|
-
tools: Read, Bash(git:*)
|
|
5
|
-
model: haiku
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Policy Selector Agent
|
|
9
|
-
|
|
10
|
-
You configure the workflow policy by presenting options to the user via AskUserQuestion.
|
|
11
|
-
The first option in each group is always "Continue with defaults" to minimize friction.
|
|
12
|
-
|
|
13
|
-
## Phase 1: Check for Existing Policy
|
|
14
|
-
|
|
15
|
-
First, check if there's an existing workflow or saved preferences:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
# Check for active workflow
|
|
19
|
-
WORKFLOW_STATE=".claude/workflow-state.json"
|
|
20
|
-
if [ -f "$WORKFLOW_STATE" ]; then
|
|
21
|
-
CURRENT_STATUS=$(cat "$WORKFLOW_STATE" | jq -r '.workflow.status')
|
|
22
|
-
if [ "$CURRENT_STATUS" = "in_progress" ] || [ "$CURRENT_STATUS" = "paused" ]; then
|
|
23
|
-
echo "ACTIVE_WORKFLOW=true"
|
|
24
|
-
echo "CURRENT_PHASE=$(cat "$WORKFLOW_STATE" | jq -r '.phases.current')"
|
|
25
|
-
echo "TASK_TITLE=$(cat "$WORKFLOW_STATE" | jq -r '.task.title // empty')"
|
|
26
|
-
fi
|
|
27
|
-
fi
|
|
28
|
-
|
|
29
|
-
# Check for saved preferences
|
|
30
|
-
PREFS_FILE=".claude/next-task.local.md"
|
|
31
|
-
if [ -f "$PREFS_FILE" ]; then
|
|
32
|
-
echo "HAS_SAVED_PREFS=true"
|
|
33
|
-
fi
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
## Phase 2: Detect Available Sources
|
|
37
|
-
|
|
38
|
-
Detect what task sources are available:
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
# Check GitHub
|
|
42
|
-
if gh issue list --limit 1 &>/dev/null; then
|
|
43
|
-
ISSUE_COUNT=$(gh issue list --state open --json number | jq length)
|
|
44
|
-
echo "GH_ISSUES_AVAILABLE=true"
|
|
45
|
-
echo "GH_ISSUES_COUNT=$ISSUE_COUNT"
|
|
46
|
-
fi
|
|
47
|
-
|
|
48
|
-
# Check for Linear integration
|
|
49
|
-
if gh issue list --json body --limit 5 | grep -q "linear.app"; then
|
|
50
|
-
echo "LINEAR_DETECTED=true"
|
|
51
|
-
fi
|
|
52
|
-
|
|
53
|
-
# Check for PLAN.md or tasks.md
|
|
54
|
-
if [ -f "PLAN.md" ] || [ -f "tasks.md" ] || [ -f "TODO.md" ]; then
|
|
55
|
-
echo "TASK_FILE_AVAILABLE=true"
|
|
56
|
-
fi
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Phase 3: Present Policy Questions
|
|
60
|
-
|
|
61
|
-
Use AskUserQuestion to present checkbox options:
|
|
62
|
-
|
|
63
|
-
```javascript
|
|
64
|
-
AskUserQuestion({
|
|
65
|
-
questions: [
|
|
66
|
-
{
|
|
67
|
-
header: "Task Source",
|
|
68
|
-
question: "Where should I look for tasks?",
|
|
69
|
-
options: [
|
|
70
|
-
{
|
|
71
|
-
label: "Continue with defaults (Recommended)",
|
|
72
|
-
description: "Use GitHub Issues from this repository"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
label: "GitHub Issues",
|
|
76
|
-
description: `${GH_ISSUES_COUNT} open issues available`
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
label: "Linear",
|
|
80
|
-
description: LINEAR_DETECTED ? "Linear integration detected" : "Requires Linear MCP"
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
label: "PLAN.md / tasks.md",
|
|
84
|
-
description: TASK_FILE_AVAILABLE ? "Task file found" : "No task file detected"
|
|
85
|
-
}
|
|
86
|
-
],
|
|
87
|
-
multiSelect: false
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
header: "Priority",
|
|
91
|
-
question: "What type of tasks should I prioritize?",
|
|
92
|
-
options: [
|
|
93
|
-
{
|
|
94
|
-
label: "Continue (Recommended)",
|
|
95
|
-
description: "Resume last task or pick next by priority score"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
label: "Bugs",
|
|
99
|
-
description: "Focus on bug fixes and issues"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
label: "Security",
|
|
103
|
-
description: "Security issues get highest priority"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
label: "Features",
|
|
107
|
-
description: "New feature development"
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
multiSelect: false
|
|
111
|
-
},
|
|
112
|
-
{
|
|
113
|
-
header: "Stop Point",
|
|
114
|
-
question: "How far should I take this task?",
|
|
115
|
-
options: [
|
|
116
|
-
{
|
|
117
|
-
label: "Merged (Recommended)",
|
|
118
|
-
description: "Complete workflow until PR is merged to main"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
label: "Implemented",
|
|
122
|
-
description: "Stop after implementation and local tests"
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
label: "PR Created",
|
|
126
|
-
description: "Stop after creating the pull request"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
label: "All Green",
|
|
130
|
-
description: "Stop when CI passes, before merge"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
label: "Deployed",
|
|
134
|
-
description: "Deploy to staging/development"
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
label: "Production",
|
|
138
|
-
description: "Full deployment to production"
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
multiSelect: false
|
|
142
|
-
}
|
|
143
|
-
]
|
|
144
|
-
})
|
|
145
|
-
```
|
|
146
|
-
|
|
147
|
-
## Phase 4: Handle Active Workflow
|
|
148
|
-
|
|
149
|
-
If there's an active workflow, ask if user wants to resume or start fresh:
|
|
150
|
-
|
|
151
|
-
```javascript
|
|
152
|
-
if (ACTIVE_WORKFLOW) {
|
|
153
|
-
AskUserQuestion({
|
|
154
|
-
questions: [
|
|
155
|
-
{
|
|
156
|
-
header: "Active Workflow",
|
|
157
|
-
question: `Found active workflow: "${TASK_TITLE}" at phase ${CURRENT_PHASE}. What would you like to do?`,
|
|
158
|
-
options: [
|
|
159
|
-
{
|
|
160
|
-
label: "Resume (Recommended)",
|
|
161
|
-
description: "Continue from where you left off"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
label: "Start Fresh",
|
|
165
|
-
description: "Abort current workflow and start new task selection"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
label: "View Status",
|
|
169
|
-
description: "Show current workflow status without changes"
|
|
170
|
-
}
|
|
171
|
-
],
|
|
172
|
-
multiSelect: false
|
|
173
|
-
}
|
|
174
|
-
]
|
|
175
|
-
})
|
|
176
|
-
}
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
## Phase 5: Map Responses to Policy
|
|
180
|
-
|
|
181
|
-
Map user selections to policy values:
|
|
182
|
-
|
|
183
|
-
```javascript
|
|
184
|
-
const MAPS = {
|
|
185
|
-
source: { 'Continue with defaults (Recommended)': 'gh-issues', 'GitHub Issues': 'gh-issues', 'Linear': 'linear', 'PLAN.md / tasks.md': 'tasks-md' },
|
|
186
|
-
priority: { 'Continue (Recommended)': 'continue', 'Bugs': 'bugs', 'Security': 'security', 'Features': 'features' },
|
|
187
|
-
stop: { 'Merged (Recommended)': 'merged', 'Implemented': 'implemented', 'PR Created': 'pr-created', 'All Green': 'all-green', 'Deployed': 'deployed', 'Production': 'production' }
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
function mapToPolicy(responses) {
|
|
191
|
-
return {
|
|
192
|
-
taskSource: MAPS.source[responses.taskSource] || 'gh-issues',
|
|
193
|
-
priorityFilter: MAPS.priority[responses.priority] || 'continue',
|
|
194
|
-
stoppingPoint: MAPS.stop[responses.stopPoint] || 'merged',
|
|
195
|
-
mergeStrategy: 'squash',
|
|
196
|
-
autoFix: true,
|
|
197
|
-
maxReviewIterations: 3
|
|
198
|
-
};
|
|
199
|
-
}
|
|
200
|
-
```
|
|
201
|
-
|
|
202
|
-
## Phase 6: Initialize State
|
|
203
|
-
|
|
204
|
-
Create or update workflow state with policy:
|
|
205
|
-
|
|
206
|
-
```javascript
|
|
207
|
-
const workflowState = require('${CLAUDE_PLUGIN_ROOT}/lib/state/workflow-state.js');
|
|
208
|
-
|
|
209
|
-
// Create new workflow with policy
|
|
210
|
-
const state = workflowState.createState('next-task', policy);
|
|
211
|
-
workflowState.writeState(state);
|
|
212
|
-
|
|
213
|
-
// Start policy-selection phase
|
|
214
|
-
workflowState.startPhase('policy-selection');
|
|
215
|
-
|
|
216
|
-
// Complete policy-selection phase
|
|
217
|
-
workflowState.completePhase({ policySet: true, policy });
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
## Output
|
|
221
|
-
|
|
222
|
-
After policy selection, report:
|
|
223
|
-
|
|
224
|
-
```markdown
|
|
225
|
-
## Workflow Configuration
|
|
226
|
-
|
|
227
|
-
**Task Source**: ${policy.taskSource}
|
|
228
|
-
**Priority Filter**: ${policy.priorityFilter}
|
|
229
|
-
**Stopping Point**: ${policy.stoppingPoint}
|
|
230
|
-
**Merge Strategy**: ${policy.mergeStrategy}
|
|
231
|
-
|
|
232
|
-
Proceeding to task discovery...
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
## Success Criteria
|
|
236
|
-
|
|
237
|
-
- User sees clear checkbox options
|
|
238
|
-
- First option is always "Continue with defaults"
|
|
239
|
-
- Policy is saved to workflow state
|
|
240
|
-
- Phase advances to task-discovery
|
|
241
|
-
|
|
242
|
-
## Model Choice: Haiku
|
|
243
|
-
|
|
244
|
-
This agent uses **haiku** because:
|
|
245
|
-
- Displays pre-defined checkbox options (no reasoning needed)
|
|
246
|
-
- Simply captures user selections and saves to state
|
|
247
|
-
- No complex analysis or decision-making
|
|
248
|
-
- Fast response improves UX for interactive prompts
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "tasks-registry.schema.json",
|
|
4
|
-
"title": "Tasks Registry",
|
|
5
|
-
"description": "Registry of claimed/in-progress tasks in the main repo. Used to prevent task collisions across parallel workflows.",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"required": ["version", "tasks"],
|
|
8
|
-
"properties": {
|
|
9
|
-
"version": {
|
|
10
|
-
"type": "string",
|
|
11
|
-
"pattern": "^\\d+\\.\\d+\\.\\d+$",
|
|
12
|
-
"description": "Schema version",
|
|
13
|
-
"default": "1.0.0"
|
|
14
|
-
},
|
|
15
|
-
"tasks": {
|
|
16
|
-
"type": "array",
|
|
17
|
-
"description": "List of claimed tasks",
|
|
18
|
-
"items": {
|
|
19
|
-
"type": "object",
|
|
20
|
-
"required": ["id", "source", "branch", "worktreePath", "claimedAt"],
|
|
21
|
-
"properties": {
|
|
22
|
-
"id": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"description": "Task identifier (issue number, Linear ID, etc.)"
|
|
25
|
-
},
|
|
26
|
-
"source": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"enum": ["github", "linear", "tasks-md", "manual"],
|
|
29
|
-
"description": "Where the task came from"
|
|
30
|
-
},
|
|
31
|
-
"title": {
|
|
32
|
-
"type": "string",
|
|
33
|
-
"description": "Task title for display"
|
|
34
|
-
},
|
|
35
|
-
"branch": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"description": "Git branch name for this task"
|
|
38
|
-
},
|
|
39
|
-
"worktreePath": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"description": "Absolute path to the worktree"
|
|
42
|
-
},
|
|
43
|
-
"claimedAt": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"format": "date-time",
|
|
46
|
-
"description": "When the task was claimed"
|
|
47
|
-
},
|
|
48
|
-
"claimedBy": {
|
|
49
|
-
"type": "string",
|
|
50
|
-
"description": "Session/workflow ID that claimed this task"
|
|
51
|
-
},
|
|
52
|
-
"status": {
|
|
53
|
-
"type": "string",
|
|
54
|
-
"enum": ["claimed", "in-progress", "review", "shipping", "done"],
|
|
55
|
-
"default": "claimed",
|
|
56
|
-
"description": "High-level task status"
|
|
57
|
-
},
|
|
58
|
-
"lastActivityAt": {
|
|
59
|
-
"type": "string",
|
|
60
|
-
"format": "date-time",
|
|
61
|
-
"description": "Last activity timestamp for stale detection"
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
"examples": [
|
|
68
|
-
{
|
|
69
|
-
"version": "1.0.0",
|
|
70
|
-
"tasks": [
|
|
71
|
-
{
|
|
72
|
-
"id": "123",
|
|
73
|
-
"source": "github",
|
|
74
|
-
"title": "Add user authentication",
|
|
75
|
-
"branch": "feature/add-user-authentication-123",
|
|
76
|
-
"worktreePath": "/path/to/repo/../worktrees/add-user-authentication-123",
|
|
77
|
-
"claimedAt": "2024-01-15T10:30:00Z",
|
|
78
|
-
"claimedBy": "workflow-20240115-103000-abc123",
|
|
79
|
-
"status": "in-progress",
|
|
80
|
-
"lastActivityAt": "2024-01-15T11:45:00Z"
|
|
81
|
-
}
|
|
82
|
-
]
|
|
83
|
-
}
|
|
84
|
-
]
|
|
85
|
-
}
|