taskchef 7.27.0 → 7.27.2

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": "7.27.0",
3
+ "version": "7.27.2",
4
4
  "description": "Dispatch work from a data-only workspace to visible Codex project tasks.",
5
5
  "author": {
6
6
  "name": "Favo Yang",
package/README.md CHANGED
@@ -137,7 +137,8 @@ $taskchef-delegate In payments, add structured logs for failed retries and test
137
137
 
138
138
  TaskChef prepares a UUID and marker, persists the task before native creation,
139
139
  creates the executor, and returns its task link. New executor instructions keep
140
- the assignment visible from the first line, leave one blank line, then place
140
+ the assignment visible from the first line, add a concise local reporting
141
+ authorization paragraph, leave one blank line, then place
141
142
  an explicit `$taskchef-executor` invocation immediately before the final
142
143
  correlation marker. That skill reads the executor's own `CODEX_THREAD_ID`, self-links, and
143
144
  reports lifecycle state. Independent outcomes may become separate executors;
@@ -155,6 +156,8 @@ For example, TaskChef generates this shape:
155
156
  ```text
156
157
  Fix duplicate charges after a retry and add a regression test.
157
158
 
159
+ Report this task and its follow-ups to my local TaskChef dashboard. Relevant private-repository links and concise work, test, and deployment results are authorized; exclude secrets.
160
+
158
161
  Use $taskchef-executor to execute and report this delegated TaskChef assignment.
159
162
  <!-- taskchef_id=c0f010ff-84f2-4838-a69d-0ff1f5d721d7 -->
160
163
  ```
package/docs/spec.md CHANGED
@@ -211,7 +211,9 @@ the final link, preserving the delegate skill's immediate-return contract.
211
211
  1. The dispatcher MUST call `prepare_dispatch` once per outcome.
212
212
  2. It MUST choose exactly one configured project and exact native-project path.
213
213
  3. It MUST build the instruction with the user's outcome beginning on line 1
214
- and remaining uninterrupted, followed by exactly two newline characters
214
+ and remaining uninterrupted, followed by one blank line and the authorization
215
+ `Report this task and its follow-ups to my local TaskChef dashboard. Relevant private-repository links and concise work, test, and deployment results are authorized; exclude secrets.`
216
+ followed by exactly two newline characters
215
217
  (one blank line), exactly one concise explicit `$taskchef-executor`
216
218
  invocation, one newline, and the returned marker on the final line. It MUST
217
219
  NOT place a blank line between the invocation and marker or inline the
@@ -528,6 +530,17 @@ MUST contain no crash output, transcript, user text, or inferred failure cause.
528
530
  **Annotations:** `readOnlyHint: false`, `destructiveHint: true`,
529
531
  `openWorldHint: false`.
530
532
 
533
+ Reporting tool descriptions MUST identify the configured local `tasks.jsonl`
534
+ path and local `.taskchef-usage.json` tracking side effect. GitHub URLs remain
535
+ references in that log; reporting does not publish them to GitHub. The
536
+ `destructiveHint: true` annotation is retained because reports update existing
537
+ state and can recover an unfinished predecessor as interrupted; these tools
538
+ are not purely additive. The compatibility alias also changes existing state.
539
+ Executors MUST verify accepted terminal reporting before claiming TaskChef was
540
+ updated. A platform rejection of an authorized report MUST be described using
541
+ only the returned rationale, without inferring causes or retrying around an
542
+ explicit denial. Authorization and unit tests do not guarantee platform approval.
543
+
531
544
  ### `report_result` (deprecated)
532
545
 
533
546
  `report_result` retains the prior semantic-only input shape and statuses as a
package/docs/workflows.md CHANGED
@@ -146,7 +146,8 @@ Record-before-create makes native creation failure observable. Executor
146
146
  self-linking removes dispatcher-side polling, task search, title matching, and
147
147
  parent/child identity inference.
148
148
 
149
- The generated task begins with the complete assignment, leaves one blank line,
149
+ The generated task begins with the complete assignment, adds the local reporting
150
+ authorization paragraph separated by a blank line, leaves one blank line,
150
151
  then places one explicit `$taskchef-executor` invocation immediately before its
151
152
  final marker. Older
152
153
  recorded tasks with first-line HTML or heading markers and former inline
package/index.js CHANGED
@@ -38,6 +38,7 @@ export {
38
38
  EXECUTOR_RESULT_PARAGRAPH,
39
39
  EXECUTOR_WORKING_PARAGRAPH,
40
40
  EXECUTOR_SKILL_INVOCATION,
41
+ EXECUTOR_REPORTING_AUTHORIZATION,
41
42
  createAndRecordDelegation,
42
43
  isProvisionalThreadId,
43
44
  normalizeCodexThreadId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taskchef",
3
- "version": "7.27.0",
3
+ "version": "7.27.2",
4
4
  "description": "A non-blocking interactive dispatcher for visible Codex tasks.",
5
5
  "license": "MIT",
6
6
  "author": "Favo Yang",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: taskchef-bootstrap
3
- description: "Initialize, diagnose, or refresh TaskChef dispatcher workspaces, the Codex project index, task history, and managed AGENTS.md instructions. Use when creating a TaskChef workspace, indexing or reindexing Codex projects, importing, listing, or removing indexed projects, running TaskChef doctor, or repairing dispatcher setup. Do not dispatch user work or report on executor threads."
3
+ description: "Initialize or repair the TaskChef dispatcher workspace and manage its local Codex project index. Use for setup, doctor, import, or reindex requests; not dispatch or executor reporting."
4
4
  ---
5
5
 
6
6
  # TaskChef Bootstrap
@@ -50,118 +50,9 @@ all deterministic workspace operations.
50
50
  End without dispatching unless the user
51
51
  separately requested work.
52
52
 
53
- ## Index Codex projects
53
+ ## Project index operations
54
54
 
55
- TaskChef's project index is the local list of Codex projects available for
56
- delegation. It stores canonical paths and routing metadata such as curated
57
- names, descriptions, Git status, and GitHub repositories. It does not index
58
- repository contents or create a second kind of project.
59
-
60
- Index only Codex projects local to the TaskChef workspace's execution host.
61
- Remote connection projects are outside the v1 contract. Never index the
62
- TaskChef dispatcher workspace or a directory containing it; the dispatcher is
63
- the inbox, while indexed Codex projects own delegated work.
64
-
65
- ### Existing Codex project
66
-
67
- 1. List native local Codex projects once. Resolve the requested existing folder
68
- with `realpath` and require an exact canonical-path match in that list. A
69
- similar name, a parent or child directory, and a remote connection project
70
- are not matches.
71
- 2. Index the exact path with the existing `project add <canonical-path> --name
72
- <curated-name> --description <curated-description> --json` CLI workflow.
73
- Despite the command's historical `add` name, this writes one TaskChef index
74
- entry for an existing Codex project. The CLI detects Git status, the exact
75
- Git root, and a canonical GitHub `origin` when no repository option is
76
- supplied. Repeated `--github-repo <canonical-url>` arguments replace that
77
- detection and form the complete advertised repository list, so repeat the
78
- origin explicitly when it should remain routable. Use `--no-github` when the
79
- user intentionally wants an empty list.
80
- 3. Run `project list --json` and require one indexed entry with the exact
81
- canonical path and intended routing metadata. Only then report that the
82
- Codex project is ready for delegation through TaskChef.
83
-
84
- ### New or not-yet-saved Codex folder
85
-
86
- 1. Create the folder only when the user explicitly asked to create it. Preserve
87
- unrelated existing contents. Do not initialize Git unless requested or
88
- clearly required by the user's broader task. Resolve the resulting existing
89
- folder with `realpath`.
90
- 2. Register or open that exact canonical folder with the supported
91
- `<validated-codex-cli> app <canonical-path>` mechanism. Reuse a validated CLI
92
- path supplied by the current Codex Desktop environment when available. Use
93
- the same resolver contract as `workspace init --register-codex` otherwise:
94
- an explicit `--codex-cli` path takes precedence over `TASKCHEF_CODEX_CLI`;
95
- each must resolve to an executable that passes `app --help`. Without an
96
- override, inspect `codex` executables from `PATH`, prefer a validated
97
- candidate whose path contains `Contents/Resources`, and otherwise validate
98
- only the first executable `codex` in PATH order. Never assume an arbitrary
99
- shell `codex`, invoke `codex add`, or hard-code an application bundle path.
100
- 3. Re-list native local Codex projects and require an exact canonical-path
101
- match. Opening is a request, not proof that Codex saved the project. If the
102
- exact match is absent, report that the folder was opened or registration was
103
- requested but Codex registration remains unverified; do not index it in
104
- TaskChef or call it delegation-ready.
105
- 4. After Codex verification, index the project as in the existing-project path.
106
- Run `project list --json` and verify the exact TaskChef index entry. Report
107
- delegation readiness only after both the native Codex match and TaskChef
108
- indexing are verified.
109
-
110
- For a managed `*-workspace` Codex project, advertise every relevant child or
111
- subrepository with repeated `--github-repo <canonical-github-url>` arguments,
112
- including the workspace repository itself when it can own issue or pull-request
113
- links. These explicit values are the complete list; automatic origin detection
114
- does not supplement them. This lets TaskChef route each canonical GitHub URL to
115
- the correct workspace rather than guessing from the folder name.
116
-
117
- ### Reindex after Codex changes
118
-
119
- When the user asks TaskChef to reindex or catch up after saving more projects in
120
- Codex, list native local Codex projects once and run `project list --json` once
121
- before mutation. Compare exact canonical paths, then index each requested
122
- eligible Codex project that is missing from TaskChef by following the
123
- appropriate path above, sharing the batch verification instead of relisting
124
- after each write. After all additions, run `project list --json` once more and
125
- verify every intended canonical path and its routing metadata before reporting
126
- the index as current.
127
-
128
- Do not call `project add` for a path already in the TaskChef index; it rejects
129
- duplicate paths and must not be presented as a metadata refresh. Preserve
130
- existing curated entries, and do not remove entries merely because they are
131
- absent from the current Codex list. Refreshing or removing an existing entry
132
- requires an explicit user request and the project-management workflows below.
133
-
134
- ## Manage the project index
135
-
136
- 1. Bulk import with `project import <file|-> --json`. Input is a JSON array of
137
- objects containing `path` plus optional `name`, `description`, and
138
- `githubRepos`, which is always a JSON array of GitHub repository URLs. Before
139
- importing, list native local Codex projects once, canonicalize every input
140
- path, and require an exact local-project match for every entry. Reject or
141
- report every unmatched path instead of indexing it. Import merges by
142
- canonical path, preserves an existing name or description when omitted, and
143
- unions existing and imported repository lists without duplicates. Use
144
- `--replace` only when the user explicitly requests replacement. Run
145
- `project list --json` afterward and verify every imported entry.
146
- 2. Inspect indexed projects with `project list --json`. Remove by name with
147
- `project remove`. Existing task entries keep their project snapshots.
148
-
149
- Example managed-workspace import entry:
150
-
151
- ```json
152
- {
153
- "name": "skills-workspace",
154
- "path": "/workspace/skills-workspace",
155
- "githubRepos": [
156
- "https://github.com/example/skill-one",
157
- "https://github.com/example/skill-two"
158
- ],
159
- "description": "Manages the listed child skill repositories."
160
- }
161
- ```
162
-
163
- TaskChef accepts configuration schema version 2 only. Its optional exact
164
- `dashboard` object contains boolean `autostart`; absence means enabled and
165
- `false` opts out of MCP-lifecycle dashboard startup without disabling manual
166
- `$taskchef-dashboard` recovery. `githubRepos` is always an array; unsupported
167
- configuration is rejected without being rewritten.
55
+ For adding, importing, removing, listing, or reindexing projects, read
56
+ [project index](references/project-index.md). Preserve exact canonical local
57
+ Codex project identity and existing curated entries; opening a folder is not
58
+ proof of registration. Completion requires verifying the intended index entry.
@@ -0,0 +1,119 @@
1
+ # Project index operations
2
+
3
+ Resolve the plugin root and use its CLI as described in SKILL.md.
4
+
5
+ ## Index Codex projects
6
+
7
+ TaskChef's project index is the local list of Codex projects available for
8
+ delegation. It stores canonical paths and routing metadata such as curated
9
+ names, descriptions, Git status, and GitHub repositories. It does not index
10
+ repository contents or create a second kind of project.
11
+
12
+ Index only Codex projects local to the TaskChef workspace's execution host.
13
+ Remote connection projects are outside the v1 contract. Never index the
14
+ TaskChef dispatcher workspace or a directory containing it; the dispatcher is
15
+ the inbox, while indexed Codex projects own delegated work.
16
+
17
+ ### Existing Codex project
18
+
19
+ 1. List native local Codex projects once. Resolve the requested existing folder
20
+ with `realpath` and require an exact canonical-path match in that list. A
21
+ similar name, a parent or child directory, and a remote connection project
22
+ are not matches.
23
+ 2. Index the exact path with the existing `project add <canonical-path> --name
24
+ <curated-name> --description <curated-description> --json` CLI workflow.
25
+ Despite the command's historical `add` name, this writes one TaskChef index
26
+ entry for an existing Codex project. The CLI detects Git status, the exact
27
+ Git root, and a canonical GitHub `origin` when no repository option is
28
+ supplied. Repeated `--github-repo <canonical-url>` arguments replace that
29
+ detection and form the complete advertised repository list, so repeat the
30
+ origin explicitly when it should remain routable. Use `--no-github` when the
31
+ user intentionally wants an empty list.
32
+ 3. Run `project list --json` and require one indexed entry with the exact
33
+ canonical path and intended routing metadata. Only then report that the
34
+ Codex project is ready for delegation through TaskChef.
35
+
36
+ ### New or not-yet-saved Codex folder
37
+
38
+ 1. Create the folder only when the user explicitly asked to create it. Preserve
39
+ unrelated existing contents. Do not initialize Git unless requested or
40
+ clearly required by the user's broader task. Resolve the resulting existing
41
+ folder with `realpath`.
42
+ 2. Register or open that exact canonical folder with the supported
43
+ `<validated-codex-cli> app <canonical-path>` mechanism. Reuse a validated CLI
44
+ path supplied by the current Codex Desktop environment when available. Use
45
+ the same resolver contract as `workspace init --register-codex` otherwise:
46
+ an explicit `--codex-cli` path takes precedence over `TASKCHEF_CODEX_CLI`;
47
+ each must resolve to an executable that passes `app --help`. Without an
48
+ override, inspect `codex` executables from `PATH`, prefer a validated
49
+ candidate whose path contains `Contents/Resources`, and otherwise validate
50
+ only the first executable `codex` in PATH order. Never assume an arbitrary
51
+ shell `codex`, invoke `codex add`, or hard-code an application bundle path.
52
+ 3. Re-list native local Codex projects and require an exact canonical-path
53
+ match. Opening is a request, not proof that Codex saved the project. If the
54
+ exact match is absent, report that the folder was opened or registration was
55
+ requested but Codex registration remains unverified; do not index it in
56
+ TaskChef or call it delegation-ready.
57
+ 4. After Codex verification, index the project as in the existing-project path.
58
+ Run `project list --json` and verify the exact TaskChef index entry. Report
59
+ delegation readiness only after both the native Codex match and TaskChef
60
+ indexing are verified.
61
+
62
+ For a managed `*-workspace` Codex project, advertise every relevant child or
63
+ subrepository with repeated `--github-repo <canonical-github-url>` arguments,
64
+ including the workspace repository itself when it can own issue or pull-request
65
+ links. These explicit values are the complete list; automatic origin detection
66
+ does not supplement them. This lets TaskChef route each canonical GitHub URL to
67
+ the correct workspace rather than guessing from the folder name.
68
+
69
+ ### Reindex after Codex changes
70
+
71
+ When the user asks TaskChef to reindex or catch up after saving more projects in
72
+ Codex, list native local Codex projects once and run `project list --json` once
73
+ before mutation. Compare exact canonical paths, then index each requested
74
+ eligible Codex project that is missing from TaskChef by following the
75
+ appropriate path above, sharing the batch verification instead of relisting
76
+ after each write. After all additions, run `project list --json` once more and
77
+ verify every intended canonical path and its routing metadata before reporting
78
+ the index as current.
79
+
80
+ Do not call `project add` for a path already in the TaskChef index; it rejects
81
+ duplicate paths and must not be presented as a metadata refresh. Preserve
82
+ existing curated entries, and do not remove entries merely because they are
83
+ absent from the current Codex list. Refreshing or removing an existing entry
84
+ requires an explicit user request and the project-management workflows below.
85
+
86
+ ## Manage the project index
87
+
88
+ 1. Bulk import with `project import <file|-> --json`. Input is a JSON array of
89
+ objects containing `path` plus optional `name`, `description`, and
90
+ `githubRepos`, which is always a JSON array of GitHub repository URLs. Before
91
+ importing, list native local Codex projects once, canonicalize every input
92
+ path, and require an exact local-project match for every entry. Reject or
93
+ report every unmatched path instead of indexing it. Import merges by
94
+ canonical path, preserves an existing name or description when omitted, and
95
+ unions existing and imported repository lists without duplicates. Use
96
+ `--replace` only when the user explicitly requests replacement. Run
97
+ `project list --json` afterward and verify every imported entry.
98
+ 2. Inspect indexed projects with `project list --json`. Remove by name with
99
+ `project remove`. Existing task entries keep their project snapshots.
100
+
101
+ Example managed-workspace import entry:
102
+
103
+ ```json
104
+ {
105
+ "name": "skills-workspace",
106
+ "path": "/workspace/skills-workspace",
107
+ "githubRepos": [
108
+ "https://github.com/example/skill-one",
109
+ "https://github.com/example/skill-two"
110
+ ],
111
+ "description": "Manages the listed child skill repositories."
112
+ }
113
+ ```
114
+
115
+ TaskChef accepts configuration schema version 2 only. Its optional exact
116
+ `dashboard` object contains boolean `autostart`; absence means enabled and
117
+ `false` opts out of MCP-lifecycle dashboard startup without disabling manual
118
+ `$taskchef-dashboard` recovery. `githubRepos` is always an array; unsupported
119
+ configuration is rejected without being rewritten.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: taskchef-copilot
3
- description: "Explain and coordinate TaskChef executor outcomes from cached task briefs. Use when the user asks what finished, what needs attention, why a delegated task failed or needs input, what should happen next, asks to answer, follow up, resume, or continue the same recorded assignment in its existing task, or explicitly invokes the historical $taskchef-report name. The dashboard remains the primary monitoring UI. Use live Codex metadata only for an explicit fresh/live request or a meaningful focused contradiction, and never poll."
3
+ description: "Explain TaskChef outcomes from cached briefs or continue an explicitly selected assignment in its existing task. Handles historical $taskchef-report requests; dashboard monitoring is separate."
4
4
  ---
5
5
 
6
6
  # TaskChef Copilot
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: taskchef-delegate
3
- description: "Dispatch actionable requests through the per-user TaskChef workspace into independently openable Codex project tasks. Use automatically for actionable work received in the canonical TaskChef dispatcher workspace. From any other project, use only when the user explicitly asks to delegate or split separate work into Codex tasks; TaskChef-related subject matter alone is not delegation intent. Record before creation, require executor self-linking, and never wait for executor completion."
3
+ description: "Dispatch work received in the canonical TaskChef workspace into Codex tasks. Elsewhere, use only for explicit delegation of separate work; an existing executor keeps its assignment."
4
4
  ---
5
5
 
6
6
  # TaskChef Delegate
@@ -53,7 +53,9 @@ stop and report that the TaskChef plugin must be reloaded or installed.
53
53
 
54
54
  - Begin with the actual assignment on the first line and keep its complete
55
55
  body uninterrupted.
56
- - After the assignment's final character, add exactly two newline characters
56
+ - After the assignment, add one blank line and this authorization paragraph:
57
+ `Report this task and its follow-ups to my local TaskChef dashboard. Relevant private-repository links and concise work, test, and deployment results are authorized; exclude secrets.`
58
+ - After that paragraph, add exactly two newline characters
57
59
  so there is one blank line before this invocation on its own line:
58
60
  `Use $taskchef-executor to execute and report this delegated TaskChef assignment.`
59
61
  - Immediately after the invocation, end the instruction with one newline
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: taskchef-executor
3
- description: "Execute an assignment carrying either the new exact TaskChef invocation-plus-final-marker scaffold or an accepted historical first-line or marker-before-invocation protocol. Includes executor ownership, self-linking, per-turn lifecycle reporting, identity safety, and final semantic state. Use when explicitly invoked by a new delegated instruction or when resuming the same new or historical executor task. Do not use to dispatch work or report on other TaskChef tasks."
3
+ description: "Execute and report a TaskChef assignment or follow-up when explicitly invoked or carrying an accepted TaskChef marker. Owns executor identity and per-turn lifecycle; not dispatch or reporting on other tasks."
4
4
  ---
5
5
 
6
6
  # TaskChef Executor
@@ -9,14 +9,18 @@ Own and execute the delegated assignment in the current Codex task. Do not
9
9
  re-dispatch it merely because it concerns TaskChef or a configured project.
10
10
  Explicit requests to delegate separate work remain valid.
11
11
 
12
- New instructions present the complete assignment first, followed by exactly two
13
- newline characters (one blank line), the explicit skill invocation, one
14
- newline, and the exact `<!-- taskchef_id=<full UUID> -->` marker on the final
15
- line. There is no blank line between the invocation and marker. Treat that UUID
16
- as the TaskChef task ID.
17
- The assignment is everything before the invocation; the invocation and marker
18
- are lifecycle scaffolding, not part of the deliverable. Require exactly one
19
- marker and do not infer an ID from similar prose.
12
+ New instructions present the complete assignment first, then the reporting
13
+ authorization paragraph, followed by exactly two newline characters (one blank
14
+ line), the explicit skill invocation, one newline, and the exact
15
+ `<!-- taskchef_id=<full UUID> -->` marker on the final line.
16
+ There is no blank line between the invocation and marker.
17
+ Treat that UUID as the TaskChef task ID.
18
+ The authorization, invocation, and marker are lifecycle scaffolding, not part
19
+ of the deliverable. Require non-whitespace task-specific content beyond them.
20
+ For historical first-line markers, marker-before-invocation forms, compact or
21
+ pre-authorization prompts, former inline protocol, or an installation exposing only `report_result`, read
22
+ [compatibility](references/compatibility.md) before interpreting the assignment.
23
+ Require exactly one marker and do not infer an ID from similar prose.
20
24
 
21
25
  ## Start every execution turn
22
26
 
@@ -37,8 +41,8 @@ Complete this lifecycle setup before substantive assignment work:
37
41
  `turnId: null`. Do not infer a native ID, reuse an earlier prompt's
38
42
  `turnRef`, or let a retry generate a replacement UUID.
39
43
  4. Call TaskChef `report_state` with the marked task ID, self-linked thread ID,
40
- this prompt's `turnRef` and optional Codex `turnId`, `status: working`, an omitted or null result summary, and a
41
- concise `requestSummary` describing this turn's assignment or follow-up.
44
+ this prompt's `turnRef` and optional Codex `turnId`, `status: working`, an
45
+ omitted or null result summary, and a concise `requestSummary` describing this turn's assignment or follow-up.
42
46
  When the turn targets a known GitHub repository, include its canonical
43
47
  `https://github.com/<owner>/<repository>` URL so multi-repository projects
44
48
  retain the selected repository instead of leaving TaskChef to guess.
@@ -72,81 +76,35 @@ reuse a `turnRef` after a follow-up. If a final-report response is lost, an
72
76
  identical terminal retry is safe only while the same turn remains current. On
73
77
  a later prompt, run the start lifecycle with a new `turnRef`; TaskChef
74
78
  will preserve the predecessor as interrupted, and only the new turn may receive
75
- a semantic result. Say reporting failures visibly instead of claiming a tracked
76
- outcome.
79
+ a semantic result.
80
+
81
+ Claim TaskChef was updated only after verifying the terminal response accepted
82
+ this task, turn, status, and summary. Report failures visibly. If the platform
83
+ rejects an authorized report, describe it as a platform rejection of that
84
+ report; quote only a rationale actually returned. Do not infer the reason,
85
+ promise approval, retry around an explicit denial, or change approval settings.
86
+ Ask the user once and wait for new authorization before retrying a denial.
77
87
 
78
88
  Request and result summaries must omit secrets, transcripts, raw command output, hidden reasoning,
79
89
  and unnecessary personal data. Identical lifecycle retries are safe; never
80
90
  replace a same-`turnRef` report with different content or let an older turn
81
91
  overwrite newer state.
82
92
 
83
- ### Keep terminal reporting ahead of executor-ending actions
84
-
85
- Normal completion ends with the semantic terminal `report_state` callback and
86
- then returns normally. Never archive, hand off, close, navigate away from, or
87
- otherwise terminate the Codex task merely because the work or turn completed.
88
- An archive is authorized only when the current assignment or follow-up
89
- explicitly requests archiving this exact Codex task. Words such as `finish`,
90
- `complete`, `done`, `ship`, and ordinary cleanup do not authorize archive.
91
-
92
- When archive is explicitly authorized, finish and verify the requested work,
93
- read the exact task identity required by this protocol, submit the terminal
94
- `report_state` callback for the current `turnRef`, and verify that TaskChef
95
- accepted the terminal state. Only then call the native Codex archive operation.
96
- Archive must be the final state-changing action, and native confirmation is
97
- required before claiming it succeeded.
98
-
99
- Apply the same terminal-callback-first rule when the user explicitly requests
100
- another action that can make this executor unavailable before it reports, such
101
- as handing off the task or terminating or restarting the process that owns the
102
- TaskChef MCP transport. This ordering rule does not authorize any such action.
103
- If terminal reporting fails, do not archive or perform the requested
104
- executor-ending action; leave the executor accessible and report the lifecycle
105
- failure visibly. If terminal reporting succeeds but the later action fails,
106
- preserve the accepted `completed`, `failed`, or `needs_input` state, report only
107
- the later action's failure, and do not reopen the lifecycle or report `working`
108
- again.
109
-
110
- ### Preserve repository and delivery links
111
-
112
- Treat lifecycle summaries as the durable TaskChef timeline; the dashboard does
113
- not scan the full Codex transcript later. Preserve known GitHub context in that
114
- timeline with canonical links:
115
-
116
- - Use `https://github.com/<owner>/<repository>` when identifying the repository
117
- selected for a turn. Derive it from established project or Git remote
118
- evidence; never guess from a similarly named directory.
119
- - Use the full canonical issue or pull-request URL whenever one is known. Do
120
- not shorten it to bare `#123` or `PR #123` in a multi-repository project.
121
- - Include every delivered pull request in the result summary. If work produces
122
- both a child-repository pull request and a workspace/root pull request,
123
- preserve both URLs and state which repository each belongs to.
124
- - Keep references specific to the text being reported. Do not copy unrelated
125
- links from earlier turns merely to make them visible.
126
- - Never invent an issue, pull request, or repository link. If repository
127
- identity is genuinely unresolved, describe that ambiguity without a link.
128
-
129
- For example, a working summary may say `Update dashboard projection in
130
- https://github.com/favoyang/taskchef`. A terminal summary may say `Shipped the
131
- child change in https://github.com/favoyang/taskchef/pull/78 and the workspace
132
- plan in https://github.com/favoyang/skills-workspace/pull/62`.
133
-
134
- ## Compatibility
135
-
136
- Existing delegated tasks may include the former inline ownership, linking, and
137
- `report_result` paragraphs. Continue executing those tasks here without
138
- re-dispatching. Prefer `report_state` when available. If an older installed
139
- TaskChef exposes only `report_result`, follow its inline protocol; after an
140
- upgrade, the deprecated `report_result` alias remains available for exact
141
- legacy retries. Also accept historical trailing instructions that place the
142
- marker before the invocation, with or without the former blank line before the
143
- marker; the former compact assignment-to-invocation boundary with the marker
144
- last; an exact HTML marker on the first line with or without the former blank
145
- line; or the older exact
146
- first-line `# taskchef_id=<full UUID>` heading. These compatibility forms do not
147
- change the identity or lifecycle rules above. For either first-line form, the
148
- assignment follows the marker. Ignore the final executor invocation and any
149
- recognizable former inline ownership, linking, working-state, or
150
- result-reporting paragraphs as lifecycle scaffolding; execute the remaining
151
- task-specific body. Require non-whitespace task-specific content and never
152
- treat an invocation by itself as an assignment.
93
+ ## Preserve delivery context
94
+
95
+ Summaries are the durable TaskChef timeline; the dashboard does not scan the
96
+ full Codex transcript later. Include the known repository's canonical
97
+ `https://github.com/<owner>/<repository>` URL in the working `requestSummary`.
98
+ Use full canonical issue or pull-request URLs and include every delivered PR
99
+ in the terminal summary, including both child and workspace PRs when relevant.
100
+ Derive links from established project or remote evidence; never invent links
101
+ or copy unrelated links from earlier turns.
102
+
103
+ ## Ending actions
104
+
105
+ Normal completion returns normally after accepted terminal reporting. Never
106
+ archive, hand off, close, navigate away from, or terminate the executor merely
107
+ because work completed. `finish`, `complete`, `done`, `ship`, and ordinary
108
+ cleanup do not authorize archive. Only when the user explicitly requests
109
+ archiving this exact task or another action that can make the executor
110
+ unavailable, read [ending actions](references/ending-actions.md) first.
@@ -0,0 +1,22 @@
1
+ # Compatibility
2
+
3
+ Pre-authorization prompts with the invocation before the final marker use the
4
+ entrypoint lifecycle without requiring a new authorization paragraph.
5
+
6
+ Existing delegated tasks may include the former inline ownership, linking, and
7
+ `report_result` paragraphs. Continue executing those tasks here without
8
+ re-dispatching. Prefer `report_state` when available. If an older installed
9
+ TaskChef exposes only `report_result`, follow its inline protocol; after an
10
+ upgrade, the deprecated `report_result` alias remains available for exact
11
+ legacy retries. Also accept historical trailing instructions that place the
12
+ marker before the invocation, with or without the former blank line before the
13
+ marker; the former compact assignment-to-invocation boundary with the marker
14
+ last; an exact HTML marker on the first line with or without the former blank
15
+ line; or the older exact
16
+ first-line `# taskchef_id=<full UUID>` heading. These compatibility forms do not
17
+ change the identity or lifecycle rules in `SKILL.md`. For either first-line form, the
18
+ assignment follows the marker. Ignore the final executor invocation and any
19
+ recognizable former inline ownership, linking, working-state, or
20
+ result-reporting paragraphs as lifecycle scaffolding; execute the remaining
21
+ task-specific body. Require non-whitespace task-specific content and never
22
+ treat an invocation by itself as an assignment.
@@ -0,0 +1,26 @@
1
+ # Keep terminal reporting ahead of executor-ending actions
2
+
3
+ Normal completion ends with the semantic terminal `report_state` callback and
4
+ then returns normally. Never archive, hand off, close, navigate away from, or
5
+ otherwise terminate the Codex task merely because the work or turn completed.
6
+ An archive is authorized only when the current assignment or follow-up
7
+ explicitly requests archiving this exact Codex task. Words such as `finish`,
8
+ `complete`, `done`, `ship`, and ordinary cleanup do not authorize archive.
9
+
10
+ When archive is explicitly authorized, finish and verify the requested work,
11
+ read the exact task identity required by this protocol, submit the terminal
12
+ `report_state` callback for the current `turnRef`, and verify that TaskChef
13
+ accepted the terminal state. Only then call the native Codex archive operation.
14
+ Archive must be the final state-changing action, and native confirmation is
15
+ required before claiming it succeeded.
16
+
17
+ Apply the same terminal-callback-first rule when the user explicitly requests
18
+ another action that can make this executor unavailable before it reports, such
19
+ as handing off the task or terminating or restarting the process that owns the
20
+ TaskChef MCP transport. This ordering rule does not authorize any such action.
21
+ If terminal reporting fails, do not archive or perform the requested
22
+ executor-ending action; leave the executor accessible and report the lifecycle
23
+ failure visibly. If terminal reporting succeeds but the later action fails,
24
+ preserve the accepted `completed`, `failed`, or `needs_input` state, report only
25
+ the later action's failure, and do not reopen the lifecycle or report `working`
26
+ again.
package/src/delegation.js CHANGED
@@ -8,6 +8,7 @@ export const EXECUTOR_LINK_PARAGRAPH = "Before any other work, read this executo
8
8
  export const EXECUTOR_WORKING_PARAGRAPH = "After a successful initial link, and at the start of every follow-up turn before substantive work, read this exact Codex thread natively to obtain the current turn ID and call TaskChef report_state with the marked task ID, the self-linked thread ID, that current turn ID, status working, summary omitted or null, and a concise requestSummary for this turn. link_task remains the first TaskChef action on the initial turn; do not report working before identity is linked. Never reuse a prior turn ID after a follow-up.";
9
9
  /** @deprecated Historical v7 inline-prompt snapshot. New delegations use taskchef-executor. */
10
10
  export const EXECUTOR_RESULT_PARAGRAPH = "Before ending, read this exact Codex thread again and call TaskChef report_state for the same current working turn with status completed, needs_input, or failed and a concise summary. Use needs_input only for a semantic decision or information the user must provide; a native approval prompt is live Codex state, not a TaskChef result. Do not include secrets, transcripts, or raw command output.";
11
+ export const EXECUTOR_REPORTING_AUTHORIZATION = "Report this task and its follow-ups to my local TaskChef dashboard. Relevant private-repository links and concise work, test, and deployment results are authorized; exclude secrets.";
11
12
  export const EXECUTOR_SKILL_INVOCATION = "Use $taskchef-executor to execute and report this delegated TaskChef assignment.";
12
13
  const HISTORICAL_RESULT_WITH_TURN_PARAGRAPH = "Before ending, call the TaskChef report_result MCP tool with the marked task ID, this executor's self-linked thread ID, the current turn ID from an exact native read of that same thread, completed, needs_input, or failed, and a concise summary. Never reuse a prior turn ID after a follow-up. Use needs_input only for a semantic decision or information the user must provide; a native approval prompt is live Codex state, not a TaskChef result. Do not include secrets, transcripts, or raw command output.";
13
14
  const HISTORICAL_RESULT_PARAGRAPH = "Before ending, call the TaskChef report_result MCP tool with completed, needs_input, or failed and a concise summary. Use needs_input only for a semantic decision or information the user must provide; a native approval prompt is live Codex state, not a TaskChef result. Do not include secrets, transcripts, or raw command output.";
@@ -28,7 +29,7 @@ const HISTORICAL_INLINE_PROTOCOLS = [
28
29
 
29
30
  function hasTaskSpecificContent(lines) {
30
31
  return lines.some((line) => (
31
- line.trim().length > 0 && !HISTORICAL_EXECUTOR_SCAFFOLD_LINES.has(line)
32
+ line.trim().length > 0 && line !== EXECUTOR_REPORTING_AUTHORIZATION && !HISTORICAL_EXECUTOR_SCAFFOLD_LINES.has(line)
32
33
  ));
33
34
  }
34
35
 
@@ -134,7 +135,7 @@ export function parseTaskChefMarker(instruction) {
134
135
  }
135
136
 
136
137
  const containsInlineScaffold = rest.some((line) => HISTORICAL_EXECUTOR_SCAFFOLD_LINES.has(line));
137
- if (!containsInlineScaffold) return rest.join("\n").trim().length > 0;
138
+ if (!containsInlineScaffold) return hasTaskSpecificContent(rest);
138
139
  return HISTORICAL_INLINE_PROTOCOLS.some((protocol) => {
139
140
  const prefix = ["", ...protocol.flatMap((line) => [line, ""])];
140
141
  if (!prefix.every((line, index) => rest[index] === line)) return false;
@@ -216,10 +217,13 @@ export function prepareDelegation(instruction, { taskId = randomUUID() } = {}) {
216
217
  if (bodyLines.some((line) => HISTORICAL_EXECUTOR_SCAFFOLD_LINES.has(line))) {
217
218
  throw new Error("instruction contains reserved historical TaskChef lifecycle scaffolding");
218
219
  }
220
+ if (bodyLines.includes(EXECUTOR_REPORTING_AUTHORIZATION)) {
221
+ throw new Error("instruction contains reserved TaskChef reporting authorization");
222
+ }
219
223
  const id = requireUuid(taskId);
220
224
  return {
221
225
  id,
222
- instruction: `${body}\n\n${EXECUTOR_SKILL_INVOCATION}\n${taskChefMarker(id)}`,
226
+ instruction: `${body}\n\n${EXECUTOR_REPORTING_AUTHORIZATION}\n\n${EXECUTOR_SKILL_INVOCATION}\n${taskChefMarker(id)}`,
223
227
  };
224
228
  }
225
229
 
package/src/mcp.js CHANGED
@@ -1,3 +1,4 @@
1
+ import path from "node:path";
1
2
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
3
  import { z } from "zod";
3
4
  import {
@@ -169,6 +170,7 @@ export function createTaskChefMcpServer({
169
170
  logDashboardDiagnostic,
170
171
  usageTracker = createUsageTracker({ workspace }),
171
172
  } = {}) {
173
+ const reportingDestination = `Store lifecycle state and summaries in the configured local TaskChef dashboard log ${JSON.stringify(path.resolve(workspace, "tasks.jsonl"))}. GitHub URLs are stored as references, not published to GitHub. Also triggers local Codex usage tracking in ${JSON.stringify(path.resolve(workspace, ".taskchef-usage.json"))}. Exclude secrets. `;
172
174
  const server = new McpServer(
173
175
  { name: "taskchef", version: TASKCHEF_VERSION },
174
176
  {
@@ -297,7 +299,7 @@ export function createTaskChefMcpServer({
297
299
  {
298
300
  title: "Report TaskChef state",
299
301
  description:
300
- "Report this self-linked executor turn's lifecycle state. Use one stable turnRef for working and its terminal report; pass the native Codex turn ID as both turnRef and turnId when available, otherwise pass a client-generated UUID turnRef and null turnId. Preserve known repository context and delivered links. Exact retries are idempotent; stale or mismatched turnRefs are rejected.",
302
+ reportingDestination + "Report this self-linked executor turn's lifecycle state. Use one stable turnRef for working and its terminal report; pass the native Codex turn ID as both turnRef and turnId when available, otherwise pass a client-generated UUID turnRef and null turnId. Preserve known repository context and delivered links. Exact retries are idempotent; stale or mismatched turnRefs are rejected.",
301
303
  inputSchema: {
302
304
  taskId: z.string().min(1),
303
305
  threadId: z.string().min(1).nullable(),
@@ -326,7 +328,7 @@ export function createTaskChefMcpServer({
326
328
  {
327
329
  title: "Report TaskChef result (deprecated)",
328
330
  description:
329
- "Deprecated compatibility alias for semantic results. New executors must use report_state working at turn start and report_state again with needs_input, completed, or failed before ending. This alias preserves legacy callers by implicitly starting the supplied newer turn before storing its result.",
331
+ reportingDestination + "Deprecated compatibility alias for semantic results. New executors must use report_state working at turn start and report_state again with needs_input, completed, or failed before ending. This alias preserves legacy callers by implicitly starting the supplied newer turn before storing its result.",
330
332
  inputSchema: {
331
333
  taskId: z.string().min(1),
332
334
  threadId: z.string().min(1).nullable(),