Start tracking a version number and a player-facing changelog, surfaced from the ☰ menu via a new About item. - frontend/src/lib/changelog.js: VERSION (bump every commit) + CHANGELOG. - AboutModal.svelte: shows the version and changelog using the shared modal CSS; closes via ×, backdrop click, or Escape. - CornerMenu.svelte: new 'ℹ️ About' menu item, modal rendered outside the menu's stacking context so it overlays correctly on every page. - AGENTS.md: documents the bump-every-commit / log-only-user-facing convention. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
31 lines
2.0 KiB
Markdown
31 lines
2.0 KiB
Markdown
Use the version of Python/Pytest in the .venv directory when attempting to run commands, as that's where the pip dependencies (and pytest) are installed.
|
|
|
|
## Database migrations
|
|
|
|
Schema changes use Alembic (migrations live in `src/pirats/migrations/`, shipped inside the package). The app applies them automatically at startup via `pirats.database.run_migrations()`; databases predating Alembic are normalized and stamped at the `0001` baseline first.
|
|
|
|
After editing `src/pirats/models.py`, generate a migration and sanity-check it:
|
|
|
|
```
|
|
.venv/bin/alembic revision --autogenerate -m "describe the change"
|
|
.venv/bin/alembic upgrade head # or just start the app
|
|
```
|
|
|
|
Do NOT add ad-hoc `ALTER TABLE` statements to `database.py` — that legacy list exists only to upgrade pre-Alembic databases to the baseline and must not grow.
|
|
|
|
## Learning during testing
|
|
|
|
When you run into a repeatable problem during testing (e.g. port assignment collision, missing executable, etc), note down the problem and solution in this file so that you'll have access to it in future sessions.
|
|
|
|
## Versioning & changelog
|
|
|
|
The app shows its version number and a player-facing changelog in the ☰ menu → About. Both come from `frontend/src/lib/changelog.js` (rendered by `frontend/src/components/AboutModal.svelte`).
|
|
|
|
- Bump `VERSION` by one on **every** commit.
|
|
- When a commit changes something players can see, add an entry to the **top** of `CHANGELOG` (`{ version, date, changes: [...] }`) describing it in player-facing terms. Group everything shipping under one version into a single entry.
|
|
- The changelog is for players: skip refactors, tests, tooling, and other internal-only changes. A commit with no user-facing change bumps `VERSION` but adds no entry.
|
|
|
|
## Work order
|
|
|
|
You will be working on tasks in [TODO.md](./TODO.md]. Work on at most two tasks at a time (one is preferable, but two is fine if they dove tail really nicely), and after you finish each task, make a git commit and update the TODO list to check off the completed task.
|