[CL-CTRL-PLANE-SELF-HEAL-PH2] Self-heal Phase 2 — 8 new healers + trust-verify subagents detect #9

Merged
andrei merged 1 commit from feature/claude-self-heal-phase2-20260518 into master 2026-05-18 14:22:40 +00:00
Owner

Что сделано

  • 8 новых healers под scripts/self-heal/healers/ (hooks/wiring, hooks/json-output, skills/frontmatter, skills/truncation, mcp/connectivity, mcp/env-vars, cli/availability, cli/path)
  • 8 TDD test files (22 individual cases, RED→GREEN cycle)
  • registry.json: 2 → 10 healers, all enabled
  • fastMode: hooks/syntax, hooks/wiring, cli/path (SessionStart-safe)
  • severityFix=high для hooks/syntax + hooks/wiring (auto-restore из mirror)
  • severityFix=[] для остальных (advisory; auto-fix небезопасен для skills/MCP/CLI)
  • Bundled (auto-sync): trust-verify-enforcer.js — detect orchestrator parent session с активными subagents/ (другой agent fix)

Зачем

CEO directive 2026-05-18: каждый хук/скил/инструмент должен делать самопроверку и самофиксы. Phase 1 в dc50dec9 доставил framework + 2 reference healers. Phase 2 покрывает оставшиеся subsystems.

План тестирования

  • 13 test suites / 44 individual tests: GREEN
  • Live orchestrator dry-run на real .claude/: 9/10 ok, 88 advisory findings в skills/frontmatter (plugin cache, by design не auto-fix)
  • node --check на 13 healer .js: OK
  • registry.json валиден (10 healers enabled)
  • claude-doctor --full: 0 failures, 0 warnings
  • Mirror sync: diff empty

Где могу ошибаться

  • 88 skills/frontmatter findings — advisory only (чужие plugin SKILL.md, опасно auto-fix)
  • mcp/connectivity не auto-reconnect (OAuth/token rotation небезопасны в SessionStart hook)
  • cli/availability/path в тест среде 0 issues — может найти drift на другом PC
## Что сделано - 8 новых healers под `scripts/self-heal/healers/` (hooks/wiring, hooks/json-output, skills/frontmatter, skills/truncation, mcp/connectivity, mcp/env-vars, cli/availability, cli/path) - 8 TDD test files (22 individual cases, RED→GREEN cycle) - `registry.json`: 2 → 10 healers, all enabled - fastMode: hooks/syntax, hooks/wiring, cli/path (SessionStart-safe) - severityFix=high для hooks/syntax + hooks/wiring (auto-restore из mirror) - severityFix=[] для остальных (advisory; auto-fix небезопасен для skills/MCP/CLI) - Bundled (auto-sync): trust-verify-enforcer.js — detect orchestrator parent session с активными subagents/ (другой agent fix) ## Зачем CEO directive 2026-05-18: каждый хук/скил/инструмент должен делать самопроверку и самофиксы. Phase 1 в `dc50dec9` доставил framework + 2 reference healers. Phase 2 покрывает оставшиеся subsystems. ## План тестирования - 13 test suites / 44 individual tests: GREEN - Live orchestrator dry-run на real `.claude/`: 9/10 ok, 88 advisory findings в skills/frontmatter (plugin cache, by design не auto-fix) - `node --check` на 13 healer .js: OK - `registry.json` валиден (10 healers enabled) - `claude-doctor --full`: 0 failures, 0 warnings - Mirror sync: diff empty ## Где могу ошибаться - 88 skills/frontmatter findings — advisory only (чужие plugin SKILL.md, опасно auto-fix) - mcp/connectivity не auto-reconnect (OAuth/token rotation небезопасны в SessionStart hook) - cli/availability/path в тест среде 0 issues — может найти drift на другом PC
When gsd-execute-phase spawns an executor subagent, Claude Code passes the
PARENT session transcript_path to the hook (not the subagent's own path).
The parent transcript's last Agent call IS the delegation that spawned the
executor — the executor has not yet returned, so no post-spawn verification
can exist in the parent. This caused all executor commits to be blocked as
false positives.

Fix: if the transcript_path's session directory contains a subagents/ folder,
treat it as an orchestrator-with-active-executors context and allow the commit.
The original agent-*.jsonl path check is preserved as a secondary guard.
andrei merged commit d64944b61a into master 2026-05-18 14:22:40 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
europa-tech-srl/claude-dotfiles!9
No description provided.