Skip to content

feat(skills): integrate agent skills engine (Issue #116, #108)#120

Merged
Delqhi merged 7 commits into
mainfrom
sin-code-integration-1
Jun 14, 2026
Merged

feat(skills): integrate agent skills engine (Issue #116, #108)#120
Delqhi merged 7 commits into
mainfrom
sin-code-integration-1

Conversation

@Delqhi

@Delqhi Delqhi commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

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, generator
  • cmd/sin/: sin skill CLI (list / install / remove / run / validate) with persistent --skills-dir flag
  • skills/builtin/: spec, plan, build skills
  • chains/sin-full-lifecycle.chain.json: spec -> plan -> build chain
  • Tests, config, install script, docs

Verification (actually run)

  • go build ./pkg/skills/... ./cmd/sin/... — passes
  • go vet — clean
  • go test ./test/... — ok
  • sin skill list lists builtin skills; sin skill validate skills/builtin/spec/SKILL.md — valid

Notes

  • CI workflow could not be pushed (GitHub App lacks workflows permission). Content preserved at docs/ci/test-skills.yml.template to add manually.

Refs #116, #108

Co-authored-by: v0agent it+v0agent@vercel.com

v0agent and others added 3 commits June 14, 2026 15:14
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>
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sin-code Ready Ready Preview, Comment, Open in v0 Jun 14, 2026 3:51pm

@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown

🏆 CEO Audit — A+ (100.0/100)

Metric Value
Grade A+
Score 100.0/100
Critical findings 0
High findings 0
Profile QUICK
Min grade gate B

📥 Download full report (Markdown)
📊 Download SARIF (for Code Scanning)

Run ~/.config/opencode/skills/ceo-audit/scripts/audit.sh . --profile=QUICK locally to reproduce.

@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown

🏆 CEO Audit — A+ (100.0/100)

Metric Value
Grade A+
Score 100.0/100
Critical findings 0
High findings 0
Medium findings 0
Profile QUICK
Min grade gate B

📥 Download full report (Markdown)

Run ID: 27504075456 · Commit: ${github.sha}

Run ~/.config/opencode/skills/ceo-audit/scripts/audit.sh . --profile=QUICK locally to reproduce.

@github-advanced-security github-advanced-security AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
@Delqhi Delqhi merged commit 31dca6d into main Jun 14, 2026
8 of 10 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.

3 participants