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.
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "taskchef",
3
+ "version": "3.0.0",
4
+ "description": "Dispatch work from a data-only workspace to visible Codex project tasks.",
5
+ "author": {
6
+ "name": "Favo Yang",
7
+ "url": "https://github.com/favoyang"
8
+ },
9
+ "homepage": "https://github.com/favoyang/taskchef#readme",
10
+ "repository": "https://github.com/favoyang/taskchef",
11
+ "license": "MIT",
12
+ "keywords": [
13
+ "codex",
14
+ "delegation",
15
+ "dispatcher",
16
+ "tasks"
17
+ ],
18
+ "skills": "./skills/",
19
+ "interface": {
20
+ "displayName": "TaskChef",
21
+ "shortDescription": "Dispatch work to the right Codex project task.",
22
+ "longDescription": "Route actionable requests to independently openable Codex project tasks, keep an append-only task history, and query live reports on demand.",
23
+ "developerName": "Favo Yang",
24
+ "category": "Productivity",
25
+ "capabilities": [
26
+ "Read",
27
+ "Write"
28
+ ],
29
+ "websiteURL": "https://github.com/favoyang/taskchef",
30
+ "defaultPrompt": [
31
+ "$taskchef-bootstrap Set up TaskChef in this folder.",
32
+ "$taskchef-delegate Dispatch this request to the right project.",
33
+ "$taskchef-report Report on work in the TaskChef task history."
34
+ ],
35
+ "brandColor": "#D97706"
36
+ }
37
+ }
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
- - Consider npm registry publication only after the GitHub-source installation
88
- and local managed-checkout workflows are stable.
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,115 +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
- Install the CLI and its bundled skills from npm:
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
- npm install --global taskchef
45
+ codex plugin marketplace add favoyang/codex-plugins
46
+ codex plugin add taskchef@favoyang-plugins
18
47
  ```
19
48
 
20
- Then initialize a dispatcher workspace. Initialization links the three bundled
21
- TaskChef skills into that workspace; no separate skill installation is needed.
49
+ ### 2. Create the dispatcher workspace
50
+
51
+ Create a folder wherever you keep local projects:
22
52
 
23
53
  ```sh
24
- taskchef workspace init --workspace <workspace>
25
- taskchef doctor --workspace <workspace>
54
+ mkdir -p ~/taskchef
55
+ cd ~/taskchef
26
56
  ```
27
57
 
28
- Contributors working from a source checkout can run `node bin/taskchef.js`
29
- directly; this managed skills workspace installs the checkout CLI and skills
30
- with symlinks. To install an unreleased revision, use
31
- `npm install --global github:favoyang/taskchef`.
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
+ ```
32
64
 
33
- ## Workspace
65
+ Bootstrap creates:
34
66
 
35
67
  ```text
36
68
  AGENTS.md
37
69
  taskchef.json
38
- .agents/skills/taskchef-bootstrap -> <source>/skills/taskchef-bootstrap
39
- .agents/skills/taskchef-delegate -> <source>/skills/taskchef-delegate
40
- .agents/skills/taskchef-reconcile -> <source>/skills/taskchef-reconcile
41
- tasks/<task-id>/task.json
70
+ tasks.jsonl
42
71
  ```
43
72
 
44
- Create or repair the managed scaffold without supplying configuration:
73
+ TaskChef scans eligible local Codex projects during setup and adds them to the
74
+ managed project list in `taskchef.json`.
45
75
 
46
- ```sh
47
- taskchef workspace init --workspace <workspace>
48
- taskchef doctor --workspace <workspace>
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.
81
+
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.
84
+
85
+ ### 3. Delegate the first task
86
+
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.
49
92
  ```
50
93
 
51
- Initialization is idempotent. It creates an empty configuration when missing
52
- and preserves existing configured projects.
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.
53
97
 
54
- ## Projects
98
+ ## Everyday workflows
55
99
 
56
- Add one project. Git status, the exact Git root, and a canonical GitHub origin
57
- are detected automatically:
100
+ ### Route work across projects
58
101
 
59
- ```sh
60
- taskchef project add /workspace/payments \
61
- --name payments \
62
- --description "Owns payment authorization, capture, and refunds." \
63
- --workspace <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:
105
+
106
+ ```text
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.
64
108
  ```
65
109
 
66
- Import a JSON array from a file or stdin:
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.
67
114
 
68
- ```sh
69
- taskchef project import projects.json --workspace <workspace>
70
- taskchef project import - --workspace <workspace> < projects.json
115
+ ### Follow up on delegated work
116
+
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.
119
+
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.
123
+
124
+ ### Ask for a live report
125
+
126
+ Ask the dispatcher when you want a current overview:
127
+
128
+ ```text
129
+ Report on the work TaskChef has dispatched.
71
130
  ```
