Files
Evgeny @ SimpleX Chat 152c30ca68 rcv-services issues
2026-03-15 18:19:06 +00:00
..
2026-03-15 12:37:33 +00:00
2026-03-14 16:55:34 +00:00
2026-03-14 09:50:45 +00:00
2026-03-15 16:57:42 +00:00
2026-03-15 13:00:27 +00:00
2026-03-15 13:00:27 +00:00
2026-03-15 18:19:06 +00:00
2026-03-15 16:57:42 +00:00
2026-03-15 13:00:27 +00:00
2026-03-13 17:56:14 +00:00

Spec Layer

How does the code work? What does each function do? What are the security invariants?

Structure

Spec has two levels:

spec/modules/ — Per-module documentation

Mirrors the src/Simplex/ directory structure exactly. Each .hs file has a corresponding .md file at the same relative path. Contains only information that is not obvious from reading the code and cannot fit in a one-line source comment:

  • Non-obvious behavior (subtle invariants, ordering dependencies, concurrency assumptions)
  • Usage considerations (when to use X vs Y, common mistakes, caller obligations)
  • Relationships to other modules not visible from imports
  • Security notes specific to this module

Not included: type signatures, code snippets, function-by-function prose that restates the source. If reading the code tells you everything, the module doc says so briefly.

Function references use fully qualified names with markdown links:

[Simplex.Messaging.Server.subscribeServiceMessages](./modules/Simplex/Messaging/Server.md#subscribeServiceMessages)

Source code links back via comments:

-- spec: spec/modules/Simplex/Messaging/Server.md#subscribeServiceMessages
subscribeServiceMessages :: ...

spec/ root — Topic documentation

Cross-module documentation that follows a feature, mechanism, or concern across the entire stack. Topics answer "how does X work end-to-end?" rather than "what does this file do?"

Topics reference module docs rather than restating implementation details. They focus on:

  • End-to-end data flow across modules
  • Cross-cutting security analysis and invariants
  • Design rationale, risks, test gaps
  • Version gates and compatibility concerns

Some topics may migrate to product/ if they are primarily about user-visible behavior and guarantees rather than implementation mechanics.

spec/security-invariants.md — All security invariants

Cross-referenced from both module docs and topic docs.

Conventions

Module doc entry format:

## functionName
**Purpose**: ...
**Calls**: [Module.a](./modules/path.md#a), [Module.b](./modules/path.md#b)
**Called by**: [Module.c](./modules/path.md#c)
**Invariant**: SI-XX
**Security**: ...

Index

Architecture

Component topology and message flow diagrams for each layer:

Topics

Cross-cutting concerns that span multiple modules:

Agent internals

Modules

See spec/modules/ — mirrors src/Simplex/ structure.

Security