fix(template): v1.0 distribution-ready — dépersonnalisation complète

- Étape 1 : 14 agents — "Tetardtek" → "l'owner" (francophone neutre)
- Étape 2 : ADRs 006/007/022 — domaines → <OWNER_DOMAIN> placeholder
- Étape 3 : README, ARCHITECTURE, profil/architecture, orchestration-patterns
- Étape 4 : contexts/ ajouté — 9 sessions génériques (navigate, work, pilote…)
- Étape 5 : agent-memory/ ajouté — README + _template/
- Étape 7 : DISTRIBUTION_CHECKLIST.md — guide maintenance future

Vérification : grep tetardtek → 0 résultats (hors bsi-schema.md exemples)
This commit is contained in:
2026-03-18 22:27:36 +01:00
parent 090fb24642
commit 0f4d610b11
36 changed files with 752 additions and 42 deletions

View File

@@ -0,0 +1,54 @@
# session-audit.yml — Contexte BHP pour sessions d'audit
# Trigger : "brain boot mode audit[/<project>]"
# Cible : ~25% contexte max au boot
# IMPORTANT : mode lecture seule — aucun agent write actif
session_type: audit
description: "Session d'audit — lecture seule, analyse sécurité/qualité, rapport"
tier_required: pro # audit = agents security + code-review (pro minimum)
# CONSTRAINT : audit = read-only
# Aucune écriture en claims satellite, aucun agent write (scribe, todo-scribe, migration)
# Le claim principal reste ouvert mais marque write_lock: true
write_lock: true # Signal au pre-flight : rejeter tout write satellite
# L0 — Invariant (~5%)
L0:
- PATHS.md
- brain-compose.local.yml
- KERNEL.md
# L1 — Session type (~15%)
L1:
- now.md # état dernière session — contexte pré-audit
- focus.md # projets actifs — savoir quoi auditer
- BRAIN-INDEX.md # vue globale claims + signaux
- agents/security.md # failles, JWT, OAuth, OWASP # tier: pro
- agents/code-review.md # qualité, patterns, dette technique # tier: pro
- agents/audit.md # agent audit si disponible # tier: pro
# L2 — Project scope (~10%) — prioritaire en audit : contexte complet du projet cible
L2:
template: "projets/{project}.md"
extras:
- "todo/{project}.md"
fallback: null # BRAIN-INDEX.md déjà en L1
# L3 — On demand
# Exemples : agents/vps.md (infra audit), agents/mail.md (DNS/SMTP audit),
# wiki détaillé, config réseau, logs
L3:
hint: "Charger à la demande : vps, mail/DNS, monitoring, logs, wiki technique"
# --- Règle audit ---
# Rapport final obligatoire avant close — même format que code-review.
# write_lock bloqué en pre-flight pour tous les agents write.
# Exception : écriture du rapport lui-même dans un fichier dédié est autorisée.
# --- Métriques cibles ---
context_target:
L0: "~5%"
L1: "~12%"
L2: "~8%"
total_boot: "~25%"

View File

@@ -0,0 +1,51 @@
# session-brainstorm.yml — Contexte BHP pour sessions de brainstorm
# Trigger : "brain boot mode brainstorm[/<project>]"
# Cible : ~22% contexte max au boot
session_type: brainstorm
description: "Session d'idéation — explorer, challenger, structurer avant de coder"
tier_required: free # agents fondamentaux — disponible pour tous les tiers
# L0 — Invariant (~5%)
L0:
- PATHS.md
- brain-compose.local.yml
- KERNEL.md
# L1 — Session type (~8%) — tier free
L1:
- now.md # bridge session précédente — fils ouverts
- focus.md # direction actuelle
- todo/README.md # index intentions (warm — todo/brain.md sur demande)
- agents/coach-boot.md # boot-summary — challenger les idées (free)
- wiki/patterns.md # patterns connus pour ne pas réinventer
# L1_pro — coach complet pour brainstorm architectural profond
L1_pro:
- agents/coach.md # coach complet byTask — challenger + gate décisions
# L2 — Project scope (~8%) — optionnel si brainstorm sur un projet spécifique
L2:
template: "projets/{project}.md"
extras:
- "todo/{project}.md"
- "todo/brain.md" # 1932 lignes — on demand uniquement, pas au boot
- "wiki/concepts.md"
fallback: null
# L3 — On demand
# Exemples : wiki/* détaillé, autres projets pour cross-pollination,
# agents/game-designer.md, agents/doc.md
L3:
hint: "Charger à la demande : wiki détaillé, cross-project, agents spécialisés idéation"
# --- Règle brainstorm-before-build ---
# Ce manifest applique le pattern : identifier 2-3 décisions structurelles AVANT de coder.
# wiki/patterns.md en L1 pour que ce réflexe soit présent dès le boot.
# --- Métriques cibles ---
context_target:
L0: "~5%"
L1: "~12%"
L2: "~8%"
total_boot: "~22%"

View File

@@ -0,0 +1,46 @@
# session-coach.yml — Contexte BHP pour sessions de coaching
# Trigger : "brain boot mode coach"
# Cible : ~20% contexte max au boot
session_type: coach
description: "Session coaching — progression, réflexion, cap stratégique, clarté"
tier_required: pro # coaching complet (coach.md 365 lignes) = feature pro
# L0 — Invariant (~5%)
L0:
- PATHS.md
- brain-compose.local.yml
- KERNEL.md
# L1 — Session type (~15%)
L1:
- now.md # bridge session précédente — contexte pour le coach
- agents/coach.md # présence permanente coaching
- metabolism/README.md # état métabolique + énergie
- profil/collaboration.md # règles de travail, préférences
- BRAIN-INDEX.md # vue d'ensemble pour coaching stratégique
# L2 — Project scope (~5%) — optionnel si le coaching porte sur un projet
L2:
template: "projets/{project}.md"
extras:
- "todo/{project}.md"
fallback:
- focus.md # si pas de projet déclaré → focus global
# L3 — On demand
# Exemples : progression/ détaillée, wiki/patterns.md, sessions passées
L3:
hint: "Charger à la demande : progression détaillée, sessions passées, wiki/patterns"
# --- Note coaching ---
# Le coach est L1 permanent — même sans signal "coach", il est disponible.
# session-coach = le coach PREND LE DESSUS sur les autres dimensions.
# focus.md en L2 fallback car contexte coaching global fréquent.
# --- Métriques cibles ---
context_target:
L0: "~5%"
L1: "~12%"
L2: "~5%"
total_boot: "~20%"

View File

@@ -0,0 +1,43 @@
# session-debug.yml — Contexte BHP pour sessions de debug
# Trigger : "brain boot mode debug[/<project>[/<file>]]"
# Cible : ~12% contexte max au boot
session_type: debug
description: "Session de debug ciblé — bug, crash, comportement inattendu"
tier_required: free # debug = agent fondamental — disponible pour tous les tiers
# L0 — Invariant (~5%)
L0:
- PATHS.md
- brain-compose.local.yml
- KERNEL.md
# L1 — Session type (~7%) — ultra chirurgical sur le debug
L1:
- agents/debug.md # agent principal debug
# L2 — Project scope — fichier cible si déclaré dans le signal
# Signal : "debug/<project>/<file>" → charger le fichier + projet
L2:
template: "projets/{project}.md"
extras:
- "{file}" # fichier cible si déclaré
- "todo/{project}.md" # todos projet pour contexte
fallback: null
# L3 — On demand
# Exemples : agents/testing.md, agents/security.md, logs, config spécifique
# Note : agents/testing.md chargé automatiquement si debug implique des tests
L3:
hint: "Charger à la demande : testing, security, logs, agents métier, wiki"
# --- Règle debug ---
# Un signal debug/project/file = on charge uniquement le fichier concerné.
# Pas de focus.md, pas de metabolism — contexte minimal pour aller au problème vite.
# --- Métriques cibles ---
context_target:
L0: "~5%"
L1: "~5%"
L2: "~5%"
total_boot: "~12%"

View File

@@ -0,0 +1,71 @@
# session-edit-brain.yml — Contexte BHP pour modifications kernel
# Trigger : "brain boot sudo" ou "brain boot mode edit-brain"
# Objectif : modifications kernel autorisées — avec gates explicites
# Cible : ~25% contexte max au boot
session_type: edit-brain
description: "Modifications kernel — KERNEL.md, CLAUDE.md, agents/, profil/. Gate humain obligatoire avant chaque write."
tier_required: full # kernel write = zone owner uniquement — kerneluser: true requis (full = owner)
# --- Gates obligatoires ---
# Avant toute modification kernel :
# 1. Lire le fichier cible (brain-guardian enforce)
# 2. Décrire la modification et son impact
# 3. Confirmation humaine explicite
# 4. Écrire la modification
# 5. Relire le fichier après modification
# 6. Entrée changelog si fichier kernel absolu (KERNEL.md, CLAUDE.md, brain-constitution.md)
#
# Fichiers kernel absolu (protection maximale) :
# KERNEL.md, CLAUDE.md, brain-constitution.md, bsi-spec.md
# → Gate humain + confirmation + changelog obligatoire
#
# Fichiers kernel fort (agents/, profil/) :
# → Gate humain + confirmation
# → Changelog recommandé si changement structurel
# L0 — Invariant (~5%)
L0:
- PATHS.md
- brain-compose.local.yml
- KERNEL.md
# L1 — Session type (~18%)
L1:
- now.md # bridge session précédente
- agents/brain-guardian.md # auto-méfiance structurelle — OBLIGATOIRE en edit-brain
- agents/coach-boot.md # garde comportemental — observe les décisions kernel
- BRAIN-INDEX.md # état global claims + signaux
- focus.md # direction actuelle — contexte des modifications
# L1_pro — coach complet pour décisions architecturales kernel
L1_pro:
- agents/coach.md # coach complet — gate sur décisions structurantes kernel
# L2 — Kernel scope (~5%) — fichiers cibles si déclarés dans le signal
L2:
template: null
extras:
- brain-constitution.md # si modification identité / Layer 0
- profil/bsi-spec.md # si modification protocole BSI
fallback: null
# L3 — On demand
# scripts/kernel-lock-gen.sh (après modification kernel), profil/decisions/ (ADR),
# wiki/, agents spécifiques
L3:
hint: "kernel-lock-gen après modification, ADR si décision structurante, wiki/, scripts/"
# --- Règle post-modification ---
# Après toute modification kernel absolu :
# → scripts/kernel-lock-gen.sh — régénérer kernel.lock
# → commit type: kernel: (contrat) ou feat: (capacité)
# → entrée changelog dans le fichier modifié
# → now.md mis à jour avant fermeture session
# --- Métriques cibles ---
context_target:
L0: "~5%"
L1: "~15%"
L2: "~5%"
total_boot: "~25%"

View File

@@ -0,0 +1,50 @@
# session-kernel.yml — Contexte BHP pour lecture kernel
# Trigger : "brain boot mode kernel"
# Objectif : lire, comprendre, auditer le kernel — JAMAIS écrire
# Cible : ~20% contexte max au boot
session_type: kernel
description: "Lecture seule kernel — audit, compréhension, diagnostic. Toute écriture → session-edit-brain."
tier_required: full # kernel = zone owner uniquement — kerneluser: true requis (full = owner)
write_lock: true # Signal absolu — aucune écriture kernel autorisée dans cette session
# Tentative write kernel → refus immédiat + redirection session-edit-brain
# L0 — Invariant (~5%)
L0:
- PATHS.md
- brain-compose.local.yml
- KERNEL.md
# L1 — Session type (~15%)
L1:
- now.md # bridge session précédente
- agents/brain-guardian.md # auto-méfiance structurelle — assertions prouvées uniquement
- agents/coach-boot.md # présence légère — observation
- BRAIN-INDEX.md # état global pour contexte kernel
# L2 — Kernel scope (~8%) — fichiers kernel à auditer
L2:
template: null
extras:
- brain-constitution.md # identité + protocoles Layer 0
- profil/bsi-spec.md # spec BSI complète si audit claims
fallback: null
# L3 — On demand
# agents/audit.md, scripts/, profil/decisions/, wiki/
L3:
hint: "Charger à la demande : audit, scripts, decisions/, wiki/, profil/ détaillé"
# --- Règle absolue ---
# session-kernel = LECTURE SEULE. Zéro exception.
# Toute décision de modification kernel → fermer cette session
# → rouvrir avec : brain boot sudo (session-edit-brain)
# Cette règle est non-négociable. brain-guardian enforcer.
# --- Métriques cibles ---
context_target:
L0: "~5%"
L1: "~10%"
L2: "~5%"
total_boot: "~20%"

View File

@@ -0,0 +1,43 @@
# session-navigate.yml — Contexte BHP pour sessions navigate
# Trigger : "brain boot navigate" ou "brain boot mode navigate"
# Objectif : fenêtre de journée légère, tenue à travers les compactions
# Cible : ~18% contexte max au boot
session_type: navigate
description: "Session navigate — conscience temporelle + orientation journée. Coach en boot-summary uniquement."
tier_required: free
# L0 — Invariant (~4%)
L0:
- PATHS.md
- brain-compose.local.yml
- KERNEL.md
# L1 — Session type (~12%)
# Coach : boot-summary uniquement — pas le fichier complet (~3000 tokens économisés)
L1:
- now.md # bridge session précédente — état, fix en attente, décisions (G-1)
- agents/coach-boot.md # garde comportemental + boot-summary (G-2)
- agents/time-anchor.md # passerelle temporelle + fallback post-compaction
- focus.md # projets actifs + prochaine frontière
- BRAIN-INDEX.md # claims actifs + signaux
- todo/README.md # index intentions (warm — fichiers projet sur demande)
# L2 — Project scope (~2%) — déclenché si project déclaré dans le signal
L2:
template: "projets/{project}.md"
extras: []
fallback: null
# L3 — On demand
# workspace/live-states.md si besoin de voir les sessions parallèles (G-3)
# coach.md complet, projets/<X>.md, workspace/sprints/, progression/
L3:
hint: "workspace/live-states.md, coach complet, projets/<X>.md, workspace/sprints/, progression/"
# --- Métriques cibles ---
context_target:
L0: "~4%"
L1: "~12%"
L2: "~2%"
total_boot: "~18%"

