This document is the primary implementation rulebook for the Oxion repository.
Primary focus:
- modular and orthogonal design
- consistent code style
- every implementation phase must include testing
CONTRIBUTING.mdAGENTS.md- Documentation workspace main README
- Documentation workspace MVP fast-track plan
- Documentation workspace testing strategy
- Documentation workspace policy schema + EBNF references
- One module, one primary responsibility (do one thing well).
- Separate policy from mechanism.
- Avoid hardcoded business rules (day, speed, vendor attrs) in core.
- All behavior changes must be traceable (audit + metrics).
- All enforcement actions must be idempotent.
- Follow each language's native style (Gleam/TS/Python/Elixir) and official formatter.
- Do not add new folders/modules without clear bounded-context rationale.
- Keep vendor-specific logic in adapter/profile layers, not core logic.
Each phase implementation must include testing for Gleam and any touched related stack.
- If changing
Gleamdomain/core:- must run
node scripts/run-gleam-all.mjs test - must run
node scripts/run-gleam-all.mjs format-check
- must run
- If changing
TypeScript:- must run relevant TS unit tests
- If changing
Python:- must run relevant Python unit tests
- If changing
Elixir:- must run relevant ExUnit tests
- If changing policy schema/contract:
- must run contract tests + EBNF conformance tests
- If changing RADIUS/NAS/CoA flow:
- must run integration tests + update packet-level checklist
For every phase in the documentation workspace MVP fast-track plan, a PR must include:
- list of added/updated tests,
- passing test results,
- if any test cannot run yet, include reason + follow-up task.
Without test evidence, the phase is considered incomplete.
- Change scope follows module/submodule boundaries.
- No new hardcoded business rule in core.
- New/updated tests are included for changed areas.
-
node scripts/run-gleam-all.mjs testpass. -
node scripts/run-gleam-all.mjs format-checkpass. - Related documentation workspace content is updated (if contract/flow changes).
- If billing contract is touched, synchronize public docs with EE private implementation notes.
- After relevant verification passes, create atomic commits whenever possible.
- Commit messages must be descriptive, use imperative present tense, and clearly explain
what+why. - Subject lines must be readable by international engineers without chat context.
- Reviewers may reject changes if tests are insufficient for the touched phase.
- Large cross-stack changes should be split into smaller PRs for reviewability.