@lifeaitools/rdc-skills 0.9.32 → 0.9.34

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 (40) hide show
  1. package/.claude-plugin/plugin.json +25 -2
  2. package/MANIFEST.md +4 -0
  3. package/commands/build.md +2 -2
  4. package/commands/fixit.md +14 -2
  5. package/commands/workitems.md +6 -1
  6. package/guides/agent-bootstrap.md +71 -8
  7. package/guides/agents/backend.md +2 -2
  8. package/guides/agents/data.md +1 -1
  9. package/guides/agents/frontend.md +1 -1
  10. package/guides/agents/setup.md +4 -2
  11. package/guides/engineering-behavior.md +43 -0
  12. package/hooks/foreground-process-gate.js +109 -0
  13. package/hooks/hook-logger.js +25 -0
  14. package/hooks/run-hidden-hook.ps1 +47 -0
  15. package/hooks/work-item-exit-gate.js +297 -0
  16. package/package.json +3 -3
  17. package/rules/work-items-rpc.md +56 -7
  18. package/scripts/install-rdc-skills.js +75 -9
  19. package/scripts/install.ps1 +17 -11
  20. package/scripts/self-test.mjs +14 -0
  21. package/skills/build/SKILL.md +13 -9
  22. package/skills/co-develop/SKILL.md +182 -0
  23. package/skills/collab/SKILL.md +1 -1
  24. package/skills/deploy/SKILL.md +1 -1
  25. package/skills/design/SKILL.md +3 -3
  26. package/skills/fixit/SKILL.md +19 -5
  27. package/skills/fs-mcp/SKILL.md +131 -0
  28. package/skills/handoff/SKILL.md +1 -1
  29. package/skills/help/SKILL.md +4 -2
  30. package/skills/overnight/SKILL.md +3 -3
  31. package/skills/plan/SKILL.md +4 -3
  32. package/skills/preplan/SKILL.md +1 -1
  33. package/skills/prototype/SKILL.md +1 -1
  34. package/skills/release/SKILL.md +2 -2
  35. package/skills/report/SKILL.md +1 -1
  36. package/skills/review/SKILL.md +5 -3
  37. package/skills/self-test/SKILL.md +1 -1
  38. package/skills/status/SKILL.md +3 -1
  39. package/skills/watch/SKILL.md +1 -1
  40. package/skills/workitems/SKILL.md +7 -2
@@ -124,6 +124,20 @@ function auditGuideFile(filepath, relPath) {
124
124
  }
125
125
 
126
126
  const lines = text.split(/\r?\n/);
127
+
128
+ if (
129
+ relPath === "guides/agent-bootstrap.md" &&
130
+ !text.includes("guides/engineering-behavior.md")
131
+ ) {
132
+ findings.push({
133
+ level: "error",
134
+ code: "guide-engineering-behavior-missing",
135
+ file: relPath,
136
+ line: 1,
137
+ message: "agent bootstrap must reference guides/engineering-behavior.md",
138
+ });
139
+ }
140
+
127
141
  lines.forEach((line, i) => {
128
142
  const lineNo = i + 1;
129
143
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rdc:build
3
- description: "You have a planned epic with tasks ready to execute. Dispatches parallel typed agents, each commits atomically to develop, closes work items, and runs the validator gate. Call after rdc:plan or when told to build."
3
+ description: "Usage `rdc:build <epic-id>` — You have a planned epic with tasks ready to execute. Dispatches parallel typed agents, each commits atomically to develop, closes work items, and runs the validator gate. Call after rdc:plan or when told to build."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
@@ -28,13 +28,15 @@ description: "You have a planned epic with tasks ready to execute. Dispatches pa
28
28
 
29
29
  Every dispatched agent MUST read two files before starting — in this order:
30
30
  1. `{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md` — credentials, git rules, completion report format
31
- (fallback: `{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md` if `.rdc/` does not exist)
32
- 2. `{PROJECT_ROOT}/.rdc/guides/<type>.md` — role-specific guide
33
- (fallback: `{PROJECT_ROOT}/.rdc/guides/<type>.md`)
31
+ (fallback: `.rdc/guides/agent-bootstrap.md` relative to cwd if `{PROJECT_ROOT}` is not substituted)
32
+ 2. `{PROJECT_ROOT}/.rdc/guides/engineering-behavior.md` — assumptions, minimal changes, surgical scope, verification evidence
33
+ (fallback: `.rdc/guides/engineering-behavior.md` relative to cwd if `{PROJECT_ROOT}` is not substituted)
34
+ 3. `{PROJECT_ROOT}/.rdc/guides/<type>.md` — role-specific guide
35
+ (fallback: `.rdc/guides/<type>.md` relative to cwd if `{PROJECT_ROOT}` is not substituted)
34
36
 
35
37
  Include both lines in every agent prompt:
36
38
  ```
37
- "Read {PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md first (fallback: .rdc/guides/agent-bootstrap.md), then {PROJECT_ROOT}/.rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md) before starting."
39
+ "Read {PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md first (fallback: .rdc/guides/agent-bootstrap.md), then {PROJECT_ROOT}/.rdc/guides/engineering-behavior.md (fallback: .rdc/guides/engineering-behavior.md), then {PROJECT_ROOT}/.rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md) before starting."
38
40
  ```
39
41
 
40
42
  | Agent Type | Guide File | When to dispatch |
@@ -212,7 +214,7 @@ Read the task title and description, then:
212
214
  You are a frontend agent building <WP name>. Work item: <uuid>.
213
215
  Scope: <one sentence>. Files: <list>. Verification: tsc --noEmit.
214
216
  Set item to review when done, return AGENT_COMPLETE with verification evidence.
215
- Read .rdc/guides/agent-bootstrap.md + .rdc/guides/frontend.md before starting.
217
+ Read .rdc/guides/agent-bootstrap.md + .rdc/guides/engineering-behavior.md + .rdc/guides/frontend.md before starting.
216
218
  ```
217
219
 
218
220
  **When the supervisor has NOT read the plan** (e.g. dispatching from a fresh `rdc:build` call with
@@ -224,6 +226,7 @@ Read the task title and description, then:
224
226
  - Set work item to `in_progress` before dispatching
225
227
  - Each agent prompt MUST include:
226
228
  - `"Read {PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md first (fallback: .rdc/guides/agent-bootstrap.md), then {PROJECT_ROOT}/.rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md) before starting."`
229
+ - `"Read {PROJECT_ROOT}/.rdc/guides/engineering-behavior.md (fallback: .rdc/guides/engineering-behavior.md) before editing; follow it for assumptions, minimal changes, surgical scope, evidence, and escalation."`
227
230
  - Specific files to create/modify (or omit if forked agent inherits plan context)
228
231
  - Exact deliverables and commit message
229
232
  - `"NEVER run pnpm build/test. NEVER modify files outside your scope."`
@@ -233,14 +236,14 @@ Read the task title and description, then:
233
236
  - **`"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
237
  - **The decomposition items from the work item's checklist** (all `decomp-*` prefixed items). Include them verbatim in the prompt and instruct the agent:
235
238
  ```
236
- DECOMPOSITION CHECKLIST — you MUST implement/verify each row and tick it immediately via update_checklist_item:
239
+ DECOMPOSITION CHECKLIST — you MUST implement/verify each row and tick it immediately via update_checklist_item(..., p_actor_session_id := '<your-session-id>', p_actor_role := 'agent'):
237
240
  - decomp-ui-xxx: <route/file> | action=<action> | expect=<result> | evidence=<artifact>
238
241
  - decomp-api-xxx: <route/file> | action=<action> | expect=<result> | evidence=<artifact>
239
242
  Tick each item as soon as that specific behavior is implemented and proven. Do NOT batch.
240
243
  ```
241
244
  - **The test plan items from the work item's checklist** (all `test-*` prefixed items). Include them verbatim in the prompt and instruct the agent:
242
245
  ```
243
- TEST PLAN — you MUST implement/verify each of these and tick them off via update_checklist_item:
246
+ TEST PLAN — you MUST implement/verify each of these and tick them off via update_checklist_item(..., p_actor_session_id := '<your-session-id>', p_actor_role := 'agent'):
244
247
  - test-assert-xxx: <description> → write a vitest test that proves this
245
248
  - test-smoke-xxx: <description> → run the command and confirm the result
246
249
  - test-visual-xxx: <description> → note: delegate to UI audit (you cannot verify this yourself)
@@ -299,6 +302,7 @@ Read the task title and description, then:
299
302
 
300
303
  ```
301
304
  "Read C:/Dev/regen-root/.rdc/guides/agent-bootstrap.md then C:/Dev/regen-root/.rdc/guides/verify.md.
305
+ Read C:/Dev/regen-root/.rdc/guides/engineering-behavior.md before validating scope, deviations, and evidence.
302
306
  Validate these work items: [list of IDs and titles].
303
307
  Apps touched: [list].
304
308
  Git diff since build start: [attach or reference].
@@ -326,7 +330,7 @@ Read the task title and description, then:
326
330
 
327
331
  **If the validator finds failures:** fix them in a new wave, then re-run the validator. Do not skip.
328
332
  **File existence alone is NOT verification.** A route returning 500 is a failure regardless of tsc passing.
329
- **Unchecked test plan items are a hard gate** — `update_work_item_status('done')` will raise an exception if any `required: true` checklist item is unchecked.
333
+ **Unchecked test plan items are a hard gate** — `update_work_item_status('done', ..., p_actor_role := 'validator')` will raise an exception if any `required: true` checklist item is unchecked, missing agent-session tick evidence, or re-ticked by a supervisor/validator.
330
334
 
331
335
  11. **After verification passes:**
332
336
  - All wave commits are already on develop and pushed (Step 9 pushes after each wave merge).
@@ -0,0 +1,182 @@
1
+ ---
2
+ name: rdc:co-develop
3
+ description: "Usage `rdc:co-develop <ask|reply|inbox|start|resume|status>` — peer-aware Claude/Codex co-development over clauth, with ask --wait as the default delegation pattern."
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
+ # rdc:co-develop — Peer-Aware Co-Development
11
+
12
+ Use this skill when an RDC workflow needs Claude and Codex to work together in
13
+ one governed session. This skill uses the clauth `codevelop_*` route only. Do
14
+ not use `chitchat_*` for this workflow.
15
+
16
+ ## Arguments
17
+
18
+ Use the high-level delegation commands by default:
19
+
20
+ - `rdc:co-develop ask <peer> "<task>"` — delegate to partner and wait for the reply
21
+ - `rdc:co-develop reply <turn-id> "<summary>"` — reply to a partner request with evidence
22
+ - `rdc:co-develop inbox` — drain your inbox when you are explicitly acting as the worker
23
+
24
+ - `rdc:co-develop start <name>` — create a session and return startup details
25
+ - `rdc:co-develop resume <session-id> --peer <peer-id>` — join as a peer
26
+ - `rdc:co-develop send --session <id> --from <peer> --to <peer> <task>` — send a turn
27
+ - `rdc:co-develop poll --session <id> --peer <peer>` — drain messages for a peer
28
+ - `rdc:co-develop status [session-id]` — show session status and queues
29
+ - `rdc:co-develop stop <session-id>` — stop the session
30
+
31
+ ## Default Delegation Pattern
32
+
33
+ When you need partner help, do not hand-write `/codevelop/send` JSON unless the
34
+ CLI fails. Call the partner like a subagent:
35
+
36
+ ```powershell
37
+ clauth codevelop ask --to codex --wait --task "Review this plan and identify blockers."
38
+ clauth codevelop ask --to claude --wait --task "Review this implementation and advise."
39
+ ```
40
+
41
+ `ask --wait` sends the request, captures the `turn_id`, polls the sender inbox,
42
+ and returns the matching partner reply to the current live agent. This preserves
43
+ the sender's active conversation context.
44
+
45
+ When you receive a partner request, complete the bounded task and reply with:
46
+
47
+ ```powershell
48
+ clauth codevelop reply --turn turn-0001 --verdict pass --summary "Reviewed plan." --evidence "Checked files X and Y" --files-changed ""
49
+ ```
50
+
51
+ For manual worker intake:
52
+
53
+ ```powershell
54
+ clauth codevelop inbox --peer codex
55
+ clauth codevelop inbox --peer claude
56
+ ```
57
+
58
+ ## Required Transport
59
+
60
+ HTTP routes:
61
+
62
+ ```text
63
+ POST /codevelop/start
64
+ POST /codevelop/join
65
+ POST /codevelop/send
66
+ POST /codevelop/poll
67
+ GET /codevelop/<session-id>/<peer-id>/stream
68
+ GET /codevelop/<session-id>/status
69
+ GET /codevelop
70
+ POST /codevelop/stop
71
+ ```
72
+
73
+ MCP tools:
74
+
75
+ ```text
76
+ codevelop_start
77
+ codevelop_join
78
+ codevelop_send
79
+ codevelop_poll
80
+ codevelop_stream
81
+ codevelop_status
82
+ codevelop_stop
83
+ ```
84
+
85
+ ## Session Roles
86
+
87
+ Default peers:
88
+
89
+ | Peer | Role | Responsibility |
90
+ |---|---|---|
91
+ | `claude` | `supervisor` | RDC loop, work items, validation, integration |
92
+ | `codex` | `implementation_partner` | implementation, focused audit, repair, evidence |
93
+
94
+ Other valid turn roles: `planner`, `builder`, `reviewer`, `validator`,
95
+ `advisor`, `release_guard`, `infra_operator`.
96
+
97
+ ## Message Envelope
98
+
99
+ Always send structured JSON. The receiving peer must treat the JSON object as
100
+ the source of truth.
101
+
102
+ ```json
103
+ {
104
+ "session_id": "<session-id>",
105
+ "turn_id": "turn-0001",
106
+ "from": "claude",
107
+ "to": "codex",
108
+ "type": "audit_request",
109
+ "role": "reviewer",
110
+ "skill": "rdc:review",
111
+ "task": "Audit the current diff for regressions before merge.",
112
+ "context": {
113
+ "repo": "C:\\Dev\\regen-root",
114
+ "work_item_id": "<optional-uuid>",
115
+ "branch": "develop",
116
+ "owned_files": []
117
+ },
118
+ "expect": {
119
+ "response_format": "CO_DEVELOP_REPLY",
120
+ "evidence_required": true,
121
+ "commit_allowed": false
122
+ }
123
+ }
124
+ ```
125
+
126
+ Required reply shape:
127
+
128
+ ```json
129
+ {
130
+ "session_id": "<session-id>",
131
+ "turn_id": "turn-0001",
132
+ "from": "codex",
133
+ "to": "claude",
134
+ "type": "reply",
135
+ "verdict": "pass",
136
+ "summary": "One paragraph.",
137
+ "evidence": [],
138
+ "files_changed": [],
139
+ "commits": [],
140
+ "blockers": [],
141
+ "next": []
142
+ }
143
+ ```
144
+
145
+ ## Escalation Rules
146
+
147
+ Invoke co-development when:
148
+
149
+ - Dave asks for partner review, audit, second opinion, or co-development
150
+ - a task crosses multiple apps, packages, repos, APIs, database surfaces, or deployment surfaces
151
+ - `rdc:plan` creates 5 or more work packages, or 3 or more work packages with integration risk
152
+ - `rdc:build` has file overlap or integration risk
153
+ - `rdc:review` finds failures that need judgment
154
+ - the same implementation, test, build, deploy, or migration path fails twice
155
+ - architecture, auth, deployment, schema, source-of-truth, or bridge-mode interpretation is uncertain
156
+ - a production-facing release path is about to proceed
157
+
158
+ Do not invoke by default for simple read-only explanations, one-line command
159
+ output, one-file typo fixes, or already decomposed low-risk work.
160
+
161
+ ## Workflow
162
+
163
+ 1. Start or resume a session with `codevelop_start` / `codevelop_join`.
164
+ 2. Join the local peer with a stable `peer_id`.
165
+ 3. Delegate with `clauth codevelop ask --to <partner> --wait --task "<task>"`.
166
+ 4. Treat the returned JSON as the partner result and continue your active work.
167
+ 5. If acting as the worker, drain inbox with `clauth codevelop inbox --peer <you>`.
168
+ 6. Reply with `clauth codevelop reply --turn <turn-id> ...`.
169
+ 7. Record evidence in the calling RDC skill report or work-item implementation report.
170
+ 8. Stop the session with `codevelop_stop` when the work is done.
171
+
172
+ ## Completion Evidence
173
+
174
+ Every co-development turn must report:
175
+
176
+ - session ID and turn ID
177
+ - peer IDs
178
+ - files changed
179
+ - commands/tests/routes checked
180
+ - commits, if any
181
+ - blockers or decisions needed
182
+ - next action
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rdc:collab
3
- description: "Bidirectional relay with a claude.ai session — read inbox, do work, write outbox, loop. Use when coordinating with a parallel claude.ai conversation."
3
+ description: "Usage `rdc:collab --session <session_id>` — Bidirectional relay with a claude.ai session — read inbox, do work, write outbox, loop. Use when coordinating with a parallel claude.ai conversation."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rdc:deploy
3
- description: "Deploy an app to Coolify (production) or PM2 (staging), add a new Coolify app, diagnose a failed deploy, or audit watch paths. Handles DNS, health checks, and post-deploy verification."
3
+ description: "Usage `rdc:deploy <slug> [new|diagnose|audit] [--fix]` — Deploy an app to Coolify (production) or PM2 (staging), add a new Coolify app, diagnose a failed deploy, or audit watch paths. Handles DNS, health checks, and post-deploy verification."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rdc:design
3
- description: "RDC-owned design work for Studio, Palette Library, and token-aware UI systems. Use for Rampant color work or design-system-first builds owned by the design cell. Not for general UI polish — use impeccable for that."
3
+ description: "Usage `rdc:design <topic>` — RDC-owned design work for Studio, Palette Library, and token-aware UI systems. Use for Rampant color work or design-system-first builds owned by the design cell. Not for general UI polish — use impeccable for that."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
@@ -96,7 +96,7 @@ Project docs to read for Studio work:
96
96
  ```powershell
97
97
  curl.exe -s -X POST "http://127.0.0.1:52437/studio/debug/start" `
98
98
  -H "Content-Type: application/json" `
99
- -d "{\"brandSlug\":\"<brandSlug>\",\"appSlug\":\"<appSlug>\",\"repoRoot\":\"C:/Dev/regen-root\",\"cwd\":\"C:/Dev/regen-root\",\"modeDefault\":\"direct_edit\",\"startedBy\":\"claude-cli\"}"
99
+ -d "{\"brandSlug\":\"<brandSlug>\",\"appSlug\":\"<appSlug>\",\"repoRoot\":\"{PROJECT_ROOT}\",\"cwd\":\"{PROJECT_ROOT}\",\"modeDefault\":\"direct_edit\",\"startedBy\":\"claude-cli\"}"
100
100
  ```
101
101
  - Expected successful response shape:
102
102
  ```json
@@ -128,7 +128,7 @@ Project docs to read for Studio work:
128
128
  - Allowed terminal statuses are `done`, `error`, `blocked`, and `needs_reference`.
129
129
  - Convenience helper, equivalent to the canonical start call plus attach URL construction:
130
130
  ```powershell
131
- node scripts/studio-debug-start.mjs --target <url|domain|brand|app|file> [--brand <slug>] [--app <slug>] [--mode direct_edit|variant_edit|reference_replace|note] [--studio-origin http://localhost:3011] [--connector http://127.0.0.1:52437] [--repo-root C:/Dev/regen-root] [--cwd C:/Dev/regen-root] [--dev-url <url>] [--dev-command <command>] [--no-launch]
131
+ node scripts/studio-debug-start.mjs --target <url|domain|brand|app|file> [--brand <slug>] [--app <slug>] [--mode direct_edit|variant_edit|reference_replace|note] [--studio-origin http://localhost:3011] [--connector http://127.0.0.1:52437] [--repo-root {PROJECT_ROOT}] [--cwd {PROJECT_ROOT}] [--dev-url <url>] [--dev-command <command>] [--no-launch]
132
132
  ```
133
133
  - Helper output contract:
134
134
  ```txt
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: rdc:fixit
3
- description: "Quick fix under 5 files / 30 min that does not warrant a full plan→build cycle. Creates a minimal work item, makes the change, commits, closes. The only sanctioned bypass of rdc:build."
3
+ description: "Usage `rdc:fixit <description>` — Quick fix under 5 files / 30 min that does not warrant a full plan→build cycle. Creates a minimal work item, makes the change, commits, closes. The only sanctioned bypass of rdc:build."
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
- > 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`).
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`), then `{PROJECT_ROOT}/.rdc/guides/engineering-behavior.md` (fallback: `{PROJECT_ROOT}/.rdc/guides/engineering-behavior.md`).
11
11
 
12
12
  > **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.
13
13
 
@@ -74,6 +74,10 @@ Do the minimal work. Scope creep rule: if you discover the fix requires more tha
74
74
  2. Delete the marker file
75
75
  3. Tell the user to use `/rdc:build` instead
76
76
 
77
+ Apply `guides/engineering-behavior.md`: state material assumptions in the
78
+ implementation report, avoid speculative abstractions, touch only required
79
+ files, and verify behavior before moving the work item to `review`.
80
+
77
81
  ### 5. Commit
78
82
 
79
83
  ```bash
@@ -88,21 +92,31 @@ fi
88
92
 
89
93
  ### 6. Close and clean up
90
94
 
91
- Submit implementation report first, then mark done:
95
+ Submit implementation report first, move to review, then close as validator:
92
96
 
93
97
  ```sql
94
98
  SELECT submit_implementation_report('<id>'::uuid,
95
- '{"tldr":"<one sentence>","assumptions":[],"deviations":[],"uncertainty":[],"detail":"<what was fixed>","flags":[],"transactional":false,"memory_records":[]}'::jsonb
99
+ '{"tldr":"<one sentence>","assumptions":[],"deviations":[],"uncertainty":[],"detail":"<what was fixed>","flags":[],"transactional":false,"memory_records":[],"codeflow_post":{"agent_session_id":"<agent-session-id>","summary":"<what changed and why>","files_changed":["<path>"],"verification":["<command/evidence>"],"commit":"<hash optional>"}}'::jsonb
100
+ );
101
+
102
+ SELECT update_work_item_status('<id>'::uuid, 'review',
103
+ '["Fixed via rdc:fixit; ready for validation"]'::jsonb,
104
+ '<agent-session-id>',
105
+ 'agent'
96
106
  );
97
107
 
98
108
  SELECT update_work_item_status('<id>'::uuid, 'done',
99
- '["Fixed via rdc:fixit"]'::jsonb
109
+ '["Validator verified rdc:fixit report, CodeFlow post, and checklist evidence"]'::jsonb,
110
+ '<validator-session-id>',
111
+ 'validator'
100
112
  );
101
113
  ```
102
114
 
103
115
  If the fix touched a transactional flow, API boundary, or package contract, set `"transactional": true` and populate `memory_records` (see `agent-bootstrap.md`), then run:
104
116
  ```bash
105
117
  node scripts/work-item-memory.mjs <work-item-id>
118
+ # Note: verify script exists first: ls {PROJECT_ROOT}/scripts/work-item-memory.mjs
119
+ # If the script is absent, skip this step and note it in the implementation report.
106
120
  ```
107
121
 
108
122
  ```bash
@@ -0,0 +1,131 @@
1
+ ---
2
+ name: rdc:fs-mcp
3
+ description: "Usage `rdc:fs-mcp <task>` — Use the File System MCP bridge for live repo reads, safe writes, cloud-to-local ingest, and GitHub-branch imports into a dirty local monorepo. Use when Claude.ai, Cowork, or CLI agents need fs_read/fs_write/fs_import_git_files guidance."
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
+
11
+ # rdc:fs-mcp — File System MCP Bridge
12
+
13
+ ## When to Use
14
+ - Claude.ai, Cowork, or another remote surface needs live access to `C:/Dev/regen-root` through the File System MCP.
15
+ - You need to read, search, or list current local repo files without relying on GitHub freshness.
16
+ - You need to write a small/scratch file through FS MCP.
17
+ - You need to move a larger cloud file into the local repo.
18
+ - Claude.ai created a durable new docs/corpus file on a GitHub branch and local dev needs to import it into a dirty monorepo.
19
+
20
+ ## Arguments
21
+ - `rdc:fs-mcp read` — choose the right read/search/list tool.
22
+ - `rdc:fs-mcp write` — choose direct write, chunked write, append, or URL ingest.
23
+ - `rdc:fs-mcp import-git` — import named files from a GitHub branch/commit into local dev.
24
+ - `rdc:fs-mcp status` — inspect mounts and repo state before deciding.
25
+
26
+ ## Procedure
27
+
28
+ ### 1. Identify the file intent
29
+
30
+ Classify the file before writing:
31
+
32
+ | Intent | Default path | Default action |
33
+ |---|---|---|
34
+ | Live repo read | Existing repo path | `fs_read`, `fs_grep`, `fs_glob`, `fs_list` |
35
+ | Small scratch or relay file | `.rdc/relay/`, `.codex/tmp/`, agreed temp path | `fs_write` |
36
+ | Large text file from the current chat | Target path | `fs_write_chunk` |
37
+ | Cloud-hosted file | Target path | `fs_ingest_url` |
38
+ | Durable new docs/corpus file from Claude.ai | Actual target path in `docs/**`, `.rdc/plans/**`, `.claude/context/**` | GitHub branch commit, then `fs_import_git_files` |
39
+ | Existing file update | Existing repo path | Prefer patch/review workflow; do not overwrite unless explicitly requested |
40
+
41
+ ### 2. Read/search from live local FS
42
+
43
+ Use FS MCP first for local state:
44
+
45
+ ```text
46
+ fs_read CLAUDE.md
47
+ fs_glob docs/**/*.md
48
+ fs_grep "bridge mode" docs/
49
+ fs_list .rdc/relay/from-claude-code/
50
+ ```
51
+
52
+ Use GitHub for remote branch/file history, PRs, and durable publication. Use FS for the current local worktree.
53
+
54
+ ### 3. Choose the safest write surface
55
+
56
+ Use direct FS writes only when the payload is small and the destination is clear:
57
+
58
+ ```text
59
+ fs_write path=".rdc/relay/from-claude-ai/<timestamp>-topic.md"
60
+ ```
61
+
62
+ Use chunked writes for larger text:
63
+
64
+ ```text
65
+ fs_write_chunk upload_id="<stable-id>" path="docs/plans/foo.md" chunk_index=0 total_chunks=3 content="..."
66
+ fs_write_chunk upload_id="<stable-id>" path="docs/plans/foo.md" chunk_index=1 total_chunks=3 content="..."
67
+ fs_write_chunk upload_id="<stable-id>" path="docs/plans/foo.md" chunk_index=2 total_chunks=3 content="..."
68
+ ```
69
+
70
+ Use URL ingest when the file already exists in cloud storage:
71
+
72
+ ```text
73
+ fs_ingest_url url="https://..." path="docs/source/file.md" expected_sha256="<optional>"
74
+ ```
75
+
76
+ Use guarded append when appending to a known file:
77
+
78
+ ```text
79
+ fs_stat path="docs/plans/foo.md"
80
+ fs_append path="docs/plans/foo.md" content="\n..." expected_sha256="<hash from fs_stat>"
81
+ ```
82
+
83
+ ### 4. Import durable new files from GitHub instead of large FS writes
84
+
85
+ When Claude.ai creates a durable new docs/corpus file, publish it to a GitHub branch first, then ask FS MCP to import the exact file path.
86
+
87
+ Required Claude.ai handoff shape:
88
+
89
+ ```json
90
+ {
91
+ "repo": "LIFEAI/regen-root",
92
+ "remote": "origin",
93
+ "ref": "claude-ai/docs-upload-123",
94
+ "paths": ["docs/plans/foo.md"],
95
+ "mode": "new_only",
96
+ "commit": true,
97
+ "message": "docs(plans): add foo"
98
+ }
99
+ ```
100
+
101
+ Then call:
102
+
103
+ ```text
104
+ fs_import_git_files remote="origin" ref="claude-ai/docs-upload-123" paths=["docs/plans/foo.md"] mode="new_only" commit=true message="docs(plans): add foo"
105
+ ```
106
+
107
+ This tool must fetch only, restore only named paths, optionally commit only those paths, and never push.
108
+
109
+ ### 5. Safety rules
110
+
111
+ - Never run or request `git pull` for the dirty monorepo.
112
+ - Never checkout a whole branch into the local worktree.
113
+ - For durable docs/corpus, save to the actual target path, not an upload folder, when the target is known.
114
+ - Use upload/incoming folders only when the final destination is unknown.
115
+ - Default to `new_only` for Git imports.
116
+ - Refuse overwrites unless the user explicitly asks for overwrite/update behavior.
117
+ - Stage only imported paths when committing.
118
+ - Never push from FS import unless the user explicitly asks for a push-capable workflow.
119
+
120
+ ### 6. Completion report
121
+
122
+ Report:
123
+
124
+ ```text
125
+ FS MCP: <read/write/import> complete
126
+ Paths: <paths>
127
+ Source ref/commit: <if Git import>
128
+ Local commit: <if committed>
129
+ Verification: <fs_stat/hash or import result>
130
+ Blocked/conflicts: <none or list>
131
+ ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rdc:handoff
3
- description: "Convert a finalized plan or prototype into CLI-ready artifacts: writes .rdc/plans/, creates Supabase work items with DoD checklists, registers prototype if present. Bridge between planning session and rdc:build."
3
+ description: "Usage `rdc:handoff [--from-prototype <id>]` — Convert a finalized plan or prototype into CLI-ready artifacts: writes .rdc/plans/, creates Supabase work items with DoD checklists, registers prototype if present. Bridge between planning session and rdc:build."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rdc:help
3
- description: "Show all rdc:* skills with full argument syntax. Call when unsure which skill to use or what args it takes."
3
+ description: "Usage `rdc:help` — Show all rdc:* skills with full argument syntax. Call when unsure which skill to use or what args it takes."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
@@ -52,6 +52,7 @@ description: "Show all rdc:* skills with full argument syntax. Call when unsure
52
52
  | `rdc:prototype` | `rdc:prototype <description>` — JSX mock for review |
53
53
  | `rdc:workitems` | `rdc:workitems <add\|update\|done\|list\|epics> [args]` |
54
54
  | `rdc:collab` | `rdc:collab --session <id>` — claude.ai bidirectional relay |
55
+ | `rdc:co-develop` | `rdc:co-develop <start\|resume\|send\|poll\|status\|stop>` — Claude/Codex peer-aware co-development |
55
56
  | `rdc:design` | `rdc:design <command\|brief>` — RDC/Studio design, tokens, palettes, themes, Rampa CLI |
56
57
 
57
58
  ## Agent guides (dispatched by rdc:build, not user-invocable)
@@ -89,6 +90,7 @@ Project lead says → invoke
89
90
  "hand this off" / "give to agents" → rdc:handoff
90
91
  "show me what it looks like" → rdc:prototype
91
92
  "add to backlog" / "create a ticket" → rdc:workitems
93
+ "work together" / "partner review" → rdc:co-develop start <name>
92
94
  "design/tokens/palette/theme" → rdc:design <command>
93
95
  "what commands" / "what skills" → rdc:help
94
96
  ```
@@ -99,4 +101,4 @@ Project lead says → invoke
99
101
  - NEVER commit to `main` without explicit approval. Default branch is `develop`.
100
102
  - NEVER overlap agents on the same files.
101
103
  - ALWAYS update work items in real time via RPCs (see `.claude/rules/work-items-rpc.md`).
102
- - ALWAYS credentials via clauth daemon: `curl -s http://127.0.0.1:52437/get/<service>`.
104
+ - ALWAYS credentials via clauth daemon: `curl -s http://127.0.0.1:52437/v/<service>` (returns plain text).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rdc:overnight
3
- description: "Unattended end-to-end: drain the entire work queue autonomously (preplan → plan → build → review → report). Use when leaving Claude to run unsupervised for an extended session."
3
+ description: "Usage `rdc:overnight [epic-id|label=<label>]` — Unattended end-to-end: drain the entire work queue autonomously (preplan → plan → build → review → report). Use when leaving Claude to run unsupervised for an extended session."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
@@ -29,13 +29,13 @@ description: "Unattended end-to-end: drain the entire work queue autonomously (p
29
29
  **First action — set the overnight sentinel** so the `no-stop-open-epics` Stop hook engages (interactive sessions are not gated by it):
30
30
 
31
31
  ```bash
32
- mkdir -p C:/Dev/regen-root/.rdc && touch C:/Dev/regen-root/.rdc/overnight.lock
32
+ mkdir -p {PROJECT_ROOT}/.rdc && touch {PROJECT_ROOT}/.rdc/overnight.lock
33
33
  ```
34
34
 
35
35
  **Last action at end of run (success OR failure) — remove the sentinel:**
36
36
 
37
37
  ```bash
38
- rm -f C:/Dev/regen-root/.rdc/overnight.lock
38
+ rm -f {PROJECT_ROOT}/.rdc/overnight.lock
39
39
  ```
40
40
 
41
41
  If the sentinel file does not exist, the Stop hook will NOT block — which means interactive sessions stop freely and only `rdc:overnight` is held to the "drain the queue" contract.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rdc:plan
3
- description: "No epic exists and you need architecture + task breakdown. Produces design decisions, tradeoffs, and Supabase epics/tasks with DoD checklists that feed rdc:build. Use after rdc:preplan or when given clear architectural direction."
3
+ description: "Usage `rdc:plan <topic>` — No epic exists and you need architecture + task breakdown. Produces design decisions, tradeoffs, and Supabase epics/tasks with DoD checklists that feed rdc:build. Use after rdc:preplan or when given clear architectural direction."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
@@ -182,8 +182,9 @@ description: "No epic exists and you need architecture + task breakdown. Produce
182
182
  ]'::jsonb
183
183
  );
184
184
  ```
185
- - Agents MUST tick each `decomp-*` and `test-*` checklist item as they implement/verify it (via `update_checklist_item`)
186
- - `update_work_item_status('done')` will REJECT if any `required: true` item is unchecked this is the enforcement gate
185
+ - Agents MUST tick each `decomp-*` and `test-*` checklist item as they implement/verify it via `update_checklist_item(..., p_actor_session_id := '<agent-session-id>', p_actor_role := 'agent')`
186
+ - Agents submit `implementation_report.codeflow_post`, then move work to `review`; validators close `done`
187
+ - `update_work_item_status('done', ..., p_actor_role := 'validator')` rejects missing reports, unchecked required items, and supervisor/validator re-ticks
187
188
  - Set priorities: urgent/high/normal based on sequencing
188
189
 
189
190
  7. **Report results:**
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rdc:preplan
3
- description: "Before committing to an architecture, research unknowns first. Codebase scan + web search, no code written, no work items created. Output feeds rdc:plan. Use for open-ended approach questions."
3
+ description: "Usage `rdc:preplan <topic>` — Before committing to an architecture, research unknowns first. Codebase scan + web search, no code written, no work items created. Output feeds rdc:plan. Use for open-ended approach questions."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rdc:prototype
3
- description: "Build a JSX/TSX mockup for visual review before implementation. Saves to docs/source/, registers in prototype_registry. Use when asked to mock something up or show what it looks like. Not production code."
3
+ description: "Usage `rdc:prototype <description>` — Build a JSX/TSX mockup for visual review before implementation. Saves to docs/source/, registers in prototype_registry. Use when asked to mock something up or show what it looks like. Not production code."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rdc:release
3
- description: "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 [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."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
@@ -186,7 +186,7 @@ Only run this after the channel event confirms success — don't poll npm indepe
186
186
  - **rdc-skills:** none
187
187
 
188
188
  #### 8. Smoke test
189
- - **clauth:** `curl -s http://127.0.0.1:52437/get/supabase-anon | python3 -c "import sys,json; print('ok' if json.load(sys.stdin).get('value') else 'fail')"` — expect `ok`
189
+ - **clauth:** `curl -s http://127.0.0.1:52437/v/supabase-anon` expect a non-empty JWT string
190
190
  - **rdc-skills:** read frontmatter of one new/updated SKILL.md — parse succeeds
191
191
 
192
192
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: rdc:report
3
- description: "Write the nightly session summary to .rdc/reports/YYYY-MM-DD.md covering completed work, open items, per-project progress, and infra status. Call at session end."
3
+ description: "Usage `rdc:report` — Write the nightly session summary to .rdc/reports/YYYY-MM-DD.md covering completed work, open items, per-project progress, and infra status. Call at session end."
4
4
  ---
5
5
 
6
6
  > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`