@lifeaitools/rdc-skills 0.8.7 → 0.8.9

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.
@@ -183,6 +183,47 @@ If you discover that fixing your assigned task would also require changing files
183
183
 
184
184
  ---
185
185
 
186
+ ## ⛔ Implementation Report Contract
187
+
188
+ Every agent MUST follow this protocol before closing any work item as `done`.
189
+
190
+ ### Step 1 — Tick checklist items as you complete them
191
+
192
+ ```sql
193
+ SELECT update_checklist_item('<work-item-id>'::uuid, 'item-id', true);
194
+ ```
195
+
196
+ Call this for each item AS you complete it — not all at once at the end.
197
+
198
+ ### Step 2 — Submit implementation report BEFORE marking done
199
+
200
+ ```sql
201
+ SELECT submit_implementation_report(
202
+ '<work-item-id>'::uuid,
203
+ '{"tldr":"...","assumptions":[],"deviations":[],"uncertainty":[],"detail":"...","flags":[]}'::jsonb
204
+ );
205
+ ```
206
+
207
+ Returns `{ flags_count, deviations_count, has_deviations }`. Include this signal in your `AGENT_COMPLETE` report.
208
+
209
+ ### Step 3 — Mark done
210
+
211
+ ```sql
212
+ SELECT update_work_item_status('<work-item-id>'::uuid, 'done');
213
+ ```
214
+
215
+ If any `required: true` checklist item is still unchecked, the DB raises EXCEPTION — fix it first.
216
+
217
+ ### Supervisor workflow
218
+
219
+ - All zeros → clean run, proceed
220
+ - `flags_count > 0` or `deviations_count > 0` → pull full report:
221
+ ```sql
222
+ SELECT implementation_report FROM work_items WHERE id = '<id>';
223
+ ```
224
+
225
+ ---
226
+
186
227
  ## Now read your role-specific guide
187
228
 
188
229
  Path: `{PROJECT_ROOT}/.rdc/guides/<type>.md` (e.g., `frontend.md`, `backend.md`, `data.md`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/rdc-skills",
3
- "version": "0.8.7",
3
+ "version": "0.8.9",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code — plan, build, review, overnight builds",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -19,7 +19,7 @@
19
19
  "type": "plugin",
20
20
  "skills": "skills/",
21
21
  "guides": "guides/",
22
- "version": "0.8.7",
22
+ "version": "0.8.9",
23
23
  "commands": "commands/"
24
24
  },
25
25
  "scripts": {
@@ -122,6 +122,8 @@ const { data } = await supabase.rpc('insert_work_item', {
122
122
  | `p_session_id` | text | NULL | Session UUID (for audit trail) |
123
123
  | `p_package` | text | NULL | Package/module name (e.g., '@regen/ui') |
124
124
  | `p_source` | text | `'manual'` | How was this created: `manual`, `agent`, `api`, `import` |
125
+ | `p_checklist` | jsonb | `NULL` | Checklist items. If NULL and parent has `definition_of_done`, auto-inherited with all `checked: false` |
126
+ | `p_definition_of_done` | jsonb | `NULL` | DoD template (epics only). Child tasks inherit this as their checklist at insert time |
125
127
 
126
128
  **Returns:**
127
129
  - Full inserted work_item row as JSONB
@@ -171,6 +173,7 @@ const { data } = await supabase.rpc('update_work_item_status', {
171
173
 
172
174
  **Behavior:**
173
175
  - Setting `done` auto-sets `completed_at = now()`
176
+ - Setting `done` raises EXCEPTION if any `required: true` checklist item has `checked: false` — DoD gate
174
177
  - Setting `todo`, `in_progress`, `blocked`, or `review` clears `completed_at`
175
178
  - `updated_at` always refreshed to current timestamp
176
179
  - Raises exception if ID not found
@@ -180,7 +183,76 @@ const { data } = await supabase.rpc('update_work_item_status', {
180
183
 
181
184
  ---
182
185
 
183
- ### 4. get_work_items_by_epicFetch epic + children
186
+ ### 4. update_checklist_itemTick off a checklist item
187
+
188
+ **Supabase SQL:**
189
+ ```sql
190
+ SELECT update_checklist_item(
191
+ 'work-item-uuid'::uuid,
192
+ 'tsc-clean', -- string id of the checklist item
193
+ true -- checked state
194
+ );
195
+ ```
196
+
197
+ **Parameters:**
198
+
199
+ | Name | Type | Required | Notes |
200
+ |------|------|----------|-------|
201
+ | `p_work_item_id` | uuid | yes | the work item ID |
202
+ | `p_item_id` | text | yes | the `id` field of the checklist item |
203
+ | `p_checked` | boolean | yes | `true` = checked, `false` = unchecked |
204
+
205
+ Call this as each checklist item is completed — not all at once at the end.
206
+
207
+ **Returns:** updated checklist JSONB array.
208
+
209
+ ---
210
+
211
+ ### 5. submit_implementation_report — File agent completion narrative
212
+
213
+ MUST be called BEFORE `update_work_item_status('done')`.
214
+
215
+ **Supabase SQL:**
216
+ ```sql
217
+ SELECT submit_implementation_report(
218
+ 'work-item-uuid'::uuid,
219
+ '{
220
+ "tldr": "One-sentence summary",
221
+ "assumptions": [],
222
+ "deviations": [],
223
+ "uncertainty": [],
224
+ "detail": "Full narrative",
225
+ "flags": []
226
+ }'::jsonb
227
+ );
228
+ ```
229
+
230
+ **Parameters:**
231
+
232
+ | Name | Type | Required | Notes |
233
+ |------|------|----------|-------|
234
+ | `p_work_item_id` | uuid | yes | the work item ID |
235
+ | `p_report` | jsonb | yes | implementation report (shape below) |
236
+
237
+ **Returns:** `{ "flags_count": N, "deviations_count": N, "has_deviations": bool }` — signal only.
238
+
239
+ **`implementation_report` shape:**
240
+ ```json
241
+ {
242
+ "tldr": "string",
243
+ "assumptions": ["string", "..."],
244
+ "deviations": ["string — deviation from plan", "..."],
245
+ "uncertainty": ["string — anything unclear", "..."],
246
+ "detail": "string — full narrative",
247
+ "flags": ["string — supervisor attention needed", "..."]
248
+ }
249
+ ```
250
+
251
+ If `has_deviations` is true or `flags_count > 0`, supervisor pulls full report from DB.
252
+
253
+ ---
254
+
255
+ ### 6. get_work_items_by_epic — Fetch epic + children
184
256
 
185
257
  Get an epic and all its child tasks/subtasks, sorted by priority.
186
258
 
@@ -216,7 +288,7 @@ const { data } = await supabase.rpc('get_work_items_by_epic', {
216
288
 
217
289
  ---
218
290
 
219
- ### 5. bump_epic_version — Version with history
291
+ ### 7. bump_epic_version — Version with history
220
292
 
221
293
  Snapshot an epic's current state and assign a version number.
222
294
 
@@ -89,7 +89,13 @@ fi
89
89
 
90
90
  ### 6. Close and clean up
91
91
 
92
+ Submit implementation report first, then mark done:
93
+
92
94
  ```sql
95
+ SELECT submit_implementation_report('<id>'::uuid,
96
+ '{"tldr":"<one sentence>","assumptions":[],"deviations":[],"uncertainty":[],"detail":"<what was fixed>","flags":[]}'::jsonb
97
+ );
98
+
93
99
  SELECT update_work_item_status('<id>'::uuid, 'done',
94
100
  '["Fixed via rdc:fixit"]'::jsonb
95
101
  );
@@ -4,21 +4,11 @@ description: >-
4
4
  Usage `rdc:help` or `rdc` — selection menu of all rdc:* skills with their full argument syntax. Use when unsure which command to invoke or what args it takes.
5
5
  ---
6
6
 
7
- > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
8
- > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
9
- > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
10
-
11
7
  # rdc:help — Command Reference
12
- > **rdc-skills v0.8.0** — installed at `~/.claude/skills/user/rdc-*.md`
13
- > To check installed version: `head -3 ~/.claude/skills/user/rdc-help.md`
14
- > Source: `C:/Dev/rdc-skills` · package.json version field is authoritative
15
-
16
- ## When to Use
17
- - Project lead asks "what commands do I have", "what's available", "which skill should I use"
18
- - You are unsure which `rdc:*` skill to invoke for a given task
19
- - First session on a project — orient yourself to available commands
20
8
 
21
- Print the full usage menu below verbatim, then ask the project lead which command to run.
9
+ > **⚠️ HARD OUTPUT RULE:** Your ENTIRE response MUST be the block below, copied verbatim.
10
+ > No preamble. No follow-up question. No summary. No "what would you like to do?".
11
+ > Do NOT add any text before or after the block. Emit it exactly as written. This is non-negotiable.
22
12
 
23
13
  ## Arguments
24
14
 
@@ -66,8 +66,9 @@ description: >-
66
66
  ```
67
67
 
68
68
  6. **Create Supabase epic + child tasks:**
69
- - Epic via `insert_work_item(p_item_type := 'epic', ...)`
70
- - One task per work package via `insert_work_item(p_parent_id := <epic_id>, ...)`
69
+ - Epic via `insert_work_item(p_item_type := 'epic', p_definition_of_done := '[{"id":"...", "text":"...", "required":true, "checked":false}]'::jsonb, ...)`
70
+ - Set `p_definition_of_done` on the epic child tasks inserted under it will auto-inherit it as their checklist
71
+ - One task per work package via `insert_work_item(p_parent_id := <epic_id>, ...)` — checklist auto-hydrated from epic's DoD
71
72
  - Set priorities: urgent/high/normal based on sequencing
72
73
 
73
74
  7. **Report results:**