@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.
- package/.claude-plugin/plugin.json +1 -1
- package/clauth-plugin.json +1 -1
- package/package.json +1 -1
- package/skills/collab/SKILL.md +35 -0
- package/skills/deploy/SKILL.md +8 -0
- package/skills/handoff/SKILL.md +3 -0
- package/skills/plan/SKILL.md +24 -0
- package/skills/release/SKILL.md +25 -0
- package/tests/help-surface.test.mjs +19 -5
- package/commands/build.md +0 -223
- package/commands/collab.md +0 -179
- package/commands/deploy.md +0 -211
- package/commands/design.md +0 -30
- package/commands/edit.md +0 -27
- package/commands/fixit.md +0 -172
- package/commands/handoff.md +0 -188
- package/commands/help.md +0 -93
- package/commands/overnight.md +0 -222
- package/commands/plan.md +0 -178
- package/commands/preplan.md +0 -134
- package/commands/prototype.md +0 -144
- package/commands/release.md +0 -60
- package/commands/report.md +0 -98
- package/commands/review.md +0 -15
- package/commands/self-test.md +0 -112
- package/commands/status.md +0 -85
- package/commands/watch.md +0 -97
- package/commands/workitems.md +0 -148
package/clauth-plugin.json
CHANGED
package/package.json
CHANGED
package/skills/collab/SKILL.md
CHANGED
|
@@ -505,6 +505,41 @@ chitchat MCP + SSE; you are the build half of a live session.
|
|
|
505
505
|
- `type: stop` ends the session; send a final summary, then `chitchat_stop`.
|
|
506
506
|
- Stream progress mid-work with `chitchat_reply` on long tasks.
|
|
507
507
|
|
|
508
|
+
### File-relay transport (the second way `listen` arrives)
|
|
509
|
+
|
|
510
|
+
Merged from `commands/collab.md` on 2026-08-29, which is now removed. This
|
|
511
|
+
skill documented only the chitchat/SSE transport; the command documented a
|
|
512
|
+
FILE relay, and neither mentioned the other. Two transports for one mode, each
|
|
513
|
+
written down in a place the other's reader would not look.
|
|
514
|
+
|
|
515
|
+
Invoked as `/rdc:collab --session <session_id>`. claude.ai writes tasks into an
|
|
516
|
+
inbox; you read, act, commit, write the response to an outbox, and loop.
|
|
517
|
+
|
|
518
|
+
```
|
|
519
|
+
sessionDir = .rdc/relay/sessions/<session_id>/
|
|
520
|
+
inbox = sessionDir/inbox/
|
|
521
|
+
outbox = sessionDir/outbox/
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
1. **Parse** `--session <uuid>`. With no `--session`, list
|
|
525
|
+
`.rdc/relay/sessions/` and show what is available. If the directories do not
|
|
526
|
+
exist, say so — `chitchat_start` has to run from claude.ai first. Do not
|
|
527
|
+
create them.
|
|
528
|
+
2. **Announce.** Set `sessionDir/status.json` to
|
|
529
|
+
`{ "status": "active", "cli_connected_at": "<iso>", "session_id": "<id>" }`
|
|
530
|
+
and write a ready signal to the outbox, so claude.ai knows the CLI attached.
|
|
531
|
+
3. **Poll** the inbox for `.md` files not ending in `.processed`, oldest first
|
|
532
|
+
by name. Nothing found → wait 5s and poll again; after 10 minutes idle print
|
|
533
|
+
a `Still listening...` heartbeat and keep waiting.
|
|
534
|
+
4. **Process one message.** Read its frontmatter `type`. `stop` ends the
|
|
535
|
+
session. Anything else is a task: rename the file to `<name>.processed`
|
|
536
|
+
FIRST so a crash cannot replay it, then act with full capabilities — edits,
|
|
537
|
+
commits to the lane, `npx tsc --noEmit` (never `pnpm build`), other skills —
|
|
538
|
+
and write the response to the outbox when done.
|
|
539
|
+
|
|
540
|
+
`agent-bootstrap.md` rules apply throughout, and Dave typing in the terminal is
|
|
541
|
+
a high-priority override in this transport exactly as in the other.
|
|
542
|
+
|
|
508
543
|
---
|
|
509
544
|
|
|
510
545
|
## Dave interjections
|
package/skills/deploy/SKILL.md
CHANGED
|
@@ -38,8 +38,16 @@ No raw MCP dumps. No UUIDs unless asked.
|
|
|
38
38
|
- `rdc:deploy audit` — fleet-wide scan for missed failures
|
|
39
39
|
- `rdc:deploy audit --fix` — fleet scan + auto-remediate safe issues
|
|
40
40
|
- `rdc:deploy maintenance <service>` — create, update, or verify one allowlisted private infrastructure service (Mode 7)
|
|
41
|
+
- `rdc:deploy dev <slug>` — explicit alias for the first form above. Plain
|
|
42
|
+
`rdc:deploy <slug>` already targets PM2 dev, so this only makes the intent
|
|
43
|
+
unmissable when a reader expects Coolify.
|
|
41
44
|
- `rdc:deploy` (no args) — print mode menu, ask which
|
|
42
45
|
|
|
46
|
+
> `<ref>` is what `commands/deploy.md` called `<build-id>` before that file was
|
|
47
|
+
> removed (2026-08-29). Same thing — a registered manifest ref, a commit, or a
|
|
48
|
+
> tag. With no ref, the deployment is the latest commit on the app's WATCHED
|
|
49
|
+
> branch, not on whatever branch happens to be checked out locally.
|
|
50
|
+
|
|
43
51
|
## Modes
|
|
44
52
|
|
|
45
53
|
### Mode 1 — deploy <slug> [ref]
|
package/skills/handoff/SKILL.md
CHANGED
|
@@ -159,6 +159,9 @@ Est: <hours>',
|
|
|
159
159
|
p_labels := ARRAY['<label>'],
|
|
160
160
|
p_estimated_hours := 2,
|
|
161
161
|
p_source := 'planning'
|
|
162
|
+
-- If the epic has architecture_ref set, also add a required
|
|
163
|
+
-- architecture-fidelity-<slug> checklist row via p_checklist here — the exit gate
|
|
164
|
+
-- hard-rejects `done` on any task under an architecture_ref epic that lacks one.
|
|
162
165
|
);
|
|
163
166
|
```
|
|
164
167
|
|
package/skills/plan/SKILL.md
CHANGED
|
@@ -33,6 +33,30 @@ description: rdc:plan (topic) — produce architecture, decisions and an epic wi
|
|
|
33
33
|
- Relevant CLAUDE.md files from affected packages
|
|
34
34
|
- Existing Supabase epics: `SELECT get_open_epics()`
|
|
35
35
|
|
|
36
|
+
1b. **Identify the affected domains, then load the matching architecture doc.**
|
|
37
|
+
|
|
38
|
+
Merged from `commands/plan.md` on 2026-08-29, which is now removed. This file
|
|
39
|
+
referenced architecture docs 9 times and the command 28 — but only the
|
|
40
|
+
command carried the ROUTING, so the instruction to load the right doc lived
|
|
41
|
+
in the copy a reader might never open.
|
|
42
|
+
|
|
43
|
+
| Domain keywords in the topic | Architecture doc to read |
|
|
44
|
+
|---|---|
|
|
45
|
+
| PRT, trust, capital, NAV, investor, land, DST | `docs/systems/prt/ARCHITECTURE.md` |
|
|
46
|
+
| CS 2.0, HAIL, PAL, virtue, quad-pixel, ontology, BPMN, cognitive | `docs/systems/cs2/ARCHITECTURE.md` |
|
|
47
|
+
| marketing, CRM, campaign, contact, outreach, RDC app | `docs/systems/rdc/ARCHITECTURE.md` |
|
|
48
|
+
| Claude workflow, skills, agents, dispatch, rdc:build | `docs/systems/claude-workflow/ARCHITECTURE.md` |
|
|
49
|
+
| Life AI, LIFEAI platform, life.ai | `docs/systems/lifeai/ARCHITECTURE.md` |
|
|
50
|
+
| media, R2, images, regen-media, MCP image | `docs/systems/media/ARCHITECTURE.md` |
|
|
51
|
+
| UI, component, brand, design token, shared, OG image | `docs/systems/shared/ARCHITECTURE.md` |
|
|
52
|
+
|
|
53
|
+
`.claude/rules/system-quick-links.md` is the routing map to all of them. A
|
|
54
|
+
topic spanning several domains reads ALL the matching docs before proceeding.
|
|
55
|
+
|
|
56
|
+
**A plan that contradicts an existing architecture doc is invalid.** Load them
|
|
57
|
+
first, and when a decision conflicts with one, flag the conflict rather than
|
|
58
|
+
quietly planning around it.
|
|
59
|
+
|
|
36
60
|
2. **Read the codebase** — understand current state:
|
|
37
61
|
- What packages are affected?
|
|
38
62
|
- What types/interfaces already exist?
|
package/skills/release/SKILL.md
CHANGED
|
@@ -74,6 +74,31 @@ If blocked, abort immediately with the message above. Do NOT proceed to the vers
|
|
|
74
74
|
|
|
75
75
|
If PUBLISH.md is absent and app has no `app_deployments` row (library/package), skip this gate.
|
|
76
76
|
|
|
77
|
+
## Rules
|
|
78
|
+
|
|
79
|
+
Merged from `commands/release.md` on 2026-08-29, which is now removed. Each of
|
|
80
|
+
these was in the command and NOT in this file, which is precisely the drift that
|
|
81
|
+
shipping one verb as two documents produces.
|
|
82
|
+
|
|
83
|
+
- Do not release without explicit user authorization.
|
|
84
|
+
- Prefer repo-local release instructions in `.rdc/release.json`, README, package
|
|
85
|
+
scripts, or CI workflows.
|
|
86
|
+
- **Never force push or bypass hooks.**
|
|
87
|
+
- **Never declare success without verifying the installed or deployed version.**
|
|
88
|
+
A publish that exits 0 is not a published package — the registry can lag
|
|
89
|
+
minutes behind, so check the version endpoint, not the success line.
|
|
90
|
+
|
|
91
|
+
For a `package`-class target that already resolves through `rdc-harness` (a real
|
|
92
|
+
monorepo subtree, not a standalone repo like this one),
|
|
93
|
+
`packages/deploy/src/runners/registry-release.mjs` already proves the
|
|
94
|
+
"Tests/self-test passed" through "Local install/update executed" rows safely:
|
|
95
|
+
real `npm pack`, isolated-prefix install (never the real global store), real
|
|
96
|
+
verify, and `--live` explicitly gating the actual publish. Where applicable,
|
|
97
|
+
`node C:/Dev/rdc-harness/bin/rdc-harness.mjs deploy <slug> [--live]` can supply
|
|
98
|
+
that evidence directly instead of hand-rolling the same pack/install/verify
|
|
99
|
+
cycle. It does **not** replace version bump, tag or push — the harness CLI does
|
|
100
|
+
none of those.
|
|
101
|
+
|
|
77
102
|
## Resolution Order
|
|
78
103
|
|
|
79
104
|
1. Current repo if `<repo>` is `.` or omitted and the user clearly refers to the current workspace.
|
|
@@ -7,10 +7,22 @@ import { fileURLToPath } from 'node:url';
|
|
|
7
7
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
8
|
const root = resolve(__dirname, '..');
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* `help` has ONE surface now.
|
|
12
|
+
*
|
|
13
|
+
* It used to ship as both commands/help.md and skills/help/SKILL.md, which is
|
|
14
|
+
* half of why a single verb appeared four times in the command list. The
|
|
15
|
+
* command was removed on 2026-08-29 after checking substance rather than
|
|
16
|
+
* counting lines: the skill already carried the manifest resolution order, the
|
|
17
|
+
* plugin.json path and the slash forms.
|
|
18
|
+
*
|
|
19
|
+
* Kept as a map rather than collapsed to one constant so the loop below still
|
|
20
|
+
* names which document failed — and so restoring a second surface, if that ever
|
|
21
|
+
* becomes right, is one line.
|
|
22
|
+
*/
|
|
10
23
|
const files = {
|
|
11
24
|
readme: join(root, 'README.md'),
|
|
12
25
|
skillHelp: join(root, 'skills', 'help', 'SKILL.md'),
|
|
13
|
-
commandHelp: join(root, 'commands', 'help.md'),
|
|
14
26
|
};
|
|
15
27
|
|
|
16
28
|
const docs = Object.fromEntries(
|
|
@@ -40,12 +52,14 @@ assert.match(docs.readme, /Nineteen[\s\S]*\/rdc:\*` command shorthands/i, 'READM
|
|
|
40
52
|
assert.match(docs.readme, /Use `rdc_skill_list` for the authoritative live catalog/, 'README should point callers to live MCP catalog');
|
|
41
53
|
assert.doesNotMatch(docs.readme, /All user-invocable skills become available as slash commands/, 'README must not imply all MCP skills are slash commands');
|
|
42
54
|
assert.doesNotMatch(docs.readme, /29 skills organized into 6 categories/, 'README must not carry stale category count');
|
|
43
|
-
|
|
55
|
+
// One surface, so these assert once. They were duplicated across commandHelp
|
|
56
|
+
// and skillHelp; the negative pair moves to the surviving document rather than
|
|
57
|
+
// being dropped — a stale-wording check is worth keeping regardless of which
|
|
58
|
+
// file carries the text.
|
|
44
59
|
assert.match(docs.skillHelp, /all MCP skills/, 'skill help should refer to MCP skill catalog');
|
|
45
60
|
assert.match(docs.skillHelp, /manifest-driven/i, 'skill help should be manifest-driven');
|
|
46
|
-
assert.
|
|
47
|
-
assert.doesNotMatch(docs.
|
|
48
|
-
assert.doesNotMatch(docs.commandHelp, /get\/<service>/, 'command help must use current clauth /v/<service> wording');
|
|
61
|
+
assert.doesNotMatch(docs.skillHelp, /Print the full usage menu below verbatim/, 'help must not use stale static menu wording');
|
|
62
|
+
assert.doesNotMatch(docs.skillHelp, /get\/<service>/, 'help must use current clauth /v/<service> wording');
|
|
49
63
|
|
|
50
64
|
const skillDirs = readdirSync(join(root, 'skills'))
|
|
51
65
|
.filter((name) => {
|
package/commands/build.md
DELETED
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: build
|
|
3
|
-
description: rdc:build (epic-id) - [--no-review] — execute a planned epic, then gate and ship to dev
|
|
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
|
-
> **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
|
-
|
|
13
|
-
# rdc:build — Typed Agent Dispatch Engine
|
|
14
|
-
|
|
15
|
-
## When to Use
|
|
16
|
-
- Plan is approved and ready to execute
|
|
17
|
-
- Project lead says "build it", "go", "execute", "do not stop"
|
|
18
|
-
- An epic exists with child tasks ready for implementation
|
|
19
|
-
- Called by `rdc:overnight` as part of the automated build loop
|
|
20
|
-
|
|
21
|
-
## Arguments
|
|
22
|
-
- `rdc:build <epic-id>` — build from a specific Supabase epic
|
|
23
|
-
- `rdc:build <topic>` — find the epic by label/title match
|
|
24
|
-
- `rdc:build` (no args) — show open epics and ask which to build (interactive only)
|
|
25
|
-
- `rdc:build <epic-id> --unattended` — silent mode for overnight builds
|
|
26
|
-
|
|
27
|
-
## Agent Types & Guide Files
|
|
28
|
-
|
|
29
|
-
Every dispatched agent MUST read two files before starting — in this order:
|
|
30
|
-
1. `{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md` — credentials, git rules, completion report format
|
|
31
|
-
(fallback: `{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md` if `.rdc/` does not exist)
|
|
32
|
-
2. `{PROJECT_ROOT}/.rdc/guides/<type>.md` — role-specific guide
|
|
33
|
-
(fallback: `{PROJECT_ROOT}/.rdc/guides/<type>.md`)
|
|
34
|
-
|
|
35
|
-
Include both lines in every agent prompt:
|
|
36
|
-
```
|
|
37
|
-
"Read {PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md first (fallback: .rdc/guides/agent-bootstrap.md), then {PROJECT_ROOT}/.rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md) before starting."
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
| Agent Type | Guide File | When to dispatch |
|
|
41
|
-
|-----------|-----------|-----------------|
|
|
42
|
-
| `frontend` | `.rdc/guides/frontend.md` | React components, pages, UI, Tailwind, animation |
|
|
43
|
-
| `backend` | `.rdc/guides/backend.md` | API routes, server components, database queries, auth |
|
|
44
|
-
| `data` | `.rdc/guides/data.md` | Migrations, schema changes, RPC functions |
|
|
45
|
-
| `design` | `.rdc/guides/design.md` | Visual design, brand palettes, OG images, token work |
|
|
46
|
-
| `infra` | `.rdc/guides/infrastructure.md` | CI/CD, deployment, DNS, SSL |
|
|
47
|
-
| `content` | `.rdc/guides/content.md` | Marketing copy, messaging, tone |
|
|
48
|
-
| `cs2` | `.rdc/guides/cs2.md` | CS 2.0 paradigm work (generic) |
|
|
49
|
-
| `hail` | `.rdc/guides/cs2.md` + `packages/hail/CLAUDE.md` | Grammar, DSL compiler, evolution |
|
|
50
|
-
| `pal` | `.rdc/guides/cs2.md` + `packages/pal/CLAUDE.md` | Sessions, moment windows, graph memory |
|
|
51
|
-
| `bpmn` | `.rdc/guides/cs2.md` + `docs/systems/<domain>/flowable-bpmn-architecture.md` | BPMN flows, governance |
|
|
52
|
-
| `virtue` | `.rdc/guides/cs2.md` + `packages/virtue-engine/CLAUDE.md` | Virtue weights, coherence, certification |
|
|
53
|
-
| `viz` | `.rdc/guides/frontend.md` + `.rdc/guides/design.md` | Custom viz components, charts, diagrams |
|
|
54
|
-
|
|
55
|
-
### How to classify a task → agent type
|
|
56
|
-
|
|
57
|
-
Read the task title and description, then:
|
|
58
|
-
- Mentions React, component, page, UI, Tailwind → `frontend`
|
|
59
|
-
- Mentions API route, server, database query, auth → `backend`
|
|
60
|
-
- Mentions migration, schema, table, RPC → `data`
|
|
61
|
-
- Mentions brand, palette, typography, OG image → `design`
|
|
62
|
-
- Mentions deploy, infrastructure, CI, DNS → `infra`
|
|
63
|
-
- Mentions copy, messaging, email template → `content`
|
|
64
|
-
- Mentions grammar, DSL, compiler → `hail`
|
|
65
|
-
- Mentions session, moment, memory graph → `pal`
|
|
66
|
-
- Mentions BPMN, flow, governance → `bpmn`
|
|
67
|
-
- Mentions virtue, coherence, certification → `virtue`
|
|
68
|
-
- Mentions visualization, chart, diagram, SVG → `viz`
|
|
69
|
-
- Multiple types? Dispatch multiple agents, each with its guide.
|
|
70
|
-
|
|
71
|
-
### Execution primitive for create/open/build/deploy checklist rows
|
|
72
|
-
|
|
73
|
-
When a dispatched agent's checklist row is to materialize a product shape,
|
|
74
|
-
open a signed edit session, run a target's declared build gates, or deploy
|
|
75
|
-
to dev-PM2/npm-registry, it uses the real, tested `rdc-harness` CLI instead
|
|
76
|
-
of hand-rolled bash/curl:
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
node C:/Dev/rdc-harness/bin/rdc-harness.mjs <create|open|edit|build|deploy> <slug> --monorepo-root <the dispatched agent's own worktree>
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
One JSON receipt per call, exit 0/1 — tick the checklist row with the parsed
|
|
83
|
-
receipt as evidence, not the raw dump. No Coolify awareness (production
|
|
84
|
-
deploy stays `/rdc:deploy`'s own path) and no live co-editing surface
|
|
85
|
-
outside `site-html`/`site-ts` (other classes get file-boundary save only —
|
|
86
|
-
real, currently-unbuilt gap for other product classes, not something to
|
|
87
|
-
paper over here). `open`/`edit` require `RDC_HARNESS_ISSUER_SECRET` set
|
|
88
|
-
explicitly per-session — never a default.
|
|
89
|
-
|
|
90
|
-
## Procedure
|
|
91
|
-
|
|
92
|
-
1. **Load the epic and its durable admission decisions:**
|
|
93
|
-
```sql
|
|
94
|
-
SELECT get_work_items_by_epic('<epic-id>');
|
|
95
|
-
```
|
|
96
|
-
- Read `design_review_state` and `status` for every executable child.
|
|
97
|
-
- Only `automatic_approved`, `human_approved`, or legacy `not_required` rows may be considered for dispatch.
|
|
98
|
-
- For `pending`, `needs_human`, or `rejected`, write an `admission_refocus` receipt, keep the child blocked, and route it to the reviewer/planner. **Do not dispatch it, retry it, or call the epic complete.**
|
|
99
|
-
- Interactive (no args): show open epics, ask which to build
|
|
100
|
-
- Unattended (no tasks found): escalate via advisor tool
|
|
101
|
-
- **Read the epic's `plan_ref`, `spec_ref`, `architecture_ref`, and `scoping_statement` fields** (returned on the epic row itself). `scoping_statement` bounds what this build may touch — do not silently expand past it. If `architecture_ref` is set, this epic crosses an architectural boundary: read that doc now, before classifying or dispatching any task, and carry it into every agent prompt in step 7.
|
|
102
|
-
|
|
103
|
-
1a. **Run the durable CodeFlow supervisor before each wave and after every gate-changing action.**
|
|
104
|
-
- Invoke `runOrchestrator()` with the project manifest, `SupabaseStateStore`, and the real phase dispatcher. It is the sole authority for resuming/refocusing a phase DAG; do not reconstruct waves by hand from task prose.
|
|
105
|
-
- A returned `admission_refocus` or `pipeline_blocked` is a durable hold, not a failed attempt to work around. Preserve its task state and route the required Design Review or validator closure.
|
|
106
|
-
- Only a returned `pipeline_complete` whose phase tasks are all design-review admitted **and** durably `done` permits an epic completion claim. If the project lacks a real dispatcher/manifest, report `BLOCKED: CodeFlow supervisor entrypoint unavailable` rather than emulating completion.
|
|
107
|
-
|
|
108
|
-
2. **CHECK FOR EXISTING WORK (mandatory — never skip):**
|
|
109
|
-
```sql
|
|
110
|
-
-- Check if prototypes exist from earlier sessions
|
|
111
|
-
SELECT name, component, source_path, status, notes
|
|
112
|
-
FROM prototype_registry
|
|
113
|
-
WHERE status IN ('prototype', 'converting')
|
|
114
|
-
ORDER BY created_at DESC;
|
|
115
|
-
|
|
116
|
-
-- Check for design decisions on this topic
|
|
117
|
-
SELECT topic, context_type, summary, source
|
|
118
|
-
FROM design_context
|
|
119
|
-
WHERE topic ILIKE '%<epic-topic>%'
|
|
120
|
-
ORDER BY created_at DESC;
|
|
121
|
-
```
|
|
122
|
-
**If a prototype exists: ADAPT IT. Do not build from scratch.**
|
|
123
|
-
Tell the agent: "Read <source_path> first and convert it to the production contract."
|
|
124
|
-
|
|
125
|
-
**If design decisions exist: follow them.** Include the summary in the agent prompt.
|
|
126
|
-
|
|
127
|
-
3. **Load the plan** (if exists): check `.rdc/plans/` for matching topic (fallback: `.rdc/plans/`).
|
|
128
|
-
|
|
129
|
-
4. **Read CLAUDE.md files** for all affected packages, plus `docs/CODING-STANDARDS.md`
|
|
130
|
-
(SOLID/Clean-Architecture standard — regen-root; skip if absent) — carry it into every
|
|
131
|
-
dispatched agent prompt.
|
|
132
|
-
|
|
133
|
-
5. **Classify each task** → assign agent type from the table above.
|
|
134
|
-
|
|
135
|
-
6. **Use the supervisor-resolved waves** — parallelize only phases returned by `runOrchestrator()` after its durable admission check:
|
|
136
|
-
- Wave 1: independent tasks (different packages/files)
|
|
137
|
-
- Wave 2: tasks that depend on Wave 1 outputs
|
|
138
|
-
- Wave 3: integration tasks
|
|
139
|
-
|
|
140
|
-
7. **For each wave — dispatch typed agents in parallel:**
|
|
141
|
-
- Set work item to `in_progress` before dispatching
|
|
142
|
-
- Each agent prompt MUST include:
|
|
143
|
-
- `"Read {PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md first (fallback: .rdc/guides/agent-bootstrap.md), then {PROJECT_ROOT}/.rdc/guides/<type>.md (fallback: .rdc/guides/<type>.md) before starting."`
|
|
144
|
-
- Specific files to create/modify
|
|
145
|
-
- Exact deliverables and commit message
|
|
146
|
-
- The epic's `scoping_statement` — explicit boundary on what this task may and may not touch
|
|
147
|
-
- `"NEVER run pnpm build/test. NEVER modify files outside your scope."`
|
|
148
|
-
- **If the epic's `architecture_ref` is set:** include `"Read <architecture_ref> before implementing. Your task's checklist requires a checked architecture-fidelity-<slug> row before this item can close — when you tick it, its evidence must cite the specific section/boundary of <architecture_ref> your implementation conforms to, not just 'done'."` A task under an `architecture_ref` epic will hard-fail at the exit gate (step 9) without this row checked with real evidence.
|
|
149
|
-
- Use `run_in_background: true` for parallel execution
|
|
150
|
-
- NEVER let agents overlap on the same files
|
|
151
|
-
|
|
152
|
-
8. **Post-wave test gate (mandatory):**
|
|
153
|
-
After all agents in a wave complete, before marking tasks done:
|
|
154
|
-
```bash
|
|
155
|
-
# For each package modified in this wave:
|
|
156
|
-
cd packages/<name> && npx vitest run 2>&1 | tail -20
|
|
157
|
-
```
|
|
158
|
-
- All tests must pass before proceeding to next wave
|
|
159
|
-
- If tests fail: fix before marking the wave done
|
|
160
|
-
- NEVER use `pnpm build` or `pnpm turbo test` — vitest only per package
|
|
161
|
-
- New code must have tests: if a modified package shows 0 new test files, flag it
|
|
162
|
-
|
|
163
|
-
9. **As agents complete:**
|
|
164
|
-
- Verify commit landed on the development branch
|
|
165
|
-
- Push to origin *(skip if `$RDC_TEST=1` — echo `[RDC_TEST] skipping git push` instead)*
|
|
166
|
-
- Ensure the agent submitted `implementation_report.codeflow_post`, then set the work item to `review`; the validator closes `done`
|
|
167
|
-
- Re-invoke `runOrchestrator()` after the durable status/gate update. A task in `review` remains incomplete even when its phase gate passed.
|
|
168
|
-
- **If the epic's `architecture_ref` is set:** before the validator attempts `done`, confirm the task's checklist has a checked `architecture-fidelity-*` row with real evidence (a cited doc section, not a bare "matches"). `update_work_item_status(..., 'done')` will hard-reject otherwise — catching this here avoids a wasted validator round-trip.
|
|
169
|
-
- Continue to next wave
|
|
170
|
-
|
|
171
|
-
**If an agent fails:**
|
|
172
|
-
- Interactive: diagnose before retrying
|
|
173
|
-
- Unattended: retry once; on second failure escalate via advisor
|
|
174
|
-
```
|
|
175
|
-
BUILD_STATUS: { wave, tasks_done, tasks_failed, commits, escalated: true }
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
10. **Final verification gate (mandatory — before marking work or epic done):**
|
|
179
|
-
Dispatch the verify agent (see `guides/agents/verify.md`) across every package/app touched in this build.
|
|
180
|
-
The Iron Law: **NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.**
|
|
181
|
-
- Run `npx vitest run --dir <pkg>` fresh for each touched package
|
|
182
|
-
- Run `npx tsc --noEmit --project <pkg>/tsconfig.json` for each
|
|
183
|
-
- Read the full output — zero failures, zero type errors
|
|
184
|
-
- If any step fails: fix and re-run the entire gate. Do not skip.
|
|
185
|
-
- NEVER `pnpm build` / `pnpm test` / `pnpm -r` (crashes machine)
|
|
186
|
-
- **ATF Test-Ladder / rdc-harness (WIP — best-effort, not a hard gate yet):** if a
|
|
187
|
-
touched package/repo ships an ATF `STP-001.md` or an `rdc-harness`-style
|
|
188
|
-
`tools/mutate-check.mjs`/`tools/proof-ledger.mjs` pair, run it and quote the result
|
|
189
|
-
alongside vitest/tsc. A red mutation gate is a real finding — report it, do not
|
|
190
|
-
silently drop it because it isn't wired into this checklist as required yet.
|
|
191
|
-
Absence of either system in the target is not a failure; do not install one ad hoc.
|
|
192
|
-
|
|
193
|
-
11. **After verification passes:**
|
|
194
|
-
- Push all commits:
|
|
195
|
-
```bash
|
|
196
|
-
if [ "$RDC_TEST" != "1" ]; then
|
|
197
|
-
git push origin {development-branch}
|
|
198
|
-
else
|
|
199
|
-
echo "[RDC_TEST] skipping git push origin {development-branch}"
|
|
200
|
-
fi
|
|
201
|
-
```
|
|
202
|
-
- Re-invoke `runOrchestrator()` and require its `pipeline_complete` receipt before `bump_epic_version()` or any epic completion claim. A clean code review or green test suite is not a substitute for admitted, validator-closed work items.
|
|
203
|
-
- Report summary with verification evidence quoted
|
|
204
|
-
|
|
205
|
-
## Agent TDD Requirements
|
|
206
|
-
|
|
207
|
-
When dispatching agents, include in every prompt:
|
|
208
|
-
```
|
|
209
|
-
TDD REQUIREMENT: Write tests FIRST for new functions/modules.
|
|
210
|
-
Run: npx vitest run packages/<name> to verify red → implement → verify green.
|
|
211
|
-
NEVER run pnpm build or pnpm turbo. Use npx vitest run only.
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
## Rules
|
|
215
|
-
- Branch: development branch only (auto-commit, no confirmation needed)
|
|
216
|
-
- NEVER let two agents edit the same file
|
|
217
|
-
- NEVER run `pnpm build` (crashes system) — code only
|
|
218
|
-
- Every agent reads its guide file — no exceptions
|
|
219
|
-
- Update Supabase work items IN REAL TIME — not batch at end
|
|
220
|
-
- **Never dispatch, resume, or complete around `design_review_state`; the durable database result and `runOrchestrator()` receipt win over an agent's narrative**
|
|
221
|
-
- Push after each wave, not just at the end
|
|
222
|
-
- Unattended: NEVER pause — continue automatically
|
|
223
|
-
- Unattended: max 2 retries per task before escalating to advisor
|
package/commands/collab.md
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: collab
|
|
3
|
-
description: rdc:collab () - [--session] — run a structured agent-to-agent conversation
|
|
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
|
-
|
|
11
|
-
# /rdc:collab — Claude Code Collab Session Listener
|
|
12
|
-
> Invoked as: `/rdc:collab --session <session_id>`
|
|
13
|
-
> You are the build/execute half of a live collab session with claude.ai.
|
|
14
|
-
> Transport: file relay via `.rdc/relay/sessions/<id>/inbox/` + `outbox/`
|
|
15
|
-
> Dave is watching this terminal and can interject at any time.
|
|
16
|
-
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
## What This Is
|
|
20
|
-
|
|
21
|
-
claude.ai writes tasks into your inbox. You read, act, commit, write the response
|
|
22
|
-
to outbox, and loop. clauth relays messages between claude.ai and this session via
|
|
23
|
-
the `chitchat_*` MCP tools. Dave can watch everything in this terminal and interject
|
|
24
|
-
by typing — treat anything Dave types as a high-priority override.
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## Step 1 — Parse session ID
|
|
29
|
-
|
|
30
|
-
Extract `--session <uuid>` from args.
|
|
31
|
-
|
|
32
|
-
If no `--session`, list `.rdc/relay/sessions/` and show available sessions.
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## Step 2 — Initialize
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
sessionDir = .rdc/relay/sessions/<session_id>/
|
|
40
|
-
inbox = sessionDir/inbox/
|
|
41
|
-
outbox = sessionDir/outbox/
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Verify both dirs exist. If not:
|
|
45
|
-
```
|
|
46
|
-
Session directory not found. Run chitchat_start from claude.ai first.
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
Update `sessionDir/status.json`:
|
|
50
|
-
```json
|
|
51
|
-
{ "status": "active", "cli_connected_at": "<iso>", "session_id": "<id>" }
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Write a ready signal to outbox so claude.ai knows the CLI is connected:
|
|
55
|
-
|
|
56
|
-
```
|
|
57
|
-
outbox/<iso-ts>-ready.md
|
|
58
|
-
---
|
|
59
|
-
from: claude-code
|
|
60
|
-
to: claude-ai
|
|
61
|
-
session_id: <id>
|
|
62
|
-
type: ready
|
|
63
|
-
responded_at: <iso>
|
|
64
|
-
---
|
|
65
|
-
Claude Code connected. Ready to receive tasks.
|
|
66
|
-
cwd: <rootPath>
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
Print to terminal:
|
|
70
|
-
```
|
|
71
|
-
[rdc:collab] Session <id> active.
|
|
72
|
-
Inbox: .rdc/relay/sessions/<id>/inbox/
|
|
73
|
-
Outbox: .rdc/relay/sessions/<id>/outbox/
|
|
74
|
-
Waiting for messages from claude.ai... (Ctrl+C to end)
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
## Step 3 — Poll inbox
|
|
80
|
-
|
|
81
|
-
Scan `inbox/` for `.md` files that do NOT end in `.processed`. Sort ascending by name.
|
|
82
|
-
|
|
83
|
-
- **No files:** wait 5 seconds, poll again.
|
|
84
|
-
- **After 10 min idle:** print `[rdc:collab] Still listening...` heartbeat, keep waiting.
|
|
85
|
-
- **Files found:** process the oldest one first (Step 4).
|
|
86
|
-
|
|
87
|
-
---
|
|
88
|
-
|
|
89
|
-
## Step 4 — Process message
|
|
90
|
-
|
|
91
|
-
Read the file. Parse frontmatter `type` field.
|
|
92
|
-
|
|
93
|
-
**`type: stop`** → go to Step 6.
|
|
94
|
-
|
|
95
|
-
**Anything else (default: task/message):**
|
|
96
|
-
|
|
97
|
-
Print to terminal:
|
|
98
|
-
```
|
|
99
|
-
[rdc:collab] Turn <N> from claude.ai:
|
|
100
|
-
──────────────────────────────────────
|
|
101
|
-
<message body>
|
|
102
|
-
──────────────────────────────────────
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Rename the inbox file to `<filename>.processed`.
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## Step 5 — Do the work
|
|
110
|
-
|
|
111
|
-
Act on the message. Full Claude Code capabilities:
|
|
112
|
-
- File edits, git commits to `develop`
|
|
113
|
-
- Supabase RPC queries
|
|
114
|
-
- Type-checks: `npx tsc --noEmit` (never `pnpm build`)
|
|
115
|
-
- Run skills: `/rdc:plan`, `/rdc:fixit`, etc.
|
|
116
|
-
- Answer questions directly
|
|
117
|
-
|
|
118
|
-
Follow `.rdc/guides/agent-bootstrap.md` rules throughout.
|
|
119
|
-
|
|
120
|
-
When done, write response to outbox:
|
|
121
|
-
```
|
|
122
|
-
outbox/<iso-ts>-turn<N>.md
|
|
123
|
-
---
|
|
124
|
-
from: claude-code
|
|
125
|
-
to: claude-ai
|
|
126
|
-
session_id: <session_id>
|
|
127
|
-
turn: <N>
|
|
128
|
-
responded_at: <iso>
|
|
129
|
-
commits: <sha1, sha2 or none>
|
|
130
|
-
---
|
|
131
|
-
|
|
132
|
-
<what you did, what you found, any questions or decisions needed from claude.ai>
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
Print to terminal:
|
|
136
|
-
```
|
|
137
|
-
[rdc:collab] Turn <N> done. Response written to outbox.
|
|
138
|
-
Waiting for next message...
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
Return to Step 3.
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## Step 6 — End session
|
|
146
|
-
|
|
147
|
-
Received `type: stop` in inbox, or Dave pressed Ctrl+C.
|
|
148
|
-
|
|
149
|
-
Write final summary to outbox:
|
|
150
|
-
```
|
|
151
|
-
outbox/<iso-ts>-final.md
|
|
152
|
-
---
|
|
153
|
-
from: claude-code
|
|
154
|
-
to: claude-ai
|
|
155
|
-
session_id: <session_id>
|
|
156
|
-
type: final
|
|
157
|
-
responded_at: <iso>
|
|
158
|
-
---
|
|
159
|
-
Session complete.
|
|
160
|
-
Turns: <N>
|
|
161
|
-
Commits: <list or none>
|
|
162
|
-
Open items: <anything unresolved>
|
|
163
|
-
```
|
|
164
|
-
|
|
165
|
-
Update `status.json` → `{ "status": "done", "ended_at": "<iso>" }`
|
|
166
|
-
|
|
167
|
-
Print:
|
|
168
|
-
```
|
|
169
|
-
[rdc:collab] Session ended.
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
---
|
|
173
|
-
|
|
174
|
-
## Dave Interjections
|
|
175
|
-
|
|
176
|
-
If Dave types in this terminal during a turn:
|
|
177
|
-
- Treat it as an override injected into the current task
|
|
178
|
-
- Acknowledge it in your outbox response
|
|
179
|
-
- If it changes direction mid-task, note what you stopped and why
|