Skip to content

HELIX-ARCH-000: Architecture Principles

This document defines the foundational architectural philosophy of Helix. It establishes the drivers, constraints, core principles, quality attributes, and governance structures that must guide all downstream system design choices.


1. Executive Summary

Helix is an event-driven, AI-native Governance Operating System that integrates unstructured community community inputs with administrative workflows. Because governance platforms serve public democratic institutions, they demand high consistency, auditability, and long-term evolvability. System architectures that are built ad-hoc or tightly coupled suffer rapid degradation, vendor lock-in, and operational brittleness.

This document defines the architectural principles of Helix. It serves as our technical constitution. Every database schema, event contract, microservice interface, deployment layout, and AI agent must justify its existence and structure against these principles.


2. Architectural Vision

The architecture of Helix is designed to exhibit ten fundamental qualities: * Evolvable: Services must be structured to scale, upgrade, or replace components without causing systemic downtime. * Observable: High-fidelity telemetry (logs, metrics, traces) must expose the execution state of the system at all times. * Secure: Data validation, encryption, and cryptographic signatures must protect citizen privacy and administrative integrity by design. * Explainable: Automated logic, triage actions, and RAG contexts must provide clear reasoning traces and grounding evidence. * Modular: Services have strict context boundaries, communicating via defined, asynchronous contracts. * Cloud-Native: Platform components must run seamlessly inside standard environments, leveraging elastic resource scaling. * Event-Driven: Workflows and data streams are modeled as asynchronous events, ensuring decoupling and transactional safety. * Human-Centric: Interfaces prioritize administrative efficiency and ease of use, keeping human operators in control. * Extensible: The system is open to custom integrations (models, messaging channels) via isolated SDK plugin interfaces. * Vendor-Neutral: Core services are agnostic to proprietary cloud platforms, permitting deployment on public, private, or hybrid clouds.


3. Architecture Drivers

Our design choices are shaped by the following prioritized drivers:

$$\text{Security \& Privacy} > \text{Explainability} > \text{Reliability} > \text{Maintainability} > \text{Latency} > \text{Cost Awareness}$$

  1. Security & Privacy: Civic platforms manage sensitive citizen information. Zero-trust networks, encrypted storage, and PII masking are non-negotiable.
  2. Explainability: Administrative trust depends on verifiable recommendations. Speculative or black-box AI outputs are prohibited.
  3. Reliability: Public intake pipelines must process community communications without message loss, surviving system traffic spikes.
  4. Maintainability: The platform must be easy for community contributors and local government IT departments to maintain.
  5. Latency: Critical interactions (intake triage, search updates, dashboard loads) must execute within defined human-speed boundaries.
  6. Cost Awareness: Governments operate within budget limits. The architecture must minimize cloud computing, indexing, and LLM token overhead.

4. Core Architectural Principles

ARCH-P-001: Modular by Default

  • Statement: The system shall be composed of loosely coupled, independently deployable services with strictly defined domain boundaries.
  • Rationale: Monolithic systems degrade under complex operational changes, making localized modifications fragile.
  • Trade-offs: Increases network telemetry complexity and operational deployment configurations.
  • Impact: Easier scaling, independent component upgrades, and isolated failure domains.

ARCH-P-002: API-First Design

  • Statement: Services must expose all logic through typed, documented API contracts before user interfaces are built.
  • Rationale: Decoupled backends allow frontend channels to scale and mutate independently without breaking core logic.
  • Trade-offs: Demands extra development cycles to write contracts and mocks before code.
  • Impact: Clear service boundaries and parallel frontend/backend development tracks.

ARCH-P-003: Event-Driven Architecture

  • Statement: Core transactional boundaries must communicate asynchronously using events via a message broker.
  • Rationale: Asynchronous event streams prevent cascading HTTP failures, absorb traffic bursts, and enable multi-subscriber routing.
  • Trade-offs: Leads to eventual consistency schemas, requiring structured transaction tracking.
  • Impact: Resilient, scalable ingestion and workflow execution pipelines.

ARCH-P-004: Stateless Core Services

  • Statement: Application logic layers must remain stateless, delegating persistence and status updates to external registries.
  • Rationale: Stateless services allow horizontal scalability and immediate auto-recovery from process failures.
  • Trade-offs: Offloads caching requirements and transaction locking to the database tier.
  • Impact: Simplified service management and predictable scaling behaviors.

ARCH-P-005: Standardized Extension Points (Plugins over Forks)

  • Statement: Custom integrations (AI models, SMS channels, databases) must use defined plugin contracts rather than modifications to the core codebase.
  • Rationale: Forking core logic to adapt to regional provider choices makes unified bug fixes impossible.
  • Trade-offs: Requires engineering abstract plugin wrappers and SDK boundaries.
  • Impact: Single source code repository running multiple provider integrations cleanly.

ARCH-P-006: Configuration over Code

  • Statement: Environmental parameters, priority weights, schema definitions, and locale files must be loaded dynamically from configuration sources.
  • Rationale: Modifying code to alter localized rules violates build pipeline consistency.
  • Trade-offs: Requires robust configuration validators to prevent boot-time failures.
  • Impact: Fast deployment configurations across regions without rebuilds.

ARCH-P-007: Infrastructure as Code (IaC)

  • Statement: Cloud infrastructure, access controls, network configurations, and database indexes must be managed through configuration files whenever practical.
  • Rationale: Manual modifications via cloud dashboards lead to configuration drift and non-reproducible environments.
  • Trade-offs: Increases initial onboarding time for new infrastructure developers.
  • Impact: Reliable, auditable, and easily cloned staging/production environments.

