@lifeaitools/rdc-skills 0.9.36 → 0.9.38

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,342 +1,88 @@
1
1
  ---
2
2
  name: rdc:release
3
- description: "Usage `rdc:release [promote <slug>|rdc-skills|clauth]` — Promote develop→main and deploy to production for any LIFEAI repo (clauth, rdc-skills, regen-root, etc.), or promote a staged app with rdc:release promote <slug>. Requires dev verification first."
3
+ description: "Usage `rdc:release <repo> [version|--patch|--minor|--major|--dry-run]` — bump, commit, tag, push, wait for CI/publish, install, and verify a package or project using repo-local release metadata."
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 git/npm/CI dumps.
8
8
  > One checklist upfront, updated in place, shown again at end with 1-line verdict.
9
9
 
10
- > **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 — checklist runs, each destructive step echoes `[RDC_TEST] skipping <step>` instead of mutating state.
10
+ > **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.
11
11
 
12
- # rdc:release — Atomic LIFEAI Release
13
-
14
- ## Purpose
15
-
16
- One skill. All repos. No confusion about which release path to use.
17
-
18
- When user says **"release"**, **"publish"**, **"promote"**, **"deploy to main"**, **"ship"**, or **"bump the version"** — this is the skill. Always. No exceptions.
19
-
20
- Dave has Bash access. He should never be asked to run commands. This skill runs the complete loop and shows one checklist + one verdict.
12
+ # rdc:release — Generic Release
21
13
 
22
14
  ## When to Use
23
- - User says "release", "publish", "promote", "deploy to main", "ship", or "bump the version"
24
- - A package, plugin, or app needs to be versioned and pushed to its distribution channel
25
- - After landing significant changes that must be published (clauth, rdc-skills, regen-media, gws)
26
- - After develop is verified and staging passes — promoting to main
27
- - User says "promote studio", "release studio to production", "ship the app" — use `promote <slug>` mode
28
-
29
- **Never release autonomously.** This skill ONLY runs when the user explicitly invokes it. Never push to main on your own initiative.
30
15
 
31
- ## Arguments
16
+ - The user explicitly asks to release, publish, promote, ship, tag, or bump a repo.
17
+ - A package or app needs versioning plus verification.
18
+ - A repo provides release metadata in `package.json`, `.rdc/release.json`, README release instructions, or CI config.
32
19
 
33
- - `rdc:release <repo>` patch bump (default), full loop
34
- - `rdc:release <repo> <version>` — explicit version (e.g. `1.6.0`)
35
- - `rdc:release <repo> --minor` | `--major` | `--patch` — semver bump
36
- - `rdc:release <repo> --dry-run` — show checklist and planned version, do nothing
37
- - `rdc:release promote <slug>` — promote a specific deployed app from staging → production
38
- - `rdc:release promote <slug> --dry-run` — show what would happen, do nothing
39
- - `rdc:release` (no args) — list known repos, ask which
20
+ Never release without explicit user authorization.
40
21
 
41
- ## Known Repos — The Single Lookup Table
22
+ ## Inputs
42
23
 
43
- Resolve `<repo>` here. If not in this table, ask Dave for source path + deploy mechanism before proceeding.
24
+ - `rdc:release <repo>` patch release by default.
25
+ - `rdc:release <repo> <version>` — explicit version.
26
+ - `rdc:release <repo> --patch|--minor|--major`
27
+ - `rdc:release <repo> --dry-run`
44
28
 
45
- | Repo | Type | Source path | Release mechanism | Post-release |
46
- |------|------|-------------|-------------------|--------------|
47
- | `clauth` | npm package | `C:/Dev/clauth` | bump + tag → GitHub Actions → npm publish | `npm install -g @lifeaitools/clauth@latest` → daemon restart |
48
- | `rdc-skills` | local install | `C:/Dev/rdc-skills` | bump + tag → `install.sh` | copy to `~/.claude/skills/user/` + project |
49
- | `regen-root` | monorepo | `C:/Dev/regen-root` | merge develop→main via GitHub PR → Coolify auto-deploys | run `rdc:deploy <affected-slug>` gate checks |
50
- | `regen-media` | MCP server (in monorepo) | `C:/Dev/regen-root/mcp-servers/regen-media` | part of regen-root release — use `rdc:release regen-root` | Coolify redeploys `regen-media-mcp` from main |
51
- | `gws` | MCP server (in monorepo) | `C:/Dev/regen-root/mcp-servers/gws` | part of regen-root release — use `rdc:release regen-root` | Coolify redeploys from main |
29
+ If `<repo>` is not resolvable from the current workspace, ask for its local path or GitHub slug.
52
30
 
53
- > **MCP servers inside the monorepo** (`regen-media`, `gws`) are released as part of `regen-root`. Coolify watches main and auto-deploys each app by its `watch_paths`. Don't release them separately.
54
-
55
- ---
56
-
57
- ## Checklists
58
-
59
- ### Package release checklist (clauth, rdc-skills)
31
+ ## Checklist
60
32
 
61
33
  ```
62
- rdc:release: <repo> vX.Y.Z vA.B.C
34
+ rdc:release: <repo> vX.Y.Z -> vA.B.C
63
35
  [ ] Source path resolved
64
- [ ] Working tree clean (git status)
65
- [ ] Current version detected (package.json)
36
+ [ ] Release metadata read
37
+ [ ] Working tree clean or user-approved dirty scope identified
38
+ [ ] Current version detected
66
39
  [ ] New version computed
67
- [ ] Dry-run gate (if --dry-run, stop here and print planned commands)
68
- [ ] package.json bumped
40
+ [ ] Dry-run gate handled
41
+ [ ] Version files updated
42
+ [ ] Tests/self-test passed
69
43
  [ ] Commit created
70
- [ ] Tag vA.B.C created + pushed
71
- [ ] CI completion event received via clauth channel (mcp__claude_ai_clauth__channel_list)
72
- [ ] CI concluded successfully (failure → pull logs via gh run view --log-failed)
73
- [ ] npm registry shows vA.B.C (npm view @lifeaitools/<repo> version)
74
- [ ] Local install executed
75
- [ ] Installed version verified
76
- [ ] Post-install action (daemon restart if clauth)
44
+ [ ] Tag created
45
+ [ ] Branch and tag pushed
46
+ [ ] CI/publish status verified
47
+ [ ] Registry/package/deploy target shows vA.B.C, if applicable
48
+ [ ] Local install/update executed, if applicable
49
+ [ ] Installed/runtime version verified
77
50
  [ ] Smoke test passed
78
- ✅ rdc:release <repo>: vA.B.C live
79
- ```
80
-
81
- ### App promote checklist (promote <slug>)
82
-
83
- This mode promotes a single deployed app. It does NOT push `git push origin main` directly — it uses the GitHub PR merge API, which bypasses the `block-main-push` hook by design. The hook blocks autonomous pushes; explicit promotion via this skill is authorized by the user invoking it.
84
-
85
- ```
86
- rdc:release promote: <slug> → <domain>
87
- [ ] Registry lookup (slug, coolify_uuid, domain, staging_slug, staging_domain, app_version)
88
- [ ] Staging health gate (HTTP 200 on staging_domain)
89
- [ ] Staging TLS valid
90
- [ ] develop branch clean and pushed
91
- [ ] Commits ahead of main: <N> commits
92
- [ ] Dry-run gate (if --dry-run, stop here and print planned commands)
93
- [ ] app package.json version bumped on develop
94
- [ ] Version bump committed + pushed to develop
95
- [ ] GitHub PR develop→main: created or located
96
- [ ] PR merged via GitHub API (merge method: merge)
97
- [ ] Coolify auto-deploy confirmed started (polling <slug> deployments)
98
- [ ] Deployment reached "finished" state
99
- [ ] Gate: HTTP 200 on <domain>
100
- [ ] Gate: TLS valid on <domain>
101
- [ ] deployment_registry updated (last_deploy_at, status='active')
102
- ✅ rdc:release promote <slug>: <domain> live
51
+ ✅ rdc:release <repo>: vA.B.C live and verified
103
52
  ```
104
53
 
105
- ### Monorepo release checklist (regen-root)
54
+ ## Resolution Order
106
55
 
