Source user and org skills/commands from the .agents convention#18
Merged
Conversation
User- and org-layer skills and commands were sourced from each layer's
harness-native config dir (`<layer>/.opencode/skills` or
`<layer>/.claude/skills`), so a skill dropped at the harness-neutral
`<org-root>/.agents/skills` -- the same place org agents and tongs live
under `.swarmforge` -- was read by nothing and never reached either harness.
Move these layers onto the portable `.agents/{skills,commands}` convention
already used for the workspace overlay. The Makefile mounts `~/.agents` and
`$(SWARMFORGE_ORG_CONFIG_ROOT)/.agents` read-only (wildcard-guarded, like the
asset mounts) and exports them as SWARMFORGE_DOTAGENTS_{USER,ORG}_DIR; the
entrypoint's copy_shared_assets reads skills and commands from those instead
of the config layers. The command source dir is now always `commands` (the
`.agents` standard) for every harness, while the harness-specific destination
is unchanged.
The vars are named DOTAGENTS, not AGENTS, to stay distinct from the
unified-agent asset pipeline whose agents live in `.swarmforge/agents` under
SWARMFORGE_ASSETS_*. The Swarmforge repo keeps its own special shared `skills/`
and `commands/` (SWARMFORGE_SKILLS_DIR / SWARMFORGE_COMMAND_DIR), and the
workspace `.agents` overlay is untouched, so precedence is preserved lowest to
highest: user .agents, org .agents, repo shared, workspace .agents.
The old harness-native config-dir source is dropped rather than kept alongside
the new one: skills and commands are portable, so a single neutral location per
layer is unambiguous, and anything previously under `<layer>/.claude/skills` or
`<layer>/.opencode/skills` must move to `.agents/`. The config dirs are still
consumed for the config merge (opencode.json and the like); only their
skills/commands sourcing goes away, which the merge already excluded.
Update the skills and commands documentation to match the new sourcing: the
user and org layers now come from `~/.agents/{skills,commands}` and
`$(SWARMFORGE_ORG_CONFIG_ROOT)/.agents/{skills,commands}` (overridable via
SWARMFORGE_{USER,ORG}_DOTAGENTS_DIR), the Swarmforge repo keeps its own shared
`skills/` and `commands/`, and the workspace overlay stays `<workspace>/.agents`.
The three places that described skills and commands flowing from the config
layers are corrected, and a note records that harness-native dirs such as
`<layer>/.claude/skills` are no longer consulted for these portable formats.
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
A skill or command dropped at the harness-neutral
<org-root>/.agents/skills-- the same place org agents and tongs live under
.swarmforge-- was read bynothing and never reached either harness. User- and org-layer skills and
commands were sourced from each layer's harness-native config dir
(
<layer>/.opencode/skillsor<layer>/.claude/skills) instead, so orgagents and tongs merged while org skills silently did not.
This moves the user and org layers onto the portable
.agents/{skills,commands}convention already used for the workspace overlay.