Commit graph

417 commits

Author SHA1 Message Date
40631c0eee feat(playground-design-system): v0.3.0 — playground/report-page foundation primitives [skip-docs]
Hoists 13 generic CSS components (sections 13-25 in tier3-supplement) from
ms-ai-architect inline CSS to shared/ so all 5 plugin consumers get the same
vocabulary and visual signature.

Shared additions:
- .eyebrow utility, .page__* page-shell (header/title/eyebrow/lede/meta)
- .key-stats grid + .key-stat + severity modifiers (large tabular-nums values)
- .verdict-pill-lg 5-band extension (critical/high/medium/low/positive/n-a)
- .tab-list / .tab / .tab-panel generic tab-component
- .top-risks / .top-risk[data-severity] severity-ordered risk list
- .recommendation-card[data-severity] emphasized advisory callout
- .card__head/title/desc/id/meta/hint/actions/pill subcomponents
- .card--severity-{level} 4px left-border modifier
- Form patterns (.field-row, .field-label, .field-help, .multi-select,
  .checkbox-row, .required-mark)
- .stack-lg/.stack-md/.stack-sm vertical rhythm utilities
- .pyramide-tier-detail expandable details below pyramide
- .scenario-card-grid + .scenario-card[data-status="winner"] grid pattern
- .app-shell / .app-shell--wide / .app-shell--narrow page wrappers

Total: 567 new lines in tier3-supplement.css, 107 new selectors. Purely
additive — no existing selector changed or removed. v0.2 -> v0.3.
DS CHANGELOG.md updated with full v0.3 entry.

ms-ai-architect playground:
- Re-synced vendored DS to v0.3 (force flag — overwrites stale v0.2 vendor)
- Deleted 8 inline DUPLICATE definitions (.app-shell* + form patterns) now
  served by shared DS
- Inline <style> block: 210 -> 202 lines (start of multi-session refactor;
  remaining PARALLEL classes migrate in Session 2)

Tests: 215 + 201 + 70 + 7 = 493 PASS. No regressions.

Plugin user-facing docs (README, CLAUDE.md, marketplace landing) update in
Session 3 (Phase 9) when full v1.11.0 ships. This commit is internal
foundation work — DS CHANGELOG already documents the shared changes.

Session 1 of 3 in v1.11.0 design-system 100%-adoption refactor.
Plan: /Users/ktg/.claude/plans/jeg-skal-pr-ve-effervescent-token.md

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 10:00:44 +02:00
e3378e9b9c feat(ms-ai-architect): release v1.10.1 — demo system + screenshot gallery
Adds one-click demo and committed screenshots so forkers see what the plugin
produces without running anything. Plugin contract unchanged.

- Inline <script id="demo-state-v1"> block (37 KB) built by
  scripts/build-demo-state.mjs from playground/test-fixtures/*.md
- "Last inn demo-data" button on onboarding (replaces all state with demo)
- raw_markdown persistence on project.reports[id] with equal-value guard
- rehydratePasteImports() auto-fills textareas + re-renders visualizations
  on project surface mount
- tests/screenshot/ standalone Playwright runner (own package.json)
- 24 committed screenshots in playground/screenshots/v1.10.0/
  (12 surfaces x 2 themes, deviceScaleFactor 2 retina, fullPage)

Tests: 215 + 201 + 70 + 7 = 493 PASS, no regressions.

Docs updated per OBLIGATORISK three-level rule (plugin README, plugin CLAUDE,
marketplace root README, CHANGELOG).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 09:24:02 +02:00
67240f01f6 test(ultraplan-local): add path-guard + bash-guard baseline hook tests (SC8 baseline)
Pins existing BLOCK rules in the two pre-* executor hooks so a future
silent weakening of BLOCK_RULES surfaces as test failures instead of
slipping through code review.

50 new tests covering both hooks plus allow-list pins (lib/, tests/,
docs/, ls, git, npm) and fail-open on malformed input. Reuses
tests/helpers/hook-helper.mjs child-process spawner.

[skip-docs]
2026-05-04 08:55:49 +02:00
6f3519c551 chore(ultraplan-local): bump v3.4.0 + autonomy chain + parallel hardenings + schema-drift seal
Ships the speedup work documented in plan-v2 of project
2026-05-03-ultra-pipeline-speedup.

Adds:
- --gates {open|closed|adaptive} flag on all four pipeline commands
- lib/util/autonomy-gate.mjs state machine (idle → main-merged)
- lib/review/plan-review-dedup.mjs (Phase 9 inline dedup)
- lib/stats/event-emit.mjs (autonomy-gate transitions, main-merge gate)
- hooks/scripts/post-compact-flush.mjs PostCompact hook (rehydrate)
- Phase 8 schema-drift seal in commands/ultraplan-local.md
- Phase 2.6 wave-executor 11 hardenings
- Synthetic SC7 determinism floor (Jaccard >= 0.833) for plan + review
- Hook baseline regression pins (path-guard + bash-guard)
- examples/01-add-verbose-flag/perf-measure harness (gitignored)

Architecture decision: Path B (sequential --no-ff parallel waves with
manifest-driven failure recovery) ships in v3.4.0. Path C (cache-first
hybrid) deferred to v3.5.0 contingent on Step 6 cache-telemetry harvest.

Memory updates (Step 14, outside-repo files):
- project_ultraplan_opus47_gap.md rewritten per Path B (mitigated v1.8.0
  + plan-step-7 defense-in-depth; residual risk for plugins NOT using
  ultraplan-local prompt arch)
- MEMORY.md one-liner updated to flag mitigation status
2026-05-04 08:52:55 +02:00
bc1333ec17 chore(ultraplan-local): generalize *.local.* gitignore for perf-measure script
Replaces explicit *.local.md + *.local.json rules with single *.local.*
glob covering the new examples/01-add-verbose-flag/perf-measure.local.sh
and perf-baseline.local.md operator-driven measurement harness for SC1
wall-time gate.

The harness files themselves stay outside git (operator-run only). The
.gitignore generalization is the only tracked change.

[skip-docs]
2026-05-04 08:47:52 +02:00
0c0a87e709 test(ultraplan-local): add plan-determinism + review-determinism synthetic fixtures (SC7 floor)
Adds 6 files in tests/synthetic/ exercising the determinism pipeline at the
SC7 brief floor (Jaccard >= 0.833). Plan fixture pair: 40 step titles each
with 38 shared (Jaccard 0.905). Review fixture pair: 30 finding-IDs each
with 28 shared (Jaccard 0.875). Reuses lib/parsers/jaccard.mjs +
lib/parsers/finding-id.mjs.

The new pair coexists with tests/lib/review-determinism.test.mjs which
holds the older SC4 (0.70) floor against tests/fixtures/ultrareview/.
The lower floor protects pipeline regressions; the higher floor anchors
the speedup brief's determinism aspiration.

[skip-docs]
2026-05-04 08:46:39 +02:00
b1738b419c feat(ms-ai-architect): release v1.10.0 — felles grunnskjelett + Tier 3-adopsjon
Playground v3 internal refactor with shared visual signature across all 17
report renderers. Plugin contract (24 commands, 12 agents, 5 skills, 2 hooks,
MCP) is unchanged — release is playground-internal.

- Foundation helpers: renderPageShell, renderVerdictPill, renderKeyStatsGrid,
  inferVerdict, inferKeyStats, KEY_STATS_CONFIG
- Schema v1->v2 migration (idempotent via dataVersion=2 guard)
- Tier 3 supplement components integrated in 11 renderer slots
- Parser extensions: parsePhasedPlan (status/currentPhaseIndex/pocVerdict),
  parseComparison (winner), parseMatrixRisk (_consumer-strategi A)
- Onboarding redesign: 4 strukturerte / 14 fritekst
- Light-theme tokens (Aksel-aligned, WCAG 2.2 AA)
- Validation: 201 statisk + 70 parser + 7 migrasjon = 278 PASS

A11Y-RAPPORT.md populated with code-based static assessment of all 4 surfaces
and 17 renderers. Browser-axe-core run still pending per MANUAL-CHECKLIST.md
section 10.

Docs updated per OBLIGATORISK three-level rule:
- plugin README.md, plugin CLAUDE.md, marketplace root README.md, CHANGELOG.md

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 08:46:06 +02:00
f43a38421e feat(ultraplan-local): add PostCompact rehydrate hook to re-inject session-state after compaction
New hooks/scripts/post-compact-flush.mjs (PostCompact event, CC v2.1.105+):
auto-discovers <cwd>/.claude/projects/*/.session-state.local.json (most
recently modified), validates it via session-state-validator, emits
additionalContext via stdout so the post-compact assistant turn has
Handover 7 resume context loaded immediately.

Read-only — never writes. Always exits 0; never blocks compaction. Uses
only node:fs sync APIs available since Node 12 (no glob dependency).

Companion to the existing pre-compact-flush.mjs:
  - PreCompact: refresh progress.json + .session-state.local.json
  - PostCompact: re-inject .session-state.local.json into context

Wired in hooks/hooks.json under a new PostCompact matcher block.

Both files staged via /tmp/claude-* and copied into hooks/* via Bash to
respect the llm-security plugin path-guard (which blocks direct Write to
hooks/scripts/*.mjs and hooks*.json).

Test: tests/hooks/post-compact-flush.test.mjs (4 tests) covers no-state,
malformed-state, valid-state, and multi-project mtime selection.
2026-05-04 07:57:42 +02:00
b837274b77 feat(ultraplan-local): emit main-merge-gate stats event from Phase 8
Wire the main-merge-gate lifecycle event into commands/ultraexecute-local.md
Phase 8. Three event variants emitted via lib/stats/event-emit.mjs (S8):
  - main-merge-gate     fired at the gate boundary
  - main-merge-approved fired on operator confirm
  - main-merge-declined fired on operator decline (run recorded as partial)

The gate ALWAYS pauses regardless of gates_mode — it is the one always-on
boundary that --gates does not toggle. On decline, --resume re-enters at
the gate, and the wave session branches survive on the remote thanks to
Hard Rule 19's push-before-cleanup. Recovery surface is documented inline.

Pin in tests/lib/main-merge-gate.test.mjs locks the always-on prose, the
event names, and the recovery-surface contract.
2026-05-04 07:55:41 +02:00
34f62043f9 feat(ultraplan-local): add --gates autonomy-control flag to all four pipeline commands
Single autonomy-control surface (--gates) added to ultrabrief, ultraresearch,
ultraplan, and ultraexecute. When present, sets gates_mode = true and
re-enables approval pauses at every phase boundary + every wave for
high-stakes runs. When absent (default in auto), the chain runs continuously
to the main-merge gate (which always pauses regardless of --gates — that
boundary is the one always-on safety stop).

ultrabrief:    pause after auto-mode confirmation; emit brief-approved event
ultraresearch: pause after each topic completes
ultraplan:     pause after Phases 5, 7, 9
ultraexecute:  pause after each wave's worktrees finish, before merge-back,
               AND before the main-merge gate (MAIN_MERGE_GATE)

All four commands invoke the autonomy-gate state machine via the CLI shim
node lib/util/autonomy-gate.mjs (built in S8). Test pin in
tests/lib/gates-flag-coverage.test.mjs locks the contract.

Also wires the brief-approved stats emission into ultrabrief Phase 5 auto
path (was the SC4 wiring requirement from plan-v2 Step 11).
2026-05-04 07:54:30 +02:00
fc48d01f1e feat(ms-ai-architect): renderer batch C (econ + docs 8) + structural test asserts [skip-docs]
Sesjon 5 av v1.10.0-løpet (8 av 17 renderers wrapped med renderPageShell).
Nå alle 17 renderers bruker felles grunnskjelett (page__eyebrow + h1 + verdict).

Renderers wrapped:
- C.1 renderCost: eyebrow=KOSTNAD, key-stats utvidet med DOMINERENDE-komponent
- C.2 renderLicense: eyebrow=LISENS, scenario-card-grid per kandidat-lisens,
  TOPP-LISENS key-stat
- C.3 renderMigrate: eyebrow=MIGRASJON, E2 mat-ladder erstatter aiact-timeline,
  E4 cycle-ribbon ved aktiv fase
- C.4 renderAdr: eyebrow=ADR, D4 critique-card per beslutningsseksjon, ADR-status
  → verdict-pille (accepted/proposed/rejected/deprecated)
- C.5 renderSummary: eyebrow=SAMMENDRAG, E8 read-more for lange rationale
- C.6 renderPoc: eyebrow=POC, E2 mat-ladder + B5 traffic-light per success-kriterie,
  pocVerdict styrer verdict-pille
- C.7 renderUtredning: eyebrow=UTREDNING, A4 screen-tabs (Bakgrunn/Funn/Konklusjon/
  Anbefaling) + E8 read-more på lange seksjoner
- C.8 renderCompare: eyebrow=SAMMENLIGN, D1 scenario-cards-grid per kandidat,
  parseComparison.winner styrer vinner-pille + VINNER key-stat

Parser-utvidelser (R15 forward-compat — eksisterende fixtures uendret):
- parsePhasedPlan: phases[].status (planned/active/done), currentPhaseIndex,
  pocVerdict (kun ved POC-Verdict-linje)
- parseComparison: optional winner-felt fra "## Vinner: <id>"-linje

Topic 2 strategi A i handlePasteImport: sentralisert _consumer-tildeling
(result.data._consumer ||= cmd.id), respekterer parser-spesifikk verdi
(parseMatrixRisk → 'ros').

Fixture-updates: migrate/poc med Status: per fase + POC-Verdict, compare med
"## Vinner:"-linje.

Test-asserts (tests/test-playground-v3.sh +18 PASS, totalt 201/201):
- 25e SC8 per-renderer for batch C (8 renderers)
- 25f Step 12 must_contain (mat-ladder, screen-tabs, _consumer)
- 25g Felles grunnskjelett: alle 17 renderers bruker renderPageShell
- 25h Tier 3-bruk: kanban i conformity/review, mat-ladder i migrate/poc
- 25i Onboarding field-distribution (4 strukturerte, 14 fritekst)

Verifisert: 201/201 statiske, 70/70 parser-fixtures, 7/7 migrations PASS.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 07:52:52 +02:00
b97251bda3 feat(ultraplan-local): mirror Phase 2.6 hardenings in headless-launch-template
Bring the launch template (used by /ultraplan-local --decompose) into
contract-parity with the Phase 2.6 wave executor hardenings shipped in the
previous commit:

- GIT_OPTIONAL_LOCKS=0 exported once at the top
- MAX_TURNS / MAX_BUDGET_USD env-overridable (default 50 / 5)
- Absolute SHARED_CONTEXT_FILE built from brief + architecture
- SAFETY_PREAMBLE prepended to every per-session prompt (GH #36071 +
  GH #52272 clarifications)
- Per-child --max-turns + --max-budget-usd + --append-system-prompt-file
- push-before-cleanup before merge AND in the cleanup_worktrees trap
- Three new template rules (16, 17, 18, 19) document the contract for
  session-decomposer

Pin in tests/lib/doc-consistency.test.mjs locks all required substrings
against future regressions.
2026-05-04 07:51:50 +02:00
41a0c913fa feat(ultraplan-local): harden Phase 2.6 wave executor (11 sub-changes for plugin-in-monorepo + gitignored-state topology)
Phase 2.6 + Hard Rules + Phase 2.4 hardenings against the topology that
blocked S6 / S7 self-execution:

Phase 2.6 (multi-session orchestration):
  - NEW Step 2a-pre: build absolute SHARED_CONTEXT_FILE (brief + architecture)
    once per wave; introduce ULTRAEXECUTE_MAX_TURNS / ULTRAEXECUTE_MAX_BUDGET_USD
    overrides for long runs.
  - Step 2a: prefix every git worktree command with GIT_OPTIONAL_LOCKS=0
    (research/02 R2; GH #47721).
  - NEW Step 2a': copy gitignored project artifacts (brief.md, plan.md,
    research/) into each freshly-created worktree using PROJECT_SOURCE +
    PROJECT_REL so plugin-in-monorepo + gitignored-state topology works
    (brief Constraint 2).
  - Step 2b: prepend two safety preambles to every per-session prompt:
      (a) defense-in-depth headless-mode warning citing GH #36071
      (b) malware-reminder conditional clarification per GH #52272
    Honor `cwd:` field from Execution Strategy via SESSION_CWD; default
    is worktree root (backward-compatible). Add per-child --max-turns,
    --max-budget-usd, --append-system-prompt-file (research/06 R3+R4).
  - Step 2e: push branch BEFORE merge (research/02 R3 — converts
    unrecoverable branch loss into recoverable remote state).
  - Step 2f: prefix all worktree-remove / branch -d / worktree prune with
    GIT_OPTIONAL_LOCKS=0.
  - Step 4 cleanup: same GIT_OPTIONAL_LOCKS=0 treatment.

Hard Rules:
  - Hard Rule 15: extend exception to permit ~/.claude/projects/*/memory/
    writes when manifest declares memory_write: true (brief Constraint 3
    Option A — narrow opt-in for memory file edits).
  - Hard Rule 19 (new): push-before-cleanup formalized as a rule.

