25 lines
1.3 KiB
PHP
25 lines
1.3 KiB
PHP
<?php
|
|
// WEVIA Doctrine Injector — ~330 tokens au lieu de 1740
|
|
// Generated: 2026-04-14 17:43
|
|
// Auto-loaded by wevia-autonomous.php for system prompt optimization
|
|
|
|
function get_doctrine_digest() {
|
|
static $cache = null;
|
|
if ($cache !== null) return $cache;
|
|
|
|
// Try vault API first
|
|
$r = @file_get_contents('http://127.0.0.1:8443/api/wevia-vault.php?action=read&file=doctrines/000-DIGEST-COMPACT.md');
|
|
if ($r) {
|
|
$d = json_decode($r, true);
|
|
if (!empty($d['content'])) { $cache = $d['content']; return $cache; }
|
|
}
|
|
|
|
// Fallback hardcoded compact digest (~200 tokens)
|
|
$cache = "DOCTRINES: souverainete(0eur,12providers,multi-vendor) | dual-pool-fpm(fast50w-8s,exec50w-30s) | redis-async(LPUSH->worker->sovereign:4000) | gold-backup(avant-modif,jamais-supprimer) | zero-regression(nonreg-avant-apres,enrichir-jamais-ecraser) | honnetete(jamais-mentir-exagerer) | sequence(GOLD->git->mockup->validation) | strike-rule(2x-meme-pb=STOP-root-cause) | NEVER: start-ollama|pay-IA|single-vendor|shell_exec-LLM-from-FPM|modify-ports.conf|delete-GOLD|deploy-sans-nonreg";
|
|
return $cache;
|
|
}
|
|
|
|
function get_compact_context() {
|
|
return "S204:8cpu/32gb/load<1|tools:372|sovereign:12/13-0eur|ethica:131K|nonreg:152/152|wiki:1214|docker:8+redis|fpm:dual50+50|git:auto-push";
|
|
}
|