@lifeaitools/rdc-skills 0.21.1 → 0.22.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.
Files changed (49) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.github/workflows/self-test.yml +34 -34
  3. package/commands/build.md +181 -181
  4. package/commands/collab.md +180 -180
  5. package/commands/deploy.md +148 -148
  6. package/commands/fixit.md +105 -105
  7. package/commands/handoff.md +173 -173
  8. package/commands/overnight.md +218 -218
  9. package/commands/plan.md +158 -158
  10. package/commands/preplan.md +131 -131
  11. package/commands/prototype.md +145 -145
  12. package/commands/report.md +99 -99
  13. package/commands/review.md +120 -120
  14. package/commands/status.md +86 -86
  15. package/commands/workitems.md +127 -127
  16. package/git-sha.json +1 -1
  17. package/guides/agent-bootstrap.md +195 -195
  18. package/guides/agents/backend.md +102 -102
  19. package/guides/agents/content.md +94 -94
  20. package/guides/agents/cs2.md +56 -56
  21. package/guides/agents/data.md +86 -86
  22. package/guides/agents/design.md +77 -77
  23. package/guides/agents/frontend.md +91 -91
  24. package/guides/agents/infrastructure.md +81 -81
  25. package/guides/agents/setup.md +272 -272
  26. package/guides/agents/verify.md +119 -119
  27. package/guides/agents/viz.md +106 -106
  28. package/package.json +1 -1
  29. package/scripts/self-test.mjs +1458 -1458
  30. package/skills/build/SKILL.md +478 -478
  31. package/skills/collab/SKILL.md +239 -239
  32. package/skills/deploy/SKILL.md +522 -522
  33. package/skills/design/SKILL.md +205 -205
  34. package/skills/fixit/SKILL.md +165 -165
  35. package/skills/handoff/SKILL.md +200 -200
  36. package/skills/housekeeping/SKILL.md +14 -1
  37. package/skills/overnight/SKILL.md +230 -230
  38. package/skills/plan/SKILL.md +274 -274
  39. package/skills/preplan/SKILL.md +90 -90
  40. package/skills/prototype/SKILL.md +150 -150
  41. package/skills/release/SKILL.md +140 -140
  42. package/skills/report/SKILL.md +100 -100
  43. package/skills/review/SKILL.md +152 -152
  44. package/skills/rpms-filemap/SKILL.cloud.md +107 -0
  45. package/skills/rpms-filemap/SKILL.md +107 -0
  46. package/skills/self-test/SKILL.md +123 -123
  47. package/skills/status/SKILL.md +99 -99
  48. package/skills/watch/SKILL.md +90 -90
  49. package/skills/workitems/SKILL.md +151 -151
