2.5 KiB
2.5 KiB
Study Dashboard – Agent Instructions
This document summarizes the project conventions and provides a hand-off for the next sprint. When starting new work, follow these steps before touching any code:
- Read the docs: review
README.md,docs/architecture.md, and this file to understand the stack (PySide6, MVVM, dependency-injector, SQLite seed DB). - Prepare the env: run
bash scripts/bootstrap.shto create/update.venv. Use the helper scripts (bash scripts/run-app.sh,bash scripts/run-qa.sh) so env vars and caches are handled automatically. - Run tests by default:
bash scripts/run-qa.shexecutes pytest, mypy, flake8, and black in one go (forward extra pytest args as needed). Add or extend tests alongside code.
Guiding Principles
- Architecture: MVVM with a thin PySide6 view (
gui/main_view.py), a Qt-based ViewModel (gui/main_view_model.py), and a repository layer backed by SQLite. All data access goes throughStudyRepository. - Dependency injection: extend
src/study_dashboard/di_container.pywhen adding new services or ViewModels. Create providers for configs beforehand. - Database: the bootstrapper auto-creates
study.dbwith seed data. When schema changes, updateservices/database.pyand adjust tests. - Generated files: everything temporary belongs under
bin/(already git-ignored). The PySide deploy spec lives indeploy/pysidedeploy.spec,bash scripts/build.shwraps it and writes output tobin/deploy. - Cleanup: if a task bypassed the helper scripts and left
__pycache__folders insrc/ortests/, runbash scripts/clean.shbefore committing. - UI language: keep user-facing strings in German.
- Style: enforce PEP8 via
flake8 src tests. Keep docstrings and comments concise; prefer descriptive identifiers.
Workflow Expectations
- For every feature: rely on the helper scripts (
run-app,run-qa,build) to keep commands consistent, usebash scripts/clean.shwhenever cached artefacts slip into tracked folders, and update documentation/tests alongside code. - Update documentation if behavior or setup changes (
README.mdordocs/architecture.md). - Prefer smaller commits tied to single concerns.
Next Sprint Placeholder
When kicking off a new sprint:
- Identify the next feature or bug fix.
- Write a brief plan (e.g., extend ViewModel for KPI charts, add editing dialogs, etc.).
- List tasks in order inside the todo tool / project tracker.
- Execute while keeping the principles above in mind.
Add future objectives below as they are defined.