dnQuant

Architecture

dnQuant separates evidence collection, deterministic qualification, independent investigation, and agent judgment. The current deployment uses local containers for Alfa, DD, chat intake, the authenticated portal, and optional inference. The paper agents run as separate consumers. Collection does not depend on a conversational assistant remaining open.

Responsibilities and authority

Owner Receives and produces Authority boundary
Discovery and market adapters Feed nominations → exact references and saved market observations Cannot qualify a token or select a trade
Alfa assessment modules Saved observations and source-bound controls → horizons, features, scores, gates Numeric projections alone do not create events
Alfa decision and final exit Immutable lane assessments → one selected lane → bound exit evidence No cheaper-lane fallback after the selected exit fails
Alfa events and delivery Accepted decision/exit → immutable event and destination work → acknowledgments A queue item is not delivery confirmation
ddEngine Manual or alert-linked identity → research plan, independent score, report Cannot mutate Alfa qualification or alerts
External paper agents Alfa snapshots, public pricing, virtual portfolio → proposals Cannot set quantities, widen stops, change policy, sign, or place live orders
Paper execution engine Valid proposal plus current policy/evidence → modeled fill or blocked action Separately enforces paper controls; no real execution capability
Dashboard Saved engine evidence and separately published telemetry Monitoring, limited settings, and local configuration drafts; no execution authority
Architecture diagram
Open diagram at full size
Diagram source
---
config:
  theme: "base"
  look: "classic"
  themeVariables:
    fontFamily: "system-ui"
    fontSize: "16px"
    primaryColor: "#202020"
    primaryTextColor: "#f4f4f5"
    primaryBorderColor: "#81818c"
    secondaryColor: "#303034"
    tertiaryColor: "#202020"
    lineColor: "#81818c"
    textColor: "#f4f4f5"
    edgeLabelBackground: "#202020"
    clusterBkg: "#141416"
    clusterBorder: "#55555a"
  flowchart:
    wrappingWidth: 230
    nodeSpacing: 32
    rankSpacing: 46
    curve: "basis"
    padding: 18
  themeCSS: ".node rect, .node polygon, .node path { filter: none !important; } .nodeLabel { font-weight: 500; } .edgeLabel { font-size: 13px; color: #f4f4f5; } .edgeLabel p { background-color: #202020; padding: 3px 7px; border-radius: 5px; } .flowchart-link { stroke-width: 1.4px; } .legend text { font-weight: 600; }"
  fontFamily: "system-ui"
---
flowchart TB
    Sources["Market, chain and research sources"] --> Alfa["alfaEngine<br/>Discover and qualify"]
    Sources --> DD["ddEngine<br/>Independent investigation"]
    Alfa -->|"Saved event evidence"| DD
    Manual["Manual DD requests"] --> DD
    Alfa -->|"Read-only candidate snapshots"| Trade["tradeEngine<br/>External paper agents"]
    Alfa --> Alerts["Qualified events<br/>Discord and Telegram"]
    DD --> Reports["Findings, risks and unknowns"]
    Trade --> Controls["Deterministic paper controls"]
    Controls --> Book["Virtual portfolio and audit journal"]

    classDef default fill:#202020,stroke:#81818c,color:#f4f4f5,stroke-width:1px,rx:12,ry:12;
    classDef info fill:#303034,stroke:#c4c4c4,color:#ffffff,stroke-width:1.5px,rx:12,ry:12;
    classDef gate fill:#202020,stroke:#ffffff,color:#ffffff,stroke-width:1.5px;
    classDef success fill:#14271d,stroke:#4ade80,color:#4ade80,stroke-width:1.5px,rx:12,ry:12;
    classDef warning fill:#2b261b,stroke:#ead09b,color:#ead09b,stroke-width:1.5px,rx:12,ry:12;
    classDef failure fill:#301f20,stroke:#ffb4ab,color:#ffb4ab,stroke-width:1.5px,rx:12,ry:12;
    classDef secondary fill:#202020,stroke:#a2a2aa,color:#c4c4c4,stroke-width:1px,stroke-dasharray:4 4,rx:12,ry:12;
    class Alfa,DD,Trade info;
    class Controls gate;
    class Alerts success;
    class Sources,Manual secondary;
    class Reports,Book default;

DD also accepts manual requests without an Alfa event. The agent export includes pre-alert candidates; it is not an alert-only subscription. There is no verified DD-report-to-agent pipeline. See tradeEngine inputs.

Forward modular lanes

The implemented shared collection and storage boundary adds independent lane adapters and canonical consumer demand/publication tables. Existing provider/account journals remain immutable owners; new shared records are physically stored beside canonical evidence. Activation uses a separately reviewed schema migration and momentum amendment. The guarded release record tracks execution; the diagram above retains the historical pre-activation baseline.

Module map

Responsibility Main modules
Runtime assembly, leases, scheduling runtime_assembly.py, runtime_coordinator.py, runtime_scheduler.py, funnel_runtime.py
Discovery, attention, watches discovery_runtime.py, discovery_sources.py, attention_discovery.py, watchlist_recycling.py
Policy and exact records configuration.py, contracts.py, market.py
Qualification horizons.py, features.py, scoring.py, gates.py, decision.py, assessment_records.py, decision_records.py
Exit and alerts exit_collection.py, jupiter_exit_collection.py, events.py, delivery.py, post_alert.py, outcomes.py
DD ddEngine/research.py, live_collectors.py, evidence.py, quality_score.py, worker.py, runtime_store.py
Human/agent context signal_snapshot.py, token_info_context.py, pool_context.py, agent_telemetry.py

Unless a package is shown, modules are under alfaEngine/. Verification links source and tests.

Persistence and communication

The canonical Alfa store persists policy snapshots and linked discovery, market, evidence, decision, exit, alert, and delivery records. Content digests, input IDs, identity, policy version, source and retrieval clocks make the evidence chain inspectable. Work items have leases, deadlines, and terminal reasons. Current views join these records; they do not rewrite history.

The implementation also has separate SQLite ledgers for provider accounting, dispatches/responses, discovery membership, scheduler/funnel work, DD, and telemetry. The design's phrase “one authoritative database” describes authority ownership, not one physical database file. Transactions are durable within their owner; there is no general atomic transaction across all ledgers. The latest rollout recorded a SQLite lock incident whose canonical response publication remained unknown. See discrepancies.

DD opens Alfa in read-only/query-only mode and owns its queue, operations, results, feedback, and delivery records. The paper exporter similarly reads saved Alfa records. Paper books and source/model artifacts live outside this repository; the portal consumes validated telemetry rather than controlling those books.

Clocks, recovery, and budgets

Observation time, retrieval time, decision time, and delivery acknowledgment time are different. Some accepted market/security sources explicitly use original receipt clocks because provider observation time is unavailable. Re-reading a cache cannot make old evidence fresh or create independent momentum observations.

Provider work reserves before dispatch. Failed, partial, and uncertain attempts retain accounting. Restart recovery reuses original accepted responses and record bindings; restarting or crossing a calendar boundary does not grant new quota. A continuous-operation receipt removes a scheduled operating cutoff while retaining provider ceilings and original charges.

Services have separate ownership and health. A healthy container proves process health, not completed research, fresh evidence, delivery, or profitable trading. Chains and tiers covers source admission; alerts covers delivery; tradeEngine covers agent outages.

dnQuant documentation · Published from the main repository