Add AGENTS.md and CLAUDE.md with project rules for AI coding agents (#7902)
### 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.
Signed-off-by: Ma, Guokai <guokai.ma@gmail.com>