Skip to content

Commit dd15052

Browse files
committed
Enhancement (agents-development-workflow): Added a TDD rule for the the test runner.
Signed-off-by: Exadra37 <exadra37@gmail.com>
1 parent 8ae8d30 commit dd15052

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

DEVELOPMENT_WORKFLOW.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ You **MUST** follow the INTENT_SPECIFICATION document for the protocol to implem
2121
1. **RED** - The test **MUST** fail without compiler warnings or errors, but you **MUST NOT** implement the full working code under test to solve the warning or the error, otherwise you get a GREEN test without a having first a correct RED failing test. You **MUST** implement only the minimal required code to satisfy the warning or error for the code under test, like creating the Module/Class/File with an **empty** function by preference, or in alternative one function that returns `TODO`.
2222
2. **GREEN** - Implement the minimal code required to make the test pass. This code needs to be well crafted, secure, easy to read, reason about, and to modify later.
2323
3. **REFACTOR** - After the test is GREEN inspect the code for opportunities of improvement to follow best practices, avoid common pitfalls, performance issues, security issues (OWASP TOP TEN and more), and to ensure it follows this project guidelines.
24+
4. **TEST RUNNER** - During the red-green-refactor cycle you **MUST** run it only for the file being tested, and/or only for the function being tested when applicable.
2425
2. When you are coding a module/class/file that depends on other ones you **MUST** start by the leaf dependency and work you way up to the file that starts the dependency chain. You **MUST** use the TDD red-green-refactor cycle for this.
2526
3. Don't change the code under test to suit the way you wrote the test. Instead re-write it.
2627
4. Only if a test is really hard to write, then you need to analyze and compare the test and the code under test to determine:

0 commit comments

Comments
 (0)