@lifeaitools/rdc-skills 0.8.7
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/.claude/settings.json +15 -0
- package/.claude-plugin/marketplace.json +21 -0
- package/.claude-plugin/plugin.json +11 -0
- package/.github/workflows/publish.yml +25 -0
- package/.github/workflows/self-test.yml +53 -0
- package/CHANGELOG.md +246 -0
- package/LICENSE +21 -0
- package/MANIFEST.md +190 -0
- package/README.md +188 -0
- package/README.sandbox.md +3 -0
- package/assets/watcher/viewer.html +164 -0
- package/commands/build.md +183 -0
- package/commands/collab.md +180 -0
- package/commands/deploy.md +138 -0
- package/commands/fixit.md +112 -0
- package/commands/handoff.md +173 -0
- package/commands/help.md +88 -0
- package/commands/overnight.md +220 -0
- package/commands/plan.md +158 -0
- package/commands/preplan.md +131 -0
- package/commands/prototype.md +145 -0
- package/commands/release.md +159 -0
- package/commands/report.md +99 -0
- package/commands/review.md +120 -0
- package/commands/self-test.md +107 -0
- package/commands/status.md +86 -0
- package/commands/watch.md +92 -0
- package/commands/workitems.md +132 -0
- package/guides/.gitkeep +0 -0
- package/guides/agent-bootstrap.md +191 -0
- package/guides/agents/backend.md +104 -0
- package/guides/agents/content.md +94 -0
- package/guides/agents/cs2.md +56 -0
- package/guides/agents/data.md +87 -0
- package/guides/agents/design.md +77 -0
- package/guides/agents/frontend.md +92 -0
- package/guides/agents/infrastructure.md +81 -0
- package/guides/agents/setup.md +279 -0
- package/guides/agents/verify.md +132 -0
- package/guides/agents/viz.md +106 -0
- package/guides/backend.md +146 -0
- package/guides/content.md +147 -0
- package/guides/cs2.md +190 -0
- package/guides/data.md +123 -0
- package/guides/design.md +116 -0
- package/guides/frontend.md +151 -0
- package/guides/infrastructure.md +179 -0
- package/guides/output-contract.md +98 -0
- package/hooks/no-stop-open-epics.js +125 -0
- package/package.json +31 -0
- package/rules/work-items-rpc.md +399 -0
- package/scripts/install-rdc-skills.js +559 -0
- package/scripts/install.ps1 +165 -0
- package/scripts/install.sh +132 -0
- package/scripts/lib/assertions.mjs +264 -0
- package/scripts/lib/manifest-schema.mjs +607 -0
- package/scripts/lib/runner.mjs +429 -0
- package/scripts/lib/sandbox.mjs +435 -0
- package/scripts/self-test.mjs +1108 -0
- package/scripts/uninstall.ps1 +77 -0
- package/scripts/uninstall.sh +69 -0
- package/scripts/update.ps1 +43 -0
- package/scripts/update.sh +43 -0
- package/scripts/watch-init.mjs +100 -0
- package/skills/.gitkeep +0 -0
- package/skills/build/SKILL.md +238 -0
- package/skills/collab/SKILL.md +218 -0
- package/skills/deploy/SKILL.md +144 -0
- package/skills/fixit/SKILL.md +112 -0
- package/skills/handoff/SKILL.md +175 -0
- package/skills/help/SKILL.md +101 -0
- package/skills/overnight/SKILL.md +220 -0
- package/skills/plan/SKILL.md +96 -0
- package/skills/preplan/SKILL.md +87 -0
- package/skills/prototype/SKILL.md +151 -0
- package/skills/release/SKILL.md +221 -0
- package/skills/report/SKILL.md +101 -0
- package/skills/review/SKILL.md +120 -0
- package/skills/self-test/SKILL.md +127 -0
- package/skills/status/SKILL.md +86 -0
- package/skills/tests/README.md +29 -0
- package/skills/tests/rdc-build.test.json +22 -0
- package/skills/tests/rdc-deploy.test.json +15 -0
- package/skills/tests/rdc-fixit.test.json +21 -0
- package/skills/tests/rdc-handoff.test.json +14 -0
- package/skills/tests/rdc-overnight.test.json +21 -0
- package/skills/tests/rdc-plan.test.json +14 -0
- package/skills/tests/rdc-preplan.test.json +15 -0
- package/skills/tests/rdc-prototype.test.json +14 -0
- package/skills/tests/rdc-release.test.json +15 -0
- package/skills/tests/rdc-report.test.json +14 -0
- package/skills/tests/rdc-review.test.json +14 -0
- package/skills/tests/rdc-status.test.json +16 -0
- package/skills/tests/rdc-workitems.test.json +15 -0
- package/skills/watch/SKILL.md +92 -0
- package/skills/workitems/SKILL.md +147 -0
- package/tests/validate-skills.js +183 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rdc:help
|
|
3
|
+
description: >-
|
|
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
|
+
---
|
|
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
|
+
# 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
|
+
|
|
21
|
+
Print the full usage menu below verbatim, then ask the project lead which command to run.
|
|
22
|
+
|
|
23
|
+
## Arguments
|
|
24
|
+
|
|
25
|
+
- `rdc:help` — print the full command reference menu
|
|
26
|
+
- `rdc` — alias; same as `rdc:help`
|
|
27
|
+
|
|
28
|
+
## Workflow — the RDC loop
|
|
29
|
+
|
|
30
|
+
| Command | Usage |
|
|
31
|
+
|---|---|
|
|
32
|
+
| `rdc:preplan` | `rdc:preplan <topic> [--unattended]` — research, no code |
|
|
33
|
+
| `rdc:plan` | `rdc:plan <topic> [--unattended]` — architecture + epic/tasks |
|
|
34
|
+
| `rdc:build` | `rdc:build <epic-id\|topic> [--unattended]` — dispatch agents, commit, close items |
|
|
35
|
+
| `rdc:review` | `rdc:review [--unattended]` — typecheck, tests, fix, commit |
|
|
36
|
+
| `rdc:report` | `rdc:report [--unattended]` — write `.rdc/reports/YYYY-MM-DD.md` |
|
|
37
|
+
| `rdc:overnight` | `rdc:overnight [epic-id\|label=X]` — chain preplan→plan→build→review→report |
|
|
38
|
+
| `rdc:status` | `rdc:status` — read-only dashboard |
|
|
39
|
+
| `rdc:fixit` | `rdc:fixit <description>` — bypass the loop, <5 files / <30 min |
|
|
40
|
+
|
|
41
|
+
## Ops
|
|
42
|
+
|
|
43
|
+
| Command | Usage |
|
|
44
|
+
|---|---|
|
|
45
|
+
| `rdc:deploy` | `rdc:deploy <slug> [build-id]` · `rdc:deploy new <slug>` · `rdc:deploy diagnose <slug>` · `rdc:deploy audit [--fix]` |
|
|
46
|
+
| `rdc:release` | `rdc:release <repo> [version]` · `rdc:release <repo> --patch\|--minor\|--major` · `rdc:release <repo> --dry-run` |
|
|
47
|
+
|
|
48
|
+
## Planning ↔ CLI bridge
|
|
49
|
+
|
|
50
|
+
| Command | Usage |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `rdc:handoff` | `rdc:handoff <topic>` — finalize plan → work items for CLI |
|
|
53
|
+
| `rdc:prototype` | `rdc:prototype <description>` — JSX mock for review |
|
|
54
|
+
| `rdc:workitems` | `rdc:workitems <add\|update\|done\|list\|epics> [args]` |
|
|
55
|
+
| `rdc:collab` | `rdc:collab --session <id>` — claude.ai bidirectional relay |
|
|
56
|
+
|
|
57
|
+
## Agent guides (dispatched by rdc:build, not user-invocable)
|
|
58
|
+
|
|
59
|
+
These live under `guides/agents/` — they are role playbooks the build skill spawns as sub-agents. You do NOT invoke them directly.
|
|
60
|
+
|
|
61
|
+
- `guides/agents/frontend.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
62
|
+
- `guides/agents/backend.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
63
|
+
- `guides/agents/data.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
64
|
+
- `guides/agents/design.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
65
|
+
- `guides/agents/infrastructure.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
66
|
+
- `guides/agents/content.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
67
|
+
- `guides/agents/cs2.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
68
|
+
- `guides/agents/viz.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
69
|
+
- `guides/agents/setup.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
70
|
+
- `guides/agents/verify.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
71
|
+
|
|
72
|
+
Each agent reads `.rdc/guides/agent-bootstrap.md` first, then its role guide.
|
|
73
|
+
|
|
74
|
+
## Decision tree
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
Project lead says → invoke
|
|
78
|
+
─────────────────────────────────────────────────
|
|
79
|
+
"research this" / "how do others do" → rdc:preplan <topic>
|
|
80
|
+
"plan this out" / "architect" → rdc:plan <topic>
|
|
81
|
+
"build it" / "go" / "execute" → rdc:build <topic>
|
|
82
|
+
"run overnight" / "while I sleep" → rdc:overnight
|
|
83
|
+
"quick fix" / "hotfix" / "typo" → rdc:fixit <desc>
|
|
84
|
+
"review" / "is it clean" → rdc:review
|
|
85
|
+
"report" / "summarize" → rdc:report
|
|
86
|
+
"status" / "where are we" → rdc:status
|
|
87
|
+
"deploy" / "ship" → rdc:deploy <slug>
|
|
88
|
+
"release" / "publish" → rdc:release <repo>
|
|
89
|
+
"hand this off" / "give to agents" → rdc:handoff
|
|
90
|
+
"show me what it looks like" → rdc:prototype
|
|
91
|
+
"add to backlog" / "create a ticket" → rdc:workitems
|
|
92
|
+
"what commands" / "what skills" → rdc:help
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Hard rules (apply everywhere)
|
|
96
|
+
|
|
97
|
+
- NEVER `pnpm build` — crashes the machine. Typecheck with `npx tsc --noEmit`.
|
|
98
|
+
- NEVER commit to `main` without explicit approval. Default branch is `develop`.
|
|
99
|
+
- NEVER overlap agents on the same files.
|
|
100
|
+
- ALWAYS update work items in real time via RPCs (see `.claude/rules/work-items-rpc.md`).
|
|
101
|
+
- ALWAYS credentials via clauth daemon: `curl -s http://127.0.0.1:52437/get/<service>`.
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rdc:overnight
|
|
3
|
+
description: >-
|
|
4
|
+
Usage `rdc:overnight [epic-id|label=X]` — unattended overnight supervisor, chains preplan → plan → build → review → report across all high-priority epics in --unattended mode. Use for "run overnight", "build while I sleep".
|
|
5
|
+
---
|
|
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
|
+
> 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`).
|
|
12
|
+
|
|
13
|
+
> **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.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# rdc:overnight — Overnight Build Supervisor
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
- Starting an unattended multi-hour build session
|
|
20
|
+
- Project lead says "run overnight", "build everything", "go while I sleep"
|
|
21
|
+
- Kicking off a full epic queue after scoping is agreed
|
|
22
|
+
|
|
23
|
+
## Arguments
|
|
24
|
+
- `/rdc:overnight` — work all urgent/high priority todo epics
|
|
25
|
+
- `/rdc:overnight <epic-id>` — work a specific epic only
|
|
26
|
+
- `/rdc:overnight label=<label>` — work epics matching label
|
|
27
|
+
|
|
28
|
+
## Phase 1 — Pre-flight
|
|
29
|
+
|
|
30
|
+
**First action — set the overnight sentinel** so the `no-stop-open-epics` Stop hook engages (interactive sessions are not gated by it):
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
mkdir -p C:/Dev/regen-root/.rdc && touch C:/Dev/regen-root/.rdc/overnight.lock
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Last action at end of run (success OR failure) — remove the sentinel:**
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
rm -f C:/Dev/regen-root/.rdc/overnight.lock
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If the sentinel file does not exist, the Stop hook will NOT block — which means interactive sessions stop freely and only `rdc:overnight` is held to the "drain the queue" contract.
|
|
43
|
+
|
|
44
|
+
Before touching any code, verify the environment is safe:
|
|
45
|
+
|
|
46
|
+
1. **Clauth daemon alive:**
|
|
47
|
+
```bash
|
|
48
|
+
curl -s http://127.0.0.1:52437/ping
|
|
49
|
+
```
|
|
50
|
+
If not responding: report `BLOCKED: credential daemon offline` and exit. Do not proceed.
|
|
51
|
+
|
|
52
|
+
2. **Git state clean:**
|
|
53
|
+
```bash
|
|
54
|
+
git status --short
|
|
55
|
+
```
|
|
56
|
+
Must be on the development branch with no uncommitted changes. If dirty: commit or stash first.
|
|
57
|
+
|
|
58
|
+
3. **Baseline review:**
|
|
59
|
+
Run `rdc:review --unattended`. If `REVIEW_STATUS.verdict = "HAS_ISSUES"` and
|
|
60
|
+
issues cannot be auto-fixed: report `BLOCKED: codebase has pre-existing issues` and exit.
|
|
61
|
+
A dirty baseline overnight compounds into a disaster by morning.
|
|
62
|
+
|
|
63
|
+
If all three pass: proceed to Phase 2.
|
|
64
|
+
|
|
65
|
+
## Phase 2 — Load Scope
|
|
66
|
+
|
|
67
|
+
Determine which epics to work:
|
|
68
|
+
|
|
69
|
+
- **Specific epic arg:** load that one epic via `get_work_items_by_epic()`
|
|
70
|
+
- **Label filter:** `SELECT get_open_epics(p_label_filter := '<label>')`
|
|
71
|
+
- **No arg (default):** `SELECT get_open_epics()` filtered to:
|
|
72
|
+
- `priority IN ('urgent', 'high')`
|
|
73
|
+
- `status IN ('todo', 'in_progress')`
|
|
74
|
+
- Order: urgent first, then high, then by `created_at`
|
|
75
|
+
|
|
76
|
+
Log the epic queue at the start of `.rdc/reports/overnight-<YYYY-MM-DD>.md` (fallback: `.rdc/reports/overnight-<YYYY-MM-DD>.md` if `.rdc/` does not exist).
|
|
77
|
+
|
|
78
|
+
## Phase 3 — Epic Loop
|
|
79
|
+
|
|
80
|
+
For each epic in the queue, run this sequence:
|
|
81
|
+
|
|
82
|
+
### 3a. Research (if needed)
|
|
83
|
+
Condition: epic has 0 child tasks AND no matching doc in `.rdc/plans/` (or `.rdc/plans/` as fallback)
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
rdc:preplan <topic> --unattended
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Check `PREPLAN_STATUS.recommendation_confidence`:
|
|
90
|
+
- `"high"` or `"medium"`: proceed
|
|
91
|
+
- `"low"`: escalate via advisor tool (see Escalation Protocol below)
|
|
92
|
+
- If advisor gives direction: proceed with that direction
|
|
93
|
+
- If advisor cannot resolve: skip this epic, log reason, move to next
|
|
94
|
+
|
|
95
|
+
### 3b. Plan (if no tasks exist)
|
|
96
|
+
Condition: epic has 0 child tasks after preplan
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
rdc:plan <epic-id> --unattended
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Check `PLAN_STATUS.task_count > 0` before continuing.
|
|
103
|
+
If 0 tasks created: escalate via advisor, then skip if still unresolved.
|
|
104
|
+
|
|
105
|
+
### 3c. Build
|
|
106
|
+
|
|
107
|
+
This skill delegates to rdc:build which uses typed agent dispatch. See rdc:build for agent type classification.
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
rdc:build <epic-id> --unattended
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Agents receive the relevant guide file from `.rdc/guides/` (fallback: `.rdc/guides/`) based on their work package type.
|
|
114
|
+
|
|
115
|
+
After each wave: check `BUILD_STATUS`. If `escalated: true`, log the escalation
|
|
116
|
+
in the overnight doc and continue — don't stop the loop.
|
|
117
|
+
|
|
118
|
+
### 3d. Review
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
rdc:review --unattended
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Check `REVIEW_STATUS.verdict`:
|
|
125
|
+
- `"CLEAN"`: mark epic `done` in work_items, push, continue to next epic
|
|
126
|
+
- `"HAS_ISSUES"` with `escalations > 0`: log issues, push what's clean, continue
|
|
127
|
+
- `"HAS_ISSUES"` with `escalations = 0` (all auto-fixed): push, continue
|
|
128
|
+
|
|
129
|
+
### 3e. Commit checkpoint
|
|
130
|
+
|
|
131
|
+
After each epic (pass or fail):
|
|
132
|
+
```bash
|
|
133
|
+
if [ "$RDC_TEST" != "1" ]; then
|
|
134
|
+
git push origin {development-branch}
|
|
135
|
+
else
|
|
136
|
+
echo "[RDC_TEST] skipping git push origin {development-branch}"
|
|
137
|
+
fi
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
This ensures every epic's work is saved regardless of what comes next.
|
|
141
|
+
|
|
142
|
+
## Phase 4 — Exit
|
|
143
|
+
|
|
144
|
+
After all epics are processed:
|
|
145
|
+
|
|
146
|
+
1. Run `rdc:report --unattended`
|
|
147
|
+
|
|
148
|
+
2. Write session summary to `.rdc/reports/overnight-<YYYY-MM-DD>.md` (fallback: `.rdc/reports/overnight-<YYYY-MM-DD>.md`):
|
|
149
|
+
```markdown
|
|
150
|
+
# Overnight Session — YYYY-MM-DD
|
|
151
|
+
|
|
152
|
+
## Started
|
|
153
|
+
<timestamp>
|
|
154
|
+
|
|
155
|
+
## Epics Attempted
|
|
156
|
+
| Epic | Status | Tasks Done | Commits |
|
|
157
|
+
|
|
158
|
+
## Epics Completed
|
|
159
|
+
<list with epic IDs>
|
|
160
|
+
|
|
161
|
+
## Escalations
|
|
162
|
+
N advisor calls — details:
|
|
163
|
+
- <epic>: <what was escalated> → <advisor response>
|
|
164
|
+
|
|
165
|
+
## Blockers Remaining
|
|
166
|
+
<any epics skipped or partially done>
|
|
167
|
+
|
|
168
|
+
## Git Summary
|
|
169
|
+
- Total commits: N
|
|
170
|
+
- Push status: ✅
|
|
171
|
+
|
|
172
|
+
## Completed
|
|
173
|
+
<timestamp>
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
3. Final push:
|
|
177
|
+
```bash
|
|
178
|
+
if [ "$RDC_TEST" != "1" ]; then
|
|
179
|
+
git push origin {development-branch}
|
|
180
|
+
else
|
|
181
|
+
echo "[RDC_TEST] skipping final git push origin {development-branch}"
|
|
182
|
+
fi
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Escalation Protocol
|
|
186
|
+
|
|
187
|
+
The advisor tool pairs this executor with a high-level model for high-stakes decisions.
|
|
188
|
+
Use it when genuinely stuck — not for every small uncertainty.
|
|
189
|
+
|
|
190
|
+
**Escalation triggers:**
|
|
191
|
+
- `PREPLAN_STATUS.recommendation_confidence = "low"` (too many unknowns)
|
|
192
|
+
- `PLAN_STATUS.task_count = 0` after planning (nothing actionable)
|
|
193
|
+
- Build agent fails twice on the same task
|
|
194
|
+
- `REVIEW_STATUS` has unfixable issues requiring architectural judgment
|
|
195
|
+
- Credential daemon goes down mid-session (escalate before exiting)
|
|
196
|
+
|
|
197
|
+
**How to escalate:**
|
|
198
|
+
Provide the advisor with:
|
|
199
|
+
1. What was attempted and what failed
|
|
200
|
+
2. The error or ambiguity in detail
|
|
201
|
+
3. Two most likely paths forward with tradeoffs
|
|
202
|
+
4. Which epic/task is blocked
|
|
203
|
+
|
|
204
|
+
**After advisor responds:**
|
|
205
|
+
- Log the guidance in the overnight doc
|
|
206
|
+
- Resume the loop from where it stopped
|
|
207
|
+
- If advisor cannot resolve: mark task/epic `blocked`, log reason, skip to next
|
|
208
|
+
|
|
209
|
+
**Max escalations:** 3 per epic. After 3, skip the epic and log.
|
|
210
|
+
|
|
211
|
+
## Safety Rules
|
|
212
|
+
|
|
213
|
+
- Branch: development branch always — NEVER touch main/production
|
|
214
|
+
- NEVER run `pnpm build` — use `npx tsc --noEmit` for typecheck, vitest for tests only on modified packages
|
|
215
|
+
- NEVER let agents overlap on the same files
|
|
216
|
+
- Push after every epic, not just at the end
|
|
217
|
+
- Update Supabase work items in real time throughout
|
|
218
|
+
- Max 2 hours per epic — if exceeded, skip and log `TIMEOUT`
|
|
219
|
+
- If credential daemon goes down mid-session: write current state to overnight doc, push, exit gracefully
|
|
220
|
+
- If git push fails: log the failure, attempt rebase, retry once — do not force push
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rdc:plan
|
|
3
|
+
description: >-
|
|
4
|
+
Usage `rdc:plan <topic> [--unattended]` — architecture doc with design decisions, tradeoffs, work packages. Creates Supabase epics/tasks. Use after rdc:preplan or when given clear architectural direction.
|
|
5
|
+
---
|
|
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
|
+
> 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`).
|
|
12
|
+
|
|
13
|
+
> **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 epic/task writes and git push are skipped under `RDC_TEST=1`.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# rdc:plan — Architecture & Work Packages
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
- After `/rdc:preplan` produced research findings
|
|
20
|
+
- Project lead gives architectural direction ("build X with Y approach")
|
|
21
|
+
- An epic exists but needs breakdown into implementable tasks
|
|
22
|
+
- Before any large build session
|
|
23
|
+
- Called by `rdc:overnight` when an epic has no child tasks
|
|
24
|
+
|
|
25
|
+
## Arguments
|
|
26
|
+
- `rdc:plan <topic>` — interactive planning session
|
|
27
|
+
- `rdc:plan <epic-id> --unattended` — silent mode for overnight builds
|
|
28
|
+
|
|
29
|
+
## Procedure
|
|
30
|
+
|
|
31
|
+
1. **Gather inputs:**
|
|
32
|
+
- Research doc from preplan (if exists): `.rdc/research/<topic>.md` (fallback: `.rdc/research/<topic>.md`)
|
|
33
|
+
- Project lead's architectural direction from conversation
|
|
34
|
+
- Relevant CLAUDE.md files from affected packages
|
|
35
|
+
- Existing Supabase epics: `SELECT get_open_epics()`
|
|
36
|
+
|
|
37
|
+
2. **Read the codebase** — understand current state:
|
|
38
|
+
- What packages are affected?
|
|
39
|
+
- What types/interfaces already exist?
|
|
40
|
+
- What tests exist?
|
|
41
|
+
- What's the dependency graph?
|
|
42
|
+
|
|
43
|
+
3. **Make design decisions** — for each major choice:
|
|
44
|
+
- State the decision clearly
|
|
45
|
+
- Document what was chosen and what was rejected
|
|
46
|
+
- Explain WHY (tradeoff rationale)
|
|
47
|
+
- Note consequences and reversibility
|
|
48
|
+
|
|
49
|
+
4. **Define work packages** — break into agent-dispatchable units:
|
|
50
|
+
- Each work package = one agent assignment
|
|
51
|
+
- No file overlap between packages
|
|
52
|
+
- Each package has: scope, files to create/modify, test requirements
|
|
53
|
+
- Assign an agent type to each work package from the typed dispatch table in rdc:build. Include the guide file path (from `.rdc/guides/`, fallback `.rdc/guides/`) in each work package description.
|
|
54
|
+
- Estimate: small (1 agent, <500 LOC), medium (1 agent, 500-1500 LOC), large (needs splitting)
|
|
55
|
+
|
|
56
|
+
5. **Write plan doc** to `.rdc/plans/<topic-slug>.md` (fallback: `.rdc/plans/<topic-slug>.md` if `.rdc/` does not exist):
|
|
57
|
+
```markdown
|
|
58
|
+
# Plan: <Topic>
|
|
59
|
+
> Generated: <date> | Epic: <id if exists>
|
|
60
|
+
|
|
61
|
+
## Goal
|
|
62
|
+
## Design Decisions
|
|
63
|
+
## Work Packages
|
|
64
|
+
## Sequencing (what can parallelize, what depends on what)
|
|
65
|
+
## Risks & Mitigations
|
|
66
|
+
```
|
|
67
|
+
|
|
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>, ...)`
|
|
71
|
+
- Set priorities: urgent/high/normal based on sequencing
|
|
72
|
+
|
|
73
|
+
7. **Report results:**
|
|
74
|
+
- Interactive: present the plan for approval before building
|
|
75
|
+
- Unattended: skip approval, proceed immediately, emit status block:
|
|
76
|
+
```
|
|
77
|
+
PLAN_STATUS: { epic_id, task_count, doc_path, waves }
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Unattended Escalation
|
|
81
|
+
|
|
82
|
+
When `--unattended` and genuine architectural ambiguity is detected — meaning multiple
|
|
83
|
+
valid approaches exist with significantly different tradeoffs (not just minor style choices)
|
|
84
|
+
— escalate via the advisor tool. Provide: the decision point, the options with tradeoffs,
|
|
85
|
+
and the project context. Resume with advisor's recommendation. If advisor is unavailable,
|
|
86
|
+
choose the most conservative/reversible approach and document the decision.
|
|
87
|
+
|
|
88
|
+
## Rules
|
|
89
|
+
- Interactive: ALWAYS get approval before proceeding to build
|
|
90
|
+
- Unattended: proceed immediately without approval
|
|
91
|
+
- Plan doc goes in `.rdc/plans/` (fallback: `.rdc/plans/` if `.rdc/` does not exist) — not `.planning/`
|
|
92
|
+
- Each work package must be independently executable by an agent
|
|
93
|
+
- No file overlap between work packages
|
|
94
|
+
- Include test requirements in every work package
|
|
95
|
+
- Reference affected CLAUDE.md files in each work package description
|
|
96
|
+
- Reference the relevant guide file from `.rdc/guides/` (fallback: `.rdc/guides/`) for agent context
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rdc:preplan
|
|
3
|
+
description: >-
|
|
4
|
+
Usage `rdc:preplan <topic> [--unattended]` — research best practices, analyze codebase, compare approaches, surface unknowns before committing to a plan. Produces a research doc. No decisions, no code.
|
|
5
|
+
---
|
|
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
|
+
> 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`).
|
|
12
|
+
|
|
13
|
+
> **Sandbox contract:** This skill honors `RDC_TEST=1` per `guides/agent-bootstrap.md` § RDC_TEST Sandbox Contract. This skill is read-only and produces only local file writes — no destructive external calls to short-circuit.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# rdc:preplan — Research Before Planning
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
- Starting a new feature area you haven't built before
|
|
20
|
+
- Need to understand how best-in-class projects solve a problem
|
|
21
|
+
- Codebase has unknowns that need mapping before planning
|
|
22
|
+
- Project lead says "research", "look into", "what's the best way to", "how do others do"
|
|
23
|
+
- Called by `rdc:overnight` before planning an epic with no existing tasks
|
|
24
|
+
|
|
25
|
+
## Arguments
|
|
26
|
+
- `rdc:preplan <topic>` — interactive research session
|
|
27
|
+
- `rdc:preplan <topic> --unattended` — silent mode for overnight builds
|
|
28
|
+
|
|
29
|
+
## Procedure
|
|
30
|
+
|
|
31
|
+
1. **Parse the topic** from user input or epic title/description.
|
|
32
|
+
- Interactive: if vague, ask ONE clarifying question before proceeding
|
|
33
|
+
- Unattended: infer from the epic title + description — never pause to ask
|
|
34
|
+
|
|
35
|
+
2. **Web research** — search for current (2025-2026) best practices:
|
|
36
|
+
- How do major projects solve this?
|
|
37
|
+
- What tools/libraries exist?
|
|
38
|
+
- What are the common tradeoffs?
|
|
39
|
+
|
|
40
|
+
3. **Codebase analysis** — what do we already have?
|
|
41
|
+
- Search relevant packages for existing code
|
|
42
|
+
- Check `.rdc/research/` for prior research on this topic (fallback: `.rdc/research/`)
|
|
43
|
+
- Check `docs/archive/` for historical work
|
|
44
|
+
- Research agents should read relevant guides from `.rdc/guides/` (fallback: `.rdc/guides/`)
|
|
45
|
+
- Check work items for related epics
|
|
46
|
+
- Read relevant CLAUDE.md files
|
|
47
|
+
|
|
48
|
+
4. **Best-in-class comparison** — create a comparison table:
|
|
49
|
+
| Approach | Pros | Cons | Fit for Us |
|
|
50
|
+
|
|
51
|
+
5. **Surface unknowns** — what questions remain unanswered?
|
|
52
|
+
|
|
53
|
+
6. **Write research doc** to `.rdc/research/<topic-slug>.md` (fallback: `.rdc/research/<topic-slug>.md` if `.rdc/` does not exist):
|
|
54
|
+
```markdown
|
|
55
|
+
# Research: <Topic>
|
|
56
|
+
> Generated: <date> | Requested by: Project Lead
|
|
57
|
+
|
|
58
|
+
## Question
|
|
59
|
+
## What We Already Have
|
|
60
|
+
## Best-in-Class Analysis
|
|
61
|
+
## Comparison Table
|
|
62
|
+
## Unknowns & Open Questions
|
|
63
|
+
## Recommendation (preliminary — not a decision)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
7. **Report results:**
|
|
67
|
+
- Interactive: summarize findings. Do NOT create epics or write code.
|
|
68
|
+
- Unattended: skip summary, emit status block only:
|
|
69
|
+
```
|
|
70
|
+
PREPLAN_STATUS: { topic, doc_path, unknowns_count, recommendation_confidence: "high|medium|low" }
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Unattended Escalation
|
|
74
|
+
|
|
75
|
+
When `--unattended` and `recommendation_confidence` is `"low"` (≥5 unresolved unknowns,
|
|
76
|
+
or no clear best-fit approach exists), escalate via the advisor tool rather than stopping.
|
|
77
|
+
Provide the advisor with: topic, unknowns list, comparison table. Resume with advisor's
|
|
78
|
+
direction if given. If advisor cannot resolve, log and skip to next step.
|
|
79
|
+
|
|
80
|
+
## Rules
|
|
81
|
+
- Output is a RESEARCH DOC, not a plan
|
|
82
|
+
- Do not make architectural decisions — surface options with tradeoffs
|
|
83
|
+
- Do not create work items
|
|
84
|
+
- Do not write code
|
|
85
|
+
- Web search is mandatory — don't just analyze the codebase
|
|
86
|
+
- Keep the doc under 200 lines — concise, not exhaustive
|
|
87
|
+
- Unattended: NEVER pause for input; infer and proceed
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rdc:prototype
|
|
3
|
+
description: >-
|
|
4
|
+
Usage `rdc:prototype <description>` — build JSX/TSX prototype for review before CLI handoff. Saves to docs/source/, registers in prototype_registry. Use for "mock this up", "show me what it looks like". Reference material only, not production.
|
|
5
|
+
---
|
|
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
|
+
> 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`).
|
|
12
|
+
|
|
13
|
+
> **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 prototype_registry and design_context inserts, and git push are skipped under `RDC_TEST=1`.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# rdc:prototype — Prototype Builder
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
|
|
20
|
+
- Project lead wants to see a design before committing to implementation
|
|
21
|
+
- A new component or page needs visual review before wiring to database
|
|
22
|
+
- Testing a data layout or interaction pattern
|
|
23
|
+
- Building a visual mockup for approval
|
|
24
|
+
|
|
25
|
+
## Arguments
|
|
26
|
+
|
|
27
|
+
- `rdc:prototype <description>` — describe the UI to build (e.g. "a data table for work items")
|
|
28
|
+
|
|
29
|
+
## What This Produces
|
|
30
|
+
|
|
31
|
+
- JSX/TSX prototype file → `docs/source/<ComponentName>.jsx`
|
|
32
|
+
- prototype_registry entry in database
|
|
33
|
+
- design_context entries for key decisions
|
|
34
|
+
|
|
35
|
+
## Prototype Rules
|
|
36
|
+
|
|
37
|
+
1. **Self-contained** — no real database calls. Mock data arrays only.
|
|
38
|
+
2. **Realistic data** — mock data must reflect actual schema field names
|
|
39
|
+
3. **Full fidelity** — looks exactly like the final product should look
|
|
40
|
+
4. **Annotated** — key design decisions commented at the top of the file
|
|
41
|
+
5. **Handoff-ready** — includes the spec block at the bottom
|
|
42
|
+
|
|
43
|
+
## Standard Mock Data Pattern
|
|
44
|
+
|
|
45
|
+
Use realistic field names from the actual database schema:
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
// Mock data — mirrors your_table
|
|
49
|
+
const MOCK_DATA = [
|
|
50
|
+
{
|
|
51
|
+
id: "uuid-1",
|
|
52
|
+
slug: "example-slug",
|
|
53
|
+
name: "Example Name",
|
|
54
|
+
description: "...",
|
|
55
|
+
location_city: "City",
|
|
56
|
+
location_state: "State",
|
|
57
|
+
status: "active",
|
|
58
|
+
category: "example-category",
|
|
59
|
+
total_capital: 1000000,
|
|
60
|
+
total_area: 2400,
|
|
61
|
+
deploy_url: "https://...",
|
|
62
|
+
tags: ["tag1", "tag2"],
|
|
63
|
+
alignment: ["value1", "value2"],
|
|
64
|
+
web_visible: true,
|
|
65
|
+
ticker_label: "LABEL",
|
|
66
|
+
ticker_capital: "$1M",
|
|
67
|
+
scores: { field1: 82, field2: 71, field3: 68 },
|
|
68
|
+
},
|
|
69
|
+
];
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## File Header Template
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
/**
|
|
76
|
+
* <ComponentName>.jsx — PROTOTYPE
|
|
77
|
+
* ─────────────────────────────────────────────
|
|
78
|
+
* Status: Prototype — reference only, not production code
|
|
79
|
+
* Created: <date>
|
|
80
|
+
* Route (production target): <app-route>
|
|
81
|
+
*
|
|
82
|
+
* Key design decisions:
|
|
83
|
+
* 1. <Decision and rationale>
|
|
84
|
+
* 2. <Decision and rationale>
|
|
85
|
+
*
|
|
86
|
+
* What to preserve in production:
|
|
87
|
+
* - <Design element>
|
|
88
|
+
* - <Interaction pattern>
|
|
89
|
+
*
|
|
90
|
+
* What production implementation must do differently:
|
|
91
|
+
* - Replace mock data with database query
|
|
92
|
+
* - Import <Component> from @regen/ui instead of inline implementation
|
|
93
|
+
* - Extract <Part> into shared component at src/components/<name>
|
|
94
|
+
*
|
|
95
|
+
* Production agent type: frontend | backend | data | viz
|
|
96
|
+
* Production guide: .rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md)
|
|
97
|
+
*/
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## File Footer Template
|
|
101
|
+
|
|
102
|
+
```tsx
|
|
103
|
+
// ─── HANDOFF SPEC ─────────────────────────────
|
|
104
|
+
// Production files:
|
|
105
|
+
// apps/<app>/src/app/<route>/page.tsx (server component)
|
|
106
|
+
// apps/<app>/src/app/<route>/<Name>Client.tsx (client component)
|
|
107
|
+
// apps/<app>/src/app/<route>/<Name>Wrapper.tsx (modal/state shell, if needed)
|
|
108
|
+
//
|
|
109
|
+
// Design system components to use (do not re-implement):
|
|
110
|
+
// <ComponentName> — <what it does>
|
|
111
|
+
//
|
|
112
|
+
// Database tables:
|
|
113
|
+
// <table> — <what to query>
|
|
114
|
+
//
|
|
115
|
+
// Form field schema additions needed:
|
|
116
|
+
// <table>.<column> — <input_type> — <label>
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## After Building — Register and Record
|
|
120
|
+
|
|
121
|
+
```sql
|
|
122
|
+
-- Register prototype
|
|
123
|
+
INSERT INTO prototype_registry (name, component, source_path, notes, created_by)
|
|
124
|
+
VALUES (
|
|
125
|
+
'<Name> Prototype v1',
|
|
126
|
+
'<ComponentName>',
|
|
127
|
+
'docs/source/<ComponentName>.jsx',
|
|
128
|
+
'<One-line description of key design: layout, data shape, interactions>',
|
|
129
|
+
'planning'
|
|
130
|
+
);
|
|
131
|
+
|
|
132
|
+
-- Record design decisions
|
|
133
|
+
INSERT INTO design_context (topic, context_type, summary, source, created_by)
|
|
134
|
+
VALUES
|
|
135
|
+
('<Topic>', 'prototype', 'Prototype built with <X> layout and <Y> interaction pattern', 'planning', 'planning'),
|
|
136
|
+
('<Topic>', 'decision', '<Key decision made during prototyping and why>', 'planning', 'planning');
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Handoff
|
|
140
|
+
|
|
141
|
+
After prototype is approved, use `rdc:handoff` to create the plan doc and database work items.
|
|
142
|
+
|
|
143
|
+
Or tell the project lead:
|
|
144
|
+
```
|
|
145
|
+
Prototype complete.
|
|
146
|
+
File: docs/source/<ComponentName>.jsx
|
|
147
|
+
Registered: prototype_registry
|
|
148
|
+
|
|
149
|
+
To hand off to CLI build: use /rdc:handoff
|
|
150
|
+
To build immediately: use /rdc:build
|
|
151
|
+
```
|