Skip to content

feat: rewrite build-skills.ts as copy-only from the pinned boxel-skills tag#5501

Merged
lukemelia merged 5 commits into
mainfrom
cs-11543-rewrite-packagesboxel-cliscriptsbuild-skillsts-as-copy-only
Jul 14, 2026
Merged

feat: rewrite build-skills.ts as copy-only from the pinned boxel-skills tag#5501
lukemelia merged 5 commits into
mainfrom
cs-11543-rewrite-packagesboxel-cliscriptsbuild-skillsts-as-copy-only

Conversation

@lukemelia

@lukemelia lukemelia commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Linear: CS-11543

boxel-skills is markdown-first now (skills/<name>/SKILL.md + references/ + scripts/ directories, commands/<name>.md slash-command files), so the plugin build no longer transforms Skill card JSON into SKILL.md files. Per Spec §7, build-skills.ts reduces to copying skills/ and commands/ from the pinned tag into plugin/, byte-for-byte.

This PR ships only the machinery (4 files). The ~234-file content cutover is intentionally not committed here: the on-main publish workflow runs pnpm build:skills after merge and commits the regenerated plugin/ itself, as it does for every regen. The content is byte-copies of the already-reviewed boxel-skills v0.0.28 tag.

What stays, per the ticket:

  • Pinned-tag model — bumped from v0.0.22 to v0.0.28, the current tag with the merged workspaces content and the boxel.commandsboxel.tools rename. BOXEL_SKILLS_REPO=/path still overrides for local iteration.
  • Manifest-based stale sweepscripts/.boxel-skills-manifest.json records copied skills and commands; entries that drop out of the source get deleted from plugin/. CLI-authored skills (file-ops, realm-sync, …) are never in the manifest, so the sweep can't touch them. The old manifest shape (no commands key) still loads, which is what lets the first post-merge run sweep the four retired generated dirs (boxel-development, dev-*).

What's gone: the SkillSet/SkillPlusMarkdown emission plan, DESCRIPTION_OVERRIDES, and EXCLUDED_IDS — descriptions are authored in each SKILL.md's frontmatter, and the new content is written for this consumer (the previously host-only boxel-environment material now drives Boxel via npx boxel).

New surfaces after the post-merge regen:

  • plugin/commands/ ships the 17 upstream commands as /boxel-cli:<name> slash commands.
  • plugin/README.md's auto-generated block gains skill and command tables, read from frontmatter (minimal single-line reader — the copied files are the contract; the table is a convenience). The README is the only file the script still prettier-formats.
  • The publish workflow's auto-commit stages plugin/commands, plugin/README.md, and the manifest alongside plugin/skills.
  • .prettierignore covers plugin/skills/ and plugin/commands/: lint-staged routes staged markdown through prettier, which rewrites the verbatim copies away from upstream bytes (its markdown parser even mangles underscore emphasis like error_doc). Verified eslint . and tsc are unaffected by the copied content (including the patterns' example.gts files, which this package's eslint config doesn't lint).

Verified: copies are byte-identical to the tag (diff -r; the only extras under plugin/skills/ are the nine CLI-authored skills), a second pnpm build:skills run is a no-op, 13 unit tests cover manifest back-compat / stale-sweep math / the frontmatter reader, and the full boxel-cli unit suite passes (348).

Version bump is left to the release automation (feat: + plugin surface → minor).

🤖 Generated with Claude Code

lukemelia and others added 2 commits July 14, 2026 15:41
boxel-skills is markdown-first now — skills/<name>/SKILL.md directories
and commands/<name>.md slash-command files are already in the shape
Claude Code consumes — so the cards-to-SKILL.md transform (aggregator
emission, description overrides, host-only exclusions) is gone. The
script copies skills/ and commands/ verbatim into plugin/, keeps the
pinned-tag model (bumped to v0.0.28, the first tag with the new
layout), and keeps the manifest-based stale sweep, now covering
commands too. The plugin README's auto-generated block lists both
catalogs from each file's frontmatter; the publish workflow stages the
new outputs.

Linear: CS-11543

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The on-main publish workflow runs build:skills and commits the content
cutover itself; this branch carries only the build machinery.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lukemelia
lukemelia force-pushed the cs-11543-rewrite-packagesboxel-cliscriptsbuild-skillsts-as-copy-only branch from a7e9095 to 410876f Compare July 14, 2026 20:02
lukemelia and others added 2 commits July 14, 2026 16:02
…agesboxel-cliscriptsbuild-skillsts-as-copy-only
lint-staged routes staged markdown through prettier, which rewrites the
verbatim copies away from the upstream bytes (its markdown parser even
mangles underscore emphasis like error_doc). Ignore plugin/skills/ and
plugin/commands/ so pre-commit and format passes leave the copies alone,
and restore the one file the hook already mangled.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rewrites packages/boxel-cli/scripts/build-skills.ts to stop generating/translating skill content and instead verbatim-copy skills/ and commands/ from a pinned cardstack/boxel-skills git tag into packages/boxel-cli/plugin/, while keeping a manifest-based stale sweep and regenerating the plugin README tables from frontmatter.

Changes:

  • Replace the previous JSON-card → markdown emission pipeline with a copy-only pipeline from boxel-skills@v0.0.28, including stale-entry sweeping for both plugin/skills/ and plugin/commands/.
  • Update unit tests to cover the new manifest shape/back-compat and the minimal frontmatter parser used for README table generation.
  • Ensure repo formatting tooling doesn’t rewrite the copied markdown, and ensure the publish workflow stages the new generated surfaces.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
packages/boxel-cli/scripts/build-skills.ts Replaces “emit” logic with copy-only skills/ + commands/, updates manifest shape, and updates README regeneration from frontmatter.
packages/boxel-cli/tests/scripts/build-skills.test.ts Drops emission-plan tests; adds coverage for new manifest parsing/back-compat and frontmatter parsing.
.prettierignore Ignores copied plugin markdown to avoid prettier drifting verbatim upstream bytes.
.github/workflows/boxel-cli-publish.yml Adds plugin/commands, plugin/README.md, and the manifest to the staged regen commit set.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/boxel-cli/scripts/build-skills.ts
Comment thread packages/boxel-cli/scripts/build-skills.ts Outdated
Comment thread packages/boxel-cli/scripts/build-skills.ts
The README auto-gen skill table emitted bare frontmatter names (e.g.
`boxel`) while the command table and all surrounding README text use
the `/boxel-cli:<name>` slash-invocation form. Key skill rows by their
directory name with the same prefix, matching the command loop.

Extract the block builder into a pure `renderCatalogBlock` so the
table/escaping/prefixing logic is unit-tested without touching the real
plugin README.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@lukemelia
lukemelia merged commit c18e6d8 into main Jul 14, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants