@lifeaitools/rdc-skills 0.9.11 → 0.9.13

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/rdc-skills",
3
- "version": "0.9.11",
3
+ "version": "0.9.13",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code \u00e2\u20ac\u201d plan, build, review, overnight builds",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -76,7 +76,23 @@ Read the task title and description, then:
76
76
  SELECT get_work_items_by_epic('<epic-id>', 'todo');
77
77
  ```
78
78
 
79
- **Pre-flight gaterun before any agent dispatch:**
79
+ **Session lockclaim the epic immediately (before any agent dispatch):**
80
+
81
+ After loading the epic, check its status:
82
+ - If `status = 'in_progress'` → **ABORT** with:
83
+ ```
84
+ SKIP: epic <id> is already in_progress — claimed by another session. Pick a different epic.
85
+ ```
86
+ Do NOT proceed. Do NOT dispatch any agents.
87
+ - If `status = 'todo'` or `status = 'blocked'` → immediately claim it:
88
+ ```sql
89
+ SELECT update_work_item_status('<epic-id>'::uuid, 'in_progress',
90
+ '["Claimed by build session — dispatching agents"]'::jsonb
91
+ );
92
+ ```
93
+ This is an atomic Supabase write. A concurrent session that loads the same epic after this point will see `in_progress` and abort. **Do this before any classification, planning, or agent dispatch.**
94
+
95
+ **Pre-flight gate — run after claiming:**
80
96
 
81
97
  | Condition | Action |
82
98
  |-----------|--------|
@@ -77,6 +77,25 @@ Log the epic queue at the start of `.rdc/reports/overnight-<YYYY-MM-DD>.md` (fal
77
77
 
78
78
  ## Phase 3 — Epic Loop
79
79
 
80
+ ### ⛔ ONE EPIC PER SESSION — NON-NEGOTIABLE
81
+
82
+ Each epic runs in its own isolated overnight agent. **Never handle two epics inline in the same supervisor session.**
83
+
84
+ If the queue contains multiple epics:
85
+ 1. Work the **first (highest-priority) epic only** in this session
86
+ 2. After it completes, dispatch a **new background `rdc:overnight` agent** for the remaining queue:
87
+ ```
88
+ Agent({
89
+ prompt: "rdc:overnight --unattended",
90
+ run_in_background: true
91
+ })
92
+ ```
93
+ 3. Then exit this session
94
+
95
+ **Why this matters:** Handling multiple epics inline causes context bleed — the second epic's agents inherit the first epic's plan, files, and decisions. Each epic must start cold. A new overnight agent gets a fresh context with no knowledge of prior epics.
96
+
97
+ **The stop hook will not fire** after dispatching the next overnight agent, because the current session has done its job and can exit cleanly.
98
+
80
99
  For each epic in the queue, run this sequence:
81
100
 
82
101
  ### 3a. Research (if needed)