greprag 5.59.3 → 5.60.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/dist/commands/arm-reminder.d.ts +5 -0
  2. package/dist/commands/arm-reminder.js +11 -0
  3. package/dist/commands/arm-reminder.js.map +1 -1
  4. package/dist/commands/codex-chip/breakthrough-ack-command.d.ts +1 -0
  5. package/dist/commands/codex-chip/breakthrough-ack-command.js +25 -0
  6. package/dist/commands/codex-chip/breakthrough-ack-command.js.map +1 -0
  7. package/dist/commands/codex-chip/breakthrough-command.d.ts +5 -0
  8. package/dist/commands/codex-chip/breakthrough-command.js +46 -0
  9. package/dist/commands/codex-chip/breakthrough-command.js.map +1 -0
  10. package/dist/commands/codex-chip/breakthrough.d.ts +15 -0
  11. package/dist/commands/codex-chip/breakthrough.js +147 -0
  12. package/dist/commands/codex-chip/breakthrough.js.map +1 -0
  13. package/dist/commands/codex-chip/cleanup-command.js +11 -1
  14. package/dist/commands/codex-chip/cleanup-command.js.map +1 -1
  15. package/dist/commands/codex-chip/command.d.ts +1 -1
  16. package/dist/commands/codex-chip/command.js +48 -84
  17. package/dist/commands/codex-chip/command.js.map +1 -1
  18. package/dist/commands/codex-chip/goal-command.js +27 -4
  19. package/dist/commands/codex-chip/goal-command.js.map +1 -1
  20. package/dist/commands/codex-chip/goals.d.ts +15 -2
  21. package/dist/commands/codex-chip/goals.js +157 -9
  22. package/dist/commands/codex-chip/goals.js.map +1 -1
  23. package/dist/commands/codex-chip/help.d.ts +1 -0
  24. package/dist/commands/codex-chip/help.js +34 -0
  25. package/dist/commands/codex-chip/help.js.map +1 -0
  26. package/dist/commands/codex-chip/inbox.d.ts +1 -1
  27. package/dist/commands/codex-chip/inbox.js +5 -3
  28. package/dist/commands/codex-chip/inbox.js.map +1 -1
  29. package/dist/commands/codex-chip/mechanic-lifecycle.d.ts +5 -0
  30. package/dist/commands/codex-chip/mechanic-lifecycle.js +67 -0
  31. package/dist/commands/codex-chip/mechanic-lifecycle.js.map +1 -0
  32. package/dist/commands/codex-chip/model.d.ts +39 -1
  33. package/dist/commands/codex-chip/model.js +6 -0
  34. package/dist/commands/codex-chip/model.js.map +1 -1
  35. package/dist/commands/codex-chip/naming.d.ts +2 -2
  36. package/dist/commands/codex-chip/naming.js +8 -5
  37. package/dist/commands/codex-chip/naming.js.map +1 -1
  38. package/dist/commands/codex-chip/native.js +5 -1
  39. package/dist/commands/codex-chip/native.js.map +1 -1
  40. package/dist/commands/codex-chip/prompt.js +22 -2
  41. package/dist/commands/codex-chip/prompt.js.map +1 -1
  42. package/dist/commands/codex-chip/resume-command.js +3 -0
  43. package/dist/commands/codex-chip/resume-command.js.map +1 -1
  44. package/dist/commands/codex-chip/selection.d.ts +6 -3
  45. package/dist/commands/codex-chip/selection.js +81 -27
  46. package/dist/commands/codex-chip/selection.js.map +1 -1
  47. package/dist/commands/codex-chip/worker.js +19 -0
  48. package/dist/commands/codex-chip/worker.js.map +1 -1
  49. package/dist/commands/codex-delivery.d.ts +7 -1
  50. package/dist/commands/codex-delivery.js +98 -15
  51. package/dist/commands/codex-delivery.js.map +1 -1
  52. package/dist/commands/codex-native-delivery.d.ts +70 -0
  53. package/dist/commands/codex-native-delivery.js +285 -0
  54. package/dist/commands/codex-native-delivery.js.map +1 -0
  55. package/dist/commands/codex-startup.js +1 -1
  56. package/dist/commands/codex-startup.js.map +1 -1
  57. package/dist/commands/codex.js +17 -12
  58. package/dist/commands/codex.js.map +1 -1
  59. package/dist/commands/docptr.js +4 -4
  60. package/dist/commands/docptr.js.map +1 -1
  61. package/dist/commands/inbox-primer-reminder.js +2 -2
  62. package/dist/commands/inbox-primer-reminder.js.map +1 -1
  63. package/dist/commands/init.js +24 -2
  64. package/dist/commands/init.js.map +1 -1
  65. package/dist/commands/load-primer-reminder.js +2 -2
  66. package/dist/commands/load-primer-reminder.js.map +1 -1
  67. package/dist/commands/load.js +2 -2
  68. package/dist/commands/load.js.map +1 -1
  69. package/dist/hook.js +8 -3
  70. package/dist/hook.js.map +1 -1
  71. package/dist/index.js +96 -1
  72. package/dist/index.js.map +1 -1
  73. package/dist/opencode-plugin.bundle.js +4 -4
  74. package/dist/procedure-run.js +5 -5
  75. package/dist/procedure-run.js.map +1 -1
  76. package/dist/session-id.d.ts +4 -0
  77. package/dist/session-id.js +13 -0
  78. package/dist/session-id.js.map +1 -1
  79. package/package.json +1 -1
  80. package/skill/greprag/SKILL.md +1 -1
  81. package/skill/greprag/docs/codex-chip.md +10 -8
  82. package/skill/greprag/docs/setup.md +6 -6
  83. package/skill/templates/chip-leader.md +9 -6
  84. package/skill/templates/codex-chip-spawn.md +46 -32
