Skip to content

[DPE-10234] docs: add AGENTS.md and CLAUDE.md with comprehensive agent guidelines#1705

Open
marceloneppel wants to merge 6 commits into
16/edgefrom
agents-file
Open

[DPE-10234] docs: add AGENTS.md and CLAUDE.md with comprehensive agent guidelines#1705
marceloneppel wants to merge 6 commits into
16/edgefrom
agents-file

Conversation

@marceloneppel
Copy link
Copy Markdown
Member

@marceloneppel marceloneppel commented May 25, 2026

Issue

Coding agents working on this repository make architectural mistakes (violating charm patterns, Patroni coordination, relation interfaces) and produce code that fails CI (linting, type checking, test failures) due to lack of comprehensive guidance.

Solution

Add a comprehensive AGENTS.md file covering:

  • Architectural rules: module responsibilities, Patroni-only lifecycle management, relation handler patterns, leader-only writes, peer data access, event deferral, status setting, rolling restarts, retry patterns, Juju secrets for sensitive data, vendored libraries in lib/.
  • Code quality rules: copyright headers, style (ruff), type checking (ty).
  • Testing rules: unit test patterns, integration test setup (jubilant preferred for new tests), conftest auto-mocking, cloud credentials only for backup/restore tests.
  • Workflow checklist: step-by-step CI validation procedure, all constants in constants.py.

Add a CLAUDE.md symlink pointing to AGENTS.md so that Claude Code auto-loads the same guidelines at session start.

Checklist

  • I have added or updated any relevant documentation.
  • I have cleaned any remaining cloud resources from my accounts.

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
@marceloneppel marceloneppel added the enhancement New feature, UI change, or workload upgrade label May 26, 2026
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
@marceloneppel marceloneppel changed the title docs: add AGENTS.md with comprehensive agent guidelines docs: add AGENTS.md and CLAUDE.md with comprehensive agent guidelines May 26, 2026
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
…location

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
…sting guidelines

Signed-off-by: Marcelo Henrique Neppel <marcelo.neppel@canonical.com>
@marceloneppel marceloneppel changed the title docs: add AGENTS.md and CLAUDE.md with comprehensive agent guidelines [DPE-10234] docs: add AGENTS.md and CLAUDE.md with comprehensive agent guidelines May 26, 2026
@marceloneppel marceloneppel marked this pull request as ready for review May 26, 2026 20:35
@marceloneppel marceloneppel requested a review from a team as a code owner May 26, 2026 20:35
@marceloneppel marceloneppel requested review from carlcsaposs-canonical, dragomirp, juju-charm-bot and taurus-forever and removed request for a team May 26, 2026 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, UI change, or workload upgrade

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants