@lifeaitools/rdc-skills 0.9.32 → 0.9.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/.claude-plugin/plugin.json +24 -2
  2. package/.github/workflows/self-test.yml +34 -34
  3. package/MANIFEST.md +4 -0
  4. package/commands/build.md +183 -183
  5. package/commands/collab.md +180 -180
  6. package/commands/deploy.md +152 -152
  7. package/commands/fixit.md +116 -104
  8. package/commands/handoff.md +173 -173
  9. package/commands/overnight.md +220 -220
  10. package/commands/plan.md +158 -158
  11. package/commands/preplan.md +131 -131
  12. package/commands/prototype.md +145 -145
  13. package/commands/report.md +99 -99
  14. package/commands/review.md +120 -120
  15. package/commands/status.md +86 -86
  16. package/commands/workitems.md +132 -127
  17. package/guides/agent-bootstrap.md +265 -206
  18. package/guides/agents/backend.md +104 -104
  19. package/guides/agents/content.md +94 -94
  20. package/guides/agents/cs2.md +56 -56
  21. package/guides/agents/data.md +87 -87
  22. package/guides/agents/design.md +77 -77
  23. package/guides/agents/frontend.md +92 -92
  24. package/guides/agents/infrastructure.md +81 -81
  25. package/guides/agents/setup.md +279 -279
  26. package/guides/agents/verify.md +119 -119
  27. package/guides/agents/viz.md +106 -106
  28. package/hooks/foreground-process-gate.js +109 -0
  29. package/hooks/hook-logger.js +25 -0
  30. package/hooks/run-hidden-hook.ps1 +47 -0
  31. package/hooks/work-item-exit-gate.js +297 -0
  32. package/package.json +3 -3
  33. package/rules/work-items-rpc.md +56 -7
  34. package/scripts/install-rdc-skills.js +53 -9
  35. package/scripts/install.ps1 +17 -11
  36. package/scripts/self-test.mjs +1323 -1323
  37. package/skills/build/SKILL.md +355 -355
  38. package/skills/co-develop/SKILL.md +182 -0
  39. package/skills/collab/SKILL.md +217 -217
  40. package/skills/deploy/SKILL.md +198 -198
  41. package/skills/design/SKILL.md +211 -211
  42. package/skills/fixit/SKILL.md +132 -122
  43. package/skills/handoff/SKILL.md +200 -200
  44. package/skills/help/SKILL.md +104 -102
  45. package/skills/overnight/SKILL.md +224 -224
  46. package/skills/plan/SKILL.md +252 -251
  47. package/skills/preplan/SKILL.md +86 -86
  48. package/skills/prototype/SKILL.md +150 -150
  49. package/skills/release/SKILL.md +342 -342
  50. package/skills/report/SKILL.md +100 -100
  51. package/skills/review/SKILL.md +121 -120
  52. package/skills/self-test/SKILL.md +126 -126
  53. package/skills/status/SKILL.md +99 -97
  54. package/skills/watch/SKILL.md +91 -91
  55. package/skills/workitems/SKILL.md +151 -146
