Commit graph

396 commits

Author SHA1 Message Date
6b2ac8250e feat(ms-ai-architect): playground v3 onboarding surface (18 felles fields) [skip-docs]
Step 5/17 av Playground v3-leveransen (Session 2, Wave 2).

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

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

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

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

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

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

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

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

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

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

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

Eksponerte globals: __CATALOG, __SHARED_FIELDS, __FIELD_TYPES.

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

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

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

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

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

Eksponerte globals: __buildEnvelope, __exportState, __importState, __MIGRATIONS.

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

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

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

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

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

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

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

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

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

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

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

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

[skip-docs]

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

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

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

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

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

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

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

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

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

Docs updated together with the playground HTML refactor that actually
consumes the vendored CSS (next commit). This commit is internal-only.
2026-05-03 12:25:42 +02:00
Kjell Tore Guttormsen
f4aa1ed58f feat(marketplace): add sync-design-system.mjs script
Vendors shared/playground-design-system/ into a plugin's
playground/vendor/playground-design-system/ tree so each plugin stays
standalone (no marketplace-rot dependency at runtime).

Features:
- Generates MANIFEST.json with SHA-256 per file, source commit hash, sync date
- Drift detection: refuses overwrite if vendored file changed since last sync
- --force flag to override drift
- Injects "DO NOT EDIT" header into copied CSS files
- Pure Node.js, zero npm deps (uses fs.cp from Node 16.7+)

Usage: node scripts/sync-design-system.mjs <plugin-name> [--force]
2026-05-03 12:24:23 +02:00
Kjell Tore Guttormsen
f1fecf39b8 feat(shared): Tier 3 wave 2 (12 components) + self-hosted fonts
Two changes in one commit because they were prepared together and the
component demos depend on the new self-hosted fonts.css.

Tier 3 wave 2 — 12 new components
---------------------------------
Adds components-tier3-supplement.css (886 lines) and 12 isolated demo
HTML pages under shared/playground-examples/components/:
toxic-flow chain, fleet-overview, kanban Keep/Review/Remove,
maturity-ladder, classify-and-transform, cycle-ribbon,
persistent-antipattern, suppressed-signals, ExpansionCard, ReadMore,
FormProgress, Aspirational-vs-Committed.

Reuses existing tokens — no new CSS custom properties. Honors the
Phase 1 feedback rules: no large pink areas for body text, severity-red
distinct from failure-red, dark mode via existing [data-theme="dark"].

Provenance: components-tier3-supplement.css and the 12 demo bodies were
authored by claude.ai/design (separate Anthropic instance) on 2026-05-03.
This commit only integrates them — path rewrites, font swap, generic
name substitution in fleet-overview demo data, README updates.
base.css from the export was deliberately NOT taken in because it
reverted the inline-message contrast fix from v0.1.

Self-hosted fonts (Inter, JetBrains Mono, Source Serif 4)
---------------------------------------------------------
Replaces all fonts.googleapis.com / fonts.gstatic.com requests with
.woff2 files bundled at shared/playground-design-system/fonts/.

Why:
- No data leaked to Google about end-user IPs and User-Agents.
- GDPR-safe for Norwegian public-sector deployments.
- Works offline / behind air-gapped firewalls.
- Forkers downloading the marketplace get a complete bundle.

All three families are SIL Open Font License 1.1 — license texts
included alongside the woff2 files. Source Serif 4 woff2 generated
locally from the upstream OTF release using
fonttools ttLib.woff2 compress; Inter and JetBrains Mono are
unmodified upstream webfont releases.

Total bundle: 9 woff2 files, ~940 KB. New fonts.css declares all
@font-face rules with font-display: swap. All 6 example HTMLs and 12
new component demos load it via a single relative path.

