taskchef 5.6.0 → 5.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +34 -9
- package/SPEC.md +26 -11
- package/docs/delegation-design.md +4 -2
- package/index.js +1 -0
- package/package.json +1 -1
- package/skills/taskchef-delegate/SKILL.md +18 -2
- package/src/cli.js +15 -1
- package/src/delegation.js +2 -1
package/README.md
CHANGED
|
@@ -129,8 +129,9 @@ when it sent it, which project it selected, and which Codex task received the
|
|
|
129
129
|
work.
|
|
130
130
|
|
|
131
131
|
Every delegated instruction begins with a unique
|
|
132
|
-
`<!-- taskchef_id=<UUID> -->` marker followed by a blank line
|
|
133
|
-
|
|
132
|
+
`<!-- taskchef_id=<UUID> -->` marker followed by a blank line, an
|
|
133
|
+
executor-ownership paragraph, another blank line, and the assignment. The
|
|
134
|
+
valid HTML comment stays invisible in rendered Markdown.
|
|
134
135
|
If worktree creation does not return a thread ID immediately, TaskChef records
|
|
135
136
|
the marked delegation as unresolved, then makes at most two exact-marker checks
|
|
136
137
|
during a short bounded window. Candidate reads use one programmatic batch per
|
|
@@ -244,8 +245,9 @@ taskchef task summary
|
|
|
244
245
|
|
|
245
246
|
Workspace resolution is deterministic: `--workspace <path>`, then the
|
|
246
247
|
`TASKCHEF_WORKSPACE` environment variable, then `~/.agents/taskchef`. The
|
|
247
|
-
current directory is never an implicit workspace. Data commands
|
|
248
|
-
|
|
248
|
+
current directory is never an implicit workspace. Data commands use concise
|
|
249
|
+
human-readable output by default and accept `--json` for machine-readable
|
|
250
|
+
output. Run `taskchef help` for every option.
|
|
249
251
|
|
|
250
252
|
`taskchef dispatch prepare --json` is the CLI equivalent of the MCP
|
|
251
253
|
`prepare_dispatch` operation: it resolves the canonical workspace, loads and
|
|
@@ -351,7 +353,7 @@ task lines remain readable without an eager rewrite of the append-only history.
|
|
|
351
353
|
`project` value is the exact configured project path:
|
|
352
354
|
|
|
353
355
|
```sh
|
|
354
|
-
printf '%s\n' '{"id":"c0f010ff-84f2-4838-a69d-0ff1f5d721d7","project":"/workspace/payments","title":"Add retry logs","instruction":"<!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->\n\nAdd structured logs for failed retries and test them.","threadId":"019f..."}' |
|
|
356
|
+
printf '%s\n' '{"id":"c0f010ff-84f2-4838-a69d-0ff1f5d721d7","project":"/workspace/payments","title":"Add retry logs","instruction":"<!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->\n\nThis task owns the delegated assignment. Execute it in this task; do not re-dispatch it merely because it concerns TaskChef or a configured project. Explicit requests to delegate separate work remain valid.\n\nAdd structured logs for failed retries and test them.","threadId":"019f..."}' |
|
|
355
357
|
taskchef task record --json
|
|
356
358
|
```
|
|
357
359
|
|
|
@@ -371,6 +373,7 @@ Inspect the task history without querying Codex tasks:
|
|
|
371
373
|
|
|
372
374
|
```sh
|
|
373
375
|
taskchef task show c0f010ff
|
|
376
|
+
taskchef task show c0f010ff --json
|
|
374
377
|
taskchef task list
|
|
375
378
|
taskchef task list --project payments
|
|
376
379
|
taskchef task list --ascending
|
|
@@ -384,10 +387,32 @@ UUID-shaped IDs use their first eight-character section by default; pass
|
|
|
384
387
|
with other empty table cells. Tasks are newest-first by default; pass
|
|
385
388
|
`--ascending` to list them from oldest to newest. ID formatting does not alter
|
|
386
389
|
the complete values in `--json` output, and the selected order applies to its
|
|
387
|
-
`tasks` array.
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
ID
|
|
390
|
+
`tasks` array.
|
|
391
|
+
|
|
392
|
+
`task show` accepts either the full task ID or the exact eight-character task
|
|
393
|
+
ID printed by the default human-readable list. A short ID must identify exactly
|
|
394
|
+
one recorded task; use `task list --full-id` when a short ID is missing or
|
|
395
|
+
ambiguous. Its default output labels the title, project name and path, creation
|
|
396
|
+
time, full task and thread IDs, and instruction. A null thread ID appears as
|
|
397
|
+
`-`, and multiline instructions retain their original line breaks and
|
|
398
|
+
indentation. Pass `--json` to receive the unchanged complete task object.
|
|
399
|
+
|
|
400
|
+
```text
|
|
401
|
+
Title: Add retry logs
|
|
402
|
+
Project: payments
|
|
403
|
+
Project path: /workspace/payments
|
|
404
|
+
Created: 2026-08-12T10:00:00.000Z
|
|
405
|
+
Task ID: c0f010ff-84f2-4838-a69d-0ff1f5d721d7
|
|
406
|
+
Thread ID: 019f9d46-f42c-7482-9707-3c107bf241ee
|
|
407
|
+
Instruction:
|
|
408
|
+
<!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->
|
|
409
|
+
|
|
410
|
+
This task owns the delegated assignment. Execute it in this task; do not re-dispatch it merely because it concerns TaskChef or a configured project. Explicit requests to delegate separate work remain valid.
|
|
411
|
+
|
|
412
|
+
Add structured logs for failed payment retries and test them.
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
The list remains a compact table:
|
|
391
416
|
|
|
392
417
|
```text
|
|
393
418
|
TITLE PROJECT CREATED ID THREAD ID
|
package/SPEC.md
CHANGED
|
@@ -13,18 +13,27 @@ not maintain a second lifecycle database.
|
|
|
13
13
|
## Core behavior
|
|
14
14
|
|
|
15
15
|
1. The user submits a request in the dispatcher workspace or explicitly invokes
|
|
16
|
-
the delegation skill from another Codex project.
|
|
16
|
+
the delegation skill from another Codex project. Work merely concerning the
|
|
17
|
+
TaskChef source code does not implicitly invoke delegation outside the
|
|
18
|
+
dispatcher workspace.
|
|
17
19
|
2. TaskChef separates only outcomes that can proceed independently.
|
|
18
20
|
3. It selects each target using configured project metadata and validates the
|
|
19
21
|
selected local path.
|
|
20
22
|
4. It creates an independently openable Codex task in that project.
|
|
21
23
|
5. It embeds a generated TaskChef UUID marker in the initial instruction before
|
|
22
|
-
creation
|
|
23
|
-
|
|
24
|
+
creation, followed by an executor-ownership sentence and the assignment. It
|
|
25
|
+
appends one task entry as soon as creation returns, using `threadId: null`
|
|
26
|
+
while a provisional client ID is briefly resolved.
|
|
24
27
|
6. It returns without waiting for executor work to complete.
|
|
25
28
|
7. When requested, TaskChef can read task entries, query the relevant Codex
|
|
26
29
|
tasks once, and present a live report without persisting the fetched state.
|
|
27
30
|
|
|
31
|
+
A task created by TaskChef owns its delegated initial assignment. It executes
|
|
32
|
+
that assignment in the current task and does not re-dispatch it merely because
|
|
33
|
+
the subject is TaskChef or another configured project. The task may still use
|
|
34
|
+
TaskChef when the initial assignment explicitly requests delegation of separate
|
|
35
|
+
work or when the user later explicitly requests a new delegation.
|
|
36
|
+
|
|
28
37
|
Several active executors may target the same project.
|
|
29
38
|
|
|
30
39
|
## Workspace layout
|
|
@@ -134,7 +143,7 @@ schedules, task status, results, host information, or the workspace path.
|
|
|
134
143
|
`tasks.jsonl` contains one compact JSON object per line, in append order:
|
|
135
144
|
|
|
136
145
|
```json
|
|
137
|
-
{"schemaVersion":2,"id":"c0f010ff-84f2-4838-a69d-0ff1f5d721d7","project":{"name":"payments-api","path":"/workspace/payments-api","isGitRepository":true,"githubRepos":["https://github.com/example/payments-api","https://github.com/example/payments-sdk"],"description":"Owns payment authorization, capture, refunds, and provider integrations."},"title":"Add payment retry logs","instruction":"<!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->\n\nAdd structured logs for failed payment retries and test them.","threadId":"019f9d46-f42c-7482-9707-3c107bf241ee","createdAt":"2026-08-08T10:00:00.000Z"}
|
|
146
|
+
{"schemaVersion":2,"id":"c0f010ff-84f2-4838-a69d-0ff1f5d721d7","project":{"name":"payments-api","path":"/workspace/payments-api","isGitRepository":true,"githubRepos":["https://github.com/example/payments-api","https://github.com/example/payments-sdk"],"description":"Owns payment authorization, capture, refunds, and provider integrations."},"title":"Add payment retry logs","instruction":"<!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->\n\nThis task owns the delegated assignment. Execute it in this task; do not re-dispatch it merely because it concerns TaskChef or a configured project. Explicit requests to delegate separate work remain valid.\n\nAdd structured logs for failed payment retries and test them.","threadId":"019f9d46-f42c-7482-9707-3c107bf241ee","createdAt":"2026-08-08T10:00:00.000Z"}
|
|
138
147
|
```
|
|
139
148
|
|
|
140
149
|
- `schemaVersion` identifies the task entry format.
|
|
@@ -142,8 +151,8 @@ schedules, task status, results, host information, or the workspace path.
|
|
|
142
151
|
- `project` is the complete configured project snapshot used for routing.
|
|
143
152
|
- `title` is a short task name.
|
|
144
153
|
- `instruction` is the complete executor instruction, including its first-line
|
|
145
|
-
`<!-- taskchef_id=<full UUID> -->` correlation marker
|
|
146
|
-
|
|
154
|
+
`<!-- taskchef_id=<full UUID> -->` correlation marker, executor-ownership
|
|
155
|
+
paragraph, and assignment body.
|
|
147
156
|
- `threadId` identifies the created Codex task, or is `null` when creation was
|
|
148
157
|
accepted but bounded marker resolution did not find one durable task ID.
|
|
149
158
|
- `createdAt` is the dispatch time as an ISO 8601 timestamp.
|
|
@@ -188,7 +197,8 @@ For each assignment, `$taskchef-delegate`:
|
|
|
188
197
|
the already-loaded native projects
|
|
189
198
|
3. prefixes the instruction with the prepared exact
|
|
190
199
|
`<!-- taskchef_id=<UUID> -->` marker as the first line, followed by a blank
|
|
191
|
-
line
|
|
200
|
+
line, the executor-ownership sentence, another blank line, and the
|
|
201
|
+
assignment body
|
|
192
202
|
4. creates a real Codex task at the exact configured path
|
|
193
203
|
5. appends a task entry immediately through the structured `record_task` tool
|
|
194
204
|
when creation returns a durable thread ID; it never opens a shell, parses
|
|
@@ -296,10 +306,15 @@ it was not recorded.
|
|
|
296
306
|
|
|
297
307
|
The CLI reads persisted history without contacting Codex:
|
|
298
308
|
|
|
299
|
-
- `task show <id-or-8-character-prefix>` returns one entry.
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
309
|
+
- `task show <id-or-8-character-prefix>` returns one entry. By default it emits
|
|
310
|
+
labeled human-readable lines for title, project name and path, creation time,
|
|
311
|
+
full task ID, thread ID, and instruction. A null thread ID renders as `-`.
|
|
312
|
+
The instruction starts on the line after `Instruction:` and retains its
|
|
313
|
+
stored line breaks and indentation. `--json` returns the unchanged complete
|
|
314
|
+
task object. The short form is the exact ID text printed by the default
|
|
315
|
+
human-readable `task list` output and succeeds only when it identifies
|
|
316
|
+
exactly one recorded task. Missing, ambiguous, malformed, shorter, and
|
|
317
|
+
wrong-case prefixes fail without selecting a task.
|
|
303
318
|
- `task list` returns entries newest-first by creation time, optionally filtered
|
|
304
319
|
by historical project name or exact path. `--ascending` returns oldest-first.
|
|
305
320
|
Human rows include task and thread ID columns, abbreviating UUID-shaped IDs
|
|
@@ -130,6 +130,8 @@ The exact executor instruction becomes:
|
|
|
130
130
|
```text
|
|
131
131
|
<!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->
|
|
132
132
|
|
|
133
|
+
This task owns the delegated assignment. Execute it in this task; do not re-dispatch it merely because it concerns TaskChef or a configured project. Explicit requests to delegate separate work remain valid.
|
|
134
|
+
|
|
133
135
|
Return exactly the integers 1 through 10, one per line.
|
|
134
136
|
Do not modify files.
|
|
135
137
|
```
|
|
@@ -184,7 +186,7 @@ with `threadId: null`:
|
|
|
184
186
|
"id": "c0f010ff-84f2-4838-a69d-0ff1f5d721d7",
|
|
185
187
|
"project": "/projects/t2",
|
|
186
188
|
"title": "Count from 1 to 10",
|
|
187
|
-
"instruction": "<!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->\n\nReturn exactly the integers 1 through 10, one per line.\nDo not modify files.",
|
|
189
|
+
"instruction": "<!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->\n\nThis task owns the delegated assignment. Execute it in this task; do not re-dispatch it merely because it concerns TaskChef or a configured project. Explicit requests to delegate separate work remain valid.\n\nReturn exactly the integers 1 through 10, one per line.\nDo not modify files.",
|
|
188
190
|
"threadId": null
|
|
189
191
|
}
|
|
190
192
|
```
|
|
@@ -197,7 +199,7 @@ A later candidate read might contain this structured delegated input:
|
|
|
197
199
|
"content": [
|
|
198
200
|
{
|
|
199
201
|
"codexDelegation": {
|
|
200
|
-
"input": "<!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->\n\nReturn exactly the integers 1 through 10, one per line.\nDo not modify files."
|
|
202
|
+
"input": "<!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->\n\nThis task owns the delegated assignment. Execute it in this task; do not re-dispatch it merely because it concerns TaskChef or a configured project. Explicit requests to delegate separate work remain valid.\n\nReturn exactly the integers 1 through 10, one per line.\nDo not modify files."
|
|
201
203
|
}
|
|
202
204
|
}
|
|
203
205
|
]
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: taskchef-delegate
|
|
3
|
-
description: "Dispatch actionable requests through the per-user TaskChef workspace into independently openable Codex project tasks. Use for
|
|
3
|
+
description: "Dispatch actionable requests through the per-user TaskChef workspace into independently openable Codex project tasks. Use automatically for actionable work received in the canonical TaskChef dispatcher workspace. From any other project, use only when the user explicitly asks to delegate or split separate work into Codex tasks; TaskChef-related subject matter alone is not delegation intent. Preserve unresolved delegations for later marker-based recovery, and never use subagents, hooks, schedules, daemons, or executor-completion waiting."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# TaskChef Delegate
|
|
@@ -8,6 +8,17 @@ description: "Dispatch actionable requests through the per-user TaskChef workspa
|
|
|
8
8
|
Create real Codex tasks through the canonical per-user TaskChef data workspace
|
|
9
9
|
and return immediately.
|
|
10
10
|
|
|
11
|
+
## Invocation boundary
|
|
12
|
+
|
|
13
|
+
A task whose initial structured `codexDelegation.input` starts with an exact
|
|
14
|
+
`<!-- taskchef_id=<full UUID> -->` marker already owns that delegated
|
|
15
|
+
assignment. Execute the assignment in the current task. Do not re-dispatch it
|
|
16
|
+
merely because it concerns TaskChef or a configured project.
|
|
17
|
+
|
|
18
|
+
This does not prevent the task from using TaskChef later. Use this skill
|
|
19
|
+
normally when the initial assignment explicitly asks to delegate separate
|
|
20
|
+
work, or when the user later explicitly requests a new delegation.
|
|
21
|
+
|
|
11
22
|
Use the bundled TaskChef `prepare_dispatch`, `record_task`, and `resolve_task`
|
|
12
23
|
tools for deterministic workspace and task-record operations. Call them
|
|
13
24
|
directly; never probe for them or fall back to shell CLI writes. If a required
|
|
@@ -57,7 +68,12 @@ explicitly requested benchmark artifact.
|
|
|
57
68
|
tool.
|
|
58
69
|
Prefix the complete executor instruction with
|
|
59
70
|
exactly `<!-- taskchef_id=<full UUID> -->` as the first line, followed by a
|
|
60
|
-
blank line
|
|
71
|
+
blank line, this executor-role paragraph, another blank line, and the
|
|
72
|
+
instruction body. Add the paragraph as one line in the created input:
|
|
73
|
+
|
|
74
|
+
> This task owns the delegated assignment. Execute it in this task; do not re-dispatch it merely because it concerns TaskChef or a configured project. Explicit requests to delegate separate work remain valid.
|
|
75
|
+
|
|
76
|
+
Preserve this
|
|
61
77
|
marked instruction for recording, and note the creation time. The exact
|
|
62
78
|
random marker is the sole correlation proof.
|
|
63
79
|
6. Create one real Codex task using the exact configured project, a local
|
package/src/cli.js
CHANGED
|
@@ -161,6 +161,19 @@ function displayId(value, fullId) {
|
|
|
161
161
|
return uuidSection ? uuidSection[0] : value;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
+
function taskDetails(task) {
|
|
165
|
+
return [
|
|
166
|
+
`Title: ${task.title}`,
|
|
167
|
+
`Project: ${task.project.name}`,
|
|
168
|
+
`Project path: ${task.project.path}`,
|
|
169
|
+
`Created: ${task.createdAt}`,
|
|
170
|
+
`Task ID: ${task.id}`,
|
|
171
|
+
`Thread ID: ${task.threadId ?? "-"}`,
|
|
172
|
+
"Instruction:",
|
|
173
|
+
task.instruction,
|
|
174
|
+
].join("\n");
|
|
175
|
+
}
|
|
176
|
+
|
|
164
177
|
async function readTaskForShow(workspace, taskId) {
|
|
165
178
|
const id = requireSafeId(taskId, "taskId");
|
|
166
179
|
const tasks = await listTasks(workspace);
|
|
@@ -348,7 +361,7 @@ async function taskResolve(args) {
|
|
|
348
361
|
|
|
349
362
|
async function taskShow(args) {
|
|
350
363
|
validateCommandArgs(args, 3, { values: ["--workspace"], switches: ["--json"] });
|
|
351
|
-
print(await readTaskForShow(workspaceRoot(args), args[2]), args);
|
|
364
|
+
print(await readTaskForShow(workspaceRoot(args), args[2]), args, taskDetails);
|
|
352
365
|
return 0;
|
|
353
366
|
}
|
|
354
367
|
|
|
@@ -407,6 +420,7 @@ Usage:
|
|
|
407
420
|
|
|
408
421
|
Task record reads one JSON value from closed, non-interactive standard input.
|
|
409
422
|
Task show accepts a full task ID or the exact 8-character ID printed by task list.
|
|
423
|
+
Task show prints human-readable details by default; --json prints the complete task object.
|
|
410
424
|
Project import reads a JSON
|
|
411
425
|
array from a file, or from standard input when the source is '-' or omitted.
|
|
412
426
|
Workspace resolution precedence is --workspace, TASKCHEF_WORKSPACE, then
|
package/src/delegation.js
CHANGED
|
@@ -4,6 +4,7 @@ export const THREAD_RESOLUTION_CHECKPOINTS_MS = Object.freeze([10_000, 30_000]);
|
|
|
4
4
|
export const THREAD_RESOLUTION_TIMEOUT_MS = 30_000;
|
|
5
5
|
export const THREAD_RESOLUTION_RECENT_LIMIT = 50;
|
|
6
6
|
export const THREAD_RESOLUTION_CLOCK_SKEW_MS = 5_000;
|
|
7
|
+
export const EXECUTOR_OWNERSHIP_PARAGRAPH = "This task owns the delegated assignment. Execute it in this task; do not re-dispatch it merely because it concerns TaskChef or a configured project. Explicit requests to delegate separate work remain valid.";
|
|
7
8
|
|
|
8
9
|
const UUID_SOURCE = "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}";
|
|
9
10
|
const UUID_PATTERN = new RegExp(`^${UUID_SOURCE}$`);
|
|
@@ -93,7 +94,7 @@ export function prepareDelegation(instruction, { taskId = randomUUID() } = {}) {
|
|
|
93
94
|
const id = requireUuid(taskId);
|
|
94
95
|
return {
|
|
95
96
|
id,
|
|
96
|
-
instruction: `${taskChefMarker(id)}\n\n${instruction}`,
|
|
97
|
+
instruction: `${taskChefMarker(id)}\n\n${EXECUTOR_OWNERSHIP_PARAGRAPH}\n\n${instruction}`,
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
100
|
|