Skip to content

feat: skills local to a working tree; project skills bound to their repository (ADR-0079) - #388

Merged
7schmiede merged 2 commits into
mainfrom
feat/repo-bound-skills
Oct 30, 2026
Merged

7schmiede merged 2 commits into
mainfrom
feat/repo-bound-skills

Conversation

@7schmiede

Copy link
Copy Markdown
Member

Closes #386.

Review card (ADR-0070)

Approved by the owner in the conversation on 2026-10-30, all seven points (point 1 refined there: which agents' working-tree folders are written is the user's choice per machine, as on the Skills page).

Category Point Beats Reversing costs
concept Each working tree has a local, untracked layer of skills: devstack's generated skills and the pool's skills bound to its repository. The hub writes them into the skill folders in the working tree of the agents switched on (each agent's folder from the agent table; the user's switches per machine decide), for every stack and worktree it follows (ADR-0078). MCP instructions with a skill tool; user folders with a rewritten description; .devstack/skills with a pointer from AGENTS.md. The layer goes; devstack's skills are committed again, bound ones go into the user folders.
trust Every folder devstack writes there ignores itself (.gitignore with *); the hub's lock records what it wrote. A foreign or hand-changed skill of the same name stays and is shown as a conflict; a file git tracks is never written. ADR-0071 is amended. If wrong: the hub overwrites a repository's own skill or one the user changed. An entry in the repository's .gitignore; .git/info/exclude. The exception in ADR-0071 goes; the hub removes what its lock names.
concept devstack's generated skills are no longer tracked: their version follows the local devstack, the hub writes them again when devstack or the stack file changes. devstack skills install writes them the same way. The upgrade prompt has the agent take tracked copies out of git once. Cloud agents and CI then have no devstack skills. Tracked copies that change with every update and flip between teammates on different versions. They are tracked again, through the prompt.
contract metadata.repos: [acme/shop] binds a skill, matched against the end of the origin path, case and host aside. A bound skill goes only into the agents' folders of matching working trees, never the user folders; unbound skills behave as before. An older hub ignores the field. A binding by a set flag only. A pool-protocol field.
contract A set can name several folders, each with its own to (and repos); a set of one path/to stays as it is. A set per folder. Pool protocol and skills.json.
trust The coordinator checks the folder allocation for a skill's archive too, not only in the list. If wrong: a member downloads a project's knowledge it does not work on. Filtering the list only. None; stricter.
contract GET /hub/skills carries per skill repos and the working trees it is in; the Skills page shows both. Binding in the detail only. Hub API, additive.

Decided on my own: entries of metadata.repos match the last segments of the origin URL path (so project/_git/name works for Azure); a skill name in two folders of a set is left out of both; with folders a set's own to/repos must be empty; the CLI pairs --path/--to/--repos by order (- = no repos) and takes the set out again if an older coordinator dropped folders or binding; the hub re-syncs the working-tree layer when the worktrees' version or a registered stack file changes (checked every 3 s, at least once a minute); [agents] skills keeps working for devstack skills install, the hub goes by the agent switches (no stack file changes meaning); the prompts' untrack step is not version-gated (repositories skip releases; it does nothing without tracked copies). This repository's .claude/skills/devstack* are taken out of git here.

What was checked

  • Claude Code 2.1.312 and OpenCode list (Claude also runs) a skill in .claude/skills / .agents/skills whose folder ignores itself. Codex (login expired) and the Copilot CLI (not installed) were not tried.
  • cargo test for devstack-skills, devstack-node (incl. tests/skills.rs: folders per member, archive 404), devstack-hub (bound skills into matching worktrees only, tracked file left, worktree removed, skill bound later leaves the user folder), devstack: green on Windows. cargo clippy --all-targets, cargo fmt clean.
  • UI: npm run typecheck, vitest (97) green; Skills page and pool admin checked in the mock lane (screenshots). The folder rows of the admin form were not clicked through.
  • Not tried on macOS/Linux beyond CI.

🤖 Generated with Claude Code

…epository (ADR-0079)

A pool's skill with `metadata.repos` goes into the agents' skill folders of
the working trees of that repository, not the user folders; a set can name
several folders, each given to its own members, checked on download too.
devstack's generated skills are local to the working tree as well: each
folder ignores itself, the hub keeps them current for the agents switched
on, and the prompts take committed copies out of git.

Closes #386

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit 3fedcc9 into main Oct 30, 2026
@7schmiede
7schmiede deleted the feat/repo-bound-skills branch October 30, 2026 17:06
@7schmiede 7schmiede mentioned this pull request Oct 30, 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.

Skill sets: bind project skills to their repository

1 participant