1Introduction

This document defines the mandatory structure of every consumer project of the Documentation Kit. It is authoritative for the files a project must hold, for the normative form of each data file, and for the lifecycle rules governing their evolution.

The same contract covers setting up a new project and bringing an existing project back into conformity after a Kit update. The skeletons given below serve for set-up; an existing project is brought into conformity through the migrations the user confirms — §6.7, Update Guide §4.4.

It is read in every session touching the structure of a project — Prompt §5.1.

2Inventory of project files

Normative table of the files an active project must hold. The Flag column gives the name of the switch in [Prefix] - Registry.requires; the Default column gives the value used when a project is set up. A file without a flag is mandatory, with the exception of [Prefix] - Settings.js, present when the project has settings of its own — §5.4 —, of the site files, present when the project publishes a site, and of package.json and package-lock.json, present when the project uses npm modules of its own — §11.

Project file Role Flag Default
[Prefix] - Projet - Prompt - [Document language] (TS).docx Technical instructions specific to the project — Mandatory
[Prefix] - Registry.js Project source of truth — versions, flags, timestamps — Mandatory
[Prefix] - Settings.js Project-owned settings — outside the Kit perimeter — If needed
[Prefix] - Projet - Todos - [Document language] (TS).docx Open entries, debts and dated register of decisions — Mandatory
[Prefix] - Glossary - Terms (TS).js Glossary module — source of the glossary and of pipeline pass 2 glossary true
[Prefix] - Glossaire - Termes - [Document language] (TS).docx Project glossary — file set with Terms.js. One document per published language. Naming: Naming Convention §2.1 and §2.4 glossary true
[Prefix] - Brands (TS).js Brands module — pipeline pass 1 brands false
[Prefix] - Text Highlights (TS).js Highlighted fragments — pipeline, between brands and glossary textHighlights false
[Prefix] - Variable Friendly Names (TS).js Variables module — pipeline pass 3 variableNames false
[Prefix] - HASS Entities (TS).js HASS entities module — pipeline pass 4 hassEntities false
[Prefix] - Colors (TS).js Project colours — replace those of the Kit, §6.5 colors false
[Prefix] - Document Titles (TS).js Display labels of documents by language, §6.8 documentTitles false
[Prefix] - Documentation - Cover Sheet - [Document language] (TS).docx PCL constants — linked with its .png files, one rendering per published language — Kit Prompt §6 coverSheet true
[Prefix] - Documentation - Cover Sheet - [Document language] (TS).png Cover sheet of the paper binder coverSheet true
[Prefix] - Documentation - Reading Guide - [Document language] (TS).docx Reading guide of the paper binder readingGuide true
[Prefix] - Documentation - Pipeline HTML - [Document language] (TS).docx Specification of the project HTML publication — Mandatory, except the sliver.lu landing page — Kit Prompt §16
gen-[prefix]-site.js The project’s Kit site generator, the one that requires kit_​publication.js — recommended name, a durable file, Naming Convention §3.5 — If the project publishes a site
favicon.svg, favicon.ico, apple-touch-icon.png, index-icon.svg Subsite icons, carried by the project — Kit Prompt §16; index-icon.svg under rendering.indexIcon — If the project publishes a site
assets/png/{slug}/{slug}-{section}-{n}.jpg or .png Photos linked by the documents — General Reference §13.5; the project archive carries them — If the project links photos
package.json, package-lock.json The project's own npm modules, if it uses any — never docx or adm-zip, which install in kit/ — §11 — Optional
Note:A file whose flag is false is not created. If it already exists, it stays until the user decides to delete it — Update Guide §4.4. The Node.js generators read Registry.requires at start-up and skip the matching require() calls and setters — see §6.6. Every file carries a timestamp in its name, save the exceptions named in Naming Convention §2 and §3, among them [Prefix] - Registry.js, which is itself the source of the timestamps, and [Prefix] - Settings.js. Every document also carries, before its timestamp, the tag of the language of its content — Naming Convention §2.4.

3Shared Kit dependencies

The Kit stylesheets — General, Glossary, YAML, HTML — are technical libraries shared by every project. They are never copied into a project: the Kit archive unpacks into its own folder, kit/, beside the project's, and project generators reference the stylesheets there directly with require(). A folder therefore carries a single Registry; the Kit's checks stop if they find two without a designation.

The file Kit - Registry.js is the single source of the active stylesheet versions. Projects read it to detect a Kit update; the minDocumentVersion floors it declares for General, Glossary and YAML alone decide a regeneration — §10.2. No project stores the version of a Kit stylesheet locally — at generation time the truth is always in Kit - Registry.js.

The Kit also has its own glossary, Kit - Glossaire - Termes, distinct from the project glossary. A project carries its own terms, in its own terms module: the generators load the project's, never the Kit's.

4Project Prompt

The file [Prefix] - Projet - Prompt - [Document language] (TS).docx holds the technical instructions specific to the project. It completes the Prompt — it never duplicates it. The AI reads it at the start of every working session on the project.

Values to customise: the project prefix, project.documentAuthor and project.webAuthor (the names shown in the footer of the document and of the page), project.docLanguage (FR, EN, DE or LU — default EN for consumer projects, single source of truth in the project section of [Prefix] - Registry.js), the editorial conventions of the project's field, and any narrative rules of its own.

The technical rules common to every project — formatting, session protocols, naming convention — live in the Prompt, the validation chain in Quality Control §3.13; the project prompt reproduces none of them. The project prompt holds only what differs from one project to another. When the project’s system is out of reach of the AI’s environment, it declares the exception of Kit Prompt §4.1: each script the user runs, its role and its safeguard.

5Project Registry

Every project has its own [Prefix] - Registry.js. It is the source of truth for identity, the flags of required files, family domains, the timestamps of generated documents, rendering flags, the web compilation notice, and the deployment metadata of the HTML site.

5.1Role and content

The project Registry holds the sections below. All are mandatory except rendering, compiledWith and stylesheets, which are optional. Each has its own update rule — see §5.3.

–project: identity and language of the project. The field project.docLanguage (FR, EN, DE, LU) is the single source of truth for language, read by the stylesheets for L10N selection and by the Cover Sheet renderer for the localised PCL strings. projectShareable, false by default, says whether the project is offered for reuse: at true the project archive is published under assets/downloads/ and the download icon appears. The archive itself is produced in both cases — §11. allowNonKitTemplates, false by default, closes the right to create templates outside the Kit's forms; at true, it opens it — Extending the Kit §9. The boolean flags autoAddGlossary, autoAddTextHighlights and autoAddBrands join it as well, false by default. At false, the AI reports a candidate and waits for confirmation; at true, it adds it to the module concerned and reports it at the end of the section — Kit Prompt §13.2.

–kit: version of the Kit the project requires and address of its archive, kit.downloadUrl, mandatory for every project, shared or not: the project archive does not carry the Kit — §11. kit_check_registry.py checks them. projectZip.downloadUrl exists only in the Kit's own Registry.

–requires: flags for the presence of optional files — coverSheet, readingGuide, glossary, textHighlights, documentTitles, brands, variableNames, hassEntities, colors. Read by the generators to condition require() calls and setters.

–familyDomains: a list of hostnames without scheme. Family domains whose links, and those of their sub-domains, stay captured in the Android app WebView. Any other domain is routed to the system browser. Read by style.setFamilyDomains() at the head of gen-[prefix]-site.js. A stable section — changed only when the family perimeter changes.

–documents: mapping from slug to timestamp for each generated document of the project. Updated at every document delivery — the timestamp reflects the last regeneration. A document published in several languages has one entry per variant, its slug carrying the language suffix: reading-guide-fr, reading-guide-de. Delta deployment compares by slug, so each language republishes independently. The optional key piece names the file of an appendix piece: it lives at the root of the project, the pass copies it under the site's assets/pieces/, under its original name, and the page's download button serves it in place of the document's PDF — HTML Pipeline §6.3. Two optional keys join them, written by the site generator: contentTs, the timestamp of the last change of text, and contentHash, the fingerprint of the text that produced it. A Registry without them works; the generator sets them on the first pass. The decision to produce a published document's PDF is declared here too, by the pdf key of its entry, at true — HTML Pipeline §6.2.

–rendering: flags driving the generation of outputs. The sub-section toc.generate / toc.hidden, driving the side HTML table of contents through renderDocument and getCSS. The section is optional; declaring it explicitly makes the choices legible. languageSelector is set here too — §15. homeHref gives the target of the home icon on the landing page alone, which leads out of the subsite; the home icon of a document page always returns to the index of its language, with no setting. indexIcon declares the landing illustration: a project that has placed index-icon.svg at its root declares it here, and the landing page shows the image to the left of the subtitle; absent, nothing changes. It joins the project's icons — favicon.svg, favicon.ico and apple-touch-icon.png —, all at its root. indexTarget designates the document this illustration leads to — a family or a published slug; absent, it is todos, the journal of §14, which every project holds. The variant follows the language of the index — HTML Pipeline §2.4. images declares the caps of linked photos: maxSide, the long side in pixels, and maxKilobytes, the weight in kilobytes; absent, those of kit_images.js apply, 1600 pixels and 400 KB. A photo beyond them stops the pass and names the file — HTML Reference §14.7. translationNote says whether translations carry the translation note: false, the default, and no document of the project carries it, glossary and site included, or true — Kit Prompt §17. coverDate sets the date in the cover page footer: '' for no date, 'YYYY-MM', 'YYYY-MM-DD', or 'YYYY-MM-DD - hh:mm', the default, the time of generation; Document Titles also sets it per document — §6.8.

–compiledWith: compilation notice shown in the footer of the subsite pages. An object indexed by language code, passed to the HTML stylesheet by the site generator through config.compiledWith. An absent block, null, or an empty string for a language: no notice is rendered. This field drives the web only — no .docx produced by the Kit carries a compilation notice, the General stylesheet having removed the matching L10N key.

–deploy: metadata of the HTML subsite — typically lastDeploy. Written by gen-[prefix]-site.js during a full or delta deployment. lastArchive, a mandatory key, at null as long as no archive has been produced, names the project archive produced by the last successful pass: equal to projectZip.filename and missing from its folder — the site's assets/downloads/ or the project root —, it stops the pass and is requested — §11. historicalPath, optional, designates a path of the site under which the site may be incomplete — §11, HTML Pipeline §4.

–projectZip: mandatory: every project produces its archive — version, filename and updated; downloadUrl is added in the Kit's Registry alone — a project declares the Kit's address under kit. The number rises with every archive delivered — §11. include, optional, declares the part of the project outside the Kit — §11.

–stylesheets: OPTIONAL. Versions and timestamps of the stylesheets written by the project, on the model of the section of the same name in Kit - Registry.js. Absent if the project writes none. It lists only the project's stylesheets: those of the Kit stay declared in the Kit Registry, the single source of their versions — §3. How to write one: Extending the Kit.

5.2Normative structure

Skeleton to instantiate when setting up a project. The comments recall the meaning of each section. The file carries no timestamp in its name — it is itself the source of the timestamps.

'use strict';
// ==============================
// [Préfixe] - Registry.js — Source de vérité du projet
//
// Versions stylesheet Kit utilisées : lues depuis Kit - Registry.js.
// Ce fichier projet ne duplique pas les versions Kit.
// ==============================
 
module.exports = {
 
  // ---- Identité et langue ---------------------------------
  // project.docLanguage pilote la sélection L10N des stylesheets
  // General/Glossary/HTML et les constantes PCL du Cover Sheet.
  project: {
    docLanguage: 'EN', // 'EN' (défaut consommateurs) | 'FR' | 'DE' | 'LU'
    siteLanguages: ['EN'], // langues servies par le site — FR, EN, DE, LU
    documentAuthor: 'Prénom Nom', // pied de page des .docx et PDF
    webAuthor: 'Prénom Nom', // pied des pages web — '' : site non signé
    documentSiteBase: 'https://[sous-site]', // racine des renvois entre documents
    projectShareable: false, // projet offert en reprise
    allowNonKitTemplates: false, // true : modeles hors Kit — Étendre le Kit §9
    autoAddGlossary: false, // Kit Prompt §13.2
    autoAddTextHighlights: false,
    autoAddBrands: false,
  },
 
  // ---- Kit dont depend ce projet --------------------------
  // L'archive du projet ne porte pas les fichiers du Kit.
  // Structure commune §11.
  kit: {
    version: 'X.YY',
    downloadUrl: 'https://kit.sliver.lu/assets/downloads/kit-X.YY.zip',
  },
 
  // ---- Fichiers requis — flags ----------------------------
  // Règle : si flag = false, le fichier correspondant n'est pas
  // créé — un fichier présent reste jusqu'à la décision de
  // l'utilisateur — et le générateur saute le require() + setter().
  requires: {
    coverSheet: true, // défaut true
    readingGuide: true, // défaut true
    glossary: true, // défaut true
    textHighlights: false, // défaut false
    documentTitles: false, // défaut false
    brands: false, // défaut false
    variableNames: false, // défaut false
    hassEntities: false, // défaut false
    colors: false, // défaut false
  },
 
  // ---- Domaines famille — routage hyperliens HTML ---------
  // Liens vers ces domaines (et sous-domaines) restent dans la
  // WebView de l'app Android famille. Liens externes ouvrent
  // dans le navigateur via target="_blank" rel="noopener".
  // Lu par style.setFamilyDomains() en tête de gen-[préfixe]-site.js.
  familyDomains: ['[domaine famille]'],
 
  // ---- Documents projet — timestamp dernière génération ---
  documents: {
    // 'slug-document': { ts: 'AAAA-MM-JJ - HHhMM', pdf: true },
  },
 
  // ---- Rendering — flags pilotant la génération -----------
  // Lus par les stylesheets et le generateur de site ; une section
  // absente laisse ses reglages a leur defaut — §5.1.
  rendering: {
    homeHref: null, // maison de la page d'accueil seule — Structure commune §5.1
    languageSelector: 'document', // 'document' (défaut) | 'site' — Structure commune §15
    indexIcon: false, // true : index-icon.svg s'affiche sur la page d'accueil
    indexTarget: 'todos', // document auquel mène l'illustration — Pipeline HTML §2.4
    translationNote: false, // true : note de traduction des variantes — Kit Prompt §17
    coverDate: 'YYYY-MM-DD - hh:mm', // date du pied de page de couverture — Structure commune §5.1
    images: { maxSide: 1600, maxKilobytes: 400 }, // plafonds des photos liées — Structure commune §5.1
    toc: {
      generate: true, // false -> bloc <nav class="toc"> absent du HTML
      hidden: false, // true -> CSS .toc { display: none; } injecté
    },
  },
 
  // ---- Mention de compilation — pied de page HTML ---------
  // Rendue dans le pied de page des pages du sous-site, transmise
  // par gen-[préfixe]-site.js via config.compiledWith.
  // Objet indexé par code langue. null, bloc absent ou chaîne vide
  // pour une langue : aucune mention rendue.
  // Ne concerne JAMAIS les .docx — voir §5.1.
  compiledWith: null,
  // Exemple si le projet souhaite l'afficher :
  // compiledWith: {
  // FR: 'Compilé avec Claude AI',
  // EN: 'Compiled with Claude AI',
  // DE: 'Kompiliert mit Claude AI',
  // LU: 'Kompiléiert mat Claude AI',
  // },
 
 
  // ---- Archive du projet ----------------------------------
  // Obligatoire : tout projet la produit ; projectShareable
  // ne decide que de sa publication — §11.
  projectZip: {
    version: '0.01', // monte a chaque archive livree
    filename: '[sous-site]-0.01.zip',
    updated: 'AAAA-MM-JJ', // suit le numero de version
  },
   // ---- Déploiement site HTML ------------------------------
  deploy: {
    siteName: '[sous-site]', // nomme l'archive et les pages d'index
    siteInfrastructure: 'parent', // 'parent' | 'project' | 'none' — Kit Prompt §16
    lastDeploy: null, // ISO 'AAAA-MM-JJThh:mm:ss' — écrit par le générateur
    lastArchive: null, // obligatoire ; archive produite par la derniere passe reussie — écrit par le générateur
  },
 
};
Note:The skeleton carries the project, familyDomains, rendering and compiledWith sections, which the stylesheets, the site generator and, for the language, the Cover Sheet renderer read. A missing section leaves its settings at their defaults.

5.3Lifecycle

In the project section, docLanguage is stable: it changes only when the project changes its main language, a rare and explicit case documented in the Update Guide §6. The other keys change on the user's decision, which the AI applies.

The kit section follows the Kit version the project uses — the AI updates it when absorbing a Kit update — Update Guide §4.4.

The requires section is stable over the life of the project — changed only when a functional dependency is added or removed. A project that starts documenting Home Assistant switches hassEntities from false to true and creates the matching module.

The familyDomains section is stable — changed only when the family perimeter changes.

The documents section is updated at every document delivery — the document's generator writes in the new timestamp.

The rendering section is stable — changed to set up the site: HTML table of contents, languageSelector, homeHref, indexIcon, indexTarget and the caps of linked photos — §5.1. The Registry is never edited by hand: the user asks the project's AI for the change, which makes it.

The compiledWith section is stable — it is an editorial decision of the project, not a technical state. Changing it forces no document regeneration: the value is read when the site is generated.

The deploy.lastDeploy section is written exclusively by gen-[prefix]-site.js during a deployment. No other script, and not the user, edits it by hand.

The deploy.lastArchive key is written the same way, only at the end of a successful pass: it names the project archive that pass produced or reused — §11.

The projectZip section goes up one number just before a project archive is produced, once per archive, and updated changes with it — §11.

The stylesheets section, present when the project writes its own stylesheets, follows their deliveries: a stylesheet's version and timestamp change with its file set — Extending the Kit §5.

5.4Project-owned settings — Settings.js

The project Registry carries only the blocks the Kit specifies: project, kit, requires, stylesheets, familyDomains, documents, rendering, compiledWith, projectZip, deploy. A project fills in values there; it adds neither key nor block. What belongs to it lives in a separate file, [Prefix] - Settings.js, which the Kit neither specifies nor reads.

–A file boundary, not a matter of discipline. A block of one's own lodged in the Registry forces a case-by-case judgement on whether its place is legitimate. In a separate file, a key unknown to the Registry is wrong by construction, and a check can say so without arbitrating.

–Documented in the project Prompt. Every heading of Settings.js carries there its name, its keys, the effect of each, and the effect of its absence. An undocumented key is a key lost by the next session.

–Read with a loud stop. A generator reading a setting fails, naming it, if it is missing or has the wrong type, rather than falling back on a silent default.

Note:kit_check_registry.py rejects any first-level key absent from the Kit's list. It runs before any generation — Quality Control §3. The separation holds only if something verifies it: without a check it would be a second convention, as optional as the first.
Note:A Kit update replaces the kit/ folder; it replaces neither the project Registry nor its Settings.js. The Registry receives only the migrations the user confirms, one at a time — Update Guide §4.4; Settings.js is never touched. No mechanism protects them: it is the procedure that does not replace them, which is why it enumerates what it does replace.

6Data modules

A project may hold data modules — each conditionally enabled by a flag in Registry.requires. The structural rules of each module are normative and not open to interpretation. Any divergence between an existing file and the structure below is an anomaly to fix before any generation.

This section is the single home of the data-module contract. The other Kit documents refer to it without restating it.

6.1Glossary Terms

File: [Prefix] - Glossary - Terms (TS).js. Flag Registry.requires.glossary, default true. File set with the glossary document or documents — all members share the same timestamp at every regeneration. Naming of the documents: Naming Convention §2.1 and §2.4.

The module is loaded at the head of every generator and feeds pass 2 of the pipeline — terms are rendered automatically in teal italics throughout the running text.

Fields per entry of glossaryEntries:

Field Type Required Description
balise string Yes Stable HTML anchor — _​slugify of the term in its original language, unique within the file. Language-independent and never changed once published: it identifies the concept, not the word
term string or object Yes Canonical term. A string if the glossary is monolingual, an object indexed by language code otherwise
aliases array or object No Alternative forms pointing at the same balise. An array if monolingual, an object indexed by language code otherwise
definition string or object Yes Definition in plain language, never Markdown. A string if monolingual, an object indexed by language code otherwise
rubrique number Yes Number of the glossaryRubriques section the term belongs to. A term with no section does not appear in the glossary document

A project publishing its glossary in several languages indexes term, aliases and definition by language code. The balise itself never changes: it is derived from the term in its original language and serves as a public anchor. That is what lets the language selector move from one page to another while keeping the reader's position — the German variant of a document points at the same anchor as the French one.

The two forms coexist without migration. A string means monolingual, an object means multilingual. A project switches term by term, at the moment it translates.

–Sorting by language: the alphabetical order of entries is computed on the term in the rendered language. Two languages' glossaries therefore do not share the same order, which is correct for a glossary.

–Missing field — loud failure: if a published language has no value for term or definition, the generator stops and names the offending balise. No silent fallback on the Registry language: a glossary truncated without warning is exactly the kind of damage the Kit fights.

–Translated aliases: the aliases of a language feed the pipeline's detection in the documents of that language. Without German aliases, no term turns teal in a German document — the pipeline falls silent exactly where it is expected.

–Glossary only: the optional field detection: false keeps the entry in the glossary, on paper and on the site, without feeding the detection passes — for a common word one wants to define without colouring it everywhere. buildSearchTerms leaves it out.

–Hyphenated compounds: a compound whose second part starts with a lower-case letter is recognised only if declared as an alias of the term — few-shot, an alias of Few-shot prompting in the Kit's glossary. Otherwise the boundary treats it as a file or package name, which it protects: python-docx. A second part with a capital stays a word boundary — HTML-Stylesheet.

–Aliases and common words: a term or alias does not take up a word the corpus commonly uses in another sense. The glossary pass links every occurrence: the common sense would become the term — a function signature a fingerprint, a folder a binder.

Mandatory exports: glossaryEntries, an array of objects, and buildSearchTerms(LANG), a function returning the surface and anchor pairs sorted longest-first for the requested language. A monolingual glossary may keep the historical export glossarySearchTerms. The glossary document further requires glossaryRubriques and glossaryDocument, described below: the glossary generator stops and names them when they are missing.

Skeleton to instantiate at set-up. When absorbing a Kit rule that widens the contract, it shows the form an existing module migrates to — §6.7.

'use strict';
// ==============================
// [Préfixe] - Glossary - Terms (TS).js
// Source de vérité du glossaire projet.
// Couplet avec [Préfixe] - Glossaire - Termes - [Langue du document] (TS).docx — même timestamp.
// Projet multilingue : un Glossaire par langue publiée, tous au
// même timestamp que ce fichier.
// ==============================
 
const glossaryEntries = [
 
  // --- Forme monolingue : term, aliases et definition sont
  // des chaînes. Forme historique, toujours valide.
  // {
  // term: 'Terme canonique',
  // aliases: ['alias 1', 'alias 2'],
  // balise: 'terme-canonique', // _slugify(term), unique
  // rubrique: 1, // num de glossaryRubriques
  // definition: 'Définition en langage courant, sans Markdown.',
  // },
 
  // --- Forme multilingue : term, aliases et definition sont
  // indexés par code langue. La balise reste hors langue.
  // {
  // balise: 'hallucination', // ancre publique, invariante
  // rubrique: 1,
  // term: {
  // FR: 'Hallucination',
  // DE: 'Halluzination',
  // },
  // aliases: {
  // FR: [],
  // DE: ['Konfabulation'],
  // },
  // definition: {
  // FR: 'Phénomène par lequel un modèle génère...',
  // DE: 'Phänomen, bei dem ein Modell...',
  // },
  // },
 
];
 
// Rubriques du glossaire — numéro, titre et accroche par langue.
const glossaryRubriques = [
  // { num: 1,
  // titre: { EN: 'Titre de la rubrique' },
  // accroche: { EN: 'Terme 1, Terme 2…' } },
];
 
// Identité du document glossaire et textes d’encadrement. Langue :
// celle de project.docLanguage, EN au squelette du Registry — §5.2.
const glossaryDocument = {
  projet: 'Nom du projet',
  auteur: null,
  sourceLangue: 'EN',
  nomBase: { EN: 'Glossary - Terms' }, // Convention de nommage §2.4
  textes: {
    EN: { tagline: '', ouverture: '', intro: '', fin: '', traduction: null },
  },
};
 
// Construction longest-first de la liste de recherche.
// LANG est la langue du document en cours de génération.
// Une chaine et un tableau valent pour toutes les langues — forme
// monolingue, Structure commune §6.1. Sans ce test, v[LANG] rend
// undefined sur un tableau d'alias et les alias disparaissent sans
// message.
const pick = (v, LANG) =>
  (v === undefined || v === null) ? undefined
  : (typeof v === 'string' || Array.isArray(v)) ? v
  : v[LANG];
 
function buildSearchTerms(LANG) {
  const out = [];
  glossaryEntries.forEach(e => {
    if (e.detection === false) return; // terme de glossaire seul
    const term = pick(e.term, LANG);
    if (term === undefined) {
      throw new Error(`Glossaire : terme absent en ${LANG} pour la balise ${e.balise}`);
    }
    out.push({ surface: term, anchor: e.balise });
    const al = e.aliases ? pick(e.aliases, LANG) : [];
    (al || []).forEach(a => out.push({ surface: a, anchor: e.balise }));
  });
  out.sort((a, b) => b.surface.length - a.surface.length);
  return out;
}
 
module.exports = { glossaryEntries, glossaryRubriques, glossaryDocument, buildSearchTerms };

–glossaryRubriques. The headings of the glossary: number, title and lead-in per language. Each term's rubrique field points at them. A heading title is glossary content: writing it into a generator would put it out of the author's reach and let paper and web diverge.

–glossaryDocument. The identity of the document and its framing texts: project title, indexed by language code when the glossary is published in several languages, author, authoritative language, file-name segments per project language, and per rendered language the lead-in, the opening note, the introduction, the closing note and the translation note. The artifact producing the glossary therefore knows neither the project name nor its language: it reads them here. The translation note is rendered and required only with rendering.translationNote set to true — Kit Prompt §17.

Note:The nomBase field follows Naming Convention §2.4: category and subject stay in the project language, only the final tag marks the language of the content. An English-language project produces “[Prefix] - Glossary - Terms - EN”, not “[Prefix] - Glossaire - Termes - EN”.

6.2Brands

File: [Prefix] - Brands (TS).js. Flag Registry.requires.brands, default false. File absent if the project documents no brands.

Mandatory export: brandEntries, a flat array of brand names. Rendered small caps bold through pass 1 of the pipeline throughout the running text. Recommended order: longest-first, to avoid overlaps between nested brands.

'use strict';
// ==============================
// [Préfixe] - Brands (TS).js
// Noms de marques du projet — rendus small caps bold (passe 1).
// ==============================
 
const brandEntries = [
  // 'Nom de marque 1',
  // 'Nom de marque 2',
];
 
module.exports = { brandEntries };

6.3Variable Friendly Names

File: [Prefix] - Variable Friendly Names (TS).js. Flag Registry.requires.variableNames, default false. File absent if the project documents no technical variables.

Mandatory export: variableNameEntries. Names of variables and technical parameters. Rendered in dark green italics, VARIABLE_NAME_COLOR, through pass 3 of the pipeline.

'use strict';
// ==============================
// [Préfixe] - Variable Friendly Names (TS).js
// Noms de variables techniques — italique dark green (passe 3).
// ==============================
 
const variableNameEntries = [
  // 'MA_VARIABLE',
  // 'autreNomVariable',
];
 
module.exports = { variableNameEntries };

6.4HASS Entities

File: [Prefix] - HASS Entities (TS).js. Flag Registry.requires.hassEntities, default false. File absent if the project does not document Home Assistant.

Mandatory export: hassEntityEntries. Names of Home Assistant entities. Rendered in purple italics, HASS_ENTITY_COLOR, through pass 4 of the pipeline.

'use strict';
// ==============================
// [Préfixe] - HASS Entities (TS).js
// Entités Home Assistant — rendues italique violet (passe 4).
// ==============================
 
const hassEntityEntries = [
  // 'light.[pièce]',
  // 'sensor.[mesure]_[pièce]',
];
 
module.exports = { hassEntityEntries };

6.5Colours

File: [Prefix] - Colors (TS).js, for the colours of this project. Flag Registry.requires.colors, default false. File absent if the project keeps the Kit colours.

Mandatory export: colorEntries, an object with two tables — docx for documents, html for web pages. Each table carries only the replaced keys; an absent key keeps the stylesheet default. The two tables stay separate: contrast on printed white paper is not set like contrast on a screen. The Glossary and YAML stylesheets have no table of their own: they follow the docx table, which the generator passes to them through style.getColors() — §6.6. The key names and their defaults are tabulated in General Reference and HTML Reference; Glossary Reference and YAML Reference name the keys they follow.

'use strict';
// ==============================
// [Préfixe] - Colors (TS).js
// Couleurs du projet — remplacent celles du Kit.
// ==============================
 
// Deux tables distinctes : le contraste sur fond blanc imprime ne se
// regle pas comme le contraste sur ecran.
const colorEntries = {
  docx: { HEADING_COLOR: '8B0000' },
  html: { HEADING_COLOR: '#8B0000', CODE_BG: '#FAFAFA' },
};
 
module.exports = { colorEntries };
Note:The project module stacks on the stylesheet defaults: it redefines only what it wants to change, the rest keeps its default value.

6.6Conditional call at the head of a generator

Every project generator loads the Registry at start-up and calls on each data module only if its flag is set. This pattern is the direct technical counterpart of the Registry.requires flags — a setter whose flag is off is not called.

// ---- Tête de générateur projet — chargement conditionnel ----
// Le Kit se déplie dans kit/, à côté du dossier du projet — §3.
const style = require('../kit/Kit - Stylesheet - General - Code (TS).js');
const Registry = require('./[Préfixe] - Registry.js');
 
// docx vient de la feuille, jamais d'un require du projet —
// General Reference §1.3 : deux instances donnent un document vide.
const { Document, Packer } = style.docx;
 
// Langue du document produit — celle de la variante, non celle du
// projet : une variante DE se rend avec les chaines et la detection DE.
const LANG = process.argv[2] || Registry.project.docLanguage;
 
// Langue, auteur et racine des renvois — toujours
style.setLanguage(LANG);
style.setDocumentAuthor(Registry.project.documentAuthor);
style.setDocumentSiteBase(Registry.project.documentSiteBase);
 
// Glossaire — défaut true
if (Registry.requires.glossary) {
  const g = require('./[Préfixe] - Glossary - Terms (TS).js');
  // buildSearchTerms(LANG) est le contrat — §6.1. Un module
  // qui ne l'exporte pas migre d'abord — §6.7.
  style.setGlossaryTerms(g.buildSearchTerms(LANG));
}
 
// Text Highlights — défaut false
if (Registry.requires.textHighlights) {
  const { highlightEntries } = require('./[Préfixe] - Text Highlights (TS).js');
  style.setTextHighlights(highlightEntries);
}
 
// Marques — défaut false
if (Registry.requires.brands) {
  const { brandEntries } = require('./[Préfixe] - Brands (TS).js');
  style.setBrands(brandEntries);
}
 
// Variable Friendly Names — défaut false
if (Registry.requires.variableNames) {
  const { variableNameEntries } = require('./[Préfixe] - Variable Friendly Names (TS).js');
  style.setVariableNames(variableNameEntries);
}
 
// HASS Entities — défaut false
if (Registry.requires.hassEntities) {
  const { hassEntityEntries } = require('./[Préfixe] - HASS Entities (TS).js');
  style.setHassEntities(hassEntityEntries);
}
 
// Couleurs — défaut false
if (Registry.requires.colors) {
  const { colorEntries } = require('./[Préfixe] - Colors (TS).js');
  style.setColors(colorEntries.docx);
  // Un générateur qui emploie Glossary ou YAML leur passe la
  // table active — §6.5.
  // glossStyle.setColors(style.getColors());
  // yamlStyle.setColors(style.getColors());
}
 
// Libellés de documents — défaut false
if (Registry.requires.documentTitles) {
  const t = require('./[Préfixe] - Document Titles (TS).js');
  style.setDocumentTitles(t.titleEntries, t.categoryLabels,
                        Registry.project.docLanguage);
}
Note:If a flag is false, the matching file is not created — a file already present stays until the user decides — and neither a require() nor a setter call is made for that module. The inactive pipeline passes stay silent — the text functions keep working without error for the other active passes. Under a flag set to true, kit_check_registry.py requires the timestamped module — Quality Control §3.15. The discipline is audited by kit_check_setters.py, see Quality Control §3.4.

6.7Checking protocol after a Kit injection

When the user reports a Kit injection, the AI applies this protocol to the data modules before any other work. It completes the general divergence diagnosis of the Update Guide §4.4, of which it is the module-specific form.

–Read §6 in full: the normative structure may have changed with the injected Kit.

–Check every module present: verify that all mandatory fields are there and that the exports conform to the contract of §6.1 to §6.5, §6.8 and §6.9.

–Check Glossary Terms in particular: the presence of the balise field on every entry, and of the buildSearchTerms, glossaryRubriques and glossaryDocument exports — §6.1. A project coming from an earlier Kit may carry an old format in which the balise is absent and only the historical glossarySearchTerms export exists, with termKey instead of anchor. The migration adds the balise to each entry through _slugify(term), collision-safe, and updates the exports.

–Report every divergence: in the form “Divergence found in [file]: [description]. Migration proposed: [action].”

