@lifeaitools/rdc-skills 0.35.7 → 0.35.9

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.
@@ -1,144 +0,0 @@
1
- ---
2
- name: prototype
3
- description: rdc:prototype (description) — build a JSX/TSX mockup for visual review
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
-
13
- # rdc:prototype — Prototype Builder
14
-
15
- ## When to Use
16
-
17
- - Project lead wants to see a design before committing to implementation
18
- - A new component or page needs visual review before wiring to database
19
- - Testing a data layout or interaction pattern
20
- - Building a visual mockup for approval
21
-
22
- ## What This Produces
23
-
24
- - JSX/TSX prototype file → `docs/source/<ComponentName>.jsx`
25
- - prototype_registry entry in database
26
- - design_context entries for key decisions
27
-
28
- ## Prototype Rules
29
-
30
- 1. **Self-contained** — no real database calls. Mock data arrays only.
31
- 2. **Realistic data** — mock data must reflect actual schema field names
32
- 3. **Full fidelity** — looks exactly like the final product should look
33
- 4. **Annotated** — key design decisions commented at the top of the file
34
- 5. **Handoff-ready** — includes the spec block at the bottom
35
-
36
- ## Standard Mock Data Pattern
37
-
38
- Use realistic field names from the actual database schema:
39
-
40
- ```tsx
41
- // Mock data — mirrors your_table
42
- const MOCK_DATA = [
43
- {
44
- id: "uuid-1",
45
- slug: "example-slug",
46
- name: "Example Name",
47
- description: "...",
48
- location_city: "City",
49
- location_state: "State",
50
- status: "active",
51
- category: "example-category",
52
- total_capital: 1000000,
53
- total_area: 2400,
54
- deploy_url: "https://...",
55
- tags: ["tag1", "tag2"],
56
- alignment: ["value1", "value2"],
57
- web_visible: true,
58
- ticker_label: "LABEL",
59
- ticker_capital: "$1M",
60
- scores: { field1: 82, field2: 71, field3: 68 },
61
- },
62
- ];
63
- ```
64
-
65
- ## File Header Template
66
-
67
- ```tsx
68
- /**
69
- * <ComponentName>.jsx — PROTOTYPE
70
- * ─────────────────────────────────────────────
71
- * Status: Prototype — reference only, not production code
72
- * Created: <date>
73
- * Route (production target): <app-route>
74
- *
75
- * Key design decisions:
76
- * 1. <Decision and rationale>
77
- * 2. <Decision and rationale>
78
- *
79
- * What to preserve in production:
80
- * - <Design element>
81
- * - <Interaction pattern>
82
- *
83
- * What production implementation must do differently:
84
- * - Replace mock data with database query
85
- * - Import <Component> from @regen/ui instead of inline implementation
86
- * - Extract <Part> into shared component at src/components/<name>
87
- *
88
- * Production agent type: frontend | backend | data | viz
89
- * Production guide: .rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md)
90
- */
91
- ```
92
-
93
- ## File Footer Template
94
-
95
- ```tsx
96
- // ─── HANDOFF SPEC ─────────────────────────────
97
- // Production files:
98
- // apps/<app>/src/app/<route>/page.tsx (server component)
99
- // apps/<app>/src/app/<route>/<Name>Client.tsx (client component)
100
- // apps/<app>/src/app/<route>/<Name>Wrapper.tsx (modal/state shell, if needed)
101
- //
102
- // Design system components to use (do not re-implement):
103
- // <ComponentName> — <what it does>
104
- //
105
- // Database tables:
106
- // <table> — <what to query>
107
- //
108
- // Form field schema additions needed:
109
- // <table>.<column> — <input_type> — <label>
110
- ```
111
-
112
- ## After Building — Register and Record
113
-
114
- ```sql
115
- -- Register prototype
116
- INSERT INTO prototype_registry (name, component, source_path, notes, created_by)
117
- VALUES (
118
- '<Name> Prototype v1',
119
- '<ComponentName>',
120
- 'docs/source/<ComponentName>.jsx',
121
- '<One-line description of key design: layout, data shape, interactions>',
122
- 'planning'
123
- );
124
-
125
- -- Record design decisions
126
- INSERT INTO design_context (topic, context_type, summary, source, created_by)
127
- VALUES
128
- ('<Topic>', 'prototype', 'Prototype built with <X> layout and <Y> interaction pattern', 'planning', 'planning'),
129
- ('<Topic>', 'decision', '<Key decision made during prototyping and why>', 'planning', 'planning');
130
- ```
131
-
132
- ## Handoff
133
-
134
- After prototype is approved, use `rdc:handoff` to create the plan doc and database work items.
135
-
136
- Or tell the project lead:
137
- ```
138
- Prototype complete.
139
- File: docs/source/<ComponentName>.jsx
140
- Registered: prototype_registry
141
-
142
- To hand off to CLI build: use /rdc:handoff
143
- To build immediately: use /rdc:build
144
- ```
@@ -1,60 +0,0 @@
1
- ---
2
-
3
- description: rdc:release (repo, [version]) - [--patch, --minor, --major, --dry-run] — bump, tag, publish and verify a package
4
- ---
5
-
6
- # rdc:release — Generic Release
7
-
8
- > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
9
- > Checklist-only output. No raw git/npm/CI dumps.
10
- > One checklist upfront, updated in place, shown again at end with 1-line verdict.
11
-
12
- ## Checklist
13
-
14
- ```
15
- rdc:release: <repo> vX.Y.Z -> vA.B.C
16
- [ ] Source path resolved
17
- [ ] Release metadata read
18
- [ ] Working tree clean or user-approved dirty scope identified
19
- [ ] Current version detected
20
- [ ] New version computed
21
- [ ] Dry-run gate handled
22
- [ ] Version files updated
23
- [ ] Tests/self-test passed
24
- [ ] Commit created
25
- [ ] Tag created
26
- [ ] Branch and tag pushed
27
- [ ] CI/publish status verified
28
- [ ] Registry/package/deploy target shows vA.B.C, if applicable
29
- [ ] Local install/update executed, if applicable
30
- [ ] Installed/runtime version verified
31
- [ ] Smoke test passed
32
- ✅ rdc:release <repo>: vA.B.C live and verified
33
- ```
34
-
35
- ## Rules
36
-
37
- - Do not release without explicit user authorization.
38
- - Prefer repo-local release instructions in `.rdc/release.json`, README, package scripts, or CI workflows.
39
- - Never force push or bypass hooks.
40
- - Never declare success without verifying the installed or deployed version.
41
-
42
- For a `package`-class target that already resolves through `rdc-harness`
43
- (a real monorepo subtree, not a standalone repo like this one), its
44
- `packages/deploy/src/runners/registry-release.mjs` runner already proves the
45
- "Tests/self-test passed" through "Local install/update executed" steps
46
- safely — real `npm pack`, isolated-prefix install (never the real global
47
- store), real verify, and `--live` explicitly gates the actual publish. Where
48
- applicable, `node C:/Dev/rdc-harness/bin/rdc-harness.mjs deploy <slug>
49
- [--live]` can supply those checklist rows' evidence directly instead of
50
- hand-rolling the same pack/install/verify cycle. This does not replace
51
- version bump/tag/push — the harness CLI does neither.
52
-
53
- ## RDC Skills Package
54
-
55
- After publishing this package to npm, a clean-box install should use:
56
-
57
- ```bash
58
- npm install -g @lifeaitools/rdc-skills@latest
59
- rdc-skills-install --profile core
60
- ```
@@ -1,98 +0,0 @@
1
- ---
2
- name: report
3
- description: rdc:report () — write the session summary to .rdc/reports/
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
-
13
- # rdc:report — Nightly Report
14
-
15
- ## When to Use
16
- - End of a build session
17
- - Project lead asks for a report or summary
18
- - Nightly scheduled task
19
- - Before handing off to another session
20
- - Called by `rdc:overnight` at the end of every session
21
-
22
- ## Arguments
23
- - `rdc:report` — interactive, prints summary to conversation
24
- - `rdc:report --unattended` — silent mode, writes file only, returns status block
25
-
26
- ## Procedure
27
-
28
- 1. **Query completed work (last 24h or since last report):**
29
- ```sql
30
- SELECT title, labels, completed_at, notes
31
- FROM work_items
32
- WHERE completed_at > now() - interval '24 hours'
33
- ORDER BY completed_at;
34
- ```
35
-
36
- 2. **Query open work:**
37
- ```sql
38
- SELECT title, status, priority, labels
39
- FROM work_items
40
- WHERE status IN ('todo', 'in_progress', 'blocked')
41
- ORDER BY priority, created_at;
42
- ```
43
-
44
- 3. **Git stats (since last report or last 24h):**
45
- ```bash
46
- git log --since="24 hours ago" --shortstat --oneline
47
- git diff --shortstat HEAD~N # where N = commits in window
48
- ```
49
-
50
- 4. **Infrastructure deployment snapshot** (if MCP available):
51
- - List all apps with current status
52
- - Flag any failures
53
-
54
- 5. **Write report** to `.rdc/reports/YYYY-MM-DD.md` (fallback: `.rdc/reports/YYYY-MM-DD.md` if `.rdc/` does not exist):
55
- ```markdown
56
- # Daily Report — YYYY-MM-DD
57
-
58
- ## Completed Today
59
- | Item | Project | Priority |
60
-
61
- ## Git Activity
62
- - Commits: N
63
- - Files changed: N
64
- - Lines: +N / -N
65
-
66
- ## Open Work
67
- ### Urgent (N)
68
- ### High (N)
69
- ### Normal (N)
70
-
71
- ## Deployment Status
72
- | App | Domain | Status |
73
-
74
- ## Blockers
75
- <any blocked items or failed deploys>
76
-
77
- ## Next Session Recommendation
78
- <highest priority unstarted work>
79
- ```
80
-
81
- 6. **Check if weekly rollup needed** (if today is Sunday):
82
- - Aggregate daily reports for the week
83
- - Write `.rdc/reports/week-YYYY-WNN.md` (fallback: `.rdc/reports/week-YYYY-WNN.md`)
84
-
85
- 7. **Report results:**
86
- - Interactive: print summary to conversation
87
- - Unattended: no interactive output, emit status block only:
88
- ```
89
- REPORT_STATUS: { report_path, completed_count, open_count, blockers_count }
90
- ```
91
-
92
- ## Rules
93
- - Reports go in `.rdc/reports/` (fallback: `.rdc/reports/`) — create dir if missing
94
- - One report per day — overwrite if re-run same day
95
- - Keep under 100 lines — scannable, not exhaustive
96
- - Include links to relevant CLAUDE.md files where helpful
97
- - Always end with "Next Session Recommendation"
98
- - Unattended: NEVER print to conversation — write file only
@@ -1,15 +0,0 @@
1
- ---
2
- name: review
3
- description: rdc:review () - [--unattended] — post-build gate over tsc, tests, docs and code review
4
- ---
5
-
6
- # review
7
-
8
- Use Skill tool with skill: "review", passing `--unattended` through if given.
9
-
10
- > This file previously carried a full duplicate of the procedure now owned by
11
- > `skills/review/SKILL.md`. The two drifted — this copy was missing the
12
- > mandatory code-review gate (step 8b) and the `engineering-behavior.md` read
13
- > that the other had. One home for the content closes that class of bug
14
- > permanently rather than requiring the next editor to remember to update
15
- > both.
@@ -1,112 +0,0 @@
1
- ---
2
- name: self-test
3
- description: rdc:self-test () - [--strict] — validate every rdc skill, the manifest and tooling
4
- ---
5
-
6
- > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
7
- > Checklist-only output. No tool-call narration. No raw runner dumps — summarize.
8
- > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
9
-
10
-
11
- # rdc:self-test — Skill Library Self-Test (Tier 1)
12
-
13
- ## When to Use
14
- - Before every `rdc:release rdc-skills` tag push
15
- - After editing any skill description or frontmatter
16
- - When a skill mysteriously disappears from the menu (backtick bug repro)
17
- - In CI on every rdc-skills PR (once wired)
18
-
19
- ## Tiers
20
-
21
- | Tier | What it checks | Status |
22
- |------|----------------|--------|
23
- | Tier 1 | Static lint — frontmatter, Usage line, referenced files, name match | ✅ live |
24
- | Tier 2 | Behavioral — headless Claude or Codex runs each skill in sandbox, asserts artifacts | ✅ live — 30 manifests; acceptance harness records transcripts, tool calls, artifacts, and lessons learned |
25
- | Tier 3 | Golden checklists — snapshot output format, regress on drift | 🔒 future |
26
-
27
- ## Procedure (Tier 1)
28
-
29
- 1. **Run the linter:**
30
- ```bash
31
- node {RDC_SKILLS_ROOT}/scripts/self-test.mjs
32
- ```
33
-
34
- 2. **Interpret exit codes:**
35
- - `0` = all skills pass
36
- - `1` = at least one FAIL or (in `--strict` mode) at least one WARN
37
- - `2` = runner itself crashed (e.g., skills dir unreadable)
38
- - `3` = `.claude-plugin/plugin.json` missing entirely (distinct from skill failures)
39
-
40
- 3. **Common findings and fixes:**
41
-
42
- | Finding code | Cause | Fix |
43
- |---|---|---|
44
- | `description-backtick-leading` | Folded YAML starts with `` ` `` — parser drops skill | Rewrite description to start with a word |
45
- | `usage-marker-missing` | No `` Usage `rdc:name <args>` `` in description | Front-load arg contract |
46
- | `usage-marker-mismatch` | `Usage` line references a different skill's name (copy-paste drift) | Fix the skill name in the Usage marker |
47
- | `name-filename-mismatch` | frontmatter `name:` ≠ filename | `--fix` auto-renames; or rewrite name |
48
- | `guide-not-found` / `rule-not-found` / `hook-not-found` | Dead reference in skill body | Create file or fix link |
49
- | `banner-missing` | Skill missing OUTPUT CONTRACT banner | `--fix` auto-inserts |
50
- | `manifest-missing` / `manifest-version-mismatch` | `.claude-plugin/plugin.json` missing or out-of-sync with `package.json` | Create/update manifest |
51
- | `duplicate-skill-name` / `skill-guide-filename-collision` | Two skills claim same name, or skill collides with agent guide | Rename one |
52
- | `orphan-hook` | File under `hooks/` isn't referenced by any skill, settings.json, or plugin.json | Wire it up or delete |
53
-
54
- 4. **Flags:**
55
- - `--strict` — promotes warnings to failures (use in CI and before release)
56
- - `--skill <name>` — run against a single skill (e.g. `--skill rdc:build`)
57
- - `--json` — machine-readable schema v2 (per-skill `findings[]` with `code` + `level`, plugin_manifest block, global_findings, summary.exit_code). Consumed by Tier 2 runner as pre-gate.
58
- - `--fix` — auto-repair fixable findings: insert missing OUTPUT CONTRACT banner, rename files to match frontmatter name. Prints `FIXED:` lines + touched file list so you can git diff + commit. Backtick-leading descriptions are NOT auto-fixed (need human rewrite).
59
-
60
- 5. **Report to the project lead:**
61
- ```
62
- Self-test: X/Y pass, Z warnings, W failures
63
- Failures: <list>
64
- Verdict: PASS | FAIL
65
- ```
66
-
67
- ## Procedure (Tier 2)
68
-
69
- Tier 2 runs each skill end-to-end in an isolated sandbox and asserts on observed state (files touched, commits made, work items, exit code). Build acceptance additionally records all observable engine events/tool calls, assistant output, stdout/stderr artifacts, lessons learned, and next build optimizations. It supports `--engine claude` and `--engine codex`; both engines use the same manifests, worktree sandbox, JSONL evidence, and Markdown report. Use it before shipping behavioral changes — Tier 1 alone can't catch runtime drift.
70
-
71
- 1. **Prerequisites:**
72
- - `claude` CLI on PATH for Claude runs (headless mode: `claude --print`)
73
- - `codex` CLI on PATH for Codex runs (headless mode: `codex exec --json`)
74
- - clauth daemon unlocked (`curl -s http://127.0.0.1:52437/ping`)
75
- - Supabase MCP reachable (runner creates a throwaway test branch)
76
- - Clean git tree in `rdc-skills` (worktrees are added under `.rdc/sandbox/<run-id>/`)
77
-
78
- 2. **Run:**
79
- ```bash
80
- node scripts/self-test.mjs --tier2 # all skills with manifests
81
- node scripts/self-test.mjs --tier2 --skill rdc:build # single skill
82
- node scripts/self-test.mjs --tier2 --parallel 3 # up to 3 skills in parallel
83
- node scripts/self-test.mjs --tier2 --quick # skip long-running assertions
84
- node scripts/acceptance.mjs --skill rdc:build # build acceptance with JSONL/tool-call evidence
85
- node scripts/acceptance.mjs --engine codex --skill rdc:build
86
- ```
87
-
88
- 3. **What it does:**
89
- - Runs Tier 1 as a pre-gate (fails fast if static lint fails)
90
- - Creates one Supabase test branch for the run
91
- - For each skill: `git worktree add` into `.rdc/sandbox/<run-id>/<skill>/`, sets `RDC_TEST=1`, invokes the selected headless engine with the skill prompt, waits for exit
92
- - Asserts per the skill's manifest: exit code, files touched, commits made, stdout patterns
93
- - Build acceptance writes JSONL evidence and extracts tool calls from the engine stream
94
- - Cleans up worktrees + deletes the Supabase branch at the end (even on failure)
95
-
96
- 4. **Reports:**
97
- - `.rdc/reports/self-test-tier2-<iso>.json` — full per-skill result, findings, timings
98
- - `.rdc/reports/acceptance-*.jsonl` and `.rdc/reports/acceptance-*.md` — build acceptance evidence, transcript artifact pointers, lessons learned, and next build optimizations
99
- - Exit codes: `0` pass, `1` fail (one or more skills failed assertions), `2` runner error (couldn't set up sandbox / branch)
100
-
101
- 5. **Adding a new manifest:**
102
- - Create `skills/tests/<skill>.test.json` (one per skill, colocated)
103
- - Validate the shape against the schema at `scripts/lib/manifest-schema.mjs`
104
- - Test it in isolation: `node scripts/self-test.mjs --tier2 --skill rdc:name`
105
- - Commit the manifest alongside any skill body changes
106
-
107
- ## Rules
108
- - Run Tier 1 **before every `rdc:release rdc-skills`** — it catches the backtick-drift class of bugs that break the skill menu silently.
109
- - Use `--strict` in CI. Warnings matter in the release path.
110
- - Do NOT skip findings by relaxing the linter. Fix the skill.
111
- - Run Tier 2 before tagging a release. Gate the tag if any manifested skill fails.
112
- - Headless sessions must not steal focus. The runner uses hidden process launch options where supported; if windows flash or focus is grabbed, inspect `scripts/lib/runner.mjs` before changing skill behavior.
@@ -1,85 +0,0 @@
1
- ---
2
- name: status
3
- description: rdc:status () — snapshot open epics, health, blockers and next action
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
-
13
- # rdc:status — Project Dashboard
14
-
15
- ## When to Use
16
- - Start of any session
17
- - Project lead asks "what's the status", "where are we", "what's open"
18
- - Before deciding what to work on next
19
-
20
- ## Procedure
21
-
22
- 1. **Open epics:**
23
- ```sql
24
- SELECT get_open_epics();
25
- ```
26
-
27
- 2. **Work item counts by status:**
28
- ```sql
29
- SELECT status, count(*) FROM work_items
30
- WHERE status != 'archived'
31
- GROUP BY status ORDER BY status;
32
- ```
33
-
34
- 3. **Items by label/project (top 10 labels):**
35
- ```sql
36
- SELECT unnest(labels) as label, count(*),
37
- count(*) FILTER (WHERE status = 'done') as done,
38
- count(*) FILTER (WHERE status = 'todo') as todo,
39
- count(*) FILTER (WHERE status = 'in_progress') as wip
40
- FROM work_items
41
- GROUP BY label ORDER BY count DESC LIMIT 10;
42
- ```
43
-
44
- 4. **Recent activity (last 48 hours):**
45
- ```sql
46
- SELECT title, status, updated_at
47
- FROM work_items
48
- WHERE updated_at > now() - interval '48 hours'
49
- ORDER BY updated_at DESC LIMIT 15;
50
- ```
51
-
52
- 5. **Git status:**
53
- ```bash
54
- git log --oneline -10
55
- git status
56
- git branch -v
57
- ```
58
-
59
- 6. **Infrastructure health** (if MCP available):
60
- - Get infrastructure overview or diagnose issues
61
- - Report any apps with failed builds or down containers
62
-
63
- 7. **Present as a compact dashboard:**
64
- ```
65
- ## Open Epics (N)
66
- <table>
67
-
68
- ## Work Items: X done | Y todo | Z in_progress
69
-
70
- ## Recent (48h)
71
- <list>
72
-
73
- ## Deployments
74
- <green/red/yellow status>
75
-
76
- ## Recommended Next
77
- <highest priority unstarted epic>
78
- ```
79
-
80
- ## Rules
81
- - Keep output concise — this is a glance, not a deep dive
82
- - Always end with a recommendation for what to work on next
83
- - After the Recommended Next section, suggest which guide file from `.rdc/guides/` (fallback: `.rdc/guides/`) the recommended work would need
84
- - Use database MCP for queries (not raw curl)
85
- - If infrastructure MCP is unavailable, skip deployment status and note it
package/commands/watch.md DELETED
@@ -1,97 +0,0 @@
1
- ---
2
- name: watch
3
- description: rdc:watch () — open a live session-log viewer and report its path
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
-
13
- # rdc:watch — Session Log Watcher
14
-
15
- ## When to Use
16
- - Start of any long-running session where Dave needs visibility into what you're doing
17
- - Before `rdc:overnight`, `rdc:build` on a large epic, or any multi-hour grind
18
- - Anytime the user asks for "a log", "a viewer", "tail", or "what are you doing right now"
19
-
20
- ## Procedure
21
-
22
- 1. **Initialize the log and viewer.** Run the helper script from the plugin directory in the user's current project:
23
- ```bash
24
- node ${CLAUDE_PLUGIN_ROOT}/scripts/watch-init.mjs
25
- ```
26
- (If `CLAUDE_PLUGIN_ROOT` is not set, resolve the plugin path from your invocation context or the installed plugin cache.)
27
-
28
- 2. **Parse the output.** The script prints `run_id`, `log_path`, `current`, `viewer`, and `open_hint`. Capture `log_path` and `viewer` for the rest of the session.
29
-
30
- 3. **Open the viewer in the browser, unless running under `RDC_TEST=1`.**
31
- - Normal attended use: run the exact `open_hint` line from the script output. On Windows that's `start "" "<viewer-path>"`.
32
- - `RDC_TEST=1`: do not run `open_hint`, `start`, `open`, `xdg-open`, or any focus/window API. Report the viewer path only.
33
-
34
- 4. **Report to the user.** One line:
35
- ```
36
- watcher live at <viewer-path> — tailing <log-path>
37
- ```
38
- In `RDC_TEST=1`, say:
39
- ```
40
- watcher initialized at <viewer-path> — not opened because RDC_TEST=1
41
- ```
42
-
43
- 5. **Append one line per substantive action for the rest of the session.** Use the documented format — one line, no multi-line payloads:
44
- ```
45
- [<ISO-timestamp>] [<kind>] <message>
46
- ```
47
- Append to BOTH `<log-path>` (the full history) AND `current.log` (what the viewer polls). The viewer diffs `current.log` by length and only appends new lines.
48
-
49
- ### Log format
50
-
51
- - `ISO-timestamp` — `new Date().toISOString()`
52
- - `kind` — one of: `dispatch`, `commit`, `test`, `error`, `note`, `banner`
53
- - `message` — single line, no newlines. Keep under ~200 chars.
54
-
55
- ### Kinds
56
-
57
- | Kind | When to append |
58
- |------|----------------|
59
- | `dispatch` | About to dispatch a subagent — include role + epic/task id |
60
- | `commit` | After a git commit lands — include short sha + subject |
61
- | `test` | Test run kicked off or result came back |
62
- | `error` | Anything that failed — include what and why in one line |
63
- | `note` | General progress ticks (reading files, analyzing, planning) |
64
- | `banner` | Session start/end markers, major phase changes |
65
-
66
- ### Examples
67
-
68
- ```
69
- [2026-04-15T23:14:02.318Z] [dispatch] frontend agent → epic abc123 task 4 (rebuild DynamicForm)
70
- [2026-04-15T23:17:41.902Z] [commit] 3f2a1b9 feat(marketing-engine): DynamicForm rhf+zod
71
- [2026-04-15T23:18:05.113Z] [test] pnpm --filter @regen/rdc-marketing-engine test
72
- [2026-04-15T23:18:41.002Z] [error] tsc: src/components/Form.tsx:42 — Property 'foo' does not exist
73
- [2026-04-15T23:19:00.000Z] [note] retrying with corrected type import
74
- [2026-04-15T23:45:10.000Z] [banner] Phase 2 complete — moving to review
75
- ```
76
-
77
- ### Appending from bash (Windows-safe)
78
-
79
- ```bash
80
- printf '[%s] [%s] %s\n' "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" "dispatch" "your message" >> "$LOG_PATH"
81
- printf '[%s] [%s] %s\n' "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" "dispatch" "your message" >> "$CURRENT_PATH"
82
- ```
83
-
84
- Or from Node:
85
- ```js
86
- import { appendFileSync } from "node:fs";
87
- const line = `[${new Date().toISOString()}] [note] ${msg}\n`;
88
- appendFileSync(logPath, line);
89
- appendFileSync(currentPath, line);
90
- ```
91
-
92
- ## Notes
93
-
94
- - Log files live in the **user's project**, not the rdc-skills repo. Path: `<projectRoot>/.rdc/session-log/`
95
- - Each invocation creates a **new run id** and overwrites `current.log`. Prior run logs remain on disk as `<runId>.log`.
96
- - The viewer is a single static HTML file polling `current.log` via `fetch()` every 2s — no server, no deps.
97
- - This skill does NOT replace `rdc:report` (the end-of-session Obsidian writeup). It's a live tail for attended or semi-attended sessions.