ktg-plugin-marketplace/plugins
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
..
ai-psychosis docs(ai-psychosis): README + CLAUDE.md cover v1.1.0; ROADMAP.md tracks v1.2 2026-05-01 18:09:58 +02:00
config-audit chore(humanizer): README test-count badge + self-audit terminal humanization 2026-05-01 20:22:09 +02:00
graceful-handoff docs(graceful-handoff): align README with marketplace standard 2026-05-01 09:14:10 +02:00
linkedin-thought-leadership docs: add AI-generated code disclosure to marketplace and all plugins 2026-04-19 19:27:05 +02:00
llm-security fix(llm-security): correct distribution URLs to marketplace path 2026-05-01 06:20:54 +02:00
ms-ai-architect docs: add AI-generated code disclosure to marketplace and all plugins 2026-04-19 19:27:05 +02:00
okr docs: add AI-generated code disclosure to marketplace and all plugins 2026-04-19 19:27:05 +02:00
ultra-cc-architect refactor(marketplace): split cc-architect from ultraplan-local into its own plugin 2026-04-30 17:18:47 +02:00
ultraplan-local feat(ultraplan-local): add session-state-validator + tests for /ultracontinue 2026-05-01 20:23:09 +02:00