buzz icon indicating copy to clipboard operation
buzz copied to clipboard

Snapshot v2: carry skills (agent_snapshot.rs deferred item) — fixtures offered

Open hccbuddy-svg opened this issue 4 months ago • 1 comments

agent_snapshot.rs specs skills as a deferred item for the snapshot format. We'd like to pick that discussion back up.

Context: hivepack converts Claude Code agent definitions into Buzz personas and bundles each agent's skills directory into the pack. That makes it a natural round-trip test case for snapshot v2: export a snapshot of an agent that has bundled skills, import it on a second machine, and the agent still has its skills.

Offer: we can contribute test fixtures (real packs with skills of varying shapes — plain markdown, scripts, nested resources) and a draft of the zip layout from hivepack's pack format, if the maintainers want to restart the format discussion. No strong opinions on the final layout — mainly we want the capability and are willing to do legwork.

🤖 Generated with Claude Code

hccbuddy-svg avatar Aug 01 '26 12:08 hccbuddy-svg

Commercial user of persona packs here, with a use case that might help prioritise this.

We're an agency shipping a crew of Buzz agents to clients as a downloadable bundle: the client installs Buzz locally, imports the pack, and gets our agents plus the ~50 skills those agents depend on. Snapshots already give us the persona half cleanly, and the secret-exclusion guarantees are exactly right for this — nothing of ours needs to travel with it. Skills are the one thing we currently have to deliver out-of-band, as a folder the client drops into .claude/skills/ by hand. It works, but it's the only step in the whole handover that isn't self-contained, and it's the step clients get wrong.

A narrower path than snapshot v2: the pack side may be closer to done than the snapshot side. resolve_skills() in crates/buzz-persona/src/pack.rs already implements the §6 scoping rules (claimed vs. shared, path normalisation) and currently has no callers. crates/buzz-agent/src/hints.rs already scans .agents/skills/ with collision handling and tests. What's missing between them is the copy step at session init, plus the surrounding items already itemised in §16 — PF-4 ($AGENT_CWD resolution), PF-3 (collision warning), PF-5 (parse-failure warning).

If that framing is right, packs could carry skills end-to-end without settling the zip-layout question that snapshot v2 needs, and snapshot v2 could reuse the same copy logic later.

One data point on skill shape, since it affects what the copy step has to handle. The spec's examples show skills/<name>/SKILL.md — a single file per skill. Our vault is materially heavier than that:

  • 49 skills, 5.3 MB total
  • 10 of the 49 have nested subdirectories, the deepest running 10 levels below the skill root
  • largest single skill is 2.0 MB across 137 files
  • file mix is 132 .ts, 101 .md, 95 .txt, 28 .tsx, 21 .sql, 9 .json, 6 .py, 3 .yml
  • no symlinks and no executable bits anywhere, so the copy shouldn't need to preserve modes

We mention it because a copy step written against the flat single-file assumption would work in fixtures and fail on a real vault. If a size ceiling or a depth limit is wanted, better to decide it deliberately than discover it.

Offer: we're willing to do the implementation work for PF-3/4/5 and the copy step, following §6 as written — we have no opinions on the design, we just want the capability. We can test it against the vault above, separately from any fixtures contributed here.

Before we start: is this direction something maintainers would want, and would you prefer it as one PR or split along the PF boundaries? Happy to defer entirely if this is already someone's work in progress.

lukesbrave avatar Aug 07 '26 01:08 lukesbrave