greprag 5.74.7 → 5.74.8
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/dist/codex-chip-hooks.js
CHANGED
|
@@ -64,9 +64,9 @@ function context(input) {
|
|
|
64
64
|
`Worktree: ${(0, model_1.chipExecutionPath)(chip)}`,
|
|
65
65
|
`Branch: ${chip.worktree.branch}`,
|
|
66
66
|
`Parent session: ${chip.parent.sessionId || 'not recorded'}`,
|
|
67
|
-
`Finish by committing the durable result
|
|
67
|
+
`Finish by committing the durable result, then send the parent the commit artifact, checks, caveats, Cleanup line, and Archive: yes|no in the actual native task message. After delivery, Archive: yes means archive this child task yourself. The optional host command is ${cli} codex chip report ${chip.id}.`,
|
|
68
68
|
// adr: adr/codex-landing-doctrine.md — one delivery owner, including FIX missions.
|
|
69
|
-
'Landing: the parent is the delivery owner for merge,
|
|
69
|
+
'Landing: the parent is the delivery owner for merge, post-merge branch/manifest bookkeeping, and any profile-declared push/deploy/release; the child owns routine archival of its own task after the terminal message is delivered. Do not edit the parent checkout or independently cross delivery boundaries. A mission whose first line begins `FIX:` (emitted by `greprag fix spawn`) is writable in its isolated checkout/worktree and hands its verified checkpoint to that owner without a human approval gate. If no live parent exists and the chip carries the full-goal mission, it becomes delivery owner. `greprag fix spawn` only prints the mission; visible Codex task dispatch creates the isolated checkout/worktree.',
|
|
70
70
|
];
|
|
71
71
|
if ((0, model_1.chipMissionKind)(chip) === 'fix') {
|
|
72
72
|
lines.push('Harness: Codex. Mission: visible native FIX chip with ordinary writable authority, not an internal subagent.', 'Scope: repair GrepRAG-owned harness surfaces in this checkout: load entries, skill templates, docs, hook context, CLI messages, and tests. Codex owns native task creation, worktrees, permissions, Git, and task lifecycle.', 'Own diagnosis, implementation, tests, commit, and parent report. Inspect Codex behavior only far enough to correct GrepRAG guidance or report a precise external blocker.', 'FIX peer handoff: if a peer offers to coordinate, integrate, rework, or take over a harness repair, hand off branch/commit, dirty files, checks, blockers, and caveats. Do not defend patch ownership; peers may take ownership within their assigned GrepRAG harness scope.', 'Visible delegation route: load `codex-chip-spawn` and create the child with `codex_app__create_thread` using the current project worktree target; load `chip-leader` for multi-chip seams. Never use `multi_agent_v1__spawn_agent` for a visible chip.');
|
|
@@ -21,11 +21,12 @@ quick chips, an explicit LEAD for multi-chip orchestration, and Chip A/B/C with
|
|
|
21
21
|
optional ADVISOR orientation. FIX missions are visible one-friction tasks from
|
|
22
22
|
\`greprag fix spawn\`: they select \`chip.fix\` and load mechanic doctrine.
|
|
23
23
|
Every role is an ordinary writable session; roles only orient the work. Native Codex chips commit their durable
|
|
24
|
-
result, then
|
|
25
|
-
hash, checks, caveats, cleanup parameters, and
|
|
26
|
-
\`
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
result, then use the native task-message channel to send the LEAD status,
|
|
25
|
+
commit hash, checks, caveats, cleanup parameters, and
|
|
26
|
+
\`Archive: yes\` or \`Archive: no — <reason>\`. The archive decision must be in
|
|
27
|
+
that sent message, not only the child's final response. After delivery,
|
|
28
|
+
\`Archive: yes\` means the child archives its own task; the parent integrates
|
|
29
|
+
the commit and handles post-merge branch bookkeeping. Peer review is a separate
|
|
30
|
+
explicit review chip/session when needed. The
|
|
30
31
|
\`greprag codex chip report\` command remains host bookkeeping for explicit
|
|
31
32
|
CLI-managed chips, not mandatory native Codex completion ceremony.`;
|
|
@@ -20,7 +20,7 @@ function chipPrompt(manifest, _cliCommand = 'greprag') {
|
|
|
20
20
|
? `- After setup and bootstrap succeed, reply to the LEAD in the native Codex task thread: \`IN-FLIGHT: ${(0, model_1.chipTitle)(manifest)} — setup complete; work started\`. If setup fails, reply \`BLOCKED\` with the exact failure instead.\n`
|
|
21
21
|
: '';
|
|
22
22
|
const reportInstruction = native
|
|
23
|
-
? '- Commit the durable result, then
|
|
23
|
+
? '- Commit the durable result, then use the native Codex task-message tool to send the LEAD `DONE` or `BLOCKED`, commit hash if any, checks, material caveats, cleanup parameters, and `Archive: yes` or `Archive: no — <reason>`. Do not substitute a final response in your own task.'
|
|
24
24
|
: '- Commit the completed durable result, including report-only artifacts, then run `greprag codex chip report <id> --summary "<result>" --check "<check>"`. The report must carry the commit artifact back to the parent.';
|
|
25
25
|
return `${(0, model_1.chipTitle)(manifest)}
|
|
26
26
|
|
|
@@ -37,7 +37,7 @@ ${manifest.task}
|
|
|
37
37
|
|
|
38
38
|
Report when done:
|
|
39
39
|
${reportInstruction}
|
|
40
|
-
- Include a \`Cleanup:\` line naming the
|
|
41
|
-
-
|
|
42
|
-
- Landing: do not independently merge, push, deploy, or delete the worktree — the parent is the delivery owner and integrates the result, follows the repo profile, and
|
|
40
|
+
- Include a \`Cleanup:\` line naming the task, worktree, and branch actions. When done use \`Cleanup: child archives own task; Codex may prune managed worktree; parent may delete branch after merge\`; when anything must remain open use \`Cleanup: keep task/worktree/branch because ...\`.
|
|
41
|
+
- Put the archive decision in the actual message sent to the LEAD: \`Archive: yes\` or \`Archive: no — <reason>\`. After that message is delivered, \`Archive: yes\` means call \`set_thread_archived\` for your own task; \`Archive: no\` means leave it open. Never make the parent perform routine child-task archival.
|
|
42
|
+
- Landing: do not independently merge, push, deploy, or manually delete the worktree — the parent is the delivery owner and integrates the result, follows the repo profile, and deletes the branch after merge. If this task begins \`FIX:\` (a fix-spawn mission), hand the verified checkpoint to that owner without a human approval gate. If no live parent exists and this task carries the full-goal mission, become delivery owner. \`greprag fix spawn\` only prints the mission; visible Codex task dispatch creates the isolated checkout/worktree.`;
|
|
43
43
|
}
|
package/package.json
CHANGED
|
@@ -20,13 +20,13 @@ child sends the native parent-task reply
|
|
|
20
20
|
`IN-FLIGHT: <exact title> — setup complete; work started`; setup failure sends
|
|
21
21
|
`BLOCKED` with the exact failure. It has no lease, read-only, mandatory
|
|
22
22
|
nested-goal, or nonce/ACK requirement. Completion is another native
|
|
23
|
-
parent-child task
|
|
24
|
-
`DONE` or `BLOCKED`, commit hash if any, checks, caveats,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
parent-child task message: commit the durable result, then send the LEAD
|
|
24
|
+
`DONE` or `BLOCKED`, commit hash if any, checks, caveats, cleanup parameters,
|
|
25
|
+
and `Archive: yes` or `Archive: no — <reason>` in the actual sent message, not
|
|
26
|
+
only the child's final response. After successful delivery, `Archive: yes`
|
|
27
|
+
means the child archives its own Codex task; `Archive: no` leaves it open. The
|
|
28
|
+
lead remains responsible for integration and post-merge branch bookkeeping,
|
|
29
|
+
not routine child-task archival.
|
|
30
30
|
Review is a separate explicit review chip/session when the lead asks for it.
|
|
31
31
|
FIX landing (adr/codex-landing-doctrine.md): a mission whose first line
|
|
32
32
|
begins `FIX:` (from `greprag fix spawn`) uses the handoff's detected
|
|
@@ -133,27 +133,32 @@ Paste this at the end of the child prompt.
|
|
|
133
133
|
|
|
134
134
|
```text
|
|
135
135
|
## Report when done
|
|
136
|
-
Commit the durable result first. Then
|
|
137
|
-
|
|
138
|
-
caveats, cleanup parameters, and archive
|
|
136
|
+
Commit the durable result first. Then use the native Codex task-message tool to
|
|
137
|
+
send the LEAD `DONE` or `BLOCKED`, commit hash if any, concise result, checks,
|
|
138
|
+
material caveats, cleanup parameters, and the archive decision. Do not
|
|
139
|
+
substitute a final response in your own task: the lifecycle report must be the
|
|
140
|
+
actual message sent to the LEAD.
|
|
139
141
|
|
|
140
142
|
Include one cleanup line:
|
|
141
|
-
`Cleanup:
|
|
143
|
+
`Cleanup: child archives own task; Codex may prune managed worktree; parent may delete branch after merge`
|
|
142
144
|
or
|
|
143
|
-
`Cleanup:
|
|
145
|
+
`Cleanup: child archives own task; local mode has no worktree or branch to prune`
|
|
144
146
|
or
|
|
145
147
|
`Cleanup: keep task/worktree/branch because ...`
|
|
146
148
|
|
|
147
|
-
Include one
|
|
148
|
-
`
|
|
149
|
+
Include one archive line in that same sent message:
|
|
150
|
+
`Archive: yes`
|
|
149
151
|
or
|
|
150
|
-
`
|
|
152
|
+
`Archive: no — <reason>`
|
|
151
153
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
After the message is delivered, `Archive: yes` means call
|
|
155
|
+
`set_thread_archived` for your own task; `Archive: no` means leave it open. Do
|
|
156
|
+
not make the parent perform routine child-task archival.
|
|
157
|
+
|
|
158
|
+
Do not merge, push, deploy, or manually delete the worktree. The parent
|
|
159
|
+
integrates the commit and may delete the branch after merge; Codex owns managed
|
|
160
|
+
worktree pruning. If review is needed, the parent creates a fresh review
|
|
161
|
+
chip/session.
|
|
157
162
|
```
|
|
158
163
|
|
|
159
164
|
## FIX contract
|
|
@@ -188,12 +193,13 @@ require a writable task.
|
|
|
188
193
|
|
|
189
194
|
## Parent cleanup
|
|
190
195
|
|
|
191
|
-
After the parent
|
|
192
|
-
|
|
196
|
+
After integration, the parent may clear remaining GrepRAG manifest/branch
|
|
197
|
+
bookkeeping with:
|
|
193
198
|
|
|
194
199
|
```bash
|
|
195
200
|
greprag codex chip cleanup <id> --native-archived
|
|
196
201
|
```
|
|
197
202
|
|
|
198
|
-
|
|
199
|
-
|
|
203
|
+
The child archives its own task after sending `Archive: yes`; the parent does
|
|
204
|
+
not perform routine child-task archival. Codex owns managed-worktree pruning.
|
|
205
|
+
Local-mode FIX tasks have no worktree or branch to prune.
|