Phase 2.4: advisory hooks-fire precheck for CC version >= v2.1.117
  (research/04 D4 + R5; research/06 R1).

Test: tests/hooks/worktree-guard.test.mjs (6 tests) verifies the
pre-bash-executor and pre-write-executor hooks accept routine worktree
cleanup (Hard Rule 12) while still blocking the dangerous patterns
introduced by parallel orchestration.
2026-05-04 07:49:45 +02:00
272638aec1 feat(ultraplan-local): parallelize Phase 9 review with inline dedup
Strengthen single-message reinforcement for plan-critic + scope-guardian
parallel dispatch in commands/ultraplan-local.md Phase 9 and mirror in
agents/planning-orchestrator.md Phase 6. Reviewers now write structured JSON
to /tmp/{plan-critic,scope-guardian}-out.json which is merged via the
lib/review/plan-review-dedup.mjs CLI shim from S8.

The merged set lets us revise the plan once for duplicate findings instead
of twice. Source: research/05 R1 + R2.

Pin in tests/lib/doc-consistency.test.mjs locks both files against
single-message + dedup-helper regressions.
2026-05-04 07:43:50 +02:00
84eae1fad7 feat(ultraplan-local): seal Opus-4.7 schema-drift defense in Phase 8
Inline STEP_HEADING_REGEX, FORBIDDEN_HEADING_REGEX, the canonical step+manifest
example, and the post-write plan-validator self-check directly into Phase 8 of
commands/ultraplan-local.md. This eliminates the dependency on Opus 4.7
implicitly loading agents/planning-orchestrator.md — the format contract now
travels with the command file itself.

