Skip to content

GenerateTelosSummary: freshness marker rendered as a content item, evicting real entries #1472

Description

@nbost130

Summary

paragraphItems() in LifeOS/install/LIFEOS/TOOLS/GenerateTelosSummary.ts filters out markdown headings and hrules, but not HTML comments. Since the unified TELOS format requires an <!-- updated: YYYY-MM-DD by:agent --> freshness marker immediately after every H2 (this is what MigrateTelosFreshness.ts stamps), that marker gets rendered as a content item in any section that has no ID-form (### M0:) entries.

Because downstream truncates to the first N items, the marker doesn't just add noise — it evicts a real entry from the generated summary.

Affected code

GenerateTelosSummary.ts L142-148 (current main):

function paragraphItems(content: string, prefix: string): ParsedItem[] {
  return content
    .split(/\n\s*\n/)
    .map(p => p.trim())
    .filter(p => p.length > 0 && !/^-{3,}$/.test(p) && !p.startsWith('#'))
    .map((p, i) => ({ id: `${prefix}${i}`, text: /* ... */ }));
}

The .filter() skips # and ---, but an HTML comment passes straight through.

Reproduction

A ## Models-style section (freshness marker present, no ### ID: items, so the ID-less prose fallback path runs):

## Models
<!-- updated: 2026-05-03 by:migration -->

Frameworks used for thinking and decision-making.

The OODA loop: observe, orient, decide, act.

Second-order thinking: ask "and then what?"

paragraphItems(body, 'MO') returns:

- **MO0**: <!-- updated: 2026-05-03 by:migration -->
- **MO1**: Frameworks used for thinking and decision-making.
- **MO2**: The OODA loop: observe, orient, decide, act.
- **MO3**: Second-order thinking: ask "and then what?"

MO0 is the freshness marker. In the rendered PRINCIPAL_TELOS.md it appears verbatim as a bullet, and the last real item drops off the end.

Expected

The freshness marker is format metadata and should never be treated as content.

Suggested fix

One-line addition to the existing filter:

.filter(p => p.length > 0 && !/^-{3,}$/.test(p) && !p.startsWith('#') && !p.startsWith('<!--'))

Confirmed this resolves it. Happy to open a PR if useful.

Impact

Hits any install whose TELOS has a correctly-stamped freshness marker on a section without ID-form items. The failure is quiet: the summary still generates, it just contains an HTML comment where a real entry should be.

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