aiblueprint-cli 1.4.99 → 1.4.100
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/agents-config/skills/agents-manager/SKILL.md +2 -2
- package/agents-config/skills/agents-manager/agents/openai.yaml +7 -0
- package/agents-config/skills/agents-manager/assets/codex-icon.svg +20 -0
- package/agents-config/skills/apex/SKILL.md +120 -118
- package/agents-config/skills/apex/agents/openai.yaml +10 -0
- package/agents-config/skills/apex/assets/codex-icon.svg +15 -0
- package/agents-config/skills/apex/scripts/apex-state.py +740 -0
- package/agents-config/skills/apex/scripts/setup-templates.sh +27 -145
- package/agents-config/skills/apex/scripts/test_apex_state.py +413 -0
- package/agents-config/skills/apex/scripts/update-progress.sh +17 -73
- package/agents-config/skills/apex/steps/step-00-init.md +85 -231
- package/agents-config/skills/apex/steps/step-00b-branch.md +10 -118
- package/agents-config/skills/apex/steps/step-00b-economy.md +12 -239
- package/agents-config/skills/apex/steps/step-00b-interactive.md +13 -162
- package/agents-config/skills/apex/steps/step-00b-save.md +13 -114
- package/agents-config/skills/apex/steps/step-01-analyze.md +40 -361
- package/agents-config/skills/apex/steps/step-02-plan.md +55 -562
- package/agents-config/skills/apex/steps/step-02b-tasks.md +15 -291
- package/agents-config/skills/apex/steps/step-03-execute-teams.md +47 -267
- package/agents-config/skills/apex/steps/step-03-execute.md +32 -212
- package/agents-config/skills/apex/steps/step-04-validate.md +42 -246
- package/agents-config/skills/apex/steps/step-05-examine.md +47 -371
- package/agents-config/skills/apex/steps/step-06-resolve.md +19 -221
- package/agents-config/skills/apex/steps/step-07-tests.md +19 -234
- package/agents-config/skills/apex/steps/step-08-run-tests.md +13 -300
- package/agents-config/skills/apex/steps/step-09-finish.md +36 -200
- package/agents-config/skills/apex/steps/step-10-verify.md +46 -264
- package/agents-config/skills/appstore-connect/agents/openai.yaml +7 -0
- package/agents-config/skills/appstore-connect/assets/codex-icon.svg +17 -0
- package/agents-config/skills/commit/agents/openai.yaml +10 -0
- package/agents-config/skills/commit/assets/codex-icon.svg +17 -0
- package/agents-config/skills/create-pr/agents/openai.yaml +10 -0
- package/agents-config/skills/create-pr/assets/codex-icon.svg +17 -0
- package/agents-config/skills/environments-manager/SKILL.md +1 -1
- package/agents-config/skills/environments-manager/agents/openai.yaml +7 -0
- package/agents-config/skills/environments-manager/assets/codex-icon.svg +16 -0
- package/agents-config/skills/environments-manager/examples/scripts/claude-worktree-remove.sh +19 -3
- package/agents-config/skills/environments-manager/examples/scripts/worktree-up.sh +1 -1
- package/agents-config/skills/environments-manager/references/claude.md +1 -1
- package/agents-config/skills/fix-pr-comments/agents/openai.yaml +10 -0
- package/agents-config/skills/fix-pr-comments/assets/codex-icon.svg +17 -0
- package/agents-config/skills/grill-me/SKILL.md +25 -4
- package/agents-config/skills/grill-me/agents/openai.yaml +8 -0
- package/agents-config/skills/grill-me/assets/codex-icon.svg +16 -0
- package/agents-config/skills/hooks-manager/SKILL.md +19 -9
- package/agents-config/skills/hooks-manager/assets/codex-icon.svg +15 -4
- package/agents-config/skills/hooks-manager/references/claude-code.md +32 -0
- package/agents-config/skills/hooks-manager/references/codex.md +23 -0
- package/agents-config/skills/hooks-manager/references/cursor.md +18 -0
- package/agents-config/skills/hooks-manager/references/hook-types.md +5 -3
- package/agents-config/skills/hooks-manager/references/input-output-schemas.md +2 -2
- package/agents-config/skills/hooks-manager/references/research-sources.md +25 -0
- package/agents-config/skills/hooks-manager/references/router.md +32 -0
- package/agents-config/skills/hooks-manager/references/troubleshooting.md +3 -3
- package/agents-config/skills/merge/agents/openai.yaml +10 -0
- package/agents-config/skills/merge/assets/codex-icon.svg +17 -0
- package/agents-config/skills/oneshot/SKILL.md +4 -0
- package/agents-config/skills/oneshot/agents/openai.yaml +10 -0
- package/agents-config/skills/oneshot/assets/codex-icon.svg +18 -0
- package/agents-config/skills/prompt-creator/agents/openai.yaml +7 -0
- package/agents-config/skills/prompt-creator/assets/codex-icon.svg +16 -0
- package/agents-config/skills/rules-manager/agents/openai.yaml +7 -0
- package/agents-config/skills/rules-manager/assets/codex-icon.svg +23 -0
- package/agents-config/skills/skill-manager/SKILL.md +45 -3
- package/agents-config/skills/skill-manager/agents/openai.yaml +7 -0
- package/agents-config/skills/skill-manager/assets/codex-icon.svg +23 -0
- package/agents-config/skills/skill-manager/references/skill-writing-glossary.md +201 -0
- package/agents-config/skills/skill-manager/scripts/setup-codex-icons.ts +143 -0
- package/agents-config/skills/ultrathink/agents/openai.yaml +10 -0
- package/agents-config/skills/ultrathink/assets/codex-icon.svg +20 -0
- package/agents-config/skills/use-artifacts/SKILL.md +102 -51
- package/agents-config/skills/use-artifacts/assets/local-runtime.js +299 -0
- package/agents-config/skills/use-artifacts/scripts/create_artifact.py +1 -1
- package/agents-config/skills/use-delegate/SKILL.md +4 -0
- package/agents-config/skills/use-delegate/agents/openai.yaml +10 -0
- package/agents-config/skills/use-delegate/assets/codex-icon.svg +20 -0
- package/agents-config/skills/use-goal/SKILL.md +70 -9
- package/agents-config/skills/use-goal/agents/openai.yaml +1 -1
- package/agents-config/skills/use-goal/assets/codex-icon.svg +17 -3
- package/agents-config/skills/use-goal/references/claude-code-goal.md +54 -6
- package/agents-config/skills/use-goal/references/codex-goal.md +59 -4
- package/agents-config/skills/use-goal/references/verification-harnesses.md +104 -3
- package/package.json +1 -1
- package/agents-config/skills/apex/templates/00-context.md +0 -55
- package/agents-config/skills/apex/templates/01-analyze.md +0 -10
- package/agents-config/skills/apex/templates/02-plan.md +0 -10
- package/agents-config/skills/apex/templates/03-execute.md +0 -10
- package/agents-config/skills/apex/templates/04-validate.md +0 -10
- package/agents-config/skills/apex/templates/05-examine.md +0 -10
- package/agents-config/skills/apex/templates/06-resolve.md +0 -10
- package/agents-config/skills/apex/templates/07-tests.md +0 -10
- package/agents-config/skills/apex/templates/08-run-tests.md +0 -10
- package/agents-config/skills/apex/templates/09-finish.md +0 -10
- package/agents-config/skills/apex/templates/10-verify.md +0 -9
- package/agents-config/skills/apex/templates/README.md +0 -195
- package/agents-config/skills/apex/templates/step-complete.md +0 -7
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* local-runtime.js: local artifact capabilities shim. No Anthropic API,
|
|
3
|
+
* no claude.ai runtime, no network calls. Everything runs on plain
|
|
4
|
+
* browser APIs (Blob, <a download>, timers, in-memory cache).
|
|
5
|
+
*
|
|
6
|
+
* It mirrors the claude.ai artifact runtime surface (contract 0.1.14):
|
|
7
|
+
* - window.claude.downloads.save({filename, data})
|
|
8
|
+
* - window.claude.mcp.callTool / watchTool / listTools / invalidate
|
|
9
|
+
*
|
|
10
|
+
* If a real claude.ai runtime already installed a member, the shim
|
|
11
|
+
* leaves it untouched, so the same feature code is portable to a
|
|
12
|
+
* genuinely published artifact without changes.
|
|
13
|
+
*
|
|
14
|
+
* Local data sources replace viewer connectors. Register them BEFORE
|
|
15
|
+
* feature code runs:
|
|
16
|
+
*
|
|
17
|
+
* window.claudeLocal.registerTool("Analytics", "get_stats",
|
|
18
|
+
* async (input) => ({ visits: 1234 })); // live local source
|
|
19
|
+
* window.claudeLocal.registerTool("Analytics", "snapshot",
|
|
20
|
+
* { visits: 1234 }, { description: "Static snapshot 2026-07-22" });
|
|
21
|
+
*
|
|
22
|
+
* Then use the standard surface:
|
|
23
|
+
* const r = await window.claude.mcp.callTool("Analytics", "get_stats", { range: "7d" });
|
|
24
|
+
* render(r.payload);
|
|
25
|
+
*/
|
|
26
|
+
(function () {
|
|
27
|
+
"use strict";
|
|
28
|
+
if (typeof window === "undefined") return;
|
|
29
|
+
|
|
30
|
+
var root = window.claude;
|
|
31
|
+
if (!root || typeof root !== "object") {
|
|
32
|
+
root = {};
|
|
33
|
+
try { window.claude = root; } catch (e) { return; }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* ------------------------------ downloads ------------------------------ */
|
|
37
|
+
|
|
38
|
+
var EXT_ALLOWLIST = ["gif", "png", "jpg", "jpeg", "webp", "mp4", "webm", "txt", "json", "md"];
|
|
39
|
+
var MIME_BY_EXT = {
|
|
40
|
+
gif: "image/gif", png: "image/png", jpg: "image/jpeg", jpeg: "image/jpeg",
|
|
41
|
+
webp: "image/webp", mp4: "video/mp4", webm: "video/webm",
|
|
42
|
+
txt: "text/plain", json: "application/json", md: "text/markdown"
|
|
43
|
+
};
|
|
44
|
+
var MAX_BYTES = 16 * 1024 * 1024;
|
|
45
|
+
var promptOpen = false;
|
|
46
|
+
|
|
47
|
+
function downloadsError(code, message) {
|
|
48
|
+
return { code: code, message: message };
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function toBlob(data, mime) {
|
|
52
|
+
if (typeof data === "string" && data.length) return new Blob([data], { type: mime });
|
|
53
|
+
if (data instanceof Blob && data.size) return new Blob([data], { type: mime });
|
|
54
|
+
if (data instanceof ArrayBuffer && data.byteLength) return new Blob([data], { type: mime });
|
|
55
|
+
if (ArrayBuffer.isView(data) && data.byteLength) return new Blob([data], { type: mime });
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (!root.downloads) {
|
|
60
|
+
root.downloads = {
|
|
61
|
+
save: function (request) {
|
|
62
|
+
return new Promise(function (resolve, reject) {
|
|
63
|
+
if (promptOpen) {
|
|
64
|
+
return reject(downloadsError("rate_limited", "A save prompt is already open."));
|
|
65
|
+
}
|
|
66
|
+
if (!request || typeof request !== "object") {
|
|
67
|
+
return reject(downloadsError("bad_request", "save() takes {filename, data}."));
|
|
68
|
+
}
|
|
69
|
+
var filename = request.filename;
|
|
70
|
+
if (typeof filename !== "string" || !filename || filename.length > 512) {
|
|
71
|
+
return reject(downloadsError("bad_request", "filename must be a non-empty string of at most 512 chars."));
|
|
72
|
+
}
|
|
73
|
+
var clean = filename.replace(/[\/\\:*?"<>|]+/g, "-").trim();
|
|
74
|
+
var dot = clean.lastIndexOf(".");
|
|
75
|
+
var ext = (dot > 0 ? clean.slice(dot + 1) : "").toLowerCase();
|
|
76
|
+
if (EXT_ALLOWLIST.indexOf(ext) === -1) {
|
|
77
|
+
return reject(downloadsError("rejected_extension",
|
|
78
|
+
"Extension \"." + ext + "\" is outside the allowlist: " + EXT_ALLOWLIST.join(" ")));
|
|
79
|
+
}
|
|
80
|
+
var blob = toBlob(request.data, MIME_BY_EXT[ext]);
|
|
81
|
+
if (!blob) {
|
|
82
|
+
return reject(downloadsError("bad_request",
|
|
83
|
+
"data must be a non-empty string, Blob, ArrayBuffer, or ArrayBufferView."));
|
|
84
|
+
}
|
|
85
|
+
if (blob.size > MAX_BYTES) {
|
|
86
|
+
return reject(downloadsError("too_large", "File is over 16 MiB (" + blob.size + " bytes)."));
|
|
87
|
+
}
|
|
88
|
+
promptOpen = true;
|
|
89
|
+
var accepted;
|
|
90
|
+
try {
|
|
91
|
+
accepted = window.confirm('Save "' + clean + '" (' + blob.size + " bytes)?");
|
|
92
|
+
} finally {
|
|
93
|
+
promptOpen = false;
|
|
94
|
+
}
|
|
95
|
+
if (!accepted) {
|
|
96
|
+
return reject(downloadsError("declined", "The viewer declined the save."));
|
|
97
|
+
}
|
|
98
|
+
var url = URL.createObjectURL(blob);
|
|
99
|
+
var a = document.createElement("a");
|
|
100
|
+
a.href = url;
|
|
101
|
+
a.download = clean;
|
|
102
|
+
document.body.appendChild(a);
|
|
103
|
+
a.click();
|
|
104
|
+
a.remove();
|
|
105
|
+
setTimeout(function () { URL.revokeObjectURL(url); }, 10000);
|
|
106
|
+
resolve({ status: "saved" });
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* --------------------------------- mcp --------------------------------- */
|
|
113
|
+
|
|
114
|
+
var SEP = "\u0000";
|
|
115
|
+
var registry = {}; // "server\0tool" -> {source, isStatic, description}
|
|
116
|
+
var cache = {}; // identity -> {result, storedAt}
|
|
117
|
+
var watchers = {}; // identity -> [{handler, timer, refresh}]
|
|
118
|
+
|
|
119
|
+
function key(server, tool) { return server + SEP + tool; }
|
|
120
|
+
|
|
121
|
+
function canonical(value) {
|
|
122
|
+
if (value === undefined || value === null) return "null";
|
|
123
|
+
if (Array.isArray(value)) return "[" + value.map(canonical).join(",") + "]";
|
|
124
|
+
if (typeof value === "object") {
|
|
125
|
+
return "{" + Object.keys(value).sort().map(function (k) {
|
|
126
|
+
return JSON.stringify(k) + ":" + canonical(value[k]);
|
|
127
|
+
}).join(",") + "}";
|
|
128
|
+
}
|
|
129
|
+
return JSON.stringify(value);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function identity(server, tool, input) {
|
|
133
|
+
return key(server, tool) + SEP + canonical(input);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function mcpError(code, server, message, extra) {
|
|
137
|
+
var err = { code: code, message: message };
|
|
138
|
+
if (server !== undefined) err.server = server;
|
|
139
|
+
if (extra) Object.keys(extra).forEach(function (k) { err[k] = extra[k]; });
|
|
140
|
+
return err;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function envelope(payload) {
|
|
144
|
+
var text = typeof payload === "string" ? payload : JSON.stringify(payload);
|
|
145
|
+
var result = { content: [{ type: "text", text: text }], payload: payload };
|
|
146
|
+
if (payload !== null && typeof payload === "object") result.structuredContent = payload;
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function cachedCopy(entry, revalidating) {
|
|
151
|
+
var copy = {};
|
|
152
|
+
Object.keys(entry.result).forEach(function (k) { copy[k] = entry.result[k]; });
|
|
153
|
+
copy.cache = { storedAt: entry.storedAt, revalidating: !!revalidating };
|
|
154
|
+
return copy;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function notifyData(id, result) {
|
|
158
|
+
(watchers[id] || []).forEach(function (w) {
|
|
159
|
+
try { w.handler({ type: "data", result: result }); } catch (e) { /* page bug */ }
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function execute(server, tool, input) {
|
|
164
|
+
var entry = registry[key(server, tool)];
|
|
165
|
+
if (!entry) {
|
|
166
|
+
return Promise.reject(mcpError("server_not_connected", server,
|
|
167
|
+
'No local source registered for "' + server + '" / "' + tool +
|
|
168
|
+
'". Call window.claudeLocal.registerTool(...) before feature code runs.'));
|
|
169
|
+
}
|
|
170
|
+
try { JSON.stringify(input === undefined ? null : input); } catch (e) {
|
|
171
|
+
return Promise.reject(mcpError("bad_request", server, "input must be plain JSON."));
|
|
172
|
+
}
|
|
173
|
+
return Promise.resolve()
|
|
174
|
+
.then(function () {
|
|
175
|
+
return entry.isStatic ? entry.source : entry.source(input === undefined ? null : input);
|
|
176
|
+
})
|
|
177
|
+
.then(function (payload) {
|
|
178
|
+
var result = envelope(payload);
|
|
179
|
+
cache[identity(server, tool, input)] = { result: result, storedAt: Date.now() };
|
|
180
|
+
return result;
|
|
181
|
+
})
|
|
182
|
+
.catch(function (e) {
|
|
183
|
+
if (e && e.code) throw e;
|
|
184
|
+
throw mcpError("tool_error", server, (e && e.message) || String(e), { result: e });
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
if (!root.mcp) {
|
|
189
|
+
root.mcp = {
|
|
190
|
+
callTool: function (server, tool, input, options) {
|
|
191
|
+
if (typeof server !== "string" || typeof tool !== "string") {
|
|
192
|
+
return Promise.reject(mcpError("bad_request", undefined, "server and tool must be strings."));
|
|
193
|
+
}
|
|
194
|
+
var opts = options || {};
|
|
195
|
+
var id = identity(server, tool, input);
|
|
196
|
+
var entry = cache[id];
|
|
197
|
+
var staleTime = 0;
|
|
198
|
+
var refresh = false;
|
|
199
|
+
if (opts.cache && typeof opts.cache === "object") {
|
|
200
|
+
staleTime = Math.min(opts.cache.staleTime || 0, 300000);
|
|
201
|
+
refresh = !!opts.cache.refresh;
|
|
202
|
+
}
|
|
203
|
+
if (opts.cache === false) entry = null;
|
|
204
|
+
if (refresh) entry = null;
|
|
205
|
+
if (entry && Date.now() - entry.storedAt < staleTime) {
|
|
206
|
+
return Promise.resolve(cachedCopy(entry, false));
|
|
207
|
+
}
|
|
208
|
+
return execute(server, tool, input).then(function (result) {
|
|
209
|
+
notifyData(id, result);
|
|
210
|
+
return result;
|
|
211
|
+
});
|
|
212
|
+
},
|
|
213
|
+
|
|
214
|
+
watchTool: function (server, tool, input, handler, options) {
|
|
215
|
+
if (typeof handler !== "function") {
|
|
216
|
+
throw new TypeError("watchTool handler must be a function.");
|
|
217
|
+
}
|
|
218
|
+
var opts = options || {};
|
|
219
|
+
var id = identity(server, tool, input);
|
|
220
|
+
var w = { handler: handler, timer: null, refresh: null };
|
|
221
|
+
(watchers[id] = watchers[id] || []).push(w);
|
|
222
|
+
|
|
223
|
+
w.refresh = function () {
|
|
224
|
+
execute(server, tool, input)
|
|
225
|
+
.then(function (result) { notifyData(id, result); })
|
|
226
|
+
.catch(function (err) {
|
|
227
|
+
try { w.handler({ type: "error", error: err }); } catch (e) { /* page bug */ }
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
Promise.resolve().then(function () {
|
|
232
|
+
var entry = cache[id];
|
|
233
|
+
if (entry) {
|
|
234
|
+
try { w.handler({ type: "data", result: cachedCopy(entry, false) }); } catch (e) { /* page bug */ }
|
|
235
|
+
} else {
|
|
236
|
+
w.refresh();
|
|
237
|
+
}
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
if (opts.refetchInterval) {
|
|
241
|
+
w.timer = setInterval(w.refresh, Math.max(5000, opts.refetchInterval));
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
var done = false;
|
|
245
|
+
return function unsubscribe() {
|
|
246
|
+
if (done) return;
|
|
247
|
+
done = true;
|
|
248
|
+
if (w.timer) clearInterval(w.timer);
|
|
249
|
+
watchers[id] = (watchers[id] || []).filter(function (x) { return x !== w; });
|
|
250
|
+
};
|
|
251
|
+
},
|
|
252
|
+
|
|
253
|
+
invalidate: function (server, tool, input) {
|
|
254
|
+
Object.keys(cache).forEach(function (id) {
|
|
255
|
+
var match = true;
|
|
256
|
+
if (server !== undefined) match = id.indexOf(server + SEP) === 0;
|
|
257
|
+
if (match && tool !== undefined) match = id.indexOf(key(server, tool) + SEP) === 0;
|
|
258
|
+
if (match && input !== undefined) match = id === identity(server, tool, input);
|
|
259
|
+
if (match) {
|
|
260
|
+
delete cache[id];
|
|
261
|
+
var subs = watchers[id] || [];
|
|
262
|
+
if (subs.length) subs[0].refresh();
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
return Promise.resolve();
|
|
266
|
+
},
|
|
267
|
+
|
|
268
|
+
listTools: function () {
|
|
269
|
+
var byServer = {};
|
|
270
|
+
Object.keys(registry).forEach(function (k) {
|
|
271
|
+
var parts = k.split(SEP);
|
|
272
|
+
(byServer[parts[0]] = byServer[parts[0]] || []).push({
|
|
273
|
+
name: parts[1],
|
|
274
|
+
description: registry[k].description || ""
|
|
275
|
+
});
|
|
276
|
+
});
|
|
277
|
+
return Promise.resolve({
|
|
278
|
+
servers: Object.keys(byServer).map(function (s) {
|
|
279
|
+
return { server: s, authStatus: "connected", tools: byServer[s] };
|
|
280
|
+
})
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/* --------------------------- local registration ------------------------ */
|
|
287
|
+
|
|
288
|
+
window.claudeLocal = window.claudeLocal || {};
|
|
289
|
+
window.claudeLocal.registerTool = function (server, tool, source, opts) {
|
|
290
|
+
if (typeof server !== "string" || typeof tool !== "string") {
|
|
291
|
+
throw new TypeError("registerTool(server, tool, source): server and tool must be strings.");
|
|
292
|
+
}
|
|
293
|
+
registry[key(server, tool)] = {
|
|
294
|
+
source: source,
|
|
295
|
+
isStatic: typeof source !== "function",
|
|
296
|
+
description: (opts && opts.description) || ""
|
|
297
|
+
};
|
|
298
|
+
};
|
|
299
|
+
})();
|
|
@@ -271,7 +271,7 @@ TODO: Record how the artifact was opened or tested, including browser/runtime ch
|
|
|
271
271
|
def main() -> int:
|
|
272
272
|
parser = argparse.ArgumentParser(description="Create a local HTML artifact workspace.")
|
|
273
273
|
parser.add_argument("title", help="Short artifact title or slug")
|
|
274
|
-
parser.add_argument("--style", default="
|
|
274
|
+
parser.add_argument("--style", default="custom", help="style label recorded in the manifest (requested, project:<app-name>, or subject-specific)")
|
|
275
275
|
parser.add_argument("--kind", default="thinking", help="artifact kind")
|
|
276
276
|
args = parser.parse_args()
|
|
277
277
|
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-delegate
|
|
3
3
|
description: "Delegation mode: the host agent (Claude or Codex) plans and reviews while heavy work runs on cheap executors: OpenCode Kimi K3, Codex GPT-5.6 terra/sol. Use when the user invokes /use-delegate, says 'use delegate', 'delegate mode', 'orchestrator mode', or wants to save tokens/rate limits."
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
metadata:
|
|
6
|
+
opencode/autoinvoke: "false"
|
|
7
|
+
opencode/slash: "true"
|
|
4
8
|
---
|
|
5
9
|
|
|
6
10
|
# Use Delegate
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Use Delegate"
|
|
3
|
+
short_description: "Delegate heavy work to OpenCode Kimi K3 and Codex"
|
|
4
|
+
icon_small: "./assets/codex-icon.svg"
|
|
5
|
+
icon_large: "./assets/codex-icon.svg"
|
|
6
|
+
brand_color: "#802F83"
|
|
7
|
+
default_prompt: "Use $use-delegate to orchestrate this task through cheap executors."
|
|
8
|
+
|
|
9
|
+
policy:
|
|
10
|
+
allow_implicit_invocation: false
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- @license lucide-static v1.24.0 - ISC -->
|
|
2
|
+
<svg role="img" aria-label="use-delegate skill icon"
|
|
3
|
+
class="lucide lucide-bot"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="128"
|
|
6
|
+
height="128"
|
|
7
|
+
viewBox="0 0 24 24"
|
|
8
|
+
fill="none"
|
|
9
|
+
stroke="#F5F5F5"
|
|
10
|
+
stroke-width="2"
|
|
11
|
+
stroke-linecap="round"
|
|
12
|
+
stroke-linejoin="round"
|
|
13
|
+
>
|
|
14
|
+
<path d="M12 8V4H8" />
|
|
15
|
+
<rect width="16" height="12" x="4" y="8" rx="2" />
|
|
16
|
+
<path d="M2 14h2" />
|
|
17
|
+
<path d="M20 14h2" />
|
|
18
|
+
<path d="M15 13v2" />
|
|
19
|
+
<path d="M9 13v2" />
|
|
20
|
+
</svg>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: use-goal
|
|
3
|
-
description: Use when the user asks to create, draft, set, start, or refine a Codex or Claude Code
|
|
3
|
+
description: Use when the user asks to create, draft, set, start, or refine a Codex or Claude Code `/goal` objective for persistent multi-turn work.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Use Goal
|
|
@@ -31,11 +31,31 @@ If Goal tools are available in Codex, use them rather than only printing a slash
|
|
|
31
31
|
|
|
32
32
|
## Goal Shape
|
|
33
33
|
|
|
34
|
-
Before writing or creating the Goal, think through the verification strategy.
|
|
34
|
+
Before writing or creating the Goal, think through the verification strategy. Do a short discovery pass when the evidence surface is not already obvious:
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
- Inspect repository docs, package scripts, test commands, CI config, benchmark scripts, failing logs, linked issue text, plans, or referenced files.
|
|
37
|
+
- Identify which command, artifact, report, screenshot, benchmark, source document, or manual check can prove completion.
|
|
38
|
+
- For external libraries, APIs, or current product behavior, use the appropriate docs/research skill before relying on memory.
|
|
39
|
+
- Prefer existing project commands and documented workflows over inventing new validation.
|
|
40
|
+
- If no reliable verification surface exists, ask one concise question or make the Goal explicitly require creating one.
|
|
37
41
|
|
|
38
|
-
|
|
42
|
+
For broad refactors, deletions, migrations, moving files, or "remove all X" goals, read `references/verification-harnesses.md` before creating the Goal. Default to a measurable harness: establish a baseline count/list first, then make the Goal continue until the validation command exits successfully at the target condition, such as count `0`.
|
|
43
|
+
|
|
44
|
+
Write the Goal as a compact, well-formatted contract with these fields embedded in natural language:
|
|
45
|
+
|
|
46
|
+
1. Outcome: what must be true when the work is done.
|
|
47
|
+
2. Verification surface: the tests, commands, benchmarks, artifacts, reports, logs, source material, or other concrete evidence that proves it.
|
|
48
|
+
3. Constraints: what must not regress or be violated.
|
|
49
|
+
4. Boundaries: allowed files, tools, repositories, data, and resources when relevant.
|
|
50
|
+
5. Iteration policy: how to choose the next best action after each attempt.
|
|
51
|
+
6. Blocked stop condition: when to stop and what to report if no defensible path remains.
|
|
52
|
+
|
|
53
|
+
For long-running implementation work, also include:
|
|
54
|
+
|
|
55
|
+
- one objective and one stopping condition
|
|
56
|
+
- the files, docs, issue, logs, or plan the agent should inspect first
|
|
57
|
+
- the commands or artifacts that prove progress
|
|
58
|
+
- checkpoint behavior and a short progress log requirement
|
|
39
59
|
|
|
40
60
|
Prefer this pattern:
|
|
41
61
|
|
|
@@ -43,18 +63,59 @@ Prefer this pattern:
|
|
|
43
63
|
<desired end state>, verified by <specific evidence>, while preserving <constraints>. Use <allowed inputs, tools, or boundaries>. Between iterations, <how to choose and record the next best action>. If blocked or no valid paths remain, stop with <attempted paths, evidence gathered, blocker, and next input needed>.
|
|
44
64
|
```
|
|
45
65
|
|
|
66
|
+
For implementation Goals, include exact command names when known:
|
|
67
|
+
|
|
68
|
+
```text
|
|
69
|
+
<desired end state>, verified by `<test or build command>` and <artifact/manual check>, while preserving <constraints>. First inspect <files/docs/logs>. Work in checkpoints: after each change, run the narrowest relevant verification, record the result, and choose the next smallest defensible step. Stop only when the verification passes, or stop blocked with the failed command output, attempted paths, and the missing input needed.
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Keep the objective non-empty and at most 4,000 characters. If the needed instructions are longer, create or point to a file and make the Goal refer to that file.
|
|
73
|
+
|
|
46
74
|
## Create Or Draft
|
|
47
75
|
|
|
48
|
-
When goal tools are available,
|
|
76
|
+
When goal tools are available, use this order:
|
|
77
|
+
|
|
78
|
+
1. Call the status tool first to check whether a Goal already exists.
|
|
79
|
+
2. If the user explicitly asked to create, set, start, or use a new Goal and no Goal exists, call the create tool with the refined objective.
|
|
80
|
+
3. Set a token budget only when the user explicitly provided one.
|
|
81
|
+
4. If a Goal already exists, do not overwrite, clear, pause, or resume it unless the user explicitly asks for that lifecycle action.
|
|
82
|
+
|
|
83
|
+
For Codex, this means calling `get_goal` first, then `create_goal` with the refined objective when creation is requested and no active Goal blocks it. Read `references/codex-goal.md` before doing so.
|
|
84
|
+
|
|
85
|
+
For Claude Code, `/goal <condition>` is a real slash command, but the model cannot launch it unless the harness exposes a slash-command dispatch tool. If no dispatch tool is available, return the exact manual `/goal ...` command, ask the user to paste/run it, and wait for confirmation before continuing Goal-driven work. Do not say Claude Code lacks `/goal`, do not call it Codex-only, and do not substitute a task list or goal file as equivalent unless the user explicitly asks for that fallback. Read `references/claude-code-goal.md` before drafting or instructing a Claude Code Goal.
|
|
49
86
|
|
|
50
87
|
If the user asks only to draft, rewrite, explain, or refine a Goal, return the final `/goal ...` text instead of activating it.
|
|
51
88
|
|
|
89
|
+
Ask a clarifying question only when a missing detail would make the Goal unverifiable or unsafe. Prefer one concise question. Otherwise infer conservative defaults from the repository, task, and available evidence.
|
|
90
|
+
|
|
52
91
|
## Evidence Rules
|
|
53
92
|
|
|
54
|
-
Completion must be evidence-based. Do not mark a Goal complete because the work seems likely done
|
|
93
|
+
Completion must be evidence-based. Do not mark a Goal complete because the work seems likely done. First compare the objective to concrete evidence such as changed files, command output, tests, benchmarks, generated artifacts, logs, or source-backed research findings.
|
|
94
|
+
|
|
95
|
+
If a budget limit is reached, stop substantive work, summarize progress and blockers, and identify the next useful step. Do not treat budget exhaustion as completion.
|
|
96
|
+
|
|
97
|
+
If blocked, report the attempted paths, evidence gathered, blocker, and exact input or external change that would unlock progress.
|
|
98
|
+
|
|
99
|
+
If status reports become vague, tighten the Goal instead of adding more one-off instructions. Name the current checkpoint, what was verified, what remains, and what should cause a pause.
|
|
100
|
+
|
|
101
|
+
Only mark a Goal complete after verifying the stated stopping condition. Only mark it blocked when the same blocking condition has repeated enough that no meaningful progress is possible without user input or an external change.
|
|
55
102
|
|
|
56
103
|
## References
|
|
57
104
|
|
|
58
|
-
- `references/codex-goal.md`: Codex Goal mode,
|
|
59
|
-
- `references/claude-code-goal.md`: Claude Code `/goal
|
|
60
|
-
- `references/verification-harnesses.md`: measurable
|
|
105
|
+
- `references/codex-goal.md`: Use for Codex Goal mode, `get_goal` / `create_goal`, CLI/app `/goal`, feature setup, and completion/blocking rules.
|
|
106
|
+
- `references/claude-code-goal.md`: Use for Claude Code manual `/goal`, evaluator behavior, requirements, status, clear/resume behavior, and non-interactive usage.
|
|
107
|
+
- `references/verification-harnesses.md`: Use for measurable refactor, deletion, migration, move, rename, dependency-removal, and "remove all X" Goals.
|
|
108
|
+
|
|
109
|
+
## Good Examples
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
/goal Reduce p95 checkout latency below 120 ms, verified by the checkout benchmark, while keeping the correctness suite green. Use only the checkout service, benchmark fixtures, and related tests. Between iterations, record what changed, what the benchmark showed, and the next best experiment to try. If the benchmark cannot run or no valid paths remain, stop with the attempted paths, the evidence gathered, the blocker, and the next input needed.
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
```text
|
|
116
|
+
/goal Make the checkout test suite pass on the current branch, verified by the repository's documented test command, while preserving public API behavior. Use the failing tests, adjacent implementation files, and existing test helpers. Between iterations, inspect the latest failure, make the smallest defensible change, and rerun the relevant test surface. If no valid path remains, stop with the failures, changes tried, and the missing decision or dependency.
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
/goal Produce the strongest evidence-backed reproduction report for the provided paper using available materials and local resources. Attempt the headline claims where feasible, verify outputs where possible, and end with a report that separates confirmed findings, approximate reconstructions, blocked claims, and remaining uncertainty.
|
|
121
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Use Goal"
|
|
3
|
-
short_description: "
|
|
3
|
+
short_description: "Use when the user asks to create, draft, set, start, or..."
|
|
4
4
|
icon_small: "./assets/codex-icon.svg"
|
|
5
5
|
icon_large: "./assets/codex-icon.svg"
|
|
6
6
|
brand_color: "#C70A64"
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
<!-- @license lucide-static v1.24.0 - ISC -->
|
|
2
|
+
<svg role="img" aria-label="use-goal skill icon"
|
|
3
|
+
class="lucide lucide-sparkles"
|
|
4
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
5
|
+
width="128"
|
|
6
|
+
height="128"
|
|
7
|
+
viewBox="0 0 24 24"
|
|
8
|
+
fill="none"
|
|
9
|
+
stroke="#F5F5F5"
|
|
10
|
+
stroke-width="2"
|
|
11
|
+
stroke-linecap="round"
|
|
12
|
+
stroke-linejoin="round"
|
|
13
|
+
>
|
|
14
|
+
<path d="M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z" />
|
|
15
|
+
<path d="M20 2v4" />
|
|
16
|
+
<path d="M22 4h-4" />
|
|
17
|
+
<circle cx="4" cy="20" r="2" />
|
|
4
18
|
</svg>
|
|
@@ -2,16 +2,64 @@
|
|
|
2
2
|
|
|
3
3
|
Use this reference when the active agent is Claude Code.
|
|
4
4
|
|
|
5
|
-
Official reference:
|
|
5
|
+
Official reference:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- https://code.claude.com/docs/en/goal
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Manual Activation
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Claude Code has `/goal`, but the model cannot launch it unless the harness exposes a slash-command dispatch tool. If no dispatch tool is available, output the exact `/goal ...` command, ask the user to paste/run it manually, and wait for confirmation before continuing Goal-driven work.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Do not say Claude Code lacks `/goal`. Do not call `/goal` Codex-only. Do not replace `/goal` with a task list, TODO list, or goal file and describe it as equivalent. Those can be supporting artifacts only when the user asks for them or when they are useful after the manual `/goal` command has been provided.
|
|
14
|
+
|
|
15
|
+
If the user asks to continue without manually pasting the command, continue normal work only after acknowledging that no Claude Code Goal is active.
|
|
16
|
+
|
|
17
|
+
## Command Surface
|
|
18
|
+
|
|
19
|
+
Claude Code uses `/goal` to set a completion condition for the current session.
|
|
20
|
+
|
|
21
|
+
- `/goal <condition>` sets the Goal and immediately starts a turn using the condition as the directive.
|
|
22
|
+
- `/goal` with no argument shows the current state, evaluated turns, token spend, and latest evaluator reason.
|
|
23
|
+
- `/goal clear` removes the active Goal before it is met.
|
|
24
|
+
- `stop`, `off`, `reset`, `none`, and `cancel` are aliases for `clear`.
|
|
25
|
+
- `/clear` starts a new conversation and removes any active Goal.
|
|
26
|
+
- `claude -p "/goal <condition>"` can run a Goal non-interactively until the condition is met or the process is interrupted.
|
|
27
|
+
|
|
28
|
+
Only one Goal can be active per Claude Code session. Setting a new `/goal <condition>` replaces the active Goal. Do not overwrite an existing Goal unless the user explicitly asks to replace it.
|
|
29
|
+
|
|
30
|
+
If an active Goal existed when a Claude Code session ended, it is restored on `--resume` or `--continue`; the condition carries over, but the timer, turn count, and token-spend baseline reset.
|
|
31
|
+
|
|
32
|
+
## Requirements
|
|
33
|
+
|
|
34
|
+
Claude Code `/goal` requires Claude Code v2.1.139 or later.
|
|
35
|
+
|
|
36
|
+
It only runs in trusted workspaces because it uses the hooks system. It is unavailable when hooks are disabled through `disableAllHooks` or restricted through `allowManagedHooksOnly`; Claude Code should explain that condition when the command fails.
|
|
37
|
+
|
|
38
|
+
## Evaluator Behavior
|
|
39
|
+
|
|
40
|
+
Claude Code evaluates the Goal after each turn with a separate small fast model. A "no" result starts another turn and passes the evaluator reason as guidance. A "yes" result clears the Goal and records the achieved condition in the transcript.
|
|
41
|
+
|
|
42
|
+
The evaluator does not call tools, read files, or run commands independently. It judges only the condition and what Claude has surfaced in the conversation so far. Therefore the Goal must require Claude to put the proof in the transcript.
|
|
43
|
+
|
|
44
|
+
Good Claude Code Goal conditions include:
|
|
45
|
+
|
|
46
|
+
- one measurable end state, such as a passing test, clean build, target count, or empty queue
|
|
47
|
+
- a stated check, such as a command exiting `0`, a generated report, or a reviewed artifact
|
|
48
|
+
- constraints that matter, such as files not to modify or behavior not to regress
|
|
49
|
+
- a bounded stop clause when useful, such as "or stop after 20 turns with the remaining blocker"
|
|
50
|
+
|
|
51
|
+
Goal conditions can be up to 4,000 characters. If the instructions are longer, put details in a file and make the Goal point to that file.
|
|
52
|
+
|
|
53
|
+
## Claude Code Draft Pattern
|
|
54
|
+
|
|
55
|
+
Prefer this pattern:
|
|
56
|
+
|
|
57
|
+
```text
|
|
58
|
+
/goal <desired end state>, verified by <proof Claude must surface in the transcript>, while preserving <constraints>. First inspect <files/docs/logs>. After each turn, report the current checkpoint, command/artifact result, remaining gap, and next smallest step. Stop when the proof is in the transcript, or after <bound> with attempted paths, evidence, blocker, and needed input.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
For test or build work:
|
|
14
62
|
|
|
15
63
|
```text
|
|
16
|
-
/goal <desired end state>, verified by
|
|
64
|
+
/goal <desired end state>, verified by `<test/build command>` exiting 0 with the relevant output included in the transcript, while preserving <constraints>. First inspect <files/logs>. After each turn, rerun the narrowest relevant check and summarize the result. Stop only when the command output proves success, or stop after <bound> with the failing output, attempted fixes, and missing input.
|
|
17
65
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Codex Goal Reference
|
|
2
2
|
|
|
3
|
-
Use this reference when the active agent is OpenAI Codex.
|
|
3
|
+
Use this reference when the active agent is OpenAI Codex, including the Codex app, IDE extension, or CLI.
|
|
4
4
|
|
|
5
5
|
Official references:
|
|
6
6
|
|
|
@@ -8,8 +8,63 @@ Official references:
|
|
|
8
8
|
- https://developers.openai.com/codex/app/commands
|
|
9
9
|
- https://developers.openai.com/codex/cli/slash-commands
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Command Surface
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
`/goal <objective>` starts Goal mode. `/goal` views the current Goal. `/goal pause`, `/goal resume`, and `/goal clear` manage lifecycle.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Goal objectives must be non-empty and at most 4,000 characters. For longer instructions, create or point to a file and make the Goal refer to that file.
|
|
16
|
+
|
|
17
|
+
If `/goal` is missing, tell the user to enable Goals with:
|
|
18
|
+
|
|
19
|
+
```toml
|
|
20
|
+
[features]
|
|
21
|
+
goals = true
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
They can also run:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
codex features enable goals
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Tool Contract
|
|
31
|
+
|
|
32
|
+
When Codex Goal tools are available, use the tools instead of printing a slash command for activation:
|
|
33
|
+
|
|
34
|
+
1. Call `get_goal` before any lifecycle action.
|
|
35
|
+
2. If the user asked to create, set, start, activate, or use a new Goal and no active Goal exists, call `create_goal` with the refined objective.
|
|
36
|
+
3. Pass `token_budget` only when the user explicitly provided a budget.
|
|
37
|
+
4. If a Goal already exists, do not overwrite, clear, pause, resume, mark complete, or mark blocked unless the user explicitly asked for that lifecycle action or the active Goal's stated status condition is actually met.
|
|
38
|
+
|
|
39
|
+
Use slash-command text only when the user asks for a draft, the tool surface is unavailable, or the target is a separate Codex session.
|
|
40
|
+
|
|
41
|
+
## Codex Goal Shape
|
|
42
|
+
|
|
43
|
+
A strong Codex Goal should define:
|
|
44
|
+
|
|
45
|
+
- one objective and one stopping condition
|
|
46
|
+
- the files, docs, issue, logs, or plan Codex should inspect first
|
|
47
|
+
- the commands, artifacts, screenshots, benchmarks, reports, or manual checks that prove progress
|
|
48
|
+
- constraints that must not regress
|
|
49
|
+
- checkpoint behavior and compact progress logging
|
|
50
|
+
- the exact blocked stop condition and what evidence to report
|
|
51
|
+
|
|
52
|
+
Prefer this pattern:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
<desired end state>, verified by <specific evidence>, while preserving <constraints>. Use <allowed inputs, tools, or boundaries>. Between iterations, <how to choose and record the next best action>. If blocked or no valid paths remain, stop with <attempted paths, evidence gathered, blocker, and next input needed>.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
For implementation Goals, include exact commands when known:
|
|
59
|
+
|
|
60
|
+
```text
|
|
61
|
+
<desired end state>, verified by `<test or build command>` and <artifact/manual check>, while preserving <constraints>. First inspect <files/docs/logs>. Work in checkpoints: after each change, run the narrowest relevant verification, record the result, and choose the next smallest defensible step. Stop only when the verification passes, or stop blocked with the failed command output, attempted paths, and the missing input needed.
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Completion And Blocking
|
|
65
|
+
|
|
66
|
+
Completion must be evidence-based. Compare the active Goal to concrete evidence in the thread: changed files, command output, tests, benchmarks, generated artifacts, logs, screenshots, or source-backed research findings.
|
|
67
|
+
|
|
68
|
+
Do not mark a Goal complete because the work seems likely done, because a budget is exhausted, or because no more work is planned. Only mark it complete after verifying the stated stopping condition.
|
|
69
|
+
|
|
70
|
+
Only mark a Goal blocked when the stated blocker has repeated enough that no meaningful progress is possible without user input or an external change. Report the attempted paths, gathered evidence, exact blocker, and input needed.
|