–Wait for confirmation: no migration is applied without explicit agreement, migration by migration.

6.8Document labels module

A file name is an identifier: it does not change from one language to another. The displayed label, by contrast, follows the reader's language — on the site landing page, in a reference from one document to another, and in the subtitle of a title page. Without this module a German reader reads French titles.

File: [Prefix] - Document Titles (TS).js, driven by the requires.documentTitles flag. It exports the following tables.

–titleEntries. One entry per document, key = file name without timestamp or language suffix. Values: the subject in FR, DE, EN and LU; alias, short forms used in the corpus; aliasSection, forms that count only before a section reference — a single word, or a label that also names a project document, such as Cover Sheet; slug, identifier of the HTML page or null if the document is not published; multilingue, true if the slug carries a language suffix. The labels in a document’s language are recognised in it as references, like the aliases — General Reference §16.

–categoryLabels. The file-name categories the project uses, translated — the table of Naming Convention §5.1 made executable for that project. It serves to compose the full label of a document and the subtitle of its title page.

–sectionTitles. The divider titles of the binder, by number and language. The cover-page index and the site’s per-language index read them here, so that each language of the binder and of the site carries its own titles.

–coverHeader. The two lines of the cover banner, by language. They prevail at rendering in every language, base language included; the constants of the .docx, which carry only one version, serve only as a fallback — §8.3. The first line also gives the bar title of the landing page and of the history page; without it, deploy.siteName — Quality Control §3.19.

–The lecture field of titleEntries. The name of a document as it reads in an index — Claude AI manual —, without a leading article: in a list, an article repeated line after line tells the reader nothing and weighs the reading down. Entered by hand, language by language: a preposition cannot be derived from the subject. The binder index and the site index use it; the file name stays the technical form.

–The onlineHelp field of titleEntries. True for an online help: the instructions of a screen for its occupant, not a document that sets rules. Its translations do not carry the translation note — Kit Prompt §17. Absent: false.

–The coverDate and coverDateValue fields of titleEntries. coverDate sets, for this document, the format of the date in the cover page footer, as rendering.coverDate does for the project — §5.1. coverDateValue declares the date to show, in the chosen format — a monthly report declares 2026-09 —, and a regeneration keeps it. Only the form is checked: a date outside the format stops the generation, naming the document. Absent: the Registry setting and the timestamp of the generation. They hold for every variant of the document.

An empty value makes both the label AND the address fall back on the project language: serving a French label while pointing at a page that does not exist would be worse than not translating. The population rule: every document in the project language appears there.

A project also cites the Kit's documents. Its generator passes the Kit's table, ../kit/Kit - Document Titles (TS).js, through setKitDocumentTitles, with the Kit's site root and language read from the Kit's Registry: their references lead to the Kit's site. The project copies no Kit entry into its own table. In its text, a Kit document is designated by its full name or by its label preceded by Kit; a bare label stays with the project document that carries it — General Reference §16.

Note:The generator passes titleEntries, categoryLabels and the project language to the stylesheet through setDocumentTitles, as it does for language, glossary and colours: it composes document labels, and an empty label falls back on the project language. sectionTitles and coverHeader serve only the cover renderer and the site generator, which read the module directly. The stylesheet imports no data file.

6.9Text Highlights

[Prefix] - Text Highlights (TS).js exports highlightEntries, a flat list of fragments. Each declared fragment is rendered in italics at every occurrence, in every document of the project, without marking. Flag textHighlights, default false.

–What goes in. An entity that is one at every occurrence, other than brands and glossary terms, which have their own modules: a newspaper, an organisation, the name of an artificial-intelligence model, a third-party piece of software. A fragment cited only once in a single document does not justify an entry.

–Precedence. The pass sits after brands and before the glossary. A fragment also declared as a brand or as a glossary term, aliases included, stops the generation, which names it.

Note:The pass marks every occurrence. An emphasis whose scope depends on the sentence therefore has no place in this table: it is written at the intended spot — General Reference §5.5.

7Project glossary

The glossary document is the public face of the project glossary. It forms a file set with [Prefix] - Glossary - Terms (TS).js — both files share the same timestamp and are always regenerated together.

The glossary is always regenerated from Terms.js, never the other way round. The .docx file is a visual rendering of the .js module — any change of content, adding, removing or altering a term, goes through the .js first, and the regeneration of the .docx follows mechanically with a fresh shared timestamp.

A project publishing its glossary in several languages produces one document per language. The file set then becomes one terms module and n documents, all carrying the same timestamp and regenerated together. Adding a term, or correcting a single language, therefore forces regeneration of the whole. The naming of these documents belongs to Naming Convention §2.1 and §2.4: category and subject in the project language, language tag after the subject. This document does not restate it — a rule has a single home.

Each variant has its own entry in Registry.documents with its timestamp, so that HTML deployment republishes only the pages actually changed.

If Registry.requires.glossary is false, these files are not created; a file already present stays until the user decides — §2. The formatting pipeline works without them — no term is italicised in teal in that case.

8Project Cover Sheet

Linked files [Prefix] - Documentation - Cover Sheet - [Document language] (TS).docx and [Prefix] - Documentation - Cover Sheet - [Document language] (TS).png — PCL constants and generated cover sheet, one rendering per language, over one or more pages. Flag Registry.requires.coverSheet, default true. All these files share the same timestamp.

The PNG is produced by the Python renderer kit_render_cover_sheet.py — stateless and deterministic. Any visual change goes exclusively through the rendering sources — PCL constants of the .docx, coverHeader and sectionTitles from Document Titles —, never through the renderer code. The renderer's full contract and the inventory of every PCL constant are documented in Cover Sheet §3.

8.1Skeleton of the .docx

The file [Prefix] - Documentation - Cover Sheet - [Document language] (TS).docx holds the normative sections of the Kit model. Every project creates its own from scratch as an instance of the Kit model and customises §2 and §3 only; the other sections follow the Kit model.

Section Content Project customisation
§1 Introduction Role of the Cover Sheet — cover of the project paper binder None — follows the Kit model
§2 Binder organisation Table of the project headings — number, divider title, attached documents, Tab Full customisation — see §8.2
§3 Rendering constants Table of the rendering constants customised by the project See §8.3 — typically HEADER_​TEXT_​1 and HEADER_​TEXT_​2
§4 Multilingual rendering One rendering per published language; labels taken from Document Titles None — follows the Kit model
§5 Updating this document Rules for updating the linked files — Kit Prompt §6 and §14 None — follows the Kit model

8.2Customising §2 — the project headings

Table §2 of the project Cover Sheet lists the project's headings, not the Kit's. The number of numbered headings varies freely from project to project: each section's height follows its content, and the cover runs on over as many pages as needed, in whole sections — Cover Sheet §3. A section too tall for a whole page, or a line too long, stops the renderer, which names the fault and writes nothing.

For each heading: divider number, title, list of documents attached; the colour follows from the number — §11. The documents listed are the project's published documents — a document appears in one heading only.

Note:The list of headings and their attached documents is settled interactively when the project is set up — see Initialisation Guide §5.

8.3Customising §3 — project-specific rendering constants

Table §3 of the project Cover Sheet lists only the PCL constants the project customises. All the others — A4 at 300 dpi, colours, margins, fonts, tab positions — are inherited from Kit Cover Sheet §3 without change or duplication.

In practice the only constants systematically customised are HEADER_TEXT_1 and HEADER_TEXT_2: the two lines shown in the orange banner of the cover sheet, in the language of the .docx. Their version per language lives under coverHeader, in Document Titles — §6.8 — and prevails at rendering, base language included; the constants of the .docx serve only as a fallback. The break between them is decided when writing, not computed when rendering — the subject on the first line, its qualification on the second. A short text may fill HEADER_TEXT_1 only and leave the second empty.

Their value follows the project's typographic convention — typically sentence case or Title Case. All-caps is discouraged: it reads as a typographic shout.

Kit exception: the Kit shows “Documentation KIT” on the first line and “assisted by artificial intelligence” on the second. The acronym KIT is capitalised as a deliberate signal — the Kit is the canonical reference for every consumer project. That exception does not transfer to projects.

The renderer reads from §3 of the Cover Sheet only the two banner lines, failing Document Titles: the other constants cannot be overridden from the document. A project that would need one of them customised raises the request through a bug report — Cover Sheet §3; bug report, §13.

8.4Creation recipe

When setting up a new project, or adding the Cover Sheet to an existing one, the procedure follows the steps below.

–Create [Prefix] - Documentation - Cover Sheet - [Document language] (TS).docx from scratch as an instance of the Kit model, with a fresh timestamp.

–Take §1 Introduction, §4 Multilingual rendering and §5 Updating this document from the Kit model, with the project prefix in place of the Kit's.

–Rewrite §2 Binder organisation with the project's headings, following §8.2.

–Reduce §3 Rendering constants to the customised constants alone, typically HEADER_TEXT_1 and HEADER_TEXT_2. The other Kit constants are inherited implicitly.

–Generate the PNG rendering of each published language, over one or more pages, through kit_render_cover_sheet.py, passing the project .docx and the project Registry as arguments. The .docx lives in docx/, the PNGs at the project root, where the renderer places them and the project archive takes them. The linked files are delivered together.

Note:Any later change to the .docx of the project Cover Sheet — a new heading, an overridden PCL — regenerates all the linked files, .docx and .png, with a new shared timestamp. A change to the banner goes through coverHeader, in Document Titles: only the image is rendered again, at the same timestamp as the .docx — Kit Prompt §14.

8.5When not required

If Registry.requires.coverSheet is false, the project has no paper binder. When the flag is false, the Cover Sheet linked files are not created — a file already present stays until the user decides, §2 — and the renderer kit_render_cover_sheet.py is not called.

8.6Relation to the HTML landing page

The structure of the paper Cover Sheet and that of the project's HTML landing page are declared separately. §2 of the Cover Sheet .docx is the canonical source of the paper binder's organisation; the SECTIONS constant of gen-[prefix]-site.js is the canonical source of the web landing. No script reads one to drive the other. Whether they match is the project's choice: the Kit keeps them identical, a project may put together a lighter binder. That the two indexes differ is intended by design: the paper carries a binder in the base language, the site publishes what is read online, in every language. The look — numbered sections, spirit and reading key — is preserved in every case; the divider colours stay with the paper — §11. See HTML Pipeline §2.5 for the full rule. Any silent synchronisation of the two structures on the assumption of drift is catalogued as an anti-pattern in Quality Control §6.

8.7Project Reading Guide

Under requires.readingGuide, the project carries [Prefix] - Documentation - Reading Guide - [Document language] (TS).docx: the reading guide to its binder and its site. It is created from scratch on the model of the Kit’s Reading Guide, whose skeleton it takes over — welcome, finding your way, layout of the content, documents section by section, going further. Its sections are those of the project Cover Sheet, §8.2, in the same order. It is regenerated when a section or a document enters or leaves the binder.

9Project HTML pipeline

The file [Prefix] - Documentation - Pipeline HTML - [Document language] (TS).docx belongs to each project — it documents the publishing decisions specific to the project's subsite. It does not replace the Kit’s HTML Pipeline, which stays the source of truth for the format and the shared technical rules — HTML Pipeline §1 separates what holds in every project from what depends on the project.

Mandatory minimum content: the publishing decisions below all appear in it.

–Inventory of documents: the list of the project's documents eligible for HTML publication — one line per document.

–Greyed or not greyed flag: for each document, the decision to show the line in grey italics — listed but not linked on the landing page — or as a clickable link to its HTML page.

–With or without PDF flag: the decision to generate a published document's PDF version, and to show its icon in the document bar and on the landing page, is declared in the Registry, by the pdf key of its entry — §5.1; the project HTML Pipeline refers to it.

–Project sub-domain: root URL of the subsite, declared under project.documentSiteBase — root of the cross-references between documents. The landing page's home icon follows rendering.homeHref; a document page's returns to the index of its language — §5.1.

–Landing quote: the quotation shown on the subsite landing page. Defined verbatim in §2.4 of the project HTML Pipeline, at the same place as in Kit HTML Pipeline §2.4 for the Kit site. The project's site generator copies this text as-is into its LANDING_QUOTE constant.

–Annexes: the list of PDFs in the Annexe category, placed at the project root, each accompanied by a short Kit .docx describing its content. The piece is declared by the piece key in the Registry; the generator copies it under assets/pieces/, under its original name, and generates the .html from that .docx, whose button serves the piece. See HTML Pipeline §6.3.

–Manuals: the list of PDFs in the Manual category — original documents from the manufacturer or producer — each accompanied by a short Kit .docx describing the equipment and its use. Same pipeline mechanism as annexes.

The Kit’s HTML Pipeline supplies the format model for these sections and the shared technical rules, described in HTML Pipeline §5 for the structure of the html folder, and in HTML Reference for the mandatory external CSS — §14.12 —, assetsBase — §11.1 — and the HTML glossary conventions — §14.8. The project HTML Pipeline completes those rules with the project's own decisions.

10Dependency chain and lifecycle

10.1Main chain

The project files hang together in a strict chain of dependencies. Breaking it produces documents that are technically valid and visually wrong.

–Data modules to pipeline: Brands.js feeds setBrands and gives small caps bold in pass 1; Text Highlights.js feeds setTextHighlights and sets its fragments in italics, after the brands and before the glossary; Glossary Terms.js feeds setGlossaryTerms and gives teal italics in pass 2; Variable Friendly Names.js feeds setVariableNames and gives dark green italics in pass 3; HASS Entities.js feeds setHassEntities and gives purple italics in pass 4. URL detection, in pass 0, and document-reference detection, in pass 0.5, come before the modules; the first needs no module, the second reads Document Titles.

–Kit stylesheet to produced document: every .docx is generated by a Node.js script that require()s the active Kit stylesheet.

–PCL to PNG: the visual rendering of the cover sheet depends exclusively on its sources — PCL constants of the Cover Sheet .docx, coverHeader and sectionTitles from Document Titles —, interpreted by the Python renderer.

–PCL to landing page: coverHeader from Document Titles gives the landing page banner as it gives the cover sheet's. The tab colours stay with paper: the landing page numbers its sections in COVER_NUM_COLOR — §11.

–HTML stylesheet to CSS: getCSS() produces the file assets/kit-style.css, referenced externally by every HTML page of the subsite.

10.2Absorbing a Kit update

When the AI reports a Kit update, absorption follows the steps below, ordered by dependency. No shortcut allowed.

–Read Kit - Registry.js to obtain the active versions of General, Glossary, YAML and HTML, and the minDocumentVersion rendering floors of General, Glossary and YAML.

–Compare against its sheet's floor each version that produced a project document — the reference is the StylesheetVersion, GlossaryVersion and YamlVersion injected as a fingerprint in the project .docx. The floors alone decide: an active version newer than a document's does not force that document to be regenerated.

–Regenerate every document produced below the floor, together with the other members of its file set and a fresh shared timestamp — Update Guide §4.5. Regeneration follows the chain of §10.1.

Note:A project absorbs a Kit update as soon as it is called upon, following the procedure above. The detailed divergence-diagnosis protocol is in Update Guide §4.4; its data-module form is in §6.7.

11Governance

The rules below govern the evolution of every consumer project of the Kit. No exception is granted without an explicit instruction.

–Kit prefix reserved: the rule and its exception live in Kit Prompt §7.

–Inviolable file sets: regenerating one member entails regenerating the others with the same fresh timestamp; a change to Document Titles renders the images alone, at the timestamp of the .docx — Prompt §14. Inventory and integrity rule: Prompt §6.

–Generator from scratch: no document generator gen-*.js is reused from one session to the next. Each session starts from the active Kit stylesheet and its Reference .docx, the script rewritten in full. Stable artifacts — §12 and Quality Control §3 — are not subject to this rule: shipped with the Kit so that a project has everything it needs from the start, they change only when their logic does. gen-kit-site.js and gen-glossary-reference.js belong to them despite their prefix — Naming Convention §3.5. The project’s site generator, gen-[prefix]-site.js, is on the other hand a durable project file — §2, Naming Convention §3.5.

–PCL renderer only: any visual change to the Cover Sheet goes through the rendering sources — PCL constants of the .docx, Document Titles, Registry —, never through the renderer code. The renderer is stateless and deterministic: the same sources give the same PNG.

–Registry flags — single source: the project Prompt may reference the flags present in Registry.requires but never duplicates their value. Any other document mentioning a flag must point at the Registry as the reference.

–Subsite infrastructure: the .htaccess and the robots.txt of a subsite come from the origin the Registry declares under deploy.siteInfrastructure. No Kit generator nor a subsite’s produces them, and they never pass through a Kit site ZIP; only the sliver.lu project produces them and delivers them in its site zip. Admitted origins, expected and forbidden files: Kit Prompt §16.

–Delivery in archives: the files produced during a session are delivered as an archive, never file by file. The recipient replaces a folder instead of piecing parts together, and their backup cannot diverge from the working version.

–Archives on request: the project archive and the site archive are produced of their own accord only by the publication pass; outside it, they are requested, separately or together, and a run of corrections therefore produces none. The pass produces the site archive every time, and the project archive once per number. A project archive produced outside the pass is produced under a number no archive has yet carried, and carries a Registry already raised to the next number, with its date and changelog line: archive N carries projectZip at N+1, and the project keeps that Registry. deploy.lastArchive, which only a successful pass writes, does not name it; the raise it carries is enough for the next pass to produce N+1 and never redo N. It is produced by node ../kit/kit_publication.js --archive, run from the project folder.

–Project archive: the archive of what belongs to the project — its stylesheets, its modules, its documents, its Registry, its icons — under the name declared in the Registry at projectZip.filename. It carries a single version: the same file under two timestamps stops the pass — Kit Prompt §4.1. Every project produces it at the publication pass, shared or not: it is the archive the user keeps and gives to the next thread. projectShareable decides only its publication: at true, it is placed under assets/downloads/ of the site; at false, it is delivered at the project root, beside the site ZIP. It is composed from an allow-list: at the root, the files bearing the project prefix, its artifacts — the prefix in lower case followed by an underscore, the gen-*.js generators —, the dated session deliverables — Naming Convention §4.1 to §4.3 —, package.json, package-lock.json and the icons; the documents of the docx/ folder; the .jpg and .png photos of assets/png/, which the documents link. Any other file is left out, and the pass names it. The archive of a number already produced is taken over, never remade: one number, one content. Already produced means named by Registry.deploy.lastArchive, which only a successful pass writes: the archive is produced under a provisional name and takes its own only at the end of the pass, just before the Registry is written. Taken over, it is compared with the project, the Registry without its deploy block; a project changed since stops the pass, which asks for projectZip to be raised. Missing at the start of a pass while Registry.deploy.lastArchive names it, it is requested: the pass stops without producing another. A project's site generator does not compose it itself: it requires kit_publication.js, which carries the allow-list, the number guard, the setting aside of the site and the end of the pass, and calls verifierDepart(), controlerDocuments() and demarrer() at the start, copierIcones() and copierPieces() next, preparerConversion() before the conversion of each document and imageDeMarqueur() during its walk, controlerAncres() on the converted body of each document, before renderDocument, copierImagesLiees(), controlerCiblesDeLiens() and controlerLiensDuSite() after the last page, etatDuSite() for the About page of each language, and terminer() at the end — Quality Control §3.19. kit_check_setters.py --html checks it.

–Part outside the Kit: a project part of which is not produced by the Kit — an editorial site, its corpus, its scripts — declares it under projectZip.include, a list of paths relative to the project root, files or folders. It enters the archive, folders whole, hidden files excluded: without it, the archive would not rebuild the site — Publishing and reuse §8. A path that is missing, outside the project, or that designates the site, kit/, fonts/, node_modules/, docx/, an archive or a Kit file stops the pass, naming it. The declared part is compared like the rest on takeover: a data folder that changes between two passes makes the archive differ from the tree, and the next pass stops, asking for projectZip to be raised. The number then follows the data, not only the code: a project that declares a living corpus raises projectZip before each Kit publication pass that follows a change to the corpus. A generator outside the Kit, which does not call kit_publication.js, is not subject to this.

–Never the files of the Kit: a project's archive does not carry the Kit. An embedded copy ages with the Kit's next delivery, and two sources then coexist at the recipient's. The project declares in the Registry, under kit, the version it requires and the address where to take it; failing a reachable address, the Kit is requested in the thread. Taking the project over therefore unpacks the project, then the Kit. The Kit is the exception to its own rule for its own files: excluding them would empty its archive. The fonts folder, however, never travels, the Kit included: the cover renderer's typeface is not redistributable, and the Kit's archive is publicly downloadable. The delivered archive is therefore not the whole Kit, and what it lacks matters: without the three faces the rendering loads, the renderer stops and names the ones that are missing. Whoever takes the project over supplies them from their own system, which presupposes a Windows or macOS workstation. The folder carries a fourth face, the bold italic, that nothing loads: the family is kept complete there for later use, and its absence prevents no rendering. Placed in the Kit's fonts/ folder — kit/fonts/ seen from a project —, they let the cover render anywhere, the assistant's working stretch included: the user attaches the files from their own system to the thread, and the AI places them there — Quality Control §3.14. When a sub-project needs them, the AI interrupts its work and asks the user to supply them; it never works around their absence.

–npm modules: the Kit's package.json, in kit/, declares the modules of the chain, docx and adm-zip, under the caret rule — the major version, and the minor one as long as the version starts with 0; package-lock.json pins the exact versions. They are installed fresh in kit/, with npm install, never by copying a node_modules. A project generator does not require docx: it takes it from the stylesheet, style.docx — General Reference §1.3; the project folder and the Kit's would otherwise give two instances, and the document would come out empty. A project that uses modules of its own declares them in its package.json, never docx or adm-zip.

–Version number: it goes up with every archive delivered, text corrections included: two archives bearing the same number with different content leave the sub-projects impossible to decipher. It goes up only once per archive, just before that archive is produced: successive changes without a publication pass consume only one. A pass that finds the project changed under a number already produced stops and asks for it to be raised. The second figure follows these deliveries; the first follows Naming Convention §6. A delivery that requires a migration reports it in the Update Guide §4.4, never through the number. Each increase is recorded in the Registry changelog, with its reason, and the date projectZip.updated changes with it. An archive produced outside the pass also carries the next raise — Archives on request.

–Site archive: it carries the whole site, always. The kind of pass — full or incremental — governs what is regenerated, never what the archive contains: a partial archive unpacked onto a complete folder takes away everything that was not in it. The pass stops if the site folder does not carry one page per published document. Sole exception, deploy.historicalPath: under this path, the site may be incomplete. What is present there is zipped and checked normally, anchors included; a missing target goes to the record instead of stopping the pass, and the site is deployed by extraction, never by replacement — HTML Pipeline §4.

–Naming of archives: a delivered archive carries a fresh timestamp, and its name follows the pattern of its family — Naming Convention §4.5, which tabulates the cases. The project archive is the exception: its name comes from Registry.projectZip.filename and carries a version number, because the user keeps it from one session to the next and, when shared, it is a published address — the site's link changes only with that number.

–Identical index structure: a project's documentation presents itself like the Kit's — index by headings, each document in HTML, and in PDF where the Registry declares it — §5.1 —, language icons on documents that have variants, download icon for the project archive. The only deviation admitted concerns the theme colours — bar, headings, links, landing page background — through the colours module. The tab colours, derived in a cycle from the section number, belong to paper: there they tell the binder's dividers apart. The landing page does not carry them — a section number is written there in COVER_NUM_COLOR, a single colour for the whole site, settable per project like the bar's; undeclared, it follows the bar, mixed with 60 % white — HTML Reference §20.

–Project journal: every project keeps a journal of open entries, debts and dated decisions. Structure and content in §14. It is the only document of the project allowed to carry a history; the changelogs at the head of code files and of the Registry are exempt — §14.

12Project stable executable artifacts

A consumer project may produce its own stable executable artifacts: scripts reused session after session, living in the project's working tree, distinct from the ad hoc generators recreated every session. The Kit carries similar ones for itself, such as kit_check_couplets.py.

12.1Naming convention

Unix snake_case nomenclature. Project prefix in lower case followed by an underscore, name in snake_case, no timestamp in the name. A formal exception to Naming Convention §2, documented in Naming Convention §3.3. The Kit's artifacts give the form, such as kit_check_couplets.py; the project puts in its prefix. Criterion: a stable executable artifact — Python, Node.js CLI, shell. Any other file follows the main pattern.

12.2Role

The roles are those of the Kit's artifacts, defined in Quality Control §3. If the project need fits none of these roles, it is probably an ad hoc generator rather than a stable artifact — use the gen- prefix and Naming Convention §3.5.

12.3Lifecycle

The project's stable artifact lives permanently in the project's working tree, unlike the Kit's stable artifacts, which live in kit/. It is regenerated only when its logic changes. Its evolution is tracked in a dated changelog at the head of the file itself, like that of the kit_ tools — Naming Convention §6. No external tracking document is imposed — the standard Unix convention applies. The artifact carries no timestamp in its name.

12.4Creation recipe

When a project identifies a recurring need that would warrant a stable artifact, the session creating it follows the steps below.

–Confirm with the user that the need is genuinely recurring and not a one-off.

–Name the file according to §12.1.

