Files
structured-media-builder-OPEN/docs/public-export.md
T
2026-10-17 14:59:30 -06:00

8.2 KiB

Recording-to-discovery workflow

1. Establish source and publication facts

Create one source folder per stable recording ID, for example collection/annual-webinar/. Copy templates/media.json into it as media.json. Put reviewed, publication-safe transcript.txt and transcript.vtt alongside it. Store only material you are authorized to expose in a public repository. Keep the original recording and unredacted STT output in private storage, with an operator-side mapping to the media ID.

Fill in every template field, including the real duration in seconds, language, stable media URL or embed URL, published date, meaningful update date, creators, transcription tool/model when known, and rights statement. Use explicit null for unknown optional facts. recorded_at and published_at are different facts. Do not fabricate an original upload date from a later build date.

Set a stable collection site_url, such as https://media.your-domain.example, and a canonical URL exactly matching <site_url>/media/<media_id>/. A host URL identifies the bytes or player; the canonical URL identifies the companion page. Mirrors retain the recording's stable ID. Edited recordings with shifted timelines need a distinct media ID and an explicit migration record.

Set synthetic to false for real recordings and allow_synthetic to false in real catalogs. The supplied template intentionally blocks public output until rights, privacy, and consent are cleared. Its example URLs, dates, and names must be replaced.

2. Review STT and align text

Run the STT tool you already use; there is no paid transcription integration here. Preserve its raw output privately. Review public copies against the recording, especially names, numbers, unfamiliar vocabulary, speaker attribution, and low-quality audio.

VTT supplies the timed source. TXT supplies the portable reading copy and must match the normalized cue words exactly, including any speaker prefixes that appear as literal text. WebVTT <v Speaker> markup is extracted as speaker metadata and is not part of TXT. If your TXT has timestamps or speaker prefixes that the VTT does not, reconcile the reviewed copies before building. A multilingual translation is a separate source set and review, not a silent replacement.

Supported VTT: UTF-8/BOM, LF/CRLF, HH:MM:SS.mmm or MM:SS.mmm, optional cue identifiers/settings, NOTE blocks, multiline text, voice labels, basic emphasis/class/language tags, and HTML entities. The parser rejects overlapping/out-of-order cues, multiple speakers inside one cue, STYLE/REGION blocks, header metadata, ruby, and inline karaoke timestamps. Normalize these formats with a reviewed adapter rather than discard their meaning. Rolling captions often require deduplication and resegmentation. Cues must fit within the declared duration. Gaps are allowed; they are not inferred speech.

No cue-level confidence is invented. Missing speaker names remain null. Literal prefixes such as Speaker 1: remain source text unless converted to reviewed voice markup. Do not infer real identities from voices.

3. Draft semantic structure

python scripts/media_builder.py draft --manifest collection/annual-webinar/media.json --plan collection/annual-webinar/plan.json

This creates one explicitly unreviewed starter chunk covering all cues. It performs no semantic inference. Ask an AI/editor to split this into coherent topic units using the repo-local skill and recording context. The cue-000001 IDs refer to cue sequence in the normalized transcript, not permanent knowledge identities. Cue IDs can change after transcript edits, which invalidate the review hash.

For each chunk, author chunk_id, knowledge_id, version, supersedes, title, heading path, summary, a few useful tags, and a contiguous ordered cue list. Every cue must belong to exactly one chunk. This base layer has no overlapping windows. Future RAG adapters can add context windows without changing these canonical chunks. Keep long single-topic chunks when needed; no fixed token count is required.

Q&A should answer plausible retrieval questions, including what to do, why it matters, and stated limitations. answer_type distinguishes a direct extract from synthesis. Each answer needs at least one exact quote with a chunk_id and cue_id; cross-chunk synthesis cites all supporting chunks. An exact quote is mechanically checked; whether it supports the answer is a human/editorial judgment. Leave Q&A empty when there is no useful grounded answer. Never turn an unanswered meeting question into a claimed answer or invent a to-do owner/date.

Choose chapters for navigation, independently of chunk count. Each chapter identifies its first and last source cue. Chapters may omit a greeting or other nonessential navigation section; chunks still cover all cues. Chapter labels and summaries are interpretations requiring review.

4. Approve this exact input set

python scripts/media_builder.py signature --manifest collection/annual-webinar/media.json --plan collection/annual-webinar/plan.json

After inspecting the recording and plan, paste the returned input_sha256 into plan.json → review.input_sha256. Set review.status to approved, identify the reviewer, and record an ISO 8601 reviewed_at with timezone. Do not use an AI's name to imply a human approved real material. Clear consent/privacy and confirm redistribution rights in media.json before computing the final hash.

The hash covers canonical manifest and plan data (excluding the review block), the exact TXT/VTT bytes, and builder version. Changing any of these invalidates approval. Changing only review metadata does not. This is a workflow integrity check, not authentication or a signature authority. Automated validation cannot determine copyright ownership, consent, factual truth, or semantic entailment.

python scripts/media_builder.py validate --manifest collection/annual-webinar/media.json --plan collection/annual-webinar/plan.json

5. Build and retrieve

Copy templates/catalog.json to collection/catalog.json, edit its title/site URL, and list the source manifest and plan paths relative to the catalog. Catalog paths must stay inside the catalog folder; transcript paths stay inside their media source folder. Keep generated output outside those media source folders.

python scripts/media_builder.py build --catalog collection/catalog.json --output build/release-001
python scripts/media_builder.py verify --root build/release-001
python scripts/media_builder.py search --root build/release-001 --query "equipment maintenance" --limit 5

All catalog items must pass before output is written. Files are assembled in a temporary sibling directory and renamed into a new output directory. Existing outputs are never overwritten. Failures preserve sources and prior releases. The output checksum receipt covers every exported file except the receipt itself. It detects accidental changes, not malicious replacement of both files and receipt.

Search reads only a verified export, matches Unicode word tokens, ranks by distinct query-token matches, and returns chunks or Q&A plus citations and rights. This is a small-corpus keyword baseline, not vector retrieval or a relevance guarantee. No network calls, paid inference, or embeddings occur.

6. Update and retire

Minor corrections preserve semantic IDs; increment the chunk version when its text or meaning changes. A split or merge gets new chunk/knowledge IDs and records prior IDs in supersedes. This version does not maintain an identity registry or automatically audit historical version increments; review continuity against the previous release. Build a new complete catalog release, not an incremental append to old public files.

For removal, omit the item from the next release, remove all old public copies/hosted captions, purge caches and downstream retrieval stores, and record the decision privately where appropriate. Replacing local output alone does not revoke an already published copy. Redirects, tombstones, and change feeds are proposed additions, not implemented lifecycle services.

Inspect the generated page and data, then follow the publication workflow. Publish only the chosen complete output directory; never upload the repository root.