Instructions
- Preparation:
- Review
Docs/ANTIGRAVITY_INSTRUCTIONS.mdfor project-specific rules.- Check
Docs/Technical/for relevant guidelines. - Check
Docs/Reference/Glossary.mdfor consistent naming. - Check
Docs/Reference/DataModel.mdfor the database schema.
- Check
- TDD First:
- Start by writing failing tests in
DerotMyBrain.Tests(Backend: xUnit/Moq) orsrc/frontend/src/**/*.test.tsx(Frontend: Vitest/RTL). - Ensure tests cover nominal, edge, and error cases.
- Start by writing failing tests in
- Active Learning Workflow:
- Implement the "Explore -> Read -> Quiz" cycle.
- Flexibility: Allow launching "Read" or "Quiz" directly from an existing Activity or any Source (Document, OnlineResource, Backlog).
- AI Integration (Ollama):
- Use the local Ollama API for text analysis and quiz generation.
- De-mocking: Do not use
sampleArticlesor mocked results if the goal is functional E2E.
- Backend Implementation:
- Follow Clean Architecture: Core -> Infrastructure -> API.
- Use
PascalCasefor methods,_camelCasefor fields. - Ensure thin controllers and thick services.
- Frontend Implementation:
- Follow layered architecture: API -> (Store) -> Hook -> Component.
- Use semantic Tailwind classes (e.g.,
bg-background). - Move all logic to Custom Hooks.
- Data Persistence:
- Use SQLite + EF Core. No external DBs.
- Seed realistic data for
TestUser.
- Review:
- Run all tests:
dotnet testandnpm test. - Check for lint errors or hardcoded colors.
- Run all tests:
Critical Constraints
- NO direct API calls in Components.
- NO business logic in Controllers.
- TDD is mandatory.
- Mock data for
TestUseris mandatory.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.