Commit graph

5 commits

Author SHA1 Message Date
9a166f93bb fix(ms-ai-architect): #7a ruting — RAG/MLOps-KB-ruting (F) + forson ROS-last-kontrakt (G)
Audit P2 §94-118. Latent engineering-dybde gjøres nåbar; determinisme-løftet repareres.

F (ruting til RAG/MLOps-KB): betinget, navngitt Read-ruting (samme mønster som security/cost):
- architecture-review-agent.md: RAG-arkitektur + MLOps/GenAIOps lagt i domene-spesifikk last-blokk
- research-agent.md: ny lokal KB-baseline for RAG/MLOps-temaer — leses som hypotese, MCP er fasit, avvik flagges
- poc.md: betinget steg 3b — RAG/MLOps-kjernefiler forankrer scope + suksesskriterier

G (forson ROS-rutingsmotsetning): ett eksplisitt last-kontrakt forsont på tvers av tre kilder.
Tidligere: CLAUDE.md «max 3» vs agent 11 filer flatt vs ros.md 5 → ikke-deterministisk lasting.
Nå: kjerne (alltid, 4: trusselbibliotek/rubrikker/metodikk/mal) + betinget på trigger
(sektor/MAESTRO/DPIA-integrasjon/AI Act). Reflektert i:
- ros-analysis-agent.md: «Knowledge Base References» omskrevet til last-kontrakt + AI Act-blokk + «Load KB»-steg bundet til den
- CLAUDE.md: header «typisk 3 kjernefiler»; ROS dokumentert som unntak med 4 kjerne + betinget
- ros.md: delegeringsprompt skiller kjerne/betinget per kontrakt

validate-plugin: 223 PASS

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01REiKFhP4w6xGXXqWKpPCJJ
2026-06-18 17:22:48 +02:00
84e3cfaa03 fix(ms-ai-architect): re-baseline kostnadslaget (GPT-5 $1.25/$10, én prissannhet, 10 filer)
Audit-funn Tema B + action-items 149/150. Verifiseringen avdekket at kostnadslag-råten var bredere enn auditens 3 navngitte filer (10 filer totalt).

- GPT-5 flagship $10-15/$40-60 -> $1.25/$10.00 (verifisert juni 2026, 8-12x for hoy). gpt-5-mini $0.25/$2.00, gpt-5-nano $0.05/$0.40. Fjernet falske "Verified MCP"-stempel pa estimat-band.

- deterministic-cost-calculation-model.md gjort til ENESTE kanoniske prissannhet (§1.1). Strippet duplikat pris-tabell fra cost-models.md (rotarsak til GPT-4o $10/$30-motsetning) -> peker til registeret.

- Reconcile-funn utover audit: deterministic hadde GPT-4.1-serien HALVERT ($1/$4 og $0.20/$0.80) -> verifisert $2.00/$8.00 og $0.40/$1.60. multi-model-strategy-costs.md NOK-tabell var fabrikkert 10-47x for hoy (gpt-4o 250/1000 NOK -> 26/105). model-selection (GPT-5 $3/$12), reasoning-models (GPT-5 $20-30/$80-100), token-counting (gpt-4.1 cached $1->$0.50), small-language-models (GPT-4o output 60->105 NOK) rettet.

- Recalk alle NOK-scenarioer reproduserbart: gpt-5 ~= gpt-4.1 i kost (ikke 30-55x dyrere som gammel tekst pasto) - billigere input ($1.25 vs $2.00), dyrere output. Reell kostnadsdriver = resonnerings-tokens (fakturert som output).

- Fjernet GPT-3.5 Turbo-anbefaling (utfaset). Alignet kurs 11->10.5 NOK/USD i cost-kommando. Cost-agent eksempel: legacy GPT-4 -> GPT-4o-mini, fjernet falskt Verified-stempel.

- kb-update apply cost-bucket deferret til task #8 (kommando-feature, ikke tall-justering).

Verifisert mot OpenAI API pricing + Azure OpenAI pricing via WebSearch 2026-06-18. validate-plugin.sh 219 PASS.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Claude-Session: https://claude.ai/code/session_01REiKFhP4w6xGXXqWKpPCJJ
2026-06-18 12:45:21 +02:00
78dcc6a16f feat(ms-ai-architect): v1.12.0 manuell KB-refresh — fjern launchd/cron-arkitektur
ToS-vurdering konkluderte med at autonom cron-kjøring er unødvendig kompleks
for en solo-fork-and-own-plugin. Apply-fasen krever LLM-resonnering uansett,
så manuell trigger fra en aktiv Claude Code-sesjon er enklere og holder
pluginen klart innenfor Anthropic Consumer Terms paragraf 3 (automated access
only via API key or where explicitly permitted — Claude Code CLI er
eksemptert som offisielt verktøy).

Lagt til:
- commands/kb-update.md — ny /architect:kb-update slash-kommando som driver
  poll, endringsrapport, microsoft_docs_fetch-update og commit fra sesjonen.
  Argumenter: --skip-discover, --priorities, --dry-run, --single-commit
- Catalog-entry i playground HTML for kb-update (categori: tool, 4 input-felt)

Slettet (Wave 3-5 reversert, ~1500 linjer + 7 testmoduler):
- scripts/install-kb-cron.mjs (cross-OS scheduler-installer)
- scripts/kb-update/weekly-kb-cron.mjs (cron-orkestrator med pre-flight, lock,
  backup, claude -p subprocess, post-run verify, rollback)
- scripts/kb-update/templates/ (4 scheduler-templates: launchd plist, systemd
  service+timer, Windows ps1 + README)
- scripts/kb-update/lib/auth-mode.mjs (cron-spesifikk auth validation)
- scripts/kb-update/lib/lock-file.mjs (PID+mtime stale-detection)
- scripts/kb-update/lib/cost-estimat.mjs (pre-flight budget-cap)
- 7 testmoduler under tests/kb-update/ for slettet kode
- tests/test-kb-update.sh (Bash-3.2-shim, erstattet av direkte node --test)

Beholdt (utility-laget fortsatt brukbart):
- run-weekly-update.mjs, report-changes.mjs, build-registry.mjs,
  discover-new-urls.mjs (KB change-detection-pipelinen)
- lib/atomic-write, lib/backup, lib/cross-platform-paths, lib/log-rotate
- 4 testmoduler (42/42 tester PASS)

Endret:
- hooks/scripts/session-start-context.mjs: fjern kb-update-status.json-overvaaking
- tests/run-e2e.sh --kb-update kaller node --test direkte i stedet for shim
- README.md, CLAUDE.md: KB-vedlikehold-seksjon rewriter for manuell modell
- plugin.json: 1.11.0 -> 1.12.0
- Rot README + CLAUDE.md: ms-ai-architect-versjon bumpet

Schedulering er bevisst utenfor scope og overlatt til brukeren — eventuelle
forks som vil ha periodisk varsling kan sette opp egen cron / launchd /
GitHub Actions som kjører rapport-fasen og varsler om aa kjore
/architect:kb-update i CC-sesjon.

Verifisering:
- bash tests/validate-plugin.sh: 219 PASS, 0 FAIL
- bash tests/run-e2e.sh --kb-update: 42/42 inner + suite PASS
- bash tests/run-e2e.sh --playground: 271/271 PASS (statisk + parsers)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 12:03:45 +02:00
Kjell Tore Guttormsen
353c509f00 feat(ms-ai-architect): sitemap-based KB change detection system
Adds a zero-dependency Node.js pipeline that polls Microsoft Learn sitemaps
weekly to detect when source documentation changes. Replaces the broken
mtime-based staleness check (all files had identical mtime after release).

Components:
- build-registry.mjs: extracts 1342 URLs from 387 reference files
- poll-sitemaps.mjs: streams ~18 child sitemaps, matches against registry
- report-changes.mjs: prioritized change report (critical/high/medium/low)
- discover-new-urls.mjs: finds relevant new MS Learn pages not yet covered
- run-weekly-update.mjs: orchestrator with --force/--discover/--dry-run

Integration:
- session-start hook reads change-report.json instead of broken mtime check
- hook triggers background poll if >7 days since last check
- generate-skills --update reads change report for targeted MCP updates

Current stats: 69% match rate (924/1342 URLs tracked via sitemaps).
~31% unmatched due to Microsoft URL restructuring (ai-foundry/openai paths).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 21:19:51 +02:00
Kjell Tore Guttormsen
baa2d0220b feat(ultraplan-local): v1.6.0 — /ultraresearch-local deep research command
Add /ultraresearch-local for structured research combining local codebase
analysis with external knowledge via parallel agent swarms. Produces research
briefs with triangulation, confidence ratings, and source quality assessment.

New command: /ultraresearch-local with modes --quick, --local, --external, --fg.
New agents: research-orchestrator (opus), docs-researcher, community-researcher,
security-researcher, contrarian-researcher, gemini-bridge (all sonnet).
New template: research-brief-template.md.

Integration: --research flag in /ultraplan-local accepts pre-built research
briefs (up to 3), enriches the interview and exploration phases. Planning
orchestrator cross-references brief findings during synthesis.

Design principle: Context Engineering — right information to right agent at
right time. Research briefs are structured artifacts in the pipeline:
ultraresearch → brief → ultraplan --research → plan → ultraexecute.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-08 08:58:35 +02:00