@lifeaitools/rdc-skills 0.35.7 → 0.35.8
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.
- package/.claude-plugin/plugin.json +1 -1
- package/clauth-plugin.json +1 -1
- package/package.json +1 -1
- package/commands/prototype.md +0 -144
- package/commands/report.md +0 -98
- package/commands/self-test.md +0 -112
- package/commands/watch.md +0 -97
- package/commands/workitems.md +0 -148
package/clauth-plugin.json
CHANGED
package/package.json
CHANGED
package/commands/prototype.md
DELETED
|
@@ -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
|
-
```
|
package/commands/report.md
DELETED
|
@@ -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
|
package/commands/self-test.md
DELETED
|
@@ -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.
|
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.
|
package/commands/workitems.md
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: workitems
|
|
3
|
-
description: rdc:workitems ([subcommand]) — create, update and query work items directly
|
|
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:workitems — Work Item Management
|
|
14
|
-
|
|
15
|
-
## Rules
|
|
16
|
-
|
|
17
|
-
1. **Epic first, always.** Never create a task without a parent epic.
|
|
18
|
-
2. **Label everything.** Minimum one system label per item.
|
|
19
|
-
3. **Check first.** `get_open_epics()` before creating anything new.
|
|
20
|
-
4. **Link design docs.** Put `.rdc/plans/` or `.rdc/research/` paths in descriptions (fallback: `.rdc/plans/` / `.rdc/research/`).
|
|
21
|
-
|
|
22
|
-
## Read Epics
|
|
23
|
-
|
|
24
|
-
```sql
|
|
25
|
-
SELECT get_open_epics();
|
|
26
|
-
SELECT get_open_epics('urgent');
|
|
27
|
-
SELECT get_open_epics(p_label_filter := 'custom-label');
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Create Epic
|
|
31
|
-
|
|
32
|
-
```sql
|
|
33
|
-
SELECT insert_work_item(
|
|
34
|
-
p_title := 'EPIC: Clear descriptive title',
|
|
35
|
-
p_description := 'What and why. Reference .rdc/plans/<n>.md if applicable.',
|
|
36
|
-
p_item_type := 'epic',
|
|
37
|
-
p_priority := 'high',
|
|
38
|
-
p_labels := ARRAY['system-label'],
|
|
39
|
-
p_source := 'planning'
|
|
40
|
-
);
|
|
41
|
-
|
|
42
|
-
-- Immediately populate governance refs. architecture_ref stays NULL unless this epic
|
|
43
|
-
-- crosses an architectural boundary (storage authority, process topology, auth boundary,
|
|
44
|
-
-- deployment model, persistence, service ownership, public contract) — setting it holds
|
|
45
|
-
-- every child task for a required architecture-fidelity-* checklist row at close time.
|
|
46
|
-
SELECT set_epic_governance_refs(
|
|
47
|
-
p_epic_id := '<epic-uuid>'::uuid,
|
|
48
|
-
p_plan_ref := '.rdc/plans/<n>.md or NULL',
|
|
49
|
-
p_spec_ref := '.rdc/plans/<n>.md or NULL',
|
|
50
|
-
p_architecture_ref := NULL,
|
|
51
|
-
p_scoping_statement := '<one paragraph: what is in scope and what is explicitly out>'
|
|
52
|
-
);
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
## Create Task
|
|
56
|
-
|
|
57
|
-
```sql
|
|
58
|
-
SELECT insert_work_item(
|
|
59
|
-
p_title := 'Specific actionable task title',
|
|
60
|
-
p_description := 'What: <deliverable>
|
|
61
|
-
Where: <files to create/modify>
|
|
62
|
-
Agent type: frontend | backend | data | design | infra | content | cs2
|
|
63
|
-
Guide: .rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md)
|
|
64
|
-
Design doc: .rdc/plans/<n>.md (fallback: .rdc/plans/<n>.md, if exists)
|
|
65
|
-
Depends on: <other task title if sequential>
|
|
66
|
-
Est: <hours>',
|
|
67
|
-
p_parent_id := '<epic-uuid>'::uuid,
|
|
68
|
-
p_item_type := 'task',
|
|
69
|
-
p_priority := 'high',
|
|
70
|
-
p_labels := ARRAY['system-label'],
|
|
71
|
-
p_estimated_hours := 2,
|
|
72
|
-
p_source := 'planning'
|
|
73
|
-
);
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## Update Status
|
|
77
|
-
|
|
78
|
-
```sql
|
|
79
|
-
SELECT update_work_item_status('<uuid>'::uuid, 'in_progress');
|
|
80
|
-
SELECT update_work_item_status('<uuid>'::uuid, 'review', '["Implementation complete; ready for validator"]'::jsonb, '<agent-session-id>', 'agent');
|
|
81
|
-
SELECT update_work_item_status('<uuid>'::uuid, 'done', '["Validator verified implementation report, CodeFlow post, and checklist evidence"]'::jsonb, '<validator-session-id>', 'validator');
|
|
82
|
-
SELECT update_work_item_status('<uuid>'::uuid, 'blocked', '["Why it is blocked"]'::jsonb);
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Non-epic `done` is a validator-only close and requires an existing
|
|
86
|
-
`implementation_report.codeflow_post`, checked required checklist evidence, and
|
|
87
|
-
originating-agent tick audit.
|
|
88
|
-
|
|
89
|
-
## Read Tasks in an Epic
|
|
90
|
-
|
|
91
|
-
```sql
|
|
92
|
-
SELECT get_work_items_by_epic('<epic-uuid>'::uuid);
|
|
93
|
-
SELECT get_work_items_by_epic('<epic-uuid>'::uuid, 'todo');
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
## Bump Epic Version
|
|
97
|
-
|
|
98
|
-
```sql
|
|
99
|
-
SELECT bump_epic_version('<epic-uuid>'::uuid, '0.2.0', 'What changed', 'planning');
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Valid Values
|
|
103
|
-
|
|
104
|
-
| Field | Values |
|
|
105
|
-
|-------|--------|
|
|
106
|
-
| status | `todo` `in_progress` `blocked` `review` `done` `archived` |
|
|
107
|
-
| priority | `urgent` `high` `normal` `low` |
|
|
108
|
-
| item_type | `epic` `task` `subtask` `bug` `spike` |
|
|
109
|
-
|
|
110
|
-
## System Labels
|
|
111
|
-
|
|
112
|
-
| Label | When |
|
|
113
|
-
|-------|------|
|
|
114
|
-
| `project-a` | Your-app-specific work |
|
|
115
|
-
| `project-b` | Another app work |
|
|
116
|
-
| `cs2` | Core paradigm packages |
|
|
117
|
-
| `hail` | Grammar, DSL compiler |
|
|
118
|
-
| `pal` | Moment windows, memory |
|
|
119
|
-
| `virtue` | Virtue engine, coherence |
|
|
120
|
-
| `marketing` | Outreach, campaigns |
|
|
121
|
-
| `media` | Assets, R2, image pipeline |
|
|
122
|
-
| `infrastructure` | CI/CD, deployment |
|
|
123
|
-
| `ui` | Component library |
|
|
124
|
-
| `data` | Schema, migrations |
|
|
125
|
-
| `content` | Copy, messaging |
|
|
126
|
-
| `website` | Public-facing sites |
|
|
127
|
-
|
|
128
|
-
## Agent Type → Guide File Reference
|
|
129
|
-
|
|
130
|
-
| Type | Guide | Use For |
|
|
131
|
-
|------|-------|---------|
|
|
132
|
-
| `frontend` | .rdc/guides/frontend.md | React, pages, UI, Tailwind |
|
|
133
|
-
| `backend` | .rdc/guides/backend.md | API routes, database, auth |
|
|
134
|
-
| `data` | .rdc/guides/data.md | Migrations, schema, RPC |
|
|
135
|
-
| `design` | .rdc/guides/design.md | Brand, palette, OG images |
|
|
136
|
-
| `infra` | .rdc/guides/infrastructure.md | CI/CD, deploy, DNS |
|
|
137
|
-
| `content` | .rdc/guides/content.md | Copy, messaging, tone |
|
|
138
|
-
| `cs2` | .rdc/guides/cs2.md | CS 2.0 paradigm |
|
|
139
|
-
| `hail` | .rdc/guides/cs2.md + packages/hail/CLAUDE.md | Grammar, DSL |
|
|
140
|
-
| `viz` | .rdc/guides/frontend.md + design.md | Custom visualizations |
|
|
141
|
-
|
|
142
|
-
## What NOT to Do
|
|
143
|
-
|
|
144
|
-
- Never raw INSERT/UPDATE against work items — RPC functions only
|
|
145
|
-
- Never create tasks without a parent epic
|
|
146
|
-
- Never leave labels empty
|
|
147
|
-
- Never write vague titles ("Fix stuff") — be specific
|
|
148
|
-
- Never put design intention in the task — put it in `.rdc/research/` (fallback: `.rdc/research/`) and link
|