Scion

Last sync: 7m ago
# Morning briefing No cycles have run yet. Start the loop with `./loop.sh`.

DEC-001: Event store — start with in-memory or go straight to Postgres?

ANSWERED
SUB-008 specifies a Postgres event store. For initial development velocity, we could implement an in-memory event store first (dict-based, same interface) so that type system, lineage, event bus, and property tests can all be built and validated without Docker/Postgres infrastructure. The Postgres implementation would follow behind the same interface.
Options: A. In-memory first, Postgres later — faster iteration, tests run without infra, but risk of interface mismatch. B. Postgres from day one — slower startup but no throwaway code. C. Both behind a protocol — define `EventStoreProtocol`, implement `InMemoryEventStore` for tests and `PostgresEventStore` for real use. Both are production code.
Recommendation: Option C. The protocol is trivial, both implementations are needed (in-memory for fast tests, Postgres for real persistence), and it validates the abstraction from day one. This is consistent with the substrate's design-for-Flink-build-without-it philosophy.

DEC-002: Kafka — use Redpanda Docker or stub for Phase 0?

ANSWERED
SUB-014 requires Kafka publishing. For substrate development, we need to decide whether to spin up Redpanda in Docker or stub the Kafka interface.
Options: A. Redpanda Docker from day one. B. Stub KafkaPublisher behind a protocol, implement real Kafka later. C. Skip Kafka entirely in Phase 0, add in Phase 1 when trades need it.
Recommendation: Option B. Same pattern as the event store — define the protocol, stub it for tests, implement real Kafka when infrastructure is ready. SUB-014 becomes two tasks: protocol definition (Phase 0) and Redpanda implementation (Phase 1 or when Docker infra is set up).

Notes for next loop

Free-form notes that will be available to the planning agent in the next cycle.

Project state

# Project state — auto-updated by the development loop ## Current phase Phase 0 — Substrate ## Last planning cycle Cycle 15 — 2026-04-16 ## Project bootstrap status - pyproject.toml: DONE (pydantic 2.13, hypothesis 6.152, asyncpg, aiokafka, httpx, ruff, mypy, pytest) - Directory scaffolding: DONE (all module directories with empty __init__.py) - Virtual environment: DONE (.venv with all deps installed, Python 3.12) - SKILL.md specifications: DONE (substrate, trades, portfolio_generator, automation) - CLAUDE.md: DONE (comprehensive architecture spec) ## Modules status | Module | Status | Last updated | |---|---|---| | substrate/types | DONE | 2026-04-16 | | substrate/lineage | DONE | 2026-04-16 | | substrate/computation | DONE | 2026-04-16 | | substrate/explainability | DONE | 2026-04-16 | | substrate/events/envelope | DONE | 2026-04-16 | | substrate/events/store | DONE (protocol + in-memory + Postgres + temporal queries) | 2026-04-16 | | substrate/events/schema_registry | DONE | 2026-04-16 | | substrate/events/immutable_store | DONE (implemented in SUB-008b alongside event store) | 2026-04-16 | | substrate/events/bus | DONE (core + subscriber delivery + error handling: validation, stamping, persistence, batch, topic routing, async dispatch, error classification, dead-letter queue, retry with backoff) | 2026-04-16 | | contracts/trades | DONE | 2026-04-16 | | substrate/mcp | DONE (base server, tool scaffolding, introspection, health) | 2026-04-16 | | substrate/events/kafka_publisher | NOT STARTED | - | | substrate/streaming | NOT STARTED | - | | substrate/reference_data | NOT STARTED | - | | substrate/contracts | NOT STARTED | - | | substrate/replay | NOT STARTED | - | | substrate/fx | NOT STARTED | - | | substrate/observability | NOT STARTED | - | | properties/system_invariants | NOT STARTED | - | | contracts/trades | DONE | 2026-04-16 | | modules/trades/domain | NOT STARTED (next up: TRD-002) | - | | modules/trades/events | NOT STARTED | - | | modules/trades/mcp | NOT STARTED | - | | modules/trades/projections | NOT STARTED | - | ## Test results SUB-001: 57 tests passed (substrate types, errors, computation, lineage). 0 failures. SUB-020: 24 tests passed (explainability primitives). 0 failures. Total: 81 passed. SUB-007: 27 tests passed (event envelope types). 0 failures. Total: 108 passed. SUB-009: 32 tests passed (schema registry). 0 failures. Total: 140 passed. SUB-008a: 43 tests passed (event store schema, record models, migrations). 0 failures. Total: 183 passed. SUB-008b: 43 tests passed (InMemory event store, immutable object store, property-based). 0 failures. Total: 226 passed. SUB-010a: 35 tests passed (EventBus validation, identity stamping, persistence, lineage, batch, properties). 0 failures. Total: 261 passed. SUB-010b: 30 tests passed (subscriber registration, topic routing, async delivery, error isolation, batch delivery, concurrency, properties). 0 failures. Total: 291 passed. SUB-010c: 53 tests passed (error classifier, retry policy, dead-letter queue, resilient middleware, property-based). 0 failures. Total: 344 passed. TRD-001: 54 tests passed (TradeEnvelope, TradeIdentifiers, TradeParties, lifecycle events, economic hash, property-based). 0 failures. Total: 398 passed. SUB-016: 36 tests passed (MCPTool, MCPToolResult, ModuleMCPServer, introspection, health, property-based). 0 failures. Total: 434 passed. SUB-008c: 32 tests passed (temporal queries: aggregate state at timestamp, replay-to-point, aggregate version at timestamp, TemporalQuery model, property-based). 0 failures. Total: 466 passed. All 466 tests passing as of cycle 15 (1.55s runtime). ## Known issues - Remaining substrate modules are empty __init__.py stubs. - ruff TCH rules disabled for types.py, lineage.py, and store.py (Pydantic models need runtime imports). - asyncpg mypy stubs not available — added ignore_missing_imports override in pyproject.toml. ## Blocked items None.

Architect notes (queued for next loop)

No notes yet.

Pending decision responses

No responses queued.