dbaf0e0e76
Three brain-governance hardening changes from retro #8 follow-up:
1. enforce-classifier-match: confidence threshold raised 0.7→0.8 (was producing false-positives on borderline LLM recommendations like #3 GitHub MCP for local debug, #36 adr-kit for status readouts). 2 new vitest tests cover boundary values 0.7 and 0.75 (now allowed).
2. enforce-chain-recommendation (NEW): PreToolUse hook blocking mutating tool calls when router gave recommended_chain length >= 2 and controller is not expanding it. Allows pass when: any chain node already invoked, inline 'chain-override: <reason>' present, or global override-phrase in user prompt. 20 vitest tests cover empty chain, single-node bypass, override variants, alias resolution, mixed numeric/string ids.
3. registry-load.test.mjs: bump expected counts 85→86 nodes / 77→78 active (collateral fix after parallel session added #86 graphifyy in 06ee5ad3).
Full vitest tools-sweep: 1022/1022 GREEN.
Reviewer APPROVE on spec compliance + code quality (non-blocking observations: test count mis-report in implementer's claim 33→20 actual, hardcoded 'superpowers:' alias prefix, no direct test for extractCalledSkillIds — deferred).
Hook activation in .claude/settings.json deferred — controller will register separately based on owner's choice (block / warn-only / defer).
6.6 KiB
6.6 KiB
Brain Status (auto-generated)
Last updated: 2026-05-28T01:50:18.743Z
| Контролёр | Состояние | Детали |
|---|---|---|
| C1 L1-watcher | ✅ | [l1-watcher] OK — 0 drift |
| C2 Cross-ref consistency | ✅ | [cross-ref-checker] OK — 0 drift in 4 files |
| C3 Observer-of-observer | ✅ | [observer-of-observer] OK — last read 0 week(s) ago |
| C4 Сигнальный статус | ✅ | This file (self-reference) |
| C5 Observer-coverage | ⚠️ | 706 episode(s) this month · Stop-hook + post-commit OK · 20 missed activation(s) — see /brain-retro |
| C6 Chain map sync | ✅ | [chain-map-checker] OK — 16 chains in sync |
Метрики (информационные, не алерты)
- Observer evidence: 706 episodes this month, 0 observer_error markers, 158 PII matches before filter
- Legacy v1 episodes (not in factor analysis): 567
- Last /brain-retro: 0 day(s) ago
- Использование узлов: см.
/brain-retro(раз в спринт). missed_activations: 20. Неиспользованные узлы — не алерт, если профильной задачи не было (Pravila §16.4 v1.36; capability-readiness; см. memoryfeedback_brain_unused_tools_not_problem— outside-repo memory store).
Метрики дисциплины
Baseline дисциплины роутера (этап 2 router discipline overhaul, spec 2026-05-23). Цель — увидеть «точку До» перед enforcement-хуком этапа 3.
| Тип задачи | Эпизодов | % с триггер-матчем | % через скил |
|---|---|---|---|
| analysis | 28 | 32.1% | 14.3% |
| bugfix | 20 | 20.0% | 25.0% |
| planning | 17 | 17.6% | 17.6% |
| feature | 16 | 12.5% | 0.0% |
| cleanup | 7 | 0.0% | 0.0% |
| refactor | 1 | 0.0% | 0.0% |
Router step distribution: 1: 301, 2: 263, 3: 71, 5: 63
Boundaries applied (ADR / границы): 85 of 698 эпизодов (12.2%).
Активные многоэтапные проекты
- Router discipline overhaul (spec)
- Этап 1 (машиночитаемый реестр) ✅ закрыт 2026-05-23 —
docs/registry/nodes.yaml(83 узла + 16 chains L1-L16),tools/registry-load.mjs+tools/registry-render.mjs(16 тестов), auto-render Tooling §4.0 + routing-off-phase, lefthook job 17 (warn-only). - Этап 2 (измерения + классификатор-парсер) ✅ закрыт 2026-05-24 + влит в main 2026-05-24 — discipline-metrics (3 среза), brain-retro-analyzer переключён на реестр, STATUS.md блок «Метрики дисциплины», baseline snapshot
docs/observer/baselines/2026-05-24-pre-enforcement.md. Plan:docs/superpowers/plans/2026-05-24-router-overhaul-stage-2-measurements.md. - Этап 3 (принуждение — хук на routing) — Phase A+B (классификатор + 3 хука: router-prehook/tool-gate/stop-gate в
.claude/settings.json) ✅ + влит в main 2026-05-24. Гейт работает в режимеwarn-only(только stderr-предупреждения, никакой блокировки). Bug-fixbec69aa5:deriveRouterStepвtools/discipline-metrics.mjs— шаг роутера теперь выводится из наблюдаемых признаков (был захардкоженной константой 1). Follow-up 3 fixes 2026-05-24 (после ANTHROPIC_API_KEY + рестарта CC выявлены при инспекции state): (a) UTF-8 stdin helpertools/router-stdin-helper.mjsчерезStringDecoder+ подключение к 3 хукам (русский в state-файл и Anthropic API без mojibake); (b)tools/observer-state-enricher.mjs— pure helper для чтенияrouter-state-<session>.json; (c)parseTranscriptобогащениеprimary_rationale4 полями (recommended_nodeoverride +recommended_chain+chain_progress+chain_completed). 538 tools-тестов GREEN. Plan:docs/superpowers/plans/2026-05-24-router-stage3-three-fixes.md. CHECKPOINT B: дать warn-only накопить реальные наблюдения с починенным сторожем (план говорит «минимум 24 часа»), затем Task 9 — переключение вenforce+ 2 новых метрики (domain-hit-rate / chain-completion). Plan:docs/superpowers/plans/2026-05-24-router-overhaul-stage-3-enforcement.md. - Этап 4 (уборка устаревших правил, deprecation
observer-classification-map.json→ удаление) — не начат.
- Этап 1 (машиночитаемый реестр) ✅ закрыт 2026-05-23 —
Длинные сессии
Ни одной сессии с >50 ходов сегодня (UTC). ✅
Стоимость месяца
| Компонент | Токены (in/out) | USD |
|---|---|---|
| Classifier (Sonnet 4.6) | 7050/69610 | $1.07 |
| Self-assessment (Sonnet 4.6) | 0/0 | $0.00 |
| Reviewer (Opus 4.7 + fallback) | 0/0 | $0.00 |
| Итого | $1.07 |
Аномалии классификатора
Аномалий нет.
Авто-ретроспектива
Last self-retrospect: never ⚠️ (609 эпизодов с последнего запуска, порог 10) Episodes since last run: 609 / threshold: 10
Reviewer: субагент vs fallback
0 эпизодов проверено из 706.
Reviewer findings
Проверено: 339 эпизодов. 51 actionable (wrong_skill + wrong_chain_order).
error_root_cause
| cause | count |
|---|---|
| n/a | 261 |
| wrong_skill | 41 |
| external_failure | 23 |
| wrong_chain_order | 10 |
| wrong_tool | 4 |
Топ alternative_better
| recommended | count |
|---|---|
| #19 | 16 |
| #25 | 15 |
| #34 | 8 |
| #18 | 6 |
| #33 | 3 |
node_quality
| judgment | count |
|---|---|
| disputable | 191 |
| correct | 113 |
| wrong_node | 31 |
| underkill | 2 |
| overkill | 2 |
Использование override-фраз
⚠️ Превышен порог override-использования сегодня (≥5/день)
| Фраза | За всё время | За сегодня |
|---|---|---|
recovery |
273 | 0 |
ремонт инфраструктуры |
181 | 22 ⚠️ |
срочно |
82 | 0 |
без скилов |
58 | 0 |
memory dump |
8 | 0 |
direct ok |
6 | 0 |
быстрый коммит |
3 | 0 |
Алерт-индикаторы
✅ — норма ・ ⚠️ — внимание ・ 🔴 — действие требуется ・ ⚪ — не запускалось