View File

@@ -0,0 +1,61 @@
# session-pilote.yml — Contexte BHP pour sessions Mode Pilote
# Trigger : "brain boot mode pilote"
# Cible : FULL — contexte maximal (ADR-035)
# "On vole ensemble. Tu tiens le manche. Je gère les instruments."
session_type: pilote
description: "Co-construction longue durée — humain décide les forks, brain copilote actif"
tier_required: owner # FULL context = owner uniquement
# L0 — Invariant (~5%) — TOUJOURS chargé
L0:
- PATHS.md
- brain-compose.local.yml
- KERNEL.md
# L1 — Session type (~15%) — présence complète
L1:
- now.md # bridge session précédente
- focus.md # focus actuel, todos prioritaires
- agents/coach.md # coach complet — observe et anticipe
- agents/helloWorld.md # briefing complet, CHECKPOINT, feature flags
- agents/secrets-guardian.md # gardien MYSECRETS — permanent
- metabolism/README.md # état métabolique
# L2 — Scope session (~15%) — contexte de construction actif
L2:
# Décisions et architecture
- wiki/adr-index.md # index ADRs — navigation décisionnelle rapide
- agents/code-review.md # validation avant tout commit kernel
- agents/security.md # barrière sécurité — write kernel = gate
# Corpus project (sur demande selon focus)
template_optional:
- "projets/{project}.md"
- "todo/{project}.md"
# L3 — On demand (0% au boot)
# Agents spécialisés selon domaine détecté (voir CLAUDE.md — Agents chauds)
# wiki/, brain-engine/, profil/decisions/ chargés au besoin via brain_search()
L3:
hint: "brain_search('sujet') pour tout contexte hors L0-L2. MCP > fichier direct en mode Pilote."
# --- Comportement mode Pilote (ADR-035) ---
pilot_mode:
initiative: haute # propose, anticipe, signale les forks
gates: architecturaux # stoppe et remonte sur forks irréversibles
write: "all zones" # autorisé partout selon zone
parallelization: true # tâches indépendantes sans demande permission
doc_realtime: true # ADR, wiki, vocabulary — documenté en session, pas en fin
# --- Métriques cibles ---
context_target:
L0: "~5%"
L1: "~15%"
L2: "~15%"
total_boot: "~35%"
note: "Reste ~65% libre pour co-construction en session — contexte maximal assumé"
# --- Référence ---
adr: ADR-035
empirical_reference: "session 2026-03-18 — référence empirique mode Pilote"

48
contexts/session-work.yml Normal file
View File

@@ -0,0 +1,48 @@
# session-work.yml — Contexte BHP pour sessions de travail projet
# Trigger : "brain boot mode work[/<project>]"
# Cible : ~28% contexte max au boot
session_type: work
description: "Session de développement sur un projet actif"
tier_required: free # tier free = agents fondamentaux; pro = + code-review + security
# L0 — Invariant (~5%) — TOUJOURS chargé, non négociable
L0:
- PATHS.md
- brain-compose.local.yml
- KERNEL.md
# L1 — Session type (~10%) — tier free — déterministe, même signal = même chargement
L1:
- now.md # bridge session précédente
- focus.md # focus actuel, todos prioritaires
- agents/coach.md # coach complet byTask — observe le projet en cours
- agents/debug.md # bug, crash, comportement inattendu
- metabolism/README.md # état métabolique, énergie session
# L1_pro — Session type (~5%) — chargé uniquement si tier: pro déclaré
# Pas de code-review ni security pour tier free — chargement explicite sur demande sinon
L1_pro:
- agents/code-review.md # qualité code, PR, validation
- agents/security.md # failles, JWT, OAuth, OWASP
# L2 — Project scope (~10%) — conditionnel sur project déclaré dans le signal
# Clé : projet déclaré → projets/<project>.md + todo/<project>.md
L2:
template: "projets/{project}.md"
extras:
- "todo/{project}.md"
fallback: null # absent si pas de projet déclaré
# L3 — On demand (0% au boot) — tout le reste
# Exemples : agents/testing.md, agents/refacto.md, agents/migration.md,
# wiki/, progression/, autres projets, agents spécialisés métier
L3:
hint: "Charger à la demande : testing, refacto, migration, infra, i18n, doc"
# --- Métriques cibles ---
context_target:
L0: "~5%"
L1: "~15%"
L2: "~8%"
total_boot: "~28%"