@lifeaitools/rdc-skills 0.8.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/settings.json +15 -0
- package/.claude-plugin/marketplace.json +21 -0
- package/.claude-plugin/plugin.json +11 -0
- package/.github/workflows/publish.yml +25 -0
- package/.github/workflows/self-test.yml +53 -0
- package/CHANGELOG.md +246 -0
- package/LICENSE +21 -0
- package/MANIFEST.md +190 -0
- package/README.md +188 -0
- package/README.sandbox.md +3 -0
- package/assets/watcher/viewer.html +164 -0
- package/commands/build.md +183 -0
- package/commands/collab.md +180 -0
- package/commands/deploy.md +138 -0
- package/commands/fixit.md +112 -0
- package/commands/handoff.md +173 -0
- package/commands/help.md +88 -0
- package/commands/overnight.md +220 -0
- package/commands/plan.md +158 -0
- package/commands/preplan.md +131 -0
- package/commands/prototype.md +145 -0
- package/commands/release.md +159 -0
- package/commands/report.md +99 -0
- package/commands/review.md +120 -0
- package/commands/self-test.md +107 -0
- package/commands/status.md +86 -0
- package/commands/watch.md +92 -0
- package/commands/workitems.md +132 -0
- package/guides/.gitkeep +0 -0
- package/guides/agent-bootstrap.md +191 -0
- package/guides/agents/backend.md +104 -0
- package/guides/agents/content.md +94 -0
- package/guides/agents/cs2.md +56 -0
- package/guides/agents/data.md +87 -0
- package/guides/agents/design.md +77 -0
- package/guides/agents/frontend.md +92 -0
- package/guides/agents/infrastructure.md +81 -0
- package/guides/agents/setup.md +279 -0
- package/guides/agents/verify.md +132 -0
- package/guides/agents/viz.md +106 -0
- package/guides/backend.md +146 -0
- package/guides/content.md +147 -0
- package/guides/cs2.md +190 -0
- package/guides/data.md +123 -0
- package/guides/design.md +116 -0
- package/guides/frontend.md +151 -0
- package/guides/infrastructure.md +179 -0
- package/guides/output-contract.md +98 -0
- package/hooks/no-stop-open-epics.js +125 -0
- package/package.json +31 -0
- package/rules/work-items-rpc.md +399 -0
- package/scripts/install-rdc-skills.js +559 -0
- package/scripts/install.ps1 +165 -0
- package/scripts/install.sh +132 -0
- package/scripts/lib/assertions.mjs +264 -0
- package/scripts/lib/manifest-schema.mjs +607 -0
- package/scripts/lib/runner.mjs +429 -0
- package/scripts/lib/sandbox.mjs +435 -0
- package/scripts/self-test.mjs +1108 -0
- package/scripts/uninstall.ps1 +77 -0
- package/scripts/uninstall.sh +69 -0
- package/scripts/update.ps1 +43 -0
- package/scripts/update.sh +43 -0
- package/scripts/watch-init.mjs +100 -0
- package/skills/.gitkeep +0 -0
- package/skills/build/SKILL.md +238 -0
- package/skills/collab/SKILL.md +218 -0
- package/skills/deploy/SKILL.md +144 -0
- package/skills/fixit/SKILL.md +112 -0
- package/skills/handoff/SKILL.md +175 -0
- package/skills/help/SKILL.md +101 -0
- package/skills/overnight/SKILL.md +220 -0
- package/skills/plan/SKILL.md +96 -0
- package/skills/preplan/SKILL.md +87 -0
- package/skills/prototype/SKILL.md +151 -0
- package/skills/release/SKILL.md +221 -0
- package/skills/report/SKILL.md +101 -0
- package/skills/review/SKILL.md +120 -0
- package/skills/self-test/SKILL.md +127 -0
- package/skills/status/SKILL.md +86 -0
- package/skills/tests/README.md +29 -0
- package/skills/tests/rdc-build.test.json +22 -0
- package/skills/tests/rdc-deploy.test.json +15 -0
- package/skills/tests/rdc-fixit.test.json +21 -0
- package/skills/tests/rdc-handoff.test.json +14 -0
- package/skills/tests/rdc-overnight.test.json +21 -0
- package/skills/tests/rdc-plan.test.json +14 -0
- package/skills/tests/rdc-preplan.test.json +15 -0
- package/skills/tests/rdc-prototype.test.json +14 -0
- package/skills/tests/rdc-release.test.json +15 -0
- package/skills/tests/rdc-report.test.json +14 -0
- package/skills/tests/rdc-review.test.json +14 -0
- package/skills/tests/rdc-status.test.json +16 -0
- package/skills/tests/rdc-workitems.test.json +15 -0
- package/skills/watch/SKILL.md +92 -0
- package/skills/workitems/SKILL.md +147 -0
- package/tests/validate-skills.js +183 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"skill": "rdc:build",
|
|
4
|
+
"description": "Build dispatches typed agents against a seeded epic; local commits allowed, push short-circuited under RDC_TEST.",
|
|
5
|
+
"fixture": {
|
|
6
|
+
"prompt": "rdc:build label=self-test-sandbox --unattended",
|
|
7
|
+
"precondition_files": [
|
|
8
|
+
{
|
|
9
|
+
"path": ".rdc/epics/self-test-sandbox.md",
|
|
10
|
+
"content": "# Epic: self-test sandbox\n\nTrivial epic used only by the Tier 2 runner. One task: touch `sandbox.txt` with a single line.\n\n## Tasks\n- [ ] Write 'hello from sandbox' to `sandbox.txt`\n"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"env": { "RDC_TEST": "1" },
|
|
14
|
+
"slow": true
|
|
15
|
+
},
|
|
16
|
+
"assertions": {
|
|
17
|
+
"exit_code": 0,
|
|
18
|
+
"commits_made": { "min": 0, "message_matches": "." },
|
|
19
|
+
"stdout_contains": ["Verdict"]
|
|
20
|
+
},
|
|
21
|
+
"teardown": { "reset_branch": true }
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"skill": "rdc:deploy",
|
|
4
|
+
"description": "Deploy in diagnose mode is read-only — registry SELECT + health probe, no Coolify mutations.",
|
|
5
|
+
"fixture": {
|
|
6
|
+
"prompt": "rdc:deploy diagnose rdc-marketing-engine",
|
|
7
|
+
"env": { "RDC_TEST": "1" }
|
|
8
|
+
},
|
|
9
|
+
"assertions": {
|
|
10
|
+
"exit_code": 0,
|
|
11
|
+
"commits_made": { "min": 0 },
|
|
12
|
+
"stdout_contains": ["Verdict"]
|
|
13
|
+
},
|
|
14
|
+
"teardown": { "reset_branch": true }
|
|
15
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"skill": "rdc:fixit",
|
|
4
|
+
"description": "Fixit applies a trivial typo fix, commits locally, emits verdict.",
|
|
5
|
+
"fixture": {
|
|
6
|
+
"prompt": "rdc:fixit fix typo in sandbox README: change 'Helo' to 'Hello'",
|
|
7
|
+
"precondition_files": [
|
|
8
|
+
{
|
|
9
|
+
"path": "README.sandbox.md",
|
|
10
|
+
"content": "# Sandbox\n\nHelo world\n"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"env": { "RDC_TEST": "1" }
|
|
14
|
+
},
|
|
15
|
+
"assertions": {
|
|
16
|
+
"exit_code": 0,
|
|
17
|
+
"commits_made": { "min": 1, "message_matches": "[Ff]ix" },
|
|
18
|
+
"stdout_contains": ["Verdict"]
|
|
19
|
+
},
|
|
20
|
+
"teardown": { "reset_branch": true }
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"skill": "rdc:handoff",
|
|
4
|
+
"description": "Handoff writes a plan doc to .rdc/plans/ and records work items via RPC; no push under RDC_TEST.",
|
|
5
|
+
"fixture": {
|
|
6
|
+
"prompt": "rdc:handoff sandbox-stub add a no-op /ping route to the sandbox app",
|
|
7
|
+
"env": { "RDC_TEST": "1" }
|
|
8
|
+
},
|
|
9
|
+
"assertions": {
|
|
10
|
+
"exit_code": 0,
|
|
11
|
+
"stdout_contains": ["Verdict"]
|
|
12
|
+
},
|
|
13
|
+
"teardown": { "reset_branch": true }
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"skill": "rdc:overnight",
|
|
4
|
+
"description": "Overnight supervisor chains preplan/plan/build/review/report in unattended mode under RDC_TEST.",
|
|
5
|
+
"fixture": {
|
|
6
|
+
"prompt": "rdc:overnight label=self-test-sandbox",
|
|
7
|
+
"precondition_files": [
|
|
8
|
+
{
|
|
9
|
+
"path": ".rdc/epics/self-test-sandbox.md",
|
|
10
|
+
"content": "# Epic: self-test sandbox\n\nSingle trivial task: write 'ok' to `sandbox.txt`.\n"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"env": { "RDC_TEST": "1" },
|
|
14
|
+
"slow": true
|
|
15
|
+
},
|
|
16
|
+
"assertions": {
|
|
17
|
+
"exit_code": 0,
|
|
18
|
+
"stdout_contains": ["Verdict"]
|
|
19
|
+
},
|
|
20
|
+
"teardown": { "reset_branch": true }
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"skill": "rdc:plan",
|
|
4
|
+
"description": "Plan produces an architecture doc and epic/task structure under RDC_TEST without pushing.",
|
|
5
|
+
"fixture": {
|
|
6
|
+
"prompt": "rdc:plan add a /health endpoint to rdc-marketing-engine --unattended",
|
|
7
|
+
"env": { "RDC_TEST": "1" }
|
|
8
|
+
},
|
|
9
|
+
"assertions": {
|
|
10
|
+
"exit_code": 0,
|
|
11
|
+
"stdout_contains": ["Verdict"]
|
|
12
|
+
},
|
|
13
|
+
"teardown": { "reset_branch": true }
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"skill": "rdc:preplan",
|
|
4
|
+
"description": "Research-only preplan produces findings without committing code or creating work items.",
|
|
5
|
+
"fixture": {
|
|
6
|
+
"prompt": "rdc:preplan add a rate limiter to the clauth daemon --unattended",
|
|
7
|
+
"env": { "RDC_TEST": "1" }
|
|
8
|
+
},
|
|
9
|
+
"assertions": {
|
|
10
|
+
"exit_code": 0,
|
|
11
|
+
"commits_made": { "min": 0 },
|
|
12
|
+
"stdout_contains": ["Verdict"]
|
|
13
|
+
},
|
|
14
|
+
"teardown": { "reset_branch": true }
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"skill": "rdc:prototype",
|
|
4
|
+
"description": "Prototype produces a JSX/TSX reference file in docs/source/ and a registry entry; local-only under RDC_TEST.",
|
|
5
|
+
"fixture": {
|
|
6
|
+
"prompt": "rdc:prototype a tiny Card component with a title prop for the sandbox",
|
|
7
|
+
"env": { "RDC_TEST": "1" }
|
|
8
|
+
},
|
|
9
|
+
"assertions": {
|
|
10
|
+
"exit_code": 0,
|
|
11
|
+
"stdout_contains": ["Verdict"]
|
|
12
|
+
},
|
|
13
|
+
"teardown": { "reset_branch": true }
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"skill": "rdc:release",
|
|
4
|
+
"description": "Release dry-run walks the checklist; all destructive steps (tag push, publish, install, restart) short-circuit under RDC_TEST.",
|
|
5
|
+
"fixture": {
|
|
6
|
+
"prompt": "rdc:release rdc-skills --dry-run",
|
|
7
|
+
"env": { "RDC_TEST": "1" }
|
|
8
|
+
},
|
|
9
|
+
"assertions": {
|
|
10
|
+
"exit_code": 0,
|
|
11
|
+
"commits_made": { "min": 0 },
|
|
12
|
+
"stdout_contains": ["Verdict"]
|
|
13
|
+
},
|
|
14
|
+
"teardown": { "reset_branch": true }
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"skill": "rdc:report",
|
|
4
|
+
"description": "Report writes a dated markdown file to .rdc/reports/ and emits a verdict line.",
|
|
5
|
+
"fixture": {
|
|
6
|
+
"prompt": "rdc:report --unattended",
|
|
7
|
+
"env": { "RDC_TEST": "1" }
|
|
8
|
+
},
|
|
9
|
+
"assertions": {
|
|
10
|
+
"exit_code": 0,
|
|
11
|
+
"stdout_contains": ["Verdict"]
|
|
12
|
+
},
|
|
13
|
+
"teardown": { "reset_branch": true }
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"skill": "rdc:review",
|
|
4
|
+
"description": "Review runs tsc + lint gates in read-only mode under RDC_TEST; no external writes.",
|
|
5
|
+
"fixture": {
|
|
6
|
+
"prompt": "rdc:review --unattended",
|
|
7
|
+
"env": { "RDC_TEST": "1" }
|
|
8
|
+
},
|
|
9
|
+
"assertions": {
|
|
10
|
+
"exit_code": 0,
|
|
11
|
+
"stdout_contains": ["Verdict"]
|
|
12
|
+
},
|
|
13
|
+
"teardown": { "reset_branch": true }
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"skill": "rdc:status",
|
|
4
|
+
"timeout_ms": 180000,
|
|
5
|
+
"description": "Status is read-only: prints kanban + health, makes no commits.",
|
|
6
|
+
"fixture": {
|
|
7
|
+
"prompt": "rdc:status",
|
|
8
|
+
"env": { "RDC_TEST": "1" }
|
|
9
|
+
},
|
|
10
|
+
"assertions": {
|
|
11
|
+
"exit_code": 0,
|
|
12
|
+
"commits_made": { "min": 0 },
|
|
13
|
+
"stdout_contains": ["Recommended Next"]
|
|
14
|
+
},
|
|
15
|
+
"teardown": { "reset_branch": true }
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"manifest_version": 1,
|
|
3
|
+
"skill": "rdc:workitems",
|
|
4
|
+
"description": "Workitems list action is read-only — queries epics via RPC, no commits.",
|
|
5
|
+
"fixture": {
|
|
6
|
+
"prompt": "rdc:workitems epics",
|
|
7
|
+
"env": { "RDC_TEST": "1" }
|
|
8
|
+
},
|
|
9
|
+
"assertions": {
|
|
10
|
+
"exit_code": 0,
|
|
11
|
+
"commits_made": { "min": 0 },
|
|
12
|
+
"stdout_contains": ["Verdict"]
|
|
13
|
+
},
|
|
14
|
+
"teardown": { "reset_branch": true }
|
|
15
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rdc:watch
|
|
3
|
+
description: >-
|
|
4
|
+
Usage `rdc:watch` — initialize a session log and open a browser viewer that tails Claude activity live. 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. On Windows it's typically `C:/Dev/rdc-skills`.)
|
|
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.** Run the exact `open_hint` line from the script output. On Windows that's `start "" "<viewer-path>"`.
|
|
32
|
+
|
|
33
|
+
4. **Report to the user.** One line:
|
|
34
|
+
```
|
|
35
|
+
watcher live at <viewer-path> — tailing <log-path>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
5. **Append one line per substantive action for the rest of the session.** Use the documented format — one line, no multi-line payloads:
|
|
39
|
+
```
|
|
40
|
+
[<ISO-timestamp>] [<kind>] <message>
|
|
41
|
+
```
|
|
42
|
+
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.
|
|
43
|
+
|
|
44
|
+
### Log format
|
|
45
|
+
|
|
46
|
+
- `ISO-timestamp` — `new Date().toISOString()`
|
|
47
|
+
- `kind` — one of: `dispatch`, `commit`, `test`, `error`, `note`, `banner`
|
|
48
|
+
- `message` — single line, no newlines. Keep under ~200 chars.
|
|
49
|
+
|
|
50
|
+
### Kinds
|
|
51
|
+
|
|
52
|
+
| Kind | When to append |
|
|
53
|
+
|------|----------------|
|
|
54
|
+
| `dispatch` | About to dispatch a subagent — include role + epic/task id |
|
|
55
|
+
| `commit` | After a git commit lands — include short sha + subject |
|
|
56
|
+
| `test` | Test run kicked off or result came back |
|
|
57
|
+
| `error` | Anything that failed — include what and why in one line |
|
|
58
|
+
| `note` | General progress ticks (reading files, analyzing, planning) |
|
|
59
|
+
| `banner` | Session start/end markers, major phase changes |
|
|
60
|
+
|
|
61
|
+
### Examples
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
[2026-04-15T23:14:02.318Z] [dispatch] frontend agent → epic abc123 task 4 (rebuild DynamicForm)
|
|
65
|
+
[2026-04-15T23:17:41.902Z] [commit] 3f2a1b9 feat(marketing-engine): DynamicForm rhf+zod
|
|
66
|
+
[2026-04-15T23:18:05.113Z] [test] pnpm --filter @regen/rdc-marketing-engine test
|
|
67
|
+
[2026-04-15T23:18:41.002Z] [error] tsc: src/components/Form.tsx:42 — Property 'foo' does not exist
|
|
68
|
+
[2026-04-15T23:19:00.000Z] [note] retrying with corrected type import
|
|
69
|
+
[2026-04-15T23:45:10.000Z] [banner] Phase 2 complete — moving to review
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Appending from bash (Windows-safe)
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
printf '[%s] [%s] %s\n' "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" "dispatch" "your message" >> "$LOG_PATH"
|
|
76
|
+
printf '[%s] [%s] %s\n' "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" "dispatch" "your message" >> "$CURRENT_PATH"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Or from Node:
|
|
80
|
+
```js
|
|
81
|
+
import { appendFileSync } from "node:fs";
|
|
82
|
+
const line = `[${new Date().toISOString()}] [note] ${msg}\n`;
|
|
83
|
+
appendFileSync(logPath, line);
|
|
84
|
+
appendFileSync(currentPath, line);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Notes
|
|
88
|
+
|
|
89
|
+
- Log files live in the **user's project**, not the rdc-skills repo. Path: `<projectRoot>/.rdc/session-log/`
|
|
90
|
+
- Each invocation creates a **new run id** and overwrites `current.log`. Prior run logs remain on disk as `<runId>.log`.
|
|
91
|
+
- The viewer is a single static HTML file polling `current.log` via `fetch()` every 2s — no server, no deps.
|
|
92
|
+
- This skill does NOT replace `rdc:report` (the end-of-session Obsidian writeup). It's a live tail for attended or semi-attended sessions.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rdc: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
|
+
> **Sandbox contract:** This skill honors `RDC_TEST=1` per `guides/agent-bootstrap.md` § RDC_TEST Sandbox Contract. Destructive external calls short-circuit under the flag. Supabase work item writes (`insert_work_item`, `update_work_item_status`, `bump_epic_version`) are skipped under `RDC_TEST=1`.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# rdc:workitems — Work Item Management
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
- Project lead says "create a ticket", "add to backlog", "log this bug", "update status"
|
|
20
|
+
- An agent needs to create or update epics/tasks during a build session
|
|
21
|
+
- Checking what work is open before starting a new epic
|
|
22
|
+
|
|
23
|
+
## Arguments
|
|
24
|
+
|
|
25
|
+
- `rdc:workitems epics` — list open epics
|
|
26
|
+
- `rdc:workitems add <title> --epic <id>` — create a task under an epic
|
|
27
|
+
- `rdc:workitems update <id> --status <status>` — update a work item's status
|
|
28
|
+
- `rdc:workitems done <id>` — mark a task complete
|
|
29
|
+
- `rdc:workitems list <epic-id>` — list tasks in an epic
|
|
30
|
+
|
|
31
|
+
## Rules
|
|
32
|
+
|
|
33
|
+
1. **Epic first, always.** Never create a task without a parent epic.
|
|
34
|
+
2. **Label everything.** Minimum one system label per item.
|
|
35
|
+
3. **Check first.** `get_open_epics()` before creating anything new.
|
|
36
|
+
4. **Link design docs.** Put `.rdc/plans/` or `.rdc/research/` paths in descriptions (fallback: `.rdc/plans/` / `.rdc/research/`).
|
|
37
|
+
|
|
38
|
+
## Read Epics
|
|
39
|
+
|
|
40
|
+
```sql
|
|
41
|
+
SELECT get_open_epics();
|
|
42
|
+
SELECT get_open_epics('urgent');
|
|
43
|
+
SELECT get_open_epics(p_label_filter := 'custom-label');
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Create Epic
|
|
47
|
+
|
|
48
|
+
```sql
|
|
49
|
+
SELECT insert_work_item(
|
|
50
|
+
p_title := 'EPIC: Clear descriptive title',
|
|
51
|
+
p_description := 'What and why. Reference .rdc/plans/<n>.md if applicable.',
|
|
52
|
+
p_item_type := 'epic',
|
|
53
|
+
p_priority := 'high',
|
|
54
|
+
p_labels := ARRAY['system-label'],
|
|
55
|
+
p_source := 'planning'
|
|
56
|
+
);
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Create Task
|
|
60
|
+
|
|
61
|
+
```sql
|
|
62
|
+
SELECT insert_work_item(
|
|
63
|
+
p_title := 'Specific actionable task title',
|
|
64
|
+
p_description := 'What: <deliverable>
|
|
65
|
+
Where: <files to create/modify>
|
|
66
|
+
Agent type: frontend | backend | data | design | infra | content | cs2
|
|
67
|
+
Guide: .rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md)
|
|
68
|
+
Design doc: .rdc/plans/<n>.md (fallback: .rdc/plans/<n>.md, if exists)
|
|
69
|
+
Depends on: <other task title if sequential>
|
|
70
|
+
Est: <hours>',
|
|
71
|
+
p_parent_id := '<epic-uuid>'::uuid,
|
|
72
|
+
p_item_type := 'task',
|
|
73
|
+
p_priority := 'high',
|
|
74
|
+
p_labels := ARRAY['system-label'],
|
|
75
|
+
p_estimated_hours := 2,
|
|
76
|
+
p_source := 'planning'
|
|
77
|
+
);
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Update Status
|
|
81
|
+
|
|
82
|
+
```sql
|
|
83
|
+
SELECT update_work_item_status('<uuid>'::uuid, 'in_progress');
|
|
84
|
+
SELECT update_work_item_status('<uuid>'::uuid, 'done', '["What was completed"]'::jsonb);
|
|
85
|
+
SELECT update_work_item_status('<uuid>'::uuid, 'blocked', '["Why it is blocked"]'::jsonb);
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Read Tasks in an Epic
|
|
89
|
+
|
|
90
|
+
```sql
|
|
91
|
+
SELECT get_work_items_by_epic('<epic-uuid>'::uuid);
|
|
92
|
+
SELECT get_work_items_by_epic('<epic-uuid>'::uuid, 'todo');
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Bump Epic Version
|
|
96
|
+
|
|
97
|
+
```sql
|
|
98
|
+
SELECT bump_epic_version('<epic-uuid>'::uuid, '0.2.0', 'What changed', 'planning');
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Valid Values
|
|
102
|
+
|
|
103
|
+
| Field | Values |
|
|
104
|
+
|-------|--------|
|
|
105
|
+
| status | `todo` `in_progress` `blocked` `review` `done` `archived` |
|
|
106
|
+
| priority | `urgent` `high` `normal` `low` |
|
|
107
|
+
| item_type | `epic` `task` `subtask` `bug` `spike` |
|
|
108
|
+
|
|
109
|
+
## System Labels
|
|
110
|
+
|
|
111
|
+
| Label | When |
|
|
112
|
+
|-------|------|
|
|
113
|
+
| `project-a` | Your-app-specific work |
|
|
114
|
+
| `project-b` | Another app work |
|
|
115
|
+
| `cs2` | Core paradigm packages |
|
|
116
|
+
| `hail` | Grammar, DSL compiler |
|
|
117
|
+
| `pal` | Moment windows, memory |
|
|
118
|
+
| `virtue` | Virtue engine, coherence |
|
|
119
|
+
| `marketing` | Outreach, campaigns |
|
|
120
|
+
| `media` | Assets, R2, image pipeline |
|
|
121
|
+
| `infrastructure` | CI/CD, deployment |
|
|
122
|
+
| `ui` | Component library |
|
|
123
|
+
| `data` | Schema, migrations |
|
|
124
|
+
| `content` | Copy, messaging |
|
|
125
|
+
| `website` | Public-facing sites |
|
|
126
|
+
|
|
127
|
+
## Agent Type → Guide File Reference
|
|
128
|
+
|
|
129
|
+
| Type | Guide | Use For |
|
|
130
|
+
|------|-------|---------|
|
|
131
|
+
| `frontend` | .rdc/guides/frontend.md | React, pages, UI, Tailwind |
|
|
132
|
+
| `backend` | .rdc/guides/backend.md | API routes, database, auth |
|
|
133
|
+
| `data` | .rdc/guides/data.md | Migrations, schema, RPC |
|
|
134
|
+
| `design` | .rdc/guides/design.md | Brand, palette, OG images |
|
|
135
|
+
| `infra` | .rdc/guides/infrastructure.md | CI/CD, deploy, DNS |
|
|
136
|
+
| `content` | .rdc/guides/content.md | Copy, messaging, tone |
|
|
137
|
+
| `cs2` | .rdc/guides/cs2.md | CS 2.0 paradigm |
|
|
138
|
+
| `hail` | .rdc/guides/cs2.md + packages/hail/CLAUDE.md | Grammar, DSL |
|
|
139
|
+
| `viz` | .rdc/guides/frontend.md + design.md | Custom visualizations |
|
|
140
|
+
|
|
141
|
+
## What NOT to Do
|
|
142
|
+
|
|
143
|
+
- Never raw INSERT/UPDATE against work items — RPC functions only
|
|
144
|
+
- Never create tasks without a parent epic
|
|
145
|
+
- Never leave labels empty
|
|
146
|
+
- Never write vague titles ("Fix stuff") — be specific
|
|
147
|
+
- Never put design intention in the task — put it in `.rdc/research/` (fallback: `.rdc/research/`) and link
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Validate rdc-skills skills and guides
|
|
4
|
+
*
|
|
5
|
+
* Checks:
|
|
6
|
+
* - YAML frontmatter exists and has required fields
|
|
7
|
+
* - Required sections exist (## When to Use, etc.)
|
|
8
|
+
* - Markdown is well-formed
|
|
9
|
+
*
|
|
10
|
+
* Exit codes:
|
|
11
|
+
* 0 = all valid
|
|
12
|
+
* 1 = validation failed
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const fs = require('fs');
|
|
16
|
+
const path = require('path');
|
|
17
|
+
|
|
18
|
+
const REQUIRED_FRONTMATTER = ['name', 'description'];
|
|
19
|
+
const REQUIRED_SECTIONS = [
|
|
20
|
+
'## When to Use',
|
|
21
|
+
'## Procedure' // OR '## Arguments'
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
let passed = 0;
|
|
25
|
+
let failed = 0;
|
|
26
|
+
const errors = [];
|
|
27
|
+
|
|
28
|
+
function validateFile(filePath) {
|
|
29
|
+
try {
|
|
30
|
+
const contents = fs.readFileSync(filePath, 'utf8').replace(/\r\n/g, '\n');
|
|
31
|
+
const lines = contents.split('\n');
|
|
32
|
+
|
|
33
|
+
// Check frontmatter
|
|
34
|
+
if (!lines[0].includes('---')) {
|
|
35
|
+
errors.push(`${path.basename(filePath)}: Missing YAML frontmatter start`);
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
let frontmatterEnd = -1;
|
|
40
|
+
for (let i = 1; i < lines.length; i++) {
|
|
41
|
+
if (lines[i].includes('---')) {
|
|
42
|
+
frontmatterEnd = i;
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (frontmatterEnd === -1) {
|
|
48
|
+
errors.push(`${path.basename(filePath)}: YAML frontmatter not closed`);
|
|
49
|
+
return false;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Parse frontmatter
|
|
53
|
+
const frontmatterLines = lines.slice(1, frontmatterEnd);
|
|
54
|
+
const frontmatter = {};
|
|
55
|
+
|
|
56
|
+
for (const line of frontmatterLines) {
|
|
57
|
+
const match = line.match(/^(\w+):\s*(.+)$/);
|
|
58
|
+
if (match) {
|
|
59
|
+
frontmatter[match[1]] = match[2];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Check required fields
|
|
64
|
+
for (const field of REQUIRED_FRONTMATTER) {
|
|
65
|
+
if (!frontmatter[field]) {
|
|
66
|
+
errors.push(`${path.basename(filePath)}: Missing frontmatter field '${field}'`);
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// Check required sections
|
|
72
|
+
const bodyText = lines.slice(frontmatterEnd + 1).join('\n');
|
|
73
|
+
const hasWhenToUse = bodyText.includes('## When to Use');
|
|
74
|
+
const hasProcedure = bodyText.includes('## Procedure');
|
|
75
|
+
const hasArguments = bodyText.includes('## Arguments');
|
|
76
|
+
|
|
77
|
+
if (!hasWhenToUse) {
|
|
78
|
+
errors.push(`${path.basename(filePath)}: Missing '## When to Use' section`);
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
if (!hasProcedure && !hasArguments) {
|
|
83
|
+
errors.push(`${path.basename(filePath)}: Missing '## Procedure' or '## Arguments' section`);
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return true;
|
|
88
|
+
} catch (err) {
|
|
89
|
+
errors.push(`${path.basename(filePath)}: ${err.message}`);
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function validateDirectory(dirPath, dirName) {
|
|
95
|
+
if (!fs.existsSync(dirPath)) {
|
|
96
|
+
console.log(`ℹ ${dirName}/ directory not found (will be populated later)`);
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Skills are in subdirectories: skills/<name>/SKILL.md
|
|
101
|
+
const entries = fs.readdirSync(dirPath, { withFileTypes: true });
|
|
102
|
+
const skillFiles = [];
|
|
103
|
+
|
|
104
|
+
for (const entry of entries) {
|
|
105
|
+
if (entry.isDirectory()) {
|
|
106
|
+
const skillMd = path.join(dirPath, entry.name, 'SKILL.md');
|
|
107
|
+
if (fs.existsSync(skillMd)) {
|
|
108
|
+
skillFiles.push({ label: `${entry.name}/SKILL.md`, filePath: skillMd });
|
|
109
|
+
}
|
|
110
|
+
} else if (entry.name.endsWith('.md')) {
|
|
111
|
+
skillFiles.push({ label: entry.name, filePath: path.join(dirPath, entry.name) });
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
if (skillFiles.length === 0) {
|
|
116
|
+
console.log(`ℹ ${dirName}/ (empty — will be populated later)`);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
console.log(`\nValidating ${dirName}/`);
|
|
121
|
+
console.log('─'.repeat(40));
|
|
122
|
+
|
|
123
|
+
for (const { label, filePath } of skillFiles) {
|
|
124
|
+
if (validateFile(filePath)) {
|
|
125
|
+
console.log(` ✓ ${label}`);
|
|
126
|
+
passed++;
|
|
127
|
+
} else {
|
|
128
|
+
console.log(` ✗ ${label}`);
|
|
129
|
+
failed++;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Main
|
|
135
|
+
console.log('rdc-skills Validator');
|
|
136
|
+
console.log('====================\n');
|
|
137
|
+
|
|
138
|
+
const repoRoot = path.dirname(path.dirname(__filename));
|
|
139
|
+
const skillsDir = path.join(repoRoot, 'skills');
|
|
140
|
+
const guidesDir = path.join(repoRoot, 'guides');
|
|
141
|
+
|
|
142
|
+
validateDirectory(skillsDir, 'skills');
|
|
143
|
+
|
|
144
|
+
// Guides are prose docs — just check they are readable markdown files
|
|
145
|
+
if (fs.existsSync(guidesDir)) {
|
|
146
|
+
const guideFiles = fs.readdirSync(guidesDir).filter(f => f.endsWith('.md'));
|
|
147
|
+
if (guideFiles.length > 0) {
|
|
148
|
+
console.log('\nValidating guides/ (readability only)');
|
|
149
|
+
console.log('─'.repeat(40));
|
|
150
|
+
for (const file of guideFiles) {
|
|
151
|
+
try {
|
|
152
|
+
fs.readFileSync(path.join(guidesDir, file), 'utf8');
|
|
153
|
+
console.log(` ✓ ${file}`);
|
|
154
|
+
passed++;
|
|
155
|
+
} catch (err) {
|
|
156
|
+
errors.push(`${file}: ${err.message}`);
|
|
157
|
+
console.log(` ✗ ${file}`);
|
|
158
|
+
failed++;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
console.log('\n' + '═'.repeat(40));
|
|
165
|
+
if (errors.length > 0) {
|
|
166
|
+
console.log('\nErrors:');
|
|
167
|
+
for (const err of errors) {
|
|
168
|
+
console.log(` • ${err}`);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
console.log(`\nResults: ${passed} passed, ${failed} failed`);
|
|
173
|
+
|
|
174
|
+
if (failed === 0 && passed > 0) {
|
|
175
|
+
console.log('✓ All files valid\n');
|
|
176
|
+
process.exit(0);
|
|
177
|
+
} else if (failed === 0 && passed === 0) {
|
|
178
|
+
console.log('ℹ No files to validate (plugin base not yet populated)\n');
|
|
179
|
+
process.exit(0);
|
|
180
|
+
} else {
|
|
181
|
+
console.log('✗ Validation failed\n');
|
|
182
|
+
process.exit(1);
|
|
183
|
+
}
|