Each comment dir now produces, alongside combined.md, one
``<original>.md`` sibling per attachment containing just that
attachment's extracted text + a small YAML frontmatter (status,
chars, source_file). Lets Zotero (and anything else consuming the
corpus) navigate to a single attachment's transcript instead of
always opening the aggregated combined.md.
- combine.extract_comment writes siblings during fresh extraction.
- New combine.derive_siblings_from_combined parses an existing
combined.md and emits the missing siblings without re-decoding the
underlying PDFs/DOCXs — the backfill path for the 23k items already
extracted before this change.
- walker renames its callback to on_extracted(comment_id, comment_dir)
and runs the sibling-backfill for any skipped dir before invoking
the callback, so callers always see a complete set of MDs.
- cli.comments attach callback now glob('*.md')s the dir and attaches
each missing one; the existing-attachments cache key changes from
item_key to (item_key, filename) to keep idempotence at the per-file
level.
Per-attachment metadata extraction (author/org from letterhead +
signature lines) tracked separately as #416.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
3.8 KiB
3.8 KiB