@lifeaitools/rdc-skills 0.25.9 → 0.26.0

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 (77) hide show
  1. package/.claude-plugin/plugin.json +1608 -1551
  2. package/.github/workflows/self-test.yml +34 -34
  3. package/CHANGELOG.md +332 -319
  4. package/MANIFEST.md +224 -224
  5. package/README.md +368 -367
  6. package/RELEASE.md +50 -45
  7. package/bin/rdc-skills-mcp.mjs +1 -1
  8. package/commands/build.md +181 -181
  9. package/commands/collab.md +180 -180
  10. package/commands/deploy.md +173 -148
  11. package/commands/fixit.md +150 -150
  12. package/commands/handoff.md +173 -173
  13. package/commands/overnight.md +220 -220
  14. package/commands/plan.md +158 -158
  15. package/commands/preplan.md +131 -131
  16. package/commands/prototype.md +145 -145
  17. package/commands/report.md +99 -99
  18. package/commands/review.md +120 -120
  19. package/commands/status.md +86 -86
  20. package/commands/workitems.md +127 -127
  21. package/deploy/install-systemd.sh +16 -0
  22. package/deploy/systemd/rdc-skills-mcp.service +19 -0
  23. package/git-sha.json +1 -1
  24. package/guides/agent-bootstrap.md +195 -195
  25. package/guides/agents/backend.md +102 -102
  26. package/guides/agents/content.md +94 -94
  27. package/guides/agents/cs2.md +56 -56
  28. package/guides/agents/data.md +86 -86
  29. package/guides/agents/design.md +77 -77
  30. package/guides/agents/frontend.md +91 -91
  31. package/guides/agents/infrastructure.md +81 -81
  32. package/guides/agents/setup.md +272 -272
  33. package/guides/agents/verify.md +119 -119
  34. package/guides/agents/viz.md +106 -106
  35. package/guides/orchestration-epic.md +17 -0
  36. package/hooks/check-rdc-environment.js +172 -318
  37. package/hooks/lib/box-lock.js +28 -8
  38. package/package.json +1 -2
  39. package/scripts/install-rdc-skills.js +1244 -1474
  40. package/scripts/probe-installed-hooks.mjs +2 -2
  41. package/scripts/self-test.mjs +1459 -1459
  42. package/scripts/validate-publish-manifests.js +502 -502
  43. package/skills/build/SKILL.md +662 -578
  44. package/skills/channel-formatter/SKILL.md +538 -538
  45. package/skills/collab/SKILL.md +239 -239
  46. package/skills/convert/SKILL.md +138 -138
  47. package/skills/deploy/SKILL.md +583 -541
  48. package/skills/design/SKILL.md +205 -205
  49. package/skills/env/SKILL.md +146 -139
  50. package/skills/fixit/SKILL.md +203 -203
  51. package/skills/handoff/SKILL.md +236 -236
  52. package/skills/housekeeping/SKILL.md +189 -189
  53. package/skills/onramp/SKILL.md +1459 -1459
  54. package/skills/overnight/SKILL.md +251 -251
  55. package/skills/plan/SKILL.md +345 -345
  56. package/skills/preplan/SKILL.md +90 -90
  57. package/skills/prototype/SKILL.md +150 -150
  58. package/skills/refactor/SKILL.md +51 -0
  59. package/skills/regen-media/SKILL.md +94 -94
  60. package/skills/release/SKILL.md +140 -140
  61. package/skills/report/SKILL.md +100 -100
  62. package/skills/review/SKILL.md +151 -151
  63. package/skills/self-test/SKILL.md +108 -108
  64. package/skills/status/SKILL.md +99 -99
  65. package/skills/tests/MATRIX.md +59 -55
  66. package/skills/tests/README.md +1 -1
  67. package/skills/tests/onramp.test.json +101 -87
  68. package/skills/tests/rdc-env.test.json +12 -0
  69. package/skills/tests/rdc-new-model.test.json +12 -0
  70. package/skills/tests/rdc-refactor.test.json +29 -0
  71. package/skills/tests/rdc-regen-media.test.json +29 -29
  72. package/skills/watch/SKILL.md +84 -84
  73. package/skills/workitems/SKILL.md +151 -151
  74. package/tests/no-local-pm2.test.mjs +45 -0
  75. package/scripts/local-install-with-stop.sh +0 -41
  76. package/scripts/probe-lock-holders.mjs +0 -36
  77. package/scripts/rebuild-mcp.mjs +0 -107
