Commit graph

378 commits

Author SHA1 Message Date
2ad02ed002 feat(ms-ai-architect): replace playground v2 with v3 + docs update
Step 17 (Wave 5, final). Closes the v3 playground delivery (5-session run,
17 commits total).

Pre-flight tests verified passing before deletion:
- bash tests/validate-plugin.sh -> 215/215 PASS
- bash tests/run-e2e.sh --playground -> 240/240 PASS (170 + 70)

Changes:
- DELETE playground/ms-ai-architect-v3.html
- MOVE v3 content to playground/ms-ai-architect-playground.html (3867 lines).
  Replaces the deleted v2 file at the same canonical path so external
  references continue to resolve.
- UPDATE tests/test-playground-v3.sh + tests/test-playground-parsers.sh
  to point at the renamed canonical file.
- UPDATE plugin README.md (## Playground (v3) section): describes the
  4-surface decision-builder + report-viewer architecture, persistent state
  model, 17 report renderers, theme toggle, and the validation matrix.
- UPDATE plugin CLAUDE.md: replaces v2 5-step pipeline section with v3
  architecture overview. Marks docs/playground-v2-spec.md as historical-only
  (no longer the contract); points at .claude/projects/2026-05-03-playground
  -v3-architecture/ for v3 spec.
- UPDATE root README.md: marketplace listing for ms-ai-architect now
  describes v3 architecture (4 surfaces, persistence, 17 renderers, theme,
  240-test validation) and references the test command.

Verify (post-rename):
- ! test -f playground/ms-ai-architect-v3.html: pass
- test -f playground/ms-ai-architect-playground.html (>3000 lines): pass
- grep -q "v3" in plugin README + plugin CLAUDE.md + root README: pass
- bash tests/validate-plugin.sh: exit 0 (215/215)
- bash tests/run-e2e.sh --playground: exit 0 (240/240)
2026-05-03 20:16:37 +02:00
68a2240aae docs(ms-ai-architect): playground v3 A11Y-RAPPORT + MANUAL-CHECKLIST [skip-docs]
Step 16 (Wave 5).

playground/A11Y-RAPPORT.md (new, 60 lines):
- Skeleton with test setup, 4 surface rows (pending), known violations
  (empty), contrast notes (light + dark mode), keyboard navigation
  notes, screen-reader landmark map, axe-core run instructions.
- Filled in by tester after MANUAL-CHECKLIST.md execution.

playground/MANUAL-CHECKLIST.md (new, 115 lines):
- 10 sections per test-strategist output:
  1. Onboarding round-trip (shared state)
  2. Schema-migration (downgrade + reload)
  3. Project CRUD
  4. Command form prefill from shared state
  5. Paste-import per report type (17 commands enumerated)
  6. Parse error (corrupt markdown)
  7. Export/import cycle
  8. Theme-toggle persistence (Step 13)
  9. file://-standalone verification
  10. axe-core a11y per surface (CDN injection + axe.run + table)
- Each section has a concrete pass/fail criterion with a DevTools-console
  assertion. Section 10 includes axe.run paste-and-execute snippet.
2026-05-03 20:12:00 +02:00
e85f3fc9e9 test(ms-ai-architect): playground v3 parser fixture tests + run-e2e integration [skip-docs]
Step 15 (Wave 5).

tests/test-playground-parsers.sh (new):
- Iterates 17 expected fixtures (canonical archetype-routing list).
- Validates each present + >= 20 lines + has section headers (## ).
- Graceful-degrade: missing fixtures yield warn, not fail.
- Greps 14 parser-function names + window.__PARSERS exposure.
- Validates all 14 archetype routing keys in PARSERS object
  (aiact, requirements-list, text-document, fria, conformity-checklist,
   matrix-risk, matrix-risk-6x5, findings, cost-distribution, capability,
   phased-plan, markdown, verdict, comparison).
- Validates handlePasteImport function + window.__handlePasteImport.
- Bash 3.2-compatible. Result: 70/70 PASS.

tests/run-e2e.sh (modify):
- Adds --playground flag dispatching test-playground-v3.sh +
  test-playground-parsers.sh.
- --all and no-arg invocation both include the new suite.

Verify: bash tests/run-e2e.sh --playground -> exit 0 (170 + 70 PASS).
2026-05-03 20:10:21 +02:00
64441847f0 test(ms-ai-architect): playground v3 static tests [skip-docs]
Step 14 (Wave 5). Adds tests/test-playground-v3.sh — 170 PASS-line static
validation suite for the v3 HTML, bash 3.2-compatible.

Coverage:
- File existence + min line count (>= 1500)
- HTML skeleton markers (DOCTYPE/html/head/body) + data-theme default
- 7 vendored CSS link tags in canonical order
- Theme bootstrap (Step 13): localStorage key + .theme-toggle + toggle-theme action
- file://-safety: no external script/stylesheet src
- 4 surfaces (onboarding/home/catalog/project)
- STATE_KEY = 'ms-ai-architect-state-v1'
- 8 exposed window.__-globals (store, CATALOG, PARSERS, RENDERERS, ...)
- All 24 command IDs from commands/*.md referenced
- 14 parser functions (canonical archetype routing)
- 17 renderer functions (canonical command routing)
- Design-system class usage (Tier 1+2+3); .cmd-pipeline reserved (warn)
- 5 onboarding groups + 5 catalog expansion groups
- 11 helpers (renderError, renderEmptyState, parseTable, ...)
- SCHEMA_VERSION + MIGRATIONS pipeline + IndexedDB primary
- 23 ACTIONS handlers (incl. toggle-theme)
- Export/import primitives (Blob, URL.createObjectURL, FileReader)

Pipefail-safe (grep | wc patterns wrapped in `{ ... || true; }`).
2026-05-03 20:07:55 +02:00
bebe070236 feat(ms-ai-architect): playground v3 theme toggle with localStorage persistence [skip-docs]
Step 13 (Wave 5). Adds light/dark theme toggle to v3 playground.

- Inline <script> in <head> reads ms-ai-architect-theme from localStorage and
  sets <html data-theme="..."> BEFORE stylesheets parse (avoids FOUC).
- New .theme-toggle button in topbar (vendored design-system class).
- ACTIONS['toggle-theme'] flips data-theme, persists to localStorage, and
  syncs all [data-theme-label] elements + aria-label in-place (no re-render).
- Default behavior (no localStorage value or unsupported value) keeps existing
  data-theme="dark" hard-coded on <html>.
2026-05-03 20:01:53 +02:00
997acb190f feat(ms-ai-architect): playground v3 report renderers (17 commands) [skip-docs]
17 rapport-renderers per kanonisk routing-tabell (Step 12) gruppert i 4 sub-batches:

- Regulatory (6): renderAiActPyramid, renderRequirements, renderTransparency, renderFria, renderConformity, renderDpia

- Security (3): renderSecurity, renderRos, renderReview

- Economy (2): renderCost, renderLicense

- Documentation (6): renderMigrate, renderAdr, renderSummary, renderPoc, renderUtredning, renderCompare

Felles helpers: renderError (parser-fail fallback), renderEmptyState, renderMatrixHtml (5x5/6x5 grid), renderRadarSvg, renderThreatsTable, renderFindingsBlock.

Wired stub erstattet med PARSERS+RENDERERS routing: handlePasteImport(commandId, markdown) henter cmd fra CATALOG, ruter via PARSERS[archetype] og RENDERERS[cmd.renderer], serialiserer til [data-report-slot=...]. Verktøy-commands (produces_report=false) får empty-state. Parse-feil renderer error-summary med strukturerte feilmeldinger.

RENDERERS routing-objekt eksponert som window.__RENDERERS. Verified: 17 fixtures roundtrip parser+renderer, classify produserer .pyramide .pyramide__tier--high (aria-current på matchende tier), adr produserer dl med Status/Date/Deciders.
2026-05-03 19:38:27 +02:00
1034777d6b feat(ms-ai-architect): playground v3 markdown parsers (14 archetypes) [skip-docs]
14 tolerant parsers per kanonisk archetype-routing-tabell (Step 11) + 3 helpers (parseTable, parseSections, extractField). Each parser returns {ok:true, data} or {ok:false, errors:[{section, reason}]} — never throws on bad input. PARSERS routing-objekt eksponert via window.__PARSERS.

Verified against all 17 fixtures: every parser produces expected shape. Empty input returns structured error per Verify-asserts.
2026-05-03 19:29:18 +02:00
b4a5ff0c75 test(ms-ai-architect): playground v3 markdown fixtures (17 commands) [skip-docs]
Synthetic markdown fixtures for the 17 report-producing commands per the canonical archetype-routing-tabell. Each fixture uses the consistent ANPR-trafikkanalyse system from brief example to produce parser-input that exercises every archetype path (aiact, requirements-list, text-document, fria, conformity-checklist, matrix-risk 5x5, matrix-risk-6x5, findings, cost-distribution, capability, phased-plan, markdown, verdict, comparison).

Real /architect:<command> capture deferred to incremental work; synthetic fixtures suffice as parser test input for Steps 11-12.
2026-05-03 19:23:26 +02:00
3750bee48b feat(ms-ai-architect): playground v3 catalog surface with search + 5 expansion groups [skip-docs]
Step 9 of v3 plan. Replaces renderCatalogStub with full
renderCatalogSurface — search-input + 5 .expansion-grupper (en per
CATALOG.categories) + per-command-card with "Åpne skjema"-button. Klikk
åpner modal med renderCommandForm (samme generic renderer som
prosjekt-detalj fra Step 8).

Søk: input-event oppdaterer modul-lokal catalogSearchQuery og kaller
refreshCatalogResults() som re-rendrer kun groups-containeren — bevarer
fokus + cursor i søkefeltet (full re-render ville flyttet caret).
Filtrerer på id+label+description+argument_hint. Når query er aktiv
forces alle expansions med treff åpne; ellers er 'regulatory' åpen som
default (mest brukt entry-point).

Verktøy-commands får .catalog-card__pill="Verktøy" + .catalog-tool-notice
("Verktøy — ingen rapport-import"). Modalen viser samme advarsel via
.guide-panel--info-banner. Rapport-produserende får "Rapport"-pill.

Verifisert via vm-sandbox med activeSurface='catalog':
- data-command-card === 24 (Step 9 verify-assert ✓)
- 5 expansion-grupper (data-catalog-group)
- 24 open-catalog-form-knapper
- 17 Rapport-pills + 7 Verktøy-notices (matcher CATALOG.commands.filter
  produces_report)
- refreshCatalogResults() med query='classify' kjører feilfritt
2026-05-03 18:35:44 +02:00
f55a0e9513 feat(ms-ai-architect): playground v3 generic command form renderer + buildCommand [skip-docs]
Step 8 of v3 plan. renderCommandForm(commandId, opts) reads
CATALOG[id].input_fields and emits a form with all 6 supported field types
(text/textarea/select/multiSelect/boolean/number). Shared fields
auto-prefill from state.shared via field.shared_path dot-lookup; local
fields prefill from project.reports[id].input when opts.projectId is set.

window.__buildCommand(commandId, formData) builds /architect:<id>
key="value" key="value" ... — shared fields merged first (CATALOG order),
formData overrides and may include keys outside the catalog (passthrough).
Empty/null/empty-array values omitted. Multi-values comma-joined inside
quotes; quotes/backslashes escaped.

Copy-button writes via navigator.clipboard.writeText with graceful
fallback to inline preview when clipboard is blocked (file:// in some
browsers). Preview-button shows the same string without copying.

Replaces the form-zone-placeholder in renderCommandSubCard. All 24
command-cards in project-detail now render real forms (verified:
data-command-card === 24, data-command-form === 24, copy-command
buttons === 24, field-from-tag === 39, paste-import === 17,
report-slot === 17, buildCommand('classify',{riskLevel:'høy'}) →
'/architect:classify organisation_name="Vegvesen" sector="Statlig"
riskLevel="høy"').
2026-05-03 18:33:19 +02:00
268169892a feat(ms-ai-architect): playground v3 project creation + detail shell [skip-docs]
Step 7/17 av Playground v3-leveransen (Session 2, Wave 2).

Prosjekt-opprettelse via modal: navn (påkrevd) + system-beskrivelse +
scenario-tagging multiSelect (8 scenarioer fra v2). projectId via
crypto.randomUUID. Modal mounter til document.body med Esc-/backdrop-luk.

Per-prosjekt detalj-skall (#surface-project):
  - Header med tittel + scenario-chips + dato + rapport-meter + tilbake/slett
  - 5 kategori-tabs (regulatorisk/sikkerhet/økonomi/dokumentasjon/verktøy)
  - ALLE 24 commands rendres som .command-card i sine respektive panels
    (inaktive paneler [hidden]). Sikrer at querySelectorAll-asserts matcher
    uavhengig av aktiv tab; tab-bytte er ren visning-toggle uten re-render
    så textarea-input bevares.

Sub-card-struktur per command:
  - Skjema-zone (placeholder for Step 8 renderCommandForm)
  - rapport-produserende (17): paste-import-zone (textarea[data-paste-import]
    + button[data-action=parse]) + report-zone (div[data-report-slot])
  - verktøy (7): .guide-panel--info 'Verktøy'-notis ingen rapport-import

Sletting via modal med .error-summary 'Bekreft sletting'-melding (.btn--
destructive).

Paste-import-wiring: ACTIONS['parse'] leser textarea[data-paste-import]
og kaller window.__handlePasteImport(commandId, markdown). Stub logger
'parse-pending:' + slice(0,80) og injiserer en venter-panel i slot.
Step 12 erstatter stub med full PARSERS+RENDERERS-routing.

Verifisert via vm sandbox etter createProject + navigate('project'):
  - 17 [data-paste-import] (rapport-produserende commands) ✓
  - 17 [data-report-slot] ✓
  - 24 [data-command-card] ✓
  - 5 [role=tab] ✓
  - 7 .guide-panel--info (verktøy-notiser) ✓
  - project.id matcher UUID-format ✓

README/CLAUDE.md-update deferred til Step 17 (Session 5).
2026-05-03 18:22:53 +02:00
ff99a51d1d feat(ms-ai-architect): playground v3 home surface + project list [skip-docs]
Step 6/17 av Playground v3-leveransen (Session 2, Wave 2).

Hjem-skjerm med 3-track entry-pattern (.tracks__card--guided/explore/expert):
  - Onboard / Re-onboard
  - Nytt prosjekt
  - Command-katalog

Prosjekt-liste under tracks: .fleet-grid med .fleet-tile per prosjekt
(navn + scenario-chip + meter med rapport-fremdrift). Tom-state vises
som .guide-panel--info med 'Opprett første prosjekt'-knapp.

Topbar (renderTopbar) med brand + nav + eksport/import-knapper synlig
på home/catalog/project. Onboarding holdes uten topbar for full-fokus
første-flyt. import-input change-handler ruter via window.__importState
fra Step 3 og kjører scheduleRender etter import.

Verifisert via vm sandbox:
  - 21 tracks__card-treff (3 cards med modifier-klasser)
  - guided/explore/expert-modifiers alle til stede
  - empty-state guide-panel--info når projects=[]
  - fleet-grid suppressed når projects=[]

Stub-actions for new-project (Step 7 erstatter med modal-åpning).
README/CLAUDE.md-update deferred til Step 17 (Session 5).
2026-05-03 18:19:22 +02:00
6b2ac8250e feat(ms-ai-architect): playground v3 onboarding surface (18 felles fields) [skip-docs]
Step 5/17 av Playground v3-leveransen (Session 2, Wave 2).

5 grouped sections (organization/technology/security/architecture/business)
rendered with Tier 3 .form-progress sidebar and .expansion components per
group. Validation via .error-summary with click-to-focus links.

ONBOARDING_SCHEMA mirrors agents/onboarding-agent.md Phase 1-5 (18 fields
total). commitOnboarding() writes to state.shared.<group>.<field> via
Proxy → throttled IDB/localStorage write. Re-onboard is just navigate
back to onboarding — pre-fills from state automatically.

Verified via vm sandbox: bootstrap auto-routes to onboarding when no
org.name, commitOnboarding produces >=5 keys in shared.organization,
validation catches required-empty (2) and accepts filled (0).

Surface routing: showSurface() toggles [hidden] across data-surface
sections. scheduleRender batches via queueMicrotask. Action router
dispatches data-action attributes to ACTIONS map. README/CLAUDE.md-update
deferred til Step 17 (Session 5).
2026-05-03 18:16:44 +02:00
ab8affa5d8 feat(ms-ai-architect): playground v3 command catalog (24 commands)
Step 4/17 av Playground v3-leveransen.

CATALOG-konstant med alle 24 commands per kanonisk archetype-routing-tabell.
Driver:
  - Step 5/8: skjema-render via input_fields[]
  - Step 9: katalog-UI gruppert på category
  - Step 11: parser-routing via report_archetype
  - Step 12: renderer-routing via renderer-feltet
  - __buildCommand: pipeline-string-bygging per command (Step 8)

Per command-entry:
  { id, category, label, description, argument_hint, calls_agent, kb_files,
    produces_report, report_archetype, report_root_class, renderer,
    input_fields[] }

input_fields støtter: text, textarea, select, multiSelect, boolean, number.
Felles felter har from='shared' + shared_path (oppslag mot state.shared.*);
lokale felter har from='local' og lagres i project.reports[id].input.

SHARED-shorthand-objekt (9 felles felter brukt på tvers — sektor, virksomhet,
sky-plattform, lisens, AI-tjenester, dataklassifisering, DPIA-praksis, AI-budsjett,
regulatoriske krav). Sikrer eksakt samme label/type på tvers av commands som
deler felt.

Kategori-fordeling per canonical routing-tabell:
  regulatory(6): classify, requirements, transparency, frimpact, conformity, dpia
  security(3): security, ros, review
  economy(2): cost, license
  documentation(6): migrate, adr, summary, poc, utredning, compare
  tool(7): architect, help, research, diagram, onboard, generate-skills, export

Verktøy-commands har produces_report=false og null for archetype/root/renderer
— Step 11/12 hopper over dem.

Verify-asserts (i nettleser-konsoll):
  window.__CATALOG.commands.length === 24
  window.__CATALOG.commands.filter(c => c.produces_report).length === 17
  window.__CATALOG.commands.find(c => c.id === 'classify').report_archetype === 'aiact'

Eksponerte globals: __CATALOG, __SHARED_FIELDS, __FIELD_TYPES.

Plan: .claude/projects/2026-05-03-playground-v3-architecture/plan.md (Step 4)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 18:03:16 +02:00
995f64ad8c feat(ms-ai-architect): playground v3 export/import with eager migrations
Step 3/17 av Playground v3-leveransen.

Eksport:
- buildEnvelope(): { appId, schemaVersion, exportedAt, shared, projects,
  activeProjectId, activeSurface, preferences } — JSON.parse(JSON.stringify(...))
  for å strippe Proxy-wrappere
- exportState(): Blob + URL.createObjectURL + programmatisk <a download>-klikk
  + revokeObjectURL etter 0ms timeout. File System Access API krever HTTPS
  (secure context) og er ikke tilgjengelig på file:// — derfor Blob-pattern.
- Filnavn-format: ms-ai-architect-playground-<ISO-stamp>.json

Import:
- importState(File): file.text() -> JSON.parse -> envelope-validering (appId
  + schemaVersion required) -> migrateState() -> persistence.save() -> in-place
  state-update (Proxy-binding må bevares — kan ikke bytte raw-referansen)
  -> manuell 'change'-event-dispatch så subscribers re-rendrer
- file.text() er Promise<string> som fungerer på file:// uten secure context

MIGRATIONS-pipeline:
- Eager: alle migrasjoner kjøres sekvensielt fra fil-versjon til SCHEMA_VERSION
  ved import (ikke lazy ved access)
- Nøkkel-format: 'N->M' (fortløpende). Aldri hopp over et steg.
- Kaster eksplisitt feil ved manglende migrasjons-funksjon eller ved
  funksjon som ikke setter schemaVersion korrekt — silent corruption
  unngås (brief Risk High).

Eksponerte globals: __buildEnvelope, __exportState, __importState, __MIGRATIONS.

Verify-assert: JSON.parse(JSON.stringify(window.__buildEnvelope())).schemaVersion === 1

Plan: .claude/projects/2026-05-03-playground-v3-architecture/plan.md (Step 3)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 17:59:01 +02:00
483dad8049 feat(ms-ai-architect): playground v3 state module (Proxy + EventTarget + IDB persistence)
Step 2/17 av Playground v3-leveransen.

State-skjelett:
- StateBus extends EventTarget (sharedBus + projectBus)
- Dyp Proxy med set/deleteProperty-traps som batcher dispatchEvent via
  queueMicrotask (N synkrone mutasjoner -> én change-event per tick)
- Path tracking: subscribers får detail.paths for å filtrere relevante grener
- INITIAL_STATE med shared.{organization,technology,security,architecture,
  business} + projects[] + activeProjectId/Surface + preferences.theme

Persistens:
- IDB primær: én DB ('ms-ai-architect-playground-v1') med 3 stores
  (shared, projects, meta). Promise-wrapper rundt indexedDB.open.
- Synkrone migrasjoner i onupgradeneeded med oldVersion-guards (callback-stil
  cursor — async cursor-iterasjon er forbudt per w3c/IndexedDB#282)
- db.onversionchange = () => db.close() defensivt på alle koblinger
- localStorage-fallback ved IDB-feil (Safari private mode, kvote): rå JSON
  i STATE_KEY, warn ved >4.5 MB nær 5 MiB cap
- Throttled writer: debounce 300 ms etter siste mutasjon

Bootstrap:
- Auto-kjørt på slutten av <body> (DOM allerede parsed)
- window.__store + window.__persistence eksponert for Verify-asserts

Verify-asserts (i nettleser-konsoll på file://-åpnet HTML):
  typeof window.__store !== 'undefined' && window.__store.state.schemaVersion === 1

Plan: .claude/projects/2026-05-03-playground-v3-architecture/plan.md (Step 2)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 17:57:48 +02:00
63746df184 feat(ms-ai-architect): playground v3 HTML skeleton with vendored CSS
Step 1/17 av Playground v3-leveransen (Session 1, Wave 1).

- Single-file HTML med klassisk inline-script (file://-kompatibel per WHATWG
  html#8121: external type=module-scripts feiler på file:// i Chrome+Firefox)
- 7 vendored CSS-link-tags i korrekt rekkefølge: fonts, tokens, base, components,
  components-tier2, components-tier3, components-tier3-supplement
- 4 placeholder-overflater (#surface-onboarding, #surface-home, #surface-catalog,
  #surface-project) — fylles ut i Steps 5-7
- IIFE med STATE_KEY ('ms-ai-architect-state-v1') og SCHEMA_VERSION (1) konstanter
- Eksponerer __STATE_KEY og __SCHEMA_VERSION på window for Verify-asserts
- v2-fila beholdes parallelt frem til Step 17 (sletting)

Plan: .claude/projects/2026-05-03-playground-v3-architecture/plan.md
Brief: .claude/projects/2026-05-03-playground-v3-architecture/brief.md

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 17:56:01 +02:00
490d4eddc6 docs: introduce GOVERNANCE.md and unify fork-and-own blurb
Establish a single governance document at marketplace root and copy
it into each of the 9 plugins so every plugin folder remains 100%
self-contained. Replace the inconsistent provocative blurb across
all READMEs with a uniform fork-and-own paragraph that links to
the local GOVERNANCE.md.

[skip-docs]

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 14:57:00 +02:00
Kjell Tore Guttormsen
abf2246ea1 refactor(ms-ai-architect): playground uses vendored design-system
Renames playground/azure-ai-playground.html to
playground/ms-ai-architect-playground.html (history preserved via git mv).
Old name was too narrow — plugin covers the full Microsoft AI stack
(Foundry, Copilot Studio, M365 Copilot, Power Platform, Agent Framework).

Replaces the inline <style> block with seven <link> tags pointing at the
vendored design-system under playground/vendor/playground-design-system/:
fonts.css, tokens.css, base.css, components.css, components-tier2.css,
components-tier3.css, components-tier3-supplement.css.

A small inline shim maps legacy playground tokens (--bg, --surface,
--accent, --gradient1) onto design-system tokens (--color-bg,
--color-surface, --color-primary-500, etc.), keeping all existing
playground-specific class CSS (.hero, .wizard-card, .scenario-card,
.item-card, ...) working without rewrites. <html data-theme="dark">
preserves v2's dark visual identity; light-mode toggle is deferred.

DOM, JS logic, scenario data, and command pipelines are unchanged.

Also includes .gitleaks.toml at repo root (path allowlist for vendored
MANIFEST.json files — SHA-256 file hashes are not secrets) which was
missed in the previous commit due to global git ignore.

Docs updated:
- README.md (root): notes the vendoring sync script + ms-ai-architect
  Playground subsection
- plugins/ms-ai-architect/README.md: new Playground section with sync
  workflow and standalone guarantee
- plugins/ms-ai-architect/CLAUDE.md: Playground section updated with
  vendored design-system details + new filename
2026-05-03 12:35:47 +02:00
Kjell Tore Guttormsen
660bd106ce feat(ms-ai-architect): vendor playground-design-system v0.1 [skip-docs]
Initial sync of shared/playground-design-system/ into
plugins/ms-ai-architect/playground/vendor/playground-design-system/
via scripts/sync-design-system.mjs.

Source commit: f1fecf39b8
Files: 25 (7 CSS + 11 fonts/licenses + 3 schemas + README + MANIFEST)

Vendored copy keeps the plugin standalone — playground will load CSS
from ./vendor/ regardless of where the plugin is installed.

Also adds .gitleaks.toml at repo root with a path allowlist for
vendored MANIFEST.json files (SHA-256 file hashes are not secrets).

Docs updated together with the playground HTML refactor that actually
consumes the vendored CSS (next commit). This commit is internal-only.
2026-05-03 12:25:42 +02:00
Kjell Tore Guttormsen
5b6c1da8fc chore(privacy): fix factual mashups from phase 2 bulk replace
Phase 2 bulk replace produced a few factually wrong attributions where
real publicly known sector documents/datasets/personas were incorrectly
re-attributed to the fictional generic entity. Genericize those
references instead.

- ros-sector-checklists.md: V440 håndbok citation -> "sektorvise
  faglige håndbøker"; tilsynsmyndighet list -> generic phrasing
- master-data-management-ai.md: NVDB row -> generic "sektor-/fagregistre"
- ai-center-of-excellence-setup.md: NVDB integration line -> generic
  "sektorvise nasjonale registre"
- multimodal-prompt-engineering.md: system_message persona -> generic
  "fagingeniør i norsk offentleg sektor"

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 04:30:15 +02:00
Kjell Tore Guttormsen
9ea5a2e6c6 chore(privacy): scrub real-org references from plugin internals (phase 2)
Same bulk replacement applied to plugin-internal KB, examples, fixtures,
tests, and docs. Real organization names, persona names, internal system
identifiers, and domain-specific terms replaced with fictional generic
public-sector entity (DDT) and generic terminology.

Scope:
- okr/ — examples, governance, framework, integrations, sources
- ms-ai-architect/ — KB references (engineering, governance, security,
  infrastructure, advisor), tests/fixtures, agents, docs
- linkedin-thought-leadership/ — voice samples, network-builder,
  examples (genericized identifying headlines to "[your organization]")
- llm-security/ — research notes, scan report

Manual genericization beyond bulk replace:
- okr SKILL.md "Primary user / Domain" — generic Norwegian public sector
- linkedin-voice SKILL.md headline placeholder
- network-builder.md headline placeholder
- high-engagement-posts.md voice sample employer line + hashtag

Phase 3 (factual-attribution review) remains: a few KB files attribute
publicly known transport-sector docs/datasets (e.g. håndbok V440, NVDB)
to the fictional DDT after bulk replace. Needs manual semantic review
to either remove or restore correct citation without re-introducing
affiliation references.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 04:28:15 +02:00
Kjell Tore Guttormsen
339abc521e chore(ai-psychosis): release v1.2.0 2026-05-01 21:59:40 +02:00
Kjell Tore Guttormsen
0075fe089b test(ai-psychosis): perf budget validated at v1.2 pattern set 2026-05-01 21:56:14 +02:00
Kjell Tore Guttormsen
f70caf1150 test(ai-psychosis): privacy canary covers v1.2 detectors 2026-05-01 21:54:22 +02:00
Kjell Tore Guttormsen
6fe275825a feat(ai-psychosis): /interaction-report surfaces v1.2 fields 2026-05-01 21:53:41 +02:00
Kjell Tore Guttormsen
eb040cfccb docs(ai-psychosis): SKILL.md cites paper Score 5 + 11 guidance criteria 2026-05-01 21:51:21 +02:00
Kjell Tore Guttormsen
f88639ef41 feat(ai-psychosis): report-reader v1.2 schema + aggregations 2026-05-01 21:47:53 +02:00
Kjell Tore Guttormsen
c5e933b35d feat(ai-psychosis): domain-stakes weighting on alert thresholds 2026-05-01 21:46:29 +02:00
Kjell Tore Guttormsen
c5e8f280d9 feat(ai-psychosis): pushback alert with domain-aware re-contextualization 2026-05-01 21:42:55 +02:00
Kjell Tore Guttormsen
12e6d3b5e4 feat(ai-psychosis): validation-seeking domain-gated alert 2026-05-01 21:41:15 +02:00
Kjell Tore Guttormsen
61584f42d6 feat(ai-psychosis): tier-2 user-info isolation alert (cross-session) 2026-05-01 21:40:24 +02:00
Kjell Tore Guttormsen
4fd5e7b24a feat(ai-psychosis): tier-1 user-info isolation alert (per-session) 2026-05-01 21:38:51 +02:00
Kjell Tore Guttormsen
b88cd8a978 feat(ai-psychosis): add validation-seeking detector 2026-05-01 21:37:06 +02:00
Kjell Tore Guttormsen
ca6567b501 feat(ai-psychosis): add user-info detector (yes_people/yes_digital/no) 2026-05-01 21:34:52 +02:00
Kjell Tore Guttormsen
39ea46441c feat(ai-psychosis): add 8 paper-grounded domain patterns 2026-05-01 21:32:26 +02:00
Kjell Tore Guttormsen
a5bc53cb42 feat(ai-psychosis): promote domain_context to array for multi-domain support 2026-05-01 21:28:36 +02:00
Kjell Tore Guttormsen
011634583b test(ai-psychosis): contract test for v1.1.0 pushback count behavior 2026-05-01 21:25:35 +02:00
Kjell Tore Guttormsen
d8d8315e3e test(ai-psychosis): sync perf fixture to actual pattern count (41) 2026-05-01 21:24:42 +02:00
Kjell Tore Guttormsen
f0f3bc3294 feat(ai-psychosis): add readRecentEndRecords for cross-session reads 2026-05-01 21:23:57 +02:00
Kjell Tore Guttormsen
7b0afdb541 feat(ai-psychosis): add v1.2 thresholds and domain-stakes table 2026-05-01 21:22:51 +02:00
Kjell Tore Guttormsen
1dad53a1e4 docs(ultraplan-local): document /ultracontinue in README + CLAUDE
- README: version badge 3.2.0 → 3.3.0, "Six commands" intro, /ultracontinue row in command table, full /ultracontinue-local section with modes + schema v1 + /ultraplan-end-session helper + typical flow.
- CLAUDE.md: extend validators list (atomic-write util, session-state-validator), bump test count 109 → 185, "7 pipeline handovers" line, Continue paragraph in Architecture, .session-state.local.json + Continue stats in State, Session-state entry in Terminology.

Step 11 of /ultracontinue v3.3.0.
2026-05-01 21:01:34 +02:00
Kjell Tore Guttormsen
d893a46e41 chore(ultraplan-local): bump v3.3.0 + changelog for /ultracontinue [skip-docs]
v3.3.0 ships /ultracontinue-local (zero-friction multi-session resumption),
/ultraplan-end-session-local helper, session-state-validator + atomic-write
util, and Handover 7 (.session-state.local.json contract). Non-breaking.
185 tests green (163 baseline + 22 new).

Step 10 of /ultracontinue v3.3.0. README/CLAUDE updates land in Step 11.
2026-05-01 20:59:23 +02:00
Kjell Tore Guttormsen
2690ab501f feat(ultraplan-local): add /ultraplan-end-session helper for informal multi-session flows [skip-docs]
Tiny helper command for ad-hoc multi-session flows that don't run through
/ultraexecute-local. Writes .session-state.local.json so /ultracontinue
can resume in a fresh chat. Required args (next-brief-path, next-label) —
no inline prompt, headless-safe. Validates via session-state-validator
and prints the same 3-line narration that /ultracontinue Phase 3 uses
(SC-8 cross-project consistency).

Step 9 of /ultracontinue v3.3.0. README/CLAUDE updates land in Step 11.
2026-05-01 20:58:46 +02:00
Kjell Tore Guttormsen
5688512898 docs(ultraplan-local): add Handover 7 + doc-consistency pins for /ultracontinue
Adds Handover 7 (.session-state.local.json) section to HANDOVER-CONTRACTS.md
documenting the multi-session-resume contract:
- Producers: ultraexecute Phase 8/2.55/4 + helper command + future
  graceful-handoff v2.2 + pre-compact-flush refresh
- Consumer: /ultracontinue (read-only)
- Schema v1: schema_version, project, next_session_brief_path,
  next_session_label, status (5-value enum), updated_at
- Forward-compat: unknown top-level keys silently tolerated (drift-WARN)
- Path: .claude/projects/<project>/.session-state.local.json (gitignored)
- Failure modes mapped to validator error codes

Also updates the validator → handover map and Versioning + Stability
tables to include Handover 7.

Extends tests/lib/doc-consistency.test.mjs with three new pins:
1. HANDOVER-CONTRACTS.md contains Handover 7 section
2. session-state-validator.mjs exposes the standard CLI shim
3. CLAUDE.md mentions /ultracontinue-local

Adds the /ultracontinue-local row to the plugin CLAUDE.md commands table —
minimum viable to keep the existing 'CLAUDE.md commands table mentions
every commands/*.md file' iteration test green. Step 11 (Session 2b) will
expand to full README + CLAUDE.md narrative documentation.

Test suite: 182 → 185 (3 new doc-consistency pins, zero regressions).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 20:53:47 +02:00
Kjell Tore Guttormsen
af67362c68 feat(ultraplan-local): pre-compact-flush refreshes session-state.local.json [skip-docs]
Extends the PreCompact hook with a sibling block that refreshes
.session-state.local.json's updated_at when status is in_progress or
partial. Per-project: runs after the existing progress.json mutation,
inside the same loop iteration.

Design:
- Only refreshes existing state files; creation is the writer's job
  (ultraexecute Phase 8 / 2.55 / 4 + future helper command).
- Monotonic guard: only updated_at is touched. project, status,
  next_session_brief_path, next_session_label remain owned by the writer.
- Skips status in {completed, failed, stopped} — the latter two are
  operator-action-required and silently bumping updated_at would mask
  alert state.
- Always exit 0; never blocks compaction.

[skip-docs] rationale: README + CLAUDE.md updates land in Step 11.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 20:51:42 +02:00
Kjell Tore Guttormsen
e4a11daa68 feat(ultraplan-local): write session-state from ultraexecute session-end paths [skip-docs]
Three insertions in commands/ultraexecute-local.md so every session-end
path produces or refreshes .session-state.local.json (Handover 7):

- Phase 2.55 (Check 1, line ~376): write status=stopped on dirty-tree
  pre-flight stop before parallel session-spawn
- Phase 4 (line ~773): write status=stopped when entry condition fails
- Phase 8 (line ~1151): canonical convergence — every completed/failed/
  stopped/partial run refreshes the state file using atomicWriteJson +
  validator verification

Phase 2.3 (validate exit) and Phase 5 (dry-run) intentionally skip the
write — neither path is resumable. Validator errors warn but never block
the run; progress.json remains authoritative.

[skip-docs] rationale: README + CLAUDE.md updates land in Step 11.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 20:50:28 +02:00
Kjell Tore Guttormsen
43cdc0b968 feat(ultraplan-local): add /ultracontinue command for multi-session resumption [skip-docs]
Reads .claude/projects/<project>/.session-state.local.json (Handover 7),
narrates a 3-line summary, and immediately begins executing the next
session — no interactive confirmation, headless-safe.

Phases:
- 0: --help (self-documenting per brief NFR)
- 1: resolve project dir (auto-discover via node -e enumeration)
- 2: validate via session-state-validator
- 3: narrate (project / next_session_label / brief path)
- 4: read brief and begin
- 5: stats

[skip-docs] rationale: README + CLAUDE.md updates land in Step 11 (Session
2b) per plan structure. Step 8 (docs:) updates HANDOVER-CONTRACTS.md and
the doc-consistency test pin in the same session.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-01 20:49:01 +02:00
Kjell Tore Guttormsen
28e381a711 release(config-audit): v5.1.0 — plain-language UX humanizer
Plain-language UX humanizer release. Default output of all 18 commands
now leads with prose; technical IDs surface at end-of-line as references
rather than headlines. Scanner internals are unchanged; humanization is
a pure output-time transform applied at the rendering layer.

Highlights:
- New scanner-lib modules: humanizer.mjs, humanizer-data.mjs (TRANSLATIONS
  for 13 scanner prefixes)
- New --raw flag threaded through every CLI for byte-stable v5.0.0
  verbatim output (--json unchanged from v5.0.0, also byte-stable)
- 5 user-impact categories, 5 action-language phrases, 3 relevance contexts
- Self-audit terminal output also humanized; --json path unchanged
- 21 command and agent templates updated for humanized rendering with
  --raw passthrough
- 635 → 792 tests (+157) including SC-3 forbidden-words lint, SC-4
  scenario read-test, SC-5/6/7 backwards-compat snapshots

Migration:
- Existing --json automation: zero changes required (envelope is
  byte-stable with v5.0.0; humanizer fields are bypassed)
- stderr-scraping tooling: review default mode (now uses prose); pass
  --raw for v5.0.0 verbatim
- No scanner-internal changes (IDs, severity ladders, scoring weights,
  area scorecards all unchanged)

Verification:
- 792/792 tests pass
- self-audit configGrade A (97), pluginGrade A (100), readmeCheck passed
- README badge: tests-635+ → tests-792+
2026-05-01 20:38:07 +02:00
Kjell Tore Guttormsen
fc8808d6e4 docs(humanizer): v5.1.0 release notes across plugin + marketplace docs
- Plugin README: add "What's New in v5.1.0" section with humanizer overview,
  before/after example, plain-language vocabulary table, --raw flag docs.
  Bump version badge 5.0.0 → 5.1.0. Add Version History row.
- Plugin CLAUDE.md: add humanizer.mjs + humanizer-data.mjs to Scanner Lib
  table. Add "Plain-Language Output (v5.1.0)" section documenting output
  modes, vocabularies, and Wave 5 lessons. Bump test count 635 → 792 across
  52 test files.
- Marketplace root README: bump config-audit entry 5.0.0 → 5.1.0, update
  one-line description to mention plain-language UX, add bullet for the
  v5.1.0 humanizer, bump test count 635+ → 792+.

Test-normalizer hardening (consequence of growing CLAUDE.md):
walkClaudeMdCascade walks upward from the marketplace-medium fixture into
this plugin's own CLAUDE.md, so any docs edit ripples into
`scanners[*].activeConfig.claudeMdEstimatedTokens`. The v5.0.0 byte-stability
contract is about scanner internals being unchanged, not ancestor input
content being frozen. Normalizers in json-backcompat, raw-backcompat,
posture-humanizer, scan-orchestrator-humanizer, and snapshot-default-output
now strip claudeMdEstimatedTokens to <ANCESTOR_DERIVED>. The
default-output snapshot for scan-orchestrator was re-seeded via
UPDATE_SNAPSHOT=1 (intent: Wave 6 docs additions; humanizer prose
unchanged).

Verify:
- grep -E "5\.1\.0|v5\.1\.0" README.md CLAUDE.md ../../README.md | wc -l = 12
- node --test 'tests/**/*.test.mjs' = 792/792 pass
- self-audit configGrade A (97), pluginGrade A (100), readmeCheck.passed true
2026-05-01 20:35:24 +02:00