Skip to content

Source user and org skills/commands from the .agents convention#18

Merged
CrypticSwarm merged 2 commits into
masterfrom
dotagents-skill-command-layers
Jun 20, 2026
Merged

Source user and org skills/commands from the .agents convention#18
CrypticSwarm merged 2 commits into
masterfrom
dotagents-skill-command-layers

Conversation

@CrypticSwarm

Copy link
Copy Markdown
Owner

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 by
nothing and never reached either harness. User- and org-layer skills and
commands were sourced from each layer's harness-native config dir
(<layer>/.opencode/skills or <layer>/.claude/skills) instead, so org
agents 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.

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.
@CrypticSwarm CrypticSwarm merged commit 29f5915 into master Jun 20, 2026
1 check passed
@CrypticSwarm CrypticSwarm deleted the dotagents-skill-command-layers branch June 20, 2026 05:41
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