taskchef 1.0.2 → 3.0.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/SPEC.md CHANGED
@@ -2,75 +2,56 @@
2
2
 
3
3
  ## Purpose
4
4
 
5
- TaskChef is an interactive Codex dispatcher. It turns a user request into
6
- independent assignments, creates real Codex tasks in the selected projects,
7
- records their latest reconciled state, and returns control immediately.
5
+ TaskChef is an interactive Codex dispatcher. It routes independent assignments
6
+ to real Codex tasks in configured local projects, records each successful
7
+ delegation in an append-only task history, and returns immediately.
8
8
 
9
- TaskChef is not an agent runtime, scheduler, or background service.
9
+ Codex tasks remain authoritative for their progress and results. TaskChef does
10
+ not maintain a second lifecycle database.
10
11
 
11
12
  ## Core behavior
12
13
 
13
- 1. The user opens the TaskChef workspace and submits a request.
14
- 2. TaskChef splits the request into the smallest useful independent tasks.
15
- 3. TaskChef classifies each assignment using configured project metadata and
16
- validates every target against the configured project list.
17
- 4. TaskChef creates one `task.json` record per delegated task with status
18
- `pending`.
19
- 5. TaskChef creates one independently openable Codex task in each target
20
- project.
21
- 6. TaskChef records the returned `threadId`, changes the status to `running`,
22
- and returns immediately without waiting.
23
- 7. The user may open and prompt any delegated task directly.
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
- 9. Reconciliation updates each task's current status and result, then returns
27
- control without waiting for future activity. Ordinary delegation does not
28
- trigger reconciliation first.
29
-
30
- Multiple ongoing tasks may target the same project.
14
+ 1. The user submits a request in the dispatcher workspace.
15
+ 2. TaskChef separates only outcomes that can proceed independently.
16
+ 3. It selects each target using configured project metadata and validates the
17
+ selected local path.
18
+ 4. It creates an independently openable Codex task in that project.
19
+ 5. After creation returns a thread ID, it appends one task entry.
20
+ 6. It returns without waiting for the executor.
21
+ 7. When requested, TaskChef can read task entries, query the relevant Codex
22
+ tasks once, and present a live report without persisting the fetched state.
23
+
24
+ Several active executors may target the same project.
31
25
 
32
26
  ## Workspace layout
33
27
 
34
28
  ```text
35
- taskchef-workspace/
29
+ taskchef/
36
30
  ├── AGENTS.md
37
31
  ├── taskchef.json
38
- ├── .agents/
39
- │ └── skills/
40
- │ ├── taskchef-bootstrap -> <TaskChef bootstrap skill>
41
- │ ├── taskchef-delegate -> <TaskChef delegate skill>
42
- │ └── taskchef-reconcile -> <TaskChef reconciliation skill>
43
- └── tasks/
44
- └── <task-id>/
45
- └── task.json
32
+ └── tasks.jsonl
46
33
  ```
47
34
 
48
- The workspace contains TaskChef-managed dispatcher instructions, user
49
- configuration, and task data. TaskChef source, tests, reports, and
50
- implementation utilities remain in the source repository.
51
-
52
- ## Dispatcher instructions
35
+ `AGENTS.md` contains a marked block that routes setup and administration to
36
+ `$taskchef-bootstrap`, actionable work to `$taskchef-delegate`, and explicit
37
+ live report requests to `$taskchef-report`. Bootstrap preserves unrelated
38
+ instructions and refreshes only the managed block.
53
39
 
54
- TaskChef owns a marked block in the workspace `AGENTS.md`. The block tells
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.
40
+ `workspace init` is idempotent. It creates an empty configuration and task
41
+ log when missing, refreshes managed instructions, removes legacy TaskChef skill
42
+ symlinks, and migrates legacy task records that contain executor thread IDs.
43
+ It stops on a legacy pending record with no thread ID rather than discarding
44
+ that record. If a legacy record refers to a project that was removed from the
45
+ configuration, migration reconstructs its project snapshot from the existing
46
+ local project path.
59
47
 
60
- `workspace init` copies the canonical file when `AGENTS.md` does not exist. When it
61
- does exist, bootstrap preserves unrelated user content and adds or refreshes
62
- only the TaskChef managed block. Repeating the merge is idempotent. Malformed
63
- or duplicate TaskChef markers fail safely instead of overwriting the file.
64
- Initialization also installs all three TaskChef skill links. It is idempotent,
65
- takes no configuration input, creates `{ "schemaVersion": 1, "projects": [] }`
66
- when configuration is missing, and preserves existing configured projects.
48
+ `doctor` validates configuration, project paths, the JSONL log, managed
49
+ instructions, and the absence of legacy workspace structures without modifying
50
+ the workspace.
67
51
 
68
- `doctor` diagnoses configuration, task storage, managed instructions, skill
69
- links, project paths, and task records without modifying the workspace.
52
+ ## Project configuration
70
53
 
71
- ## Configuration
72
-
73
- `taskchef.json` is the only user-facing configuration file.
54
+ `taskchef.json` is the user-facing routing configuration:
74
55
 
75
56
  ```json
76
57
  {
@@ -81,7 +62,7 @@ links, project paths, and task records without modifying the workspace.
81
62
  "path": "/workspace/payments-api",
82
63
  "isGitRepository": true,
83
64
  "githubRepo": "https://github.com/example/payments-api",
84
- "description": "Owns payment authorization, capture, refunds, and provider integrations. Use for changes to the public payments API or its transaction lifecycle."
65
+ "description": "Owns payment authorization, capture, refunds, and provider integrations."
85
66
  },
86
67
  {
87
68
  "name": "local-data-tools",
@@ -94,219 +75,105 @@ links, project paths, and task records without modifying the workspace.
94
75
  ```
95
76
 
96
77
  - `schemaVersion` identifies the configuration format.
97
- - `projects` lists the local projects TaskChef may classify and manage.
98
- - `name` is the unique human-readable project identity. It is explicit even
99
- when it matches the checkout directory name.
100
- - `path` is the exact canonical local project directory.
101
- - `isGitRepository` states whether the saved Codex project is a Git repository.
102
- When true, `path` must be the exact Git root. When false, the project runs
103
- directly in its canonical directory without Git assumptions.
104
- - `githubRepo` is the canonical GitHub repository URL, or `null` when the
105
- project has no canonical GitHub remote. It may be `null` for either Git or
106
- non-Git projects.
107
- - `description` is an optional semantic routing description. When present, it
108
- explains the project's responsibilities and the kinds of requests that
109
- should target it, similarly to a skill trigger description.
110
-
111
- Project paths must exist, resolve to canonical directories, and match the
112
- project selected for delegation. A Git project path must resolve to its exact
113
- repository root. A non-Git project must use `githubRepo: null`. Names and paths
114
- must be unique.
115
-
116
- TaskChef classifies a requested outcome against `name`, `githubRepo`, and the
117
- optional `description`. The path identifies the checkout but is not a
118
- classification signal. A description should be specific enough to distinguish
119
- the project from its neighbors; generic technology labels are insufficient.
120
- TaskChef selects a project only when the metadata yields one clear match; it
121
- asks the user when no project or several projects plausibly match. It must not
122
- guess solely from a directory name.
123
-
124
- Project configuration is managed through `project add`, `project import`,
125
- `project list`, and `project remove`. Add and import detect Git status, exact
126
- Git roots, and canonical GitHub origins. Import accepts a JSON array from a
127
- file or stdin, merges by canonical path, and preserves an existing name or
128
- description when omitted. `--replace` is the only replacement mode.
129
-
130
- The configuration does not store dispatcher identity, project-to-task
131
- assignments, execution modes, scheduling options, host information, or the
132
- workspace path. The directory containing `taskchef.json` is the workspace, and
133
- the currently open Codex task is the dispatcher.
134
-
135
- ## Task record
136
-
137
- Each independent assignment has one `tasks/<task-id>/task.json` file.
138
-
139
- ```json
140
- {
141
- "schemaVersion": 1,
142
- "id": "t1-echo-input-20260808",
143
- "project": "/workspace/t1",
144
- "title": "Echo user input",
145
- "instruction": "Create echo_input.py so it reads one line from standard input and echoes it exactly. Test the script and report the result.",
146
- "status": "finished",
147
- "threadId": "019f9d46-f42c-7482-9707-3c107bf241ee",
148
- "result": {
149
- "message": "Created and tested echo_input.py.",
150
- "githubPRs": [],
151
- "githubIssues": []
152
- },
153
- "createdAt": "2026-08-08T10:00:00.000Z",
154
- "updatedAt": "2026-08-08T10:05:00.000Z"
155
- }
156
- ```
157
-
158
- ### Fields
159
-
160
- - `schemaVersion`: task format version.
161
- - `id`: stable TaskChef task identifier.
162
- - `project`: exact configured project directory.
163
- - `title`: short human-readable task name.
164
- - `instruction`: complete task-specific instruction.
165
- - `status`: current reconciled lifecycle state.
166
- - `threadId`: independently openable Codex task ID, or `null` while pending.
167
- - `result`: latest meaningful report, or `null` when none exists.
168
- - `createdAt`: task creation time as an ISO 8601 timestamp.
169
- - `updatedAt`: latest task update time as an ISO 8601 timestamp.
78
+ - `projects` lists the local routing targets.
79
+ - `name` is the unique human-readable project identity.
80
+ - `path` is the normalized, canonical local directory. A Git project must use
81
+ its repository root.
82
+ - `isGitRepository` identifies Git and non-Git projects.
83
+ - `githubRepo` is a canonical GitHub repository URL or `null`.
84
+ - `description` is optional routing context.
170
85
 
