@lifeaitools/rdc-skills 0.9.18 → 0.9.20

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rdc",
3
- "version": "0.7.9",
3
+ "version": "0.9.20",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code — plan, build, review, overnight unattended builds with work-item tracking and TDD enforcement.",
5
5
  "author": {
6
6
  "name": "LIFEAI",
package/MANIFEST.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # RDC Skills Library — Manifest
2
2
 
3
3
  **Created:** 2026-04-13
4
- **Last updated:** 2026-04-21
4
+ **Last updated:** 2026-05-01
5
5
  **Source:** Regen Root project `.claude/skills/user/`
6
- **Files:** 17 skill files (2,277 lines), 10 agent guides, 9 main guides
6
+ **Files:** 18+ skill files, 10 agent guides, command mirrors, and support scripts
7
7
  **Size:** ~480K
8
8
 
9
9
  ## Generic Conversion Summary
@@ -51,6 +51,7 @@ All skills have been converted from project-specific to generic/portable:
51
51
  ├── handoff/SKILL.md
52
52
  ├── prototype/SKILL.md
53
53
  ├── workitems/SKILL.md
54
+ ├── design/SKILL.md [RDC/Studio design, Palette Library, Rampa CLI]
54
55
  ├── help/SKILL.md
55
56
  ├── deploy/SKILL.md [Coolify deployment ops]
56
57
  ├── release/SKILL.md [atomic version release]
@@ -111,6 +112,9 @@ All skills have been converted from project-specific to generic/portable:
111
112
  - rdc:prototype — JSX prototypes
112
113
  - rdc:workitems — work item CRUD
113
114
 
115
+ ### Design (1)
116
+ - rdc:design — Studio-aware design workflow with token, Palette Library, and Rampa CLI context
117
+
114
118
  ### Reference (1)
115
119
  - rdc:help — skill index
116
120
 
package/README.md CHANGED
@@ -13,7 +13,7 @@ From any Claude Code session:
13
13
  /plugin install rdc-skills
14
14
  ```
15
15
 
16
- All 17 user-invocable skills become available as slash commands. Agent playbooks in `guides/agents/` are dispatched internally by `rdc:build` and are not user-invocable.
16
+ All user-invocable skills become available as slash commands. Agent playbooks in `guides/agents/` are dispatched internally by `rdc:build` and are not user-invocable.
17
17
 
18
18
  ### Option B — Directory plugin (LIFEAI dev machines)
19
19
 
@@ -78,6 +78,9 @@ Located in `guides/agents/` — plain markdown playbooks spawned as sub-agents:
78
78
  ### Utility Skills
79
79
  - rdc:collab
80
80
 
81
+ ### Design Skills
82
+ - rdc:design — RDC/Studio design, tokens, palettes, themes, and Rampa CLI-assisted color systems
83
+
81
84
  ### Reference
82
85
  - rdc:help
83
86
 
@@ -136,6 +139,7 @@ skills/
136
139
  handoff/SKILL.md (planning → work items)
137
140
  prototype/SKILL.md (build JSX prototype)
138
141
  workitems/SKILL.md (work item management)
142
+ design/SKILL.md (RDC/Studio design, Palette Library, Rampa CLI)
139
143
  help/SKILL.md (skill index — shows current version)
140
144
  deploy/SKILL.md (Coolify ops: deploy, new, diagnose, audit)
141
145
  release/SKILL.md (atomic package/app release)
@@ -172,7 +176,7 @@ python3 -c "import json; print(json.load(open('package.json'))['version'])"
172
176
  /rdc:help
173
177
  ```
174
178
 
175
- Current version: **v0.8.0**
179
+ Current version: **v0.9.20**
176
180
 
177
181
  ## Quick Start
178
182
 
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: rdc:design
3
+ description: >-
4
+ Usage `rdc:design <command|brief>` — RDC-owned design skill for Studio, Palette Library, token-aware UI work, and Rampa CLI-assisted color systems. Forked/adapted from Impeccable concepts without modifying installed Impeccable.
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
+ # rdc:design — RDC Design Skill
11
+
12
+ Use `skills/design/SKILL.md` as the source of truth.
13
+
14
+ ## When to Use
15
+
16
+ - Studio, Palette Library, brand-token, theme, component, or live-editor work
17
+ - Any design task that must understand RDC's real token tables and Studio routes
18
+ - UI critique, audit, polish, colorize, type, layout, or craft work in `regen-root`
19
+ - Agent-side color-system exploration using Rampa CLI
20
+
21
+ ## Arguments
22
+
23
+ - `rdc:design studio <target>`
24
+ - `rdc:design tokens <brand-or-route>`
25
+ - `rdc:design palette <brief>`
26
+ - `rdc:design theme <brief>`
27
+ - `rdc:design colorize <target>`
28
+ - `rdc:design audit <target>`
29
+ - `rdc:design critique <target>`
30
+ - `rdc:design polish <target>`
31
+ - `rdc:design craft <feature>`
package/commands/help.md CHANGED
@@ -40,6 +40,7 @@ Print the full usage menu below verbatim, then ask the project lead which comman
40
40
  | `rdc:prototype` | `rdc:prototype <description>` — JSX mock for review |
41
41
  | `rdc:workitems` | `rdc:workitems <add\|update\|done\|list\|epics> [args]` |
42
42
  | `rdc:collab` | `rdc:collab --session <id>` — claude.ai bidirectional relay |
43
+ | `rdc:design` | `rdc:design <command\|brief>` — RDC/Studio design, tokens, palettes, themes, Rampa CLI |
43
44
 
44
45
  ## Agent guides (dispatched by rdc:build, not user-invocable)
45
46
 
@@ -76,6 +77,7 @@ Project lead says → invoke
76
77
  "hand this off" / "give to agents" → rdc:handoff
77
78
  "show me what it looks like" → rdc:prototype
78
79
  "add to backlog" / "create a ticket" → rdc:workitems
80
+ "design/tokens/palette/theme" → rdc:design <command>
79
81
  "what commands" / "what skills" → rdc:help
80
82
  ```
81
83
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/rdc-skills",
3
- "version": "0.9.18",
3
+ "version": "0.9.20",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code — plan, build, review, overnight builds",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -19,13 +19,14 @@
19
19
  "type": "plugin",
20
20
  "skills": "skills/",
21
21
  "guides": "guides/",
22
- "version": "0.9.6",
22
+ "version": "0.9.20",
23
23
  "commands": "commands/"
24
24
  },
25
25
  "scripts": {
26
26
  "install-rdc-skills": "node scripts/install-rdc-skills.js",
27
27
  "uninstall:win": "powershell -ExecutionPolicy Bypass -File scripts/uninstall.ps1",
28
28
  "uninstall:unix": "bash scripts/uninstall.sh",
29
- "validate": "node tests/validate-skills.js"
29
+ "validate": "node tests/validate-skills.js",
30
+ "rdc-design": "node scripts/rdc-design-cli.mjs"
30
31
  }
31
32
  }
@@ -639,6 +639,42 @@ async function main() {
639
639
  info('[2.5] Codex — skipped (no .agents/ found; use --codex-root <path>)');
640
640
  }
641
641
 
642
+ // 2.7. Symlinks in regen-root/.claude/skills/ (FS MCP + claude.ai access)
643
+ if (codexRoot) {
644
+ const skillsLinkDir = path.join(codexRoot, '.claude', 'skills');
645
+ const skillsSrc = path.join(repoRoot, 'skills');
646
+ fs.mkdirSync(skillsLinkDir, { recursive: true });
647
+ let linked = 0;
648
+ for (const entry of fs.readdirSync(skillsSrc, { withFileTypes: true })) {
649
+ if (!entry.isDirectory()) continue;
650
+ if (!fs.existsSync(path.join(skillsSrc, entry.name, 'SKILL.md'))) continue;
651
+ const linkPath = path.join(skillsLinkDir, entry.name);
652
+ const target = path.join(skillsSrc, entry.name);
653
+ try {
654
+ if (fs.existsSync(linkPath) || (() => { try { fs.lstatSync(linkPath); return true; } catch { return false; } })()) {
655
+ fs.rmSync(linkPath, { recursive: true, force: true });
656
+ }
657
+ } catch {}
658
+ try {
659
+ if (process.platform === 'win32') {
660
+ const winLink = linkPath.replace(/\//g, '\\');
661
+ const winTarget = target.replace(/\//g, '\\');
662
+ execSync(`cmd /c mklink /J "${winLink}" "${winTarget}"`, { stdio: 'pipe' });
663
+ } else {
664
+ fs.symlinkSync(target, linkPath, 'dir');
665
+ }
666
+ linked++;
667
+ } catch {}
668
+ }
669
+ if (linked > 0) {
670
+ ok(`[2.7] Symlinks — ${linked} skill link(s) in ${skillsLinkDir}`);
671
+ } else {
672
+ info('[2.7] Symlinks — no rdc skill links created (skills may already be linked)');
673
+ }
674
+ } else {
675
+ info('[2.7] Symlinks — skipped (no codex root found)');
676
+ }
677
+
642
678
  // 3. Hook files
643
679
  const hookCount = copyDir(hooksSrc, hooksDst, '.js');
644
680
  ok(`[3/6] Hook files — ${hookCount} file(s) → ${hooksDst}`);
@@ -0,0 +1,134 @@
1
+ #!/usr/bin/env node
2
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
3
+ import { dirname, join, resolve } from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
+
6
+ const __dirname = dirname(fileURLToPath(import.meta.url));
7
+ const repoRoot = resolve(__dirname, "..");
8
+ const skillRoot = join(repoRoot, "skills", "design");
9
+ const reportsRoot = join(repoRoot, ".rdc", "reports", "rdc-design-cli");
10
+
11
+ const args = process.argv.slice(2);
12
+ const json = args.includes("--json");
13
+ const cleanArgs = args.filter((arg) => arg !== "--json");
14
+ const command = cleanArgs[0] || "help";
15
+ const brief = cleanArgs.slice(1).join(" ").trim();
16
+
17
+ const commandRefs = {
18
+ studio: ["studio-model", "lineage"],
19
+ tokens: ["studio-model", "lineage"],
20
+ palette: ["studio-model", "rampa", "lineage"],
21
+ theme: ["studio-model", "rampa", "lineage"],
22
+ colorize: ["rampa", "studio-model", "lineage"],
23
+ audit: ["studio-model", "lineage"],
24
+ critique: ["studio-model", "lineage"],
25
+ polish: ["studio-model", "lineage"],
26
+ craft: ["studio-model", "rampa", "lineage"],
27
+ help: ["lineage"],
28
+ };
29
+
30
+ function readText(path) {
31
+ return readFileSync(path, "utf8").replace(/\r\n/g, "\n");
32
+ }
33
+
34
+ function stripFrontmatter(text) {
35
+ return text.replace(/^---\n[\s\S]*?\n---\n?/, "").trim();
36
+ }
37
+
38
+ function approxTokens(text) {
39
+ return Math.ceil(text.length / 4);
40
+ }
41
+
42
+ function wordCount(text) {
43
+ const m = text.trim().match(/\S+/g);
44
+ return m ? m.length : 0;
45
+ }
46
+
47
+ function loadReferences(names) {
48
+ return names.map((name) => {
49
+ const path = join(skillRoot, "reference", `${name}.md`);
50
+ if (!existsSync(path)) throw new Error(`Missing reference: ${path}`);
51
+ return { name, path, text: readText(path) };
52
+ });
53
+ }
54
+
55
+ function buildPrompt() {
56
+ const skillPath = join(skillRoot, "SKILL.md");
57
+ if (!existsSync(skillPath)) throw new Error(`Missing skill file: ${skillPath}`);
58
+
59
+ const refs = loadReferences(commandRefs[command] || ["studio-model", "lineage"]);
60
+ const skill = stripFrontmatter(readText(skillPath));
61
+ const refText = refs.map((ref) => `## Reference: ${ref.name}\n\n${ref.text}`).join("\n\n");
62
+ const target = brief || "(no brief supplied)";
63
+
64
+ const prompt = [
65
+ "# rdc:design CLI Prompt",
66
+ "",
67
+ `Command: ${command}`,
68
+ `Brief: ${target}`,
69
+ "",
70
+ "## Operating Instructions",
71
+ "",
72
+ skill,
73
+ "",
74
+ refText,
75
+ "",
76
+ "## User Task",
77
+ "",
78
+ `Execute \`rdc:design ${command}\` for: ${target}`,
79
+ "",
80
+ "Return checklist-first output, cite concrete Studio files/routes/tables when relevant, and do not mutate upstream Impeccable.",
81
+ ].join("\n");
82
+
83
+ return { prompt, refs };
84
+ }
85
+
86
+ function writeReport(report) {
87
+ mkdirSync(reportsRoot, { recursive: true });
88
+ const stamp = new Date().toISOString().replace(/[:.]/g, "-");
89
+ const base = join(reportsRoot, `${stamp}-${command}`);
90
+ writeFileSync(`${base}.txt`, report.prompt);
91
+ writeFileSync(`${base}.json`, JSON.stringify(report, null, 2));
92
+ return { textPath: `${base}.txt`, jsonPath: `${base}.json` };
93
+ }
94
+
95
+ try {
96
+ const { prompt, refs } = buildPrompt();
97
+ const report = {
98
+ command,
99
+ brief,
100
+ generated_at: new Date().toISOString(),
101
+ references: refs.map((ref) => ({
102
+ name: ref.name,
103
+ path: ref.path,
104
+ chars: ref.text.length,
105
+ words: wordCount(ref.text),
106
+ approx_tokens: approxTokens(ref.text),
107
+ })),
108
+ totals: {
109
+ chars: prompt.length,
110
+ words: wordCount(prompt),
111
+ approx_tokens: approxTokens(prompt),
112
+ },
113
+ prompt,
114
+ };
115
+ const paths = writeReport(report);
116
+ report.paths = paths;
117
+
118
+ if (json) {
119
+ console.log(JSON.stringify(report, null, 2));
120
+ } else {
121
+ console.log(`rdc-design-cli`);
122
+ console.log(`command: ${command}`);
123
+ console.log(`brief: ${brief || "(none)"}`);
124
+ console.log(`chars: ${report.totals.chars}`);
125
+ console.log(`words: ${report.totals.words}`);
126
+ console.log(`approx_tokens: ${report.totals.approx_tokens}`);
127
+ console.log(`references: ${report.references.map((r) => r.name).join(", ")}`);
128
+ console.log(`text: ${paths.textPath}`);
129
+ console.log(`json: ${paths.jsonPath}`);
130
+ }
131
+ } catch (error) {
132
+ console.error(`rdc-design-cli error: ${error.message}`);
133
+ process.exit(1);
134
+ }
@@ -133,10 +133,12 @@ function parseFrontmatter(text) {
133
133
  }
134
134
 
135
135
  function expectedSkillName(dirOrFile) {
136
- // Accept either a directory name (rdc-foo) or legacy filename (rdc-foo.md)
136
+ // Accept current directory names (foo), legacy directory names
137
+ // (rdc-foo), or legacy filenames (rdc-foo.md).
137
138
  const base = basename(dirOrFile, ".md");
138
- if (!base.startsWith("rdc-")) return null;
139
- return "rdc:" + base.slice(4);
139
+ if (base.startsWith("rdc-")) return "rdc:" + base.slice(4);
140
+ if (base === "tests" || base.startsWith(".")) return null;
141
+ return "rdc:" + base;
140
142
  }
141
143
 
142
144
  function findReferencedFiles(body) {
@@ -183,7 +185,7 @@ function tryAutoFix(filepath, fm, text, result) {
183
185
  // Fix: filename/name mismatch — rename directory or file to match frontmatter name
184
186
  const _filename = basename(filepath);
185
187
  const _dirName = basename(dirname(filepath));
186
- const _isSubdir = _filename === "SKILL.md" && _dirName.startsWith("rdc-");
188
+ const _isSubdir = _filename === "SKILL.md";
187
189
  const _skillDirOrFile = _isSubdir ? _dirName : _filename;
188
190
  const expected = expectedSkillName(_skillDirOrFile);
189
191
  if (expected && fm.name !== expected && fm.name.startsWith("rdc:")) {
@@ -219,7 +221,7 @@ function auditSkill(filepath) {
219
221
  const filename = basename(filepath);
220
222
  // Support both flat (rdc-foo.md) and subdirectory (rdc-foo/SKILL.md) layouts
221
223
  const dirName = basename(dirname(filepath)); // "rdc-foo" when filepath is .../rdc-foo/SKILL.md
222
- const isSubdir = filename === "SKILL.md" && dirName.startsWith("rdc-");
224
+ const isSubdir = filename === "SKILL.md";
223
225
  const skillDirOrFile = isSubdir ? dirName : filename;
224
226
  const result = {
225
227
  skill: null,
@@ -469,15 +471,13 @@ function auditDuplicates(results) {
469
471
  } else {
470
472
  skillBase = basename(r.file, ".md"); // legacy
471
473
  }
472
- if (skillBase.startsWith("rdc-")) {
473
- const stem = skillBase.slice(4);
474
- if (agentBases.has(stem)) {
475
- findings.push({
476
- level: "error",
477
- code: "skill-guide-filename-collision",
478
- message: `skills/${skillBase}/SKILL.md collides with guides/agents/${stem}.md (half-reverted move?)`,
479
- });
480
- }
474
+ const stem = skillBase.startsWith("rdc-") ? skillBase.slice(4) : skillBase;
475
+ if (agentBases.has(stem)) {
476
+ findings.push({
477
+ level: "warn",
478
+ code: "skill-guide-name-overlap",
479
+ message: `skills/${skillBase}/SKILL.md overlaps guides/agents/${stem}.md; allowed when a user-facing skill delegates to an agent guide`,
480
+ });
481
481
  }
482
482
  }
483
483
  }
@@ -504,8 +504,9 @@ function auditOrphanHooks(results) {
504
504
  const sources = [
505
505
  ...readdirSync(SKILLS_DIR)
506
506
  .filter((f) => {
507
- if (!f.startsWith("rdc-")) return false;
508
- try { return statSync(join(SKILLS_DIR, f)).isDirectory(); } catch { return false; }
507
+ try {
508
+ return statSync(join(SKILLS_DIR, f)).isDirectory() && existsSync(join(SKILLS_DIR, f, "SKILL.md"));
509
+ } catch { return false; }
509
510
  })
510
511
  .map((f) => join(SKILLS_DIR, f, "SKILL.md")),
511
512
  join(REPO_ROOT, ".claude", "settings.json"),
@@ -735,8 +736,9 @@ function main() {
735
736
  let files;
736
737
  try {
737
738
  files = readdirSync(SKILLS_DIR).filter((f) => {
738
- if (!f.startsWith("rdc-")) return false;
739
- try { return statSync(join(SKILLS_DIR, f)).isDirectory(); } catch { return false; }
739
+ try {
740
+ return statSync(join(SKILLS_DIR, f)).isDirectory() && existsSync(join(SKILLS_DIR, f, "SKILL.md"));
741
+ } catch { return false; }
740
742
  });
741
743
  } catch (e) {
742
744
  console.error(`FATAL: cannot read skills dir ${SKILLS_DIR}: ${e.message}`);
@@ -745,7 +747,10 @@ function main() {
745
747
 
746
748
  if (ONLY_SKILLS.length > 0) {
747
749
  files = files.filter((f) => {
748
- return ONLY_SKILLS.some((s) => f === s.replace(":", "-"));
750
+ return ONLY_SKILLS.some((s) => {
751
+ const bare = s.replace(/^rdc:/, "");
752
+ return f === bare || f === s.replace(":", "-");
753
+ });
749
754
  });
750
755
  if (files.length === 0) {
751
756
  console.error(`no skill file matches: ${ONLY_SKILLS.join(", ")}`);
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: rdc:design
3
+ description: >-
4
+ Usage `rdc:design <command|brief>` — RDC-owned design skill for Studio, Palette Library, token-aware UI work, and Rampa CLI-assisted color systems. Forked/adapted from Impeccable concepts without modifying installed Impeccable.
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, Supabase writes, git pushes, package publishes, and deploys are skipped under `RDC_TEST=1`.
14
+
15
+ # rdc:design — RDC Design Skill
16
+
17
+ RDC-owned design execution for Studio and LIFEAI interfaces. This skill is inspired by and adapted from the Impeccable design workflow, but it is not the installed Impeccable skill and must not modify upstream Impeccable files.
18
+
19
+ ## When to Use
20
+
21
+ - Studio, Palette Library, brand-token, theme, component, or live-editor work
22
+ - Any design task that must understand RDC's real token tables and Studio routes
23
+ - UI critique, audit, polish, colorize, type, layout, or craft work in `regen-root`
24
+ - Agent-side color-system exploration using Rampa CLI
25
+ - Preparing token-aware implementation instructions for frontend/backend/data agents
26
+
27
+ Use the installed `impeccable` skill directly only when the task is a general upstream Impeccable workflow and does not need RDC Studio knowledge.
28
+
29
+ ## Arguments
30
+
31
+ - `rdc:design` — show the command menu
32
+ - `rdc:design studio <target>` — Studio-aware design task
33
+ - `rdc:design tokens <brand-or-route>` — token model, resolver, export, or governance task
34
+ - `rdc:design palette <brief>` — Palette Library or palette generation task
35
+ - `rdc:design theme <brief>` — theme generation/application task
36
+ - `rdc:design colorize <target>` — Rampa-assisted color-system work
37
+ - `rdc:design audit <target>` — design quality audit
38
+ - `rdc:design critique <target>` — UX/design critique
39
+ - `rdc:design polish <target>` — final visual and interaction pass
40
+ - `rdc:design craft <feature>` — shape and build a token-aware UI feature
41
+
42
+ ## Required References
43
+
44
+ Load only what applies, but do not skip the Studio model for Studio/token/palette/theme work.
45
+
46
+ | Task type | Required reference |
47
+ |---|---|
48
+ | Studio, tokens, palettes, themes, editor | `skills/design/reference/studio-model.md` |
49
+ | Color generation, ramps, contrast, neutrals | `skills/design/reference/rampa.md` |
50
+ | Attribution, fork boundary, Impeccable relationship | `skills/design/reference/lineage.md` |
51
+
52
+ Project docs to read for Studio work:
53
+
54
+ - `docs/systems/studio/ARCHITECTURE.md`
55
+ - `apps/studio/CLAUDE.md`
56
+ - `.claude/context/design-system-global.md`
57
+ - affected route/component/source files
58
+
59
+ ## Procedure
60
+
61
+ 1. **Classify the task.**
62
+ - `studio`, `tokens`, `palette`, and `theme` always load the Studio model.
63
+ - `palette`, `theme`, and `colorize` also load the Rampa reference.
64
+ - `audit`, `critique`, `polish`, and `craft` load Studio model when the target is inside Studio or uses Studio tokens.
65
+
66
+ 2. **Read the actual system context.**
67
+ - For Studio: read `docs/systems/studio/ARCHITECTURE.md` and `apps/studio/CLAUDE.md`.
68
+ - For token work: read `.claude/context/design-system-global.md`.
69
+ - For app UI work: read the app-specific `CLAUDE.md` if present.
70
+
71
+ 3. **Find the source of truth before proposing changes.**
72
+ - Tokens: Studio APIs, resolver files, and Supabase token tables.
73
+ - Palette Library: Studio palette APIs and theme/palette model.
74
+ - Live editor: local editor routes and clauth relay routes.
75
+ - Components: `@regen/ui`, Studio component registry, and existing local components.
76
+
77
+ 4. **Use Rampa only as proposal tooling.**
78
+ - Run Rampa CLI for color ramps, APCA/WCAG checks, tinted neutrals, status palettes, or data-viz palettes.
79
+ - Treat output as draft design material.
80
+ - Persist only after mapping into Studio token roles or Palette Library payloads.
81
+
82
+ 5. **Apply RDC design rules.**
83
+ - Use Studio tokens for production surfaces.
84
+ - Do not hardcode color/font/spacing when a token exists.
85
+ - Do not modify locked governance tokens.
86
+ - Keep product UIs compact, operational, and scannable.
87
+ - Avoid generic AI design patterns and card-heavy layouts.
88
+
89
+ 6. **Plan edits before mutating files.**
90
+ - State the files/routes/tables involved.
91
+ - Use RDC work-item protocol for non-trivial implementation.
92
+ - Keep upstream Impeccable installed and untouched.
93
+
94
+ 7. **Verify.**
95
+ - Run scoped tests only.
96
+ - For Studio: prefer route smoke checks, token API checks, and browser screenshots when UI changed.
97
+ - For CLI prompt work: run `node C:/Dev/rdc-skills/scripts/rdc-design-cli.mjs <command> <brief>` and inspect the generated report under `.rdc/reports/rdc-design-cli/`.
98
+
99
+ ## Command Menu
100
+
101
+ | Command | Purpose |
102
+ |---|---|
103
+ | `studio` | Studio-aware design/build task with token, route, and editor context |
104
+ | `tokens` | Diagnose or design token usage, resolver flow, API/export, governance |
105
+ | `palette` | Palette Library work, palette generation, external Palette Designer handoff |
106
+ | `theme` | Theme creation/application/export against Studio's canonical model |
107
+ | `colorize` | Rampa-assisted color relationships and contrast checks |
108
+ | `audit` | Technical and visual audit |
109
+ | `critique` | UX/design review |
110
+ | `polish` | Final detail pass |
111
+ | `craft` | Shape and build a token-aware interface |
112
+
113
+ ## CLI Helper
114
+
115
+ Use the local helper to see exactly how much instruction text the skill is generating before sending it through an agent:
116
+
117
+ ```powershell
118
+ node C:/Dev/rdc-skills/scripts/rdc-design-cli.mjs studio "audit the Studio palette page"
119
+ node C:/Dev/rdc-skills/scripts/rdc-design-cli.mjs palette "generate a PRT palette workflow"
120
+ node C:/Dev/rdc-skills/scripts/rdc-design-cli.mjs --json theme "RDC earth-forward light theme"
121
+ ```
122
+
123
+ The helper writes logs to:
124
+
125
+ ```text
126
+ C:/Dev/rdc-skills/.rdc/reports/rdc-design-cli/
127
+ ```
128
+
129
+ Each run includes character count, word count, approximate token count, references loaded, and the final prompt text.
130
+
131
+ ## Boundaries
132
+
133
+ - Do not edit installed Impeccable skills.
134
+ - Do not create another skill named `impeccable`.
135
+ - Do not persist Rampa output directly to production without Studio token mapping.
136
+ - Do not fork or ship Palette Designer until its license is verified.
137
+ - Do not use Studio's deprecated `/api/editor/render` route.
@@ -0,0 +1,31 @@
1
+ # RDC Design Lineage
2
+
3
+ RDC Design is inspired by and adapted from the Impeccable design workflow. Upstream Impeccable remains installed separately and untouched.
4
+
5
+ ## Rules
6
+
7
+ - Keep the installed Impeccable skill available for direct use.
8
+ - Do not rename or overwrite installed Impeccable files.
9
+ - Do not create a second skill named `impeccable`.
10
+ - Use `rdc:design` for RDC, Studio, token, Palette Library, Rampa CLI, and LIFEAI interface work.
11
+ - Preserve third-party license and notice files if source material is forked or vendored.
12
+
13
+ ## Attribution Text
14
+
15
+ Use this attribution in docs or NOTICE files when the implementation materially derives from Impeccable:
16
+
17
+ ```text
18
+ RDC Design is inspired by and adapted from the Impeccable design workflow by Paul Bakaus.
19
+ Upstream Impeccable remains a separate installed skill.
20
+ ```
21
+
22
+ ## Practical Boundary
23
+
24
+ Concepts such as audit, polish, colorize, shape, craft, and anti-pattern checks are useful workflow patterns. RDC Design replaces the generic project model with RDC-specific knowledge:
25
+
26
+ - Studio as token authority
27
+ - Palette Library as palette persistence boundary
28
+ - Rampa CLI as proposal tooling
29
+ - RDC work-item protocol
30
+ - local Studio editor/debug routes
31
+ - real LIFEAI app and package paths
@@ -0,0 +1,92 @@
1
+ # Rampa CLI Reference for RDC Design
2
+
3
+ Rampa is CLI support for agent-side color-system design. It is not the Studio palette UI and does not replace Studio's Palette Library or token tables.
4
+
5
+ ## Preflight
6
+
7
+ Prefer `npx` so agents do not depend on a global install:
8
+
9
+ ```powershell
10
+ npx @basiclines/rampa --help
11
+ ```
12
+
13
+ If installed globally:
14
+
15
+ ```powershell
16
+ rampa --help
17
+ ```
18
+
19
+ ## Usage Rules
20
+
21
+ - Use Rampa to generate proposals, not to write production tokens directly.
22
+ - Map every accepted output into Studio token roles or Palette Library payloads.
23
+ - Check contrast before recommending text/background pairs.
24
+ - Avoid pure `#000` and `#fff` as final RDC design tokens.
25
+ - Preserve locked/governance tokens.
26
+
27
+ ## Recipes
28
+
29
+ ### Theme Foundation
30
+
31
+ ```powershell
32
+ npx @basiclines/rampa -C "#548235" -L 95:10 --size=10 -O css --name=primary
33
+ npx @basiclines/rampa -C "#548235" --add=complementary -L 95:10 --size=10 -O css --name=secondary
34
+ npx @basiclines/rampa -C "#548235" -L 98:5 -S 5:10 --size=10 -O css --name=neutral
35
+ ```
36
+
37
+ Map into Studio roles:
38
+
39
+ - `primary` -> primary palette seed / `--color-primary`
40
+ - `secondary` -> secondary palette seed / `--color-secondary`
41
+ - `neutral` -> surface, text, border, muted roles after contrast review
42
+
43
+ ### Tinted Neutrals
44
+
45
+ ```powershell
46
+ npx @basiclines/rampa -C "#548235" -L 98:5 -S 5:10 --size=10 -O json --name=neutral
47
+ ```
48
+
49
+ Use for background, surface, elevated, border, muted text, and disabled states. Keep chroma low near lightness extremes.
50
+
51
+ ### Status Colors
52
+
53
+ ```powershell
54
+ npx @basiclines/rampa -C "#548235" --add=square -L 95:15 --size=10 -O css --name=status
55
+ ```
56
+
57
+ Map hues deliberately:
58
+
59
+ - green/teal -> success
60
+ - yellow/orange -> warning
61
+ - red/pink -> danger
62
+ - blue/cyan -> info
63
+
64
+ ### Data Visualization
65
+
66
+ ```powershell
67
+ npx @basiclines/rampa -C "#548235" --add=triadic --size=2 -L 50:50 -S 70:70 -O css --name=chart
68
+ npx @basiclines/rampa -C "#548235" --add=square --size=2 -L 50:50 -S 70:70 -O css --name=chart
69
+ ```
70
+
71
+ Use fixed lightness for equal visual weight. Avoid turning chart palettes into ramps unless the data is ordinal.
72
+
73
+ ### Contrast Lint
74
+
75
+ ```powershell
76
+ npx @basiclines/rampa lint --fg "#123123" --bg "#f7faf3"
77
+ npx @basiclines/rampa lint --fg "#123123" --bg "#f7faf3" --mode wcag --output json
78
+ ```
79
+
80
+ Record contrast failures in the design output. Do not bury them as "subjective" design concerns.
81
+
82
+ ## Studio Mapping Checklist
83
+
84
+ Before persistence:
85
+
86
+ - identify brand/entity
87
+ - identify palette seed roles
88
+ - map generated ramps to Studio token names
89
+ - validate light and dark values
90
+ - check text/background contrast pairs
91
+ - save through Studio Palette Library or token apply service
92
+ - verify `/api/v2/tokens/[slug]/css` changes as expected
@@ -0,0 +1,134 @@
1
+ # Studio Model for RDC Design
2
+
3
+ Studio is the token authority and live website editor for LIFEAI brands. It is not a page builder. The design skill must work with Studio's real routes, APIs, token tables, and editor/debug model.
4
+
5
+ ## Required Source Docs
6
+
7
+ Read these before Studio design work:
8
+
9
+ - `docs/systems/studio/ARCHITECTURE.md`
10
+ - `apps/studio/CLAUDE.md`
11
+ - `.claude/context/design-system-global.md`
12
+
13
+ ## Runtime Locations
14
+
15
+ - local Studio: `http://localhost:3011`
16
+ - staging Studio: `https://staged.studio.regendevcorp.com`
17
+ - production Studio: `https://studio.regendevcorp.com`
18
+
19
+ ## Brand Pages
20
+
21
+ - `/brands`
22
+ - `/brands/new`
23
+ - `/brands/[id]/colors`
24
+ - `/brands/[id]/typography`
25
+ - `/brands/[id]/spacing`
26
+ - `/brands/[id]/diff`
27
+ - `/brands/[id]/book`
28
+ - `/brands/[id]/voice`
29
+ - `/brands/[id]/assets`
30
+ - `/brands/[id]/export`
31
+ - `/brands/[id]/table-styles`
32
+
33
+ ## Editor Routes
34
+
35
+ - `/editor`
36
+ - `/editor/local/[brandSlug]`
37
+ - `/editor/local-test-target`
38
+ - legacy `/editor/[brandSlug]` may redirect to local editor unless `?legacy=1`
39
+
40
+ Read local debug docs:
41
+
42
+ - `docs/systems/studio/local-debug-agent.md`
43
+
44
+ Clauth relay route families:
45
+
46
+ - `/studio/debug/*`
47
+ - `/studio/claude/*`
48
+
49
+ ## Token APIs
50
+
51
+ - `GET /api/public/tokens/[slug]` returns legacy public token payload and CSS variables.
52
+ - `GET /api/v2/tokens/[slug]` returns DTCG/M3 token JSON.
53
+ - `GET /api/v2/tokens/[slug]/css` returns shadcn-compatible CSS vars.
54
+
55
+ Palette APIs currently start here:
56
+
57
+ - `apps/studio/src/app/api/palettes/route.ts`
58
+ - `apps/studio/src/app/api/palettes/apply/route.ts`
59
+
60
+ ## Canonical Tables
61
+
62
+ Current token and theme work should prefer v2 where available:
63
+
64
+ - `global_design_tokens_v2`
65
+ - `brand_token_overrides_v2`
66
+ - `brand_semantic_tokens`
67
+ - `brand_components`
68
+ - `brand_patterns`
69
+ - `token_inheritance_audit`
70
+
71
+ Legacy/current website token tables:
72
+
73
+ - `brand_token_overrides`
74
+ - `brand_font_assignments`
75
+ - `brand_fonts`
76
+
77
+ Legacy read-only or migration tables:
78
+
79
+ - `global_design_tokens`
80
+ - `brand_colors`
81
+ - `brand_typography`
82
+ - `brand_spacing`
83
+
84
+ Docs/narrative:
85
+
86
+ - `brand_design_docs`
87
+
88
+ Registry/hierarchy:
89
+
90
+ - `brand_entities`
91
+ - `org_entities`
92
+
93
+ ## Key Files
94
+
95
+ - `apps/studio/src/contexts/BrandStudioContext.tsx`
96
+ - `apps/studio/src/lib/token-resolver.ts`
97
+ - `apps/studio/src/lib/token-resolver-v2.ts`
98
+ - `apps/studio/src/lib/token-export.ts`
99
+ - `packages/design-tokens/src/types.ts`
100
+ - `packages/ui/src/components/WebsiteLayout.tsx`
101
+ - `packages/ui/src/styles/website-base.css`
102
+
103
+ ## BrandStudioContext
104
+
105
+ Child pages under `/brands/[id]/*` should use `useBrandStudio()` instead of re-fetching tokens. It provides:
106
+
107
+ - `brand`
108
+ - `resolved`
109
+ - `setResolved`
110
+ - `globals`
111
+ - `overrides`
112
+ - `loaded`
113
+
114
+ ## Token Rules
115
+
116
+ - Use Studio tokens for every production design decision.
117
+ - Never invent a brand slug. Query `brand_entities`.
118
+ - Never modify locked governance tokens without an explicit governance decision.
119
+ - Missing token protocol: create a work item, use closest existing token temporarily, and mark the gap.
120
+ - Production code should use `var(--color-*)` or resolved Studio token output.
121
+
122
+ ## Palette Designer Boundary
123
+
124
+ The forked Palette Designer is a separate tool. Studio should launch it only when installed/enabled/healthy. It should load and save through Palette Library APIs, then Studio should reflect saved palettes.
125
+
126
+ Do not rebuild Palette Designer inside the colors page in the first pass.
127
+
128
+ ## Deprecated Routes
129
+
130
+ Do not extend:
131
+
132
+ - `/api/editor/render`
133
+ - `/api/layout/scan` unless maintaining legacy scanner behavior
134
+ - `/api/layout/sync`
@@ -10,6 +10,12 @@ description: >-
10
10
  > No preamble. No follow-up question. No summary. No "what would you like to do?".
11
11
  > Do NOT add any text before or after the block. Emit it exactly as written. This is non-negotiable.
12
12
 
13
+ ## When to Use
14
+
15
+ - The project lead asks what RDC commands exist
16
+ - The active task is unclear and needs command selection
17
+ - A user needs syntax for planning, build, review, deployment, design, or release workflows
18
+
13
19
  ## Arguments
14
20
 
15
21
  - `rdc:help` — print the full command reference menu
@@ -43,6 +49,7 @@ description: >-
43
49
  | `rdc:prototype` | `rdc:prototype <description>` — JSX mock for review |
44
50
  | `rdc:workitems` | `rdc:workitems <add\|update\|done\|list\|epics> [args]` |
45
51
  | `rdc:collab` | `rdc:collab --session <id>` — claude.ai bidirectional relay |
52
+ | `rdc:design` | `rdc:design <command\|brief>` — RDC/Studio design, tokens, palettes, themes, Rampa CLI |
46
53
 
47
54
  ## Agent guides (dispatched by rdc:build, not user-invocable)
48
55
 
@@ -79,6 +86,7 @@ Project lead says → invoke
79
86
  "hand this off" / "give to agents" → rdc:handoff
80
87
  "show me what it looks like" → rdc:prototype
81
88
  "add to backlog" / "create a ticket" → rdc:workitems
89
+ "design/tokens/palette/theme" → rdc:design <command>
82
90
  "what commands" / "what skills" → rdc:help
83
91
  ```
84
92
 
@@ -0,0 +1,14 @@
1
+ {
2
+ "manifest_version": 1,
3
+ "skill": "rdc:design",
4
+ "description": "RDC Design provides Studio-aware design instructions and CLI prompt logging under RDC_TEST.",
5
+ "fixture": {
6
+ "prompt": "rdc:design studio audit the palette page",
7
+ "env": { "RDC_TEST": "1" }
8
+ },
9
+ "assertions": {
10
+ "exit_code": 0,
11
+ "stdout_contains": ["Verdict"]
12
+ },
13
+ "teardown": { "reset_branch": true }
14
+ }