Guide for Test-Driven Development workflow. Use this when implementing features, writing tests, or following the red-green-refactor cycle.
All implementation in RLM follows Test-Driven Development with a 5-step process.
RLM/tasks/active/TASK-XXX.mdRLM/specs/features/FTR-XXX/specification.mdRLM/specs/constitution.mdRLM/specs/design/ (UI code only)Write failing tests FIRST. Tests define the expected behavior.
describe('[Component/Module]', () => {
describe('[method/function]', () => {
it('should [expected behavior] when [condition]', () => {
// Arrange — set up test data
// Act — call the function/method
// Assert — verify the result
});
});
});
Guidelines:
Write the minimum code to make tests pass:
npm testnpm run lintnpx tsc --noEmitRLM/progress/status.jsonactive/ to completed/type(scope): description (FTR-XXX, TASK-YYY)| Rating | Coverage | Action |
|---|---|---|
| Excellent | 90%+ | Ship it |
| Good | 80-89% | Acceptable |
| Fair | 70-79% | Add more tests |
| Poor | < 70% | Must improve |