@lifeaitools/rdc-skills 0.9.31 → 0.9.33

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 (59) hide show
  1. package/.claude-plugin/plugin.json +24 -2
  2. package/.github/workflows/self-test.yml +34 -34
  3. package/MANIFEST.md +4 -0
  4. package/commands/build.md +183 -183
  5. package/commands/collab.md +180 -180
  6. package/commands/deploy.md +152 -138
  7. package/commands/fixit.md +116 -104
  8. package/commands/handoff.md +173 -173
  9. package/commands/overnight.md +220 -220
  10. package/commands/plan.md +158 -158
  11. package/commands/preplan.md +131 -131
  12. package/commands/prototype.md +145 -145
  13. package/commands/report.md +99 -99
  14. package/commands/review.md +120 -120
  15. package/commands/status.md +86 -86
  16. package/commands/workitems.md +132 -127
  17. package/guides/agent-bootstrap.md +265 -206
  18. package/guides/agents/backend.md +104 -104
  19. package/guides/agents/content.md +94 -94
  20. package/guides/agents/cs2.md +56 -56
  21. package/guides/agents/data.md +87 -87
  22. package/guides/agents/design.md +77 -77
  23. package/guides/agents/frontend.md +92 -92
  24. package/guides/agents/infrastructure.md +81 -81
  25. package/guides/agents/setup.md +279 -279
  26. package/guides/agents/verify.md +119 -119
  27. package/guides/agents/viz.md +106 -106
  28. package/hooks/foreground-process-gate.js +109 -0
  29. package/hooks/hook-logger.js +25 -0
  30. package/hooks/run-hidden-hook.ps1 +47 -0
  31. package/hooks/work-item-exit-gate.js +297 -0
  32. package/package.json +3 -3
  33. package/rules/work-items-rpc.md +56 -7
  34. package/scripts/fixtures/guides/bad-guide.md +15 -0
  35. package/scripts/fixtures/guides-clean/good-guide.md +16 -0
  36. package/scripts/install-rdc-skills.js +53 -9
  37. package/scripts/install.ps1 +17 -11
  38. package/scripts/self-test.mjs +1323 -1113
  39. package/scripts/test-guide-validator.mjs +194 -0
  40. package/skills/build/SKILL.md +355 -355
  41. package/skills/co-develop/SKILL.md +182 -0
  42. package/skills/collab/SKILL.md +217 -217
  43. package/skills/deploy/SKILL.md +198 -152
  44. package/skills/design/SKILL.md +211 -211
  45. package/skills/fixit/SKILL.md +132 -122
  46. package/skills/handoff/SKILL.md +200 -200
  47. package/skills/help/SKILL.md +104 -102
  48. package/skills/overnight/SKILL.md +224 -224
  49. package/skills/plan/SKILL.md +252 -251
  50. package/skills/preplan/SKILL.md +86 -86
  51. package/skills/prototype/SKILL.md +150 -150
  52. package/skills/release/SKILL.md +342 -342
  53. package/skills/report/SKILL.md +100 -100
  54. package/skills/review/SKILL.md +121 -120
  55. package/skills/self-test/SKILL.md +126 -126
  56. package/skills/status/SKILL.md +99 -97
  57. package/skills/terminal-config/SKILL.md +18 -18
  58. package/skills/watch/SKILL.md +91 -91
  59. package/skills/workitems/SKILL.md +151 -146