Source: research/04 D5 + plan-v2 Step 7. Pin in tests/lib/doc-consistency.test.mjs
locks the substrings so future edits cannot silently regress the seal.
2026-05-04 07:41:48 +02:00
50f0629baf feat(ms-ai-architect): renderer B.3 review adopt page-header + kanban (Keep/Review/Remove) + suppressed-panel
- parseFindings utvidet med status-felt-deteksjon og buckets-mapping {keep, review, remove, suppressed}
- Eksplisitt status vinner; severity-fallback (kritisk/høy → review, medium/lav → keep)
- Norsk og engelsk status-vokabular støttet (suppress/waive/akseptert, behold/keep, tilsyn/review, fjern/remove)
- renderReview wrapper renderPageShell med eyebrow=REVIEW; bytter findings-listen til E1 kanban-board (3 kolonner Keep/Review/Remove)
- E6 SUPPRESSED-panel som collapsible details for waived/akseptert items
- KeyStats utvidet med KEEP/REVIEW/REMOVE-stats
- review.md fixture utvidet med Status-kolonne (1 remove, 4 review, 2 keep, 2 suppressed)

Pluss test-utvidelser:
- Seksjon 25c: SC8 per-renderer verdict-pill assert for Sub-batch B (renderSecurity, renderRos, renderReview)
- Seksjon 25d: Step 11 must_contain — top-risks + suppressed >=1 treff
- Test-suite gar fra 178 -> 183 PASS

[skip-docs]
2026-05-04 06:35:38 +02:00
20717102aa feat(ms-ai-architect): renderer B.2 ros adopt page-header + top-risks + recommendation-card
ros = REFERENCE STANDARD (mot Plugin Playground-run2/scenarios/ros-lier-kommune.html)

- parseMatrixRisk utvidet med _consumer-detection (ros når ## Top-risikoer eller ## Anbefaling), topRisks[] (max 5, fallback til threats sortert på severity-rank med alfabetisk tie-breaker), og recommendation (første avsnitt under ## Anbefaling)
- R15 regression: hasTopRisks/hasAnbefal-detection er ikke-invasiv; Dpia-fixturer har ingen av disse seksjonene → _consumer=null, topRisks=[], recommendation='' (alle felt forblir uendret for dpia-rendereren)
- renderRos wrapper renderPageShell med eyebrow=ROS; behold matrix 5x5 + radar 7-akser + threats; legg til top-risks-list, residual-pair og recommendation-card
- ros.md fixture utvidet med ## Top-risikoer (5 trusler), Restrisiko: 4x3 to 2x2, og ## Anbefaling
- RESTRISIKO key-stat utledes når residualPair finnes (samme monster som Dpia og Security)

Sesjon 6 (v1.10.0) gjor en samlet README/CLAUDE/CHANGELOG-oppdatering for hele v1.10.0-loypet.

[skip-docs]
2026-05-04 06:33:06 +02:00
bbe7971d01 feat(ultraplan-local): add stats event-emit for autonomy lifecycle events
Step 6 of plan-v2 (ultra-pipeline-speedup).

lib/stats/event-emit.mjs (NEW)
  Atomic JSONL append to ${CLAUDE_PLUGIN_DATA}/ultraexecute-stats.jsonl.
  Every record carries:
    ts          : ISO-8601 timestamp (REQUIRED per SC4)
    event       : caller-supplied name
    known_event : true for { brief-approved, main-merge-gate, user_input },
                  false for everything else (still emitted — audit-complete)
    payload     : caller object (defaults to {})

  Stats failures NEVER block workflow: missing CLAUDE_PLUGIN_DATA, missing
  dir, mkdir failure, append failure → all return { written: false, reason }
  without throwing.

  CLI shim:
    node lib/stats/event-emit.mjs --event NAME [--payload JSON]
  Always exits 0 (telemetry is best-effort).

Tests: 12 (record-build + ISO-8601 ts + known/unknown distinction + silent
skip + dir-on-demand + CLI shim happy-path + bad-payload tolerance +
concurrent-append smoke).

[skip-docs]
2026-05-04 06:31:52 +02:00
bed14eae4a feat(ultraplan-local): add plan-review-dedup helper for Phase 9 finding dedup
Step 5 of plan-v2 (ultra-pipeline-speedup).

lib/review/plan-review-dedup.mjs (NEW)
  Two-pass dedup:
    1. Exact match  — identical computeFindingId(file:line:rule_key) → merge.
    2. Jaccard ≥ 0.7 on text-token sets → merge near-duplicates.
  Provenance preserved in surviving finding's raised_by[] (which agents
  raised it). Reuses lib/parsers/jaccard.mjs + lib/parsers/finding-id.mjs.

  CLI shim:
    node lib/review/plan-review-dedup.mjs \
         --plan-critic /tmp/x.json --scope-guardian /tmp/y.json
  Missing inputs tolerated (single-agent review still works).

