RRelayer
Home/Development

AI-Assisted Development#

relayer is built to be developed alongside AI agents and LLMs, so it ships its conventions together with the code. The files relayer init generates (→ CLI Commands) are bundled with polidog/relayer and co-versioned with the framework, so they cannot drift. All are skip-if-exists: they never overwrite a file you placed yourself.

RELAYER.md (the single source of truth)#

RELAYER.md is the concise, authoritative implementation guide for agents/LLMs. It collects the file conventions, the route.php / middleware.php / Island contracts, the minimalism rules, and a "do not" list in one file. Humans can read it too, but its primary reader is the AI. Because it ships with — and is co-versioned with — the framework rather than being a pile of hand-written instructions, upgrading relayer keeps the conventions current automatically.

AGENTS.md / CLAUDE.md (auto-read pointers)#

AGENTS.md and CLAUDE.md are the filenames that agent tooling and Claude Code respectively read automatically. Each is just two lines that point at RELAYER.md — thin pointers so the substance is not duplicated and every tool lands on the same single source of truth. They are skip-if-exists as well, so an AGENTS.md / CLAUDE.md you already have is respected.

.claude/ (Claude Code tooling)#

Two Claude Code tools are generated under .claude/.

PathKindRole
.claude/skills/relayer-routing/SKILL.mdskillsupplies the routing / Response / CSRF contract on trigger
.claude/agents/relayer-reviewer.mdsubagentreviews changes against RELAYER.md

Both treat RELAYER.md as the single source of truth and are co-versioned and skip-if-exists for the same reason. The relayer-routing skill injects the contract during routing or Response work; the relayer-reviewer subagent checks written code against RELAYER.md for convention drift.

How to use it#

  1. After composer require polidog/relayer, run relayer init and all

of the above is generated (existing files are left untouched).

  1. Claude Code and agent tooling automatically read AGENTS.md /

CLAUDE.md at the repository root and follow the RELAYER.md conventions.

  1. When you upgrade relayer, run relayer upgrade

(→ CLI Commands) to advance the convention files added in a newer structure version (skip-if-exists keeps your edits).

  1. After changes, review for RELAYER.md compliance with

relayer-reviewer.

Collapsing the conventions into one file and co-versioning it with the framework avoids the classic decay where AI instructions go stale or diverge per project. Pair it with the profiler (Profiler) to advance while measuring how AI-generated code actually behaves.

Last updated: 2026-05-20
Change history (1)
  • Add the AI-assisted development article (new Development category)