anclax-develop-feature

Installation
SKILL.md

Anclax Development Workflow

Use Anclax generated types as the contract between layers and keep specs/SQL as the source of truth.

Design principles

  • Singleton services with dependency injection.
  • High cohesion, low coupling.

Core flow

  1. Inspect anclax.yaml to learn generation paths and enabled generators.
  2. Update sources first:
    • OpenAPI: the matching oapi-codegen entry path (commonly api/v1.yaml)
    • Tasks: the matching task-handler entry path (commonly api/tasks.yaml)
    • DB schema: sql/migrations
    • Queries: sql/queries
  3. Run anclax gen after any spec/SQL/Wire changes.
  4. If you modify examples/, run make gen to refresh cmd/anclax/initFiles and normalize template-specific go.mod content.
  5. Implement code against generated interfaces and types.
  6. Add unit tests for service logic with mocks.

Layering rules

  • Handler: parse HTTP, call service, map errors to HTTP responses.
  • Service: implement business logic, accept and return apigen types.
  • Model: use pkg/zcore/model and sqlc-generated queries.
  • Async tasks: define in the task spec configured under task-handler (commonly api/tasks.yaml), implement taskgen.ExecutorInterface, enqueue via taskgen.TaskRunner.

References and Examples

Installs
13
GitHub Stars
13
First Seen
Feb 3, 2026