@lmctl-ai/lmctl 0.1.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 (29) hide show
  1. package/LICENSE +36 -0
  2. package/README.md +36 -0
  3. package/bin/lmctl +4 -0
  4. package/dist/cli/index.js +2180 -0
  5. package/dist/cli/schema.sql +660 -0
  6. package/dist/cli/side_effect_classifier.json +19 -0
  7. package/dist/config/ai_test_templates/example-test.md.template +50 -0
  8. package/dist/config/ai_test_templates/index.md.template +27 -0
  9. package/dist/config/durable_memory_templates/index.md.template +29 -0
  10. package/dist/config/durable_memory_templates/skills_general.md.template +42 -0
  11. package/dist/config/durable_memory_templates/skills_lmdebug.md.template +31 -0
  12. package/dist/config/durable_memory_templates/skills_lmprobe.md.template +31 -0
  13. package/package.json +42 -0
  14. package/workflows/bugfix-extended-v2.compound.json +1018 -0
  15. package/workflows/bugfix-v2.compound.json +856 -0
  16. package/workflows/claim-check-spike-v2.compound.json +136 -0
  17. package/workflows/document-creation.compound.json +200 -0
  18. package/workflows/durable-memory-consolidation-v2.compound.json +185 -0
  19. package/workflows/example-v2.compound.json +200 -0
  20. package/workflows/image-qa.compound.json +128 -0
  21. package/workflows/index.jsonl +15 -0
  22. package/workflows/info-qa.compound.json +120 -0
  23. package/workflows/newspaper.compound.json +129 -0
  24. package/workflows/pr-fix.compound.json +183 -0
  25. package/workflows/pr-followup-v2.compound.json +969 -0
  26. package/workflows/provider-probe.compound.json +107 -0
  27. package/workflows/qa-suite.compound.json +186 -0
  28. package/workflows/spec-driven-task.compound.json +460 -0
  29. package/workflows/triage-v2.compound.json +721 -0