@@ -1,152 +1,177 @@
1
- ---
2
- name: rdc:deploy
3
- description: >-
4
- Coolify ops. Usage `rdc:deploy <slug> [build-id]` or `rdc:deploy new <slug>` or `rdc:deploy diagnose <slug>` or `rdc:deploy audit [--fix]` — type checklists, DNS decision tree, mandatory post-deploy gate. Checklist-only output.
5
- ---
6
-
7
- > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
8
- > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
9
- > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
10
-
11
-
12
- # rdc:deploy — Coolify Operations
13
-
14
- **READ FIRST:** `guides/output-contract.md`. Checklist-only output. No narration.
15
- No raw MCP dumps. No UUIDs unless asked.
16
-
17
- > **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.
18
- >
19
- > *Under `$RDC_TEST=1`:* Modes 1 (deploy) and 2 (new) are **entirely skipped** — echo `[RDC_TEST] skipping Coolify deploy/create` and mark every `[ ]` line in those checklists as `[~]`. Modes 3 (diagnose) and 4 (audit without `--fix`) are **read-only and run normally**. Mode 4 with `--fix` skips all remediation — echo `[RDC_TEST] skipping audit --fix remediation` and report findings only. Registry SELECTs, Coolify status reads, HTTP gate probes, TLS checks, and DNS lookups are NOT destructive and run normally. Anything that writes (create app, set watch_paths, deploy trigger, env var write, DNS write, CF cache purge, registry UPDATE/INSERT) is gated.
20
-
21
- ## Arguments
22
-
23
- - `rdc:deploy <slug>` — deploy existing app (latest commit on its watched branch)
24
- - `rdc:deploy <slug> <build-id>` — deploy specific commit/tag
25
- - `rdc:deploy new <slug>` — create a new Coolify app from registry
26
- - `rdc:deploy diagnose <slug>` — debug why an app is broken
27
- - `rdc:deploy audit` — fleet-wide scan for missed failures
28
- - `rdc:deploy audit --fix` — fleet scan + auto-remediate safe issues
29
- - `rdc:deploy` (no args)print mode menu, ask which
30
-
31
- ## Modes
32
-
33
- ### Mode 1 — deploy <slug> [build-id]
34
-
35
- ```
36
- rdc:deploy: <slug> → <domain>
37
- [ ] Registry lookup (slug, uuid, branch, type, env_vars_needed)
38
- [ ] Git state verified (branch matches Coolify, commit pushed)
39
- [ ] Build-id resolved (default: HEAD of watched branch)
40
- [ ] Env vars present in Coolify (compare to registry)
41
- [ ] Type-specific preflight (see docs/runbooks/coolify-deploy-checklist.md)
42
- [ ] Deploy triggered
43
- [ ] Deployment reached "finished" state
44
- [ ] Gate: HTTP 200
45
- [ ] Gate: TLS valid (no SSL cipher mismatch)
46
- [ ] Gate: cache headers correct on HTML
47
- [ ] Gate: container running on declared port
48
- [ ] Cloudflare cache purged (if proxied)
49
- [ ] deployment_registry updated (last_deploy_at, status)
50
- rdc:deploy: <slug> deployed in Nm Ns
51
- ```
52
-
53
- ### Mode 2 — new <slug>
54
-
55
- ```
56
- rdc:deploy new: <slug>
57
- [ ] Registry entry loaded (or interactive create)
1
+ ---
2
+ name: rdc:deploy
3
+ description: >-
4
+ Coolify ops. Usage `rdc:deploy <slug> [build-id]`, `rdc:deploy new <slug>`, `rdc:deploy maintenance <service>`, `rdc:deploy diagnose <slug>`, or `rdc:deploy audit [--fix]` — typed checklists, private-service controls, DNS decision tree, and mandatory post-deploy gates. Checklist-only output.
5
+ ---
6
+
7
+ > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
8
+ > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
9
+ > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
10
+
11
+
12
+ # rdc:deploy — Coolify Operations
13
+
14
+ **READ FIRST:** `guides/output-contract.md`. Checklist-only output. No narration.
15
+ No raw MCP dumps. No UUIDs unless asked.
16
+
17
+ > **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.
18
+ >
19
+ > *Under `$RDC_TEST=1`:* Modes 1 (deploy) and 2 (new) are **entirely skipped** — echo `[RDC_TEST] skipping Coolify deploy/create` and mark every `[ ]` line in those checklists as `[~]`. Modes 3 (diagnose) and 4 (audit without `--fix`) are **read-only and run normally**. Mode 4 with `--fix` skips all remediation — echo `[RDC_TEST] skipping audit --fix remediation` and report findings only. Registry SELECTs, Coolify status reads, HTTP gate probes, TLS checks, and DNS lookups are NOT destructive and run normally. Anything that writes (create app, set watch_paths, deploy trigger, env var write, DNS write, CF cache purge, registry UPDATE/INSERT) is gated.
20
+
21
+ ## Arguments
22
+
23
+ - `rdc:deploy <slug>` — deploy existing app (latest commit on its watched branch)
24
+ - `rdc:deploy <slug> <build-id>` — deploy specific commit/tag
25
+ - `rdc:deploy new <slug>` — create a new Coolify app from registry
26
+ - `rdc:deploy diagnose <slug>` — debug why an app is broken
27
+ - `rdc:deploy audit` — fleet-wide scan for missed failures
28
+ - `rdc:deploy audit --fix` — fleet scan + auto-remediate safe issues
29
+ - `rdc:deploy maintenance <service>`create, update, or verify a template-declared private service; no public domain or host port
30
+ - `rdc:deploy` (no args) — print mode menu, ask which
31
+
32
+ ## Modes
33
+
34
+ ### Mode 1 — deploy <slug> [build-id]
35
+
36
+ ```
37
+ rdc:deploy: <slug> <domain>
38
+ [ ] Registry lookup (slug, uuid, branch, type, env_vars_needed)
39
+ [ ] Git state verified (branch matches Coolify, commit pushed)
40
+ [ ] Build-id resolved (default: HEAD of watched branch)
41
+ [ ] Env vars present in Coolify (compare to registry)
42
+ [ ] Type-specific preflight (see docs/runbooks/coolify-deploy-checklist.md)
43
+ [ ] Deploy triggered
44
+ [ ] Deployment reached "finished" state
45
+ [ ] Gate: HTTP 200
46
+ [ ] Gate: TLS valid (no SSL cipher mismatch)
47
+ [ ] Gate: cache headers correct on HTML
48
+ [ ] Gate: container running on declared port
49
+ [ ] Cloudflare cache purged (if proxied)
50
+ [ ] deployment_registry updated (last_deploy_at, status)
51
+ ✅ rdc:deploy: <slug> deployed in Nm Ns
52
+ ```
53
+
54
+ ### Mode 2 — new <slug>
55
+
56
+ ```
57
+ rdc:deploy new: <slug>
58
+ [ ] Registry entry loaded (or interactive create)
58
59
  [ ] DNS path chosen (A: staging wildcard B: apex C: other zone)
