fix(graceful-handoff): model-aware context window detection (v2.1.0)

Stop hook fallback antok 200K-vindu. På Opus 4.7 (faktisk 1M) kunne
auto-handoff fyre 5–7x for tidlig — estimert 70% når reell bruk var
~14%. Erstatter enkel fallback med 4-stegs resolution-kjede:

  1. payload.context_window.used_percentage  (autoritativ)
  2. payload.context_window.context_window_size + transcript-estimat
  3. MODEL_WINDOWS[payload.model.id] + estimat
  4. FALLBACK_WINDOW=1_000_000 + estimat (2026-default)

additionalContext-meldinger inkluderer nå [kilde: <source>] for innsyn.
Brief som kilde-artefakt i docs/brief-context-window-detection.md.
6 nye tester (57 totalt). Ingen regresjoner.
This commit is contained in:
Kjell Tore Guttormsen 2026-05-01 09:08:24 +02:00
commit 40a82ccdb4
10 changed files with 347 additions and 34 deletions

View file

@ -8,7 +8,7 @@ Open-source Claude Code plugin marketplace. Solo project by Kjell Tore Guttormse
plugins/
ai-psychosis/ v1.0.0 — Interaction awareness (sycophancy, reinforcement loops)
config-audit/ v3.1.0 — Configuration intelligence (health, opportunities, auto-fix, whats-active)
graceful-handoff/ v1.0.0 — Session handoff in <60s (NEXT-SESSION artifact + commit+push + copy-paste prompt)
graceful-handoff/ v2.1.0 — Auto-trigger handoff via Stop hook (skill + JSON pipeline + 4-step model-aware context resolution)
linkedin-thought-leadership/ v1.2.0 — LinkedIn content pipeline + analytics
llm-security/ v6.0.0 — Security scanning, auditing, threat modeling
ms-ai-architect/ v1.8.0 — Microsoft AI architecture (Cosmo Skyberg persona)