107
- ```
108
- rdc:release: regen-root develop → main
109
- [ ] Source path: C:/Dev/regen-root
110
- [ ] develop branch clean and pushed (git status + git push)
111
- [ ] Commits ahead of main summarised (git log main..develop --oneline)
112
- [ ] Dry-run gate (if --dry-run, stop here)
113
- [ ] Root package.json version bumped on develop
114
- [ ] Version bump committed + pushed to develop
115
- [ ] GitHub PR: develop → main created (or existing PR located)
116
- [ ] PR merged via GitHub API (merge method: merge)
117
- [ ] main pulled locally (git fetch origin main)
118
- [ ] Coolify auto-deploy confirmed in progress (poll deployment status)
119
- [ ] Affected apps gate-checked via rdc:deploy health probes
120
- [ ] deployment_registry updated (last_deploy_at)
121
- ✅ rdc:release regen-root: main promoted, Coolify deployed
122
- ```
56
+ 1. Current repo if `<repo>` is `.` or omitted and the user clearly refers to the current workspace.
57
+ 2. Sibling directory matching `<repo>`.
58
+ 3. GitHub slug `<owner>/<repo>`.
59
+ 4. Repo-local `.rdc/release.json` if present.
60
+ 5. Ask for the missing path or release mechanism.
123
61
 
124
- ---
62
+ ## Generic Commands
125
63
 
126
- ## Execution Details
64
+ Use repo-local package tooling when available. Examples:
127
65
 
128
- > **Notification paths by repo type:**
129
- > - **Public repos** (rdc-skills, clauth): GitHub Actions POSTs to clauth channel on publish — wait for `mcp__claude_ai_clauth__channel_list` event, not a polling loop
130
- > - **Private repos** (regen-root): Coolify webhook is wired to Supabase — check `deployment_registry` for deploy completion, not the clauth channel
131
-
132
- ### Package repos (clauth, rdc-skills)
133
-
134
- #### 1. Version bump
135
- - Read `package.json`, parse `version`
136
- - Apply: patch (default), minor, major, or explicit
137
- - Rewrite all `version` fields (some packages have `claude.version` too)
138
-
139
- #### 2. Commit + tag + push
140
66
  ```bash
141
- cd <source_path>
142
- git add package.json
67
+ npm version patch --no-git-tag-version
68
+ npm test
69
+ git add package.json package-lock.json
143
70
  git commit -m "chore(release): vA.B.C"
144
71
  git tag vA.B.C
145
- git push && git push --tags
146
- ```
147
- Never `--no-verify`. Never `--force`. Fix pre-commit hook failures at root cause.
148
-
149
- #### 3. Wait for CI via clauth channel (rdc-skills and clauth)
150
-
151
- Both repos have a GitHub Actions workflow that POSTs to `https://clauth.prtrust.fund/channel` on publish completion. **Do not poll `gh run list` in a loop.** Use the Monitor tool or check the channel:
152
-
153
- ```
154
- # Check clauth channel for the completion event:
155
- mcp__claude_ai_clauth__channel_list (since: <tag-push-timestamp>)
156
- # Wait for event with text containing "vA.B.C" and status "success" or "failure"
157
- # If no event after 10 min → fallback: gh run list --repo LIFEAI/<repo> --limit 3
158
- ```
159
-
160
- If the channel event shows failure, pull the run logs before proceeding:
161
- ```bash
162
- gh run view <databaseId> --repo LIFEAI/<repo> --log-failed
163
- ```
164
-
165
- #### 4. Verify npm registry
166
-
167
- ```bash
168
- npm view @lifeaitools/<repo> version # must equal vA.B.C
169
- ```
170
-
171
- Only run this after the channel event confirms success — don't poll npm independently.
172
-
173
- #### 5. Install
174
- - **clauth:** `npm install -g @lifeaitools/clauth@latest`
175
- - **rdc-skills:** `node C:/Dev/rdc-skills/scripts/install-rdc-skills.js`
176
- - If install script fails, fall back:
177
- `cp -r C:/Dev/rdc-skills/skills/* ~/.claude/plugins/cache/rdc-skills/rdc-skills/latest/skills/`
178
-
179
- #### 6. Verify
180
- - **clauth:** `curl -s http://127.0.0.1:52437/ping | python3 -c "import sys,json; print(json.load(sys.stdin)['app_version'])"` — must match vA.B.C
181
- - **rdc-skills:** `ls ~/.claude/skills/user/rdc-release/SKILL.md` — must exist
182
- - **npm:** `npm list -g --depth=0 @lifeaitools/clauth` — version matches
183
-
184
- #### 7. Post-install
185
- - **clauth:** `curl -s -X POST http://127.0.0.1:52437/restart` → wait 3s → ping again
186
- - **rdc-skills:** none
187
-
188
- #### 8. Smoke test
189
- - **clauth:** `curl -s http://127.0.0.1:52437/v/supabase-anon` — expect a non-empty JWT string
190
- - **rdc-skills:** read frontmatter of one new/updated SKILL.md — parse succeeds
191
-
192
- ---
193
-
194
- ### App promote (promote <slug>)
195
-
196
- #### 1. Registry lookup
197
- ```sql
198
- SELECT slug, display_name, domain, staging_slug, staging_domain, coolify_uuid, monorepo_path, environment
199
- FROM deployment_registry
200
- WHERE slug = '<slug>';
201
- ```
202
- If no `staging_slug` or `staging_domain`, ask Dave before proceeding — don't assume.
203
-
204
- #### 2. Staging health gate
205
- ```bash
206
- curl -s -o /dev/null -w "%{http_code}" https://<staging_domain>/
207
- # Must return 200. TLS must be valid (no -k flag).
208
- ```
209
- If staging is not healthy, STOP with `[!]` — don't promote a broken staging.
210
-
211
- #### 3. Git state check
212
- ```bash
213
- cd C:/Dev/regen-root
214
- git status # must be clean on develop
215
- git push origin develop
216
- git log origin/main..develop --oneline # show what's going to main
217
- ```
218
-
219
- #### 4. Version bump
220
- - Read `apps/<app>/package.json` (use `monorepo_path` from registry), parse `version`
221
- - Apply patch bump (default) or use explicit version if provided
222
- - Commit: `chore(release): <slug> vA.B.C`
223
- - Push to develop
224
-
225
- #### 5. GitHub PR merge
226
- ```
227
- # Check for existing open PR develop→main
228
- mcp__claude_ai_Github_Proxy_MCP__list_pull_requests (base: main, head: develop)
229
-
230
- # If none: create one
231
- mcp__claude_ai_Github_Proxy_MCP__create_pull_request (base: main, head: develop, title: "chore(release): <slug> vA.B.C")
232
-
233
- # Merge it
234
- mcp__claude_ai_Github_Proxy_MCP__merge_pull_request (merge_method: merge)
235
- ```
236
- **Note:** This uses the GitHub API — it does NOT run `git push origin main`. The `block-main-push` hook only blocks direct git push, not API merges.
237
-
238
- #### 6. Coolify deploy poll
239
- ```bash
240
- # Use clauth to get Coolify token, then poll the app's deployments
241
- # Wait for status = "finished" — poll every 15s, 15min timeout
242
- curl -s -H "Authorization: Bearer $COOLIFY_TOKEN" \
243
- "https://deploy.regendevcorp.com/api/v1/applications/<coolify_uuid>/deployments?per_page=1"
244
- ```
245
-
246
- #### 7. Gate checks
247
- ```bash
248
- curl -s -o /dev/null -w "%{http_code}" https://<domain>/ # must return 200
249
- curl -s -I https://<domain>/ | grep -i "strict-transport" # TLS
250
- ```
251
-
252
- #### 8. Update registry
253
- ```sql
254
- UPDATE deployment_registry SET last_deploy_at = now(), status = 'active' WHERE slug = '<slug>';
255
- ```
256
-
257
- ---
258
-
259
- ### Monorepo release (regen-root)
260
-
261
- #### 1. Git state check
262
- ```bash
263
- cd C:/Dev/regen-root
264
- git status # must be clean on develop
265
- git push origin develop # ensure latest is pushed
266
- git log origin/main..develop --oneline # summarise what's going to main
267
- ```
268
-
269
- #### 2. Bump root version on develop
270
- ```bash
271
- # Read current version from package.json, apply patch bump
272
- # Commit: "chore(release): vA.B.C — promote develop → main"
273
- git add package.json && git commit -m "chore(release): vA.B.C"
274
- git push origin develop
72
+ git push origin HEAD
73
+ git push origin vA.B.C
74
+ npm view <package-name> version
275
75
  ```
276
76
 
277
- #### 3. GitHub PR: develop main
278
- - Check for open PR from develop→main: `gh pr list --repo LIFEAI/regen-root --base main --head develop`
279
- - If exists: use it. If not: create it via `mcp__claude_ai_Github_Proxy_MCP__create_pull_request`
280
- - Merge via `mcp__claude_ai_Github_Proxy_MCP__merge_pull_request` with `merge_method: merge`
77
+ Never use `--force` or bypass hooks. If a hook fails, fix the cause.
281
78
 
282
- #### 4. Confirm Coolify auto-deploy
79
+ ## RDC Skills Package
283
80
 
284
- regen-root is a **private repo**. Coolify's webhook is wired to Supabase — deployment events land there automatically. Do NOT poll the Coolify REST API in a loop. Check Supabase:
81
+ For this package, prefer the npm installer binary after publish:
285
82
 
286
- ```sql
287
- -- Wait for the affected app's deployment to show status = 'finished'
288
- SELECT slug, last_deploy_at, status, notes
289
- FROM deployment_registry
290
- WHERE slug IN (<affected slugs>)
291
- ORDER BY last_deploy_at DESC;
292
- ```
293
-
294
- If the registry hasn't updated within 2 minutes of the PR merge, check Coolify directly:
295
83
  ```bash
296
- curl -s -H "Authorization: Bearer $(curl -s http://127.0.0.1:52437/v/coolify-api)" \
297
- "https://deploy.regendevcorp.com/api/v1/applications/<uuid>/deployments?per_page=1"
84
+ npm install -g @lifeaitools/rdc-skills@latest
85
+ rdc-skills-install --profile core
298
86
  ```
299
87
 
300
- #### 5. Gate checks
301
- For each affected app, verify: HTTP 200, TLS valid, container running.
302
- Use `rdc:deploy diagnose <slug>` for any that fail.
303
-
304
- #### 6. Update registry
305
- ```sql
306
- UPDATE deployment_registry SET last_deploy_at = now() WHERE slug IN (<affected slugs>);
307
- ```
308
-
309
- ---
310
-
311
- ## Failure Modes
312
-
313
- | Failure | Marker | Action |
314
- |---------|--------|--------|
315
- | Dirty working tree | `[!]` | Abort — show one-line diff summary, ask to commit or stash |
316
- | Pre-commit hook fails | `[!]` | Fix root cause, re-stage, retry — NEVER `--no-verify` |
317
- | CI fails | `[!]` | Print run URL + last 20 log lines |
318
- | npm not registered | `[!]` | Check CI actually published — not a silent skip |
319
- | PR merge blocked | `[!]` | Show blocker (branch protection, conflict) — resolve and retry |
320
- | Coolify deploy failed | `[!]` | Run `rdc:deploy diagnose <slug>` — fix before declaring done |
321
- | Gate non-200 | `[!]` | Don't update registry until fixed |
322
-
323
- Show full checklist with `[!]` markers even on failure.
324
-
325
- ---
326
-
327
- ## Hard Rules
328
-
329
- - **Never push directly to `main`** — always via GitHub PR merge (`mcp__claude_ai_Github_Proxy_MCP__merge_pull_request`)
330
- - **Never `--force`, never `--no-verify`, never `--no-gpg-sign`**
331
- - **Never declare success** without verified install or verified Coolify gate
332
- - **Never release without an explicit `rdc:release` invocation** from the user
333
- - **Monorepo MCP servers** (`regen-media`, `gws`) are released via `rdc:release regen-root` — not separately
334
-
335
- ---
336
-
337
- ## Related
338
-
339
- - `.claude/context/clauth.md` — clauth release source of truth
340
- - `.claude/context/coolify-deployment.md` — Coolify watch_paths, deploy rules
341
- - `memory/feedback_version_bump_must_tag.md` — never bump without tagging
342
- - `memory/feedback_use_rdc_release.md` — "promote/deploy to main" always triggers this skill
88
+ Use `--profile lifeai` only on a workstation that intentionally has the LIFEAI project layout and services.
@@ -31,7 +31,7 @@ description: "Usage `rdc:self-test [--strict]` — Validate all rdc:* skills, pl
31
31
  Launch the interactive menu — pick tier, pick skill, see live output:
32
32
 
33
33
  ```bash
34
- node C:/Dev/rdc-skills/scripts/self-test-ui.mjs
34
+ node {RDC_SKILLS_ROOT}/scripts/self-test-ui.mjs
35
35
  ```
36
36
 
37
37
  Menu options:
