Add all scaffolding, design, and decision documentation AKA first commit

This commit is contained in:
iamdoubz
2026-06-30 16:12:55 -05:00
parent b19e01c171
commit aae22a0e23
63 changed files with 4690 additions and 0 deletions
+55
View File
@@ -0,0 +1,55 @@
//! Notes assembly & export (Phase 2; PDF/Word in Phase 8). FR-NOTE-*.
//!
//! Renders speaker-tagged Markdown from transcript + speaker names (+ optional
//! summary). Names are resolved here from the mapping; segments keep internal IDs.
use crate::models::{SpeakerInfo, TranscriptSegment};
use std::path::{Path, PathBuf};
#[derive(Debug, thiserror::Error)]
pub enum NotesError {
#[error("render failed: {0}")]
Render(String),
#[error("export failed: {0}")]
Export(String),
#[error("io error: {0}")]
Io(#[from] std::io::Error),
}
#[derive(Debug, Clone, Copy)]
pub enum ExportFormat {
Md,
Pdf,
Docx,
Bundle, // audio + transcript + notes
}
pub trait NotesRenderer: Send + Sync {
/// Build Markdown with speaker-tagged dialogue (+ summary if present).
fn to_markdown(
&self,
segments: &[TranscriptSegment],
speakers: &[SpeakerInfo],
summary_md: Option<&str>,
) -> String;
fn export(&self, markdown: &str, dest: &Path, fmt: ExportFormat) -> Result<PathBuf, NotesError>;
}
pub struct MarkdownNotes;
impl NotesRenderer for MarkdownNotes {
fn to_markdown(
&self,
_segments: &[TranscriptSegment],
_speakers: &[SpeakerInfo],
_summary_md: Option<&str>,
) -> String {
// T2.4: resolve speaker names, group dialogue, prepend summary section.
todo!("Phase 2 — assemble Markdown")
}
fn export(&self, _markdown: &str, _dest: &Path, _fmt: ExportFormat) -> Result<PathBuf, NotesError> {
// T2.6 (.md/bundle); T8.4 (pdf/docx via local conversion).
todo!("Phase 2/8 — export notes")
}
}