Add [run.agent] skill_dirs for workflow and automation runs - #751
Open
mikaoelitiana wants to merge 1 commit into
Open
Add [run.agent] skill_dirs for workflow and automation runs#751mikaoelitiana wants to merge 1 commit into
mikaoelitiana wants to merge 1 commit into
Conversation
Skill discovery for workflow and automation runs was fixed to the three convention directories. `SessionOptions.skill_dirs` existed in the agent SDK but was only settable by constructing a `Session` in Rust, so a repository keeping its skills elsewhere (`.agents/skills`, the Open Agent Skills convention) had no configuration-driven way to surface them. Add `[run.agent] skill_dirs`, resolved like every other run setting and carried through the run spec into each agent session. Configured directories are *added to* the conventions and searched last, so a skill defined there overrides a same-named convention skill; relative entries resolve against the repository root. Subagents inherit the directories. The additive semantics land in a new `SessionOptions.extra_skill_dirs` rather than reusing `skill_dirs`, which keeps its replace-the-defaults meaning for SDK callers and `fabro exec --skills-dir`. Also document that skill discovery follows a symlinked search root but does not recurse through symlinks below it, which is why symlinking `.fabro/skills/<name>` at a directory elsewhere in the repo never registered. Closes fabro-sh#746 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Closes #746
Problem
Skill discovery for workflow and automation runs was fixed to the three convention directories (
~/.fabro/skills,{git_root}/.fabro/skills,{git_root}/skills).SessionOptions.skill_dirsexisted in the agent SDK, but it is set atSessionconstruction and had no run/workflow/project/settings TOML surface —[run.agent]only exposedfabro_toolsand[run.agent.mcps]. A repository keeping its skills in.agents/skills/(the Open Agent Skills / Claude Code convention) therefore could not surface them to workflow agents, and the documented symlink workaround does not work by design: glob follows a symlinked search root but deliberately does not recurse through symlinks below it.Change
[run.agent] skill_dirs— extra skill discovery directories, resolved like every other run setting (workflow.toml,.fabro/project.toml,settings.toml) and carried through the persisted run spec into every agent session the run creates.Semantics:
"...".The additive behavior lands in a new
SessionOptions.extra_skill_dirsrather than reusingskill_dirs, soskill_dirskeeps its replace-the-defaults meaning for SDK callers andfabro exec --skills-dir.Plumbing
[run.agent] skill_dirs(RunAgentLayer) →RunAgentSettings.skill_dirs→ run spec →LlmSpec.skill_dirs→AgentApiBackend::with_skill_dirs→SessionOptions.extra_skill_dirs→Session::initializeskill discovery.RunAgentSettings.skill_dirsis#[serde(default)]so run specs persisted before this field stay loadable.Docs
agents/skills.mdx— the new key, its additive/precedence rules, how it differs from the SDK'sskill_dirs, and the symlink behavior that made the.fabro/skills/<name>symlink workaround fail (issue ask 3).execution/run-configuration.mdx—[run.agent]field table.reference/user-configuration.mdx— regenerated withcargo dev docs refresh.fabro-api.yaml—RunAgentSettings.skill_dirs.Tests
"..."splice.extend_skill_dirs: appended last, absolute passthrough, trailing-slash doc root, duplicate/blank skipping, empty no-op.skill_dirsoverride.[run.agent] skill_dirsreachesLlmSpec..agents/skillsdirectory is discovered throughAgentApiBackend::runagainst a mock provider.cargo build --workspace, the workspace test suite,cargo +nightly-2026-04-14 fmt --check --all, andclippy --workspace --all-targets -D warningsare clean. Two insta snapshots that dump resolved settings were updated for the new field.Note:
bun/Java were unavailable locally, solib/packages/fabro-api-client/src/models/run-agent-settings.tswas hand-edited to match whatbun run generateemits for the schema addition; worth a regeneration check.🤖 Generated with Claude Code