CVNTrade Architecture Patterns¶
A field guide to the architectural ideas behind CVNTrade
Document type: Strategic and technical white paper · Version: 1.1 · Snapshot date: 2026-05-20
Source corpus: synthesis of the 82 ADRs currently in the platform (numbered through ADR-91, with gaps at 49-51, 53, 72-75, 78 from superseded drafts) — see the canonical index at documentation/adr/index.md. The corpus continues to grow ; counts in this paper are a snapshot of the moment, the patterns below are stable.
Companion paper: The AI-Augmented Software Engineering Studio — vendor-neutral best-practices blueprint. The present document is its reference-implementation companion: same patterns, named, dated, and grounded against the specific ADRs that enforce them inside CVNTrade.
Audience: Engineers, architects, platform/data/MLops teams, technology stakeholders. Skim the section headers and the per-section ADR refs to find the operational invariant you need ; read end-to-end for the synthesis.
Contents¶
- Architecture as Institutional Memory
- The Single Source of Truth Pattern
- The War Against Silent Failure
- Guardrails Instead of Human Memory
- The Unification Pattern
- Declarative Pipelines and Hamilton DAGs
- Registries and Plugin-Based Extensibility
- Runtime Configuration as Strategy
- Observability as a Native Property
- Architecture as Governance
- Industrialized Testing
- Knowledge Engineering
- The Deep Pattern Beneath the ADRs
- Foundation for AI Augmentation
- Pointers to Living Artifacts
- Conclusion · Key Takeaways
Preface¶
Every mature software system eventually reveals the philosophy of the people who built it.
Some systems reveal improvisation. Some reveal fear. Some reveal years of accumulated compromise.
CVNTrade reveals something else.
It reveals an engineering culture obsessed with coherence.
Across the ADR corpus, one idea appears again and again:
complexity is inevitable — chaos is optional.
This document is not a technical specification. It is an attempt to explain the architectural grammar of CVNTrade.
Why does the platform insist so heavily on traceability? Why are silent fallbacks treated almost like architectural sins? Why are configuration systems considered as important as trading engines? Why are documentation and governance treated as engineering concerns rather than management overhead?
Because CVNTrade was not designed merely to run software. It was designed to survive scale.
Not only technical scale. But organizational scale. Operational scale. Cognitive scale. And eventually, AI scale.
Executive Summary¶
CVNTrade is built around a surprisingly small set of architectural convictions.
Those convictions appear repeatedly across the ADR corpus:
- one canonical source of truth per domain;
- explicit systems over implicit conventions;
- runtime governance over hardcoded behavior;
- observable pipelines over opaque automation;
- extensibility through registries and plugins;
- reproducibility as a first-class property.
Taken individually, these ideas are familiar. Taken together, they form something more interesting:
an architecture designed to remain governable even as complexity increases.
Most software systems do not collapse because their algorithms are weak. They collapse because their complexity eventually exceeds the organization’s ability to reason about them.
The ADRs suggest that CVNTrade was engineered explicitly against this fate.
flowchart TD
A[Architecture Decisions] --> B[Operational Consistency]
A --> C[Runtime Governance]
A --> D[Knowledge Infrastructure]
A --> E[Testing Discipline]
B --> F[Single Source of Truth]
C --> G[Dynamic Configuration]
D --> H[Structured Documentation]
E --> I[Validation Pipelines]
F --> J[Reduced Drift]
G --> J
H --> J
I --> J
J --> K[Scalable Engineering Organization]
1. Architecture as Institutional Memory¶
One of the strongest signals emerging from the ADRs is that CVNTrade treats architecture as memory.
This may sound abstract, but the problem is painfully concrete.
In many organizations, important technical decisions are scattered across:
- Slack conversations;
- pull requests;
- informal meetings;
- spreadsheets;
- tribal knowledge.
A few months later, nobody remembers:
- why a decision was made;
- what alternatives were rejected;
- which tradeoffs mattered;
- whether a workaround became permanent.
The result is architectural amnesia.
CVNTrade responds by turning ADRs into operational artifacts.
They are not decorative documentation. They are part of the system.
The ADR corpus acts simultaneously as:
- technical memory;
- governance mechanism;
- onboarding accelerator;
- operational reference;
- architectural contract.
This is one of the most important ideas in the platform.
Anchoring ADRs: ADR-76 (OpenProject as the SSoT for project memory), ADR-77 (MkDocs + Structurizr as docs SSoT), ADR-57 (ADRs in English from ADR-56 onwards).
2. The Single Source of Truth Pattern¶
The ADRs repeatedly converge toward one principle:
every category of information must have one canonical home.
This sounds obvious. In practice, very few systems enforce it consistently.
Modern engineering organizations constantly duplicate information — often unintentionally :
- project state scattered across issue trackers and spreadsheets;
- runtime configuration in YAML and code;
- operational knowledge in chat and wikis;
- deployment logic in multiple pipelines.
Eventually the system becomes epistemologically unstable. Nobody knows which version is correct.
CVNTrade aggressively resists this drift.
OpenProject as Operational Truth¶
The ADRs establish OpenProject as the canonical source for:
- work packages;
- project state;
- meeting decisions;
- governance workflows;
- operational traceability.
This produces several strategic effects:
Reduced ambiguity¶
Teams stop debating where the “real” information lives.
Auditability¶
Operational history becomes reconstructible.
Organizational scalability¶
The system becomes less dependent on historical experts.
Automation readiness¶
Structured workflows become machine-readable.
Documentation as Infrastructure¶
The same philosophy appears in documentation.
MkDocs becomes the canonical publishing system for structured knowledge.
This is not merely a documentation choice. It is an architectural decision.
Knowledge itself becomes infrastructure.
flowchart LR
A[Knowledge Creation] --> B[ADR]
B --> C[MkDocs Publication]
C --> D[Shared Understanding]
D --> E[Reduced Cognitive Drift]
Anchoring ADRs: ADR-76 (OpenProject SSoT for project state ; discrepancy → OP wins, < 1h lag), ADR-77 (MkDocs SSoT for docs, strict-mode CI gate), ADR-59 (all pipeline parameters in PostgreSQL, editable via Console only).
3. The War Against Silent Failure¶
One of the most striking architectural themes in the ADRs is the rejection of silent behavior.
CVNTrade consistently prefers:
- explicit validation;
- early failure;
- visible constraints;
- deterministic behavior.
This philosophy emerges from experience.
Silent systems are dangerous systems.
Examples include:
- implicit fallbacks;
- ignored configuration values;
- hidden defaults;
- partial pipeline execution;
- invisible dependency mismatches.
These failures are particularly destructive in AI and trading environments because they generate states that appear valid while being operationally corrupted.
The ADRs therefore push strongly toward “fail fast” behavior.
The platform would rather stop loudly than continue incorrectly.
This is not rigidity. It is survivability.
Anchoring ADRs: ADR-25 (no silent fallback in ML pipelines), ADR-23 (features version-pinned, fail-fast on missing version), ADR-90 (HP resolver fail-fast on missing key ; WARN event=hpo_fallback_applied if any fallback path triggers).
4. Guardrails Instead of Human Memory¶
Another major pattern emerging from the ADRs is the replacement of informal discipline with technical enforcement.
Traditional organizations often rely on statements such as:
- “developers should remember to validate datasets”;
- “teams should avoid inconsistent hyperparameters”;
- “people should follow the conventions.”
CVNTrade systematically distrusts this model.
Instead, the platform introduces guardrails.
A guardrail is an architectural mechanism designed to prevent invalid states from existing at all.
Examples appearing across the ADRs include:
- preflight validation steps;
- dataset integrity checks;
- hyperparameter governance;
- immutable manifests;
- runtime consistency verification.
This changes the engineering culture profoundly.
The organization stops depending on perfect human discipline. The platform itself becomes responsible for coherence.
flowchart TD
A[Human Convention] -->|Unreliable at Scale| B[Architectural Guardrail]
B --> C[Deterministic Validation]
C --> D[Stable Runtime Behavior]
Anchoring ADRs: ADR-58 (every FTF factor must have a guardrail + integration test), ADR-87 (story-phase test integration ; pytest --story=... runs only @pytest.mark.story(...)), ADR-88 (golden datasets pinned by SHA, regenerated via documented procedure only).
5. The Unification Pattern¶
Many complex platforms slowly fragment into parallel worlds.
The “paper trading” system behaves differently from the live system. The backtesting environment evolves independently. Batch and realtime pipelines drift apart.
Over time, the organization starts maintaining multiple realities.
CVNTrade fights this aggressively.
The ADRs repeatedly emphasize unification.
The same kernel should support:
- backtesting;
- paper trading;
- live execution.
The objective is simple:
one behavioral model.
This produces enormous long-term advantages:
- reproducibility;
- reduced maintenance burden;
- realistic validation;
- fewer hidden divergences.
Instead of multiplying implementations, CVNTrade multiplies execution contexts around a shared core.
This is a deeply strategic architectural choice.
Anchoring ADRs: ADR-40 (paper and live share the same kernel ; only the adapter differs), ADR-39 (runtime standalone, API façade), ADR-12 (engine frozen across execution contexts).
6. Declarative Pipelines and Hamilton DAGs¶
The ADRs also reveal a strong preference for declarative pipeline architecture.
Hamilton DAGs are used to structure transformation logic as explicit dependency graphs.
This matters more than it first appears.
Opaque scripts are easy to write. They are difficult to reason about.
Declarative DAGs create:
- observable dependencies;
- traceable transformations;
- analyzable execution paths;
- composable workflows.
The architecture shifts from procedural opacity toward structural transparency.
flowchart LR
A[Raw Data] --> B[Transformation Node]
B --> C[Feature Engineering]
C --> D[Model Input]
D --> E[Execution Runtime]
Anchoring ADRs: ADR-61 (batch DAGs use Hamilton, not imperative code), ADR-60 (hot-path sequential flows use CandlePipeline ; Hamilton for batch, not hot-path), ADR-89 (training harness as Hamilton-based plugin registry).
7. Registries and Plugin-Based Extensibility¶
As platforms grow, complexity often accumulates through exceptions.
Developers begin adding:
- special cases;
- local conditionals;
- custom branches;
- hardcoded logic.
Eventually the codebase becomes impossible to reason about globally.
CVNTrade addresses this using registries and plugin patterns.
The idea is elegant.
The core platform remains stable. Extension points remain explicit. Capabilities become dynamically discoverable.
This architecture creates:
- modular extensibility;
- reduced coupling;
- clearer governance;
- safer scaling.
The training harness described in the ADRs is a strong example.
Datasets, models, strategies and validations are orchestrated through structured extension mechanisms rather than uncontrolled branching logic.
The result is a platform capable of evolving without dissolving into architectural entropy.
Anchoring ADRs: ADR-89 (training harness = plugin registry ; drop-a-file, no if model_type == ... branching ; MODEL_REGISTRY / ENSEMBLE_REGISTRY as source of truth), ADR-67 (pluggable feature-selection framework — same registry/plugin pattern).
8. Runtime Configuration as Strategy¶
One of the most modern aspects of the CVNTrade architecture is its treatment of runtime configuration.
The ADRs strongly reject hardcoded operational parameters.
This includes:
- hidden defaults;
- deployment-bound configuration;
- static runtime assumptions.
Instead, configuration becomes:
- centralized;
- observable;
- editable;
- governed;
- dynamically adjustable.
This produces important operational advantages.
Teams can:
- experiment safely;
- modify behavior without redeployments;
- audit runtime evolution;
- reduce operational friction.
The platform becomes less static software and more living infrastructure.
Anchoring ADRs: ADR-59 (all pipeline parameters in PostgreSQL ftf_config, editable via Console only), ADR-90 (training hyperparameters in PG, console-only ; CI grep gate G5), ADR-91 (console keys guaranteed seeded by deploy — no "config exists but is empty" state), ADR-56 (every pipeline change gated by CVN_* env var + FTF factor, A/B-testable by design).
9. Observability as a Native Property¶
Modern distributed systems are naturally opaque.
Without observability, organizations eventually lose the ability to answer basic questions:
- Why did this model produce this result?
- Which dataset version was used?
- Which hyperparameters were active?
- Which pipeline state generated the artifact?
The ADRs suggest that CVNTrade treats observability as a foundational capability rather than an operational add-on.
This appears through:
- manifests;
- dataset versioning;
- structured test taxonomies;
- execution traceability;
- runtime metadata.
The architecture continuously attempts to answer one fundamental question:
can the system explain itself?
This becomes increasingly important in AI-heavy environments.
Anchoring ADRs: ADR-26 (Grafana as the single operational entry point), ADR-30 (structured logs as stable correlation interface), ADR-31 / 32 / 33 (unified Python logging ; print() banned in pipelines ; event=key=value format ; closed catalogue), ADR-62 (every pipeline step emits OpenTelemetry spans).
10. Architecture as Governance¶
The ADRs reveal another important idea:
architecture is not only technical. It is organizational.
CVNTrade treats architecture as a governance framework.
This appears in:
- structured reviews;
- expert committees;
- meeting traceability;
- documented decisions;
- validation workflows.
The objective is not bureaucratic control.
The objective is coherent evolution.
The architecture attempts to preserve local autonomy while preventing systemic fragmentation.
This balance is subtle.
Too much freedom creates chaos. Too much centralization destroys innovation.
CVNTrade attempts to engineer the equilibrium.
Anchoring ADRs: ADR-68 (Expert Committee = default review channel for plan / PR / experiment reviews), ADR-82 (every committee session logged as an OpenProject Meeting — --linked-wp mandatory ; meeting state=closed, session JSON + reviewed artefact attached), ADR-52 (committee sessions auditable).
11. Industrialized Testing¶
Traditional testing approaches are insufficient for modern AI and data-intensive systems.
Testing must now validate:
- datasets;
- pipelines;
- model behavior;
- performance envelopes;
- runtime dependencies;
- infrastructure assumptions.
The ADRs therefore evolve testing into a structured industrial discipline.
Tests become:
- classified;
- versioned;
- reproducible;
- governed;
- operationally meaningful.
The appearance of immutable manifests is particularly important.
Once validated, artifacts become frozen states with fully reconstructible contexts.
This enables:
- reproducibility;
- audits;
- operational confidence;
- historical reconstruction.
Anchoring ADRs: ADR-83 (test taxonomy + gate hierarchy : fast / medium / nightly / operator-driven + story() scope marker), ADR-84 (foundation test stack : pytest + hypothesis + pact + pytest-bdd), ADR-85 (function-scoped fixtures by default ; session-scoped gate-checked), ADR-86 (CI tier promotion gate : new tier moves operator-driven → nightly → medium only on observed p95 budget), ADR-87 (story-phase test integration), ADR-88 (test cases + datasets versioned with provenance, golden datasets SHA-pinned).
12. Knowledge Engineering¶
One of the most distinctive aspects of CVNTrade is the seriousness with which it treats knowledge.
Most organizations view documentation as secondary.
CVNTrade treats it as infrastructure.
This is a profound difference.
Documentation becomes:
- versioned;
- published;
- structured;
- operationally integrated.
The migration toward English-language ADRs is also strategically significant.
It signals:
- scalability of collaboration;
- internationalization;
- recruitment readiness;
- standardization of institutional memory.
The platform is not merely building software. It is building a durable engineering language.
Anchoring ADRs: ADR-77 (MkDocs + Structurizr SSoT, strict-mode CI gate), ADR-57 (ADRs in English from ADR-56 onwards — institutional language standardization), ADR-76 (OpenProject as SSoT for project memory).
13. The Deep Pattern Beneath the ADRs¶
Across the full ADR corpus, a deeper pattern emerges.
CVNTrade consistently attempts to transform informal human coordination into explicit technical systems.
This is the real architectural story.
The platform repeatedly replaces:
- memory with traceability;
- convention with validation;
- tribal knowledge with documentation;
- implicit behavior with runtime governance;
- local exceptions with structured extensibility.
This is not accidental.
It is a deliberate attempt to build systems capable of remaining coherent under increasing complexity.
That is the hidden ambition visible throughout the ADR corpus.
14. Foundation for AI Augmentation¶
The Preface promised that CVNTrade was designed to survive AI scale. That promise deserves an explicit treatment, not an offhand mention.
The patterns described in sections 1 to 13 are not a coincidence. They are precisely the substrate required for AI agents to participate safely inside an engineering platform.
The companion paper The AI-Augmented Software Engineering Studio describes the vendor-neutral blueprint for that participation. The translation between the two documents is mechanical :
| AI-Augmented Studio (general principle) | CVNTrade enforcement (this paper) |
|---|---|
| API-first by design | OpenProject API (ADR-69/76) ; PostgreSQL ftf_config (ADR-59) ; structured logging API (ADR-30/32) |
| Declarative systems over imperative scripts | Hamilton DAGs for batch (ADR-61) ; CandlePipeline for hot path (ADR-60) |
| Human governance remains central | Expert Committee as default review channel (ADR-68) ; logged as OP Meetings (ADR-82) ; 8-state Story workflow (ADR-81) |
| Workflow / agentic control / execution / telemetry planes | OpenProject + GitHub + CI ↔ orchestration + harness ↔ Airflow + Kubernetes ↔ OpenTelemetry + Loki + Grafana (ADR-62/26/30) |
| Architecture Decision Records as organizational memory | The 82 ADRs themselves — literally this document's source corpus |
| Declarative compute with Hamilton | ADR-61 (batch DAG pattern Hamilton) + ADR-89 (training harness as Hamilton plugin registry) |
| Workflow orchestration vs. computation separation | ADR-61 explicitly forbids business logic inside Airflow DAGs |
| MLflow and end-to-end traceability | Training harness TrainedArtifact contract (ADR-89) + MLflow registry referenced by FTF runs |
| Ephemeral Kubernetes sandboxes | Scaleway Kapsule per-DAG pods, /tmp pod-ephemeral by design |
| Infrastructure as Code + policy enforcement | Helm + Terraform + GitOps (mentioned across infra ADRs) |
| AI-augmented CI/CD pipelines | Pre-commit, story-workflow guardrails G1-G5, CodeRabbit, the Expert Committee gate itself |
| Testing as a safety boundary | ADR-83 to ADR-88 — the entire industrialized testing block in section 11 |
| Observability as the cognitive nervous system | ADR-26 (Grafana entry point) + ADR-30/62 (structured logs + OTel) — section 9 |
| Structured logging and machine readability | ADR-30 (logs structured = stable interface) + ADR-32 (event=key=value format) + ADR-33 (closed catalogue) |
| ML drift detection and continuous adaptation | Evidently in the monitoring stack ; drift runbooks under documentation/runbooks/ |
| Security, governance, and operational trust | ADR-71 (trading kill-switch, fail-safe < 1 s) ; ADR-68/82 governance |
| FinOps and cost governance | Committee session FinOps event (event=committee_finops with total_tokens and estimated_cost_usd) |
The general blueprint asks "what should an AI-augmented engineering platform look like ?". This document is one answer, made concrete by 82 dated, signed-off ADRs and the operational behaviour they enforce.
That is what survival at AI scale actually requires : not the model, but the substrate.
Anchoring ADRs: all of the above — but especially the governance triangle ADR-68 (committee) + ADR-82 (committee → OP Meeting) + ADR-76 (OpenProject = SSoT), which is what keeps any AI participation in this platform reviewable, auditable, and reversible.
15. Pointers to Living Artifacts¶
This white paper is a snapshot synthesis. The artefacts below are live — they evolve continuously and remain the source of truth between revisions of this document. Anyone using this paper to reason about CVNTrade should consult them.
Source-of-truth artefacts
- ADR index — the canonical list of the 82 ADRs ; this paper's source corpus. New ADRs land here first.
- Architecture Decision Records (root migration notice) — historical context for the pre-2026-04-23 monolithic ADR.md.
- Design System Blueprint — the structural design framework this paper synthesizes.
- OPERATIONS runbook — operator playbook ; the day-to-day enforcement of the patterns above (committee §15, OpenProject §16).
Process artefacts
- Story Workflow — the 8-state workflow (
New → In specification → Specified → In progress → Developed → In testing → Tested → Closed+ escapes) that operationalizes ADR-69 / ADR-81. - CLAUDE.md (repo root) — the project's contract for AI-assisted engineering, which itself enforces several of the patterns described here.
Operational dashboards (read-only entry points)
- Grafana — operational entry point per ADR-26.
- MLflow — model registry and experiment tracking.
- OpenProject — project SSoT roadmap (ADR-76).
- Console —
ftf_configeditor (ADR-59).
Updates to this document follow a normal PR + MkDocs publication path. The synthesis itself is expected to be revisited any time the ADR corpus grows by more than ~10 records or a new architectural axis emerges.
Conclusion¶
The ADRs of CVNTrade do not merely describe a platform.
They describe a philosophy of engineering.
A philosophy built around several powerful convictions:
- coherence is a competitive advantage;
- architecture must scale organizationally as well as technically;
- observability and reproducibility are non-negotiable;
- knowledge is infrastructure;
- governance must become executable;
- complexity must be constrained before it becomes unmanageable.
Many systems are designed to function.
CVNTrade appears designed to continue functioning while complexity grows.
That distinction matters enormously.
Because in the end, sustainable architectures are not the ones that avoid complexity.
They are the ones that remain understandable after complexity arrives.
Key Takeaways¶
-
Architecture is operational memory.
-
Coherence must be engineered deliberately.
-
Silent behavior is the enemy of reliable systems.
-
Runtime governance is becoming a strategic capability.
-
Documentation should be treated as infrastructure.
-
Reproducibility is foundational for AI-era platforms.
-
Guardrails scale better than conventions.
-
Extensibility must remain structured.
-
Observability is now part of architecture itself.
-
Sustainable systems are built to survive organizational scale, not only technical scale.