D/A/CH Compliance Engine
Relevant source files
The following files were used as context for generating this wiki page:
The D/A/CH Compliance Engine manages legal requirements, technical standards, and regional configurations for construction projects in Germany (DE), Austria (AT), and Switzerland (CH). It ensures that the LV.AI platform adheres to regional regulations including VOB (DE), ÖNORM (AT), and SIA (CH) for tendering, contracting, and invoicing.
This module provides the structural foundation for GAEB-compliant workflows and regional legal frameworks. It supplies the AI with necessary context to generate legally sound documents and warns users about regional deadlines or requirements.
Sources: lib/compliance/daech.ts:1-5, CLAUDE.md:4-10, README.md:14-23
Regional Compliance Frameworks
The engine stores specific legal bases for each supported country. This includes tendering laws, contract laws, technical conditions (ATV), and cost structuring standards.
Regional Configuration Table
| Feature | Germany (DE) | Austria (AT) | Switzerland (CH) |
|---|---|---|---|
| Legal Basis | VOB/A+B+C | ÖNORM B2110/B2111 | SIA 118/102 |
| Tendering | VOB/A 2019 | ÖNORM B2110:2013 | SIA 118 |
| Contracting | VOB/B 2016 | ÖNORM B2111:2013 | SIA 102 |
| Technical (ATV) | VOB/C (DIN 18299) | ÖNORM B2110 Anhang C | SIA 118 Teil C |
| Costing | DIN 276:2018 | ÖNORM B 1801-1 | SIA 416 |
| Currency | EUR | EUR | CHF |
| E-Invoicing | XRechnung 3.0, ZUGFeRD | ebInterface 5.0, ZUGFeRD | ZUGFeRD, Swiss QR |
Sources: lib/compliance/daech.ts:41-155, CLAUDE.md:71-77, README.md:65-71
Data Structures
The engine uses the ComplianceConfig interface to define the requirements for each country.
export interface ComplianceConfig {
land: Land;
name: string;
vergaberecht: string;
vertragsrecht: string;
atv: string;
kostengliederung: string;
eRechnung: string[];
waehrung: string;
sprache: string;
fristen: FristConfig[];
positionstexte: Positionsvorlage[];
}
Sources: lib/compliance/daech.ts:7-20
Deadline and Period Management
The engine defines standardized deadlines (Fristen) relevant to the construction lifecycle, such as bidding periods, binding periods, and warranty durations.
Logic Flow for Deadline Retrieval
The system identifies the project's region and returns a list of mandatory or standard periods defined by the respective local law.
The diagram shows the functional flow from a country code input to the retrieval of specific legal deadlines.
Sources: lib/compliance/daech.ts:167-175, lib/compliance/daech.test.ts:71-82
Standard Deadlines Examples (DE)
- Angebotsfrist (Public): 35 days (§ 10 Abs. 1 VOB/A)
- Angebotsbindefrist: 60 days (§ 14 VOB/A)
- Gewährleistungsfrist: 730 days (2 years, § 13 Abs. 4 VOB/B)
- Schlussrechnung Prüffrist: 30 days (§ 16 Abs. 3 VOB/B)
Sources: lib/compliance/daech.ts:53-81
AI Context Integration
The Compliance Engine provides a "Compliance Context" string. This string is injected into AI system prompts to ensure the LLM generates content appropriate for the specific region.
This diagram illustrates how regional compliance data is integrated into the AI generation flow.
Sources: lib/compliance/daech.ts:208-220, lib/ai/prompts.ts:14-25
Prompt Content
The regularPrompt specifies the AI's role as an expert for:
- GAEB DA XML (X81–X86)
- VOB/A (DE), ÖNORM B2110 (AT), SIA 118 (CH)
- DIN 276 for cost estimations
- XRechnung/ZUGFeRD for electronic invoicing
Sources: lib/ai/prompts.ts:8-25, lib/ai/prompts.test.ts:15-40
Technical Implementation
The module is implemented as a service within lib/compliance/daech.ts. It exports several utility functions to access compliance data.
Key Functions
| Function | Purpose |
|---|---|
getComplianceForLand(land) | Returns the full ComplianceConfig for a specific country; defaults to DE. |
getFristen(land) | Returns the array of FristConfig (deadlines) for the country. |
getRechtsgrundlage(land, bereich) | Returns the specific legal text for "vergabe", "vertrag", "atv", or "kosten". |
getWaehrung(land) | Returns the local currency string (e.g., "EUR" or "CHF"). |
getComplianceContext(land) | Generates a formatted string for AI system prompts. |
Sources: lib/compliance/daech.ts:162-220, lib/compliance/daech.test.ts:12-32
Database Schema Alignment
The landEnum in the database schema restricts project locations to the supported 'DE', 'AT', and 'CH' values, ensuring data integrity across the compliance module and the persistence layer.
Sources: lib/db/schema.test.ts:46-48
Summary
The D/A/CH Compliance Engine provides the specialized legal and technical knowledge required for construction project management in Germany, Austria, and Switzerland. By codifying regional standards like VOB, ÖNORM, and SIA, the engine enables LV.AI to produce GAEB-compliant documents, manage regional deadlines, and support local electronic invoicing formats while providing the AI with necessary legal guardrails.