@@ -3,6 +3,12 @@
3
3
  This is the Codex Desktop chip method. It is separate from Claude Code
4
4
  `spawn_task`: never use or copy the Claude Block 1/Block 2 prompt here.
5
5
 
6
+ Exact visible titles are role contracts: `PLANNER: <Mission>` owns intent and
7
+ acceptance, `LEAD: <Mission>` is always Luna/xhigh and owns orchestration,
8
+ `Chip A/B/C: <Specific Purview>` are Luna/xhigh workers, and
9
+ `ADVISOR: <Purview>` is read-only Sol/high advice for a documented fundamental
10
+ blocker.
11
+
6
12
  ## Gate: one chip or a mission?
7
13
 
8
14
  A single independent task proceeds directly. If two or more chips target one
@@ -18,6 +24,10 @@ uniquely named `Chip A: <Specific Purview>`, `Chip B: ...`; a single worker is
18
24
  Every mission starts with a durable parent-owned goal. Give it a concrete
19
25
  objective, final state, and stable acceptance criterion IDs. Every write chip
20
26
  declares non-overlapping ownership leases; research uses `--read-only`.
27
+ After the planner attaches the Luna LEAD, the LEAD creates one nested goal and
28
+ runs `greprag codex chip goal bind-lead <lead-id> --goal-id <nested-goal-id>`.
29
+ That emits `GOAL_READY:<goalId>`; no LEAD execution or child dispatch is valid
30
+ before it. All later Chips, ADVISOR, and MECHANIC tasks use that exact goal.
21
31
 
22
32
  ```bash
23
33
  greprag codex chip goal create \
@@ -36,30 +46,18 @@ greprag codex chip spawn "<independent task>" \
36
46
  ```
37
47
 
38
48
  The parent/`LEAD:` selects each worker model before dispatch; the child never
