Skip to content

✨ feat: declarative environments (agt.toml, agt.lock, agt sync) - #3

Merged
jiunbae merged 2 commits into
mainfrom
feat/env-manifest
Oct 1, 2026
Merged

jiunbae merged 2 commits into
mainfrom
feat/env-manifest

Conversation

@jiunbae

@jiunbae jiunbae commented Oct 1, 2026

Copy link
Copy Markdown
Member

Summary

gh skill install is becoming the standard way to fetch a skill. This PR builds on it instead of competing with it: agt now declares, pins, and reproduces a team's agent environment.

  • agt.toml declares skills ([env], [sources], [skills]). The existing [setup] table is never executed by sync.
  • agt.lock pins each skill to a commit SHA, its git tree SHA, and a normalized integrity hash.
  • New commands: agt init | add skill | remove | sync [--check|--frozen] | lock [--update]
  • -g manages the user environment in ~/.config/agt/agt.toml
  • GitHub access goes through gh (gh skill install --pin <sha> --dir, gh api). agt resolves grouped catalog layouts (<group>/<name>/SKILL.md) that gh's discovery misses.
  • Restores executable bits that gh skill install drops (100755 → 644)
  • Only modifies directories marked .agt-managed (owner: project, or the user manifest path), so it is safe across checkout moves.
  • Design doc: docs/design/0001-agent-env-manifest-and-doctor.md (M1 of 5)

Test plan

  • make ci (fmt, clippy -D warnings, 160 tests incl. a fake-gh suite for sync/lock/drift/removal/conflicts)
  • E2E with real gh 2.102.0: init → add ×2 → idempotent sync → tamper detected by --check and restored → remove → gh skill list shows pinned
  • Fresh-checkout simulation: delete installed dirs, sync --frozen restores from cache

🤖 Generated with Claude Code

@jiunbae jiunbae mentioned this pull request Oct 1, 2026
3 tasks done
… sync

Declare skills in agt.toml, pin them to commit and git tree SHAs in
agt.lock, and make every checkout match with `agt sync`. GitHub content
is fetched through `gh skill install`, so agt builds on the official
install path instead of duplicating it.

- New commands: init, add, remove, sync (--check/--frozen), lock (--update)
- -g manages the user environment in ~/.config/agt/agt.toml
- Normalized integrity hash ignores gh's injected github-* frontmatter
- Restores executable bits that gh skill install drops
- Only touches directories marked .agt-managed
- Design doc: docs/design/0001-agent-env-manifest-and-doctor.md

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jiunbae
jiunbae force-pushed the feat/env-manifest branch from 78bf5ff to 29062bd Compare October 1, 2026 08:33
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jiunbae
jiunbae merged commit 650183f into main Oct 1, 2026
4 checks passed
@jiunbae
jiunbae deleted the feat/env-manifest branch October 1, 2026 09:03
@jiunbae jiunbae mentioned this pull request Oct 1, 2026
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