ARCH-P-008: Observability by Default

  • Statement: Every service must export structured logs, operational metrics, and distributed trace contexts.
  • Rationale: Distributed systems are impossible to debug without transactional trace visualization.
  • Expected User Impact: Instant detection of execution failures and clear performance metrics.
  • Engineering Implication: Standard logging libraries and distributed tracing standard integrations must be integrated into our base microservice templates.

ARCH-P-009: Explainability Everywhere

  • Statement: AI recommendation pipelines must store and present their grounding evidence alongside the generated payload.
  • Rationale: Administrative accountability requires that every automated suggestion are verifiable.
  • Trade-offs: Increases storage footprint and prompt design complexity.
  • Impact: Audit-ready administrative decisions.

ARCH-P-010: Human Approval Gates (Fail-Safe Triage)

  • Statement: Transitions that execute outward actions, budget allocation updates, or task dispatches must fail-open to manual triage queues if validation checks fall below defined confidence limits.
  • Rationale: System errors should not lead to automated actions that commit public resources or deliver unverified statements to citizens.
  • Trade-offs: Low-confidence tickets demand human labor.
  • Impact: Mitigation of safety risks associated with automated AI operations.

5. Quality Attributes

We prioritize Helix system attributes according to these criteria:

Attribute Priority Rationale for Weighting
Auditability High Every decision must have a traceable path to a human signature and policy evidence.
Security High Civic platform processing PII demands zero-compromise encryption and network boundaries.
Explainability High Administrative recommendations must expose grounding contexts to prevent hallucinations.
Extensibility High The plugin framework must allow rapid localized integrations without core forks.
Reliability Medium Low message drop rates in ingestion queues are required, but slight routing delays are acceptable.
Maintainability Medium Decoupled modular structures make the code manageable for open-source contributors.
Portability Medium Standardized deployability supports public, private, or hybrid cloud deployments.
Performance Medium Ingestion latency must remain within human interaction limits (<5s triage, <2s query).
Recoverability Medium Auto-healing service tasks and transactional event queues minimize data loss.

6. Architectural Constraints

  • Government Deployment Constraints: Public procurement policies often require that platforms can run on local, private, or hybrid infrastructure.
  • Resource Limitations: Client portals must load on low-spec hardware and slow internet connections.
  • Linguistic Diversity: Parsing local languages requires model-independent routing architectures.
  • Data Sovereignty: Citizen data must obey regional storage limits.
  • Open Source Compatibility: System libraries must use permissive open-source licenses.

7. Architectural Decision Framework

Before adopting any technology or choosing a design pattern, developers must evaluate choices against these questions: 1. Coupling: Does this change reduce dependencies between core services? 2. Observability: Can we trace a message through this component using a distributed tracing standard? 3. Deployment: Can this component be deployed on-premise without cloud vendor dependencies? 4. Skills: Can a standard open-source developer understand and modify this component? 5. Standardization: Does this align with the frozen Domain Model (HELIX-DOMAIN-001)? 6. Replaceability: Can we swap this dependency (e.g. database, broker) using standard plugin interfaces later?


8. Architecture Review Process

Any significant architectural change, technology selection, or network design follows this review process:

Proposal (RFC) ──► Review (ARB) ──► ADR Creation ──► Spec Freeze ──► Implementation ──► Validation
  1. Proposal (RFC): Developers submit a Request for Comments (RFC) under rfc/ detailing the design.
  2. Review (ARB): The Architecture Review Board (ARB) evaluates the RFC against HELIX-ARCH-000.
  3. ADR Creation: The accepted decision is recorded as an Architecture Decision Record (ADR) under adr/.
  4. Spec Freeze: The specification is locked, and the progress log is updated.
  5. Implementation: Coding begins following our Definition of Done.
  6. Validation: Unit, integration, and security checks verify conformity with the ADR.

9. Architecture Governance

  • Architecture Decision Records (ADRs): ADRs serve as our design history. They use a standard template tracking Context, Alternatives, Decision, Consequences, and Status (Proposed, Accepted, Superceded).
  • Specifications Lifecycle: Documents follow the lifecycle: $$\text{Draft} \rightarrow \text{Review} \rightarrow \text{Accepted} \rightarrow \text{Frozen} \rightarrow \text{Deprecated} \rightarrow \text{Archived}$$
  • Version Control: ADRs and specs are version-controlled alongside codebase updates.

10. Architectural Anti-Patterns

The following designs are prohibited in Helix: * Direct Database Sharing: Microservices must not access each other's databases directly. Data syncs must go through APIs or event buses. * Business Logic Duplication: Domain logic must belong to a single microservice context boundary. * Hardcoded Routing Rules: Regional settings or classification maps must never be hardcoded into service modules. * Silent Failures: Swallowing exceptions without logging or failing to redirect bad tasks to dead-letter queues is prohibited. * Vendor Lock-in: Using proprietary cloud services that prevent local deployment is prohibited. * Skipping ADRs: Making significant structural changes without proposing an RFC or logging an ADR is prohibited.


11. Design Validation Checklist

  • Charter Alignment: Directly matches the core principles defined in HELIX-SPEC-000.
  • Constitution Alignment: Conforms to all Twelve Laws of the Helix Constitution.
  • DDD Compliance: Aligns with terms, lifecycle states, and rules defined in HELIX-DOMAIN-001.
  • Coded IDs: Every architectural principle has an identifier tag (ARCH-P-XXX).
  • Trade-off Definition: Every principle includes explicit trade-offs and impacts.
  • No Tech Specifications: Avoids referencing databases, programming languages, and host platforms.
  • Checklist Compliance: Ends with this validation gate.