plugin_self_update.py— on SessionStart/MCP bootstrap:git pullon the live install, clone%USERPROFILE%\.claude\plugins\ainl-cortexwhen only a marketplace cache copy exists, repointinstalled_plugins.json, then nudge/reload-plugins.- Version mismatch detection —
installed_plugins.jsonversionvs on-diskplugin.json.
- First banner line is now
[AINL Cortex vX.Y.Z](stderr mirror, systemMessage, first-prompt transcript).
scripts/__init__.py— enablesfrom scripts.sync_installed_plugins(and marketplace/settings helpers) from MCP and hooks.
ensure_scripts_importable()— adds plugin root tosys.pathbeforescripts.configure_marketplace/sync_installed_pluginsimports from MCP and hooks (fixes fresh-install registration and AUTO-HEAL sync failures).
claude_integration_heal.py— auto-fixes staleinstalled_plugins.jsoncache paths, missing marketplace/settings registration, wrong MCP launcher (python→python3), and missingainativelangin venv on SessionStart, MCP launch, and hook bootstrap.canonical_plugin_root()— prefers live~/.claude/plugins/ainl-cortexover staleplugins/cache/…copies when both exist.- SessionStart visibility — stderr mirror on all platforms; first-prompt transcript banner via
sessionstart_visibility.py(Claude Code 2.1.139+ hides hook UI). - ainativelang health — checks
import compiler_v2(pip packageainativelang); removes false “not installed” warnings. - Docs —
ACTIVATION.md,SELF_HEALING.mdupdated for zero-touch new-user flow.
- SessionStart timeout raised to 60s (was 20s; MCP subprocess preflight could exceed it on Windows ARM).
- In-process MCP verify on SessionStart (avoids extra 30s subprocess when the hook already runs in
.venv). - Windows terminal mirror — full
[AINL Cortex]banner printed to stderr asSessionStart:startup says:(native Claude often hides hook UI). logs/sessionstart_last.json— written every SessionStart for offline diagnosis.
run_hook.cmd— fixed plugin root resolution (scripts\.→ real root). Restores SessionStart[AINL Cortex]banner and stopsscripts\.\scripts\bootstrap_no_python.ps1PostToolUse errors.mcp_server/hook_launcher_heal.py— auto-repairs brokenrun_hook.cmdand stalehooks.jsonon MCP start,run_hook.py, install, and runtime bootstrap (no manualgit pullrequired once MCP runs).scripts/verify_sessionstart.cmd— run outside Claude to confirm the hook emits JSON with[AINL Cortex].
- SessionStart AGENT INSTALL banner — when
.venv/MCP/setup is incomplete, Claude seesgit pull+setup.cmd(and “do not& setup.ps1”) at the top of every session. - plugin.json + CLAUDE.md — Windows install commands in description and first-line agent instructions.
- Auto-install on first use — missing
.venvtriggerssetup_install.pyfrom MCP (mcp_launch.py) and hooks (run_hook.cmd/run_hook.py). - Python bootstrap — downloads uv + Python 3.12 when no system Python (
python_bootstrap.py,bootstrap_no_python.ps1). - MCP on Windows —
mcp_launch.cmd+ install-timeplugin.jsonpatch (mcp_launcher_config.py). - Marketplace/settings —
configure_marketplace.py,register_claude_settings.py,scripts/claude_install.pyfor agents. - setup.ps1 — PowerShell 5.1 parse fix (no
$Yesparam); uv fallback;-Yesalias →-NonInteractive. - CI —
windows-install-ci.ymlparses all.ps1under PS 5.1 and pwsh.
- Conversation / action-intent gate — skips recall, goals, failure advisor, and AINL nudges on chat-only turns (
hooks/shared/conversation_detection.py). - Eco productization — compression metrics in
logs/hook_metrics.jsonl, cache mode persistence inlogs/cache_state.json, SessionStart cost line. - MCP
cortex_cost_snapshot— read-only session/project aggregates. cost_profilepresets —balanced,subscription_safe,max_learning.- Tool digests — zero-LLM summaries + blobs; MCP
memory_get_tool_outcome. - AINL promotion —
ainl_promote_patternMCP + orchestration counterfactuals (baseline_C_analytical). - Recall quality —
recall_dropped_nodesmetrics; decay/TTL in retrieval ranking. - Output compression — optional episode
task_descriptioncompression onstop. - ArmaraOS — daemon eco hint on SessionStart when bridge is up.
- Project docs — hash-gated
AGENTS.md/CLAUDE.mdsemantic nodes. - Procedure cards — high-fitness pattern injection when prompt matches.
- Docs:
docs/COST_CONTROL.md.