@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,180 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rdc:collab
|
|
3
|
+
description: >-
|
|
4
|
+
Usage `rdc:collab --session <id>` — bidirectional relay with claude.ai. Read inbox, do work, write outbox, loop. Dave watches terminal and can interject.
|
|
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
|
+
|
|
12
|
+
# /rdc:collab — Claude Code Collab Session Listener
|
|
13
|
+
> Invoked as: `/rdc:collab --session <session_id>`
|
|
14
|
+
> You are the build/execute half of a live collab session with claude.ai.
|
|
15
|
+
> Transport: file relay via `.rdc/relay/sessions/<id>/inbox/` + `outbox/`
|
|
16
|
+
> Dave is watching this terminal and can interject at any time.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## What This Is
|
|
21
|
+
|
|
22
|
+
claude.ai writes tasks into your inbox. You read, act, commit, write the response
|
|
23
|
+
to outbox, and loop. clauth relays messages between claude.ai and this session via
|
|
24
|
+
the `chitchat_*` MCP tools. Dave can watch everything in this terminal and interject
|
|
25
|
+
by typing — treat anything Dave types as a high-priority override.
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Step 1 — Parse session ID
|
|
30
|
+
|
|
31
|
+
Extract `--session <uuid>` from args.
|
|
32
|
+
|
|
33
|
+
If no `--session`, list `.rdc/relay/sessions/` and show available sessions.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Step 2 — Initialize
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
sessionDir = .rdc/relay/sessions/<session_id>/
|
|
41
|
+
inbox = sessionDir/inbox/
|
|
42
|
+
outbox = sessionDir/outbox/
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Verify both dirs exist. If not:
|
|
46
|
+
```
|
|
47
|
+
Session directory not found. Run chitchat_start from claude.ai first.
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Update `sessionDir/status.json`:
|
|
51
|
+
```json
|
|
52
|
+
{ "status": "active", "cli_connected_at": "<iso>", "session_id": "<id>" }
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Write a ready signal to outbox so claude.ai knows the CLI is connected:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
outbox/<iso-ts>-ready.md
|
|
59
|
+
---
|
|
60
|
+
from: claude-code
|
|
61
|
+
to: claude-ai
|
|
62
|
+
session_id: <id>
|
|
63
|
+
type: ready
|
|
64
|
+
responded_at: <iso>
|
|
65
|
+
---
|
|
66
|
+
Claude Code connected. Ready to receive tasks.
|
|
67
|
+
cwd: <rootPath>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Print to terminal:
|
|
71
|
+
```
|
|
72
|
+
[rdc:collab] Session <id> active.
|
|
73
|
+
Inbox: .rdc/relay/sessions/<id>/inbox/
|
|
74
|
+
Outbox: .rdc/relay/sessions/<id>/outbox/
|
|
75
|
+
Waiting for messages from claude.ai... (Ctrl+C to end)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Step 3 — Poll inbox
|
|
81
|
+
|
|
82
|
+
Scan `inbox/` for `.md` files that do NOT end in `.processed`. Sort ascending by name.
|
|
83
|
+
|
|
84
|
+
- **No files:** wait 5 seconds, poll again.
|
|
85
|
+
- **After 10 min idle:** print `[rdc:collab] Still listening...` heartbeat, keep waiting.
|
|
86
|
+
- **Files found:** process the oldest one first (Step 4).
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
## Step 4 — Process message
|
|
91
|
+
|
|
92
|
+
Read the file. Parse frontmatter `type` field.
|
|
93
|
+
|
|
94
|
+
**`type: stop`** → go to Step 6.
|
|
95
|
+
|
|
96
|
+
**Anything else (default: task/message):**
|
|
97
|
+
|
|
98
|
+
Print to terminal:
|
|
99
|
+
```
|
|
100
|
+
[rdc:collab] Turn <N> from claude.ai:
|
|
101
|
+
──────────────────────────────────────
|
|
102
|
+
<message body>
|
|
103
|
+
──────────────────────────────────────
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Rename the inbox file to `<filename>.processed`.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Step 5 — Do the work
|
|
111
|
+
|
|
112
|
+
Act on the message. Full Claude Code capabilities:
|
|
113
|
+
- File edits, git commits to `develop`
|
|
114
|
+
- Supabase RPC queries
|
|
115
|
+
- Type-checks: `npx tsc --noEmit` (never `pnpm build`)
|
|
116
|
+
- Run skills: `/rdc:plan`, `/rdc:fixit`, etc.
|
|
117
|
+
- Answer questions directly
|
|
118
|
+
|
|
119
|
+
Follow `.rdc/guides/agent-bootstrap.md` rules throughout.
|
|
120
|
+
|
|
121
|
+
When done, write response to outbox:
|
|
122
|
+
```
|
|
123
|
+
outbox/<iso-ts>-turn<N>.md
|
|
124
|
+
---
|
|
125
|
+
from: claude-code
|
|
126
|
+
to: claude-ai
|
|
127
|
+
session_id: <session_id>
|
|
128
|
+
turn: <N>
|
|
129
|
+
responded_at: <iso>
|
|
130
|
+
commits: <sha1, sha2 or none>
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
<what you did, what you found, any questions or decisions needed from claude.ai>
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Print to terminal:
|
|
137
|
+
```
|
|
138
|
+
[rdc:collab] Turn <N> done. Response written to outbox.
|
|
139
|
+
Waiting for next message...
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Return to Step 3.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Step 6 — End session
|
|
147
|
+
|
|
148
|
+
Received `type: stop` in inbox, or Dave pressed Ctrl+C.
|
|
149
|
+
|
|
150
|
+
Write final summary to outbox:
|
|
151
|
+
```
|
|
152
|
+
outbox/<iso-ts>-final.md
|
|
153
|
+
---
|
|
154
|
+
from: claude-code
|
|
155
|
+
to: claude-ai
|
|
156
|
+
session_id: <session_id>
|
|
157
|
+
type: final
|
|
158
|
+
responded_at: <iso>
|
|
159
|
+
---
|
|
160
|
+
Session complete.
|
|
161
|
+
Turns: <N>
|
|
162
|
+
Commits: <list or none>
|
|
163
|
+
Open items: <anything unresolved>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Update `status.json` → `{ "status": "done", "ended_at": "<iso>" }`
|
|
167
|
+
|
|
168
|
+
Print:
|
|
169
|
+
```
|
|
170
|
+
[rdc:collab] Session ended.
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Dave Interjections
|
|
176
|
+
|
|
177
|
+
If Dave types in this terminal during a turn:
|
|
178
|
+
- Treat it as an override injected into the current task
|
|
179
|
+
- Acknowledge it in your outbox response
|
|
180
|
+
- If it changes direction mid-task, note what you stopped and why
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rdc:deploy
|
|
3
|
+
description: >-
|
|
4
|
+
Coolify ops. Usage `rdc:deploy <slug> [build-id]` or `rdc:deploy new <slug>` or `rdc:deploy diagnose <slug>` or `rdc:deploy audit [--fix]` — type checklists, DNS decision tree, mandatory post-deploy gate. Checklist-only output.
|
|
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
|
+
|
|
12
|
+
# rdc:deploy — Coolify Operations
|
|
13
|
+
|
|
14
|
+
**READ FIRST:** `guides/output-contract.md`. Checklist-only output. No narration.
|
|
15
|
+
No raw MCP dumps. No UUIDs unless asked.
|
|
16
|
+
|
|
17
|
+
> **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.
|
|
18
|
+
>
|
|
19
|
+
> *Under `$RDC_TEST=1`:* Modes 1 (deploy) and 2 (new) are **entirely skipped** — echo `[RDC_TEST] skipping Coolify deploy/create` and mark every `[ ]` line in those checklists as `[~]`. Modes 3 (diagnose) and 4 (audit without `--fix`) are **read-only and run normally**. Mode 4 with `--fix` skips all remediation — echo `[RDC_TEST] skipping audit --fix remediation` and report findings only. Registry SELECTs, Coolify status reads, HTTP gate probes, TLS checks, and DNS lookups are NOT destructive and run normally. Anything that writes (create app, set watch_paths, deploy trigger, env var write, DNS write, CF cache purge, registry UPDATE/INSERT) is gated.
|
|
20
|
+
|
|
21
|
+
## Arguments
|
|
22
|
+
|
|
23
|
+
- `rdc:deploy <slug>` — deploy existing app (latest commit on its watched branch)
|
|
24
|
+
- `rdc:deploy <slug> <build-id>` — deploy specific commit/tag
|
|
25
|
+
- `rdc:deploy new <slug>` — create a new Coolify app from registry
|
|
26
|
+
- `rdc:deploy diagnose <slug>` — debug why an app is broken
|
|
27
|
+
- `rdc:deploy audit` — fleet-wide scan for missed failures
|
|
28
|
+
- `rdc:deploy audit --fix` — fleet scan + auto-remediate safe issues
|
|
29
|
+
- `rdc:deploy` (no args) — print mode menu, ask which
|
|
30
|
+
|
|
31
|
+
## Modes
|
|
32
|
+
|
|
33
|
+
### Mode 1 — deploy <slug> [build-id]
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
rdc:deploy: <slug> → <domain>
|
|
37
|
+
[ ] Registry lookup (slug, uuid, branch, type, env_vars_needed)
|
|
38
|
+
[ ] Git state verified (branch matches Coolify, commit pushed)
|
|
39
|
+
[ ] Build-id resolved (default: HEAD of watched branch)
|
|
40
|
+
[ ] Env vars present in Coolify (compare to registry)
|
|
41
|
+
[ ] Type-specific preflight (see docs/runbooks/coolify-deploy-checklist.md)
|
|
42
|
+
[ ] Deploy triggered
|
|
43
|
+
[ ] Deployment reached "finished" state
|
|
44
|
+
[ ] Gate: HTTP 200
|
|
45
|
+
[ ] Gate: TLS valid (no SSL cipher mismatch)
|
|
46
|
+
[ ] Gate: cache headers correct on HTML
|
|
47
|
+
[ ] Gate: container running on declared port
|
|
48
|
+
[ ] Cloudflare cache purged (if proxied)
|
|
49
|
+
[ ] deployment_registry updated (last_deploy_at, status)
|
|
50
|
+
✅ rdc:deploy: <slug> deployed in Nm Ns
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Mode 2 — new <slug>
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
rdc:deploy new: <slug>
|
|
57
|
+
[ ] Registry entry loaded (or interactive create)
|
|
58
|
+
[ ] DNS path chosen (A: *.dev.place.fund B: apex C: other zone)
|
|
59
|
+
[ ] DNS record verified or wildcard confirmed
|
|
60
|
+
[ ] Cloudflare proxy setting correct for DNS path
|
|
61
|
+
[ ] server_uuid, project_uuid, environment_uuid, github_app_uuid resolved
|
|
62
|
+
[ ] Build type chosen (Next.js / Vite / static / standalone)
|
|
63
|
+
[ ] Type-specific fields filled (ports, build cmd, install cmd, start cmd)
|
|
64
|
+
[ ] Application created via /applications/private-github-app
|
|
65
|
+
[ ] watch_paths set and verified
|
|
66
|
+
[ ] Env vars set in Coolify
|
|
67
|
+
[ ] First deploy triggered
|
|
68
|
+
[ ] Gate passed (5 checks)
|
|
69
|
+
[ ] deployment_registry row inserted
|
|
70
|
+
✅ rdc:deploy new: <slug> live at <domain>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Mode 3 — diagnose <slug>
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
rdc:deploy diagnose: <slug>
|
|
77
|
+
[ ] App located (uuid, domain, last deploy)
|
|
78
|
+
[ ] Container state (running / restarting / stopped)
|
|
79
|
+
[ ] Last 100 log lines scanned for known error patterns
|
|
80
|
+
[ ] Port mismatch check (declared vs actual)
|
|
81
|
+
[ ] Env var drift check (registry vs Coolify)
|
|
82
|
+
[ ] watch_paths sanity check
|
|
83
|
+
[ ] HTTP / TLS reachability
|
|
84
|
+
[ ] Cloudflare proxy state check
|
|
85
|
+
[ ] Disk space on server
|
|
86
|
+
[ ] Branch mismatch check (Coolify git_branch vs expected)
|
|
87
|
+
⚠️ rdc:deploy diagnose: <root cause in one sentence> — fix: <one command>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Mode 4 — audit
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
rdc:deploy audit: fleet scan
|
|
94
|
+
[ ] Inventory join: Coolify apps ⋈ deployment_registry
|
|
95
|
+
[ ] Orphans (in one but not the other)
|
|
96
|
+
[ ] Monorepo apps missing watch_paths
|
|
97
|
+
[ ] Stale deploys (>14 days since last success)
|
|
98
|
+
[ ] Registry rows with status='broken'
|
|
99
|
+
[ ] Failed deployments in last 7 days
|
|
100
|
+
[ ] HTTP gate sweep (non-200 per domain)
|
|
101
|
+
[ ] TLS cert expiry <30 days
|
|
102
|
+
[ ] Port mismatches (ports_exposes vs actual container port)
|
|
103
|
+
[ ] Env var drift (registry.env_vars_needed vs Coolify env)
|
|
104
|
+
[ ] Branch mismatches (Coolify git_branch ≠ expected)
|
|
105
|
+
[ ] Disk space on 64.237.54.189
|
|
106
|
+
[ ] CF proxy misconfigs on *.dev.place.fund
|
|
107
|
+
[ ] Duplicate apps (same repo, multiple UUIDs)
|
|
108
|
+
|
|
109
|
+
Findings:
|
|
110
|
+
| Severity | App | Issue | Fix |
|
|
111
|
+
|----------|-----|-------|-----|
|
|
112
|
+
| HIGH | ... | ... | ... |
|
|
113
|
+
⚠️ rdc:deploy audit: N HIGH · M MED · K LOW — run `rdc:deploy audit --fix` to auto-remediate safe issues
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Severity rules:
|
|
117
|
+
- **HIGH** — user-facing down (HTTP non-200, TLS invalid, container not running)
|
|
118
|
+
- **MED** — degraded or drifting (watch_paths missing, env var drift, stale deploy, branch mismatch)
|
|
119
|
+
- **LOW** — cleanup (orphans, duplicates, registry status stale)
|
|
120
|
+
|
|
121
|
+
`--fix` auto-remediates only: missing watch_paths, registry row updates, CF cache purges. Never touches env vars, DNS, or container config without explicit confirmation.
|
|
122
|
+
|
|
123
|
+
## References
|
|
124
|
+
|
|
125
|
+
- Type-specific checklists + DNS tree + gate commands: `docs/runbooks/coolify-deploy-checklist.md`
|
|
126
|
+
- Rules / registry RPCs / hard limits: `.claude/rules/coolify-deployment.md`
|
|
127
|
+
- MCP server: `@masonator/coolify-mcp` (38 tools)
|
|
128
|
+
- Infrastructure constants:
|
|
129
|
+
```
|
|
130
|
+
Server UUID: ih386anenvvvn6fy1umtyow0
|
|
131
|
+
Server IP: 64.237.54.189
|
|
132
|
+
Dashboard: https://deploy.regendevcorp.com
|
|
133
|
+
GitHub App UUID: xdmcy60putp5h9j7k4kwg9c3
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Supersedes
|
|
137
|
+
|
|
138
|
+
`coolify-deploy` standalone skill (kept for back-compat; new work uses `rdc:deploy`).
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rdc:fixit
|
|
3
|
+
description: >-
|
|
4
|
+
Usage `rdc:fixit <description>` — sanctioned bypass for quick fixes under 5 files / 30 min. Creates minimal work item, makes fix, commits, closes. The ONLY alternative to rdc:build. For typos, config patches, hotfixes, dep bumps.
|
|
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:fixit — Sanctioned Quick Fix
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
- Typo or single-line text correction
|
|
20
|
+
- Config value change (env vars, constants, feature flags)
|
|
21
|
+
- Emergency hotfix that cannot wait for a full build cycle
|
|
22
|
+
- Dependency version bump
|
|
23
|
+
- CSS/styling tweak on a single component
|
|
24
|
+
- Broken import or export fix
|
|
25
|
+
- Single-file logic correction
|
|
26
|
+
|
|
27
|
+
## When NOT to Use — escalate to rdc:build instead
|
|
28
|
+
- New feature of any size
|
|
29
|
+
- Refactor touching >5 files
|
|
30
|
+
- Anything requiring architecture decisions
|
|
31
|
+
- Work that will take longer than 30 minutes
|
|
32
|
+
- Schema changes or migrations
|
|
33
|
+
|
|
34
|
+
## Arguments
|
|
35
|
+
- `rdc:fixit <description>` — fix the described issue
|
|
36
|
+
|
|
37
|
+
## Procedure
|
|
38
|
+
|
|
39
|
+
### 1. Scope check (mandatory — do this before touching any file)
|
|
40
|
+
|
|
41
|
+
Will this fix touch more than **5 files** or take more than **30 minutes**?
|
|
42
|
+
|
|
43
|
+
- **YES** → Stop. Use `/rdc:build` instead. Explain to the user why.
|
|
44
|
+
- **NO** → Continue.
|
|
45
|
+
|
|
46
|
+
### 2. Create a minimal work item (before touching any code)
|
|
47
|
+
|
|
48
|
+
```sql
|
|
49
|
+
SELECT insert_work_item(
|
|
50
|
+
p_title := 'fixit: <description>',
|
|
51
|
+
p_item_type := 'bug',
|
|
52
|
+
p_priority := 'urgent',
|
|
53
|
+
p_status := 'in_progress',
|
|
54
|
+
p_source := 'fixit'
|
|
55
|
+
);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Note the returned `id`.
|
|
59
|
+
|
|
60
|
+
### 3. Write the fixit session marker
|
|
61
|
+
|
|
62
|
+
Write to `{USER_HOME}/.claude/fixit.marker`:
|
|
63
|
+
```
|
|
64
|
+
<work_item_id>
|
|
65
|
+
<ISO timestamp>
|
|
66
|
+
<description>
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
This signals the Stop hook that fixit is handling its own documentation.
|
|
70
|
+
|
|
71
|
+
### 4. Make the fix
|
|
72
|
+
|
|
73
|
+
Do the minimal work. Scope creep rule: if you discover the fix requires more than originally scoped, **stop immediately**:
|
|
74
|
+
1. Close the work item: `update_work_item_status('<id>', 'blocked', '["Escalated — scope exceeded fixit threshold"]')`
|
|
75
|
+
2. Delete the marker file
|
|
76
|
+
3. Tell the user to use `/rdc:build` instead
|
|
77
|
+
|
|
78
|
+
### 5. Commit
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
git add <specific files only — never git add -A for a fixit>
|
|
82
|
+
git commit -m "fix(<scope>): <description>"
|
|
83
|
+
if [ "$RDC_TEST" != "1" ]; then
|
|
84
|
+
git push origin {development-branch}
|
|
85
|
+
else
|
|
86
|
+
echo "[RDC_TEST] skipping git push origin {development-branch}"
|
|
87
|
+
fi
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 6. Close and clean up
|
|
91
|
+
|
|
92
|
+
```sql
|
|
93
|
+
SELECT update_work_item_status('<id>'::uuid, 'done',
|
|
94
|
+
'["Fixed via rdc:fixit"]'::jsonb
|
|
95
|
+
);
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
rm {USER_HOME}/.claude/fixit.marker
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### 7. Confirm to user
|
|
103
|
+
|
|
104
|
+
Report: what was fixed, file(s) changed, commit hash. One sentence.
|
|
105
|
+
|
|
106
|
+
## Rules
|
|
107
|
+
- Work item created BEFORE any code change — never after
|
|
108
|
+
- `git add` specific files only — never `-A` or `.` for a fixit
|
|
109
|
+
- Branch: development branch always
|
|
110
|
+
- Never run `pnpm build` — not needed for a fixit
|
|
111
|
+
- If scope expands mid-fix: stop, escalate to rdc:build, don't finish under fixit
|
|
112
|
+
- Marker file must be cleaned up whether fix succeeds or escalates
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rdc:handoff
|
|
3
|
+
description: >-
|
|
4
|
+
Usage `rdc:handoff <topic>` — structured handoff from planning session to CLI agents. Produces plan doc in .rdc/plans/, work items in DB, prototype registry entry if applicable. Use when plan/prototype is finalized and ready for implementation.
|
|
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
|
+
|
|
14
|
+
# rdc:handoff — Planning → CLI Bridge
|
|
15
|
+
|
|
16
|
+
## When to Use
|
|
17
|
+
|
|
18
|
+
- A prototype has been built and needs production implementation
|
|
19
|
+
- A design decision has been made and needs to be executed
|
|
20
|
+
- Project lead says "hand this off", "give this to the CLI", "write it up"
|
|
21
|
+
- A plan exists in the conversation but hasn't been saved to disk or database yet
|
|
22
|
+
|
|
23
|
+
## What This Skill Produces
|
|
24
|
+
|
|
25
|
+
1. **Plan doc** → `.rdc/plans/<topic-slug>.md` (fallback: `.rdc/plans/<topic-slug>.md`)
|
|
26
|
+
2. **Database epic + child tasks** (with agent types and guide file refs)
|
|
27
|
+
3. **Prototype registry entry** (if a prototype was built)
|
|
28
|
+
4. **Design context entries** (for decisions made in the session)
|
|
29
|
+
|
|
30
|
+
## Procedure
|
|
31
|
+
|
|
32
|
+
### Step 1 — Extract the Plan
|
|
33
|
+
|
|
34
|
+
Identify from the conversation:
|
|
35
|
+
- What is the goal?
|
|
36
|
+
- What prototypes or designs were built? Where are they?
|
|
37
|
+
- What decisions were made? What was rejected and why?
|
|
38
|
+
- What is the sequencing (what depends on what)?
|
|
39
|
+
- Which agent types are needed?
|
|
40
|
+
|
|
41
|
+
### Step 2 — Write the Plan Doc
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
.rdc/plans/<topic-slug>.md
|
|
45
|
+
```
|
|
46
|
+
(fallback: `.rdc/plans/<topic-slug>.md` if `.rdc/` does not exist)
|
|
47
|
+
|
|
48
|
+
Template:
|
|
49
|
+
```markdown
|
|
50
|
+
# Plan: <Topic>
|
|
51
|
+
> Route: <app route or package>
|
|
52
|
+
> Status: Ready for CLI build
|
|
53
|
+
> Created: <date>
|
|
54
|
+
> Source: planning session
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## What Already Exists (Do NOT Re-implement)
|
|
59
|
+
|
|
60
|
+
[List any existing components, database tables, or files
|
|
61
|
+
that agents must use rather than recreate]
|
|
62
|
+
|
|
63
|
+
## What Was Built in Planning (Prototype)
|
|
64
|
+
|
|
65
|
+
[Describe the prototype — file location, key design decisions,
|
|
66
|
+
what to preserve vs what to adapt]
|
|
67
|
+
|
|
68
|
+
## Work Packages
|
|
69
|
+
|
|
70
|
+
### Package 1 — <Name>
|
|
71
|
+
- Agent type: frontend | backend | data | design | infra | content | cs2 | viz
|
|
72
|
+
- Guide: .rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md)
|
|
73
|
+
- Files to create/modify: [list]
|
|
74
|
+
- Deliverables: [specific outputs]
|
|
75
|
+
- Depends on: [other packages if sequential]
|
|
76
|
+
|
|
77
|
+
### Package 2 — <Name>
|
|
78
|
+
[...]
|
|
79
|
+
|
|
80
|
+
## Sequencing
|
|
81
|
+
|
|
82
|
+
Wave 1 (parallel): Package 1, Package 2
|
|
83
|
+
Wave 2 (after Wave 1): Package 3
|
|
84
|
+
|
|
85
|
+
## Definition of Done
|
|
86
|
+
|
|
87
|
+
- [ ] [specific acceptance criterion]
|
|
88
|
+
- [ ] [build verification: zero new TS errors]
|
|
89
|
+
- [ ] [functional test]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Step 3 — Create Database Epic + Tasks
|
|
93
|
+
|
|
94
|
+
```sql
|
|
95
|
+
-- Check for existing epics first
|
|
96
|
+
SELECT get_open_epics();
|
|
97
|
+
|
|
98
|
+
-- Create epic
|
|
99
|
+
SELECT insert_work_item(
|
|
100
|
+
p_title := 'EPIC: <Topic>',
|
|
101
|
+
p_description := 'See .rdc/plans/<topic-slug>.md for full spec.',
|
|
102
|
+
p_item_type := 'epic',
|
|
103
|
+
p_priority := 'high',
|
|
104
|
+
p_labels := ARRAY['<system-label>'],
|
|
105
|
+
p_source := 'planning'
|
|
106
|
+
);
|
|
107
|
+
|
|
108
|
+
-- Create tasks (one per work package)
|
|
109
|
+
SELECT insert_work_item(
|
|
110
|
+
p_title := '<Package Name>',
|
|
111
|
+
p_description := 'What: <deliverable>
|
|
112
|
+
Where: <files>
|
|
113
|
+
Agent type: <type>
|
|
114
|
+
Guide: .rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md)
|
|
115
|
+
Design doc: .rdc/plans/<topic-slug>.md (fallback: .rdc/plans/<topic-slug>.md)
|
|
116
|
+
Depends on: <other task if applicable>
|
|
117
|
+
Est: <hours>',
|
|
118
|
+
p_parent_id := '<epic-uuid>'::uuid,
|
|
119
|
+
p_item_type := 'task',
|
|
120
|
+
p_priority := 'high',
|
|
121
|
+
p_labels := ARRAY['<label>'],
|
|
122
|
+
p_estimated_hours := 2,
|
|
123
|
+
p_source := 'planning'
|
|
124
|
+
);
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Step 4 — Register Prototype (if one was built)
|
|
128
|
+
|
|
129
|
+
```sql
|
|
130
|
+
INSERT INTO prototype_registry (name, component, source_path, notes, created_by)
|
|
131
|
+
VALUES (
|
|
132
|
+
'<Component Name> v1',
|
|
133
|
+
'<ComponentName>',
|
|
134
|
+
'docs/source/<filename>.jsx',
|
|
135
|
+
'<Key design decisions, data shapes, what to preserve>',
|
|
136
|
+
'planning'
|
|
137
|
+
)
|
|
138
|
+
ON CONFLICT DO NOTHING;
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Step 5 — Record Design Decisions
|
|
142
|
+
|
|
143
|
+
```sql
|
|
144
|
+
INSERT INTO design_context (topic, context_type, summary, source, created_by)
|
|
145
|
+
VALUES
|
|
146
|
+
('<Topic>', 'decision', '<What was decided and why>', 'planning session', 'planning'),
|
|
147
|
+
('<Topic>', 'rejected', '<What was considered but not chosen, and why>', 'planning session', 'planning');
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## System Labels Reference
|
|
151
|
+
|
|
152
|
+
| Label | When |
|
|
153
|
+
|-------|------|
|
|
154
|
+
| `project-a` | Your-app-specific label |
|
|
155
|
+
| `marketing` | Marketing / outreach work |
|
|
156
|
+
| `ui` | Component library work |
|
|
157
|
+
| `data` | Schema, migrations |
|
|
158
|
+
| `infrastructure` | CI/CD, deployment |
|
|
159
|
+
| `cs2` | Core paradigm packages |
|
|
160
|
+
| `website` | Public-facing sites |
|
|
161
|
+
| `media` | Media/asset work |
|
|
162
|
+
|
|
163
|
+
## Output
|
|
164
|
+
|
|
165
|
+
When complete, tell the project lead:
|
|
166
|
+
```
|
|
167
|
+
Handoff complete:
|
|
168
|
+
- Plan: .rdc/plans/<topic-slug>.md
|
|
169
|
+
- Epic: <epic-id> ("<title>")
|
|
170
|
+
- Tasks: <N> tasks created, wave structure: [Wave 1: X, Y | Wave 2: Z]
|
|
171
|
+
- Prototype: registered at docs/source/<file> (if applicable)
|
|
172
|
+
- CLI agents will pick this up on next run.
|
|
173
|
+
```
|
package/commands/help.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
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
|
+
|
|
10
|
+
|
|
11
|
+
# rdc:help — Command Reference
|
|
12
|
+
|
|
13
|
+
Print the full usage menu below verbatim, then ask the project lead which command to run.
|
|
14
|
+
|
|
15
|
+
## Workflow — the RDC loop
|
|
16
|
+
|
|
17
|
+
| Command | Usage |
|
|
18
|
+
|---|---|
|
|
19
|
+
| `rdc:preplan` | `rdc:preplan <topic> [--unattended]` — research, no code |
|
|
20
|
+
| `rdc:plan` | `rdc:plan <topic> [--unattended]` — architecture + epic/tasks |
|
|
21
|
+
| `rdc:build` | `rdc:build <epic-id\|topic> [--unattended]` — dispatch agents, commit, close items |
|
|
22
|
+
| `rdc:review` | `rdc:review [--unattended]` — typecheck, tests, fix, commit |
|
|
23
|
+
| `rdc:report` | `rdc:report [--unattended]` — write `.rdc/reports/YYYY-MM-DD.md` |
|
|
24
|
+
| `rdc:overnight` | `rdc:overnight [epic-id\|label=X]` — chain preplan→plan→build→review→report |
|
|
25
|
+
| `rdc:status` | `rdc:status` — read-only dashboard |
|
|
26
|
+
| `rdc:fixit` | `rdc:fixit <description>` — bypass the loop, <5 files / <30 min |
|
|
27
|
+
|
|
28
|
+
## Ops
|
|
29
|
+
|
|
30
|
+
| Command | Usage |
|
|
31
|
+
|---|---|
|
|
32
|
+
| `rdc:deploy` | `rdc:deploy <slug> [build-id]` · `rdc:deploy new <slug>` · `rdc:deploy diagnose <slug>` · `rdc:deploy audit [--fix]` |
|
|
33
|
+
| `rdc:release` | `rdc:release <repo> [version]` · `rdc:release <repo> --patch\|--minor\|--major` · `rdc:release <repo> --dry-run` |
|
|
34
|
+
|
|
35
|
+
## Planning ↔ CLI bridge
|
|
36
|
+
|
|
37
|
+
| Command | Usage |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `rdc:handoff` | `rdc:handoff <topic>` — finalize plan → work items for CLI |
|
|
40
|
+
| `rdc:prototype` | `rdc:prototype <description>` — JSX mock for review |
|
|
41
|
+
| `rdc:workitems` | `rdc:workitems <add\|update\|done\|list\|epics> [args]` |
|
|
42
|
+
| `rdc:collab` | `rdc:collab --session <id>` — claude.ai bidirectional relay |
|
|
43
|
+
|
|
44
|
+
## Agent guides (dispatched by rdc:build, not user-invocable)
|
|
45
|
+
|
|
46
|
+
These live under `guides/agents/` — they are role playbooks the build skill spawns as sub-agents. You do NOT invoke them directly.
|
|
47
|
+
|
|
48
|
+
- `guides/agents/frontend.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
49
|
+
- `guides/agents/backend.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
50
|
+
- `guides/agents/data.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
51
|
+
- `guides/agents/design.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
52
|
+
- `guides/agents/infrastructure.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
53
|
+
- `guides/agents/content.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
54
|
+
- `guides/agents/cs2.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
55
|
+
- `guides/agents/viz.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
56
|
+
- `guides/agents/setup.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
57
|
+
- `guides/agents/verify.md` — [agent-only — dispatched by rdc:build, not user-invocable]
|
|
58
|
+
|
|
59
|
+
Each agent reads `.rdc/guides/agent-bootstrap.md` first, then its role guide.
|
|
60
|
+
|
|
61
|
+
## Decision tree
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Project lead says → invoke
|
|
65
|
+
─────────────────────────────────────────────────
|
|
66
|
+
"research this" / "how do others do" → rdc:preplan <topic>
|
|
67
|
+
"plan this out" / "architect" → rdc:plan <topic>
|
|
68
|
+
"build it" / "go" / "execute" → rdc:build <topic>
|
|
69
|
+
"run overnight" / "while I sleep" → rdc:overnight
|
|
70
|
+
"quick fix" / "hotfix" / "typo" → rdc:fixit <desc>
|
|
71
|
+
"review" / "is it clean" → rdc:review
|
|
72
|
+
"report" / "summarize" → rdc:report
|
|
73
|
+
"status" / "where are we" → rdc:status
|
|
74
|
+
"deploy" / "ship" → rdc:deploy <slug>
|
|
75
|
+
"release" / "publish" → rdc:release <repo>
|
|
76
|
+
"hand this off" / "give to agents" → rdc:handoff
|
|
77
|
+
"show me what it looks like" → rdc:prototype
|
|
78
|
+
"add to backlog" / "create a ticket" → rdc:workitems
|
|
79
|
+
"what commands" / "what skills" → rdc:help
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Hard rules (apply everywhere)
|
|
83
|
+
|
|
84
|
+
- NEVER `pnpm build` — crashes the machine. Typecheck with `npx tsc --noEmit`.
|
|
85
|
+
- NEVER commit to `main` without explicit approval. Default branch is `develop`.
|
|
86
|
+
- NEVER overlap agents on the same files.
|
|
87
|
+
- ALWAYS update work items in real time via RPCs (see `.claude/rules/work-items-rpc.md`).
|
|
88
|
+
- ALWAYS credentials via clauth daemon: `curl -s http://127.0.0.1:52437/get/<service>`.
|