Skip to content

Commit 74fb9d3

Browse files
committed
docs(codex): updated agent instructions
1 parent a862d9c commit 74fb9d3

File tree

2 files changed

+32
-18
lines changed

2 files changed

+32
-18
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
# Nothing to download at the moment.
4+
# All downloads should go in ../internet_resources to avoid accidentally commiting them to git

AGENTS.md

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ just bench
3838
During development, certain commands will fail because you don't have
3939
access to the internet.
4040

41-
The script `.codex/internet_resources/download.sh` is executed before
41+
The script `.agents/download_internet_resources.sh` is executed before
4242
your development session starts while your computer is still connected
4343
to the internet.
4444

@@ -49,7 +49,7 @@ can always propose a PR that modifies the download.sh script instead
4949
of completing your main task.
5050

5151
Downloading development dependencies may also fail due to the lack of
52-
internet connectivity. We are trying to maintain the script `.codex/build_all_targets.sh`
52+
internet connectivity. We are trying to maintain the script `.agents/codex-setup`
5353
that is also executed before your development session starts while
5454
your computer is still connected to the internet. It tries to run
5555
all build commands that need development dependencies in order to
@@ -63,29 +63,39 @@ the file system (i.e. depending on the programming language, the
6363
operating system and the package manager being used, they should
6464
be in their standard location).
6565

66+
# Keeping notes
67+
68+
In the `.agents/codebase-insights.txt` file, we try to maintain useful tips that may help
69+
you in your development tasks. When you discover something important or surprising about
70+
the codebase, add a remark in a comment near the relevant code or in the codebase-insights
71+
file. ALWAYS remove older remarks if they are no longer true.
72+
73+
You can consult this file before starting your coding tasks.
74+
6675
# Code quality guidelines
6776

68-
- Strive to achieve high code quality.
69-
- Write secure code.
70-
- Make sure the code is well tested and edge cases are covered. Design the code for testability.
71-
- Write defensive code and make sure all potential errors are handled.
72-
- Strive to write highly reusable code with routines that have high fan in and low fan out.
73-
- Keep the code DRY.
77+
- ALWAYS strive to achieve high code quality.
78+
- ALWAYS write secure code.
79+
- ALWAYS make sure the code is well tested and edge cases are covered. Design the code for testability and be extremely thorough.
80+
- ALWAYS write defensive code and make sure all potential errors are handled.
81+
- ALWAYS strive to write highly reusable code with routines that have high fan in and low fan out.
82+
- ALWAYS keep the code DRY.
7483
- Aim for low coupling and high cohesion. Encapsulate and hide implementation details.
84+
- When creating executable, ALWAYS make sure the functionality can also be used as a library.
85+
To achieve this, avoid global variables, raise/return errors instead of terminating the program, and think whether the use case of the library requires more control over logging and metrics from the application that integrates the library.
7586

7687
# Code commenting guidelines
7788

78-
- Document public APIs and complex modules.
89+
- Document public APIs and complex modules using standard code documentation conventions.
90+
- Comment the intention behind you code extensively. Omit comments only for very obvious
91+
facts that almost any developer would know.
7992
- Maintain the comments together with the code to keep them meaningful and current.
80-
- Comment intention and rationale, not obvious facts. Write self-documenting code.
81-
- When implementing specific formats, standards or other specifications, make sure to
82-
link to the relevant spec URLs.
93+
- When the code is based on specific formats, standards or well-specified behavior of
94+
other software, always make sure to include relevant links (URLs) that provide the
95+
necessary technical details.
8396

8497
# Writing git commit messages
8598

86-
The first line of the commit message should follow the "conventional commits" style:
87-
https://www.conventionalcommits.org/en/v1.0.0/
88-
89-
In the remaining lines, provide a short description of the implemented functionality.
90-
Provide sufficient details for the justification of each design decision if multiple
91-
approaches were considered.
99+
- You MUST use multiline git commit messages.
100+
- Use the convential commits style for the first line of the commit message.
101+
- Use the summary section of your final response as the remaining lines in the commit message.

0 commit comments

Comments
 (0)