171
- The task-specific instruction includes the requested outcome, constraints,
172
- expected testing, and reporting expectations. Task records have no separate acceptance or
173
- decision fields.
86
+ TaskChef classifies work against `name`, `githubRepo`, and `description`. The
87
+ path identifies the checkout but is not a routing hint. TaskChef asks the user
88
+ when metadata does not produce one clear match.
174
89
 
175
- ## Status model
90
+ `project add` and `project import` detect Git status, exact Git roots, and
91
+ canonical GitHub origins. Import merges by canonical path and preserves an
92
+ existing name or description when omitted. `--replace` replaces the configured
93
+ set. Removing or replacing a project does not alter historical task
94
+ entries.
176
95
 
177
- TaskChef supports four statuses:
96
+ The configuration does not store dispatcher identity, execution modes,
97
+ schedules, task status, results, host information, or the workspace path.
178
98
 
179
- - `pending`: the record exists, but executor creation has not completed.
180
- - `running`: the executor thread exists and may be working.
181
- - `blocked`: progress requires user input, permission, credentials, or another
182
- external condition.
183
- - `finished`: the executor concluded its current attempt and reported a result.
99
+ ## Task entry
184
100
 
185
- Typical transitions are:
186
-
187
- ```text
188
- pending → running → finished
189
- ↘ blocked → running
190
- ```
191
-
192
- `finished` describes the executor lifecycle. It does not guarantee that the
193
- goal was achieved. The result message explains success, partial completion,
194
- failure, or uncertainty. A finished task returns to `running` if the user gives
195
- its thread more work.
196
-
197
- ## Result
198
-
199
- `result` is `null` until there is a meaningful report.
101
+ `tasks.jsonl` contains one compact JSON object per line, in append order:
200
102
 
201
103
  ```json
202
- {
203
- "result": null
204
- }
104
+ {"schemaVersion":1,"id":"d1-retry-logs","project":{"name":"payments-api","path":"/workspace/payments-api","isGitRepository":true,"githubRepo":"https://github.com/example/payments-api","description":"Owns payment authorization, capture, refunds, and provider integrations."},"title":"Add payment retry logs","instruction":"Add structured logs for failed payment retries and test them.","threadId":"019f9d46-f42c-7482-9707-3c107bf241ee","createdAt":"2026-08-08T10:00:00.000Z"}
205
105
  ```
206
106
 
207
- When present, it has exactly three fields:
107
+ - `schemaVersion` identifies the task entry format.
108
+ - `id` is a unique TaskChef task identifier.
109
+ - `project` is the complete configured project snapshot used for routing.
110
+ - `title` is a short task name.
111
+ - `instruction` is the complete executor instruction.
112
+ - `threadId` identifies the created Codex task.
113
+ - `createdAt` is the dispatch time as an ISO 8601 timestamp.
208
114
 
209
- ```json
210
- {
211
- "result": {
212
- "message": "Implemented the change and opened a pull request.",
213
- "githubPRs": [
214
- "https://github.com/example/t1/pull/12"
215
- ],
216
- "githubIssues": [
217
- "https://github.com/example/t1/issues/8"
218
- ]
219
- }
220
- }
221
- ```
222
-
223
- - `message` is a required concise outcome, progress report, or blocker.
224
- - `githubPRs` is a list of canonical GitHub pull-request URLs.
225
- - `githubIssues` is a list of canonical GitHub issue URLs.
115
+ Every entry has exactly these fields. IDs and thread IDs must be unique. The
116
+ file is empty or newline terminated, with no blank lines. TaskChef rejects a
117
+ malformed log instead of skipping bad entries. Writers replace the complete
118
+ validated file atomically under a workspace lock, so an interrupted write
119
+ leaves either the old history or the complete new history.
226
120
 
227
- The URL lists are empty when no related resources exist. TaskChef does not store
228
- separate artifact, verification, commit, decision, or completion fields.
121
+ The project snapshot preserves the route even if the project is renamed,
122
+ moved, or removed later. Entries never contain status, result, transcript,
123
+ hidden reasoning, `hostId`, or update timestamps.
229
124
 
230
125
  ## Dispatch workflow
231
126
 
232
- For each delegated task, TaskChef:
233
-
234
- 1. classifies and validates the target against project metadata in
235
- `taskchef.json`;
236
- 2. writes `task.json` with `status: pending`, `threadId: null`, and
237
- `result: null`;
238
- 3. creates a real Codex task rooted at the exact project;
239
- 4. records its `threadId` and changes the status to `running`;
240
- 5. returns control after all requested tasks have been dispatched.
241
-
242
- TaskChef does not wait for delegated tasks to finish.
243
-
244
- ## Reconciliation workflow
127
+ For each assignment, `$taskchef-delegate`:
245
128
 
246
- When the user asks to refresh or fix outdated task states, TaskChef uses
247
- `$taskchef-reconcile` to perform one bounded pass:
129
+ 1. loads and validates configured projects
130
+ 2. selects one unambiguous target
131
+ 3. creates a real Codex task at the exact configured path
132
+ 4. appends a task entry only after receiving the task's thread ID
133
+ 5. returns the created task link without reading or waiting for that task.
248
134
 
249
- 1. use `task reconcile-candidates --json` to load only `running` and `blocked`
250
- task records with executor thread IDs;
251
- 2. query each returned `threadId` once using an immediate native task snapshot;
252
- 3. do not wait for future activity;
253
- 4. update `status`, `result`, and `updatedAt` from the current thread state;
254
- 5. report the concise current state and return control.
135
+ A failed executor creation produces no entry. If executor creation succeeds but
136
+ the append fails, the executor remains valid and TaskChef tells the user that
137
+ it was not recorded.
255
138
 
256
- The native Codex thread is the live source of truth between reconciliations.
257
- `task.json` is only the latest reconciled snapshot. It may still say `running`
258
- after the executor has finished and until the user explicitly requests a
259
- reconciliation pass.
139
+ ## Task history and live reports
260
140
 
261
- Reconciliation must be safe to repeat. TaskChef has no reconciliation timestamp,
262
- event cursor, event log, callback, or automatic workspace update.
263
- Finished records are excluded from normal reconciliation. An explicit full
264
- refresh uses `--include-finished` to detect a new attempt added directly to a
265
- finished executor thread.
141
+ The CLI reads persisted history without contacting Codex:
266
142
 
267
- ## Inspection workflow
143
+ - `task show <id>` returns one entry.
144
+ - `task list` returns entries in append order, optionally filtered by
145
+ historical project name or exact path.
146
+ - `task summary` returns the total and per-project counts.
268
147
 
269
- `task list` returns task records with optional repeated `--status` filters and
270
- an optional configured project name or path. `task summary` returns total and
271
- per-status counts. These commands only inspect persisted TaskChef state and do
272
- not query native executor threads.
148
+ When the user requests current state or outcomes, `$taskchef-report` loads the
149
+ relevant entries and queries every recorded Codex task exactly once, in batches
150
+ of no more than eight. It reports the snapshot and discards it. The report does
151
+ not update `tasks.jsonl`, poll, wait, or create a scheduled job.
273
152
 
274
153
  ## Boundaries
275
154
 
