How arlishansenn/podsum works
1. Overall shape
- This repo is a stateful content-processing pipeline, not a traditional app.
- Its primary purpose is to take audio or email inputs, transform them locally, generate Hermes-based interpretations/summaries, convert the result to EPUB, and deliver it to a configured target.
- The architecture is split between a reusable Python core, operational wrappers in outputs/, Hermes skill assets in skills/, and tests/fixtures.
2. Main production domain: podcast pipeline
- The podcast flow is the core path described in the README: RSS feed discovery, episode download, local transcription with mlx-whisper, Hermes interpretation, markdown aggregation, EPUB generation, and delivery.
- The key statefulness is that each stage records progress so interrupted runs can resume instead of restarting from scratch.
- The repo-level configuration for production execution lives under outputs/ alongside launchd plist templates and feed configuration.
3. Email summary pipeline as a second workflow
- The email feature is an opt-in parallel pipeline that reuses the same final delivery mechanism as podcast reports.
- It scans IMAP/Gmail messages, produces a structured scan JSON, generates a Hermes summary, converts that to EPUB, then sends it through the Podsum target.
- This subsystem is intentionally supported by offline acceptance tests using sanitized .eml fixtures rather than real mailbox access.
4. Core reusable Python package
- outputs/podsum_core/ holds shared implementation used by the production workflows.
- delivery/hermes_adapter.py is the integration boundary to Hermes-based processing and delivery orchestration.
- epub_converter/ contains the markdown-to-EPUB path, with preprocessing and markdown normalization split into separate modules.
5. Operational entrypoints and runners
- outputs/podsum.py, outputs/podsum_runtime.py, outputs/podsum_send_to_feishu.py, and outputs/podcast_downloader.py are the concrete runtime-facing scripts.
- outputs/podsum_email_summary.py, outputs/podsum_email_workbench.py, and outputs/podsum_email_fixture_tool.py support the email workflow and its local tooling.
- The launchd plist files in outputs/ show that the project is designed to run as scheduled macOS jobs, with one launcher per major task.
6. Email processing subsystem
- outputs/email/ is a self-contained package for the email summary feature.
- It is structured around agents and shared state: brief_agent.py, evidence_agent.py, graph.py, need_store.py, providers.py, and schemas.py.
- Supporting files such as email_mailparser_cleaner.js, email_summary_prompt.md, and email_evidence_preprocess_prompt.md indicate a pipeline that preprocesses raw mail, extracts evidence, and assembles the final LLM/Hermes prompt inputs.
7. Transcript cleaning as a separate product boundary
- outputs/transcript_cleaner/ is explicitly described as an independent project.
- It has its own README.md, PRD.md, CLI entrypoints, EPUB support, and cleaner implementation, so it should be treated as a sibling subsystem rather than a helper library.
- The skills/media/make-markdown-readable/ skill copies are used by this workflow for Markdown cleanup and EPUB export.
8. Hermes skills as an externalized integration layer
- The repo owns project-specific copies of Hermes skills under skills/.
- The two important skills are readable-Markdown cleanup/export and Feishu file delivery; the README says these copies are the source of truth.
- This means Hermes behavior is not embedded solely in Python code; part of the processing logic lives in skill documents and scripts that the runtime installs into the active Hermes profile.
9. Delivery boundary
- Delivery is abstracted as a final stage rather than hardcoded into each workflow.
- The Feishu-specific path is represented by skills/social-media/hermes-feishu-file-send/ and related output scripts, while the core pipeline talks to a delivery adapter in podsum_core/delivery/.
- That makes “generate content” and “send content” separate architectural concerns.
10. Configuration and deployment
- The repo is deployment-aware: outputs/README.md, launchd plist templates, and outputs/feeds.json define how the pipeline runs in practice.
- scripts/install-hermes-skills.sh is part of the operational story, ensuring Hermes skill copies are installed into the correct profile.
- outputs/podsum.env.example indicates environment-variable-driven runtime configuration, with PODSUM_PYTHON called out as a required boundary to the application virtualenv.
11. Testing and fixtures
- tests/test_podsum_cli.py and tests/test_transcript_cleaner.py cover the two major executable surfaces.
- Email behavior is validated with .eml fixtures and scan JSON fixtures under tests/fixtures/, which shows the email pipeline is designed to be testable without live external services.
- This fixture strategy is important for understanding the architecture: parsing and summarization are isolated from transport and mailbox access.
12. Data flow summary for an architecture diagram
- For podcasts: RSS feed config → download audio → local transcription → Hermes interpretation → markdown merge → EPUB conversion → delivery target → persisted run state.
- For email: mailbox scan → structured scan JSON → evidence/brief generation → Hermes summary → EPUB conversion → same delivery target.
- The shared end of both flows is the EPUB/delivery boundary, while the upstream collectors/transcribers differ by source type.
13. Key architectural boundaries to draw
- Separate source collectors: RSS/audio vs. mailbox/email.
- Separate transformation engines: transcription and email parsing/agent graph.
- Shared content assembly: markdown and EPUB generation.
- Shared delivery mechanism: Hermes-driven send stage, including Feishu integration.
- Shared operational state and resumability: outputs and runtime artifacts are part of the product, not just build outputs.
14. What is intentionally not the core
- There is no indication of a traditional web server, database service, or user-facing UI in this repo.
- The central runtime model is batch, scheduled, and file-oriented, with local processing and external service calls only at the input/output edges.
Main entry points: graph.py Agent graph · podsum.py Podsum runtime · podsum_email_summary.py Email summary CLI · cli.py Transcript CLI
Components 26
Outputs & Runtimes
Production entrypoints, job configs, and runtime state.
- Podsum runtime · Main podcast processing entrypoint with resumable run state.
outputs/podsum.py - Podcast downloader · Discovers feeds and downloads episode audio for the podcast flow.
outputs/podcast_downloader.py - Runtime shell · Operational wrapper for scheduled runs and environment wiring.
outputs/podsum_runtime.py - Feishu sender · Concrete script for sending generated files to Feishu.
outputs/podsum_send_to_feishu.py - Email summary CLI · Entry script for generating email summaries end to end.
outputs/podsum_email_summary.py - Email workbench · Interactive tooling for inspecting and iterating on email processing.
outputs/podsum_email_workbench.py - Fixture tool · Utility for working with email summary fixtures offline.
outputs/podsum_email_fixture_tool.py - Feeds config · Podcast feed definitions and operational runtime inputs.
outputs/feeds.json
Shared Core
Reusable EPUB and delivery logic shared by workflows.
- EPUB generator · Markdown-to-EPUB pipeline used by both major workflows.
outputs/podsum_core/epub_converter/epub_generator.py - Markdown processor · Normalizes and assembles markdown before EPUB generation.
outputs/podsum_core/epub_converter/markdown_processor.py - Preprocess · Prepares raw content for downstream EPUB conversion.
outputs/podsum_core/epub_converter/preprocess.py - Hermes adapter · Shared boundary for Hermes-driven interpretation and delivery orchestration.
outputs/podsum_core/delivery/hermes_adapter.py
Email Pipeline
Mailbox scanning, evidence extraction, and summary generation.
- Agent graph · Coordinates brief, evidence, and shared state for email summarization.
outputs/email/graph.py - Brief agent · Creates the compact summary layer for mailbox content.
outputs/email/brief_agent.py - Evidence agent · Extracts supporting evidence and source detail from messages.
outputs/email/evidence_agent.py - Need store · Persists intermediate needs and progress for the email workflow.
outputs/email/need_store.py - Providers · Mailbox and provider access layer for email ingestion.
outputs/email/providers.py - Schemas · Structured records for scans, evidence, and summary inputs.
outputs/email/schemas.py - Email I/O · Input/output utilities for mailbox messages and scan artifacts.
outputs/email/io.py
Transcript Cleaner
Standalone transcript cleanup and EPUB export subsystem.
- Transcript CLI · Independent transcript-cleaner command surface.
outputs/transcript_cleaner/cli.py - Cleaner · Core transcript cleanup implementation.
outputs/transcript_cleaner/cleaner.py - Transcript EPUB · EPUB export path for the transcript-cleaner subsystem.
outputs/transcript_cleaner/epub.py
Hermes Skills
Externalized skill copies installed into Hermes profiles.
- Readable markdown · Hermes skill copy for markdown cleanup and EPUB export.
skills/media/make-markdown-readable/SKILL.md - Feishu send skill · Hermes skill copy for safe file preparation and Feishu delivery.
skills/social-media/hermes-feishu-file-send/SKILL.md
Tests & Fixtures
Executable surfaces and offline fixture coverage.
- CLI tests · Coverage for the podcast/runtime command surfaces.
tests/test_podsum_cli.py - Transcript tests · Coverage for the standalone transcript cleaner.
tests/test_transcript_cleaner.py
Connections 27
- Podsum runtime → Podcast downloader: downloads · Podcast runs start by collecting and downloading episode audio.
- Podsum runtime → Hermes adapter: interprets & sends · The main run delegates Hermes interpretation and delivery orchestration.
- Podsum runtime → EPUB generator: builds EPUB · Final podcast output is assembled into EPUB.
- Podsum runtime → Feeds config: reads feeds · Feed discovery and scheduling are driven by repo configuration.
- Runtime shell → Podsum runtime: wraps · Operational launcher around the main batch runner.
- Runtime shell → Feishu sender: launches · Scheduled runtime also exposes the delivery job surface.
- Email summary CLI → Agent graph: coordinates · Email summary entrypoint executes the agent graph.
- Agent graph → Brief agent: uses · The graph invokes the brief-generation agent.
- Agent graph → Evidence agent: uses · The graph invokes the evidence-extraction agent.
- Agent graph → Need store: persists · Intermediate needs and progress are stored for resumability.
- Agent graph → Providers: ingests · Mailbox/provider access feeds the summary pipeline.
- Agent graph → Schemas: structures · Structured scan and summary data are defined by schemas.
- Email summary CLI → EPUB generator: exports EPUB · Email summaries share the common EPUB generation boundary.
- Email summary CLI → Hermes adapter: delivers · Email summaries use the shared Hermes delivery adapter.
- Email I/O → Providers: parses input · Mailbox data is normalized into pipeline-ready form.
- Email I/O → Schemas: emits · Scan artifacts are represented as structured records.
- Transcript CLI → Cleaner: runs · CLI entrypoint drives transcript cleanup.
- Transcript CLI → Transcript EPUB: exports · Standalone tool can emit EPUB output.
- Cleaner → Readable markdown: uses skill · Transcript cleanup relies on the markdown-readability skill copy.
- Transcript EPUB → Readable markdown: uses skill · EPUB export is aligned with the markdown cleanup skill assets.
- Hermes adapter → Feishu send skill: bridges · Shared delivery adapter connects to Feishu skill-based sending.
- EPUB generator → Markdown processor: depends on · EPUB generation consumes normalized markdown.
- Markdown processor → Preprocess: depends on · Markdown processing is preceded by preprocessing.
- Feishu sender → Feishu send skill: invokes · Concrete sender script uses the Feishu skill implementation.
- Podcast downloader → Preprocess: feeds · Downloaded source material enters the shared preprocessing path.
- CLI tests → Podsum runtime: covers · Tests validate the primary podcast/runtime surface.
- Transcript tests → Transcript CLI: covers · Tests validate the standalone transcript cleaner CLI.