@@ -1,232 +1,291 @@
1
- # Agent Bootstrap — Read This First
2
- > Every dispatched agent reads this before their role-specific guide.
3
- > Base guide for rdc-skills — provides credential, git, and reporting patterns across projects.
4
-
5
- ---
6
-
7
- ## Who You Are
8
-
9
- You are a subagent dispatched by the rdc:build supervisor. You have a specific
10
- scope (files, package, feature) that will be in your prompt. Stay in that scope.
11
- NEVER modify files outside it.
12
-
13
- ---
14
-
15
- ## Credentials — Daemon Access Pattern
16
-
17
- You do NOT have access to cloud MCP connectors. Instead, all credentials
18
- come from a daemon running locally (typically on localhost:52437).
19
-
20
- **Ping first to confirm availability:**
21
- ```bash
22
- curl -s http://127.0.0.1:52437/ping
23
- ```
24
- If it doesn't respond — report BLOCKED, do not proceed.
25
-
26
- **Get a credential:**
27
- ```bash
28
- curl -s http://127.0.0.1:52437/get/<service>
29
- ```
30
-
31
- **Pattern for extracting key/value without printing:**
32
- ```bash
33
- # Correct pattern — never echo the key
34
- KEY=$(curl -s http://127.0.0.1:52437/get/<service> | python3 -c "import sys,json; print(json.load(sys.stdin)['key'])")
35
- curl -s -H "Authorization: Bearer $KEY" https://api.example.com/...
36
- ```
37
-
38
- **Never print credentials to stdout.** Capture to a variable, use inline, discard.
39
-
40
- ---
41
-
42
- ## Project Directory Convention
43
-
44
- This plugin uses the `.rdc/` directory convention. Check for it first:
45
-
46
- ```bash
47
- # Check if .rdc/ exists at project root
48
- ls {PROJECT_ROOT}/.rdc/config.json 2>/dev/null && echo "using .rdc/" || echo "using docs/ fallback"
49
- ```
50
-
51
- **Path resolution rule:**
52
- - Guides: `{PROJECT_ROOT}/.rdc/guides/` → fallback: `{PROJECT_ROOT}/docs/guides/`
53
- - Plans: `{PROJECT_ROOT}/.rdc/plans/` → fallback: `{PROJECT_ROOT}/docs/plans/`
54
- - Reports: `{PROJECT_ROOT}/.rdc/reports/` → fallback: `{PROJECT_ROOT}/docs/reports/`
55
- - Research: `{PROJECT_ROOT}/.rdc/research/` → fallback: `{PROJECT_ROOT}/docs/research/`
56
-
57
- If `.rdc/config.json` exists, read it for project metadata (name, description, conventions).
58
-
59
- ---
60
-
61
- ## Database Access — Check Project Overlay
62
-
63
- The project overlay guide will specify:
64
- - Database project reference / instance name
65
- - Whether to use MCP connectors or daemon
66
- - Available RPC functions
67
- - Work item management patterns
68
-
69
- Read the project-specific agent-bootstrap.md overlay for exact connection details.
70
-
71
- ---
72
-
73
- ## Git Rules
74
-
75
- - Branch: Always use the project's primary development branch (typically `develop` or `main`)
76
- - Auto-commit after completing your scope — no confirmation needed
77
- - Commit message must use conventional format: `feat/fix/chore/refactor(<scope>): description`
78
- - Push to origin after committing
79
- - NEVER force-push
80
-
81
- ---
82
-
1
+ # Agent Bootstrap — Read This First
2
+ > Every dispatched agent reads this before their role-specific guide.
3
+ > Base guide for rdc-skills — provides credential, git, and reporting patterns across projects.
4
+
5
+ ---
6
+
7
+ ## Who You Are
8
+
9
+ You are a subagent dispatched by the rdc:build supervisor. You have a specific
10
+ scope (files, package, feature) that will be in your prompt. Stay in that scope.
11
+ NEVER modify files outside it.
12
+
13
+ ---
14
+
15
+ ## Credentials — Daemon Access Pattern
16
+
17
+ You do NOT have access to cloud MCP connectors. Instead, all credentials
18
+ come from a daemon running locally (typically on localhost:52437).
19
+
20
+ **Ping first to confirm availability:**
21
+ ```bash
22
+ curl -s http://127.0.0.1:52437/ping
23
+ ```
24
+ If it doesn't respond — report BLOCKED, do not proceed.
25
+
26
+ **Get a credential:**
27
+ ```bash
28
+ curl -s http://127.0.0.1:52437/get/<service>
29
+ ```
30
+
31
+ **Pattern for extracting key/value without printing:**
32
+ ```bash
33
+ # Correct pattern — never echo the key
34
+ KEY=$(curl -s http://127.0.0.1:52437/get/<service> | python3 -c "import sys,json; print(json.load(sys.stdin)['key'])")
35
+ curl -s -H "Authorization: Bearer $KEY" https://api.example.com/...
36
+ ```
37
+
38
+ **Never print credentials to stdout.** Capture to a variable, use inline, discard.
39
+
40
+ ---
41
+
42
+ ## Project Directory Convention
43
+
44
+ This plugin uses the `.rdc/` directory convention. Check for it first:
45
+
46
+ ```bash
47
+ # Check if .rdc/ exists at project root
48
+ ls {PROJECT_ROOT}/.rdc/config.json 2>/dev/null && echo "using .rdc/" || echo "using docs/ fallback"
49
+ ```
50
+
51
+ **Path resolution rule:**
52
+ - Guides: `{PROJECT_ROOT}/.rdc/guides/` → fallback: `{PROJECT_ROOT}/docs/guides/`
53
+ - Plans: `{PROJECT_ROOT}/.rdc/plans/` → fallback: `{PROJECT_ROOT}/docs/plans/`
54
+ - Reports: `{PROJECT_ROOT}/.rdc/reports/` → fallback: `{PROJECT_ROOT}/docs/reports/`
55
+ - Research: `{PROJECT_ROOT}/.rdc/research/` → fallback: `{PROJECT_ROOT}/docs/research/`
56
+
57
+ If `.rdc/config.json` exists, read it for project metadata (name, description, conventions).
58
+
59
+ ---
60
+
61
+ ## Database Access — Check Project Overlay
62
+
63
+ The project overlay guide will specify:
64
+ - Database project reference / instance name
65
+ - Whether to use MCP connectors or daemon
66
+ - Available RPC functions
67
+ - Work item management patterns
68
+
69
+ Read the project-specific agent-bootstrap.md overlay for exact connection details.
70
+
71
+ ---
72
+
73
+ ## Git Rules
74
+
75
+ - Branch: Always use the project's primary development branch (typically `develop` or `main`)
76
+ - Auto-commit after completing your scope — no confirmation needed
77
+ - Commit message must use conventional format: `feat/fix/chore/refactor(<scope>): description`
78
+ - Push to origin after committing
79
+ - NEVER force-push
80
+
81
+ ---
82
+
83
83
  ## Build Rules
