Skip to content
Ultracite
Esc
↑↓navigate↵open⌘Jpreview

Droid loads your lint rules up to the git root

Droid loads Ultracite’s rules from AGENTS.md at startup, searching from your working directory up to the git root. After an edit it runs the checks the rules list, as far as its autonomy level allows, and a permission rule lets npx ultracite run without a command prompt.

Droid by FactoryChecked against Droid 0.238.0

# Ultracite Code Standards

This project uses **Ultracite**, a zero-config preset that enforces strict code quality standards through automated formatting and linting.

## Quick Reference

- **Format code**: `npx ultracite fix`
- **Check for issues**: `npx ultracite check`
- **Diagnose setup**: `npx ultracite doctor`

Oxlint + Oxfmt (the underlying engine) provides robust linting and formatting. Most issues are automatically fixable.

…
Ultracite’s rules
Where Droid looks for instructions
  1. 1AGENTS.mdUltraciteIn each folder from the working directory up to the git root, loaded at startup.
  2. 2.factory/AGENTS.mdEach of those folders’ .factory/, .agents/ and .agent/ directories is checked too.
  3. 3apps/web/AGENTS.mdA nested file, found when Droid reads files in that tree; it refines the root file there.
  4. 4~/.factory/Personal instructions, also from ~/.agents/ or ~/.agent/. Project files should override them.

How Droid reads the rules

Droid walks from your working directory to the git root, checking each folder and its .factory/, .agents/ and .agent/ directories for AGENTS.md or a compatible name. Nested files join later, when Droid reads files under them.

Startup cap
80,000 characters for the instructions Droid loads when a session starts.
Read-path cap
40,000 characters for files found later, as Droid reads deeper paths.
Precedence
Your current request beats standing instructions, nested files refine the root, and project files override personal ones.
Other names
agents.md, Agents.md, CLAUDE.md and Claude.md are read too. Keep one copy; duplicates cost context.
Design rules
DESIGN.md loads separately, as design guidelines, so UI conventions don’t need to crowd AGENTS.md.
Late discovery
Start a session higher in the repo and a nested AGENTS.md loads only once Droid reads files in its tree.

Droid runs the checks, within its autonomy

Ultracite doesn’t install a Droid hook, so after an edit Droid runs the commands in AGENTS.md. Droid’s own PostToolUse hooks in .factory/hooks.json can match Create|Edit|ApplyPatch and send stderr back to Droid on exit code 2, but Ultracite doesn’t configure one yet.

{
  "permissionRules": {
    "version": 1,
    "rules": [
      {
        "id": "project/ultracite",
        "decision": "allow",
        "reason": "Lint and format without a prompt.",
        "match": { "prefix": ["npx", "ultracite", ["check", "fix"]] },
        "tests": {
          "match": ["npx ultracite check", "npx ultracite fix src/index.ts"],
          "noMatch": ["npx ultracite init", "npx eslint ."]
        }
      }
    ]
  }
}
  1. 01Droid edits a file with Edit, Create or ApplyPatch; at Low autonomy or above it doesn’t ask first.
  2. 02Following AGENTS.md, it runs npx ultracite fix through Execute.
  3. 03An allow rule skips the command prompt; without one, Droid weighs the command’s risk against your autonomy level.
  4. 04Droid reads what ultracite fix couldn’t settle and edits again.

Worth knowing about Droid

  • Autonomy decides what runs unasked

    At Low, Droid edits files and runs low-risk commands without asking; Medium adds installs, builds and local commits; High adds riskier steps such as git push and migrations. An ask rule prompts even at High, and a block rule can’t be approved at all.

  • Headless runs start read-only

    droid exec can only read until you pass --auto low, medium or high. A run that needs more than its level stops with a non-zero exit code and makes no partial changes, so CI fails clearly instead of half-fixing.

  • Permission rules carry their own tests

    Each permission rule lists commands it must and mustn’t match, and a rule whose examples fail is skipped, never turned into a block-all. droid rules check validates them without running anything.

  • The Ultracite skill

    Droid discovers skills in .factory/skills/ and in .agents/skills/, so it finds the Ultracite skill that init installs there. Run /skills and check the Effective tab to see it.

Droid questions, answered

Does Droid read AGENTS.md?
Yes. At startup Droid searches from your working directory up to the git root, checking each folder and its .factory/, .agents/ and .agent/ directories. ultracite init --agents droid writes Ultracite’s rules to the root AGENTS.md, which that search finds.
Does Droid read CLAUDE.md?
Yes, as a compatible name, along with agents.md, Agents.md and Claude.md. Factory recommends AGENTS.md for new guidance and warns that repeating rules under several names spends context without adding anything.
Does Droid support hooks?
Yes. Hooks live in .factory/hooks.json or ~/.factory/hooks.json, and a PostToolUse hook matching Create|Edit|ApplyPatch runs after each edit; exit code 2 feeds its stderr back to Droid. Ultracite doesn’t set one up for Droid yet.
How do I stop Droid asking before it runs Ultracite?
Add an allow permission rule for npx ultracite to .factory/settings.json, as above, and preview it with droid rules check --command 'npx ultracite fix'. Project rules need workspace trust, and permission rules have to be enabled for your organization.
Can Droid fix lint errors in CI?
Yes, with droid exec and an --auto level; without one, a run is read-only. If a step needs more than the level you gave, the run stops with a non-zero exit code and no partial changes, so pick the lowest level that lets the job finish.

Ship less slop

One command sets up your linter, formatter, editor and agents. Works with Oxlint, Biome and ESLint.