Commit 72d75fd
M0: the platform
Aurelis is a corporation of AI agents that researches markets. This is the
foundation the company will run on -- persistence, an auditable record,
budgets, work dispatch, scheduling and model access -- plus the CLI that
proves it works end to end.
No agents, departments or meetings yet. Those start at M1.
What M0 ships
-------------
core/ identity (UUIDv7 keys + human reference codes), an injected
clock, canonical encoding, configuration, shared vocabularies
platform/ schema and invariant triggers, the hash-chained event ledger,
the content-addressed artifact store, hierarchical budgets,
the durable task queue, the scheduler, model access
cli/ aurelis db init | doctor | ledger verify | ledger tail | demo
Four decisions worth stating
----------------------------
Invariants are database triggers, not conventions. UPDATE and DELETE are
refused on events, artifacts, cost_entries and model_calls, and the tests
assert it through raw SQL rather than through the ORM. A record is only
auditable if it is auditable by someone who does not trust the code that
wrote it. The rule caught its own author during this milestone: the ledger
originally inserted an event and then updated its chain hash, which its own
trigger correctly refused. Sequence numbers are now allocated before the
insert so the row arrives complete.
The ledger is tamper-evident, not tamper-proof, and says so. Editing a
payload, rewriting an actor, deleting a middle event, truncating the
leading events, or forging one event's hash and leaving its successor's
prev_hash stale are all detected at a named sequence number. Anyone with
database access can still alter it; they cannot do so unnoticed. Tests
cover all five attacks.
Floats cannot enter a hash. canonical_json refuses them outright. 0.1 + 0.2
does not round-trip and platform repr has changed across releases, so a
metric that hashed differently on two machines would destroy the only
mechanism that makes a result citable. Money and metrics are Decimal.
The whole system runs free. The mock provider is offline and deterministic,
every test and all of CI use it, and switching to the Claude subscription or
a metered API is a config change. Money and tokens are budgeted separately
because they are separately scarce -- under a subscription the dollar figure
is zero and the token allowance binds. Budgets are checked at dispatch and a
refusal names the innermost level that bound it, so the message says which
knob to turn.
Acceptance
----------
aurelis db init && aurelis doctor && aurelis demo
demo runs a scripted exchange end to end: budget checked at dispatch, tasks
queued and claimed, model calls recorded, outputs stored as content-addressed
artifacts, every step chained, chain verified afterwards. The second round is
identical to the first and is served entirely from cache -- asserted, because
it is the most important cost property in the system.
137 tests, ruff clean, mypy strict, CI on Linux and Windows across 3.12/3.13.
Alembic is deliberately absent. Schema changes use create_all until the
schema first has to change under a live workspace; a migration tool with one
revision and no history is ceremony.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>0 parents commit 72d75fd
71 files changed
Lines changed: 12103 additions & 0 deletions
File tree
- .github/workflows
- docs
- adr
- src/aurelis
- cli
- core
- platform
- artifacts
- budget
- db
- ledger
- llm
- queue
- scheduler
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
0 commit comments