feat(fase0): synthetic reference domain (D4) + backend profile skeleton (D2)

Completes Fase 0 (skeleton & decision-lock):

- reference_domain.py + data/reference_projects.json: a synthetic
  "anleggskostnad" portfolio (3 fictional construction-cost projects with
  cost line items) as the framework's bundled reference input. Plain typed
  loader (frozen dataclasses); the JSON-Schema data-source *contract* (B5)
  is deliberately deferred to Fase 2.
- backends.py: Profile (azure|local) + ChatBackend Protocol seam +
  AzureFoundryBackend/LocalBackend stubs + get_backend() selector
  (fail-fast on unknown profile). Empty skeleton per D2 — create_chat_client
  raises NotImplementedError until live wiring in Fase 1. Return type is the
  MAF BaseChatClient (the common base of FoundryChatClient/OpenAIChatClient).

Quality gate green: ruff format + check, mypy (src) clean, 12 pytest passed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H9FyyENxebxVThjrn9et8C
This commit is contained in:
Kjell Tore Guttormsen 2026-06-23 22:38:41 +02:00
commit b57aa83a30
5 changed files with 282 additions and 0 deletions

View file

@ -0,0 +1,46 @@
{
"_note": "SYNTHETIC fixture (D4). Fictional 'anleggskostnad' projects with dummy data — not real estimates. Used as the framework's bundled reference portfolio.",
"currency": "NOK",
"projects": [
{
"id": "FV42-GSV-E1",
"name": "Fv. 42 gang- og sykkelveg, etappe 1",
"description": "Ny gang- og sykkelveg langs Fv. 42, 1,2 km. Fiktivt referanseprosjekt.",
"currency": "NOK",
"cost_items": [
{"code": "01.1", "description": "Rigg og drift", "quantity": 1, "unit": "rs", "unit_cost": 850000},
{"code": "02.3", "description": "Masseutskifting bløt grunn", "quantity": 4200, "unit": "m3", "unit_cost": 420},
{"code": "03.1", "description": "Forsterkningslag knust grus", "quantity": 1800, "unit": "m3", "unit_cost": 310},
{"code": "05.2", "description": "Asfalt Ab11", "quantity": 4300, "unit": "m2", "unit_cost": 215},
{"code": "07.4", "description": "Kantstein granitt", "quantity": 2400, "unit": "m", "unit_cost": 690},
{"code": "09.1", "description": "Veglysmaster LED", "quantity": 34, "unit": "stk", "unit_cost": 28500}
]
},
{
"id": "RV13-RAS-TP",
"name": "Rv. 13 rassikring tunnelportal",
"description": "Rassikring og forlenget portal, Rv. 13. Fiktivt referanseprosjekt.",
"currency": "NOK",
"cost_items": [
{"code": "01.1", "description": "Rigg og drift", "quantity": 1, "unit": "rs", "unit_cost": 1450000},
{"code": "21.2", "description": "Sprengning fjell", "quantity": 3600, "unit": "m3", "unit_cost": 540},
{"code": "22.1", "description": "Sikringsbolter Ø25", "quantity": 920, "unit": "stk", "unit_cost": 1250},
{"code": "22.4", "description": "Sproytebetong fiberarmert", "quantity": 610, "unit": "m3", "unit_cost": 3850},
{"code": "31.3", "description": "Drenering og bortledning", "quantity": 540, "unit": "m", "unit_cost": 1180}
]
},
{
"id": "BRU-LAKS-REHAB",
"name": "Bru over Lakselva — rehabilitering",
"description": "Betongrehabilitering og ny fuktisolering, eksisterende bru. Fiktivt referanseprosjekt.",
"currency": "NOK",
"cost_items": [
{"code": "01.1", "description": "Rigg og drift", "quantity": 1, "unit": "rs", "unit_cost": 620000},
{"code": "84.1", "description": "Stillas og tilkomst", "quantity": 1, "unit": "rs", "unit_cost": 540000},
{"code": "88.2", "description": "Mekanisk betongreparasjon", "quantity": 180, "unit": "m2", "unit_cost": 4200},
{"code": "87.3", "description": "Fuktisolering membran", "quantity": 640, "unit": "m2", "unit_cost": 980},
{"code": "75.1", "description": "Rekkverk stal galvanisert", "quantity": 210, "unit": "m", "unit_cost": 2650}
]
}
]
}