@lifeaitools/rdc-skills 0.35.6 → 0.35.8

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 (107) hide show
  1. package/.claude-plugin/plugin.json +180 -44
  2. package/.github/workflows/self-test.yml +34 -34
  3. package/CHANGELOG.md +393 -393
  4. package/MANIFEST.md +224 -224
  5. package/README.md +10 -3
  6. package/clauth-plugin.json +1 -1
  7. package/commands/analyze-tests.md +1 -4
  8. package/commands/build.md +1 -2
  9. package/commands/check-clean-code.md +1 -3
  10. package/commands/check-packages.md +1 -3
  11. package/commands/collab.md +1 -2
  12. package/commands/compare-compliance.md +1 -4
  13. package/commands/deploy.md +1 -2
  14. package/commands/design.md +1 -2
  15. package/commands/edit.md +1 -2
  16. package/commands/fixit.md +1 -2
  17. package/commands/flow.md +1 -2
  18. package/commands/full-analysis.md +1 -7
  19. package/commands/get-refactoring-plan.md +1 -5
  20. package/commands/handoff.md +1 -2
  21. package/commands/help.md +1 -3
  22. package/commands/mode.md +1 -2
  23. package/commands/overnight.md +1 -2
  24. package/commands/plan.md +1 -2
  25. package/commands/preplan.md +1 -2
  26. package/commands/quick-check.md +1 -4
  27. package/commands/recover.md +1 -2
  28. package/commands/release.md +2 -2
  29. package/commands/review-arch.md +1 -4
  30. package/commands/review.md +1 -5
  31. package/commands/status.md +1 -2
  32. package/commands/suggest-patterns.md +1 -4
  33. package/commands/validate-solid.md +1 -3
  34. package/guides/agents/backend.md +102 -102
  35. package/guides/agents/content.md +94 -94
  36. package/guides/agents/cs2.md +56 -56
  37. package/guides/agents/data.md +86 -86
  38. package/guides/agents/design.md +77 -77
  39. package/guides/agents/frontend.md +91 -91
  40. package/guides/agents/infrastructure.md +81 -81
  41. package/guides/agents/setup.md +272 -272
  42. package/guides/agents/verify.md +119 -119
  43. package/guides/agents/viz.md +106 -106
  44. package/guides/orchestration-epic.md +17 -17
  45. package/hooks/require-work-item-on-commit.js +69 -4
  46. package/package.json +1 -1
  47. package/scripts/gen-skill-descriptions.mjs +190 -0
  48. package/scripts/self-test.mjs +1459 -1459
  49. package/skills/architecture-reviewer/SKILL.md +1 -11
  50. package/skills/behavior-audit/SKILL.md +1 -1
  51. package/skills/behavior-audit/agents/openai.yaml +4 -4
  52. package/skills/brochure/SKILL.md +1 -1
  53. package/skills/brochurify/SKILL.md +1 -1
  54. package/skills/build/SKILL.md +1 -1
  55. package/skills/channel-formatter/SKILL.md +1 -1
  56. package/skills/clean-code-analyzer/SKILL.md +1 -6
  57. package/skills/co-develop/SKILL.md +1 -1
  58. package/skills/collab/SKILL.md +1 -1
  59. package/skills/convert/SKILL.md +1 -1
  60. package/skills/deploy/SKILL.md +1 -1
  61. package/skills/design/SKILL.md +1 -1
  62. package/skills/edit/SKILL.md +1 -1
  63. package/skills/env/SKILL.md +1 -1
  64. package/skills/extract-verifier-rules/SKILL.md +1 -1
  65. package/skills/fixit/SKILL.md +1 -1
  66. package/skills/fs-mcp/SKILL.md +1 -1
  67. package/skills/handoff/SKILL.md +1 -1
  68. package/skills/help/SKILL.md +1 -1
  69. package/skills/housekeeping/SKILL.md +1 -1
  70. package/skills/lifeai-brochure-author/SKILL.md +1 -1
  71. package/skills/new-model/SKILL.md +1 -7
  72. package/skills/onramp/SKILL.md +1 -1
  73. package/skills/overnight/SKILL.md +1 -1
  74. package/skills/package-design/SKILL.md +1 -4
  75. package/skills/pattern-advisor/SKILL.md +1 -6
  76. package/skills/pattern-refactoring-guide/SKILL.md +1 -4
  77. package/skills/plan/SKILL.md +1 -1
  78. package/skills/preplan/SKILL.md +1 -1
  79. package/skills/prototype/SKILL.md +1 -1
  80. package/skills/refactor/SKILL.md +1 -1
  81. package/skills/regen-media/SKILL.md +1 -1
  82. package/skills/release/SKILL.md +1 -1
  83. package/skills/report/SKILL.md +1 -1
  84. package/skills/review/SKILL.md +1 -1
  85. package/skills/rpms-filemap/SKILL.md +1 -1
  86. package/skills/self-test/SKILL.md +1 -1
  87. package/skills/solid-validator/SKILL.md +1 -6
  88. package/skills/status/SKILL.md +1 -1
  89. package/skills/terminal-config/SKILL.md +1 -1
  90. package/skills/testing-strategy/SKILL.md +1 -6
  91. package/skills/tests/onramp.test.json +101 -101
  92. package/skills/tests/rdc-env.test.json +12 -12
  93. package/skills/tests/rdc-new-model.test.json +12 -12
  94. package/skills/tests/rdc-refactor.test.json +29 -29
  95. package/skills/tests/rdc-regen-media.test.json +29 -29
  96. package/skills/watch/SKILL.md +1 -1
  97. package/skills/workitems/SKILL.md +1 -1
  98. package/tests/clauth-plugin-postinstall.test.mjs +14 -1
  99. package/tests/help-surface.test.mjs +2 -2
  100. package/tests/require-work-item-on-commit.test.mjs +54 -0
  101. package/commands/open.md +0 -84
  102. package/commands/prototype.md +0 -145
  103. package/commands/report.md +0 -99
  104. package/commands/self-test.md +0 -113
  105. package/commands/watch.md +0 -98
  106. package/commands/workitems.md +0 -149
  107. package/ecosystem.local.config.cjs +0 -18
