name: rdc:watch
description: >-
Usage rdc:watch — initialize a session log and open a browser viewer that tails Claude activity live. Zero infra, pure filesystem + static HTML.
⚠️ OUTPUT CONTRACT (READ FIRST):
guides/output-contract.mdChecklist-only output. No tool-call narration. No raw MCP/JSON/log dumps. One checklist upfront, updated in place, shown again at end with a 1-line verdict.
If dispatching subagents or running as a subagent: read
{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.mdfirst (fallback:{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md).
rdc:watch — Session Log Watcher
When to Use
- Start of any long-running session where Dave needs visibility into what you're doing
- Before
rdc:overnight,rdc:buildon a large epic, or any multi-hour grind - Anytime the user asks for "a log", "a viewer", "tail", or "what are you doing right now"
Procedure
-
Initialize the log and viewer. Run the helper script from the plugin directory in the user's current project:
node ${CLAUDE_PLUGIN_ROOT}/scripts/watch-init.mjs(If
CLAUDE_PLUGIN_ROOTis not set, resolve the plugin path from your invocation context. On Windows it's typicallyC:/Dev/rdc-skills.) -
Parse the output. The script prints
run_id,log_path,current,viewer, andopen_hint. Capturelog_pathandviewerfor the rest of the session. -
Open the viewer in the browser. Run the exact
open_hintline from the script output. On Windows that'sstart "" "<viewer-path>". -
Report to the user. One line:
watcher live at <viewer-path> — tailing <log-path> -
Append one line per substantive action for the rest of the session. Use the documented format — one line, no multi-line payloads:
[<ISO-timestamp>] [<kind>] <message>Append to BOTH
<log-path>(the full history) ANDcurrent.log(what the viewer polls). The viewer diffscurrent.logby length and only appends new lines.
Log format
ISO-timestamp—new Date().toISOString()kind— one of:dispatch,commit,test,error,note,bannermessage— single line, no newlines. Keep under ~200 chars.
Kinds
| Kind | When to append |
|---|---|
dispatch | About to dispatch a subagent — include role + epic/task id |
commit | After a git commit lands — include short sha + subject |
test | Test run kicked off or result came back |
error | Anything that failed — include what and why in one line |
note | General progress ticks (reading files, analyzing, planning) |
banner | Session start/end markers, major phase changes |
Examples
[2026-04-15T23:14:02.318Z] [dispatch] frontend agent → epic abc123 task 4 (rebuild DynamicForm)
[2026-04-15T23:17:41.902Z] [commit] 3f2a1b9 feat(marketing-engine): DynamicForm rhf+zod
[2026-04-15T23:18:05.113Z] [test] pnpm --filter @regen/rdc-marketing-engine test
[2026-04-15T23:18:41.002Z] [error] tsc: src/components/Form.tsx:42 — Property 'foo' does not exist
[2026-04-15T23:19:00.000Z] [note] retrying with corrected type import
[2026-04-15T23:45:10.000Z] [banner] Phase 2 complete — moving to review
Appending from bash (Windows-safe)
printf '[%s] [%s] %s\n' "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" "dispatch" "your message" >> "$LOG_PATH"
printf '[%s] [%s] %s\n' "$(date -u +%Y-%m-%dT%H:%M:%S.000Z)" "dispatch" "your message" >> "$CURRENT_PATH"
Or from Node:
import { appendFileSync } from "node:fs";
const line = `[${new Date().toISOString()}] [note] ${msg}\n`;
appendFileSync(logPath, line);
appendFileSync(currentPath, line);
Notes
- Log files live in the user's project, not the rdc-skills repo. Path:
<projectRoot>/.rdc/session-log/ - Each invocation creates a new run id and overwrites
current.log. Prior run logs remain on disk as<runId>.log. - The viewer is a single static HTML file polling
current.logviafetch()every 2s — no server, no deps. - This skill does NOT replace
rdc:report(the end-of-session Obsidian writeup). It's a live tail for attended or semi-attended sessions.