Tests: 10 (tokenize + threshold + 6 dedup-logic cases + 2 CLI shim).

[skip-docs]
2026-05-04 06:30:28 +02:00
645f01625b feat(ultraplan-local): add autonomy-gate state machine + manifest schema extensions for skip_commit_check + memory_write
Step 4 of plan-v2 (ultra-pipeline-speedup).

lib/util/autonomy-gate.mjs (NEW)
  5-state machine {idle, gates_on, auto_running, paused_for_gate, completed}
  honoring the --gates flag intent. Re-entry to completed is idempotent.
  Includes CLI shim:
    node lib/util/autonomy-gate.mjs --state X --event Y [--gates true|false]
  → JSON: { ok, next_state | error }, exit 0 on success / 1 on invalid.

lib/parsers/manifest-yaml.mjs (EXTENDED)
  OPTIONAL_KEYS list adds skip_commit_check and memory_write — both boolean,
  default false when absent, MANIFEST_OPTIONAL_TYPE when non-boolean.
  Existing REQUIRED_KEYS contract untouched; existing 9 manifest tests
  still pass.

Tests: 19 (autonomy-gate) + 8 (manifest-schema-extensions) = 27 new.

[skip-docs]
2026-05-04 06:28:47 +02:00
b1e161116a test(ultraplan-local): pin agent frontmatter contract (model + tools)
Pin the contract from plan-v2 Steps 1-3: every agents/*.md must declare
model: (opus|sonnet|haiku) AND (tools: or disallowedTools:). Orchestrators
(planning/research/review) must be opus and include the Agent tool;
non-orchestrators must not include Agent (no recursive swarming).

23 agents in scope; 5 pinning tests.

[skip-docs]
2026-05-04 06:26:08 +02:00
236be56ba5 test(ms-ai-architect): SC8 per-renderer verdict-pill + Step 10 must_contain asserts
- Seksjon 25a: per-renderer verdict-pill assert for de 6 Sub-batch A-rendererene (R7)
- Hver awk-ekstraherer body og krever data-verdict ELLER renderPageShell-kall
- Seksjon 25b: Step 10 manifest must_contain — kanban-board + residual-pair >=1 treff
- Test-suite gar fra 170 -> 178 PASS i Playground v3 Static structure
2026-05-04 06:12:23 +02:00
dc670f3208 feat(ms-ai-architect): renderer A.6 dpia adopt page-header + residual-pair
- parseMatrixRisk utvidet med residualPair-felt + _consumer-diskriminator (R15)
- Stotter "Restrisiko: AxB > CxD"-syntax (numerisk) og "Restrisiko: label > label" (fallback)
- Sesjon 4 vil sette _consumer='ros' nar Ros-spesifikk markdown oppdages
- renderDpia: matrix + residual-pair (B6) + threats-table, wrapped i renderPageShell (eyebrow DPIA)
- KeyStats utvidet med RESTRISIKO-stat nar residualPair eksisterer (modifier high hvis score>=9)
- Fixture dpia.md utvidet med "Restrisiko: 4x3 -> 2x2"-linje under Konklusjon
2026-05-04 06:10:31 +02:00
3a1dd8a70f feat(ms-ai-architect): renderer A.5 conformity adopt page-header + kanban-board
- parseConformityChecklist utvidet med buckets {passed, conditional, failed} via bucketOf-mapping
- Status-mapping stotter bade engelsk (met/partial/missing) og norsk (bestatt/betinget/avvist) for backward-compat
- renderConformity: erstatter findings-listen med E1 kanban-board (3 kolonner: Bestatt, Med betingelser, Ikke bestatt)
- aiact-timeline beholdt for deadlines (under kanban som sekundaer report-meta-blokk)
- Wrapped med renderPageShell (eyebrow SAMSVAR)
- Fixture conformity.md oppdatert til norske status-markorer for tydeligere bucket-mapping (5 bestatt, 3 betinget, 4 avvist)
2026-05-04 06:08:22 +02:00
ead1697ff0 feat(ms-ai-architect): renderer A.4 frimpact adopt page-header + critique-cards
- renderFria wrapped med renderPageShell (eyebrow FRIA, lede ref AI Act Art. 27)
- Erstatter rights-matrix med D4 critique-cards per rettighet (severity fra impact-score)
- Ny fria-case i inferVerdict: max impact >=4 block, >=3 warning, ellers go-with-conditions
- DS_CLASSES test oppdatert: rights-matrix -> critique-card (Step 10 endrer body for FRIA)
2026-05-04 06:06:28 +02:00
755703bc96 feat(ms-ai-architect): renderer A.3 transparency adopt page-header + read-more
- renderTransparency wrapped med renderPageShell (eyebrow APENHET, lede ref AI Act Art. 13/50 og GDPR Art. 13/14)
- E8 read-more for klausuler over 240 tegn (details/summary, "Les hele klausulen")
- Bevarer report-doc body-styling
2026-05-04 06:05:02 +02:00
5f461bfe20 feat(ms-ai-architect): renderer A.2 requirements adopt page-header + scenario-cards + E7
- renderRequirements wrapped med renderPageShell (eyebrow KRAV, verdict via requirements-list)
- scenario-card-grid: gruppert pa source_article, status fra dominant (met/partial/missing)
- expansion-card per krav (E7): severity-dot + title + chev, body med dl
- data-action requirement-expand wired for klikk-toggle (handler kommer i Sesjon 6)
2026-05-04 06:04:20 +02:00
2e8cb9ed93 feat(ms-ai-architect): renderer A.1 classify adopt page-header + tier-desc
- renderAiActPyramid wrapped med renderPageShell (eyebrow KLASSIFISERING, verdict via aiact-archetype, keyStats via inferKeyStats)
- 4 details/summary-blokker under pyramide for klikk-pa-tier kort beskrivelse (active tier open by default)
- Inline CSS for pyramide-desc + scenario-card-grid + residual-pair + read-more-block (klargjor renderers A.2-A.6)
2026-05-04 06:03:35 +02:00
6f1631a32f feat(ms-ai-architect): surfaces adopt page-header + key-stats (4 surfaces)
Steg 8 i v1.10.0-loepet. Wrappe alle 4 surfaces (Onboarding, Home, Catalog,
Project) med renderPageShell({eyebrow, title, lede, verdict, keyStats}, body):

- Onboarding: eyebrow ONBOARDING, lede tilpasset for 20-felts onboarding
- Home: dynamisk "Hei, {orgName | venn}", keyStats {PROSJEKTER, AKTIVE RAPPORTER}
- Catalog: keyStats {KOMMANDOER 24, AGENTER 12, SKILLS 5}
- Project: title=project.name, lede=description, verdict via inferProjectVerdict
  (block > go-with-conditions > approved > n-a), keyStats {RAPPORTER, SIST OPPDATERT}

Project-surface utvidet med .screen-tabs (A4 Tier 3): Oversikt / Rapporter /
Kontekst / Eksport. Rapporter er primaer (eksisterende category-tabs+panels);
andre skjermer er stub i Sesjon 2 og fylles ut i Sesjon 3-6. Screen-tabs CSS
inline i playground-style-blokk per scope-regel (plugin standalone).

Per R8: ingen .page__meta chips. Action-buttons (Tilbake/Slett) flyttet under
page-shell-headeren (verdict-slot tar ikke arbitrary HTML).

Helpers lagt til:
- inferProjectVerdict(project) — aggregert verdict, tom reports -> n-a
- inferProjectLastUpdated(project) — siste report.updatedAt eller createdAt
- ACTIONS['project-screen'] — toggle screen-tabs uten full re-render

Verify: 4/4 surfaces kaller renderPageShell. Tester: 215 statiske, 240 playground,
7 migrations PASS.
2026-05-04 03:33:22 +02:00
8be04e3a21 feat(ms-ai-architect): onboarding fritekst-omlegging (4 strukturerte + 16 fritekst per R4)
ONBOARDING_SCHEMA går fra 18 -> 20 felt:
- 4 strukturerte: sector (select), ai_act_role (NY select),
  risk_level (NY select), data_classification (multiSelect)
- 16 fritekst (text/textarea), alle med non-empty placeholder

ai_act_role + risk_level legges i ny "regulatory"-gruppe (totalt 6 grupper).
renderOnboardingField utvidet med placeholder-attr-stoette for text/textarea.
Onboarding-header + tracks-card desc oppdatert "18 felles" -> "20 felles".

Verify: 20 felt totalt, 4 struct (sector/ai_act_role/risk_level/data_classification),
16 free med placeholder. Tester: 215 statiske + 240 playground PASS.
2026-05-04 03:27:45 +02:00
502faa97d5 feat(ms-ai-architect): add v1→v2 MIGRATIONS handler with snapshot fixture and idempotency test 2026-05-04 03:14:46 +02:00
1fe40fe886 feat(ms-ai-architect): add renderPageShell + verdict + keyStats helpers (v2 foundation) 2026-05-04 03:10:39 +02:00
3c933ae3fa feat(ms-ai-architect): upgrade theme bootstrap with prefers-color-scheme fallback 2026-05-04 03:04:43 +02:00
ea9beeefcf chore(ms-ai-architect): vendor CHANGELOG.md from shared 2026-05-04 03:03:50 +02:00
a5c12b68d9 chore(ms-ai-architect): re-sync vendored design system with light tokens 2026-05-04 03:03:24 +02:00
a09c2e0382 chore(marketplace): remove ultra-cc-architect plugin
Moved to a separate marketplace. Drops the plugin directory, the
manifest entry, and the README/CLAUDE.md sections describing it.
ultraplan-local references to the optional architecture/overview.md
contract are kept (filesystem-level discovery, drift-WARN), but
marketplace-name pointers in ultraplan-local docs may follow.
2026-05-04 02:41:37 +02:00
e6503adae8 chore(ultraplan-local): gitignore project dirs at plugin level [skip-docs]
Marketplace-root .gitignore already covers plugins/*/.claude/, but
plugin-local coverage is load-bearing for fork-and-own (forks of just
the plugin won't carry the marketplace .gitignore).
2026-05-04 02:30:36 +02:00
e57dee5a03 chore(ms-ai-architect): scrub identifying references from fixtures + remove screenshots
Removes:
- All 6 PNG screenshots (playground/screenshots/) and the capture script
  (scripts/screenshots/capture-playground.py).
- "Screenshots" section from plugin README.
- "Screenshot-suite" section from plugin CLAUDE.md.
- Screenshots bullet from marketplace root README's ms-ai-architect listing.

Scrubs the 17 synthetic fixtures + CHANGELOG/CLAUDE/README of identifying
references: organization names, government-agency names, agency-specific
terminology, sector-specific use cases. Replaced with generic placeholder
data ("Acme AS" / "Demosystem") that exercises the same parser archetypes.

Plugin's domain-target wording (Datatilsynet, offentlig sektor, offentlig
myndighet, rettshåndhevelse, NS 5814, Utredningsinstruksen, EU AI Act
Annex III categories) is intact — those describe the plugin's intended
audience, not any specific entity.

This is a cleanup commit. Earlier git history still contains the prior
references; force-push or rebase is required if scrubbing the history is
desired. That decision is out of scope here — please run it separately
if needed.

Verified post-scrub:
- bash tests/validate-plugin.sh -> 215/215 PASS
- bash tests/run-e2e.sh --playground -> 240/240 PASS (170 + 70)
2026-05-03 20:53:49 +02:00
9664bf1b1c feat(ms-ai-architect): release v1.9.0 with playground v3 + screenshot suite
Version bump: v1.8.0 -> v1.9.0 (minor — plugin API surface unchanged).

Version sync:
- .claude-plugin/plugin.json (canonical), README.md badge,
  CHANGELOG.md (full v1.9.0 entry with playground v3 architecture,
  validation suite, A11Y artifacts, SemVer rationale),
  marketplace root README.md listing.

Screenshot suite (new):
- scripts/screenshots/capture-playground.py — Playwright Python automation
  that opens playground from file://, populates __store with Statens vegvesen
  ANPR demo data, navigates each surface, paste-imports fixtures, scrolls to
  the relevant report-slot, and saves viewport screenshots.
- 6 PNG screenshots in playground/screenshots/ covering: onboarding (18/18
  filled), home (3 projects), catalog (24 commands across 5 expansion groups),
  classify pyramid (high-risk Annex III), ROS 5x5 matrix + 7-dim radar,
  cost P10/P50/P90 distribution.

Doc updates (3 levels per repo policy):
- Plugin README: new "Screenshots" subsection embeds all 6 with description
  columns, plus reproduce command.
- Plugin CLAUDE.md: new "Screenshot-suite (v1.9.0)" subsection documenting
  the automation, demo-state seeding, and re-run trigger conditions.
- Marketplace root README: ms-ai-architect listing now mentions the
  screenshot suite + reproduce command.

Reproduce screenshots: python3 scripts/screenshots/capture-playground.py.

Notes:
- Light-mode tokens are not in the vendored design-system yet. The toggle
  swaps data-theme + label correctly (Step 13 mechanics intact), but the
  CSS palette only ships dark. Captured dark-mode only; light-mode capture
  re-enables when shared/playground-design-system gains [data-theme="light"]
  overrides.
- Local CSS fix in playground HTML: added `[hidden] { display: none !important; }`
  in the inline app-shell <style> block. The vendored .error-summary rule
  sets display: flex which overrode HTML's [hidden] default, leaking the
  onboarding error banner on cold start. Plugin-local for now; a proper
  fix belongs in shared/playground-design-system/components-tier3.css.

Verified post-bump:
- bash tests/validate-plugin.sh -> 215/215 PASS
- bash tests/run-e2e.sh --playground -> 240/240 PASS
2026-05-03 20:40:07 +02:00
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