Skip to content

Latest commit

 

History

History
91 lines (70 loc) · 4.97 KB

AGENTS.md

File metadata and controls

91 lines (70 loc) · 4.97 KB

Agents

Before you change the API or the database, read docs/api-and-migrations.md. Not optional. That means anything under api/, an app's requests (web app, OpenBot Desktop, OpenBot Mobile, the Recorder), a database change, or release-policy.json. OpenBot is live: anything a released app uses keeps working for 12 months, and a migration never breaks a running server.

Before you plan a screen or a feature for OpenBot Mobile, the web app or OpenBot Desktop, read docs/app-guidelines.md: the one color scheme every app keeps to, what OpenBot Mobile is for, and the stack it is built with.

Before you change a token or a primitive, or build a screen from a design, read docs/design-system.md. Not optional. That means anything under tokens/ or app/src/components/ui, app/src/theme.css, a new font, icon set or picture, and any work that starts from Figma. The design system stays compatible with shadcn, in light and in dark.

Skills for coding agents live in .claude/skills/<name>/SKILL.md. Claude Code finds them on its own. Other agents: when a task matches a skill, read its SKILL.md before starting.

How to contribute, and the checks to run: CONTRIBUTING.md.

How we work

These hold for every change, whoever or whatever writes it. "The person you're working for" is whoever gave you the task.

Tests prove it works, then keep it working

  • Everything you build or fix gets a test of the functionality itself, through the real path a person or the system takes: one or two, whatever the functionality needs, not one per function.
  • Functional and regression tests only. No unit tests for their own sake, and no mock-heavy tests that pass while the real thing fails. A fake must behave exactly like the real platform. A fast test of a pure rule against real-world inputs counts, because it pins behaviour that must not regress.
  • Every bug fix gets a regression test that fails before the fix and passes after it, and runs in CI.
  • Your change updates every test it affects, in the same pull request. Never merge a change that leaves another test red.
  • Assert on what carries the state, not on words beside it: a control's role and name, its aria state, the URL. Check wording only where the wording is what's under test, such as an error message. A copy change must not break CI.

Look at it, in the real product

  • Run the change end to end: the real product, a real browser (Chrome and Safari), real services.
  • Look at every screen the change touches in a screenshot, and compare it with how it looked before. Broken layout, spacing, alignment, overflow or copy is a bug, even when everything works. Fix it and look again.

Fix bugs the proven way, never by guessing

  • Find the cause before you design the fix, and fix the general problem the report points to, not only the one symptom.
  • Before designing a fix or choosing an approach, search the web for how the other major AI assistants and coding agents handle the same thing today, from their published docs and widely used references. Never rely on what you remember.
  • Default to the approach most of them share. Differ only for a reason you state, and bring that reason to the person you're working for first. Cite what you found, with sources, in the pull request.

Use open source, don't build it

  • Before building something, look for an open-source library that already does it. Build it yourself only when nothing suitable exists.
  • The bar: a release in the last six months, real adoption, not a single-maintainer project for anything core, nothing pre-release.

Every Bot gets what a built-in Bot gets

  • Anything a built-in Bot can do must also work for any Bot a person connects over plain AG-UI: instructions, OpenBot's tools, approvals, asking the person, generative UI, and anything added later. Never give a built-in engine a private channel that a connected Bot can't use.
  • Prove it with a stock AG-UI agent, one that knows nothing about OpenBot, in the end-to-end test.

Stay on the task

  • Do what was asked, then stop. Never remove or cut a feature on your own reading of a rule; if a rule seems to conflict with a feature, ask.
  • If the goal is unclear, ask the person you're working for. Asking beats guessing.
  • Build the core loop end to end first and put it in front of the person you're working for before building around it. Real use finds what tests miss.

Work in parallel, clean up after

  • Split work into feature-sized slices and start every slice that can start at once. Sequence only what truly depends on something else, and say what and why. A shared file is a reason to split the file, not to queue.
  • Each slice works in its own git worktree. A merge deletes its worktree: whoever merges removes it in the same step, with its dependencies, build output and any containers or volumes it started.
  • Don't post time estimates. Describe the scope and name the real bottlenecks instead.