Skip to content

refactor(templates): generate AGENTS.md for claude code instead of CLAUDE.md - #495

Merged
edenreich merged 4 commits into
mainfrom
feat/drop-claude-md-template
Oct 15, 2026
Merged

edenreich merged 4 commits into
mainfrom
feat/drop-claude-md-template

Conversation

@inference-gateway-maintainer

@inference-gateway-maintainer inference-gateway-maintainer Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Claude Code reads AGENTS.md natively, so the separate CLAUDE.md template is removed. Enabling spec.development.ai.orchestrators.claudecode now generates the shared AGENTS.md (same as codex, opencode and infer).

  • Removed internal/templates/common/ai/claude.md.tmpl and its registry mapping
  • AIAgentToggles.AnyAgentsMD() now includes ClaudeCode
  • .gitattributes template no longer lists CLAUDE.md
  • Updated adl init prompt/flag text, README and tests
  • Follow-up cleanup (chore(templates) commit): dropped the retired CLAUDE.md/GEMINI.md entries from the generated .dockerignore so its list matches what the generator actually writes, tagged .gemini/settings.json as linguist-generated in the generated .gitattributes, and pointed the pre-v0.8.0 AI migration hint and a builtin-tools doc comment at AGENTS.md

Notes

  • Existing projects keep their old CLAUDE.md/GEMINI.md on regenerate - the generator just stops writing it. Deliberately not deleting stale files since they may contain user edits.
  • .adl-ignore intentionally still lists only TODO placeholders users must implement, so .gemini/settings.json has no entry; it is a fully generated file like Taskfile.yml.
  • The vendored schema descriptions still mention CLAUDE.md. They come from upstream inference-gateway/adl and are tracked there: [DOCS] Schema descriptions still reference CLAUDE.md and GEMINI.md adl#217. Once upstream fixes and releases, sync here with task fetch-schema and task generate-types.
  • Gemini CLI does not read AGENTS.md by default, so enabling gemini also generates .gemini/settings.json with context.fileName: AGENTS.md.

Testing

  • go test ./... passes
  • golangci-lint run - 0 issues
  • task lint:md clean
  • task ci passes after the cleanup commit (fmt, lint, test, build, verify-schema), including new assertions that the generated .dockerignore no longer lists CLAUDE.md/GEMINI.md and that .gitattributes tags .gemini/settings.json

no docs ticket: internal-only refactor

@inference-gateway-maintainer
inference-gateway-maintainer Bot requested a review from a team as a code owner October 15, 2026 18:10
@edenreich

edenreich commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

@claude please drop all different from AGENTS.md files - all orchestrators should be using AGENTS.md at this point and time.

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Claude finished @edenreich's task in 4m 2s —— View job


GEMINI.md dropped - every orchestrator now reads AGENTS.md

  • Gather context
  • Delete internal/templates/common/ai/gemini.md.tmpl (210 lines) and its registry mapping
  • AnyAgentsMD() removed - with gemini included it was identical to Any(), so addAIFiles and .gitattributes just use Any()
  • Generate .gemini/settings.json when gemini.enabled (see note below)
  • Gemini workflow header comment, adl init --ai flag text, README
  • Tests updated, go test ./... + golangci-lint run (0 issues) + markdownlint README.md clean

One thing I added on purpose

Gemini CLI does not read AGENTS.md by default - its context file name defaults to GEMINI.md and is configurable via the context.fileName setting (docs/reference/configuration.md in google-gemini/gemini-cli). So just deleting the template would have left gemini-enabled projects with no instructions file it could find. Enabling gemini now also writes:

{
  "context": {
    "fileName": "AGENTS.md"
  }
}

to .gemini/settings.json. Verified by generating a gemini-enabled manifest - valid JSON, no generated-file header prepended.

Left as-is

  • .dockerignore still lists CLAUDE.md and GEMINI.md, same reasoning as the existing PR note: a hand-written one stays out of the image.
  • .gemini/settings.json is not tagged linguist-generated and not added to .adl-ignore - it is a 5-line generated config, not a TODO placeholder.
  • Existing projects keep their old GEMINI.md/CLAUDE.md on regenerate - the generator just stops writing them.
  • Vendored schema descriptions still mention CLAUDE.md/GEMINI.md; they come from upstream inference-gateway/adl.

I did not run task examples:generate in full (only the AI example plus a gemini-enabled manifest), and prettier --check README.md fails both before and after my change, so I left README formatting alone. Risk to know: if a Gemini CLI version older than the context.fileName settings schema is used, it will look for GEMINI.md and find nothing.
| Branch feat/drop-claude-md-template

Co-authored-by: Eden Reich <16985712+edenreich@users.noreply.github.com>
Co-authored-by: Eden Reich <16985712+edenreich@users.noreply.github.com>
@edenreich

Copy link
Copy Markdown
Contributor

@infer can you address these? why was claude leaving these as-is use /ponytail:ponytail

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor Author

Model: ollama_cloud/glm-5.3-flash · Action: v0.56.1 · CLI: v0.229.0 · View Job

Todos

  • Identify exact leftovers: dockerignore, linguist tag, stale files, schema descriptions
  • Fix: dockerignore stale entries, gemini linguist tag, validator hint + builtin_config comment, small tests
  • Run checks, commit, push
  • File upstream tracking issue for vendored schema descriptions
  • Apply updated PR body, final verification

Pull Request

#495

✅ Infer Result: Success

All four leftovers are addressed now, pushed as 055ec03 chore(templates): clean up AGENTS.md leftover (task ci green: fmt, lint 0 issues, tests, build, verify-schema).

Why the previous run left them as-is: it judged each one "harmless either way" and documented the reasoning instead of touching code - a judgment call rather than an explicit user request. Fair enough, but the dockerignore entries and the missing linguist tag were fixable at near-zero cost, so they are fixed now, with tests.

  • .dockerignore: dropped the retired CLAUDE.md/GEMINI.md entries; the list now matches what the generator actually writes (AGENTS.md, plus README/CONFIGURATIONS). Added assertions to TestDockerignoreTemplate_ContainsExpectedExclusions so the retired names can't come back.
  • .gemini/settings.json: now tagged linguist-generated=true in the generated .gitattributes under the gemini toggle, with a matching assertion in TestGenerator_AI_AllAgentsEnabled. Deliberately still not in .adl-ignore - that file's contract is TODO placeholders users must implement (tool implementations, custom services, bare skills); settings.json has none, same as Taskfile.yml.
  • Stale CLAUDE.md/GEMINI.md in old projects: still not deleted on regenerate, and that is correct. The generator has no prune pass anywhere in the codebase, and deleting files users may have hand-edited is data loss. Users delete them by hand when they notice.
  • Vendored schema descriptions (spec.development and spec.development.ai still mention CLAUDE.md): cannot patch here - internal/schema/schema.json is vendored and types.go is regenerated from it, task verify-schema would fail on drift. Filed upstream: inference-gateway/adl#217. Once released, sync with task fetch-schema && task generate-types and bump ADL_SCHEMA_VERSION.
  • Bonus cleanup the earlier run missed: the pre-v0.8.0 AI migration hint in internal/schema/validator.go and a doc comment in internal/schema/builtin_config.go still said CLAUDE.md - both now say AGENTS.md.

PR body updated to reflect all of this. Skipped: rewriting the two historical comments referencing the original CLAUDE.md-era bug report (they describe what happened, not what generates today), and any prune pass for stale files. Risk: a project that already regenerated while the PR was in flight, then updates dockerignore by rerunning generate, loses the image exclusion for a stale hand-written CLAUDE.md until they delete it.

Model: ollama_cloud/glm-5.3-flash · Action: v0.56.1 · CLI: v0.229.0 · Exit Code: 0 · Duration: 2m 42s

Tokens: 1,902,428 in · 18,287 out · 1,920,715 total (23 requests)

Tool calls: 41 total · 100% success rate

Traces
Session: 1792088884-895ff9f8

session (headless, success)                                                                        2m34s
├── chat ollama_cloud/glm-5.3-flash                                                                 8.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       8.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     8.3s
│           ╰── POST [inference-gateway, server]                                                    8.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 8.3s
├── execute_tool Read call_jvyis2ws                                                                243µs
├── execute_tool Bash call_otvvpaa4                                                                495ms
├── chat ollama_cloud/glm-5.3-flash                                                                12.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      12.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    12.5s
│           ╰── POST [inference-gateway, server]                                                   12.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                12.5s
├── execute_tool TodoWrite call_h3qipyho                                                            82µs
├── execute_tool Bash call_yilgdg8x                                                                404ms
├── execute_tool Grep call_a8mu9kcb                                                                272ms
├── chat ollama_cloud/glm-5.3-flash                                                                15.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      15.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    15.1s
│           ╰── POST [inference-gateway, server]                                                   15.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                15.1s
├── execute_tool Read call_jyjk2n2k                                                                  1ms
├── execute_tool Read call_e77j918e                                                                763µs
├── execute_tool Read call_ojpf2dx5                                                                780µs
├── execute_tool Read call_qopktkm1                                                                813µs
├── chat ollama_cloud/glm-5.3-flash                                                                 5.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.0s
│           ╰── POST [inference-gateway, server]                                                    5.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.0s
├── execute_tool Grep call_zho96o67                                                                 11ms
├── execute_tool Read call_270dhuhm                                                                571µs
├── chat ollama_cloud/glm-5.3-flash                                                                 4.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.8s
│           ╰── POST [inference-gateway, server]                                                    4.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.8s
├── execute_tool Grep call_pvnpb0q2                                                                366ms
├── chat ollama_cloud/glm-5.3-flash                                                                10.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      10.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    10.0s
│           ╰── POST [inference-gateway, server]                                                   10.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                10.0s
├── execute_tool Read call_q92kkjn0                                                                764µs
├── execute_tool Read call_xni7gs2b                                                                882µs
├── execute_tool Read call_jlhuftof                                                                727µs
├── execute_tool Read call_43w5wngh                                                                688µs
├── chat ollama_cloud/glm-5.3-flash                                                                16.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      16.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    15.9s
│           ╰── POST [inference-gateway, server]                                                   15.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                15.9s
├── execute_tool TodoWrite call_oea4qirh                                                            89µs
├── execute_tool Read call_hxg05cbr                                                                562µs
├── execute_tool Edit call_km0msdvn                                                                939µs
├── execute_tool Edit call_6uphf0ry                                                                943µs
├── execute_tool Edit call_bm697rrm                                                                934µs
├── chat ollama_cloud/glm-5.3-flash                                                                 6.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       6.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     6.3s
│           ╰── POST [inference-gateway, server]                                                    6.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 6.3s
├── execute_tool Edit call_5l0kp1v5                                                                  2ms
├── execute_tool Edit call_at4dqs4k                                                                  1ms
├── execute_tool Edit call_tr4nr06f                                                                  1ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.2s
│           ╰── POST [inference-gateway, server]                                                    2.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.2s
├── execute_tool TodoWrite call_lhegouhm                                                           175µs
├── execute_tool Bash call_uocqm4kx                                                                12.1s
├── chat ollama_cloud/glm-5.3-flash                                                                11.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      11.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    11.2s
│           ╰── POST [inference-gateway, server]                                                   11.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                11.2s
├── execute_tool Bash call_q7it7elc                                                                  6ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.1s
│           ╰── POST [inference-gateway, server]                                                    2.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.1s
├── execute_tool Bash call_2kmkr762                                                                  8ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.1s
│           ╰── POST [inference-gateway, server]                                                    2.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.1s
├── execute_tool Bash call_vv2mky01                                                                 10ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.2s
│           ╰── POST [inference-gateway, server]                                                    2.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.2s
├── execute_tool TodoWrite call_p7bp76kb                                                            48µs
├── execute_tool Bash call_6liqjzga                                                                 1.6s
├── chat ollama_cloud/glm-5.3-flash                                                                 2.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.6s
│           ╰── POST [inference-gateway, server]                                                    2.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.6s
├── chat ollama_cloud/glm-5.3-flash                                                                 2.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.5s
│           ╰── POST [inference-gateway, server]                                                    2.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.5s
├── execute_tool Bash call_m2vyl4wi                                                                314ms
├── chat ollama_cloud/glm-5.3-flash                                                                 6.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       6.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     6.8s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        6.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 6.8s
├── execute_tool Write call_52off1up                                                                 1ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.3s
│           ╰── POST [inference-gateway, server]                                                    1.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.3s
├── execute_tool Bash call_cwi2j45p                                                                 1.7s
├── chat ollama_cloud/glm-5.3-flash                                                                 1.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.5s
│           ╰── POST [inference-gateway, server]                                                    1.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.5s
├── execute_tool Bash call_g2ryatc6                                                                451ms
├── chat ollama_cloud/glm-5.3-flash                                                                 4.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.3s
│           ╰── POST [inference-gateway, server]                                                    4.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.3s
├── execute_tool Write call_onuqnq41                                                                 1ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.9s
│           ╰── POST [inference-gateway, server]                                                    1.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.9s
├── execute_tool TodoWrite call_9b8rq719                                                            63µs
├── execute_tool Bash call_mykd1ro9                                                                 2.1s
├── chat ollama_cloud/glm-5.3-flash                                                                 1.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.4s
│           ╰── POST [inference-gateway, server]                                                    1.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.4s
├── execute_tool Bash call_hqk7bm9k                                                                  6ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.9s
│           ╰── POST [inference-gateway, server]                                                    1.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.9s
├── execute_tool TodoWrite call_x2le9msb                                                            60µs
╰── chat ollama_cloud/glm-5.3-flash                                                                 5.0s
    ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.0s
        ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.0s
            ╰── POST [inference-gateway, server]                                                    5.0s
                ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.0s
