Skip to content

feat(planning): gate interview page answers on open prerequisites and expect declared dependencies #9709

Description

@kyle-sexton

Parent

Refs #5796

Depends on

  • none: on the frontier now

Outcome

Saving a decision on a question whose dependsOn names a still-open question follows a frontierLock
setting, and skills are expected to declare dependsOn so the lock has data to act on.

  • frontierLock: confirm (default): Save on a blocked question opens "Q100 depends on Q22, which is still
    open. [Go to Q22] [Answer anyway]". Answer anyway sends outOfOrder: ["Q22"], which the server stores; when
    Q22 is decided, derive_states marks Q100 stale. The rail shows a padlock chip in place of Blocked.
  • frontierLock: hard: the server answers 409 {"error": "blocked", "waitsOn": [...]}.
  • frontierLock: off: today's behavior.
  • Ask, Rephrase and Research this stay enabled in every mode.
  • add and add-round warn when a question omits dependsOn ([] declares independence) and when it names
    a question open in the same round; under a requireDepends setting both refuse. surface.md "A round" states
    the rule beside commits, and the interview skill requires every posted question to declare dependsOn.

Decisions

Key interfaces

  • Interview page: plugins/planning/surface/index.html; page server: plugins/planning/surface/server.py
    (record(), derive_states); round CLI: plugins/planning/surface/round.py behind round.sh;
    exporters: plugins/planning/surface/exporters.py.
  • The interview skill's surface contract, plugins/planning/skills/interview/context/surface.md, documents
    every new op, field, setting and refusal.

Done when

  • A server test sets frontierLock: hard, saves on a blocked question and gets 409 with "error": "blocked" and the open ids in waitsOn.
  • A server test under confirm stores outOfOrder on the event, and a later decision on the prerequisite derives stale for the dependent.
  • Round tests: add without dependsOn exits 0 with a warning naming the id; add naming a same-round open question warns; both exit non-zero under requireDepends.
  • A page test shows the confirm dialog with "Go to" and "Answer anyway" on a blocked save, and Ask enabled under hard.
  • grep -n "frontierLock" plugins/planning/skills/interview/context/surface.md and grep -n "requireDepends" plugins/planning/skills/interview/context/surface.md each print a line.
  • scripts/run-test-file.sh plugins/planning/surface/test_server.py exits 0.
  • scripts/run-test-file.sh plugins/planning/surface/test_round.py exits 0.
  • bash plugins/planning/surface/surface.test.sh exits 0, so a data dir without the new fields still loads, renders and exports.
  • scripts/check-changelog-fragments.sh --check-required origin/main exits 0.

Out of scope

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyFully specified and briefed; eligible for autonomous pickup from the frontier.priority: mediumReal value, no hard deadline; normal backlog flow.status: readyTriaged, unblocked, and fully specified; eligible to pick up.

    Fields

    No fields configured for Feature.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions