@lifeaitools/rdc-skills 0.28.0 → 0.30.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rdc",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code — plan, build, review, overnight unattended builds with work-item tracking and TDD enforcement.",
5
5
  "author": {
6
6
  "name": "LIFEAI",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/rdc-skills",
3
- "version": "0.28.0",
3
+ "version": "0.30.0",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code - plan, build, review, overnight builds",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -41,6 +41,12 @@ not an evasion.
41
41
  It should not re-dispatch on top of a call you are still working.
42
42
  6. **Escalation, not blame,** when you disagree. A stated disagreement with
43
43
  evidence is a valid terminal state.
44
+ 7. **A model chosen for the work,** named in the dispatch — not whatever the
45
+ engine happened to be configured with. If you are asked to settle an
46
+ architecture question or verify a claim adversarially and you are running on
47
+ a tier below that, say so in your reply rather than answering anyway. A
48
+ confident answer from the wrong tier is the expensive failure here: it reads
49
+ exactly like a correct one and nothing downstream catches it.
44
50
 
45
51
  ---
46
52
 
@@ -65,6 +71,54 @@ write may not be.**
65
71
 
66
72
  ## What you owe BACK — your responsibilities
67
73
 
74
+ ### 0. Answer the `status` handshake honestly, by PROBING.
75
+
76
+ Before the real conversation starts you will be asked for `COLLAB-STATUS/1`.
77
+ Emit every field. **Capability fields must be probed, not assumed** — actually
78
+ attempt the seam and report the literal result.
79
+
80
+ ```
81
+ COLLAB-STATUS/1
82
+ agent: <you>
83
+ engine_version: <version>
84
+ skill_version: <rdc-skills version>
85
+
86
+ --- managed identity (all 8; an absent field IS the diagnosis) ---
87
+ lane: <lane | NONE>
88
+ role: worker | supervisor | NONE
89
+ repo_identity: <repo>
90
+ owner_pid: <pid | NONE>
91
+ owner_start_fingerprint: <present | ABSENT>
92
+ session_id: <id | NONE>
93
+ lease_epoch: <epoch | NONE>
94
+ owner_token: present | ABSENT ← NEVER the value
95
+
96
+ --- capability (PROBED — name the probe) ---
97
+ can_write: yes | no | unknown probe: <what you actually ran>
98
+ can_commit: yes | no | unknown probe: <…>
99
+ can_push: yes | no | unknown probe: <…>
100
+
101
+ --- position ---
102
+ cwd: <path> branch: <branch> head: <sha> dirty: <n tracked files>
103
+ ahead/behind: <n>/<n> vs <named upstream>
104
+
105
+ --- services ---
106
+ codeflow: <status> clauth: <status> work_items: reachable | no
107
+ ```
108
+
109
+ **Rules that make this worth asking for:**
110
+
111
+ - **Never emit the `owner_token` value.** `present`/`ABSENT` only — this output
112
+ lands in transcripts and logs.
113
+ - **`unknown` is an honest answer. `yes` without a probe is not.** If you could
114
+ not test the seam, say `unknown` and name why. A capability you assumed and
115
+ cannot demonstrate is precisely the claim this protocol exists to eliminate.
116
+ - **Report the lane you are ACTUALLY in**, not the one you were asked to be in.
117
+ If they differ, your session identity is poisoned — say so in the same reply.
118
+ That one line saves the initiator an entire wasted round.
119
+ - A missing identity field is not an embarrassment to smooth over. It is the
120
+ most useful thing you can tell the initiator.
121
+
68
122
  ### 1. Answer in the required format. Nothing outside it.
69
123
 
70
124
  If the dispatch gives you a contract, use it verbatim. Prose around the blocks
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rdc:collab
3
- description: "Usage `rdc:collab <collaborator> [inbound] <topic>` — Structured agent-to-agent CONVERSATION with Codex, a local LLM, a Claude agent, or a claude.ai session. Converges on a decision and never writes to the repo — work that needs writing becomes a work item for rdc:build. Every dispatch carries a response contract."
3
+ description: "Usage `rdc:collab <collaborator> [inbound] <topic>` — Structured agent-to-agent CONVERSATION with Codex, a local LLM, a Claude agent, or a claude.ai session. Converges on a decision and never writes to the repo — work that needs writing becomes a work item for rdc:build. Run `rdc:collab status <peer>` first — both sides emit probed capability state. Every dispatch carries a response contract."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
@@ -116,8 +116,11 @@ diagnosis ladder in order and stop at the first hit:
116
116
  2. **Did it exit, and with what?** A non-zero exit or exit 143 (killed) is a
117
117
  result, not silence. Read it.
118
118
  3. **Was it guard-blocked?** Grep the output for a `deny`/`Blocked` line. The
119
- `CODEX MANAGED LANE` block is the common one and is a *dispatch* defect
120
- (wrong `-C`), not a peer failurefix and re-dispatch once.
119
+ `CODEX MANAGED LANE` block is the common one and is a *dispatch* defect, not a
120
+ peer failure. **It is not fixed by `-C`**the session's identity was recorded
121
+ at creation and `resume` replays it, so a mis-started session is poisoned for
122
+ life. Start a **new** session in the right lane. Had `status` run first
123
+ (Step 0.5), this would have been visible before any content was sent.
121
124
  4. **Is the session still addressable?** A stale `resume <session-id>`, a stopped
122
125
  chitchat session, or a dead local-LLM endpoint all present as silence.
123
126
  5. **Did it answer somewhere you are not reading?** A peer that cannot write its
@@ -134,8 +137,9 @@ outliving its dispatch is noise, and noise is how a real stall gets ignored.
134
137
  ## Step 0 — Parse arguments
135
138
 
136
139
  ```
137
- rdc:collab <collaborator> [mode] <topic…>
138
- rdc:collab --session <id> legacy form, implies `claude-ai listen`
140
+ rdc:collab status <collaborator> handshake; run BEFORE round 1
141
+ rdc:collab <collaborator> [inbound] <topic…>
142
+ rdc:collab --session <id> ← legacy form, implies `claude-ai inbound`
139
143
  ```
140
144
 
141
145
  - No collaborator → list active chitchat sessions and available engines, then stop.
@@ -146,6 +150,73 @@ rdc:collab --session <id> ← legacy form, implies `claude-ai listen`
146
150
 
147
151
  ---
148
152
 
153
+ ## Step 0.5 — `status` handshake (run BEFORE round 1)
154
+
155
+ `rdc:collab status <collaborator>` — both sides emit their state. **This is a
156
+ precondition, not a debugging command.** Reaching for it after a failure is
157
+ already too late; the point is to never dispatch into a session that cannot
158
+ deliver.
159
+
160
+ **The probe rule — the whole value of this step.** Every capability field is
161
+ **PROBED, never asserted.** A peer that *reports* `can_write: yes` from an
162
+ assumption has produced another unverified capability claim, which is the defect
163
+ class this entire protocol exists to remove. `-C` "should" have set lane identity
164
+ too. Probe the seam, report the literal result, and if you cannot probe, say
165
+ `unknown` — never `yes`.
166
+
167
+ ### `COLLAB-STATUS/1` payload
168
+
169
+ ```
170
+ COLLAB-STATUS/1
171
+ agent: codex | claude-code | claude-ai | local-llm
172
+ engine_version: <version>
173
+ skill_version: <rdc-skills version>
174
+
175
+ --- managed identity (the 8 fields; absent ones are the diagnosis) ---
176
+ lane: <lane | NONE>
177
+ role: worker | supervisor | NONE
178
+ repo_identity: <repo>
179
+ owner_pid: <pid | NONE>
180
+ owner_start_fingerprint: <present | ABSENT>
181
+ session_id: <id | NONE>
182
+ lease_epoch: <epoch | NONE>
183
+ owner_token: present | ABSENT ← NEVER the value
184
+
185
+ --- capability (PROBED — state the probe used) ---
186
+ can_write: yes | no | unknown probe: <what you actually ran>
187
+ can_commit: yes | no | unknown probe: <…>
188
+ can_push: yes | no | unknown probe: <…>
189
+
190
+ --- position ---
191
+ cwd: <path>
192
+ branch: <branch>
193
+ head: <sha>
194
+ dirty: <n tracked files>
195
+ ahead/behind: <n>/<n> vs <named upstream>
196
+
197
+ --- services ---
198
+ codeflow: <status> clauth: <status> work_items: reachable | no
199
+ ```
200
+
201
+ **`owner_token` reports `present`/`ABSENT` only. Never emit the value** — status
202
+ output lands in transcripts and logs.
203
+
204
+ ### How the initiator reads it
205
+
206
+ | Signal | Meaning | Action |
207
+ |---|---|---|
208
+ | `lane: NONE` or missing identity fields | No managed identity was ever minted | Conversation only. Do not name this peer as writer. |
209
+ | `can_write: no` | Structurally read-only right now | Fine for collab. Name someone else to land the outcome. |
210
+ | `can_write: unknown` | It could not probe | Treat as `no` until proven. Never as `yes`. |
211
+ | `lane` ≠ the lane you dispatched to | **Poisoned session** — identity is recorded at creation and `resume` replays it | Start a NEW session. `-C` will not repair it. |
212
+ | `dirty` > 0 on a peer you are about to name as writer | Pre-existing uncommitted work | Surface it before it gets swept into your commit |
213
+
214
+ **Mismatch between what you dispatched and what `status` reports is the single
215
+ highest-value signal in this protocol.** It is exactly the failure that cost a
216
+ full negotiation on 2026-08-14, and it is visible in one line here.
217
+
218
+ ---
219
+
149
220
  ## Step 1 — Collaborator matrix
150
221
 
151
222
  Resolve the transport BEFORE composing the message. Getting this wrong is the
@@ -182,6 +253,42 @@ file:///C:/Dev/lifeai-env/pool/codex-topology.mjs
182
253
  **Dispatch is long-running.** Run engine dispatch as a **background task**, not
183
254
  behind a `timeout` guess. A truncated call looks like a failure and is not one.
184
255
 
256
+ ### Step 1b — Pick the model for the work
257
+
258
+ **If the invocation names a model, use it. Otherwise choose one — do not silently
259
+ take the engine default.** The default is whatever that engine was last
260
+ configured with, which has no relationship to the task in front of it, and a
261
+ reasoning-heavy negotiation run on a small model produces confident agreement
262
+ that does not survive contact with the code.
263
+
264
+ Model is a **per-invocation** flag on both engines, so it applies to a resumed
265
+ conversation exactly as it does to a new one — a long-running collab lane can
266
+ change model between sittings without starting over:
267
+
268
+ | Engine | Flag |
269
+ |---|---|
270
+ | `codex` | `codex -m <model>` · with resume: `codex resume <id> -m <model>` |
271
+ | `claude` | `claude --model <model>` |
272
+ | interactive collab lane | `collab-launch.ps1 -Name <lane> -Model <model>` |
273
+
274
+ Choose by the KIND of work, not by the size of the diff:
275
+
276
+ | Work | Model tier | Why |
277
+ |---|---|---|
278
+ | Negotiating a design, architecture review, adversarial verification, root-causing a defect that resisted one fix | **most capable** (Opus-class / `gpt-5`-class) | The output is a decision that other work is built on. A wrong one is not caught by tests. |
279
+ | Implementing an agreed plan, mechanical refactor, test authoring, doc sweep | **mid tier** (Sonnet-class) | The shape is already decided; the cost of a retry is one run. |
280
+ | Formatting, lint fixes, transcription, extracting fields from output | **fast/cheap** (Haiku-class) | No judgment involved. |
281
+
282
+ Two rules that override the table:
283
+
284
+ 1. **Escalate on a repeat.** If a task has already failed once — a fix that did
285
+ not hold, a round that did not shrink the open set — the next attempt goes up
286
+ a tier, not sideways. Re-running the same tier on the same problem is how a
287
+ loop starts.
288
+ 2. **State the choice in the dispatch.** One line: *"running this on `<model>`
289
+ because it is an architecture decision."* A model choice nobody can see is a
290
+ model choice nobody can correct.
291
+
185
292
  ---
186
293
 
187
294
  ## Step 2 — Compose the response contract (mandatory)
@@ -196,11 +303,21 @@ repo mid-conversation, which is the v0.27.0 defect this version removes.
196
303
  **The contract — one block per open point:**
197
304
 
198
305
  ```
199
- POINT <n>: AGREE | AGREE-WITH-AMENDMENT | DISAGREE
306
+ POINT <n>: AGREE | AGREE-WITH-AMENDMENT | DISAGREE | UNKNOWN | DEFER
200
307
  EDIT: <the exact section and change that SHOULD be made, or NONE — describe it, do not make it>
201
- REASON: <one sentence — only if AMENDMENT or DISAGREE>
308
+ REASON: <one sentence — required for AMENDMENT, DISAGREE, UNKNOWN and DEFER>
202
309
  ```
203
310
 
311
+ `UNKNOWN` and `DEFER` are first-class answers, not failures. A three-value
312
+ contract forces a peer that lacks the evidence to invent a position, and an
313
+ invented position is indistinguishable from a settled one in the next round —
314
+ which is how a negotiation converges on something nobody actually checked. Adopted
315
+ from Codex, 2026-08-15: *"binary agreement forces invented certainty."*
316
+
317
+ **Every handshake carries `AS_OF` and `PROBE_STATE`** — when the peer last
318
+ observed the thing it is describing, and whether that observation was live,
319
+ cached, or absent. A claim with no as-of is a claim about an unknown moment.
320
+
204
321
  **When the point is a factual question rather than a proposal**, the peer answers
205
322
  with findings — still text, still no repo mutation:
206
323
 
@@ -212,13 +329,54 @@ CONFIDENCE: VERIFIED | INFERRED | UNKNOWN
212
329
 
213
330
  Rules that make the contract hold:
214
331
 
215
- 1. **State the format before the content.** Contract first, then the points.
332
+ 0. **Write like the peer, not like a memo.** An engine peer answers in dense,
333
+ structured blocks; address it the same way. Contract, numbered points, the
334
+ facts each point turns on — no preamble, no restating what was settled last
335
+ round in prose, no explaining your reasoning for a position the EDIT line
336
+ already states. Every sentence that is not a point, a constraint, or a fact
337
+ the peer needs is padding the peer must parse before it can answer. Prose
338
+ framing is for the human reading the transcript afterward, and it belongs in
339
+ the summary you write for them — not in the dispatch.
340
+ 1. **Name what to read, by path, before the points.** A peer does not go looking
341
+ on its own — it answers from what is in front of it, exactly like you do. A
342
+ dispatch that says "review the remediation plan" gets an answer about the peer's
343
+ memory of a plan; a dispatch that says `read
344
+ .rdc/areas/infra/fleet-throughput/plans/fleet-throughput-remediation.md §T1–T6
345
+ and pool/codex-topology.mjs sameOwner()` gets an answer about the code. List
346
+ the files, the sections, and the one thing to look for in each. If the peer
347
+ cannot reach a path, that is a `BLOCKED` you want stated early rather than an
348
+ answer quietly built on something else.
349
+
350
+ **A path beats a paraphrase. Never restate a document you can point at.** Both
351
+ engines share this filesystem, so pasting a plan into the dispatch buys
352
+ nothing and costs three ways: the peer answers your summary instead of the
353
+ source, your summary is stale the moment the file changes, and the context it
354
+ spends re-reading your prose is context it does not spend on the question. Link
355
+ the document, name the section, ask the question. The only text worth inlining
356
+ is what does NOT exist in a file yet — the open points themselves.
357
+ 2. **State the format before the content.** Contract first, then the points.
216
358
  2. **Say what NOT to produce** when the peer has a known default — e.g. *"do not
217
359
  write a lesson; this is a Decision and belongs in the plan."*
218
360
  3. **Number the points.** Unnumbered points get answered in aggregate.
219
361
  4. **Name the single writer before round 1** (see Step 4).
220
362
  5. **Ask for `BLOCKED` explicitly.** Without it, a peer that cannot act reports
221
363
  success or silence.
364
+ 6. **Mark a conversation-only collab as such, in the dispatch and in your own
365
+ turn.** A collab whose declared deliverable IS the reply produces no
366
+ repository artifact by design (Step 2's whole premise: the peer describes the
367
+ edit, it does not make it). An end-of-turn gate that demands a file, a commit,
368
+ or a lesson from such a turn is asking the protocol to violate itself, and the
369
+ peer's only honest answer becomes a repeated `BLOCKED` — which is exactly what
370
+ happened on 2026-08-15: a Codex peer returned a complete, contract-shaped,
371
+ four-point answer and then reported `BLOCKED: this conversation-only collab
372
+ cannot produce repository artifacts` twice more, because the gate would not
373
+ accept the reply as the deliverable.
374
+
375
+ State the deliverable explicitly — *"the deliverable of this turn is the reply
376
+ itself; no repository artifact is expected"* — so the completion gate has a
377
+ declared reason rather than an absence to interpret. The Decision that comes
378
+ OUT of the collab still lands in a governing document (Step 5); it is the
379
+ negotiation turns themselves that are conversation-only.
222
380
 
223
381
  ---
224
382
 
@@ -259,6 +417,12 @@ dispatch.
259
417
  > Two active writers on one surface is forbidden — the same rule the fleet plans
260
418
  > state as *"never run two active writers for one effect."*
261
419
 
420
+ **Scope ownership to a named effect or artifact, never to an agent in general** —
421
+ "Claude owns `fleet-throughput-remediation.md`", not "Claude is the writer".
422
+ Transfer is explicit and acknowledged; **silence never transfers ownership**. A
423
+ peer that has gone quiet is unobservable, not resigned, and treating those as the
424
+ same thing is how two writers end up on one file.
425
+
262
426
  If the named writer turns out to be **structurally blocked** (wrong lane, no
263
427
  credentials, read-only mount), ownership transfers to the other agent *for that
264
428
  artifact only*, recorded in the change itself with attribution. A blocked writer