nanolang / testing-standards
Cursor rule628 starsChanged 4 months agoApache-2.0View on GitHub
Always Green testing philosophy - 100% passing tests required at all times
We split this RULE.md into the rules it gives an agent
12 rules. About 0 are common, 12 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
Before committing parser changes:
- Distinctive: line 57
Unit tests: Must pass 100%
- Distinctive: line 58
Integration tests: Must pass 100%
- Distinctive: line 59
Shadow tests: Must pass 100%
- Distinctive: line 66
DO NOT: commit broken code
- Distinctive: line 70
Add tests to prevent recurrence
- Distinctive: line 77
Check if parser uses that feature
- Distinctive: line 79
Add test to catch this pattern
- Distinctive: line 103
No exceptions. No "temporary breaks".
- Distinctive: line 105
If it breaks tests, it doesn't get committed.
- Distinctive: line 106
If it breaks self-hosting, it's a critical bug.
- Distinctive: line 107
If examples fail, it's blocking.
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Testing Standards - Always Green 🟢
Core Principle: Always Green
This project maintains 100% passing tests. Any commit that breaks tests is unacceptable.
Self-Hosted Parser Requirements
The self-hosted parser (src_nano/parser_mvp.nano) must:
- ✅ Compile successfully with zero errors
- ✅ Pass all shadow tests (internal validation)
- ✅ Parse itself (self-hosting validation)
- ✅ Support all features it uses in its own code
Test Requirements
All Code Changes Must:
- ✅ Pass compilation (zero errors)
- ✅ Pass all existing tests
- ✅ Not break self-hosting
- ✅ Include tests for new features
- ✅ Update documentation
Running Tests
# Quick check
./bin/nanoc src_nano/parser_mvp.nano
# Full test suite
./tests/run_all_tests.sh
# Examples
make examplesSelf-Hosting Check
Before committing parser changes:
# Must succeed with zero errors
./bin/nanoc src_nano/parser_mvp.nano
# Must show PASSED
./tests/run_all_tests.sh | grep "All runnable tests passed"Test Coverage Standards
- Unit tests: Must pass 100%
- Integration tests: Must pass 100%
- Shadow tests: Must pass 100%
- Self-hosting: Must validate 100%
Emergency Procedures
If Tests Break
- DO NOT commit broken code
- DO NOT merge to main
- Fix immediately or revert
- Investigate root cause
- Add tests to prevent recurrence
If Self-Hosting Breaks
CRITICAL: This is a blocker. Must fix before any other work.
- Identify which feature broke it
- Check if parser uses that feature
- Fix or revert immediately
- Add test to catch this pattern
Success Metrics
Green Status Indicators
- ✅ All tests passing
- ✅ Self-hosting works
- ✅ Zero compilation errors
- ✅ Zero warnings
- ✅ Examples build
- ✅ Documentation current
Quality Metrics
- Test pass rate: 100%
- Coverage: >95%
- Self-hosting: Validated
- Performance: < 10s compile time
Remember
"Always Green" means ALWAYS GREEN.
No exceptions. No "temporary breaks". No "will fix tomorrow".
If it breaks tests, it doesn't get committed.
If it breaks self-hosting, it's a critical bug.
If examples fail, it's blocking.
Keep nanolang green! 🟢
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/code-quality/RULE.mdCursor rule
- .cursor/rules/file-organization/RULE.mdCursor rule
- github-issue-trackingSkill
- nanovm-opcode-debuggingSkill
- reading-nanolangSkill
- release-readinessSkill
- releasing-documentationSkill
- releasing-presentationSkill
- releasingSkill
- roadmap-executionSkill
- session-completionSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