@@ -0,0 +1,460 @@
1
+ {
2
+ "schema_version": "lmctl/v3",
3
+ "definition_schema_version": 3,
4
+ "name": "spec-driven-task",
5
+ "version": 1,
6
+ "description": "Turns a written task specification into project changes through agent implementation, review, and verification.",
7
+ "estimated_duration_ms": 300000,
8
+ "inputs": [
9
+ {
10
+ "name": "task_description",
11
+ "type": "string",
12
+ "required": true,
13
+ "description": "What the operator wants built or changed."
14
+ },
15
+ {
16
+ "name": "slug",
17
+ "type": "string",
18
+ "required": true,
19
+ "description": "Directory name under specs/ for stage artifacts."
20
+ },
21
+ {
22
+ "name": "from_requirement",
23
+ "type": "string",
24
+ "required": false,
25
+ "description": "Existing requirement.md path; skips requirement elicitation when set."
26
+ },
27
+ {
28
+ "name": "from_plan",
29
+ "type": "string",
30
+ "required": false,
31
+ "description": "Existing plan.md path; skips plan creation when set."
32
+ },
33
+ {
34
+ "name": "from_design",
35
+ "type": "string",
36
+ "required": false,
37
+ "description": "Existing design.md path; skips design dialogue when set."
38
+ }
39
+ ],
40
+ "steps": [
41
+ {
42
+ "id": "s-from-requirement-1a01",
43
+ "name": "from_requirement?",
44
+ "type": "lmctl/choice",
45
+ "typeVersion": 1,
46
+ "parameters": {
47
+ "branches": [
48
+ {
49
+ "when": "={{ context.inputs.from_requirement != null && context.inputs.from_requirement != \"\" }}",
50
+ "next": "@terminal:skip"
51
+ }
52
+ ],
53
+ "default_next": "@terminal:run"
54
+ }
55
+ },
56
+ {
57
+ "id": "s-requirement-1a02",
58
+ "name": "requirement",
59
+ "type": "lmctl/interactive",
60
+ "typeVersion": 1,
61
+ "parameters": {
62
+ "termination": {
63
+ "operator_signal": true,
64
+ "agent_signal": "SPEC_STAGE_DONE",
65
+ "max_turns": 8
66
+ },
67
+ "artifact_name": "requirement_md",
68
+ "durable_memory_tags": [
69
+ "code",
70
+ "requirements"
71
+ ]
72
+ },
73
+ "members": {
74
+ "agent": {
75
+ "team": "default",
76
+ "alias": "Coder",
77
+ "initial_prompt_template": "You are collecting requirements for this task in {{project.local_path}}.\n\nTask: ={{ context.inputs.task_description }}\nSpec slug: ={{ context.inputs.slug }}\n\nInterview the operator until the requirement is clear. When ready, produce the complete Markdown content for specs/={{ context.inputs.slug }}/requirement.md in your response and include SPEC_STAGE_DONE."
78
+ }
79
+ }
80
+ },
81
+ {
82
+ "id": "s-from-plan-2a01",
83
+ "name": "from_plan?",
84
+ "type": "lmctl/choice",
85
+ "typeVersion": 1,
86
+ "parameters": {
87
+ "branches": [
88
+ {
89
+ "when": "={{ context.inputs.from_plan != null && context.inputs.from_plan != \"\" }}",
90
+ "next": "@terminal:skip"
91
+ }
92
+ ],
93
+ "default_next": "@terminal:run"
94
+ }
95
+ },
96
+ {
97
+ "id": "s-plan-2a02",
98
+ "name": "plan",
99
+ "type": "lmctl/review",
100
+ "typeVersion": 1,
101
+ "parameters": {
102
+ "writes_to_project_path": true,
103
+ "max_loops": 1
104
+ },
105
+ "members": {
106
+ "coder": {
107
+ "team": "default",
108
+ "alias": "Coder",
109
+ "prompt_template": "Create a technical plan for this task.\n\nTask: ={{ context.inputs.task_description }}\nRequirement source: ={{ context.inputs.from_requirement || 'requirement stage output' }}\nProject: {{project.local_path}}\n\nWrite the plan to {{project.local_path}}/specs/={{ context.inputs.slug }}/plan.md. Create the directory if needed. Keep it concise and implementation-oriented."
110
+ },
111
+ "reviewers": []
112
+ }
113
+ },
114
+ {
115
+ "id": "s-from-design-3a01",
116
+ "name": "from_design?",
117
+ "type": "lmctl/choice",
118
+ "typeVersion": 1,
119
+ "parameters": {
120
+ "branches": [
121
+ {
122
+ "when": "={{ context.inputs.from_design != null && context.inputs.from_design != \"\" }}",
123
+ "next": "@terminal:skip"
124
+ }
125
+ ],
126
+ "default_next": "@terminal:run"
127
+ }
128
+ },
129
+ {
130
+ "id": "s-design-3a02",
131
+ "name": "design",
132
+ "type": "lmctl/interactive",
133
+ "typeVersion": 1,
134
+ "parameters": {
135
+ "termination": {
136
+ "operator_signal": true,
137
+ "agent_signal": "SPEC_STAGE_DONE",
138
+ "max_turns": 8
139
+ },
140
+ "artifact_name": "design_md",
141
+ "durable_memory_tags": [
142
+ "code",
143
+ "design"
144
+ ]
145
+ },
146
+ "members": {
147
+ "agent": {
148
+ "team": "default",
149
+ "alias": "Coder",
150
+ "initial_prompt_template": "You are refining the design for this task in {{project.local_path}}.\n\nTask: ={{ context.inputs.task_description }}\nSpec slug: ={{ context.inputs.slug }}\nPlan source: ={{ context.inputs.from_plan || 'plan.md from the prior stage' }}\n\nAsk targeted design questions. When ready, produce the complete Markdown content for specs/={{ context.inputs.slug }}/design.md in your response and include SPEC_STAGE_DONE."
151
+ }
152
+ }
153
+ },
154
+ {
155
+ "id": "s-design-review-4a01",
156
+ "name": "design-review",
157
+ "type": "lmctl/review",
158
+ "typeVersion": 1,
159
+ "parameters": {
160
+ "writes_to_project_path": true,
161
+ "max_loops": 3,
162
+ "loop_feedback_artifact": "design_review_feedback"
163
+ },
164
+ "members": {
165
+ "coder": {
166
+ "team": "default",
167
+ "alias": "Coder",
168
+ "prompt_template": "Review and tighten the design for this task.\n\nTask: ={{ context.inputs.task_description }}\nDesign source: ={{ context.inputs.from_design || 'design stage output' }}\nProject: {{project.local_path}}\n\nWrite review notes to {{project.local_path}}/specs/={{ context.inputs.slug }}/design-review.md. End with a concise summary for reviewers."
169
+ },
170
+ "reviewers": [
171
+ {
172
+ "team": "default",
173
+ "alias": "Reviewer",
174
+ "prompt_template": "Review the design notes. Respond with STANCE: approve if the design is implementable and appropriately scoped; otherwise STANCE: request_changes followed by concrete feedback."
175
+ }
176
+ ]
177
+ }
178
+ },
179
+ {
180
+ "id": "s-implementation-5a01",
181
+ "name": "implementation",
182
+ "type": "lmctl/review",
183
+ "typeVersion": 1,
184
+ "parameters": {
185
+ "writes_to_project_path": true,
186
+ "max_loops": 5,
187
+ "loop_feedback_artifact": "implementation_feedback"
188
+ },
189
+ "members": {
190
+ "coder": {
191
+ "team": "default",
192
+ "alias": "Coder",
193
+ "prompt_template": "Implement the approved spec in {{project.local_path}}.\n\nTask: ={{ context.inputs.task_description }}\nSpec directory: {{project.local_path}}/specs/={{ context.inputs.slug }}\n\nMake the smallest coherent code change, add or update focused tests, and leave the repo ready for review."
194
+ },
195
+ "reviewers": [
196
+ {
197
+ "team": "default",
198
+ "alias": "Reviewer",
199
+ "prompt_template": "Review the implementation diff and tests. Respond with STANCE: approve if it satisfies the spec; otherwise STANCE: request_changes followed by precise fixes."
200
+ }
201
+ ]
202
+ }
203
+ },
204
+ {
205
+ "id": "s-code-review-6a01",
206
+ "name": "code-review",
207
+ "type": "lmctl/review",
208
+ "typeVersion": 1,
209
+ "parameters": {
210
+ "writes_to_project_path": true,
211
+ "max_loops": 3,
212
+ "loop_feedback_artifact": "code_review_feedback"
213
+ },
214
+ "members": {
215
+ "coder": {
216
+ "team": "default",
217
+ "alias": "Coder",
218
+ "prompt_template": "Prepare the final code-review report for this spec.\n\nTask: ={{ context.inputs.task_description }}\nProject: {{project.local_path}}\n\nInspect the final diff and tests, then write {{project.local_path}}/specs/={{ context.inputs.slug }}/code-review.md with findings, verification, and residual risks."
219
+ },
220
+ "reviewers": [
221
+ {
222
+ "team": "default",
223
+ "alias": "Reviewer",
224
+ "prompt_template": "Review the final code-review report and implementation state. Respond with STANCE: approve if ready; otherwise STANCE: request_changes with exact blockers."
225
+ }
226
+ ]
227
+ }
228
+ },
229
+ {
230
+ "id": "s-terminal-done-9a01",
231
+ "name": "terminal:done",
232
+ "type": "lmctl/terminal",
233
+ "typeVersion": 1,
234
+ "parameters": {
235
+ "name": "done",
236
+ "kind": "success"
237
+ }
238
+ },
239
+ {
240
+ "id": "s-terminal-aborted-9a02",
241
+ "name": "terminal:aborted",
242
+ "type": "lmctl/terminal",
243
+ "typeVersion": 1,
244
+ "parameters": {
245
+ "name": "aborted",
246
+ "kind": "failure"
247
+ }
248
+ }
249
+ ],
250
+ "connections": {
251
+ "s-from-requirement-1a01": {
252
+ "skip": [
253
+ [
254
+ {
255
+ "step_id": "s-from-plan-2a01",
256
+ "type": "main",
257
+ "index": 0
258
+ }
259
+ ]
260
+ ],
261
+ "run": [
262
+ [
263
+ {
264
+ "step_id": "s-requirement-1a02",
265
+ "type": "main",
266
+ "index": 0
267
+ }
268
+ ]
269
+ ]
270
+ },
271
+ "s-requirement-1a02": {
272
+ "done": [
273
+ [
274
+ {
275
+ "step_id": "s-from-plan-2a01",
276
+ "type": "main",
277
+ "index": 0
278
+ }
279
+ ]
280
+ ],
281
+ "timeout": [
282
+ [
283
+ {
284
+ "step_id": "s-terminal-aborted-9a02",
285
+ "type": "main",
286
+ "index": 0
287
+ }
288
+ ]
289
+ ]
290
+ },
291
+ "s-from-plan-2a01": {
292
+ "skip": [
293
+ [
294
+ {
295
+ "step_id": "s-from-design-3a01",
296
+ "type": "main",
297
+ "index": 0
298
+ }
299
+ ]
300
+ ],
301
+ "run": [
302
+ [
303
+ {
304
+ "step_id": "s-plan-2a02",
305
+ "type": "main",
306
+ "index": 0
307
+ }
308
+ ]
309
+ ]
310
+ },
311
+ "s-plan-2a02": {
312
+ "approve": [
313
+ [
314
+ {
315
+ "step_id": "s-from-design-3a01",
316
+ "type": "main",
317
+ "index": 0
318
+ }
319
+ ]
320
+ ],
321
+ "max_loops_exceeded": [
322
+ [
323
+ {
324
+ "step_id": "s-terminal-aborted-9a02",
325
+ "type": "main",
326
+ "index": 0
327
+ }
328
+ ]
329
+ ]
330
+ },
331
+ "s-from-design-3a01": {
332
+ "skip": [
333
+ [
334
+ {
335
+ "step_id": "s-design-review-4a01",
336
+ "type": "main",
337
+ "index": 0
338
+ }
339
+ ]
340
+ ],
341
+ "run": [
342
+ [
343
+ {
344
+ "step_id": "s-design-3a02",
345
+ "type": "main",
346
+ "index": 0
347
+ }
348
+ ]
349
+ ]
350
+ },
351
+ "s-design-3a02": {
352
+ "done": [
353
+ [
354
+ {
355
+ "step_id": "s-design-review-4a01",
356
+ "type": "main",
357
+ "index": 0
358
+ }
359
+ ]
360
+ ],
361
+ "timeout": [
362
+ [
363
+ {
364
+ "step_id": "s-terminal-aborted-9a02",
365
+ "type": "main",
366
+ "index": 0
367
+ }
368
+ ]
369
+ ]
370
+ },
371
+ "s-design-review-4a01": {
372
+ "approve": [
373
+ [
374
+ {
375
+ "step_id": "s-implementation-5a01",
376
+ "type": "main",
377
+ "index": 0
378
+ }
379
+ ]
380
+ ],
381
+ "request_changes": [
382
+ [
383
+ {
384
+ "step_id": "s-design-review-4a01",
385
+ "type": "main",
386
+ "index": 0
387
+ }
388
+ ]
389
+ ],
390
+ "max_loops_exceeded": [
391
+ [
392
+ {
393
+ "step_id": "s-terminal-aborted-9a02",
394
+ "type": "main",
395
+ "index": 0
396
+ }
397
+ ]
398
+ ]
399
+ },
400
+ "s-implementation-5a01": {
401
+ "approve": [
402
+ [
403
+ {
404
+ "step_id": "s-code-review-6a01",
405
+ "type": "main",
406
+ "index": 0
407
+ }
408
+ ]
409
+ ],
410
+ "request_changes": [
411
+ [
412
+ {
413
+ "step_id": "s-implementation-5a01",
414
+ "type": "main",
415
+ "index": 0
416
+ }
417
+ ]
418
+ ],
419
+ "max_loops_exceeded": [
420
+ [
421
+ {
422
+ "step_id": "s-terminal-aborted-9a02",
423
+ "type": "main",
424
+ "index": 0
425
+ }
426
+ ]
427
+ ]
428
+ },
429
+ "s-code-review-6a01": {
430
+ "approve": [
431
+ [
432
+ {
433
+ "step_id": "s-terminal-done-9a01",
434
+ "type": "main",
435
+ "index": 0
436
+ }
437
+ ]
438
+ ],
439
+ "request_changes": [
440
+ [
441
+ {
442
+ "step_id": "s-code-review-6a01",
443
+ "type": "main",
444
+ "index": 0
445
+ }
446
+ ]
447
+ ],
448
+ "max_loops_exceeded": [
449
+ [
450
+ {
451
+ "step_id": "s-terminal-aborted-9a02",
452
+ "type": "main",
453
+ "index": 0
454
+ }
455
+ ]
456
+ ]
457
+ }
458
+ },
459
+ "entry_step_id": "s-from-requirement-1a01"
460
+ }