@@ -45,9 +45,9 @@ Test output streams live to the terminal. No server, no extra processes.
45
45
 
46
46
  1. **Run the linter (direct or via UI):**
47
47
  ```bash
48
- node C:/Dev/rdc-skills/scripts/self-test.mjs
48
+ node {RDC_SKILLS_ROOT}/scripts/self-test.mjs
49
49
  # or interactively:
50
- node C:/Dev/rdc-skills/scripts/self-test-ui.mjs
50
+ node {RDC_SKILLS_ROOT}/scripts/self-test-ui.mjs
51
51
  ```
52
52
 
53
53
  2. **Interpret exit codes:**
@@ -1,217 +1,62 @@
1
1
  ---
2
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."
3
+ description: "Usage `rdc:terminal-config <task>` — read and safely modify Windows Terminal settings, shell profiles, and agent startup sequencing without relying on machine-specific paths."
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
- # rdc:terminal-config — Windows Terminal & Cell Startup Reference
10
+ # rdc:terminal-config — Terminal & Agent Startup
11
11
 
12
12
  ## When to Use
13
- - Before modifying any terminal setting, profile, or keybinding
14
- - When setting up a new profile (Claude, Codex, cell cells)
15
- - When cell startup is broken (wrong `--append-system-prompt`, wrong cwd, wrong CELL_ROLE)
16
- - When keybindings conflict or are missing
17
13
 
18
- ## ABSOLUTE RULES READ BEFORE TOUCHING ANYTHING
14
+ - Before modifying Windows Terminal settings, shell profiles, keybindings, startup scripts, or agent launch commands.
15
+ - When setting up a Claude, Codex, or project-specific cell profile.
16
+ - When startup is broken because the wrong cwd, shell, env var, or prompt file is being loaded.
19
17
 
20
- 1. **NEVER change profile GUIDs** — Windows Terminal uses these as identity. Changing a GUID orphans all pinned shortcuts and window layouts.
21
- 2. **NEVER remove `"id": null` keybinding entries** — these intentionally UNBIND enter/shift-enter/ctrl-enter so Claude Code's interactive prompt works without the terminal swallowing keystrokes.
22
- 3. **NEVER change `firstWindowPreference`** — it's `persistedWindowLayout`, which restores Dave's exact pane/tab layout on restart.
23
- 4. **NEVER change `defaultProfile`** — it's `{574e775e-...}` (PowerShell Core). Changing it breaks new-tab behavior.
24
- 5. **ALWAYS read the file before editing** — never write from memory.
25
- 6. **ALWAYS validate JSON** before saving — a syntax error silently resets all settings on next Terminal launch (no error shown, settings wiped).
18
+ ## Rules
26
19
 
27
- ---
28
-
29
- ## File Locations
30
-
31
- | File | Path | Purpose |
32
- |------|------|---------|
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.ps1` | Launched by each cell profile (PowerShell 7). Sets CELL_ROLE, prints banner, runs `claude --append-system-prompt` |
35
- | **Cell state dir** | `C:\Dev\regen-root\.cell-state\` | PID lockfiles per cell (`sv.lock`, `cell-portal.lock`, etc.) |
36
- | **Claude keybindings** | `C:\Users\DaveLadouceur\.claude\keybindings.json` | Claude Code keybindings (separate from Terminal) |
37
- | **Claude settings** | `C:\Dev\regen-root\.claude\settings.json` | Project-level Claude Code settings, hooks, permissions |
38
- | **Claude user settings** | `C:\Users\DaveLadouceur\.claude\settings.json` | User-level Claude Code settings |
39
-
40
- ---
41
-
42
- ## Profile Inventory
43
-
44
- Every profile has a fixed GUID. Do not change them.
20
+ 1. Read the current settings file before editing.
21
+ 2. Never change existing profile GUIDs unless the user explicitly wants a new profile identity.
22
+ 3. Never remove intentionally null keybindings without explaining the consequence.
23
+ 4. Validate JSON before saving.
24
+ 5. Use environment-derived paths:
25
+ - Terminal settings: `$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json`
26
+ - Claude user settings: `$env:USERPROFILE\.claude\settings.json`
27
+ - Codex user config: `$env:USERPROFILE\.codex\config.toml`
28
+ - Project startup scripts: `{PROJECT_ROOT}\scripts\...`
45
29
 
46
- | GUID | Name | Tab Color | Purpose |
47
- |------|------|-----------|---------|
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.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
- | `{767642b0-606c-468c-89a0-4573df6fcdaf}` | VS Code | `#2D5986` (blue) | Launches `code-safe C:\Dev\regen-root` |
53
- | `{6cbd327a-5b5e-4e83-96f6-041615382d36}` | PowerShell (Admin) | `#1E3A5F` (dark blue) | Elevated PowerShell — uses `LIFEAI Slate` color scheme |
54
- | `{0caa0dad-35be-5f56-a8ff-afceeeaa6101}` | Command Prompt | — | Legacy CMD — visible but rarely used |
55
- | `{574e775e...}` and others | `hidden: true` | — | Windows PowerShell, Azure Shell, VS DevTools — all hidden |
56
-
57
- ### Profile commandlines
30
+ ## Safe Edit Procedure
58
31
 
