diff --git a/plugins/ms-ai-architect/playground/ms-ai-architect-v3.html b/plugins/ms-ai-architect/playground/ms-ai-architect-v3.html index 6f54f87..4a0910c 100644 --- a/plugins/ms-ai-architect/playground/ms-ai-architect-v3.html +++ b/plugins/ms-ai-architect/playground/ms-ai-architect-v3.html @@ -488,6 +488,557 @@ window.__importState = importState; window.__MIGRATIONS = MIGRATIONS; + // ============================================================ + // COMMAND CATALOG (Step 4) + // ============================================================ + // + // Kanonisk single-source-of-truth for alle 24 commands. 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 + // + // Felles-state-felter har from='shared' + shared_path='group.field' + // (oppslag mot state.shared..). Lokale felter har + // from='local' og lagres i project.reports[id].input. + // + // Verktøy-commands (architect, help, research, diagram, onboard, + // generate-skills, export) har produces_report=false og null for + // archetype/root/renderer — Step 11/12 hopper over dem. + + const FIELD_TYPES = { + TEXT: 'text', + TEXTAREA: 'textarea', + SELECT: 'select', + MULTI_SELECT: 'multiSelect', + BOOLEAN: 'boolean', + NUMBER: 'number' + }; + + // Felles felt-shorthands. Holder CATALOG kompakt og sikrer at samme + // felles-felt har eksakt samme label/type på tvers av alle commands + // som bruker det. + const SHARED = { + organisation_name: { id: 'organisation_name', label: 'Virksomhet', type: 'text', from: 'shared', shared_path: 'organization.name' }, + sector: { id: 'sector', label: 'Sektor', type: 'select', from: 'shared', shared_path: 'organization.sector', options: ['Statlig', 'Kommunal', 'Fylkeskommune', 'Helseforetak', 'Undervisning', 'Annet'] }, + regulatory_requirements: { id: 'regulatory_requirements', label: 'Regulatoriske krav', type: 'multiSelect', from: 'shared', shared_path: 'organization.regulatory_requirements', options: ['Personopplysningsloven/GDPR', 'Sikkerhetsloven', 'Arkivloven', 'Forvaltningsloven', 'Offentleglova', 'Helseregisterloven', 'Annet'] }, + cloud_platform: { id: 'cloud_platform', label: 'Skyplattform', type: 'multiSelect', from: 'shared', shared_path: 'technology.cloud_platform', options: ['Azure', 'M365', 'Power Platform', 'On-prem', 'Hybrid', 'Annet'] }, + license_type: { id: 'license_type', label: 'Lisenstype', type: 'select', from: 'shared', shared_path: 'technology.license_type', options: ['E3', 'E5', 'F1/F3', 'A3/A5', 'G3/G5', 'Annet'] }, + ai_services_in_use: { id: 'ai_services_in_use', label: 'AI-tjenester i bruk', type: 'multiSelect', from: 'shared', shared_path: 'technology.ai_services_in_use', options: ['Azure OpenAI', 'Copilot for M365', 'Copilot Studio', 'AI Builder', 'Azure AI Search', 'Azure AI Services', 'Ingen', 'Annet'] }, + data_classification: { id: 'data_classification', label: 'Dataklassifisering', type: 'multiSelect', from: 'shared', shared_path: 'security.data_classification', options: ['Åpen', 'Intern', 'Fortrolig', 'Strengt fortrolig', 'Hemmelig'] }, + dpia_practice: { id: 'dpia_practice', label: 'DPIA-praksis i organisasjonen', type: 'select', from: 'shared', shared_path: 'security.dpia_practice', options: ['Systematisk', 'Ad hoc', 'Ikke etablert', 'Usikker'] }, + annual_ai_budget: { id: 'annual_ai_budget', label: 'Årlig AI-budsjett', type: 'select', from: 'shared', shared_path: 'architecture.annual_ai_budget', options: ['<500k', '500k-2M', '2M-10M', '>10M', 'Ikke definert'] } + }; + + const PLATFORMS = ['Azure AI Foundry', 'Copilot Studio', 'M365 Copilot', 'Power Automate', 'AI Builder', 'Azure OpenAI', 'Azure AI Search', 'Annet']; + const RISK_LEVELS = ['minimal', 'limited', 'high', 'forbidden', 'ukjent']; + const ORG_ROLES = ['provider', 'deployer', 'distributor', 'importer', 'usikker']; + + const CATALOG = { + version: '1.0', + generated_for_schema: SCHEMA_VERSION, + categories: [ + { id: 'regulatory', label: 'Regulatorisk', count: 6 }, + { id: 'security', label: 'Sikkerhet', count: 3 }, + { id: 'economy', label: 'Økonomi', count: 2 }, + { id: 'documentation', label: 'Dokumentasjon', count: 6 }, + { id: 'tool', label: 'Verktøy', count: 7 } + ], + commands: [ + // ===== REGULATORY (6) ===== + { + id: 'classify', + category: 'regulatory', + label: 'EU AI Act — Klassifisering', + description: 'Klassifiser AI-system etter EU AI Act-risikonivå (forbidden/high/limited/minimal) og bestem rolle.', + argument_hint: '[system-beskrivelse]', + calls_agent: 'ai-act-assessor', + kb_files: ['ai-act-classification-methodology.md', 'ai-act-annex-iii-checklist.md', 'ai-act-compliance-guide.md'], + produces_report: true, + report_archetype: 'aiact', + report_root_class: 'pyramide', + renderer: 'renderAiActPyramid', + input_fields: [ + SHARED.organisation_name, + SHARED.sector, + { id: 'system_name', label: 'Systemnavn', type: 'text', from: 'local' }, + { id: 'system_description', label: 'Systembeskrivelse', type: 'textarea', from: 'local' }, + { id: 'users', label: 'Brukere', type: 'text', from: 'local' }, + { id: 'interaction_type', label: 'Interaksjonstype', type: 'select', from: 'local', options: ['chatbot', 'beslutningsstøtte', 'automatisering', 'anbefaling', 'annet'] }, + { id: 'data_sources', label: 'Datakilder', type: 'textarea', from: 'local' }, + { id: 'risk_level_assumption', label: 'Risk-level (forhåndsvurdering)', type: 'select', from: 'local', options: RISK_LEVELS } + ] + }, + { + id: 'requirements', + category: 'regulatory', + label: 'EU AI Act — Krav per risiko + rolle', + description: 'Konkrete AI Act-forpliktelser basert på klassifisering og rolle (provider/deployer).', + argument_hint: '[system-beskrivelse el. klassifisering]', + calls_agent: 'ai-act-assessor', + kb_files: ['ai-act-provider-obligations.md', 'ai-act-deployer-obligations.md', 'ai-act-microsoft-tools-mapping.md'], + produces_report: true, + report_archetype: 'requirements-list', + report_root_class: 'findings', + renderer: 'renderRequirements', + input_fields: [ + SHARED.organisation_name, + SHARED.sector, + { id: 'system_name', label: 'Systemnavn', type: 'text', from: 'local' }, + { id: 'system_description', label: 'Systembeskrivelse', type: 'textarea', from: 'local' }, + { id: 'risk_classification', label: 'Risikoklassifisering', type: 'select', from: 'local', options: RISK_LEVELS }, + { id: 'org_role', label: 'Rolle', type: 'select', from: 'local', options: ORG_ROLES } + ] + }, + { + id: 'transparency', + category: 'regulatory', + label: 'Transparensnotis (Art. 13/50)', + description: 'Generer Art. 13/50-transparensnotis på norsk for AI-system.', + argument_hint: '[system-beskrivelse]', + calls_agent: 'ai-act-assessor', + kb_files: ['ai-act-transparency-notices.md'], + produces_report: true, + report_archetype: 'text-document', + report_root_class: 'markdown-fallback', + renderer: 'renderTransparency', + input_fields: [ + SHARED.organisation_name, + SHARED.sector, + { id: 'system_name', label: 'Systemnavn', type: 'text', from: 'local' }, + { id: 'system_description', label: 'Systembeskrivelse', type: 'textarea', from: 'local' }, + { id: 'interaction_type', label: 'Interaksjonstype', type: 'select', from: 'local', options: ['chatbot', 'beslutningsstøtte', 'automatisering', 'anbefaling', 'annet'] }, + { id: 'target_audience', label: 'Målgruppe', type: 'text', from: 'local' }, + { id: 'risk_classification', label: 'Risikoklassifisering', type: 'select', from: 'local', options: RISK_LEVELS } + ] + }, + { + id: 'frimpact', + category: 'regulatory', + label: 'FRIA (Art. 27)', + description: 'Fundamental Rights Impact Assessment — obligatorisk for offentlig sektor som deployer.', + argument_hint: '[system-beskrivelse]', + calls_agent: 'ai-act-assessor', + kb_files: ['ai-act-fria-template.md', 'ai-act-deployer-obligations.md'], + produces_report: true, + report_archetype: 'fria', + report_root_class: 'rights-matrix', + renderer: 'renderFria', + input_fields: [ + SHARED.organisation_name, + SHARED.sector, + { id: 'system_name', label: 'Systemnavn', type: 'text', from: 'local' }, + { id: 'system_description', label: 'Systembeskrivelse', type: 'textarea', from: 'local' }, + { id: 'affected_groups', label: 'Berørte grupper', type: 'textarea', from: 'local' }, + { id: 'decisions_affected', label: 'Beslutninger som påvirkes', type: 'textarea', from: 'local' }, + { id: 'risk_classification', label: 'Risikoklassifisering', type: 'select', from: 'local', options: RISK_LEVELS } + ] + }, + { + id: 'conformity', + category: 'regulatory', + label: 'Samsvarsvurdering (Art. 43)', + description: 'Annex IV-sjekkliste og EU-erklæring for høyrisiko AI-systemer.', + argument_hint: '[system-beskrivelse]', + calls_agent: 'ai-act-assessor', + kb_files: ['ai-act-conformity-assessment.md', 'ai-act-provider-obligations.md'], + produces_report: true, + report_archetype: 'conformity-checklist', + report_root_class: 'findings', + renderer: 'renderConformity', + input_fields: [ + SHARED.organisation_name, + SHARED.sector, + { id: 'system_name', label: 'Systemnavn', type: 'text', from: 'local' }, + { id: 'system_description', label: 'Systembeskrivelse', type: 'textarea', from: 'local' }, + { id: 'risk_classification', label: 'Risikoklassifisering', type: 'select', from: 'local', options: RISK_LEVELS }, + { id: 'org_role', label: 'Rolle', type: 'select', from: 'local', options: ORG_ROLES }, + { id: 'existing_documentation', label: 'Eksisterende dokumentasjon', type: 'textarea', from: 'local' } + ] + }, + { + id: 'dpia', + category: 'regulatory', + label: 'DPIA / PVK', + description: 'Personvernkonsekvensvurdering for AI-system med risikomatrise og tiltakstabell.', + argument_hint: '[system-beskrivelse]', + calls_agent: 'dpia-agent', + kb_files: ['dpia-norwegian-methodology-ai.md', 'gdpr-compliance-ai-systems.md', 'ai-impact-assessment-framework.md'], + produces_report: true, + report_archetype: 'matrix-risk', + report_root_class: 'matrix', + renderer: 'renderDpia', + input_fields: [ + SHARED.organisation_name, + SHARED.sector, + SHARED.dpia_practice, + { id: 'system_name', label: 'Systemnavn', type: 'text', from: 'local' }, + { id: 'system_description', label: 'Systembeskrivelse', type: 'textarea', from: 'local' }, + { id: 'personal_data_types', label: 'Typer personopplysninger', type: 'textarea', from: 'local' }, + { id: 'data_subjects', label: 'Registrerte (data subjects)', type: 'text', from: 'local' }, + { id: 'legal_basis', label: 'Behandlingsgrunnlag (GDPR Art. 6)', type: 'select', from: 'local', options: ['Samtykke', 'Avtale', 'Rettslig forpliktelse', 'Vitale interesser', 'Allmenn interesse', 'Berettiget interesse'] }, + { id: 'data_sources', label: 'Datakilder', type: 'textarea', from: 'local' } + ] + }, + + // ===== SECURITY (3) ===== + { + id: 'security', + category: 'security', + label: 'Sikkerhetsvurdering (6×5)', + description: 'Sikkerhetsvurdering på 6 dimensjoner med 1-5 score, OWASP LLM Top 10.', + argument_hint: '[plattform] for [bruksscenario]', + calls_agent: 'security-assessment-agent', + kb_files: ['security-scoring-rubrics-6x5.md', 'ai-security-scoring-framework.md', 'ai-threat-modeling-stride.md'], + produces_report: true, + report_archetype: 'matrix-risk-6x5', + report_root_class: 'matrix', + renderer: 'renderSecurity', + input_fields: [ + SHARED.organisation_name, + SHARED.sector, + SHARED.cloud_platform, + SHARED.data_classification, + { id: 'platform', label: 'Plattform', type: 'select', from: 'local', options: PLATFORMS }, + { id: 'use_case', label: 'Bruksscenario', type: 'textarea', from: 'local' }, + { id: 'citizen_facing', label: 'Eksponert for innbyggere?', type: 'boolean', from: 'local' }, + { id: 'data_sources', label: 'Datakilder', type: 'textarea', from: 'local' } + ] + }, + { + id: 'ros', + category: 'security', + label: 'ROS-analyse (NS 5814 / ISO 31000)', + description: 'Risiko- og sårbarhetsanalyse med 7 dimensjoner og 49-trussel-bibliotek.', + argument_hint: '[system-beskrivelse] [--quick]', + calls_agent: 'ros-analysis-agent', + kb_files: ['ros-ai-threat-library.md', 'ros-scoring-rubrics-7x5.md', 'ros-methodology-ns5814-iso31000.md'], + produces_report: true, + report_archetype: 'matrix-risk', + report_root_class: 'matrix', + renderer: 'renderRos', + input_fields: [ + SHARED.organisation_name, + SHARED.sector, + { id: 'system_name', label: 'Systemnavn', type: 'text', from: 'local' }, + { id: 'system_description', label: 'Systembeskrivelse', type: 'textarea', from: 'local' }, + { id: 'complexity', label: 'Kompleksitet', type: 'select', from: 'local', options: ['ENKEL', 'MIDDELS', 'KOMPLEKS'] }, + { id: 'quick_mode', label: 'Hurtig-modus (mal A)', type: 'boolean', from: 'local' } + ] + }, + { + id: 'review', + category: 'security', + label: 'Arkitekturgjennomgang', + description: 'Gjennomgang mot Digdir, AI Act, NSM, Schrems II og norsk offentlig sektor-krav.', + argument_hint: '[arkitektur el. kontekst]', + calls_agent: 'architecture-review-agent', + kb_files: ['decision-trees.md', 'security.md', 'public-sector-checklist.md'], + produces_report: true, + report_archetype: 'findings', + report_root_class: 'findings', + renderer: 'renderReview', + input_fields: [ + SHARED.organisation_name, + SHARED.sector, + { id: 'architecture_description', label: 'Arkitekturbeskrivelse', type: 'textarea', from: 'local' }, + { id: 'review_stage', label: 'Stadium', type: 'select', from: 'local', options: ['Pre-implementering', 'POC', 'Produksjon'] } + ] + }, + + // ===== ECONOMY (2) ===== + { + id: 'cost', + category: 'economy', + label: 'Kostnadsestimat (P10/P50/P90 NOK)', + description: 'Kostnadsestimering med konfidensgradering og TCO-sammenligning.', + argument_hint: '[plattform] med [antall brukere], [volum/dag]', + calls_agent: 'cost-estimation-agent', + kb_files: ['deterministic-cost-calculation-model.md', 'azure-ai-foundry-cost-governance.md', 'cost-models.md'], + produces_report: true, + report_archetype: 'cost-distribution', + report_root_class: 'distribution', + renderer: 'renderCost', + input_fields: [ + SHARED.organisation_name, + SHARED.license_type, + SHARED.cloud_platform, + { id: 'platform', label: 'Plattform', type: 'select', from: 'local', options: PLATFORMS }, + { id: 'users', label: 'Antall brukere', type: 'number', from: 'local' }, + { id: 'volume_per_day', label: 'Volum per dag (transaksjoner/forespørsler)', type: 'text', from: 'local' }, + { id: 'region', label: 'Region', type: 'select', from: 'local', options: ['Norge (Norway East/West)', 'EU/EØS', 'Globalt'] } + ] + }, + { + id: 'license', + category: 'economy', + label: 'Lisens → AI-kapabiliteter', + description: 'Map lisenstype mot inkluderte AI-kapabiliteter og identifiser gap.', + argument_hint: '[lisenstype]', + calls_agent: 'license-mapper-agent', + kb_files: ['licensing-matrix.md'], + produces_report: true, + report_archetype: 'capability', + report_root_class: 'capability-matrix', + renderer: 'renderLicense', + input_fields: [ + SHARED.organisation_name, + SHARED.license_type, + SHARED.ai_services_in_use, + { id: 'license_types', label: 'Lisenser å vurdere', type: 'multiSelect', from: 'local', options: ['E3', 'E5', 'F1/F3', 'A3/A5', 'G3/G5', 'Copilot for M365', 'Power Platform Premium'] } + ] + }, + + // ===== DOCUMENTATION (6) ===== + { + id: 'migrate', + category: 'documentation', + label: 'Migreringsplan', + description: 'Plan for migrasjon mellom Microsoft AI-plattformer.', + argument_hint: 'fra [kilde] til [mål]', + calls_agent: null, + kb_files: ['migration-patterns.md'], + produces_report: true, + report_archetype: 'phased-plan', + report_root_class: 'aiact-timeline', + renderer: 'renderMigrate', + input_fields: [ + SHARED.organisation_name, + { id: 'source_platform', label: 'Fra (kildeplattform)', type: 'select', from: 'local', options: PLATFORMS }, + { id: 'target_platform', label: 'Til (målplattform)', type: 'select', from: 'local', options: PLATFORMS }, + { id: 'system_description', label: 'Systembeskrivelse', type: 'textarea', from: 'local' }, + { id: 'timeline_weeks', label: 'Tidslinje (uker)', type: 'number', from: 'local' } + ] + }, + { + id: 'adr', + category: 'documentation', + label: 'ADR (MADR v3.0)', + description: 'Architecture Decision Record i MADR v3.0-format.', + argument_hint: '[valgfritt: tittel]', + calls_agent: 'adr-writer-agent', + kb_files: ['adr-template.md'], + produces_report: true, + report_archetype: 'markdown', + report_root_class: 'markdown-fallback', + renderer: 'renderAdr', + input_fields: [ + SHARED.organisation_name, + { id: 'decision_title', label: 'Beslutningstittel', type: 'text', from: 'local' }, + { id: 'decision_context', label: 'Kontekst', type: 'textarea', from: 'local' }, + { id: 'alternatives', label: 'Alternativer vurdert', type: 'textarea', from: 'local' }, + { id: 'decision', label: 'Valgt løsning', type: 'textarea', from: 'local' } + ] + }, + { + id: 'summary', + category: 'documentation', + label: 'Teknisk sammendrag + beslutningsnotat', + description: 'Aggregerer .work/-rapporter til teknisk sammendrag og beslutningsnotat.', + argument_hint: '[løsningsnavn]', + calls_agent: 'summary-agent', + kb_files: [], + produces_report: true, + report_archetype: 'verdict', + report_root_class: 'verdict-block', + renderer: 'renderSummary', + input_fields: [ + SHARED.organisation_name, + { id: 'solution_name', label: 'Løsningsnavn', type: 'text', from: 'local' } + ] + }, + { + id: 'poc', + category: 'documentation', + label: 'POC-plan', + description: 'POC-plan med suksesskriterier, tidslinje, risiko og Go/No-Go.', + argument_hint: '[plattform] for [use case]', + calls_agent: null, + kb_files: ['poc-template.md'], + produces_report: true, + report_archetype: 'phased-plan', + report_root_class: 'pipeline-cockpit', + renderer: 'renderPoc', + input_fields: [ + SHARED.organisation_name, + SHARED.sector, + SHARED.annual_ai_budget, + { id: 'platform', label: 'Plattform', type: 'select', from: 'local', options: PLATFORMS }, + { id: 'use_case', label: 'Use case', type: 'textarea', from: 'local' }, + { id: 'team_size', label: 'Team-størrelse', type: 'number', from: 'local' }, + { id: 'team_level', label: 'Team-nivå', type: 'select', from: 'local', options: ['Junior', 'Mid', 'Senior', 'Mixed'] }, + { id: 'timeline_weeks', label: 'Tidslinje (uker)', type: 'number', from: 'local' }, + { id: 'stakeholders', label: 'Interessenter', type: 'textarea', from: 'local' } + ] + }, + { + id: 'utredning', + category: 'documentation', + label: 'AI-arkitekturutredning (off. sektor)', + description: 'Full S0–S9 arkitekturutredning for norsk offentlig sektor.', + argument_hint: '[scenario]', + calls_agent: null, + kb_files: ['ai-utredning-template.md'], + produces_report: true, + report_archetype: 'markdown', + report_root_class: 'markdown-fallback', + renderer: 'renderUtredning', + input_fields: [ + SHARED.organisation_name, + SHARED.sector, + SHARED.regulatory_requirements, + { id: 'scenario_name', label: 'Scenario-navn', type: 'text', from: 'local' }, + { id: 'scenario_description', label: 'Scenario-beskrivelse', type: 'textarea', from: 'local' }, + { id: 'system_description', label: 'Systembeskrivelse', type: 'textarea', from: 'local' } + ] + }, + { + id: 'compare', + category: 'documentation', + label: 'Sammenlign plattformer', + description: 'Side-by-side sammenligning av Microsoft AI-plattformer for et use case.', + argument_hint: '[plattform A] vs [plattform B] for [use case]', + calls_agent: 'research-agent', + kb_files: ['decision-trees.md'], + produces_report: true, + report_archetype: 'comparison', + report_root_class: 'diff', + renderer: 'renderCompare', + input_fields: [ + SHARED.organisation_name, + { id: 'platform_a', label: 'Plattform A', type: 'select', from: 'local', options: PLATFORMS }, + { id: 'platform_b', label: 'Plattform B', type: 'select', from: 'local', options: PLATFORMS }, + { id: 'use_case', label: 'Use case', type: 'textarea', from: 'local' } + ] + }, + + // ===== TOOL (7) — ingen rapport, kun skjema + output-kopiering ===== + { + id: 'architect', + category: 'tool', + label: 'Start Cosmo-rådgivning', + description: 'Start strukturert AI-arkitekturrådgivning med Cosmo Skyberg-persona.', + argument_hint: '[beskriv ditt forretningsproblem]', + calls_agent: null, + kb_files: [], + produces_report: false, + report_archetype: null, + report_root_class: null, + renderer: null, + input_fields: [ + SHARED.organisation_name, + SHARED.sector, + { id: 'business_problem', label: 'Forretningsproblem', type: 'textarea', from: 'local' } + ] + }, + { + id: 'help', + category: 'tool', + label: 'Hjelp', + description: 'Vis kommando-/agent-/KB-oversikt eller detaljer for et emne.', + argument_hint: '[emne for detaljer]', + calls_agent: null, + kb_files: [], + produces_report: false, + report_archetype: null, + report_root_class: null, + renderer: null, + input_fields: [ + { id: 'topic', label: 'Emne (valgfritt)', type: 'text', from: 'local' } + ] + }, + { + id: 'research', + category: 'tool', + label: 'Plattform-research', + description: 'Siste-nytt-research for en Microsoft AI-plattform.', + argument_hint: '[plattformnavn] [tidsperiode]', + calls_agent: 'research-agent', + kb_files: [], + produces_report: false, + report_archetype: null, + report_root_class: null, + renderer: null, + input_fields: [ + { id: 'platform', label: 'Plattform', type: 'select', from: 'local', options: PLATFORMS }, + { id: 'time_period', label: 'Tidsperiode', type: 'select', from: 'local', options: ['siste uke', 'siste måned', 'siste kvartal', 'siste år'] } + ] + }, + { + id: 'diagram', + category: 'tool', + label: 'Generer arkitekturdiagram', + description: 'Generer arkitekturdiagram med Imagen 3 (mcp-image).', + argument_hint: '[type] for [scenario]', + calls_agent: 'diagram-generation-agent', + kb_files: ['diagram-prompt-templates.md'], + produces_report: false, + report_archetype: null, + report_root_class: null, + renderer: null, + input_fields: [ + { id: 'diagram_type', label: 'Diagramtype', type: 'select', from: 'local', options: ['arkitektur', 'sikkerhet', 'dataflyt', 'problem', 'roadmap'] }, + { id: 'scenario', label: 'Scenario', type: 'text', from: 'local' }, + { id: 'component_list', label: 'Komponenter (valgfritt)', type: 'textarea', from: 'local' } + ] + }, + { + id: 'onboard', + category: 'tool', + label: 'Onboard plugin', + description: 'Onboard pluginen med virksomhetsspesifikk kontekst (5-fase intervju).', + argument_hint: '[--status]', + calls_agent: 'onboarding-agent', + kb_files: [], + produces_report: false, + report_archetype: null, + report_root_class: null, + renderer: null, + input_fields: [ + { id: 'status_only', label: 'Bare vis status', type: 'boolean', from: 'local' } + ] + }, + { + id: 'generate-skills', + category: 'tool', + label: 'Generer KB-filer (batch)', + description: 'Generer kunnskapsfiler med MCP-research i batch.', + argument_hint: '[antall]', + calls_agent: null, + kb_files: [], + produces_report: false, + report_archetype: null, + report_root_class: null, + renderer: null, + input_fields: [ + { id: 'count', label: 'Antall filer å generere', type: 'number', from: 'local' } + ] + }, + { + id: 'export', + category: 'tool', + label: 'Eksporter til PDF', + description: 'Eksporter et arkitekturdokument til PDF.', + argument_hint: '[filsti til markdown]', + calls_agent: null, + kb_files: [], + produces_report: false, + report_archetype: null, + report_root_class: null, + renderer: null, + input_fields: [ + { id: 'file_path', label: 'Filsti til markdown', type: 'text', from: 'local' } + ] + } + ] + }; + + // Eksponer for Step 5/8/9/11/12 og DevTools. + window.__CATALOG = CATALOG; + window.__SHARED_FIELDS = SHARED; + window.__FIELD_TYPES = FIELD_TYPES; + // Auto-bootstrap. Kjør så snart DOM er parsed; vi er på slutten av // så DOM er allerede klar. bootstrap().catch(function (err) {