@lifeaitools/rdc-skills 0.8.8 → 0.9.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.
- package/guides/agent-bootstrap.md +41 -0
- package/package.json +2 -2
- package/rules/work-items-rpc.md +74 -2
- package/skills/fixit/SKILL.md +6 -0
- package/skills/plan/SKILL.md +3 -2
- package/skills/release/SKILL.md +95 -1
|
@@ -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.
|
|
3
|
+
"version": "0.9.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",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"type": "plugin",
|
|
20
20
|
"skills": "skills/",
|
|
21
21
|
"guides": "guides/",
|
|
22
|
-
"version": "0.
|
|
22
|
+
"version": "0.9.0",
|
|
23
23
|
"commands": "commands/"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|
package/rules/work-items-rpc.md
CHANGED
|
@@ -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.
|
|
186
|
+
### 4. update_checklist_item — Tick 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
|
-
###
|
|
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
|
|
package/skills/fixit/SKILL.md
CHANGED
|
@@ -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
|
);
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -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
|
-
-
|
|
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:**
|
package/skills/release/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rdc:release
|
|
3
3
|
description: >-
|
|
4
|
-
Atomic release for ANY LIFEAI repo. Usage `rdc:release <repo> [version]` — one skill, all repos. Known repos: clauth, rdc-skills, regen-root, regen-media, gws. Handles npm publish, monorepo develop→main promotion, and MCP server restarts. No user handoff.
|
|
4
|
+
Atomic release for ANY LIFEAI repo. Usage `rdc:release <repo> [version]` — one skill, all repos. Known repos: clauth, rdc-skills, regen-root, regen-media, gws. Also promotes individual deployed apps from staging to production: `rdc:release promote <slug>`. Handles npm publish, monorepo develop→main promotion, per-app Coolify gate checks, and MCP server restarts. No user handoff.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
> **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
|
|
@@ -25,6 +25,9 @@ Dave has Bash access. He should never be asked to run commands. This skill runs
|
|
|
25
25
|
- A package, plugin, or app needs to be versioned and pushed to its distribution channel
|
|
26
26
|
- After landing significant changes that must be published (clauth, rdc-skills, regen-media, gws)
|
|
27
27
|
- After develop is verified and staging passes — promoting to main
|
|
28
|
+
- User says "promote studio", "release studio to production", "ship the app" — use `promote <slug>` mode
|
|
29
|
+
|
|
30
|
+
**Never release autonomously.** This skill ONLY runs when the user explicitly invokes it. Never push to main on your own initiative.
|
|
28
31
|
|
|
29
32
|
## Arguments
|
|
30
33
|
|
|
@@ -32,6 +35,8 @@ Dave has Bash access. He should never be asked to run commands. This skill runs
|
|
|
32
35
|
- `rdc:release <repo> <version>` — explicit version (e.g. `1.6.0`)
|
|
33
36
|
- `rdc:release <repo> --minor` | `--major` | `--patch` — semver bump
|
|
34
37
|
- `rdc:release <repo> --dry-run` — show checklist and planned version, do nothing
|
|
38
|
+
- `rdc:release promote <slug>` — promote a specific deployed app from staging → production
|
|
39
|
+
- `rdc:release promote <slug> --dry-run` — show what would happen, do nothing
|
|
35
40
|
- `rdc:release` (no args) — list known repos, ask which
|
|
36
41
|
|
|
37
42
|
## Known Repos — The Single Lookup Table
|
|
@@ -74,6 +79,30 @@ rdc:release: <repo> vX.Y.Z → vA.B.C
|
|
|
74
79
|
✅ rdc:release <repo>: vA.B.C live
|
|
75
80
|
```
|
|
76
81
|
|
|
82
|
+
### App promote checklist (promote <slug>)
|
|
83
|
+
|
|
84
|
+
This mode promotes a single deployed app. It does NOT push `git push origin main` directly — it uses the GitHub PR merge API, which bypasses the `block-main-push` hook by design. The hook blocks autonomous pushes; explicit promotion via this skill is authorized by the user invoking it.
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
rdc:release promote: <slug> → <domain>
|
|
88
|
+
[ ] Registry lookup (slug, coolify_uuid, domain, staging_slug, staging_domain, app_version)
|
|
89
|
+
[ ] Staging health gate (HTTP 200 on staging_domain)
|
|
90
|
+
[ ] Staging TLS valid
|
|
91
|
+
[ ] develop branch clean and pushed
|
|
92
|
+
[ ] Commits ahead of main: <N> commits
|
|
93
|
+
[ ] Dry-run gate (if --dry-run, stop here and print planned commands)
|
|
94
|
+
[ ] app package.json version bumped on develop
|
|
95
|
+
[ ] Version bump committed + pushed to develop
|
|
96
|
+
[ ] GitHub PR develop→main: created or located
|
|
97
|
+
[ ] PR merged via GitHub API (merge method: merge)
|
|
98
|
+
[ ] Coolify auto-deploy confirmed started (polling <slug> deployments)
|
|
99
|
+
[ ] Deployment reached "finished" state
|
|
100
|
+
[ ] Gate: HTTP 200 on <domain>
|
|
101
|
+
[ ] Gate: TLS valid on <domain>
|
|
102
|
+
[ ] deployment_registry updated (last_deploy_at, status='active')
|
|
103
|
+
✅ rdc:release promote <slug>: <domain> live
|
|
104
|
+
```
|
|
105
|
+
|
|
77
106
|
### Monorepo release checklist (regen-root)
|
|
78
107
|
|
|
79
108
|
```
|
|
@@ -147,6 +176,71 @@ npm view @lifeaitools/clauth version
|
|
|
147
176
|
|
|
148
177
|
---
|
|
149
178
|
|
|
179
|
+
### App promote (promote <slug>)
|
|
180
|
+
|
|
181
|
+
#### 1. Registry lookup
|
|
182
|
+
```sql
|
|
183
|
+
SELECT slug, display_name, domain, staging_slug, staging_domain, coolify_uuid, monorepo_path, environment
|
|
184
|
+
FROM deployment_registry
|
|
185
|
+
WHERE slug = '<slug>';
|
|
186
|
+
```
|
|
187
|
+
If no `staging_slug` or `staging_domain`, ask Dave before proceeding — don't assume.
|
|
188
|
+
|
|
189
|
+
#### 2. Staging health gate
|
|
190
|
+
```bash
|
|
191
|
+
curl -s -o /dev/null -w "%{http_code}" https://<staging_domain>/
|
|
192
|
+
# Must return 200. TLS must be valid (no -k flag).
|
|
193
|
+
```
|
|
194
|
+
If staging is not healthy, STOP with `[!]` — don't promote a broken staging.
|
|
195
|
+
|
|
196
|
+
#### 3. Git state check
|
|
197
|
+
```bash
|
|
198
|
+
cd C:/Dev/regen-root
|
|
199
|
+
git status # must be clean on develop
|
|
200
|
+
git push origin develop
|
|
201
|
+
git log origin/main..develop --oneline # show what's going to main
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
#### 4. Version bump
|
|
205
|
+
- Read `apps/<app>/package.json` (use `monorepo_path` from registry), parse `version`
|
|
206
|
+
- Apply patch bump (default) or use explicit version if provided
|
|
207
|
+
- Commit: `chore(release): <slug> vA.B.C`
|
|
208
|
+
- Push to develop
|
|
209
|
+
|
|
210
|
+
#### 5. GitHub PR merge
|
|
211
|
+
```
|
|
212
|
+
# Check for existing open PR develop→main
|
|
213
|
+
mcp__claude_ai_Github_Proxy_MCP__list_pull_requests (base: main, head: develop)
|
|
214
|
+
|
|
215
|
+
# If none: create one
|
|
216
|
+
mcp__claude_ai_Github_Proxy_MCP__create_pull_request (base: main, head: develop, title: "chore(release): <slug> vA.B.C")
|
|
217
|
+
|
|
218
|
+
# Merge it
|
|
219
|
+
mcp__claude_ai_Github_Proxy_MCP__merge_pull_request (merge_method: merge)
|
|
220
|
+
```
|
|
221
|
+
**Note:** This uses the GitHub API — it does NOT run `git push origin main`. The `block-main-push` hook only blocks direct git push, not API merges.
|
|
222
|
+
|
|
223
|
+
#### 6. Coolify deploy poll
|
|
224
|
+
```bash
|
|
225
|
+
# Use clauth to get Coolify token, then poll the app's deployments
|
|
226
|
+
# Wait for status = "finished" — poll every 15s, 15min timeout
|
|
227
|
+
curl -s -H "Authorization: Bearer $COOLIFY_TOKEN" \
|
|
228
|
+
"https://deploy.regendevcorp.com/api/v1/applications/<coolify_uuid>/deployments?per_page=1"
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
#### 7. Gate checks
|
|
232
|
+
```bash
|
|
233
|
+
curl -s -o /dev/null -w "%{http_code}" https://<domain>/ # must return 200
|
|
234
|
+
curl -s -I https://<domain>/ | grep -i "strict-transport" # TLS
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
#### 8. Update registry
|
|
238
|
+
```sql
|
|
239
|
+
UPDATE deployment_registry SET last_deploy_at = now(), status = 'active' WHERE slug = '<slug>';
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
150
244
|
### Monorepo release (regen-root)
|
|
151
245
|
|
|
152
246
|
#### 1. Git state check
|