feat: Athena OS Фаза 2 — generic chezmoi-канон Мозга

chezmoi-source (чистая пересборка, не дамп 1.2 ГБ):
- dot_claude: CLAUDE.md лин-роутер, AGENTS.md.tmpl (VPS вычищен),
  settings.json.tmpl (deny-щит 20 + security-guard hook), rules
  (structure + ECC 21 язык), 30 generic ECC-агентов, health-check
- dot_codex: symlink-паритет; dot_agents: registry 13 скриптов
  HOME-генерик + методология docs
- плагины: plugins.manifest + bootstrap Слой 1b (marketplace+install)
- launchd: health.plist (PATH-фикс 127) + session-reaper.example
- smoke++: secret-токен guard + канон-проверки (зелёный)
- 0 hard личных данных; cut личного (kb/references/gsd/owner) → Ф4
This commit is contained in:
Зарубин Филипп
2026-06-15 16:59:09 +03:00
parent 25a7005f5d
commit f219b1fc67
188 changed files with 16165 additions and 5 deletions
@@ -0,0 +1,24 @@
// PostToolUse hook (matcher: Skill). Appends one line per skill invocation.
// Fast, side-effect-only, never throws into the harness. harness=codex.
// Mirrors usage_hook.js (claude) — same log file, same format.
let d = "";
const t = setTimeout(() => process.exit(0), 10000);
process.stdin.setEncoding("utf8");
process.stdin.on("data", (c) => (d += c));
process.stdin.on("end", () => {
clearTimeout(t);
try {
const i = JSON.parse(d || "{}");
if (i.tool_name !== "Skill") return;
const ti = i.tool_input || {};
const sk = ti.skill || ti.command || "";
if (!sk) return;
const fs = require("fs");
const os = require("os");
const logPath = require("path").join(os.homedir(), ".agents/registry/usage.log");
const line = new Date().toISOString() + "\tcodex\t" + sk + "\n";
fs.appendFileSync(logPath, line);
} catch (e) {
/* never break the tool pipeline */
}
});