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)
This commit is contained in:
Kjell Tore Guttormsen 2026-05-03 20:16:37 +02:00
commit 2ad02ed002
7 changed files with 3912 additions and 5882 deletions

View file

@ -172,40 +172,46 @@ claude --plugin ./plugins/ms-ai-architect
/architect:help
```
## Playground
## Playground (v3)
Interaktiv 5-stegs arkitektur-pipeline for Microsoft AI-beslutninger.
Interaktiv decision-builder + rapport-viewer for Microsoft AI-beslutninger. Erstatter v2 5-stegs-pipelinen med en multi-surface-app som persisterer state og visualiserer importerte rapporter inline. Spec: v3-arkitektur dokumentert under `.claude/projects/2026-05-03-playground-v3-architecture/`.
- **Fil:** `playground/ms-ai-architect-playground.html` (~1990 linjer)
- **Spec:** `docs/playground-v2-spec.md`
- **Build:** `playground/build/` (7 deler, brukes kun under utvikling — slettes etter assembly)
- **Innhold:** 11 Azure AI-tjenester, 8 kategorier, 76 kapabiliteter, 8 scenarioer, 9 command pipelines
- **5-stegs pipeline:** Intake (wizard) -> Utforsk (filtrert katalog) -> Konfigurer (parametere + compliance) -> Gjennomgang (cost P10/P50/P90 + risiko) -> Eksporter (4 formater)
- **3 brukernivaer:** "Guide meg" (wizard), "La meg utforske" (browse), "Jeg vet hva jeg vil" (direkte)
- **4 eksport-formater:** Strukturert prompt, Command pipeline med per-command copy, Markdown brief, JSON Decision Record
- **Data extensions (vs v1):** `skill` (citizen/pro/devops), `setupDays`, `userRec` per item + `COMMAND_PIPELINES` per scenario
- **Fil:** `playground/ms-ai-architect-playground.html` (~3870 linjer, single-file v3-arkitektur)
- **4 surfaces:** Onboarding (18 felles felt fra `/architect:onboard`) → Home (prosjekt-liste + 3 entry-tracks) → Catalog (24 commands gruppert i 5 expansion-grupper med søk) → Project (per-prosjekt tabs, command-form-prefill fra felles state, paste-back-import med rapport-visualisering)
- **Persistens:** IndexedDB-primær med localStorage-fallback. Schema-versjonert (`STATE_KEY = 'ms-ai-architect-state-v1'`) med eager `MIGRATIONS`-pipeline for fremtidige skjema-endringer.
- **17 rapport-renderers:** Hver rapport-produserende command har én markdown-parser (markdown → struktur) og én renderer (struktur → HTML-visualisering: pyramide, matrix, radar, findings, distribution, capability-matrix, m.fl.) rutet via en kanonisk archetype-routing-tabell.
- **Theme:** Mørk default + lys theme-toggle, persistert i `localStorage('ms-ai-architect-theme')`. Theme-bootstrap-script i `<head>` unngår FOUC.
- **Eksport/import:** JSON Decision Record-envelope (Blob + FileReader), schema-versjon-bevisst på import.
### Vendored design-system (2026-05-03)
### Validering
| Test | Kommando | Dekning |
|------|----------|---------|
| Statisk struktur | `bash tests/test-playground-v3.sh` | 170 PASS — vendored CSS, surfaces, 24 commands, 14 parsere, 17 renderers, design-system-klasser, action-handlers |
| Parser-fixtures | `bash tests/test-playground-parsers.sh` | 70 PASS — 17 fixtures × parser-routing |
| Kombinert (E2E) | `bash tests/run-e2e.sh --playground` | begge over |
| Manuell A11Y QA | Se `playground/MANUAL-CHECKLIST.md` | 10 seksjoner inkl. axe-core-kjøring per surface |
| A11Y-rapport | `playground/A11Y-RAPPORT.md` | Skjelett — fylles ut etter kjøring |
### Vendored design-system
Playground laster CSS fra `playground/vendor/playground-design-system/` — en vendored
kopi av marketplace-rotens `shared/playground-design-system/`. Dette holder pluginen
**standalone**: HTML-filen kan åpnes fra `file://` uavhengig av marketplace-roten.
- **Sync-kilde:** `shared/playground-design-system/` (commit `f1fecf3` på sync-tidspunktet)
- **Sync-skript:** `node scripts/sync-design-system.mjs ms-ai-architect` (ved marketplace-rot)
- **Drift-deteksjon:** `MANIFEST.json` lagrer SHA-256 per fil. Re-sync feiler hvis
vendored fil er endret lokalt — `--force` overstyrer.
- **Lastes i HTML:** `<link>`-tags til `fonts.css`, `tokens.css`, `base.css`,
`components.css`, `components-tier2.css`, `components-tier3.css`,
`components-tier3-supplement.css` (i den rekkefølgen).
- **Legacy var-shim:** Inline `<style>` mapper v2-tokens (`--bg`, `--surface`, `--accent`)
til design-system-tokens (`--color-bg`, `--color-surface`, `--color-primary-500`)
så eksisterende klasser (`.hero`, `.wizard-card`, `.scenario-card`) fortsatt fungerer.
- **Tema:** `<html data-theme="dark">` beholder dark-mode-default fra v2.
Light-mode-toggle er ikke implementert (defer).
- **Aldri rediger** filer under `vendor/playground-design-system/` direkte —
endringer går i `shared/`, deretter re-sync.
> v2-spec under `docs/playground-v2-spec.md` er beholdt som historisk
> referanse, men er IKKE gjeldende kontrakt. v3-arkitekturen er
> dokumentert i `.claude/projects/2026-05-03-playground-v3-architecture/`.
## Relaterte plugins (fremtidig)
- `ms-rag-architect` — RAG-spesialist (egen plugin)