From 3f5ea8db23710fef9bee3a92e90aeb1112774b99 Mon Sep 17 00:00:00 2001 From: Jack Millward Date: Wed, 7 Oct 2026 21:33:18 +0100 Subject: [PATCH] Added laravel/boost and AGENTS.md --- .gitignore | 4 + AGENTS.md | 325 +++++++++++++++++++++++++++++++++++++++++++++ NOTES.md | 9 ++ composer.json | 4 +- composer.lock | 360 +++++++++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 699 insertions(+), 3 deletions(-) create mode 100644 AGENTS.md create mode 100644 NOTES.md diff --git a/.gitignore b/.gitignore index 98ada53..bf4b64e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,15 +5,19 @@ .env.production .phpactor.json .phpunit.result.cache +/.agents /.codex /.cursor/ /.idea +/.junie /.nova /.phpunit.cache /.vscode /.zed /auth.json +/boost.json /node_modules +/opencode.json /public/build /public/fonts-manifest.dev.json /public/hot diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..c9d7183 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,325 @@ +# AGENTS.md + +Guidance for AI coding agents (and humans) working in this repository. + +`README.md` covers what this is and how to run it; `TASK.md` is the exercise brief. **Read both +before starting.** This file covers only how to work here: the checks you must pass, and the +standards the code follows. + +This is Laravel + Inertia + Vue 3. **There is no JSON API** — controllers return +`Inertia::render(...)` with props, and API Resources define the shape of those props. Auth is +stubbed; every request resolves as the seeded demo user, so build user-scoped work against +`$request->user()` / `auth()->user()`. + +## Checks + +Run from the repository root, in this order, after **every** change: + +```bash +vendor/bin/pint # 1. code style (fixes; run it, don't use --test) +vendor/bin/phpstan analyse # 2. static analysis — Larastan, level 5 +php artisan test # 3. PHPUnit +``` + +All three must pass before a change is done. A change that cannot pass one of them is not finished. + +## Workflow rules + +1. **Every change needs tests.** No exception — including refactors and front-end tweaks that + change server-side output. If a change genuinely can't be tested, say so explicitly in your + summary rather than skipping it silently. +2. **Never silence static analysis to get green.** Don't lower `phpstan.neon`'s `level`, add to + `ignoreErrors`, or add `@phpstan-ignore` comments. Fix the code, or narrow an ignore in + `phpstan.neon` with a comment explaining why. +3. **Leave no debugging leftovers** — `dd`, `dump`, `ray`, commented-out code. +4. **Don't commit** `.env`, `vendor/`, `node_modules/`, `public/build`, or + `database/database.sqlite`. Don't commit at all unless asked. +5. **Write decisions down.** Any product judgement call — an edge case, a trade-off, something + deliberately left out — belongs in a code comment if it's local, and in `NOTES.md` if it's + user-visible. + +## Standards + +Applies across PHP, Vue and CSS. + +- **Pint's `laravel` preset is the style authority.** Never hand-tune formatting — run Pint and + let it fix things. +- **Comments explain *why*, not *what*.** Match the existing comments; they exist because the + alternative is a subtle bug. +- **PHPDoc on anything with a non-obvious type** — return types, array shapes, generic + annotations. Larastan reads it, so omitting it produces errors on correct code. +- **Fail loudly, validate at the edge.** Invalid input is rejected at the boundary rather than + guarded for defensively further in. + +## PHP + +- **Enums** for closed value sets (`ListingStatus`, `PropertyType`). Add `label()` for display and, + where a set drives a `