84
84
 
85
85
  Never run `pnpm build` or equivalent full builds locally — they consume excessive memory.
86
86
  Type-check only: `npx tsc --noEmit --project <path>/tsconfig.json`
87
87
  Run tests only for modified packages: modify tests in isolation, not whole suite.
88
88
 
89
- Check the project overlay for specific language, package manager, and build constraints.
90
-
91
- ---
92
-
93
- ## RDC_TEST Sandbox Contract
94
-
95
- When `RDC_TEST=1` is set, the skill is running inside the Tier 2 sandbox harness. Short-circuit all destructive external side effects.
96
-
97
- **How to detect:** `process.env.RDC_TEST === '1'` (Node/JS) or `[ "$RDC_TEST" = "1" ]` (bash). The Tier 2 runner sets this before invoking `claude --print`.
89
+ ### No Foreground Windows
98
90
 
99
- **Allowed under RDC_TEST** run normally, no guard:
91
+ Agent-launched processes must not steal focus. This is a hard local-operator
92
+ rule, not a preference.
100
93
 
101
- | Operation | Why |
102
- |-----------|-----|
103
- | Local git commits | Commit to the worktree branch; never pushed |
104
- | Local filesystem writes | Inside the sandbox worktree |
105
- | Supabase reads | Assertions read prod DB; no writes |
106
- | Service reads | Coolify status, CF DNS lookup, GitHub read all safe |
107
- | `clauth` credential reads | Read-only against the daemon |
108
-
109
- **Short-circuit under RDC_TEST** — must be wrapped in a guard:
110
-
111
- - Supabase INSERT/UPDATE/DELETE (work items, prototype_registry, design_context, etc.) — runner uses main-db mode, no test branch
112
- - Coolify app deploys / restarts / config writes
113
- - Cloudflare DNS writes / cache purges
114
- - R2 object writes / deletes
115
- - `git push` to any remote
116
- - `gh pr create`, `gh release create`, tag pushes
117
- - `npm publish`
118
- - Any webhook fire, email send, Slack post
119
- - MCP connector tools that mutate external state (e.g. `mcp__coolify__deploy`)
120
-
121
- **Bash pattern:**
122
- ```bash
123
- if [ "$RDC_TEST" != "1" ]; then
124
- curl -X POST "https://deploy.regendevcorp.com/api/v1/applications/$UUID/deploy" ...
125
- else
126
- echo "[RDC_TEST] skipping Coolify deploy"
127
- fi
128
- ```
129
-
130
- **Node/JS pattern:**
131
- ```js
132
- if (process.env.RDC_TEST !== '1') {
133
- await deployToCoolify(...);
134
- } else {
135
- console.log('[RDC_TEST] skipping Coolify deploy');
136
- }
137
- ```
138
-
139
- **Why this matters:** Tier 2 runs every skill in a throwaway sandbox. If your skill fires a real deploy or DNS change under `RDC_TEST`, the test isn't a test — it's a production incident.
140
-
141
- **New-skill contract:** every new `rdc:*` skill MUST honor `RDC_TEST` before shipping. Tier 2 manifests will fail any skill that writes to external state under the flag.
142
-
143
- **Known blocker:** The `check-cwd.js` SessionStart hook hard-blocks Claude sessions launched from `C:/Dev/rdc-skills`. The hook must check `process.env.RDC_TEST === '1'` and call `process.exit(0)` early to allow Tier 2 sandbox runs. Without this bypass, all Tier 2 headless invocations fail with `exit_code: -1`. File: `~/.claude/hooks/check-cwd.js`.
144
-
145
- ---
146
-
147
- ## Completion Report
148
-
149
- When your scope is done, return a structured report to the supervisor:
150
-
151
- ```
152
- AGENT_COMPLETE: {
153
- scope: "<what you were assigned>",
154
- files_changed: ["path/to/file", ...],
155
- work_item_id: "<id if you had one>",
156
- commits: ["<hash> <message>"],
157
- blockers: ["<anything that needs supervisor attention>"]
158
- }
159
- ```
160
-
161
- If you hit a blocker mid-task: stop, report it, do not guess or work around it.
162
-
163
- ---
164
-
165
- ## Self-Check Rules — Prevent Getting Lost
166
-
167
- ### 10-Minute Rule
168
- If you have been working on a **single step** for more than 10 minutes without measurable progress (no new files changed, no successful tool calls, no forward movement), **stop immediately**. Do not keep trying variations. Report it as a blocker.
169
-
170
- ### 2-Retry Rule
171
- If the **same command or approach fails twice**, stop. Do not attempt a third variation or creative workaround. Report the failure with the exact error output.
172
-
173
- ### Scope Drift Rule
174
- If you discover that fixing your assigned task would also require changing files **outside your scope**, stop. Do not fix them. Add them to `blockers` in your AGENT_COMPLETE report. The supervisor assigns them separately.
175
-
176
- ### What "measurable progress" means
177
- - A file was created or modified ✅
178
- - A tool call succeeded and returned useful data ✅
179
- - A command ran without error ✅
180
- - Trying the same thing with slightly different parameters ❌
181
- - Reading the same file again hoping for different insight ❌
182
- - Rephrasing a failing query ❌
183
-
184
- ---
185
-
186
- ## ⛔ Implementation Report Contract
187
-
188
- Every agent MUST follow this protocol before closing any work item as `done`.
189
-
190
- ### Step 1 — Tick checklist items as you complete them
94
+ - Playwright must run headless. Do not use `--headed`, `--ui`, `codegen`, `open`, `show-report`, or `PWDEBUG=1` in agent sessions.
95
+ - Use list/dot/json reporters and saved trace/report artifacts instead of opening the Playwright UI.
96
+ - PowerShell helpers must use `-WindowStyle Hidden -NonInteractive`, or a hidden wrapper.
97
+ - `Start-Process` must include `-WindowStyle Hidden` or `-WindowStyle Minimized`.
98
+ - `cmd /c start` must use `/min` for intentionally visible tools or `/b` for background work.
99
+ - Node/cmd/ps1 helpers launched by hooks must go through the RDC hidden hook runner.
191
100
 
101
+ Check the project overlay for specific language, package manager, and build constraints.
102
+
103
+ ---
104
+
105
+ ## RDC_TEST Sandbox Contract
106
+
107
+ When `RDC_TEST=1` is set, the skill is running inside the Tier 2 sandbox harness. Short-circuit all destructive external side effects.
108
+
109
+ **How to detect:** `process.env.RDC_TEST === '1'` (Node/JS) or `[ "$RDC_TEST" = "1" ]` (bash). The Tier 2 runner sets this before invoking `claude --print`.
110
+
111
+ **Allowed under RDC_TEST** — run normally, no guard:
112
+
113
+ | Operation | Why |
114
+ |-----------|-----|
115
+ | Local git commits | Commit to the worktree branch; never pushed |
116
+ | Local filesystem writes | Inside the sandbox worktree |
117
+ | Supabase reads | Assertions read prod DB; no writes |
118
+ | Service reads | Coolify status, CF DNS lookup, GitHub read — all safe |
119
+ | `clauth` credential reads | Read-only against the daemon |
120
+
121
+ **Short-circuit under RDC_TEST** — must be wrapped in a guard:
122
+
123
+ - Supabase INSERT/UPDATE/DELETE (work items, prototype_registry, design_context, etc.) — runner uses main-db mode, no test branch
124
+ - Coolify app deploys / restarts / config writes
125
+ - Cloudflare DNS writes / cache purges
126
+ - R2 object writes / deletes
127
+ - `git push` to any remote
128
+ - `gh pr create`, `gh release create`, tag pushes
129
+ - `npm publish`
130
+ - Any webhook fire, email send, Slack post
131
+ - MCP connector tools that mutate external state (e.g. `mcp__coolify__deploy`)
132
+
133
+ **Bash pattern:**
134
+ ```bash
135
+ if [ "$RDC_TEST" != "1" ]; then
136
+ curl -X POST "https://deploy.regendevcorp.com/api/v1/applications/$UUID/deploy" ...
137
+ else
138
+ echo "[RDC_TEST] skipping Coolify deploy"
139
+ fi
140
+ ```
141
+
142
+ **Node/JS pattern:**
143
+ ```js
144
+ if (process.env.RDC_TEST !== '1') {
145
+ await deployToCoolify(...);
146
+ } else {
147
+ console.log('[RDC_TEST] skipping Coolify deploy');
148
+ }
149
+ ```
150
+
151
+ **Why this matters:** Tier 2 runs every skill in a throwaway sandbox. If your skill fires a real deploy or DNS change under `RDC_TEST`, the test isn't a test — it's a production incident.
152
+
153
+ **New-skill contract:** every new `rdc:*` skill MUST honor `RDC_TEST` before shipping. Tier 2 manifests will fail any skill that writes to external state under the flag.
154
+
155
+ **Known blocker:** The `check-cwd.js` SessionStart hook hard-blocks Claude sessions launched from `C:/Dev/rdc-skills`. The hook must check `process.env.RDC_TEST === '1'` and call `process.exit(0)` early to allow Tier 2 sandbox runs. Without this bypass, all Tier 2 headless invocations fail with `exit_code: -1`. File: `~/.claude/hooks/check-cwd.js`.
156
+
157
+ ---
158
+
159
+ ## Completion Report
160
+
161
+ When your scope is done, return a structured report to the supervisor:
162
+
163
+ ```
164
+ AGENT_COMPLETE: {
165
+ scope: "<what you were assigned>",
166
+ files_changed: ["path/to/file", ...],
167
+ work_item_id: "<id if you had one>",
168
+ commits: ["<hash> <message>"],
169
+ blockers: ["<anything that needs supervisor attention>"]
170
+ }
171
+ ```
172
+
173
+ If you hit a blocker mid-task: stop, report it, do not guess or work around it.
174
+
175
+ ---
176
+
177
+ ## Self-Check Rules — Prevent Getting Lost
178
+
179
+ ### 10-Minute Rule
180
+ If you have been working on a **single step** for more than 10 minutes without measurable progress (no new files changed, no successful tool calls, no forward movement), **stop immediately**. Do not keep trying variations. Report it as a blocker.
181
+
182
+ ### 2-Retry Rule
183
+ If the **same command or approach fails twice**, stop. Do not attempt a third variation or creative workaround. Report the failure with the exact error output.
184
+
185
+ ### Scope Drift Rule
186
+ If you discover that fixing your assigned task would also require changing files **outside your scope**, stop. Do not fix them. Add them to `blockers` in your AGENT_COMPLETE report. The supervisor assigns them separately.
187
+
188
+ ### What "measurable progress" means
189
+ - A file was created or modified ✅
190
+ - A tool call succeeded and returned useful data ✅
191
+ - A command ran without error ✅
192
+ - Trying the same thing with slightly different parameters ❌
193
+ - Reading the same file again hoping for different insight ❌
194
+ - Rephrasing a failing query ❌
195
+
196
+ ---
197
+
198
+ ## ⛔ Implementation Report + CodeFlow Exit Contract
199
+
200
+ Every implementation agent MUST follow this protocol before moving a work item
201
+ to `review`. Agents do not close non-epic work as `done`; validators close it
202
+ after fresh verification.
203
+
204
+ ### Step 1 — Tick checklist items as you complete them
205
+
192
206
  ```sql
193
- SELECT update_checklist_item('<work-item-id>'::uuid, 'item-id', true);
207
+ SELECT update_checklist_item(
208
+ '<work-item-id>'::uuid,
209
+ 'item-id',
210
+ true,
211
+ '<agent-session-id>',
212
+ 'agent',
213
+ 'rpc'
214
+ );
194
215
  ```
