---
name: project-basis
description: Draft the project basis (base du projet, Projektbasis) required by SIA 260 clause 2.5 from a Stratta dossier and its site sheet, chapter by chapter, every statement traced to a decision, a site fact or a clause, every gap written as a gap. Trigger phrases: "redige la base du projet", "base du projet", "Projektbasis", "project basis".
---

# Project basis (SIA 260 clause 2.5)

Use this skill when the user asks for the project basis of a structure, in any of its
names: base du projet, Projektbasis, project basis. The document states the conditions the
design rests on: the site, the actions, the retained values and the norms. Stratta holds
most of that matter already; the skill assembles it and shows what is missing.

Do not use it for the use agreement (convention d'utilisation, clause 2.2): that is the
`use-agreement` skill. Do not use it to decide anything: a gap stays a gap.

## Before writing

1. `list_skills`: if the office wrote its own `project-basis`, that version replaces this
   one entirely. Read it with `get_skill` and follow it.
2. `list_dossiers` then `load_dossier` on the project. Read its decisions and its open
   questions; `get_question` on any decision whose clause you need in full.
3. `get_site_context` on the dossier's site when it has one (`siteId` in `load_dossier`),
   then `get_boreholes` when the terrain chapter needs them.
4. `get_toc("SIA 260", maxDepth: 2)` and read the clause on the project basis with
   `get_section` when the corpus holds SIA 260. If it does not, say so once at the top of
   the document and keep the chapter plan below.

## How to write it

The document lives in Stratta, not in the conversation:

1. `draft_deliverable` with the dossier id and `kind: "project_basis"`. It returns the
   plan (the office template when one was validated, otherwise the plan below), the
   decisions of the dossier with their entry ids, the open questions and the site id.
   Calling it twice returns the same document.
2. For each section of the plan, `write_section` with the text and its sources. Every
   sentence of substance rests on one of:
   - a decision or piece of evidence: `{kind: "entry", ref: "<entryId>"}`;
   - a site fact: `{kind: "fact", ref: "groundwater.level"}`;
   - a clause you read in this conversation: `{kind: "clause", ref: "SIA 261 s. 16.2.1"}`;
   - a page of an attachment: `{kind: "attachment", ref: "<id>#p12"}`.
     A section with no source is refused. When the dossier holds nothing for a section,
     call `write_section` with `gap: true` and a body that says what is missing and who
     can supply it.
3. Tell the user the document is on the dossier page, under Livrables, where they read
   it section by section, correct, and export it to Word. Do not paste the whole
   document in the conversation; summarise what was written and list the gaps.

## The plan

Unless the office's own skill says otherwise:

1. **Objet et situation**: the structure, the address, the parcel, the mandate.
2. **Terrain de fondation**: one paragraph per site topic (geology, groundwater, hazards,
   contamination, protection sectors, boreholes), built with the `site-chapter` skill's
   rules: an `established` fact is a statement with its source and date; an `indicative`
   fact is written as `[A confirmer : ...]`; an `uncovered` topic is `[A etablir : ...]`.
3. **Actions**: seismic zone and ground class, snow, wind, from the site facts that carry
   a SIA 261 clause; each value with its clause and page.
4. **Hypotheses et valeurs retenues**: one line per decision of the dossier: the value,
   its confidence (established, judgement, to confirm), the clause it rests on.
5. **Bases normatives**: the norms and editions cited in the dossier, one line each.
6. **Points ouverts**: the open questions, with their due date and assignee when set.

The text of a section is plain prose: the sources go in the `sources` argument, not in
the text. Stratta prints them under each section.

## Rules

- Write nothing the dossier, the site sheet or a clause you read does not carry. A
  plausible sentence with no source is the one mistake this document cannot afford.
- A value retained by judgement stays a judgement in the text; do not upgrade it.
- A site fact is a register's answer, not a design value: it goes in chapter 2 or 3 with
  its source, and the retained value goes in chapter 4 only if the dossier decided it.
- Do not conclude that the structure complies, and do not write a decision the user has
  not confirmed.
- Stratta prints the closing sentence ("Document prepare par un agent...") and the
  signature belongs to the engineer, on the dossier page. Do not sign anything.

## After drafting

List the gaps in one short table (chapter, what is missing, which tool or which person can
fill it), and ask which one to settle first. A gap settled later is written with
`write_section` on the same path; the document keeps its version history.

When the user comes back and `draft_deliverable` returns sections in state `stale`, start
with those: `staleReason` says which source moved (a decision retaken, a fact changed by a
rescan, a clause changed by a new edition). Reread the source, rewrite the section or tell
the user it still holds.
