chore(publish): stage filtered skills at publish time - #736
Conversation
0848a78 to
8e3c2d3
Compare
Replace the committed `.agents/skills` (which carries development-only skills useful in-repo) with the filtered, end-user skill set produced by `bunx skills add` during the publish job. The publish workflow whitelists `.agents/skills` for `npm pack` ad-hoc, so the entry no longer needs to live in the committed `package.json` files array. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
8e3c2d3 to
ee19e86
Compare
Code ReviewThanks for the packaging fix — the high-level approach (strip dev-only skills from the published tarball, whitelist Blocking1. PR description is massively out of sync with the diff. The body advertises a new 2. Missing Should fix3. Drift between what was tested and what gets published. The step does `bunx skills add "$SKILLS_REPO"` which fetches from the remote git URL's HEAD, not the current checkout. Tests on line 58 ran against the checked-out skills; publish ships whatever the remote default branch had at that moment. During concurrent merges this is a real race. Since the skills already live at `.agents/skills` in the checkout, consider pointing `bunx skills add` at a local path (`.` or `file://`) or filtering the local tree directly rather than re-fetching over the network. 4. No verification that `cp -R` actually copied anything. If `bunx skills add` silently no-ops (e.g. network hiccup, upstream change in flag semantics), `$HOME/.agents/skills/.` could be empty, `cp -R` succeeds with zero files, and an empty skills dir gets published without any signal. Add a post-copy assertion, e.g.: Nice to have5. Hardcoded fork URL. `SKILLS_REPO: https://github.com/flora131/atomic.git\` matches `package.json`'s `repository.url` so it's canonically correct, but `${{ github.server_url }}/${{ github.repository }}.git` would make the workflow portable across forks without edits. (Same nit applies to the existing constant in `bundle-configs.ts:26`.) 6. No version pin for `bunx skills`. `bunx` fetches latest, so reproducibility of past releases depends on whatever `skills` version was current at publish time. Consider pinning (`bunx skills@x.y.z ...`). 7. In-place `package.json` mutation. The `jq ... > tmp && mv tmp package.json` is fine, but it tightly couples "stage skills" and "allow them through the files array." If a future step is inserted between stage and publish, it's easy to miss. A tiny comment in the file pointing from the Positive
Test coverageNo tests for this CI change, which is reasonable given its nature, but it does mean the first real validation will be the next prerelease publish. Consider a dry-run via `npm pack` in CI (even on PR) that diffs the tarball's skill set against expectations — would catch regressions like issue #2 above before they hit npm. |
PR Review — Context-engineering refinements + staged-skills publishThanks for the thorough write-up. The shared Blockers / likely bugs1. PR description overstates scope — Ralph is not actually wired up. 2. 3. const headLen = Math.floor(maxChars * 0.6);
const tailLen = maxChars - headLen - 128;For 4. 5. Medium6. Copilot deep-research calls 7. 8. 9. 10. Minor / nitpicks
SecurityNothing sensitive. Test coverage summaryScratchpad I/O functions ( Happy to iterate on any of the above. The overall direction (shared context utilities, masking invariants, published-package hygiene) is solid — most of the above are the last 10%. |
Code ReviewSolid refactor — pulling masking + scratchpad utilities into a shared Critical1. Significant2. Scratchpad section parser doesn't track fenced code blocks. 3. Broken indentation in 4. Minor5. Duplicated helpers across SDK adapters. 6. Wasted 7. 8. 9. 10. Dead exports. 11. 12. 13. No cleanup of Test coverageThe pure helpers are well-covered. Notably missing:
Style / spec compliance14. 15. |
Replace the committed `.agents/skills` (which carries development-only skills useful in-repo) with the filtered, end-user skill set produced by `bunx skills add` during the publish job. The publish workflow whitelists `.agents/skills` for `npm pack` ad-hoc, so the entry no longer needs to live in the committed `package.json` files array. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Replace the committed
.agents/skillsdirectory (which carries development-only skills useful in-repo) with the filtered, end-user skill set produced bybunx skills addduring the publish job. This keeps dev-only skills out of the published npm package without having to scrub them from the working tree.Changes
.github/workflows/publish.yml: New "Stage filtered skills for npm package" step runs beforenpm publish— clears.agents/skills, runsbunx skills add "$SKILLS_REPO" --skill "*" -a opencode -a github-copilot -g -y, copies the filtered skills into.agents/skills/, then patchespackage.jsonin-place viajqto whitelist the directory fornpm pack.package.json: Removes the static.agents/skillsentry from thefilesarray — it's now added ad-hoc at publish time so the committed config doesn't pull in dev skills locally.Breaking Changes
None — CI-side packaging fix.