@lifeaitools/rdc-skills 0.18.0 → 0.19.1
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/lib/catalog.mjs +16 -9
- package/package.json +1 -1
- package/skills/deploy/SKILL.md +2 -0
- package/tests/mcp.test.mjs +11 -0
- package/skills/rdc-convert/SKILL.md +0 -127
package/lib/catalog.mjs
CHANGED
|
@@ -43,18 +43,25 @@ function readFrontmatter(skillMdPath) {
|
|
|
43
43
|
|
|
44
44
|
/** Map a raw skills_meta entry + SKILL.md frontmatter into a compact catalog row. */
|
|
45
45
|
function toCatalogEntry(name, meta, frontmatter) {
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
const fm = frontmatter || {};
|
|
47
|
+
const description = fm.description || meta.description || '';
|
|
48
|
+
// triggers/usage/slash/etc. may live in skills_meta OR the SKILL.md frontmatter.
|
|
49
|
+
// Fall back to frontmatter so a skill not (yet) registered in skills_meta stays
|
|
50
|
+
// searchable — these fields are what `rdc_skill_search` routes on.
|
|
51
|
+
const metaTriggers = Array.isArray(meta.triggers) && meta.triggers.length ? meta.triggers : null;
|
|
52
|
+
const fmTriggers = Array.isArray(fm.triggers) ? fm.triggers : [];
|
|
53
|
+
const slash = meta.slash || fm.slash || `rdc:${name}`;
|
|
49
54
|
return {
|
|
50
55
|
name,
|
|
51
|
-
slash
|
|
52
|
-
category: meta.category || 'tooling',
|
|
56
|
+
slash,
|
|
57
|
+
category: meta.category || fm.category || 'tooling',
|
|
53
58
|
summary: description,
|
|
54
|
-
when_to_use:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
59
|
+
when_to_use: metaTriggers || fmTriggers,
|
|
60
|
+
// usage falls back to the slash form so every skill carries an invocation hint.
|
|
61
|
+
usage: meta.usage || fm.usage || slash,
|
|
62
|
+
args: meta.args || fm.args || { positional: [], flags: [] },
|
|
63
|
+
requires: Array.isArray(meta.requires) ? meta.requires
|
|
64
|
+
: Array.isArray(fm.requires) ? fm.requires : [],
|
|
58
65
|
};
|
|
59
66
|
}
|
|
60
67
|
|
package/package.json
CHANGED
package/skills/deploy/SKILL.md
CHANGED
|
@@ -43,6 +43,7 @@ No raw MCP dumps. No UUIDs unless asked.
|
|
|
43
43
|
```
|
|
44
44
|
rdc:deploy: <slug> → <domain>
|
|
45
45
|
[ ] Registry lookup (slug, uuid, branch, type, env_vars_needed)
|
|
46
|
+
[ ] Runtime-source guard: if the source being deployed is static (`sites/<name>`, nixpacks/static) but the registry `runtime` for <slug> is `next`, BLOCK — never deploy a flat/static source over a Next app. A static prototype deploys only under its OWN slug (never an existing Next app's slug), dev only. Changing a slug's runtime is architectural. (`.claude/rules/production-stack-nextjs.md`)
|
|
46
47
|
[ ] Git state verified (branch matches Coolify, commit pushed)
|
|
47
48
|
[ ] Build-id resolved (default: HEAD of watched branch)
|
|
48
49
|
[ ] Env vars present in Coolify (compare to registry)
|
|
@@ -152,6 +153,7 @@ Promote a **verified `develop` change** for one app to production. This is the s
|
|
|
152
153
|
rdc:deploy promote: <slug> → <prod-domain>
|
|
153
154
|
[ ] Registry lookup: PROD row (uuid, prod branch=main, watch_paths, url)
|
|
154
155
|
[ ] PUBLISH.md status gate: status=active AND prod in environments (block if not)
|
|
156
|
+
[ ] Runtime-source guard: BLOCK promoting a static source to a prod row whose intended `runtime` is `next` — production apps are Next.js (DB-backed). (`.claude/rules/production-stack-nextjs.md`)
|
|
155
157
|
[ ] Scope resolved: --hotfix <sha> → that commit; else the app-path commits on develop not on main
|
|
156
158
|
[ ] Scope guard: promote ONLY this app's paths. NEVER merge develop→main wholesale (drags unrelated WIP to prod)
|
|
157
159
|
[ ] Clean worktree off origin/main (never switch the dirty working tree)
|
package/tests/mcp.test.mjs
CHANGED
|
@@ -94,6 +94,17 @@ function unitTests() {
|
|
|
94
94
|
check('unit: search ranks exact name first', searchSkills('deploy')[0]?.name === 'deploy');
|
|
95
95
|
check('unit: empty search returns []', searchSkills('').length === 0);
|
|
96
96
|
|
|
97
|
+
// Searchability gate — the dimension the first "100% coverage" missed. Every
|
|
98
|
+
// catalog entry MUST carry triggers + usage (frontmatter or skills_meta) so
|
|
99
|
+
// rdc_skill_search can route to it. Caught by an audit: brochurify-suite skills
|
|
100
|
+
// had frontmatter triggers the loader ignored → invisible to search.
|
|
101
|
+
check('unit: every skill has non-empty triggers (searchable)',
|
|
102
|
+
cat.every((s) => Array.isArray(s.when_to_use) && s.when_to_use.length > 0),
|
|
103
|
+
cat.filter((s) => !s.when_to_use?.length).map((s) => s.name).join(',') || 'all good');
|
|
104
|
+
check('unit: every skill has a non-empty usage string',
|
|
105
|
+
cat.every((s) => s.usage && s.usage.length > 0),
|
|
106
|
+
cat.filter((s) => !s.usage).map((s) => s.name).join(',') || 'all good');
|
|
107
|
+
|
|
97
108
|
// cloud-rewrite contract
|
|
98
109
|
const sample = '```bash\n_T=$(curl -s http://127.0.0.1:52437/v/coolify-api)\npm2 restart app\n```';
|
|
99
110
|
const rw = toCloudBody(sample);
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: rdc-convert
|
|
3
|
-
version: 0.1.0
|
|
4
|
-
description: |
|
|
5
|
-
Convert Office documents to/from Markdown with the build-corpus CLI: .docx/.pptx/.ppt → Markdown (Word OMML equations become KaTeX-readable TeX; tables, images, headings preserved), and Markdown → Word (.docx) where inline $...$ and display $$...$$ LaTeX become NATIVE Office Math (OMML) that Word renders as real equations. Use this skill whenever the user asks to convert a Word/PowerPoint document to Markdown, build a Markdown corpus from Office files, turn Markdown into a .docx (optionally with a .dotx template), or "open the report" to edit. Install build-corpus straight from GitHub and run it in the session.
|
|
6
|
-
triggers:
|
|
7
|
-
- "convert this docx to markdown"
|
|
8
|
-
- "convert to word"
|
|
9
|
-
- "docx to markdown"
|
|
10
|
-
- "pptx to markdown"
|
|
11
|
-
- "markdown to docx"
|
|
12
|
-
- "build a markdown corpus"
|
|
13
|
-
- "render the equations to word"
|
|
14
|
-
- "build-corpus"
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
# rdc-convert — Office ↔ Markdown conversion (build-corpus)
|
|
18
|
-
|
|
19
|
-
`build-corpus` is a Python CLI that converts between Office documents and Markdown.
|
|
20
|
-
This is a self-contained skill: install the tool from GitHub into the current
|
|
21
|
-
session and run `build-corpus`. No local checkout or other rdc skill is required.
|
|
22
|
-
|
|
23
|
-
## When to Use
|
|
24
|
-
- `.docx` / `.pptx` / `.ppt` → Markdown — preserves Word OMML equations (as
|
|
25
|
-
KaTeX-readable TeX), tables, images, headings, and lists.
|
|
26
|
-
- Markdown → Word (`.docx`) — inline `$...$` and display `$$...$$` LaTeX are
|
|
27
|
-
converted to **native OMML** Word renders as real equations; optional `.dotx`
|
|
28
|
-
template via `--word-template`.
|
|
29
|
-
- Build a Markdown corpus from a folder of Office files (recursive, one pass).
|
|
30
|
-
- Inline a Markdown file's images as data URIs, or rehost them to R2/S3.
|
|
31
|
-
|
|
32
|
-
## When NOT to Use
|
|
33
|
-
- Rendering a folder/HTML/zip into a print-ready **PDF** brochure (that is a
|
|
34
|
-
separate brochure pipeline).
|
|
35
|
-
- Rasterizing HTML/JSX/SVG to images — build-corpus is a format converter, not a
|
|
36
|
-
render engine; it flags those and a separate render step handles them.
|
|
37
|
-
|
|
38
|
-
## Install & Run (install from GitHub — it is the source of truth)
|
|
39
|
-
|
|
40
|
-
The published PyPI/npm packages lag GitHub. Install from the repository to get the
|
|
41
|
-
current behavior (native LaTeX→OMML, the fidelity report, the escaped-currency fix):
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
pip install "git+https://github.com/LIFEAI/build-corpus.git@feat/dual-package-ubuntu"
|
|
45
|
-
# once merged to main, drop the @branch:
|
|
46
|
-
# pip install "git+https://github.com/LIFEAI/build-corpus.git"
|
|
47
|
-
build-corpus --help
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
This installs the `build-corpus` command and its dependencies (latex2mathml,
|
|
51
|
-
mathml2omml, python-docx, Pillow, omml2latex). Notes:
|
|
52
|
-
- Debian/Ubuntu externally-managed Python (PEP 668): add `--break-system-packages`,
|
|
53
|
-
use a venv, or `pipx install "git+https://github.com/LIFEAI/build-corpus.git@feat/dual-package-ubuntu"`.
|
|
54
|
-
- S3/R2 image upload: append `[s3]` to the package spec.
|
|
55
|
-
- Legacy `.ppt` input also needs LibreOffice (`soffice`) on PATH (`apt install libreoffice`).
|
|
56
|
-
`.docx`/`.pptx` need nothing extra.
|
|
57
|
-
|
|
58
|
-
## Command Reference
|
|
59
|
-
|
|
60
|
-
```
|
|
61
|
-
build-corpus <input> [input ...] [options]
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
`<input>` — one or more `.md`, `.docx`, `.pptx`, or `.ppt` files or directories.
|
|
65
|
-
|
|
66
|
-
| Flag | Values / default | Effect |
|
|
67
|
-
|------|------------------|--------|
|
|
68
|
-
| `--out <dir>` | path | Output directory for the converted tree. |
|
|
69
|
-
| `--out-same-dir` | — | Write `.md`, `.assets`, and reports beside each source file. |
|
|
70
|
-
| `--to` | `auto` \| `markdown` \| `word` (default `auto`) | Output target. `auto` infers from a single-file input. |
|
|
71
|
-
| `--images` | `assets` \| `base64` \| `s3` (default `assets`) | Image handling. |
|
|
72
|
-
| `--equations` | `tex` \| `image` (default `tex`) | docx→md: OMML → KaTeX TeX, or rendered images (debug). |
|
|
73
|
-
| `--inline-images` | — | Emit `<name>.inline.md` with images embedded as data URIs. |
|
|
74
|
-
| `--word-template <file>` | `.docx`/`.dotx` | Template for Markdown → Word exports. |
|
|
75
|
-
| `--move-sources` | — | After a successful convert, move sources into a `sources/` folder. |
|
|
76
|
-
| `--config <file>` | JSON | Conversion/output/S3 defaults (CLI flags override). |
|
|
77
|
-
|
|
78
|
-
S3/R2 (only with `--images s3`): `--s3-bucket`, `--s3-public-base-url`,
|
|
79
|
-
`--s3-prefix`, `--s3-endpoint-url` (required for R2), `--s3-region` (`auto` for R2),
|
|
80
|
-
`--s3-access-key-id`, `--s3-secret-access-key`, `--s3-cache-control`, `--s3-acl`.
|
|
81
|
-
|
|
82
|
-
## Equations (real in both directions)
|
|
83
|
-
- **docx → markdown** (`--equations`): `tex` converts Word OMML equations to
|
|
84
|
-
KaTeX-readable TeX (default); `image` renders them as images (debug only).
|
|
85
|
-
- **markdown → word** (`--to word`): inline `$...$` and display `$$...$$` LaTeX are
|
|
86
|
-
converted to **native OMML** (`\sum`, `\int`, `\frac`, `\Delta`, `\rightarrow`,
|
|
87
|
-
`\leq`, …). Escaped currency like `\$252.3B` is kept as literal text, never mistaken
|
|
88
|
-
for math. Unparseable fragments fall back to Cambria-Math text and are flagged in the
|
|
89
|
-
report. Fence display math with `$$` on their own lines, no blank lines inside.
|
|
90
|
-
|
|
91
|
-
## Fidelity report (md → word)
|
|
92
|
-
Each md→word export writes `export-report.json` (and a batch report) so you can
|
|
93
|
-
confirm nothing was silently dropped or changed:
|
|
94
|
-
- **`fidelity_ok`** — top-level ship gate (`true` only when every row matches and no
|
|
95
|
-
equation fell back).
|
|
96
|
-
- **`reconciliation`** — input vs output per type (`tables`, `equations`
|
|
97
|
-
{in/out_omml/fell_back}, `images` {in/out/failed}, `code_blocks`, `headings`, `links`).
|
|
98
|
-
- **`issues`** — `{ type, line, source|target, reason }` per problem.
|
|
99
|
-
- **`text_fixups`** — markdown escapes the engine resolved (e.g. `currency_unescaped`).
|
|
100
|
-
- A one-line **stdout digest** for a quick glance.
|
|
101
|
-
|
|
102
|
-
Image-failure `reason` values: `missing-file`, `unsupported-on-platform` (EMF/WMF —
|
|
103
|
-
install LibreOffice), `unsupported-format` (.html/.jsx — route to a render pipeline),
|
|
104
|
-
`svg-needs-rasterization` / `mislabeled-svg` (rasterize the SVG to PNG and repoint),
|
|
105
|
-
`skipped-remote`.
|
|
106
|
-
|
|
107
|
-
## Examples
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
build-corpus input.docx --out out # docx → markdown
|
|
111
|
-
build-corpus deck.pptx --out out # pptx → markdown
|
|
112
|
-
build-corpus ./word-files --out ./markdown # whole folder, recursive
|
|
113
|
-
build-corpus ./word-files --out-same-dir # write beside each source
|
|
114
|
-
build-corpus input.md --to word --out out # markdown → Word (LaTeX → OMML)
|
|
115
|
-
build-corpus input.md --to word --word-template custom.dotx --out out
|
|
116
|
-
build-corpus report.md --inline-images # → report.inline.md
|
|
117
|
-
build-corpus input.docx --images s3 --config build-corpus.config.json
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
## Boundaries
|
|
121
|
-
- Does not commit, deploy, or upload outputs (except images when `--images s3`).
|
|
122
|
-
- Does not modify source documents unless `--move-sources` is passed.
|
|
123
|
-
- Does not rasterize HTML/JSX/SVG — flags them for an external render step.
|
|
124
|
-
|
|
125
|
-
## Reference
|
|
126
|
-
- Source (install from here): `github.com/LIFEAI/build-corpus`
|
|
127
|
-
- Packages (currently lag GitHub): PyPI `build-corpus`, npm `regen-mde`.
|