.cursor/skills/test-implementation-requirements/SKILL.md
--- name: test-implementation-requirements description: Enforces test implementation requirements: real dependencies, no mocks/stubs unless approved. Use when writing tests, reviewing test implementations, or ensuring tests use real functionality. --- # Test Implementation Requirements ## Core Principle **Tests must test real functionality. Mocks and stubs have strict limitations.** ## Mandatory Requirements ### ✅ REQUIRED - **Real Functionality** - Tests exercise actual code paths and real
npx skillsauth add avra-cadavra/avrai .cursor/skills/test-implementation-requirementsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Tests must test real functionality. Mocks and stubs have strict limitations.
⚠️ Mocks require explicit approval and justification:
Before using any mock, you MUST:
Potentially acceptable rare cases:
Even in rare cases: Prefer real implementations with test doubles (fake implementations) over mocks.
❌ STUBS - FORBIDDEN:
test('repository fetches data from storage', () async {
// Use real GetStorage (in-memory for tests)
await TestStorageHelper.initTestStorage();
final repository = MyRepositoryImpl();
// Test with real implementation
final result = await repository.getData();
expect(result, isNotNull);
// Cleanup
await TestStorageHelper.clearTestStorage();
});
test('repository fetches data', () {
// ❌ Mock without justification
final mockDataSource = MockDataSource();
final repository = MyRepositoryImpl(dataSource: mockDataSource);
when(() => mockDataSource.getData()).thenReturn('test');
// Tests mock, not real functionality
});
.cursorrules - Test Implementation Requirements sectiondevelopment
--- name: world-model-development description: Guides world model development patterns: state/action encoders, ONNX inference, feature extraction pipeline, latency budgets. Use when implementing world model components, state encoders, action encoders, feature extractors, or ONNX models. Core skill for Phases 3-6. --- # World Model Development Patterns ## Core Principle All world model components follow LeCun's autonomous machine intelligence framework. State observations flow through a percep
tools
Implements base workflow controller patterns for multi-step processes. Use when creating complex workflows that require orchestration of multiple steps with error handling and rollback.
testing
--- name: widget-test-patterns description: Guides widget test patterns: BLoC testing, user interactions, state changes, material app setup. Use when writing widget tests, testing UI components, or validating widget behavior. --- # Widget Test Patterns ## Core Pattern Widget tests verify UI behavior: user interactions, state changes, and visual display. ## Basic Widget Test Setup ```dart testWidgets('widget displays correctly', (WidgetTester tester) async { // Arrange: Create widget awa
testing
--- name: test-template-generation description: Generates test templates: unit, widget, integration, service tests following project patterns. Use when creating new tests or ensuring tests follow project standards. --- # Test Template Generation ## Available Templates Test templates are located in `test/templates/`: - `unit_test_template.dart` - `widget_test_template.dart` - `integration_test_template.dart` - `service_test_template.dart` ## Unit Test Template ```dart /// SPOTS Component Uni