taskchef 1.0.1 → 1.0.2
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/BACKLOG.md +23 -2
- package/README.md +3 -0
- package/SPEC.md +14 -12
- package/assets/{AGENTS.md.template → taskchef-dispatcher-instructions.md} +5 -5
- package/package.json +1 -1
- package/skills/taskchef-delegate/SKILL.md +17 -10
- package/skills/taskchef-reconcile/SKILL.md +1 -1
- package/src/workspace.js +4 -1
package/BACKLOG.md
CHANGED
|
@@ -17,14 +17,35 @@ This document contains capabilities intentionally excluded from the v1 MVP.
|
|
|
17
17
|
|
|
18
18
|
## Reconciliation and continuity
|
|
19
19
|
|
|
20
|
-
-
|
|
21
|
-
|
|
20
|
+
- Prototype one standalone Codex Scheduled Task per dispatcher workspace. Run
|
|
21
|
+
it in the local project, not an isolated worktree, so updates reach the
|
|
22
|
+
canonical `tasks/*/task.json` records. Default to every 15 minutes and let the
|
|
23
|
+
user choose another cadence when enabling it.
|
|
24
|
+
- Use a durable prompt that explicitly invokes `$taskchef-reconcile`, names the
|
|
25
|
+
dispatcher workspace, processes every candidate in sequential batches of at
|
|
26
|
+
most eight thread snapshots, and reports only changed, blocked, finished, or
|
|
27
|
+
failed records. An unchanged run produces one concise no-change result.
|
|
28
|
+
- Add an atomic per-workspace reconciliation lease before enabling schedules.
|
|
29
|
+
One run acquires it, releases it on completion, and skips when another run
|
|
30
|
+
holds it. Treat a lease older than 30 minutes as stale and report its recovery.
|
|
31
|
+
- Do not retry failed snapshots within the same run. Report the affected task
|
|
32
|
+
IDs and let the next scheduled run retry them.
|
|
33
|
+
- Keep the scheduled task active when there are no candidates so later
|
|
34
|
+
delegations are discovered without re-enabling it. Only the user pauses or
|
|
35
|
+
deletes the schedule. Test the durable prompt manually before enabling it.
|
|
36
|
+
- Keep scheduled reconciliation opt-in. Ordinary delegation must not wait for
|
|
37
|
+
or invoke `$taskchef-reconcile`; users can request it explicitly to refresh
|
|
38
|
+
outdated states.
|
|
22
39
|
- Evaluate heartbeat behavior, restart recovery, and recovery after the
|
|
23
40
|
dispatcher task is deleted.
|
|
24
41
|
- Add a reconciliation cursor only when repeated full snapshots become costly
|
|
25
42
|
or incorrect.
|
|
26
43
|
- Determine whether thread status alone is sufficient after Codex or machine
|
|
27
44
|
restarts.
|
|
45
|
+
- Decide whether `$taskchef-bootstrap` should be renamed to
|
|
46
|
+
`$taskchef-workspace` or split into setup and project-management skills.
|
|
47
|
+
Until then, keep project listing and configuration in `$taskchef-bootstrap`
|
|
48
|
+
rather than mixing workspace administration into delegation.
|
|
28
49
|
|
|
29
50
|
## Grouping and history
|
|
30
51
|
|
package/README.md
CHANGED
|
@@ -106,6 +106,9 @@ taskchef task reconcile-candidates --json --workspace <workspace>
|
|
|
106
106
|
thread IDs. Pass `--include-finished` only for an explicit full refresh or when
|
|
107
107
|
a finished executor is known to have received new work.
|
|
108
108
|
|
|
109
|
+
Delegation does not reconcile task states first. Ask the dispatcher to refresh
|
|
110
|
+
or fix outdated task states when you want it to run `$taskchef-reconcile`.
|
|
111
|
+
|
|
109
112
|
## Complete CLI
|
|
110
113
|
|
|
111
114
|
```text
|
package/SPEC.md
CHANGED
|
@@ -21,10 +21,11 @@ TaskChef is not an agent runtime, scheduler, or background service.
|
|
|
21
21
|
6. TaskChef records the returned `threadId`, changes the status to `running`,
|
|
22
22
|
and returns immediately without waiting.
|
|
23
23
|
7. The user may open and prompt any delegated task directly.
|
|
24
|
-
8.
|
|
25
|
-
of active `running` and `blocked` threads.
|
|
24
|
+
8. When the user asks to refresh or fix outdated task states, TaskChef performs
|
|
25
|
+
one bounded reconciliation of active `running` and `blocked` threads.
|
|
26
26
|
9. Reconciliation updates each task's current status and result, then returns
|
|
27
|
-
control without waiting for future activity.
|
|
27
|
+
control without waiting for future activity. Ordinary delegation does not
|
|
28
|
+
trigger reconciliation first.
|
|
28
29
|
|
|
29
30
|
Multiple ongoing tasks may target the same project.
|
|
30
31
|
|
|
@@ -51,10 +52,10 @@ implementation utilities remain in the source repository.
|
|
|
51
52
|
## Dispatcher instructions
|
|
52
53
|
|
|
53
54
|
TaskChef owns a marked block in the workspace `AGENTS.md`. The block tells
|
|
54
|
-
Codex to use
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
Codex to use `$taskchef-bootstrap` for workspace setup and administration and
|
|
56
|
+
`$taskchef-delegate` for actionable requests without completing delegated work
|
|
57
|
+
in the dispatcher thread. The final instruction reserves `$taskchef-reconcile`
|
|
58
|
+
for user-requested refreshes or repairs of outdated task states.
|
|
58
59
|
|
|
59
60
|
`workspace init` copies the canonical file when `AGENTS.md` does not exist. When it
|
|
60
61
|
does exist, bootstrap preserves unrelated user content and adds or refreshes
|
|
@@ -242,7 +243,8 @@ TaskChef does not wait for delegated tasks to finish.
|
|
|
242
243
|
|
|
243
244
|
## Reconciliation workflow
|
|
244
245
|
|
|
245
|
-
|
|
246
|
+
When the user asks to refresh or fix outdated task states, TaskChef uses
|
|
247
|
+
`$taskchef-reconcile` to perform one bounded pass:
|
|
246
248
|
|
|
247
249
|
1. use `task reconcile-candidates --json` to load only `running` and `blocked`
|
|
248
250
|
task records with executor thread IDs;
|
|
@@ -253,8 +255,8 @@ The next user prompt in the dispatcher triggers reconciliation:
|
|
|
253
255
|
|
|
254
256
|
The native Codex thread is the live source of truth between reconciliations.
|
|
255
257
|
`task.json` is only the latest reconciled snapshot. It may still say `running`
|
|
256
|
-
after the executor has finished and
|
|
257
|
-
|
|
258
|
+
after the executor has finished and until the user explicitly requests a
|
|
259
|
+
reconciliation pass.
|
|
258
260
|
|
|
259
261
|
Reconciliation must be safe to repeat. TaskChef has no reconciliation timestamp,
|
|
260
262
|
event cursor, event log, callback, or automatic workspace update.
|
|
@@ -300,8 +302,8 @@ The MVP is successful when:
|
|
|
300
302
|
4. Both `threadId` values are recorded.
|
|
301
303
|
5. The dispatcher returns without waiting for execution.
|
|
302
304
|
6. The user can open and prompt either delegated task directly.
|
|
303
|
-
7.
|
|
304
|
-
reading finished executor threads.
|
|
305
|
+
7. A user request to refresh outdated states reconciles each active thread once
|
|
306
|
+
without reading finished executor threads; ordinary delegation does not.
|
|
305
307
|
8. Status and result snapshots are updated correctly.
|
|
306
308
|
9. Two ongoing tasks may target the same project without data collisions.
|
|
307
309
|
10. The workspace contains dispatcher instructions, configuration, task
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
This repository is a TaskChef dispatcher workspace.
|
|
5
5
|
|
|
6
|
-
- Use
|
|
6
|
+
- Use `$taskchef-bootstrap` when initializing or refreshing this workspace,
|
|
7
7
|
changing or listing its configured projects, running TaskChef doctor,
|
|
8
8
|
repairing its managed instructions, or upgrading its TaskChef skill links.
|
|
9
|
-
- For every
|
|
10
|
-
active recorded work once.
|
|
11
|
-
- For every actionable work request, then use `taskchef-delegate`
|
|
9
|
+
- For every actionable work request, use `$taskchef-delegate`
|
|
12
10
|
automatically, even when the user does not explicitly say "delegate" or
|
|
13
11
|
mention TaskChef.
|
|
14
12
|
- Do not perform delegated work directly in the dispatcher thread.
|
|
15
|
-
- Return immediately after dispatch, as required by
|
|
13
|
+
- Return immediately after dispatch, as required by `$taskchef-delegate`.
|
|
16
14
|
- Answer directly only when the user explicitly asks about TaskChef itself or
|
|
17
15
|
explicitly says not to delegate.
|
|
16
|
+
- Use `$taskchef-reconcile` only when the user asks to refresh or fix outdated
|
|
17
|
+
TaskChef task states.
|
|
18
18
|
<!-- taskchef:dispatcher-instructions:end -->
|
package/package.json
CHANGED
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: taskchef-delegate
|
|
3
|
-
description: "Dispatch actionable requests from an initialized TaskChef workspace into independently openable Codex project tasks. Use for ordinary work requests in a TaskChef workspace, explicit delegation, splitting work across projects, or retrying pending executor creation. Dispatch must return immediately and must never use subagents, hooks, schedules, or foreground waiting.
|
|
3
|
+
description: "Dispatch actionable requests from an initialized TaskChef workspace into independently openable Codex project tasks. Use for ordinary work requests in a TaskChef workspace, explicit delegation, splitting work across projects, or retrying pending executor creation. Dispatch must return immediately and must never use subagents, hooks, schedules, or foreground waiting."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# TaskChef Delegate
|
|
7
7
|
|
|
8
8
|
Create real Codex tasks from a TaskChef data workspace and return immediately.
|
|
9
|
-
Use `taskchef-reconcile` first when the current prompt has active recorded tasks.
|
|
10
9
|
|
|
11
10
|
Resolve this linked skill with `realpath`. The TaskChef source root is two
|
|
12
|
-
parents above the skill directory.
|
|
13
|
-
all deterministic workspace and task-record operations.
|
|
11
|
+
parents above the skill directory. Use the TaskChef executable under that root
|
|
12
|
+
for all deterministic workspace and task-record operations.
|
|
14
13
|
|
|
15
14
|
## Boundaries
|
|
16
15
|
|
|
@@ -24,20 +23,28 @@ all deterministic workspace and task-record operations.
|
|
|
24
23
|
|
|
25
24
|
## Dispatch
|
|
26
25
|
|
|
27
|
-
1. Run
|
|
28
|
-
|
|
26
|
+
1. Run
|
|
27
|
+
`<source-root>/bin/taskchef.js project list --json --workspace <workspace>`
|
|
28
|
+
to load and validate the configured routing targets. Use
|
|
29
|
+
`$taskchef-bootstrap` if the workspace is missing or unhealthy.
|
|
29
30
|
2. Split the request into the smallest independently useful outcomes. Include
|
|
30
31
|
constraints, expected testing, and reporting in every instruction.
|
|
31
32
|
3. Classify against configured `name`, `githubRepo`, and `description`. Use
|
|
32
33
|
`path` only as checkout identity. Ask when metadata does not produce one
|
|
33
34
|
clear project match.
|
|
34
35
|
4. Resolve native projects once and require the exact configured path.
|
|
35
|
-
5.
|
|
36
|
-
|
|
36
|
+
5. For an explicit retry, require the exact task ID and run
|
|
37
|
+
`<source-root>/bin/taskchef.js task show <task-id> --json --workspace <workspace>`.
|
|
38
|
+
Reuse the record only when its status is `pending`; ask for the task ID when
|
|
39
|
+
it is missing and reject retries of non-pending records. For new work, run
|
|
40
|
+
`<source-root>/bin/taskchef.js task create --json --workspace <workspace>`
|
|
41
|
+
with the task record JSON on stdin before executor creation.
|
|
37
42
|
6. Create one real Codex task per record using the exact saved project and a
|
|
38
43
|
local environment on its executor host.
|
|
39
|
-
7. Immediately
|
|
40
|
-
|
|
44
|
+
7. Immediately run
|
|
45
|
+
`<source-root>/bin/taskchef.js task update <task-id> --json --workspace <workspace>`
|
|
46
|
+
with the `running` status and returned `threadId` on stdin. Never persist
|
|
47
|
+
`hostId`.
|
|
41
48
|
8. Leave a failed creation pending. Do not invent an ID or delete the record.
|
|
42
49
|
9. Return immediately with a created-thread directive for every success. Do
|
|
43
50
|
not read or wait for a newly created executor.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: taskchef-reconcile
|
|
3
|
-
description: "Reconcile active TaskChef task records with their visible Codex executor threads. Use
|
|
3
|
+
description: "Reconcile active TaskChef task records with their visible Codex executor threads. Use only when the user asks to refresh, fix, or repair outdated TaskChef task states. Performs one bounded snapshot pass and never polls or waits for future activity."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# TaskChef Reconcile
|
package/src/workspace.js
CHANGED
|
@@ -20,7 +20,10 @@ import path from "node:path";
|
|
|
20
20
|
import { promisify } from "node:util";
|
|
21
21
|
|
|
22
22
|
const execFile = promisify(execFileCallback);
|
|
23
|
-
const DISPATCHER_INSTRUCTIONS_URL = new URL(
|
|
23
|
+
const DISPATCHER_INSTRUCTIONS_URL = new URL(
|
|
24
|
+
"../assets/taskchef-dispatcher-instructions.md",
|
|
25
|
+
import.meta.url,
|
|
26
|
+
);
|
|
24
27
|
const DISPATCHER_INSTRUCTIONS_START = "<!-- taskchef:dispatcher-instructions:start -->";
|
|
25
28
|
const DISPATCHER_INSTRUCTIONS_END = "<!-- taskchef:dispatcher-instructions:end -->";
|
|
26
29
|
const TASKCHEF_SKILL_NAMES = [
|