59
- [ ] DNS record verified or wildcard confirmed
60
- [ ] Cloudflare proxy setting correct for DNS path
61
- [ ] server_uuid, project_uuid, environment_uuid, github_app_uuid resolved
62
- [ ] Build type chosen (Next.js / Vite / static / standalone)
63
- [ ] Type-specific fields filled (ports, build cmd, install cmd, start cmd)
64
- [ ] Application created via /applications/private-github-app
65
- [ ] watch_paths set and verified
66
- [ ] Env vars set in Coolify
67
- [ ] First deploy triggered
68
- [ ] Gate passed (5 checks)
69
- [ ] deployment_registry row inserted
70
- ✅ rdc:deploy new: <slug> live at <domain>
71
- ```
72
-
73
- ### Mode 3 — diagnose <slug>
74
-
75
- ```
76
- rdc:deploy diagnose: <slug>
77
- [ ] App located (uuid, domain, last deploy)
78
- [ ] Container state (running / restarting / stopped)
79
- [ ] Last 100 log lines scanned for known error patterns
80
- [ ] Port mismatch check (declared vs actual)
81
- [ ] Env var drift check (registry vs Coolify)
82
- [ ] watch_paths sanity check
83
- [ ] HTTP / TLS reachability
84
- [ ] Cloudflare proxy state check
85
- [ ] Disk space on server
86
- [ ] Branch mismatch check (Coolify git_branch vs expected)
87
- ⚠️ rdc:deploy diagnose: <root cause in one sentence> — fix: <one command>
88
- ```
89
-
90
- ### Mode 4 — audit
91
-
92
- ```
93
- rdc:deploy audit: fleet scan
94
- [ ] Inventory join: Coolify apps ⋈ deployment_registry
95
- [ ] Orphans (in one but not the other)
96
- [ ] Monorepo apps missing watch_paths
97
- [ ] Stale deploys (>14 days since last success)
98
- [ ] Registry rows with status='broken'
99
- [ ] Failed deployments in last 7 days
100
- [ ] HTTP gate sweep (non-200 per domain)
101
- [ ] TLS cert expiry <30 days
102
- [ ] Port mismatches (ports_exposes vs actual container port)
103
- [ ] Env var drift (registry.env_vars_needed vs Coolify env)
104
- [ ] Branch mismatches (Coolify git_branch ≠ expected)
105
- [ ] Disk space on 64.237.54.189
60
+ [ ] DNS record verified or wildcard confirmed
61
+ [ ] Cloudflare proxy setting correct for DNS path
62
+ [ ] server_uuid, project_uuid, environment_uuid, github_app_uuid resolved
63
+ [ ] Build type chosen (Next.js / Vite / static / standalone)
64
+ [ ] Type-specific fields filled (ports, build cmd, install cmd, start cmd)
65
+ [ ] Application created via /applications/private-github-app
66
+ [ ] watch_paths set and verified
67
+ [ ] Env vars set in Coolify
68
+ [ ] First deploy triggered
69
+ [ ] Gate passed (5 checks)
70
+ [ ] deployment_registry row inserted
71
+ ✅ rdc:deploy new: <slug> live at <domain>
72
+ ```
73
+
74
+ ### Mode 3 — diagnose <slug>
75
+
76
+ ```
77
+ rdc:deploy diagnose: <slug>
78
+ [ ] App located (uuid, domain, last deploy)
79
+ [ ] Container state (running / restarting / stopped)
80
+ [ ] Last 100 log lines scanned for known error patterns
81
+ [ ] Port mismatch check (declared vs actual)
82
+ [ ] Env var drift check (registry vs Coolify)
83
+ [ ] watch_paths sanity check
84
+ [ ] HTTP / TLS reachability
85
+ [ ] Cloudflare proxy state check
86
+ [ ] Disk space on server
87
+ [ ] Branch mismatch check (Coolify git_branch vs expected)
88
+ ⚠️ rdc:deploy diagnose: <root cause in one sentence> — fix: <one command>
89
+ ```
90
+
91
+ ### Mode 4 — audit
92
+
93
+ ```
94
+ rdc:deploy audit: fleet scan
95
+ [ ] Inventory join: Coolify apps ⋈ deployment_registry
96
+ [ ] Orphans (in one but not the other)
97
+ [ ] Monorepo apps missing watch_paths
98
+ [ ] Stale deploys (>14 days since last success)
99
+ [ ] Registry rows with status='broken'
100
+ [ ] Failed deployments in last 7 days
101
+ [ ] HTTP gate sweep (non-200 per domain)
102
+ [ ] TLS cert expiry <30 days
103
+ [ ] Port mismatches (ports_exposes vs actual container port)
104
+ [ ] Env var drift (registry.env_vars_needed vs Coolify env)
105
+ [ ] Branch mismatches (Coolify git_branch ≠ expected)
106
+ [ ] Disk space on 64.237.54.189
106
107
  [ ] DNS/proxy misconfigs on configured staging wildcard
107
- [ ] Duplicate apps (same repo, multiple UUIDs)
108
-
109
- Findings:
110
- | Severity | App | Issue | Fix |
111
- |----------|-----|-------|-----|
112
- | HIGH | ... | ... | ... |
113
- ⚠️ rdc:deploy audit: N HIGH · M MED · K LOW — run `rdc:deploy audit --fix` to auto-remediate safe issues
114
- ```
115
-
116
- Severity rules:
117
- - **HIGH** — user-facing down (HTTP non-200, TLS invalid, container not running)
118
- - **MED** — degraded or drifting (watch_paths missing, env var drift, stale deploy, branch mismatch)
119
- - **LOW** — cleanup (orphans, duplicates, registry status stale)
120
-
121
- `--fix` auto-remediates only: missing watch_paths, registry row updates, CF cache purges. Never touches env vars, DNS, or container config without explicit confirmation.
122
-
123
- ## Coolify Accessclauth + REST API
124
-
125
- All Coolify operations use the clauth daemon and the Coolify REST API directly.
126
- There is no Coolify MCP server do not reference `@masonator/coolify-mcp`.
127
-
128
- ```bash
129
- _COOLIFY=$(curl -s http://127.0.0.1:52437/v/coolify-api)
108
+ [ ] Duplicate apps (same repo, multiple UUIDs)
109
+
110
+ Findings:
111
+ | Severity | App | Issue | Fix |
112
+ |----------|-----|-------|-----|
113
+ | HIGH | ... | ... | ... |
114
+ ⚠️ rdc:deploy audit: N HIGH · M MED · K LOW — run `rdc:deploy audit --fix` to auto-remediate safe issues
115
+ ```
116
+
117
+ Severity rules:
118
+ - **HIGH** — user-facing down (HTTP non-200, TLS invalid, container not running)
119
+ - **MED** — degraded or drifting (watch_paths missing, env var drift, stale deploy, branch mismatch)
120
+ - **LOW** — cleanup (orphans, duplicates, registry status stale)
121
+
122
+ `--fix` auto-remediates only: missing watch_paths, registry row updates, CF cache purges. Never touches env vars, DNS, or container config without explicit confirmation.
123
+
124
+ ### Mode 7maintenance <service> (private infrastructure)
125
+
126
+ Use maintenance only for a service declared in the `private-service` template.
127
+ It creates, updates, or verifies a Coolify-network service with no public
128
+ domain, no DNS route, and no host-port publication. Secret checks use key names
129
+ only; values are never retrieved or emitted. Retiring a service is outside this
130
+ mode and requires separate explicit approval.
131
+
132
+ ```
133
+ rdc:deploy maintenance: <service>
134
+ [ ] Template and source/branch/Dockerfile/internal-port/health-path resolved
135
+ [ ] Private-only contract: domains empty, host port absent, network alias declared
136
+ [ ] Required secret keys confirmed by name only
137
+ [ ] Explicit deploy completed
138
+ [ ] Health gate passes inside the container
139
+ [ ] Existing Coolify-network workload reaches the alias and health path
140
+ [ ] No public domain, TLS route, DNS record, or host endpoint is present
141
+ ✅ rdc:deploy maintenance: <service> healthy on the private network
142
+ ```
143
+
144
+ For `clauth`, require `CLAUTH_MACHINE_ID` and `CLAUTH_MASTER_PASSWORD`, port
145
+ `52437`, and `/ping`. The container may bind `0.0.0.0` internally only;
146
+ consumers must use its Coolify network alias rather than `localhost`.
147
+
148
+ ## Coolify Access — clauth + REST API
149
+
150
+ All Coolify operations use the clauth daemon and the Coolify REST API directly.
151
+ There is no Coolify MCP server — do not reference `@masonator/coolify-mcp`.
152
+
153
+ ```bash
154
+ _COOLIFY=$(curl -s http://127.0.0.1:52437/v/coolify-api)
130
155
  curl -s -H "Authorization: Bearer $_COOLIFY" "$DEPLOY_API_BASE/api/v1/applications"
131
- ```
132
-
133
- If clauth daemon is not responding:
134
- ```
135
- BLOCKED: clauth daemon not responding. Run scripts\restart-clauth.bat, unlock at http://127.0.0.1:52437
136
- ```
137
-
138
- ## References
139
-
140
- - Type-specific checklists + DNS tree + gate commands: `docs/runbooks/coolify-deploy-checklist.md`
141
- - Rules / registry RPCs / hard limits: `.claude/rules/coolify-deployment.md`
142
- - Infrastructure constants:
143
- ```
144
- Server UUID: ih386anenvvvn6fy1umtyow0
145
- Server IP: 64.237.54.189
156
+ ```
157
+
158
+ If clauth daemon is not responding:
159
+ ```
160
+ BLOCKED: clauth daemon not responding. Run scripts\restart-clauth.bat, unlock at http://127.0.0.1:52437
161
+ ```
162
+
163
+ ## References
164
+
165
+ - Type-specific checklists + DNS tree + gate commands: `docs/runbooks/coolify-deploy-checklist.md`
166
+ - Rules / registry RPCs / hard limits: `.claude/rules/coolify-deployment.md`
167
+ - Infrastructure constants:
168
+ ```
169
+ Server UUID: ih386anenvvvn6fy1umtyow0
170
+ Server IP: 64.237.54.189
146
171
  Dashboard: <deployment-dashboard-url>
147
- GitHub App UUID: xdmcy60putp5h9j7k4kwg9c3
148
- ```
149
-
150
- ## Supersedes
151
-
152
- `coolify-deploy` standalone skill (kept for back-compat; new work uses `rdc:deploy`).
172
+ GitHub App UUID: xdmcy60putp5h9j7k4kwg9c3
173
+ ```
174
+
175
+ ## Supersedes
176
+
177
+ `coolify-deploy` standalone skill (kept for back-compat; new work uses `rdc:deploy`).
package/commands/fixit.md CHANGED
@@ -1,150 +1,150 @@
1
- ---
2
- name: rdc:fixit
3
- description: >-
4
- Usage `rdc:fixit <description>` — sanctioned bypass for quick fixes under 5 files / 30 min. Creates minimal work item, makes fix, commits, DELIVERS it to where it is consumed (publish/deploy/land) and verifies, then closes. The ONLY alternative to rdc:build. For typos, config patches, hotfixes, dep bumps.
5
- ---
6
-
7
- > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
8
- > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
9
- > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
10
-
11
- > 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`).
12
-
13
- > **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.
14
-
15
-
16
- # rdc:fixit — Sanctioned Quick Fix
17
-
18
- ## When to Use
19
- - Typo or single-line text correction
20
- - Config value change (env vars, constants, feature flags)
21
- - Emergency hotfix that cannot wait for a full build cycle
22
- - Dependency version bump
23
- - CSS/styling tweak on a single component
24
- - Broken import or export fix
25
- - Single-file logic correction
26
-
27
- ## When NOT to Use — escalate to rdc:build instead
28
- - New feature of any size
29
- - Refactor touching >5 files
30
- - Anything requiring architecture decisions
31
- - Work that will take longer than 30 minutes
32
- - Schema changes or migrations
33
-
34
- ## Arguments
35
- - `rdc:fixit <description>` — fix the described issue
36
-
37
- ## Procedure
38
-
39
- ### 1. Scope check (mandatory — do this before touching any file)
40
-
41
- Will this fix touch more than **5 files** or take more than **30 minutes**?
42
-
43
- - **YES** → Stop. Use `/rdc:build` instead. Explain to the user why.
44
- - **NO** → Continue.
45
-
46
- ### 2. Create a minimal work item (before touching any code)
47
-
48
- ```sql
49
- SELECT insert_work_item(
50
- p_title := 'fixit: <description>',
51
- p_item_type := 'bug',
52
- p_priority := 'urgent',
53
- p_status := 'in_progress',
54
- p_source := 'fixit'
55
- );
56
- ```
57
-
58
- Note the returned `id`.
59
-
60
- ### 3. Write the fixit session marker
61
-
62
- Write to `{USER_HOME}/.claude/fixit.marker`:
63
- ```
64
- <work_item_id>
65
- <ISO timestamp>
66
- <description>
67
- ```
68
-
69
- This signals the Stop hook that fixit is handling its own documentation.
70
-
71
- ### 4. Make the fix
72
-
73
- Do the minimal work. Scope creep rule: if you discover the fix requires more than originally scoped, **stop immediately**:
74
- 1. Close the work item: `update_work_item_status('<id>', 'blocked', '["Escalated — scope exceeded fixit threshold"]')`
75
- 2. Delete the marker file
76
- 3. Tell the user to use `/rdc:build` instead
77
-
78
- ### 5. Commit
79
-
80
- ```bash
81
- git add <specific files only — never git add -A for a fixit>
82
- git commit -m "fix(<scope>): <description>"
83
- if [ "$RDC_TEST" != "1" ]; then
84
- git push origin {development-branch}
85
- else
86
- echo "[RDC_TEST] skipping git push origin {development-branch}"
87
- fi
88
- ```
89
-
90
- ### 5.5 Deliver to done (MANDATORY — a fixit is not done until the change is LIVE)
91
-
92
- ⛔ **"Committed and pushed" is NOT done.** Editing code and walking away is the exact
93
- failure this step exists to prevent. Carry the change to where it is consumed and verify it:
94
-
95
- | Target shape | "Done" = delivered means | How + structural proof |
96
- |---|---|---|
97
- | Published package (npm / PyPI) | new version live on the registry | `npm publish --access public` (or repo release path); verify `npm view <pkg> version` == new version |
98
- | Deployed app (`apps/*`, sites) | change live on the running host | `/rdc:deploy <slug>` (dev) / `promote` (prod); verify HTTP 200 + content probe |
99
- | Shared lib consumed in-repo | landed on the integration branch | `node scripts/land.mjs`; verify branch contains the SHA |
100
- | Standalone repo | its own release ritual completed | repo release script/tag; verify the artifact/tag exists |
101
- | Pure doc / internal-only change, NO consumer | committed + landed | no deploy; the ONLY case where commit == done |
102
-
103
- - **A version bump obligates a release.** A bumped-but-unshipped version is an unfinished fixit.
104
- - **Verify structurally** (registry version, HTTP status, tag presence), never by assumption.
105
- - **If delivery can't complete in-session** (missing OTP/secret, human approval, denied
106
- command, manual prod promotion): set the work item `blocked` with the exact remaining
107
- command + reason and tell the user the one step to run — do NOT mark `done`.
108
-
109
- Under `RDC_TEST=1`: echo `[RDC_TEST] skipping delivery (publish/deploy)` and proceed.
110
-
111
- ### 6. Report, review, close, and clean up
112
-
113
- **Precondition: Step 5.5 delivery is verified.** If delivery is blocked, set `blocked` (not
114
- `done`) with the remaining step — never mark an undelivered change `done`.
115
-
116
- ```sql
117
- SELECT submit_implementation_report('<id>'::uuid,
118
- '{"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
119
- );
120
-
121
- SELECT update_work_item_status('<id>'::uuid, 'review',
122
- '["Fixed via rdc:fixit; ready for validation"]'::jsonb,
123
- '<agent-session-id>',
124
- 'agent'
125
- );
126
-
127
- SELECT update_work_item_status('<id>'::uuid, 'done',
128
- '["Validator verified rdc:fixit report, CodeFlow post, and checklist evidence"]'::jsonb,
129
- '<validator-session-id>',
130
- 'validator'
131
- );
132
- ```
133
-
134
- ```bash
135
- rm {USER_HOME}/.claude/fixit.marker
136
- ```
137
-
138
- ### 7. Confirm to user
139
-
140
- Report: what was fixed, file(s) changed, commit hash. One sentence.
141
-
142
- ## Rules
143
- - Work item created BEFORE any code change — never after
144
- - `git add` specific files only — never `-A` or `.` for a fixit
145
- - Branch: development branch always
146
- - Never run `pnpm build` — not needed for a fixit
147
- - If scope expands mid-fix: stop, escalate to rdc:build, don't finish under fixit
148
- - Marker file must be cleaned up whether fix succeeds or escalates
149
- - **Done = delivered, not committed.** Live where consumed (published/deployed/landed) +
150
- verified. A version bump obligates a publish. Can't deliver in-session → `blocked`, never `done`.
1
+ ---
2
+ name: rdc:fixit
3
+ description: >-
4
+ Usage `rdc:fixit <description>` — sanctioned bypass for quick fixes under 5 files / 30 min. Creates minimal work item, makes fix, commits, DELIVERS it to where it is consumed (publish/deploy/land) and verifies, then closes. The ONLY alternative to rdc:build. For typos, config patches, hotfixes, dep bumps.
5
+ ---
6
+
7
+ > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
8
+ > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
9
+ > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
10
+
11
+ > 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`).
12
+
13
+ > **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.
14
+
15
+
16
+ # rdc:fixit — Sanctioned Quick Fix
17
+
18
+ ## When to Use
19
+ - Typo or single-line text correction
20
+ - Config value change (env vars, constants, feature flags)
21
+ - Emergency hotfix that cannot wait for a full build cycle
22
+ - Dependency version bump
23
+ - CSS/styling tweak on a single component
24
+ - Broken import or export fix
25
+ - Single-file logic correction
26
+
27
+ ## When NOT to Use — escalate to rdc:build instead
28
+ - New feature of any size
29
+ - Refactor touching >5 files
30
+ - Anything requiring architecture decisions
31
+ - Work that will take longer than 30 minutes
32
+ - Schema changes or migrations
33
+
34
+ ## Arguments
35
+ - `rdc:fixit <description>` — fix the described issue
36
+
37
+ ## Procedure
38
+
39
+ ### 1. Scope check (mandatory — do this before touching any file)
40
+
41
+ Will this fix touch more than **5 files** or take more than **30 minutes**?
42
+
43
+ - **YES** → Stop. Use `/rdc:build` instead. Explain to the user why.
44
+ - **NO** → Continue.
45
+
46
+ ### 2. Create a minimal work item (before touching any code)
47
+
48
+ ```sql
49
+ SELECT insert_work_item(
50
+ p_title := 'fixit: <description>',
51
+ p_item_type := 'bug',
52
+ p_priority := 'urgent',
53
+ p_status := 'in_progress',
54
+ p_source := 'fixit'
55
+ );
56
+ ```
57
+
58
+ Note the returned `id`.
59
+
60
+ ### 3. Write the fixit session marker
61
+
62
+ Write to `{USER_HOME}/.claude/fixit.marker`:
63
+ ```
64
+ <work_item_id>
65
+ <ISO timestamp>
66
+ <description>
67
+ ```
68
+
69
+ This signals the Stop hook that fixit is handling its own documentation.
70
+
71
+ ### 4. Make the fix
72
+
73
+ Do the minimal work. Scope creep rule: if you discover the fix requires more than originally scoped, **stop immediately**:
74
+ 1. Close the work item: `update_work_item_status('<id>', 'blocked', '["Escalated — scope exceeded fixit threshold"]')`
75
+ 2. Delete the marker file
76
+ 3. Tell the user to use `/rdc:build` instead
77
+
78
+ ### 5. Commit
79
+
80
+ ```bash
81
+ git add <specific files only — never git add -A for a fixit>
82
+ git commit -m "fix(<scope>): <description>"
83
+ if [ "$RDC_TEST" != "1" ]; then
84
+ git push origin {development-branch}
85
+ else
86
+ echo "[RDC_TEST] skipping git push origin {development-branch}"
87
+ fi
88
+ ```
89
+
90
+ ### 5.5 Deliver to done (MANDATORY — a fixit is not done until the change is LIVE)
91
+
92
+ ⛔ **"Committed and pushed" is NOT done.** Editing code and walking away is the exact
93
+ failure this step exists to prevent. Carry the change to where it is consumed and verify it:
94
+
95
+ | Target shape | "Done" = delivered means | How + structural proof |
96
+ |---|---|---|
97
+ | Published package (npm / PyPI) | new version live on the registry | `npm publish --access public` (or repo release path); verify `npm view <pkg> version` == new version |
98
+ | Deployed app (`apps/*`, sites) | change live on the running host | `/rdc:deploy <slug>` (dev) / `promote` (prod); verify HTTP 200 + content probe |
99
+ | Shared lib consumed in-repo | landed on the integration branch | `node scripts/land.mjs`; verify branch contains the SHA |
100
+ | Standalone repo | its own release ritual completed | repo release script/tag; verify the artifact/tag exists |
101
+ | Pure doc / internal-only change, NO consumer | committed + landed | no deploy; the ONLY case where commit == done |
102
+
103
+ - **A version bump obligates a release.** A bumped-but-unshipped version is an unfinished fixit.
104
+ - **Verify structurally** (registry version, HTTP status, tag presence), never by assumption.
105
+ - **If delivery can't complete in-session** (missing OTP/secret, human approval, denied
106
+ command, manual prod promotion): set the work item `blocked` with the exact remaining
107
+ command + reason and tell the user the one step to run — do NOT mark `done`.
108
+
109
+ Under `RDC_TEST=1`: echo `[RDC_TEST] skipping delivery (publish/deploy)` and proceed.
110
+
111
+ ### 6. Report, review, close, and clean up
112
+
113
+ **Precondition: Step 5.5 delivery is verified.** If delivery is blocked, set `blocked` (not
114
+ `done`) with the remaining step — never mark an undelivered change `done`.
115
+
116
+ ```sql
117
+ SELECT submit_implementation_report('<id>'::uuid,
118
+ '{"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
119
+ );
120
+
121
+ SELECT update_work_item_status('<id>'::uuid, 'review',
122
+ '["Fixed via rdc:fixit; ready for validation"]'::jsonb,
123
+ '<agent-session-id>',
124
+ 'agent'
125
+ );
126
+
127
+ SELECT update_work_item_status('<id>'::uuid, 'done',
128
+ '["Validator verified rdc:fixit report, CodeFlow post, and checklist evidence"]'::jsonb,
129
+ '<validator-session-id>',
130
+ 'validator'
131
+ );
132
+ ```
133
+
134
+ ```bash
135
+ rm {USER_HOME}/.claude/fixit.marker
136
+ ```
137
+
138
+ ### 7. Confirm to user
139
+
140
+ Report: what was fixed, file(s) changed, commit hash. One sentence.
141
+
142
+ ## Rules
143
+ - Work item created BEFORE any code change — never after
144
+ - `git add` specific files only — never `-A` or `.` for a fixit
145
+ - Branch: development branch always
146
+ - Never run `pnpm build` — not needed for a fixit
147
+ - If scope expands mid-fix: stop, escalate to rdc:build, don't finish under fixit
148
+ - Marker file must be cleaned up whether fix succeeds or escalates
149
+ - **Done = delivered, not committed.** Live where consumed (published/deployed/landed) +
150
+ verified. A version bump obligates a publish. Can't deliver in-session → `blocked`, never `done`.