Skip to content

armgit / hypit

Public Imported from GitHub
0

Clone any viral video with AI agents. Not just a script, the whole workflow: swap the face, the words, the B-roll, ship 100 variants in one command, and get your 100M views.

docs: define composite svk profile

kashorin6dacf9953c3e
diff --git a/README.md b/README.md
index d2fa3f00..3d70922b 100644
--- a/README.md
+++ b/README.md
@@ -106,6 +106,11 @@ transition audio, disconnected caption selections, absolute z and Film as the so
`Track[]` consumer. It is a draft fixture, not yet accepted by the executable v1
compiler.
+[`examples/composite-speech-program/minimal.svml`](examples/composite-speech-program/minimal.svml)
+and its adjacent `speech-program.svk` define the proposed `composite-v1` author
+surface: one transparent Component replaces repeated Basis/Locator wiring while
+both internal instances remain independently visible in Plan and lock.
+
## Specification
- [Script Surface v1](spec/script-surface-v1.md) — the frozen, human-readable
@@ -114,8 +119,8 @@ compiler.
independent Segment endpoint and `2M + 2N` migration.
- [Source Architecture Draft](spec/source-architecture-draft.md) — the current
draft for `.svk` components, `.svs` parameter sheets, `.svc` content modules,
- Script-dependent generation, the five SVK output roles, flat Tracks, and a
- Composition root.
+ Script-dependent generation, five public output boundaries, `composite-v1`, flat
+ Tracks, and a Composition root.
- [Compiler prototype record](docs/compiler-prototype-v1.md) — implemented
boundaries, real-video evidence and remaining work.
- [External Runtime Host Architecture Draft](docs/runtime-host-architecture-draft.md)
diff --git a/examples/composite-speech-program/README.md b/examples/composite-speech-program/README.md
new file mode 100644
index 00000000..2707c390
--- /dev/null
+++ b/examples/composite-speech-program/README.md
@@ -0,0 +1,27 @@
+# Composite Speech Program draft fixture
+
+This directory demonstrates the proposed, unimplemented `composite-v1` SVK
+profile.
+
+- `minimal.svml` is the author-facing source.
+- `speech-program.svk` defines a callable Component that statically expands
+ `crossfade-speech` and `speech-locator`.
+- `house.svs` configures only the Composite's public `overlap` parameter.
+
+For `<speech-program id="voice">`, canonical expansion creates the internal
+instances `voice::basis` and `voice::locator`. Their implementations, digests,
+Evidence and Artifacts remain independently visible in Plan and lock. The outer
+ports are aliases:
+
+```text
+voice.production = voice::basis.production
+voice.map = voice::locator.map
+voice.facets.visual = voice::basis.facets.visual
+```
+
+The bracket expression in `ports.script.segment[item.id]` is a stable id-keyed
+lookup, not a positional array lookup. The `for` iterates only over finite children
+declared at the call site.
+
+The current compiler must reject or clearly report unsupported `composite-v1`;
+these files are architecture fixtures, not executable regression inputs.
diff --git a/examples/composite-speech-program/house.svs b/examples/composite-speech-program/house.svs
new file mode 100644
index 00000000..29544254
--- /dev/null
+++ b/examples/composite-speech-program/house.svs
@@ -0,0 +1,7 @@
+<sheet version="1" id="house">
+
+ speech-program.default {
+ overlap: 500ms;
+ }
+
+</sheet>
diff --git a/examples/composite-speech-program/minimal.svml b/examples/composite-speech-program/minimal.svml
new file mode 100644
index 00000000..d5f4836d
--- /dev/null
+++ b/examples/composite-speech-program/minimal.svml
@@ -0,0 +1,56 @@
+<!--
+ Proposed composite-v1 author surface. The current compiler does not implement
+ this profile or Script Surface v2 yet.
+-->
+<svml version="2">
+
+ <import from="./speech-program.svk"/>
+ <import from="@svml/std/media-track.svk"/>
+ <import from="@svml/std/film.svk"/>
+ <import as="house" from="./house.svs"/>
+
+ <script version="2">
+ <segment id="intro">
+ <HOST> Hello, this is SVML.
+ </segment>
+
+ <segment id="close">
+ <HOST> Write the script, get the video.
+ </segment>
+ </script>
+
+ <video id="host" src="./host.mp4"/>
+
+ <speech-program
+ id="voice"
+ script={script}
+ class="house.default"
+ >
+ <segment
+ id="intro"
+ source={host}
+ sourceWindow="0s .. 5s"
+ />
+ <segment
+ id="close"
+ source={host}
+ sourceWindow="5s .. 10s"
+ />
+ </speech-program>
+
+ <media-track id="aroll">
+ <item
+ source={voice.facets.visual}
+ during="full"
+ playback="program-map"
+ />
+ </media-track>
+
+ <film
+ basis={voice.production}
+ semantic={voice.map}
+ >
+ <track ref={aroll.track}/>
+ </film>
+
+</svml>
diff --git a/examples/composite-speech-program/speech-program.svk b/examples/composite-speech-program/speech-program.svk
new file mode 100644
index 00000000..cac5f402
--- /dev/null
+++ b/examples/composite-speech-program/speech-program.svk
@@ -0,0 +1,97 @@
+<!-- Proposed composite-v1 syntax; not implemented by the current compiler. -->
+<kernel
+ name="speech-program"
+ abi="1"
+ profile="composite-v1"
+>
+
+ <port
+ name="script"
+ direction="input"
+ type="Script"
+ cardinality="one"
+ />
+
+ <port
+ name="production"
+ direction="output"
+ type="TemporalBasisProduction"
+ cardinality="one"
+ />
+
+ <port
+ name="map"
+ direction="output"
+ type="ExactSemanticMap"
+ cardinality="one"
+ />
+
+ <port
+ name="facets.visual"
+ direction="output"
+ type="ProgramBoundVideo"
+ cardinality="zero-or-one"
+ />
+
+ <param
+ name="overlap"
+ type="duration"
+ default="0ms"
+ />
+
+ <child name="segment" cardinality="one-or-more">
+ <field name="id" type="id" required="true"/>
+ <field name="source" type="Video" required="true"/>
+ <field name="sourceWindow" type="SourceRange"/>
+ </child>
+
+ <import
+ as="basis-component"
+ from="@svml/std/crossfade-speech.svk"
+ />
+
+ <import
+ as="locator-component"
+ from="@svml/std/speech-locator.svk"
+ />
+
+ <compose>
+
+ <basis-component
+ id="basis"
+ overlap={params.overlap}
+ >
+ <for each={children.segment} as="item">
+ <segment
+ id={item.id}
+ script={ports.script.segment[item.id]}
+ source={item.source}
+ sourceWindow={item.sourceWindow}
+ />
+ </for>
+ </basis-component>
+
+ <locator-component
+ id="locator"
+ script={ports.script}
+ basis={basis.production}
+ />
+
+ <export
+ port="production"
+ value={basis.production}
+ />
+
+ <export
+ port="map"
+ value={locator.map}
+ />
+
+ <export
+ port="facets.visual"
+ value={basis.facets.visual}
+ />
+
+ </compose>
+
+</kernel>