x_aeon_agents
Executable software-engineering workflows for coding agents β a Ruby gem that packages composable AI agents behind an xaa CLI and a reusable library to automate everyday development workflows.
x_aeon_agents turns coding agents into participants in explicit, repeatable and quality software-engineering processes β instead of letting the agent invent its own workflow on the fly.
Powered by the xaa command-line interface (and usable as a Ruby library too), it packages a suite of composable AI agents that automate everyday development tasks:
- π¬ Pull Request reviews β automatically read, address and reply to GitHub review comments
- π Commit messages β generate meaningful descriptions for your staged changes
- π Issue implementation β turn GitHub issues into working code and open Pull Requests
- π README generation β build documentation sections straight from your codebase
- π Git diff interpretation β summarize what changed and why
- πΏ Task bootstrapping β create git worktrees and feature branches in seconds
- π§ Skill templating β generate reusable agent workflows from ERB templates
Use it as a β‘ CLI in your terminal or as a π¦ library inside your Ruby projects.
Table of contents
- Quick start
- Prerequisites
- Install
- Configure
- Use the CLI
- Use as a library
- Requirements
- Features
- Public API
- Executable:
xaa - Config DSL file (
.x_aeon_agents.rb) XAeonAgents::ConfigXAeonAgents::GenHelpersXAeonAgents::Logger
- Executable:
- Documentation
- Library public API
- How it works
- Entry point πͺ
- Agents as composable workflows π§©
- Orchestration π
- Configuration & providers π
- Skills & ERB templating π
- Helpers π οΈ
- Development
- Prerequisites
- Clone and install dependencies
- Project layout
- Running the test suite
- Linting
- Building skills from templates
- Common development tasks
- Packaging and release
- Contributing
- π Reporting issues
- π΄ Forking & branching
- π§ͺ Running the tests
- π Opening a Pull Request
- π€ CI & coverage
- π§Ή Code style
- β Before you submit
- License
- Ways skills are written
- General principles
- Generating skills from ERB templates
Quick start
Prerequisites
-
Ruby
>= 3.1(RubyGems/Bundler required to install the gem) -
Git command-line client available in
PATH -
GitHub CLI (
gh) installed and authenticated for Pull Request / issue features - An OpenRouter API key (
OPENROUTER_API_KEY) to power the AI agents - A GitHub token (
GITHUB_TOKEN) for features that talk to GitHub - Optionally a Cline API key (
CLINE_API_KEY) when driving the Cline agent
Install
Install the gem from RubyGems:
gem install x_aeon_agentsOr add it to your project's Gemfile and install with Bundler:
gem 'x_aeon_agents'bundle installConfigure
Export the required credentials as environment variables (the CLI and library read them automatically):
export OPENROUTER_API_KEY="sk-or-..."
export GITHUB_TOKEN="ghp_..."For fine-tuning, you can create an optional .x_aeon_agents.rb configuration file in your home directory (~/.x_aeon_agents.rb for global settings) or in the current project directory (for project-level settings). It is evaluated at the start of every xaa command. See the Config DSL file section for the full DSL reference. For example, to enable debug logging and declare a secret retrieval block:
debug true
openrouter_api_key do
# Any Ruby code that returns the key
File.read('/path/to/my/key').strip
endUse the CLI
The xaa command is installed alongside the gem. Run it from inside any Git repository.
Commit your staged changes with an AI-generated message:
xaa commitAddress GitHub Pull Request review comments (auto-detected from the current branch):
xaa review-commentsPush your branch and open a Pull Request:
xaa create-prGenerate or update the project README from the codebase:
xaa generate-readmeAsk a quick one-off question to the AI agent:
xaa prompt "What is the capital of France?"Use as a library
Require the gem and configure it in your Ruby code:
require 'x_aeon_agents'
XAeonAgents::Config.configure(
openrouter_api_key: ENV['OPENROUTER_API_KEY'],
github_token: ENV['GITHUB_TOKEN']
)
# Trigger agents programmatically
XAeonAgents::Agents::CommitterAgent.new.runRequirements
- Operating system β any platform supported by Ruby (Linux, macOS, Windows)
-
Ruby
>= 3.1(with RubyGems/Bundler) β thexaaCLI and the library are Ruby-based -
Git command-line client in
PATHβ the agents operate on repositories, branches, worktrees and commits -
GitHub CLI (
gh) installed and authenticated β used by the Pull Request and comment skills to query and reply viagh api -
A Git repository β the
xaacommands must be run from inside a Git repository - Network access β to reach the OpenRouter and GitHub APIs
-
GITHUB_TOKENenvironment variable β a GitHub personal access token used by Octokit for API access -
OPENROUTER_API_KEYenvironment variable β an OpenRouter API key that powers the AI agents through RubyLLM -
CLINE_API_KEYenvironment variable (optional) β only required when driving the Cline agent integration
Each of these secrets can alternatively be retrieved by custom code declared in the Config DSL file.
Features
x_aeon_agents provides a xaa command-line interface and a reusable Ruby library that package a suite of composable AI agents to automate everyday development workflows.
- π¬ Pull Request review handling β auto-detect the PR for the current branch, read agent-addressed comments, fix the code and reply to each thread
- π AI commit messages β analyze staged changes and generate a meaningful message, with flexible staging strategies (
all,if_empty,none) - π Automated Pull Request creation β push the branch to GitHub and open a PR against a configurable base ref with an AI-written description
- π GitHub issue implementation β turn an issue (and its comments) into working code, committing changes and opening a PR automatically
- π οΈ Arbitrary requirement implementation β pass free-form requirements to a Developer agent that plans, codes and tests the changes, optionally committing and opening a PR
- π README generation β build a full README from the codebase with 10 toggleable sections (about, quick start, requirements, features, public API, documentation, how-it-works, development, contributing, license)
- π Git diff interpretation β summarize the working-tree changes and the intent behind them relative to any base ref
- π¬ One-shot prompts β send a single prompt to the AI agent and print the response
- π§ Skill templating β generate skill files from ERB templates in
skills.src/, evaluating templates and copying assets to the output directory - π₯ Skill installation β install skills and their recursively-resolved dependencies from a manifest for a chosen agent
- πΏ Task bootstrapping β create a feature branch, set up a git worktree, push it upstream and open it in the editor, with
setup_projectandon_open_worktreehooks - π§© Composable agent framework β orchestrating agents (planner β coder β tester β committer β documenter β PR creator) built on
ai-agents/composable_agents, backed by a Cline/OpenRouter provider via RubyLLM - βοΈ Extensible config DSL β optional
.x_aeon_agents.rbfile with secrets handling, per-agent model tuning (configure_agent) and a project test command - πΎ Session persistence & debugging β global
--session-idto resume AI conversations and a--debugflag for verbose logging - π¦ Reusable Ruby library β require the gem and trigger agents programmatically (e.g.
Agents::CommitterAgent.new.run)
Public API
x_aeon_agents exposes one command-line executable (xaa) and a small Ruby library surface. Only the entry points below are part of the public API (the executable in bin/ and the Ruby methods tagged with YARD's Public API group).
Executable: xaa
The bin/xaa script is the CLI entry point: it boots the gem and dispatches the arguments to XAeonAgents::Cli. Run it from inside any Git repository.
Usecase β commit your staged changes with an AI-generated message:
xaa commitAvailable commands:
| Command | Description |
|---|---|
xaa review-comments [PR_NUMBER] |
Read, address and reply to GitHub Pull Request review comments |
xaa commit |
Commit staged changes with an AI-generated message |
xaa create-pr |
Push the branch and create a GitHub Pull Request |
xaa implement-issue ISSUE_NUMBER |
Implement a GitHub issue with AI |
xaa implement REQUIREMENTS |
Implement free-form requirements with AI |
xaa interpret-diffs [BASE] |
Summarize git diffs relative to a base ref |
xaa generate-readme |
Generate or update the project README from the codebase |
xaa generate-skills |
Generate skill files from ERB templates in skills.src/
|
xaa install-skills |
Install skills from the .skills manifest |
xaa start-task |
Create a feature branch, git worktree, and push it upstream |
xaa prompt PROMPT |
Send a one-shot prompt to the AI agent |
More details: GitHub β bin/xaa Β· RubyDoc β XAeonAgents::Cli
Config DSL file (.x_aeon_agents.rb)
The optional .x_aeon_agents.rb configuration file exposes a small Ruby DSL used to fine-tune X-Aeon Agents: retrieve secrets from custom sources, define project setup and testing commands, hook into the worktree lifecycle and tune the default settings of any agent class. It is evaluated at the start of every xaa command (and can be loaded manually with XAeonAgents::Config.load).
Usecase β retrieve a secret from a custom source, define the test suite command and tune the coding agent:
openrouter_api_key { File.read('/path/to/my/key').strip }
test_project_cmd 'bundle exec rspec --format=documentation'
configure_agent(:CoderAgent) do
{ model: 'deepseek/deepseek-v4-flash' }
endMore details: GitHub β .x_aeon_agents.example.rb
Where the file is loaded from
Files are looked up in the following locations and evaluated from the lowest priority (first) to the highest one β so higher-priority settings override lower-priority ones:
-
~/.x_aeon_agents.rbβ global, per-user settings -
./.x_aeon_agents.rbβ project-level settings (current directory) - The path given by the
X_AEON_AGENTS_CONFIGenvironment variable, if set β overrides both
Note
All existing files are evaluated in this order (not just the first one found), and explicit CLI flags (--debug) still override everything. The file is evaluated in a cleanroom: only the DSL methods below are exposed at its top level, but regular Ruby code works inside the blocks given to those methods.
Possible methods
| Method | Description |
|---|---|
debug(value) |
Enable debug logging |
data_dir 'dir' |
Data directory where X-Aeon Agents stores its data |
cline_api_key { ... } / openrouter_api_key { ... } / github_token { ... }
|
Define the code retrieving a secret |
setup_project { ... } |
Steps to install the project's dependencies in a fresh worktree |
test_project_cmd 'cmd' |
Command line running the project's test suite |
on_open_worktree { |dir| ... } |
Callback executed when a worktree is opened |
configure_agent(:AgentClass) { |cfg| ... } |
Default kwargs for agents of a given class |
-
debug(value)β set the debug mode:debug true
-
data_dir(path)β set the data directory where X-Aeon Agents stores its data (sessions, etc.). Defaults to.x_aeon_agents:data_dir '/var/lib/x_aeon_agents'
-
Secret retrieval blocks β
cline_api_key,openrouter_api_keyandgithub_tokentake a block returning the secret value. Each block is evaluated lazily, only when the secret is needed, and its result is memoized. Secrets are resolved with the precedence explicit setter βENVvariable β config DSL block (seeXAeonAgents::Config):github_token { File.read("#{Dir.home}/.github_token").strip }
-
setup_project { ... }β define the steps to execute in a fresh git worktree to install the project's dependencies (used byxaa start-task). The block is evaluated only when a fresh worktree is created, with the current directory set to the worktree:setup_project { system 'bundle install' }
-
test_project_cmd(command_line)β define the command line running the project's test suite, used byxaa implementto validate code changes. If not set, no tests are run by the implement command:test_project_cmd 'bundle exec rspec --format=documentation'
-
on_open_worktree { |dir| ... }β define a callback executed every time a worktree is opened byxaa start-task(freshly created or already existing), after the branch has been pushed to the remote. It is given the worktree's directory as parameter:on_open_worktree { |dir| system "code \"#{dir}\"" }
-
configure_agent(agent_class_name) { |agent_config| ... }β define the default kwargs to be merged when initializing agents of a given class (e.g.:CoderAgent). The block is evaluated every time an agent of this class is instantiated: it is given the currently merged configuration (a Hash of kwargs, that can be modified in place), and returns a Hash of additional kwargs merged on top. It is re-entrant: it can be called several times for the same class, from the same file or from different ones (global, project, env-var designated), each call seeing the configuration accumulated by the previous ones. Typical kwargs keys (as used by the agent frameworks):-
skillsβ Array of skill names the agent should follow -
modelβ LLM model to use (e.g.'deepseek/deepseek-v4-flash') -
cli_optionsβ Hash of options merged into the Cline CLI invocation (e.g.plan: true) -
configure_globalβ Proc given the Cline global settings to tweak
configure_agent(:PlanGeneratorAgent) do |agent_config| { skills: %w[applying-ruby-conventions enforcing-project-rules], model: 'deepseek/deepseek-v4-flash', cli_options: (agent_config[:cli_options] || {}).merge(plan: true), configure_global: proc { |global_settings| global_settings.disabled_tools = %w[editor run_commands] } } end
-
XAeonAgents::Config
Singleton module holding all X-Aeon Agents configuration (secrets, data directory, default Cline CLI arguments, debug flag). All methods listed below are part of the Public API YARD group.
Usecase β configure credentials and options at once:
require 'x_aeon_agents'
XAeonAgents::Config.configure(
openrouter_api_key: ENV['OPENROUTER_API_KEY'],
github_token: ENV['GITHUB_TOKEN'],
debug: false
)More details: RubyDoc β XAeonAgents::Config
Public methods:
-
configure(**kwargs)β set any configuration property. doc -
cline_api_key/cline_api_key=,openrouter_api_key/openrouter_api_key=,github_token/github_token=β lazily-resolved secrets (ENV or config DSL). doc -
data_dir/data_dir=β data directory (.x_aeon_agentsby default). doc -
default_cline_cli_args/default_cline_cli_args=β default Cline CLI arguments. doc -
debug/debug=β enable debug logging. doc -
config_pathsβ candidate paths of the optional.x_aeon_agents.rbconfig file. doc -
loggerβ the shared logger instance. doc
XAeonAgents::GenHelpers
DSL mixed into ERB skill templates, used to generate skill files (metadata, goals, rules, todo lists).
Usecase β declare a skill's frontmatter inside an ERB template:
<%= skill(description: 'Implement a GitHub issue', dependencies: ['analyzing-github-issue']) %>More details: RubyDoc β XAeonAgents::GenHelpers
Public methods:
-
skill(description:, dependencies:, plan:, metadata:)β define skill metadata / YAML frontmatter. doc -
goal(goal_desc = nil)β define or get the skill goal. doc -
goal_sentenceβ the skill goal as a sentence. doc -
announceβ the prompt announcing the agent is working on the skill. doc -
tmp_pathβ default temporary folder for agents. doc -
rule(title, ...)β generate a documented rule block. doc -
ordered_todo_list(&erb_block)β generate a numbered todo list section. doc -
when_to_use(&erb_block)β generate the βWhen to use itβ section. doc -
nameβ the skill name being generated. doc -
self.config(skill_name)β read a skill's.skill_config.yml. doc
XAeonAgents::Logger
The shared status-aware logger used by all X-Aeon Agents components (accessible through XAeonAgents::Config.logger). It inherits from the standard Ruby Logger; the methods below are part of the public API, on top of the standard ::Logger interface.
Usecase β write a log line, then dump a raw message:
XAeonAgents::Config.logger.info 'Fetching repository metadata'
XAeonAgents::Config.logger << 'machine-readable output'More details: RubyDoc β XAeonAgents::Logger
Public methods:
-
add(severity, message = nil, progname = nil, &block)β log a message with a given severity. doc -
log(severity, message = nil, progname = nil, &block)β alias ofadd. doc -
<<(message)β output a raw, unformatted message. doc
Documentation
- GitHub repository β main project page with source code, issues and CI: github.com/Muriel-Salvan/x_aeon_agents
- Project README β overview, CLI usage and skill-authoring guidelines: github.com/Muriel-Salvan/x_aeon_agents/blob/main/README.md
- RubyDoc.info β full API reference generated from the source (YARD): rubydoc.info/gems/x_aeon_agents
- RubyGems β published gem page and release history: rubygems.org/gems/x_aeon_agents
Library public API
The documented public methods (browseable on RubyDoc.info):
-
XAeonAgentsmodule: -
XAeonAgents::GenHelpersβ DSL helpers for generating skill content from ERB templates: -
XAeonAgents::GenHelpers::ErbEvaluatorβ helper class to evaluate ERB skill templates:
How it works
x_aeon_agents is a π Ruby gem organized into three layers: a CLI, a set of orchestrating agents, and a shared configuration / helper core that glues them together.
Entry point πͺ
- The
xaaexecutable boots Zeitwerk auto-loading and callsXAeonAgents::Cli.start(ARGV). - The CLI (
lib/x_aeon_agents/cli.rb) is a Thor application: every sub-command (commit,create-pr,review-comments,implement-issue,generate-readmeβ¦) maps 1:1 to an agent class. - On startup it loads the optional
.x_aeon_agents.rbconfig (home directory, then project directory) so project-level settings override global ones, and explicit CLI flags (--session-id,--debug) override both.
Agents as composable workflows π§©
Each capability is implemented by an Agents::*Agent class built on composable_agents:
-
ComposableAgents::Agentβ pure orchestrators that run shell commands and coordinate child agents. -
ComposableAgents::AiAgents::Agent/ComposableAgents::Cline::Agentβ LLM-driven agents that execute prompts against an AI backend.
Every agent is enriched by the AgentDefaults mixin, which:
- injects
new_agent,task,stepandstep_agentto build multi-step pipelines; - auto-configures the frameworks (
setup_composable_agents,setup_ai_agents,setup_cline) and injects per-class defaults (overridable with theconfigure_agentconfig DSL); - enforces input/output artifact contracts and adds resume support (via the
ArtifactContract+Resumablemixins); - gives each agent a per-session directory under
Config.data_dir/sessions/<id>.
Orchestration π
A top-level agent decomposes its job into steps, delegating each one to child agents. State flows through a shared @artifacts hash referenced via artifact_ref β e.g. DeveloperAgent chains PlannerAgent β CoderAgent β TesterAgent β CommitterAgent / DocumenterAgent β PullRequestCreatorAgent:
flowchart TD
CLI[XAeonAgents::Cli / xaa] -->|instantiates + run| A[Top-level Agent]
A -->|task / step_agent| P[PlannerAgent]
A -->|task / step_agent| C[CoderAgent]
A -->|task / step_agent| T[TesterAgent]
A -->|task / step_agent| K[CommitterAgent]
A -->|task / step_agent| D[DocumenterAgent]
A -->|task / step_agent| PR[PullRequestCreatorAgent]
C -.->|artifacts hash| T
T -.->|artifacts hash| K
subgraph LLM[AI backends]
C --> Prov[Cline / OpenRouter provider]
T --> Prov
end
K --> Git[(Git + GitHub via Octokit)]
Configuration & providers π
-
XAeonAgents::Configis a singleton holding secrets (cline_api_key,openrouter_api_key,github_token), the data directory and the debug flag. Secrets are resolved with the precedence explicit setter βENVvariable β lazy Proc from the config DSL. - LLM calls flow through
Providers::Cline, an OpenAI-compatible RubyLLM provider targeting the Cline API (https://api.cline.bot/api/v1) and parsing responses including thinking blocks, tool calls and token usage.
Skills & ERB templating π
- Reusable agent instructions live as Markdown skills in
skills/, some generated from ERB templates inskills.src/. -
xaa generate-skillsevaluates those templates with theGenHelpersDSL (viaGenHelpers::ErbEvaluator) to emit YAML front-matter, goals, rules and checklists. -
xaa install-skillsreads the.skillsmanifest and installs each skill together with its recursively-resolved dependencies.
Helpers π οΈ
XAeonAgents::Helpers centralizes the plumbing used by every agent:
- real-time command execution (
run_cmd) with expected exit status; - cached Git / GitHub (Octokit) clients and diff extraction (
git_diff_cached,artifact_files_diffs); - interactive content review (opens a temp file via Launchy for human approval).
Development
This section explains how to set up a local environment to develop x_aeon_agents, run its test suite, lint the code, build the gem and regenerate the packaged skills.
Prerequisites
-
Ruby
>= 3.1(the CI pipeline runs on Ruby3.4) and a matching Bundler. - Git command-line client.
-
(Maintainer only) Node.js and npm, required for
skillkitandsemantic-releaseused during packaging and release.
Clone and install dependencies
git clone https://github.com/Muriel-Salvan/x_aeon_agents.git
cd x_aeon_agents
bundle installbundle install installs the runtime dependencies declared in x_aeon_agents.gemspec plus the development dependencies from the Gemfile (rspec, rubocop, rubocop-rspec, rubocop-yard, simplecov, simplecov-cobertura, sem_ver_components).
Note
Gemfile.lock is intentionally git-ignored: this is a library, not an application.
Project layout
lib/ # Library source, auto-loaded with Zeitwerk (entry: lib/x_aeon_agents.rb)
x_aeon_agents/
cli.rb # The `xaa` Thor CLI definition
config.rb # Global configuration
agents/ # AI agents (commit, PR, README generation, ...)
providers/ # LLM provider integrations
gen_helpers.rb # ERB skill template helpers
version.rb # Gem version (bumped automatically on release)
bin/
xaa # CLI executable
skills.src/ # ERB skill templates (source of truth)
skills/ # Generated skills (produced from skills.src)
spec/ # RSpec test suite
spec_helper.rb # Global RSpec / SimpleCov configuration
scenarios/ # End-to-end scenario specs
x_aeon_agents_test/ # Test helpers (loaded via Zeitwerk)
.github/workflows/ # CI (continuous_integration.yml)
Running the test suite
Tests use RSpec 3 with SimpleCov coverage (minimum 98%).
# Run the whole suite, exactly like the CI does
bundle exec rspec --format documentation
# Run a single file or directory
bundle exec rspec spec/scenarios/code_quality_spec.rb
# Enable verbose test logging
TEST_DEBUG=1 bundle exec rspecThe coverage report is written to coverage/ (HTML plus Cobertura format for Codecov). Each example runs with a cleaned, temporary .x_aeon_agents_test/ data directory (git-ignored), and the application configuration is populated with dummy API keys by spec_helper.rb.
Linting
Code style is enforced with RuboCop (rubocop, rubocop-rspec, rubocop-yard), configured through .rubocop.yml.
# Check style
bundle exec rubocop
# Check and auto-correct
bundle exec rubocop -ABuilding skills from templates
Some skills are authored as ERB templates under skills.src/. Generate the final skills/ files with:
bundle exec ruby bin/xaa generate-skillsThis finds every .erb file in skills.src/, evaluates it with the XAeonAgents::GenHelpers DSL and writes the resulting files (minus the .erb extension). Always regenerate skills before committing so the committed skills/ directory stays in sync with its sources.
Common development tasks
Run the CLI locally without installing the gem:
bundle exec ruby bin/xaa --help
bundle exec ruby bin/xaa <command> [options]Common commands while developing: xaa start-task --branch feature/my-change opens a git worktree for a feature branch, xaa generate-readme regenerates this README, and xaa commit / xaa create-pr drive the commit and Pull Request workflow.
Build the gem package locally:
gem build x_aeon_agents.gemspecThis produces a x_aeon_agents-<version>.gem file. Note that x_aeon_agents.gemspec only packages lib/**/* and top-level *.md/*.txt files; the skills/ directory is committed to the repository separately (regenerate it first) and is not bundled inside the gem.
Generate the API documentation with YARD (output in doc/, git-ignored):
bundle exec yardPackaging and release
Releases are automated through the package job of GitHub Actions using semantic-release and semantic-release-rubygem:
- Skills are regenerated (
bundle exec ruby bin/xaa generate-skills) and staged. -
semantic-releasecomputes the next version from conventional commits, updateslib/x_aeon_agents/version.rbandCHANGELOG.md, and creates a Git tag plus a GitHub release. - The gem is built and pushed to RubyGems.
Contributors do not need to run these release steps locally β just make sure tests pass with bundle exec rspec and skills are regenerated with bundle exec ruby bin/xaa generate-skills before sharing your changes.
Contributing
Contributions to x_aeon_agents are welcome! π± This π Ruby gem lives on GitHub and is released automatically via semantic-release, so a clean, linear history and passing CI keep the project healthy.
π Reporting issues
- Open a new issue on the issue tracker and describe the expected vs actual behavior, your Ruby version, and clear steps to reproduce.
- For a bug in a specific skill, mention the skill name (e.g.
addressing-pull-request-comments) and the command you ran.
π΄ Forking & branching
- π Fork the repo and add upstream as a remote named
github:git remote add github https://github.com/Muriel-Salvan/x_aeon_agents.git. - Create a feature branch from
main; the project favors git worktrees, so you can runxaa start-task --branch feature/my-change. - Keep your branch current by rebasing on
github/main(git fetch --all && git rebase github/main) β never merge.
π§ͺ Running the tests
To run the suite locally, first install the test dependencies with bundle install (the Gemfile pulls in RSpec 3, RuboCop, SimpleCov and its Cobertura formatter), then launch the full suite exactly like CI with bundle exec rspec --format documentation, or scope it to a single file such as bundle exec rspec spec/scenarios/code_quality_spec.rb; each example runs against a temporary, auto-cleaned .x_aeon_agents_test/ directory with dummy API keys injected by spec/spec_helper.rb, and SimpleCov enforces a minimum 97% coverage before the run is considered green.
# Install test dependencies
bundle install
# Run the whole suite, exactly like the CI does
bundle exec rspec --format documentation
# Run a single file or directory
bundle exec rspec spec/scenarios/code_quality_spec.rb
# Enable verbose test logging
TEST_DEBUG=1 bundle exec rspecπ Opening a Pull Request
- Push your branch to your fork and open a PR against
mainon the upstream repo. - Describe what changed and why, and link the related issue when relevant.
- Rebase on the latest
github/mainand push withgit push github --force-with-leaseif you rebased.
π€ CI & coverage
- Every push triggers the continuous integration workflow, which runs on Ruby
3.4, installsskillkit, executes the tests and uploads coverage to Codecov. - The
packagejob regenerates skills (bundle exec ruby bin/xaa generate-skills) and runsnpx semantic-releaseβ you don't need to run these locally, but your changes must not break them.
π§Ή Code style
- Lint with
bundle exec rubocop(config in.rubocop.yml, usingrubocop,rubocop-rspecandrubocop-yard); auto-fix withbundle exec rubocop -A. - If you edit a skill written as an ERB template under
skills.src/, always regenerate the committedskills/files withbundle exec ruby bin/xaa generate-skillsbefore committing.
β Before you submit
- π’ All RSpec examples pass and coverage stays β₯ 97%.
- πͺ
rubocopreports no offenses. - π Generated skills are in sync (
skills/matchesskills.src/). - π Keep the BSD-3-Clause license and stay kind & respectful in all interactions. π
License
This project is distributed under a modified BSD-3-Clause License. See the LICENSE file for the full license terms and copyright information.
Ways skills are written
- Follow guidelines from the following sources:
- Help agents follow those skills and their steps by using the following guidelines:
- About skill name and YAML frontmatter:
- Always name skills using
<verb>[-<object>-[<context>]]. - Use gerund in the skill name.
- Use third person in the skill description.
- Always add a
Use when ...part of the skill description.
- Always name skills using
- About skill content:
- Use Markdown for the skill's content.
- Use imperative verbs (ex:
Read the README file to know about the CLI usage). - Separate ordered steps in the skill's content using Markdown's headers (ex:
## 5. Perform data analysis), and give details of this step using bullet points. - Don't mix several commands in 1 step. Split steps if several commands are involved.
- Use
{variable_name}to identify placeholders. - Be clear and consistent about commands: always use backticks to identify a command, and use a prefix for the command type. Here are the prefixes in use:
-
cli:: Used for command-line tools. Ex:Use `cli: ls -la` to list all the files. -
agent:: Used for agent commands. Ex:Use `agent: ask_followup_question` to ask the USER about the intent. -
skill:: Used for skills. Ex:Use `skill: creating-pull-request` to create the PR for {branch}.
-
- Don't use capital wordings as it adds emotional noise and is different from non-capitalized tokens used during LLMs training.
- Use some wording in a consistent way. Those words are inspired by https://github.com/rohitg00/skillkit/blob/39b94534ec1c3698c0dec3a005744dafa99e63e9/packages/core/src/quality/index.ts
-
Userrepresents the developer asking the agent to perform a task. -
Alwaysis used to emphasize that a specific step is mandatory (ex.:Always use `cli: gh` to gather issue information). -
Neveris used to emphasize that a specific step should never be done (ex.:Never use `cli: gh` to create a PR). -
If...then...elseare used to clearly identify some branching decisions. -
PlanandActmodes refer to precisely the 2 ways of executing skills by the agents.
-
- About skill semantics:
- A skill is better followed when it consists only in a sequence of easily identified steps (like a workflow). Don't use vague guidelines in a skill.
- When another skill is performing a sub-task of your skill, reference it explicitely, like
Use `skill: skill_name` to perform this actioninstead ofPerform this action. Don't rely on the model understanding thatskill_namewas the right skill to perform the action. - Always ask the agent to inform the user about executing the skill.
- Any step that can be coded and automated with a tool should be implemented in a tool. Never rely on the guarantee that models will follow steps, unless they are implemented in a tool.
- About skill name and YAML frontmatter:
General principles
Those principles allow for a safe agent interaction, while keeping its agility.
- The user sets the branch for the agent, in a worktree.
- Agents should never switch branches.
- Agents automatically push their changes to the github remote, and create a Pull Request for their branch.
- Agents can rebase their branch.
Generating skills from ERB templates
Some skills are written as ERB templates (files ending with .erb) to allow dynamic content generation. To generate the final skill files from these templates, run the following executable:
bundle exec ruby bin/xaa generate-skillsThis will:
- Find all
.erbfiles in theskills/directory - Process them using the ERB engine (with
XAeonAgents::GenHelpersavailable) - Generate the corresponding output files (removing the
.erbextension)
The following helper methods are available in ERB templates:
-
XAeonAgents::GenHelpers.init_skill_checklist- Returns the "Create Execution Checklist (MANDATORY)" section -
XAeonAgents::GenHelpers.validate_skill_checklist- Returns the "Final Verification (MANDATORY)" section