Skip to content

Commit f59a0f4

Browse files
authored
Create AGENTS.md (#7)
1 parent 0026fcc commit f59a0f4

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# AGENTS
2+
3+
## Dev environment tips
4+
- All development lifecycle commands must be run inside the Docker container.
5+
- Docker Compose is located at `./docker/docker-compose.yml`
6+
- The PHP container is named `php`
7+
- All important commands are defined in Composer, so use the following pattern to run them: `docker-compose --file "docker/docker-compose.yml" run --rm "php" composer run-script {{command}}`
8+
- Aliases for all commands are also defined in the `Makefile`.
9+
- Using `make` is always preferable when it is installed in the current environment.
10+
- Commands
11+
- Install or update all PHP dependencies
12+
- Docker: `docker-compose --file "docker/docker-compose.yml" run --rm "php" composer update`
13+
- Make: `make install`
14+
- Fix files so they follow the code style
15+
- Docker: `docker-compose --file "docker/docker-compose.yml" run --rm "php" composer run-script fixer`
16+
- Make: `make fixer`
17+
- Run the linter (static analysis and code style checks)
18+
- Docker: `docker-compose --file "docker/docker-compose.yml" run --rm "php" composer run-script linter`
19+
- Make: `make linter`
20+
- Run all tests
21+
- Docker: `docker-compose --file "docker/docker-compose.yml" run --rm "php" composer run-script test`
22+
- Make: `make test`
23+
- Run all tests with code coverage (results will be stored in HTML format in `./tests/coverage`)
24+
- Docker: `docker-compose --file "docker/docker-compose.yml" run --rm "php" composer run-script coverage`
25+
- Make: `make coverage`
26+
- Run mutation testing
27+
- Docker: `docker-compose --file "docker/docker-compose.yml" run --rm "php" composer run-script infection`
28+
- Make: `make infection`
29+
- Run all required checks in one command (`fixer` + `linter` + `test` + `infection`)
30+
- Docker: `docker-compose --file "docker/docker-compose.yml" run --rm "php" composer run-script release`
31+
- Make: `make release`
32+
- Start a Bash session in the container environment
33+
- Docker: `docker-compose --file "docker/docker-compose.yml" run --rm "php" bash`
34+
- Make: `make shell`
35+
36+
## Testing instructions
37+
- To verify that a change is correct, run the following commands in order. If any command fails, stop and fix the issue before continuing.
38+
- Fix files so they follow the code style
39+
- Run all tests
40+
- Run the linter
41+
- Run mutation testing
42+
- The library uses PHPUnit and follows standard patterns.
43+
- Tests are located in `./tests`
44+
- The folder structure must match the structure in `./src`
45+
- All test classes must extend `Marvin255\ValueObject\Tests\BaseCase`
46+
- There must be one test class for each production class
47+
- All new changes must be covered by unit tests.

0 commit comments

Comments
 (0)