@@ -1,145 +0,0 @@
1
- ---
2
- name: prototype
3
- description: >-
4
- Usage `rdc:prototype <description>` — build JSX/TSX prototype for review before CLI handoff. Saves to docs/source/, registers in prototype_registry. Use for "mock this up", "show me what it looks like". Reference material only, not production.
5
- ---
6
-
7
- > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
8
- > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
9
- > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
10
-
11
- > If dispatching subagents or running as a subagent: read `{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md` first (fallback: `{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md`).
12
-
13
-
14
- # rdc:prototype — Prototype Builder
15
-
16
- ## When to Use
17
-
18
- - Project lead wants to see a design before committing to implementation
19
- - A new component or page needs visual review before wiring to database
20
- - Testing a data layout or interaction pattern
21
- - Building a visual mockup for approval
22
-
23
- ## What This Produces
24
-
25
- - JSX/TSX prototype file → `docs/source/<ComponentName>.jsx`
26
- - prototype_registry entry in database
27
- - design_context entries for key decisions
28
-
29
- ## Prototype Rules
30
-
31
- 1. **Self-contained** — no real database calls. Mock data arrays only.
32
- 2. **Realistic data** — mock data must reflect actual schema field names
33
- 3. **Full fidelity** — looks exactly like the final product should look
34
- 4. **Annotated** — key design decisions commented at the top of the file
35
- 5. **Handoff-ready** — includes the spec block at the bottom
36
-
37
- ## Standard Mock Data Pattern
38
-
39
- Use realistic field names from the actual database schema:
40
-
41
- ```tsx
42
- // Mock data — mirrors your_table
43
- const MOCK_DATA = [
44
- {
45
- id: "uuid-1",
46
- slug: "example-slug",
47
- name: "Example Name",
48
- description: "...",
49
- location_city: "City",
50
- location_state: "State",
51
- status: "active",
52
- category: "example-category",
53
- total_capital: 1000000,
54
- total_area: 2400,
55
- deploy_url: "https://...",
56
- tags: ["tag1", "tag2"],
57
- alignment: ["value1", "value2"],
58
- web_visible: true,
59
- ticker_label: "LABEL",
60
- ticker_capital: "$1M",
61
- scores: { field1: 82, field2: 71, field3: 68 },
62
- },
63
- ];
64
- ```
65
-
66
- ## File Header Template
67
-
68
- ```tsx
69
- /**
70
- * <ComponentName>.jsx — PROTOTYPE
71
- * ─────────────────────────────────────────────
72
- * Status: Prototype — reference only, not production code
73
- * Created: <date>
74
- * Route (production target): <app-route>
75
- *
76
- * Key design decisions:
77
- * 1. <Decision and rationale>
78
- * 2. <Decision and rationale>
79
- *
80
- * What to preserve in production:
81
- * - <Design element>
82
- * - <Interaction pattern>
83
- *
84
- * What production implementation must do differently:
85
- * - Replace mock data with database query
86
- * - Import <Component> from @regen/ui instead of inline implementation
87
- * - Extract <Part> into shared component at src/components/<name>
88
- *
89
- * Production agent type: frontend | backend | data | viz
90
- * Production guide: .rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md)
91
- */
92
- ```
93
-
94
- ## File Footer Template
95
-
96
- ```tsx
97
- // ─── HANDOFF SPEC ─────────────────────────────
98
- // Production files:
99
- // apps/<app>/src/app/<route>/page.tsx (server component)
100
- // apps/<app>/src/app/<route>/<Name>Client.tsx (client component)
101
- // apps/<app>/src/app/<route>/<Name>Wrapper.tsx (modal/state shell, if needed)
102
- //
103
- // Design system components to use (do not re-implement):
104
- // <ComponentName> — <what it does>
105
- //
106
- // Database tables:
107
- // <table> — <what to query>
108
- //
109
- // Form field schema additions needed:
110
- // <table>.<column> — <input_type> — <label>
111
- ```
112
-
113
- ## After Building — Register and Record
114
-
115
- ```sql
116
- -- Register prototype
117
- INSERT INTO prototype_registry (name, component, source_path, notes, created_by)
118
- VALUES (
119
- '<Name> Prototype v1',
120
- '<ComponentName>',
121
- 'docs/source/<ComponentName>.jsx',
122
- '<One-line description of key design: layout, data shape, interactions>',
123
- 'planning'
124
- );
125
-
126
- -- Record design decisions
127
- INSERT INTO design_context (topic, context_type, summary, source, created_by)
128
- VALUES
129
- ('<Topic>', 'prototype', 'Prototype built with <X> layout and <Y> interaction pattern', 'planning', 'planning'),
130
- ('<Topic>', 'decision', '<Key decision made during prototyping and why>', 'planning', 'planning');
131
- ```
132
-
133
- ## Handoff
134
-
135
- After prototype is approved, use `rdc:handoff` to create the plan doc and database work items.
136
-
137
- Or tell the project lead:
138
- ```
139
- Prototype complete.
140
- File: docs/source/<ComponentName>.jsx
141
- Registered: prototype_registry
142
-
143
- To hand off to CLI build: use /rdc:handoff
144
- To build immediately: use /rdc:build
145
- ```
@@ -1,99 +0,0 @@
1
- ---
2
- name: report
3
- description: >-
4
- Usage `rdc:report [--unattended]` — nightly markdown report, writes to .rdc/reports/YYYY-MM-DD.md. Covers completed/open work items, per-project progress, infra status, git stats, test counts.
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:report — Nightly Report
15
-
16
- ## When to Use
17
- - End of a build session
18
- - Project lead asks for a report or summary
19
- - Nightly scheduled task
20
- - Before handing off to another session
21
- - Called by `rdc:overnight` at the end of every session
22
-
23
- ## Arguments
24
- - `rdc:report` — interactive, prints summary to conversation
25
- - `rdc:report --unattended` — silent mode, writes file only, returns status block
26
-
27
- ## Procedure
28
-
29
- 1. **Query completed work (last 24h or since last report):**
30
- ```sql
31
- SELECT title, labels, completed_at, notes
32
- FROM work_items
33
- WHERE completed_at > now() - interval '24 hours'
34
- ORDER BY completed_at;
35
- ```
36
-
37
- 2. **Query open work:**
38
- ```sql
39
- SELECT title, status, priority, labels
40
- FROM work_items
41
- WHERE status IN ('todo', 'in_progress', 'blocked')
42
- ORDER BY priority, created_at;
43
- ```
44
-
45
- 3. **Git stats (since last report or last 24h):**
46
- ```bash
47
- git log --since="24 hours ago" --shortstat --oneline
48
- git diff --shortstat HEAD~N # where N = commits in window
49
- ```
50
-
51
- 4. **Infrastructure deployment snapshot** (if MCP available):
52
- - List all apps with current status
53
- - Flag any failures
54
-
55
- 5. **Write report** to `.rdc/reports/YYYY-MM-DD.md` (fallback: `.rdc/reports/YYYY-MM-DD.md` if `.rdc/` does not exist):
56
- ```markdown
57
- # Daily Report — YYYY-MM-DD
58
-
59
- ## Completed Today
60
- | Item | Project | Priority |
61
-
62
- ## Git Activity
63
- - Commits: N
64
- - Files changed: N
65
- - Lines: +N / -N
66
-
67
- ## Open Work
68
- ### Urgent (N)
69
- ### High (N)
70
- ### Normal (N)
71
-
72
- ## Deployment Status
73
- | App | Domain | Status |
74
-
75
- ## Blockers
76
- <any blocked items or failed deploys>
77
-
78
- ## Next Session Recommendation
79
- <highest priority unstarted work>
80
- ```
81
-
82
- 6. **Check if weekly rollup needed** (if today is Sunday):
83
- - Aggregate daily reports for the week
84
- - Write `.rdc/reports/week-YYYY-WNN.md` (fallback: `.rdc/reports/week-YYYY-WNN.md`)
85
-
86
- 7. **Report results:**
87
- - Interactive: print summary to conversation
88
- - Unattended: no interactive output, emit status block only:
89
- ```
90
- REPORT_STATUS: { report_path, completed_count, open_count, blockers_count }
91
- ```
92
-
93
- ## Rules
94
- - Reports go in `.rdc/reports/` (fallback: `.rdc/reports/`) — create dir if missing
95
- - One report per day — overwrite if re-run same day
96
- - Keep under 100 lines — scannable, not exhaustive
97
- - Include links to relevant CLAUDE.md files where helpful
98
- - Always end with "Next Session Recommendation"
99
- - Unattended: NEVER print to conversation — write file only
@@ -1,113 +0,0 @@
1
- ---
2
- name: self-test
3
- description: >-
4
- Usage `rdc:self-test [--strict] [--skill <name>] [--json] [--fix] [--tier2] [--parallel <n>] [--quick]` — validates every rdc-*.md skill: frontmatter, Usage marker, name↔filename match, referenced guides/rules/hooks exist, output contract banner, plugin manifest, duplicate-name + collision checks. Tier 1 static lint; Tier 2 behavioral runs via headless Claude or Codex in isolated worktrees + Supabase branch. Run before every release.
5
- ---
6
-
7
- > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
8
- > Checklist-only output. No tool-call narration. No raw runner dumps — summarize.
9
- > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
10
-
11
-
12
- # rdc:self-test — Skill Library Self-Test (Tier 1)
13
-
14
- ## When to Use
15
- - Before every `rdc:release rdc-skills` tag push
16
- - After editing any skill description or frontmatter
17
- - When a skill mysteriously disappears from the menu (backtick bug repro)
18
- - In CI on every rdc-skills PR (once wired)
19
-
20
- ## Tiers
21
-
22
- | Tier | What it checks | Status |
23
- |------|----------------|--------|
24
- | Tier 1 | Static lint — frontmatter, Usage line, referenced files, name match | ✅ live |
25
- | Tier 2 | Behavioral — headless Claude or Codex runs each skill in sandbox, asserts artifacts | ✅ live — 30 manifests; acceptance harness records transcripts, tool calls, artifacts, and lessons learned |
26
- | Tier 3 | Golden checklists — snapshot output format, regress on drift | 🔒 future |
27
-
28
- ## Procedure (Tier 1)
29
-
30
- 1. **Run the linter:**
31
- ```bash
32
- node {RDC_SKILLS_ROOT}/scripts/self-test.mjs
33
- ```
34
-
35
- 2. **Interpret exit codes:**
36
- - `0` = all skills pass
37
- - `1` = at least one FAIL or (in `--strict` mode) at least one WARN
38
- - `2` = runner itself crashed (e.g., skills dir unreadable)
39
- - `3` = `.claude-plugin/plugin.json` missing entirely (distinct from skill failures)
40
-
41
- 3. **Common findings and fixes:**
42
-
43
- | Finding code | Cause | Fix |
44
- |---|---|---|
45
- | `description-backtick-leading` | Folded YAML starts with `` ` `` — parser drops skill | Rewrite description to start with a word |
46
- | `usage-marker-missing` | No `` Usage `rdc:name <args>` `` in description | Front-load arg contract |
47
- | `usage-marker-mismatch` | `Usage` line references a different skill's name (copy-paste drift) | Fix the skill name in the Usage marker |
48
- | `name-filename-mismatch` | frontmatter `name:` ≠ filename | `--fix` auto-renames; or rewrite name |
49
- | `guide-not-found` / `rule-not-found` / `hook-not-found` | Dead reference in skill body | Create file or fix link |
50
- | `banner-missing` | Skill missing OUTPUT CONTRACT banner | `--fix` auto-inserts |
51
- | `manifest-missing` / `manifest-version-mismatch` | `.claude-plugin/plugin.json` missing or out-of-sync with `package.json` | Create/update manifest |
52
- | `duplicate-skill-name` / `skill-guide-filename-collision` | Two skills claim same name, or skill collides with agent guide | Rename one |
53
- | `orphan-hook` | File under `hooks/` isn't referenced by any skill, settings.json, or plugin.json | Wire it up or delete |
54
-
55
- 4. **Flags:**
56
- - `--strict` — promotes warnings to failures (use in CI and before release)
57
- - `--skill <name>` — run against a single skill (e.g. `--skill rdc:build`)
58
- - `--json` — machine-readable schema v2 (per-skill `findings[]` with `code` + `level`, plugin_manifest block, global_findings, summary.exit_code). Consumed by Tier 2 runner as pre-gate.
59
- - `--fix` — auto-repair fixable findings: insert missing OUTPUT CONTRACT banner, rename files to match frontmatter name. Prints `FIXED:` lines + touched file list so you can git diff + commit. Backtick-leading descriptions are NOT auto-fixed (need human rewrite).
60
-
61
- 5. **Report to the project lead:**
62
- ```
63
- Self-test: X/Y pass, Z warnings, W failures
64
- Failures: <list>
65
- Verdict: PASS | FAIL
66
- ```
67
-
68
- ## Procedure (Tier 2)
69
-
70
- Tier 2 runs each skill end-to-end in an isolated sandbox and asserts on observed state (files touched, commits made, work items, exit code). Build acceptance additionally records all observable engine events/tool calls, assistant output, stdout/stderr artifacts, lessons learned, and next build optimizations. It supports `--engine claude` and `--engine codex`; both engines use the same manifests, worktree sandbox, JSONL evidence, and Markdown report. Use it before shipping behavioral changes — Tier 1 alone can't catch runtime drift.
71
-
72
- 1. **Prerequisites:**
73
- - `claude` CLI on PATH for Claude runs (headless mode: `claude --print`)
74
- - `codex` CLI on PATH for Codex runs (headless mode: `codex exec --json`)
75
- - clauth daemon unlocked (`curl -s http://127.0.0.1:52437/ping`)
76
- - Supabase MCP reachable (runner creates a throwaway test branch)
77
- - Clean git tree in `rdc-skills` (worktrees are added under `.rdc/sandbox/<run-id>/`)
78
-
79
- 2. **Run:**
80
- ```bash
81
- node scripts/self-test.mjs --tier2 # all skills with manifests
82
- node scripts/self-test.mjs --tier2 --skill rdc:build # single skill
83
- node scripts/self-test.mjs --tier2 --parallel 3 # up to 3 skills in parallel
84
- node scripts/self-test.mjs --tier2 --quick # skip long-running assertions
85
- node scripts/acceptance.mjs --skill rdc:build # build acceptance with JSONL/tool-call evidence
86
- node scripts/acceptance.mjs --engine codex --skill rdc:build
87
- ```
88
-
89
- 3. **What it does:**
90
- - Runs Tier 1 as a pre-gate (fails fast if static lint fails)
91
- - Creates one Supabase test branch for the run
92
- - For each skill: `git worktree add` into `.rdc/sandbox/<run-id>/<skill>/`, sets `RDC_TEST=1`, invokes the selected headless engine with the skill prompt, waits for exit
93
- - Asserts per the skill's manifest: exit code, files touched, commits made, stdout patterns
94
- - Build acceptance writes JSONL evidence and extracts tool calls from the engine stream
95
- - Cleans up worktrees + deletes the Supabase branch at the end (even on failure)
96
-
97
- 4. **Reports:**
98
- - `.rdc/reports/self-test-tier2-<iso>.json` — full per-skill result, findings, timings
99
- - `.rdc/reports/acceptance-*.jsonl` and `.rdc/reports/acceptance-*.md` — build acceptance evidence, transcript artifact pointers, lessons learned, and next build optimizations
100
- - Exit codes: `0` pass, `1` fail (one or more skills failed assertions), `2` runner error (couldn't set up sandbox / branch)
101
-
102
- 5. **Adding a new manifest:**
103
- - Create `skills/tests/<skill>.test.json` (one per skill, colocated)
104
- - Validate the shape against the schema at `scripts/lib/manifest-schema.mjs`
105
- - Test it in isolation: `node scripts/self-test.mjs --tier2 --skill rdc:name`
106
- - Commit the manifest alongside any skill body changes
107
-
108
- ## Rules
109
- - Run Tier 1 **before every `rdc:release rdc-skills`** — it catches the backtick-drift class of bugs that break the skill menu silently.
110
- - Use `--strict` in CI. Warnings matter in the release path.
111
- - Do NOT skip findings by relaxing the linter. Fix the skill.
112
- - Run Tier 2 before tagging a release. Gate the tag if any manifested skill fails.
113
- - Headless sessions must not steal focus. The runner uses hidden process launch options where supported; if windows flash or focus is grabbed, inspect `scripts/lib/runner.mjs` before changing skill behavior.
package/commands/watch.md DELETED
@@ -1,98 +0,0 @@
1
- ---
2
- name: watch
3
- description: >-
4
- Usage `rdc:watch` — initialize a session-log viewer and report its path; open it only during attended, non-test use. Zero infra, pure filesystem + static HTML.
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:watch — Session Log Watcher
15
-
16
- ## When to Use
17
- - Start of any long-running session where Dave needs visibility into what you're doing
18
- - Before `rdc:overnight`, `rdc:build` on a large epic, or any multi-hour grind
19
- - Anytime the user asks for "a log", "a viewer", "tail", or "what are you doing right now"
20
-
21
- ## Procedure
22
-
23
- 1. **Initialize the log and viewer.** Run the helper script from the plugin directory in the user's current project:
24
- ```bash
25
- node ${CLAUDE_PLUGIN_ROOT}/scripts/watch-init.mjs
26
- ```
27
- (If `CLAUDE_PLUGIN_ROOT` is not set, resolve the plugin path from your invocation context or the installed plugin cache.)
28
-
29
- 2. **Parse the output.** The script prints `run_id`, `log_path`, `current`, `viewer`, and `open_hint`. Capture `log_path` and `viewer` for the rest of the session.
30
-
31
- 3. **Open the viewer in the browser, unless running under `RDC_TEST=1`.**
32
- - Normal attended use: run the exact `open_hint` line from the script output. On Windows that's `start "" "<viewer-path>"`.
33
- - `RDC_TEST=1`: do not run `open_hint`, `start`, `open`, `xdg-open`, or any focus/window API. Report the viewer path only.
34
-
35
- 4. **Report to the user.** One line:
36
- ```
37
- watcher live at <viewer-path> — tailing <log-path>
38
- ```
39
- In `RDC_TEST=1`, say:
40
- ```
41
- watcher initialized at <viewer-path> — not opened because RDC_TEST=1
42
- ```
43
-
44
- 5. **Append one line per substantive action for the rest of the session.** Use the documented format — one line, no multi-line payloads:
45
- ```
46
- [<ISO-timestamp>] [<kind>] <message>
47
- ```
48
- Append to BOTH `<log-path>` (the full history) AND `current.log` (what the viewer polls). The viewer diffs `current.log` by length and only appends new lines.
49
-
50
- ### Log format
51
-
52
- - `ISO-timestamp` — `new Date().toISOString()`
53
- - `kind` — one of: `dispatch`, `commit`, `test`, `error`, `note`, `banner`
54
- - `message` — single line, no newlines. Keep under ~200 chars.
55
-
56
- ### Kinds
57
-
58
- | Kind | When to append |
59
- |------|----------------|
60
- | `dispatch` | About to dispatch a subagent — include role + epic/task id |
61
- | `commit` | After a git commit lands — include short sha + subject |
62
- | `test` | Test run kicked off or result came back |
63
- | `error` | Anything that failed — include what and why in one line |
64
- | `note` | General progress ticks (reading files, analyzing, planning) |
65
- | `banner` | Session start/end markers, major phase changes |
66
-
67
- ### Examples
68
-
69
- ```
70
- [2026-04-15T23:14:02.318Z] [dispatch] frontend agent → epic abc123 task 4 (rebuild DynamicForm)
71
- [2026-04-15T23:17:41.902Z] [commit] 3f2a1b9 feat(marketing-engine): DynamicForm rhf+zod
72
- [2026-04-15T23:18:05.113Z] [test] pnpm --filter @regen/rdc-marketing-engine test
73
- [2026-04-15T23:18:41.002Z] [error] tsc: src/components/Form.tsx:42 — Property 'foo' does not exist
74
- [2026-04-15T23:19:00.000Z] [note] retrying with corrected type import
75
- [2026-04-15T23:45:10.000Z] [banner] Phase 2 complete — moving to review
76
- ```
77
-
78
- ### Appending from bash (Windows-safe)
79
-
80
- ```bash
81
- printf '[%s] [%s] %s\n' "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" "dispatch" "your message" >> "$LOG_PATH"
82
- printf '[%s] [%s] %s\n' "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" "dispatch" "your message" >> "$CURRENT_PATH"
83
- ```
84
-
85
- Or from Node:
86
- ```js
87
- import { appendFileSync } from "node:fs";
88
- const line = `[${new Date().toISOString()}] [note] ${msg}\n`;
89
- appendFileSync(logPath, line);
90
- appendFileSync(currentPath, line);
91
- ```
92
-
93
- ## Notes
94
-
95
- - Log files live in the **user's project**, not the rdc-skills repo. Path: `<projectRoot>/.rdc/session-log/`
96
- - Each invocation creates a **new run id** and overwrites `current.log`. Prior run logs remain on disk as `<runId>.log`.
97
- - The viewer is a single static HTML file polling `current.log` via `fetch()` every 2s — no server, no deps.
98
- - This skill does NOT replace `rdc:report` (the end-of-session Obsidian writeup). It's a live tail for attended or semi-attended sessions.
@@ -1,149 +0,0 @@
1
- ---
2
- name: workitems
3
- description: >-
4
- Usage `rdc:workitems <action> [args]` — create, update, query work items via Supabase RPCs. Actions: add, update, done, list, epics. Use for "add to backlog", "mark done", "show open epics", any work item CRUD.
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:workitems — Work Item Management
15
-
16
- ## Rules
17
-
18
- 1. **Epic first, always.** Never create a task without a parent epic.
19
- 2. **Label everything.** Minimum one system label per item.
20
- 3. **Check first.** `get_open_epics()` before creating anything new.
21
- 4. **Link design docs.** Put `.rdc/plans/` or `.rdc/research/` paths in descriptions (fallback: `.rdc/plans/` / `.rdc/research/`).
22
-
23
- ## Read Epics
24
-
25
- ```sql
26
- SELECT get_open_epics();
27
- SELECT get_open_epics('urgent');
28
- SELECT get_open_epics(p_label_filter := 'custom-label');
29
- ```
30
-
31
- ## Create Epic
32
-
33
- ```sql
34
- SELECT insert_work_item(
35
- p_title := 'EPIC: Clear descriptive title',
36
- p_description := 'What and why. Reference .rdc/plans/<n>.md if applicable.',
37
- p_item_type := 'epic',
38
- p_priority := 'high',
39
- p_labels := ARRAY['system-label'],
40
- p_source := 'planning'
41
- );
42
-
43
- -- Immediately populate governance refs. architecture_ref stays NULL unless this epic
44
- -- crosses an architectural boundary (storage authority, process topology, auth boundary,
45
- -- deployment model, persistence, service ownership, public contract) — setting it holds
46
- -- every child task for a required architecture-fidelity-* checklist row at close time.
47
- SELECT set_epic_governance_refs(
48
- p_epic_id := '<epic-uuid>'::uuid,
49
- p_plan_ref := '.rdc/plans/<n>.md or NULL',
50
- p_spec_ref := '.rdc/plans/<n>.md or NULL',
51
- p_architecture_ref := NULL,
52
- p_scoping_statement := '<one paragraph: what is in scope and what is explicitly out>'
53
- );
54
- ```
55
-
56
- ## Create Task
57
-
58
- ```sql
59
- SELECT insert_work_item(
60
- p_title := 'Specific actionable task title',
61
- p_description := 'What: <deliverable>
62
- Where: <files to create/modify>
63
- Agent type: frontend | backend | data | design | infra | content | cs2
64
- Guide: .rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md)
65
- Design doc: .rdc/plans/<n>.md (fallback: .rdc/plans/<n>.md, if exists)
66
- Depends on: <other task title if sequential>
67
- Est: <hours>',
68
- p_parent_id := '<epic-uuid>'::uuid,
69
- p_item_type := 'task',
70
- p_priority := 'high',
71
- p_labels := ARRAY['system-label'],
72
- p_estimated_hours := 2,
73
- p_source := 'planning'
74
- );
75
- ```
76
-
77
- ## Update Status
78
-
79
- ```sql
80
- SELECT update_work_item_status('<uuid>'::uuid, 'in_progress');
81
- SELECT update_work_item_status('<uuid>'::uuid, 'review', '["Implementation complete; ready for validator"]'::jsonb, '<agent-session-id>', 'agent');
82
- SELECT update_work_item_status('<uuid>'::uuid, 'done', '["Validator verified implementation report, CodeFlow post, and checklist evidence"]'::jsonb, '<validator-session-id>', 'validator');
83
- SELECT update_work_item_status('<uuid>'::uuid, 'blocked', '["Why it is blocked"]'::jsonb);
84
- ```
85
-
86
- Non-epic `done` is a validator-only close and requires an existing
87
- `implementation_report.codeflow_post`, checked required checklist evidence, and
88
- originating-agent tick audit.
89
-
90
- ## Read Tasks in an Epic
91
-
92
- ```sql
93
- SELECT get_work_items_by_epic('<epic-uuid>'::uuid);
94
- SELECT get_work_items_by_epic('<epic-uuid>'::uuid, 'todo');
95
- ```
96
-
97
- ## Bump Epic Version
98
-
99
- ```sql
100
- SELECT bump_epic_version('<epic-uuid>'::uuid, '0.2.0', 'What changed', 'planning');
101
- ```
102
-
103
- ## Valid Values
104
-
105
- | Field | Values |
106
- |-------|--------|
107
- | status | `todo` `in_progress` `blocked` `review` `done` `archived` |
108
- | priority | `urgent` `high` `normal` `low` |
109
- | item_type | `epic` `task` `subtask` `bug` `spike` |
110
-
111
- ## System Labels
112
-
113
- | Label | When |
114
- |-------|------|
115
- | `project-a` | Your-app-specific work |
116
- | `project-b` | Another app work |
117
- | `cs2` | Core paradigm packages |
118
- | `hail` | Grammar, DSL compiler |
119
- | `pal` | Moment windows, memory |
120
- | `virtue` | Virtue engine, coherence |
121
- | `marketing` | Outreach, campaigns |
122
- | `media` | Assets, R2, image pipeline |
123
- | `infrastructure` | CI/CD, deployment |
124
- | `ui` | Component library |
125
- | `data` | Schema, migrations |
126
- | `content` | Copy, messaging |
127
- | `website` | Public-facing sites |
128
-
129
- ## Agent Type → Guide File Reference
130
-
131
- | Type | Guide | Use For |
132
- |------|-------|---------|
133
- | `frontend` | .rdc/guides/frontend.md | React, pages, UI, Tailwind |
134
- | `backend` | .rdc/guides/backend.md | API routes, database, auth |
135
- | `data` | .rdc/guides/data.md | Migrations, schema, RPC |
136
- | `design` | .rdc/guides/design.md | Brand, palette, OG images |
137
- | `infra` | .rdc/guides/infrastructure.md | CI/CD, deploy, DNS |
138
- | `content` | .rdc/guides/content.md | Copy, messaging, tone |
139
- | `cs2` | .rdc/guides/cs2.md | CS 2.0 paradigm |
140
- | `hail` | .rdc/guides/cs2.md + packages/hail/CLAUDE.md | Grammar, DSL |
141
- | `viz` | .rdc/guides/frontend.md + design.md | Custom visualizations |
142
-
143
- ## What NOT to Do
144
-
145
- - Never raw INSERT/UPDATE against work items — RPC functions only
146
- - Never create tasks without a parent epic
147
- - Never leave labels empty
148
- - Never write vague titles ("Fix stuff") — be specific
149
- - Never put design intention in the task — put it in `.rdc/research/` (fallback: `.rdc/research/`) and link
@@ -1,18 +0,0 @@
1
- // Local PM2 process definition for rdc-skills-mcp — mirrors regen-media-local
2
- // exactly (local PM2 process, tunneled via cloudflared, never on Vultr).
3
- module.exports = {
4
- apps: [
5
- {
6
- name: "rdc-skills-mcp",
7
- script: "bin/rdc-skills-mcp.mjs",
8
- cwd: __dirname,
9
- interpreter: "node",
10
- env: {
11
- PORT: "3110",
12
- },
13
- autorestart: true,
14
- max_restarts: 10,
15
- restart_delay: 5000,
16
- },
17
- ],
18
- };