feat: expose plugin migration commands

Forward ash.codegen and ecto.migration through the Aether plugin wrapper and update agent guidance to prefer AshPostgres codegen for resource-backed schema changes.
This commit is contained in:
2026-05-23 15:58:13 +02:00
parent ca4995aa2b
commit 20be0857a5
2 changed files with 11 additions and 3 deletions
+8 -2
View File
@@ -5,8 +5,9 @@ contract, migrations, assets, and tests owned by this repo.
## Required Workflow
- Use `scripts/plugin` for plugin-aware commands: `scripts/plugin validate`,
`scripts/plugin test`, `scripts/plugin precommit`, and `scripts/plugin smoke`.
- Use `plugin` for plugin-aware commands in the devenv shell: `plugin validate`,
`plugin test`, `plugin precommit`, and `plugin smoke`. Outside the devenv
shell, use the local `scripts/plugin` wrapper.
- Use `devenv shell -- <command>` when running repo commands from outside the
devenv shell.
- Raw `mix test` is not the normal entrypoint for this repo; `plugin test`
@@ -14,6 +15,11 @@ contract, migrations, assets, and tests owned by this repo.
plugin-manager paths.
- Keep browser assets under the plugin asset pipeline and avoid host app
internals unless the plugin API requires them.
- For AshPostgres resource changes, generate migrations with
`plugin ash.codegen <name>`. Use `plugin ecto.migration <name>` only for rare
manual schema migrations that are not derived from Ash resources.
- Do not edit an existing migration after it may have run; add a new migration
instead.
## Plugin Contract
+3 -1
View File
@@ -7,6 +7,8 @@ Usage:
plugin validate
plugin test [mix test args...]
plugin precommit [mix precommit args...]
plugin ecto.migration <name> [mix ecto.gen.migration args...]
plugin ash.codegen <name> [mix ash_postgres.generate_migrations args...]
plugin smoke
plugin shell
EOF
@@ -77,7 +79,7 @@ fi
shift
case "$command_name" in
validate | test | precommit | smoke | shell) ;;
validate | test | precommit | ecto.migration | ash.codegen | smoke | shell) ;;
-h | --help | help)
usage
exit 0