A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/ioquatix/agent-context below:

ioquatix/agent-context: A framework for Ruby Gems to expose LLM context.

Provides tools for installing and managing context files from Ruby gems for AI agents, and generating agent.md files following the https://agent.md specification.

This gem allows you to install and manage context files from other gems. Gems can provide context files in a context/ directory in their root, which can contain documentation, configuration examples, migration guides, and other contextual information for AI agents.

When you install context from gems, they are placed in the .context/ directory and an agent.md file is generated or updated to provide a comprehensive overview for AI agents.

Add the gem to your project and install context from all available gems:

$ bundle add agent-context
$ bake agent:context:install

This workflow:

This gem provides its own context files in the context/ directory, including:

When you install context from other gems, they will be placed in the .context/ directory and referenced in agent.md.

Please see the project documentation for more details.

Add the agent-context gem to your project:

$ bundle add agent-context
Install Context (Primary Command)

Install context from all available gems and update agent.md:

$ bake agent:context:install

Install context from a specific gem:

$ bake agent:context:install --gem async

List all gems that have context available:

$ bake agent:context:list

List context files for a specific gem:

$ bake agent:context:list --gem async

Show the content of a specific context file:

$ bake agent:context:show --gem async --file thread-safety

Both .context/ and agent.md should be committed to git:

Providing Context in Your Gem

To provide context files in your gem, create a context/ directory in your gem's root:

your-gem/
├── context/
│   ├── getting-started.md
│   ├── usage.md
│   ├── configuration.md
│   └── index.yaml (optional)
├── lib/
└── your-gem.gemspec
Optional: Custom Index File

You can provide a custom index.yaml file to control ordering and metadata:

description: "Your gem description from gemspec"
version: "1.0.0"
files:
  - path: getting-started.md
    title: "Getting Started"
    description: "Quick start guide"
  - path: usage.md
    title: "Usage Guide"
    description: "Detailed usage instructions"

If no index.yaml is provided, one will be generated automatically from your gemspec and markdown files.

The generated agent.md file can be integrated with various AI coding tools by creating symbolic links to their expected locations:

ln -s agent.md .clinerules

First, create the .cursor/rules directory:

Then create .cursor/rules/agent.mdc with:

---
alwaysApply: true
---
Read the `agent.md` file in the project root directory for detailed context relating to this project and external dependencies.

This approach uses Cursor's proper front-matter format and directs the AI to consult the main agent.md file.

Gemini CLI, OpenAI Codex, OpenCode
ln -s ../../agent.md .github/copilot-instructions.md
ln -s agent.md .replit.md
ln -s agent.md .windsurfrules

Please see the project releases for all releases.

We welcome contributions to this project.

  1. Fork it.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin my-new-feature).
  5. Create new Pull Request.
Developer Certificate of Origin

In order to protect users of this project, we require all contributors to comply with the Developer Certificate of Origin. This ensures that all contributions are properly licensed and attributed.

This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4