Copie statique du dossier d'architecture de law.soufien.lu, capturee le 21/08/2026 pour les reseaux qui bloquent le domaine d'origine.
Lex Browse everything
For developers

Assistant

A bounded agent around a deterministic legal core.

Architectural decision: bounded plan -> validate and correct once -> guard dates -> freeze -> execute. ReWOO-inspired reasoning without an observation loop, not adaptive ReAct. Identity resolves in code before any model runs; the planner proposes one typed plan over a closed catalog; code validates, freezes and executes it; optional prose is composed and judged only on explicit request and can only lose to the typed reply, never replace it.

A conventional sequence diagram with continuous lifelines for reader, web, deterministic admission and subject authority, planner and plan gate, executor and outcome routing, the legal core and signed index, and separate optional composer and judge roles. Time runs downward through deterministic resolution, one plan, one possible correction, a date guard, freeze, execution without observations, a typed response contract and optional prose.

Open the sequence diagram at full size

What crosses each boundary

Every component hands the next one a typed object, never prose. Code marks deterministic application code; model marks a bounded Azure OpenAI call with a typed output. Cards reach the reader as each operation completes, but the plan is frozen before the first one runs and the reply is assembled once at the end.

From To Object Carries Cannot carry
Subject preflight, code Planner, model SubjectAuthority opaque subject_1..N refs, up to eight, with the works they stand for; an optional article number; an optional runner-up disclosure; or a clarification that ends the turn a law name or identifier the planner could rewrite
Planner, model Plan gate, code proposed plan tool names from the closed catalog and typed arguments; work may only be an offered ref anything outside the schema: one correction, then a typed invalid request
Plan gate and date guard, code Executor, code OperationPlan one to eight frozen operations, value-copied, each with its declared effects and recorded repairs; a bare year widened to its window or turned into a clarification a later change; the plan is sealed
Executor, code Outcome router, code execution results per operation a closed legal outcome, transport outcome, rows, hashes, permalinks or a typed gap; the evidence ledger, 64 entries and 96,000 characters an effect outside the frozen declaration, which throws
Outcome router, code Composer, model, optional draft and ledger the already final typed reply and its evidence items with ids text the ledger does not hold
Composer, model Judge, model AgentAnswerDraft claims bound to evidence ids kind to kind, permalinks byte-identical to evidence, already validated in code a number or article absent from the cited excerpts
Judge, model Outcome router, code AgentGroundingJudgment Pass, Repair or Refuse a replacement reply; anything but Pass keeps the typed result
Outcome router, code Web AskOutcome the named reply, per-operation results, closed effect cards, forced disclosures, trace, timings model prose without its typed result underneath

What the model may never do

Code owns these through WorkResolutionGuard, WorkSubjectRule, OperationPlan, OperationArguments, DateIntentGuard, UiMapper, AgentAnswerContract and AgentAnswerFinalizer.

Bounds

Conversation memory

The browser keeps only a visible transcript and opaque token while bounded server memory stores six accepted turns and deterministic subject context, expiring after thirty idle minutes.

Open the memory boundary diagram at full size

Boundary Holds Bound
Browser The visible transcript and the opaque token, in component memory, never local storage Lost on reload; an unknown token never falls through to another conversation
Server thread registry Accepted turns and deterministic subject context, keyed by the token's SHA-256 digest only 1,024 threads, six turns, 32 KiB per thread, 16 MiB globally, two waiters, 30-minute idle lifetime
Planner request The restored bounded transcript and the authorized subject refs Nothing persistent; restart, expiry, eviction or reset loses the thread safely

The objects, expanded

Each object that crosses a boundary, with its fields as declared in code. Click a name to expand.

SubjectAuthority
Members        : List<SubjectAuthorityMember>
ArticleNumber  : string, optional
Disclosure     : AnswerDisclosure, optional
References     : subject_1 .. subject_N, derived, N at most eight
SubjectAuthorityMember
Work            : string, for example eu-eurlex:32016r0679
Title           : string, optional
Mentions        : List<string>, the reader's words that matched
ArticleAnchor   : string, optional, for example art_33
ExactLexId      : string, optional, when a full version key was named
AuthoritySource : identifier, title, short_title or provision
AnswerDisclosure
RunnerUpWork  : string, optional
RunnerUpTitle : string, optional
Instant       : Stated, DefaultedToToday or WidenedFromYear
OperationPlan
RequestId          : string
Locale             : string
Operations         : RequestedOperation[1..8], value-copied, sealed
SynthesisRequested : bool, reconciled against the plan at freeze
RequestedOperation
OperationId            : string
UserOrder              : int
Tool                   : one of the ten legal operations, legal_boundary or clarification
Arguments              : typed JSON, at most 32,768 bytes
ResultClass            : LegalResultClass, optional
Disposition            : ApplicationDisposition, optional
Effects                : declared OperationEffect list; an effect outside it throws
Repairs                : "action.argument outcome" lines recorded by the gate and the date guard
OperationResult
OperationId      : string
LegalOutcome     : one of nine closed outcomes
TransportOutcome : one of five closed outcomes
Effects          : within the frozen declaration
Payload          : rows, hashes, permalinks, or a typed gap
AgentEvidence
Id                         : tool:call:ordinal
Kind                       : one of seven evidence kinds, no pointer kind
Work, Anchor, Date         : identity of the evidence
TextSha256, Permalink      : what the claim can be checked against
RequiresCoverageDisclosure : bool
Title, Excerpt             : bounded text
AgentAnswerDraft
Status             : answer, gap, clarify or refusal
Answer             : string, at most 6,000 characters
Claims             : AgentClaim[], each with Text, Kind and EvidenceIds
Permalinks         : must be byte-identical to used evidence
CoverageDisclosure : string, optional
AgentGroundingJudgment
Disposition : pass, repair or refuse
Issues      : at most five
Replacement : string, only with repair
AskOutcome
Status              : HTTP status
Body                : reply, trace, clarification, ui, operations, model_usage, model_identity, timing
RetainForReplay     : bool
ContextDisposition  : Preserve, Replace or Clear
UiEffect slots      : Provision, Diff, History, Timeline, Ranking, InForce, CitedBy, Coverage, Verification, Workspace, Gap