Skip to content

feat(project): compile skill artifacts to tree hashes + bundle zips - #141

Merged
josegironn merged 1 commit into
mainfrom
josegironn/project-skills
Jul 27, 2026
Merged

feat(project): compile skill artifacts to tree hashes + bundle zips#141
josegironn merged 1 commit into
mainfrom
josegironn/project-skills

Conversation

@josegironn

@josegironn josegironn commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Compile-side support for skill artifacts in file-based projects. Skills (<srcDir>/skills/<slug>/ with SKILL.md) compile to { slug, treeHash } — the dir's git tree object hash — and --skill-bundles-dir <dir> additionally writes each skill's <treeHash>.zip for the platform compile job to stage in S3. The CLI never touches S3; local compile without the flag stays pure/offline.

  • Bundle handling is byte-safe (binary files welcome; only SKILL.md decoded for frontmatter), no extension allow-list, 200-file cap, symlinks rejected — matching mono-builder MAJ-317.
  • Tree hash resolution surfaces clear issues for not-a-git-repo / never-committed / uncommitted skill-dir changes (dirty dirs are a hard issue for now; the authoritative compile job always runs on a clean clone).
  • agents/skills omitted when empty (server contract treats both as optional); "skills" returns to the reserved agent.json fields (attachment stays a platform action).
  • agent.schema.json re-vendored from mono-builder; schemas-drift CI stays red until mono-builder PR #1922 deploys (expected).

Coupling

mono-builder #1922 consumes this: after merge, cut a release and bump the go-project-compiler Dockerfile pin there — the job now passes --skill-bundles-dir unconditionally.

Testing

go build ./..., go vet ./..., go test ./... -count=1 green; fixtures use real temp git repos; zip round-trips asserted byte-identical including binary content.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KgHMhia4ZHmppQ2EYoX1TT

Made with Orca 🐋

Skills are directories under <srcDir>/skills/<slug>/ containing SKILL.md.
Compile emits { slug, treeHash } per skill (git tree hash of the dir at HEAD;
not-a-repo / never-committed / dirty dir surface as issues) and, with the new
--skill-bundles-dir flag, writes each skill's zip as <treeHash>.zip — raw bytes
end to end (only SKILL.md is decoded, for frontmatter), no extension
allow-list, 200-file cap, symlinks rejected. The bundle S3 location is injected
by the platform compile job, never by the CLI.

agents/skills are omitted from the compiled config when empty (the server
contract treats both as optional); "skills" returns to the reserved agent.json
fields. agent.schema.json re-vendored from mono-builder (drift check goes green
once that side deploys).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KgHMhia4ZHmppQ2EYoX1TT

Co-authored-by: Orca <help@stably.ai>
@josegironn
josegironn merged commit e41428e into main Jul 27, 2026
1 check 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