59
32
  ```
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
- VS Code: cmd.exe /c start "" code-safe C:\Dev\regen-root
63
- Admin PS: powershell.exe -NoLogo (+ elevate: true)
64
- ```
65
-
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).
68
-
69
- ---
70
-
71
- ## Keybinding Map
72
-
73
- ### Critical: intentionally unbound keys (never restore these)
74
-
75
- ```json
76
- { "id": null, "keys": "shift+enter" }
77
- { "id": null, "keys": "ctrl+enter" }
78
- { "id": null, "keys": "enter" }
33
+ rdc:terminal-config: <task>
34
+ [ ] Current settings file located from environment
35
+ [ ] File read before edit
36
+ [ ] Existing GUIDs preserved
37
+ [ ] Null keybindings preserved or explicitly approved
38
+ [ ] JSON/TOML syntax validated
39
+ [ ] Startup command uses the intended shell, cwd, and project root
40
+ [ ] Verification command run
41
+ ✅ rdc:terminal-config: <result>
79
42
  ```
80
43
 
81
- **Why:** Without these null bindings, Windows Terminal intercepts Enter/Shift-Enter/Ctrl-Enter before Claude Code's interactive prompt sees them. Sessions break silently.
82
-
83
- ### Pane navigation (safe to change)
84
-
85
- | Keys | Action |
86
- |------|--------|
87
- | `ctrl+alt+v` | Split pane right (duplicate) |
88
- | `ctrl+alt+h` | Split pane down (duplicate) |
89
- | `ctrl+alt+left/right/up/down` | Move focus between panes |
90
- | `ctrl+alt+shift+left/right` | Resize pane |
91
- | `ctrl+shift+z` | Toggle pane zoom |
92
- | `ctrl+shift+w` | Close pane |
93
- | `alt+shift+d` | Split pane auto (duplicate) |
94
-
95
- ### Standard overrides
96
-
97
- | Keys | Action |
98
- |------|--------|
99
- | `ctrl+c` | Copy (singleLine: false) |
100
- | `ctrl+v` | Paste |
101
- | `ctrl+shift+f` | Find |
102
-
103
- ---
104
-
105
- ## Color Schemes
106
-
107
- Four custom schemes live in the `schemes` array. Do not rename them — profiles reference by name.
108
-
109
- | Name | Background | Used by |
110
- |------|-----------|---------|
111
- | `Dimidium` | `#282A36` (dark purple) | Default for all cell profiles |
112
- | `LIFEAI Claude` | `#1A0F0A` (dark brown) | Available, not currently assigned |
113
- | `LIFEAI Dark` | `#0D1F17` (dark green) | Available, not currently assigned |
114
- | `LIFEAI Slate` | `#0F1923` (dark blue) | PowerShell Admin profile |
115
- | `Dracula` | `#282A36` | Available, not currently assigned |
116
-
117
- ---
118
-
119
- ## Global Settings (safe reference)
44
+ ## Windows Terminal Notes
120
45
 
121
- ```json
122
- "copyOnSelect": true // highlight = copied. Don't change — muscle memory.
123
- "copyFormatting": "all" // preserves ANSI colors on copy
124
- "firstWindowPreference": "persistedWindowLayout" // restores last layout on open. NEVER CHANGE.
125
- "defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}" // PowerShell Core. NEVER CHANGE.
126
- "theme": "dark"
127
- "showTabsFullscreen": true
128
- "initialRows": 40
129
- ```
46
+ - Prefer `pwsh.exe` for PowerShell 7 profiles.
47
+ - Keep `startingDirectory` explicit for project profiles.
48
+ - Use a newly generated GUID for each new profile:
130
49
 
131
- Font defaults (in `profiles.defaults`):
132
- ```json
133
- "face": "Consolas"
134
- "size": 12
135
- "cellHeight": "1.2"
136
- "cellWidth": "0.6"
137
- "weight": "normal"
50
+ ```powershell
51
+ "{$([System.Guid]::NewGuid().ToString())}"
138
52
  ```
139
53
 
140
- ---
141
-
142
- ## Cell Startup Sequencing
143
-
144
- `cell-init.ps1` is the PowerShell 7 startup script for all cell profiles. It:
145
-
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
148
- 3. Prints a colored banner
149
- 4. Writes a PID lockfile to `.cell-state\<role>.lock`
150
- 5. Runs `git log` filtered to that cell's path scope
151
- 6. Launches: `claude --append-system-prompt "<Prompt>"`
152
-
153
- ### Cell role → prompt scope mapping
154
-
155
- | Role arg | Claude system prompt |
156
- |----------|---------------------|
157
- | `sv` | "You are the SUPERVISOR cell. You have full repo access. Coordinate across all packages and apps." |
158
- | `cell-portal` | Portal cell — frontend apps only (apps/prt, apps/rdc, packages/ui, models/) |
159
- | `cell-data` | Data cell — packages/supabase, virtue-engine, pal, hail, daf-intelligence |
160
- | `cell-cs2` | CS2 cell — packages/cs2, quad-pixel, planetary-ontology, models/ |
161
- | `cell-mktg` | Marketing cell — rdc-marketing-engine, canvas, sites/, email-templates |
162
- | `cell-infra` | Infra cell — Coolify, CI/CD, root config, scripts/ |
163
- | `specialist` | Specialist cell — repo-wide reviews, cleanup, docs, audits |
164
-
165
- ---
166
-
167
- ## Safe Edit Procedure
168
-
169
- ### When adding or modifying a profile
170
-
171
- 1. Read the current file first (never edit from memory)
172
- 2. Generate a new GUID with: `[System.Guid]::NewGuid().ToString('B')` (PowerShell) — wrap in `{}`
173
- 3. Copy the SV profile as a template
174
- 4. Set `commandline`, `startingDirectory`, `environment`, `tabColor`, `icon`, `name`
175
- 5. Do NOT set `guid` to an existing value
176
- 6. Validate JSON: `Get-Content settings.json | ConvertFrom-Json` (errors = syntax problem)
177
- 7. Save and reopen Terminal to verify
178
-
179
- ### When adding a keybinding
180
-
181
- 1. Add to the `keybindings` array
182
- 2. Check for conflicts with the null-bound keys (`enter`, `shift+enter`, `ctrl+enter`) — NEVER override them
183
- 3. Validate JSON before saving
184
-
185
- ### When editing cell startup
186
-
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
-
191
- ---
192
-
193
- ## Validation Commands
54
+ - Validate settings before restarting Terminal:
194
55
 
195
56
  ```powershell
196
- # Validate JSON syntax before saving
197
57
  Get-Content "$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\settings.json" | ConvertFrom-Json
198
-
199
- # Check cell lockfiles
200
- Get-Content C:\Dev\regen-root\.cell-state\sv.lock
201
-
202
- # Generate a new GUID for a profile
203
- "{$([System.Guid]::NewGuid().ToString())}"
204
58
  ```
205
59
 
206
- ---
207
-
208
- ## WezTerm Alternative
209
-
210
- If Windows Terminal settings keep getting corrupted or misedited, **WezTerm** is the recommended migration:
211
- - Config is a Lua file (`~/.wezterm.lua` or `C:\Users\<user>\.config\wezterm\wezterm.lua`)
212
- - Committed to git — every change is a reviewable diff, not an opaque JSON blob
213
- - Startup layouts (tabs, panes, commands) are defined programmatically
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
- - Download: https://wezfurlong.org/wezterm/installation.html
60
+ ## Startup Scripts
216
61
 
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.
62
+ If a project uses role/cell startup scripts, keep those scripts under the project root and commit them with the project. Do not bake one user's absolute machine paths into shared RDC skill files.