(angel-nfrs
  (:schema angel-lisp/0.2
   :profile post-test-nfr-augmentation/0.2
   :identity cs617/chapter12-recursion-angel/nfr-authority
   :role NFR-AUGMENTATION
   :audience solver
   :status user-authorized-post-test-authority
   :representation typed-relational-contract
   :equivalence (:intended-with "NFRs.pdf" :same-requirement-set)
   :truth-policy (missing UNKNOWN) (closed-world nil)
   :normative-vocabulary (MUST MUST-NOT SHOULD MAY NOT-REQUIRED OPEN ADVISORY))

  (:interpretation
    (MUST :obligation)
    (MUST-NOT :prohibition)
    (SHOULD :strong-expectation-not-absolute-obligation)
    (MAY :permitted)
    (NOT-REQUIRED :absence-of-obligation)
    (OPEN :implementation-choice-not-fixed)
    (ADVISORY :non-normative-guidance)
    (UNKNOWN :not-specified)
    (:rule absence-of-clause -/-> prohibition)
    (:rule absence-of-clause -/-> obligation)
    (:rule unspecified-HOW -> OPEN-unless-constrained-elsewhere))

  (:provenance
    (:kind post-functional-test-observation-and-parity-closure-set)
    (:authorization explicit-user-authorization)
    (:contains requirements-and-observable-acceptance-only)
    (:excludes (peer-source
                peer-algorithms
                peer-listings
                peer-screenshots
                peer-teaching-notes
                peer-TA-material
                peer-Socratic-material
                peer-implementation-history))
    (:temporal-role after-functional-baseline-before-final-NFR-release)
    (:baseline-preservation required))

  (:scope
    (:applies-to (vttest shared-new-n-editor hanoi-report queens-report queens-progress top-menu))
    (:functional-contract unchanged-except-where-presentation-constraint-explicitly-overlays-it)
    (:implementation-method OPEN)
    (:goal observable-presentation-usability-refresh-quality-and-parity))

  (:requirements

    ;; ---------------------------------------------------------------
    ;; NF-01 - VTTEST readability
    ;; ---------------------------------------------------------------

    (NF-01 MUST
      (vttest.virtual-line
        :visible-composition (blank-before-line-number
                              two-digit-line-number
                              ASCII-space
                              text)))

    (NF-01A MUST
      (vttest.physical-composition
        :with VT_VIEW.overlay
        :read-naturally-as "VT 01 ..."))

    (NF-01B SHOULD
      (vttest
        :make one-line-UP-DOWN-scrolling visually-obvious))

    ;; ---------------------------------------------------------------
    ;; NF-02 - visible cursor for typed-character input
    ;; ---------------------------------------------------------------

    (NF-02 MUST
      (shared-new-n-editor
        :cursor platform-normal-blinking-cursor
        :position immediately-after-current-input
        :visible-while-editing true))

    (NF-02A MUST
      (shared-new-n-editor
        :on-exit (accepted MENU BRK)
        :cursor-visible false))

    (NF-02B MUST
      (interactive-field
        :when accepts-typed-characters
        :insertion-position visibly-marked-by-cursor))

    (NF-02C NOT-REQUIRED
      (action-surface
        :when interaction-is-function-key-selection-only
        :cursor-visible))

    ;; ---------------------------------------------------------------
    ;; NF-03 - Hanoi report spacing
    ;; ---------------------------------------------------------------

    (NF-03 MUST
      (hanoi-report
        :shift-right-by-virtual-columns 1
        :elements (identity headings cues)))

    (NF-03A MUST
      (hanoi-report.move-stream
        :field-start-columns (3 10 17 24)
        :changed-by-NF-03 false))

    ;; ---------------------------------------------------------------
    ;; NF-04 - Typography
    ;; ---------------------------------------------------------------

    (NF-04 MUST
      (human-facing-prose-and-report-headings
        :typography natural-mixed-case))

    (NF-04A MUST
      (formal-key-names-and-acronyms
        :preserve-formal-spelling true))

    (NF-04B MUST
      (function-key-cells
        :preserve-contractual-lowercase true))

    ;; ---------------------------------------------------------------
    ;; NF-05 - Physical LCD refresh quality
    ;; ---------------------------------------------------------------

    (NF-05 MUST
      (queens.progress-display
        :visible-repeated-full-screen-flash false))

    (NF-05A MUST
      (queens.progress-display
        :while-same-screen
        :unchanged-physical-regions remain-visually-stable))

    (NF-05B MAY
      (physical-LCD
        :full-redraw on-screen-or-mode-transition))

    (NF-05C OPEN
      (queens.progress-display
        :implementation dirty-region-strategy))

    (NF-05D MUST
      (queens.progress-display
        :spinner-and-count remain-correct))

    (NF-05E MUST
      (queens.progress-display
        :MENU-BRK-responsiveness unchanged))

    (NF-05F MUST
      (queens
        :regression-witness (N=8 total-solutions=92)))

    (NF-05G MUST
      (queens.view.solution-pages
        :behavior-changed-by-NF-05 false))

    ;; ---------------------------------------------------------------
    ;; NF-06 - Top-menu quiet presentation
    ;; ---------------------------------------------------------------

    (NF-06 MUST-NOT
      (top-menu.row2
        :text "Recursive algorithms + VT"))

    (NF-06A MUST
      (top-menu.row2
        :content blank))

    (NF-06B MUST
      (top-menu.row3
        :content blank))

    (NF-06C MUST-NOT
      (top-menu
        :invent-helper-prose-in rows-2-or-3))

    ;; ---------------------------------------------------------------
    ;; NF-07 - Queens report spacing
    ;; ---------------------------------------------------------------

    (NF-07 MUST
      (queens-report
        :shift-right-by-virtual-columns 1
        :elements (headings board cues)))

    (NF-07A MUST
      (queens-report.physical-composition
        :with VT_VIEW.overlay
        :read-naturally-as "VT N-Queens ...")))

  (:non-requirements
    (ADVISORY
      (this-document
        :does-not-specify recursion-algorithm
        :does-not-specify storage-layout
        :does-not-specify source-decomposition
        :does-not-specify routine-names
        :does-not-authorize peer-inspection
        :does-not-rewrite original-functional-contract)))

  (:acceptance
    (MUST (evaluate observable-result against NF-01..NF-07))
    (MUST (preserve pre-NFR functional-baseline except where an NFR explicitly changes presentation))
    (MUST-NOT (infer implementation-history from this augmentation))))