@@ -1,126 +1,126 @@
1
- ---
2
- name: rdc:self-test
3
- description: "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
- node C:/Dev/rdc-skills/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
48
- node C:/Dev/rdc-skills/scripts/self-test.mjs
49
- # or interactively:
50
- node C:/Dev/rdc-skills/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`.
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
+ node C:/Dev/rdc-skills/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
48
+ node C:/Dev/rdc-skills/scripts/self-test.mjs
49
+ # or interactively:
50
+ node C:/Dev/rdc-skills/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`.
@@ -1,97 +1,99 @@
1
- ---
2
- name: rdc:status
3
- description: "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
- SSH_KEY=$(curl -s http://127.0.0.1:52437/v/ssh-key-path)
63
- ssh -i "$SSH_KEY" -o StrictHostKeyChecking=no root@64.237.54.189 "pm2 jlist 2>/dev/null"
64
- ```
65
- Parse the JSON array for each process note `name`, `pm2_env.status` (online/stopped/errored), and `pm2_env.pm_uptime`.
66
- If SSH fails or PM2 returns nothing, note "PM2 unreachable" and continue.
67
-
68
- 7. **Infrastructure health** (if MCP available):
69
- - Get infrastructure overview or diagnose issues
70
- - Report any apps with failed builds or down containers
71
-
72
- 8. **Present as a compact dashboard:**
73
- ```
74
- ## Open Epics (N)
75
- <table>
76
-
77
- ## Work Items: X done | Y todo | Z in_progress
78
-
79
- ## Recent (48h)
80
- <list>
81
-
82
- ## Dev Servers (PM2)
83
- online: studio canvas lifeai ... stopped: issho-invest
84
-
85
- ## Deployments
86
- <green/red/yellow status>
87
-
88
- ## Recommended Next
89
- <highest priority unstarted epic>
90
- ```
91
-
92
- ## Rules
93
- - Keep output concise — this is a glance, not a deep dive
94
- - Always end with a recommendation for what to work on next
95
- - After the Recommended Next section, suggest which guide file from `.rdc/guides/` (fallback: `.rdc/guides/`) the recommended work would need
96
- - Use database MCP for queries (not raw curl)
97
- - 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,13 +1,13 @@
1
1
  ---
2
- name: terminal-config
3
- description: "Read and safely modify Windows Terminal settings and cell startup sequencing. Contains the canonical file locations, profile GUIDs, keybinding map, and what NEVER to change."
2
+ name: rdc:terminal-config
3
+ description: "Usage `rdc:terminal-config <task>` — read and safely modify Windows Terminal settings and cell startup sequencing. Contains canonical file locations, profile GUIDs, keybinding map, and what NEVER to change."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
7
7
  > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
8
8
  > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
9
9
 
10
- # terminal-config — Windows Terminal & Cell Startup Reference
10
+ # rdc:terminal-config — Windows Terminal & Cell Startup Reference
11
11
 
12
12
  ## When to Use
13
13
  - Before modifying any terminal setting, profile, or keybinding
@@ -31,7 +31,7 @@ description: "Read and safely modify Windows Terminal settings and cell startup
31
31
  | File | Path | Purpose |
32
32
  |------|------|---------|
33
33
  | **Terminal settings** | `C:\Users\DaveLadouceur\AppData\Local\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json` | Main config — profiles, keybindings, color schemes |
34
- | **Cell init script** | `C:\Dev\regen-root\scripts\cell-init.cmd` | Launched by each cell profile. Sets CELL_ROLE, prints banner, runs `claude --append-system-prompt` |
34
+ | **Cell init script** | `C:\Dev\regen-root\scripts\cell-init.ps1` | Launched by each cell profile (PowerShell 7). Sets CELL_ROLE, prints banner, runs `claude --append-system-prompt` |
35
35
  | **Cell state dir** | `C:\Dev\regen-root\.cell-state\` | PID lockfiles per cell (`sv.lock`, `cell-portal.lock`, etc.) |
36
36
  | **Claude keybindings** | `C:\Users\DaveLadouceur\.claude\keybindings.json` | Claude Code keybindings (separate from Terminal) |
37
37
  | **Claude settings** | `C:\Dev\regen-root\.claude\settings.json` | Project-level Claude Code settings, hooks, permissions |
@@ -46,9 +46,9 @@ Every profile has a fixed GUID. Do not change them.
46
46
  | GUID | Name | Tab Color | Purpose |
47
47
  |------|------|-----------|---------|
48
48
  | `{574e775e-4f2a-5b96-ac1e-a2962a402336}` | PowerShell | — | **Default profile** — PowerShell 7 Core |
49
- | `{e7c1128b-e51f-4eba-bcdb-85f550c31b97}` | SV | `#1A6B3C` (green) | Supervisor cell — full repo access, runs `cell-init.cmd sv` |
50
- | `{190a2f39-f6ad-4638-8fef-e4c7aa58c349}` | Claude | `#B91C1C` (red) | Claude conversation cell, runs `cell-init.cmd sv` |
51
- | `{2d0248ef-7bb7-4b9e-b381-c4aa1f570f49}` | Codex | `#0F766E` (teal) | Codex AI cell — runs `powershell -NoLogo -NoExit -Command codex` |
49
+ | `{e7c1128b-e51f-4eba-bcdb-85f550c31b97}` | SV | `#1A6B3C` (green) | Supervisor cell — full repo access, runs `cell-init.ps1 sv` |
50
+ | `{190a2f39-f6ad-4638-8fef-e4c7aa58c349}` | Claude | `#B91C1C` (red) | Claude conversation cell, runs `cell-init.ps1 sv` |
51
+ | `{2d0248ef-7bb7-4b9e-b381-c4aa1f570f49}` | Codex | `#0F766E` (teal) | Codex AI cell — runs `pwsh.exe -NoLogo -NoExit -Command codex` |
52
52
  | `{767642b0-606c-468c-89a0-4573df6fcdaf}` | VS Code | `#2D5986` (blue) | Launches `code-safe C:\Dev\regen-root` |
53
53
  | `{6cbd327a-5b5e-4e83-96f6-041615382d36}` | PowerShell (Admin) | `#1E3A5F` (dark blue) | Elevated PowerShell — uses `LIFEAI Slate` color scheme |
54
54
  | `{0caa0dad-35be-5f56-a8ff-afceeeaa6101}` | Command Prompt | — | Legacy CMD — visible but rarely used |
@@ -57,13 +57,14 @@ Every profile has a fixed GUID. Do not change them.
57
57
  ### Profile commandlines
58
58
 
59
59
  ```
60
- SV / Claude: cmd.exe /k "C:\Dev\regen-root\scripts\cell-init.cmd" sv
61
- Codex: powershell.exe -NoLogo -NoExit -Command codex
60
+ SV / Claude: pwsh.exe -NoLogo -NoExit -ExecutionPolicy Bypass -File "C:\Dev\regen-root\scripts\cell-init.ps1" sv
61
+ Codex: pwsh.exe -NoLogo -NoExit -Command codex
62
62
  VS Code: cmd.exe /c start "" code-safe C:\Dev\regen-root
63
63
  Admin PS: powershell.exe -NoLogo (+ elevate: true)
64
64
  ```
65
65
 
66
66
  All cell profiles set `"startingDirectory": "C:\\Dev\\regen-root"`.
67
+ SV / Claude / Codex all run on **PowerShell 7 (`pwsh.exe`)** — never bare `powershell.exe` (that resolves to legacy Windows PowerShell 5.1).
67
68
 
68
69
  ---
69
70
 
@@ -140,15 +141,14 @@ Font defaults (in `profiles.defaults`):
140
141
 
141
142
  ## Cell Startup Sequencing
142
143
 
143
- `cell-init.cmd` is the startup script for all cell profiles. It:
144
+ `cell-init.ps1` is the PowerShell 7 startup script for all cell profiles. It:
144
145
 
145
- 1. Accepts `ROLE` arg (`sv`, `cell-portal`, `cell-data`, `cell-cs2`, `cell-mktg`, `cell-infra`, `specialist`)
146
- 2. Looks up `LABEL`, `COLOR`, `SCOPE`, `PATHS`, `PROMPT_SCOPE` from a role table
146
+ 1. Accepts `Role` arg (`sv`, `cell-portal`, `cell-data`, `cell-cs2`, `cell-mktg`, `cell-infra`, `specialist`)
147
+ 2. Looks up `Label`, `Color`, `Scope`, `Paths`, `Prompt` from the `$roles` hashtable
147
148
  3. Prints a colored banner
148
149
  4. Writes a PID lockfile to `.cell-state\<role>.lock`
149
150
  5. Runs `git log` filtered to that cell's path scope
150
- 6. Opens VS Code for the project
151
- 7. Launches: `claude --append-system-prompt "<PROMPT_SCOPE>"`
151
+ 6. Launches: `claude --append-system-prompt "<Prompt>"`
152
152
 
153
153
  ### Cell role → prompt scope mapping
154
154
 
@@ -184,9 +184,9 @@ Font defaults (in `profiles.defaults`):
184
184
 
185
185
  ### When editing cell startup
186
186
 
187
- Edit `C:\Dev\regen-root\scripts\cell-init.cmd` — it's in the repo, so changes are tracked.
188
- - Adding a new role: add a new `if "%ROLE%"=="..."` block with all five vars
189
- - Changing scope: update `PATHS` and `PROMPT_SCOPE` only — don't touch banner/lockfile/git logic
187
+ Edit `C:\Dev\regen-root\scripts\cell-init.ps1` — it's in the repo, so changes are tracked.
188
+ - Adding a new role: add a new entry to the `$roles` hashtable with all five keys (`Label`, `Color`, `Scope`, `Paths`, `Prompt`)
189
+ - Changing scope: update `Paths` and `Prompt` only — don't touch banner/lockfile/git logic
190
190
 
191
191
  ---
192
192
 
@@ -211,7 +211,7 @@ If Windows Terminal settings keep getting corrupted or misedited, **WezTerm** is
211
211
  - Config is a Lua file (`~/.wezterm.lua` or `C:\Users\<user>\.config\wezterm\wezterm.lua`)
212
212
  - Committed to git — every change is a reviewable diff, not an opaque JSON blob
213
213
  - Startup layouts (tabs, panes, commands) are defined programmatically
214
- - Equivalent to current setup: `wezterm.mux.spawn_window()` per cell with `args` set to `cmd.exe /k cell-init.cmd <role>`
214
+ - Equivalent to current setup: `wezterm.mux.spawn_window()` per cell with `args` set to `pwsh.exe -NoLogo -NoExit -File cell-init.ps1 <role>`
215
215
  - Download: https://wezfurlong.org/wezterm/installation.html
216
216
 
217
217
  Migration path: copy existing color schemes as `wezterm.color.get_default_colors()` override tables, map keybindings to `config.keys` array, define tab bar with cell roles.