From bcdda41df44b96cd8b66712b95c25dd6eea8e151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9?= Date: Thu, 21 May 2026 09:00:30 +0300 Subject: [PATCH] =?UTF-8?q?docs(adr):=20ADR-011=20amendment=20=E2=80=94=20?= =?UTF-8?q?conditional=20missed-activation=20rule?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 (1M context) --- cspell-words.txt | 1 + docs/adr/ADR-011-brain-governance.md | 33 ++++++++++++++++++++++++++++ docs/observer/STATUS.md | 4 ++-- 3 files changed, 36 insertions(+), 2 deletions(-) diff --git a/cspell-words.txt b/cspell-words.txt index f459a738..b17a1169 100644 --- a/cspell-words.txt +++ b/cspell-words.txt @@ -1588,3 +1588,4 @@ lemed батч ретраит шеринге +unactivated diff --git a/docs/adr/ADR-011-brain-governance.md b/docs/adr/ADR-011-brain-governance.md index 1ba6d3a5..7f80baa9 100644 --- a/docs/adr/ADR-011-brain-governance.md +++ b/docs/adr/ADR-011-brain-governance.md @@ -100,3 +100,36 @@ The observer episode is extended to `schema_version: 2` so a real factor analysi - Pravila §12 / §14 / §15 (hard-floor for router procedure step 1) - PSR_v1 R15 (off-phase routing extends to brain governance) - memory: `feedback_brain_unused_tools_not_problem.md`, `project_brain_governance_design.md` + +## Amendment 2026-05-21: Conditional missed-activation rule (§16.4 v1.36) + +The original §16.4 stated unconditionally that an unused node is not a problem. Real-world episodes show this is too permissive: when a profile-classified task (e.g. `refactor`) runs with `node_chosen === 'direct'` and a relevant non-dormant node exists in Tooling Прил.Н, the absence of activation IS a signal (router miss, not a problem in the node itself). + +The rule now reads: + +- **Unused + no profile task** → still not an alert (capability-readiness). +- **Unused + profile task present** → "missed activation", surfaced in STATUS.md C5 and `/brain-retro`. Not a commit block. + +**Mapping artefacts:** + +- `tools/observer-classification-map.json` — manual mapping `classification → recommended_node_ids[]` (single source of truth). 10 classification buckets, populated from the real `tools/observer-transcript-parser.mjs` `classifyTask` dictionary (bugfix / cleanup / feature / memory-sync / monitoring / other / planning / question / refactor / analysis). +- `tools/.node-dormancy.json` — generated from Прил.Н by `tools/extract-node-dormancy.mjs` (pre-commit job `extract-node-dormancy` in `lefthook.yml`). Uses a **two-signal** availability check: `dormant: true` in the 9-attribute row OR keyword `DEFERRED` in the boundaries column. Both signals normalize to the same JSON value, so consumers don't distinguish "permanent dormant" (#17) from "deferred-pending" (#44 / #50 / #54 / #67) — they're all "cannot activate right now". +- `tools/missed-activations.mjs` — pure deterministic matcher. Exports `detectMissedActivations(episodes, classificationMap, dormancy)`. No fs, no exec. + +**Detection threshold:** single episode (per user decision 2026-05-21). No smoothing; every qualifying episode counts. + +**DEFERRED exclusion:** nodes flagged as unavailable in `.node-dormancy.json` are filtered before counting. Current dormant set: #1 (replaced), #17 (pg_partman, native-Windows), #44 (Figma MCP, no Figma account), #50 (Jupyter MCP, no Python ML env), #54 (n8n-mcp, n8n not in stack), #67 (NightOwl, pending Б-1 / Linux). + +**Surfacing:** + +- C5 `observer-coverage-checker` includes `missed.totalMissed` in its return value; the CLI emits `WARN — missed activations: N (see /brain-retro)` when N > 0. +- `status-md-generator` renders `missed_activations: N` in the metrics block; C5 row turns ⚠️ when N > 0. +- `/brain-retro` `analyze(episodes, { classificationMap, dormancy })` returns `missedActivations: { totalMissed, byNode, byClassification }` — the retro skill renders a per-node + per-classification breakdown. + +**Initial measurement on May 2026 episodes:** 16 missed activations, dominated by memory-sync × 7 (CLAUDE.md edits without `#33 claude-md-management` chosen) and feature × 4 (no Superpowers brainstorming invocation). This is the kind of "router miss" signal the rule is designed to surface, not a problem in the unactivated nodes themselves. + +**Linkage:** + +- Pravila §16.4 v1.36 (2026-05-21). +- Plan: `docs/superpowers/plans/2026-05-21-observer-missed-activations.md`. +- Spec / decision rationale: this amendment. diff --git a/docs/observer/STATUS.md b/docs/observer/STATUS.md index 19b6ad0e..7d186806 100644 --- a/docs/observer/STATUS.md +++ b/docs/observer/STATUS.md @@ -1,11 +1,11 @@ # Brain Status (auto-generated) -Last updated: 2026-05-21T05:38:32.436Z +Last updated: 2026-05-21T05:43:18.617Z | Контролёр | Состояние | Детали | |---|---|---| | C1 L1-watcher | ✅ | [l1-watcher] OK — 0 drift | -| C2 Cross-ref consistency | ✅ | [cross-ref-checker] OK — 0 drift in 4 files | +| C2 Cross-ref consistency | 🔴 | Update cross-refs in offending files. | | C3 Observer-of-observer | ✅ | [observer-of-observer] OK — last read 0 week(s) ago | | C4 Сигнальный статус | ✅ | This file (self-reference) | | C5 Observer-coverage | ⚠️ | 39 episode(s) this month · .git/hooks/post-commit not installed (run: npx lefthook install --force) · 16 missed activation(s) — see /brain-retro |