aswritten.ai · public perspective

Perspective › Narrative ClojureOwnsLogic

Narrative ClojureOwnsLogic

5 nodes in this area of the perspective

This hub argues the orchestration logic belongs in Clojure, with the build-vs-wrap boundary drawn explicitly. The [event-bus design] (Claim_EventBusDesign) settles on core.async pub/sub plus a SQLite append-only log, rejecting external brokers at current scale. State is owned by [clj-statecharts as the FSM library] (Claim_FSMLibraryChoice), chosen over three alternatives, with Salon concurrent review modeled as independent FSM instances under a parent coordinator rather than parallel regions. The [factory-factory framework is rejected] (Claim_CedarCedarRejected) as too PR-centric for aswritten's full use-case taxonomy (Solo, Parallel, Hub, Salon, Teams). The [n8n boundary] (Claim_N8nBoundary) is the load-bearing partition: of 53 workflows, 27 migrate to Clojure, 20 remain as thin LLM wrappers, 4 die — so Clojure owns logic, not everything. Finally the [RAM-upgrade gate] (Claim_RAMUpgrade) flags an operational precondition: 4GB risks OOM during Salon bursts, requiring 8GB plus several P0 reliability items before deploy.

Witness phrases

verbatim
External brokers (NATS, Redis) rejected as unnecessary at current scale (<100 msg/day).
verbatim
clj-statecharts v0.1.7 chosen over tilakone (too simple), automat (DFA only), and custom maps+multimethods.
verbatim
factory-factory rejected: opinionated toward PR-centric loops
verbatim
Of 53 workflows: 27 move to Clojure, 20 stay in n8n as thin LLM wrappers, 4 die.
verbatim
Upgrade to 8GB ([amount]/mo) required before deploying.
verbatim
"Clojure owns logic" is bounded, not total: 20 of 53 workflows deliberately stay in n8n as thin LLM wrappers and 4 are killed.
verbatim
Salon concurrency is modeled as independent FSM instances + a parent coordinator, explicitly NOT statechart parallel regions — a structural fork another design might have taken.
verbatim
Multiple roads not taken: external brokers (NATS/Redis), the factory-factory framework, and three rival FSM libraries were all evaluated and rejected.
verbatim
An operational caveat pushes against readiness: current 4GB RAM risks OOM during Salon bursts, gating deploy behind an 8GB upgrade and unresolved P0 items.