Skip to content

About

Bake tasks for discovering and installing context from Cargo dependencies

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

33 Commits

Folders and files

Repository files navigation

bake-agent-context

Bake tasks for discovering and installing context files shipped by Cargo dependencies. It is the Rust counterpart to the Ruby agent-context gem.

Setup

Add the task library to the unpublished bake/ crate and regenerate its task links:

cargo bake --regenerate
cargo add --manifest-path bake/Cargo.toml bake-agent-context
cargo bake --regenerate

Install context and skills from all resolved dependencies:

cargo bake agent:context:install

Other tasks:

cargo bake agent:context:list
cargo bake agent:context:list --package socketry-executor
cargo bake agent:context:show --package socketry-executor --file getting-started
cargo bake agent:context:install --package socketry-executor

cargo bake agent:context:list --package CRATE marks skill documents with (skill). The list, show, and install tasks handle skills alongside ordinary context. cargo bake agent:context:install copies ordinary guidance to .agents/context/SELECTOR/ and maintains local Git exclusions for installed context and dependency skills. Browse the installed Markdown files or use the list/show commands to find relevant guides. Project-owned skills can be tracked under .agents/skills/.

Context documents marked with metadata.type: skill are installed only under .agents/skills/, along with their companion resources. Their installed names use the authored name, or default to <crate>-<filename>, and they are omitted from .agents/context/. Use agent:context:install --package CRATE to install both context and skills from one provider. Project-owned skills can live in .agents/skills/ and remain version controlled.

Provide context from a crate

Add a top-level context/ directory to the crate and ensure Cargo packages it. When using an explicit include list in Cargo.toml, include context/**:

my-crate/
├── Cargo.toml
├── context/
│   └── getting-started.md
└── src/

Use descriptive filenames and focused Markdown guides so agents can find relevant guidance in .agents/context/SELECTOR/. Ordinary context files need no Markdown front matter. A context document can opt into skill installation with YAML front matter; see Using and Providing Context, which is installed as the bake-agent-context-usage skill.

Context

This crate includes guides for its users and for other crate authors:

Releasing

Prepare a release with cargo bake cargo:version:patch (or minor, major, or bump --version X.Y.Z), then run cargo bake cargo:release and open a pull request. After review and merge, GitHub Actions publishes the release when the configured crates-io environment approves it. Follow the shared Releasing skill for the standard process.

Releases

See releases.md for the full release history.

v0.3.3

  • Use Cargo-selected dependency versions and generated task links in setup instructions.

v0.3.2

  • Adopt socketry-project 0.3.7 for shared project tasks and Markdown normalization.
  • Require the aggregate test and coverage result for pull request merges.
  • Refresh dependency examples and repository-owned agent guidance.

v0.3.1

  • Require socketry-markdown 0.2.0 or newer for safe inline Markdown serialization.

See Also

Contributing

Please open an issue or pull request on GitHub.

Read the architecture design for the current Ruby and Rust boundaries and the proposed alignment work.

Agent Context

Run cargo bake agent:context:install to install shared context and skills. Follow the repository's agent instructions, discover relevant Markdown guides under .agents/context/, and apply matching skills under .agents/skills/.

Installed SKILL.md front matter records metadata.type: skill and the resolved metadata.ecosystem, metadata.package, and metadata.version. Cargo refreshes reconcile skills within their selected ecosystem and package scope. A full refresh also removes skills from removed or empty providers. After resolving an installation error, rerun the command to refresh generated files.

About

Bake tasks for discovering and installing context from Cargo dependencies

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages