Skip to content

v0.6.0 — the loop closes itself

Choose a tag to compare

@Tranquility2 Tranquility2 released this 31 Jul 17:22
· 10 commits to main since this release

A loop release. Quizzing has always promised convergence in a few short rounds, but the
next round was re-authored by hand — while the answers artifact was already recording
exactly which items the last round left open. Those signals are now read back, so a
follow-up is derived rather than retyped.

Added

  • web/followup.js, a third entry point. node web/followup.js <questionnaire.json> <answers.json> [output.json] drafts the next loop's questionnaire from a completed round.
    Lineage is wired without the agent touching it: parentLoopId, parentSessionId, a fresh
    loopId, version reset to 1, and bearingSummary carried forward. This closes
    TASK-119 and satisfies FR-047.
  • Three signals carried forward. A deferred response is copied verbatim — it was
    authored well the first time, and rewording it makes the user answer what looks like a
    different question. A recommendationDisposition of overridden becomes a free-text
    question asking what made the chosen answer right, naming the labels the user saw rather
    than question ids. A warning in validation.checks without acknowledged: true becomes
    a single-select built from that check's own suggest corrections, plus "Keep it as it is".
  • An acknowledged warning is deliberately not carried. It is a trade-off the user saw
    explained and took on purpose; bringing it back every round would punish them for
    answering.
  • Optional provenance on a question. { source, fromQuestionId, fromCheckId, fromLoopId } records why a generated question exists, making loop lineage auditable per
    question rather than only between questionnaires. Additive and optional; nothing reads it
    at runtime, and the form renders it unchanged.
  • It drafts, it does not author. No options, recommendations, or rationales are invented.
    Carry-over that would exceed the questionnaire's questionCap fails loudly with the count
    rather than emitting an over-cap form, and a round that deferred nothing, overrode nothing
    and left no warning open produces no file at all — with a report saying so.
  • tests/followup.test.js (14 tests), npm run test:followup, make test-followup, and a
    make followup target.
    The load-bearing test closes the loop end to end: generate a
    follow-up from the example answers, build it, drive it to submission in jsdom, and assert
    the emitted answers point back at the round they refine.

Fixed

  • Session lineage no longer breaks on submission. buildAnswers hard-coded
    session.parentSessionId to null unless a caller passed one, and the browser never did —
    so a follow-up's link to the session it refined was dropped the moment it was submitted. It
    now falls back to the questionnaire's own parentSessionId. Found by the round-trip test.