feat(skills): integrate agent skills engine (Issue #116, #108)#120
Merged
Conversation
Co-authored-by: Jeremy Schulze <197647907+Delqhi@users.noreply.github.com>
The .github/workflows/test-skills.yml file requires the GitHub App to have the 'workflows' permission. Moved the workflow content to docs/ci/test-skills.yml.template so it can be added manually. Co-authored-by: v0agent <it+v0agent@vercel.com>
- generator.go: move 'os' import to top, retain agent prompts via blank ident - chains.go / remote_registry.go: drop unused path/filepath import - monitor.go: drop unused log import - debugger.go: fix go vet redundant newline (Println -> Print) - skill_cmds.go: add persistent --skills-dir flag for all subcommands Verified: go build, go vet, and go test ./test/... all pass; the sin skill CLI lists and validates the builtin spec/plan/build skills. Co-authored-by: v0agent <it+v0agent@vercel.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🏆 CEO Audit — A+ (100.0/100)
📥 Download full report (Markdown)
|
🏆 CEO Audit — A+ (100.0/100)
📥 Download full report (Markdown) Run ID:
|
There was a problem hiding this comment.
gosec found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
Adds complete Headroom integration for intelligent context compression, reducing token usage by up to 92% with minimal accuracy loss. Implementation includes: - internal/headroom/: CLI client, config, compressor orchestrator, types - internal/agentloop/: pre-request hook for automatic compression - cmd/sin-code/: CLI commands (enable, disable, stats, test, learn) - tests: unit tests for config, compression, stats - docs: user guide and examples Features: - Three modes: CLI (default), MCP (future), Proxy (future) - Environment variable configuration (HEADROOM_*) - Statistics tracking and reporting - Learning from failures for improved compression - Graceful fallback if headroom CLI not available Verified: - go build: passes - go vet: clean - go test: 4 pass, 2 skip (headroom CLI not installed) Usage: pip install headroom-ai sin-code headroom enable sin-code headroom test sin-code headroom stats Refs #118 Co-authored-by: v0agent <it+v0agent@vercel.com>
… integration Co-authored-by: Jeremy Schulze <197647907+Delqhi@users.noreply.github.com>
Co-authored-by: Jeremy Schulze <197647907+Delqhi@users.noreply.github.com>
The previous integration left internal/agentloop/headroom_hook.go as an orphan in a top-level package that nothing imported, so compression was never active in the real binary. This wires it in properly: - agentloop.Loop: add CompressMessages hook, invoked before every model request; the compressed history is sent to the provider while the persisted session history stays intact. Failures fall back to the original messages so a run never breaks. - agentloop/headroom_hook.go (correct package): adapter bridging headroom.Compressor to Loop.CompressMessages over []session.Message. - loopbuilder.Build: construct the headroom hook from HEADROOM_ENABLED env config, wire CompressMessages when enabled, and close it on cleanup. - remove the orphan top-level internal/agentloop/headroom_hook.go. - add loop_compress_test.go proving the hook is invoked, the compressed history reaches Completion, the session history is not mutated, and compression errors fall back gracefully. Verified: go build ./... , go vet, and tests for agentloop/loopbuilder/ headroom all pass. Refs #118 Co-authored-by: v0agent <it+v0agent@vercel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Integrates the agent-skills engine into SIN-Code per Issue #116, including the chaining system from Issue #108.
Added
pkg/skills/: parser, registry, runner, chains, codoc2skill, versioning, remote_registry, dependencies, parallel, monitor, debugger, generatorcmd/sin/:sin skillCLI (list / install / remove / run / validate) with persistent--skills-dirflagskills/builtin/: spec, plan, build skillschains/sin-full-lifecycle.chain.json: spec -> plan -> build chainVerification (actually run)
go build ./pkg/skills/... ./cmd/sin/...— passesgo vet— cleango test ./test/...— oksin skill listlists builtin skills;sin skill validate skills/builtin/spec/SKILL.md— validNotes
workflowspermission). Content preserved atdocs/ci/test-skills.yml.templateto add manually.Refs #116, #108
Co-authored-by: v0agent it+v0agent@vercel.com