39
- self-selects or changes it. Defaults are exact:
40
-
41
- - **Standard — `gpt-5.6-luna` / `xhigh`:** bounded single-owner execution with
42
- clear acceptance criteria: scoped implementation, tests, docs, or focused
43
- research/review.
44
- - **Complex — `gpt-5.6-sol` / `high`:** use when *any* hard signal applies:
45
- orchestration/decomposition; multi-chip integration or merge arbitration;
46
- architecture/API/schema decisions; cross-cutting ownership; ambiguous
47
- requirements needing synthesis; high-risk migration/security/accounting
48
- correctness; or novel diagnosis with multiple interacting hypotheses.
49
-
50
- In multi-chip missions the `LEAD:` itself is Sol/high, but it classifies every
51
- worker independently—workers do not inherit Sol. Complex selection requires a
52
- concise `--model-reason` plus one or more `--complexity-signal` values:
53
- `orchestration`, `multi-chip-integration`, `architecture-api-schema`,
54
- `cross-cutting-ownership`, `ambiguous-synthesis`, `high-risk-correctness`, or
55
- `novel-multi-hypothesis-diagnosis`. Explicit `--model`/`--effort` overrides are
56
- supported and require `--model-reason`; standard records its rubric reason by
57
- default. Native Desktop `thinking` uses the callable enum and is checked against
58
- the selected model's advertised effort matrix.
59
- An arbitrary custom native model also requires `--native-model-verified`, which
60
- means the parent verified it on the Desktop surface before dispatch. The
61
- manifest persists profile/model/effort, parent session in
62
- `selectedBy`, reason, and matched signals.
49
+ self-selects or changes it. `LEAD` and ordinary Chips are fixed to
50
+ `gpt-5.6-luna/xhigh`.
51
+ `PLANNER` may use Luna/xhigh or explicitly Sol/high. `ADVISOR` must be
52
+ `--read-only`, Sol/high, and carry `--model-reason "Fundamental blocker: ..."`.
53
+ The old `--complex`, `--profile complex`, and `--complexity-signal` routing is
54
+ rejected for new spawns. Native Desktop `thinking` uses the callable enum and
55
+ is checked against the selected model's advertised effort matrix. The manifest
56
+ persists role, model, effort, parent session, reason, and criterion evidence.
57
+ The auditable selection fields are `selectedBy`, `reason`, and `matched signals`.
58
+ The hard-signal rubric covers `architecture/API/schema` and
59
+ `high-risk migration/security/accounting`; a scope boundary sends a
60
+ `breakthrough message` and the child `never swaps models autonomously`.
63
61
 
64
62
  Native Desktop is the default runtime.
65
63
  `--runtime cli` is opt-in and only valid when PATH Codex `model/list` actually
@@ -73,6 +71,9 @@ The spawn command creates a unique starting branch, records the manifest and
73
71
  lease, and returns a `greprag-codex-native-v4` handoff. Pass `createRequest`
74
72
  exactly to native `create_thread`: it already contains the full real mission,
75
73
  selected `model`, `thinking`, project target, and worktree starting branch.
74
+ The native target schema is `target.type=project` with
75
+ `startingState={type:"branch", branchName}` inside the worktree environment;
76
+ do not invent a checkout path or second bootstrap turn. Do not add `cwd`, `title`, `model`, or `effort` to the native create request; those values belong to the handoff and post-create verification contract.
76
77
  `expectedBaseSha` is the attach-time commit invariant behind that reserved branch.
77
78
  This is the only assignment turn. Never create a bootstrap task and never send
78
79
  the mission again after attach.
@@ -91,6 +92,8 @@ and starts the monitor. The enforced order is create-real-mission → provisiona
91
92
  bind → resolve → rename/verify → attach → IN-FLIGHT → monitor. A standalone CLI cannot
92
93
  invoke the Desktop-owned surface, so it prepares rather than pretending an old
93
94
  PATH app-server successfully ran a 5.6 turn.
95
+ The title race contract is `set_thread_title` → read it back twice →
96
+ `IN-FLIGHT → mission` monitor only after the exact title remains stable.
94
97
 
95
98
  ## Mandatory parent inbox lifecycle
96
99
 
@@ -101,9 +104,9 @@ The child must address the recorded parent session, not a bare mailbox:
101
104
  report` command in its opening prompt.
102
105
  - `BLOCKED` before ending when it cannot finish, by running the exact `codex
103
106
  chip block` command.
104
- - If the work crosses the selected model boundary, send a breakthrough message
105
- explaining the new signal. The parent decides whether to steer or relaunch;
106
- the child never swaps models autonomously.
107
+ - If the work crosses the selected model boundary, run
108
+ `codex chip breakthrough <id> --reason "..."`. This emits a typed
109
+ `BREAKTHROUGH` event to the recorded parent; the child never swaps models.
107
110
 
108
111
  The attached host monitor validates receipts from the recorded native cwd,
109
112
  exact base ancestry, clean state, and every changed path against the lease. A
@@ -112,13 +115,17 @@ reserved chip ref, then sends the terminal inbox event. The
112
115
  child never merges, pushes, cleans up, or edits the parent checkout. Reports map
113
116
  concrete evidence to every covered goal criterion. The parent reviews the diff,
114
117
  integrates it, and runs `greprag codex chip goal accept <goal-id> --summary
115
- "<review judgment>"` only when all criteria and chips are satisfied. For a
116
- verified squash/cherry-pick add `--integrated <chip-id>` to acceptance. Acceptance
118
+ "<review judgment>"` only when all criteria and chips are satisfied. A
119
+ LEAD-owned goal with no additional child chip records final proofs with
120
+ `goal attest --commit <release-commit>` plus repeated `--evidence` and `--check`
121
+ before acceptance. For a verified squash/cherry-pick add `--integrated <chip-id>`
122
+ to acceptance. Acceptance
117
123
  returns machine-readable closeout entries: apply each native `archiveRequest`
118
124
  first, then its exact `cleanupCommand`. Cleanup does not imply acceptance, is
119
125
  refused before it, and requires `--native-archived` for native tasks.
120
126
 
121
- Native chips have a receipt deadline (default 180 minutes; override with
127
+ Native chips require parent-side `--native-model-verified` proof before monitor
128
+ start and have a receipt deadline (default 180 minutes; override with
122
129
  `--native-timeout-minutes`). This standalone CLI cannot query Desktop-private
123
130
  turn status, so it never guesses that a settled task succeeded: write *and read*
124
131
  chips must submit `report`/`block`, and timeout fails loudly. One live monitor
@@ -145,12 +152,15 @@ Useful recovery commands:
145
152
  ```bash
146
153
  greprag codex chip handoff <id> --json
147
154
  greprag codex chip status <id>
148
- greprag codex chip steer <id> "<follow-up>"
155
+ greprag codex chip breakthrough <id> --reason "<follow-up>"
149
156
  greprag codex chip resume <id>
150
157
  greprag codex chip stop <id>
151
158
  ```
152
159
 
153
- For a native chip, `steer` emits a `send_message_to_thread` handoff. Stop fails
160
+ For a native chip, `BREAKTHROUGH` is the sole agent-visible control envelope;
161
+ native turn transport remains private. Breakthrough delivery is
162
+ durably queued → injected → acknowledged → acted; empty completed turns are
163
+ not delivery, and natural-turn drain is degraded fallback only. Stop fails
154
164
  loud until the parent interrupts the Desktop task, then confirms that fact with
155
165
  `stop <id> --native-interrupted`; the CLI never records a false cancellation.
156
166
  After restart/usage interruption, use `resume`, deliver its handoff, and wait for
@@ -161,3 +171,7 @@ For an invalid terminal launch, preserve the mission and run `goal exclude
161
171
  replacement. Excluded evidence cannot satisfy acceptance. To abandon the whole
162
172
  mission, stop every chip first, then use `goal cancel <goal-id> --reason
163
173
  "<concrete reason>"`; cancelled closeout is not acceptance.
174
+
175
+ Mechanic repair incidents are not Mechanic task termination: `REPAIR-READY/CLOSED`
176
+ returns the same Luna/xhigh Mechanic to `OPEN+DORMANT` for later typed friction.
177
+ Only final LEAD teardown may accept/clean it with `--mechanic-final`.