@@ -1,200 +1,200 @@
1
- ---
2
- name: rdc:handoff
3
- description: "Usage `rdc:handoff [--from-prototype <id>]` — Convert a finalized plan or prototype into CLI-ready artifacts: writes .rdc/plans/, creates Supabase work items with DoD checklists, registers prototype if present. Bridge between planning session and rdc:build."
4
- ---
5
-
6
- > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
7
- > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
8
- > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
9
-
10
- > If dispatching subagents or running as a subagent: read `{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md` first (fallback: `{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md`).
11
-
12
- > **Sandbox contract:** This skill honors `RDC_TEST=1` per `guides/agent-bootstrap.md` § RDC_TEST Sandbox Contract. Destructive external calls short-circuit under the flag. Supabase work item writes, prototype registry inserts, design context inserts, and git push are skipped under `RDC_TEST=1`.
13
-
14
-
15
- # rdc:handoff — Planning → CLI Bridge
16
-
17
- ## When to Use
18
-
19
- - A prototype has been built and needs production implementation
20
- - A design decision has been made and needs to be executed
21
- - Project lead says "hand this off", "give this to the CLI", "write it up"
22
- - A plan exists in the conversation but hasn't been saved to disk or database yet
23
-
24
- ## What This Skill Produces
25
-
26
- 1. **Plan doc** → `.rdc/plans/<topic-slug>.md` (fallback: `.rdc/plans/<topic-slug>.md`)
27
- 2. **Database epic + child tasks** (with agent types and guide file refs)
28
- 3. **Prototype registry entry** (if a prototype was built)
29
- 4. **Design context entries** (for decisions made in the session)
30
-
31
- ## Procedure
32
-
33
- ### Step 1 — Extract the Plan
34
-
35
- Identify from the conversation:
36
- - What is the goal?
37
- - What prototypes or designs were built? Where are they?
38
- - What decisions were made? What was rejected and why?
39
- - What is the sequencing (what depends on what)?
40
- - Which agent types are needed?
41
-
42
- ### Step 2 — Write the Plan Doc
43
-
44
- ```
45
- .rdc/plans/<topic-slug>.md
46
- ```
47
- (fallback: `.rdc/plans/<topic-slug>.md` if `.rdc/` does not exist)
48
-
49
- Template:
50
- ```markdown
51
- # Plan: <Topic>
52
- > Route: <app route or package>
53
- > Status: Ready for CLI build
54
- > Created: <date>
55
- > Source: planning session
56
-
57
- ---
58
-
59
- ## What Already Exists (Do NOT Re-implement)
60
-
61
- [List any existing components, database tables, or files
62
- that agents must use rather than recreate]
63
-
64
- ## What Was Built in Planning (Prototype)
65
-
66
- [Describe the prototype — file location, key design decisions,
67
- what to preserve vs what to adapt]
68
-
69
- ## Work Packages
70
-
71
- ### Package 1 — <Name>
72
- - Agent type: frontend | backend | data | design | infra | content | cs2 | viz
73
- - Guide: .rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md)
74
- - Files to create/modify: [list]
75
- - Deliverables: [specific outputs]
76
- - Depends on: [other packages if sequential]
77
-
78
- ### Package 2 — <Name>
79
- [...]
80
-
81
- ## Sequencing
82
-
83
- Wave 1 (parallel): Package 1, Package 2
84
- Wave 2 (after Wave 1): Package 3
85
-
86
- ## Checklist Decomposition Matrix
87
-
88
- | Work item | Atomic deliverable | Surface type | Route or file path | Preconditions / fixture data | Action | Expected result | Verification artifact | Owner package | Status |
89
- |-----------|-------------------|--------------|--------------------|------------------------------|--------|-----------------|-----------------------|---------------|--------|
90
- | WP-1 | decomp-<surface>-<slug> | screen | /route | seeded fixture | open / click / submit | observable result | Playwright screenshot / route probe / test name | Package 1 | todo |
91
-
92
- Rules:
93
- - One observable behavior per row.
94
- - Each row must be independently pass/fail.
95
- - Each implementation work item must have matching `decomp-*` checklist rows and `test-*` verification rows.
96
- - UI routes list state rows separately: empty, loading, loaded, error, create/edit/detail/mobile where applicable.
97
- - API and DB rows include success, failure/guard, and side-effect proof where applicable.
98
-
99
- ## Checklist Quality Gate
100
-
101
- verdict: PASS | FAIL
102
- failures:
103
- - <missing/coarse row if any>
104
- deferred:
105
- - <explicitly out-of-scope row if any>
106
-
107
- ## Definition of Done
108
-
109
- - [ ] [specific acceptance criterion]
110
- - [ ] [build verification: zero new TS errors]
111
- - [ ] [functional test]
112
- ```
113
-
114
- ### Step 3 — Create Database Epic + Tasks
115
-
116
- ```sql
117
- -- Check for existing epics first
118
- SELECT get_open_epics();
119
-
120
- -- Create epic
121
- SELECT insert_work_item(
122
- p_title := 'EPIC: <Topic>',
123
- p_description := 'See .rdc/plans/<topic-slug>.md for full spec.',
124
- p_item_type := 'epic',
125
- p_priority := 'high',
126
- p_labels := ARRAY['<system-label>'],
127
- p_source := 'planning'
128
- );
129
-
130
- -- Create tasks (one per work package)
131
- SELECT insert_work_item(
132
- p_title := '<Package Name>',
133
- p_description := 'What: <deliverable>
134
- Where: <files>
135
- Agent type: <type>
136
- Guide: .rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md)
137
- Design doc: .rdc/plans/<topic-slug>.md (fallback: .rdc/plans/<topic-slug>.md)
138
- Checklist: include required rows from the plan matrix:
139
- - decomp-<surface>-<slug>: route/file=<path> | action=<action> | expect=<result> | evidence=<artifact>
140
- - test-<type>-<slug>: <verification command or artifact>
141
- Depends on: <other task if applicable>
142
- Est: <hours>',
143
- p_parent_id := '<epic-uuid>'::uuid,
144
- p_item_type := 'task',
145
- p_priority := 'high',
146
- p_labels := ARRAY['<label>'],
147
- p_estimated_hours := 2,
148
- p_source := 'planning'
149
- );
150
- ```
151
-
152
- Do not create build-ready tasks unless the plan has `## Checklist Decomposition Matrix` and `## Checklist Quality Gate` with `verdict: PASS`. If the matrix fails, save the plan as `Status: Needs checklist repair` and return the failure list instead of creating dispatchable implementation tasks.
153
-
154
- ### Step 4 — Register Prototype (if one was built)
155
-
156
- ```sql
157
- INSERT INTO prototype_registry (name, component, source_path, notes, created_by)
158
- VALUES (
159
- '<Component Name> v1',
160
- '<ComponentName>',
161
- 'docs/source/<filename>.jsx',
162
- '<Key design decisions, data shapes, what to preserve>',
163
- 'planning'
164
- )
165
- ON CONFLICT DO NOTHING;
166
- ```
167
-
168
- ### Step 5 — Record Design Decisions
169
-
170
- ```sql
171
- INSERT INTO design_context (topic, context_type, summary, source, created_by)
172
- VALUES
173
- ('<Topic>', 'decision', '<What was decided and why>', 'planning session', 'planning'),
174
- ('<Topic>', 'rejected', '<What was considered but not chosen, and why>', 'planning session', 'planning');
175
- ```
176
-
177
- ## System Labels Reference
178
-
179
- | Label | When |
180
- |-------|------|
181
- | `project-a` | Your-app-specific label |
182
- | `marketing` | Marketing / outreach work |
183
- | `ui` | Component library work |
184
- | `data` | Schema, migrations |
185
- | `infrastructure` | CI/CD, deployment |
186
- | `cs2` | Core paradigm packages |
187
- | `website` | Public-facing sites |
188
- | `media` | Media/asset work |
189
-
190
- ## Output
191
-
192
- When complete, tell the project lead:
193
- ```
194
- Handoff complete:
195
- - Plan: .rdc/plans/<topic-slug>.md
196
- - Epic: <epic-id> ("<title>")
197
- - Tasks: <N> tasks created, wave structure: [Wave 1: X, Y | Wave 2: Z]
198
- - Prototype: registered at docs/source/<file> (if applicable)
199
- - CLI agents will pick this up on next run.
200
- ```
1
+ ---
2
+ name: rdc:handoff
3
+ description: "Usage `rdc:handoff [--from-prototype <id>]` — Convert a finalized plan or prototype into CLI-ready artifacts: writes .rdc/plans/, creates Supabase work items with DoD checklists, registers prototype if present. Bridge between planning session and rdc:build."
4
+ ---
5
+
6
+ > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
7
+ > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
8
+ > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
9
+
10
+ > If dispatching subagents or running as a subagent: read `{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md` first (fallback: `{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md`).
11
+
12
+ > **Sandbox contract:** This skill honors `RDC_TEST=1` per `guides/agent-bootstrap.md` § RDC_TEST Sandbox Contract. Destructive external calls short-circuit under the flag. Supabase work item writes, prototype registry inserts, design context inserts, and git push are skipped under `RDC_TEST=1`.
13
+
14
+
15
+ # rdc:handoff — Planning → CLI Bridge
16
+
17
+ ## When to Use
18
+
19
+ - A prototype has been built and needs production implementation
20
+ - A design decision has been made and needs to be executed
21
+ - Project lead says "hand this off", "give this to the CLI", "write it up"
22
+ - A plan exists in the conversation but hasn't been saved to disk or database yet
23
+
24
+ ## What This Skill Produces
25
+
26
+ 1. **Plan doc** → `.rdc/plans/<topic-slug>.md` (fallback: `.rdc/plans/<topic-slug>.md`)
27
+ 2. **Database epic + child tasks** (with agent types and guide file refs)
28
+ 3. **Prototype registry entry** (if a prototype was built)
29
+ 4. **Design context entries** (for decisions made in the session)
30
+
31
+ ## Procedure
32
+
33
+ ### Step 1 — Extract the Plan
34
+
35
+ Identify from the conversation:
36
+ - What is the goal?
37
+ - What prototypes or designs were built? Where are they?
38
+ - What decisions were made? What was rejected and why?
39
+ - What is the sequencing (what depends on what)?
40
+ - Which agent types are needed?
41
+
42
+ ### Step 2 — Write the Plan Doc
43
+
44
+ ```
45
+ .rdc/plans/<topic-slug>.md
46
+ ```
47
+ (fallback: `.rdc/plans/<topic-slug>.md` if `.rdc/` does not exist)
48
+
49
+ Template:
50
+ ```markdown
51
+ # Plan: <Topic>
52
+ > Route: <app route or package>
53
+ > Status: Ready for CLI build
54
+ > Created: <date>
55
+ > Source: planning session
56
+
57
+ ---
58
+
59
+ ## What Already Exists (Do NOT Re-implement)
60
+
61
+ [List any existing components, database tables, or files
62
+ that agents must use rather than recreate]
63
+
64
+ ## What Was Built in Planning (Prototype)
65
+
66
+ [Describe the prototype — file location, key design decisions,
67
+ what to preserve vs what to adapt]
68
+
69
+ ## Work Packages
70
+
71
+ ### Package 1 — <Name>
72
+ - Agent type: frontend | backend | data | design | infra | content | cs2 | viz
73
+ - Guide: .rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md)
74
+ - Files to create/modify: [list]
75
+ - Deliverables: [specific outputs]
76
+ - Depends on: [other packages if sequential]
77
+
78
+ ### Package 2 — <Name>
79
+ [...]
80
+
81
+ ## Sequencing
82
+
83
+ Wave 1 (parallel): Package 1, Package 2
84
+ Wave 2 (after Wave 1): Package 3
85
+
86
+ ## Checklist Decomposition Matrix
87
+
88
+ | Work item | Atomic deliverable | Surface type | Route or file path | Preconditions / fixture data | Action | Expected result | Verification artifact | Owner package | Status |
89
+ |-----------|-------------------|--------------|--------------------|------------------------------|--------|-----------------|-----------------------|---------------|--------|
90
+ | WP-1 | decomp-<surface>-<slug> | screen | /route | seeded fixture | open / click / submit | observable result | Playwright screenshot / route probe / test name | Package 1 | todo |
91
+
92
+ Rules:
93
+ - One observable behavior per row.
94
+ - Each row must be independently pass/fail.
95
+ - Each implementation work item must have matching `decomp-*` checklist rows and `test-*` verification rows.
96
+ - UI routes list state rows separately: empty, loading, loaded, error, create/edit/detail/mobile where applicable.
97
+ - API and DB rows include success, failure/guard, and side-effect proof where applicable.
98
+
99
+ ## Checklist Quality Gate
100
+
101
+ verdict: PASS | FAIL
102
+ failures:
103
+ - <missing/coarse row if any>
104
+ deferred:
105
+ - <explicitly out-of-scope row if any>
106
+
107
+ ## Definition of Done
108
+
109
+ - [ ] [specific acceptance criterion]
110
+ - [ ] [build verification: zero new TS errors]
111
+ - [ ] [functional test]
112
+ ```
113
+
114
+ ### Step 3 — Create Database Epic + Tasks
115
+
116
+ ```sql
117
+ -- Check for existing epics first
118
+ SELECT get_open_epics();
119
+
120
+ -- Create epic
121
+ SELECT insert_work_item(
122
+ p_title := 'EPIC: <Topic>',
123
+ p_description := 'See .rdc/plans/<topic-slug>.md for full spec.',
124
+ p_item_type := 'epic',
125
+ p_priority := 'high',
126
+ p_labels := ARRAY['<system-label>'],
127
+ p_source := 'planning'
128
+ );
129
+
130
+ -- Create tasks (one per work package)
131
+ SELECT insert_work_item(
132
+ p_title := '<Package Name>',
133
+ p_description := 'What: <deliverable>
134
+ Where: <files>
135
+ Agent type: <type>
136
+ Guide: .rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md)
137
+ Design doc: .rdc/plans/<topic-slug>.md (fallback: .rdc/plans/<topic-slug>.md)
138
+ Checklist: include required rows from the plan matrix:
139
+ - decomp-<surface>-<slug>: route/file=<path> | action=<action> | expect=<result> | evidence=<artifact>
140
+ - test-<type>-<slug>: <verification command or artifact>
141
+ Depends on: <other task if applicable>
142
+ Est: <hours>',
143
+ p_parent_id := '<epic-uuid>'::uuid,
144
+ p_item_type := 'task',
145
+ p_priority := 'high',
146
+ p_labels := ARRAY['<label>'],
147
+ p_estimated_hours := 2,
148
+ p_source := 'planning'
149
+ );
150
+ ```
151
+
152
+ Do not create build-ready tasks unless the plan has `## Checklist Decomposition Matrix` and `## Checklist Quality Gate` with `verdict: PASS`. If the matrix fails, save the plan as `Status: Needs checklist repair` and return the failure list instead of creating dispatchable implementation tasks.
153
+
154
+ ### Step 4 — Register Prototype (if one was built)
155
+
156
+ ```sql
157
+ INSERT INTO prototype_registry (name, component, source_path, notes, created_by)
158
+ VALUES (
159
+ '<Component Name> v1',
160
+ '<ComponentName>',
161
+ 'docs/source/<filename>.jsx',
162
+ '<Key design decisions, data shapes, what to preserve>',
163
+ 'planning'
164
+ )
165
+ ON CONFLICT DO NOTHING;
166
+ ```
167
+
168
+ ### Step 5 — Record Design Decisions
169
+
170
+ ```sql
171
+ INSERT INTO design_context (topic, context_type, summary, source, created_by)
172
+ VALUES
173
+ ('<Topic>', 'decision', '<What was decided and why>', 'planning session', 'planning'),
174
+ ('<Topic>', 'rejected', '<What was considered but not chosen, and why>', 'planning session', 'planning');
175
+ ```
176
+
177
+ ## System Labels Reference
178
+
179
+ | Label | When |
180
+ |-------|------|
181
+ | `project-a` | Your-app-specific label |
182
+ | `marketing` | Marketing / outreach work |
183
+ | `ui` | Component library work |
184
+ | `data` | Schema, migrations |
185
+ | `infrastructure` | CI/CD, deployment |
186
+ | `cs2` | Core paradigm packages |
187
+ | `website` | Public-facing sites |
188
+ | `media` | Media/asset work |
189
+
190
+ ## Output
191
+
192
+ When complete, tell the project lead:
193
+ ```
194
+ Handoff complete:
195
+ - Plan: .rdc/plans/<topic-slug>.md
196
+ - Epic: <epic-id> ("<title>")
197
+ - Tasks: <N> tasks created, wave structure: [Wave 1: X, Y | Wave 2: Z]
198
+ - Prototype: registered at docs/source/<file> (if applicable)
199
+ - CLI agents will pick this up on next run.
200
+ ```
@@ -160,12 +160,25 @@ Write to `.rdc/reports/YYYY-MM-DD-housekeeping.md`:
160
160
 
