ms-ai-architect/tests/kb-update
Kjell Tore Guttormsen 150b20584e feat(ms-ai-architect): Sesjon 21 — C1 Tier 1 opt-in session-forankret deteksjon (ToS-forankret) [skip-docs]
Spor C fase C1 Tier 1. Ny verifisert ToS-analyse avdekket falsk «enten/eller»:
Consumer Terms §3.7 begrenser automatisert tilgang til Claude/Anthropic, IKKE
kjøring av lokale node-scripts. Deteksjon kontakter aldri Claude → utenfor
ToS-flaten; apply (eneste Claude-steg) forblir manuelt/in-session/gated.

- lib/detection-schedule.mjs (ren): opt-in config (default AV) + shouldRunDetection
  gate + DETECTION_STEPS allow-liste + summarizeSkillLifecycle. Zero-dep parser.
- run-detection.mjs: Claude-FRITT entrypoint — kjører kun `node` på de
  allow-listede deteksjons-scriptene; kan ikke invokere claude (guard-testet).
- session-start-context.mjs: ubetinget bakgrunns-spawn → opt-in (default AV
  spawner ingenting) + surfacer skill-signaler read-only.
- commands/kb-update.md: opt-in-seksjon + ToS-note; ms-ai-architect.local.md.example.

TDD: ny test-detection-schedule.test.mjs (16). kb-update 139→155.
Suiter uendret: validate 239 · kb-eval 100 · kb-integrity 192/192.
0 skills/-mutasjon. Tier 2 (lokal OS-timer, deteksjon-only) = neste økt.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 22:54:18 +02:00
..
test-atomic-write.test.mjs feat(ms-ai-architect): add lib/atomic-write for crash-safe state files [skip-docs] 2026-05-05 10:32:13 +02:00
test-authority.test.mjs feat(ms-ai-architect): Sesjon 6 - lag 3 verifisering-INN (authority-binding) 2026-06-19 22:58:10 +02:00
test-backup-restore.test.mjs feat(ms-ai-architect): add lib/backup with sentinel-guarded rollback [skip-docs] 2026-05-05 10:50:10 +02:00
test-cross-platform-paths.test.mjs feat(ms-ai-architect): add lib/cross-platform-paths for cache/log/state/backup dirs [skip-docs] 2026-05-05 10:30:31 +02:00
test-decisions-actions.test.mjs feat(ms-ai-architect): Sesjon 18 — B3 apply-path (sanitize+retire), merge→S19 [skip-docs] 2026-06-20 20:32:51 +02:00
test-decisions-io.test.mjs feat(ms-ai-architect): Sesjon 3 - decision-ledger (lag 2) + discovery-dedup 2026-06-19 21:48:03 +02:00
test-detection-schedule.test.mjs feat(ms-ai-architect): Sesjon 21 — C1 Tier 1 opt-in session-forankret deteksjon (ToS-forankret) [skip-docs] 2026-06-20 22:54:18 +02:00
test-discover-invariant.test.mjs feat(ms-ai-architect): Sesjon 3 - decision-ledger (lag 2) + discovery-dedup 2026-06-19 21:48:03 +02:00
test-kb-headers.test.mjs feat(ms-ai-architect): Sesjon 2 - registry-skjema (authority_source + course reservert) 2026-06-19 21:05:54 +02:00
test-log-rotate.test.mjs feat(ms-ai-architect): add lib/log-rotate for bounded log disk use [skip-docs] 2026-05-05 10:54:50 +02:00
test-priority-unverified.test.mjs feat(ms-ai-architect): Sesjon 5 carry-forward B — datoløse filer → unverified-tier 2026-06-19 22:31:25 +02:00
test-registry-migrate.test.mjs feat(ms-ai-architect): Sesjon 2 - ai-foundry->foundry registry-remap 2026-06-19 21:09:00 +02:00
test-taxonomy.test.mjs feat(ms-ai-architect): Sesjon 19 — B3 merge-apply (cross-skill + taksonomi-persist) [skip-docs] 2026-06-20 20:54:13 +02:00
test-transform.test.mjs feat(ms-ai-architect): Sesjon 5 - transformasjonslag (lag 4, doc→KB-fil) 2026-06-19 22:31:26 +02:00
test-verify-out.test.mjs feat(ms-ai-architect): Sesjon 4 - verifisering-ut (lag 5) + adversarial regresjonstest 2026-06-19 22:00:36 +02:00