Skip to content

Add AGENTS.md, CLAUDE.md#1480

Open
TheForgotten69 wants to merge 8 commits into
Nerogar:masterfrom
TheForgotten69:claude-agents-pr-template
Open

Add AGENTS.md, CLAUDE.md#1480
TheForgotten69 wants to merge 8 commits into
Nerogar:masterfrom
TheForgotten69:claude-agents-pr-template

Conversation

@TheForgotten69

@TheForgotten69 TheForgotten69 commented May 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds contributor tooling for AI-assisted development and a standard PR template.

  • AGENTS.md: onboarding guide for AI coding agents (Codex, Claude Code, etc.), which contains
    codebase layout, factory/auto-discovery architecture, step-by-step recipes for common
    extension points (new model family, optimizer, LR scheduler, config field), and a
    footguns section covering known sharp edges (LayerOffloadConductor, ZLUDA, CTK workaround, etc.).
  • CLAUDE.md: single-line redirect to AGENTS.md, picked up automatically by Claude Code.

Test plan

  • pre-commit run --all-files passes

AI assistance

  • AI-assisted — I have read every line in this diff and can defend each change

@TheForgotten69 TheForgotten69 mentioned this pull request May 27, 2026
2 tasks
Comment thread AGENTS.md

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how was this file created?
/init?
as a result of discussing with Claude?

@TheForgotten69 TheForgotten69 May 27, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/init, and then thorough discussion based on the last merged PR. I then rewrote any bits that are just wrong or too verbose (to my knowledge)

The caveat with /init only is that it's very surface level with lots of useless information that is easily accessible, my goal is for these files to provide the right entry point so no context/time is lost

Comment thread CLAUDE.md

@dxqb dxqb May 27, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the purpose of the redirect? are there other agends that would read AGENTS.md directly? Codex?

@TheForgotten69 TheForgotten69 May 27, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Basically all the other AI providers use the AGENTS.md but Anthropic/Claude - so yes the best practice seems to just redirect on CLAUDE.md

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't a symlink better here? That's what I've seen in other projects.

Comment thread AGENTS.md Outdated

## Recipes

### Add a new model family

@dxqb dxqb May 27, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should have these recipes.

  • adding a new model: I have created an experimental PLAN_NEWMODEL.md, learned while implementing Anima and Lens. It alone is 15 kb text. This short recipe won't work well.
  • add a new LR scheduler: we rarely if ever do that
  • add a noise scheduler: we never do that; modern models have their fixed noise scheduler
  • the optimizer recipe might be the only useful one here.

@TheForgotten69 TheForgotten69 May 27, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good I'll change that. I guess it might make sense to commit the PLAN_NEWMODEL.md in docs/ and just pointing to there wdyt? That way, it should be easy to iterate/suggest improvement to this directly so knowledge isn't lost across sessions
i'll do this with the Optimizer recipe

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done as well, Optimizer recipe extracted to docs/recipes/AddOptimizer.md pointed to from AGENTS.md

Comment thread .github/pull_request_template.md Outdated
Comment thread .github/pull_request_template.md Outdated
Comment thread .github/pull_request_template.md Outdated
@TheForgotten69

Copy link
Copy Markdown
Contributor Author

Should be ready now

Comment thread .github/pull_request_template.md Outdated
@@ -0,0 +1,33 @@
<!--
Thanks for contributing to OneTrainer.
Please read AGENTS.md (project rules for any AI-assisted work) before opening this PR,

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

people read their CLAUDE.md? is this really good advice?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

People definitely should read the CLAUDE/AGENTS.md and contribute to it in order to make it live and not stale honestly. Granted it's read by the AI agents but it outlines general context of the repo and it's not anything not useful to any human from my pov

@dxqb

dxqb commented May 30, 2026

Copy link
Copy Markdown
Collaborator

Should be ready now

agree on the PR template (only one comment above)
I'd like to use the CLAUDE.md myself for a while before merging that (and thereby recommending it for everyone else), but if you want you could split the PR and have the PR template merged first.

@TheForgotten69

This comment was marked as resolved.

@TheForgotten69 TheForgotten69 changed the title Add AGENTS.md, CLAUDE.md, and pull request template Add AGENTS.md, CLAUDE.md May 31, 2026
@dxqb dxqb added the preview merged in the preview branch label Jun 3, 2026
dxqb added a commit that referenced this pull request Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview merged in the preview branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants