Skip to content

feat: checklist engine and HTML-comment metadata #3

@shouze

Description

@shouze

Summary

Pure-function core logic: checklist building/parsing/diffing and HTML-comment metadata embedding.

Tasks

  • src/core/checklist.ts
    • BODY_LIMIT = 65_000
    • buildChecklist(results) → markdown checklist lines
    • parseChecklist(body)ChecklistItem[]
    • diffChecklist(old, new)DiffResult keyed on repo:path:line:text
    • applyDiff(body, diff) → updated body
    • buildSummaryBlock / updateSummaryBlock
    • checkBodyLength
  • src/core/metadata.ts
    • embedMetadata(body, meta) — HTML comment at end of body
    • extractMetadata(body)EpicMetadata | null
    • updateMetadata(body, patch) — partial update
    • stripMetadata(body) — remove for display

Metadata format

<!-- github-issue-ops:metadata
{"version":1,"replayCommand":"...","createdAt":"...","config":{...}}
-->

Acceptance criteria

  • Unit tests in src/core/checklist.test.ts and src/core/metadata.test.ts pass
  • Round-trip: extractMetadata(embedMetadata(body, meta)) equals meta
  • Diff is idempotent: re-applying the same results produces no new changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions