taskchef 7.0.0 → 7.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.codex-plugin/plugin.json +2 -1
- package/README.md +35 -14
- package/docs/firstmate-taskchef-comparison.md +9 -7
- package/docs/spec.md +57 -28
- package/docs/workflows.md +42 -23
- package/index.js +3 -0
- package/package.json +2 -1
- package/skills/taskchef-bootstrap/SKILL.md +1 -1
- package/skills/taskchef-delegate/SKILL.md +12 -30
- package/skills/taskchef-executor/SKILL.md +69 -0
- package/skills/taskchef-executor/agents/openai.yaml +4 -0
- package/skills/taskchef-report/SKILL.md +14 -14
- package/src/cli.js +7 -3
- package/src/dashboard/app.js +8 -4
- package/src/dashboard/state.js +1 -0
- package/src/dashboard.js +2 -0
- package/src/delegation.js +18 -6
- package/src/mcp.js +38 -4
- package/src/workspace.js +289 -38
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taskchef",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "Dispatch work from a data-only workspace to visible Codex project tasks.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Favo Yang",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"defaultPrompt": [
|
|
32
32
|
"$taskchef-bootstrap Set up TaskChef in this folder.",
|
|
33
33
|
"$taskchef-delegate Dispatch this request to the right project.",
|
|
34
|
+
"$taskchef-executor Execute this delegated TaskChef assignment.",
|
|
34
35
|
"$taskchef-report Report on work in the TaskChef task history."
|
|
35
36
|
],
|
|
36
37
|
"brandColor": "#D97706",
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ work, approvals, and follow-ups happen; TaskChef keeps the latest compact
|
|
|
7
7
|
snapshot for navigation and reporting.
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
request -> recorded TaskChef task -> Codex executor ->
|
|
10
|
+
request -> recorded TaskChef task -> Codex executor -> current state + last result
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
## Which document should I read?
|
|
@@ -31,7 +31,7 @@ codex plugin add taskchef@favoyang-plugins
|
|
|
31
31
|
npm install --global taskchef
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
-
The plugin provides
|
|
34
|
+
The plugin provides four skills and a local MCP server. The npm installation
|
|
35
35
|
puts the `taskchef` CLI on `PATH`. TaskChef installs no hooks, schedules,
|
|
36
36
|
daemons, or background identity search.
|
|
37
37
|
|
|
@@ -48,7 +48,7 @@ The canonical workspace is `~/.agents/taskchef`. TaskChef owns only:
|
|
|
48
48
|
```text
|
|
49
49
|
AGENTS.md managed dispatcher instructions plus user additions
|
|
50
50
|
taskchef.json schema-2 configured projects and routing metadata
|
|
51
|
-
tasks.jsonl one schema-4 snapshot per task
|
|
51
|
+
tasks.jsonl one schema-4/5 snapshot per task (new writes use schema 5)
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
List or change routing targets conversationally:
|
|
@@ -86,23 +86,44 @@ $taskchef-delegate In payments, add structured logs for failed retries and test
|
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
TaskChef prepares a UUID and marker, persists the task before native creation,
|
|
89
|
-
creates the executor, and returns its task link.
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
creates the executor, and returns its task link. New executor instructions keep
|
|
90
|
+
the assignment visible immediately after the marker and end with an explicit
|
|
91
|
+
`$taskchef-executor` invocation. That skill reads the executor's own
|
|
92
|
+
`CODEX_THREAD_ID`, self-links, and reports lifecycle state. Independent outcomes
|
|
93
|
+
may become separate executors; dependent work should stay together.
|
|
94
|
+
|
|
95
|
+
For example, TaskChef generates this shape:
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
<!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->
|
|
99
|
+
Fix duplicate charges after a retry and add a regression test.
|
|
100
|
+
|
|
101
|
+
Use $taskchef-executor to execute and report this delegated TaskChef assignment.
|
|
102
|
+
```
|
|
92
103
|
|
|
93
104
|
## Work with and report executors
|
|
94
105
|
|
|
95
|
-
Open an executor as an ordinary Codex task. Each executor reports
|
|
96
|
-
semantic outcome:
|
|
106
|
+
Open an executor as an ordinary Codex task. Each executor reports `working`
|
|
107
|
+
when a turn starts and one semantic outcome before that same turn ends:
|
|
108
|
+
|
|
109
|
+
- `completed`: the requested outcome is complete;
|
|
110
|
+
- `needs_input`: a real user decision or missing fact blocks progress;
|
|
111
|
+
- `failed`: the executor or creation attempt ended unsuccessfully.
|
|
112
|
+
|
|
113
|
+
A native approval prompt is live Codex state, not `needs_input`.
|
|
114
|
+
TaskChef stores the current reported execution state and separately preserves
|
|
115
|
+
the last concise semantic result. A follow-up therefore appears as `working`
|
|
116
|
+
immediately without erasing the previous outcome. TaskChef does not store the
|
|
117
|
+
transcript or a lifecycle event log.
|
|
97
118
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
119
|
+
Delegated tasks created by earlier TaskChef versions remain compatible: their
|
|
120
|
+
inline executor protocol still parses, self-links, and may use the deprecated
|
|
121
|
+
`report_result` alias. The v7 inline-paragraph named exports remain as deprecated
|
|
122
|
+
historical snapshots, but new delegations use the executor skill and `report_state`.
|
|
101
123
|
|
|
102
|
-
|
|
103
|
-
stores a concise summary, never a transcript or hidden reasoning.
|
|
124
|
+
## View and report tasks
|
|
104
125
|
|
|
105
|
-
Ask for
|
|
126
|
+
Ask the dispatcher for an on-demand report:
|
|
106
127
|
|
|
107
128
|
```text
|
|
108
129
|
Report on the work TaskChef has dispatched.
|
|
@@ -70,7 +70,7 @@ responsibility until an outcome is landed, transferred, or safely preserved.
|
|
|
70
70
|
| Dimension | TaskChef 7 | FirstMate at `038d0f7` |
|
|
71
71
|
| --- | --- | --- |
|
|
72
72
|
| Primary goal | Put multi-project work into the right visible Codex task and make it findable later. | Let one person direct a supervised crew across projects through one liaison. |
|
|
73
|
-
| Product form | Codex plugin:
|
|
73
|
+
| Product form | Codex plugin: four skills, local MCP server, data CLI, and loopback dashboard. | Cloneable agent distribution: instructions, internal skills, scripts, policies, and private on-disk state. |
|
|
74
74
|
| Runtime | Native Codex desktop tasks are the executors and live source of truth. | Harness-driven workers in tmux by default, with documented alternative session backends; Codex can be a harness, but Codex desktop is not a runtime backend. |
|
|
75
75
|
| Coordinator lifetime | Dispatcher returns immediately and does not supervise. | First mate remains active and uses watcher/guard mechanisms to supervise meaningful events. |
|
|
76
76
|
| Project isolation | Delegates to the configured Codex project; isolation follows native Codex/project behavior. | Ship and scout workers require separate Treehouse- or backend-managed worktrees. |
|
|
@@ -161,9 +161,11 @@ backends have different verification or experimental status.
|
|
|
161
161
|
### TaskChef
|
|
162
162
|
|
|
163
163
|
**Fact:** Persisted statuses are `working`, `needs_input`, `completed`, and
|
|
164
|
-
`failed`. Executors report
|
|
165
|
-
|
|
166
|
-
|
|
164
|
+
`failed`. Executors report
|
|
165
|
+
`working` at turn start and a semantic state before ending. Schema 5 preserves
|
|
166
|
+
the last concise semantic result separately while a newer turn is working.
|
|
167
|
+
`needs_input` is reserved for a real semantic decision, not a native approval
|
|
168
|
+
prompt.
|
|
167
169
|
|
|
168
170
|
**Fact:** The report skill treats cached results as evidence, takes one recent
|
|
169
171
|
Codex metadata snapshot, and performs targeted exact-thread reads only for
|
|
@@ -189,7 +191,7 @@ can be substituted for the other without changing product responsibility.
|
|
|
189
191
|
**Fact:** The loopback dashboard watches `tasks.jsonl`, streams stable validated
|
|
190
192
|
snapshots, filters and orders tasks, shows notifications and details, and opens
|
|
191
193
|
a task directly in Codex when its stored thread ID has a supported UUID shape.
|
|
192
|
-
This navigation check does not prove schema 4 self-link provenance. The
|
|
194
|
+
This navigation check does not prove schema 4 or 5 self-link provenance. The
|
|
193
195
|
dashboard does not refresh native task state, submit replies, or show
|
|
194
196
|
transcripts or token usage.
|
|
195
197
|
|
|
@@ -213,8 +215,8 @@ harness adapter.
|
|
|
213
215
|
| --- | --- | --- |
|
|
214
216
|
| Codex | Built around native Codex projects, tasks, thread reads, and desktop deep links. | Codex is one verified harness; desktop tasks are not its worker runtime. |
|
|
215
217
|
| GitHub | Configured repository URLs aid routing; delivery remains the executor project's concern. | GitHub CLI, PR state, and configured delivery modes are part of supervised shipping workflows. |
|
|
216
|
-
| Skills |
|
|
217
|
-
| MCP | Four
|
|
218
|
+
| Skills | Four plugin skills with narrow bootstrap, delegate, executor, and report responsibilities. | Internal firstmate-only skills plus standalone public skills; AGENTS.md routes conditional procedures. |
|
|
219
|
+
| MCP | Four primary local TaskChef tools plus one deprecated compatibility alias own deterministic identity and state writes. | FirstMate describes itself as an agent distribution rather than an MCP product; deterministic behavior lives largely in scripts. |
|
|
218
220
|
| Runtime extensions | Extend plugin skills/MCP/CLI/dashboard or compose native Codex capabilities. | Add or verify harness adapters, session backends, dispatch profiles, operational scripts, and optional integrations. |
|
|
219
221
|
|
|
220
222
|
## Trust and security boundaries
|
package/docs/spec.md
CHANGED
|
@@ -18,14 +18,15 @@ is dated research, not contract.
|
|
|
18
18
|
| **Delegated task** | One independently useful outcome represented by one TaskChef task UUID and snapshot. |
|
|
19
19
|
| **Executor** | The native Codex task created to own and perform one delegated task. |
|
|
20
20
|
| **Task record** | One complete JSON object in `tasks.jsonl`; it contains immutable intent/project fields and mutable identity/result fields. |
|
|
21
|
-
| **Marker** | The exact first instruction line `<!-- taskchef_id=<lowercase full UUID>
|
|
21
|
+
| **Marker** | The exact first instruction line `<!-- taskchef_id=<lowercase full UUID> -->`; new instructions begin the assignment on the next line. |
|
|
22
22
|
| **Record-before-create** | Persisting a link-pending task before asking Codex to create its executor. |
|
|
23
23
|
| **Self-linking** | The executor's one-way registration of its own canonical Codex UUIDv7 from `CODEX_THREAD_ID`. |
|
|
24
24
|
| **Link-pending** | A working task whose `threadId` is null and `updatedBy` is `dispatcher`. |
|
|
25
|
-
| **
|
|
25
|
+
| **Current execution state** | The latest reported executor turn and its `working`, `needs_input`, `completed`, or `failed` status. |
|
|
26
|
+
| **Last semantic result** | The most recent `completed`, `needs_input`, or `failed` outcome, preserved separately while a newer turn is working. |
|
|
26
27
|
| **Current turn ID** | The canonical Codex UUIDv7 returned by an exact native read of the linked executor for the turn being reported. |
|
|
27
28
|
| **Dashboard** | The loopback, read-only UI derived from validated workspace snapshots and bounded native actions. |
|
|
28
|
-
| **Skill** | One packaged agent procedure: `taskchef-bootstrap`, `taskchef-delegate`, or `taskchef-report`. |
|
|
29
|
+
| **Skill** | One packaged agent procedure: `taskchef-bootstrap`, `taskchef-delegate`, `taskchef-executor`, or `taskchef-report`. |
|
|
29
30
|
|
|
30
31
|
## Components and ownership
|
|
31
32
|
|
|
@@ -33,9 +34,13 @@ is dated research, not contract.
|
|
|
33
34
|
diagnostics. It MUST NOT dispatch or report unless separately requested.
|
|
34
35
|
- `taskchef-delegate` MUST own routing and record-before-create delegation.
|
|
35
36
|
It MUST return after creation and MUST NOT poll, supervise, or infer identity.
|
|
37
|
+
- `taskchef-executor` MUST own executor assignment ownership, self-linking,
|
|
38
|
+
exact thread/turn identity, per-turn state reporting, failure behavior,
|
|
39
|
+
privacy, and idempotency. It MUST NOT dispatch the owned assignment again.
|
|
36
40
|
- `taskchef-report` MUST own on-demand reporting. It MUST NOT poll or persist
|
|
37
41
|
inferred state.
|
|
38
|
-
- The MCP server MUST expose
|
|
42
|
+
- The MCP server MUST expose four primary lifecycle tools plus the deprecated
|
|
43
|
+
`report_result` compatibility alias specified below.
|
|
39
44
|
- The CLI MAY administer and inspect the workspace, but MUST NOT provide a
|
|
40
45
|
second agent lifecycle protocol.
|
|
41
46
|
- The dashboard MUST be read-only with respect to dispatcher files.
|
|
@@ -62,9 +67,11 @@ Names and paths MUST be unique. Git projects MUST be exact Git roots.
|
|
|
62
67
|
Repository URLs MUST canonicalize to `https://github.com/<owner>/<repository>`
|
|
63
68
|
and be case-insensitively deduplicated.
|
|
64
69
|
|
|
65
|
-
`tasks.jsonl` MUST contain zero or more newline-terminated schema-4
|
|
66
|
-
one per line.
|
|
67
|
-
|
|
70
|
+
`tasks.jsonl` MUST contain zero or more newline-terminated schema-4 or schema-5
|
|
71
|
+
records, one per line. Schema 4 is read compatibility for the previously
|
|
72
|
+
released format; every new record and state mutation MUST write schema 5.
|
|
73
|
+
Other schemas or unsupported fields MUST be rejected without conversion.
|
|
74
|
+
Reads and writes MUST reject symlinked managed files. Mutations
|
|
68
75
|
MUST hold the shared workspace lock and replace state atomically; read-only
|
|
69
76
|
operations MUST NOT require write permission.
|
|
70
77
|
|
|
@@ -74,7 +81,7 @@ Every record MUST contain exactly these fields:
|
|
|
74
81
|
|
|
75
82
|
| Field | Contract |
|
|
76
83
|
| --- | --- |
|
|
77
|
-
| `schemaVersion` | Integer `4
|
|
84
|
+
| `schemaVersion` | Integer `5`; schema-4 records remain readable until their next mutation. |
|
|
78
85
|
| `id` | Unique safe TaskChef ID; delegation uses a lowercase full UUID. |
|
|
79
86
|
| `project` | Immutable configured-project snapshot. |
|
|
80
87
|
| `title` | Non-empty display title. |
|
|
@@ -82,10 +89,11 @@ Every record MUST contain exactly these fields:
|
|
|
82
89
|
| `threadId` | Null while link-pending; after self-link, canonical Codex UUIDv7. Low-level current-schema direct records may hold another durable non-provisional ID but are outside the MCP delegation journey. |
|
|
83
90
|
| `createdAt` | ISO 8601 creation timestamp. |
|
|
84
91
|
| `status` | `working`, `needs_input`, `completed`, or `failed`. |
|
|
85
|
-
| `summary` | Null while working; non-empty
|
|
86
|
-
| `turnId` | Null before
|
|
87
|
-
| `updatedAt` | ISO 8601 timestamp not earlier than `createdAt
|
|
92
|
+
| `summary` | Null while working; otherwise the current semantic state's non-empty summary of at most 2,000 characters. |
|
|
93
|
+
| `turnId` | Null before turn reporting; otherwise the current reported turn. Linked MCP journeys use a canonical Codex UUIDv7. |
|
|
94
|
+
| `updatedAt` | ISO 8601 timestamp not earlier than `createdAt` or the prior `updatedAt`; clock rollback cannot backdate a transition. |
|
|
88
95
|
| `updatedBy` | `dispatcher` or `mcp`. |
|
|
96
|
+
| `lastResult` | Null before a semantic result; otherwise `{status, summary, turnId, updatedAt}` preserving the latest semantic result. |
|
|
89
97
|
|
|
90
98
|
Task IDs and non-null thread identities MUST be unique. The immutable intent
|
|
91
99
|
fields MUST NOT change after recording.
|
|
@@ -94,21 +102,31 @@ fields MUST NOT change after recording.
|
|
|
94
102
|
|
|
95
103
|
1. The dispatcher MUST call `prepare_dispatch` once per outcome.
|
|
96
104
|
2. It MUST choose exactly one configured project and exact native-project path.
|
|
97
|
-
3. It MUST build the instruction
|
|
98
|
-
|
|
105
|
+
3. It MUST build the instruction with the returned marker as line 1, the user's
|
|
106
|
+
outcome beginning on line 2, and exactly one concise explicit
|
|
107
|
+
`$taskchef-executor` invocation at the end after one blank line. It MUST NOT
|
|
108
|
+
inline the executor protocol into a new instruction.
|
|
99
109
|
4. It MUST call `record_task` with `threadId: null` before native creation.
|
|
100
110
|
5. It MUST create exactly one native Codex executor and return immediately.
|
|
101
111
|
6. The executor MUST read its own `CODEX_THREAD_ID` and call `link_task`
|
|
102
112
|
before substantive work. It MUST NOT use parent/session identity or guess.
|
|
103
|
-
7.
|
|
104
|
-
|
|
105
|
-
8.
|
|
113
|
+
7. After initial linking, the executor MUST exactly read its linked task and
|
|
114
|
+
call `report_state` with that turn ID, `working`, and no summary before work.
|
|
115
|
+
8. Before ending, it MUST call `report_state` for the same working turn with a
|
|
116
|
+
semantic status and concise summary.
|
|
117
|
+
9. A follow-up MUST report `working` with its new current turn ID before work.
|
|
118
|
+
It MUST NOT reuse a prior turn.
|
|
106
119
|
|
|
107
120
|
If native creation fails after recording, the dispatcher MUST call
|
|
108
|
-
`
|
|
121
|
+
`report_state` with `failed`, null thread/turn IDs, and a bounded summary.
|
|
109
122
|
A link failure MUST remain visible and retryable; the executor MUST report it
|
|
110
123
|
visibly and MUST NOT continue substantive work.
|
|
111
124
|
|
|
125
|
+
Previously recorded instructions with the former blank line and inline
|
|
126
|
+
executor protocol MUST remain marker-readable and executable. Their
|
|
127
|
+
`report_result` calls MUST remain supported by the deprecated alias. New
|
|
128
|
+
instructions MUST use the explicit executor skill contract above.
|
|
129
|
+
|
|
112
130
|
`needs_input` MUST mean a semantic user decision or missing fact. A native
|
|
113
131
|
approval prompt MUST remain live Codex state and MUST NOT be stored as
|
|
114
132
|
`needs_input`.
|
|
@@ -158,12 +176,12 @@ new preparation values, though it writes no state.
|
|
|
158
176
|
| `id` | Non-empty string; MUST equal the instruction marker. |
|
|
159
177
|
| `project` | Non-empty configured project path. |
|
|
160
178
|
| `title` | Non-empty string. |
|
|
161
|
-
| `instruction` | Non-empty string beginning with the exact marker and
|
|
179
|
+
| `instruction` | Non-empty string beginning with the exact marker and at least one following instruction line. |
|
|
162
180
|
| `threadId` | Literal null. |
|
|
163
181
|
|
|
164
182
|
**Structured output:** `{ task: Task }`.
|
|
165
183
|
|
|
166
|
-
The returned task has schema
|
|
184
|
+
The returned task has schema 5, `working`, null summary/turn/thread/lastResult,
|
|
167
185
|
`updatedBy: dispatcher`, and equal creation/update timestamps. Duplicate IDs,
|
|
168
186
|
unknown projects, malformed markers, and invalid input fail. Repeating a
|
|
169
187
|
successful call is not idempotent; it fails as a duplicate.
|
|
@@ -189,10 +207,10 @@ marker, or ineligible state fails.
|
|
|
189
207
|
**Annotations:** `readOnlyHint: false`, `destructiveHint: false`,
|
|
190
208
|
`openWorldHint: false`.
|
|
191
209
|
|
|
192
|
-
### `
|
|
210
|
+
### `report_state`
|
|
193
211
|
|
|
194
212
|
**Caller:** executor, or dispatcher only for native creation failure.
|
|
195
|
-
**Mutation:** replaces the
|
|
213
|
+
**Mutation:** replaces the current state atomically and preserves `lastResult`.
|
|
196
214
|
|
|
197
215
|
**Input:**
|
|
198
216
|
|
|
@@ -201,20 +219,31 @@ marker, or ineligible state fails.
|
|
|
201
219
|
| `taskId` | Non-empty string. |
|
|
202
220
|
| `threadId` | Matching non-empty ID for a linked task; null only for creation failure. |
|
|
203
221
|
| `turnId` | Current canonical Codex UUIDv7 for a linked MCP journey; null only for creation failure. Maximum 256 characters at the MCP boundary. |
|
|
204
|
-
| `status` | `needs_input`, `completed`, or `failed`. |
|
|
205
|
-
| `summary` |
|
|
222
|
+
| `status` | `working`, `needs_input`, `completed`, or `failed`. |
|
|
223
|
+
| `summary` | Omitted or null for `working`; required non-empty string of at most 2,000 characters otherwise. |
|
|
206
224
|
|
|
207
225
|
**Structured output:** `{ task: Task }`.
|
|
208
226
|
|
|
209
|
-
For a linked self-linking journey,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
A null-identity record accepts only
|
|
213
|
-
|
|
227
|
+
For a linked self-linking journey, `working` MUST identify a turn newer than
|
|
228
|
+
the current turn and last semantic result. A semantic state MUST match the
|
|
229
|
+
current working turn. Repeating an identical state is idempotent; conflicting
|
|
230
|
+
or older state fails. A null-identity record accepts only a fresh executor
|
|
231
|
+
creation `failed` state with both IDs null. Success sets the current state and
|
|
232
|
+
preserves the semantic state in `lastResult`; starting newer work does not erase
|
|
233
|
+
that result.
|
|
214
234
|
|
|
215
235
|
**Annotations:** `readOnlyHint: false`, `destructiveHint: true`,
|
|
216
236
|
`openWorldHint: false`.
|
|
217
237
|
|
|
238
|
+
### `report_result` (deprecated)
|
|
239
|
+
|
|
240
|
+
`report_result` retains the prior semantic-only input shape and statuses as a
|
|
241
|
+
temporary compatibility alias. It implicitly accepts a fresh supplied turn and
|
|
242
|
+
stores its semantic result, including for supported schema-4 records and
|
|
243
|
+
low-level opaque direct records. It does not accept `working`. New executor
|
|
244
|
+
instructions MUST use `report_state`. Successful mutation upgrades schema 4 to
|
|
245
|
+
schema 5; unsupported schemas remain rejected.
|
|
246
|
+
|
|
218
247
|
## Reporting and dashboard
|
|
219
248
|
|
|
220
249
|
A semantic result is cached evidence, not permanent live truth. Reports SHOULD
|
package/docs/workflows.md
CHANGED
|
@@ -11,10 +11,11 @@ research.
|
|
|
11
11
|
| Surface | Responsibility |
|
|
12
12
|
| --- | --- |
|
|
13
13
|
| `skills/taskchef-delegate/SKILL.md` | Split, route, record-before-create, create, return. |
|
|
14
|
+
| `skills/taskchef-executor/SKILL.md` | Own, self-link, execute, and report every executor turn. |
|
|
14
15
|
| `skills/taskchef-bootstrap/SKILL.md` | Initialize current workspace and configure projects. |
|
|
15
16
|
| `skills/taskchef-report/SKILL.md` | Select cached tasks and perform bounded live checks. |
|
|
16
|
-
| `src/mcp.js` | Four
|
|
17
|
-
| `src/delegation.js` | UUID marker, executor
|
|
17
|
+
| `src/mcp.js` | Four primary lifecycle tools, one deprecated alias, and MCP annotations. |
|
|
18
|
+
| `src/delegation.js` | UUID marker, concise executor-skill invocation shape, and creation-failure handling. |
|
|
18
19
|
| `src/workspace.js` | Current schemas, validation, locking, atomic JSONL writes, linking, and result freshness. |
|
|
19
20
|
| `src/cli.js` | Administration, inspection, diagnostics, and dashboard startup. |
|
|
20
21
|
| `src/dashboard.js` | Validated snapshots, SSE fan-out, and bounded open actions. |
|
|
@@ -49,13 +50,13 @@ sequenceDiagram
|
|
|
49
50
|
D->>D: Choose one configured and native project
|
|
50
51
|
D->>M: record_task(id, project, title, instruction, null)
|
|
51
52
|
M->>W: recordTask()
|
|
52
|
-
W->>W: Lock, validate, append schema-
|
|
53
|
+
W->>W: Lock, validate, append schema-5 snapshot
|
|
53
54
|
W-->>M: working link-pending task
|
|
54
55
|
M-->>D: task
|
|
55
56
|
D->>C: Create executor with marked instruction
|
|
56
57
|
C-->>D: Created-task reference
|
|
57
58
|
D-->>U: Return immediately
|
|
58
|
-
C->>E: Start executor
|
|
59
|
+
C->>E: Start executor and load $taskchef-executor
|
|
59
60
|
E->>E: Read own CODEX_THREAD_ID
|
|
60
61
|
E->>M: link_task(taskId, threadId)
|
|
61
62
|
M->>W: linkTask()
|
|
@@ -67,10 +68,16 @@ Record-before-create makes native creation failure observable. Executor
|
|
|
67
68
|
self-linking removes dispatcher-side polling, task search, title matching, and
|
|
68
69
|
parent/child identity inference.
|
|
69
70
|
|
|
70
|
-
|
|
71
|
+
The generated task body begins immediately after the first-line marker and
|
|
72
|
+
ends with one explicit `$taskchef-executor` invocation. Older recorded tasks
|
|
73
|
+
whose marker is followed by a blank line and inline protocol remain readable;
|
|
74
|
+
the deprecated `report_result` alias preserves their semantic callbacks.
|
|
75
|
+
|
|
76
|
+
## State reporting
|
|
71
77
|
|
|
72
78
|
The executor obtains the turn identity from an exact native read of its own
|
|
73
|
-
linked task. `
|
|
79
|
+
linked task. `report_state` records live turn state while preserving the last
|
|
80
|
+
semantic result separately.
|
|
74
81
|
|
|
75
82
|
```mermaid
|
|
76
83
|
sequenceDiagram
|
|
@@ -79,14 +86,17 @@ sequenceDiagram
|
|
|
79
86
|
participant C as Native Codex task API
|
|
80
87
|
participant M as TaskChef MCP
|
|
81
88
|
participant W as workspace.js
|
|
82
|
-
E->>E: Finish or reach semantic decision
|
|
83
89
|
E->>C: Exact read of linked executor
|
|
84
90
|
C-->>E: Current turn ID
|
|
85
|
-
E->>M:
|
|
86
|
-
M->>W:
|
|
91
|
+
E->>M: report_state(..., working, null)
|
|
92
|
+
M->>W: reportTaskState()
|
|
93
|
+
W->>W: Store current turn and preserve lastResult
|
|
94
|
+
E->>E: Work, finish, or reach semantic decision
|
|
95
|
+
E->>M: report_state(..., semantic status, summary)
|
|
96
|
+
M->>W: reportTaskState()
|
|
87
97
|
W->>W: Lock and validate identity and freshness
|
|
88
|
-
alt
|
|
89
|
-
W->>W:
|
|
98
|
+
alt Same current working turn
|
|
99
|
+
W->>W: Store semantic state and lastResult
|
|
90
100
|
W-->>M: Updated task
|
|
91
101
|
M-->>E: Recorded result
|
|
92
102
|
else Same turn and same result
|
|
@@ -114,18 +124,26 @@ sequenceDiagram
|
|
|
114
124
|
participant C as Native Codex task API
|
|
115
125
|
participant M as TaskChef MCP
|
|
116
126
|
participant W as workspace.js
|
|
117
|
-
E->>M:
|
|
118
|
-
M->>W:
|
|
119
|
-
W-->>
|
|
127
|
+
E->>M: report_state(..., turnA, needs_input, summaryA)
|
|
128
|
+
M->>W: reportTaskState()
|
|
129
|
+
W-->>M: needs_input snapshot
|
|
130
|
+
M-->>E: needs_input snapshot
|
|
120
131
|
U->>E: Provide decision
|
|
121
132
|
E->>C: Read exact executor after follow-up
|
|
122
133
|
C-->>E: turnB
|
|
123
|
-
E->>M:
|
|
124
|
-
M->>W:
|
|
125
|
-
W
|
|
126
|
-
|
|
134
|
+
E->>M: report_state(..., turnB, working, null)
|
|
135
|
+
M->>W: reportTaskState()
|
|
136
|
+
W->>W: Require turnB greater and preserve result A
|
|
137
|
+
W-->>M: working snapshot plus lastResult A
|
|
138
|
+
M-->>E: working snapshot plus lastResult A
|
|
139
|
+
E->>M: report_state(..., turnB, completed, summaryB)
|
|
140
|
+
M->>W: reportTaskState()
|
|
141
|
+
W-->>M: completed snapshot plus result B
|
|
142
|
+
M-->>E: completed snapshot plus result B
|
|
143
|
+
E->>M: report_state(..., turnA, completed, staleSummary)
|
|
127
144
|
M->>W: Validate freshness
|
|
128
|
-
W-->>
|
|
145
|
+
W-->>M: Error: turn is not newer
|
|
146
|
+
M-->>E: Visible tool error
|
|
129
147
|
```
|
|
130
148
|
|
|
131
149
|
The executor contract therefore requires a new exact read on every follow-up;
|
|
@@ -174,7 +192,7 @@ sequenceDiagram
|
|
|
174
192
|
W-->>D: Recorded task
|
|
175
193
|
D->>C: Create executor
|
|
176
194
|
C--xD: Creation error
|
|
177
|
-
D->>M:
|
|
195
|
+
D->>M: report_state(taskId, null, null, failed, boundedSummary)
|
|
178
196
|
M->>W: Lock and store creation failure
|
|
179
197
|
W-->>D: Failed task with null IDs
|
|
180
198
|
D-->>D: Preserve original creation error and task ID
|
|
@@ -198,7 +216,7 @@ sequenceDiagram
|
|
|
198
216
|
participant D as Dashboard monitor
|
|
199
217
|
participant B as Browser client
|
|
200
218
|
participant C as Native Codex
|
|
201
|
-
M->>W: link_task or
|
|
219
|
+
M->>W: link_task or report_state
|
|
202
220
|
W->>W: Acquire shared lock
|
|
203
221
|
W->>F: Atomic replacement
|
|
204
222
|
W-->>M: Updated task
|
|
@@ -232,5 +250,6 @@ summary is cryptographically authenticated; this is a local single-user trust
|
|
|
232
250
|
model. Managed files, instructions, project snapshots, MCP inputs, and dashboard
|
|
233
251
|
requests are validated at every action boundary.
|
|
234
252
|
|
|
235
|
-
|
|
236
|
-
|
|
253
|
+
Configuration schema 2 and task schemas 4 and 5 are accepted. Schema 4 is
|
|
254
|
+
read-only compatibility until a lifecycle mutation upgrades that record to
|
|
255
|
+
schema 5. Other schemas are rejected without rewrite.
|
package/index.js
CHANGED
|
@@ -15,6 +15,7 @@ export {
|
|
|
15
15
|
listTasks,
|
|
16
16
|
readTask,
|
|
17
17
|
recordTask,
|
|
18
|
+
reportTaskState,
|
|
18
19
|
reportTaskResult,
|
|
19
20
|
requireSafeId,
|
|
20
21
|
removeProject,
|
|
@@ -31,6 +32,8 @@ export {
|
|
|
31
32
|
EXECUTOR_OWNERSHIP_PARAGRAPH,
|
|
32
33
|
EXECUTOR_LINK_PARAGRAPH,
|
|
33
34
|
EXECUTOR_RESULT_PARAGRAPH,
|
|
35
|
+
EXECUTOR_WORKING_PARAGRAPH,
|
|
36
|
+
EXECUTOR_SKILL_INVOCATION,
|
|
34
37
|
createAndRecordDelegation,
|
|
35
38
|
isProvisionalThreadId,
|
|
36
39
|
normalizeCodexThreadId,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "taskchef",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.2.0",
|
|
4
4
|
"description": "A non-blocking interactive dispatcher for visible Codex tasks.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Favo Yang",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"src",
|
|
34
34
|
"skills/taskchef-bootstrap",
|
|
35
35
|
"skills/taskchef-delegate",
|
|
36
|
+
"skills/taskchef-executor",
|
|
36
37
|
"skills/taskchef-report"
|
|
37
38
|
],
|
|
38
39
|
"engines": {
|
|
@@ -38,7 +38,7 @@ all deterministic workspace operations.
|
|
|
38
38
|
`codex add` or hard-code an application bundle path.
|
|
39
39
|
3. `workspace init` takes no stdin, creates an empty
|
|
40
40
|
configuration when missing, creates the one-entry-per-task JSONL log, and
|
|
41
|
-
refreshes managed instructions. The installed plugin provides all
|
|
41
|
+
refreshes managed instructions. The installed plugin provides all four
|
|
42
42
|
TaskChef skills outside the dispatcher workspace.
|
|
43
43
|
4. Run `doctor --json` after setup or when the user asks to diagnose the
|
|
44
44
|
workspace. Doctor is read-only. Rerun `workspace init --json` to repair the
|
|
@@ -16,10 +16,9 @@ assignment. Execute it in the current task. Do not re-dispatch it merely
|
|
|
16
16
|
because it concerns TaskChef or a configured project. Explicit requests to
|
|
17
17
|
delegate separate work remain valid.
|
|
18
18
|
|
|
19
|
-
Use the bundled `prepare_dispatch`, `record_task`, `
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
reloaded or installed.
|
|
19
|
+
Use the bundled `prepare_dispatch`, `record_task`, and `report_state` MCP tools
|
|
20
|
+
directly. Never fall back to shell writes. If a required tool is unavailable,
|
|
21
|
+
stop and report that the TaskChef plugin must be reloaded or installed.
|
|
23
22
|
|
|
24
23
|
## Boundaries
|
|
25
24
|
|
|
@@ -42,14 +41,15 @@ reloaded or installed.
|
|
|
42
41
|
3. Route against configured project `name`, `description`, and canonical
|
|
43
42
|
`githubRepos`; use `path` only as checkout identity. Require exactly one
|
|
44
43
|
match and an exact native-project path. Ask instead of guessing.
|
|
45
|
-
4.
|
|
46
|
-
first line, a blank line, and these required paragraphs before the body:
|
|
44
|
+
4. Build each executor instruction in this exact shape:
|
|
47
45
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
- Keep the preparation's exact marker as the first line.
|
|
47
|
+
- Begin the actual assignment on the second line, with no blank line after
|
|
48
|
+
the marker.
|
|
49
|
+
- End the instruction after one blank line with exactly:
|
|
50
|
+
`Use $taskchef-executor to execute and report this delegated TaskChef assignment.`
|
|
51
|
+
- Do not inline executor ownership, identity, linking, or result-reporting
|
|
52
|
+
protocol. The explicitly invoked executor skill owns those mechanics.
|
|
53
53
|
|
|
54
54
|
5. Before creating each executor, call `record_task` exactly once with `id`,
|
|
55
55
|
`project`, `title`, the exact marked `instruction`, and `threadId: null`.
|
|
@@ -58,23 +58,5 @@ reloaded or installed.
|
|
|
58
58
|
7. Return immediately. Preserve a returned provisional client ID only for the
|
|
59
59
|
created-thread directive. Do not call `link_task` from the dispatcher even
|
|
60
60
|
when creation returns a durable ID; the child must self-link.
|
|
61
|
-
8. If creation fails after recording, call `
|
|
61
|
+
8. If creation fails after recording, call `report_state` with `failed`, null
|
|
62
62
|
thread/turn IDs, and a bounded summary before returning the failure.
|
|
63
|
-
|
|
64
|
-
## Executor contract
|
|
65
|
-
|
|
66
|
-
The executor must make `link_task(taskId, threadId)` its first TaskChef action.
|
|
67
|
-
It obtains its own durable ID from the current task's `CODEX_THREAD_ID`, never
|
|
68
|
-
from the delegation's `sourceThreadId`, `CODEX_SESSION_ID`, inherited session
|
|
69
|
-
metadata, title matching, or a parent task.
|
|
70
|
-
Identical retries are safe. A rejected link, unavailable tool, or interrupted
|
|
71
|
-
initial turn leaves the record visibly link-pending and retryable; the executor
|
|
72
|
-
must not guess or do substantive work first.
|
|
73
|
-
|
|
74
|
-
For every semantic result, the executor supplies its linked thread ID and the
|
|
75
|
-
current turn ID obtained by reading that exact thread. A follow-up must use the
|
|
76
|
-
new turn ID. Do not reuse the initial turn ID. `needs_input` is only for a real
|
|
77
|
-
user decision, not live approval UI.
|
|
78
|
-
|
|
79
|
-
The filesystem watcher surfaces `link_task` and `report_result` writes to the
|
|
80
|
-
dashboard. The linked child ID drives the exact Codex deep link.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: taskchef-executor
|
|
3
|
+
description: "Execute an assignment whose first instruction line is an exact TaskChef task marker, including executor ownership, self-linking, per-turn lifecycle reporting, identity safety, and final semantic state. Use when explicitly invoked by a delegated TaskChef instruction or when resuming that same executor task. Do not use to dispatch work or report on other TaskChef tasks."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TaskChef Executor
|
|
7
|
+
|
|
8
|
+
Own and execute the delegated assignment in the current Codex task. Do not
|
|
9
|
+
re-dispatch it merely because it concerns TaskChef or a configured project.
|
|
10
|
+
Explicit requests to delegate separate work remain valid.
|
|
11
|
+
|
|
12
|
+
The instruction's exact first line is
|
|
13
|
+
`<!-- taskchef_id=<full UUID> -->`. Treat that UUID as the TaskChef task ID.
|
|
14
|
+
The assignment is the remaining instruction body; the final explicit skill
|
|
15
|
+
invocation is lifecycle scaffolding, not part of the requested deliverable.
|
|
16
|
+
|
|
17
|
+
## Start every execution turn
|
|
18
|
+
|
|
19
|
+
Complete this lifecycle setup before substantive assignment work:
|
|
20
|
+
|
|
21
|
+
1. Read this task's own durable Codex thread ID from `CODEX_THREAD_ID`. Never
|
|
22
|
+
use `CODEX_SESSION_ID`, `sourceThreadId`, a parent or delegator ID,
|
|
23
|
+
inherited metadata, title matching, recent-task search, transcripts, or a
|
|
24
|
+
provisional client ID.
|
|
25
|
+
2. On the initial turn, call TaskChef `link_task` with the marked task ID and
|
|
26
|
+
that exact thread ID as the first TaskChef action. An identical retry is
|
|
27
|
+
idempotent. On a follow-up, retry the same link only when the prior link
|
|
28
|
+
cannot be established from the task context.
|
|
29
|
+
3. Read this exact Codex thread natively and obtain the current turn ID. Do not
|
|
30
|
+
infer it or reuse an earlier turn ID.
|
|
31
|
+
4. Call TaskChef `report_state` with the marked task ID, self-linked thread ID,
|
|
32
|
+
current turn ID, `status: working`, and an omitted or null summary.
|
|
33
|
+
|
|
34
|
+
If `CODEX_THREAD_ID`, exact native thread reading, or a required TaskChef tool
|
|
35
|
+
is unavailable, or if linking or the working-state report fails, report the
|
|
36
|
+
failure visibly and stop before substantive work. Retry on a later turn. Never
|
|
37
|
+
guess identity or bypass a link-pending state.
|
|
38
|
+
|
|
39
|
+
## Finish every execution turn
|
|
40
|
+
|
|
41
|
+
Before ending, read this exact Codex thread again and call `report_state` for
|
|
42
|
+
the current turn with one semantic status and a concise summary:
|
|
43
|
+
|
|
44
|
+
- `completed` only when the assignment is genuinely complete.
|
|
45
|
+
- `needs_input` only when a semantic decision or missing information must come
|
|
46
|
+
from the user.
|
|
47
|
+
- `failed` when the requested outcome cannot be completed or safely resumed.
|
|
48
|
+
|
|
49
|
+
A live native approval prompt is Codex state, not semantic `needs_input`; leave
|
|
50
|
+
the approval live instead of storing it as a TaskChef result. Never invent or
|
|
51
|
+
reuse a turn ID after a follow-up. If a final-report response is lost, an
|
|
52
|
+
identical retry is safe only while the same turn remains current. On a later
|
|
53
|
+
turn, run the start lifecycle with its new current turn ID and report that
|
|
54
|
+
turn's actual outcome. Say reporting failures visibly instead of claiming a
|
|
55
|
+
tracked outcome.
|
|
56
|
+
|
|
57
|
+
Summaries must omit secrets, transcripts, raw command output, hidden reasoning,
|
|
58
|
+
and unnecessary personal data. Identical lifecycle retries are safe; never
|
|
59
|
+
replace a same-turn report with different content or let an older turn
|
|
60
|
+
overwrite newer state.
|
|
61
|
+
|
|
62
|
+
## Compatibility
|
|
63
|
+
|
|
64
|
+
Existing delegated tasks may include the former inline ownership, linking, and
|
|
65
|
+
`report_result` paragraphs. Continue executing those tasks here without
|
|
66
|
+
re-dispatching. Prefer `report_state` when available. If an older installed
|
|
67
|
+
TaskChef exposes only `report_result`, follow its inline protocol; after an
|
|
68
|
+
upgrade, the deprecated `report_result` alias remains available for exact
|
|
69
|
+
legacy retries.
|