Skip to content

Commit 8ae8d30

Browse files
committed
Enhancement (agents-development-workflow): Improved TDD rules again.
Signed-off-by: Exadra37 <[email protected]>
1 parent ef66782 commit 8ae8d30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

DEVELOPMENT_WORKFLOW.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ You **MUST** follow the INTENT_SPECIFICATION document for the protocol to implem
1717

1818
### 2.1 TDD First - Rules
1919

20-
1. You **MUST** follow a red-green-refactor cycle, without any exceptions:
21-
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 with an empty function.
20+
1. You **MUST** write comprehensive tests to cover all code paths, and they **MUST** follow a red-green-refactor cycle, without any exceptions:
21+
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.
2424
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.

0 commit comments

Comments
 (0)