Skip to content

feat(marking): borderline observations carried into improve prose#57

Open
hyperpolymath wants to merge 1 commit into
feature/composer-runtime-rubricsfrom
feature/composer-borderline-in-prose
Open

feat(marking): borderline observations carried into improve prose#57
hyperpolymath wants to merge 1 commit into
feature/composer-runtime-rubricsfrom
feature/composer-borderline-in-prose

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Stacked PR (6 of 8 follow-ups). Base = `feature/composer-runtime-rubrics` (PR #56). Merge order: #51 -> #52 -> #53 -> #54 -> #55 -> #56 -> this.

Summary

The borderline flags from PR #55 used to be visual-only. Now they travel into the improve prose as a one-line `Note:` sentence, so the warning makes it into the .docx the tutor pastes the feedback into.

Sentence shape

  • One component, over_rated:

    Note: the reflective learning piece rating sits noticeably above the numeric performance — please verify before pasting.

  • Two+ in same direction (grouped):

    Note: the reflective learning piece and the planning and practical SEN leadership piece ratings sit noticeably above the numeric performance — please verify before pasting.

  • Mixed directions:

    Note: the reflective learning piece rating sits noticeably above the numeric performance; and the academic essay rating sits noticeably below the numeric performance — please verify before pasting.

Implementation

  • `build_improve/5` now receives the borderlines map.
  • `borderline_note/2` groups flags by direction (`:over_rated` / `:under_rated`) and emits a single sentence (or `nil` if no borderlines).
  • Inserted between the convention sentence and the killer sentence — sits right before the closer.

Tests

  • 55 total, 5 new
  • Single severe over_rated -> note names component, reads "noticeably above"
  • under_rated direction reads "noticeably below"
  • Multiple in same direction share one clause ("ratings sit")
  • Mixed directions -> "; and" join
  • No borderlines -> no `Note:` line

Test plan

  • 55/55 via standalone elixirc + ExUnit
  • Browser: enter Q1=5/25 with rating "strong" -> Generate -> improve textarea contains the Note line
  • Two over_rated -> single clause with "ratings sit"
  • Mix over+under -> "; and" joining

Generated with Claude Code.

Borderline flags are no longer visual-only — when the composer detects
a significant rating/numeric disagreement, the improve box now ends
with a one-line "Note: ... please verify before pasting." so the
warning travels with the pasted feedback into the .docx.

Sentence shape
  - One component, over_rated:
    "Note: the reflective learning piece rating sits noticeably above
     the numeric performance — please verify before pasting."
  - Two+ components in same direction (grouped):
    "Note: the X and the Y ratings sit noticeably above the numeric
     performance — please verify before pasting."
  - Mixed directions (two clauses joined by "; and"):
    "Note: the X rating sits noticeably above ...; and the Y rating
     sits noticeably below ... — please verify before pasting."

Implementation
  - build_improve/5 now receives the borderlines map
  - borderline_note/2 groups flags by direction and emits a single
    sentence (or nil if no borderlines)
  - Inserted between the convention sentence and the killer sentence,
    so it sits right before the closer

Tests (55 total, 5 new)
  - Single severe over_rated -> note in improve, names component,
    reads "noticeably above"
  - under_rated direction reads "noticeably below"
  - Multiple components in same direction share a clause ("ratings sit")
  - Mixed directions -> "; and" join
  - No borderlines -> no Note line

Verified locally via standalone elixirc + ExUnit (55/0).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant