ktg-plugin-marketplace/plugins/ultraplan-local/lib/validators
Kjell Tore Guttormsen 37108ae899 fix(ultraplan-local): Bug 3 — wire frontmatter consistency check into /ultracontinue Phase 1.5
Step 8 of v3.4.1 plan.

commands/ultracontinue-local.md:
- New Phase 1.5 between Phase 1 and Phase 2 — runs the
  next-session-prompt-validator in --consistency mode when both candidates
  exist (plugin-root + project-dir). Refuses on producer mismatch with
  fresh candidates, downgrades stale candidate to a warning, downgrades
  >24h wall-clock drift to a soft warning.
- Anti-substitution rule applies — paths emitted as concrete tokens, not
  template placeholders.

lib/validators/next-session-prompt-validator.mjs:
- Sharpen NEXT_SESSION_PROMPT_PRODUCER_MISMATCH error message to include
  the literal "produced_by" field name so consumers (and operators) can
  trace the disagreement back to the YAML key.

tests/commands/ultracontinue.test.mjs:
- Test (Bug 3 prose) — Phase 1.5 header present, references validator,
  appears between Phase 1 and Phase 2 in document order.
- Test (Bug 3 e) — tmp project dir with state file + two prompt files
  with mismatched producers, both fresh relative to state.updated_at;
  CLI consistency mode exits non-zero, JSON stdout surfaces
  NEXT_SESSION_PROMPT_PRODUCER_MISMATCH with both paths and the
  "produced_by" token in the message.

Tests 346 -> 348 (+2).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 17:39:42 +02:00
..
architecture-discovery.mjs feat(ultraplan-local): Spor 1 wave 2 — 5 validators + doc-consistency, 108 tests grønn [skip-docs] 2026-05-01 05:39:47 +02:00
brief-validator.mjs feat(ultraplan-local): extend brief-validator to accept type:ultrareview 2026-05-01 13:31:39 +02:00
next-session-prompt-validator.mjs fix(ultraplan-local): Bug 3 — wire frontmatter consistency check into /ultracontinue Phase 1.5 2026-05-04 17:39:42 +02:00
plan-validator.mjs feat(ultraplan-local): Spor 1 wave 2 — 5 validators + doc-consistency, 108 tests grønn [skip-docs] 2026-05-01 05:39:47 +02:00
progress-validator.mjs feat(ultraplan-local): Spor 1 wave 2 — 5 validators + doc-consistency, 108 tests grønn [skip-docs] 2026-05-01 05:39:47 +02:00
research-validator.mjs feat(ultraplan-local): Spor 1 wave 2 — 5 validators + doc-consistency, 108 tests grønn [skip-docs] 2026-05-01 05:39:47 +02:00
review-validator.mjs feat(ultraplan-local): add lib/validators/review-validator.mjs 2026-05-01 13:30:43 +02:00
session-state-validator.mjs feat(ultraplan-local): add session-state-validator + tests for /ultracontinue 2026-05-01 20:23:09 +02:00