cjm-transcript-decomp-core
A frontend-agnostic core for the transcript decomposition workflow — composes isolated capability workers (forced alignment, VAD, graph storage) into a headless pipeline that decomposes transcription run manifests into a VAD-aligned context-graph spine with traceable provenance, and a CLI as its first driver.
Modules
cjm_transcript_decomp_core.__init__cjm_transcript_decomp_core.alignment— Pure forced-alignment logic (no capability calls): map FA words back to character spans in the original text, assign words to VAD chunks by timestamp, and build one text segment per VAD chunk. Extracted from the page-centric ForcedAlignmentService (Tier-1 logic).cjm_transcript_decomp_core.cli— The CLI driver — the decomposition core's first (and currently only) frontend.cjm_transcript_decomp_core.discovery— Capability-role discovery by manifest surface match — the journaling-by-cjm_transcript_decomp_core.graph— Graph-spine EXTENSION + skeptical-lens verification (stage 5, CR-18 revolution 2). Decomp no longer creates a Document: it RECOMPUTES the transcription-emitted root's deterministic node ids from the consumed manifest (no search), verifies the root exists, and attaches the fine Segment spine under the existing AudioSegment nodes — PART_OF to the owning rendition, STARTS_WITH per rendition (the coarse-seam jump anchor), source-wide NEXT. Each Segment carries the audio TimeSlice ref plus per-transcriber CharSlice refs into the Transcript nodes (the D4/P10 framing, finally expressible). Commit goes through the layer's idempotent extend_graph.cjm_transcript_decomp_core.launch— The shared launch surface every decomp shell drives through: the argumentcjm_transcript_decomp_core.models— Lean data shapes for the transcript-decomposition pipeline: in-core mirrors of the forced-alignment / VAD / text DTOs (no FastHTML deps), run configuration, the committed graph-segment carrier, and the decomposition run manifest (proto-bundle).cjm_transcript_decomp_core.pipeline— The headless decomposition pipeline (stage 5: decomp is an EXTENDER). Load a transcription run manifest, verify the transcription-emitted graph root exists (the graph begins at transcription), then per source per pipeline-segment run VAD + per-transcriber forced alignment, build one aligned segment per VAD chunk with per-transcriber text variants, and attach the fine spine under the existing AudioSegment nodes via the layer's idempotent extend_graph — with HITL approval seams between alignment, commit, and the next source.cjm_transcript_decomp_core.respine— Chunk RESPINE — re-derive ONE coarse chunk of a LIVE spine from a landed external transcript (work item 7a5e9c84; design ruling 0b4d5cfa, amendment 4a7ec4f8).cjm_transcript_decomp_core.retire— Spine RETIREMENT + COMPACTION — safe removal of superseded decomposition spines (ruling a7617bd4, item eaefebd2).cjm_transcript_decomp_core.runs— Run-manifest indexes for the decomp-batch TUI (work item 0ff6bf0f): thecjm_transcript_decomp_core.segments— Fine-segment inspection for the decomp TUI (work item 166dd2b8, half a):cjm_transcript_decomp_core.state— Sidecar TUI state: last-used batch settings persisted across sessions (the
API
cjm_transcript_decomp_core.alignment
assign_words_to_chunksfunction — Assign each FA word to a VAD chunk by timestamp overlap.build_segments_from_alignmentfunction — Build a TextSegment per VAD chunk by grouping words by chunk assignment.carve_chunks_at_event_spansfunction — The event-carve stage (EVENT_SPLIT_POLICY, respine trial DEC 6cc10fb7):collapse_newlinesfunction — The stored-text form of a slice that still holds a newline: a retainedmap_fa_words_to_textfunction — Map forced-alignment words back to character spans in the original text.normalize_external_textfunction — Offset-preserving fold-input normalisation for EXTERNAL variants (findingrescue_gap_wordsfunction — The word-rescue stage (WORD_RESCUE_POLICY, 96edc646 verdict bc7ece7b):sentence_end_word_indicesfunction — Map capability-delivered sentence boundaries onto FA words (B.5: thesplit_chunks_at_sentence_gapsfunction — The sentence-split stage (SENTENCE_SPLIT_POLICY, DEC f1024568): refine thetier1_alignment_checksfunction — Tier-1 deterministic pre-filters for the alignment-review seam (no AI).
cjm_transcript_decomp_core.cli
backfill_provenance_commandfunction — Executebackfill-provenance: mint the Segment -> Transcript DERIVED_FROMbuild_parserfunction — Build the CLI parser (subcommands: run).load_capabilitiesfunction — Discover manifests + load each requested capability (default instance).mainfunction — CLI entry point (console script:cjm-transcript-decomp-core).respine_chunk_commandfunction — Executerespine-chunk(work item 7a5e9c84, ruling 0b4d5cfa; the machinery livesrun_commandfunction — Execute therunsubcommand: extend transcription-run manifest(s) with the fine spine.spine_commandfunction — The spine retirement + compaction verbs (ruling a7617bd4; the machinery lives in
cjm_transcript_decomp_core.discovery
discover_capabilityfunction — Pick a DEFAULT capability for a role by surface match.manifests_with_methodfunction — Enumerate installed capabilities whose structural surface listsmethod.
cjm_transcript_decomp_core.graph
SourceVerificationclass — Skeptical-lens verification of one Source's fine-spine extension under abuild_extension_payloadfunction — Build the fine-spine EXTENSION payload (pure; no capability calls).provenance_edges_from_segment_wirefunction — Derive a Segment's Transcript provenance edges from the node itself:resolve_root_idsfunction — Recompute the transcription-emitted root node ids from manifest data.segment_provenance_edgesfunction — Text provenance as EDGES (finding 89b16be6, the references-must-be-edgesverify_sourcefunction — Verify a Source's committed extension via server-side AGGREGATES (D13/D19).
cjm_transcript_decomp_core.launch
batch_argvfunction — Render one hand-off group as headless decomp-core argv.build_parserfunction — The TUI driver's argument surface (batch-setup options + core passthrough).event_split_batch_errorfunction — One propset carves ONE source: the core applies --event-propset to everyhand_offfunction — The shared driver tail: persist the confirmed choices, adopt the in-appresolve_settingsfunction — Resolve the batch-setup settings every shell shares (flags > persistedresolve_split_flagsfunction — Resolve the post-parse split-flag contract (pure; main() calls it
cjm_transcript_decomp_core.models
DecompConfigclass — Configuration for one transcript-decomposition run.DecompManifestclass — Durable record of one decomposition run (proto-bundle; see CR-20).DecompSegmentclass — One fine spine segment (stage 5: shared audio-side skeleton + per-transcriber variants).DecompSourceRecordclass — Record of one Source whose fine spine this run committed (stage 5:FAWordclass — One word-level forced-alignment result (segment-local times).SegmentVariantclass — One transcriber's text + char range for one fine segment (stage 5).TextSegmentclass — A text segment produced by alignment, before graph commit.VADChunkclass — A voice-activity time range within one pipeline segment (segment-local).new_run_idfunction — Generate a unique, sortable decomposition run id.
cjm_transcript_decomp_core.pipeline
build_alignment_compositionfunction — Build the whole-source M×(VAD ∥ T×FA ∥ SEG) composition (D8 fan-in, stage-5 variants).collect_capability_infofunction — Record capability identity + data-DB pointers for the run manifest (provenance).compute_skeleton_hashfunction — Skeleton identity, pure (DEC f1024568 + 9241564f + 6cc10fb7).confirm_seamfunction — HITL approval seam in its cheapest viable form (log + optional CLI prompt).decomp_replay_handlersfunction — The decomp core's replay vocabulary (DEC 426658f1, replay stays DOMAIN-OWNED).decompose_sourcefunction — Decompose one source into aligned fine segments with per-transcriber variants.event_spans_from_propsetfunction — Load a proposal set BY POINTER and select its carve spans (respine trialfa_words_from_resultfunction — Normalize a typed forced-alignment result into FA words (pure; stage 3).load_source_manifestfunction — Load + lightly validate a transcription-core run manifest.resolve_event_propsetsfunction — Join each proposal set to ITS source by the set manifest's own sourcerun_decompfunction — Extend every source in a transcription run manifest with its fine spine.sentence_spans_from_resultfunction — Normalize a typed sentence-segmentation result into char-span tuples (pure; B.5).submit_and_waitfunction — Submit one capability job, wait for it, and return its result (raise on failure).vad_chunks_from_resultfunction — Normalize a typed VAD result into segment-local VAD chunks.
cjm_transcript_decomp_core.respine
bridge_edgesfunction — Bridge NEXT from the previous live segment to the new first and from the newbuild_respine_opfunction — ONE replayed property-update op (pure): superseded_by on the old segments, thechunk_entry_forfunction — Resolve ONE coarse chunk of a source entry (pure): by manifest index, or byclassify_dependentsfunction — Sort the chunk's dependents into the two transferable classes and the restdecomp_config_fromfunction — Rebuild the live spine's DecompConfig from its manifest snapshot (pure): thedescribe_dependentsfunction — The refusal / readout listing (pure).find_decomp_manifestfunction — The decomp run that minted the live spine (pure): the newest manifest whoselive_chunk_segmentsfunction — The chunk's LIVE segments: PART_OF its rendition, on the spine, not superseded.live_spine_indexfunction — The whole live spine's (id, index) — the renumber plan's input.plan_renumberfunction — The renumber plan (pure; 0b4d5cfa (4), the 'do it properly' ruling): the newread_dependentsfunction — What points at the old segments: every Correction with a CORRECTS edge intorender_chunk_promptfunction — Mode one (--prompt): the chunk's escalation prompt WITH CONTEXT — no writes.resolve_chunk_contextfunction — Resolve the live spine -> its decomp manifest -> the transcription manifest itrespine_chunkfunction — Mode two (--text-file): land -> re-derive the chunk under the live policy ->respine_op_idfunction — The op idsuperseded_bynames: a function of (source, landed transcript).source_entry_forfunction — The transcription manifest's entry for a Source, by recomputed identity (pure).transfer_handlerfunction — Discover the correction core's chunk-scoped transfer through the entry-point
cjm_transcript_decomp_core.retire
annotate_spinesfunction — Mark each spine row with its retirement state (pure; rows copied).apply_spine_factfunction — Replay handler for spine-retire / spine-compaction / chunk-respine: property mergescompact_retiredfunction — The compact act over every retired, not-yet-compacted spine of the given sources:default_live_spinefunction — Which spine opens by default (pure). Preference is a DECLARED fact, never creation order:dependents_freefunctiondependents_mapfunction — Every spine's dependents in one raw read (see DEPENDENTS_SQL); a spine absent fromget_sourcefunction — The Source node as a dict (None when absent).journal_spine_retirefunction — Apply + journal one retirement fact (write-side dual of apply_spine_fact).list_sourcesfunction — Every Source (optionally one collection's members).list_spinesfunction — The source's coexisting spines, grouped by skeleton hash and annotated with the retirement map.live_spinesfunctionplan_retirefunction — Rules (a) + successor validation as a pure plan; the graph write isjournal_spine_retire.plan_supersededfunction — The batch candidate list: every LIVE spine that is not the source's default (rule (c)) —resolve_source_idfunction — Resolve a human selector to ONE Source (refuses with the candidates).resolve_spinefunction — Resolve a picker-style selector to exactly one spine row (pure); refuses with the roster.retire_spinefunction — The whole retire act: list -> plan (rules a) -> dependents gate (rule b) -> journaled fact.retired_spinesfunction — The Source's retirement map (pure): {spine key: {reason, successor, actor, ts[, compacted]}}.source_rendition_idsfunction — Every AudioRendition under a Source (all chains — retirement is per skeleton, not per chain).spine_dependentsfunction — Rule (b)'s evidence: what on the graph points at the spine's segments.spine_fact_handlersfunctionspine_keyfunctionspine_labelfunctionspine_segment_idsfunction
cjm_transcript_decomp_core.runs
DecompIndexclass — Decomp-core run manifests read back: coverage chips for the batch stagePropsetIndexclass — Proposal-set manifests under the workspace proposals/ dir — the model'sSourceRunIndexclass — Transcription-core run manifests — the decomp workflow's SOURCES — plusTrainingRunIndexclass — Training-run manifests under the workspace training-runs/ dir — thegroup_batchesfunction — Fold an ordered batch selection into headless hand-off groups.is_external_transcriberfunction — Whether a transcriber name is an external landing's (the/manualmarker).
cjm_transcript_decomp_core.segments
SegmentStackclass — One lazily-opened READ-ONLY graph seat, keyed by db path.aseg_index_forfunction — Which coarse AudioSegment a source-coordinate time falls in (pure;build_displayfunction — Interleave gap markers into the paintable entry list (pure).capability_config_schemafunction — A capability's config_schema off its installed manifest (json read, pure).find_gapsfunction — Uncovered timestamp spans between committed segments (pure).fmt_tsfunction — Source-coordinate timestamp for listing rows (pure).locate_spanfunction — Resolve a source-coordinate span onto its owning coarse WAV (pure).ordered_rowsfunction — Re-impose the manifest's spine order on fetched rows (pure).predicted_rowsfunction — Synthesize segment-shaped rows for a probe's predicted skeleton (pure).probe_comparefunction — Compare a VAD probe against the committed skeleton (pure).realign_rowsfunction — Re-run the decomp pipeline's own text fold over a PROBE skeleton (pure).split_predictedfunction — Run the decomp pipeline's own SENTENCE-SPLIT stage over a probe skeletonvad_summaryfunction — The decomp run's recorded VAD config, one status line (pure).
cjm_transcript_decomp_core.state
load_statefunction — Read this project's persisted TUI state.save_statefunction — Merge updates into the persisted state and write it back (best-effort:state_pathfunction — Where this project's TUI state lives.
Dependencies
Depends on: cjm-capability-primitives, cjm-context-graph-layer, cjm-context-graph-primitives, cjm-substrate, cjm-transcript-graph-schema, cjm-transcription-core, pyyaml
Used by: cjm-transcript-correction-qt, cjm-transcript-decomp-qt
Release files for cjm-transcript-decomp-core 0.0.20
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cjm_transcript_decomp_core-0.0.20.tar.gz | 133.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cjm_transcript_decomp_core-0.0.20-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 238.9 kB
Release files / cjm_transcript_decomp_core-0.0.20.tar.gz
| Download URL | cjm_transcript_decomp_core-0.0.20.tar.gz |
|---|---|
| Size | 133.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3518801ac48c141e9523381eda3573eedbbc35ed646ea31ab8e9443c2a762dc
|
|
BLAKE2b-256 checksum How to use checksums |
e4b859c3ec0daa60b5e57d361f741748b342ca1bbcfd2ba4d437a65074138a94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / cjm_transcript_decomp_core-0.0.20-py3-none-any.whl
| Download URL | cjm_transcript_decomp_core-0.0.20-py3-none-any.whl |
|---|---|
| Size | 105.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c29bd2c3e67411a75156e001741685687ccdd631b54328f33244b53c815fd722
|
|
BLAKE2b-256 checksum How to use checksums |
26b0cc194d55db9a22d23a3591e0e09d1cf7f2006b4373fa2ea5814c91394bad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|