195
216
 
196
- Call this for each item AS you complete it — not all at once at the end.
197
-
198
- ### Step 2 Submit implementation report BEFORE marking done
199
-
200
- ```sql
217
+ Call this for each item AS you complete it — not all at once at the end. The
218
+ database records every tick in `work_item_checklist_events`. Supervisor and
219
+ validator re-ticks are rejected by the exit gate.
220
+
221
+ ### Step 2 — Submit implementation report BEFORE marking done
222
+
223
+ ```sql
201
224
  SELECT submit_implementation_report(
202
225
  '<work-item-id>'::uuid,
203
- '{"tldr":"...","assumptions":[],"deviations":[],"uncertainty":[],"detail":"...","flags":[]}'::jsonb
226
+ '{
227
+ "tldr":"...",
228
+ "assumptions":[],
229
+ "deviations":[],
230
+ "uncertainty":[],
231
+ "detail":"...",
232
+ "flags":[],
233
+ "codeflow_post":{
234
+ "agent_session_id":"<agent-session-id>",
235
+ "summary":"...",
236
+ "files_changed":["path/to/file"],
237
+ "verification":["command or evidence"],
238
+ "commit":"<optional commit hash>"
239
+ }
240
+ }'::jsonb
204
241
  );
205
242
  ```
206
243
 
207
244
  Returns `{ flags_count, deviations_count, has_deviations }`. Include this signal in your `AGENT_COMPLETE` report.
208
245
 
209
- ### Step 3 — Mark done
246
+ ### Step 3 — Move to review
210
247
 
211
248
  ```sql
