What problem does it solve?
Ash Framework projects fail in subtle ways when developers call Ash.create directly from LiveViews, pass actors at execution time instead of query preparation, or hand-edit resource snapshots and migrations. This Skill encodes the correct patterns so generated and edited Ash code respects policies, code interfaces, and the codegen workflow.
Core Features & Use Cases
- Iron Laws enforcement: Seven non-negotiable rules covering domain code interfaces, actor/scope placement at query prep, generator-first workflows, and the ban on direct
Repo.* calls in Ash projects.
- Code patterns: Ready-to-use examples for domain code interfaces, authorization with
actor: or Ash.Scope, and the Ash.Scope.ToOpts protocol implementation.
- Generator workflow: Documents
mix ash.gen.resource, mix ash.gen.domain, mix ash.codegen, and file conventions for changes, checks, actions, types, and validations.
- Use Case: When adding a new
User resource with authentication policies, follow the Skill to generate the resource, define domain code interfaces, pass the actor at query preparation, and run mix ash.codegen to produce the migration.
Quick Start
Ask the assistant to create an Ash resource with policies and code interfaces for your Phoenix app, following the ash-framework guidelines.