taskchef 2.0.0 → 3.0.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskchef",
3
- "version": "2.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Dispatch work from a data-only workspace to visible Codex project tasks.",
5
5
  "author": {
6
6
  "name": "Favo Yang",
@@ -19,7 +19,7 @@
19
19
  "interface": {
20
20
  "displayName": "TaskChef",
21
21
  "shortDescription": "Dispatch work to the right Codex project task.",
22
- "longDescription": "Create a data-only dispatcher workspace, route actionable requests to independently openable Codex project tasks, and reconcile saved task states on demand.",
22
+ "longDescription": "Route actionable requests to independently openable Codex project tasks, keep an append-only task history, and query live reports on demand.",
23
23
  "developerName": "Favo Yang",
24
24
  "category": "Productivity",
25
25
  "capabilities": [
@@ -30,7 +30,7 @@
30
30
  "defaultPrompt": [
31
31
  "$taskchef-bootstrap Set up TaskChef in this folder.",
32
32
  "$taskchef-delegate Dispatch this request to the right project.",
33
- "$taskchef-reconcile Fix outdated TaskChef task states."
33
+ "$taskchef-report Report on work in the TaskChef task history."
34
34
  ],
35
35
  "brandColor": "#D97706"
36
36
  }
package/BACKLOG.md CHANGED
@@ -1,88 +1,41 @@
1
1
  # TaskChef backlog
2
2
 
3
- This document contains capabilities intentionally excluded from the v1 MVP.
4
- `SPEC.md` is the canonical v1 contract.
5
-
6
- ## Task activity and automatic reporting
7
-
8
- - Determine whether Codex hook `session_id` reliably maps to a recorded task
9
- `threadId`.
10
- - Evaluate task-specific hooks without inferring ownership from project path.
11
- - Evaluate an explicit executor callback such as `taskchef task report`.
12
- - Decide how delegated tasks can safely update the data workspace across Codex
13
- filesystem boundaries.
14
- - Add automatic finish signals only after task attribution is proven reliable.
15
- - Design event ordering, deduplication, cursors, and replay semantics before
16
- introducing `events.jsonl`.
17
-
18
- ## Reconciliation and continuity
19
-
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.
39
- - Evaluate heartbeat behavior, restart recovery, and recovery after the
40
- dispatcher task is deleted.
41
- - Add a reconciliation cursor only when repeated full snapshots become costly
42
- or incorrect.
43
- - Determine whether thread status alone is sufficient after Codex or machine
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.
49
-
50
- ## Grouping and history
51
-
52
- - Add dispatch or run records only when batch cancellation, aggregate status,
53
- replay, or decomposition history has a concrete use case.
54
- - Decide whether and how to retain the original broad prompt.
55
- - Add archival and retention policies for old task records.
56
-
57
- ## V2: remote connection projects
58
-
59
- - Import remote connection projects returned by the native project-list tool.
60
- - Persist the native `projectId` and `hostId` needed to distinguish identical
61
- paths on different hosts and route task creation.
62
- - Re-resolve stored native identities against the project list before every
63
- dispatch instead of assuming they remain valid indefinitely.
64
- - Validate remote paths and Git state through native host-aware project data;
65
- do not run local filesystem validation against a remote path.
66
- - Persist enough host context with delegated tasks to reconcile remote threads
67
- reliably without arbitrary task discovery.
3
+ `SPEC.md` is the current contract. These ideas need a concrete user case and a
4
+ clear data model before implementation.
5
+
6
+ ## Task history views
7
+
8
+ - Add date ranges and title search if the task log becomes difficult to
9
+ browse.
10
+ - Consider export formats for personal activity reports.
11
+ - Define archival or retention only when real logs become large enough to need
12
+ it.
13
+ - Consider grouping entries created from one broad request without storing the
14
+ full original prompt.
15
+
16
+ ## Optional reports
17
+
18
+ - Consider user-scheduled, read-only digests that query recorded Codex tasks
19
+ and publish a report without writing status or results to the TaskChef
20
+ workspace.
21
+ - Define batching and partial-read behavior for large task histories.
22
+ - Decide whether inaccessible or deleted Codex tasks need a separate report
23
+ category.
24
+
25
+ ## Remote projects
26
+
27
+ - Import remote connection projects returned by native project discovery.
28
+ - Persist the native project and host identity needed to distinguish identical
29
+ paths on different hosts.
30
+ - Re-resolve remote identities before dispatch.
68
31
  - Define unavailable-host, renamed-project, moved-path, and stale-identity
69
- behavior before enabling remote dispatch.
70
- - Evaluate worktrees and isolated execution for concurrent tasks in one
32
+ behavior.
33
+ - Evaluate isolated worktrees and conflict handling for concurrent tasks in one
71
34
  project.
72
- - Define conflict handling when several tasks modify the same checkout.
73
-
74
- ## Data model extensions
75
-
76
- - Add richer result fields only when real integrations require them.
77
- - Evaluate structured verification, artifacts, commits, and completion outcome
78
- fields.
79
- - Support multiple executor threads for one logical task if needed.
80
- - Define schema migrations and compatibility rules after the first persisted
81
- v1 records exist.
82
35
 
83
- ## Integrations and distribution
36
+ ## Integrations
84
37
 
85
- - Add GitHub automation beyond storing PR and issue URLs.
86
- - Evaluate automatic project discovery instead of an explicit configured list.
87
- - Evaluate marketplace discovery and update automation after the shared plugin
88
- catalog has real usage.
38
+ - Add GitHub automation only when task history alone is insufficient.
39
+ - Evaluate automatic project discovery rules and exclusions.
40
+ - Consider multiple executor threads for one logical assignment if a real
41
+ workflow requires it.
package/README.md CHANGED
@@ -1,136 +1,208 @@
1
1
  # TaskChef
2
2
 
3
- TaskChef is a non-blocking interactive dispatcher for visible Codex tasks. It
4
- keeps a data-only workspace, routes independent assignments to real Codex
5
- tasks, records their latest reconciled state, and returns control immediately.
3
+ Bring work for all your local Codex projects to one inbox. TaskChef reads each
4
+ request, chooses the right project, and opens a normal Codex task there. It
5
+ keeps a task history so you can find the work later. The created Codex tasks
6
+ remain the source of truth for progress and results.
7
+
8
+ If a request contains independent work for different projects, TaskChef can
9
+ open several tasks. It returns as soon as they are created, so you can send the
10
+ next request or open any executor and work with it directly.
11
+
12
+ ## The mental model
13
+
14
+ - The **dispatcher workspace** is a small folder that stores project routes and
15
+ task history. A Codex task opened in this folder is the
16
+ **dispatcher**.
17
+ - A **configured project** is a local repository or folder where TaskChef may
18
+ send work.
19
+ - An **executor** is the normal Codex task that handles delegated work inside a
20
+ configured project.
21
+ - A **task entry** records what TaskChef delegated, which project it chose, and
22
+ the executor's Codex task ID.
6
23
 
7
- The canonical contract is [SPEC.md](SPEC.md). Deferred ideas are in
8
- [BACKLOG.md](BACKLOG.md).
24
+ ```text
25
+ request in dispatcher
26
+ |
27
+ +-- task entry --> executor in project A
28
+ +-- task entry --> executor in project B
29
+ ```
9
30
 
10
- ## Installation
31
+ TaskChef does not copy executor results into its workspace. When you ask for a
32
+ report, it reads the recorded task IDs, checks those Codex tasks once, and
33
+ shows their current state without saving another snapshot.
11
34
 
12
- TaskChef requires Node.js 18 or newer and Git.
35
+ ## Quickstart
13
36
 
14
- Add the shared Favo Yang plugin marketplace, then install TaskChef:
37
+ ### 1. Install the plugin
38
+
39
+ You need Node.js 18 or newer, Git, and local access to each target project.
40
+
41
+ Add the [Favo Yang plugin marketplace](https://github.com/favoyang/codex-plugins)
42
+ and install TaskChef:
15
43
 
16
44
  ```sh
17
45
  codex plugin marketplace add favoyang/codex-plugins
18
46
  codex plugin add taskchef@favoyang-plugins
19
47
  ```
20
48
 
21
- Open or create the folder that will hold TaskChef's dispatcher data, start a
22
- new Codex task there, and ask:
49
+ ### 2. Create the dispatcher workspace
50
+
51
+ Create a folder wherever you keep local projects:
52
+
53
+ ```sh
54
+ mkdir -p ~/taskchef
55
+ cd ~/taskchef
56
+ ```
57
+
58
+ Add `~/taskchef` as a project in Codex. Start a new task in that project and
59
+ run the bootstrap skill:
60
+
61
+ ```text
62
+ $taskchef-bootstrap Set up TaskChef in this folder.
63
+ ```
64
+
65
+ Bootstrap creates:
23
66
 
24
67
  ```text
25
- $taskchef-bootstrap Set up TaskChef in this folder and help me choose projects.
68
+ AGENTS.md
69
+ taskchef.json
70
+ tasks.jsonl
26
71
  ```
27
72
 
28
- The plugin provides all three TaskChef skills and its deterministic CLI runtime;
29
- dispatcher workspaces do not install or link skills themselves.
73
+ TaskChef scans eligible local Codex projects during setup and adds them to the
74
+ managed project list in `taskchef.json`.
30
75
 
31
- For headless CLI use, install the npm package with
32
- `npm install --global taskchef`. Contributors can run `node bin/taskchef.js`
33
- directly from a source checkout.
76
+ `taskchef.json` defines the available routes. A project name or GitHub pull
77
+ request URL in your request is usually enough for TaskChef to choose the right
78
+ project. If a project needs more context, extend its optional `description`
79
+ field with responsibilities and keywords that distinguish it from nearby
80
+ projects.
34
81
 
35
- ## Updating
82
+ The generated `AGENTS.md` turns ordinary requests in this project into
83
+ delegated work. You do not need to name the delegate skill each time.
36
84
 
37
- Refresh the marketplace and reinstall TaskChef:
85
+ ### 3. Delegate the first task
38
86
 
39
- ```sh
40
- codex plugin marketplace upgrade favoyang-plugins
41
- codex plugin add taskchef@favoyang-plugins
87
+ Suppose bootstrap found a project named `payments-api`. This prompt delegates
88
+ one task to it:
89
+
90
+ ```text
91
+ In payments-api, fix the duplicate charge shown after a payment retry, add a regression test, and report what changed.
42
92
  ```
43
93
 
44
- Start a new Codex task to load the updated skills.
94
+ TaskChef replies with a link to the new Codex task. Open it to follow progress
95
+ or give the executor more instructions. The dispatcher is ready for another
96
+ request immediately.
45
97
 
46
- ### Migrating from 1.x
98
+ ## Everyday workflows
47
99
 
48
- TaskChef 2.x moves skill ownership from dispatcher-workspace symlinks to the
49
- installed plugin. Run `$taskchef-bootstrap` once in an existing workspace to
50
- remove the three legacy TaskChef links; unrelated `.agents` content is
51
- preserved. The deprecated `ensureWorkspaceSkills()` export remains available
52
- for compatibility but reports plugin-provided skills instead of creating
53
- workspace links.
100
+ ### Route work across projects
54
101
 
55
- ## Workspace
102
+ Suppose `storefront` is another configured project and owns the customer web
103
+ interface. These two changes do not depend on each other, so they can run in
104
+ separate tasks:
56
105
 
57
106
  ```text
58
- AGENTS.md
59
- taskchef.json
60
- tasks/<task-id>/task.json
107
+ In payments-api, add structured logs for failed payment retries and test them. Separately, in storefront, fix the checkout form's keyboard focus order and run the browser tests.
61
108
  ```
62
109
 
63
- Create or repair the managed scaffold without supplying configuration:
110
+ TaskChef opens one executor in each project. If several changes need close
111
+ coordination, keep them in one task instead of splitting them just because
112
+ they touch frontend and backend code. Multiple active executors may also use
113
+ the same project.
64
114
 
65
- ```sh
66
- taskchef workspace init --workspace <workspace>
67
- taskchef doctor --workspace <workspace>
68
- ```
115
+ ### Follow up on delegated work
69
116
 
70
- Initialization is idempotent. It creates an empty configuration when missing
71
- and preserves existing configured projects. When upgrading from the earlier
72
- workspace-linked distribution, initialization removes the three legacy
73
- TaskChef skill symlinks and preserves unrelated `.agents` content.
117
+ Open an executor and prompt it like any other Codex task. Its thread is the
118
+ live source of truth for progress, questions, and results.
74
119
 
75
- ## Projects
120
+ The dispatcher workspace keeps `tasks.jsonl`, an append-only history of
121
+ successful delegations. It records what TaskChef sent, when it sent it, which
122
+ project it selected, and which Codex task received the work.
76
123
 
77
- Add one project. Git status, the exact Git root, and a canonical GitHub origin
78
- are detected automatically:
124
+ ### Ask for a live report
79
125
 
80
- ```sh
81
- taskchef project add /workspace/payments \
82
- --name payments \
83
- --description "Owns payment authorization, capture, and refunds." \
84
- --workspace <workspace>
126
+ Ask the dispatcher when you want a current overview:
127
+
128
+ ```text
129
+ Report on the work TaskChef has dispatched.
85
130
  ```
86
131
 
87
- Import a JSON array from a file or stdin:
132
+ This runs `$taskchef-report`. It reads the task history, checks the relevant
133
+ Codex tasks once, and reports their current states and outcomes. Nothing is
134
+ written back to the log, and TaskChef does not keep polling after the report.
88
135
 
89
- ```sh
90
- taskchef project import projects.json --workspace <workspace>
91
- taskchef project import - --workspace <workspace> < projects.json
136
+ ### Manage configured projects
137
+
138
+ Use `$taskchef-bootstrap` to scan local Codex projects and refresh the managed
139
+ list:
140
+
141
+ ```text
142
+ $taskchef-bootstrap Scan my local Codex projects and update TaskChef's managed project list.
92
143
  ```
93
144
 
94
- Import merges by canonical path. Existing names and descriptions are preserved
95
- when omitted. `--replace` explicitly replaces the configured project set.
145
+ The same skill can diagnose the workspace and repair configuration errors that
146
+ it can fix safely:
96
147
 
97
- ```sh
98
- taskchef project list --workspace <workspace>
99
- taskchef project remove payments --workspace <workspace>
148
+ ```text
149
+ $taskchef-bootstrap Diagnose this TaskChef workspace and fix any repairable configuration errors.
100
150
  ```
101
151
 
102
- Removal refuses to orphan existing task records unless `--force` is supplied.
152
+ Project paths must exist when you add or dispatch to them. Configure the
153
+ repository root for a Git project. TaskChef also accepts non-Git folders. It
154
+ detects Git status and the canonical GitHub `origin` when adding or importing
155
+ a project.
103
156
 
104
- ## Tasks
157
+ Removing a project does not rewrite old task entries. Each entry keeps the
158
+ project metadata that TaskChef used when it delegated the work.
105
159
 
106
- Task creation and update read JSON from stdin:
160
+ ## Important boundaries
107
161
 
108
- ```sh
109
- printf '%s\n' '{"id":"t1","project":"/workspace/payments","title":"Echo input","instruction":"Create and test echo_input.py."}' |
110
- taskchef task create --json --workspace <workspace>
162
+ - TaskChef is an interactive dispatcher. It is not a scheduler, daemon, hook
163
+ service, or background worker.
164
+ - Executors are visible Codex tasks. The dispatcher does not supervise them or
165
+ wait for them to finish.
166
+ - TaskChef routes only to projects on the same local execution host.
167
+ - The task history contains successful delegations, not current task status or
168
+ task results.
169
+ - TaskChef does not store executor transcripts, hidden reasoning, or `hostId`.
170
+ - A live report is a one-time read of recorded Codex tasks. TaskChef discards
171
+ the fetched state after presenting it.
172
+
173
+ ## Updating
111
174
 
112
- printf '%s\n' '{"status":"running","threadId":"019f..."}' |
113
- taskchef task update t1 --json --workspace <workspace>
175
+ Refresh the marketplace snapshot, then reinstall TaskChef:
176
+
177
+ ```sh
178
+ codex plugin marketplace upgrade favoyang-plugins
179
+ codex plugin add taskchef@favoyang-plugins
114
180
  ```
115
181
 
116
- Inspection commands:
182
+ ## CLI reference
183
+
184
+ The plugin has three skills:
185
+
186
+ - `$taskchef-bootstrap` initializes, diagnoses, and configures a workspace
187
+ - `$taskchef-delegate` routes requests and creates executor tasks
188
+ - `$taskchef-report` reads the task history and reports live executor state once
189
+
190
+ The CLI underneath these skills manages workspace data. Run it once with `npx`
191
+ if you do not want a global installation:
117
192
 
118
193
  ```sh
119
- taskchef task show <task-id> --workspace <workspace>
120
- taskchef task list --workspace <workspace>
121
- taskchef task list --status running --status blocked --project payments --workspace <workspace>
122
- taskchef task summary --workspace <workspace>
123
- taskchef task reconcile-candidates --json --workspace <workspace>
194
+ npx taskchef help
124
195
  ```
125
196
 
126
- `task reconcile-candidates` returns only `running` and `blocked` tasks with
127
- thread IDs. Pass `--include-finished` only for an explicit full refresh or when
128
- a finished executor is known to have received new work.
197
+ For the shorter command used below, install it globally:
129
198
 
130
- Delegation does not reconcile task states first. Ask the dispatcher to refresh
131
- or fix outdated task states when you want it to run `$taskchef-reconcile`.
199
+ ```sh
200
+ npm install --global taskchef
201
+ ```
132
202
 
133
- ## Complete CLI
203
+ The npm package provides the data CLI. The Codex plugin provides the skills
204
+ that create and inspect executor tasks. From a source checkout, use
205
+ `node bin/taskchef.js`.
134
206
 
135
207
  ```text
136
208
  taskchef help
@@ -140,43 +212,65 @@ taskchef project add <path>
140
212
  taskchef project import [<file> | -]
141
213
  taskchef project list
142
214
  taskchef project remove <name>
143
- taskchef task create
144
- taskchef task update <task-id>
215
+ taskchef task record
145
216
  taskchef task show <task-id>
146
217
  taskchef task list
147
218
  taskchef task summary
148
- taskchef task reconcile-candidates
149
219
  ```
150
220
 
151
- All commands accept `--workspace <path>`. Add `--json` for deterministic JSON
152
- output used by the TaskChef skills; otherwise the CLI prints human-readable
153
- output.
221
+ Workspace and data commands accept `--workspace <path>` and default to the
222
+ current directory. Data commands accept `--json` for machine-readable output.
223
+ Run `taskchef help` for every option.
224
+
225
+ ### Project administration
154
226
 
155
- ## Release
227
+ ```sh
228
+ taskchef workspace init --workspace <workspace>
229
+ taskchef doctor --workspace <workspace>
156
230
 
157
- Releases are automated with semantic-release from the `Release` GitHub Actions
158
- workflow on `main`. Use Semantic Commit Messages so the release type can be
159
- calculated:
231
+ taskchef project add /workspace/payments \
232
+ --name payments \
233
+ --description "Owns payment authorization, capture, and refunds." \
234
+ --workspace <workspace>
160
235
 
161
- ```text
162
- fix: correct task reconciliation
163
- feat: add a new CLI command
164
- feat!: change the workspace data contract
236
+ taskchef project list --workspace <workspace>
237
+ taskchef project remove payments --workspace <workspace>
165
238
  ```
166
239
 
167
- Publishing uses npm trusted publishing from `.github/workflows/release.yml`.
168
- The workflow runs the test suite, validates the npm tarball, publishes the
169
- calculated version after synchronizing the plugin manifest, creates the GitHub
170
- release, commits the synchronized version files back to `main`, and pins the TaskChef entry
171
- in `favoyang/codex-plugins` to that exact npm version.
240
+ Import projects as a JSON array from a file or standard input:
172
241
 
173
- The release job requires an Actions secret named `MARKETPLACE_DEPLOY_KEY`.
174
- Store the private half of a dedicated SSH deploy key there, and add its public
175
- half to `favoyang/codex-plugins` with write access. The key must be scoped only
176
- to that catalog repository; the workflow's repository-scoped `GITHUB_TOKEN`
177
- cannot update another repository.
242
+ ```sh
243
+ taskchef project import projects.json --workspace <workspace>
244
+ taskchef project import - --workspace <workspace> < projects.json
245
+ ```
246
+
247
+ Import merges by canonical path and preserves an existing name or description
248
+ when the imported object omits it. `--replace` replaces the configured project
249
+ set.
250
+
251
+ ### Task history
178
252
 
179
- ## Development
253
+ `task record` reads one successful delegation from standard input. The
254
+ `project` value is the exact configured project path:
255
+
256
+ ```sh
257
+ printf '%s\n' '{"id":"t1","project":"/workspace/payments","title":"Add retry logs","instruction":"Add structured logs for failed retries and test them.","threadId":"019f..."}' |
258
+ taskchef task record --json --workspace <workspace>
259
+ ```
260
+
261
+ Inspect the task history without querying Codex tasks:
262
+
263
+ ```sh
264
+ taskchef task show t1 --workspace <workspace>
265
+ taskchef task list --workspace <workspace>
266
+ taskchef task list --project payments --workspace <workspace>
267
+ taskchef task summary --workspace <workspace>
268
+ ```
269
+
270
+ The complete data contract is in [SPEC.md](SPEC.md). Deferred ideas are in
271
+ [BACKLOG.md](BACKLOG.md).
272
+
273
+ ## Development and release
180
274
 
181
275
  ```sh
182
276
  npm test
@@ -184,8 +278,17 @@ npm pack --dry-run
184
278
  npx -y -p semantic-release@25 -p @semantic-release/exec -p @semantic-release/git semantic-release --dry-run
185
279
  ```
186
280
 
187
- ## Boundaries
281
+ The `Release` GitHub Actions workflow runs semantic-release on `main`.
282
+ Semantic Commit Messages determine the release type:
283
+
284
+ ```text
285
+ fix: correct task log validation
286
+ feat: add a new CLI command
287
+ feat!: change the workspace data contract
288
+ ```
188
289
 
189
- TaskChef is not an agent runtime, scheduler, hook service, or background
190
- worker. Delegated work runs in real Codex tasks, never subagents.
191
- Reconciliation is a single immediate snapshot pass and never polls or waits.
290
+ The workflow tests the package and validates the npm tarball before publishing
291
+ through npm trusted publishing. It synchronizes version files, creates the
292
+ GitHub release, and pins the TaskChef entry in `favoyang/codex-plugins` to the
293
+ published npm version. Marketplace updates use the `MARKETPLACE_DEPLOY_KEY`
294
+ Actions secret, a write-enabled deploy key scoped to the catalog repository.