Skip to content

Thematic breaks (---) are parsed as instructions and reported as cross-surface overlaps #192

Closed

Description

@Pantoria

Problem

A line that is only a thematic break (---) is parsed as an instruction unit (parseMemoryUnits, src/memory.js). It then:

  • adds to the "N instructions" count in status;
  • gets an id in the instruction index given to analysis;
  • shows as a cross-surface overlap with similarity 1.00 against any skill whose body also has a --- line.

Repro

AGENTS.md:

# Guide

Run the linter before you commit.

---

## Tests

Run the unit tests with `make test`.

---

Keep commits small.

.agents/skills/demo/SKILL.md:

---
name: demo
description: Use when releasing.
---

# Release

Tag the commit, then push the tag.

---

Write the changelog entry.

backpass status:

BUDGET (always-loaded)
  AGENTS.md + skill descriptions [....] 36 / 5,000 tok · 5 instructions

CROSS-SURFACE (report-only)
  AG-002 restates demo body · 1 tok · similarity 1.00 · body loads on trigger; weigh placement
  AG-004 restates demo body · 1 tok · similarity 1.00 · body loads on trigger; weigh placement

The units are AG-001 "Run the linter...", AG-002 ---, AG-003 "Run the unit tests...", AG-004 ---, AG-005 "Keep commits small." There are 3 instructions, not 5, and there is no overlap. In a real file with several section breaks, most of the overlap report was these lines.

Expected

A thematic-break-only line (---, ***, ___) is not an instruction unit. It is not counted, not given an id, and not reported as an overlap.

backpass 0.1.30 (main d1e7550).

Activity

  1. kunchenguid commented on Sep 30, 2026

    @kunchenguid
    Owner

    Speaking as Kun's firstmate:

    Outcome: ready-for-pr — real parser defect on main (d8b2c8a). No open PR. parseMemoryUnits (src/memory.js) treats a thematic-break-only line (--- / *** / ___) as its own unit because only blank lines flush; those units inflate the instruction count and produce similarity-1.00 cross-surface overlaps against skill frontmatter/body breaks.

    contract-class: restore — instruction units and overlap reports already promise real instructions; counting a thematic break is that contract broken, not a new product default.

    VISION (per rule):

    1. Evidence is the only currency — aligns (false overlap is fabricated evidence).
    2. The human owns the weights — aligns (no write path).
    3. Nothing the model says is taken on faith — aligns (units must come from real instruction text).
    4. The budget is the constraint — aligns (false instruction count / overlap noise).
    5. It reads what you already have and owns nothing — aligns.
    6. Failure is loud and named — aligns (status must not report phantom overlaps).
    7. Scope — aligns.

    Skip break-only lines in parseMemoryUnits (keep them out of ids, counts, and overlap). ready-for-pr + bug. I will not open a competing PR.

  2. added
    ready-for-prIssue is in scope and ready for a PR
    bugSomething isn't working
    on Sep 30, 2026
  3. kunchenguid commented on Oct 14, 2026

    @kunchenguid
    Owner

    Speaking as Kun's firstmate:

    Still-real pass (14-day restamp): ready-for-pr. Rechecked latest main (e6a030a): parseMemoryUnits (src/memory.js) still flushes only on blank lines, headings, and new list items, and has no thematic-break check. A lone ---, ***, or ___ line still becomes its own instruction unit, so it gets an id and a count and can show up as a cross-surface overlap at similarity 1.00. No open PR.

    contract-class: restore. Units and overlap reports promise real instructions.

    VISION (per rule):

    1. Evidence is the only currency: aligns (a phantom overlap is fabricated evidence).
    2. The human owns the weights: aligns (no write path).
    3. Nothing the model says is taken on faith: aligns ("a number shown to a person must describe the thing it claims to").
    4. The budget is the constraint: aligns (fixes an inflated instruction count).
    5. It reads what you already have and owns nothing: aligns.
    6. Failure is loud and named: aligns.
    7. Scope / align-resist: aligns (makes the report cheaper to verify).

    Watch out for - list items and --- inside fences. Only a break-only line outside a fence should be skipped. Leaving ready-for-pr. I won't open a competing PR.

  4. Pantoria commented on Oct 15, 2026

    @Pantoria
    ContributorAuthor

    PR #213 is up for review (raised through no-mistakes). Thematic-break-only lines outside fences are no longer instruction units (not counted, given an id, or reported as overlaps); - item list items and fenced --- are unchanged. It bumps ANALYSIS_INDEX_VERSION because AG ids shift.

  5. kunchenguid commented on Oct 15, 2026

    @kunchenguid
    Owner

    Speaking as Kun's firstmate:

    Fixed on main by #213 (squash d605c97), thanks @Pantoria. I checked main: parseMemoryUnits (src/memory.js) now skips CommonMark thematic-break lines (THEMATIC_BREAK) outside fences, so they no longer get an id, count as instructions, or show up as cross-surface overlaps. - item list items and fenced --- still count. ANALYSIS_INDEX_VERSION went to 4, so cached evidence with the old AG ids gets re-analyzed once. It'll ship in the next release. Already closed.

    contract-class: restore. VISION: evidence, human-owns-weights, nothing-on-faith ("a number shown to a person must describe the thing it claims to"), budget, owns-nothing, loud failure and scope all align.

  6. added a commit that references this issue on Oct 15, 2026
    d605c97
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

    bugSomething isn't workingready-for-prIssue is in scope and ready for a PR

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions