@lifeaitools/rdc-skills 0.21.1 → 0.23.0

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 (50) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.github/workflows/self-test.yml +34 -34
  3. package/commands/build.md +181 -181
  4. package/commands/collab.md +180 -180
  5. package/commands/deploy.md +148 -148
  6. package/commands/fixit.md +105 -105
  7. package/commands/handoff.md +173 -173
  8. package/commands/overnight.md +218 -218
  9. package/commands/plan.md +158 -158
  10. package/commands/preplan.md +131 -131
  11. package/commands/prototype.md +145 -145
  12. package/commands/report.md +99 -99
  13. package/commands/review.md +120 -120
  14. package/commands/status.md +86 -86
  15. package/commands/workitems.md +127 -127
  16. package/git-sha.json +1 -1
  17. package/guides/agent-bootstrap.md +195 -195
  18. package/guides/agents/backend.md +102 -102
  19. package/guides/agents/content.md +94 -94
  20. package/guides/agents/cs2.md +56 -56
  21. package/guides/agents/data.md +86 -86
  22. package/guides/agents/design.md +77 -77
  23. package/guides/agents/frontend.md +91 -91
  24. package/guides/agents/infrastructure.md +81 -81
  25. package/guides/agents/setup.md +272 -272
  26. package/guides/agents/verify.md +119 -119
  27. package/guides/agents/viz.md +106 -106
  28. package/package.json +1 -1
  29. package/scripts/self-test.mjs +1458 -1458
  30. package/skills/build/SKILL.md +517 -478
  31. package/skills/collab/SKILL.md +239 -239
  32. package/skills/deploy/SKILL.md +541 -522
  33. package/skills/design/SKILL.md +205 -205
  34. package/skills/fixit/SKILL.md +165 -165
  35. package/skills/fs-mcp/SKILL.md +17 -0
  36. package/skills/handoff/SKILL.md +200 -200
  37. package/skills/housekeeping/SKILL.md +14 -1
  38. package/skills/overnight/SKILL.md +251 -230
  39. package/skills/plan/SKILL.md +314 -274
  40. package/skills/preplan/SKILL.md +90 -90
  41. package/skills/prototype/SKILL.md +150 -150
  42. package/skills/release/SKILL.md +140 -140
  43. package/skills/report/SKILL.md +100 -100
  44. package/skills/review/SKILL.md +152 -152
  45. package/skills/rpms-filemap/SKILL.cloud.md +107 -0
  46. package/skills/rpms-filemap/SKILL.md +107 -0
  47. package/skills/self-test/SKILL.md +123 -123
  48. package/skills/status/SKILL.md +99 -99
  49. package/skills/watch/SKILL.md +90 -90
  50. package/skills/workitems/SKILL.md +151 -151
@@ -1,126 +1,126 @@
1
- ---
2
- name: rdc:self-test
3
- description: "Usage `rdc:self-test [--strict]` — Validate all rdc:* skills, plugin manifest, and tooling consistency. Use after editing skills, upgrading the plugin, or when a skill behaves unexpectedly."
4
- ---
5
-
6
- > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
7
- > Checklist-only output. No tool-call narration. No raw runner dumps — summarize.
8
- > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
9
-
10
- > **Sandbox contract:** This skill honors `RDC_TEST=1` per `guides/agent-bootstrap.md` § RDC_TEST Sandbox Contract. Tier 2 behavioral runs and any git push are skipped under `RDC_TEST=1`; Tier 1 static lint runs normally.
11
-
12
-
13
- # rdc:self-test — Skill Library Self-Test (Tier 1)
14
-
15
- ## When to Use
16
- - Before every `rdc:release rdc-skills` tag push
17
- - After editing any skill description or frontmatter
18
- - When a skill mysteriously disappears from the menu (backtick bug repro)
19
- - In CI on every rdc-skills PR (once wired)
20
-
21
- ## Tiers
22
-
23
- | Tier | What it checks | Status |
24
- |------|----------------|--------|
25
- | Tier 1 | Static lint — frontmatter, Usage line, referenced files, name match | ✅ live |
26
- | Tier 2 | Behavioral — headless Claude runs each skill in sandbox, asserts artifacts | ✅ live — 13 manifests, blocked by check-cwd.js hook (see Rules) |
27
- | Tier 3 | Golden checklists — snapshot output format, regress on drift | 🔒 future |
28
-
29
- ## Interactive UI
30
-
31
- Launch the interactive menu — pick tier, pick skill, see live output:
32
-
33
- ```bash
1
+ ---
2
+ name: rdc:self-test
3
+ description: "Usage `rdc:self-test [--strict]` — Validate all rdc:* skills, plugin manifest, and tooling consistency. Use after editing skills, upgrading the plugin, or when a skill behaves unexpectedly."
4
+ ---
5
+
6
+ > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
7
+ > Checklist-only output. No tool-call narration. No raw runner dumps — summarize.
8
+ > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
9
+
10
+ > **Sandbox contract:** This skill honors `RDC_TEST=1` per `guides/agent-bootstrap.md` § RDC_TEST Sandbox Contract. Tier 2 behavioral runs and any git push are skipped under `RDC_TEST=1`; Tier 1 static lint runs normally.
11
+
12
+
13
+ # rdc:self-test — Skill Library Self-Test (Tier 1)
14
+
15
+ ## When to Use
16
+ - Before every `rdc:release rdc-skills` tag push
17
+ - After editing any skill description or frontmatter
18
+ - When a skill mysteriously disappears from the menu (backtick bug repro)
19
+ - In CI on every rdc-skills PR (once wired)
20
+
21
+ ## Tiers
22
+
23
+ | Tier | What it checks | Status |
24
+ |------|----------------|--------|
25
+ | Tier 1 | Static lint — frontmatter, Usage line, referenced files, name match | ✅ live |
26
+ | Tier 2 | Behavioral — headless Claude runs each skill in sandbox, asserts artifacts | ✅ live — 13 manifests, blocked by check-cwd.js hook (see Rules) |
27
+ | Tier 3 | Golden checklists — snapshot output format, regress on drift | 🔒 future |
28
+
29
+ ## Interactive UI
30
+
31
+ Launch the interactive menu — pick tier, pick skill, see live output:
32
+
33
+ ```bash
34
34
  node {RDC_SKILLS_ROOT}/scripts/self-test-ui.mjs
35
- ```
36
-
37
- Menu options:
38
- - **1** — Full Tier 1 test (all skills)
39
- - **2** — Pick a specific skill from a numbered list
40
- - **3** — Choose tier (Tier 1 static lint | Tier 2 behavioral | Tier 3 🔒 future)
41
-
42
- Test output streams live to the terminal. No server, no extra processes.
43
-
44
- ## Procedure (Tier 1)
45
-
46
- 1. **Run the linter (direct or via UI):**
47
- ```bash
35
+ ```
36
+
37
+ Menu options:
38
+ - **1** — Full Tier 1 test (all skills)
39
+ - **2** — Pick a specific skill from a numbered list
40
+ - **3** — Choose tier (Tier 1 static lint | Tier 2 behavioral | Tier 3 🔒 future)
41
+
42
+ Test output streams live to the terminal. No server, no extra processes.
43
+
44
+ ## Procedure (Tier 1)
45
+
46
+ 1. **Run the linter (direct or via UI):**
47
+ ```bash
48
48
  node {RDC_SKILLS_ROOT}/scripts/self-test.mjs
49
- # or interactively:
49
+ # or interactively:
50
50
  node {RDC_SKILLS_ROOT}/scripts/self-test-ui.mjs
51
- ```
52
-
53
- 2. **Interpret exit codes:**
54
- - `0` = all skills pass
55
- - `1` = at least one FAIL or (in `--strict` mode) at least one WARN
56
- - `2` = runner itself crashed (e.g., skills dir unreadable)
57
- - `3` = `.claude-plugin/plugin.json` missing entirely (distinct from skill failures)
58
-
59
- 3. **Common findings and fixes:**
60
-
61
- | Finding code | Cause | Fix |
62
- |---|---|---|
63
- | `description-backtick-leading` | Folded YAML starts with `` ` `` — parser drops skill | Rewrite description to start with a word |
64
- | `usage-marker-missing` | No `` Usage `rdc:name <args>` `` in description | Front-load arg contract |
65
- | `usage-marker-mismatch` | `Usage` line references a different skill's name (copy-paste drift) | Fix the skill name in the Usage marker |
66
- | `name-filename-mismatch` | frontmatter `name:` ≠ filename | `--fix` auto-renames; or rewrite name |
67
- | `guide-not-found` / `rule-not-found` / `hook-not-found` | Dead reference in skill body | Create file or fix link |
68
- | `banner-missing` | Skill missing OUTPUT CONTRACT banner | `--fix` auto-inserts |
69
- | `manifest-missing` / `manifest-version-mismatch` | `.claude-plugin/plugin.json` missing or out-of-sync with `package.json` | Create/update manifest |
70
- | `duplicate-skill-name` / `skill-guide-filename-collision` | Two skills claim same name, or skill collides with agent guide | Rename one |
71
- | `orphan-hook` | File under `hooks/` isn't referenced by any skill, settings.json, or plugin.json | Wire it up or delete |
72
-
73
- 4. **Flags:**
74
- - `--strict` — promotes warnings to failures (use in CI and before release)
75
- - `--skill <name>` — run against a single skill (e.g. `--skill rdc:build`)
76
- - `--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.
77
- - `--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).
78
-
79
- 5. **Report to the project lead:**
80
- ```
81
- Self-test: X/Y pass, Z warnings, W failures
82
- Failures: <list>
83
- Verdict: PASS | FAIL
84
- ```
85
-
86
- ## Procedure (Tier 2)
87
-
88
- 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). Use it before shipping behavioral changes — Tier 1 alone can't catch runtime drift.
89
-
90
- 1. **Prerequisites:**
91
- - `claude` CLI on PATH (headless mode: `claude --print`)
92
- - clauth daemon unlocked (`curl -s http://127.0.0.1:52437/ping`)
93
- - Supabase MCP reachable (runner creates a throwaway test branch)
94
- - Clean git tree in `rdc-skills` (worktrees are added under `.rdc/sandbox/<run-id>/`)
95
-
96
- 2. **Run:**
97
- ```bash
98
- node scripts/self-test.mjs --tier2 # all skills with manifests
99
- node scripts/self-test.mjs --tier2 --skill rdc:build # single skill
100
- node scripts/self-test.mjs --tier2 --parallel 3 # up to 3 skills in parallel
101
- node scripts/self-test.mjs --tier2 --quick # skip long-running assertions
102
- ```
103
-
104
- 3. **What it does:**
105
- - Runs Tier 1 as a pre-gate (fails fast if static lint fails)
106
- - Creates one Supabase test branch for the run
107
- - For each skill: `git worktree add` into `.rdc/sandbox/<run-id>/<skill>/`, sets `RDC_TEST=1`, invokes `claude --print` with the skill prompt, waits for exit
108
- - Asserts per the skill's manifest: exit code, files touched, commits made, stdout patterns
109
- - Cleans up worktrees + deletes the Supabase branch at the end (even on failure)
110
-
111
- 4. **Reports:**
112
- - `.rdc/reports/self-test-tier2-<iso>.json` — full per-skill result, findings, timings
113
- - Exit codes: `0` pass, `1` fail (one or more skills failed assertions), `2` runner error (couldn't set up sandbox / branch)
114
-
115
- 5. **Adding a new manifest:**
116
- - Create `skills/tests/<skill>.test.json` (one per skill, colocated)
117
- - Validate the shape against the schema at `scripts/lib/manifest-schema.mjs`
118
- - Test it in isolation: `node scripts/self-test.mjs --tier2 --skill rdc:name`
119
- - Commit the manifest alongside any skill body changes
120
-
121
- ## Rules
122
- - Run Tier 1 **before every `rdc:release rdc-skills`** — it catches the backtick-drift class of bugs that break the skill menu silently.
123
- - Use `--strict` in CI. Warnings matter in the release path.
124
- - Do NOT skip findings by relaxing the linter. Fix the skill.
125
- - Run Tier 2 before tagging a release. Gate the tag if any manifested skill fails.
126
- - Tier 2 blocker: `check-cwd.js` SessionStart hook blocks headless sessions not launched from the monorepo root — runner uses `--dangerously-skip-permissions` to bypass. If tier2 tests fail with `exit_code: -1`, verify the flag is present in `scripts/lib/runner.mjs`.
51
+ ```
52
+
53
+ 2. **Interpret exit codes:**
54
+ - `0` = all skills pass
55
+ - `1` = at least one FAIL or (in `--strict` mode) at least one WARN
56
+ - `2` = runner itself crashed (e.g., skills dir unreadable)
57
+ - `3` = `.claude-plugin/plugin.json` missing entirely (distinct from skill failures)
58
+
59
+ 3. **Common findings and fixes:**
60
+
61
+ | Finding code | Cause | Fix |
62
+ |---|---|---|
63
+ | `description-backtick-leading` | Folded YAML starts with `` ` `` — parser drops skill | Rewrite description to start with a word |
64
+ | `usage-marker-missing` | No `` Usage `rdc:name <args>` `` in description | Front-load arg contract |
65
+ | `usage-marker-mismatch` | `Usage` line references a different skill's name (copy-paste drift) | Fix the skill name in the Usage marker |
66
+ | `name-filename-mismatch` | frontmatter `name:` ≠ filename | `--fix` auto-renames; or rewrite name |
67
+ | `guide-not-found` / `rule-not-found` / `hook-not-found` | Dead reference in skill body | Create file or fix link |
68
+ | `banner-missing` | Skill missing OUTPUT CONTRACT banner | `--fix` auto-inserts |
69
+ | `manifest-missing` / `manifest-version-mismatch` | `.claude-plugin/plugin.json` missing or out-of-sync with `package.json` | Create/update manifest |
70
+ | `duplicate-skill-name` / `skill-guide-filename-collision` | Two skills claim same name, or skill collides with agent guide | Rename one |
71
+ | `orphan-hook` | File under `hooks/` isn't referenced by any skill, settings.json, or plugin.json | Wire it up or delete |
72
+
73
+ 4. **Flags:**
74
+ - `--strict` — promotes warnings to failures (use in CI and before release)
75
+ - `--skill <name>` — run against a single skill (e.g. `--skill rdc:build`)
76
+ - `--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.
77
+ - `--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).
78
+
79
+ 5. **Report to the project lead:**
80
+ ```
81
+ Self-test: X/Y pass, Z warnings, W failures
82
+ Failures: <list>
83
+ Verdict: PASS | FAIL
84
+ ```
85
+
86
+ ## Procedure (Tier 2)
87
+
88
+ 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). Use it before shipping behavioral changes — Tier 1 alone can't catch runtime drift.
89
+
90
+ 1. **Prerequisites:**
91
+ - `claude` CLI on PATH (headless mode: `claude --print`)
92
+ - clauth daemon unlocked (`curl -s http://127.0.0.1:52437/ping`)
93
+ - Supabase MCP reachable (runner creates a throwaway test branch)
94
+ - Clean git tree in `rdc-skills` (worktrees are added under `.rdc/sandbox/<run-id>/`)
95
+
96
+ 2. **Run:**
97
+ ```bash
98
+ node scripts/self-test.mjs --tier2 # all skills with manifests
99
+ node scripts/self-test.mjs --tier2 --skill rdc:build # single skill
100
+ node scripts/self-test.mjs --tier2 --parallel 3 # up to 3 skills in parallel
101
+ node scripts/self-test.mjs --tier2 --quick # skip long-running assertions
102
+ ```
103
+
104
+ 3. **What it does:**
105
+ - Runs Tier 1 as a pre-gate (fails fast if static lint fails)
106
+ - Creates one Supabase test branch for the run
107
+ - For each skill: `git worktree add` into `.rdc/sandbox/<run-id>/<skill>/`, sets `RDC_TEST=1`, invokes `claude --print` with the skill prompt, waits for exit
108
+ - Asserts per the skill's manifest: exit code, files touched, commits made, stdout patterns
109
+ - Cleans up worktrees + deletes the Supabase branch at the end (even on failure)
110
+
111
+ 4. **Reports:**
112
+ - `.rdc/reports/self-test-tier2-<iso>.json` — full per-skill result, findings, timings
113
+ - Exit codes: `0` pass, `1` fail (one or more skills failed assertions), `2` runner error (couldn't set up sandbox / branch)
114
+
115
+ 5. **Adding a new manifest:**
116
+ - Create `skills/tests/<skill>.test.json` (one per skill, colocated)
117
+ - Validate the shape against the schema at `scripts/lib/manifest-schema.mjs`
118
+ - Test it in isolation: `node scripts/self-test.mjs --tier2 --skill rdc:name`
119
+ - Commit the manifest alongside any skill body changes
120
+
121
+ ## Rules
122
+ - Run Tier 1 **before every `rdc:release rdc-skills`** — it catches the backtick-drift class of bugs that break the skill menu silently.
123
+ - Use `--strict` in CI. Warnings matter in the release path.
124
+ - Do NOT skip findings by relaxing the linter. Fix the skill.
125
+ - Run Tier 2 before tagging a release. Gate the tag if any manifested skill fails.
126
+ - Tier 2 blocker: `check-cwd.js` SessionStart hook blocks headless sessions not launched from the monorepo root — runner uses `--dangerously-skip-permissions` to bypass. If tier2 tests fail with `exit_code: -1`, verify the flag is present in `scripts/lib/runner.mjs`.
@@ -1,99 +1,99 @@
1
- ---
2
- name: rdc:status
3
- description: "Usage `rdc:status` — Read-only snapshot of open epics, work items, Coolify health, blockers, and next recommended action. Safe to call anytime. Start here when disoriented or resuming a session."
4
- ---
5
-
6
- > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
7
- > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
8
- > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
9
-
10
- > 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`).
11
-
12
-
13
- # rdc:status — Project Dashboard
14
-
15
- ## When to Use
16
- - Start of any session
17
- - Project lead asks "what's the status", "where are we", "what's open"
18
- - Before deciding what to work on next
19
-
20
- ## Procedure
21
-
22
- 1. **Open epics:**
23
- ```sql
24
- SELECT get_open_epics();
25
- ```
26
-
27
- 2. **Work item counts by status:**
28
- ```sql
29
- SELECT status, count(*) FROM work_items
30
- WHERE status != 'archived'
31
- GROUP BY status ORDER BY status;
32
- ```
33
-
34
- 3. **Items by label/project (top 10 labels):**
35
- ```sql
36
- SELECT unnest(labels) as label, count(*),
37
- count(*) FILTER (WHERE status = 'done') as done,
38
- count(*) FILTER (WHERE status = 'todo') as todo,
39
- count(*) FILTER (WHERE status = 'in_progress') as wip
40
- FROM work_items
41
- GROUP BY label ORDER BY count DESC LIMIT 10;
42
- ```
43
-
44
- 4. **Recent activity (last 48 hours):**
45
- ```sql
46
- SELECT title, status, updated_at
47
- FROM work_items
48
- WHERE updated_at > now() - interval '48 hours'
49
- ORDER BY updated_at DESC LIMIT 15;
50
- ```
51
-
52
- 5. **Git status:**
53
- ```bash
54
- git log --oneline -10
55
- git status
56
- git branch -v
57
- ```
58
-
59
- 6. **Dev server health (PM2):**
60
- SSH into the Coolify server and check PM2 process state:
61
- ```bash
62
- # Note: clauth key name for the SSH key may vary by project. Common names: ssh-key-path, vultr-ssh-key, dev-ssh-key.
63
- # Check available keys with: curl -s http://127.0.0.1:52437/list-services
64
- SSH_KEY=$(curl -s http://127.0.0.1:52437/v/ssh-key-path)
65
- ssh -i "$SSH_KEY" -o StrictHostKeyChecking=no root@64.237.54.189 "pm2 jlist 2>/dev/null"
66
- ```
67
- Parse the JSON array — for each process note `name`, `pm2_env.status` (online/stopped/errored), and `pm2_env.pm_uptime`.
68
- If SSH fails or PM2 returns nothing, note "PM2 unreachable" and continue.
69
-
70
- 7. **Infrastructure health** (if MCP available):
71
- - Get infrastructure overview or diagnose issues
72
- - Report any apps with failed builds or down containers
73
-
74
- 8. **Present as a compact dashboard:**
75
- ```
76
- ## Open Epics (N)
77
- <table>
78
-
79
- ## Work Items: X done | Y todo | Z in_progress
80
-
81
- ## Recent (48h)
82
- <list>
83
-
84
- ## Dev Servers (PM2)
85
- online: studio canvas lifeai ... stopped: issho-invest
86
-
87
- ## Deployments
88
- <green/red/yellow status>
89
-
90
- ## Recommended Next
91
- <highest priority unstarted epic>
92
- ```
93
-
94
- ## Rules
95
- - Keep output concise — this is a glance, not a deep dive
96
- - Always end with a recommendation for what to work on next
97
- - After the Recommended Next section, suggest which guide file from `.rdc/guides/` (fallback: `.rdc/guides/`) the recommended work would need
98
- - Use database MCP for queries (not raw curl)
99
- - If infrastructure MCP is unavailable, skip deployment status and note it
1
+ ---
2
+ name: rdc:status
3
+ description: "Usage `rdc:status` — Read-only snapshot of open epics, work items, Coolify health, blockers, and next recommended action. Safe to call anytime. Start here when disoriented or resuming a session."
4
+ ---
5
+
6
+ > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
7
+ > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
8
+ > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
9
+
10
+ > 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`).
11
+
12
+
13
+ # rdc:status — Project Dashboard
14
+
15
+ ## When to Use
16
+ - Start of any session
17
+ - Project lead asks "what's the status", "where are we", "what's open"
18
+ - Before deciding what to work on next
19
+
20
+ ## Procedure
21
+
22
+ 1. **Open epics:**
23
+ ```sql
24
+ SELECT get_open_epics();
25
+ ```
26
+
27
+ 2. **Work item counts by status:**
28
+ ```sql
29
+ SELECT status, count(*) FROM work_items
30
+ WHERE status != 'archived'
31
+ GROUP BY status ORDER BY status;
32
+ ```
33
+
34
+ 3. **Items by label/project (top 10 labels):**
35
+ ```sql
36
+ SELECT unnest(labels) as label, count(*),
37
+ count(*) FILTER (WHERE status = 'done') as done,
38
+ count(*) FILTER (WHERE status = 'todo') as todo,
39
+ count(*) FILTER (WHERE status = 'in_progress') as wip
40
+ FROM work_items
41
+ GROUP BY label ORDER BY count DESC LIMIT 10;
42
+ ```
43
+
44
+ 4. **Recent activity (last 48 hours):**
45
+ ```sql
46
+ SELECT title, status, updated_at
47
+ FROM work_items
48
+ WHERE updated_at > now() - interval '48 hours'
49
+ ORDER BY updated_at DESC LIMIT 15;
50
+ ```
51
+
52
+ 5. **Git status:**
53
+ ```bash
54
+ git log --oneline -10
55
+ git status
56
+ git branch -v
57
+ ```
58
+
59
+ 6. **Dev server health (PM2):**
60
+ SSH into the Coolify server and check PM2 process state:
61
+ ```bash
62
+ # Note: clauth key name for the SSH key may vary by project. Common names: ssh-key-path, vultr-ssh-key, dev-ssh-key.
63
+ # Check available keys with: curl -s http://127.0.0.1:52437/list-services
64
+ SSH_KEY=$(curl -s http://127.0.0.1:52437/v/ssh-key-path)
65
+ ssh -i "$SSH_KEY" -o StrictHostKeyChecking=no root@64.237.54.189 "pm2 jlist 2>/dev/null"
66
+ ```
67
+ Parse the JSON array — for each process note `name`, `pm2_env.status` (online/stopped/errored), and `pm2_env.pm_uptime`.
68
+ If SSH fails or PM2 returns nothing, note "PM2 unreachable" and continue.
69
+
70
+ 7. **Infrastructure health** (if MCP available):
71
+ - Get infrastructure overview or diagnose issues
72
+ - Report any apps with failed builds or down containers
73
+
74
+ 8. **Present as a compact dashboard:**
75
+ ```
76
+ ## Open Epics (N)
77
+ <table>
78
+
79
+ ## Work Items: X done | Y todo | Z in_progress
80
+
81
+ ## Recent (48h)
82
+ <list>
83
+
84
+ ## Dev Servers (PM2)
85
+ online: studio canvas lifeai ... stopped: issho-invest
86
+
87
+ ## Deployments
88
+ <green/red/yellow status>
89
+
90
+ ## Recommended Next
91
+ <highest priority unstarted epic>
92
+ ```
93
+
94
+ ## Rules
95
+ - Keep output concise — this is a glance, not a deep dive
96
+ - Always end with a recommendation for what to work on next
97
+ - After the Recommended Next section, suggest which guide file from `.rdc/guides/` (fallback: `.rdc/guides/`) the recommended work would need
98
+ - Use database MCP for queries (not raw curl)
99
+ - If infrastructure MCP is unavailable, skip deployment status and note it
@@ -1,91 +1,91 @@
1
- ---
2
- name: rdc:watch
3
- description: "Usage `rdc:watch` — Open a live browser viewer tailing this session's activity. Zero infrastructure — pure filesystem + static HTML."
4
- ---
5
-
6
- > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
7
- > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
8
- > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
9
-
10
- > 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`).
11
-
12
-
13
- # rdc:watch — Session Log Watcher
14
-
15
- ## When to Use
16
- - Start of any long-running session where Dave needs visibility into what you're doing
17
- - Before `rdc:overnight`, `rdc:build` on a large epic, or any multi-hour grind
18
- - Anytime the user asks for "a log", "a viewer", "tail", or "what are you doing right now"
19
-
20
- ## Procedure
21
-
22
- 1. **Initialize the log and viewer.** Run the helper script from the plugin directory in the user's current project:
23
- ```bash
24
- node ${CLAUDE_PLUGIN_ROOT}/scripts/watch-init.mjs
25
- ```
1
+ ---
2
+ name: rdc:watch
3
+ description: "Usage `rdc:watch` — Open a live browser viewer tailing this session's activity. Zero infrastructure — pure filesystem + static HTML."
4
+ ---
5
+
6
+ > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
7
+ > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
8
+ > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
9
+
10
+ > 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`).
11
+
12
+
13
+ # rdc:watch — Session Log Watcher
14
+
15
+ ## When to Use
16
+ - Start of any long-running session where Dave needs visibility into what you're doing
17
+ - Before `rdc:overnight`, `rdc:build` on a large epic, or any multi-hour grind
18
+ - Anytime the user asks for "a log", "a viewer", "tail", or "what are you doing right now"
19
+
20
+ ## Procedure
21
+
22
+ 1. **Initialize the log and viewer.** Run the helper script from the plugin directory in the user's current project:
23
+ ```bash
24
+ node ${CLAUDE_PLUGIN_ROOT}/scripts/watch-init.mjs
25
+ ```
26
26
  (If `CLAUDE_PLUGIN_ROOT` is not set, resolve the plugin path from your invocation context or the installed plugin cache.)
27
-
28
- 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.
29
-
30
- 3. **Open the viewer in the browser.** Run the exact `open_hint` line from the script output. On Windows that's `start "" "<viewer-path>"`.
31
-
32
- 4. **Report to the user.** One line:
33
- ```
34
- watcher live at <viewer-path> — tailing <log-path>
35
- ```
36
-
37
- 5. **Append one line per substantive action for the rest of the session.** Use the documented format — one line, no multi-line payloads:
38
- ```
39
- [<ISO-timestamp>] [<kind>] <message>
40
- ```
41
- 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.
42
-
43
- ### Log format
44
-
45
- - `ISO-timestamp` — `new Date().toISOString()`
46
- - `kind` — one of: `dispatch`, `commit`, `test`, `error`, `note`, `banner`
47
- - `message` — single line, no newlines. Keep under ~200 chars.
48
-
49
- ### Kinds
50
-
51
- | Kind | When to append |
52
- |------|----------------|
53
- | `dispatch` | About to dispatch a subagent — include role + epic/task id |
54
- | `commit` | After a git commit lands — include short sha + subject |
55
- | `test` | Test run kicked off or result came back |
56
- | `error` | Anything that failed — include what and why in one line |
57
- | `note` | General progress ticks (reading files, analyzing, planning) |
58
- | `banner` | Session start/end markers, major phase changes |
59
-
60
- ### Examples
61
-
62
- ```
63
- [2026-04-15T23:14:02.318Z] [dispatch] frontend agent → epic abc123 task 4 (rebuild DynamicForm)
64
- [2026-04-15T23:17:41.902Z] [commit] 3f2a1b9 feat(marketing-engine): DynamicForm rhf+zod
65
- [2026-04-15T23:18:05.113Z] [test] pnpm --filter @regen/rdc-marketing-engine test
66
- [2026-04-15T23:18:41.002Z] [error] tsc: src/components/Form.tsx:42 — Property 'foo' does not exist
67
- [2026-04-15T23:19:00.000Z] [note] retrying with corrected type import
68
- [2026-04-15T23:45:10.000Z] [banner] Phase 2 complete — moving to review
69
- ```
70
-
71
- ### Appending from bash (Windows-safe)
72
-
73
- ```bash
74
- printf '[%s] [%s] %s\n' "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" "dispatch" "your message" >> "$LOG_PATH"
75
- printf '[%s] [%s] %s\n' "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" "dispatch" "your message" >> "$CURRENT_PATH"
76
- ```
77
-
78
- Or from Node:
79
- ```js
80
- import { appendFileSync } from "node:fs";
81
- const line = `[${new Date().toISOString()}] [note] ${msg}\n`;
82
- appendFileSync(logPath, line);
83
- appendFileSync(currentPath, line);
84
- ```
85
-
86
- ## Notes
87
-
88
- - Log files live in the **user's project**, not the rdc-skills repo. Path: `<projectRoot>/.rdc/session-log/`
89
- - Each invocation creates a **new run id** and overwrites `current.log`. Prior run logs remain on disk as `<runId>.log`.
90
- - The viewer is a single static HTML file polling `current.log` via `fetch()` every 2s — no server, no deps.
91
- - This skill does NOT replace `rdc:report` (the end-of-session Obsidian writeup). It's a live tail for attended or semi-attended sessions.
27
+
28
+ 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.
29
+
30
+ 3. **Open the viewer in the browser.** Run the exact `open_hint` line from the script output. On Windows that's `start "" "<viewer-path>"`.
31
+
32
+ 4. **Report to the user.** One line:
33
+ ```
34
+ watcher live at <viewer-path> — tailing <log-path>
35
+ ```
36
+
37
+ 5. **Append one line per substantive action for the rest of the session.** Use the documented format — one line, no multi-line payloads:
38
+ ```
39
+ [<ISO-timestamp>] [<kind>] <message>
40
+ ```
41
+ 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.
42
+
43
+ ### Log format
44
+
45
+ - `ISO-timestamp` — `new Date().toISOString()`
46
+ - `kind` — one of: `dispatch`, `commit`, `test`, `error`, `note`, `banner`
47
+ - `message` — single line, no newlines. Keep under ~200 chars.
48
+
49
+ ### Kinds
50
+
51
+ | Kind | When to append |
52
+ |------|----------------|
53
+ | `dispatch` | About to dispatch a subagent — include role + epic/task id |
54
+ | `commit` | After a git commit lands — include short sha + subject |
55
+ | `test` | Test run kicked off or result came back |
56
+ | `error` | Anything that failed — include what and why in one line |
57
+ | `note` | General progress ticks (reading files, analyzing, planning) |
58
+ | `banner` | Session start/end markers, major phase changes |
59
+
60
+ ### Examples
61
+
62
+ ```
63
+ [2026-04-15T23:14:02.318Z] [dispatch] frontend agent → epic abc123 task 4 (rebuild DynamicForm)
64
+ [2026-04-15T23:17:41.902Z] [commit] 3f2a1b9 feat(marketing-engine): DynamicForm rhf+zod
65
+ [2026-04-15T23:18:05.113Z] [test] pnpm --filter @regen/rdc-marketing-engine test
66
+ [2026-04-15T23:18:41.002Z] [error] tsc: src/components/Form.tsx:42 — Property 'foo' does not exist
67
+ [2026-04-15T23:19:00.000Z] [note] retrying with corrected type import
68
+ [2026-04-15T23:45:10.000Z] [banner] Phase 2 complete — moving to review
69
+ ```
70
+
71
+ ### Appending from bash (Windows-safe)
72
+
73
+ ```bash
74
+ printf '[%s] [%s] %s\n' "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" "dispatch" "your message" >> "$LOG_PATH"
75
+ printf '[%s] [%s] %s\n' "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" "dispatch" "your message" >> "$CURRENT_PATH"
76
+ ```
77
+
78
+ Or from Node:
79
+ ```js
80
+ import { appendFileSync } from "node:fs";
81
+ const line = `[${new Date().toISOString()}] [note] ${msg}\n`;
82
+ appendFileSync(logPath, line);
83
+ appendFileSync(currentPath, line);
84
+ ```
85
+
86
+ ## Notes
87
+
88
+ - Log files live in the **user's project**, not the rdc-skills repo. Path: `<projectRoot>/.rdc/session-log/`
89
+ - Each invocation creates a **new run id** and overwrites `current.log`. Prior run logs remain on disk as `<runId>.log`.
90
+ - The viewer is a single static HTML file polling `current.log` via `fetch()` every 2s — no server, no deps.
91
+ - This skill does NOT replace `rdc:report` (the end-of-session Obsidian writeup). It's a live tail for attended or semi-attended sessions.