@lifeaitools/rdc-skills 0.9.28 → 0.9.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/guides/agents/verify.md +19 -0
- package/package.json +1 -1
- package/skills/build/SKILL.md +56 -4
- package/skills/handoff/SKILL.md +26 -0
- package/skills/plan/SKILL.md +70 -2
- package/skills/review/SKILL.md +2 -1
- package/skills/terminal-config/SKILL.md +217 -0
package/guides/agents/verify.md
CHANGED
|
@@ -37,6 +37,23 @@ If you're about to write any of these, STOP:
|
|
|
37
37
|
|
|
38
38
|
Run these in order. All must pass. Capture output.
|
|
39
39
|
|
|
40
|
+
### 0. Checklist decomposition quality
|
|
41
|
+
|
|
42
|
+
Before code verification, inspect each work item checklist and the matching plan section.
|
|
43
|
+
|
|
44
|
+
Required plan evidence:
|
|
45
|
+
- `## Checklist Decomposition Matrix`
|
|
46
|
+
- `## Checklist Quality Gate`
|
|
47
|
+
- `verdict: PASS`
|
|
48
|
+
|
|
49
|
+
Required work item evidence:
|
|
50
|
+
- At least one `decomp-*` checklist item for every implementation work item
|
|
51
|
+
- At least one `test-*` checklist item for every implementation work item
|
|
52
|
+
- Each `decomp-*` item includes a route or file path, one action, one expected result, and one evidence artifact
|
|
53
|
+
- Each `decomp-*` item is independently pass/fail; vague rows like "UI complete", "theme management works", or "integration verified" are failures
|
|
54
|
+
|
|
55
|
+
If this check fails, stop validation for that item and reopen it. Do not mark a work item `done` when the checklist itself is not decomposed enough to prove completion.
|
|
56
|
+
|
|
40
57
|
### 1. Per-package vitest (every package touched)
|
|
41
58
|
|
|
42
59
|
```bash
|
|
@@ -107,6 +124,7 @@ $ npx tsc --noEmit --project packages/hail/tsconfig.json
|
|
|
107
124
|
(no output — clean)
|
|
108
125
|
|
|
109
126
|
### Status
|
|
127
|
+
Checklist quality: PASS
|
|
110
128
|
PASS — safe to mark tasks done.
|
|
111
129
|
```
|
|
112
130
|
|
|
@@ -124,6 +142,7 @@ If any step fails: do NOT claim completion. Report the failure, fix it, re-run t
|
|
|
124
142
|
When dispatching a verification agent, give them:
|
|
125
143
|
- Exact list of packages/apps to verify
|
|
126
144
|
- Explicit ban on `pnpm build` / `pnpm test` / `pnpm -r`
|
|
145
|
+
- Work item checklists and the matching plan doc so `decomp-*` quality can be verified first
|
|
127
146
|
- Required output format (above)
|
|
128
147
|
- Instruction: "If any command fails, STOP and report. Do not fix. Do not continue."
|
|
129
148
|
|
package/package.json
CHANGED
package/skills/build/SKILL.md
CHANGED
|
@@ -97,6 +97,10 @@ Read the task title and description, then:
|
|
|
97
97
|
|-----------|--------|
|
|
98
98
|
| No child tasks returned | → Invoke `rdc:plan` on this epic. Do NOT proceed with build. |
|
|
99
99
|
| Tasks exist but all have empty `description` fields | → Invoke `rdc:plan` on this epic. Tasks without descriptions cannot be safely dispatched. |
|
|
100
|
+
| Plan doc missing `## Checklist Decomposition Matrix` | → Invoke `rdc:plan` on this epic. Do NOT dispatch agents. |
|
|
101
|
+
| Plan doc missing `## Checklist Quality Gate` with `verdict: PASS` | → Invoke `rdc:plan` on this epic. Do NOT dispatch agents. |
|
|
102
|
+
| Any implementation task lacks `decomp-*` checklist items | → Invoke `rdc:plan` on this epic. Coarse checklists cannot be safely dispatched. |
|
|
103
|
+
| Any `decomp-*` item lacks route/file, action, expected result, or evidence artifact | → Invoke `rdc:plan` on this epic. Do NOT dispatch agents. |
|
|
100
104
|
| Tasks exist and have descriptions | → Continue with build. |
|
|
101
105
|
|
|
102
106
|
**Re-planning is not a failure — it is correct behavior.** The build skill is the last gate before agent dispatch; catching an under-specified epic here is cheaper than a wasted agent run.
|
|
@@ -126,17 +130,53 @@ Read the task title and description, then:
|
|
|
126
130
|
|
|
127
131
|
**If design decisions exist: follow them.** Include the summary in the agent prompt.
|
|
128
132
|
|
|
129
|
-
3. **Load the plan** (
|
|
133
|
+
3. **Load the plan** (mandatory): check `.rdc/plans/` for matching topic (fallback: `.rdc/plans/`).
|
|
134
|
+
|
|
135
|
+
3b. **Checklist decomposition quality gate (mandatory before code):**
|
|
136
|
+
|
|
137
|
+
`rdc:build` is the final gate before implementation. It MUST reject any plan or work item that is too coarse for an agent to execute and verify independently.
|
|
138
|
+
|
|
139
|
+
Required plan sections:
|
|
140
|
+
- `## Checklist Decomposition Matrix`
|
|
141
|
+
- `## Checklist Quality Gate`
|
|
142
|
+
- `verdict: PASS`
|
|
143
|
+
|
|
144
|
+
Required task checklist shape:
|
|
145
|
+
- Every implementation work item has at least one `decomp-*` checklist row and one `test-*` checklist row.
|
|
146
|
+
- Every `decomp-*` row names a concrete route or file path.
|
|
147
|
+
- Every `decomp-*` row names one user/agent action.
|
|
148
|
+
- Every `decomp-*` row names one expected UI/API/DB result.
|
|
149
|
+
- Every `decomp-*` row names one verification artifact: test name, route probe, Playwright screenshot, SQL query, API response, type-check, migration proof, or CLI transcript.
|
|
150
|
+
|
|
151
|
+
Atomicity rubric:
|
|
152
|
+
- One observable behavior per `decomp-*` row.
|
|
153
|
+
- The row can pass or fail without reading hidden intent from the plan narrative.
|
|
154
|
+
- The row is small enough for a worker to implement, tick, and cite evidence for directly.
|
|
155
|
+
- Vague rows such as "theme management works", "UI implemented", "verified", "all screens", or "integration complete" are failures.
|
|
156
|
+
|
|
157
|
+
Minimum decomposition heuristics:
|
|
158
|
+
- UI route: at least empty/loading/loaded/error or the documented reason a state does not apply.
|
|
159
|
+
- CRUD surface: at least list, create, edit, detail, duplicate/delete/archive where applicable, and validation failure.
|
|
160
|
+
- API route: at least successful read/write, validation failure, and unauthorized/forbidden or documented auth bypass.
|
|
161
|
+
- DB/migration task: at least schema object, relationship/guard, policy/permission, seed/fixture or backfill, and smoke query.
|
|
162
|
+
- Editor/sidebar/CLI workflow: at least start, attach/open, enqueue action, observe result, timeout/error, and live refresh where applicable.
|
|
163
|
+
|
|
164
|
+
If the gate fails:
|
|
165
|
+
- Interactive: show the failing rows and invoke `rdc:plan <epic-id>` to repair the matrix before dispatch.
|
|
166
|
+
- Unattended: invoke `rdc:plan <epic-id> --unattended`, reload tasks, and run this gate once more.
|
|
167
|
+
- If the second gate fails, abort the build and return the failure list. Do not dispatch implementation agents.
|
|
168
|
+
|
|
169
|
+
**Plan verifier escalation:** A separate verifier agent is optional, not default. Dispatch one only when the plan touches 5+ UI routes, 3+ data/API boundaries, auth/security, production deployment, or when this rubric fails twice. The verifier reads the plan and work-item checklists only; it does not write code.
|
|
130
170
|
|
|
131
171
|
4. **Read CLAUDE.md files** for all affected packages.
|
|
132
172
|
|
|
133
173
|
5. **Classify each task** → assign agent type from the table above.
|
|
134
174
|
|
|
135
|
-
5b. **Write
|
|
136
|
-
For each task, append
|
|
175
|
+
5b. **Write or refresh the checklist into every work item before dispatching:**
|
|
176
|
+
For each task, append the exact `decomp-*` and `test-*` checklist rows to its notes BEFORE setting to `in_progress`:
|
|
137
177
|
```sql
|
|
138
178
|
SELECT update_work_item_status('<id>'::uuid, 'in_progress',
|
|
139
|
-
'["CHECKLIST: [ ] <
|
|
179
|
+
'["CHECKLIST: [ ] decomp-ui-route-state: <route/file> | action=<action> | expect=<result> | evidence=<artifact>, [ ] test-smoke-route: <route probe>, [ ] committed"]'::jsonb
|
|
140
180
|
);
|
|
141
181
|
```
|
|
142
182
|
The agent must complete every item on this checklist and return it checked off in AGENT_COMPLETE.
|
|
@@ -191,6 +231,13 @@ Read the task title and description, then:
|
|
|
191
231
|
- **`"When done, set your work item to 'review' (NOT 'done') and return AGENT_COMPLETE with a verification field. The validator closes work items — you do not."`**
|
|
192
232
|
- **`"COMPLETION PROOF REQUIRED in AGENT_COMPLETE: list every file written, the exact commit hash, and paste the vitest/tsc output. A report without this evidence will be rejected."`**
|
|
193
233
|
- **`"If you find that a file or feature already exists: you MUST still verify it satisfies the full task spec before marking review. Finding a file is not completion. Run verification, check every requirement, and report what you found vs. what was required."`**
|
|
234
|
+
- **The decomposition items from the work item's checklist** (all `decomp-*` prefixed items). Include them verbatim in the prompt and instruct the agent:
|
|
235
|
+
```
|
|
236
|
+
DECOMPOSITION CHECKLIST — you MUST implement/verify each row and tick it immediately via update_checklist_item:
|
|
237
|
+
- decomp-ui-xxx: <route/file> | action=<action> | expect=<result> | evidence=<artifact>
|
|
238
|
+
- decomp-api-xxx: <route/file> | action=<action> | expect=<result> | evidence=<artifact>
|
|
239
|
+
Tick each item as soon as that specific behavior is implemented and proven. Do NOT batch.
|
|
240
|
+
```
|
|
194
241
|
- **The test plan items from the work item's checklist** (all `test-*` prefixed items). Include them verbatim in the prompt and instruct the agent:
|
|
195
242
|
```
|
|
196
243
|
TEST PLAN — you MUST implement/verify each of these and tick them off via update_checklist_item:
|
|
@@ -263,6 +310,11 @@ Read the task title and description, then:
|
|
|
263
310
|
- Runs `npx tsc --noEmit` for every touched app/package
|
|
264
311
|
- Starts the dev server and probes every modified route (expects HTTP 200, not 500)
|
|
265
312
|
- Runs vitest for every touched package
|
|
313
|
+
- **Verifies checklist decomposition quality per work item before functional validation:**
|
|
314
|
+
- Every implementation work item has at least one `decomp-*` item and one `test-*` item
|
|
315
|
+
- Every `decomp-*` item includes route/file, action, expected result, and evidence artifact
|
|
316
|
+
- Any unchecked `decomp-*` item with `required: true` = work item CANNOT be set to `done`
|
|
317
|
+
- Any coarse or non-falsifiable `decomp-*` item = reopen to `todo` with the specific failure
|
|
266
318
|
- **Verifies test plan completion per work item:**
|
|
267
319
|
- For each `test-assert-*` checklist item: confirm a corresponding vitest test exists and passes
|
|
268
320
|
- For each `test-smoke-*` checklist item: run the command and confirm exit code / HTTP status
|
package/skills/handoff/SKILL.md
CHANGED
|
@@ -83,6 +83,27 @@ Template:
|
|
|
83
83
|
Wave 1 (parallel): Package 1, Package 2
|
|
84
84
|
Wave 2 (after Wave 1): Package 3
|
|
85
85
|
|
|
86
|
+
## Checklist Decomposition Matrix
|
|
87
|
+
|
|
88
|
+
| Work item | Atomic deliverable | Surface type | Route or file path | Preconditions / fixture data | Action | Expected result | Verification artifact | Owner package | Status |
|
|
89
|
+
|-----------|-------------------|--------------|--------------------|------------------------------|--------|-----------------|-----------------------|---------------|--------|
|
|
90
|
+
| WP-1 | decomp-<surface>-<slug> | screen | /route | seeded fixture | open / click / submit | observable result | Playwright screenshot / route probe / test name | Package 1 | todo |
|
|
91
|
+
|
|
92
|
+
Rules:
|
|
93
|
+
- One observable behavior per row.
|
|
94
|
+
- Each row must be independently pass/fail.
|
|
95
|
+
- Each implementation work item must have matching `decomp-*` checklist rows and `test-*` verification rows.
|
|
96
|
+
- UI routes list state rows separately: empty, loading, loaded, error, create/edit/detail/mobile where applicable.
|
|
97
|
+
- API and DB rows include success, failure/guard, and side-effect proof where applicable.
|
|
98
|
+
|
|
99
|
+
## Checklist Quality Gate
|
|
100
|
+
|
|
101
|
+
verdict: PASS | FAIL
|
|
102
|
+
failures:
|
|
103
|
+
- <missing/coarse row if any>
|
|
104
|
+
deferred:
|
|
105
|
+
- <explicitly out-of-scope row if any>
|
|
106
|
+
|
|
86
107
|
## Definition of Done
|
|
87
108
|
|
|
88
109
|
- [ ] [specific acceptance criterion]
|
|
@@ -114,6 +135,9 @@ Where: <files>
|
|
|
114
135
|
Agent type: <type>
|
|
115
136
|
Guide: .rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md)
|
|
116
137
|
Design doc: .rdc/plans/<topic-slug>.md (fallback: .rdc/plans/<topic-slug>.md)
|
|
138
|
+
Checklist: include required rows from the plan matrix:
|
|
139
|
+
- decomp-<surface>-<slug>: route/file=<path> | action=<action> | expect=<result> | evidence=<artifact>
|
|
140
|
+
- test-<type>-<slug>: <verification command or artifact>
|
|
117
141
|
Depends on: <other task if applicable>
|
|
118
142
|
Est: <hours>',
|
|
119
143
|
p_parent_id := '<epic-uuid>'::uuid,
|
|
@@ -125,6 +149,8 @@ Est: <hours>',
|
|
|
125
149
|
);
|
|
126
150
|
```
|
|
127
151
|
|
|
152
|
+
Do not create build-ready tasks unless the plan has `## Checklist Decomposition Matrix` and `## Checklist Quality Gate` with `verdict: PASS`. If the matrix fails, save the plan as `Status: Needs checklist repair` and return the failure list instead of creating dispatchable implementation tasks.
|
|
153
|
+
|
|
128
154
|
### Step 4 — Register Prototype (if one was built)
|
|
129
155
|
|
|
130
156
|
```sql
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -52,6 +52,66 @@ description: "No epic exists and you need architecture + task breakdown. Produce
|
|
|
52
52
|
- Assign an agent type to each work package from the typed dispatch table in rdc:build. Include the guide file path (from `.rdc/guides/`, fallback `.rdc/guides/`) in each work package description.
|
|
53
53
|
- Estimate: small (1 agent, <500 LOC), medium (1 agent, 500-1500 LOC), large (needs splitting)
|
|
54
54
|
|
|
55
|
+
4b. **Build the checklist decomposition matrix (MANDATORY PRE-BUILD GATE):**
|
|
56
|
+
|
|
57
|
+
Before writing Supabase work items, create a `## Checklist Decomposition Matrix`
|
|
58
|
+
in the plan doc. This matrix is the source of truth for task checklists and
|
|
59
|
+
build verification.
|
|
60
|
+
|
|
61
|
+
Required columns:
|
|
62
|
+
- Work item ID or placeholder
|
|
63
|
+
- Atomic deliverable
|
|
64
|
+
- Surface type: `screen`, `state`, `action`, `api`, `db`, `migration`, `component`, `asset`, `tool`, `test`, `doc`
|
|
65
|
+
- Route or file path
|
|
66
|
+
- Preconditions / fixture data
|
|
67
|
+
- User or agent action
|
|
68
|
+
- Expected UI/API/DB result
|
|
69
|
+
- Verification artifact: test name, route probe, Playwright screenshot, SQL query, API response, type-check, migration proof, or CLI transcript
|
|
70
|
+
- Owner work package
|
|
71
|
+
- Status
|
|
72
|
+
|
|
73
|
+
Atomicity rubric:
|
|
74
|
+
- One observable behavior per row.
|
|
75
|
+
- Each row names a concrete route or file path.
|
|
76
|
+
- Each row names one concrete verification artifact.
|
|
77
|
+
- Each row can independently pass or fail.
|
|
78
|
+
- Each row is small enough for a worker to implement and tick without hidden intent.
|
|
79
|
+
|
|
80
|
+
Required decomposition by surface:
|
|
81
|
+
- UI screens: list empty, loading, loaded, error, create, edit, detail, delete/archive guard, mobile, and auth states where applicable.
|
|
82
|
+
- UI actions: open, search, filter, select, duplicate, save, assign, activate, archive, delete, import, apply, cancel where applicable.
|
|
83
|
+
- API routes: successful read/write, validation failure, unauthorized/forbidden, and side-effect verification where applicable.
|
|
84
|
+
- DB/migrations: table/column/index/policy/trigger/function, FK/guard, rollback or smoke query, and type exposure.
|
|
85
|
+
- CLI/sidebar/local tools: start, attach, enqueue, poll, reply, timeout/not-found, and live refresh where applicable.
|
|
86
|
+
- Visual work: each named screenshot and visual checkpoint gets its own row.
|
|
87
|
+
- Cross-system workflows: each handoff boundary gets its own row.
|
|
88
|
+
|
|
89
|
+
Minimum row-count heuristics:
|
|
90
|
+
- UI route: at least 4 rows.
|
|
91
|
+
- CRUD surface: at least 6 rows.
|
|
92
|
+
- API route: at least 3 rows.
|
|
93
|
+
- DB work package: at least 5 rows.
|
|
94
|
+
- Local editor/sidebar workflow: at least 5 rows.
|
|
95
|
+
|
|
96
|
+
Reject these checklist items as too coarse:
|
|
97
|
+
- "theme management works"
|
|
98
|
+
- "build all screens"
|
|
99
|
+
- "verify UI"
|
|
100
|
+
- "integration complete"
|
|
101
|
+
- "tests pass"
|
|
102
|
+
|
|
103
|
+
Replace them with rows like:
|
|
104
|
+
- `decomp-ui-theme-manager-loaded: /brands/[id]/theme shows owned theme rows with status, project usage, and actions; evidence: Playwright screenshot`
|
|
105
|
+
- `decomp-action-duplicate-theme: duplicate submits source brand_theme_id and creates a new editable brand-owned copy; evidence: vitest + DB query`
|
|
106
|
+
- `decomp-api-import-validation: POST /api/tools/theme-import rejects missing source URL with 400 JSON error; evidence: route probe`
|
|
107
|
+
|
|
108
|
+
Add a `## Checklist Quality Gate` section with:
|
|
109
|
+
- `verdict: PASS` only when every row passes the rubric.
|
|
110
|
+
- `failures:` list any coarse, missing, duplicate, or unverifiable rows.
|
|
111
|
+
- `deferred:` list any explicit out-of-scope rows.
|
|
112
|
+
|
|
113
|
+
Do not create build-ready work items unless this gate is `PASS`.
|
|
114
|
+
|
|
55
115
|
5. **Write a test plan for each work package (MANDATORY):**
|
|
56
116
|
|
|
57
117
|
Every work package MUST have a `test_plan` section with specific, concrete test items. Each item has a type:
|
|
@@ -65,6 +125,8 @@ description: "No epic exists and you need architecture + task breakdown. Produce
|
|
|
65
125
|
|
|
66
126
|
**Rules for writing test plan items:**
|
|
67
127
|
- Every item must be a specific, falsifiable assertion — not "write tests" or "verify it works"
|
|
128
|
+
- Every item must map to one or more rows in the Checklist Decomposition Matrix.
|
|
129
|
+
- A test plan item may summarize multiple checks only when the matrix still keeps those checks as separate atomic rows.
|
|
68
130
|
- New functions/modules MUST have at least one `assert` item
|
|
69
131
|
- API routes MUST have at least one `smoke` item
|
|
70
132
|
- UI pages MUST have at least one `visual` item
|
|
@@ -91,6 +153,8 @@ description: "No epic exists and you need architecture + task breakdown. Produce
|
|
|
91
153
|
## Goal
|
|
92
154
|
## Design Decisions
|
|
93
155
|
## Work Packages (each with test plan)
|
|
156
|
+
## Checklist Decomposition Matrix
|
|
157
|
+
## Checklist Quality Gate
|
|
94
158
|
## Sequencing (what can parallelize, what depends on what)
|
|
95
159
|
## Risks & Mitigations
|
|
96
160
|
```
|
|
@@ -100,12 +164,16 @@ description: "No epic exists and you need architecture + task breakdown. Produce
|
|
|
100
164
|
- Epic DoD MUST include: `{"id":"test-plan-verified","text":"All test plan items implemented and passing","required":true,"checked":false}`
|
|
101
165
|
- Set `p_definition_of_done` on the epic — child tasks inserted under it will auto-inherit it as their checklist
|
|
102
166
|
- One task per work package via `insert_work_item(p_parent_id := <epic_id>, ...)` — checklist auto-hydrated from epic's DoD
|
|
103
|
-
- **Additionally, write
|
|
167
|
+
- **Additionally, write decomposition rows as checklist items** on each task, using id format `decomp-<surface>-<slug>`.
|
|
168
|
+
The task checklist MUST include both the atomic `decomp-*` rows and the `test-*` verification rows.
|
|
169
|
+
The `decomp-*` row text must include the route/file, action, expected result, and evidence artifact.
|
|
170
|
+
- **Write test plan items as checklist items** on each task, using id format `test-<type>-<slug>`:
|
|
104
171
|
```sql
|
|
105
172
|
SELECT insert_work_item(
|
|
106
173
|
p_parent_id := '<epic_id>',
|
|
107
174
|
p_title := 'WP-2: AST Scanner',
|
|
108
175
|
p_checklist := '[
|
|
176
|
+
{"id":"decomp-api-scan-success","text":"api: GET /api/layout/scan?dir=apps/studio/src returns 200 JSON with roots[] and warnings[]; evidence: route probe output","required":true,"checked":false},
|
|
109
177
|
{"id":"test-assert-scanner-filters","text":"assert: scanFile returns only container components","required":true,"checked":false},
|
|
110
178
|
{"id":"test-assert-nesting-warn","text":"assert: invalid nesting produces warnings","required":true,"checked":false},
|
|
111
179
|
{"id":"test-smoke-scan-api","text":"smoke: GET /api/layout/scan returns 200","required":true,"checked":false},
|
|
@@ -114,7 +182,7 @@ description: "No epic exists and you need architecture + task breakdown. Produce
|
|
|
114
182
|
]'::jsonb
|
|
115
183
|
);
|
|
116
184
|
```
|
|
117
|
-
- Agents MUST tick each `test-*` checklist item as they implement/verify it (via `update_checklist_item`)
|
|
185
|
+
- Agents MUST tick each `decomp-*` and `test-*` checklist item as they implement/verify it (via `update_checklist_item`)
|
|
118
186
|
- `update_work_item_status('done')` will REJECT if any `required: true` item is unchecked — this is the enforcement gate
|
|
119
187
|
- Set priorities: urgent/high/normal based on sequencing
|
|
120
188
|
|
package/skills/review/SKILL.md
CHANGED
|
@@ -81,7 +81,8 @@ description: "Post-build quality gate: tsc, tests, stale docs, export conflicts
|
|
|
81
81
|
|
|
82
82
|
9. **Verification gate — dispatch the verify agent:**
|
|
83
83
|
After any fixes land, run the verify gate on every touched package. See `guides/agents/verify.md`.
|
|
84
|
-
**Iron Law: no CLEAN verdict without fresh evidence.** Quote the vitest
|
|
84
|
+
**Iron Law: no CLEAN verdict without fresh evidence.** Quote the checklist decomposition verdict, vitest output, and tsc output in the report.
|
|
85
|
+
The verify agent must reject any work item that lacks passed `decomp-*` checklist rows or whose rows are too coarse to prove one observable behavior at a time.
|
|
85
86
|
If verify fails → do NOT emit CLEAN. Loop back, fix, re-run verify.
|
|
86
87
|
|
|
87
88
|
10. **Fix issues found:**
|
|
@@ -0,0 +1,217 @@
|
|
|
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."
|
|
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
|
+
# terminal-config — Windows Terminal & Cell Startup Reference
|
|
11
|
+
|
|
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
|
+
|
|
18
|
+
## ⛔ ABSOLUTE RULES — READ BEFORE TOUCHING ANYTHING
|
|
19
|
+
|
|
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).
|
|
26
|
+
|
|
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.cmd` | Launched by each cell profile. 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.
|
|
45
|
+
|
|
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.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` |
|
|
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
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
SV / Claude: cmd.exe /k "C:\Dev\regen-root\scripts\cell-init.cmd" sv
|
|
61
|
+
Codex: powershell.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
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## Keybinding Map
|
|
71
|
+
|
|
72
|
+
### Critical: intentionally unbound keys (never restore these)
|
|
73
|
+
|
|
74
|
+
```json
|
|
75
|
+
{ "id": null, "keys": "shift+enter" }
|
|
76
|
+
{ "id": null, "keys": "ctrl+enter" }
|
|
77
|
+
{ "id": null, "keys": "enter" }
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Why:** Without these null bindings, Windows Terminal intercepts Enter/Shift-Enter/Ctrl-Enter before Claude Code's interactive prompt sees them. Sessions break silently.
|
|
81
|
+
|
|
82
|
+
### Pane navigation (safe to change)
|
|
83
|
+
|
|
84
|
+
| Keys | Action |
|
|
85
|
+
|------|--------|
|
|
86
|
+
| `ctrl+alt+v` | Split pane right (duplicate) |
|
|
87
|
+
| `ctrl+alt+h` | Split pane down (duplicate) |
|
|
88
|
+
| `ctrl+alt+left/right/up/down` | Move focus between panes |
|
|
89
|
+
| `ctrl+alt+shift+left/right` | Resize pane |
|
|
90
|
+
| `ctrl+shift+z` | Toggle pane zoom |
|
|
91
|
+
| `ctrl+shift+w` | Close pane |
|
|
92
|
+
| `alt+shift+d` | Split pane auto (duplicate) |
|
|
93
|
+
|
|
94
|
+
### Standard overrides
|
|
95
|
+
|
|
96
|
+
| Keys | Action |
|
|
97
|
+
|------|--------|
|
|
98
|
+
| `ctrl+c` | Copy (singleLine: false) |
|
|
99
|
+
| `ctrl+v` | Paste |
|
|
100
|
+
| `ctrl+shift+f` | Find |
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Color Schemes
|
|
105
|
+
|
|
106
|
+
Four custom schemes live in the `schemes` array. Do not rename them — profiles reference by name.
|
|
107
|
+
|
|
108
|
+
| Name | Background | Used by |
|
|
109
|
+
|------|-----------|---------|
|
|
110
|
+
| `Dimidium` | `#282A36` (dark purple) | Default for all cell profiles |
|
|
111
|
+
| `LIFEAI Claude` | `#1A0F0A` (dark brown) | Available, not currently assigned |
|
|
112
|
+
| `LIFEAI Dark` | `#0D1F17` (dark green) | Available, not currently assigned |
|
|
113
|
+
| `LIFEAI Slate` | `#0F1923` (dark blue) | PowerShell Admin profile |
|
|
114
|
+
| `Dracula` | `#282A36` | Available, not currently assigned |
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Global Settings (safe reference)
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
"copyOnSelect": true // highlight = copied. Don't change — muscle memory.
|
|
122
|
+
"copyFormatting": "all" // preserves ANSI colors on copy
|
|
123
|
+
"firstWindowPreference": "persistedWindowLayout" // restores last layout on open. NEVER CHANGE.
|
|
124
|
+
"defaultProfile": "{574e775e-4f2a-5b96-ac1e-a2962a402336}" // PowerShell Core. NEVER CHANGE.
|
|
125
|
+
"theme": "dark"
|
|
126
|
+
"showTabsFullscreen": true
|
|
127
|
+
"initialRows": 40
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Font defaults (in `profiles.defaults`):
|
|
131
|
+
```json
|
|
132
|
+
"face": "Consolas"
|
|
133
|
+
"size": 12
|
|
134
|
+
"cellHeight": "1.2"
|
|
135
|
+
"cellWidth": "0.6"
|
|
136
|
+
"weight": "normal"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
## Cell Startup Sequencing
|
|
142
|
+
|
|
143
|
+
`cell-init.cmd` is the startup script for all cell profiles. It:
|
|
144
|
+
|
|
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
|
|
147
|
+
3. Prints a colored banner
|
|
148
|
+
4. Writes a PID lockfile to `.cell-state\<role>.lock`
|
|
149
|
+
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>"`
|
|
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.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
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Validation Commands
|
|
194
|
+
|
|
195
|
+
```powershell
|
|
196
|
+
# Validate JSON syntax before saving
|
|
197
|
+
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
|
+
```
|
|
205
|
+
|
|
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 `cmd.exe /k cell-init.cmd <role>`
|
|
215
|
+
- Download: https://wezfurlong.org/wezterm/installation.html
|
|
216
|
+
|
|
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.
|