task-d.7.9

This commit is contained in:
phaichayon
2026-07-03 11:39:37 +07:00
parent 503f34e22f
commit 9c8d6a0d6d
21 changed files with 1809 additions and 42 deletions

View File

@@ -0,0 +1,37 @@
# Setup Plugin Development
Setup plugins let modules extend setup without editing the setup wizard directly.
Plugin source lives under:
```text
src/features/setup/plugins/
```
Required plugin contract:
- plugin id and version
- installation profiles
- setup templates
- wizard steps
- readiness checks
- verification checks
- CSV preview validators
- import handlers
- reset scopes
- reseed targets
- golden dataset registration
Core plugins:
- `foundation`: setup platform foundations, state, seed manifests, reset framework, CSV framework
- `crm`: CRM templates, CRM verification, CRM reset scopes, and CRM golden dataset
Future modules should add a plugin class and register it in `plugin-registry.ts`. They should not add one-off setup logic directly to the wizard.
Safety rules:
- Plugins cannot bypass Auth.js setup route protection.
- Reset scopes must declare destructive behavior and affected tables.
- CSV templates must declare ownership to avoid duplicate file contracts.
- Seed tasks must be idempotent before execution is exposed.