72
131
 
73
- Import merges by canonical path. Existing names and descriptions are preserved
74
- when omitted. `--replace` explicitly replaces the configured project set.
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.
75
135
 
76
- ```sh
77
- taskchef project list --workspace <workspace>
78
- taskchef project remove payments --workspace <workspace>
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.
79
143
  ```
80
144
 
81
- Removal refuses to orphan existing task records unless `--force` is supplied.
145
+ The same skill can diagnose the workspace and repair configuration errors that
146
+ it can fix safely:
82
147
 
83
- ## Tasks
148
+ ```text
149
+ $taskchef-bootstrap Diagnose this TaskChef workspace and fix any repairable configuration errors.
150
+ ```
84
151
 
85
- Task creation and update read JSON from stdin:
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.
86
156
 
87
- ```sh
88
- printf '%s\n' '{"id":"t1","project":"/workspace/payments","title":"Echo input","instruction":"Create and test echo_input.py."}' |
89
- taskchef task create --json --workspace <workspace>
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.
159
+
160
+ ## Important boundaries
161
+
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
90
174
 
91
- printf '%s\n' '{"status":"running","threadId":"019f..."}' |
92
- 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
93
180
  ```
94
181
 
95
- 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:
96
192
 
97
193
  ```sh
98
- taskchef task show <task-id> --workspace <workspace>
99
- taskchef task list --workspace <workspace>
100
- taskchef task list --status running --status blocked --project payments --workspace <workspace>
101
- taskchef task summary --workspace <workspace>
102
- taskchef task reconcile-candidates --json --workspace <workspace>
194
+ npx taskchef help
103
195
  ```
104
196
 
105
- `task reconcile-candidates` returns only `running` and `blocked` tasks with
106
- thread IDs. Pass `--include-finished` only for an explicit full refresh or when
107
- a finished executor is known to have received new work.
197
+ For the shorter command used below, install it globally:
108
198
 
109
- Delegation does not reconcile task states first. Ask the dispatcher to refresh
110
- or fix outdated task states when you want it to run `$taskchef-reconcile`.
199
+ ```sh
200
+ npm install --global taskchef
201
+ ```
111
202
 
112
- ## 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`.
113
206
 
114
207
  ```text
115
208
  taskchef help
@@ -119,45 +212,83 @@ taskchef project add <path>
119
212
  taskchef project import [<file> | -]
120
213
  taskchef project list
121
214
  taskchef project remove <name>
122
- taskchef task create
123
- taskchef task update <task-id>
215
+ taskchef task record
124
216
  taskchef task show <task-id>
125
217
  taskchef task list
126
218
  taskchef task summary
127
- taskchef task reconcile-candidates
128
219
  ```
129
220
 
130
- All commands accept `--workspace <path>`. Add `--json` for deterministic JSON
131
- output used by the TaskChef skills; otherwise the CLI prints human-readable
132
- 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
133
226
 
134
- ## Release
227
+ ```sh
228
+ taskchef workspace init --workspace <workspace>
229
+ taskchef doctor --workspace <workspace>
135
230
 
136
- Releases are automated with semantic-release from the `Release` GitHub Actions
137
- workflow on `main`. Use Semantic Commit Messages so the release type can be
138
- calculated:
231
+ taskchef project add /workspace/payments \
232
+ --name payments \
233
+ --description "Owns payment authorization, capture, and refunds." \
234
+ --workspace <workspace>
139
235
 
140
- ```text
141
- fix: correct task reconciliation
142
- feat: add a new CLI command
143
- feat!: change the workspace data contract
236
+ taskchef project list --workspace <workspace>
237
+ taskchef project remove payments --workspace <workspace>
144
238
  ```
145
239
 
146
- Publishing uses npm trusted publishing from `.github/workflows/release.yml`.
147
- The workflow runs the test suite, validates the npm tarball, publishes the
148
- calculated version, creates the GitHub release, and commits the updated
149
- `package.json` version back to `main`.
240
+ Import projects as a JSON array from a file or standard input:
150
241
 
151
- ## Development
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
252
+
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
152
274
 
153
275
  ```sh
154
276
  npm test
155
277
  npm pack --dry-run
156
- npx -y -p semantic-release@25 -p @semantic-release/git semantic-release --dry-run
278
+ npx -y -p semantic-release@25 -p @semantic-release/exec -p @semantic-release/git semantic-release --dry-run
157
279
  ```
158
280
 
159
- ## 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
+ ```
160
289
 
161
- TaskChef is not an agent runtime, scheduler, hook service, or background
162
- worker. Delegated work runs in real Codex tasks, never subagents.
163
- 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.