agentleFS
jordanhubbardjordanhubbard/nanolang/.cursor/rules/testing-standards/RULE.md

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
  1. Distinctive:

    Before committing parser changes:

    line 45
  2. Distinctive:

    Unit tests: Must pass 100%

    line 57
  3. Distinctive:

    Integration tests: Must pass 100%

    line 58
  4. Distinctive:

    Shadow tests: Must pass 100%

    line 59
  5. Distinctive:

    DO NOT: commit broken code

    line 66
  6. Distinctive:

    Add tests to prevent recurrence

    line 70
  7. Distinctive:

    Check if parser uses that feature

    line 77
  8. Distinctive:

    Add test to catch this pattern

    line 79
  9. Distinctive:

    No exceptions. No "temporary breaks".

    line 103
  10. Distinctive:

    If it breaks tests, it doesn't get committed.

    line 105
  11. Distinctive:

    If it breaks self-hosting, it's a critical bug.

    line 106
  12. Distinctive:

    If examples fail, it's blocking.

    line 107

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
RULE.md

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:

  1. ✅ Compile successfully with zero errors
  2. ✅ Pass all shadow tests (internal validation)
  3. ✅ Parse itself (self-hosting validation)
  4. ✅ 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 examples

Self-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

  1. DO NOT commit broken code
  2. DO NOT merge to main
  3. Fix immediately or revert
  4. Investigate root cause
  5. Add tests to prevent recurrence

If Self-Hosting Breaks

CRITICAL: This is a blocker. Must fix before any other work.

  1. Identify which feature broke it
  2. Check if parser uses that feature
  3. Fix or revert immediately
  4. 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! 🟢

Download now (ZIP)

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.