agent-threader 2.0.5
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/LICENSE +21 -0
- package/README.md +126 -0
- package/compiled/claude/agent-threader/SKILL.md +361 -0
- package/compiled/codex/agent-threader/SKILL.md +361 -0
- package/compiled/cursor/rules/agent-threader.mdc +367 -0
- package/compiled/cursor/skills/agent-threader/SKILL.md +361 -0
- package/compiled/opencode/agent-threader.md +361 -0
- package/compiled/windsurf/rules/agent-threader.md +361 -0
- package/compiled/windsurf/skills/agent-threader/SKILL.md +361 -0
- package/dist/cli/commands/doctor.d.ts +6 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -0
- package/dist/cli/commands/doctor.js +7 -0
- package/dist/cli/commands/doctor.js.map +1 -0
- package/dist/cli/commands/explain-error.d.ts +12 -0
- package/dist/cli/commands/explain-error.d.ts.map +1 -0
- package/dist/cli/commands/explain-error.js +23 -0
- package/dist/cli/commands/explain-error.js.map +1 -0
- package/dist/cli/commands/init-state.d.ts +6 -0
- package/dist/cli/commands/init-state.d.ts.map +1 -0
- package/dist/cli/commands/init-state.js +10 -0
- package/dist/cli/commands/init-state.js.map +1 -0
- package/dist/cli/commands/logs.d.ts +6 -0
- package/dist/cli/commands/logs.d.ts.map +1 -0
- package/dist/cli/commands/logs.js +9 -0
- package/dist/cli/commands/logs.js.map +1 -0
- package/dist/cli/commands/parse-heal.d.ts +6 -0
- package/dist/cli/commands/parse-heal.d.ts.map +1 -0
- package/dist/cli/commands/parse-heal.js +5 -0
- package/dist/cli/commands/parse-heal.js.map +1 -0
- package/dist/cli/commands/parse-result.d.ts +6 -0
- package/dist/cli/commands/parse-result.d.ts.map +1 -0
- package/dist/cli/commands/parse-result.js +5 -0
- package/dist/cli/commands/parse-result.js.map +1 -0
- package/dist/cli/commands/status.d.ts +6 -0
- package/dist/cli/commands/status.d.ts.map +1 -0
- package/dist/cli/commands/status.js +5 -0
- package/dist/cli/commands/status.js.map +1 -0
- package/dist/cli/commands/validate-manifest.d.ts +6 -0
- package/dist/cli/commands/validate-manifest.d.ts.map +1 -0
- package/dist/cli/commands/validate-manifest.js +5 -0
- package/dist/cli/commands/validate-manifest.js.map +1 -0
- package/dist/cli/index.d.ts +6 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +360 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/output-formatter.d.ts +6 -0
- package/dist/cli/output-formatter.d.ts.map +1 -0
- package/dist/cli/output-formatter.js +19 -0
- package/dist/cli/output-formatter.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/adapters/types.d.ts +40 -0
- package/dist/lib/adapters/types.d.ts.map +1 -0
- package/dist/lib/adapters/types.js +3 -0
- package/dist/lib/adapters/types.js.map +1 -0
- package/dist/lib/contracts/schema-validator.d.ts +15 -0
- package/dist/lib/contracts/schema-validator.d.ts.map +1 -0
- package/dist/lib/contracts/schema-validator.js +63 -0
- package/dist/lib/contracts/schema-validator.js.map +1 -0
- package/dist/lib/contracts/types.d.ts +91 -0
- package/dist/lib/contracts/types.d.ts.map +1 -0
- package/dist/lib/contracts/types.js +15 -0
- package/dist/lib/contracts/types.js.map +1 -0
- package/dist/lib/contracts/validate-manifest.d.ts +16 -0
- package/dist/lib/contracts/validate-manifest.d.ts.map +1 -0
- package/dist/lib/contracts/validate-manifest.js +123 -0
- package/dist/lib/contracts/validate-manifest.js.map +1 -0
- package/dist/lib/diagnostics/doctor.d.ts +17 -0
- package/dist/lib/diagnostics/doctor.d.ts.map +1 -0
- package/dist/lib/diagnostics/doctor.js +131 -0
- package/dist/lib/diagnostics/doctor.js.map +1 -0
- package/dist/lib/errors/explain-error.d.ts +10 -0
- package/dist/lib/errors/explain-error.d.ts.map +1 -0
- package/dist/lib/errors/explain-error.js +73 -0
- package/dist/lib/errors/explain-error.js.map +1 -0
- package/dist/lib/errors/types.d.ts +16 -0
- package/dist/lib/errors/types.d.ts.map +1 -0
- package/dist/lib/errors/types.js +50 -0
- package/dist/lib/errors/types.js.map +1 -0
- package/dist/lib/index.d.ts +29 -0
- package/dist/lib/index.d.ts.map +1 -0
- package/dist/lib/index.js +25 -0
- package/dist/lib/index.js.map +1 -0
- package/dist/lib/orchestrator/batch-strategy.d.ts +9 -0
- package/dist/lib/orchestrator/batch-strategy.d.ts.map +1 -0
- package/dist/lib/orchestrator/batch-strategy.js +34 -0
- package/dist/lib/orchestrator/batch-strategy.js.map +1 -0
- package/dist/lib/orchestrator/healing-policy.d.ts +47 -0
- package/dist/lib/orchestrator/healing-policy.d.ts.map +1 -0
- package/dist/lib/orchestrator/healing-policy.js +104 -0
- package/dist/lib/orchestrator/healing-policy.js.map +1 -0
- package/dist/lib/orchestrator/index.d.ts +11 -0
- package/dist/lib/orchestrator/index.d.ts.map +1 -0
- package/dist/lib/orchestrator/index.js +11 -0
- package/dist/lib/orchestrator/index.js.map +1 -0
- package/dist/lib/orchestrator/patch-validation.d.ts +9 -0
- package/dist/lib/orchestrator/patch-validation.d.ts.map +1 -0
- package/dist/lib/orchestrator/patch-validation.js +58 -0
- package/dist/lib/orchestrator/patch-validation.js.map +1 -0
- package/dist/lib/orchestrator/scheduling.d.ts +12 -0
- package/dist/lib/orchestrator/scheduling.d.ts.map +1 -0
- package/dist/lib/orchestrator/scheduling.js +74 -0
- package/dist/lib/orchestrator/scheduling.js.map +1 -0
- package/dist/lib/orchestrator/write-safety.d.ts +14 -0
- package/dist/lib/orchestrator/write-safety.d.ts.map +1 -0
- package/dist/lib/orchestrator/write-safety.js +44 -0
- package/dist/lib/orchestrator/write-safety.js.map +1 -0
- package/dist/lib/parser/parse-heal.d.ts +12 -0
- package/dist/lib/parser/parse-heal.d.ts.map +1 -0
- package/dist/lib/parser/parse-heal.js +9 -0
- package/dist/lib/parser/parse-heal.js.map +1 -0
- package/dist/lib/parser/parse-result.d.ts +12 -0
- package/dist/lib/parser/parse-result.d.ts.map +1 -0
- package/dist/lib/parser/parse-result.js +9 -0
- package/dist/lib/parser/parse-result.js.map +1 -0
- package/dist/lib/parser/parser.d.ts +8 -0
- package/dist/lib/parser/parser.d.ts.map +1 -0
- package/dist/lib/parser/parser.js +167 -0
- package/dist/lib/parser/parser.js.map +1 -0
- package/dist/lib/state/init-state.d.ts +15 -0
- package/dist/lib/state/init-state.d.ts.map +1 -0
- package/dist/lib/state/init-state.js +50 -0
- package/dist/lib/state/init-state.js.map +1 -0
- package/dist/lib/state/logs.d.ts +19 -0
- package/dist/lib/state/logs.d.ts.map +1 -0
- package/dist/lib/state/logs.js +25 -0
- package/dist/lib/state/logs.js.map +1 -0
- package/dist/lib/state/state.d.ts +7 -0
- package/dist/lib/state/state.d.ts.map +1 -0
- package/dist/lib/state/state.js +72 -0
- package/dist/lib/state/state.js.map +1 -0
- package/dist/lib/state/status.d.ts +22 -0
- package/dist/lib/state/status.d.ts.map +1 -0
- package/dist/lib/state/status.js +34 -0
- package/dist/lib/state/status.js.map +1 -0
- package/dist/lib/state/types.d.ts +55 -0
- package/dist/lib/state/types.d.ts.map +1 -0
- package/dist/lib/state/types.js +14 -0
- package/dist/lib/state/types.js.map +1 -0
- package/install-local.sh +239 -0
- package/install.sh +36 -0
- package/package.json +55 -0
- package/site/CNAME +1 -0
- package/site/index.html +141 -0
- package/site/install.sh +36 -0
- package/site/style.css +319 -0
- package/skill/SKILL.md +127 -0
- package/skill/SPEC.md +1189 -0
- package/skill/build/compile.mjs +237 -0
- package/skill/build/manifest.json +21 -0
- package/skill/fragments/common/model-selection.md +11 -0
- package/skill/fragments/common/portability-rules.md +16 -0
- package/skill/fragments/common/workflow.md +12 -0
- package/skill/fragments/domain/adapter-model.md +42 -0
- package/skill/fragments/domain/architecture-overview.md +36 -0
- package/skill/fragments/domain/contracts.md +31 -0
- package/skill/fragments/domain/pbh-healing.md +47 -0
- package/skill/fragments/domain/state-resume.md +34 -0
- package/skill/fragments/domain/verification-safety.md +33 -0
- package/skill/fragments/meta/schemas-reference.md +13 -0
- package/skill/fragments/meta/templates-reference.md +11 -0
- package/skill/schemas/heal_decision.v2.json +100 -0
- package/skill/schemas/manifest.v2.json +91 -0
- package/skill/schemas/state.v2.json +183 -0
- package/skill/schemas/task_result.v2.json +104 -0
- package/skill/schemas/verify_profile.v2.json +61 -0
- package/skill/skills/agent-threader/agent-threader.md +85 -0
- package/skill/templates/orchestrator.ts +38 -0
- package/skill/templates/parser.ts +384 -0
- package/skill/templates/types.ts +282 -0
package/site/style.css
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 0;
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:root {
|
|
10
|
+
--bg: #0a0e17;
|
|
11
|
+
--surface: #111827;
|
|
12
|
+
--surface-hover: #1a2332;
|
|
13
|
+
--border: #1e293b;
|
|
14
|
+
--text: #e2e8f0;
|
|
15
|
+
--text-dim: #94a3b8;
|
|
16
|
+
--accent: #38bdf8;
|
|
17
|
+
--accent-hover: #7dd3fc;
|
|
18
|
+
--success: #34d399;
|
|
19
|
+
--red: #f87171;
|
|
20
|
+
--yellow: #fbbf24;
|
|
21
|
+
--green: #4ade80;
|
|
22
|
+
--font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
23
|
+
--font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", monospace;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
html {
|
|
27
|
+
scroll-behavior: smooth;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
body {
|
|
31
|
+
font-family: var(--font-sans);
|
|
32
|
+
background: var(--bg);
|
|
33
|
+
color: var(--text);
|
|
34
|
+
line-height: 1.6;
|
|
35
|
+
-webkit-font-smoothing: antialiased;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.container {
|
|
39
|
+
max-width: 960px;
|
|
40
|
+
margin: 0 auto;
|
|
41
|
+
padding: 0 1.5rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.hero {
|
|
45
|
+
padding: 6rem 0 5rem;
|
|
46
|
+
text-align: center;
|
|
47
|
+
background: linear-gradient(180deg, #0f1729 0%, var(--bg) 100%);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.logo {
|
|
51
|
+
font-size: 3.5rem;
|
|
52
|
+
font-weight: 800;
|
|
53
|
+
letter-spacing: -0.03em;
|
|
54
|
+
color: var(--text);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.logo .accent {
|
|
58
|
+
color: var(--accent);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.tagline {
|
|
62
|
+
font-size: 1.25rem;
|
|
63
|
+
color: var(--text-dim);
|
|
64
|
+
margin-top: 0.75rem;
|
|
65
|
+
font-weight: 400;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.subtitle {
|
|
69
|
+
font-size: 1rem;
|
|
70
|
+
color: var(--text-dim);
|
|
71
|
+
margin-top: 0.25rem;
|
|
72
|
+
opacity: 0.7;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.cta-row {
|
|
76
|
+
margin-top: 2.5rem;
|
|
77
|
+
display: flex;
|
|
78
|
+
gap: 1rem;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
flex-wrap: wrap;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.btn {
|
|
84
|
+
display: inline-block;
|
|
85
|
+
padding: 0.75rem 2rem;
|
|
86
|
+
border-radius: 8px;
|
|
87
|
+
font-size: 0.95rem;
|
|
88
|
+
font-weight: 600;
|
|
89
|
+
text-decoration: none;
|
|
90
|
+
transition: all 0.2s ease;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.btn-primary {
|
|
94
|
+
background: var(--accent);
|
|
95
|
+
color: var(--bg);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.btn-primary:hover {
|
|
99
|
+
background: var(--accent-hover);
|
|
100
|
+
transform: translateY(-1px);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.btn-secondary {
|
|
104
|
+
background: transparent;
|
|
105
|
+
color: var(--accent);
|
|
106
|
+
border: 1px solid var(--border);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.btn-secondary:hover {
|
|
110
|
+
border-color: var(--accent);
|
|
111
|
+
background: rgba(56, 189, 248, 0.05);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.features,
|
|
115
|
+
.contracts,
|
|
116
|
+
.cli-section,
|
|
117
|
+
.install-section {
|
|
118
|
+
padding: 5rem 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.features h2,
|
|
122
|
+
.contracts h2,
|
|
123
|
+
.cli-section h2,
|
|
124
|
+
.install-section h2 {
|
|
125
|
+
font-size: 2rem;
|
|
126
|
+
font-weight: 700;
|
|
127
|
+
text-align: center;
|
|
128
|
+
margin-bottom: 3rem;
|
|
129
|
+
letter-spacing: -0.02em;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.grid {
|
|
133
|
+
display: grid;
|
|
134
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
135
|
+
gap: 1.5rem;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.card {
|
|
139
|
+
background: var(--surface);
|
|
140
|
+
border: 1px solid var(--border);
|
|
141
|
+
border-radius: 12px;
|
|
142
|
+
padding: 2rem 1.5rem;
|
|
143
|
+
transition: border-color 0.2s ease, transform 0.2s ease;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.card:hover {
|
|
147
|
+
border-color: var(--accent);
|
|
148
|
+
transform: translateY(-2px);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.card-icon {
|
|
152
|
+
width: 2.5rem;
|
|
153
|
+
height: 2.5rem;
|
|
154
|
+
border-radius: 50%;
|
|
155
|
+
background: rgba(56, 189, 248, 0.1);
|
|
156
|
+
color: var(--accent);
|
|
157
|
+
display: flex;
|
|
158
|
+
align-items: center;
|
|
159
|
+
justify-content: center;
|
|
160
|
+
font-weight: 700;
|
|
161
|
+
font-size: 1.1rem;
|
|
162
|
+
margin-bottom: 1rem;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.card h3 {
|
|
166
|
+
font-size: 1.1rem;
|
|
167
|
+
font-weight: 600;
|
|
168
|
+
margin-bottom: 0.5rem;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.card p {
|
|
172
|
+
font-size: 0.9rem;
|
|
173
|
+
color: var(--text-dim);
|
|
174
|
+
line-height: 1.5;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.card code,
|
|
178
|
+
.install-note code {
|
|
179
|
+
font-family: var(--font-mono);
|
|
180
|
+
font-size: 0.85em;
|
|
181
|
+
background: rgba(56, 189, 248, 0.1);
|
|
182
|
+
padding: 0.1em 0.35em;
|
|
183
|
+
border-radius: 4px;
|
|
184
|
+
color: var(--accent);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.contracts {
|
|
188
|
+
background: var(--surface);
|
|
189
|
+
border-top: 1px solid var(--border);
|
|
190
|
+
border-bottom: 1px solid var(--border);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.contract-grid {
|
|
194
|
+
display: flex;
|
|
195
|
+
flex-wrap: wrap;
|
|
196
|
+
gap: 1rem;
|
|
197
|
+
justify-content: center;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.contract-item {
|
|
201
|
+
display: flex;
|
|
202
|
+
flex-direction: column;
|
|
203
|
+
align-items: center;
|
|
204
|
+
gap: 0.4rem;
|
|
205
|
+
background: var(--bg);
|
|
206
|
+
border: 1px solid var(--border);
|
|
207
|
+
border-radius: 10px;
|
|
208
|
+
padding: 1.25rem 1.5rem;
|
|
209
|
+
min-width: 160px;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.contract-item code {
|
|
213
|
+
font-family: var(--font-mono);
|
|
214
|
+
font-size: 0.9rem;
|
|
215
|
+
color: var(--accent);
|
|
216
|
+
font-weight: 600;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.contract-item span {
|
|
220
|
+
font-size: 0.8rem;
|
|
221
|
+
color: var(--text-dim);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.terminal {
|
|
225
|
+
background: #0d1117;
|
|
226
|
+
border: 1px solid var(--border);
|
|
227
|
+
border-radius: 12px;
|
|
228
|
+
overflow: hidden;
|
|
229
|
+
max-width: 760px;
|
|
230
|
+
margin: 0 auto;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.terminal-bar {
|
|
234
|
+
display: flex;
|
|
235
|
+
gap: 6px;
|
|
236
|
+
padding: 12px 16px;
|
|
237
|
+
background: #161b22;
|
|
238
|
+
border-bottom: 1px solid var(--border);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.dot {
|
|
242
|
+
width: 12px;
|
|
243
|
+
height: 12px;
|
|
244
|
+
border-radius: 50%;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.dot.red { background: var(--red); }
|
|
248
|
+
.dot.yellow { background: var(--yellow); }
|
|
249
|
+
.dot.green { background: var(--green); }
|
|
250
|
+
|
|
251
|
+
.terminal pre {
|
|
252
|
+
padding: 1.5rem;
|
|
253
|
+
overflow-x: auto;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.terminal code {
|
|
257
|
+
font-family: var(--font-mono);
|
|
258
|
+
font-size: 0.85rem;
|
|
259
|
+
line-height: 1.7;
|
|
260
|
+
color: var(--text);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.terminal .prompt { color: var(--accent); font-weight: 700; }
|
|
264
|
+
.terminal .success { color: var(--success); }
|
|
265
|
+
.terminal .dim { color: var(--text-dim); }
|
|
266
|
+
.terminal .bold { color: var(--text); font-weight: 700; }
|
|
267
|
+
|
|
268
|
+
.install-note {
|
|
269
|
+
text-align: center;
|
|
270
|
+
color: var(--text-dim);
|
|
271
|
+
font-size: 0.9rem;
|
|
272
|
+
margin-top: 1.5rem;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.install-links {
|
|
276
|
+
margin-top: 1rem;
|
|
277
|
+
display: flex;
|
|
278
|
+
gap: 1rem;
|
|
279
|
+
justify-content: center;
|
|
280
|
+
flex-wrap: wrap;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.text-link {
|
|
284
|
+
color: var(--accent);
|
|
285
|
+
text-decoration: none;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.text-link:hover,
|
|
289
|
+
footer a:hover {
|
|
290
|
+
text-decoration: underline;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
footer {
|
|
294
|
+
padding: 3rem 0;
|
|
295
|
+
border-top: 1px solid var(--border);
|
|
296
|
+
text-align: center;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
footer p {
|
|
300
|
+
color: var(--text-dim);
|
|
301
|
+
font-size: 0.85rem;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
footer a {
|
|
305
|
+
color: var(--accent);
|
|
306
|
+
text-decoration: none;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
@media (max-width: 640px) {
|
|
310
|
+
.logo { font-size: 2.5rem; }
|
|
311
|
+
.tagline { font-size: 1.05rem; }
|
|
312
|
+
.features h2,
|
|
313
|
+
.contracts h2,
|
|
314
|
+
.cli-section h2,
|
|
315
|
+
.install-section h2 { font-size: 1.6rem; }
|
|
316
|
+
.grid { grid-template-columns: 1fr; }
|
|
317
|
+
.contract-grid { flex-direction: column; align-items: center; }
|
|
318
|
+
.hero { padding: 4rem 0 3rem; }
|
|
319
|
+
}
|
package/skill/SKILL.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-threader
|
|
3
|
+
version: "2.0"
|
|
4
|
+
description: AgentThreader -- build or review manifest-driven agentic CLI orchestration with structured JSON contracts, schema-validated parsing, resumable state, dependency-aware scheduling, bounded self-healing, and orchestrator-owned verification.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# AgentThreader
|
|
8
|
+
|
|
9
|
+
## When To Use This Skill
|
|
10
|
+
|
|
11
|
+
Use this skill when manual chat execution no longer scales and the right answer is a repeatable runner around an agentic CLI.
|
|
12
|
+
|
|
13
|
+
Matching requests include:
|
|
14
|
+
|
|
15
|
+
- batch prompt runners over tasks, manifests, components, stories, or tickets
|
|
16
|
+
- looping an agentic CLI (`agent`, `opencode`, `claude`) across many items
|
|
17
|
+
- resumable or checkpointed agent loops with per-task logs
|
|
18
|
+
- self-healing outer loops that diagnose failures and patch prompts
|
|
19
|
+
- overnight or unattended batch runs with verification gates
|
|
20
|
+
- stage-based workflows where items pass through multiple prompt phases
|
|
21
|
+
- log triage followed by targeted recheck runs
|
|
22
|
+
|
|
23
|
+
## Architecture Summary
|
|
24
|
+
|
|
25
|
+
The v2 system has five moving parts:
|
|
26
|
+
|
|
27
|
+
1. **Manifest** — declares work items, dependencies, timeouts, and verification profiles
|
|
28
|
+
2. **Orchestrator** — owns scheduling, parsing, verification, checkpointing, healing, and retry policy
|
|
29
|
+
3. **Adapters** — CLI-specific execution layers (`agent`, `opencode`, `claude`) that the orchestrator calls through a uniform interface
|
|
30
|
+
4. **Worker** — the model invocation that performs task work and emits a `task_result.v2` JSON contract
|
|
31
|
+
5. **Healer** — the model invocation that diagnoses fixable failures and emits a `heal_decision.v2` JSON contract
|
|
32
|
+
|
|
33
|
+
The default healing strategy is **Progressive Batch Healing (PBH)**: start with small batches, grow when stable, shrink when unstable, escalate when stuck.
|
|
34
|
+
|
|
35
|
+
## Normative Specification
|
|
36
|
+
|
|
37
|
+
The full architecture, contracts, schemas, and behavioral rules are defined in `SPEC.md` in this directory. That document is the single source of truth.
|
|
38
|
+
|
|
39
|
+
Read `SPEC.md` when you need:
|
|
40
|
+
|
|
41
|
+
- the end-to-end control flow
|
|
42
|
+
- JSON schemas for manifest, worker result, healer decision, and state
|
|
43
|
+
- PBH scheduling rules and defaults
|
|
44
|
+
- verification and write-safety model
|
|
45
|
+
- adapter interface contract
|
|
46
|
+
- failure classification, signature generation, and convergence rules
|
|
47
|
+
- resume and reconciliation semantics
|
|
48
|
+
|
|
49
|
+
## Canonical Source Of Truth
|
|
50
|
+
|
|
51
|
+
Use these directories with clear ownership boundaries:
|
|
52
|
+
|
|
53
|
+
- `SPEC.md` — normative behavior and runtime rules
|
|
54
|
+
- `schemas/` — machine-readable contract authority
|
|
55
|
+
- `templates/` — shared parser, types, and runtime scaffolding
|
|
56
|
+
- `platforms/` — thin translation layers for Codex, Cursor, Claude, and Windsurf
|
|
57
|
+
|
|
58
|
+
The orchestrator core should stay platform-neutral. Platform packaging may change invocation syntax and workspace UX, but not contracts or state semantics.
|
|
59
|
+
|
|
60
|
+
## Schemas
|
|
61
|
+
|
|
62
|
+
Machine-readable JSON schemas live in `schemas/`:
|
|
63
|
+
|
|
64
|
+
- `manifest.v2.json`
|
|
65
|
+
- `verify_profile.v2.json`
|
|
66
|
+
- `task_result.v2.json`
|
|
67
|
+
- `heal_decision.v2.json`
|
|
68
|
+
- `state.v2.json`
|
|
69
|
+
|
|
70
|
+
## Templates
|
|
71
|
+
|
|
72
|
+
Reference implementation skeletons live in `templates/`:
|
|
73
|
+
|
|
74
|
+
- `types.ts` — TypeScript type definitions for all contracts and the adapter interface
|
|
75
|
+
- `parser.ts` — shared parser and validator utilities (sentinel extraction, JSON repair, schema validation)
|
|
76
|
+
- `orchestrator.ts` — shared runtime utilities for atomic state writes and stable failure signatures
|
|
77
|
+
|
|
78
|
+
## Self-Healing: Model Selection Rule
|
|
79
|
+
|
|
80
|
+
When the user requests a self-healing runner, ask which models to use before generating code:
|
|
81
|
+
|
|
82
|
+
- **Worker CLI and model** — runs the inner loop (can be fast/cheap)
|
|
83
|
+
- **Healer CLI and model** — runs the outer diagnosis loop (should be more capable)
|
|
84
|
+
|
|
85
|
+
If the user does not specify, state the defaults explicitly before proceeding:
|
|
86
|
+
|
|
87
|
+
- Worker: the CLI the user is already using, default model
|
|
88
|
+
- Healer: same CLI family, stronger model tier
|
|
89
|
+
|
|
90
|
+
## Platform Wrappers
|
|
91
|
+
|
|
92
|
+
Platform-specific wrappers live in `platforms/`. They are thin routing layers only.
|
|
93
|
+
|
|
94
|
+
- `platforms/windsurf/` — Windsurf workflow
|
|
95
|
+
- `platforms/cursor/` — Cursor rule + skill pointer
|
|
96
|
+
- `platforms/codex/` — Codex agent registration
|
|
97
|
+
- `platforms/claude/` — Claude command
|
|
98
|
+
|
|
99
|
+
Platform wrappers MUST NOT redefine architecture, contracts, or healing policy.
|
|
100
|
+
|
|
101
|
+
## Portability Rule
|
|
102
|
+
|
|
103
|
+
Platform wrappers may adapt:
|
|
104
|
+
|
|
105
|
+
- invocation command and flags
|
|
106
|
+
- prompt transport (`stdin`, argument, or PTY)
|
|
107
|
+
- approval handling and setup notes
|
|
108
|
+
|
|
109
|
+
Platform wrappers MUST preserve:
|
|
110
|
+
|
|
111
|
+
- contract field names and sentinel strings
|
|
112
|
+
- parser behavior
|
|
113
|
+
- PBH defaults and convergence rules
|
|
114
|
+
- state transitions and resume semantics
|
|
115
|
+
|
|
116
|
+
## Workflow
|
|
117
|
+
|
|
118
|
+
1. Define the unit of work (component, story, work package, ticket, file).
|
|
119
|
+
2. Create the manifest (`manifest.v2` JSON).
|
|
120
|
+
3. Write shared context and per-task prompts.
|
|
121
|
+
4. Define the completion contract in the prompt (instruct the worker to emit `<<<TASK_RESULT_V2>>>`).
|
|
122
|
+
5. Choose the CLI adapter (`agent`, `opencode`, `claude`).
|
|
123
|
+
6. Build the orchestrator (use `templates/` as starting point).
|
|
124
|
+
7. Run sequential first, add concurrency after contracts and parsing are stable.
|
|
125
|
+
8. Add verification gates (build, test, lint, smoke).
|
|
126
|
+
9. Add healing only after the base loop works (`--heal auto`).
|
|
127
|
+
10. Resume with `--resume` after interruptions.
|