@lifeaitools/rdc-skills 0.11.0 → 0.13.0

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,6 +1,6 @@
1
1
  {
2
2
  "name": "rdc",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code — plan, build, review, overnight unattended builds with work-item tracking and TDD enforcement.",
5
5
  "author": {
6
6
  "name": "LIFEAI",
@@ -9,9 +9,11 @@
9
9
  "homepage": "https://github.com/LIFEAI/rdc-skills",
10
10
  "repository": "https://github.com/LIFEAI/rdc-skills",
11
11
  "skills": [
12
+ "brochure",
12
13
  "build",
13
14
  "co-develop",
14
15
  "collab",
16
+ "convert",
15
17
  "deploy",
16
18
  "design",
17
19
  "fixit",
@@ -53,6 +55,41 @@
53
55
  "codeflow_required": "bool — true if the skill MUST consult CodeFlow before acting on the codebase"
54
56
  },
55
57
  "skills_meta": {
58
+ "brochure": {
59
+ "name": "brochure",
60
+ "slash": "rdc:brochure",
61
+ "category": "tooling",
62
+ "usage": "rdc:brochure <input> [--out path] [--template name] [--format Letter|A4]",
63
+ "args": {
64
+ "positional": [
65
+ { "name": "input", "required": true, "description": "Path to .zip, folder, .html, .md, or http(s)://... URL", "accepts": "path|url" }
66
+ ],
67
+ "flags": [
68
+ { "name": "--out", "type": "path", "default": null, "description": "Output PDF path. Defaults to <input-basename>.pdf next to the input." },
69
+ { "name": "--template", "type": "string", "default": "studio-default", "description": "Compose-mode template (scaffold/templates/brochure-<name>.html)." },
70
+ { "name": "--format", "type": "string", "default": "Letter", "description": "Page size: Letter or A4." },
71
+ { "name": "--margin", "type": "string", "default": null, "description": "Override CSS @page margin (e.g. \"0.5in\")." },
72
+ { "name": "--no-print-emulate", "type": "bool", "default": false, "description": "Render with screen media instead of print." },
73
+ { "name": "--keep-workdir", "type": "bool", "default": false, "description": "Keep the staged working directory for inspection." }
74
+ ]
75
+ },
76
+ "requires": [],
77
+ "produces": ["pdf_artifact"],
78
+ "default_model": "sonnet",
79
+ "triggers": [
80
+ "make a brochure",
81
+ "render this html to pdf",
82
+ "convert this zip to pdf",
83
+ "puppeteer pdf",
84
+ "print this to pdf"
85
+ ],
86
+ "follows": [],
87
+ "leads_to": [],
88
+ "sandbox_aware": true,
89
+ "output_contract": "guides/output-contract.md",
90
+ "enabled_default": true,
91
+ "codeflow_required": false
92
+ },
56
93
  "build": {
57
94
  "name": "build",
58
95
  "slash": "rdc:build",
@@ -189,6 +226,98 @@
189
226
  "enabled_default": true,
190
227
  "codeflow_required": true
191
228
  },
229
+ "convert": {
230
+ "name": "convert",
231
+ "slash": "rdc:convert",
232
+ "category": "tooling",
233
+ "usage": "rdc:convert <input> [--out <dir>] [--to markdown|word] [--images assets|base64|s3]",
234
+ "args": {
235
+ "positional": [
236
+ {
237
+ "name": "input",
238
+ "required": true,
239
+ "description": "One or more .docx, .pptx, .ppt, or .md files or directories",
240
+ "accepts": "path"
241
+ }
242
+ ],
243
+ "flags": [
244
+ {
245
+ "name": "--out",
246
+ "type": "path",
247
+ "default": null,
248
+ "description": "Output directory for the converted tree."
249
+ },
250
+ {
251
+ "name": "--out-same-dir",
252
+ "type": "bool",
253
+ "default": false,
254
+ "description": "Write .md, .assets, and reports beside each source file."
255
+ },
256
+ {
257
+ "name": "--to",
258
+ "type": "string",
259
+ "default": "auto",
260
+ "description": "Output target: auto | markdown | word."
261
+ },
262
+ {
263
+ "name": "--images",
264
+ "type": "string",
265
+ "default": "assets",
266
+ "description": "Image handling: assets | base64 | s3."
267
+ },
268
+ {
269
+ "name": "--equations",
270
+ "type": "string",
271
+ "default": "tex",
272
+ "description": "OMML equations: tex (KaTeX) | image (debug)."
273
+ },
274
+ {
275
+ "name": "--inline-images",
276
+ "type": "bool",
277
+ "default": false,
278
+ "description": "Emit <name>.inline.md with images as data URIs."
279
+ },
280
+ {
281
+ "name": "--word-template",
282
+ "type": "path",
283
+ "default": null,
284
+ "description": ".docx/.dotx template for Markdown -> Word."
285
+ },
286
+ {
287
+ "name": "--move-sources",
288
+ "type": "bool",
289
+ "default": false,
290
+ "description": "Move processed sources into a sources/ folder."
291
+ },
292
+ {
293
+ "name": "--config",
294
+ "type": "path",
295
+ "default": null,
296
+ "description": "JSON config with conversion/output/S3 defaults."
297
+ }
298
+ ]
299
+ },
300
+ "requires": [],
301
+ "produces": [
302
+ "markdown_artifact",
303
+ "word_artifact"
304
+ ],
305
+ "default_model": "inherit",
306
+ "triggers": [
307
+ "convert this docx to markdown",
308
+ "convert to word",
309
+ "docx to markdown",
310
+ "pptx to markdown",
311
+ "build a markdown corpus",
312
+ "open the report in regen-mde"
313
+ ],
314
+ "follows": [],
315
+ "leads_to": [],
316
+ "sandbox_aware": false,
317
+ "output_contract": null,
318
+ "enabled_default": true,
319
+ "codeflow_required": false
320
+ },
192
321
  "deploy": {
193
322
  "name": "deploy",
194
323
  "slash": "rdc:deploy",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lifeaitools/rdc-skills",
3
- "version": "0.11.0",
3
+ "version": "0.13.0",
4
4
  "description": "RDC typed-agent dispatch skill suite for Claude Code - plan, build, review, overnight builds",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -194,11 +194,28 @@ Read the task title and description, then:
194
194
  ### ⛔ Agent Dispatch Non-Negotiable Defaults
195
195
  Every `Agent()` call MUST include these parameters — no exceptions:
196
196
  ```
197
- model: "sonnet"
197
+ model: <chosen per the routing table below>
198
198
  max_turns: 70
199
199
  isolation: "worktree"
200
200
  ```
201
- Agents run Sonnet 4.6 — capable for implementation work, budget-safe for parallel dispatch. The supervisor session model does NOT cascade to agents; you must set it explicitly.
201
+
202
+ **Agent model routing — pick per task, not per wave.** The supervisor session model does NOT cascade to agents; you must set `model` explicitly on every dispatch.
203
+
204
+ | Task character | Model | When to pick it |
205
+ |---|---|---|
206
+ | Updates, edits, mechanical refactors, small fixes, content tweaks, config patches, doc/copy edits, straightforward API wiring | `claude-sonnet-4-6` | Default for `frontend.md`/`content.md`/`infrastructure.md` work whose checklist is mostly "change X to Y" or "wire up endpoint Z". Budget-safe for parallel dispatch. |
207
+ | Harder coding tasks — non-trivial algorithm, migration with backfill, schema reshape, multi-file refactor with subtle invariants, performance-sensitive code, anything where correctness is the bar | `claude-opus-4-6` | Default for `backend.md`/`data.md` work and any `frontend.md` task that involves state machines, race conditions, or cross-package contracts. |
208
+ | Design or innovative thought — new component design, brand/UX work, CS 2.0 paradigm work (HAIL/Quad Pixel/AEMG/Virtue), grammar evolution, architecture-first design, anything where the *shape* of the solution is the deliverable rather than the implementation | `claude-opus-4-8` | Default for `design.md`/`cs2.md` work. Also use for `backend.md`/`data.md` tasks tagged with `architecture` or `design-decision` in work item labels. |
209
+
210
+ **How to choose when the task straddles categories:**
211
+ - If the task's checklist contains the word "design", "decide", "propose", "evaluate alternatives", "novel", or any CS 2.0 primitive → **Opus 4.8**.
212
+ - If the task touches `packages/cs2*`, `packages/hail`, `packages/quad-pixel`, `packages/virtue-engine`, `packages/aemg`, `packages/planetary-ontology`, or `packages/being-state-processor` → **Opus 4.8** (CS 2.0 paradigm requires innovative thought, not transcription).
213
+ - If the task is a Supabase migration that drops/renames/reshapes anything, or a refactor across ≥5 files → **Opus 4.6**.
214
+ - Otherwise → **Sonnet 4.6**.
215
+
216
+ **State the choice in the wave plan.** Before dispatching a wave, the supervisor must log one line per agent in the form `[wave-N agent-K] role=<role> task=<id> model=<chosen> reason=<one phrase>`. This keeps routing decisions reviewable in the transcript and lets `rdc:report` summarize the fleet mix.
217
+
218
+ **Cost guardrail.** If a single wave would dispatch more than 3 Opus 4.8 agents in parallel, downshift the lowest-priority Opus-4.8 tasks to Opus 4.6 unless their work items are tagged `priority=urgent`. Opus 4.8 fast-mode is cheap individually but still ~5× a Sonnet agent at scale.
202
219
  Without `max_turns: 70`, agents hit the default turn cap mid-task and stop.
203
220
  `isolation: "worktree"` gives each agent its own git worktree and branch — eliminates push race conditions and index lock contention when multiple agents commit in parallel. The supervisor merges worktree branches after each wave (Step 9).
204
221
 
@@ -382,5 +399,5 @@ NEVER run pnpm build or pnpm turbo. Use npx vitest run only.
382
399
  - Push after each wave, not just at the end
383
400
  - Unattended: NEVER pause — continue automatically
384
401
  - Unattended: max 2 retries per task before escalating to advisor
385
- - Every Agent() dispatch: `model: "sonnet"` + `max_turns: 70` + `isolation: "worktree"` — non-negotiable (Sonnet agents, Opus supervisor). Exception: validator agent in Step 10 omits isolation.
402
+ - Every Agent() dispatch: `model: <routed>` + `max_turns: 70` + `isolation: "worktree"` — non-negotiable. Model is chosen per task per the routing table in Step 7: Sonnet 4.6 for updates/edits, Opus 4.6 for harder coding, Opus 4.8 for design/innovative thought (CS 2.0, brand/UX, architecture). Supervisor logs `model=<chosen> reason=<phrase>` per agent. Exception: validator agent in Step 10 omits isolation; validator model stays `claude-sonnet-4-6` (verification, not generation).
386
403
  - Finding an existing file is NOT task completion — verify it satisfies the spec
@@ -0,0 +1,124 @@
1
+ ---
2
+ name: rdc:convert
3
+ description: "Usage `rdc:convert <input> [--out <dir>] [--to markdown|word] [--images assets|base64|s3]` — Convert .docx/.pptx/.ppt → Markdown (Word OMML equations as KaTeX TeX, tables, images) or Markdown → Word via the build-corpus CLI (PyPI `build-corpus`, npm `regen-mde`). Portable: runs in any session that can reach npm or PyPI — Claude Code CLI and claude.ai both fetch + run it. Use whenever the user asks to convert an Office document, build a Markdown corpus from .docx/.pptx, turn Markdown into a .docx, or 'open the report' in the regen-mde editor (Windows)."
4
+ ---
5
+
6
+ # rdc:convert — Office ↔ Markdown conversion (build-corpus) + regen-mde editor
7
+
8
+ > **⚠️ OUTPUT CONTRACT (READ FIRST):** `guides/output-contract.md`
9
+ > Checklist-only output. No tool-call narration. No raw MCP/JSON/log dumps.
10
+ > One checklist upfront, updated in place, shown again at end with a 1-line verdict.
11
+
12
+ `build-corpus` is the conversion CLI; `regen-mde` is the Windows GUI editor. Same
13
+ package, two surfaces. This skill is a **when-to-use + full call/switch reference** —
14
+ it does NOT require a local checkout. Any runtime that can reach npm or PyPI can
15
+ fetch and run the tool in its own session (this is how claude.ai uses it).
16
+
17
+ ## When to Use
18
+ - Convert `.docx`, `.pptx`, or `.ppt` → Markdown, preserving Word OMML equations
19
+ (as KaTeX-readable TeX), tables, images, headings, and lists.
20
+ - Convert Markdown → Word (`.docx`), optionally with a `.dotx` template.
21
+ - Build a Markdown corpus from a folder of Office files (one pass, recursive).
22
+ - Inline a Markdown file's images as data URIs, or rehost them to R2/S3.
23
+ - "Open the report / open this doc to edit" → `regen-mde <file>` (Windows GUI only).
24
+
25
+ ## When NOT to Use
26
+ - Rendering a folder/HTML/zip into a print-ready **PDF** brochure → use `rdc:brochure`.
27
+ - Authoring brochure JSX for the Brochurify pipeline → use `lifeai-brochure-author`.
28
+
29
+ ## Obtain & Run (portable — pick whatever the current runtime supports)
30
+
31
+ The command is always `build-corpus <input> [flags]`. Resolve the binary like this:
32
+
33
+ 1. **Already on PATH?** Use it directly: `build-corpus --help`.
34
+ 2. **Python runtime (recommended on Linux/macOS/claude.ai):**
35
+ - one-off, no install: `pipx run build-corpus <input> [flags]`
36
+ - or install: `pipx install build-corpus` (PEP 668-safe)
37
+ - in a disposable sandbox: `python3 -m pip install build-corpus && build-corpus <input> [flags]`
38
+ - S3/R2 image upload needs the extra: `pip install "build-corpus[s3]"`
39
+ 3. **Node runtime:** `npx -y -p regen-mde build-corpus <input> [flags]`
40
+ 4. **Legacy `.ppt` input** additionally needs LibreOffice (`soffice`) on PATH
41
+ (`sudo apt install libreoffice`). `.docx`/`.pptx` need nothing extra.
42
+
43
+ claude.ai note: pull from PyPI (`build-corpus`) or npm (`regen-mde`) and run in the
44
+ analysis/session sandbox. No local repo checkout is required.
45
+
46
+ ## Command Reference
47
+
48
+ ```
49
+ build-corpus <input> [input ...] [options]
50
+ ```
51
+
52
+ `<input>` — one or more `.md`, `.docx`, `.pptx`, or `.ppt` files or directories.
53
+
54
+ | Flag | Values / default | Effect |
55
+ |------|------------------|--------|
56
+ | `--out <dir>` | path | Output directory for the converted tree. |
57
+ | `--out-same-dir` | — | Write `.md`, `.assets`, and reports **beside** each source file. |
58
+ | `--to` | `auto` \| `markdown` \| `word` (default `auto`) | Output target. `auto` infers from a single-file input. |
59
+ | `--images` | `assets` \| `base64` \| `s3` (default `assets`) | Image handling (see below). |
60
+ | `--equations` | `tex` \| `image` (default `tex`) | OMML equations → KaTeX TeX, or rendered images (debug only). |
61
+ | `--inline-images` | — | Emit `<name>.inline.md` with local/HTTP images embedded as data URIs. |
62
+ | `--word-template <file>` | `.docx`/`.dotx` | Template for Markdown → Word exports. |
63
+ | `--move-sources` | — | After a successful convert, move sources into a `sources/` folder. |
64
+ | `--config <file>` | JSON | Conversion/output/S3 defaults (CLI flags override). |
65
+
66
+ S3/R2 (only with `--images s3`): `--s3-bucket`, `--s3-public-base-url`,
67
+ `--s3-prefix`, `--s3-endpoint-url` (required for R2), `--s3-region` (`auto` for R2),
68
+ `--s3-access-key-id`, `--s3-secret-access-key`, `--s3-cache-control`, `--s3-acl`.
69
+ Prefer keeping S3 secrets in `--config`, not on the command line.
70
+
71
+ ### Image modes (`--images`)
72
+ - `assets` — copy images into an `.assets` folder and reference them (default).
73
+ - `base64` — embed images directly as Markdown data URIs.
74
+ - `s3` — upload to S3-compatible storage (Cloudflare R2 / AWS S3); needs the S3 flags or `--config`.
75
+
76
+ ### Equation modes (`--equations`)
77
+ - `tex` — convert Word OMML equations to KaTeX-readable TeX (default).
78
+ - `image` — render equations as images (visual debugging only).
79
+
80
+ ## Editor — `regen-mde` (Windows only)
81
+
82
+ ```
83
+ regen-mde <document.md|document.docx> [options]
84
+ ```
85
+ Aliases: `mdeditor`, `regen-mdeditor`, `build-corpus-editor`.
86
+
87
+ | Flag | Effect |
88
+ |------|--------|
89
+ | `--foreground`, `--visible` | Show the editor as an attached foreground process. |
90
+ | `--background` | Launch hidden/offscreen (smoke checks). |
91
+ | `--self-test` | Verify the editor bridge can open the document. |
92
+ | `--document-self-test` | Open, edit, save Markdown, export Word, reconvert. |
93
+ | `--out <dir>` | Output directory for the document self-test. |
94
+
95
+ The GUI is a .NET 8 + WebView2 app and is **Windows-only by design**. On Linux/macOS
96
+ use the `build-corpus` CLI; there is no Linux editor build.
97
+
98
+ ## Examples
99
+
100
+ ```bash
101
+ build-corpus input.docx --out out # docx → markdown
102
+ build-corpus deck.pptx --out out # pptx → markdown
103
+ build-corpus ./word-files --out ./markdown # whole folder, recursive
104
+ build-corpus ./word-files --out-same-dir # write beside each source
105
+ build-corpus input.docx --images base64 # embed images inline
106
+ build-corpus input.md --to word --out out # markdown → Word
107
+ build-corpus input.md --to word --word-template custom.dotx --out out
108
+ build-corpus report.md --inline-images # → report.inline.md
109
+ build-corpus input.docx --images s3 --config build-corpus.config.json
110
+
111
+ # portable one-offs when build-corpus is not yet installed:
112
+ pipx run build-corpus input.docx --out out
113
+ npx -y -p regen-mde build-corpus input.docx --out out
114
+ ```
115
+
116
+ ## Boundaries
117
+ - Does not commit, deploy, or upload outputs (except images when `--images s3` is set).
118
+ - Does not modify source documents unless `--move-sources` is passed.
119
+ - Does not install global dependencies implicitly — fetch via `pipx`/`npx` as shown.
120
+ - The `regen-mde` GUI is Windows-only; do not attempt to launch it on Linux/macOS.
121
+
122
+ ## Reference
123
+ - Package: PyPI `build-corpus`, npm `regen-mde` (version-locked, dual-channel).
124
+ - Source: `github.com/LIFEAI/build-corpus` (`C:/Dev/build-corpus` locally).