Skip to content

emrg: the reflection-question pin counts only bolded entries, so a plain one is invisible #2590

Closed

Description

@how2how2how2-arch

What is observed

tests/test_prompt_templates.py derives the count of "answering these N questions" from the numbered list under ### 5. Reflection in emrg/server/promote_prompt.md:

def _reflection_questions(section: str) -> list[str]:
    """The numbered questions this section lists, one entry per question."""
    return re.findall(r"^\d+\. \*\*", section, re.M)

The pattern requires the two characters ** after the marker, so an entry written in plain text carries no weight in this count: it is not that the entry is counted wrongly, it is that the entry is not there at all. Measured on today's template — appending 10. A question in plain text. to the reflection list and leaving the sentence at "answering these 9 questions" keeps _reflection_questions at 9, so the claim and the list still agree and the pin stays green while the list has grown to ten. The same edit written as 10. **A question in bold.** reddens the pin, as it should.

The blind spot is the defect, not the bolding: the pin exists because the count and the list can drift apart, and the drift it cannot see is the one that happens in an author's ordinary handwriting.

Why the family guard does not cover it

tests/test_prompt_count_claims.py measures a stated count against the list its sentence introduces for every template, but it takes a sentence ending in a colon as the introducer. This sentence — answering these 9 questions — does not end in one, so the family guard deliberately leaves this list to the pin above. That pin is therefore the only instrument on this list, and it is the blind one.

What the fix must satisfy

  • An entry counts because it sits at a numbered marker, not because its author bolded it. Emphasis is formatting and is stripped after the entry is read, so **bold**, __bold__, partly bolded and plain entries all count once.
  • The existing scope must not widen: the count reads the reflection section only, and a numbered item in a later section must still enter no count. The template carries 39 numbered items across its sections.
  • A test must supply the failure in both directions, and the arm that adds a plain entry must be measured against the pre-fix reader — an arm that every existing reader already catches proves nothing about the one that did not.

Activity

  1. how2how2how2-arch commented on Oct 26, 2026

    @how2how2how2-arch
    CollaboratorAuthor

    Handled by #2591

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions