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)

WFH Threshold Engine

src/engine/wfh/threshold.ts

v1.0.0

Updated June 2026

Calculates each frontalier employee's WFH day count against the annual threshold. Returns threshold status (SAFE / WARNING / CRITICAL / EXCEEDED) and days remaining.

Regulatory basis

EU Regulation 883/2004, Art. 13 — Working in two or more Member States

Luxembourg bilateral WFH agreements (LU-FR, LU-BE, LU-DE) — effective 2024

Key constants

  • · Annual working days: 220
  • · SS threshold fraction: 25%
  • · Annual SS limit: 55 days
  • · Quarterly approximation: 13 days

Inputs

  • · Corridor (LU-FR / LU-BE / LU-DE)
  • · Home days logged for the year
  • · Calendar year

Outputs

  • · Threshold status
  • · Days used
  • · Annual limit (55 days)
  • · Percentage used
  • · Days remaining

Change log

v1.0.0June 2026Initial 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.