@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,136 @@
1
+ {
2
+ "schema_version": "lmctl/v3",
3
+ "definition_schema_version": 3,
4
+ "name": "claim-check-spike-v2",
5
+ "version": 1,
6
+ "description": "Explores whether project issue claiming and follow-up work queues behave correctly for a small spike workflow.",
7
+ "estimated_duration_ms": 60000,
8
+ "default_task_timeout_ms": 1800000,
9
+ "steps": [
10
+ {
11
+ "id": "s-claim-check-6e5a",
12
+ "name": "claim_check",
13
+ "type": "lmctl/review",
14
+ "typeVersion": 1,
15
+ "parameters": {
16
+ "max_loops": 5
17
+ },
18
+ "members": {
19
+ "coder": {
20
+ "team": "default",
21
+ "alias": "Coder",
22
+ "prompt_template": "You are evaluating whether a GitHub issue is open and unclaimed. The job payload is JSON with an issue_url field.\n\nJob payload:\n{{job_payload}}\n\nSteps:\n1. Run `gh issue view <issue_url> --json state,assignees,labels,comments --jq '{state, assignees: [.assignees[].login], labels: [.labels[].name], comments: [.comments[] | {author: .author.login, body: .body[0:200]}]}'` and read the result.\n2. Decide one of these outcomes:\n - `open`: state is open and no human assignee is actively working it (auto-triage assignees are OK; comments do not say \"working on this\")\n - `claimed`: state is open and a human says they're working on it OR an active assignee has commented within the last 7 days\n - `dup_pr_active`: comments mention an open PR addressing this issue\n - `closed`: state is closed\n - `failed`: gh call errored or output is malformed\n3. Reply with prose explaining your reading, then close with `STANCE: <outcome>`.\n\nOnly output one final STANCE line."
23
+ }
24
+ }
25
+ },
26
+ {
27
+ "id": "s-terminal-aborted-34b4",
28
+ "name": "terminal:aborted",
29
+ "type": "lmctl/terminal",
30
+ "typeVersion": 1,
31
+ "parameters": {
32
+ "name": "aborted",
33
+ "kind": "failure"
34
+ }
35
+ },
36
+ {
37
+ "id": "s-terminal-open-3378",
38
+ "name": "terminal:open",
39
+ "type": "lmctl/terminal",
40
+ "typeVersion": 1,
41
+ "parameters": {
42
+ "name": "open",
43
+ "kind": "success"
44
+ }
45
+ },
46
+ {
47
+ "id": "s-terminal-claimed-f484",
48
+ "name": "terminal:claimed",
49
+ "type": "lmctl/terminal",
50
+ "typeVersion": 1,
51
+ "parameters": {
52
+ "name": "claimed",
53
+ "kind": "neutral"
54
+ }
55
+ },
56
+ {
57
+ "id": "s-terminal-dup-pr-active-77cd",
58
+ "name": "terminal:dup_pr_active",
59
+ "type": "lmctl/terminal",
60
+ "typeVersion": 1,
61
+ "parameters": {
62
+ "name": "dup_pr_active",
63
+ "kind": "neutral"
64
+ }
65
+ },
66
+ {
67
+ "id": "s-terminal-closed-f026",
68
+ "name": "terminal:closed",
69
+ "type": "lmctl/terminal",
70
+ "typeVersion": 1,
71
+ "parameters": {
72
+ "name": "closed",
73
+ "kind": "neutral"
74
+ }
75
+ }
76
+ ],
77
+ "connections": {
78
+ "s-claim-check-6e5a": {
79
+ "approve": [
80
+ [
81
+ {
82
+ "step_id": "s-terminal-aborted-34b4",
83
+ "type": "main",
84
+ "index": 0
85
+ }
86
+ ]
87
+ ],
88
+ "open": [
89
+ [
90
+ {
91
+ "step_id": "s-terminal-open-3378",
92
+ "type": "main",
93
+ "index": 0
94
+ }
95
+ ]
96
+ ],
97
+ "claimed": [
98
+ [
99
+ {
100
+ "step_id": "s-terminal-claimed-f484",
101
+ "type": "main",
102
+ "index": 0
103
+ }
104
+ ]
105
+ ],
106
+ "dup_pr_active": [
107
+ [
108
+ {
109
+ "step_id": "s-terminal-dup-pr-active-77cd",
110
+ "type": "main",
111
+ "index": 0
112
+ }
113
+ ]
114
+ ],
115
+ "closed": [
116
+ [
117
+ {
118
+ "step_id": "s-terminal-closed-f026",
119
+ "type": "main",
120
+ "index": 0
121
+ }
122
+ ]
123
+ ],
124
+ "failed": [
125
+ [
126
+ {
127
+ "step_id": "s-terminal-aborted-34b4",
128
+ "type": "main",
129
+ "index": 0
130
+ }
131
+ ]
132
+ ]
133
+ }
134
+ },
135
+ "entry_step_id": "s-claim-check-6e5a"
136
+ }
@@ -0,0 +1,200 @@
1
+ {
2
+ "schema_version": "lmctl/v3",
3
+ "definition_schema_version": 3,
4
+ "name": "document-creation",
5
+ "version": 1,
6
+ "description": "Creates or revises a project document through agent drafting and review, then writes the accepted document to the project.",
7
+ "estimated_duration_ms": 120000,
8
+ "errors": {
9
+ "on_unhandled_failure": {
10
+ "attention_kind": "workflow_failed",
11
+ "severity": "error",
12
+ "capture_evidence": true
13
+ }
14
+ },
15
+ "inputs": [
16
+ {
17
+ "name": "task_description",
18
+ "type": "string",
19
+ "required": true,
20
+ "description": "Document request."
21
+ },
22
+ {
23
+ "name": "slug",
24
+ "type": "string",
25
+ "required": true,
26
+ "description": "Filesystem-safe document slug."
27
+ },
28
+ {
29
+ "name": "output_dir",
30
+ "type": "string",
31
+ "required": false,
32
+ "description": "Optional output directory for markdown draft artifacts."
33
+ }
34
+ ],
35
+ "outputs": [
36
+ {
37
+ "name": "document_md",
38
+ "type": "string",
39
+ "source_step_id": "s-review-document-0d4a",
40
+ "source_field": "output",
41
+ "description": "Reviewed markdown document."
42
+ },
43
+ {
44
+ "name": "document_docx",
45
+ "type": "string",
46
+ "source_step_id": "s-render-docx-a02a",
47
+ "source_field": "output_path",
48
+ "description": "Rendered DOCX output path."
49
+ }
50
+ ],
51
+ "steps": [
52
+ {
53
+ "id": "s-chat-draft-9c12",
54
+ "name": "chat",
55
+ "type": "lmctl/interactive",
56
+ "typeVersion": 1,
57
+ "parameters": {
58
+ "termination": {
59
+ "operator_signal": true,
60
+ "agent_signal": "DOCUMENT_CHAT_DONE",
61
+ "max_turns": 8
62
+ },
63
+ "artifact_name": "chat_output_md"
64
+ },
65
+ "members": {
66
+ "agent": {
67
+ "team": "default",
68
+ "alias": "Coder",
69
+ "initial_prompt_template": "Work with the operator to draft a markdown document.\n\nTask: {{job_payload.task_description}}\nSlug: {{job_payload.slug}}\nOutput directory: {{job_payload.output_dir}}\n\nWhen the draft is ready for review, include DOCUMENT_CHAT_DONE in your response."
70
+ }
71
+ }
72
+ },
73
+ {
74
+ "id": "s-review-document-0d4a",
75
+ "name": "review",
76
+ "type": "lmctl/review",
77
+ "typeVersion": 1,
78
+ "parameters": {
79
+ "max_loops": 2
80
+ },
81
+ "members": {
82
+ "coder": {
83
+ "team": "default",
84
+ "alias": "Coder",
85
+ "prompt_template": "Refine the markdown draft from the chat stage into a polished document.\n\nTask: {{job_payload.task_description}}\nSlug: {{job_payload.slug}}\nOutput directory: {{job_payload.output_dir}}\n\nReturn the final markdown body and end with STANCE: done."
86
+ },
87
+ "reviewers": [
88
+ {
89
+ "team": "default",
90
+ "alias": "Reviewer",
91
+ "prompt_template": "Review the markdown document for clarity, completeness, and audience fit. Respond STANCE: approve if ready; otherwise STANCE: request_changes followed by concise revision notes."
92
+ }
93
+ ]
94
+ }
95
+ },
96
+ {
97
+ "id": "s-render-docx-a02a",
98
+ "name": "render",
99
+ "type": "lmctl/render-docx",
100
+ "typeVersion": 1,
101
+ "parameters": {
102
+ "markdown_source": "={{ context.outcomes.review.output }}",
103
+ "output_path": "={{ (context.inputs.output_dir || 'drafts') + '/' + context.inputs.slug + '.docx' }}",
104
+ "title": "={{ context.inputs.task_description }}"
105
+ }
106
+ },
107
+ {
108
+ "id": "s-terminal-done-f7c0",
109
+ "name": "terminal:done",
110
+ "type": "lmctl/terminal",
111
+ "typeVersion": 1,
112
+ "parameters": {
113
+ "name": "done",
114
+ "kind": "success"
115
+ }
116
+ },
117
+ {
118
+ "id": "s-terminal-aborted-2e91",
119
+ "name": "terminal:aborted",
120
+ "type": "lmctl/terminal",
121
+ "typeVersion": 1,
122
+ "parameters": {
123
+ "name": "aborted",
124
+ "kind": "failure"
125
+ }
126
+ }
127
+ ],
128
+ "connections": {
129
+ "s-chat-draft-9c12": {
130
+ "done": [
131
+ [
132
+ {
133
+ "step_id": "s-review-document-0d4a",
134
+ "type": "main",
135
+ "index": 0
136
+ }
137
+ ]
138
+ ],
139
+ "timeout": [
140
+ [
141
+ {
142
+ "step_id": "s-terminal-aborted-2e91",
143
+ "type": "main",
144
+ "index": 0
145
+ }
146
+ ]
147
+ ]
148
+ },
149
+ "s-review-document-0d4a": {
150
+ "approve": [
151
+ [
152
+ {
153
+ "step_id": "s-render-docx-a02a",
154
+ "type": "main",
155
+ "index": 0
156
+ }
157
+ ]
158
+ ],
159
+ "request_changes": [
160
+ [
161
+ {
162
+ "step_id": "s-review-document-0d4a",
163
+ "type": "main",
164
+ "index": 0
165
+ }
166
+ ]
167
+ ],
168
+ "max_loops_exceeded": [
169
+ [
170
+ {
171
+ "step_id": "s-terminal-aborted-2e91",
172
+ "type": "main",
173
+ "index": 0
174
+ }
175
+ ]
176
+ ]
177
+ },
178
+ "s-render-docx-a02a": {
179
+ "done": [
180
+ [
181
+ {
182
+ "step_id": "s-terminal-done-f7c0",
183
+ "type": "main",
184
+ "index": 0
185
+ }
186
+ ]
187
+ ],
188
+ "error": [
189
+ [
190
+ {
191
+ "step_id": "s-terminal-aborted-2e91",
192
+ "type": "main",
193
+ "index": 0
194
+ }
195
+ ]
196
+ ]
197
+ }
198
+ },
199
+ "entry_step_id": "s-chat-draft-9c12"
200
+ }
@@ -0,0 +1,185 @@
1
+ {
2
+ "schema_version": "lmctl/v3",
3
+ "definition_schema_version": 3,
4
+ "name": "durable-memory-consolidation-v2",
5
+ "version": 1,
6
+ "description": "Consolidates durable project memory from recent work so future sessions can recover important context quickly.",
7
+ "estimated_duration_ms": 180000,
8
+ "default_task_timeout_ms": 600000,
9
+ "steps": [
10
+ {
11
+ "id": "s-survey-93ff",
12
+ "name": "survey",
13
+ "type": "lmctl/review",
14
+ "typeVersion": 1,
15
+ "parameters": {
16
+ "max_loops": 5
17
+ },
18
+ "members": {
19
+ "coder": {
20
+ "team": "default",
21
+ "alias": "Coder",
22
+ "prompt_template": "Read `<project>/durable-memory/index.md` and the full set of entries. Identify: (a) stale entries (referring to retired work, deleted features, obsolete decisions); (b) duplicated entries (same fact spread across multiple files); (c) orphan entries (no longer relevant to the current project state). Propose changes: list which to delete, which to merge, which to update. Output STANCE: `changes_proposed` (with proposal artifact) OR `all_clean` (no work needed)."
23
+ },
24
+ "reviewers": []
25
+ }
26
+ },
27
+ {
28
+ "id": "s-review-proposal-acb3",
29
+ "name": "review_proposal",
30
+ "type": "lmctl/interactive",
31
+ "typeVersion": 1,
32
+ "parameters": {
33
+ "termination": {
34
+ "operator_signal": true,
35
+ "max_turns": 5
36
+ }
37
+ },
38
+ "members": {
39
+ "agent": {
40
+ "team": "default",
41
+ "alias": "Coder",
42
+ "initial_prompt_template": "You just surveyed the durable-memory entries and proposed consolidation changes. Walk the operator through your proposal and wait for their decision (approve / reject / request edits). When the operator responds, acknowledge and proceed accordingly."
43
+ }
44
+ }
45
+ },
46
+ {
47
+ "id": "s-apply-changes-fad1",
48
+ "name": "apply_changes",
49
+ "type": "lmctl/review",
50
+ "typeVersion": 1,
51
+ "parameters": {
52
+ "max_loops": 5
53
+ },
54
+ "members": {
55
+ "coder": {
56
+ "team": "default",
57
+ "alias": "Coder",
58
+ "prompt_template": "Apply the approved consolidation changes to durable-memory. Use Write to update or delete entries under `<project>/durable-memory/`. Output STANCE: `applied` (with a brief summary of what changed) OR `failed` (with reason)."
59
+ },
60
+ "reviewers": []
61
+ }
62
+ },
63
+ {
64
+ "id": "s-terminal-no-action-d438",
65
+ "name": "terminal:no_action",
66
+ "type": "lmctl/terminal",
67
+ "typeVersion": 1,
68
+ "parameters": {
69
+ "name": "no_action",
70
+ "kind": "success"
71
+ }
72
+ },
73
+ {
74
+ "id": "s-terminal-max-iterations-ed61",
75
+ "name": "terminal:max_iterations",
76
+ "type": "lmctl/terminal",
77
+ "typeVersion": 1,
78
+ "parameters": {
79
+ "name": "max_iterations",
80
+ "kind": "failure"
81
+ }
82
+ },
83
+ {
84
+ "id": "s-terminal-consolidated-9ef9",
85
+ "name": "terminal:consolidated",
86
+ "type": "lmctl/terminal",
87
+ "typeVersion": 1,
88
+ "parameters": {
89
+ "name": "consolidated",
90
+ "kind": "success"
91
+ }
92
+ },
93
+ {
94
+ "id": "s-terminal-apply-failed-3898",
95
+ "name": "terminal:apply_failed",
96
+ "type": "lmctl/terminal",
97
+ "typeVersion": 1,
98
+ "parameters": {
99
+ "name": "apply_failed",
100
+ "kind": "failure"
101
+ }
102
+ }
103
+ ],
104
+ "connections": {
105
+ "s-survey-93ff": {
106
+ "approve": [
107
+ [
108
+ {
109
+ "step_id": "s-terminal-no-action-d438",
110
+ "type": "main",
111
+ "index": 0
112
+ }
113
+ ]
114
+ ],
115
+ "changes_proposed": [
116
+ [
117
+ {
118
+ "step_id": "s-review-proposal-acb3",
119
+ "type": "main",
120
+ "index": 0
121
+ }
122
+ ]
123
+ ],
124
+ "all_clean": [
125
+ [
126
+ {
127
+ "step_id": "s-terminal-no-action-d438",
128
+ "type": "main",
129
+ "index": 0
130
+ }
131
+ ]
132
+ ]
133
+ },
134
+ "s-review-proposal-acb3": {
135
+ "done": [
136
+ [
137
+ {
138
+ "step_id": "s-apply-changes-fad1",
139
+ "type": "main",
140
+ "index": 0
141
+ }
142
+ ]
143
+ ],
144
+ "timeout": [
145
+ [
146
+ {
147
+ "step_id": "s-terminal-max-iterations-ed61",
148
+ "type": "main",
149
+ "index": 0
150
+ }
151
+ ]
152
+ ]
153
+ },
154
+ "s-apply-changes-fad1": {
155
+ "approve": [
156
+ [
157
+ {
158
+ "step_id": "s-terminal-consolidated-9ef9",
159
+ "type": "main",
160
+ "index": 0
161
+ }
162
+ ]
163
+ ],
164
+ "applied": [
165
+ [
166
+ {
167
+ "step_id": "s-terminal-consolidated-9ef9",
168
+ "type": "main",
169
+ "index": 0
170
+ }
171
+ ]
172
+ ],
173
+ "failed": [
174
+ [
175
+ {
176
+ "step_id": "s-terminal-apply-failed-3898",
177
+ "type": "main",
178
+ "index": 0
179
+ }
180
+ ]
181
+ ]
182
+ }
183
+ },
184
+ "entry_step_id": "s-survey-93ff"
185
+ }