@lifeaitools/rdc-skills 0.21.0 → 0.21.1

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 (47) hide show
  1. package/.claude-plugin/plugin.json +18 -2
  2. package/.github/workflows/self-test.yml +34 -34
  3. package/commands/build.md +181 -181
  4. package/commands/collab.md +180 -180
  5. package/commands/deploy.md +148 -148
  6. package/commands/fixit.md +105 -105
  7. package/commands/handoff.md +173 -173
  8. package/commands/overnight.md +218 -218
  9. package/commands/plan.md +158 -158
  10. package/commands/preplan.md +131 -131
  11. package/commands/prototype.md +145 -145
  12. package/commands/report.md +99 -99
  13. package/commands/review.md +120 -120
  14. package/commands/status.md +86 -86
  15. package/commands/workitems.md +127 -127
  16. package/git-sha.json +1 -1
  17. package/guides/agent-bootstrap.md +195 -195
  18. package/guides/agents/backend.md +102 -102
  19. package/guides/agents/content.md +94 -94
  20. package/guides/agents/cs2.md +56 -56
  21. package/guides/agents/data.md +86 -86
  22. package/guides/agents/design.md +77 -77
  23. package/guides/agents/frontend.md +91 -91
  24. package/guides/agents/infrastructure.md +81 -81
  25. package/guides/agents/setup.md +272 -272
  26. package/guides/agents/verify.md +119 -119
  27. package/guides/agents/viz.md +106 -106
  28. package/package.json +1 -1
  29. package/scripts/self-test.mjs +1458 -1458
  30. package/skills/build/SKILL.md +478 -478
  31. package/skills/channel-formatter/SKILL.md +14 -1
  32. package/skills/collab/SKILL.md +239 -239
  33. package/skills/deploy/SKILL.md +522 -522
  34. package/skills/design/SKILL.md +205 -205
  35. package/skills/fixit/SKILL.md +165 -165
  36. package/skills/handoff/SKILL.md +200 -200
  37. package/skills/overnight/SKILL.md +230 -230
  38. package/skills/plan/SKILL.md +274 -274
  39. package/skills/preplan/SKILL.md +90 -90
  40. package/skills/prototype/SKILL.md +150 -150
  41. package/skills/release/SKILL.md +140 -140
  42. package/skills/report/SKILL.md +100 -100
  43. package/skills/review/SKILL.md +152 -152
  44. package/skills/self-test/SKILL.md +123 -123
  45. package/skills/status/SKILL.md +99 -99
  46. package/skills/watch/SKILL.md +90 -90
  47. package/skills/workitems/SKILL.md +151 -151
@@ -1,140 +1,140 @@
1
- ---
2
- name: rdc:release
3
- description: "Usage `rdc:release <repo> [version|--patch|--minor|--major|--dry-run]` — bump, commit, tag, push, wait for CI/publish, install, and verify a package or project using repo-local release metadata."
4
- ---
5
-
6
- > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
7
- > Checklist-only output. No tool-call narration. No raw git/npm/CI dumps.
8
- > One checklist upfront, updated in place, shown again at end with 1-line verdict.
9
-
10
- > **Sandbox contract:** This skill honors `RDC_TEST=1` per `guides/agent-bootstrap.md` § RDC_TEST Sandbox Contract. Destructive external calls short-circuit under the flag.
11
-
12
- # rdc:release — Generic Release
13
-
14
- ## When to Use
15
-
16
- - The user explicitly asks to release, publish, promote, ship, tag, or bump a repo.
17
- - A package or app needs versioning plus verification.
18
- - A repo provides release metadata in `package.json`, `.rdc/release.json`, README release instructions, or CI config.
19
-
20
- Never release without explicit user authorization.
21
-
22
- ## Inputs
23
-
24
- - `rdc:release <repo>` — patch release by default.
25
- - `rdc:release <repo> <version>` — explicit version.
26
- - `rdc:release <repo> --patch|--minor|--major`
27
- - `rdc:release <repo> --dry-run`
28
-
29
- If `<repo>` is not resolvable from the current workspace, ask for its local path or GitHub slug.
30
-
31
- ## Checklist
32
-
33
- ```
34
- rdc:release: <repo> vX.Y.Z -> vA.B.C
35
- [ ] PUBLISH.md status gate: status=active AND prod in environments (block if not)
36
- [ ] Source path resolved
37
- [ ] Release metadata read
38
- [ ] Working tree clean or user-approved dirty scope identified
39
- [ ] Current version detected
40
- [ ] New version computed
41
- [ ] Dry-run gate handled
42
- [ ] Version files updated
43
- [ ] Tests/self-test passed
44
- [ ] Mandatory release code-review (pr-review-toolkit:code-reviewer on `git diff <last-released-tag>..HEAD`). Block release on `critical`/`high` findings; record `medium`/`low` in the release notes and proceed.
45
- [ ] Commit created
46
- [ ] Tag created
47
- [ ] Branch and tag pushed
48
- [ ] CI/publish status verified
49
- [ ] Registry/package/deploy target shows vA.B.C, if applicable
50
- [ ] Local install/update executed, if applicable
51
- [ ] Installed/runtime version verified
52
- [ ] Smoke test passed
53
- ✅ rdc:release <repo>: vA.B.C live and verified
54
- ```
55
-
56
- ## PUBLISH.md Status Gate (Step 0 — before any production-touching step)
57
-
58
- Before touching any production system, read `PUBLISH.md` from the app root and validate promotion eligibility.
59
-
60
- ```bash
61
- PUBLISH_MD="<monorepo_path>/PUBLISH.md"
62
- ```
63
-
64
- **Block promotion if ANY of the following are true:**
65
-
66
- 1. **PUBLISH.md is missing AND the app has a row in `app_deployments`** — emit warn and continue (during rollout period); becomes a hard block after Option A rollout is complete.
67
- 2. **PUBLISH.md exists AND `status` field is NOT `active`** — hard block regardless of rollout status.
68
- - `status: draft` → `BLOCKED: PUBLISH.md status=draft for <slug> — promote requires status=active`
69
- - `status: deprecated` → `BLOCKED: PUBLISH.md status=deprecated for <slug> — promote requires status=active`
70
- 3. **PUBLISH.md exists AND `environments` array does not include `prod`** → `BLOCKED: PUBLISH.md environments=[dev] for <slug> — prod must be declared before promotion`
71
- 4. **Any required surface field is missing** (`source_dir` or `path` absent on any surface) → `BLOCKED: PUBLISH.md surface <id> missing required field for <slug>`
72
-
73
- If blocked, abort immediately with the message above. Do NOT proceed to the version bump, commit, or any Coolify call.
74
-
75
- If PUBLISH.md is absent and app has no `app_deployments` row (library/package), skip this gate.
76
-
77
- ## Resolution Order
78
-
79
- 1. Current repo if `<repo>` is `.` or omitted and the user clearly refers to the current workspace.
80
- 2. Sibling directory matching `<repo>`.
81
- 3. GitHub slug `<owner>/<repo>`.
82
- 4. Repo-local `.rdc/release.json` if present.
83
- 5. Ask for the missing path or release mechanism.
84
-
85
- ## Generic Commands
86
-
87
- Use repo-local package tooling when available. Examples:
88
-
89
- ```bash
90
- npm version patch --no-git-tag-version
91
- npm test
92
- git add package.json package-lock.json
93
- git commit -m "chore(release): vA.B.C"
94
- git tag vA.B.C
95
- git push origin HEAD
96
- git push origin vA.B.C
97
- npm view <package-name> version
98
- ```
99
-
100
- Never use `--force` or bypass hooks. If a hook fails, fix the cause.
101
-
102
- ## ⛔ Standalone-repo staging guard (no `git add -A`)
103
-
104
- Standalone repos (`rdc-skills`, `clauth`, `build-corpus`) have NO pre-commit
105
- doc-sync/scope guard to catch contamination. In them:
106
-
107
- - **REFUSE `git add -A` / `git add .`.** Stage explicit declared paths only
108
- (`git add skills/<name>/SKILL.md package.json ...`).
109
- - Run `git status --porcelain` FIRST. If untracked files exist that are not part
110
- of the declared change, STOP — list or stash them; do not sweep them in.
111
- - **Pre-tag guard: refuse to tag if `git diff --cached --name-only` includes any
112
- path outside the declared change set.** A broad add swept 4 pre-existing
113
- untracked skill files into a tagged release that CI published before anyone
114
- noticed (lesson 2026-06-08-release-git-add-all-swept-untracked-wip). Same
115
- dirty-tree contamination class as a lockfile generated against a dirty tree.
116
-
117
- ## ⛔ Cross-platform prepack + verify the PUBLISHED tarball
118
-
119
- - **Prepack must be OS-agnostic.** A bash-style `prepack` chain (`node A || true && node B || true && node stamp`) short-circuits under Windows **cmd.exe** (npm runs lifecycle scripts via cmd, not bash; `true` is not a cmd builtin and `||`/`&&` evaluate differently), so an appended step silently never runs (lesson 2026-06-13-release-windows-cmd-prepack-shortcircuit). When a prepack step must run cross-platform, use a node wrapper / `shx` / `cross-env` — never rely on `|| true` shell semantics that differ between cmd and bash.
120
- - **Validate the PUBLISHED artifact, not a local Windows `npm pack`.** A local Windows `npm pack` is NOT a faithful rehearsal of the CI (ubuntu/bash) publish. After publish, verify the real tarball:
121
- ```bash
122
- npm pack <pkg>@<version> # downloads the PUBLISHED tarball
123
- tar -xzOf <pkg>-<version>.tgz package/<file> # inspect the shipped file
124
- ```
125
- Confirm the published artifact carries what CI's prepack was supposed to stamp (e.g. `git_sha == tag commit`).
126
-
127
- ## RDC Skills Package
128
-
129
- For this package, prefer the npm installer binary after publish:
130
-
131
- ```bash
132
- npm install -g @lifeaitools/rdc-skills@latest
133
- rdc-skills-install --profile core
134
- ```
135
-
136
- Use `--profile lifeai` only on a workstation that intentionally has the LIFEAI project layout and services.
137
-
138
- ## Capture lessons (exit step)
139
-
140
- Before the final verdict line, follow `.rdc/guides/lessons-learned-spec.md` § Capture procedure. If this run taught something non-obvious — a first root-cause theory that turned out wrong, the documented/standard path not working, a missing gate or check that cost a round, or a surprising tool/infra behavior — write one `.rdc/lessons/<YYYY-MM-DD>-release-<short-slug>.md` per lesson using the schema in that spec. Set `scope` (`simple` | `architectural`) and `status` (`open`, or `applied` if you shipped the fix in this same run, with the commit linked). Commit the lesson file(s) on `develop` alongside the run's other commits, and note "N lessons captured" in your verdict/summary. A run that taught nothing writes nothing — absence is the default.
1
+ ---
2
+ name: rdc:release
3
+ description: "Usage `rdc:release <repo> [version|--patch|--minor|--major|--dry-run]` — bump, commit, tag, push, wait for CI/publish, install, and verify a package or project using repo-local release metadata."
4
+ ---
5
+
6
+ > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
7
+ > Checklist-only output. No tool-call narration. No raw git/npm/CI dumps.
8
+ > One checklist upfront, updated in place, shown again at end with 1-line verdict.
9
+
10
+ > **Sandbox contract:** This skill honors `RDC_TEST=1` per `guides/agent-bootstrap.md` § RDC_TEST Sandbox Contract. Destructive external calls short-circuit under the flag.
11
+
12
+ # rdc:release — Generic Release
13
+
14
+ ## When to Use
15
+
16
+ - The user explicitly asks to release, publish, promote, ship, tag, or bump a repo.
17
+ - A package or app needs versioning plus verification.
18
+ - A repo provides release metadata in `package.json`, `.rdc/release.json`, README release instructions, or CI config.
19
+
20
+ Never release without explicit user authorization.
21
+
22
+ ## Inputs
23
+
24
+ - `rdc:release <repo>` — patch release by default.
25
+ - `rdc:release <repo> <version>` — explicit version.
26
+ - `rdc:release <repo> --patch|--minor|--major`
27
+ - `rdc:release <repo> --dry-run`
28
+
29
+ If `<repo>` is not resolvable from the current workspace, ask for its local path or GitHub slug.
30
+
31
+ ## Checklist
32
+
33
+ ```
34
+ rdc:release: <repo> vX.Y.Z -> vA.B.C
35
+ [ ] PUBLISH.md status gate: status=active AND prod in environments (block if not)
36
+ [ ] Source path resolved
37
+ [ ] Release metadata read
38
+ [ ] Working tree clean or user-approved dirty scope identified
39
+ [ ] Current version detected
40
+ [ ] New version computed
41
+ [ ] Dry-run gate handled
42
+ [ ] Version files updated
43
+ [ ] Tests/self-test passed
44
+ [ ] Mandatory release code-review (pr-review-toolkit:code-reviewer on `git diff <last-released-tag>..HEAD`). Block release on `critical`/`high` findings; record `medium`/`low` in the release notes and proceed.
45
+ [ ] Commit created
46
+ [ ] Tag created
47
+ [ ] Branch and tag pushed
48
+ [ ] CI/publish status verified
49
+ [ ] Registry/package/deploy target shows vA.B.C, if applicable
50
+ [ ] Local install/update executed, if applicable
51
+ [ ] Installed/runtime version verified
52
+ [ ] Smoke test passed
53
+ ✅ rdc:release <repo>: vA.B.C live and verified
54
+ ```
55
+
56
+ ## PUBLISH.md Status Gate (Step 0 — before any production-touching step)
57
+
58
+ Before touching any production system, read `PUBLISH.md` from the app root and validate promotion eligibility.
59
+
60
+ ```bash
61
+ PUBLISH_MD="<monorepo_path>/PUBLISH.md"
62
+ ```
63
+
64
+ **Block promotion if ANY of the following are true:**
65
+
66
+ 1. **PUBLISH.md is missing AND the app has a row in `app_deployments`** — emit warn and continue (during rollout period); becomes a hard block after Option A rollout is complete.
67
+ 2. **PUBLISH.md exists AND `status` field is NOT `active`** — hard block regardless of rollout status.
68
+ - `status: draft` → `BLOCKED: PUBLISH.md status=draft for <slug> — promote requires status=active`
69
+ - `status: deprecated` → `BLOCKED: PUBLISH.md status=deprecated for <slug> — promote requires status=active`
70
+ 3. **PUBLISH.md exists AND `environments` array does not include `prod`** → `BLOCKED: PUBLISH.md environments=[dev] for <slug> — prod must be declared before promotion`
71
+ 4. **Any required surface field is missing** (`source_dir` or `path` absent on any surface) → `BLOCKED: PUBLISH.md surface <id> missing required field for <slug>`
72
+
73
+ If blocked, abort immediately with the message above. Do NOT proceed to the version bump, commit, or any Coolify call.
74
+
75
+ If PUBLISH.md is absent and app has no `app_deployments` row (library/package), skip this gate.
76
+
77
+ ## Resolution Order
78
+
79
+ 1. Current repo if `<repo>` is `.` or omitted and the user clearly refers to the current workspace.
80
+ 2. Sibling directory matching `<repo>`.
81
+ 3. GitHub slug `<owner>/<repo>`.
82
+ 4. Repo-local `.rdc/release.json` if present.
83
+ 5. Ask for the missing path or release mechanism.
84
+
85
+ ## Generic Commands
86
+
87
+ Use repo-local package tooling when available. Examples:
88
+
89
+ ```bash
90
+ npm version patch --no-git-tag-version
91
+ npm test
92
+ git add package.json package-lock.json
93
+ git commit -m "chore(release): vA.B.C"
94
+ git tag vA.B.C
95
+ git push origin HEAD
96
+ git push origin vA.B.C
97
+ npm view <package-name> version
98
+ ```
99
+
100
+ Never use `--force` or bypass hooks. If a hook fails, fix the cause.
101
+
102
+ ## ⛔ Standalone-repo staging guard (no `git add -A`)
103
+
104
+ Standalone repos (`rdc-skills`, `clauth`, `build-corpus`) have NO pre-commit
105
+ doc-sync/scope guard to catch contamination. In them:
106
+
107
+ - **REFUSE `git add -A` / `git add .`.** Stage explicit declared paths only
108
+ (`git add skills/<name>/SKILL.md package.json ...`).
109
+ - Run `git status --porcelain` FIRST. If untracked files exist that are not part
110
+ of the declared change, STOP — list or stash them; do not sweep them in.
111
+ - **Pre-tag guard: refuse to tag if `git diff --cached --name-only` includes any
112
+ path outside the declared change set.** A broad add swept 4 pre-existing
113
+ untracked skill files into a tagged release that CI published before anyone
114
+ noticed (lesson 2026-06-08-release-git-add-all-swept-untracked-wip). Same
115
+ dirty-tree contamination class as a lockfile generated against a dirty tree.
116
+
117
+ ## ⛔ Cross-platform prepack + verify the PUBLISHED tarball
118
+
119
+ - **Prepack must be OS-agnostic.** A bash-style `prepack` chain (`node A || true && node B || true && node stamp`) short-circuits under Windows **cmd.exe** (npm runs lifecycle scripts via cmd, not bash; `true` is not a cmd builtin and `||`/`&&` evaluate differently), so an appended step silently never runs (lesson 2026-06-13-release-windows-cmd-prepack-shortcircuit). When a prepack step must run cross-platform, use a node wrapper / `shx` / `cross-env` — never rely on `|| true` shell semantics that differ between cmd and bash.
120
+ - **Validate the PUBLISHED artifact, not a local Windows `npm pack`.** A local Windows `npm pack` is NOT a faithful rehearsal of the CI (ubuntu/bash) publish. After publish, verify the real tarball:
121
+ ```bash
122
+ npm pack <pkg>@<version> # downloads the PUBLISHED tarball
123
+ tar -xzOf <pkg>-<version>.tgz package/<file> # inspect the shipped file
124
+ ```
125
+ Confirm the published artifact carries what CI's prepack was supposed to stamp (e.g. `git_sha == tag commit`).
126
+
127
+ ## RDC Skills Package
128
+
129
+ For this package, prefer the npm installer binary after publish:
130
+
131
+ ```bash
132
+ npm install -g @lifeaitools/rdc-skills@latest
133
+ rdc-skills-install --profile core
134
+ ```
135
+
136
+ Use `--profile lifeai` only on a workstation that intentionally has the LIFEAI project layout and services.
137
+
138
+ ## Capture lessons (exit step)
139
+
140
+ Before the final verdict line, follow `.rdc/guides/lessons-learned-spec.md` § Capture procedure. If this run taught something non-obvious — a first root-cause theory that turned out wrong, the documented/standard path not working, a missing gate or check that cost a round, or a surprising tool/infra behavior — write one `.rdc/lessons/<YYYY-MM-DD>-release-<short-slug>.md` per lesson using the schema in that spec. Set `scope` (`simple` | `architectural`) and `status` (`open`, or `applied` if you shipped the fix in this same run, with the commit linked). Commit the lesson file(s) on `develop` alongside the run's other commits, and note "N lessons captured" in your verdict/summary. A run that taught nothing writes nothing — absence is the default.
@@ -1,100 +1,100 @@
1
- ---
2
- name: rdc:report
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
- ---
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
- > 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`).
11
-
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. Git push is skipped under `RDC_TEST=1`.
13
-
14
-
15
- # rdc:report — Nightly Report
16
-
17
- ## When to Use
18
- - End of a build session
19
- - Project lead asks for a report or summary
20
- - Nightly scheduled task
21
- - Before handing off to another session
22
- - Called by `rdc:overnight` at the end of every session
23
-
24
- ## Arguments
25
- - `rdc:report` — interactive, prints summary to conversation
26
- - `rdc:report --unattended` — silent mode, writes file only, returns status block
27
-
28
- ## Procedure
29
-
30
- 1. **Query completed work (last 24h or since last report):**
31
- ```sql
32
- SELECT title, labels, completed_at, notes
33
- FROM work_items
34
- WHERE completed_at > now() - interval '24 hours'
35
- ORDER BY completed_at;
36
- ```
37
-
38
- 2. **Query open work:**
39
- ```sql
40
- SELECT title, status, priority, labels
41
- FROM work_items
42
- WHERE status IN ('todo', 'in_progress', 'blocked')
43
- ORDER BY priority, created_at;
44
- ```
45
-
46
- 3. **Git stats (since last report or last 24h):**
47
- ```bash
48
- git log --since="24 hours ago" --shortstat --oneline
49
- git diff --shortstat HEAD~N # where N = commits in window
50
- ```
51
-
52
- 4. **Infrastructure deployment snapshot** (if MCP available):
53
- - List all apps with current status
54
- - Flag any failures
55
-
56
- 5. **Write report** to `.rdc/reports/YYYY-MM-DD.md` (fallback: `.rdc/reports/YYYY-MM-DD.md` if `.rdc/` does not exist):
57
- ```markdown
58
- # Daily Report — YYYY-MM-DD
59
-
60
- ## Completed Today
61
- | Item | Project | Priority |
62
-
63
- ## Git Activity
64
- - Commits: N
65
- - Files changed: N
66
- - Lines: +N / -N
67
-
68
- ## Open Work
69
- ### Urgent (N)
70
- ### High (N)
71
- ### Normal (N)
72
-
73
- ## Deployment Status
74
- | App | Domain | Status |
75
-
76
- ## Blockers
77
- <any blocked items or failed deploys>
78
-
79
- ## Next Session Recommendation
80
- <highest priority unstarted work>
81
- ```
82
-
83
- 6. **Check if weekly rollup needed** (if today is Sunday):
84
- - Aggregate daily reports for the week
85
- - Write `.rdc/reports/week-YYYY-WNN.md` (fallback: `.rdc/reports/week-YYYY-WNN.md`)
86
-
87
- 7. **Report results:**
88
- - Interactive: print summary to conversation
89
- - Unattended: no interactive output, emit status block only:
90
- ```
91
- REPORT_STATUS: { report_path, completed_count, open_count, blockers_count }
92
- ```
93
-
94
- ## Rules
95
- - Reports go in `.rdc/reports/` (fallback: `.rdc/reports/`) — create dir if missing
96
- - One report per day — overwrite if re-run same day
97
- - Keep under 100 lines — scannable, not exhaustive
98
- - Include links to relevant CLAUDE.md files where helpful
99
- - Always end with "Next Session Recommendation"
100
- - Unattended: NEVER print to conversation — write file only
1
+ ---
2
+ name: rdc:report
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
+ ---
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
+ > 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`).
11
+
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. Git push is skipped under `RDC_TEST=1`.
13
+
14
+
15
+ # rdc:report — Nightly Report
16
+
17
+ ## When to Use
18
+ - End of a build session
19
+ - Project lead asks for a report or summary
20
+ - Nightly scheduled task
21
+ - Before handing off to another session
22
+ - Called by `rdc:overnight` at the end of every session
23
+
24
+ ## Arguments
25
+ - `rdc:report` — interactive, prints summary to conversation
26
+ - `rdc:report --unattended` — silent mode, writes file only, returns status block
27
+
28
+ ## Procedure
29
+
30
+ 1. **Query completed work (last 24h or since last report):**
31
+ ```sql
32
+ SELECT title, labels, completed_at, notes
33
+ FROM work_items
34
+ WHERE completed_at > now() - interval '24 hours'
35
+ ORDER BY completed_at;
36
+ ```
37
+
38
+ 2. **Query open work:**
39
+ ```sql
40
+ SELECT title, status, priority, labels
41
+ FROM work_items
42
+ WHERE status IN ('todo', 'in_progress', 'blocked')
43
+ ORDER BY priority, created_at;
44
+ ```
45
+
46
+ 3. **Git stats (since last report or last 24h):**
47
+ ```bash
48
+ git log --since="24 hours ago" --shortstat --oneline
49
+ git diff --shortstat HEAD~N # where N = commits in window
50
+ ```
51
+
52
+ 4. **Infrastructure deployment snapshot** (if MCP available):
53
+ - List all apps with current status
54
+ - Flag any failures
55
+
56
+ 5. **Write report** to `.rdc/reports/YYYY-MM-DD.md` (fallback: `.rdc/reports/YYYY-MM-DD.md` if `.rdc/` does not exist):
57
+ ```markdown
58
+ # Daily Report — YYYY-MM-DD
59
+
60
+ ## Completed Today
61
+ | Item | Project | Priority |
62
+
63
+ ## Git Activity
64
+ - Commits: N
65
+ - Files changed: N
66
+ - Lines: +N / -N
67
+
68
+ ## Open Work
69
+ ### Urgent (N)
70
+ ### High (N)
71
+ ### Normal (N)
72
+
73
+ ## Deployment Status
74
+ | App | Domain | Status |
75
+
76
+ ## Blockers
77
+ <any blocked items or failed deploys>
78
+
79
+ ## Next Session Recommendation
80
+ <highest priority unstarted work>
81
+ ```
82
+
83
+ 6. **Check if weekly rollup needed** (if today is Sunday):
84
+ - Aggregate daily reports for the week
85
+ - Write `.rdc/reports/week-YYYY-WNN.md` (fallback: `.rdc/reports/week-YYYY-WNN.md`)
86
+
87
+ 7. **Report results:**
88
+ - Interactive: print summary to conversation
89
+ - Unattended: no interactive output, emit status block only:
90
+ ```
91
+ REPORT_STATUS: { report_path, completed_count, open_count, blockers_count }
92
+ ```
93
+
94
+ ## Rules
95
+ - Reports go in `.rdc/reports/` (fallback: `.rdc/reports/`) — create dir if missing
96
+ - One report per day — overwrite if re-run same day
97
+ - Keep under 100 lines — scannable, not exhaustive
98
+ - Include links to relevant CLAUDE.md files where helpful
99
+ - Always end with "Next Session Recommendation"
100
+ - Unattended: NEVER print to conversation — write file only