Skip to content

bug: emit AGENTS.md (uppercase) — lowercase agents.md is not the convention and breaks on case-sensitive filesystems #297

Closed

Description

@stackbilt-admin

Problem

charter bootstrap writes agents.md (lowercase), and charter adf compile --target agents --write writes AGENTS.md. On a case-insensitive filesystem (macOS default, WSL /mnt/c) these are the same file, so the inconsistency is invisible locally — git recorded whichever case existed first, in my case agents.md.

On a case-sensitive checkout (Linux CI, most containers) they are two different files, and the one the harnesses read is AGENTS.md.

AGENTS.md is now the cross-harness convention for default agent instructions, so the uppercase spelling is the one that gets loaded. A repo bootstrapped on Windows or macOS and then cloned on Linux silently loses its agent instructions.

Evidence

$ git ls-files | grep -i agents
agents.md                       # committed from a WSL /mnt/c checkout

$ npx charter doctor --adf-only
[pre-commit] Checking vendor config files: CLAUDE.md .cursorrules agents.md AGENTS.md GEMINI.md
                                                                  ^^^^^^^^^  ^^^^^^^^^

The hook lists both spellings, which is the tool disagreeing with itself in one line of output.

Also, bootstrap's "Next steps" tells the user to stage the lowercase name and omits GEMINI.md entirely:

3. git add .charter .ai CLAUDE.md .cursorrules agents.md && git commit -m "chore: bootstrap charter governance"

Suggested fix

  1. Emit AGENTS.md everywhere: bootstrap, compile, doctor, tidy, hooks and docs.
  2. Detect an existing lowercase agents.md and offer a case-safe rename (two-step git mv via a temporary name, which is required on case-insensitive filesystems).
  3. Fix the bootstrap "Next steps" line to list AGENTS.md and GEMINI.md.

Environment

@stackbilt/[email protected], Node 22.14, WSL2. Related: the minor note in #295.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions