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]
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]
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.
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.
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).
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.
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.
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.
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]
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]
- 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)
- 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)
- 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)
- 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)
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.
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).
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)
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>.
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.
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.
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
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"').
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).
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).
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>