/sprint-status — branch, last package, uncommitted work, next BACKLOG item. /review-multitenancy <Model> — model+migration+policy+tests checklist. /sync-docs — runs the dev-docs sync pipeline and reminds to upload .claude-sync/. Each command's frontmatter declares a least-privilege allowed-tools list.
1.2 KiB
1.2 KiB
description, argument-hint, allowed-tools
| description | argument-hint | allowed-tools | |
|---|---|---|---|
| Check a model + migration + policy + tests for multi-tenancy correctness |
|
Read, Grep, Glob |
Target: $ARGUMENTS
Locate and read all four artefacts:
- The Eloquent model —
app/Models/$ARGUMENTS.php(or matching path underapp/Models/). - The most recent migration that creates or modifies the table.
- The policy class —
app/Policies/${ARGUMENTS}Policy.php. - Pest tests for the model — search
tests/for the class name.
Verify each item against /dev-docs/SCHEMA.md and /CLAUDE.md, marking PASS / FAIL / N/A with one-line reasoning:
- Primary key is ULID (
ulid('id')->primary()in migration;HasUlidstrait on model) OrganisationScoperegistered in modelbooted()(NOT merely imported)- FK chain reaches
organisations.idwithin ≤2 hops - Policy class exists and is registered in
AuthServiceProvider::$policies - All status/type/category columns use a PHP Enum cast
- Soft delete decision matches the type's row in /dev-docs/SCHEMA.md
- Pest tests include a cross-org leak assertion
- Activity log trait present (if state-changing)
End with a verdict line: READY or NEEDS WORK.