Skip to content

fix: bundle skills inside the published crate so cargo publish succeeds - #18

Merged
urmzd merged 1 commit into
mainfrom
fix/bundle-skills-inside-crate
Sep 4, 2026
Merged

urmzd merged 1 commit into
mainfrom
fix/bundle-skills-inside-crate

Conversation

@urmzd

@urmzd urmzd commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Fixes the failed v0.14.0 release run.

What broke

cargo publish builds from a tarball containing only the crate directory. bootstrap.rs used include_str!("../../../../skills/..."), reaching up to the workspace root — fine locally and in CI, absent from the tarball:

error: couldn't read `src/ops/../../../../skills/agentspec-usage/SKILL.md`: No such file or directory
error: failed to verify package tarball

The merge itself was fine. Tag v0.14.0, the GitHub release, and all four binaries were published; only the crates.io step failed, so agentspec 0.14.0 is not on crates.io.

Fix

Move the bundled skills from skills/ to crates/agentspec/skills/ so they ship inside the package, and point include_str! at them. One source of truth, now inside the published crate.

cargo package --list confirms they land in the tarball:

skills/agentspec-usage/SKILL.md
skills/resource-conventions/SKILL.md

Why review missed it

Nothing in just check or CI built the crate the way the release does. Added a Package job running cargo publish --dry-run --locked on every PR, with Integration gated on it, plus a unit test pinning the skills to the crate directory so the paths cannot drift back.

Verification

  • cargo publish --dry-run -p agentspec --locked now compiles the packaged tarball clean — this is the exact check that failed in the release run.
  • just check passes: 99 unit + 45 integration.
  • Doc links in README, AGENTS.md, and llms.txt updated to the new path.

Note, separate from this PR

crates.io is at 0.12.0 — 0.13.0 never published either. Worth a look independently of this fix.

🤖 Generated with Claude Code

`cargo publish` builds from a tarball containing only the crate directory, so
`include_str!("../../../../skills/...")` escaped the package root: agentspec
built fine locally and in CI, then failed to compile from its own tarball,
taking down the v0.14.0 crates.io publish after the tag and GitHub release had
already been cut.

Move the bundled skills from the workspace root to crates/agentspec/skills/ so
they ship inside the package, and point the include_str! paths at them.

Add a Package CI job running `cargo publish --dry-run --locked` on every PR.
Nothing in `just check` built the crate the way the release does, which is why
this passed review; the Integration job now gates on it. A unit test also
pins the skills to the crate directory so the paths cannot drift back.
@urmzd
urmzd merged commit d0d10c8 into main Sep 4, 2026
6 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.

1 participant