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:
98
agent-memory/README.md
Normal file
98
agent-memory/README.md
Normal file
@@ -0,0 +1,98 @@
|
||||
---
|
||||
name: agent-memory
|
||||
type: reference
|
||||
context_tier: cold
|
||||
---
|
||||
|
||||
# agent-memory/ — Couche L3a : mémoire privée des agents
|
||||
|
||||
> ADR de référence : ADR-012 (modèle de contexte L3a/L3b/L0)
|
||||
> Northstar : ADR-011 (autonomie brain)
|
||||
> Créé : 2026-03-16 — patch(l3a) shadow-sql
|
||||
|
||||
---
|
||||
|
||||
## Qu'est-ce que L3a
|
||||
|
||||
```
|
||||
L0 agents/<agent>.md ← graduation maximale — spec enrichie (kernel)
|
||||
L3b toolkit/<domaine>/ ← patterns promus, validés en prod, partagés
|
||||
L3a agent-memory/<agent>/ ← accumulation privée, non encore validée
|
||||
```
|
||||
|
||||
L3a est la couche d'accumulation **privée** d'un agent sur ses projets réels.
|
||||
Ce qu'il observe, tente, mesure — avant que ce soit assez solide pour entrer dans toolkit (L3b).
|
||||
|
||||
**Règle fondamentale :** brain-engine ne touche jamais aux `.md` de L3a.
|
||||
Les `.md` restent souverains. SQLite (BE-1) indexera L3a — il n'en sera pas la source.
|
||||
|
||||
---
|
||||
|
||||
## Structure
|
||||
|
||||
```
|
||||
agent-memory/
|
||||
├── README.md ← ce fichier
|
||||
├── _template/
|
||||
│ ├── kpi.yml.example ← template KPI par stack
|
||||
│ └── observations.md.example ← template observations session
|
||||
└── <agent>/
|
||||
└── <projet>/
|
||||
├── kpi.yml ← KPIs mesurés (alimenté par metabolism-scribe)
|
||||
├── observations.md ← patterns tentés, résultats, notes de session
|
||||
└── validated.md ← patterns validés ≥ N fois (prêts graduation L3b)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Cycle de vie
|
||||
|
||||
```
|
||||
Session close (scope = <projet>) :
|
||||
metabolism-scribe → écrit/update agent-memory/<agent>/<projet>/kpi.yml
|
||||
metabolism-scribe → append agent-memory/<agent>/<projet>/observations.md
|
||||
|
||||
kpi_score stable + validations ≥ 3 :
|
||||
metabolism-scribe → signal toolkit-scribe
|
||||
toolkit-scribe → promotion L3b (toolkit/<domaine>/)
|
||||
kpi.yml → graduated: true
|
||||
|
||||
L3b consensus inter-projets (≥ 2 projets) :
|
||||
toolkit-scribe → signal scribe
|
||||
scribe → enrichissement L0 (agents/<agent>.md)
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Règle TTL
|
||||
|
||||
Un répertoire `agent-memory/<agent>/<projet>/` sans mise à jour depuis > 90 sessions
|
||||
est candidate à l'archivage. Signal : `agent-review` lors de l'audit périodique.
|
||||
|
||||
Jamais supprimé automatiquement — décision humaine requise.
|
||||
L'historique est précieux même après graduation.
|
||||
|
||||
---
|
||||
|
||||
## Agents propriétaires
|
||||
|
||||
| Qui écrit | Quoi | Quand |
|
||||
|-----------|------|-------|
|
||||
| `metabolism-scribe` | `kpi.yml` + `observations.md` | Session close sur un projet |
|
||||
| `toolkit-scribe` | `validated.md` → promotion L3b | Seuil KPI atteint |
|
||||
| `agent-review` | Audit TTL + graduation | Audit périodique |
|
||||
|
||||
**Jamais :** un agent métier n'écrit directement dans `agent-memory/` (scribe pattern).
|
||||
|
||||
---
|
||||
|
||||
## Lien avec BE-1 (SQLite)
|
||||
|
||||
BE-1 ingère `agent-memory/` en lecture seule :
|
||||
```sql
|
||||
-- Table agent_memory alimentée depuis les kpi.yml
|
||||
agent_memory(agent, projet, stack, pattern_id, validations, kpi_score, graduated, updated_at)
|
||||
```
|
||||
|
||||
La migration BE-1 parsera les `kpi.yml` existants.
|
||||
Les `.yml` restent la source de vérité. SQLite = index queryable.
|
||||
23
agent-memory/_template/kpi.yml.example
Normal file
23
agent-memory/_template/kpi.yml.example
Normal file
@@ -0,0 +1,23 @@
|
||||
# kpi.yml — Template L3a par agent × projet
|
||||
# Copier vers : agent-memory/<agent>/<projet>/kpi.yml
|
||||
# Propriétaire : metabolism-scribe (mise à jour en fin de session)
|
||||
|
||||
agent: <nom-agent> # ex: tech-lead, debug, vps
|
||||
projet: <slug-projet> # ex: superoauth, tetardpg, originsdigital
|
||||
stack: <stack-principale> # ex: node-express-jwt, nestjs-postgres, docker-apache
|
||||
|
||||
# ── KPIs par pattern ──────────────────────────────────────────────────────────
|
||||
patterns:
|
||||
- pattern_id: <slug-pattern> # ex: jwt-tenant-isolation, docker-healthcheck
|
||||
validations: 0 # incrémenté par metabolism-scribe à chaque session validée
|
||||
kpi_score: 0.0 # 0.0 → 1.0 — calculé : validations / seuil_graduation
|
||||
graduated: false # true quand kpi_score stable + validations >= seuil
|
||||
seuil_graduation: 3 # configurable par stack (défaut : 3)
|
||||
last_validated: null # YYYY-MM-DD
|
||||
notes: ""
|
||||
|
||||
# ── Métadonnées ───────────────────────────────────────────────────────────────
|
||||
created_at: <YYYY-MM-DD>
|
||||
updated_at: <YYYY-MM-DD>
|
||||
sessions_count: 0 # nombre de sessions sur ce projet avec cet agent
|
||||
graduated_patterns: 0 # compteur patterns graduées → L3b
|
||||
28
agent-memory/_template/observations.md.example
Normal file
28
agent-memory/_template/observations.md.example
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
agent: <nom-agent>
|
||||
projet: <slug-projet>
|
||||
---
|
||||
|
||||
# Observations L3a — <agent> × <projet>
|
||||
|
||||
> Alimenté par `metabolism-scribe` en fin de session.
|
||||
> Lecture : agent en session courante (contexte L3a).
|
||||
> Graduation : `validated.md` → signal `toolkit-scribe` quand kpi_score >= seuil.
|
||||
|
||||
---
|
||||
|
||||
<!-- Template d'entrée — une entrée par session significative -->
|
||||
|
||||
## YYYY-MM-DD — sess-<id>
|
||||
|
||||
**Pattern tenté :** <description courte>
|
||||
|
||||
**Contexte :** <pourquoi ce pattern dans ce projet>
|
||||
|
||||
**Résultat :**
|
||||
- ✅ Validé / ⚠️ Partiel / ❌ Rejeté
|
||||
- <observation concrète — 1-2 lignes>
|
||||
|
||||
**KPI impact :** +<N> validation(s) sur `<pattern_id>`
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user