Skip to content

Improve existing AGENTS.md #1851

Description

@netomi

We need to add improve the way AI Agents help in our project.
There is already an AGENTS.md file in webui, however it needs to be improved.

Here is an example from another project I work on with good results:

# AGENTS.md

Operating rules for AI coding agents working in this repository (the Board
Agenda Tool, "BAT"). Claude Code loads this file via `CLAUDE.md`; other agents
read it directly.

This file is the short, must-follow contract. For full environment setup see
[CONTRIBUTING.md](CONTRIBUTING.md), and for the end-to-end harness see
[e2e/README.md](e2e/README.md). If any instruction here conflicts with an
explicit request from the user, ask before overriding it.

## Non-negotiables

- **Everything runs in a container.** All builds, linters, and tests run inside
  the dev container (Podman or Docker). Never install or run Python, Node,
  `uv`, `pytest`, or `yarn` on the host. See CONTRIBUTING.md for the commands.
- **`make check` must pass before you commit.** It runs the `prek` pre-commit
  hooks (ruff, pyright, djlint, stylelint, shellcheck, markdownlint, zizmor,
  license headers, `uv-lock`/`uv-export`). Fix every error and warning. Do not
  disable a hook or commit with `--no-verify`.
- **`uv.lock` is the source of truth for Python dependencies.**
  `requirements.txt` is generated by the `uv-export` hook — never hand-edit it.
  Change dependencies through `uv` and let the hook regenerate the export.
- **New Python files need the Apache 2.0 license header** (enforced by the
  `insert-license` hook).

## Project shape

| Layer | Technology | Location |
| ----- | ---------- | -------- |
| Backend | Python 3.12+ / Quart (async) | `app/` |
| Frontend | Svelte 5 runes / TypeScript / Vite | `assets/src/` |
| Database | SQLite / SQLAlchemy / Alembic | `app/db/` |

- Backend routes: add under `app/api/routes/` and register them in
  `app/api/routes/__init__.py`.
- Database: add models in `app/db/models.py` plus a sequential Alembic
  migration (`0001`, `0002`, ...) in `app/db/migrations/versions/`; migrations
  auto-apply on startup. Follow the service patterns in `app/db/service.py`.
- Frontend: components in `assets/src/js/components/` (modals under `modals/`);
  the API client is `assets/src/js/libs/server.svelte.ts`. Use Svelte 5 runes
  (`$state`, `$derived`, `$props`).

## Changing the UI requires tests

When you change the UI, update both layers of coverage:

- **vitest** unit tests alongside the code in `assets/src/` (`yarn test`).
- **Playwright** end-to-end tests in `e2e/tests/` for user-facing flows.

CI runs these as the `frontend` and `e2e` jobs in
`.github/workflows/build.yml`; a UI change without matching test updates is
incomplete.

## Pull requests

- Branch from `main` and open the PR against `main`. Make `make check` and
  `make test` pass first.
- **User-facing UI features must include screenshot(s) in the PR.** Capture
  them from the e2e spec that exercises the feature (`page.screenshot(...)`,
  see [e2e/README.md](e2e/README.md)) and drag the image into the PR
  description.
- Stage only the files you changed (`git add <path>`), never `git add -A` or
  `git add .`.

## Conventions

- Commit subjects use a conventional-commit prefix: `feat:`, `fix:`, `chore:`,
  `docs:`, `test:`, `style:`, or `ci:`.
- No emojis in commits, pull requests, issues, or code. Keep prose concise and
  direct.
- Do not remove or downgrade code to silence type errors from an outdated
  dependency — upgrade the dependency instead.
- Ask before removing functionality or code that appears intentional.

The main requirements are that agents are given instructions about:

  • basic structure
  • how to ensure that any change does not include regressions
  • to write integration tests for any frontend change
  • pass prettier and eslint checks

As we primarily use Claude for assistance, we also need to define a CLAUDE.md file that references the AGENTS.md file as Claude does not read it by default:

# CLAUDE.md

@AGENTS.md

Metadata

Metadata

Assignees

Labels

enhancementRequest for new or improved functionalitywebui(Component: webui) Front-end user interface for open-vsx.org

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions