Commit graph

522 commits

Author SHA1 Message Date
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
ff99a51d1d feat(ms-ai-architect): playground v3 home surface + project list [skip-docs]
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).
2026-05-03 18:19:22 +02:00
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
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
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
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
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
Kjell Tore Guttormsen
bdddf52873 chore(ultraplan-local): gitignore *.local.json for session-state files
Brief assumed *.local.* covered .session-state.local.json — only *.local.md
existed. Adding *.local.json before any state file can be created.

Step 1 of /ultracontinue v3.3.0 (project 2026-05-01-ultracontinue).
2026-05-01 20:18:22 +02:00
Kjell Tore Guttormsen
ec4ac3e6d1 feat(humanizer): update agent system prompts [skip-docs]
Wave 5 Step 16 — final wave step. Threads humanizer-aware rendering
rules through the three agent prompts that produce user-facing output,
and adds a shape test that locks the structure.

- agents/analyzer-agent.md: documents the humanizer envelope shape
  (userImpactCategory, userActionLanguage, relevanceContext) in the
  Input section; new "Humanizer-aware rendering rules" subsection
  instructs the agent to: render humanized title/description/
  recommendation verbatim, group findings by userImpactCategory, lead
  each line with userActionLanguage, surface relevanceContext when
  not affects-everyone, and skip jargon-translation subroutines.
  --raw fallback documented (v5.0.0 verbatim severity prefiks).
- agents/planner-agent.md: documents the same vocabulary; instructs
  the planner to consume humanized fields from the analysis report,
  preserve titles verbatim, and order actions by both dependencies
  AND userActionLanguage urgency. Translation duties explicitly
  removed from the plan.
- agents/feature-gap-agent.md: replaces the inline t1/t2/t3/t4
  tier-to-prose section ladder with userActionLanguage-driven
  groupings ("Fix soon" → High Impact, "Fix when convenient" →
  Worth Considering, "Optional cleanup"/"FYI" → Explore When Ready);
  instructs skipping findings whose relevanceContext is
  test-fixture-no-impact; --raw fallback documented.

tests/agents/agent-prompt-shape.test.mjs (new, +6 tests, 786 → 792):
  - structural: humanized field reference + frontmatter preserved
  - per-agent anchors: analyzer groups by userImpactCategory; planner
    orders by userActionLanguage; feature-gap references
    test-fixture-no-impact
  - global: no "explain what {jargon} means" / "translate jargon" /
    "jargon-translation duty" prose anywhere

Self-audit: Grade A unchanged (config 97/100, plugin 100/100).
2026-05-01 19:53:59 +02:00