Repository navigation
A reference can be read by the agent instead of Gemini - #25
Merged
Merged
Conversation
Reconstruction required Google Vertex credentials to do anything at all: every observation went through one Gemini call, so a machine without the pair could not start the route. The main agent can read pictures, and a shot is a picture if its frames are tiled into one, so it can do the reading itself. prepare_reference now takes --observer. `gemini` is unchanged and remains the default: it uploads the clips and the whole video, and it hears the sound. `agent` reaches no Provider. The CLI prepares the same media, adds one tile per shot — the shot's frames sampled evenly and laid out in reading order — and returns each observation as a task carrying its prompt and the pictures to answer it from. record_observation takes the answer back. The keys, the prompts and the cache are the same on both paths, so continuity, vocabulary, final-sources and the convergence loop read one shape and never learn which observer produced it. The evidence a request would have uploaded is translated rather than reworded: a shot's clip becomes that shot's tile, the whole video becomes the storyboard. Observation gains a `pending` status, which is a task handed out rather than an answer received and is never cached, so an unanswered observation is asked again instead of reading a placeholder as complete. Sound is the one thing that does not translate, and the route says so rather than pretending otherwise. WhisperX still measures every word locally on both paths. A question that needs sound carries a note saying the observer cannot hear and to state what could not be determined instead of inferring a voice from an appearance. The blindness rule the loop rests on is now scoped rather than dropped. On the gemini observer the comparer is not the builder and the prohibition stands unchanged. On the agent observer it is, so observers.md states the discipline that takes its place: write the differences down before naming a cause, count only repairs aimed at one that was written down, and read a quantity off the frame rather than spending an attempt on it. The route asks the author which observer to use, once, before anything runs. That is the only question it asks about how it runs; the working directory, the project location, the vocabulary and the generators are still its own to decide.
This was referenced Aug 21, 2026
overlordkim
pushed a commit
that referenced
this pull request
Sep 9, 2026
A reference can be read by the agent instead of Gemini
overlordkim
pushed a commit
that referenced
this pull request
Sep 9, 2026
A reference can be read by the agent instead of Gemini
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reconstruction required Google Vertex credentials to do anything at all — every observation went through one Gemini call, so a machine without the pair could not start the route. The main agent can read pictures, and a shot is a picture if its frames are tiled into one.
The choice
prepare_reference --observer gemini|agent, answered once per reference and recorded in its state.geminiis unchanged and remains the default. It uploads the shot clips and the whole video, and it hears the sound.agentreaches no Provider. The CLI prepares the same media, adds one tile per shot — the shot's frames sampled evenly across its duration, laid out in reading order — and returns each observation as a task carrying itskey,instruction,promptandimage_refs.record_observationtakes the answer back.The keys, the prompts and the cache file are the same on both paths, so
continuity.md,vocabulary.md,final-sources.mdand the convergence loop read one shape and never learn which observer produced it. The evidence is translated rather than reworded: a shot's clip becomes that shot's tile, the whole video becomes the storyboard that already existed.Observationgains apendingstatus — a task handed out, not an answer received. It is never cached, so an unanswered observation is asked again instead of a placeholder being read as complete.Sound, stated rather than papered over
WhisperX still measures every word locally on both paths, so Segment durations are unaffected. A question that needs sound carries a note saying the observer cannot hear it, and asks for what the pictures and the transcript support with the rest marked undetermined — because a voice inferred from an appearance is exactly what
continuity.mdforbids.The blindness rule is scoped, not dropped
reconstruction-loop.mdrests on the comparer not knowing what was built. On thegeminiobserver that holds unchanged and the prohibition on opening the reference frame yourself stands. On theagentobserver the comparer is the builder, soobservers.mdstates the discipline that replaces it: write the differences down before naming a cause, count only repairs aimed at one that was written down, and read a quantity off the frame rather than spending an attempt guessing at it.The route asks
The path question is asked once, before anything runs, and it is the only question this route asks about how it runs — the working directory, the project location, the vocabulary and the generators are still its own to decide.
index.md's credentials rule changes from "name the missing variable and stop" to "the Vertex pair selects an observer rather than blocking one"; every other missing credential still stops the route.Verification
Path A, unchanged:
GOOGLE_CLOUD_PROJECT is required— same message and code as beforeGOOGLE_APPLICATION_CREDENTIALS_JSON is not valid JSONPath B, driven end to end against a three-shot video with both Vertex variables unset:
prepare_reference --observer agentunavailablewithout WhisperXobserve_referencevisual:shot-002carried002-frames.jpg,002-representative.jpg,001-tail.jpgand no video;audio:shot-002carried the tile alone and the no-sound noterecord_observation --text-fileobservations; re-runningobserve_referencereportedvisual:shot-002complete and dropped it from the pending list, the other 10 still owedwas prepared for the agent observer; --redo all re-prepares it for the other one3 new tests cover the agent path. 14/14 pass.
npx tsc -p tsconfig.json --noEmitis clean outsideexamples/, where it fails identically before and after. Tiling adds about one ffmpeg decode per shot; a 9-second three-shot prepare takes 1.07s in total.Not verified: a real Vertex round trip, which this machine has no credentials for. Path A's behaviour is covered by the tests and by its unchanged failure modes, not by a live call.