Type to search the docs and updates.

Browse documentation

Set up agnostic-ai with a coding agent

Copy the prompt below into your coding agent. Setup takes about two minutes, and the agent asks you a few questions: which tools you use, what to do with instructions you already have, and whether Git should track the generated files. You do not need to read the rest of this page; it is the agent's checklist.

TL;DR ยท Paste into your coding agent
Set up agnostic-ai in this repository. Follow https://agnostic-ai.org/agent-setup.txt exactly. Preserve existing AI tool behavior. Before any sync, check for existing CLAUDE.md, AGENTS.md, and similar files, and ask me what to do with their content. Finish with agnostic-ai sync --check. Summarize the targets selected and every file changed.

What the agent does

Follow this when a user asks you to install or configure agnostic-ai in a repository. Goal: keep existing AI tool behavior, make .agnostic-ai/ the source of truth, and finish with a clean sync --check.

Safety contract

  • Work from the repository root. Read its contributor and agent instructions first.
  • Run git status --short. Never discard user changes.
  • Look for existing instructions files such as CLAUDE.md, AGENTS.md, and GEMINI.md. Tell the user what they hold and ask whether to import them before any sync.
  • Import existing native configuration before the first sync. Sync writes output; it does not migrate.
  • Enable only the targets the project uses or the user names. Never select every target.
  • Preview before writing. On an ownership or overwrite error, stop and name the path.
  • After setup, edit .agnostic-ai/ only. Native files are generated.

1. Install or verify the CLI

agnostic-ai --version

If missing, install it:

# macOS or Linux
curl -fsSL https://raw.githubusercontent.com/Chemaclass/agnostic-ai/main/scripts/install.sh | bash
# Windows PowerShell
irm https://raw.githubusercontent.com/Chemaclass/agnostic-ai/main/scripts/install.ps1 | iex

Run --version again. If the command is not found, add the install directory to PATH. See Installation for other methods.

2. Detect the project state

StateSignalAction
Already configuredagnostic-ai.yaml and .agnostic-ai/ existSkip init. Go to step 4.
Existing tool configCLAUDE.md, AGENTS.md, GEMINI.md, .cursor/, .github/copilot-instructions.mdImport during init.
FreshNeitherPlain init.

If the target list is unclear, ask the user. A tool installed on the machine does not mean the repository uses it.

3. Initialize

Ask the user whether Git should track generated files. Pass --gitignore=on (ignore them; teammates run sync after cloning) or --gitignore=off (commit them; CI runs sync --check).

Replace claude,codex with the project's tools:

# existing tool config
printf '%s\n' 'claude,codex' | agnostic-ai init --from all --gitignore=on

# fresh project
printf '%s\n' 'claude,codex' | agnostic-ai init --gitignore=on

--from all adds each source's missing sections to .agnostic-ai/AGNOSTIC_AI.md and names them. Review that file for duplicates before you sync. Import tells you when a section needs a manual merge. Details: Migration.

Do not use --demo unless the user asks. Add rules only from conventions the repository or user already states.

4. Validate and preview

agnostic-ai validate
agnostic-ai lint
agnostic-ai sync --dry-run

Check that targets, output paths, and kept instructions match the project. Fix errors in the specs. Understand an unsupported-capability warning before you silence it.

5. Sync and prove the result

agnostic-ai sync
agnostic-ai sync --check
git status --short
git diff -- .

Inspect generated files and .gitignore. If outputs are committed, keep them in the same change as their specs.

Report:

  • agnostic-ai version and install method;
  • targets and imported sources;
  • what each tool now reads from .agnostic-ai/, as the first agnostic-ai sync lists it;
  • files changed under .agnostic-ai/;
  • generated outputs and whether Git tracks them;
  • results of validate, lint, and sync --check;
  • open decisions for the user.

Setup is done only when agnostic-ai sync --check exits 0.