Append || true to all verification commands (tests, linting, type checks) so the output is always captured, even on failure. Without it, a non-zero exit code can hide the output, forcing an expensive second run just to read the errors.
# CORRECT — output always visible
vendor/bin/pest --filter=testName || true
vendor/bin/pint --dirty --format agent || true
# WRONG — output lost on failure, wastes time re-running
vendor/bin/pest --filter=testNameBefore you push to main, run the changelog skill over the commits you are about to push. It decides whether they earn an entry in config/changelog.php, the "What's new" page users read, and writes the entry if they do.
- Add an entry only for a change a user notices: a new feature, a new or dropped shop, a Pro change, or a fix to something users hit. Skip refactors, tests, tooling, review follow-ups and small polish. Most pushes add nothing.
- Write every entry in three passes: draft, simplify, then the
humanizerskill. English only. - Say what the user gets, not how it works: "shops now load faster and come in one by one", not which step starts first or what a progress bar replaced.
- Commit the entry with the change, or as its own commit in the same push.
phpunit.xml.dist pins DB_DATABASE=dipcatch_test, and every clone of this repository on one machine shares it. Two agents running the suite at once both migrate:fresh-wipe that database, and each corrupts the other mid-run. The signature is errors that walk the schema as it is rebuilt — relation "users" does not exist, then a missing column, then a different missing column — with a different set of tests failing every run. It is not a defect in the code under test.
When you work in a Polyscope clone or git worktree, name the test database after the clone. The <env> entry carries no force attribute, so an exported DB_DATABASE wins over it:
DB_DATABASE="dipcatch_test_$(basename "$(git rev-parse --show-toplevel)" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/_/g')" vendor/bin/pest --compact || true- A serial run creates its own database:
migrate:freshpasses--forcetomigrate, which issuesCREATE DATABASEwhen it is missing. Running the whole suite serially needsphp -d memory_limit=1Gin front ofvendor/bin/pestand--no-tiaafter it. Without the limit, the default 128M runs out partway through and reads like a test failure. Without--no-tia, Pest's local test impact analysis can replay cached results instead of running a test, and it leaks memory while it records (pestphp/pest#2035). - A parallel run (
composer test) does not. Laravel's parallel-testing support connects to the base database to recreate its per-worker ones, so create the base once per clone first:psql -h 127.0.0.1 -U postgres -c 'CREATE DATABASE "dipcatch_test_<slug>"'. --parallelis not a substitute — it isolates workers inside one run, not across checkouts.- The name is derived from the clone, never the run, so it is reused rather than multiplied. In the primary checkout keep the bare
dipcatch_test.
Two other resources are shared and are not covered by this: the Herd site (a clone's .env still says APP_URL=http://dipcatch.test, so eye-verify drives the main checkout) and the dipcatch dev database, which carries the cache, sessions and queue as well as the app's data. Browser setup, what not to run against dev data, and teardown including an orphan sweep: .ai/docs/worktree-clone-isolation.md.
This project declares three pipelines in .config/pipeline.php. Run
php artisan pipeline:list for the question each one answers, the steps it
walks, and the values --only accepts. It reads the config, so it cannot drift
from what runs — which a table here would.
Drive them with the pipeline MCP server: open_run(pipeline: "<name>"), then
next_step until the walk finishes. Name the pipeline on every call. Do not
commit, amend or check out while a walk is open — the fingerprint covers HEAD.
After a failed step, fix the cause and call open_run again, not next_step.
php artisan pipeline:verify --pipeline=closeout is the pre-PR gate. A green
change receipt does not answer a closeout question.
Scope with only: "backend" or only: "frontend" only when exactly one side of
the diff has something to say. Pass the same --only= to pipeline:verify. A
mistyped tag refuses the run rather than passing.
For the change-level check, open a change run rather than running a suite by
hand. Its test step is tools/verify/affected-tests.sh, so a bare
vendor/bin/pest over the suite answers a narrower question and records no
receipt.
This is about the gate, not about iterating. Running one file or one
--filter=testName while you work on that test is the narrowest set that covers
the change, and "Running Tests" below still governs it. Run
affected-tests.sh directly only for a richter-derived selection outside a walk,
and never as php artisan test $(php artisan richter:affected-tests --plain),
because an empty selection from richter exits 0 and prints nothing, so a bare
substitution runs the whole suite.
DipCatch tracks prices at any webshop, in the Netherlands and abroad. When you describe it — in user copy, the changelog, outreach, a spec or a PR — never present it as a supermarket or grocery tool, and do not narrow a general feature such as "where to shop this week" to supermarkets.
- Supermarket support is deeper than elsewhere (weekly offers, upcoming deals, unit prices). Name it as a strength, not as the scope.
- Dutch shops have the best and widest support. Say so, but do not call DipCatch a Dutch price tracker.
SanderMuller/dipcatch is a public GitHub repository. A later commit, a force-push or a rename does not unpublish what a push already published. Treat every commit, branch name and PR body as permanent and world-readable, and remember that .gitignore names files, not classes of file — it is not a safety net.
- Never commit a secret — an API key, token, password, private key, signed URL, internal hostname or connection string.
.env.exampleis the only.env*file that belongs in the repository, and it carries defaults and placeholders, never a working credential. - A secret that reached
originis leaked, not fixable in place. Stop, tell the user to rotate the credential, and remove it from the code after that. - Keep personal data out of the repository. Tests, factories, seeders, screenshots and documentation use fictional names and e-mail addresses. Strip session cookies, auth tokens and anything that identifies a person from a captured page fixture under
tests/Fixtures/before you commit it. A real shop URL or public product page is fine. - A browser-harness run under
.github/eye-verify/leaves more than screenshots. Never commit its storage state, trace, HAR or network dump — a storage state holds a live session cookie. - Commit messages, PR and issue text, code comments and TODOs are public too. Keep an internal host, a private URL and a real customer name out of them. The local
.testhost and a package this repository already depends on are fine. - Keep an agent working file out of the commit — a plan, a review brief, a scratch note.
/internalis gitignored and holds them. - Give a workflow under
.github/workflows/no morepermissions:than its jobs need, and give a new ignore in.github/zizmor.ymla comment that states why.
CHANGELOG.md is auto-populated by CI on release. Do not hand-edit it.
When you need to document a user-facing change for a release, write it to RELEASE_NOTES_<version>.md at the repo root (already gitignored via the RELEASE_NOTES*.md pattern). The CI release job picks it up and promotes it into CHANGELOG.md as part of the tag flow.
If you find yourself editing CHANGELOG.md directly, stop — it will be overwritten.
The "What's new" page users read in the app is a separate log in config/changelog.php, owned by the changelog skill.
Run a filtered blast-radius pass while writing backend PHP. /richter-review stays the full PR-time review (invoke-only). Procedure: richter-during-dev skill. Slash command: /richter-during-dev.
Once after: (1) the first vertical slice that adds or changes an entry surface (controller, Livewire, job, command, route, AppServiceProvider binding); (2) each implement-spec phase that writes app/; (3) evaluate / closeout.
Skip if this already ran in the conversation and no app/ PHP changed since. Skip comments, Pint, assertion-only, and frontend-only diffs. If JS calls a new backend route, still run the slice (affectedTests in the output).
--base is the task parent — the same range evaluate uses. Never default to origin/main on a stacked or mixed branch. Uncommitted task: HEAD. One commit: HEAD~1. Branch is this task: origin/main. Unrelated dirty files: --head=HEAD.
Artisan is the contract. Do not call richter:detect-changes. Do not filter entryPoints in the model.
php artisan richter:task-slice --base=<task-base>
php artisan richter:task-slice --base=<task-base> --head=HEADMCP task-slice and detect-changes (head included) exist from richter 0.63. Prefer the Artisan slice even when GetDynamicTools lists richter.
Keep a surface whose own file is in the diff, or that is not reached only through a hub (config/richter.php task_slice). Unexplained surfaces stay. Drop hub fan-out. ownReach is not a keep rule. Feature tokens are not a keep rule.
Zero kept is not “nothing to test”. A product loader or DTO is not a route. When runImpact is true, run php artisan richter:impact "FQCN" for each runImpactOn (MCP impact only if the namespace exists). A session test that hits the class counts even when Richter does not name it.
unreferencedKept: no test proves the surface — confirm coverage or add a test that names the route or command. Hazards: update callers and tests. Findings: read them. affectedTests is never narrowed by hubs. affectedTestsDeterminable: true: run affectedTests. false: run affectedTests when the list is not empty, then related tests; full suite at evaluate.
Richter does not read the spec. “No hazards” is not “the feature is correct.” Do not paste the raw detect-changes report.
tools/verify/affected-tests.sh runs exactly the files richter:affected-tests names, and
falls back to the whole suite only when the selection is undeterminable. Use it rather than
php artisan test $(php artisan richter:affected-tests --plain) — an empty selection passes no
paths to test, which then runs everything without saying so. tools/verify/affected-tests.test.sh
covers the wrapper itself:
bash tools/verify/affected-tests.sh
bash tools/verify/affected-tests.test.sh tools/verify/affected-tests.shEvery project on this Laravel Cloud account shares one Redis instance. The key prefix is the only thing that separates them, so a lost prefix means one project reads and overwrites another project's cache, sessions and queues.
- Keep
REDIS_PREFIXandCACHE_PREFIXapp-specific. Never set either to an empty value, and keep theStr::slug(APP_NAME)defaults inconfig/database.phpandconfig/cache.php. - Every connection under
database.redisinherits the top-leveloptions.prefix. A per-connectionprefixoroptionskey overrides it — do not add one that clears the prefix. - Do not use a database index for isolation. Managed Redis may allow index 0 only, and an index is not a namespace.
- A package or client that reaches Redis outside
Redis::connection()never gets that prefix. Give it an app-scoped prefix in its own config —queue-insights.key_prefixis one such setting.
- Laravel Boost is an MCP server with tools designed specifically for this application. Prefer Boost tools over manual alternatives like shell commands or file reads.
- Use
database-queryto run read-only queries against the database instead of writing raw SQL in tinker. - Use
database-schemato inspect table structure before writing migrations or models. - Use
get-absolute-urlto resolve the correct scheme, domain, and port for project URLs. Always use this before sharing a URL with the user. - Use
browser-logsto read browser logs, errors, and exceptions. Only recent logs are useful, ignore old entries.
- Use
search-docsbefore changes that depend on Laravel ecosystem APIs, behavior, configuration, or version-specific syntax. Skip it for copy-only edits and other changes where package documentation is irrelevant. Reuse sufficient results already in context instead of searching again. - Pass a
packagesarray to scope results when you know which packages are relevant. - Use multiple broad, topic-based queries:
['rate limiting', 'routing rate limiting', 'routing']. Expect the most relevant results first. - Do not add package names to queries because package info is already shared. Use
test resource table, notfilament 4 test resource table.
- Use words for auto-stemmed AND logic:
rate limitmatches both "rate" AND "limit". - Use
"quoted phrases"for exact position matching:"infinite scroll"requires adjacent words in order. - Combine words and phrases for mixed queries:
middleware "rate limit". - Use multiple queries for OR logic:
queries=["authentication", "middleware"].
- This project contains committed, area-grouped rules in
.ai/ruleswhen that directory exists, including path-scoped framework guidelines under.ai/rules/boost. Before you enter plan mode or create/edit any file, you MUST first: open @.ai/rules/index.md (it maps file globs to rule files), read every rule file whose globs cover the path(s) in scope, and rungrep -rin 'keyword' .ai/rulesto catch what a path match alone misses. Do not write code until you have read and are following every matching rule. If.ai/rulesdoes not exist, continue without it.
- Run Artisan commands directly via the command line (e.g.,
php artisan route:list). Usephp artisan listto discover available commands andphp artisan [command] --helpto check parameters. - Inspect routes with
php artisan route:list. Filter with:--method=GET,--name=users,--path=api,--except-vendor,--only-vendor. - Read configuration values using dot notation:
php artisan config:show app.name,php artisan config:show database.default. Or read config files directly from theconfig/directory.
- Execute PHP in app context for debugging and testing code. Do not create models without user approval, prefer tests with factories instead. Prefer existing Artisan commands over custom tinker code.
- Always use single quotes to prevent shell expansion:
php artisan tinker --execute 'Your::code();'- Double quotes for PHP strings inside:
php artisan tinker --execute 'User::where("active", true)->count();'
- Double quotes for PHP strings inside:
- Laravel can be deployed using Laravel Cloud, which is the fastest way to deploy and scale production Laravel applications.
- Add or update tests for behavior and logic changes when a test provides meaningful regression coverage.
- Pure copy, styling, and layout-only changes do not require new or updated tests.
- When test coverage applies, run the affected tests and ensure they pass.
- Test the changed behavior and its important failure modes, but do not add tests beyond them.
- Read the
testing-best-practicesskill before writing tests.
This application is a Laravel application running on PHP 8.5. Always use the APIs that match the installed major version of each package — do not assume a version.
Before relying on a package's API, confirm its installed version:
- PHP packages: run
composer show --directto list direct dependencies with versions, orcomposer show <vendor/package>for a single package. - JS packages: check
package.jsonfor the installed versions.
This project has domain-specific skills available in **/skills/**. You MUST activate the relevant skill whenever you work in that domain—don't wait until you're stuck.
- You must follow all existing code conventions used in this application. When creating or editing a file, check sibling files for the correct structure, approach, and naming.
- Use descriptive names for variables and methods. For example,
isRegisteredForDiscounts, notdiscount(). - Check for existing components to reuse before writing a new one.
- Do not create verification scripts or tinker when tests cover that functionality and prove they work. Unit and feature tests are more important.
- Stick to existing directory structure; don't create new base folders without approval.
- Do not change the application's dependencies without approval.
- If a frontend change doesn't show in the UI or you get a "Unable to locate file in Vite manifest" error, run
yarn run buildor ask the user to runyarn run devorcomposer run dev.
- You must only create documentation files if explicitly requested by the user.
- The application is served by Laravel Herd at
https?://[kebab-case-project-dir].test. Use theget-absolute-urltool to generate valid URLs. Never run commands to serve the site. It is always available. - Use the
herdCLI to manage services, PHP versions, and sites (e.g.herd sites,herd services:start <service>,herd php:list). Runherd listto discover all available commands.
- Use
php artisan make:commands to create new files (i.e. migrations, controllers, models, etc.). You can list available Artisan commands usingphp artisan listand check their parameters withphp artisan [command] --help. - If you're creating a generic PHP class, use
php artisan make:class. - Pass
--no-interactionto all Artisan commands to ensure they work without user input. You should also pass the correct--optionsto ensure correct behavior.
- When creating new models, create useful factories and seeders for them too. Ask the user if they need any other things, using
php artisan make:model --helpto check the available options.
- For APIs, default to using Eloquent API Resources and API versioning unless existing API routes do not, then you should follow existing application convention.
- When generating links to other pages, prefer named routes and the
route()function.
- When creating models for tests, use the factories for the models. Check if the factory has custom states that can be used before manually setting up the model.
- Faker: Use methods such as
$this->faker->word()orfake()->randomDigit(). Follow existing conventions whether to use$this->fakerorfake(). - When creating tests, make use of
php artisan make:test [options] {name}to create a feature test, and pass--unitto create a unit test. Most tests should be feature tests.
- Livewire allows you to build dynamic, reactive interfaces in PHP without writing JavaScript.
- You can use Alpine.js for client-side interactions instead of JavaScript frameworks.
- Keep state server-side so the UI reflects it. Validate and authorize in actions as you would in HTTP requests.
- This project uses Pest. Create tests with
php artisan make:test --pest {name}. - Do not include the test suite directory in
{name}. UseSomeFeatureTest, notFeature/SomeFeatureTest. - Read the
testing-best-practicesskill for guidance on coverage, naming, structure, dependency isolation, and review. - Do not delete tests or test files without approval. They are part of the application.
- Run the narrowest set of tests that covers the change. Pass a file path or
--filter=testNametophp artisan test --compact. - Rerun a test after each change to it.
- Run
vendor/bin/pestto call the test runner directly. It accepts the same file path and--filter=testNamearguments.
- Prefer
array_find,array_find_key,array_any, andarray_allover manual loops when not using collections, and call methods onnew Foo()without wrapping parentheses.
- Prefer
array_first/array_lastover manual loops when not using collections, the pipe operator (|>) over nested calls, andclone($object, [...])to modify properties while cloning.
- Always use curly braces for control structures, even for single-line bodies.
- Use PHP 8 constructor property promotion:
public function __construct(public GitHub $github) { }. Do not leave empty zero-parameter__construct()methods unless the constructor is private. - Use explicit return type declarations and type hints for all method parameters:
function isAccessible(User $user, ?string $path = null): bool - Use TitleCase for Enum keys:
FavoritePerson,BestLake,Monthly. - Prefer PHPDoc blocks over inline comments. Only add inline comments for exceptionally complex logic.
- Use array shape type definitions in PHPDoc blocks.
- If you have modified any PHP files, you must run
vendor/bin/pint --dirty --format agentbefore finalizing changes to ensure your code matches the project's expected style. - Do not run
vendor/bin/pint --test --format agent, simply runvendor/bin/pint --format agentto fix any formatting issues.
When writing an AskUserQuestion question, option labels, or option descriptions, avoid first- and second-person pronouns — I, me, my, we, our, you, your. In that tool the user is reading a question from the assistant and answering it, so the roles are inverted and these pronouns are ambiguous: the reader cannot tell whether I/my means the assistant or themselves, nor whether you/your means them or the assistant.
Name the actor explicitly instead — "the assistant" (these guidelines are shared across agents, so avoid hard-coding a product name like Claude or Copilot) and "the user" (or a concrete role) for the person answering — or rephrase to drop the pronoun entirely.
❌ "Which approach do you want me to take?"
❌ "Should I keep the existing tests you wrote?"
✅ "Which approach should the assistant take?"
✅ "Keep the existing tests, or replace them?" (pronoun dropped)
✅ "Should the assistant keep the tests already in the repo?"
This applies to every part of the question payload: the question text, each option label, and each option description.
Do not run commands that drop, wipe, reset, or recreate a database or its tables — regardless of flags or environment arguments. Destructive operations include, whatever the stack:
- Framework commands that drop and rebuild the schema (a "fresh", "reset", "refresh", or "wipe" migration command).
- Raw SQL
DROPorTRUNCATEagainst any database. - Restoring or re-importing a database over an existing one.
These destroy data. An environment flag (--env=..., an alternate connection name) is not a safety net — it only helps if a separate, correctly configured environment actually exists. If you are unsure which database a destructive command targets, do not run it.
- The test database is owned by the project's test runner. Let the test suite create, migrate, and tear it down — never migrate or refresh it by hand.
- If the test database gets into a broken state, ask the user to fix it rather than running destructive commands.
Safe — these advance or add to the schema without destroying data:
- Running pending migrations forward on a non-test database — after checking that the pending files only add or alter columns. A forward migration is not automatically safe: it can still drop a column or table, or delete data in a backfill. Read it first.
- Running the test suite (it manages its own database lifecycle).
- Seeding additional data without truncating existing tables.
Stop and ask the user to run it themselves, or to confirm it explicitly. Never decide on your own that data loss is acceptable.
- Always use curly braces for control structures, even for a single statement.
- Never use single-line
if/return,if/break, orif/continuestatements. - Each control-structure statement goes on its own line.
// ❌ WRONG — single-line control structures
if (index === -1) break;
if (! element) return 0;
if (query === '') return;
// ✅ CORRECT — curly braces, each statement on its own line
if (index === -1) {
break;
}
if (! element) {
return 0;
}
if (query === '') {
return;
}A change that renders UI calls for seeing it run in a real browser — type-check and linting can't see runtime/visual bugs: stale state, dead toggles, broken scroll / sticky / fixed behaviour, z-index show-through, async races, untranslated-key leaks.
- When: the diff touches code that renders to users — JS/TS that drives the DOM, or a server-rendered template/component.
- How: drive it in a real browser. Use the project's browser eye-verify harness if it
ships one (commonly under
tools/verify/, with a setup doc loaded on demand); otherwise thefrontend-qualityskill's shipped harness (scripts/) or a Playwright MCP server. DOM/console first; screenshots back up visual claims. - Cover every testable, name the gaps. Derive the checklist first (ticket steps, edge cases, design annotations), assert one testable per check, drive full flows and mutations (create → round-trip → delete) — not just the happy path — and list anything you couldn't drive as NOT-VERIFIED. A green run that quietly skipped cases is the failure mode to avoid.
- Verify behaviour, not just geometry — a fixed/sticky element must also not be painted over, and pop-out content (dropdowns / tooltips / modals) must still escape.
- Drive the failure path. Most "works locally" bugs live where an endpoint fails — force it to fail, assert the UI shows a visible error and a way forward (not a silent hang), then clear the fault and assert recovery.
- In an ephemeral clone or git worktree, the app may be served at a different host/port than the canonical checkout, so the harness can silently verify the wrong tree — confirm it targets this checkout, and sanity-check the host serves a real page before trusting a green. A hard 404 on the expected page is the signature of hitting the wrong host.
- If a harness genuinely can't run this session (no seeded data, wrong host served, no login), say so — record it as an explicit deferral rather than substituting reasoning for the browser or reporting an unqualified green.
The coverage contract, the traps that fake a green run, and fault injection are detailed in the
frontend-quality skill's references/eye-verify.md.
When the change has an approved design (a mockup, a Figma frame, a ticket attachment), don't
eyeball the whole image and call it close — "looks about right" is how visual regressions
ship (a 4px-vs-8px radius, a lost gradient, a control 3px off-centre). Verify it element by
element, attribute by attribute, and record each delta as a fix or a question for the
designer. The full attribute rubric and the per-element scoring table live in the
frontend-quality skill's references/design-verification.md — that skill walks it as a
suggested step, and the pull-requests skill flags it before a PR.
Conventions for schema migration files, whatever the migration tool. Examples use a schema-builder DSL for illustration; the principles apply to raw-SQL migrations too.
- Migrations must be fully self-contained. Never reference application code — model constants, enums, config values, or helper functions.
- Use plain string and scalar literals for column names, table names, and other identifiers directly in the migration file.
- This keeps migrations stable and runnable regardless of future application code changes — a migration written today must still run years later, even if the code it once referenced has been renamed or deleted.
- Legacy migrations may still reference application code; only update them to follow this guideline when you are otherwise modifying those migrations.
// ❌ WRONG — references an application constant
$table->boolean(Feature::FLAG_ENABLED)->nullable();
// ✅ CORRECT — plain string literal
$table->boolean('flag_enabled')->nullable();- Add new columns at the end of the table — do not insert one into the middle of an existing table.
- On MySQL/MariaDB, positioning a column mid-table (an
AFTERclause) can disable instant/online DDL and force a full table copy — a significant hit on large tables. Other engines such as PostgreSQL have no column-position concept at all, so a position clause is meaningless there. Appending is safe and portable everywhere.
// ❌ WRONG — mid-table positioning can force a full table rebuild on MySQL/MariaDB
$table->string('description')->after('name');
// ✅ CORRECT — just append the column
$table->string('description');A migration runner records a migration only after its whole up() returns, and it wraps the run in a transaction only for engines it treats as supporting transactional DDL. Laravel does that for PostgreSQL and SQL Server, and not for MySQL, MariaDB or SQLite. Without that transaction, a run that dies halfway leaves the applied statements in place with nothing recorded, and the retry fails on the first statement it already applied, blocking every later migration. Check which side your engine and runner fall on before assuming a failed migration rolled back.
Make each statement in a multi-statement migration skippable when it is already applied, using the runner's own column and index checks. On PostgreSQL this also applies to a migration that opts out of the transaction, for example to build an index with CREATE INDEX CONCURRENTLY, which PostgreSQL rejects inside a transaction (in Laravel, public $withinTransaction = false;). A failed concurrent build leaves an invalid index that Schema::hasIndex() still reports, so check pg_index.indisvalid too, and drop the invalid index before the retry.
// ❌ WRONG — a retry after a half-applied run dies on "Duplicate column name"
Schema::table('orders', function (Blueprint $table) {
$table->string('reference');
$table->index('reference');
});
// ✅ CORRECT — each statement checks for itself first
if (! Schema::hasColumn('orders', 'reference')) {
Schema::table('orders', fn (Blueprint $table) => $table->string('reference'));
}
if (! Schema::hasIndex('orders', 'orders_reference_index')) {
Schema::table('orders', fn (Blueprint $table) => $table->index('reference'));
}Keep slow work out of the migration on a large table: build an index, backfill a column, or add a foreign key as a separate job or an out-of-band task, not inside the deploy step. Where the session has the database-specialist subagent, dispatch it before any DDL on a large table: it names the algorithm or lock level each statement takes, on MySQL and PostgreSQL.
When fixing a PHPStan error, first decide whether it represents a runtime bug a test could catch — and if so, write that test before the fix.
- Assess testability — does the error represent a runtime bug a test could reproduce (a wrong argument type, a missing method, an incorrect return type used downstream)?
- Write the test first — if a test can catch it, write a failing test that reproduces the error before applying the fix.
- Fix the code — apply the fix so both the PHPStan error and the new test pass.
- Verify both — confirm PHPStan reports no error and the test passes.
Write a test when the PHPStan error indicates a fault that would surface at runtime:
- A method call on a value of the wrong type
- Missing or incorrect arguments to a function or method
- A return-type mismatch that would break callers
- Accessing a property or method that does not exist
- Any type error that would manifest as a runtime exception
Some errors are PHPStan reading a signature that says less than the code does. When a parameter decides the return type, add a conditional @return ($param is Type ? A : B). When a bool method is a pure type check, add @phpstan-assert-if-true. Add either one only where it holds for every call; a wrong one makes the analysis worse. The backend-quality skill, where the project ships it, has the full rules and examples.
Skip the test when the error is purely static and cannot cause a runtime failure:
- Missing return-type declarations
- PHPDoc mismatches with no runtime impact
- Unused variables or imports
- Generic-type parameter issues
Applies only when the repository has commit signing enabled (e.g. git config commit.gpgsign is true, or a user.signingkey / gpg.format is set). If signing is not enabled, this guideline does not apply — commit normally.
When signing is enabled, every commit must be signed. If the signing backend or agent (1Password, gpg-agent, ssh-agent, a hardware key, etc.) is unavailable, locked, or not responding:
- Stop and surface the failure to the user with the exact error.
- Do not retry with
--no-gpg-sign, unsetcommit.gpgsign, or otherwise produce an unsigned commit to "get past" the problem.
A missing signature is a blocker to resolve (unlock the agent, re-authenticate 1Password, plug in the key), not a step to skip. Let the user fix the signing setup, then commit signed.
For session, branch, and PR scope, see the single-issue-scope guideline when the project enables it.
- Do not fix a pre-existing bug, a performance problem, or unrelated behaviour you find on the way, unless the requested behaviour cannot work without it. The same holds for refactors, cleanup, and documentation nobody asked for. A defect your own change introduces is not pre-existing: fix it.
- A sibling rule that requires an update on a line you already change still applies. The rule removes extras, not obligations.
- Report the rest as a follow-up in your summary. Propose an issue when the project tracks work that way, and let the user decide whether to file it. Report it; do not fix it.
- Implement every behaviour the task does ask for, completely. This rule cuts extras, never the requested scope.
Implement the reading that the wording and the surrounding code support most directly. State that assumption in your summary. Do not build for both readings.
Materially different work is the test. When two readings would produce the same change, pick one and carry on. When they would not, or when a wrong guess is unsafe or makes the work useless, ask before building — through the clarify skill where the whole ask is fuzzy, otherwise with a direct question.
Change only the lines that must change. Rewrite a whole file only when the file is short, or when most of it changes. A rewrite churns lines the task never touched and can drop content by accident.
Before claiming any work is complete or successful, run the verification command fresh and confirm the output. Evidence before claims, always.
A claim about how the code currently behaves — a root cause, an existing mechanism, or present behavior — in a spec, PR, commit message, code-review finding, issue, comment, or answer must be traced to the actual code (or observed at runtime) before you write it, never asserted from plausibility. (This governs statements of fact about the present code; the intended future behavior a spec or PR proposes is fine when it's clearly framed as a requirement, proposal, or decision — not disguised as a fact about what already exists.) Every illustrative example must be one you actually observed, never invented to fit a guess. A wrong "why" is worse than none: reproduction steps, tests, QA testables, and the fix itself all get built on the stated cause, so one unverified guess corrupts everything derived from it. When you have not traced it, say so — mark it NEEDS-CONFIRMATION or ask — rather than asserting. (A ticket once claimed a list was "sorted by display name" and backed it with an example that could not occur; the sort actually keyed on an internal identifier — one grep away. The trace is cheap; the false premise is not.)
- Run the relevant command (in the current message, not from memory)
- Read the full output
- Confirm it supports the claim
- Then state the result with evidence
| Claim | Required verification |
|---|---|
| Tests pass | The project's test command, output showing 0 failures |
| Code style clean | The project's formatter/style checker, output showing no changes |
| Linting clean | The project's linter, output showing 0 errors |
| Types check | The project's type checker, output showing 0 errors |
| Bug fixed | The previously failing test now passes |
| Feature complete | All related tests pass |
Use the project's own commands — check its composer.json / package.json scripts, CI config, or sibling docs to find them. Do not assume a specific tool.
Where the project has dedicated quality-check skills synced, delegate to them — backend-quality for backend files, frontend-quality for frontend files, both when a change spans both. Otherwise, run the project's own equivalent commands directly.
Commit a change once its own checks pass against the tree as it stands, not while the approach is still being tried. A commit reads as a decision. The next defect then gets patched on top of the approach instead of the approach being dropped, and each extra commit raises the cost of the revert that was the right answer.
Deferring is not "never commit". Uncommitted work is unprotected, and a commit is still the safe way to set work aside or to hand it over. A measurement loop inverts the rule on purpose — it commits before it measures, so a rejected experiment reverts in one step. Where a skill states that it commits first, that skill wins for its own flow.
- "should work now"
- "that should fix it"
- "looks correct"
- "I'm confident this works"
These phrases indicate missing verification. Run the command first, then report what actually happened.
State the limits of your own check. A reader cannot tell a gap you did not mention from a check you ran, so an unmentioned gap counts as a claim you did not make good on.
When you report a result, name what you ran and what you did not. "The unit suite passes; I did not run the browser tests" is a complete report. "Tests pass" is not, when you ran one suite of three. The same holds for a claim you carried over from an earlier step: if you did not re-run it against the tree as it stands now, say so.
This is the outward half of the NEEDS-CONFIRMATION rule above. That rule stops you asserting an untraced cause. This one stops a traced, true statement from implying more than it covers.
This table decides which rule applies to a piece of text. Never apply both to the same words, and never guess.
| Surface | Rule |
|---|---|
| Chat replies to the user | Simplified Technical English |
| Messages between agents — a peer message, a subagent prompt, a subagent report, a handoff note | Simplified Technical English. Never run a humanizer pass: machine-to-machine text needs no human voice |
| PR titles, descriptions, checklists | Simplified Technical English |
| PR review comments and replies to reviewers | Simplified Technical English |
| Issue and ticket descriptions, comments, QA testables | Simplified Technical English |
| Spec files | Simplified Technical English |
AskUserQuestion questions, options, descriptions |
Simplified Technical English — plus the pronoun rules in the AskUserQuestion Phrasing guideline, when the project has it |
| Commit messages | Simplified Technical English — a prefix or token the project's commit format requires stays as it is: an issue key, or a type(scope)!: prefix |
| Text an end user reads — in-app copy, translations, release notes, help text, seed content | The project's own tone-of-voice rules, not this guideline |
| Suggested translation strings inside an issue or ticket | The project's own tone-of-voice rules — the prose around them stays Simplified Technical English |
| Code and code comments | Neither — the language guidelines own those |
Prose the user asks for in a named style, or an artifact whose own skill defines its voice — readme, release-notes, or humanizer on an essay, post or opinion piece |
That instruction or skill wins. This guideline does not override it. On the surfaces above, humanizer only removes AI tells and this guideline keeps the tone |
A surface the table does not list gets Simplified Technical English, unless an end user reads it. Then it gets the project's tone-of-voice rules. A project without documented tone-of-voice rules gets Simplified Technical English everywhere.
This guideline governs how a sentence is built, and how much you write. It never overrides what a document is allowed to say: an issue-format doc still owns issue content, and a PR template still owns its sections.
Write in ASD-STE100 Simplified Technical English. Say the same thing in fewer, simpler words.
- One idea per sentence. Keep procedural sentences to 20 words or less, descriptive sentences to 25 or less. These limits are a ceiling, not a target.
- Vary sentence length. A run of short sentences of the same size reads as machine output, as a run of long ones does. Join two clauses that carry one idea with "because", "so", or "although" instead of splitting them into two short sentences.
- Use the active voice. Name the actor. Use the passive only when the actor is unknown.
- Use simple tenses only — simple present, simple past, simple future, infinitive, imperative. No complex constructions built from auxiliary verbs.
- Use one word for one meaning. Use the same word for the same thing every time — do not vary it for style.
- Keep articles (
the,a,an) and other small words that make a sentence clear. Simplified is not clipped. - One topic per paragraph, six sentences at most. Use a list when there is more than one item.
- Cut filler, hedging, and repetition. Do not restate the question or summarise what you are about to say.
- Give the answer first. Add detail after it, and only if the reader needs it.
- Use everyday words. Write "use", not "utilise"; "help", not "facilitate". Keep technical terms exact — a class name, a flag, or an error message is quoted as it is.
- Write Latin abbreviations out: "for example", not "eg"; "that is", not "ie"; "and so on", not "etc".
- Do not shout. No exclamation marks, no capitals for emphasis, and no bold used only to raise the volume. Structural bold that a template defines —
**Before:**,**Expected:**, a table header, a labelled line — is not emphasis and stays. - No metaphors, no clichés, no jokes that carry meaning the plain sentence does not.
The sentence limits, the tense list, the article rule, and the paragraph limit come from the ASD-STE100 writing rules. The everyday-words, Latin-abbreviation, no-shouting, and no-metaphor rules come from the GOV.UK content style guide.
Simplified Technical English decides how a sentence is built. This section decides how much you write and how you format it. A reply can pass every rule above and still read as machine output, because it is ten times the size of the question and formatted as a report.
Answer at the size of the question. A one-line question gets a one-line answer. A yes/no question gets "yes" or "no", and a reason only if the reader cannot act without it. Do not pad a short answer to look thorough. A longer answer does not show more care, and the reader has to find the answer inside it. A sentence that names what you did not verify is content, not padding, and stays.
Do not format someone else's thread like a document. In a PR comment, an issue comment, a chat reply, or a review reply, do not use bold section headings, tables, or fenced evidence blocks unless the reader asked for detail or the content cannot be read without them. A code block that quotes real output or a real diff is content and stays. The rest reads as machine output whatever the words are worth.
One answer per turn. Do not answer a question and then add a closing observation about what the work taught you. Stop when the answer is complete.
Read the thread again as the last step before you post. The thread can move while you draft. A reply to a question the other person already withdrew costs more than a slow reply.
Apply these rules most strictly outside your own repository. A maintainer who does not know you can reject a contribution on this basis alone, and the change itself is then no longer read on merit.
- This project uses
sandermuller/laravel-fluent-validationfor type-safe validation rules. UseFluentRule::instead of string rules orRule::where possible. - FormRequests MUST use
HasFluentRulestrait. Livewire components MUST useHasFluentValidationtrait. - Do NOT use
->rule('string_rule')when a native FluentRule method exists. Check the skill references before using escape hatches. - Available types:
FluentRule::string(),integer(),numeric(),email(),date(),dateTime(),boolean(),array(),file(),image(),password(),field(). - Convenience shortcuts:
FluentRule::url(),uuid(),ulid(),ip()— shorthand forFluentRule::string()->url(), etc. email()andpassword()use app defaults (Email::default(),Password::default()). Passdefaults: falseto opt out.- All conditional modifiers (
requiredIf,excludeIf,prohibitedIf, etc.) accept both(string $field, ...$values)AND(Closure|bool)— do NOT wrap inRule::requiredIf(). - For converting validation rules, activate the
fluent-validation-optimizeskill which has a complete method reference. - For Livewire-specific guidance, activate the
fluent-validation-livewireskill.