Current Task Context
!cat RLM/progress/.current-context.md 2>/dev/null || echo "No active task"
TDD Workflow
All implementation in RLM follows Test-Driven Development with a 5-step process.
5-Step Implementation Process
Step 1: Load Context (0-20%)
- •Read the task file:
RLM/tasks/active/TASK-XXX.md - •Read the feature spec:
RLM/specs/features/FTR-XXX/specification.md - •Read project standards:
RLM/specs/constitution.md - •Check design system:
RLM/specs/design/(UI code only)
Step 2: Write Tests -- Red Phase (20-40%)
Write failing tests FIRST. Tests define the expected behavior.
typescript
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:
- •One assertion per test (prefer)
- •Test edge cases and error conditions
- •Use descriptive test names
- •Mock external dependencies
Step 3: Implement -- Green Phase (40-70%)
Write the minimum code to make tests pass:
- •No premature optimization
- •No extra features beyond what tests require
- •Functions < 50 lines
- •Single Responsibility Principle
Step 4: Verify (70-85%)
- •Run all tests:
npm test - •Check coverage: target 80%+
- •Run linter:
npm run lint - •Type check:
npx tsc --noEmit
Step 5: Review (85-100%)
- •Quality checks pass
- •Update
RLM/progress/status.json - •Move task from
active/tocompleted/ - •Commit:
type(scope): description (FTR-XXX, TASK-YYY)
Hard Gates (must pass before task completion)
- •No incomplete markers (
TODO,FIXME,HACK,XXX,PLACEHOLDER) - •Every function under 50 lines (extract helpers if over)
- •No empty/stub source files (minimum 5 non-blank lines)
- •Test framework config present (
vitest.config.tsor jest config) - •Manifest task ID matches
TASK-NNNformat
Coverage Targets
| Rating | Coverage | Action |
|---|---|---|
| Excellent | 90%+ | Ship it |
| Good | 80-89% | Acceptable |
| Fair | 70-79% | Add more tests |
| Poor | < 70% | Must improve |