What do *you* want it to be?
  • Elixir 55.8%
  • JavaScript 16.7%
  • HTML 12%
  • TypeScript 10.1%
  • CSS 3.2%
  • Other 2.2%
Find a file
John Wilger 953d6a623d
ARCH-6: Adopt single aggregate-per-command mapping contract (#65)
Closes #6

## Summary
- Defines the mandatory single aggregate-per-command ownership contract in architecture and event-model schema docs.
- Enforces command ownership metadata, router self-registration, middleware ordering, and external-input idempotency keys in the strict completeness validator.
- Aligns bootstrap state-change slices with aggregate module/name separation and stable idempotency keys.

## Verification
- `npm run test:event-model-contract`
- `npm run check:event-model`
- `mix format --check-formatted`
- `MIX_ENV=test mix compile --warnings-as-errors --force`
- `MIX_ENV=prod mix compile --warnings-as-errors --force`
- `mix test --warnings-as-errors`

## Skipped unavailable gates
- `mix dialyzer --halt-exit-status` (task not installed)
- `mix credo --strict` (task not installed)
- `mix sobelow` (task not installed)

Reviewed-on: jwilger/anything_app#65
2026-05-07 11:24:44 -07:00
.kilo chore: add dependency-aware issue selection 2026-05-06 23:32:47 -07:00
assets base: generate Phoenix application baseline 2026-05-07 08:52:49 -07:00
config base: address Phoenix baseline review feedback 2026-05-07 09:41:20 -07:00
docker/postgres/init chore: add phoenix dev environment 2026-05-06 18:03:32 -07:00
docs ARCH-6: Adopt single aggregate-per-command mapping contract (#65) 2026-05-07 11:24:44 -07:00
event_model ARCH-6: Adopt single aggregate-per-command mapping contract (#65) 2026-05-07 11:24:44 -07:00
lib base: generate Phoenix application baseline 2026-05-07 08:52:49 -07:00
priv base: generate Phoenix application baseline 2026-05-07 08:52:49 -07:00
scripts ARCH-6: Adopt single aggregate-per-command mapping contract (#65) 2026-05-07 11:24:44 -07:00
test base: address Phoenix baseline review feedback 2026-05-07 09:41:20 -07:00
.formatter.exs base: generate Phoenix application baseline 2026-05-07 08:52:49 -07:00
.gitignore base: generate Phoenix application baseline 2026-05-07 08:52:49 -07:00
AGENTS.md chore: configure kilo for phoenix commanded 2026-05-06 17:46:24 -07:00
compose.yaml base: generate Phoenix application baseline 2026-05-07 08:52:49 -07:00
flake.lock chore: add phoenix dev environment 2026-05-06 18:03:32 -07:00
flake.nix chore: add forgejo tools to devshell 2026-05-06 18:13:38 -07:00
kilo.json chore: configure kilo for phoenix commanded 2026-05-06 17:46:24 -07:00
mix.exs base: address Phoenix baseline review feedback 2026-05-07 09:41:20 -07:00
mix.lock base: address Phoenix baseline review feedback 2026-05-07 09:41:20 -07:00
package-lock.json docs: add bootstrap architecture contract 2026-05-06 21:09:59 -07:00
package.json ARCH-6: Adopt single aggregate-per-command mapping contract (#65) 2026-05-07 11:24:44 -07:00
README.md base: address Phoenix baseline review feedback 2026-05-07 09:41:20 -07:00

Anything

Anything is a Phoenix 1.8 application for building a defect-driven, self-evolving application workflow. The user describes what is not working through a chat/defect console; the system records that defect, updates an event model first, validates the model for strict information completeness, generates code from validated model changes, runs test/compile gates, safely loads accepted changes, and asks for the next defect.

The application is intended to be event-sourced and observable: Commanded owns write-side decisions and durable workflow history, Postgres stores events/read models/vector memory, Phoenix LiveView provides the primary UI, and deterministic validators keep LLM-assisted model/code changes behind explicit checks.

Current baseline

This branch establishes the runnable Phoenix baseline:

  • Phoenix 1.8 with LiveView and Postgres.
  • Tailwind 4 and daisyUI asset defaults.
  • Centralized configuration in config/config.exs and config/runtime.exs.
  • Environment-driven runtime settings suitable for 12-factor deployment.
  • Initial threat-model documentation for the Phoenix/Postgres baseline.

Local setup

Start the local Postgres service, then install and prepare dependencies:

mix setup

Start Phoenix with:

mix phx.server

or inside IEx:

iex -S mix phx.server

Visit localhost:4000 from your browser.

Configuration

Development and test database settings default to the repository Compose Postgres service and can be overridden with standard Postgres environment variables:

  • PGUSER (default: anything)
  • PGPASSWORD (default: postgres)
  • PGHOST (default: 127.0.0.1)
  • PGPORT (default: 55432)
  • PGDATABASE for development (default: anything_dev)

Production requires DATABASE_URL and SECRET_KEY_BASE. Optional runtime settings include PORT, PHX_HOST, POOL_SIZE, ECTO_IPV6, DNS_CLUSTER_QUERY, and PHX_SERVER.

Verification

Useful baseline checks:

mix format --check-formatted
MIX_ENV=test mix compile --warnings-as-errors --force
mix test --warnings-as-errors