Every change to this book MUST follow Test-Driven Development. No exceptions.
Before writing ANY documentation:
- Test file created in
tests/ch*/directory - Test follows naming convention:
test_XX_description.ruchy - Test uses
fun main()structure - Test uses
funkeyword (notfn) - Test is minimal and focused
-
ruchy compile test_file.ruchysucceeds -
./a.outproduces expected output -
make test-file FILE=test_file.ruchypasses - No compilation warnings or errors
- Output matches documentation claims
- Added to appropriate chapter test directory
- Included in
make test-chXXtarget - Passes
make test(all tests) - Passes
make lint(quality checks) - Listed in INTEGRATION.md
After tests pass, documentation must:
- Every code example has corresponding test file
- Test file path referenced in documentation
- Output shown matches actual test output
- Version compatibility stated (v1.1.0)
- No untested features documented
- Chapter marked as "Test-Driven"
- Test count shown in header
- "How to verify" section included
- Test files referenced by path
- Make commands documented
- No TODO/FIXME/HACK comments
- No "should work" statements
- No "coming soon" promises
- No placeholder content
- No vaporware features
-
funkeyword used for Ruchy functions -
fnonly in Rust examples (clearly marked) - Consistent indentation (4 spaces)
- No trailing whitespace
- UTF-8 encoding
- Minimum 3 examples per chapter
- Each example is self-contained
- Examples build on each other logically
- Edge cases tested where relevant
- Error cases documented (if applicable)
-
make testpasses (100% required) -
make lintpasses (no violations) -
make validatepasses (all checks) -
make buildsucceeds (book builds) - No large files (>1MB) committed
- Test Coverage: 100% (all examples tested)
- Pass Rate: 100% (no failures allowed)
- Documentation: Complete (no gaps)
- Quality: A+ (clean, tested, verified)
- Foundation Chapters: ✅ 11/11 tests passing
- Intermediate Chapters: ⏳ In development
- Advanced Chapters: ⏳ Planned
- Total Tests: 11+ (growing with each sprint)
- Success Rate: 100% (mandatory)
Before any release or major commit:
-
make test- All tests pass -
make test-ch01- Chapter 1 passes -
make test-ch02- Chapter 2 passes -
make test-ch03- Chapter 3 passes -
make test-foundation- All foundation passes
-
make lint- No issues found -
make format- Formatting checked -
make validate- All validations pass - No SATD comments in codebase
- No broken examples
- INTEGRATION.md updated with status
- README.md reflects current state
- ROADMAP.md shows completed work
- Version numbers consistent (v1.1.0)
- Test counts accurate
- No binary files (a.out, etc.)
- No temporary files
- No debug artifacts
-
.gitignoreupdated if needed - Commit message follows format
These issues MUST be fixed before proceeding:
- ❌ Any test failure
- ❌ Documented feature doesn't work
- ❌ Version mismatch
- ❌ Missing test files
- ❌ Untested documentation
- ❌ SATD comments present
- ❌ Vaporware documentation
- ❌ Placeholder content
- ❌ Function keyword misuse
- ❌ Large file commits
At the end of each sprint:
- All sprint tests written
- 100% pass rate achieved
- Tests organized by chapter
- Test counts documented
- Performance acceptable
- Chapters written from tests
- Examples reference test files
- Verification instructions included
- No untested features
- Version compatibility noted
- INTEGRATION.md updated
- Sprint marked complete
- Metrics documented
- Next sprint planned
- Commit pushed to main
- Review test failures (should be zero)
- Update test coverage metrics
- Plan next week's tests
- Review community feedback
- Update roadmap if needed
- Sprint retrospective
- Quality metrics analysis
- Process improvements
- Tool updates
- Documentation review
If quality gates fail:
- Stop all work - Don't continue with failures
- Fix immediately - Tests must pass first
- Document issue - Update INTEGRATION.md
- Review process - Why did it fail?
- Prevent recurrence - Update this checklist
A successful Ruchy book contribution:
- ✅ Tests written before documentation
- ✅ 100% of tests passing
- ✅ Documentation matches tests exactly
- ✅ Quality gates all green
- ✅ INTEGRATION.md updated
- ✅ Version compatibility verified
- ✅ No untested features
- ✅ Community can verify examples
- ✅ Follows Toyota Way principles
- ✅ Improves reader confidence
Remember: Test first, document what works, never promise what doesn't exist.
Last Updated: 2025-08-23 Book Version: 2.0.0-TDD Compliance: 100% TDD