@lifeaitools/rdc-skills 0.12.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.12.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",
@@ -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).