–Write the self-contained script, keeping external dependencies to a minimum.

–Document the dependencies in the file header.

–Document the usage contract in the docstring: inputs, outputs, return codes, example calls.

–Initialise the changelog block at the head of the file.

–Deliver it validated, in the archive of the session's files — Prompt §9.

12.5Later evolution

When a stable artifact must evolve, whether for a bug or an extension, the session is dedicated to it. The source is read directly from the project's working tree. The change is entered in the dated changelog at the head of the file, with its date and a description — Naming Convention §6. Then the standard sequential production: validation, then delivery in an archive — Prompt §9.

Note:A stable artifact belongs to the complete project delivery, on the same footing as the documents and the stylesheets. An archive omitting it would not allow a restart from nothing, and the gap would show only when restoring.

13Kit bug report

A consumer project may meet a Kit behaviour that deserves reporting: unexpected rendering of a stylesheet function, divergence between the .js code and its Reference .docx, an anti-pattern not yet catalogued, a validator false positive. The structured reporting channel is a short dedicated document, produced by the project and delivered to the Kit project chat for analysis and correction.

13.1Purpose and triggers

The Kit bug report is produced when the consumer project detects a Kit behaviour that cannot be resolved locally in the project. Prompt §5.3 applies: a local workaround never replaces a fix at the source. If the root cause is in the Kit, it is the Kit that must fix it.

Typical triggers are the following.

–Stylesheet bug: a stylesheet function does not render as documented in its Reference .docx — divergence between runtime behaviour and contract. Example: the badly named bgColor parameter of sectionBanner, corrected to accentColor.

–Pipeline bug: a pipeline step produces an inconsistent or silently truncated result. Example: a site generator that does not call the data setters of the HTML stylesheet produces a site with neither brands nor glossary links.

–Uncatalogued anti-pattern: a recurring error found in the project that would warrant an entry in Quality Control §6 and, ideally, an automatic check in Layer 2.

13.2Nomenclature

The bug report follows the standard pattern of Naming Convention §2.1: [Prefix] - Projet - Kit bug report - [Document language] (TS).docx. The Projet category, open to the Kit prefix as to a project's — Naming Convention §7 —, takes the form of the project's language — Naming Convention §5.1. The subject “Kit bug report” stays in English in every language — a stable technical name in the sense of §5.2 of the Convention.

The file is generated by the consumer project through a gen-kit-bug-report.js script written from scratch, like any project document — formatting engine the Kit General stylesheet active at the time of writing, the validation chain of Quality Control §3.13 as the output check.

13.3Structure of the document

Mandatory sections, in this order. Short by construction: a bug report describes, reproduces and proposes. Detailed validation and correction follow in the Kit session.

The bug report borrows from the document of record — Kit Prompt §12 — its discipline of observation: it reports on an existing defect and smooths nothing over. It adds what a record forbids itself, a suggested, non-binding diagnosis in §4; its structure is fixed here.

–§1 Identification: project prefix, date of observation, project.docLanguage, the Kit stylesheet versions active when the bug appeared — read from Kit - Registry.js, since the project Registry does not carry them, and copied as-is — and the documents or pipelines involved.

–§2 Observation: observed behaviour and expected behaviour, in two short paragraphs. Describes factually what happened, without interpretation.

–§3 Reproduction: minimal extract from the gen-*.js, or the command that triggers the bug, as a rawBlock, plus the exact sequence executed. Precise enough for the AI on the Kit side to reproduce it in session without further questions.

–§4 Impact and suggested diagnosis: which documents or pipelines are affected and how severely. The project's hypothesis on the root cause, not binding: the AI on the Kit side redoes the full analysis. State whether a local workaround exists or not.

13.4Reporting workflow

Once the bug report is generated and validated on the project side, reporting happens by depositing the source files together in the Kit project thread. The Kit project has access only to what is attached in the chat — not to the working tree of the consumer projects.

–The bug report .docx: the main file, source file in the thread. A text extract is insufficient for the canonical content of a .docx.

–The offending gen-*.js: the project generator that triggers the bug, or a minimal extract — as text in the chat, or as an attached .js file.

–The resulting .docx: if the bug produces a badly rendered .docx, attach the source file for inspection — table count, w:tbl, custom properties.

–Any screenshots: Word, LibreOffice or browser captures if the bug is visual — attached as images.

Note:The bug report is read at the start of the Kit session as a brief. The AI on the Kit side matches it against the active rules, identifies the layer concerned, proposes a correction plan, and waits for the explicit go before any generation. The standard sequential production cycle then follows.

13.5Non-permanence

The bug report is an ephemeral file: produced, delivered, archived once resolved. It does not appear in the inventory of §2, which is kept for the permanent project files that survive between sessions. The trace of the resolution lives elsewhere: an entry in the Todos on the Kit side, possibly an update to a Kit document.

Note:Retention on the project side: the user's free choice. No mandatory storage in the working tree — the bug report has done its work as soon as the Kit fix is delivered and the project has absorbed the new version of the file set concerned, following §10.2.

14Project journal

Every project keeps a journal. It carries what remains to be done and the dated trace of what was decided — that is what makes it possible, months later, to find out why something was done this way rather than another.

It is named [Prefix] - Projet - Todos, as the inventory of §2 requires, and is modelled on Kit - Projet - Todos, which is the reference copy. On a multilingual site — rendering.languageSelector set to site — it is translated into every language of the site, like any published page; the landing page illustration leads to it — HTML Pipeline §2.4. Its sections, in this order.

–§1 Open bugs. What is broken and unrepaired. One entry per defect, with what it produces and what it prevents. The section carries its date, so that an empty section reads as a dated observation.

–§2 Work in progress. What needs a decision before it can be done, or work whose scope exceeds one session. An entry names what is blocking, not what one wishes for.

–§3 Technical debts. What works and is known to be imperfect. A debt that bothers no one today is still a debt: it is recorded with the reason for not clearing it now.

–§4 Register of resolutions. A two-column table: the number, then the entry — title, date and content in sequence. Numbering is continuous and never reused; the most recent entry comes first, and a new entry is entered under the table header. Each entry says what was decided and why, with the versions delivered. A dated entry is not rewritten in substance — decision, fact, figure: its correction goes into a new entry, which cites the one it corrects, and the corrected entry stays as it is. Names of the user’s other projects and of their sites are replaced in it by a placeholder, without touching the substance — Kit Prompt §4.1. Form is corrected in place — typo, accent, typography —, as are the translated variants, the base language alone being authoritative — Prompt §17.

–§5 Notices, optional. Leads recorded for the record, neither bugs nor debts: nothing in them is pending or has a deadline, and their presence calls for no reminder.

Note:What is recorded: structural decisions. A change of form, a rule set or withdrawn, a defect fixed, an arbitration settled. What is not recorded: generation passes, publications, data updates — they leave their trace in the timestamps, not in the journal.
Note:The journal is the only document of the project allowed to carry a history. The others describe a state; if they also carried their own past, a reader would no longer know which of the two is authoritative. The changelog blocks at the head of code files and of the Registry are the exception: they follow the file they describe, not the project's decisions.

15Language selection

A fully multilingual site and a site of which only some documents are translated do not have the same need. The Kit offers both mechanisms; the project declares which it uses, under rendering.languageSelector.

Mode What it assumes Where the selector appears
site Every published page exists in every declared language Menu at the end of the bar, identical on every page
document Nothing; only some documents are translated Icons at document level, where variants exist
Note:The default is document: it assumes nothing about the project. Missing it breaks nothing and shows on the first page opened — the generator also announces the mode at every pass. A loud stop is reserved for defects that do not show.
Note:In site mode, an untranslated document would make the menu appear and disappear from page to page, and it would stop being a landmark. A project that publishes monolingual documents uses document mode.

–What the project provides. The list of each page's variants — language code and address. The Kit provides the two mechanisms, their localised labels and their flags.

16Base language and translations

The project declares its base language under project.docLanguage. Documents written in that language are the reference: a rule, a correction or a decision is written there first, and work is done from them, by people and AI alike.

Translations are a service to the reader. They render the sense so as to read like a text written in their own language, never word for word. Nothing is lost or added; file names, code and section numbers stay as they are.

Each variant carries, at the top of its §1, the fixed note from Kit Prompt §17, with the project's base language, when rendering.translationNote is true; regeneration sets or removes it. A translation is updated with its reference document, in the same delivery — Kit Prompt §17 —, from the map of that document, and its skeleton is checked with kit_check_ossature.py.

Full doctrine: Kit Prompt §17.