Skip to content

feat: propagate skill overrides and catalog paths to inline agents - #195

Merged
l50 merged 3 commits into
mainfrom
worktree-inline-agent-skills
Aug 16, 2026
Merged

feat: propagate skill overrides and catalog paths to inline agents#195
l50 merged 3 commits into
mainfrom
worktree-inline-agent-skills

Conversation

@l50

@l50 l50 commented Aug 16, 2026

Copy link
Copy Markdown
Member

Key Changes:

  • Introduced BuildBundleInlineWithOptions so inline pipeline stages and task-spawned agents receive the same skill overrides and catalog paths as standalone runs
  • Exported ResolveSkillCatalogPaths and threaded it through pipeline, task, and shard code paths for consistent catalog-scope resolution
  • Documented that Squad now honors the allowed-tools frontmatter with intersection semantics that persist for the remainder of the run

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 - Renamed resolveSkillCatalogPaths to exported ResolveSkillCatalogPaths in runner/run.go and updated call sites in runner/model.go, runner/shard.go, and their tests so pipeline, task, and shard runs resolve catalogs once via the same helper
  • Pipeline bundle building propagates skills - Updated buildAgentBundle and buildRunAgentFunc in cmd/squad/pipeline.go to accept and forward catalogPaths alongside SkillOverrides, dispatching to BuildBundleInlineWithOptions for inline agents
  • Task child bundles inherit catalog paths - runner/model.go now resolves catalog paths once at buildTaskConfig and passes them into every child BuildBundleWithOptions call
  • allowed-tools frontmatter is now honored - Reworked the interop guidance in docs/agents-and-skills.md and docs/skills.md to describe intersection semantics across the skill stack, the always-exempt Skill tool, Bash(python:*) degradation, and the permanent (never-popped) clamp lasting the full run
  • Fixed README frontmatter naming - Corrected allowed_tools to allowed-tools in the skills directory example in README.md

l50 added 2 commits August 15, 2026 19:45
**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
@github-actions github-actions Bot added area/docs Changes made to project documentation area/go Changes made to Go source code (cmd/, config/, logging/) labels Aug 16, 2026
@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@l50
l50 merged commit cb07acf into main Aug 16, 2026
5 checks passed
@l50
l50 deleted the worktree-inline-agent-skills branch August 16, 2026 02:04
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`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Changes made to project documentation area/go Changes made to Go source code (cmd/, config/, logging/)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant