Skip to content

Add AGENTS.md and CLAUDE.md with project rules for AI coding agents#7902

Merged
sfc-gh-truwase merged 1 commit intodeepspeedai:masterfrom
delock:gma/add-agents-md
Mar 13, 2026
Merged

Add AGENTS.md and CLAUDE.md with project rules for AI coding agents#7902
sfc-gh-truwase merged 1 commit intodeepspeedai:masterfrom
delock:gma/add-agents-md

Conversation

@delock
Copy link
Collaborator

@delock delock commented Mar 13, 2026

Summary

Add AGENTS.md and CLAUDE.md to provide project-specific rules for AI coding agents (OpenCode, Claude Code, etc.) working on the
DeepSpeed codebase.

Motivation

AI coding agents are increasingly used for development tasks. Without project-specific instructions, they often produce PRs that violate DeepSpeed conventions — missing DCO sign-off, using import torch.distributed, making cosmetic formatting changes, or generating code that doesn't match the surrounding style. This file encodes those rules so agents follow them automatically.

What's included

  • Commit & CI requirements: DCO sign-off, yapf/flake8 formatting, pre-commit checks, check-torchdist rule, license header for new files.
  • Code change discipline: No cosmetic-only changes, remove dead code decisively, consolidate tests, match surrounding code style, write beginner-friendly code, comment the "why" not the "what".
  • Tool caveats: Known issue with AI agent edit tools that silently reformat code.

Two identical files are provided (AGENTS.md for OpenCode, CLAUDE.md for Claude Code) with a comment reminding contributors to keep them in sync.

@delock delock force-pushed the gma/add-agents-md branch 2 times, most recently from 8bcb6a5 to e069937 Compare March 13, 2026 09:40
Signed-off-by: Ma, Guokai <guokai.ma@gmail.com>
@sfc-gh-truwase
Copy link
Collaborator

@delock thanks for the PR. The files seem to be duplicated content. Is this unavoidable?

@sfc-gh-truwase sfc-gh-truwase merged commit 49a82a0 into deepspeedai:master Mar 13, 2026
9 checks passed
@delock
Copy link
Collaborator Author

delock commented Mar 13, 2026

@delock thanks for the PR. The files seem to be duplicated content. Is this unavoidable?

Hi @sfc-gh-truwase, Claude Code and OpenCode use different name for the file. OpenCode suggest duplicate the file and rely on agents to maintain consistency.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants