Description

Add a reusable native Ruby archive transcript state module for Jekyll archive data. The archive has migrated from legacy transcript content to structured turns, but callers still need one conservative state interface that treats either content or structured turns as transcript text. Scope is limited to src/generators/ and corresponding specs under spec/src/generators/. Do not edit bin scripts or Liquid templates.

Acceptance Criteria

Implementation Plan

  1. Inspect existing generator naming, YAML loading, and transcript-shape conventions in the requested files plus nearby specs/data samples.
  2. Add Generators::ArchiveState under src/generators/archive_state.rb with a small read-only API for path/id loading, transcript presence/format, text/word count, validation, enrichment, indexing, and summary-friendly structured output.
  3. Add focused RSpec coverage under spec/src/generators/archive_state_spec.rb for content-only, turns-only, missing, invalid YAML, validation_error, enriched, and indexed cases.
  4. Run targeted specs: bundle exec rspec spec/src/generators/core/yaml_io_spec.rb spec/src/generators/archive_state_spec.rb.

Implementation Notes

Implemented Generators::ArchiveState as a read-only transcript state wrapper with for_path, for_id, and from_data entry points. The module treats legacy content and structured turns as transcript text, exposes load/parse status and invalid YAML errors, keeps validated_at separate from validation_error, and reports enriched_at/indexed_at flags. Targeted specs passed: bundle exec rspec spec/src/generators/core/yaml_io_spec.rb spec/src/generators/archive_state_spec.rb (10 examples, 0 failures).

Final Summary

Implemented the core archive transcript state module only.

Changed files:

Summary:

Tests:

Risks:

Definition of Done