Skip to content

Commit 0beef86

Browse files
tiranclaude
andcommitted
docs(agents): add rules for DCO sign-off, .test TLD, backtick formatting, and Sphinx version directives
- enforce `git commit --signoff` for DCO sign-off (agent was sometimes ignoring the rule) - use `.test` TLD instead of `example.com` in tests and examples - use single backticks in markdown/commit messages, double backticks in .rst - use Sphinx `versionadded`/`versionremoved`/`versionchanged` directives for user-facing changes Co-Authored-By: Claude <claude@anthropic.com> Signed-off-by: Christian Heimes <cheimes@redhat.com>
1 parent 7b10135 commit 0beef86

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

AGENTS.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- Chain exceptions: `raise ValueError(...) from err`
1616
- Use `req_ctxvar_context()` for per-requirement logging
1717
- Run `hatch run lint:fix` to format code
18+
- Always use `git commit --signoff`
1819

1920
### Don't
2021

@@ -93,23 +94,34 @@ Look at these before writing code:
9394

9495
**Import rules:** All imports at the top of the file, no local imports. See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
9596

97+
**URLs:** Use the `.test` TLD (e.g. `https://pkg.test/simple/`) instead of `example.com` in tests. Use `.example` TLD in examples.
98+
9699
**Testing:** Use Arrange/Act/Assert pattern, name functions `test_<behavior>()`. See `tests/test_context.py` for examples.
97100

101+
## Documentation and doc strings
102+
103+
- Use single backticks around function and class names in markdown (e.g. `req_ctxvar_context()`, `WorkContext`), double backticks in .rst (reStructuredText) (e.g. ``req_ctxvar_context()``)
104+
- Use Sphinx `versionadded`, `versionremoved`, `versionchanged` directives for user-facing changes (get next version from last git tag)
105+
98106
## Commit Messages
99107

100108
Follow [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) — see [CONTRIBUTING.md](CONTRIBUTING.md) for format, types, and examples.
101109

102-
When AI agents create or significantly modify code, add attribution:
110+
Use backticks around function and class names (e.g. `WorkContext`)
111+
112+
Always use `--signoff` to add a DCO sign-off. When AI agents create or significantly modify code, also add attribution:
103113

104114
```text
105-
feat(scope): short summary
115+
git commit --signoff -m "feat(scope): short summary
106116
107117
Body explaining what and why.
108118
109119
Co-Authored-By: Claude <claude@anthropic.com>
110120
Closes: #123
111121
```
112122

123+
This produces a commit message with both the `Signed-off-by` trailer (from `--signoff`) and the `Co-Authored-By` trailer.
124+
113125
## Workflow for Complex Tasks
114126

115127
1. **Search codebase** for similar patterns first

0 commit comments

Comments
 (0)