taskchef 0.0.1 → 1.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/.agents/skills/taskchef-bootstrap/SKILL.md +50 -0
- package/.agents/skills/taskchef-bootstrap/agents/openai.yaml +4 -0
- package/.agents/skills/taskchef-delegate/SKILL.md +43 -0
- package/.agents/skills/taskchef-delegate/agents/openai.yaml +4 -0
- package/.agents/skills/taskchef-reconcile/SKILL.md +35 -0
- package/.agents/skills/taskchef-reconcile/agents/openai.yaml +4 -0
- package/BACKLOG.md +67 -0
- package/README.md +156 -3
- package/SPEC.md +310 -0
- package/assets/AGENTS.md +18 -0
- package/bin/taskchef.js +7 -2
- package/index.js +23 -3
- package/package.json +19 -4
- package/src/cli.js +303 -0
- package/src/workspace.js +882 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
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."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TaskChef Bootstrap
|
|
7
|
+
|
|
8
|
+
Initialize or refresh a data-only TaskChef dispatcher workspace.
|
|
9
|
+
|
|
10
|
+
Resolve this linked skill with `realpath`. The TaskChef source root is three
|
|
11
|
+
parents above the skill directory. Invoke `<source-root>/bin/taskchef.js` for
|
|
12
|
+
all deterministic workspace operations.
|
|
13
|
+
|
|
14
|
+
## Boundaries
|
|
15
|
+
|
|
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
|
|
20
|
+
the user separately requests those actions.
|
|
21
|
+
- Never use collaboration agents, hooks, schedules, polling, or daemons.
|
|
22
|
+
|
|
23
|
+
## Initialize and repair
|
|
24
|
+
|
|
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.
|
|
28
|
+
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
|
|
30
|
+
managed scaffold.
|
|
31
|
+
3. Report the actions or failed checks. End without dispatching unless the user
|
|
32
|
+
separately requested work.
|
|
33
|
+
|
|
34
|
+
## Configure projects
|
|
35
|
+
|
|
36
|
+
1. List native Codex projects once when discovery is necessary. Configure only
|
|
37
|
+
projects local to the TaskChef workspace's execution host. Remote connection
|
|
38
|
+
projects are outside the v1 contract.
|
|
39
|
+
2. Add one project with `project add <path>`, normally supplying `--name` and a
|
|
40
|
+
curated `--description`. The CLI detects Git status, exact Git root, and a
|
|
41
|
+
canonical GitHub `origin`; use `--no-github` or `--github-repo` only to
|
|
42
|
+
override detection.
|
|
43
|
+
3. Bulk import with `project import <file|-> --json`. Input is a JSON array of
|
|
44
|
+
objects containing `path` plus optional `name`, `description`, and
|
|
45
|
+
`githubRepo`. Import merges by canonical path and preserves an existing name
|
|
46
|
+
or description when omitted. Use `--replace` only when the user explicitly
|
|
47
|
+
requests replacement.
|
|
48
|
+
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.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
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. Use taskchef-bootstrap instead for workspace setup or configuration changes."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TaskChef Delegate
|
|
7
|
+
|
|
8
|
+
Create real Codex tasks from a TaskChef data workspace and return immediately.
|
|
9
|
+
Use `taskchef-reconcile` first when the current prompt has active recorded tasks.
|
|
10
|
+
|
|
11
|
+
Resolve this linked skill with `realpath`. The TaskChef source root is three
|
|
12
|
+
parents above the skill directory. Invoke `<source-root>/bin/taskchef.js` for
|
|
13
|
+
all deterministic workspace and task-record operations.
|
|
14
|
+
|
|
15
|
+
## Boundaries
|
|
16
|
+
|
|
17
|
+
- Keep implementation, tests, and reports in the TaskChef source repository.
|
|
18
|
+
- Keep only `AGENTS.md`, `taskchef.json`, `tasks/*/task.json`, and the three
|
|
19
|
+
TaskChef skill links in a dispatcher workspace.
|
|
20
|
+
- Use real Codex tasks, never collaboration or subagent tools.
|
|
21
|
+
- Never use hooks, callbacks, schedules, polling, daemons, or event logs.
|
|
22
|
+
- Never wait for delegated work after executor creation.
|
|
23
|
+
- Never collect transcripts or hidden reasoning.
|
|
24
|
+
|
|
25
|
+
## Dispatch
|
|
26
|
+
|
|
27
|
+
1. Run `project list --json` to load and validate the configured routing
|
|
28
|
+
targets. Use `taskchef-bootstrap` if the workspace is missing or unhealthy.
|
|
29
|
+
2. Split the request into the smallest independently useful outcomes. Include
|
|
30
|
+
constraints, expected testing, and reporting in every instruction.
|
|
31
|
+
3. Classify against configured `name`, `githubRepo`, and `description`. Use
|
|
32
|
+
`path` only as checkout identity. Ask when metadata does not produce one
|
|
33
|
+
clear project match.
|
|
34
|
+
4. Resolve native projects once and require the exact configured path.
|
|
35
|
+
5. Reuse a matching pending record for an explicit retry; otherwise create one
|
|
36
|
+
pending record before executor creation.
|
|
37
|
+
6. Create one real Codex task per record using the exact saved project and a
|
|
38
|
+
local environment on its executor host.
|
|
39
|
+
7. Immediately record every returned `threadId` with status `running`. Never
|
|
40
|
+
persist `hostId`.
|
|
41
|
+
8. Leave a failed creation pending. Do not invent an ID or delete the record.
|
|
42
|
+
9. Return immediately with a created-thread directive for every success. Do
|
|
43
|
+
not read or wait for a newly created executor.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: taskchef-reconcile
|
|
3
|
+
description: "Reconcile active TaskChef task records with their visible Codex executor threads. Use at the start of ordinary prompts in a TaskChef workspace, for TaskChef status or progress requests, after delegated work may have completed or blocked, or for an explicitly requested full refresh. Performs one bounded snapshot pass and never polls or waits for future activity."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TaskChef Reconcile
|
|
7
|
+
|
|
8
|
+
Refresh TaskChef's recorded task state from native Codex threads exactly once.
|
|
9
|
+
|
|
10
|
+
Resolve this linked skill with `realpath`. The TaskChef source root is three
|
|
11
|
+
parents above the skill directory. Invoke `<source-root>/bin/taskchef.js` for
|
|
12
|
+
all deterministic record operations.
|
|
13
|
+
|
|
14
|
+
## Reconcile
|
|
15
|
+
|
|
16
|
+
1. Run `task reconcile-candidates --json` once. It returns only `running` and
|
|
17
|
+
`blocked` tasks with thread IDs. Do not scan pending or finished records.
|
|
18
|
+
2. Query every returned thread exactly once using immediate native snapshots,
|
|
19
|
+
with no more than eight targets per call.
|
|
20
|
+
3. Do not wait for future activity and do not poll.
|
|
21
|
+
4. Map an active attempt to `running`, a user-input or external dependency to
|
|
22
|
+
`blocked`, and any concluded attempt to `finished`, including failed or
|
|
23
|
+
partial attempts.
|
|
24
|
+
5. Preserve an existing result unless the thread provides a meaningful newer
|
|
25
|
+
report. Results contain exactly `message`, `githubPRs`, and `githubIssues`.
|
|
26
|
+
6. Update each changed record once with `task update`.
|
|
27
|
+
7. Report a concise snapshot and continue with the user's request. If there
|
|
28
|
+
were no candidates or changes, say so briefly.
|
|
29
|
+
|
|
30
|
+
Use `task reconcile-candidates --include-finished --json` only when the user
|
|
31
|
+
explicitly requests a full refresh or says a finished executor received new
|
|
32
|
+
work. A finished task with a new active attempt becomes `running` again.
|
|
33
|
+
|
|
34
|
+
The native thread is authoritative between reconciliations. Executor reports
|
|
35
|
+
are evidence, not independently verified completion guarantees.
|
package/BACKLOG.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# TaskChef backlog
|
|
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
|
+
- Add event-driven, scheduled, or background reconciliation only if interactive
|
|
21
|
+
reconciliation proves insufficient.
|
|
22
|
+
- Evaluate heartbeat behavior, restart recovery, and recovery after the
|
|
23
|
+
dispatcher task is deleted.
|
|
24
|
+
- Add a reconciliation cursor only when repeated full snapshots become costly
|
|
25
|
+
or incorrect.
|
|
26
|
+
- Determine whether thread status alone is sufficient after Codex or machine
|
|
27
|
+
restarts.
|
|
28
|
+
|
|
29
|
+
## Grouping and history
|
|
30
|
+
|
|
31
|
+
- Add dispatch or run records only when batch cancellation, aggregate status,
|
|
32
|
+
replay, or decomposition history has a concrete use case.
|
|
33
|
+
- Decide whether and how to retain the original broad prompt.
|
|
34
|
+
- Add archival and retention policies for old task records.
|
|
35
|
+
|
|
36
|
+
## V2: remote connection projects
|
|
37
|
+
|
|
38
|
+
- Import remote connection projects returned by the native project-list tool.
|
|
39
|
+
- Persist the native `projectId` and `hostId` needed to distinguish identical
|
|
40
|
+
paths on different hosts and route task creation.
|
|
41
|
+
- Re-resolve stored native identities against the project list before every
|
|
42
|
+
dispatch instead of assuming they remain valid indefinitely.
|
|
43
|
+
- Validate remote paths and Git state through native host-aware project data;
|
|
44
|
+
do not run local filesystem validation against a remote path.
|
|
45
|
+
- Persist enough host context with delegated tasks to reconcile remote threads
|
|
46
|
+
reliably without arbitrary task discovery.
|
|
47
|
+
- Define unavailable-host, renamed-project, moved-path, and stale-identity
|
|
48
|
+
behavior before enabling remote dispatch.
|
|
49
|
+
- Evaluate worktrees and isolated execution for concurrent tasks in one
|
|
50
|
+
project.
|
|
51
|
+
- Define conflict handling when several tasks modify the same checkout.
|
|
52
|
+
|
|
53
|
+
## Data model extensions
|
|
54
|
+
|
|
55
|
+
- Add richer result fields only when real integrations require them.
|
|
56
|
+
- Evaluate structured verification, artifacts, commits, and completion outcome
|
|
57
|
+
fields.
|
|
58
|
+
- Support multiple executor threads for one logical task if needed.
|
|
59
|
+
- Define schema migrations and compatibility rules after the first persisted
|
|
60
|
+
v1 records exist.
|
|
61
|
+
|
|
62
|
+
## Integrations and distribution
|
|
63
|
+
|
|
64
|
+
- Add GitHub automation beyond storing PR and issue URLs.
|
|
65
|
+
- Evaluate automatic project discovery instead of an explicit configured list.
|
|
66
|
+
- Consider npm registry publication only after the GitHub-source installation
|
|
67
|
+
and local managed-checkout workflows are stable.
|
package/README.md
CHANGED
|
@@ -1,7 +1,160 @@
|
|
|
1
|
-
#
|
|
1
|
+
# TaskChef
|
|
2
2
|
|
|
3
|
-
|
|
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.
|
|
6
|
+
|
|
7
|
+
The canonical contract is [SPEC.md](SPEC.md). Deferred ideas are in
|
|
8
|
+
[BACKLOG.md](BACKLOG.md).
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
TaskChef requires Node.js 18 or newer and Git.
|
|
13
|
+
|
|
14
|
+
Install the CLI and its bundled skills from npm:
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm install --global taskchef
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Then initialize a dispatcher workspace. Initialization links the three bundled
|
|
21
|
+
TaskChef skills into that workspace; no separate skill installation is needed.
|
|
4
22
|
|
|
5
23
|
```sh
|
|
6
|
-
|
|
24
|
+
taskchef workspace init --workspace <workspace>
|
|
25
|
+
taskchef doctor --workspace <workspace>
|
|
7
26
|
```
|
|
27
|
+
|
|
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`.
|
|
32
|
+
|
|
33
|
+
## Workspace
|
|
34
|
+
|
|
35
|
+
```text
|
|
36
|
+
AGENTS.md
|
|
37
|
+
taskchef.json
|
|
38
|
+
.agents/skills/taskchef-bootstrap -> <source>/.agents/skills/taskchef-bootstrap
|
|
39
|
+
.agents/skills/taskchef-delegate -> <source>/.agents/skills/taskchef-delegate
|
|
40
|
+
.agents/skills/taskchef-reconcile -> <source>/.agents/skills/taskchef-reconcile
|
|
41
|
+
tasks/<task-id>/task.json
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Create or repair the managed scaffold without supplying configuration:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
taskchef workspace init --workspace <workspace>
|
|
48
|
+
taskchef doctor --workspace <workspace>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Initialization is idempotent. It creates an empty configuration when missing
|
|
52
|
+
and preserves existing configured projects.
|
|
53
|
+
|
|
54
|
+
## Projects
|
|
55
|
+
|
|
56
|
+
Add one project. Git status, the exact Git root, and a canonical GitHub origin
|
|
57
|
+
are detected automatically:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
taskchef project add /workspace/payments \
|
|
61
|
+
--name payments \
|
|
62
|
+
--description "Owns payment authorization, capture, and refunds." \
|
|
63
|
+
--workspace <workspace>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Import a JSON array from a file or stdin:
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
taskchef project import projects.json --workspace <workspace>
|
|
70
|
+
taskchef project import - --workspace <workspace> < projects.json
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Import merges by canonical path. Existing names and descriptions are preserved
|
|
74
|
+
when omitted. `--replace` explicitly replaces the configured project set.
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
taskchef project list --workspace <workspace>
|
|
78
|
+
taskchef project remove payments --workspace <workspace>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Removal refuses to orphan existing task records unless `--force` is supplied.
|
|
82
|
+
|
|
83
|
+
## Tasks
|
|
84
|
+
|
|
85
|
+
Task creation and update read JSON from stdin:
|
|
86
|
+
|
|
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>
|
|
90
|
+
|
|
91
|
+
printf '%s\n' '{"status":"running","threadId":"019f..."}' |
|
|
92
|
+
taskchef task update t1 --json --workspace <workspace>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Inspection commands:
|
|
96
|
+
|
|
97
|
+
```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>
|
|
103
|
+
```
|
|
104
|
+
|
|
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.
|
|
108
|
+
|
|
109
|
+
## Complete CLI
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
taskchef help
|
|
113
|
+
taskchef doctor
|
|
114
|
+
taskchef workspace init
|
|
115
|
+
taskchef project add <path>
|
|
116
|
+
taskchef project import [<file> | -]
|
|
117
|
+
taskchef project list
|
|
118
|
+
taskchef project remove <name>
|
|
119
|
+
taskchef task create
|
|
120
|
+
taskchef task update <task-id>
|
|
121
|
+
taskchef task show <task-id>
|
|
122
|
+
taskchef task list
|
|
123
|
+
taskchef task summary
|
|
124
|
+
taskchef task reconcile-candidates
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
All commands accept `--workspace <path>`. Add `--json` for deterministic JSON
|
|
128
|
+
output used by the TaskChef skills; otherwise the CLI prints human-readable
|
|
129
|
+
output.
|
|
130
|
+
|
|
131
|
+
## Release
|
|
132
|
+
|
|
133
|
+
Releases are automated with semantic-release from the `Release` GitHub Actions
|
|
134
|
+
workflow on `main`. Use Semantic Commit Messages so the release type can be
|
|
135
|
+
calculated:
|
|
136
|
+
|
|
137
|
+
```text
|
|
138
|
+
fix: correct task reconciliation
|
|
139
|
+
feat: add a new CLI command
|
|
140
|
+
feat!: change the workspace data contract
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Publishing uses npm trusted publishing from `.github/workflows/release.yml`.
|
|
144
|
+
The workflow runs the test suite, validates the npm tarball, publishes the
|
|
145
|
+
calculated version, creates the GitHub release, and commits the updated
|
|
146
|
+
`package.json` version back to `main`.
|
|
147
|
+
|
|
148
|
+
## Development
|
|
149
|
+
|
|
150
|
+
```sh
|
|
151
|
+
npm test
|
|
152
|
+
npm pack --dry-run
|
|
153
|
+
npx -y -p semantic-release@25 -p @semantic-release/git semantic-release --dry-run
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
## Boundaries
|
|
157
|
+
|
|
158
|
+
TaskChef is not an agent runtime, scheduler, hook service, or background
|
|
159
|
+
worker. Delegated work runs in real Codex tasks, never subagents.
|
|
160
|
+
Reconciliation is a single immediate snapshot pass and never polls or waits.
|