vibe/code/agent

rulebook.md

Write the file your agent reads first.

Six short sections. Out comes one AGENTS.md and the wiring for each agent you tick. Nothing is stored unless you save it to a Shelf.

1Project
2Commands

The exact commands the agent should run. The test command matters most: without it the agent cannot check its own work.

3Project map

One folder or file per line, with what lives there. Up to 15 lines.

4Rules

Tick the groups you want. Each adds four plain rules, shown below each card.

See the 4 rules
  • Never write secrets, keys or passwords into code, config or commit messages. Read them from environment variables or the existing config; if one is missing, stop and ask.
  • Do not delete files, folders, branches or database tables unless the task says so.
  • Do not run commands that deploy, touch production, or send email or messages.
  • Do not turn off tests, linters or security checks to get a passing run.
See the 4 rules
  • Change only what the task needs. No drive-by refactors or renames.
  • Read the surrounding code before editing and follow its patterns.
  • Prefer editing existing files to creating new ones.
  • If the task is unclear or bigger than it looked, stop and ask before going on.
See the 4 rules
  • Run the test command before saying a task is done, and report the result.
  • Add or update a test for every behaviour you change.
  • When a test fails, fix the code, not the test. If the test itself is wrong, say so and why.
  • Never skip or delete a test to get a green run.
See the 4 rules
  • Work on a branch, not on the main branch.
  • Make small commits whose messages say what changed and why.
  • Never force-push or rewrite shared history unless asked.
  • End every task with the list of files you changed.
See the 4 rules
  • Do not add a dependency without asking first: name the package, why it is needed, and how it could be done without it.
  • Before installing a package, confirm it exists on the official registry under that exact name.
  • Commit the lock file with every dependency change.
  • Do not upgrade a major version as part of another task.
See the 4 rules
  • Use parameter binding or the ORM for every query. Never build SQL from user input.
  • Escape output in templates. Never put raw user input into HTML.
  • Never log passwords, tokens or personal data.
  • Change the database schema only through migrations.
See the 4 rules
  • Match the existing formatting and naming. Run the formatter or linter if the project has one.
  • Write comments that explain why, not what.
  • Keep functions small and names plain.
  • Leave no dead code, commented-out blocks or debug prints behind.
5Boundaries
6Wire to agents

AGENTS.md is always written. Ticked agents that need a pointer file get one. Why each one.

Free. Saving versions to a Shelf is free for 1 project; the Shelf Pass ($1.95 a month or $19.50 a year) keeps 25, free during preview.