- Replace view-only row buttons with clickable rows (recordUrl)\n- Update action-surface contract slot to InspectAffordance + validator support\n- Add golden guard tests + contract doc\n- Update SpecKit constitution/templates to include inspection affordance rule
1.1 KiB
1.1 KiB
Quickstart — Action Surface Contract
This quickstart describes how developers will satisfy the Spec 082 contract once the validator is implemented.
Add a declaration to a Filament component
For an in-scope class (Resource, Page, RelationManager), add a static declaration method.
Example (shape only; exact namespaces/classes defined in implementation):
- Add
public static function actionSurfaceDeclaration(): ActionSurfaceDeclaration - Select a
profile - Declare required slots as satisfied
- Keep defaults aligned (group label
More)
Exempt a slot
If a required slot is intentionally not present:
- Mark the slot as
Exempt - Add an exemption entry with a non-empty
reason - Optionally provide a
trackingRef
Run locally
- Run the contract guard test:
vendor/bin/sail artisan test --compact --filter=ActionSurfaceContract
Interpreting failures
Failures will point to:
- the class missing a declaration
- which required slots are missing
- which exemptions are invalid (missing/empty reason)
The failure output is intended to be actionable, similar to existing guard tests in tests/Feature/Guards/*.