@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.
Files changed (97) hide show
  1. package/.claude/settings.json +15 -0
  2. package/.claude-plugin/marketplace.json +21 -0
  3. package/.claude-plugin/plugin.json +11 -0
  4. package/.github/workflows/publish.yml +25 -0
  5. package/.github/workflows/self-test.yml +53 -0
  6. package/CHANGELOG.md +246 -0
  7. package/LICENSE +21 -0
  8. package/MANIFEST.md +190 -0
  9. package/README.md +188 -0
  10. package/README.sandbox.md +3 -0
  11. package/assets/watcher/viewer.html +164 -0
  12. package/commands/build.md +183 -0
  13. package/commands/collab.md +180 -0
  14. package/commands/deploy.md +138 -0
  15. package/commands/fixit.md +112 -0
  16. package/commands/handoff.md +173 -0
  17. package/commands/help.md +88 -0
  18. package/commands/overnight.md +220 -0
  19. package/commands/plan.md +158 -0
  20. package/commands/preplan.md +131 -0
  21. package/commands/prototype.md +145 -0
  22. package/commands/release.md +159 -0
  23. package/commands/report.md +99 -0
  24. package/commands/review.md +120 -0
  25. package/commands/self-test.md +107 -0
  26. package/commands/status.md +86 -0
  27. package/commands/watch.md +92 -0
  28. package/commands/workitems.md +132 -0
  29. package/guides/.gitkeep +0 -0
  30. package/guides/agent-bootstrap.md +191 -0
  31. package/guides/agents/backend.md +104 -0
  32. package/guides/agents/content.md +94 -0
  33. package/guides/agents/cs2.md +56 -0
  34. package/guides/agents/data.md +87 -0
  35. package/guides/agents/design.md +77 -0
  36. package/guides/agents/frontend.md +92 -0
  37. package/guides/agents/infrastructure.md +81 -0
  38. package/guides/agents/setup.md +279 -0
  39. package/guides/agents/verify.md +132 -0
  40. package/guides/agents/viz.md +106 -0
  41. package/guides/backend.md +146 -0
  42. package/guides/content.md +147 -0
  43. package/guides/cs2.md +190 -0
  44. package/guides/data.md +123 -0
  45. package/guides/design.md +116 -0
  46. package/guides/frontend.md +151 -0
  47. package/guides/infrastructure.md +179 -0
  48. package/guides/output-contract.md +98 -0
  49. package/hooks/no-stop-open-epics.js +125 -0
  50. package/package.json +31 -0
  51. package/rules/work-items-rpc.md +399 -0
  52. package/scripts/install-rdc-skills.js +559 -0
  53. package/scripts/install.ps1 +165 -0
  54. package/scripts/install.sh +132 -0
  55. package/scripts/lib/assertions.mjs +264 -0
  56. package/scripts/lib/manifest-schema.mjs +607 -0
  57. package/scripts/lib/runner.mjs +429 -0
  58. package/scripts/lib/sandbox.mjs +435 -0
  59. package/scripts/self-test.mjs +1108 -0
  60. package/scripts/uninstall.ps1 +77 -0
  61. package/scripts/uninstall.sh +69 -0
  62. package/scripts/update.ps1 +43 -0
  63. package/scripts/update.sh +43 -0
  64. package/scripts/watch-init.mjs +100 -0
  65. package/skills/.gitkeep +0 -0
  66. package/skills/build/SKILL.md +238 -0
  67. package/skills/collab/SKILL.md +218 -0
  68. package/skills/deploy/SKILL.md +144 -0
  69. package/skills/fixit/SKILL.md +112 -0
  70. package/skills/handoff/SKILL.md +175 -0
  71. package/skills/help/SKILL.md +101 -0
  72. package/skills/overnight/SKILL.md +220 -0
  73. package/skills/plan/SKILL.md +96 -0
  74. package/skills/preplan/SKILL.md +87 -0
  75. package/skills/prototype/SKILL.md +151 -0
  76. package/skills/release/SKILL.md +221 -0
  77. package/skills/report/SKILL.md +101 -0
  78. package/skills/review/SKILL.md +120 -0
  79. package/skills/self-test/SKILL.md +127 -0
  80. package/skills/status/SKILL.md +86 -0
  81. package/skills/tests/README.md +29 -0
  82. package/skills/tests/rdc-build.test.json +22 -0
  83. package/skills/tests/rdc-deploy.test.json +15 -0
  84. package/skills/tests/rdc-fixit.test.json +21 -0
  85. package/skills/tests/rdc-handoff.test.json +14 -0
  86. package/skills/tests/rdc-overnight.test.json +21 -0
  87. package/skills/tests/rdc-plan.test.json +14 -0
  88. package/skills/tests/rdc-preplan.test.json +15 -0
  89. package/skills/tests/rdc-prototype.test.json +14 -0
  90. package/skills/tests/rdc-release.test.json +15 -0
  91. package/skills/tests/rdc-report.test.json +14 -0
  92. package/skills/tests/rdc-review.test.json +14 -0
  93. package/skills/tests/rdc-status.test.json +16 -0
  94. package/skills/tests/rdc-workitems.test.json +15 -0
  95. package/skills/watch/SKILL.md +92 -0
  96. package/skills/workitems/SKILL.md +147 -0
  97. package/tests/validate-skills.js +183 -0
@@ -0,0 +1,77 @@
1
+ > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
2
+ > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
3
+ > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
4
+
5
+ > 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`).
6
+
7
+
8
+ # rdc:design — Design Agent
9
+
10
+ ## Mandatory First Step
11
+
12
+ Read the guide before ANY work:
13
+ ```
14
+ {PROJECT_ROOT}/.rdc/guides/design.md
15
+ (fallback: {PROJECT_ROOT}/.rdc/guides/design.md)
16
+ ```
17
+
18
+ ## Six Design Principles
19
+
20
+ 1. **User/Community First** — Serving those affected by the work
21
+ 2. **Stewardship, Not Ownership** — Components hold space, don't dominate
22
+ 3. **Verified, Not Narrated** — Real data only; no mocks
23
+ 4. **Readability at Every Gate** — Clarity scales, jargon does not
24
+ 5. **Dark by Default, Never Dark by Habit** — Dark palette signals trust
25
+ 6. **Machines Handle Calculation; Humans Handle Conscience**
26
+
27
+ ## Token System
28
+
29
+ Two-layer model:
30
+ ```
31
+ global_design_tokens (base tokens)
32
+ + brand_token_overrides (per-brand delta)
33
+ = TokenWithInheritance[] (resolved set)
34
+ ```
35
+
36
+ Token export formats: JSON flat map, CSS vars (`:root`), other format systems.
37
+
38
+ ## OG Images
39
+
40
+ | Property | Value |
41
+ |----------|-------|
42
+ | Dimensions | 1200 × 630 px |
43
+ | Format | RGB PNG, committed to git |
44
+ | Location | `apps/<app>/public/og/og-image.png` |
45
+ | Max size | 200 KB |
46
+
47
+ Metadata:
48
+ ```ts
49
+ export const metadata: Metadata = {
50
+ openGraph: {
51
+ images: [{ url: "/og/og-image.png", width: 1200, height: 630, alt: "..." }],
52
+ },
53
+ twitter: { card: "summary_large_image", images: ["/og/og-image.png"] },
54
+ };
55
+ ```
56
+
57
+ ## Variant Axes — Every Component Must Support
58
+
59
+ | Axis | Values |
60
+ |------|--------|
61
+ | Size | xs / sm / md / lg / xl |
62
+ | Shape | sharp / soft / pill / circle |
63
+ | Density | compact / comfortable / spacious |
64
+ | Motion | static / subtle / rich |
65
+
66
+ ## Animation Philosophy
67
+
68
+ - Always respect `prefers-reduced-motion` via appropriate hooks
69
+ - Token-driven durations and easing — never hardcoded values
70
+ - Keep motion purposeful, not decorative
71
+
72
+ ## Safety Rules
73
+
74
+ - Never hardcode hex colors in components — CSS variables only
75
+ - Never override tokens without a design decision recorded
76
+ - Branch: development branch — auto-commit
77
+ - NEVER run `pnpm build`
@@ -0,0 +1,92 @@
1
+ > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
2
+ > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
3
+ > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
4
+
5
+ > 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`).
6
+
7
+ > **Sandbox contract:** This guide honors `RDC_TEST=1` per `guides/agent-bootstrap.md` § RDC_TEST Sandbox Contract. Destructive external calls short-circuit under the flag.
8
+
9
+
10
+ # rdc:frontend — Frontend Agent
11
+
12
+ ## Mandatory First Step
13
+
14
+ Read the guide before ANY code:
15
+ ```
16
+ {PROJECT_ROOT}/.rdc/guides/frontend.md
17
+ (fallback: {PROJECT_ROOT}/.rdc/guides/frontend.md)
18
+ ```
19
+
20
+ ## Before Writing Any Code
21
+
22
+ 1. **Check for existing prototypes:**
23
+ ```sql
24
+ SELECT name, component, source_path, status, notes
25
+ FROM prototype_registry
26
+ WHERE status IN ('prototype', 'converting')
27
+ ORDER BY created_at DESC;
28
+ ```
29
+ If a prototype exists: **ADAPT IT. Do not build from scratch.**
30
+
31
+ 2. **Check design decisions:**
32
+ ```sql
33
+ SELECT topic, summary FROM design_context
34
+ WHERE topic ILIKE '%<task-topic>%'
35
+ ORDER BY created_at DESC;
36
+ ```
37
+
38
+ 3. **Read the app CLAUDE.md** for the target app.
39
+
40
+ ## New Component Contract
41
+
42
+ All new components follow the standard pattern:
43
+
44
+ ```tsx
45
+ "use client"; // only if uses hooks/browser APIs
46
+ import * as React from "react";
47
+ import { cva, type VariantProps } from "class-variance-authority";
48
+ import { cn } from "../lib/utils";
49
+
50
+ const myComponentVariants = cva("base-classes", {
51
+ variants: {
52
+ variant: { default: "", outline: "" },
53
+ size: { sm: "", md: "", lg: "" },
54
+ },
55
+ defaultVariants: { variant: "default", size: "md" },
56
+ });
57
+
58
+ interface MyComponentProps
59
+ extends React.HTMLAttributes<HTMLDivElement>,
60
+ VariantProps<typeof myComponentVariants> {}
61
+
62
+ const MyComponent = React.forwardRef<HTMLDivElement, MyComponentProps>(
63
+ ({ className, variant, size, ...props }, ref) => (
64
+ <div ref={ref} className={cn(myComponentVariants({ variant, size }), className)} {...props} />
65
+ )
66
+ );
67
+ MyComponent.displayName = "MyComponent";
68
+ export { MyComponent, myComponentVariants };
69
+ ```
70
+
71
+ Then re-export from the package's index.
72
+
73
+ ## Next.js Patterns
74
+
75
+ - App Router (modern) — use `src/app/`
76
+ - Dynamic imports for browser-only libs
77
+ - `transpilePackages` in next.config must list all monorepo packages used
78
+ - Auth: use the auth helpers for protected apps; pass-through for public
79
+
80
+ ## Colors — CSS Variables ONLY
81
+
82
+ Never hardcode hex values in components. Always use CSS variables from the app's globals.css.
83
+
84
+ ## Safety Rules
85
+
86
+ - Branch: development branch — auto-commit after logical blocks
87
+ - NEVER run `pnpm build` — crashes the system; code only
88
+ - NEVER overlap with other agents on the same files
89
+ - NEVER modify files outside your assigned scope
90
+ - After completing: commit with descriptive message, push *(skip push if `$RDC_TEST=1` — echo `[RDC_TEST] skipping git push` instead)*
91
+ - Update work item to `done` via `update_work_item_status()`
92
+ - Write tests FIRST — red → implement → green
@@ -0,0 +1,81 @@
1
+ > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
2
+ > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
3
+ > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
4
+
5
+ > 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`).
6
+
7
+ > **Sandbox contract:** This guide honors `RDC_TEST=1` per `guides/agent-bootstrap.md` § RDC_TEST Sandbox Contract. Destructive external calls short-circuit under the flag — Coolify deploys, DNS writes, CF cache purges, container restarts, and `git push` are all skipped. Registry SELECTs, health checks, and git reads run normally.
8
+
9
+
10
+ # rdc:infra — Infrastructure Agent
11
+
12
+ ## Mandatory First Step
13
+
14
+ Read the guide before ANY operations:
15
+ ```
16
+ {PROJECT_ROOT}/.rdc/guides/infrastructure.md
17
+ (fallback: {PROJECT_ROOT}/.rdc/guides/infrastructure.md)
18
+ ```
19
+
20
+ ## Rule 1: Never Work Around Broken Infrastructure
21
+
22
+ When a service is unavailable, STOP and report:
23
+ ```
24
+ BLOCKED: [service] is not responding.
25
+ Fix: [reconnect MCP / restart credential daemon]
26
+ I cannot proceed until this is resolved.
27
+ ```
28
+
29
+ ## Deployment Registry — Check BEFORE Any Deploy
30
+
31
+ ```sql
32
+ SELECT get_deployment('<slug>');
33
+ SELECT slug, display_name, domain, build_type, status FROM deployment_registry ORDER BY slug;
34
+ ```
35
+
36
+ **NEVER guess deployment UUIDs, domains, or build commands.**
37
+
38
+ ## Watch Paths — Must Set on Every Monorepo App
39
+
40
+ | App Type | Watch Paths |
41
+ |----------|-------------|
42
+ | Monorepo app | `apps/<n>/**` and `packages/**` |
43
+ | Static monorepo | `sites/<n>/**` |
44
+
45
+ Without watch_paths, every push rebuilds all apps.
46
+
47
+ ## Build Types
48
+
49
+ | Type | Pack | Install | Build |
50
+ |------|------|---------|-------|
51
+ | Monorepo | nixpacks | `pnpm install --frozen-lockfile` | `pnpm turbo run build --filter=<filter>` |
52
+ | Static | static | — | — |
53
+
54
+ ## New App — Checklist
55
+
56
+ 1. Look up deployment registry for existing entry
57
+ 2. Check for Coolify UUID (if exists)
58
+ 3. Set watch_paths per app type *(skip if `$RDC_TEST=1` — echo `[RDC_TEST] skipping Coolify config write`)*
59
+ 4. Deploy and verify health *(skip if `$RDC_TEST=1` — echo `[RDC_TEST] skipping Coolify deploy`)*
60
+ 5. Update deployment_registry in database
61
+
62
+ ## Environment Tiers
63
+
64
+ | Tier | Rules |
65
+ |------|-------|
66
+ | development | Free to experiment, no confirmation needed |
67
+ | staging | Confirm before deploying |
68
+ | production | ALWAYS confirm before deploy, ALWAYS verify after |
69
+
70
+ ## Git Workflow
71
+
72
+ - Branch: development branch — NEVER touch production
73
+ - Before push: `git fetch origin`
74
+ - Never force-push
75
+
76
+ ## Safety Rules
77
+
78
+ - MCP connectors first, credential daemon second
79
+ - Never print credential keys to stdout
80
+ - If daemon is down: report BLOCKED, do not work around it
81
+ - Push after every logical block *(skip if `$RDC_TEST=1` — echo `[RDC_TEST] skipping git push` instead)*
@@ -0,0 +1,279 @@
1
+ > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
2
+ > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
3
+ > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
4
+
5
+
6
+ > **Sandbox contract:** This guide honors `RDC_TEST=1` per `guides/agent-bootstrap.md` § RDC_TEST Sandbox Contract. Destructive external calls short-circuit under the flag.
7
+
8
+ # /rdc:setup — Intelligent Project Setup
9
+
10
+ Scan the current project, detect all existing configuration, and generate (or update) `.rdc/config.json` and overlay guides. Works on both new and existing projects.
11
+
12
+ ---
13
+
14
+ ## Step 1 — Scan the project
15
+
16
+ Read these files (all optional — use what exists):
17
+
18
+ | File | What to extract |
19
+ |------|----------------|
20
+ | `package.json` | `name`, `description`, stack (next/vite/etc), monorepo? |
21
+ | `pnpm-workspace.yaml` or `lerna.json` | monorepo structure |
22
+ | `git remote get-url origin` | GitHub org + repo name |
23
+ | `git branch -a` | main/develop/master detection |
24
+ | `.env.local`, `apps/**/.env.local` | `NEXT_PUBLIC_SUPABASE_URL` → extract project ref |
25
+ | `CLAUDE.md` | PROJECT_SCOPE, forbidden commands, branch rules, supabase ref |
26
+ | `.claude/rules/*.md` | existing rule files, what systems are covered |
27
+ | `docs/guides/agent-bootstrap.md` or `.rdc/guides/agent-bootstrap.md` | existing credentials pattern |
28
+ | `.rdc/config.json` | already configured? just show current state + offer update |
29
+ | `docs/guides/`, `docs/plans/`, `.rdc/guides/`, `.rdc/plans/` | existing directory structure (either layout) |
30
+ | `apps/` or `sites/` | app names, ports from package.json `dev` scripts |
31
+ | `supabase/migrations/` | schema exists? |
32
+ | `tailwind.config.*` | Tailwind confirmed |
33
+ | `vitest.config.*` or `jest.config.*` | test framework |
34
+ | `.coolify/` or coolify deployment refs | deploy platform |
35
+
36
+ Emit a structured summary of what you found:
37
+ ```
38
+ Detected:
39
+ Project name : <name>
40
+ GitHub : <org>/<repo>
41
+ Supabase ref : <ref or "not found">
42
+ Branches : main=<branch>, dev=<branch>
43
+ Stack : <next.js 14 / vite / etc>
44
+ Monorepo : yes/no (<tool>)
45
+ Apps found : <list or "none">
46
+ Guides dir : <.rdc/guides or docs/guides or "none">
47
+ Existing cfg : yes/no
48
+ Hook scope : <detected folder name or "unknown">
49
+ ```
50
+
51
+ ---
52
+
53
+ ## Step 2 — Check for gaps
54
+
55
+ List anything that was NOT found and ask the user to fill in:
56
+
57
+ ```
58
+ Missing (please provide):
59
+ [ ] Project description
60
+ [ ] Deploy platform / dashboard URL
61
+ [ ] Forbidden commands beyond defaults?
62
+ [ ] Any satellite repos (other GitHub repos in this project)?
63
+ ```
64
+
65
+ Keep questions to a minimum — only ask what can't be auto-detected.
66
+
67
+ ---
68
+
69
+ ## Step 3 — Generate .rdc/config.json
70
+
71
+ Using all detected + user-supplied values, write `.rdc/config.json`:
72
+
73
+ ```json
74
+ {
75
+ "name": "<slug>",
76
+ "version": "1.0.0",
77
+ "description": "<description>",
78
+ "rdc_skills_version": ">=0.2.0",
79
+ "hook_scope": "<project-folder-name>",
80
+ "git": {
81
+ "org": "<githubOrg>",
82
+ "repo": "<githubRepo>",
83
+ "main_branch": "<main>",
84
+ "dev_branch": "<develop>",
85
+ "auto_commit_branch": "<develop>"
86
+ },
87
+ "supabase": {
88
+ "ref": "<ref>",
89
+ "url": "https://<ref>.supabase.co",
90
+ "mcp_server": "mcp__claude_ai_Supabase__execute_sql"
91
+ },
92
+ "credentials": {
93
+ "provider": "clauth",
94
+ "daemon_url": "http://127.0.0.1:52437",
95
+ "env_paths": [".env.local"]
96
+ },
97
+ "repos": [
98
+ { "path": ".", "role": "primary", "description": "<project name>" }
99
+ ],
100
+ "paths": {
101
+ "guides": ".rdc/guides",
102
+ "plans": ".rdc/plans",
103
+ "reports": ".rdc/reports",
104
+ "research": ".rdc/research",
105
+ "state": ".rdc/state",
106
+ "systems": "docs/systems"
107
+ },
108
+ "work_items": { "enabled": true },
109
+ "constraints": {
110
+ "forbidden_commands": ["pnpm build"],
111
+ "typecheck_command": "npx tsc --noEmit",
112
+ "test_command": "npx vitest run",
113
+ "never_push_to": ["main"]
114
+ }
115
+ }
116
+ ```
117
+
118
+ If `.rdc/config.json` already exists, show a diff of proposed changes and ask before overwriting.
119
+
120
+ ---
121
+
122
+ ## Step 4 — Generate overlay guides
123
+
124
+ Create `.rdc/guides/agent-bootstrap.md` if it doesn't exist:
125
+
126
+ ```markdown
127
+ # Agent Bootstrap — <Project Name>
128
+ > Project overlay — extends rdc-skills base guide.
129
+
130
+ ## Credentials
131
+ curl -s http://127.0.0.1:52437/get/<service>
132
+
133
+ ## Git Rules
134
+ - Branch: `<devBranch>` for all work. `<mainBranch>` = production.
135
+ - GitHub org: <githubOrg>
136
+ - Auto-commit to `<devBranch>` after every logical block.
137
+
138
+ ## Supabase
139
+ Project ref: `<ref>`
140
+ Use `mcp__claude_ai_Supabase__execute_sql` — no `project_id` needed.
141
+
142
+ ## Work Items
143
+ SELECT get_open_epics();
144
+ SELECT insert_work_item(p_title := '...', p_priority := 'high');
145
+ SELECT update_work_item_status('<id>'::uuid, 'done');
146
+ Create work items BEFORE starting work.
147
+
148
+ ## Completion Report
149
+ After finishing work, output:
150
+ ## Work Summary
151
+ - Files changed: <list>
152
+ - Tests: pass/fail
153
+ - Work items updated: <list>
154
+ - Committed: <sha>
155
+ ```
156
+
157
+ If `docs/guides/` or `.rdc/guides/` already has an `agent-bootstrap.md`, read it and preserve any custom sections — only add missing sections, don't overwrite existing ones.
158
+
159
+ ---
160
+
161
+ ## Step 5 — Offer to move docs/ dirs
162
+
163
+ If `docs/guides/`, `docs/plans/`, `docs/reports/`, or `docs/research/` exist, ask:
164
+
165
+ ```
166
+ Found existing docs/ directories. Move to .rdc/ layout?
167
+ docs/guides → .rdc/guides [Y/n]
168
+ docs/plans → .rdc/plans [Y/n]
169
+ docs/reports → .rdc/reports [Y/n]
170
+ docs/research → .rdc/research [Y/n]
171
+ ```
172
+
173
+ Move only the directories the user confirms.
174
+
175
+ ---
176
+
177
+ ## Step 6 — Scaffold CLAUDE.ai.md and relay dirs
178
+
179
+ Create `.rdc/relay/from-claude-ai/`, `.rdc/relay/from-claude-code/`, and `.rdc/relay/RELAY.md`.
180
+
181
+ Create `CLAUDE.ai.md` in the project root if it doesn't exist:
182
+
183
+ ```markdown
184
+ # CLAUDE.ai — Startup Guide for claude.ai Sessions
185
+ > Read this at the start of every claude.ai session on this repo.
186
+
187
+ ## What You Are
188
+
189
+ You are a claude.ai session — the **creative studio** in this stack. You produce artifacts,
190
+ React prototypes, plans, copy, and designs. Claude Code CLI is the **build engine** — it runs
191
+ agents, manages git, enforces hooks, and ships to production.
192
+
193
+ **This is co-working, not handoff.** You produce real artifacts; Claude Code adapts and ships them.
194
+
195
+ ## Startup Sequence — every session
196
+
197
+ ```
198
+ 1. fs_read CLAUDE.ai.md ← you are here
199
+ 2. fs_read CLAUDE.md ← CLI routing, hard rules
200
+ 3. SELECT get_open_epics() ← what's in flight
201
+ 4. fs_list .rdc/relay/from-claude-code/ ← messages from Claude Code
202
+ 5. fs_read apps/<app>/CLAUDE.md ← only if working in a specific app
203
+ ```
204
+
205
+ ## Capabilities
206
+
207
+ | Capability | Tool |
208
+ |-----------|------|
209
+ | Read/write repo files | `fs_read`, `fs_write`, `fs_glob`, `fs_grep` |
210
+ | Query Supabase | Supabase MCP `execute_sql` |
211
+ | GitHub operations | Github Proxy MCP |
212
+ | Credentials | clauth MCP `clauth_get` |
213
+ | Trigger Claude Code | `monkey_dispatch` MCP |
214
+
215
+ ## Two-Claude Relay
216
+
217
+ Two channels to communicate with Claude Code:
218
+
219
+ **File relay (async):** Write to `.rdc/relay/from-claude-ai/<timestamp>-<topic>.md`:
220
+ ```
221
+ ---
222
+ from: claude-ai
223
+ to: claude-code
224
+ type: task | artifact
225
+ topic: <slug>
226
+ epic_id: <uuid>
227
+ status: pending
228
+ ---
229
+ <agent prompt or artifact content>
230
+ ```
231
+
232
+ **Live dispatch (immediate):** Fire Claude Code directly:
233
+ ```
234
+ mcp__claude_ai_clauth__monkey_dispatch({
235
+ prompt: "Read .rdc/guides/agent-bootstrap.md. Your task: ...",
236
+ cwd: "<project root>"
237
+ })
238
+ ```
239
+
240
+ Check `.rdc/relay/from-claude-code/` at startup for results and questions from Claude Code.
241
+ Full protocol: `.rdc/relay/RELAY.md`
242
+
243
+ ## Hard Rules
244
+
245
+ - **NEVER run `pnpm build`** — crashes machine
246
+ - **NEVER commit to `main`** — always `<devBranch>`
247
+ - **NEVER start work without a work item**
248
+ - **NEVER ask for credentials** — use clauth MCP directly
249
+ ```
250
+
251
+ If `CLAUDE.ai.md` already exists, read it first and add only the relay section if missing — do not overwrite existing content.
252
+
253
+ ---
254
+
255
+ ## Step 7 — Commit
256
+
257
+ ```bash
258
+ git add .rdc/ CLAUDE.ai.md
259
+ git commit -m "feat(rdc): add .rdc/ config, guides, relay scaffold and CLAUDE.ai.md
260
+
261
+ Generated by /rdc:setup scan.
262
+
263
+ Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>"
264
+ if [ "$RDC_TEST" != "1" ]; then
265
+ git push origin <devBranch>
266
+ else
267
+ echo "[RDC_TEST] skipping git push origin <devBranch>"
268
+ fi
269
+ ```
270
+
271
+ ---
272
+
273
+ ## Output
274
+
275
+ Report:
276
+ - What was detected automatically
277
+ - What was generated
278
+ - What still needs manual attention (e.g. `deploy_dashboard_url`, `satellite_repos`)
279
+ - Next step: `/rdc:status` to verify
@@ -0,0 +1,132 @@
1
+ > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
2
+ > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
3
+ > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
4
+
5
+
6
+ # rdc:verify — Verification Before Completion
7
+
8
+ > Adapted from obra/superpowers `verification-before-completion`.
9
+ > Stack-specific: uses `npx vitest run` + `npx tsc --noEmit`. NEVER `pnpm build` (crashes machine — 800MB/process).
10
+
11
+ ## The Iron Law
12
+
13
+ **NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.**
14
+
15
+ You may not say "done", "complete", "working", "fixed", "passing", or imply success until you have:
16
+
17
+ 1. **Identified** the exact commands that prove the claim
18
+ 2. **Run** those commands fresh in the current state (not memory, not "earlier", not "should")
19
+ 3. **Read** the full output
20
+ 4. **Verified** the output matches the claim
21
+ 5. Only THEN made the claim, quoting the evidence
22
+
23
+ If you cannot run the commands, say so explicitly. Do not substitute reasoning for evidence.
24
+
25
+ ## Red Flags — Stop and Verify
26
+
27
+ If you're about to write any of these, STOP:
28
+
29
+ - "should work" / "should pass" / "should be fine"
30
+ - "probably" / "seems to" / "looks good"
31
+ - "I think the tests pass"
32
+ - "the types check out" (without running tsc)
33
+ - "everything compiles" (without fresh output)
34
+ - Expressing satisfaction or wrapping up before the gate ran
35
+
36
+ ## The Gate — Commands for This Stack
37
+
38
+ Run these in order. All must pass. Capture output.
39
+
40
+ ### 1. Per-package vitest (every package touched)
41
+
42
+ ```bash
43
+ cd <repo-root>
44
+ for pkg in <changed-packages>; do
45
+ npx vitest run --dir packages/$pkg 2>&1 | tee /tmp/verify-$pkg.log
46
+ done
47
+ ```
48
+
49
+ Or for a single package:
50
+ ```bash
51
+ npx vitest run --dir packages/<pkg>
52
+ npx vitest run --dir apps/<app>
53
+ ```
54
+
55
+ **NEVER** run `pnpm build` or `pnpm test` at the repo root — spawns 5-7 node processes at 800MB each and crashes the machine.
56
+
57
+ ### 2. Typecheck per package
58
+
59
+ ```bash
60
+ npx tsc --noEmit --project packages/<pkg>/tsconfig.json
61
+ npx tsc --noEmit --project apps/<app>/tsconfig.json
62
+ ```
63
+
64
+ One package at a time. Read the full output — zero errors required.
65
+
66
+ ### 3. Lint (if configured for the package)
67
+
68
+ ```bash
69
+ npx eslint <paths> --max-warnings=0
70
+ ```
71
+
72
+ ### 4. Smoke check exports (if package adds public API)
73
+
74
+ ```bash
75
+ node -e "const m = require('<pkg>'); console.log(Object.keys(m));"
76
+ ```
77
+
78
+ Or for ESM:
79
+ ```bash
80
+ node --input-type=module -e "import * as m from '<pkg>'; console.log(Object.keys(m));"
81
+ ```
82
+
83
+ ## Rationalization Prevention
84
+
85
+ | You're tempted to think... | Reality |
86
+ |---|---|
87
+ | "Tests passed earlier, should still pass" | Run them now. Code changed. |
88
+ | "TypeScript is strict, if it built it works" | You didn't build. Run tsc. |
89
+ | "Small change, no need to retest" | Small changes are where regressions hide. |
90
+ | "I'll note it as pending verification" | No. Verify now or mark incomplete. |
91
+ | "The test file looks right" | Reading ≠ running. Run it. |
92
+
93
+ ## Output Format — Required
94
+
95
+ When reporting completion, use this structure:
96
+
97
+ ```
98
+ ## Verification Evidence
99
+
100
+ ### vitest
101
+ $ npx vitest run --dir packages/hail
102
+ Test Files 12 passed (12)
103
+ Tests 147 passed (147)
104
+
105
+ ### tsc
106
+ $ npx tsc --noEmit --project packages/hail/tsconfig.json
107
+ (no output — clean)
108
+
109
+ ### Status
110
+ PASS — safe to mark tasks done.
111
+ ```
112
+
113
+ If any step fails: do NOT claim completion. Report the failure, fix it, re-run the entire gate.
114
+
115
+ ## When to Invoke
116
+
117
+ - **End of `/rdc:build`** — mandatory final phase before marking epic done
118
+ - **During `/rdc:review`** — verification gate after fixes applied
119
+ - **Before any "done" declaration** — if an agent or supervisor is about to say work is complete
120
+ - **After merging waves** — when parallel agents finish and their work is combined
121
+
122
+ ## Agent Delegation
123
+
124
+ When dispatching a verification agent, give them:
125
+ - Exact list of packages/apps to verify
126
+ - Explicit ban on `pnpm build` / `pnpm test` / `pnpm -r`
127
+ - Required output format (above)
128
+ - Instruction: "If any command fails, STOP and report. Do not fix. Do not continue."
129
+
130
+ ## The Bottom Line
131
+
132
+ Evidence before claims. Fresh evidence, not remembered evidence. Full output, not selective reading. If you skip the gate, you are lying about the work being done.