---
tags: [pkm, maintenance]
type: note
univers: PRO
title: Contrôles de cohérence PKM
date: 2026-10-30
---

# Contrôles de cohérence PKM

Requêtes à rejouer (revue hebdo — cf. §10 de [[00_INBOX/Pro/PKM_Univers-Domaines-Projets_20261030]]). Exécution via `eval_lua` (skill `silverbullet-mcp`).

## 1. Projets incomplets (sans domain / univers / title), hors archives

```lua
query[[
  from p = index.pages()
  where p.type == "project"
    and not string.find(p.name, "90_ARCHIVES/", 1, true)
    and (not p.domain or not p.univers or not p.title)
  order by p.name
]]
```

## 2. Domaines hors format (univers manquant ou code ne commençant pas par PRO-/AMM-/PERSO-)

```lua
query[[
  from p = index.pages()
  where p.type == "domain"
    and (not p.univers or not string.match(p.name, "^(PRO|AMM|PERSO)%-"))
]]
```

## 3. Procédures : nature process sans tag procedure ni code PROC-

```lua
query[[
  from p = index.pages()
  where p.nature == "process"
    and (not p.tags or not table.includes(p.tags, "procedure"))
    and not string.find(p.name, "PROC%-", 1, true)
  select p.name
]]
```

## 4. Tâches en retard (date dépassée)

```lua
query[[
  from t = index.tasks()
  where not t.done and t.date and t.date <= os.date("%Y-%m-%d")
  order by t.date
  limit 15
]]
```

## 5. Anciens vocabulaires (grep local sur l'espace)

```bash
grep -rn --include='*.md' '\[\[02_PROJETS' <espace>          # liens ancien chemin
grep -rn --include='*.md' -E '^area:' <espace>               # ancien champ (hors archives historiques)
grep -rn --include='*.md' -E '^domain: \[\[' <espace>        # domain non guillemeté
grep -rn --include='*.md' -E '^type: projet' <espace>        # type FR (doit être project)
```

## 6. Dette connue — `TaskManager` (32 pages d'archives)

La fonction `TaskManager` n'existe plus dans l'espace (0 définition). Les **33 pages hors archives** ont été migrées en `template.each` + `index.tasks()` (2026-10-31, 132 blocs). Restent **32 fichiers sous `90_ARCHIVES/`** : leurs blocs s'affichent en texte brut. À migrer d'un même mouvement si une page archivée est rouverte.

```bash
grep -rlF -e '${TaskManager(' -e '{TaskManager(' --include='*.md' <espace>/90_ARCHIVES
```

## Rappels

- **rename_note ne met PAS à jour les liens du frontmatter** (constaté 2026-10-30) : après un déplacement en masse, balayer les anciens chemins (sed + API /.fs).
- `domain` toujours **guillemeté** : `domain: "[[PRO-XXX]]"`.
- Archives : `90_ARCHIVES/CLOS/<U>/` = projets clos (`status: closed`) ; `90_ARCHIVES/ABSORBES/<U>/` = pages absorbées par un domaine (`status: archived`).
