Files
self 0a3a91a62a
CI / Test (push) Failing after 17s
feat: add Kobold plugin scaffold
Generate the initial Kobold external plugin with host-backed tests, browser-safe asset bundling, and the MVP PRD under docs/.
2026-05-27 16:19:27 +02:00

56 lines
1.3 KiB
Markdown

# Development
## Local Setup
This plugin expects a sibling Tribes checkout at `../tribes`.
```bash
mix deps.get
devenv shell -- plugin test
```
To load the plugin in the host during development:
```bash
cd ../tribes
ln -s ../tribes-plugin-kobold plugins/kobold
iex --sname dev -S mix phx.server
```
Set `TRIBES_HOST_ROOT=/path/to/tribes` if your host checkout is not a sibling.
## Command Wrapper
Use `scripts/plugin` for host-aware workflows:
```bash
scripts/plugin validate
scripts/plugin test
scripts/plugin precommit
scripts/plugin ash.codegen update_example_resources
scripts/plugin ecto.migration add_example_table
scripts/plugin smoke
```
Inside the plugin devenv shell, the `plugin` command is available and forwards
through the same wrapper.
Prefer `plugin test` over raw `mix test` for host-backed plugin suites. The
wrapper runs Mix with the host database/services and points the host plugin
manager at the host manifest plus built-in providers such as `tribes_ui`. Use
`mix raw_test` / `mix raw_precommit` only for deliberate low-level debugging.
## Assets
Browser code lives in `assets/ts` and is compiled to `priv/static`:
```bash
devenv shell -- npm run build --prefix assets
```
Use the wrapper form for installs too:
```bash
devenv shell -- npm install --prefix assets
```