R&D compliance engine · Grant-eligible IP

Compliance Engine Documentation

Lounbreck's calculations are implemented as independently-versioned TypeScript modules — peer-reviewable, auditable, and updated when treaties change. This page documents each module's regulatory basis, inputs, outputs, and change history.

Last updated: June 2026 · Engine repository: private (available for grant reviewers on request)

Three-Line Compliance Engine

src/engine/compliance.ts · src/engine/rules.ts

v2.0.0

Updated June 2026

Evaluates each frontalier against three independent threshold lines, each with its own status (SAFE / WARNING / CRITICAL / EXCEEDED): the tax line (days worked outside Luxembourg), the 25% social-security default line, and the 49% framework line (active only with a valid A1). Reports which line binds first and the resulting social-security regime.

Regulatory basis

EU Regulation 883/2004 (social security) + Luxembourg bilateral tax treaties

Tax: 34-day limit, harmonised across LU-FR, LU-BE and LU-DE. Social security: 25% default (Reg. 883/2004) and 49% framework ceiling (2023 Framework Agreement, in force 1 July 2023).

Key constants

  • · Tax-day limit: 34 (LU-FR, LU-BE, LU-DE)
  • · SS default fraction: 25%
  • · SS framework fraction: 49%
  • · Annual working days: 220
  • · Status bands: WARNING ≥70%, CRITICAL ≥90%, EXCEEDED >100%

Inputs

  • · Corridor (LU-FR / LU-BE / LU-DE)
  • · Home-country days + third-country days
  • · Employment fraction
  • · A1 framework opt-in
  • · Calendar year

Outputs

  • · Tax line — used / limit (34) / status / days remaining
  • · SS default line — used% / 25% / status
  • · SS framework line — used% / 49% / status
  • · Binds-first (tax or social security)
  • · SS regime (CCSS / URSSAF / ONSS / DRV)

Change log

v2.0.0June 2026Three-line model — added the 34-day tax line and the 49% framework line; retired the single 55-day WFH threshold engine.
v1.0.0June 2026Initial single-line implementation — EU Reg. 883/2004 25% rule, 220-day working year baseline.

Social Security Router

src/engine/social-security/router.ts

v1.0.0

Updated June 2026

Routes each employee to the applicable social security regime based on their corridor and WFH day count. Determines whether CCSS (Luxembourg) or the residence country regime applies.

Regulatory basis

EU Regulation 883/2004, Art. 11–16 — Determination of applicable legislation

Luxembourg bilateral social security conventions with France, Belgium, and Germany

Key constants

  • · LU-FR → URSSAF (France) when threshold exceeded
  • · LU-BE → ONSS (Belgium) when threshold exceeded
  • · LU-DE → DRV (Germany) when threshold exceeded
  • · Default: CCSS (Luxembourg)

Inputs

  • · Corridor
  • · WFH days used
  • · Calendar year

Outputs

  • · SS regime (CCSS / URSSAF / ONSS / DRV)
  • · Country of applicable legislation
  • · Routing basis explanation
  • · Threshold exceeded flag

Change log

v1.0.0June 2026Initial implementation — four-regime router per EU 883/2004.

LU-FR Tax Treaty Engine

src/engine/treaty/lu-fr.ts

v1.0.0

Updated June 2026

Calculates the applicable tax class for LU-FR corridor employees under the Luxembourg–France bilateral tax treaty. Implements the 90% household income test for assimilation fiscale eligibility.

Regulatory basis

Art. 157ter LIR (Luxembourg Income Tax Law) — Non-resident assimilation fiscale

Convention fiscale Luxembourg–France (1958, as amended) — Art. 24

Key constants

  • · Assimilation fiscale threshold: ≥90% household income from Luxembourg
  • · Tax class 2: married or assimilation fiscale
  • · Tax class 1a: widowed or single parent (without assimilation)
  • · Tax class 1: default non-resident

Inputs

  • · Marital status (SINGLE / MARRIED / WIDOWED / SINGLE_PARENT)
  • · Household income % from Luxembourg sources

Outputs

  • · Tax class (1 / 1a / 2)
  • · Assimilation fiscale eligibility
  • · Legal basis explanation

Change log

v1.0.0June 2026Initial implementation — Art. 157ter LIR, three-class assignment logic.

LU-BE Tax Treaty Engine

src/engine/treaty/lu-be.ts

v1.0.0

Updated June 2026

Calculates the applicable tax class for LU-BE corridor employees under the Luxembourg–Belgium bilateral tax treaty.

Regulatory basis

Art. 157ter LIR (Luxembourg Income Tax Law)

Convention fiscale Luxembourg–Belgique (1970, as amended)

Key constants

  • · Same 90% income threshold as LU-FR
  • · Same three-class assignment logic

Inputs

  • · Marital status
  • · Household income % from Luxembourg sources

Outputs

  • · Tax class (1 / 1a / 2)
  • · Assimilation fiscale eligibility
  • · Legal basis explanation

Change log

v1.0.0June 2026Initial implementation — mirrors LU-FR logic under LU-BE treaty basis.

LU-DE Tax Treaty Engine

src/engine/treaty/lu-de.ts

v1.0.0

Updated June 2026

Calculates the applicable tax class for LU-DE corridor employees under the Luxembourg–Germany bilateral tax treaty.

Regulatory basis

Art. 157ter LIR (Luxembourg Income Tax Law)

Convention fiscale Luxembourg–Allemagne (1958, as amended)

Key constants

  • · Same 90% income threshold as LU-FR
  • · Same three-class assignment logic

Inputs

  • · Marital status
  • · Household income % from Luxembourg sources

Outputs

  • · Tax class (1 / 1a / 2)
  • · Assimilation fiscale eligibility
  • · Legal basis explanation

Change log

v1.0.0June 2026Initial implementation — mirrors LU-FR logic under LU-DE treaty basis.

Legal disclaimer

This engine documentation is provided for transparency and audit purposes. Lounbreck's calculations are based on treaty rules as encoded at the time of use. Tax treaties and social security regulations change. It is the employer's responsibility to verify that the platform reflects current rules. Lounbreck does not constitute legal or tax advice. Always verify compliance obligations with a qualified fiduciary or legal counsel.

Compliance Engine — Lounbreck — Lounbreck