Skip to content

Add AGENTS.md#494

Merged
llucax merged 1 commit intofrequenz-floss:v0.x.xfrom
llucax:agents
Jan 27, 2026
Merged

Add AGENTS.md#494
llucax merged 1 commit intofrequenz-floss:v0.x.xfrom
llucax:agents

Conversation

@llucax
Copy link
Contributor

@llucax llucax commented Jan 26, 2026

Add condensed agent instructions in AGENTS.md with:

  • Quick reference for common commands
  • Project structure overview
  • Code style patterns with examples
  • Cookiecutter workflow summary

@llucax llucax requested a review from a team as a code owner January 26, 2026 11:39
@llucax llucax requested review from florian-wagner-frequenz and removed request for a team January 26, 2026 11:39
@github-actions github-actions bot added the part:docs Affects the documentation label Jan 26, 2026
@llucax llucax modified the milestones: v0.15.0, v0.14.1 Jan 26, 2026
@llucax llucax self-assigned this Jan 26, 2026
@llucax
Copy link
Contributor Author

llucax commented Jan 26, 2026

I've been trying to avoid adding AGENTS.md files so far because I wanted to create a good one and add it to the template. The thing is this is not happening, and agents are already doing a decent job in writing AGENTS.md files, so I guess it is better to have some OK now that something perfect and reusable never.

@llucax llucax enabled auto-merge January 26, 2026 11:42
@llucax llucax requested a review from Marenz January 26, 2026 11:42
@llucax llucax added the cmd:skip-release-notes It is not necessary to update release notes for this PR label Jan 26, 2026
Add condensed agent instructions in AGENTS.md with:
- Quick reference for common commands
- Project structure overview
- Code style patterns with examples
- Cookiecutter workflow summary

Signed-off-by: Leandro Lucarella <luca-frequenz@llucax.com>

```sh
# Setup
pip install -e .[dev] # All dev dependencies
Copy link
Contributor

Choose a reason for hiding this comment

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

uv pip?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would do that only when we switch the official docs and CI.

pip install -e .[dev-noxfile] # Just noxfile deps

# Test
nox -s pytest_max # Full test suite
Copy link
Contributor

Choose a reason for hiding this comment

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

Or even uv run nox -s pytest_max without any pre-installation? I've seen claude use this a lot.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same. This should be in sync with the README, I don't think it would be a good idea to have diverging agents and readme files.

@Marenz
Copy link
Contributor

Marenz commented Jan 27, 2026

A few more thoughts:

The file is aimed at AI agents, but most of this is generic Python/nox info that agents already know. The real value in AGENTS.md is project-specific quirks and decisions that aren't obvious from the code.

Missing stuff that would actually help agents:

  • DCO sign-off requirement (git commit -s)
  • That this is a cookiecutter template repo - distinction between the repo itself vs generated projects
  • How to test template changes (generate a project, test it)
  • Common pitfalls when modifying templates

The code style section is fine but agents can infer most of that from existing code. What they can't infer is "why" decisions and gotchas.

@llucax llucax added this pull request to the merge queue Jan 27, 2026
Merged via the queue into frequenz-floss:v0.x.x with commit 9587b9f Jan 27, 2026
6 checks passed
@llucax llucax deleted the agents branch January 27, 2026 14:46
@llucax
Copy link
Contributor Author

llucax commented Jan 27, 2026

The file is aimed at AI agents, but most of this is generic Python/nox info that agents already know. The real value in AGENTS.md is project-specific quirks and decisions that aren't obvious from the code.

Without reading the readme, the agent doesn't know if you use poetry or pip or uv or whatever, so some guidance should remove ambiguity.

DCO sign-off requirement (git commit -s)

True.

That this is a cookiecutter template repo - distinction between the repo itself vs generated projects

It is there "Python package (3.11+) providing repository configuration and scaffolding for Frequenz projects: cookiecutter templates (actor, api, app, lib, model), nox sessions, protobuf/gRPC utilities, MkDocs and pytest utilities."

How to test template changes (generate a project, test it)
There are instructions for testing, including golden tests. The project generation part is missing, true.

Common pitfalls when modifying templates

Not sure what do you have in mind, but yeah, might be worth adding, but these are also useful for humans. I tried to add most of the comprehensive instructions in docs for humans and keep the agents file as a quick cheat-sheet, and mention in the agents file to consult the full docs (readme and contributing files) for details. I don't think it makes sense to duplicate all the current docs in the agents file.

I guess something else that's important in the agents file is that info is very condensed, to minimize the usage of the context window. Reading the whole readme and contributing might take too many tokens.

In any case, this is just a first version, we can always improve it in the future.

@llucax
Copy link
Contributor Author

llucax commented Jan 27, 2026

BTW, about commits I'm finding myself always having to give extra instructions for getting decent commit messages that are not super AI-weird. It might be worth having some common instructions we somehow copy&paste on every project's custom instructions. I guess we need to update #390 and continue there if we want to discuss big plans ™️

@llucax llucax modified the milestones: v0.14.1, v0.15.0 Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmd:skip-release-notes It is not necessary to update release notes for this PR part:docs Affects the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants