Skip to content
C.W.K.
Stream
Lesson 03 of 04 · published

Search and Read Along

~12 min · search, read-along, accepted-version, fts

Level 0Dry Nib
0 XP0/36 lessons0/12 achievements
0/100 XP to next level100 XP to go0% complete
"Every discovery surface resolves back to the canonical entry and exact accepted version."

How the well grows

As the well grows, return becomes as important as draw. Search should lead to the same entry and its durable states. Read-along should speak the accepted text version, not whichever draft happened to finish first.

Attach it with a narrow contract

At query time, project live corpus rows into SearchDocs containing entry id, keywords, original text, and translations. For read-along, send the caller-selected text and language to TTS and stream the returned bytes.

When extension steals sovereignty

Persisting a second search or audio store would create drift. Current search projections are rebuilt from canonical rows and speech is generated on demand; neither becomes a second owner of text.

Extension invariant. Every discovery surface resolves back to the canonical entry and exact accepted version.

Retest the first promise

Even after “Search and Read Along” arrives, the original returns first, the author keeps the pen, and late work asks permission. Trace whether sharing, scheduling, search, or audio invents copied originals, hidden clocks, or broad payloads for convenience. An extension that bypasses old invariants has changed the product rather than grown it.

Run the whole path

Edit a passage and trace the next search projection and on-demand read-along request. Add duplicate delivery, source editing, deletion, stale artifacts, and permission denial. Prove that database rows, outbound payloads, and sibling references tell the same story instead of trusting one successful screen.

What it means to close the well

Closing does not mean stopping features. It means one practice is complete from original draw through paper, recovery, rediscovery, and deliberate sharing. When technology appears only to explain itself and otherwise recedes behind the ink, the well has grown useful hands.

The extension's actual contract

Search builds an in-memory SearchDoc from live entries, keywords, and translation text, then returns the canonical entry id. Read-along posts the selected text and language to TTS and streams bytes without an audio artifact table.

A later query therefore reads current rows; there is no detached index or stale audio record to reconcile.

Code

Project search, request voice on demand·python
def project_search_doc(entry, keywords, translation_texts):
    return {
        "kind": "entry",
        "id": entry["id"],
        "title": " · ".join(keywords),
        "text": "\n".join([entry["original_text"], *translation_texts]),
        "date": entry["entry_date"],
    }

def read_along_payload(text, lang):
    return {"text": text, "lang": lang}
# SearchDocs are rebuilt from corpus rows; TTS returns streamed bytes.

External links

Exercise

Edit a passage and trace the next search projection and on-demand read-along request.
Hint
Prove the state transitions, not one screen.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.