interactive-content8.29 KB
View saved version →
---
name: interactive-content
description: >-
Create or refine interactive social content, live bits, and small browser
experiences: hooks, gestures, payoffs, participation, sharing, and diffing.
Use before choosing architecture. Excludes general SaaS interfaces,
deployment-only work, and read-only app analysis.
---
# Interactive content
Author a bit people encounter, enjoy, and may pass on. Treat software as the
medium; preserve the creator's specific premise, voice, and requested scope.
Deliver a runnable interactive webpage unless explicitly asked otherwise.
Images, copy, and screenshots support it; they are not substitutes.
## Frame
Before coding, identify the hook, action, payoff, sharing motive, and recipient
experience. Always assess self-insertion, response, challenge, and diffing;
implement opportunities inherent in the premise, not unrelated mechanics.
Participation is optional for visitors, not optional to consider.
Infer from the brief; ask only about consequential gaps.
When the human is exploring or asks what they could make, offer a few
distinct directions, not variations of one: for example a passive piece, a
personal result, something everyone adds to, and something the creator runs
(a reveal, rounds, a winner). Make each concrete in a line or two: what
people do and what they get. The participation reference's "What shared state
can do" lists what Differ can hold and enforce; promise nothing outside it.
## Author
- Start with a finished, specific piece: this dog, this handshake, someone's
three picks. Avoid empty templates, landing pages, onboarding, dashboards,
accounts, and settings unless the experience requires them.
- Derive the hook from the material: a real contrast, curiosity, joke, opinion,
or recognizable situation. Make it easy: understood within a second from the
screen, with one short line at most. Fulfil its promise; never invent facts or popularity.
- Make the subject actionable: boop the nose, wash the wall, shake back.
Every gesture is how you do what the piece is about; add no mashing or
interaction for its own sake. Make the invitation noticeable without
obscuring the subject; retire hints once learned. Prefer direct gestures to
redundant narration; retain accessible labels.
- Build as much as the idea needs and no more. Every mechanic and feature
earns its place by serving the experience; cut what does not, finish what does.
- Deliver a perceptible payoff: reveal, transformation, answer, punchline,
personal artifact, win/loss, or satisfying loop. Spend effort on assets,
composition, timing, motion, sound, and exact copy.
- Participation fills the format (your location/picks/answers); diffing changes
it (time spans/rules/style/premise). Make invitations concrete and optional.
Consumption and participation must stand alone without diffing.
- Separate invariants from variation. Preserve the agreed subject/context;
vary meaningful form or behavior, not merely branding, unless a reskin was requested.
- Identify why someone would send this to whom: challenge, gift, identity,
opinion, surprise. A share button supplies transport, not motivation.
Share the actual piece or personal result; recipients need context and a
meaningful next action without reconstructing the sender's session.
- Preserve authored moments and saved artifacts. Freeze snapshots when the
moment matters; distinguish edits, versions, and someone else's response.
- Design for the actual surface: immediate mobile readability, reachable touch
targets, intact focal subjects, and deliberate desktop/iframe adaptation.
Keep authoring controls and implementation details off the consuming surface
unless needed there; respect Differ's existing navigation and sharing.
- On Differ the open bit fills the phone, so make it responsive and check it
at 390×693 CSS px. Its root `preview.html`, which every bit needs, is the
390×520 interactive preview Differ shows outside the open bit, th
Preview of the first 4,000 characters. Read full instructions →
Referenced files: 1 — file references are metadata, not package contents.
publish-content9.67 KB
View saved version →
---
name: publish-content
description: Publish, update, diff, or prepare interactive bits on Differ, or a creator's place behind their profile. Not Git pushes or generic hosting.
---
# Publish content
Making and previewing do not imply publishing intent. When the human asks to
publish, do it without requiring an account. Ask what they want to make if no
brief was given. A bit is one piece on Differ; each upload of it is a new
version, and a published version never changes. Each bit has its own origin on
differ.page and normal browser storage and capabilities, subject to the
browser's permission prompts. Private audiences and arbitrary Node servers are
unsupported. For shared durable state, use the document runtime described in
[participation](references/participation.md): what it can do, the creator's
controls, rules the server enforces, and how to change live data after
publishing.
A bit is at most 256 files and 20 MiB. Files under `data/` need a root
`rules.html`, since only live participation serves them; a bundle with them and
no `rules.html` is refused with the code data_without_rules, so put static
assets in another folder, such as `assets/`. The folders `-/`, `v/`, `uploads/`,
`__differ/` and `__dfr/` are Differ's: a bundle with files there is refused.
Guests can publish and interact locally; the bit must be claimed before
signed-in visitors can contribute shared state.
## Caption
Every public version carries a caption: the maker's own words shown over the
bit, 1–200 characters, at most 3 line breaks. Suggest one from what the human
said, in their voice, and let them confirm or rewrite it. In Differ the maker
confirms it again when publishing a draft or claiming a guest bit. A bit has no
other name. Keep the bit's own `<title>` and headings whatever the piece needs.
## The feed and the open bit
A bundle has a root `index.html`, the open bit, and a root `preview.html`,
what Differ shows of it everywhere outside the open bit: the feed, search,
profiles. Differ refuses a bit without one.
- The open bit fills the phone. Its size varies by device, so it must be
responsive; check it at 390×693 CSS px.
- `preview.html` is a 390×520 CSS px interactive preview, laid out at exactly
that size. It may use any file in the bundle and is checked like any page. A tap on it should show the piece's promise and lead into the
open bit.
- In the preview, people only tap, hold and drag sideways: vertical swipes
belong to the feed. Use pointer events only, never touch events. No native
range, select or text inputs, no scrolling area, and nothing that needs
`:hover` or `:active`. No sound, permission requests, keyboard or
participation. Keep the top-right 48×48 px free for Differ's open
button. Keep it light: it loads while people scroll.
Differ adds its SDK to every page of a bit as the global `differ`; never
include or reference anything under `/__differ/`.
- `differ.page` is `'preview'` on `preview.html`, else `'index'`;
`differ.inFeed` is true inside Differ; `differ.hidden` is the current
visibility.
- On the preview, `differ.open(state)` opens the bit. `state` is any JSON
value of at most 4096 bytes; the open bit receives it. A click on an element
with a `data-differ-open` attribute, or inside one, calls
`differ.open(value || null)` with that attribute's value.
- On the open bit, `differ.close()` returns to the feed.
- `differ.on('open', fn)` calls `fn(state)` when the bit opens (`null` when
Differ's own control opened it); `differ.on('show', fn)` and
`differ.on('hide', fn)` follow visibility. Each returns a function that
unsubscribes.
- Inside Differ a page starts hidden and not opened, so start motion, sound
and timers on `show` and pause them on `hide`, and read the open state from
`open`. A late subscriber still gets the last show or hide and the last open
once. Outside Differ the page starts shown, the open bit counts as opened
with `null`, and `open` and `close` do nothing.
## A creatPreview of the first 4,000 characters. Read full instructions →
Referenced files: 8 — file references are metadata, not package contents.