AGENTS.md — AI Agent Guide for zer0-mistakes
Cross-tool entry point for AI coding agents working in this repository (GitHub Copilot, OpenAI Codex, Cursor, Aider, Jules, Continue, Claude Code, and any future agent that follows the agents.md convention).
This file is intentionally short. It tells an agent where to look for the
detailed, file-scoped guidance that already lives under .github/.
It does not duplicate that content — keep changes here minimal and instead
update the targeted instruction files when patterns evolve.
🧭 Project Snapshot
- What it is: A Docker-first Jekyll theme (Ruby gem
jekyll-theme-zer0) with Bootstrap 5.3.3, GitHub Pages remote-theme support, automated semantic releases to RubyGems, and privacy-compliant analytics. - Primary language(s): Ruby (gem), Liquid/HTML (theme), SCSS, Bash (tooling).
- Version source of truth:
lib/jekyll-theme-zer0/version.rb. - Default dev environment: Docker Compose (
docker-compose up). A local Ruby/Bundler workflow also works.
For the full architectural and product overview, see
README.md and .github/copilot-instructions.md.
📚 Where Agent Guidance Lives
This repo follows a layered guidance model. Read the layers that match the files you are about to touch — do not load everything up front.
| Layer | Location | When to read |
|---|---|---|
| Cross-tool entry point | AGENTS.md (this file) |
Always — first |
| Project-wide Copilot instructions | .github/copilot-instructions.md |
Always — second; full architecture, commands, conventions |
| File-scoped instructions | .github/instructions/*.instructions.md |
When editing files matching the applyTo: glob in each file’s front matter |
| Reusable prompts (chat/agent modes) | .github/prompts/*.prompt.md |
When asked to perform a multi-step task that matches a prompt |
| Project “seed” blueprint | .github/seed/*.md |
For deep architectural decisions or rebuilding subsystems from scratch |
| Cursor slash-commands | .cursor/commands/*.md |
Auto-loaded by Cursor; mirrors the prompts above |
| CI / quality config | .github/config/, .github/workflows/ |
When changing lint rules, tests, or release automation |
File-scoped instruction map
Apply the instruction file whose applyTo: glob matches the path you are
editing (most editors do this automatically; agents without that capability
should load them manually):
| Editing files in… | Read |
|---|---|
_layouts/** |
.github/instructions/layouts.instructions.md |
_includes/** |
.github/instructions/includes.instructions.md |
scripts/** |
.github/instructions/scripts.instructions.md |
test/** |
.github/instructions/testing.instructions.md |
docs/**, pages/_docs/**, *docs*.md |
.github/instructions/documentation.instructions.md |
CHANGELOG.md, **/version.*, *.gemspec, package.json |
.github/instructions/version-control.instructions.md |
Reusable prompts
| Task | Prompt |
|---|---|
| Full release pipeline (analyze → validate → version → publish → verify) | .github/prompts/commit-publish.prompt.md |
| Front matter audit / fix across content | .github/prompts/frontmatter-maintainer.prompt.md |
| Rebuild the theme from scratch (deep blueprint) | .github/prompts/seed.prompt.md |
⚡ Essential Commands
Wrappers at
scripts/{build,release,test}forward to the canonicalscripts/bin/implementations. Both forms work.
# Development
docker-compose up # Start Jekyll dev server (recommended)
docker-compose exec jekyll bash # Shell into the container
docker-compose down -v # Clean up
# Build / test
./scripts/bin/build # Build the gem
./scripts/bin/test # Run all test suites (lib + theme + integration)
./test/test_runner.sh # Theme test orchestrator
docker-compose exec -T jekyll bundle exec jekyll build \
--config '_config.yml,_config_dev.yml' # Validate Jekyll build
# Release (semantic-version aware)
./scripts/bin/release patch # 0.0.X
./scripts/bin/release minor # 0.X.0
./scripts/bin/release major # X.0.0
./scripts/bin/release patch --dry-run # Preview only
# Quality
markdownlint "**/*.md" --ignore node_modules
yamllint -c .github/config/.yamllint.yml .
✅ Operating Rules for Agents
- Make minimal, surgical changes. Match the existing style. Do not refactor unrelated code.
- Respect the layered guidance. When a file-scoped instruction conflicts with a generic best practice, the file-scoped instruction wins.
- Validate before declaring done. At minimum, run the relevant test command(s) above. For theme/layout/include changes, run the Docker Jekyll build.
- Update
CHANGELOG.mdfor any user-visible change. Follow the Keep a Changelog format already in the file. - Bump the version only via
./scripts/bin/release(or by editinglib/jekyll-theme-zer0/version.rbas part of a release commit). Never bump it in unrelated PRs. - Do not commit secrets. Use environment variables;
RUBYGEMS_API_KEYandGITHUB_TOKENare provided in CI. - Prefer existing libraries and patterns. Bootstrap 5 components, the
Bootstrap Icons set, and the modular
_includes/system already cover most UI needs. - Document non-obvious decisions in the relevant instruction file so the next agent benefits from the context.
🧩 Extending Agent Capabilities
This repository is designed to be extendable by both humans and agents. To add new agent capabilities, follow these patterns:
Add a new file-scoped instruction set
-
Create
.github/instructions/<area>.instructions.mdwith front matter:--- applyTo: "<glob pattern>" description: "One-line summary of what these instructions cover" --- - Cover: overview, structure, standards, patterns, best practices, testing,
documentation (mirror existing files such as
layouts.instructions.md). - List it in
.github/instructions/README.mdand add a row to the File-scoped instruction map above.
Add a reusable prompt / agent mode
-
Create
.github/prompts/<task>.prompt.mdwith front matter:--- agent: agent mode: agent description: "Short description of the multi-step task" tools: [optional, list, of, tool, names] --- - Write the prompt as a numbered, checkable workflow (see
commit-publish.prompt.mdfor the canonical pattern). - If you want it available as a Cursor slash-command, mirror the file into
.cursor/commands/<task>.md.
Add a new tool-specific config
When onboarding a new agent or IDE that uses its own config file, add it
without duplicating instruction content — point the new file at this
AGENTS.md and the layered guidance under .github/. Examples:
- Claude Code:
CLAUDE.md→ “SeeAGENTS.md.” - Aider:
.aider.conf.ymlwithread: [AGENTS.md, .github/copilot-instructions.md]. - Continue:
.continuerc.jsonreferencing the same files.
This keeps a single source of truth and prevents drift.
Add a new automation script
- Place the implementation under
scripts/bin/<name>(executable,set -euo pipefail). - Share logic via
scripts/lib/*.shmodules. - Optionally add a thin wrapper at
scripts/<name>for backward compatibility. - Follow the conventions in
.github/instructions/scripts.instructions.md(logging helpers, parameter validation,--dry-runsupport, help text).
🔗 Quick Links
- Project README:
README.md - Contributing:
CONTRIBUTING.md - Security policy:
SECURITY.md - Code of conduct:
CODE_OF_CONDUCT.md - Changelog:
CHANGELOG.md - Main Copilot instructions:
.github/copilot-instructions.md - Instruction index:
.github/instructions/README.md
Last reviewed: 2026-04-18. Keep this file short — push detail into
.github/instructions/ and .github/prompts/.