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

goose loads AGENTS.md from the git root down

goose reads Ultracite’s rules from AGENTS.md, one of its two default context files, at every level from the git root down to your working directory. It runs in Autonomous mode by default, so when the rules say to run ultracite fix after editing, it runs it without asking and fixes what’s left.

goose by Agentic AI FoundationChecked against goose 1.54.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 goose looks for instructions
  1. 1~/.config/goose/AGENTS.mdGlobal hints, along with ~/.config/goose/.goosehints.
  2. 2~/.agents/AGENTS.mdA global file other agents share, read when AGENTS.md is in your context file list.
  3. 3AGENTS.md and .goosehintsUltraciteAt each level from the git root down to the working directory; outside a git repo, only the working directory.
  4. 4packages/web/AGENTS.mdA deeper folder’s files, loaded the first time goose reads or edits a file there, or names one in a shell command.

How goose reads the rules

goose calls these files hints. It loads global hints, then every AGENTS.md and .goosehints from the git root down to where you started, and adds a deeper folder’s files once it works there.

Default files
AGENTS.md and .goosehints; goose loads both when a folder has both.
Conflicts
Local hints win over global ones; nested hints combine with their parents.
Shared global
~/.agents/AGENTS.md loads as a global hint while AGENTS.md is in your context file list.
Edits
Hints load at session start; restart the session to pick up a changed file.
Large files
@README.md pulls a file in; a plain path only tells goose where to look.
Desktop
Settings, Chat, Project Hints opens the project’s hints in goose Desktop.

Autonomous by default, so the fix just runs

Ultracite doesn’t add a goose hook, so after an edit goose runs the commands in AGENTS.md. goose’s own hooks live in plugin folders, but PostToolUse and AfterFileEdit only observe; only PreToolUse and Stop can change what goose does next.

- **Format code**: `npx ultracite fix`
- **Check for issues**: `npx ultracite check`
- **Diagnose setup**: `npx ultracite doctor`
What the rules tell it to run
  1. 01goose edits a file with the developer extension’s write or edit tool.
  2. 02Following AGENTS.md, it runs npx ultracite fix with shell.
  3. 03In Autonomous mode nothing asks; in Smart Approve or Manual Approval, goose asks for tools it judges to be writes.
  4. 04goose reads the output and fixes what’s left.

Worth knowing about goose

  • Autonomous unless you change it

    goose starts in Autonomous mode, so it edits files and runs commands, ultracite fix included, without asking. Smart Approve and Manual Approval ask for tools the model judges to be writes; Chat Only runs nothing.

  • Instructions it re-reads every turn

    Hints load once per session and can fade as context fills. A file named in GOOSE_MOIM_MESSAGE_FILE is re-read and injected on every turn, up to 64 KB, which suits the one rule you never want dropped.

  • Custom context names replace the default

    CONTEXT_FILE_NAMES replaces goose’s list of context files rather than adding to it. Set it to ["CLAUDE.md"] and goose stops reading AGENTS.md, and with it Ultracite’s rules.

  • The Ultracite skill

    goose loads skills from .agents/skills/ in the project and ~/.agents/skills/, so it finds the Ultracite skill that init installs; init also installs it into goose’s own folder when the project has a .goose directory. Run goose skills list to check.

goose questions, answered

Does goose read AGENTS.md?
Yes. AGENTS.md and .goosehints are its default context files, loaded at every level from the git root down to your working directory, plus ~/.config/goose/AGENTS.md and ~/.agents/AGENTS.md globally.
Does goose read CLAUDE.md?
Not by default. Set CONTEXT_FILE_NAMES to a JSON array such as ["CLAUDE.md", "AGENTS.md"]; the setting replaces the defaults, so keep AGENTS.md in it or goose stops reading Ultracite’s rules.
Does goose support hooks?
Yes, through plugins: a hooks/hooks.json in .agents/plugins/<name>/ or ~/.agents/plugins/<name>/. Only PreToolUse and Stop hooks can block; PostToolUse and AfterFileEdit results are logged and ignored, so they can’t hand lint problems back. Ultracite doesn’t configure goose hooks.
Should I use .goosehints or AGENTS.md?
Either works, and goose reads both. ultracite init writes AGENTS.md, which other agents read too; keep notes only goose needs in .goosehints.
How do I make goose ask before running commands?
Switch modes with /mode smart_approve or /mode approve in the CLI, or set Default Mode under Settings, Chat in the desktop app. goose then asks for tools it judges to be writes, a call the model makes on a best-effort basis.

Ship less slop

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