feat: propagate skill overrides and catalog paths to inline agents - #195
Merged
Conversation
**Changed:** - Export `ResolveSkillCatalogPaths` from runner and thread it through composed pipeline stages and Task-spawned child bundles so every child agent sees the same catalog-scope skill directories as a standalone run — `runner/run.go`, `runner/model.go`, `runner/shard.go`, `cmd/squad/pipeline.go` - Update `agents-and-skills.md` and `skills.md` to document that Squad now honors the `allowed-tools` frontmatter field with intersection semantics across the skill stack, with the clamp lasting the remainder of the run since the stack never pops - Correct SKILL.md frontmatter field name in `README.md` from `allowed_tools` to `allowed-tools` - Rename `resolveSkillCatalogPaths` call sites in `runner/model_test.go` and `runner/run_test.go` to match the exported identifier
**Added:** - `BuildBundleInlineWithOptions` in `agent/bundle.go` — inline-agent counterpart of `BuildBundleWithOptions` that accepts per-run `SkillOverrides` and catalog paths, populates `SkillEntries` on the returned bundle, and preserves the nil-opts behavior of `BuildBundleInline` - `TestBuildBundleInline_SkillEntriesAndOverrides` in `agent/bundle_skills_test.go` — verifies inline bundles surface catalog-resolved skill entries in `SkillEntries` and the system prompt block, and that a disabled `SkillOverrides` yields no entries and omits the skill block **Changed:** - `BuildBundleInline` now delegates to `BuildBundleInlineWithOptions` so existing callers keep the same behavior - `buildAgentBundle` in `cmd/squad/pipeline.go` routes the pipeline's `skillOverrides` and `catalogPaths` through the new inline options, so composed and task-spawned inline stages resolve the same skill set as standalone runs
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
l50
added a commit
that referenced
this pull request
Aug 17, 2026
…, and task-spawned agents (#194, #195) **Key Changes:** - Introduced `BuildBundleInlineWithOptions` and exported `ResolveSkillCatalogPaths` so composed pipeline stages, inline agents, and Task-spawned child agents resolve the same skill overrides and catalog-scope skill directories as a standalone `squad run` - Document that Squad now honors the `allowed-tools` frontmatter field with intersection semantics across the (push-only) skill stack, replacing the prior "not adopted" stance - Correct the SKILL.md frontmatter key reference in the README from `allowed_tools` to `allowed-tools` **Added:** - Inline bundle options plumbing - Added `BuildBundleInlineWithOptions` in `agent/bundle.go` accepting `*BundleOptions` for per-run skill overrides and catalog paths, with the existing `BuildBundleInline` delegating to it for backward compatibility - Test coverage for inline skill plumbing - Added `TestBuildBundleInline_SkillEntriesAndOverrides` in `agent/bundle_skills_test.go` verifying skill entries surface in the system prompt and that disabled overrides suppress the skill block **Changed:** - Catalog path resolution is now shared - `resolveSkillCatalogPaths` renamed to exported `ResolveSkillCatalogPaths` in `runner/run.go` (call sites updated in `runner/model.go`, `runner/shard.go`, `runner/run_test.go`, `runner/model_test.go`) so pipeline, task, and shard runs resolve catalogs once via the same helper; the misplaced doc comment moved back onto `prepareBundle` - Pipeline bundle building propagates skills - `buildAgentBundle` and `buildRunAgentFunc` in `cmd/squad/pipeline.go` now resolve catalog paths once and forward them alongside `SkillOverrides` via `BundleOptions.CatalogPaths`, dispatching to `BuildBundleInlineWithOptions` for inline agents, so composed-agent stages see the same skill directories as the parent run - Task child bundles inherit catalog paths - `buildTaskConfig` in `runner/model.go` resolves catalog paths once per run and passes them into every child `BuildBundleWithOptions` call, matching parent-run behavior - `allowed-tools` frontmatter is now honored - Reworked the interop guidance in `docs/agents-and-skills.md` and `docs/skills.md` to describe enforcement at tool dispatch, intersection across stacked skills, the always-exempt `Skill` tool, `Bash(python:*)` degrading to bare `Bash`, and the permanent (never-popped) clamp lasting the full run; adds a security-note bullet warning against declaring `allowed-tools` on knowledge skills that editing agents load - Fixed README frontmatter naming - Corrected `allowed_tools` to `allowed-tools` in the skills directory example in `README.md`
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.
Key Changes:
BuildBundleInlineWithOptionsso inline pipeline stages and task-spawned agents receive the same skill overrides and catalog paths as standalone runsResolveSkillCatalogPathsand threaded it through pipeline, task, and shard code paths for consistent catalog-scope resolutionallowed-toolsfrontmatter with intersection semantics that persist for the remainder of the runAdded:
BuildBundleInlineWithOptionsinagent/bundle.goaccepting*BundleOptionsfor per-run skill overrides and catalog paths, with the existingBuildBundleInlinedelegating to it for backward compatibilityTestBuildBundleInline_SkillEntriesAndOverridesinagent/bundle_skills_test.goverifying skill entries surface in the system prompt and that disabled overrides suppress the skill blockChanged:
resolveSkillCatalogPathsto exportedResolveSkillCatalogPathsinrunner/run.goand updated call sites inrunner/model.go,runner/shard.go, and their tests so pipeline, task, and shard runs resolve catalogs once via the same helperbuildAgentBundleandbuildRunAgentFuncincmd/squad/pipeline.goto accept and forwardcatalogPathsalongsideSkillOverrides, dispatching toBuildBundleInlineWithOptionsfor inline agentsrunner/model.gonow resolves catalog paths once atbuildTaskConfigand passes them into every childBuildBundleWithOptionscallallowed-toolsfrontmatter is now honored - Reworked the interop guidance indocs/agents-and-skills.mdanddocs/skills.mdto describe intersection semantics across the skill stack, the always-exemptSkilltool,Bash(python:*)degradation, and the permanent (never-popped) clamp lasting the full runallowed_toolstoallowed-toolsin the skills directory example inREADME.md