Verified
--------
- Privacy grep returns empty across plugins/ and shared/
- Google Fonts grep returns empty across shared/*.html
- Smoke test via python -m http.server: HTML + 7 stylesheets +
  Inter-Regular.woff2 all return 200

Doc updates
-----------
- shared/playground-design-system/README.md: file tree updated,
  Quick start snippet shows fonts.css link, "Self-hosted fonts"
  section added
- shared/playground-design-system/fonts/LICENSES.md: combined attribution
- README.md (root): Tier 3 wave 1+2 component list, Privacy-first bullet
- CLAUDE.md (root): tree entry expanded for new components + fonts

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 05:08:07 +02:00
Kjell Tore Guttormsen
5b6c1da8fc chore(privacy): fix factual mashups from phase 2 bulk replace
Phase 2 bulk replace produced a few factually wrong attributions where
real publicly known sector documents/datasets/personas were incorrectly
re-attributed to the fictional generic entity. Genericize those
references instead.

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

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

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

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

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

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 04:28:15 +02:00
Kjell Tore Guttormsen
f95cc4b13d chore(privacy): scrub real-org references from shared/ + root
Replace named real-world entity with fictional generic Norwegian
public-sector entity ("Direktoratet for digital tjenesteutvikling",
DDT) across the design system reference scenarios and root docs.
Repository is a private personal project; references to a real
organization were unintended and unrelated to the project.

- Rename: security-vegvesen.html -> security-direktorat.html
- Persona: replaced with fictional Kari Nordmann
- Domain refs / acronym / rule-IDs: SVV* -> DDT*
- Internal system names (Autosys etc.): replaced with fictional names

Phase 2 (plugin-internal references) follows in next commit.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 04:22:29 +02:00
Kjell Tore Guttormsen
992d6b3f76 feat(shared): add Tier 3 components (8 critical for ms-ai-architect Playground v3)
Authored in Claude Code following the design-DNA established by claude.ai/design
in v0.1 (tokens + Tier 1 + Tier 2). Visual coherence verified against existing
components via tier3-preview.html showcase.

shared/playground-design-system/components-tier3.css (~480 lines):
- pair-before-after: ROS/DPIA/AI Act inherent->residual primitive with delta
  pill (improved/worsened); responsive collapse to vertical on narrow viewports
- aiact-timeline: 4 EU AI Act milestones (2025-02-02 .. 2027-08-02) with
  per-system countdown chips (urgent/soon/distant), today-marker, and per-
  milestone passed/active/upcoming states
- tracks: Guide/Explore/Expert 3-track entry pattern carried from Playground v2,
  top-bar color coding per track
- rights-matrix: FRIA 12 EU Charter rights x 5 impact levels (Art. 27 EU AI Act)
- capability-matrix: license x kapabilitet with explicit icons per status
  (available/cost/conditional/missing) - never color-only
- agent-grid + agent-card: parallel-worker status with state pills, progress
  bars, metric chips, pulsing dot for running, distinct failure-red token
- error-summary: Aksel/GOV.UK pattern, white bg + red border + dark body text
  + red heading (NOT large pink fill — fixes contrast bug)
- guide-panel: Aksel friendly inline guidance, info/success/warn variants

Also fixes shared/playground-design-system/base.css inline-message--error which
had the same contrast bug as ErrorSummary v1: white text on light-pink soft-fill
was unreadable. Now uses surface bg + critical border + primary text + critical
strong/heading color. Same dark-mode treatment.

shared/playground-examples/tier3-preview.html (~470 lines): live demo for all
8 components with realistic Norwegian mock-data (Lier kommune ROS T-001
threat, AI Act timeline 2026-05-02 today-marker, FRIA EU Charter rights, M365
capability-matrix, 4-worker utredning grid). Used to validate visual coherence
before committing.

Updates shared/playground-design-system/README.md with Tier 3 component table
and provenance note distinguishing v0.1 (claude.ai/design) from this addition
(Claude Code).

Remaining for v0.2: 12 plugin-specific Tier 3 components (sankey/toxic-flow,
fleet-overview, kanban Keep/Review/Remove, maturity-ladder, classify-and-
transform, cycle-ribbon, persistent-antipattern badge, suppressed-signals,
ExpansionCard, ReadMore, FormProgress, Aspirational vs Committed visual). To
be generated by claude.ai/design in a supplement session before plugin
Playground work begins.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 07:22:44 +02:00
Kjell Tore Guttormsen
a0b75bbd13 docs(marketplace): cross-reference Playground design system in root README and CLAUDE.md
Adds shared infrastructure section to root README pointing to the new design
system at shared/playground-design-system/, with summary of tokens, Tier 1+2
components, JSON schemas, and reference scenarios. Updates root CLAUDE.md
repo-struktur block to include shared/ at marketplace level alongside plugins/.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-02 06:59:29 +02:00
Kjell Tore Guttormsen
4a2bf3567a feat(shared): add Playground design system v0.1 with Tier 1+2 components
Aksel/Digdir-aligned design system for plugin Playgrounds — visual self-service
UIs that complement terminal slash-commands. Targets ms-ai-architect, okr,
llm-security, ultraplan-local, config-audit. Built for Norwegian public sector
decision-makers plus developer power-users — one visual family, two info
densities.

Generated by claude.ai/design (Anthropic) in a dialog-based design session
driven by a comprehensive brief covering all five target plugins, Aksel/Digdir
conventions, and domain-specific visual standards (NS 5814 ROS matrices, EU AI
Act 4-tier pyramide, Doerr OKR scoring, NIST CSF, OWASP threat modeling).
Per Anthropic Consumer Terms §4, ownership of outputs is assigned to the user;
licensed MIT.

shared/playground-design-system/ (5874 lines CSS + JSON):
- tokens.css: Inter font, Digdir blue #0062BA, deuteranopia-safe severity ramp,
  distinct severity-red (#A40E26) vs failure-red (#7D1A1A), plugin scope colors,
  light + dark themes
- base.css: reset, typography (17px body, 65ch measure), focus rings, buttons,
  badges, forms, Aksel 3-tier inline messages, prefers-reduced-motion support
- components.css: Tier 1 — radar/spider, 5x5 matrix-heatmap (bottom-left
  origin, ROS/DPIA), findings-browser, critique-card, wizard/stepper,
  live-meter with antipattern lints
- components-tier2.css: Tier 2 — decision-tree, traffic-lights with rationale,
  diff-review, treemap, distribution P10/P50/P90, command-pipeline output, AI
  Act 4-color pyramide, pipeline-cockpit, verdict-pill + 5-band risk-meter,
  codepoint-reveal (Unicode steg), small-multiples grid (16-cat posture),
  OWASP badges (LLM/ASI/AST/MCP)
- print.css: A4 stylesheet with BW severity hatching, kommune-logo slot,
  signature lines for offentlige dokumenter
- schemas/: finding.schema.json, okr-set.schema.json, ros-threat.schema.json
- README.md: usage guide, design principles, component reference, provenance

shared/playground-examples/:
- index.html: system showcase with all components live
- ros-lier-kommune.html: Lier kommune Copilot ROS-rapport (Scenario A)
- okr-baerum.html: Baerum kommune T2-2026 OKR live writer (Scenario B)
- security-vegvesen.html: SVV ToxicSkills findings review, 85 funn BLOCK
  (Scenario C)
- templates.html: A4 print template demos
- ros-app.js + ros-data.js: Scenario A interactivity

WCAG 2.1 AA throughout (UU-loven krav for offentlig sektor): focus rings, ARIA
attributes, keyboard navigation, severity numerical redundancy for deuteranopia
and BW print, semantic HTML.

Known limitation: Inter loaded via Google Fonts CDN violates self-contained
no-CDN constraint. System-stack fallback works offline. Self-host woff2 files
in Phase 2.
2026-05-02 06:59:19 +02:00
Kjell Tore Guttormsen
ff0de3e7dd docs(marketplace): bump ai-psychosis to v1.2.0 in root README 2026-05-01 22:00:29 +02:00
Kjell Tore Guttormsen
339abc521e chore(ai-psychosis): release v1.2.0 2026-05-01 21:59:40 +02:00
Kjell Tore Guttormsen
0075fe089b test(ai-psychosis): perf budget validated at v1.2 pattern set 2026-05-01 21:56:14 +02:00
Kjell Tore Guttormsen
f70caf1150 test(ai-psychosis): privacy canary covers v1.2 detectors 2026-05-01 21:54:22 +02:00
Kjell Tore Guttormsen
6fe275825a feat(ai-psychosis): /interaction-report surfaces v1.2 fields 2026-05-01 21:53:41 +02:00
Kjell Tore Guttormsen
eb040cfccb docs(ai-psychosis): SKILL.md cites paper Score 5 + 11 guidance criteria 2026-05-01 21:51:21 +02:00
Kjell Tore Guttormsen
f88639ef41 feat(ai-psychosis): report-reader v1.2 schema + aggregations 2026-05-01 21:47:53 +02:00
Kjell Tore Guttormsen
c5e933b35d feat(ai-psychosis): domain-stakes weighting on alert thresholds 2026-05-01 21:46:29 +02:00
Kjell Tore Guttormsen
c5e8f280d9 feat(ai-psychosis): pushback alert with domain-aware re-contextualization 2026-05-01 21:42:55 +02:00
Kjell Tore Guttormsen
12e6d3b5e4 feat(ai-psychosis): validation-seeking domain-gated alert 2026-05-01 21:41:15 +02:00
Kjell Tore Guttormsen
61584f42d6 feat(ai-psychosis): tier-2 user-info isolation alert (cross-session) 2026-05-01 21:40:24 +02:00
Kjell Tore Guttormsen
4fd5e7b24a feat(ai-psychosis): tier-1 user-info isolation alert (per-session) 2026-05-01 21:38:51 +02:00
Kjell Tore Guttormsen
b88cd8a978 feat(ai-psychosis): add validation-seeking detector 2026-05-01 21:37:06 +02:00
Kjell Tore Guttormsen
ca6567b501 feat(ai-psychosis): add user-info detector (yes_people/yes_digital/no) 2026-05-01 21:34:52 +02:00
Kjell Tore Guttormsen
39ea46441c feat(ai-psychosis): add 8 paper-grounded domain patterns 2026-05-01 21:32:26 +02:00
Kjell Tore Guttormsen
a5bc53cb42 feat(ai-psychosis): promote domain_context to array for multi-domain support 2026-05-01 21:28:36 +02:00
Kjell Tore Guttormsen
011634583b test(ai-psychosis): contract test for v1.1.0 pushback count behavior 2026-05-01 21:25:35 +02:00
Kjell Tore Guttormsen
d8d8315e3e test(ai-psychosis): sync perf fixture to actual pattern count (41) 2026-05-01 21:24:42 +02:00
Kjell Tore Guttormsen
f0f3bc3294 feat(ai-psychosis): add readRecentEndRecords for cross-session reads 2026-05-01 21:23:57 +02:00
Kjell Tore Guttormsen
7b0afdb541 feat(ai-psychosis): add v1.2 thresholds and domain-stakes table 2026-05-01 21:22:51 +02:00
Kjell Tore Guttormsen
da8e1601a5 docs: bump ultraplan-local v3.3.0 in marketplace root
- Root README: bump v3.2.0 → v3.3.0, six-command intro, /ultracontinue-local bullet, .session-state.local.json mention, dedicated v3.3.0 paragraph (Handover 7 + session-state-validator + atomic-write util + helper command + ultraexecute Phase 8/2.55/4 wiring + pre-compact-flush refresh + 22 new tests).
- Root CLAUDE.md: bump plugin tagline v3.1.0 → v3.3.0, six-command + multi-session resumption descriptor.

Step 12 of /ultracontinue v3.3.0.
2026-05-01 21:02:46 +02:00
Kjell Tore Guttormsen
1dad53a1e4 docs(ultraplan-local): document /ultracontinue in README + CLAUDE
- README: version badge 3.2.0 → 3.3.0, "Six commands" intro, /ultracontinue row in command table, full /ultracontinue-local section with modes + schema v1 + /ultraplan-end-session helper + typical flow.
- CLAUDE.md: extend validators list (atomic-write util, session-state-validator), bump test count 109 → 185, "7 pipeline handovers" line, Continue paragraph in Architecture, .session-state.local.json + Continue stats in State, Session-state entry in Terminology.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Verify:
- grep -E "5\.1\.0|v5\.1\.0" README.md CLAUDE.md ../../README.md | wc -l = 12
- node --test 'tests/**/*.test.mjs' = 792/792 pass
- self-audit configGrade A (97), pluginGrade A (100), readmeCheck.passed true
2026-05-01 20:35:24 +02:00
Kjell Tore Guttormsen
819fd47ce0 feat(ultraplan-local): add session-state-validator + tests for /ultracontinue
Validator at lib/validators/session-state-validator.mjs:
- validateSessionStateObject(parsed, opts) — pure object validation
- validateSessionStateContent(jsonText, opts) — wraps JSON parse + validation
- validateSessionState(filePath, opts) — file-mode with existsSync guard
- CLI shim with --json output (errors→stderr, result→stdout, exit 0/1/2)
- Schema v1: schema_version, project, next_session_brief_path,
  next_session_label, status, updated_at
- Error codes: SESSION_STATE_PARSE_ERROR, SESSION_STATE_NOT_FOUND,
  SESSION_STATE_MISSING_FIELD, SESSION_STATE_INVALID_STATUS,
  SESSION_STATE_NOT_RESUMABLE (warning), SESSION_STATE_SCHEMA_MISMATCH,
  SESSION_STATE_INVALID_TIMESTAMP, SESSION_STATE_INVALID_PATH
- Forward-compat hard requirement: unknown top-level keys ignored —
  protects future graceful-handoff v2.2 dual-writes

Tests at tests/validators/session-state-validator.test.mjs — 15 subtests:
- happy path + 5 missing-field tests
- invalid status, completed warns NOT_RESUMABLE, schema mismatch, bad
  timestamp, malformed JSON, missing file
- fixture load (SC-1) + malformed fixture (SC-3)
- forward-compat: unknown keys ignored silently

167 → 182 tests, 0 fail.

Step 4 of /ultracontinue v3.3.0. Closes Session 1 of the execution
strategy (foundation: gitignore + util + fixtures + validator+tests).
2026-05-01 20:23:09 +02:00
Kjell Tore Guttormsen
b99773ec27 chore(humanizer): README test-count badge + self-audit terminal humanization
- Bump README test-count badge: 635 → 792 (matches filesystem after Wave 0–5)
- Wire formatSelfAudit() through humanizeEnvelope + humanizeFindings so the
  terminal-output path renders humanized finding titles. The --json path is
  unchanged — only the prose terminal render is humanized.
- readmeCheck.passed now returns true; configGrade A (97), pluginGrade A (100)
2026-05-01 20:22:09 +02:00
Kjell Tore Guttormsen
12eae8c678 test(ultraplan-local): add session-state fixtures
Two fixtures for session-state-validator (Step 4):
- valid-in-progress.json — well-formed schema-v1 object
- malformed.json — truncated JSON for negative tests

Step 3 of /ultracontinue v3.3.0.
2026-05-01 20:21:50 +02:00
Kjell Tore Guttormsen
655c8d46f8 refactor(ultraplan-local): extract atomicWriteJson to lib/util
Three changes in one commit:

1. NEW lib/util/atomic-write.mjs — exports atomicWriteJson(path, obj),
   the canonical tmp+rename pattern. Reused by pre-compact-flush.mjs and
   (in subsequent steps) by the new session-state writer.

2. NEW tests/lib/atomic-write.test.mjs — 4 unit tests covering
   round-trip, no-orphan-tmp, overwrite-atomic, pretty-print formatting.

3. REFACTOR hooks/scripts/pre-compact-flush.mjs — replace the inline
   atomicWrite() with the imported atomicWriteJson(). Also fixes a
   pre-existing syntax error (leading whitespace + stray --resume token
   outside the comment block) that silently broke the hook from v3.1.0
   onward — PreCompact runtime is fail-open and swallowed the error.
   File reformatted with standard zero-indent JS.

163 → 167 tests, 0 fail.

Step 2 of /ultracontinue v3.3.0 (project 2026-05-01-ultracontinue).
2026-05-01 20:21:15 +02:00