Skip to content

chore: Improve agents.md#598

Open
PierreQuinton wants to merge 1 commit intomainfrom
update-agents-md
Open

chore: Improve agents.md#598
PierreQuinton wants to merge 1 commit intomainfrom
update-agents-md

Conversation

@PierreQuinton
Copy link
Contributor

Suggested by OpenCode. @ValerianRey Would be nice to test with this.

@ValerianRey ValerianRey added the cc: chore Conventional commit type for changes to some configuration files of the project. label Mar 2, 2026
@github-actions github-actions bot changed the title Improve agents.md chore: Improve agents.md Mar 2, 2026
Copy link
Contributor

@ValerianRey ValerianRey left a comment

Choose a reason for hiding this comment

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

Tbh I don't like that so much, because I think it's too exhaustive and thus too long. This will be injected in the context of every single question, so from what I read, it has to be short and apply to most of the requests to claude. I have also read somewhere that auto-generated agents.md generally have a negative effect on the quality of the agent.

I think that we should use hooks whenever it's possible, to avoid bloating agents.md with tokens. So everything that explains formatting, linting, type checking and so on, should almost just be a post-completion hook. I'm not sure how it works on open code, but it seems possible: https://dev.to/einarcesar/does-opencode-support-hooks-a-complete-guide-to-extensibility-k3p

Comment on lines +44 to +47
Run tests on CUDA (requires GPU):
```bash
CUBLAS_WORKSPACE_CONFIG=:4096:8 PYTEST_TORCH_DEVICE=cuda:0 uv run pytest tests/unit
```
Copy link
Contributor

Choose a reason for hiding this comment

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

This will confuse the agent whenever it runs on an environment without gpu access.

Comment on lines +49 to +52
Run tests with coverage:
```bash
uv run pytest tests/unit tests/doc --cov=src
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Not really necessary for the agent to check code coverage every time. Also, it should already know how to use the --cov option from pytest.

Comment on lines +54 to +74
### Linting and Type Checking

Run type checking:
```bash
uv run ty check
```

Run linting:
```bash
uv run ruff check
```

Run formatting:
```bash
uv run ruff format
```

Run all checks together:
```bash
uv run ty check && uv run ruff check && uv run ruff format
```
Copy link
Contributor

Choose a reason for hiding this comment

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

We should probably remove all of that and just add that as an agent post-completion hook. Whatever agent provider we use in the future should also support hooks IMO.

Comment on lines +78 to +86
From the `docs` folder:
```bash
uv run make html
```

Clean build:
```bash
uv run make clean
```
Copy link
Contributor

Choose a reason for hiding this comment

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

We should merge those two to gain tokens.


- Only generate docstrings for public functions or functions with more than 4 lines of code
- Use Sphinx style (`:param my_param: Does something`) - never use `:returns:` key
- Include usage examples in docstrings for public classes
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we want agents to do the usage examples themselves.

Comment on lines +173 to +176
### Deprecation

- Raise `DeprecationWarning` for deprecated public functionality
- Add test in `tests/unit/test_deprecations.py` to verify warning
Copy link
Contributor

Choose a reason for hiding this comment

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

This is extremely niche IMO. This information is mostly directed to maintainers.

- Follow SOLID principles
- Keep code simple and readable
- Prefer explicit over implicit
- Add type hints to all public interfaces
Copy link
Contributor

Choose a reason for hiding this comment

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

Already said somewhere.

- Keep code simple and readable
- Prefer explicit over implicit
- Add type hints to all public interfaces
- Document complex algorithms with comments
Copy link
Contributor

Choose a reason for hiding this comment

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

LLMs tend to already overuse comments, so I don't think that's needed.

- Prefer explicit over implicit
- Add type hints to all public interfaces
- Document complex algorithms with comments
- Run all checks before submitting: `uv run ty check && uv run ruff check && uv run ruff format`
Copy link
Contributor

Choose a reason for hiding this comment

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

Hook

Comment on lines +165 to +171
### Adding New Aggregators

- Subclass `Aggregator` or `Weighting` base classes
- Aggregators must be **immutable** (no stateful changes)
- Implement the mathematical mapping as documented
- Add corresponding weighting if applicable
- Update `__init__.py` to export the new class
Copy link
Contributor

Choose a reason for hiding this comment

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

That's directed to individual contributors. I don't think this is worth the tokens in agents.md.

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

Labels

cc: chore Conventional commit type for changes to some configuration files of the project.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants