@lifeaitools/rdc-skills 0.23.0 → 0.24.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.23.0",
3
+ "version": "0.24.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/git-sha.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "sha": "7b0495d94de2ee447dadb0f1228bbbe9650a5563"
2
+ "sha": "46460e5add65d8555ec9246eed10eb2d7c5fcbb4"
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/rdc-skills",
3
- "version": "0.23.0",
3
+ "version": "0.24.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",
@@ -214,24 +214,42 @@ Read the task title and description, then:
214
214
  7. **For each wave — dispatch typed agents in parallel:**
215
215
 
216
216
  ### ⛔ Agent Dispatch Non-Negotiable Defaults
217
- Every `Agent()` call MUST include these parameters — no exceptions:
217
+ Every `Agent()` call MUST include these parameters:
218
218
  ```
219
219
  model: <chosen per the routing table below>
220
220
  max_turns: 70
221
- isolation: "worktree"
222
221
  ```
223
-
224
- ### Concurrent committers worktree isolation, no exceptions (docs included)
225
- For ANY parallel agent dispatch where the agents COMMIT **including a pure
226
- docs wave** — force `isolation: "worktree"` so each agent commits in its own
227
- tree and the orchestrator merges. NEVER fan out concurrent committers onto one
228
- shared working tree (lesson 2026-06-13-build-concurrent-agents-same-branch-git-race:
229
- three parallel doc agents on one `develop` tree raced on the git index/stash —
230
- one commit swept in another agent's staged-but-uncommitted files under the wrong
231
- message, two agents reported the SAME SHA, and a pre-commit `sync:docs` ref-lock
232
- race misattributed authorship). "It's just docs" is NOT an exemption. The only
233
- alternative to worktree isolation is running the committing agents **sequentially**
234
- on the shared tree (one commits and pushes before the next starts).
222
+ `isolation` is chosen per the dispatch-mode rule below — it is NOT a blanket
223
+ default. Worktree isolation is reserved for true parallel MULTI-committer waves
224
+ in the same repo; doc-only and single-committer waves default to NON-isolated.
225
+
226
+ ### Dispatch mode non-isolated is the default for single-committer / doc-only waves
227
+ Worktree isolation exists to protect a SHARED working tree from a git-index race
228
+ between MULTIPLE agents committing in parallel. When there is only ONE committer,
229
+ that race cannot occur, and the stale-base hazard of worktrees (see the HARD GATE
230
+ below recurring across 2026-06-10/11/15/16/17/23) is pure downside. Pick the
231
+ dispatch mode by committer count, not by reflex:
232
+
233
+ | Wave shape | Dispatch mode | isolation |
234
+ |---|---|---|
235
+ | **Doc-only wave** (markdown/docs/plans, no code build) | NON-isolated, one committer on `develop` | omit `isolation` |
236
+ | **Single-committer wave** (only one agent commits, or work serializes to the supervisor) | NON-isolated, one committer on `develop` | omit `isolation` |
237
+ | **True parallel MULTI-committer wave** (2+ agents committing concurrently in the same repo, disjoint files) | worktree-isolated, supervisor merges | `isolation: "worktree"` |
238
+
239
+ - **Default = NON-isolated.** Only escalate to `isolation: "worktree"` when the
240
+ wave genuinely has 2+ concurrent committers in the same repo.
241
+ - A pure docs wave is single-committer by default: either dispatch ONE doc agent,
242
+ or have parallel doc agents return diffs/patches that the supervisor commits
243
+ serially. Do NOT fan out 2+ concurrent committers onto one shared `develop`
244
+ tree (lesson 2026-06-13-build-concurrent-agents-same-branch-git-race: three
245
+ parallel doc agents on one `develop` tree raced on the git index/stash — one
246
+ commit swept in another agent's staged-but-uncommitted files under the wrong
247
+ message, two agents reported the SAME SHA, a pre-commit `sync:docs` ref-lock
248
+ race misattributed authorship). The fix for that race is single-committer
249
+ serialization, NOT blanket worktree isolation.
250
+ - When you DO need a true MULTI-committer parallel wave, worktree isolation is
251
+ mandatory AND the HARD GATE below (base == develop HEAD) MUST pass before
252
+ dispatch — a stale-base worktree wave is a build failure, not a warning.
235
253
 
236
254
  ### ⛔ Foreign concurrent session guard — `git status` BEFORE the build
237
255
  Worktree isolation protects against THIS build's own agents, not against a
@@ -270,25 +288,34 @@ Read the task title and description, then:
270
288
  Without `max_turns: 70`, agents hit the default turn cap mid-task and stop.
271
289
  `isolation: "worktree"` gives each agent its own git worktree and branch — eliminates push race conditions and index lock contention when multiple agents commit in parallel. The supervisor merges worktree branches after each wave (Step 9).
272
290
 
273
- ### ⛔ Worktree base must equal develop HEAD assert BEFORE every isolated wave
291
+ ### ⛔ HARD GATE — Worktree base MUST equal develop HEAD (blocking, not advisory)
274
292
  The worktree-isolation harness has shipped worktrees pinned to a STALE base
275
- commit (lessons 2026-06-10-build-worktree-stale-base, 2026-06-11-build-worktree-stale-base:
276
- agents branched 464 commits / 4 days behind develop HEAD, on a tree where the
277
- target app did not yet exist — their diffs would have silently reverted merged
278
- work or operated on a deleted structure). **Before dispatching ANY
279
- `isolation:"worktree"` wave**, assert each worktree's base equals current
280
- develop HEAD:
293
+ commit (lessons 2026-06-10-build-worktree-stale-base, 2026-06-11-build-worktree-stale-base,
294
+ 2026-06-15-build-worktree-stale-base, 2026-06-16-build-worktree-stale-base,
295
+ 2026-06-17-build-worktree-stale-base, 2026-06-23-build-worktree-stale-base:
296
+ agents branched hundreds of commits / multiple days behind develop HEAD, on a
297
+ tree where the target app did not yet exist — their diffs would have silently
298
+ reverted merged work or operated on a deleted structure). This is a recurring
299
+ harness defect, so the check is a **HARD BLOCKING GATE, not a suggestion.**
300
+
301
+ **Before dispatching ANY `isolation:"worktree"` wave**, the supervisor MUST run
302
+ the base==HEAD assertion and MUST abort isolation on any mismatch — there is no
303
+ "proceed anyway" path:
281
304
  ```bash
282
305
  DEV_HEAD=$(git rev-parse develop)
283
306
  # After worktrees are created, for each agent worktree:
284
307
  git worktree list # compare each agent worktree's SHA to $DEV_HEAD
285
- # If a worktree base != $DEV_HEAD (it is behind), the wave is UNSAFE.
308
+ # If ANY worktree base != $DEV_HEAD (it is behind), the wave is UNSAFE — ABORT.
286
309
  ```
287
- - If any worktree base is behind `$DEV_HEAD`: **ABORT isolation for this wave.**
288
- Do NOT merge stale worktree output. Pivot to **sequential, non-isolated
289
- dispatch on a real `develop` checkout** (one disjoint WP at a time to avoid
290
- `.git/index` races; the supervisor pushes) the same reason the validator
291
- runs non-isolated (it must see merged develop).
310
+ - **MANDATORY ABORT:** if ANY worktree base != `$DEV_HEAD`, you MUST abort
311
+ isolation for this wave. Do NOT merge stale worktree output. Do NOT "fast-forward
312
+ and continue". Do NOT proceed with the isolated wave under any circumstance.
313
+ Pivot to **sequential, non-isolated dispatch on a real `develop` checkout**
314
+ (one disjoint WP at a time to avoid `.git/index` races; the supervisor pushes)
315
+ the same reason the validator runs non-isolated (it must see merged develop).
316
+ - This gate is blocking by design: an isolated wave dispatched on a stale base
317
+ is treated as a build failure, not a warning. Skipping or downgrading this
318
+ assertion to advisory is a contract violation.
292
319
  - Also at every merge: `git show <branch>:<key-file> | grep -c <symbol-a-prior-wave-introduced>`
293
320
  — a 0 where there should be ≥1 means the branch is stale or deleted a shared
294
321
  export; resolve to `--ours` and re-apply that wave's real delta on current HEAD.
@@ -509,7 +536,7 @@ NEVER run pnpm build or pnpm turbo. Use npx vitest run only.
509
536
  - Push after each wave, not just at the end
510
537
  - Unattended: NEVER pause — continue automatically
511
538
  - Unattended: max 2 retries per task before escalating to advisor
512
- - Every Agent() dispatch: `model: <routed>` + `max_turns: 70` + `isolation: "worktree"` — non-negotiable. Model is chosen per task per the routing table in Step 7: Sonnet 4.6 for updates/edits, Opus 4.6 for harder coding, Opus 4.8 for design/innovative thought (CS 2.0, brand/UX, architecture). Supervisor logs `model=<chosen> reason=<phrase>` per agent. Exception: validator agent in Step 10 omits isolation; validator model stays `claude-sonnet-4-6` (verification, not generation).
539
+ - Every Agent() dispatch: `model: <routed>` + `max_turns: 70` non-negotiable. `isolation` is per the dispatch-mode rule in Step 7: NON-isolated (omit `isolation`) for doc-only and single-committer waves; `isolation: "worktree"` ONLY for true parallel MULTI-committer waves, and only after the HARD GATE (worktree base == develop HEAD) passes a stale-base isolated wave is a build failure. Model is chosen per task per the routing table in Step 7: Sonnet 4.6 for updates/edits, Opus 4.6 for harder coding, Opus 4.8 for design/innovative thought (CS 2.0, brand/UX, architecture). Supervisor logs `model=<chosen> reason=<phrase>` per agent. Exception: validator agent in Step 10 always omits isolation; validator model stays `claude-sonnet-4-6` (verification, not generation).
513
540
  - Finding an existing file is NOT task completion — verify it satisfies the spec
514
541
 
515
542
  ## Capture lessons (exit step)