Skip to content

feat: load agent tools, instructions, and skills at runtime - #7

Merged
archae0pteryx merged 3 commits into
mainfrom
feat/agent-runtime-resources
Dec 5, 2026
Merged

archae0pteryx merged 3 commits into
mainfrom
feat/agent-runtime-resources

Conversation

@archae0pteryx

@archae0pteryx archae0pteryx commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

YAML definition + explicit CLI overrides
  ├─ selected read/list/search tools (workspace-confined)
  ├─ agentfile instructions
  └─ file:// or github:// skill sources
       └─ validated SKILL.md instructions
             └─ runtime system prompt + provider/model
  • Finish runtime resource assembly for killall-agent-e0a: name, model, tools, agentfile, and skills now affect the running agent, with CLI counterparts for each YAML field.
  • Keep the current default tools for omitted/empty lists; support case-insensitive subsets and ALL, reject unknown names, and retain the existing public tools loader.
  • Resolve YAML-local resources against the definition directory and CLI-local overrides against the working directory without changing tool confinement.
  • Load individual skills or shallow collections (including repository skills/ layouts), reject malformed metadata/duplicate names, and include full SKILL.md text after the agentfile.
  • Fetch github://owner/repo[/path] using shallow HTTPS Git clones in disposable directories. Disable Git hooks/global configuration and submodule initialization; clear inherited repository-local Git state, and reject unsafe source paths and fetched symlink escapes.
  • Replace the empty README with verified setup, usage, security boundaries, test, and release guidance. Correct the example's unsupported Etc tool.

Closes killall-agent-e0a.
Refs: killall-agent-e0a.5, killall-agent-e0a.6, killall-agent-e0a.7, killall-agent-e0a.8, killall-agent-e0a.9, killall-agent-svs.

Evidence

  • Before: resource integration tests failed because runtime assembly/CLI resource overrides did not exist; delegated selection and skill tests were also written before their implementations.
    After: cargo test --locked --all-targets — 76 passed, 1 ignored (optional network check).
  • cargo test --locked --test agent_runtime github_skill_instructions -- --ignored — 1 passed, fetching a public GitHub skill and capturing its instructions in a request to a local mock model. No live model API was called.
  • Mock-model and actual-CLI/local-HTTP tests prove selected tools and instructions reach the model, override lists replace YAML lists, and relative resources use the intended base.
  • Offline tests cover local source discovery, metadata validation, duplicates, unsafe GitHub paths, fetch failures/cleanup, symlink escapes, and a real shallow clone from a disposable Git repository without initializing submodules.
  • Independent review identified inherited GIT_INDEX_FILE could overwrite caller staging and inherited askpass helpers could execute or block on authentication failure. Independently reproduced both in isolated fixtures, cleared repository-local Git state and askpass overrides, and added child-process regressions proving staging is unchanged and HTTP 401 responses never invoke inherited helpers.
  • Fresh Code Reviewer subagents completed independent review; both verified findings were fixed. Independent verification of the final patch found no remaining issues.
  • cargo fmt --all --check, cargo clippy --locked --all-targets -- -D warnings, cargo build --locked, CLI help smoke, and git diff --check passed locally.

Merge Danger

Door: two-way

No data migration or release is performed. Reverting restores the previous fixed tools/preamble behavior.

Blast Radius: runtime

Configured agentfiles/skills now become system instructions, and GitHub sources cause network access at startup. Only use trusted sources. GitHub support uses the default branch with no cache, ref selection, or private authentication. Companion assets/references are not loaded and do not expand workspace access. Empty tools still means all three read-only tools; there is no no-tools mode in this slice.

Pre-existing local AGENTS.md and Beads-export edits are excluded.

@archae0pteryx
archae0pteryx merged commit dddf355 into main Dec 5, 2026
6 checks passed
@archae0pteryx
archae0pteryx deleted the feat/agent-runtime-resources branch December 5, 2026 01:40
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