ktg-plugin-marketplace/plugins/ultraplan-local/lib
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
..
parsers test(ultraplan-local): add ultracontinue to FLAG_SCHEMA + tests 2026-05-04 16:34:55 +02:00
review feat(ultraplan-local): add plan-review-dedup helper for Phase 9 finding dedup 2026-05-04 06:30:28 +02:00
stats feat(ultraplan-local): add stats event-emit for autonomy lifecycle events 2026-05-04 06:31:52 +02:00
util feat(ultraplan-local): add autonomy-gate state machine + manifest schema extensions for skip_commit_check + memory_write 2026-05-04 06:28:47 +02:00
validators fix(ultraplan-local): Bug 3 — wire frontmatter consistency check into /ultracontinue Phase 1.5 2026-05-04 17:39:42 +02:00