# Write tasks and instructions

> Describe a task with a goal, the code involved, and how to check it, and put rules for every run in AGENTS.md.

devlo does best with tasks that are specific, small, and checkable. Rules that apply to every task go in your repository’s `AGENTS.md`.

## Good and bad requests

| Instead of          | Write                                                                                                                                  |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| Fix the login bug   | Login fails with a 401 when the email has uppercase letters. See `src/auth/login.ts`. Make the lookup case-insensitive and add a test. |
| Improve performance | `GET /orders` takes 3s for large accounts. Find the slow query in `src/api/orders.ts` and fix it without changing the response.        |
| Add dark mode       | Add a dark theme toggle to the settings page, using the existing theme tokens in `src/styles/`.                                        |

## What to include

* **Goal:** what should be true when it’s done.
* **Where:** the files, functions, or area of the code.
* **How to check:** the test or command that proves it works.
* **Constraints:** what not to touch, or which libraries to use.

## Tips

* For bigger work, ask for a plan first: `@devloai give me a plan before changing anything`.
* Keep one task per issue, ticket, or chat.
* Ask for small changes in follow-up comments on the pull request.

## Repository instructions

Put build commands and conventions in an `AGENTS.md` file in your repository so you don’t repeat them in each request. Code review, `@devloai` on issues and pull requests, Jira, Slack, and automations all read it. Chats in the devlo app read it only when you ask.

AGENTS.md

```markdown
# Project notes


## Commands
- Install: `npm ci`
- Test: `npm test`
- Lint: `npm run lint`


## Conventions
- TypeScript strict mode. No `any`.
- Add a test for every bug fix.
- Don't edit files under `src/generated/`.
```

For rules only reviews or only `@devloai` on pull requests should follow, use the instruction fields in [Customize reviews](/code-review/customize/) and [Configure the PR Assistant](/coding/pull-requests/#configure-the-pr-assistant).

## Related

* [GitHub issues](/coding/github-issues/)
* [Customize reviews](/code-review/customize/)