212
- SELECT update_work_item_status('<work-item-id>'::uuid, 'done');
249
+ SELECT update_work_item_status(
250
+ '<work-item-id>'::uuid,
251
+ 'review',
252
+ '["Implementation complete; ready for validator"]'::jsonb,
253
+ '<agent-session-id>',
254
+ 'agent'
255
+ );
213
256
  ```
214
257
 
215
- If any `required: true` checklist item is still unchecked, the DB raises EXCEPTION — fix it first.
216
-
217
- ### Supervisor workflow
218
-
219
- - All zeros → clean run, proceed
220
- - `flags_count > 0` or `deviations_count > 0` → pull full report:
221
- ```sql
222
- SELECT implementation_report FROM work_items WHERE id = '<id>';
223
- ```
224
-
225
- ---
258
+ If the report or `codeflow_post` is missing, the database raises EXCEPTION.
226
259
 
227
- ## Now read your role-specific guide
260
+ ### Validator close mark done only after fresh review
228
261
 
229
- Path: `{PROJECT_ROOT}/.rdc/guides/<type>.md` (e.g., `frontend.md`, `backend.md`, `data.md`)
230
- Fallback: `{PROJECT_ROOT}/docs/guides/<type>.md` if `.rdc/` does not exist.
262
+ ```sql
263
+ SELECT update_work_item_status(
264
+ '<work-item-id>'::uuid,
265
+ 'done',
266
+ '["Validator verified implementation report, CodeFlow post, and checklist evidence"]'::jsonb,
267
+ '<validator-session-id>',
268
+ 'validator'
269
+ );
270
+ ```
231
271
 
232
- The project overlay will specify the exact location if it differs from the convention above.
272
+ If any `required: true` checklist item is still unchecked, was re-ticked by a
273
+ supervisor/validator, or was ticked by a different session than the originating
274
+ agent, the DB and PreToolUse hook reject the close.
275
+
276
+ ### Supervisor workflow
277
+
278
+ - All zeros → clean run, proceed
279
+ - `flags_count > 0` or `deviations_count > 0` → pull full report:
280
+ ```sql
281
+ SELECT implementation_report FROM work_items WHERE id = '<id>';
282
+ ```
283
+
284
+ ---
285
+
286
+ ## Now read your role-specific guide
287
+
288
+ Path: `{PROJECT_ROOT}/.rdc/guides/<type>.md` (e.g., `frontend.md`, `backend.md`, `data.md`)
289
+ Fallback: `{PROJECT_ROOT}/docs/guides/<type>.md` if `.rdc/` does not exist.
290
+
291
+ The project overlay will specify the exact location if it differs from the convention above.