greprag 5.65.2 → 5.65.3

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 (63) hide show
  1. package/dist/codex-chip-hooks.js +2 -2
  2. package/dist/codex-chip-hooks.js.map +1 -1
  3. package/dist/commands/agent-doctrine-file.d.ts +27 -9
  4. package/dist/commands/agent-doctrine-file.js +74 -47
  5. package/dist/commands/agent-doctrine-file.js.map +1 -1
  6. package/dist/commands/agents.d.ts +2 -2
  7. package/dist/commands/agents.js +167 -48
  8. package/dist/commands/agents.js.map +1 -1
  9. package/dist/commands/codex-chip/command.js +4 -2
  10. package/dist/commands/codex-chip/command.js.map +1 -1
  11. package/dist/commands/codex-chip/goals.d.ts +3 -3
  12. package/dist/commands/codex-chip/goals.js +3 -3
  13. package/dist/commands/codex-chip/goals.js.map +1 -1
  14. package/dist/commands/codex-chip/help.d.ts +1 -1
  15. package/dist/commands/codex-chip/help.js +4 -3
  16. package/dist/commands/codex-chip/help.js.map +1 -1
  17. package/dist/commands/codex-chip/model.d.ts +6 -2
  18. package/dist/commands/codex-chip/model.js +12 -2
  19. package/dist/commands/codex-chip/model.js.map +1 -1
  20. package/dist/commands/codex-chip/native.js +2 -2
  21. package/dist/commands/codex-chip/native.js.map +1 -1
  22. package/dist/commands/codex-chip/prompt.js +8 -4
  23. package/dist/commands/codex-chip/prompt.js.map +1 -1
  24. package/dist/commands/codex-chip/selection.d.ts +5 -4
  25. package/dist/commands/codex-chip/selection.js +28 -9
  26. package/dist/commands/codex-chip/selection.js.map +1 -1
  27. package/dist/commands/codex-model-policy.d.ts +1 -1
  28. package/dist/commands/codex-model-policy.js +17 -6
  29. package/dist/commands/codex-model-policy.js.map +1 -1
  30. package/dist/commands/codex.js +1 -1
  31. package/dist/commands/init.js +19 -2
  32. package/dist/commands/init.js.map +1 -1
  33. package/dist/commands/load-primer-reminder.js +1 -1
  34. package/dist/commands/load-primer-reminder.js.map +1 -1
  35. package/dist/commands/mechanic-spawn.js +1 -1
  36. package/dist/commands/mechanic-spawn.js.map +1 -1
  37. package/dist/commands/opencode-chip-mission.d.ts +4 -4
  38. package/dist/commands/opencode-chip-mission.js.map +1 -1
  39. package/dist/commands/opencode-chip-store.d.ts +2 -2
  40. package/dist/commands/opencode-chip.js +3 -2
  41. package/dist/commands/opencode-chip.js.map +1 -1
  42. package/dist/commands/parity.js +1 -1
  43. package/dist/commands/skill-mirror-reminder.d.ts +3 -4
  44. package/dist/commands/skill-mirror-reminder.js +13 -8
  45. package/dist/commands/skill-mirror-reminder.js.map +1 -1
  46. package/dist/commands/skill.js +28 -0
  47. package/dist/commands/skill.js.map +1 -1
  48. package/dist/index.js +7 -0
  49. package/dist/index.js.map +1 -1
  50. package/dist/native-skill-mirror.d.ts +30 -0
  51. package/dist/native-skill-mirror.js +230 -0
  52. package/dist/native-skill-mirror.js.map +1 -0
  53. package/dist/opencode-plugin.bundle.js +9 -4
  54. package/dist/skill-mirror-client.d.ts +2 -5
  55. package/dist/skill-mirror-client.js +18 -6
  56. package/dist/skill-mirror-client.js.map +1 -1
  57. package/dist/skill-mirror-files.d.ts +6 -0
  58. package/dist/skill-mirror-files.js +51 -0
  59. package/dist/skill-mirror-files.js.map +1 -0
  60. package/package.json +1 -1
  61. package/skill/greprag/docs/codex-chip.md +4 -3
  62. package/skill/templates/chip-leader.md +37 -15
  63. package/skill/templates/codex-chip-spawn.md +40 -25
@@ -6,12 +6,13 @@ authority.
6
6
 
7
7
  ## Identity first
8
8
 
9
- For any coordinated multi-chip mission, rename the orchestrating task before
10
- spawning children:
9
+ Choose the mission shape before naming the current task:
11
10
 
12
- ```text
13
- LEAD: <Mission>
14
- ```
11
+ - **Quick mode:** rename the current task `LEAD: <Mission>` before spawning
12
+ 1–2 children. No separate leader task exists.
13
+ - **Leader mode:** rename the current initiating task `PLANNER: <Mission>`
14
+ before creating a separate `LEAD: <Mission>` task. Once a separate LEAD
15
+ exists, the PLANNER never presents itself as the LEAD.
15
16
 
16
17
  Then name children with the exact ordinal schema:
17
18
 
@@ -21,10 +22,15 @@ Chip B: <Specific Purview>
21
22
  Chip C: <Specific Purview>
22
23
  ```
23
24
 
24
- In quick mode, the current task renames itself `LEAD: <Mission>` and directly
25
- spawns 1–2 children. It is the **implicit LEAD**; no separate leader task is
26
- created. In Leader mode, the initiator creates a separate `LEAD: <Mission>`
27
- task, and that LEAD spawns and manages the children.
25
+ The identity transition happens before the first child creation. In Leader
26
+ mode the `PLANNER:` task creates only the dedicated `LEAD:` first; that LEAD
27
+ then spawns and manages `Chip A/B/C`.
28
+
29
+ <!-- adr: adr/codex-lead-native-goal.md -->
30
+ A dedicated `LEAD: <Mission>` task must create a native top-level mission goal
31
+ with `create_goal`, then run `get_goal` and verify the active goal names the
32
+ mission before any child fanout. This is Codex-native mission tracking, not a
33
+ GrepRAG durable manifest, lease, or permission gate.
28
34
 
29
35
  ## Three primitives
30
36
 
@@ -52,12 +58,12 @@ dispatch `Chip A` and `Chip B` directly.
52
58
  - Children are writable ordinary chips. Do not add a read-only role, lease,
53
59
  mandatory nested goal, or delivery-proof gate.
54
60
  - Role models come from the Codex model policy slots: `chip.worker`,
55
- `chip.leader`, `chip.advisor`, and `chip.mechanic`. Inspect the active policy
56
- with `greprag codex models show`; override a single child only with explicit
57
- `--model` / `--effort` flags when needed.
61
+ `chip.leader`, `chip.planner`, `chip.advisor`, and `chip.fix`. Inspect the
62
+ active policy with `greprag codex models show`; override a single child only
63
+ with explicit `--model` / `--effort` flags when needed.
58
64
  - Select the role slot from the first-line title before dispatch:
59
- `Chip A/B/C` -> `chip.worker`, `LEAD` -> `chip.leader`, `ADVISOR` ->
60
- `chip.advisor`, and `MECHANIC` -> `chip.mechanic`. ABOUT TO call
65
+ `Chip A/B/C` -> `chip.worker`, `LEAD` -> `chip.leader`, `PLANNER` ->
66
+ `chip.planner`, `ADVISOR` -> `chip.advisor`, and `FIX` -> `chip.fix`. ABOUT TO call
61
67
  `codex_app__create_thread`? STOP - pass that slot as top-level `model` and
62
68
  `thinking`; never rely on Codex Desktop defaults for a visible chip.
63
69
  - An `ADVISOR: <Purview>` child is a lead-facing consultant. It reports
@@ -76,11 +82,16 @@ dispatch `Chip A` and `Chip B` directly.
76
82
 
77
83
  Use this when the work is more than the quick 1–2-chip shape, or when shared
78
84
  files, contracts, ordering, integration, or a seam require a dedicated
79
- orchestrator. The initiator creates the separate `LEAD: <Mission>` task first.
80
- That LEAD decomposes the mission, assigns exact `Chip A/B/C: <Specific Purview>`
85
+ orchestrator. The initiator renames itself `PLANNER: <Mission>`, then creates
86
+ the separate `LEAD: <Mission>` task first. That LEAD decomposes the mission,
87
+ assigns exact `Chip A/B/C: <Specific Purview>`
81
88
  titles, dispatches ordinary writable chips, reconciles their reports, and owns
82
89
  integration checks and cleanup.
83
90
 
91
+ Before dispatching any child, the LEAD creates and verifies its native
92
+ top-level mission goal (`create_goal` -> `get_goal`). Child fanout starts only
93
+ after that verified goal exists.
94
+
84
95
  Load `greprag load chip-leader` for the mission worksheet before dispatch.
85
96
 
86
97
  ## Codex Desktop dispatch route
@@ -146,10 +157,9 @@ dedicated `LEAD: <Mission>` task.
146
157
  ## FIX missions — the one landing exception
147
158
 
148
159
  Landing authority follows the MISSION SHAPE, not the harness
149
- (adr/codex-landing-doctrine.md). Every chip shape above (`Chip A/B/C`, `LEAD`,
150
- `ADVISOR`, `MECHANIC`) keeps the parent-owned landing: commit, native reply
151
- with archive clearance, and the parent reviews, integrates, archives, and
152
- cleans up.
160
+ (adr/codex-landing-doctrine.md). Every non-FIX chip shape above (`Chip A/B/C`,
161
+ `LEAD`, `PLANNER`, `ADVISOR`) keeps the parent-owned landing: commit, native reply with
162
+ archive clearance, and the parent reviews, integrates, archives, and cleans up.
153
163
 
154
164
  A mission whose first line begins `FIX:` — emitted by `greprag fix spawn`
155
165
  (grepragOS law 4) — is the ONE exception: it carries its own Phase 3
@@ -189,9 +199,13 @@ Chip <Label>: <Specific Purview>
189
199
  ## Setup — do this FIRST
190
200
  Stay in the Codex-provided isolated worktree; do not create a second worktree.
191
201
  Read AGENTS.md and the session-start recap, then inspect the current repo state.
192
- No leases, read-only mode, or goals.
193
- If the exact first-line title is `MECHANIC: <Mission>`, make `greprag load
194
- mechanic` the first Setup action before diagnosis or edits.
202
+ If the exact first-line title is `LEAD: <Mission>`, create a native top-level
203
+ mission goal with `create_goal`, then run `get_goal` and verify the active goal
204
+ names this mission before any child fanout.
205
+ No leases, read-only mode, or GrepRAG goal gates.
206
+ If the exact first-line title is `FIX: <one friction unit>`, make `greprag
207
+ load mechanic` the first Setup action before diagnosis or edits; mechanic is
208
+ the doctrine, not the visible task identity.
195
209
  If the exact first-line title is `ADVISOR: <Purview>`, report consultation to
196
210
  the LEAD only: strategic findings, questions, tradeoffs, and recommendations.
197
211
  Do not write operator-facing completion language or decide/spawn worker chips.
@@ -217,5 +231,6 @@ and cleans up.
217
231
 
218
232
  The first line is the exact visible title, alone. Substitute the appropriate
219
233
  discoverability label: `Chip A: <Specific Purview>`, `LEAD: <Mission>`,
220
- `ADVISOR: <Purview>`, or `MECHANIC: <Mission>`. These labels do not change
221
- execution authority.
234
+ `PLANNER: <Mission>`, `ADVISOR: <Purview>`, or `FIX: <one friction unit>`. These labels do not change
235
+ execution authority, except that FIX carries the one-friction Phase 3 contract
236
+ printed by `greprag fix spawn`.