From 5f8c105d230de9c2c7d3686ca10ea23f63de67b1 Mon Sep 17 00:00:00 2001 From: opus Date: Wed, 22 Apr 2026 04:12:02 +0200 Subject: [PATCH] feat(doctrine-108-wevia-self-awareness): wiki doctrine 108 - SEO regex tightened + new self_meta tool index 0 priority max + script externe /opt/weval-l99/wevia-self-meta.sh - tests 5 phrasings all OK self meta tools meta stats wevia registry count tools count - registry now 376 tools (added self_meta) - root cause fixes documented - NonReg 153/153 invariant --- wiki/doctrine-108-wevia-self-awareness.md | 58 +++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 wiki/doctrine-108-wevia-self-awareness.md diff --git a/wiki/doctrine-108-wevia-self-awareness.md b/wiki/doctrine-108-wevia-self-awareness.md new file mode 100644 index 000000000..360fa0ffe --- /dev/null +++ b/wiki/doctrine-108-wevia-self-awareness.md @@ -0,0 +1,58 @@ +# Doctrine 108 - WEVIA Master Self-Awareness + +## Date 22 avril 2026 + +## Objectif +WEVIA Master doit pouvoir repondre a "qui es tu", "tools count", "stats wevia" etc avec donnees reelles live. + +## Root cause fixees + +### Bug 1: toolhub_count Python broken cmd +- Avant: `python3 -c "import json;print(len(json.load(open(\'/var/www/html/api/wevia-tool-registry.json\')).get(\'tools\',[]))),\'tools\')"` +- Probleme: parenthese en trop unmatched + path inexistant +- Apres: `jq -r '\"TOOLHUB v\" + .v + \" count=\" + (.count|tostring) + \" tools_array=\" + (.tools|length|tostring)' /opt/wevia-brain/wevia-tool-registry.json` +- Tag: v22avr-self-meta-fix-toolhub-count + +### Bug 2: SEO regex too greedy +- Avant: `kw=seo|title|meta` capturait toute mention de "meta" -> SEO timeout +- Apres: `kw=seo[\s_-]?check|seo[\s_-]?audit|meta[\s_-]?tag|meta[\s_-]?desc|title[\s_-]?tag|seo[\s_-]?score` +- Plus de friendly fire avec self_meta, tools meta etc. + +### Bug 3: self_meta n'existait pas comme tool dedie +- Ajout new tool `self_meta` au top du registry (index 0 = priorite max) +- kw: `self[\s_-]?meta|tool[s]?[\s_-]?meta|tools[\s_-]?count|stats[\s_-]?(?:wevia|master|tools|brain)|registry[\s_-]?count|capabilities[\s_-]?count|combien.*outil|combien.*tool` +- cmd: `bash /opt/weval-l99/wevia-self-meta.sh` (script externe pour eviter escape hell) + +## Output self_meta typique + +``` +=== WEVIA MASTER SELF_META === +Tool registry: v7.4 count=376 tools_array=376 +Priority intents NL: 1003 lines +Brain knowledge JSONs: 31 +Top-IA scripts: 43 +Plugins dirs: 3 +DeerFlow Python scripts: 40022 +Doctrines wiki: 11 +Active WEVIA crons: 6 + +=== ARCHITECTURE === +S204 nginx PHP-FPM dual-pool, S95 PMTA email PostgreSQL, 0eur month all sovereign +Pipeline: nl-priority(80) -> pareto -> fast-path-v3 -> opus-intents(66) -> conv-guard -> arena -> dynamic-resolver -> wave200 -> gap-intents -> master-router -> LLM +``` + +## Tests passes +- self meta -> self_meta tool fired OK +- tools meta -> self_meta OK +- stats wevia -> self_meta OK +- registry count -> self_meta OK +- tools count -> self_meta OK +- seo check -> seo (correct, pas confondu avec self) +- meta tag check -> seo (correct) + +## Doctrines liees +- 4 honnetete (vraies donnees live, pas hardcodees) +- 13 cause racine (regex SEO trop greedy + Python broken cmd) +- 16 NonReg invariant 153/153 +- 60 UX premium (response structuree avec sections) +- 107 Tests E2E