Stats
Tool Calls

╭───────────┬───────┬───────┬────────╮
│ Tool      │ Calls │ Fail% │ Avg    │
├───────────┼───────┼───────┼────────┤
│ Bash      │ 12    │ 0%    │ 1602ms │
│ Read      │ 11    │ 0%    │ 781µs  │
│ Edit      │ 6     │ 0%    │ 1ms    │
│ TodoWrite │ 6     │ 0%    │ 56µs   │
│ Grep      │ 3     │ 0%    │ 216ms  │
│ Write     │ 2     │ 0%    │ 1ms    │
╰───────────┴───────┴───────┴────────╯

Token Usage

╭────────────────────────────┬─────────┬─────────┬────────────┬─────────┬──────╮
│ Model                      │ Prompt  │ Cached  │ Completion │ Total   │ Cost │
├────────────────────────────┼─────────┼─────────┼────────────┼─────────┼──────┤
│ ollama_cloud/glm-5.3-flash │ 1902428 │ 1518720 │ 18287      │ 1920715 │ -    │
╰────────────────────────────┴─────────┴─────────┴────────────┴─────────┴──────╯

Sessions

╭───────────┬──────────┬──────────╮
│ Execution │ Mode     │ Sessions │
├───────────┼──────────┼──────────┤
│ headless  │ headless │ 1        │
╰───────────┴──────────┴──────────╯

Triggered by edenreich · Infer Action · OSS

Drop retired CLAUDE.md and GEMINI.md entries from the generated .dockerignore, tag .gemini/settings.json as linguist-generated in .gitattributes, and point the pre-v0.8.0 AI migration hint plus a builtin-tools doc comment at AGENTS.md.

Kept on purpose: the generator still does not delete stale CLAUDE.md/GEMINI.md files (it can lose user edits), and .adl-ignore keeps covering only TODO placeholders, so .gemini/settings.json has no ignore entry.
@edenreich edenreich changed the title feat(templates): generate AGENTS.md for claude code instead of CLAUDE.md refactor(templates): generate AGENTS.md for claude code instead of CLAUDE.md Oct 15, 2026
@edenreich
edenreich merged commit 1755c57 into main Oct 15, 2026
5 checks passed
@edenreich
edenreich deleted the feat/drop-claude-md-template branch October 15, 2026 18:35
inference-gateway-releaser Bot added a commit that referenced this pull request Oct 15, 2026
## [0.68.1](v0.68.0...v0.68.1) (2026-10-15)

### ♻️ Improvements

* **templates:** generate AGENTS.md for claude code instead of CLAUDE.md ([#495](#495)) ([1755c57](1755c57))

### 🔧 Miscellaneous

* sync ADL schema to v0.29.1 ([#496](#496)) ([78fb5bd](78fb5bd))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.68.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant