diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-07-27 16:54:28 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-07-27 16:54:28 +0200 |
| commit | 71ca66bcba70f7a463df6ee9bdcb0e14b8e60595 (patch) | |
| tree | 6e962f0d8c3346fd871cb337f9c5a14e4c0f0a08 /AGENTS.md | |
| parent | ed39c60ebc10efe2b644172e7c82f943c4fba3cc (diff) | |
feat: minimal grocery list — add items, check them off
- Groceries DB schema (id, name, checked, created_at) with Drizzle + libsql
- /+page.server.ts: load (unchecked items, newest first), add & toggle actions
- /+page.svelte: text input + Add button, item list with toggle buttons
- Mobile-first styling with scoped CSS classes
- AGENTS.md: project-specific rules including UI validation
Diffstat (limited to 'AGENTS.md')
| -rw-r--r-- | AGENTS.md | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..a886d39 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,68 @@ +## Engineering Principles + +- Never delete published software versions +- Never run sudo commands yourself, ask the user +- Use `lightpanda` when internet access is needed; run `lightpanda --help` first to get the full list of available commands and options +- Surface assumptions before building. Wrong assumptions held silently are the most common failure mode. +- Push back when warranted. The agent (or engineer) is not a yes-machine. +- Prefer the boring, obvious solution. Cleverness is expensive. +- Touch only what you're asked to touch. +- When scripting is necessary, create a python file, use inline metadata for dependencies and `uv run <script.py>` +- Stop and ask when requirements conflict. Don't guess. +- Ask if it works before commiting +- All code comments must be in English. No French comments in code. + +## Implementation + +- Add a few logs at the feature level (not inside every unit function). +- When possible, start with a failing test and ask for user validation before implementing the fix or feature. +- No new tests are needed during pure refactoring. + +## Software Design + +- Ubiquitous Language - Names matter. Ask the user when defining a new concept +- Entity - Objects having a stable identity encapsulate data and invariants +- Value Objects - Immutable, self-validating. Date, Money, ... +- Enum-to-enum conversion - Never convert one enum to another with a ternary or `if/else`. A ternary silently collapses every unhandled input value into the fallback branch, so adding a new member to the source enum compiles without error and produces a wrong result. Use an exhaustive object map typed as `Record<SourceEnum, TargetEnum>` so a new source member is a compile error until it is mapped. + +## Tools + +- Toujours utiliser `rg` (ripgrep) à la place de `grep` pour la recherche dans les fichiers +- Toujours utiliser `find` pour la recherche de fichiers par nom/chemin + +## Feature Completion + +Avant de considérer une feature comme terminée, toujours exécuter dans l'ordre : + +1. Formatage du code +2. Lint (`pnpm lint` ou équivalent) +3. Build (`pnpm build` ou équivalent) +4. Tests (`pnpm test` ou équivalent sur le scope impacté) + +## Testing + +- Utiliser des UUID plutôt que des 'machin-id' dans les tests + +## Dependency Changes + +- Ne pas edit les dépendances manuellement, utiliser le package manager + +1. Edit all config files in one pass +2. Run `pnpm install --lockfile-only` to update lockfile +3. Run `pnpm why <package>` to verify removal +4. Run tests to confirm nothing broke + +## Documentation + +- After finishing a new feature, add a one line entry to the README explaining the feature for a user. + +## Data + +Filling CSV may be easier using cat to append a line at the end, than to edit the file. +You can add data at the end, and sort it later if needed. + +## UI Validation + +- Always validate the UI visually before finishing a task (fetch the page via + lightpanda or check the rendered HTML/CSS output to verify layout is + correct). |