276
- TaskChef is local, interactive, task-focused, and asynchronous. It does not include:
277
-
278
- - `runs/` or records of the original broad prompt;
279
- - `events.jsonl` or lifecycle history;
280
- - hooks or automatic completion signals;
281
- - executor callbacks;
282
- - schedules, polling, daemons, heartbeats, or background reconciliation;
283
- - remote hosts or `hostId` storage;
284
- - project-to-current-task assignments;
285
- - one-active-task-per-project restrictions;
286
- - transcript or hidden-reasoning collection;
287
- - arbitrary Codex task discovery;
288
- - npm registry publication; the supported distribution is a GitHub-source
289
- global install or a managed source checkout.
290
-
291
- See `BACKLOG.md` for deferred capabilities and experiments.
292
-
293
- ## MVP acceptance test
294
-
295
- The MVP is successful when:
296
-
297
- 1. `taskchef.json` describes two local projects with names, paths,
298
- `isGitRepository`, GitHub repositories or explicit `null` values, and
299
- optional routing descriptions; at least one acceptance fixture is non-Git.
300
- 2. One request produces two task-specific `task.json` records.
301
- 3. Two independently openable Codex tasks are created in the correct projects.
302
- 4. Both `threadId` values are recorded.
303
- 5. The dispatcher returns without waiting for execution.
304
- 6. The user can open and prompt either delegated task directly.
305
- 7. A user request to refresh outdated states reconciles each active thread once
306
- without reading finished executor threads; ordinary delegation does not.
307
- 8. Status and result snapshots are updated correctly.
308
- 9. Two ongoing tasks may target the same project without data collisions.
309
- 10. The workspace contains dispatcher instructions, configuration, task
310
- records, and the three TaskChef skill links.
311
- 11. Bootstrap creates or idempotently merges the TaskChef-managed `AGENTS.md`
312
- block without overwriting unrelated instructions.
155
+ TaskChef does not include:
156
+
157
+ - lifecycle status or result persistence
158
+ - task callbacks, hooks, polling, daemons, heartbeats, or schedules
159
+ - arbitrary Codex task discovery
160
+ - remote hosts or `hostId` storage
161
+ - transcript or hidden-reasoning collection
162
+ - one-active-task-per-project restrictions
163
+ - batch cancellation or replay
164
+ - bundled development runtimes in dispatcher workspaces.
165
+
166
+ ## Acceptance test
167
+
168
+ 1. Bootstrap creates `AGENTS.md`, `taskchef.json`, and `tasks.jsonl`, then
169
+ remains idempotent.
170
+ 2. Project metadata routes an unambiguous request to the correct local project.
171
+ 3. A successful delegation creates a visible Codex task and appends its thread
172
+ ID with a project snapshot.
173
+ 4. The dispatcher returns without waiting for execution.
174
+ 5. Several independent assignments can create several entries, including
175
+ multiple entries for the same project.
176
+ 6. Task history commands return deterministic entries and project counts.
177
+ 7. A live report queries each relevant task once and writes nothing.
178
+ 8. Malformed JSONL, duplicate IDs, duplicate thread IDs, and symlinked managed
179
+ files fail safely.
@@ -5,7 +5,7 @@ This repository is a TaskChef dispatcher workspace.
5
5
 
6
6
  - Use `$taskchef-bootstrap` when initializing or refreshing this workspace,
7
7
  changing or listing its configured projects, running TaskChef doctor,
8
- repairing its managed instructions, or upgrading its TaskChef skill links.
8
+ or repairing its managed instructions.
9
9
  - For every actionable work request, use `$taskchef-delegate`
10
10
  automatically, even when the user does not explicitly say "delegate" or
11
11
  mention TaskChef.
@@ -13,6 +13,7 @@ This repository is a TaskChef dispatcher workspace.
13
13
  - Return immediately after dispatch, as required by `$taskchef-delegate`.
14
14
  - Answer directly only when the user explicitly asks about TaskChef itself or
15
15
  explicitly says not to delegate.
16
- - Use `$taskchef-reconcile` only when the user asks to refresh or fix outdated
17
- TaskChef task states.
16
+ - Use `$taskchef-report` only when the user asks for a live report about
17
+ delegated work. Reports query the recorded Codex tasks once and do not
18
+ write status or results to this workspace.
18
19
  <!-- taskchef:dispatcher-instructions:end -->
package/index.js CHANGED
@@ -1,10 +1,8 @@
1
1
  export {
2
2
  addProject,
3
3
  buildTaskSummary,
4
- buildReconciliationCandidates,
5
4
  canonicalDirectory,
6
5
  canonicalGitRoot,
7
- createTask,
8
6
  doctorWorkspace,
9
7
  ensureWorkspaceInstructions,
10
8
  ensureWorkspaceSkills,
@@ -12,12 +10,11 @@ export {
12
10
  importProjects,
13
11
  initializeWorkspace,
14
12
  listProjects,
15
- listTasks,
16
13
  readConfig,
14
+ listTasks,
17
15
  readTask,
16
+ recordTask,
18
17
  requireSafeId,
19
18
  removeProject,
20
- updateTask,
21
19
  validateConfig,
22
- validateResult,
23
20
  } from "./src/workspace.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskchef",
3
- "version": "1.0.2",
3
+ "version": "3.0.0",
4
4
  "description": "A non-blocking interactive dispatcher for visible Codex tasks.",
5
5
  "license": "MIT",
6
6
  "author": "Favo Yang",
@@ -18,6 +18,7 @@
18
18
  "taskchef": "bin/taskchef.js"
19
19
  },
20
20
  "files": [
21
+ ".codex-plugin",
21
22
  "assets",
22
23
  "BACKLOG.md",
23
24
  "bin",
@@ -26,12 +27,19 @@
26
27
  "src",
27
28
  "skills/taskchef-bootstrap",
28
29
  "skills/taskchef-delegate",
29
- "skills/taskchef-reconcile"
30
+ "skills/taskchef-report"
30
31
  ],
31
32
  "engines": {
32
33
  "node": ">=18"
33
34
  },
35
+ "devDependencies": {
36
+ "conventional-changelog-conventionalcommits": "^10.3.0",
37
+ "yaml": "^2.9.0"
38
+ },
34
39
  "scripts": {
35
40
  "test": "node --test tests/taskchef.test.js"
41
+ },
42
+ "dependencies": {
43
+ "proper-lockfile": "^4.1.2"
36
44
  }
37
45
  }
@@ -1,32 +1,34 @@
1
1
  ---
2
2
  name: taskchef-bootstrap
3
- description: "Initialize, diagnose, or refresh TaskChef dispatcher workspaces, project configuration, managed AGENTS.md instructions, and TaskChef skill links. Use when creating a TaskChef workspace, adding, importing, listing, or removing configured projects, running TaskChef doctor, repairing dispatcher setup, or upgrading installed TaskChef skills. Do not dispatch user work or reconcile executor threads."
3
+ description: "Initialize, diagnose, or refresh TaskChef dispatcher workspaces, project configuration, task history, and managed AGENTS.md instructions. Use when creating a TaskChef workspace, adding, importing, listing, or removing configured projects, running TaskChef doctor, or repairing dispatcher setup. Do not dispatch user work or report on executor threads."
4
4
  ---
5
5
 
6
6
  # TaskChef Bootstrap
7
7
 
8
8
  Initialize or refresh a data-only TaskChef dispatcher workspace.
9
9
 
10
- Resolve this linked skill with `realpath`. The TaskChef source root is two
11
- parents above the skill directory. Invoke `<source-root>/bin/taskchef.js` for
10
+ Resolve this skill directory with `realpath`. The TaskChef plugin root is two
11
+ parents above the skill directory. Invoke `<plugin-root>/bin/taskchef.js` for
12
12
  all deterministic workspace operations.
13
13
 
14
14
  ## Boundaries
15
15
 
16
16
  - Keep implementation, tests, and reports in the TaskChef source repository.
17
- - Keep only `AGENTS.md`, `taskchef.json`, `tasks/*/task.json`, and the three
18
- TaskChef skill links in a dispatcher workspace.
19
- - Do not dispatch tasks or reconcile executor threads during bootstrap unless
17
+ - Keep only `AGENTS.md`, `taskchef.json`, and `tasks.jsonl` in a dispatcher
18
+ workspace.
19
+ - Do not dispatch tasks or report on executor threads during bootstrap unless
20
20
  the user separately requests those actions.
21
21
  - Never use collaboration agents, hooks, schedules, polling, or daemons.
22
22
 
23
23
  ## Initialize and repair
24
24
 
25
25
  1. Run `workspace init --json`. It takes no stdin, creates an empty
26
- configuration when missing, and idempotently creates or refreshes the task
27
- directory, managed instructions, and all three skill links.
26
+ configuration when missing, creates the append-only task log, refreshes
27
+ managed instructions, and migrates legacy task records that have executor
28
+ thread IDs. The installed plugin provides all three TaskChef skills outside
29
+ the dispatcher workspace.
28
30
  2. Run `doctor --json` after setup or when the user asks to diagnose the
29
- workspace. Doctor is read-only; rerun `workspace init --json` to repair the
31
+ workspace. Doctor is read-only. Rerun `workspace init --json` to repair the
30
32
  managed scaffold.
31
33
  3. Report the actions or failed checks. End without dispatching unless the user
32
34
  separately requested work.
@@ -38,7 +40,7 @@ all deterministic workspace operations.
38
40
  projects are outside the v1 contract.
39
41
  2. Add one project with `project add <path>`, normally supplying `--name` and a
40
42
  curated `--description`. The CLI detects Git status, exact Git root, and a
41
- canonical GitHub `origin`; use `--no-github` or `--github-repo` only to
43
+ canonical GitHub `origin`. Use `--no-github` or `--github-repo` only to
42
44
  override detection.
43
45
  3. Bulk import with `project import <file|-> --json`. Input is a JSON array of
44
46
  objects containing `path` plus optional `name`, `description`, and
@@ -46,5 +48,4 @@ all deterministic workspace operations.
46
48
  or description when omitted. Use `--replace` only when the user explicitly
47
49
  requests replacement.
48
50
  4. Inspect configured projects with `project list --json`. Remove by name with
49
- `project remove`; require explicit user intent before `--force` when task
50
- records reference the project.
51
+ `project remove`. Existing task entries keep their project snapshots.
@@ -1,30 +1,30 @@
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, or splitting independent work across projects. Record successful dispatches, return immediately, and 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
9
 
10
- Resolve this linked skill with `realpath`. The TaskChef source root is two
10
+ Resolve this skill directory with `realpath`. The TaskChef plugin root is two
11
11
  parents above the skill directory. Use the TaskChef executable under that root
12
12
  for all deterministic workspace and task-record operations.
13
13
 
14
14
  ## Boundaries
15
15
 
16
16
  - Keep implementation, tests, and reports in the TaskChef source repository.
17
- - Keep only `AGENTS.md`, `taskchef.json`, `tasks/*/task.json`, and the three
18
- TaskChef skill links in a dispatcher workspace.
17
+ - Keep only `AGENTS.md`, `taskchef.json`, and `tasks.jsonl` in a dispatcher
18
+ workspace.
19
19
  - Use real Codex tasks, never collaboration or subagent tools.
20
- - Never use hooks, callbacks, schedules, polling, daemons, or event logs.
20
+ - Never use hooks, callbacks, schedules, polling, or daemons.
21
21
  - Never wait for delegated work after executor creation.
22
22
  - Never collect transcripts or hidden reasoning.
23
23
 
24
24
  ## Dispatch
25
25
 
26
26
  1. Run
27
- `<source-root>/bin/taskchef.js project list --json --workspace <workspace>`
27
+ `<plugin-root>/bin/taskchef.js project list --json --workspace <workspace>`
28
28
  to load and validate the configured routing targets. Use
29
29
  `$taskchef-bootstrap` if the workspace is missing or unhealthy.
30
30
  2. Split the request into the smallest independently useful outcomes. Include
@@ -33,18 +33,16 @@ for all deterministic workspace and task-record operations.
33
33
  `path` only as checkout identity. Ask when metadata does not produce one
34
34
  clear project match.
35
35
  4. Resolve native projects once and require the exact configured path.
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.
42
- 6. Create one real Codex task per record using the exact saved project and a
43
- local environment on its executor host.
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`.
48
- 8. Leave a failed creation pending. Do not invent an ID or delete the record.
49
- 9. Return immediately with a created-thread directive for every success. Do
36
+ 5. Create one real Codex task per assignment using the exact configured project
37
+ and a local environment on its executor host. Generate a unique task ID
38
+ before creation, but do not write anything yet.
39
+ 6. After executor creation returns a thread ID, immediately run
40
+ `<plugin-root>/bin/taskchef.js task record --json --workspace <workspace>`.
41
+ Send exactly `id`, `project`, `title`, `instruction`, and `threadId` as JSON
42
+ on stdin. Use the configured project path for `project`. Never persist
43
+ `hostId`, status, results, transcripts, or hidden reasoning.
44
+ 7. If executor creation fails, do not record a task. If recording fails
45
+ after creation, still return the created task and clearly say that it is not
46
+ in the task log. Do not delete the executor.
47
+ 8. Return immediately with a created-thread directive for every success. Do
50
48
  not read or wait for a newly created executor.