161
161
  ## Lessons triage (weekly)
162
162
 
163
- Read all `.rdc/lessons/*.md` with `status: open` (schema + procedure: `.rdc/guides/lessons-learned-spec.md` § Triage procedure). Cluster by `area` + root-cause similarity (dedupe repeats into one fix). For each cluster:
163
+ Read all `.rdc/lessons/*.md` with `status: open` (schema + procedure: `.rdc/guides/lessons-learned-spec.md` § Triage procedure). Cluster by `area` + root-cause similarity (dedupe repeats into one fix).
164
+
165
+ ### Attended mode (default — a human is present)
166
+
167
+ For each cluster:
164
168
 
165
169
  - `scope: simple` → apply the fix directly (rule line, skill-doc edit, config, guard), commit it, set the lesson(s) `status: applied` with the commit linked.
166
170
  - `scope: architectural` → do NOT edit. Present the issue + options via `AskUserQuestion` (per `.claude/rules/architectural-change-approval.md`). On approval, apply via the correct lifecycle (rdc-skills tag/push for skills; cited commit for rules) and set `status: applied`. If deferred, set `status: triaged` and spawn a `work_item`.
167
171
  - Not worth fixing → `status: wont-fix` with a one-line reason.
168
172
 
173
+ ### Unattended mode (no human — overnight / cron / `rdc:overnight`)
174
+
175
+ When the weekly triage runs unattended, follow `.rdc/guides/lessons-learned-spec.md` § **Triage procedure — UNATTENDED weekly mode** — do not run `AskUserQuestion`. In brief (the spec is authoritative):
176
+
177
+ - **Per-difficulty model routing** (reuses the `rdc:build` table): the run is led by `claude-opus-4-8` for clustering + scope/difficulty triage; mechanical apply → `claude-sonnet-4-6`; harder multi-file/migration fix → `claude-opus-4-6`; design/architectural fix → `claude-opus-4-8`.
178
+ - `scope: simple` → apply directly or via `rdc:fixit`, commit, `status: applied`.
179
+ - `scope: architectural` with a single clear correct fix (records an already-learned lesson — e.g. "document X", "add a gate", update a guide) → route through `rdc:plan` → `rdc:build` (or `rdc:fixit` if genuinely <5 files), update the documentation, set `status: applied`/`triaged`.
180
+ - `scope: architectural` **and genuinely ambiguous** (multiple valid approaches, real tradeoffs) → write a `human_items` row (`item_type='decision'`, with options in `suggested_agent_prompt`, `source_type='lesson'`, `source_fingerprint` for dedupe), set `status: triaged`, spawn + link a `work_item`. Decided in the morning. This is the asynchronous equivalent of the attended interview and honors `.claude/rules/architectural-change-approval.md`.
181
+
169
182
  Never delete lesson files — `applied` and `wont-fix` stay as the audit trail. Report captured / applied / escalated / deferred counts in the housekeeping report.
170
183
 
171
184
  ## Rules