How to make these lessons
These are the user's established preferences. Apply them to future lessons and revisions in this workspace.
Written lessons and references
- Keep the stack's written reference in
thestack/:rechain.md,reactor.mdandtakt.md, with links between related sections. - Research the current sibling implementations first, build the table of contents, then fill the sections. Use specialist subagents and have them review each other's explanations for accuracy, clarity and completeness.
- Teach the local state machine first, then transport, then workflow coordination. Use the projects' vocabulary, concrete examples and source links. Distinguish library guarantees, example policies and proposed designs.
- Maintain
thestack/thestack.mdby literally concatenating the three source chapters in Rechain → Reactor → Takt order. Make corrections in the source chapters first, then regenerate the combined file.
Combined film: The Stack
- The combined film is
out/thestack.mp4. Open with short animated slides on a light paper background, then play Rechain, Reactor, Takt, Fourcans, and Chatapp in that order. Copy their video tracks when joining them. - Feature The Stack on the CDK homepage with the current opening still, runtime, and chapter player.
- Start with “Three machines, explained one by one.” Describe Rechain, Reactor, and Takt with a few sentences per slide. Show how they fit together, then give the viewer a concrete way to inspect a workflow an agent builds. Keep the source and reference notes in
src/stack.json. - Narrate each slide with the same free Ryan voice as the lessons (
en-GB-RyanNeural,-4%). Derive slide timing from the measured narration and short transition intervals. Keep all text readable while it is spoken, and use the displayed sentences for captions. - Insert a silent five-second light-paper title card with the next lesson’s title before each lesson. Keep the narration assets under
public/audio/stack/and one current compilation set. - Use
npm run build:stackafter changing slide text or timing.npm run update:stack-audiochecks that the timing and displayed slides still match before reusing the video track. - Include chapter navigation and shifted English captions. Use exact frame/sample boundaries so audio padding does not accumulate between lessons. Fully decode the compilation and check browser playback at every join.
- Keep one current combined MP4, player, captions, transcript, verification and a few review stills. Remove temporary intro/title encodes after the compilation passes. Preserve the five source videos and protect the combined outputs from the normal cleanup script.
Audience and teaching
- Explain simply and concisely for IC developers. Assume they know IC basics; avoid long explanations of obvious details.
- Use the implementation's proper names for components and mechanisms. Introduce an unfamiliar name with a plain explanation; do not replace it with an invented label.
- Build a new lesson around the machinery that makes the subject understandable. User requests establish coverage and priorities; the film should not read like a literal checklist. Put deep research and source identities in Markdown, then use agents to review accuracy/concision before agents design the visual experience.
- Make animated explainers, with TTS narration timed to the animation. Reuse the free Canic setup:
node-edge-tts,en-GB-RyanNeural, currently at-4%, without an API key. The current endpoint adapter isscripts/edge-tts-transport.ts, using pinned client 1.2.12 while preserving upstream synthesis and word timings; seeresearch/icgame/narration-transport.md. - Read the actual sibling project before explaining it. The series is Rechain, then Reactor, then Takt. Takt has vocabulary definitions in its guide; use those definitions without teaching Takt before lesson three.
- First establish the machinery at a readable size. Later, zoom out and reuse it in larger mechanisms.
- The first lesson is Rechain: Inside the Machine. Keep its narration short; do not discuss cycles.
Style and screen space
- Light paper background, crisp diagrams, restrained colors, minimal decoration.
- Keep a small title only. No subtitle. Give most of the screen to the mechanism.
- Remove distracting text: no top-right runtime description, “protocol notes”, “vocabulary” headings, “local chain excerpt”, “one atomic commit” paragraphs, branding, or decorative footers.
- Don't keep a large static action card on screen. Show actions when they move through the mechanism.
- Components such as signing and verification must work as small parts of larger diagrams. Do not design them as oversized standalone screens.
One drawing for each concept
- Every vocabulary item has one canonical drawing. Scale the same drawing; never invent a different compact layout for a small block, reducer, or machine.
- Small text does not have to stay readable after zooming out. Recognising the already-explained shape matters more.
- The entire Rechain machine is one reusable component. It must be possible to instantiate it in several canisters without changing its internal layout.
- A canister has a rounded solid boundary and a small top-left label, such as
canister · payments. Its machinery goes inside that boundary. - Rechain has its own dotted boundary inside the canister, leaving room for other machinery in the same canister.
Rechain layout and flow
- Put the optional thunk, dispatch, reducers, prepared commit functions, and chain inside the dotted Rechain boundary. The thunk belongs inside this illustrated machine.
- Do not put signing, signature verification, or a fixed actor method inside Rechain. Those are independent components.
- Actions may come from different sources. Use a fillable input slot rather than a fixed caller.
- A thunk is optional. Direct actions bypass it while the remaining machine keeps the same layout.
- The moving input to a thunk contains the full call, such as
topUp(11), not just11. - The thunk reads reducer selectors, makes decisions, constructs an action, dispatches it, and can return an application result such as
{ id: 232 }. In a worked example, use the actual result from that example. - Selectors belong inside their reducers. Label them by what they select, such as
selector remainingorselector bob, notselect(). - Dispatch-to-reducer arrows use the same symmetric fork. Avoid skewed or mismatched zigzags.
- A local synchronous call and an awaited intercanister call must look different: solid local paths versus dashed remote paths, with an await/reply indication. Await applies to that worker, not the entire canister.
Reducers and state
- Treat state as a tree. Each reducer's named state is its own folder.
- Enlarge each reducer enough to contain its own state folder and selectors inside its boundary.
- Do not draw an extra shared folder, root folder, or
state /label between reducer states. - Each reducer works only on its owned state. Show exactly which values it changes.
- Define real reducer functions and dispatch real actions in the lesson simulator. Derive animation outcomes and numerical deltas from their actual before/after state.
- A successful reducer returns a commit function. That function performs the state writes when run; returning the function must not change state.
- Commit functions move out of their reducers and line up in a small, single row underneath. Do not put reducer names on those small function tiles.
- Once every reducer accepts, run the queued functions. Their deltas fly to their respective state values, those values update, then the block is revealed. This is a slowed illustration of one synchronous atomic dispatch, not separate asynchronous writes.
- Do not hold the state update until after the block appears.
- If any reducer rejects with an error, discard every prepared function, change no state, and append no block.
- Decreases are red, with a negative delta such as
−5; increases are green, with a positive delta such as+5. - After arriving beside a state value, keep the delta close: decreases rise a little, increases come down from just above. Avoid scattering numbers across the screen.
- Reserve enough horizontal space beside larger values so a delta such as
+3000does not overlap3000. Use the same destination for its flying and settled positions; keep the folder and machine geometry unchanged.
Actions, blocks, and archives
- An action is visually distinct from a block: a warm rounded pill containing only a call such as
Transfer(5). - A block is the canonical blue tile containing only its padded index and action, such as
004andtransfer(3). No hash fields, extra headings, or icons inside it. - Show an ordered, linked chain. Each block's
phashrefers to its predecessor, but don't add a separate screen explaining the obvious previous-block link. - When appending, move the old blocks left, visibly leave an empty spot, then forge the new block there. Do not instantly replace the row or hide the new block at the edge.
- Archives are in separate canisters. Animate batches moving from Rechain to an archive over an awaited call.
- Keep source records until a valid archive acknowledgement arrives. Preserve block IDs, payloads, and hash links.
- Show another archive being added when the previous one is full and more space is needed.
Pauses and explanation balloons
- Use a reusable pause-and-explain component: freeze the whole machine, point to the unchanged target with a quiet dashed line, and show a balloon above it.
- Narration continues during the pause. Resume the machine from exactly the frame where it stopped.
- Explain the thunk with a balloon: selectors → decision → action → dispatch → returned result.
- Explain the balances reducer with its actual code, including the returned commit function that subtracts from Alice and adds to Bob.
- Extract displayed reducer code from the working example so it stays consistent with the animation.
First lesson coverage
Follow one request through the thunk, selectors, dispatch, reducer checks, queued commit functions, state changes, and block creation. Show a rejection briefly. Then show archival and archive rotation.
Explain the useful consequences: the canister can rebuild state by replaying the chain; third parties can also rebuild or analyse state, make decisions, and call the application's public API. Replaying requires the appropriate starting state and reducer rules; replay the recorded actions, not the original thunk decisions. Public API authorisation and reducer validation still apply.
Show how inspecting actions and before/after state helps debugging. Show certification as part of reading the log, using the small signature and verification components outside Rechain.
Preserve the user's intended authenticity explanation while using the implementation's precise terms: each block's phash links to its predecessor; Rechain certifies the published tip's hash and index through a Merkle root in certified_data. A reader verifies the IC certificate, witness, identity, freshness, and block hashes against that tip. This detects a man in the middle modifying the verified log. Rechain's polling reader checks block hashes; IC certificate verification is an additional client step. Do not imply that an unverified read is automatically protected, or that the tip hash is stored raw in certified data.
Scope and upkeep
- The early standalone signing/verification and three-canister demos were removed to focus on the first machine. Do not restore those demo screens. The real lesson may zoom out to archives and readers where they explain the requested story.
- Keep one current video, narration set, and useful review stills per lesson. Preserve approved lessons when adding a new one. Remove obsolete drafts and per-run scratch; don't make dated backups or duplicate old courses.
- Update this file when the user establishes another preference.
- Validate reducer behavior and timing, inspect rendered frames, and check the rendered video's audio and playback. Keep source repositories unchanged while using them as references.
Reactor lesson
- Use the title Reactor: Inside the Channel. Explain batching first: hundreds of small logical messages travel inside one physical intercanister call. The large tunnel is a reusable component, as are messages, batches, queues, endpoints, and the complete Reactor canister.
- Establish the whole canister at a readable scale; reuse precisely that drawing when zooming out. The final six-canister mesh receives ingress at every canister, with fan-out, results, and application-created follow-up work. Animate roughly 300 initial logical operations. Six nodes are an illustration; the cited benchmark used sixteen.
- Follow the actual transport: per-peer outbox, batched call, persisted inbox, storage ACK, synchronous endpoint handling, separately batched addressed results. ACK means stored, not business completion. Do not suggest Reactor automatically batches ordinary actor calls.
- A batch sends available queued work without waiting to become full. The worked 300-message batch uses a configured item limit of 300 (production default is 64, configurable up to 1024) and small payloads within the byte limit.
- Reactor owns priority scheduling: Control for replies and library obligations, Interactive for current user flows, Maintenance for ordinary background work. Applications choose Interactive or Maintenance. Show interactive work passing waiting maintenance; scheduling is cooperative between driver batches, with no interruption of a running handler and no promise against maintenance starvation.
- Keep physical IC limits separate from logical throughput. Fifty is the guaranteed callback quota per canister, not a per-peer/per-block message cap. Use the thousand-ingress/block number as an explicitly illustrative cap, not a universal current limit.
- Same-subnet follow-up work can execute in the same round while capacity remains; unfinished work stays queued for a later turn or round. Batching does not remove execution limits.
- Label the benchmark Reactor calls handled/s: 6,512 in the measured arrival window, 16 canisters on one simulated subnet, PocketIC. The complete run including drain averaged 4,225/s. The counter sums receiver-processed requests and notifications; it excludes replies and events. A request/reply operation has two logical messages but counts once here. Do not halve the rate or claim an exactly doubled message rate in the same window. These are destination-handled calls, not source-observed round-trip completions, physical IC calls, or guaranteed mainnet capacity.
Takt lesson
- Takt: Inside the Workflow follows admission from a public method, saved execution progress, authoring and generation, local/remote operations, parallel branches, child workflows, event waits, recovery and the inspector.
- Use the real inspector's visual grammar: named node cards, remote accents, status dots, visits and attempts, recorded paths, and a detail panel. Keep one card drawing at all scales. Graph layouts are fixed per workflow; zoom the same graph for inspection.
- Research the functions, Motoko types and
.takt.jsondefinition together. The generator checks graph semantics and typed function contracts, then emits runtime wiring and the inspectable graph. Show source-derived code rather than invented APIs. - Takt owns workflow progress. Rechain owns business state and reducer commits. Reactor owns shared scheduling and optionally batched transport. Local/Read/Transform steps are synchronous; direct remote actor calls are also supported. Do not claim every node or every remote call is transported through Reactor.
- A parallel node creates independent typed branches with their own visits and attempts. Merge results and join before the parent continues. A completed sibling does not run again because another branch retries. Already sent remote effects are not automatically rolled back.
- Give
Choicea worked example: show the input, test ordered selectors, and animate only the first matching route. Use the scheduled workflow's actual even/odd rules, with four units selectingRemoteAuditand five selectingAuditdirectly. Keep the other route quiet; Choice does not fork parallel work. Its selectors project typed input for the next node. - Show
ScheduleWorkflow,AwaitEventand deadlineWaitas different node types. Starting a child is distinct from completing it. Register the subscription before the child can emit an event; match the expected producer, topic and durable wait address. Saved waits and deadlines survive upgrades. - Retried attempts retain the saved operation identity and exact request. Idempotent retries are bounded by the participant contract, validity window and configured budget. A timeout does not prove rejection. An unresolved Reactor response address continues to await its original reply; do not manufacture replacement requests. Unknown outcomes that cannot be safely established require reconciliation with authoritative, authenticated evidence.
- Catch routes are for known failure. Compensation is a separate business action and can fail; it does not undo arbitrary remote effects.
- The inspector reads authorized canister state. Current progress is available without tracing; retained execution history requires opt-in tracing, which is off by default.
- Show the inspector's Timeline and Instructions views as well as its graph. The timeline displays elapsed time, per-node attempts and retry waits. The instruction view uses the native cumulative cost axis and per-node recorded totals. Animate switching tabs on the same execution, keeping the paper style and uncluttered UI.
- Import performance geometry and measurements using the actual inspector models. Distinguish elapsed time from instruction cost: an awaited operation can take time without executing, while synchronous work can share one IC timestamp and still consume instructions. Keep caller and participant measurements separate; missing measurements are not zero. The worked capture measures 991,845 caller instructions in
Deliver, with identical start/finish IC timestamps. - Lesson graphs and historical state changes replay native PocketIC inspection captures imported with Takt's own normalization code. Preserve source hashes and version checks. Editorial time stretches real transitions; it is not benchmark timing. Parallel drawings follow recorded terminal joins and omit unused optional early-return metadata edges.
- Distinguish conceptual operation/reconciliation illustrations from captured executions in the source documentation. Do not label a constructed scenario as captured evidence or fill missing history from final snapshots. The local transfer uses the existing executable reducer simulator.
Fourcans application lesson
- Lesson four is Fourcans: Inside the Application. Explain how Reactor, Takt and Rechain compose inside an application, using
../takt/examples/reactor/fourcans. Study its important workflows and animate the machinery inside multiple canisters. - One reusable
ApplicationCanistercontains the canonical Takt cards, complete Reactor queues/scheduler, and complete Rechain drawing. Rechain and Reactor can omit their outer canister wrapper when embedded; their internal geometry stays unchanged. Zoom and pan this same world. Do not replace distant machines with smaller layouts or icons. - Keep workflow ownership visible: a remote effect changes the destination’s Rechain state, but the parent graph remains in its original Takt runtime. Local synchronous paths remain thin solid lines. Reactor’s wide peer channels carry batches and storage ACKs; addressed results/events have their own return motion.
- The seven chapters follow Local; Sequence; Parallel with independent work on D; Child plus Scheduled/Choice/event; Fanout; Relay; and all four cells executing the ordinary workload. Keep explanations brief for IC developers and use the same free Ryan TTS voice.
- Fourcans is a synthetic processing example. Open, Reserve, Deliver, Close and Audit each increment their counter and add units to the total. They are not token transfers or reservations that subtract a balance. The example’s idempotency reducer and work reducer must both accept before their commit functions run.
- Use native execution history and blocks as evidence. The fresh PocketIC capture retains all seven cases, full paginated histories and block hashes. Derive diagram traces with real deferred TypeScript commits matching the source reducer, and verify every case’s counts, totals and retained fingerprints against the canisters.
- Only relevant state fields appear in the existing two-row folder: retained fingerprint count, total and the current action’s counter. The complete counts, owner and caller remain in the model/capture. This projection is identical at every camera scale.
- Every dispatch is atomic within its canister. Preserve native per-canister block order and state continuity across chapters. Separate logs do not become one global transaction or chain. Relay receipts identify both the canister and its local block index.
- The Child workflow subscribes before sending the child. Admission is distinct from completion. Its AwaitBlock stays waiting until the matching D/chain-0/topic/job event is delivered. D’s child retains the parent’s peer arguments: with four units, its Choice sends Maintenance Audit to B, then commits Audit on D. That D block emits the event; A then closes.
- Fanout has twelve actual branches, four selector reads per peer. These reads create no remote blocks. The twelve results join on A, and a single local Close records observations and observedTotal in its memo. They are separate observations, not an atomic global snapshot.
- The final ordinary mix is twenty root admissions plus four scheduled children, adding 48 blocks, twelve per canister. Its 40 logical wire items comprise 16 requests, 16 results, four child notifications and four block events. This is a worked run, not a throughput benchmark.
- Animation time, queue-draining turns, packet travel and batch grouping are editorial. They preserve dependencies, request/result identity and recorded effects but are not measured transport timings. Hold all clocks during explanation balloons, including native wait/resume progress.
- Archives are disabled in this example. Do not add archive canisters to this application. Bounded idempotency pruning uses its separate unrecorded maintenance chain and is outside this lesson’s permanent work log.
- Keep sibling repositories read-only. Build capture binaries in this workspace’s scratch directory. Retain one current fourth lesson and its narration, preserve the approved earlier lessons, and remove temporary captures/build scratch after verification.
Chatapp application lesson
- Lesson five is Chatapp: Across the Subnets. Use Chatapp in titles, narration, captions, and site copy. Keep
../fkinchatas the source path. These are identical mixed-role canisters owning both users and channels. Do not substitute the proposed role-split topology inLAYOUT-NOTES.md. - Keep
ChatCanisterand itsChatGraphgeometry unchanged across close-ups, the four-canister/two-subnet worked journey, and the 64-canister mesh. Subnet boundaries surround solid canister boundaries. The final illustration repeats sixteen captured 24-send workloads, for 384 illustrated sends; these packet timings and groupings are not benchmark measurements. sendauthenticates the populated sender on its home canister, admits a Takt execution and returns its ID. A target DCID decodes into its owning canister and local object number; even objects are users, odd objects are channels. Choice selects local or remote delivery; the workflow remains at the sender's home.- Reactor batches available per-peer work. Chat requests use Interactive; results use Control. A storage ACK is distinct from the business result. On remote delivery, validate the forwarding home and preserved original caller. Channel membership and nonce checks happen before the chat reducer commits.
- This application explicitly sets
recordTransactions = falseandarchiveEnabled = false. Keep the canonical Rechain geometry, but show its configured inactive recording slot. Do not invent chat blocks, archival, certification or replay guarantees for these unrecorded chat histories. The simulator still advances dispatch indices and executes real deferred commit functions. - A channel post creates one sequenced entry in shared history. Members query that history; there are no per-member delivery writes. A DM commits on the recipient first; after its result, CopyChoice selects CopyDirect on the sender's home. Sender copies increase retained state but not destination delivery counts. These are separate local commits, not a cross-canister atomic transaction.
- Matching retained sender/nonce plus target/body returns the original sequence; changed content is a nonce conflict. A nonmember is rejected without state changes. The generated remote contract uses Reconcile and a saved Reactor request, so an unknown outcome must not be described as permission for a new delivery.
- Retain 3,000 entries per channel and 300 per user (sent/received DMs share the user's window). Evict the old client nonce receipt with its message. Do not promise permanent client nonce deduplication after eviction. The eviction drawing is a source-derived worked reducer example, separate from the small native workflow capture.
- Use native inspection events for the send graphs. The app does not expose an inspector endpoint: compile a workspace copy with only tracing and authorized read-only inspection hooks. Keep sibling sources unchanged. Document this instrumentation and never equate the diagnostic capture with a throughput run.
- The benchmark to cite is the retained two-million-registered-user trial: 23,871.70 destination commits/s, rounded to 23,872, about 24k. It uses 64 canisters on eight PocketIC application subnets, 128-byte bodies, and a 26.64-second measured window with an assumed 333-ms round. There are 635,942 measured destination commits. Replies, sender copies, workflow steps and member reads do not increment this metric; query throughput was not measured.
- Distinguish registered from simultaneously active users. The two-million-user run's backlog grew from 72,912 to 81,536 and failed the harness's sustained qualification. All 959,040 admitted messages, including warmup, eventually committed and completed after drain. It is simulated-time throughput, not a sustained mainnet capacity claim; consensus and real network delay are not simulated.
- Retain one current fifth video/audio/captions/player set alongside the four approved lessons. Check source hashes, native routes, reducer projections, unrecorded dispatch, DM ordering, request/result causality, narration timing, stills, full media decoding and browser chapter/caption playback. Remove temporary instrumented build/harness copies after finishing.
Canic proposal lesson
- Canic: A Fleet of Workflows is a standalone proposal for the Canic developers. Keep it outside the SDK site and The Stack. Its source is
../../canic, and its flows illustrate how the fleet/service goals could fit Takt workflows, Rechain reducers and Reactor transport. - State that this is a proposed Motoko integration using Mocanic's direction. Rust Canic and Mocanic have different contracts. Do not present these graphs as Canic's current implementation, native captures, or a drop-in integration. Existing Canic already has strong state ownership, authority, admission, receipt and recovery rules; preserve them.
- Follow placement with a Choice and root-owned provisioning child; receiver-first configuration publication with parallel receivers; checkout-to-dashboard delivery; uncertain-result reconciliation; and sealed same-release maintenance with a known-failure restore branch and irreversible release.
- Keep one owner per responsibility: Takt owns execution progress, reducers own business/configuration/intent state, and Reactor owns shared scheduling and selected batched transport. Native management calls use a thin awaited path to the IC management boundary, outside batch tunnels. Host files, credentials and operator authority do not move into application canisters.
- A placement intent must precede native creation. Retain its identity on uncertainty; never illustrate automatic fresh creation after a timeout. Parent workflow admission and child completion are distinct, with a subscribed completion event.
- Preserve quiesce → drain → receiver permissions → publishers. Parallel receiver branches are a proposed adaptation, not a claim about the current sequential Canic worker. Match exact scope/revision/configuration bytes. Topic names alone grant no authority. Event-based drain adapters also need explicit subscription and authority/readiness checks.
- In the sales example, admit the checkout receipt and durable delivery intent together. Both reducers must accept before either commit runs. Restore the intent worker after restart. At the receiver, commit totals and the receipt together; duplicate delivery returns its retained result, changed identity payload conflicts. Keep explicit bounded receipt retention. The source-demo purchases total 2 sales, 3 units and 5,500 cents.
- Keep transport ACK, business result and receipt retirement distinct. Reactor is not a replacement for Canic's bounded kernel admission, resource reservations or authority checks. Real integration would need adapters and conformance tests; do not imply a generic retry option supplies application idempotency.
- Maintenance stays within one release. Quiesce/drain/seal precede stop and snapshot. Candidate and decision state stay in the controller outside the target snapshot. Known failure can restore while sealed; fresh challenge and an irreversible release decision precede activation. After release, ordinary restore is closed. Unknown destructive effects stay unresolved until authoritative reconciliation.
- Use the same canonical complete canister composition and node/reducer/block drawings at every scale. Show all four canisters working independently at the end. Explanation balloons freeze camera as well as machine time; leave room above their unchanged targets.
- Proposed lessons may use executable teaching scenarios when clearly identified as such. Derive state changes and deltas from real owned deferred commits, retain full payloads for replay, and pin the source contracts used. Do not invent native measurements. Recorded actions explain and rebuild local state; replay never repeats external calls. Workflow attempts and timers are not permanent business actions.
- Preserve approved lessons one through five. Retain one current sixth video, free Ryan narration, player, transcript, captions and review stills. Verify model safety boundaries, timing and source hashes, review images, fully decode the MP4, and check browser chapters/captions.
Standalone marketplace lesson
- Takt: From Transfers to a Marketplace starts with Alice and Bob inside one canister. Show the actual atomic Rechain callback, then move to an explicitly adapted sharded transfer graph: resolve owners, Choice, local dispatch or debit/pending identity → remote credit → settle. Confirmed final credit rejection allows a new refund action; a timeout leaves the transfer unresolved.
- Use the real
../takt/examples/fourcans/shopexample for listing and buying. This is distinct from the synthetic counter application in lesson four. Seller approval precedes listing; listing checks availability/price and NFT ownership/approval before dispatching List. A listing does not reserve its NFT. - Buying reserves the NFT first (one minute in this example), pulls payment with
transferFrominto a distinct shop-owned subaccount on the token ledger, then claims the paid offer locally. Escrow is a ledger account controlled by the shop, not a balance stored in the shop canister. Deliver the NFT, pay the seller from escrow, then record Sale with the three participant block references. - Show the difference between an NFT reservation and a shop listing claim. Before confirmed payment/claim the seller can change the offer; a failed claim routes to refund. Keep the reservation/claim state visible inside its owning reducer.
- Unknown payment or delivery cannot authorize a refund. The recorded recovery example receives late payment confirmation, discovers the expired NFT reservation, refunds after definite delivery rejection, inspects/delists the offer and releases the claim. After confirmed delivery the obligation is seller payout; blocked settlement is not a completed sale.
- Preserve the exact native graph and history from source captures, including authorized inspector access. Timeline and Instructions use Takt's native model outputs, with recorded caller costs distinct from elapsed time and missing participant measurements. Camera time and Reactor batch travel are illustrative.
- The sharded transfer and six-canister marketplace are architectural extensions, not claims that the example ships sharded ledgers or a new throughput benchmark. Route each listing/account/NFT to its owner. A shared hot ledger remains a bottleneck; independent owners and batched communication allow concurrent work.
- Reuse the full canonical machines, fixed node layouts and existing inspector components at every zoom. A state folder may show three leaves in its unchanged boundary when needed for buyer/escrow/seller; two-leaf geometry remains unchanged. Numeric deltas still come from real reducer callbacks.
- This film stays standalone as
out/marketplace-lesson.mp4withmarketplace.html, captions, transcript and review stills. Preserve the five SDK lessons andthestack.mp4. Clean only obsolete drafts and owned scratch.
Standalone cdk-rsx memory lesson
- Research the current
../icrustmemimplementation, rather than historical encoded-object engines. Write comprehensive source-linked Markdown first, then have independent agents review accuracy and concision before visual specialists build the experience. The reference lives inresearch/icrustmem/. - Lead with performance from custom allocators, engines and collections, and code organization from composable private memories. Each module owns private Data and can own child modules with their own private Data. Use proper implementation names and explain them when their function becomes visible.
- One code module can own several private Memory declarations, and each Data record can contain many collections, including several Maps/Sets. Draw the business module boundary separately from its Memory cells. Every Nyxus and Hylix module memory has an owning attachment path to the same Actor root; never leave the Hylix example floating beside a rooted Nyxus tree. Current and future collection/engine work shares this Store ownership, scope and upgrade foundation.
- The old 255 comparison refers to VirtualMemory IDs per ic-stable-structures MemoryManager, not an IC-wide cap or a universal collection count. Keep current support distinct from future collection plans; RTree is not ported in the current source. Do not claim hierarchy was impossible to implement manually.
- Teach the important machinery through motion rather than reproducing the request as a checklist. Reuse canonical ModuleMemory, native page/span/slot, Hylix Block, WorkingSet and Catalog drawings at every zoom. Keep source identities, full capability lists and benchmark receipts in the research.
- Current engines are Nyxus and Hylix, selected per Memory declaration and complete Data record. Nyxus retains native values; Hylix stores domain bytes in stable memory but retains small native directory/attachment/descriptor anchors. The Hylix segment cache is bounded, not all transient memory.
- Catalog admission compares the installed saved fingerprint with the incoming Wasm's exact expected source memory contract. The target may differ through an explicit supported conversion. Show mismatch rejection before opening retained pointers and target publication only after restoration succeeds. Old-code readiness and incoming-code admission are separate steps.
- Use actual native Heap/Pool/Arena/WorkingSet traces for allocation, free-list reuse, generations and cache publication. Treat them as native algorithm evidence, not IC cost, throughput or KEEP qualification. Show IC access/dirty tracking qualitatively; preserve the distinction between growth pages, tracking regions and cache segments.
- Keep
out/icrustmem-lesson.mp4standalone, with one current narration/player/captions/transcript/review set. Preserve all earlier approved films and The Stack unchanged.
RSX introduction and Ashroot
- Put the introduction first in the RSX player. Start from an architecture the viewer already knows, then use the same Matinee sale to explain ownership, module privacy, typed memory, checked upgrades, and what changes when an operation crosses actors. Use contention as an example and qualify throughput, test measurements, and formal proofs by their scope.
- Introduce Takt, Reactor, Rechain, and Ashroot where the sale needs them. The Ashroot companion uses Matinee's programme to show an ordered index, a missing foreign key, and a restricted delete. Keep relationship guarantees inside the actor that owns the tables.
- The foundations storyboards drive Ryan narration and animation cues.
npm run build:newstack-foundationsrenders both films underout/newstack/foundations/.
RSX internal system series
- These eight films are the internal system series, for engineers of the CDK. They live in
research/newstack-internal-system/andout/newstack/internal-system/, separate from the developer course. - Use the Rechain, Reactor and Takt films as presentation references. Teach the memory machinery in a series of focused videos grounded in the current
../newstacksource. - Cover Store's single actor root, owner-private module memory and attachments, and the transient services that bind to and use that memory. Show how those services are rebuilt on upgrade and how explicit migrations change retained heap data.
- Cover Nyxus retained heap, Hylix stable records, Minima collection-controlled stable blocks, and the collections built on them. Store selects Nyxus or Hylix per memory declaration. Minima keeps its owning descriptors in Nyxus Data and its fixed-width payloads in stable memory.
- Keep one
lesson.mdper film in the internal system series. Put the exact narration in the storyboard beat with its view, focus target, phrase cue, animation, and resulting visible state. Use the shared component drawings and derive frame timing from the recorded narration.
RSX dev_coder course
- Keep the existing nine code-led films in
research/dev_coder/andout/newstack/dev_coder/. Preserve this cut while developing the architect course. - Keep allocation, layouts, bytes, offsets, runtime gates and benchmark instrumentation out of narration, visuals and exercises.
- Anything handled by a macro, derive or trait is simply used. Do not explain what it generates or how to write the same thing by hand. When an example hand-writes such wiring, keep it out of frame.
- Build each film around code the developer actually writes in the real examples (Quickstart, Shop, Async scope probe, Root authoring probe, RRT Heavy16) and an ordinary feature request. Use app-level drawings only: editor panes with real excerpts, the app file tree, module cards with a saved-data drawer, call pills, typed receipts, test ticks and release cards.
- The storyboard drives the film. Fenced excerpts under a beat become editor panes, backticked spans in a cue sentence highlight matching lines on that phrase, and a Hold line's
readstext becomes the balloon. Stage objects are plain data per beat insrc/newstack-dev/stages/.
RSX architecture lessons
Teach the mental model for designing an app and specifying it for a developer or AI. Follow a feature through module-owned, versioned memory, transient services, owner-private access, composition under one root and public canister methods. Use the file tree and
memory/v1.rsandv2.rsto show where design decisions live.Use the Rechain, Reactor and Takt films as references for pacing, recurring diagrams and behavior shown in motion. Their application code, including RRT Heavy16, is source evidence and an example of a module using the same memory model. Give the architect lessons their own worked app and goals.
Teach what the storage and collections let an app do. Identify the constraints relevant to the choice, including fixed-width data, rebuilds, ordering, and approximate answers. Put storage geometry and allocator machinery in the internal system series.
Teach designing for change. Show fresh install and restore as distinct paths, when a memory change requires a new version, which owner writes each conversion, how the upgrade checks its starting contract, and how to rehearse compatibility, success and failure on populated data. Pair module-level simulations with a real lifecycle test where the question depends on deployment or upgrade.
The eight architecture films build with
npm run build:newstack-archintoout/newstack/architecture/. Narration, cue phrases,rustsnippets and Hold balloons come from eachlesson.md; every sentence start is also a cue. Drawings are plain data per beat insrc/newstack-arch/stages/, drawn bysrc/newstack-arch/kit.tsxover the fixed Tool Library layout inworld.ts. Review one still per beat withnode scripts/render-newstack.mjs --series=architecture --all-stillsbefore a full render.
RSX application design lessons
Place these lessons after the architecture series and the Rechain, Reactor and Takt primers. Start from what the app should do. Show how an architect decides which actors own which facts, how to compose their modules and saved memory, who may call each public method, and which changes belong in a Rechain history.
Draw the workflow as part of the design. Work through a request, its observable result, what can fail or remain unresolved, and which actor or module can decide what happens next. Keep the workflow drawing anchored to the app's ownership and access decisions.
Study existing examples for source evidence and teaching conventions. Use an original worked app, actors and workflows in this series. Keep the source evidence in storyboard notes and base the spoken lesson on the design decisions.
The seven Crew Cards films use the worked day in
research/newstack-app-design/. The executable teaching model runs the Rechain reducers and derives the state and block changes. The workflow is an illustrative design sketch.npm run build:newstack-appbuilds the standalone films underout/newstack/app-design/.On the CDK website, use the shared lesson presentation for all films. Course pages use approved stills and an ordered lesson list. Player pages put timestamped chapters beside the video on desktop and provide the inline transcript and course navigation. Regenerate the website's copies with
python3 cdksite/tools/prepare_media.py.Call the SDK RSX in video titles, narration, captions, site copy, benchmark labels, and lesson navigation. Use
newstackfor the repository folder and existing paths.Set “Ultimate Performance SDK” above “2× to 100× fewer instructions” on the homepage and identify the range as selected PocketIC benchmarks. Link to the forum topic-create and grouped Minima filter measurements with their separate baselines. Explain the role of Reactor batching, Takt execution, scoped direct memory access, and page-local allocation. Page reuse applies within an execution. Show benchmark results alongside their workload and baseline. End the homepage with the article picker, where each role opens its section of Articles. Use shareable
/articles/<slug>/links and keep the role picker usable without JavaScript. Give each article primary evidence and its benchmark or proof scope. Feature successful experiments. Keep future video, article, and talk ideas in the workspace research notes.Show Heavy16 and Showtime with their measured workload, topology, and clock. Heavy16 distinguishes a completed workflow, a graph step, a logical delivery, and a physical message. Showtime's controlled backend runs count order adds and cancels. The homepage links to the articles for the full measurements and scope.
Showcase RSX IC Profiler and the Takt Workflow Inspector on the homepage with captures of the real browser tools. Credit the RSX team for building the profiler. Link each screenshot to its full-size image and each tool to its article. Label the capture behind each image and keep recorded charges, elapsed time, and simulated throughput distinct. Give each tool a separate screenshot carousel on the homepage and in its full topic article. Name the views, explain what to look for on each screen, and identify the run or fixture.
Give formal verification its own homepage section with scoped proof counts and documented fixes. Explain WebAssembly, canister isolation, retained-memory upgrades, and replicated execution in a separate section using the SDK and IC references.
Use the million-post forum benchmark beside the homepage title and put the ticket sale with the actor model. Show every data structure family and cryptography entry on the homepage. Use large totals and SVG illustrations, with compact names that preview details on hover, focus, or tap and link to the full write-up. Keep each entry tied to its current APIs and the exact scope of any retained instruction measurements.
Lead the homepage benchmark carousel with compute-heavy calls and use the 4,096-post audit in the million-post forum as the measured example. Compare RSX with Nyxus, DFINITY Rust with stable structures, and Motoko with enhanced persistence. Alternate forum results with workflow, exchange, and collection benchmarks to show the range of SDK workloads. Link to the complete results on Benchmarks.
Use the p2pgame prototype to show how a shared Rust reducer runs in browser Wasm and an IC canister. Show local prediction, reconciliation against accepted checkpoints, and the canister’s authority over committed history. Source the example from the current
/srv/shared/icgamecheckout.Give each article’s guides, videos, tests and reports full-card links with icons and short resource types. Keep their titles and destinations easy to scan and tap.
Write complete articles that explain the problem, what the code or experiment did, and what the evidence shows. Cite the sources next to the article and give benchmark workloads, units, and baselines when available.
In the website navigation, call the guide Mental model. Write it for someone who can decide how the app should behave and wants to brief an AI. Use one small example to show data ownership, permissions, waiting for a reply, and rehearsing changes on saved records. Give the reader a copyable plain-English brief and ways to review the plan. Keep Quickstart and detailed references secondary.
Develop the RSX website in
cdksite-next/with the Next.js App Router. Keep browser interactions in Client Components and export the site as static files. Use descriptive routes grouped by subject, such as/mental-model/,/lessons/architecture/, and/benchmarks/showtime/. Stage the approved media and the SDK reference bundle fromcdksite/, which also retains the original site. Verify published links and redirects for moved pages when updating the friends preview. Label links that open source files, point to the line that supports the claim, and show the filename, file path, and a route back to the relevant explanation in the source viewer. Use guides and reports as evidence for test results. Exclude test-only source listings from the site.Link the GitHub header to
3V-Interactive/cdk-rsxand the profiler gallery to3V-Interactive/rsx-profiler. Lead Quickstart with the matching release tools, the scores example, and the bundled agent skills. Link skill documentation directly to GitHub'smainbranch. Below Data structures and cryptography, show seven evolution lanes in order: Wire interfaces, EOP memory, Takt workflows, Rechain history, Ashroot tables, data collections, and SDK/allocator/Rust compatibility. Give each a guide, a report rendered on the site, and the applicable agent skill. Cover Reactor delivery when describing workflows that cross canisters.
Standalone game-engine research lesson
- The user explicitly wants the research in
/srv/shared/icgame/research, not a walkthrough of the simpler public Open Arena. Explain the engine during a game, its machinery, cheat resistance and conditional guarantees. Recheck current repository changes when revising; do not preserve superseded limits or describe candidate mechanisms as already integrated. - Follow the user's corrected design and current
docs/BASELINE.md/docs/ENGINE_CONTRACT.md: the IC and player peers are the architecture. The peers are the witnesses; they retain and co-sign committed inputs in their own durable journals and exchange gameplay directly over full-mesh WebRTC. A separate trusted witness/coordinator/relay server is not part of this design. - Queries verify the peer evidence, run bounded simulation and issue context/purpose-bound certificates authenticated with backend-secret BLAKE3 MACs. Updates verify those certificates against actual persistent state and logical deduplication identity, then atomically commit without rerunning simulation or the heavy input verification. Show this cost/authority boundary explicitly.
- CURRENT is public peer-live FPS with shared IC checkpoints. The hub is a role inside an enrolled player, not a separate actor. Normally one heavy query per match per second produces an original native IC-signed whole reply; followers authenticate it offline and make no routine heavy validation calls. Native origin authentication is distinct from backend-secret BLAKE3 authorization, latest-state guarantees and delivery. CURRENT accepts at most 32 cohorts/64 ticks per query.
- Do not animate hub ejection and automatic replacement as an implemented capability. The current coordinator is fixed; research models some exclusion/resumption cases, but authenticated replacement-hub selection and private handoff remain unfinished. A replacement must not reset journals, accepted history, authority floors or delivered-view credit.
- Two-tick cohorts use salted commitments and one all-roster BIP340-signed joint vector; there are no separate per-input signatures. One strict atomic journal transaction must complete with the exact own pair, salt, signing material and chosen vector before Vote leaves. Recovery restores those bytes. The absolute context/cohort/signer key prevents parent/control variants from reopening the choice. At least one honest required signer with nonrollback storage supports uniqueness; unanimity does not ensure availability. Dead or ejected gameplay actors do not silently leave the required signer roster.
- NEXT is a candidate global private batch, with PRIVATE_DUEL as its two-player instance. Show one bounded IC simulation projecting authorized per-recipient AEAD envelopes; followers receive the original whole signed batch and decrypt only their own view. Complete-prefix custody requires each honest signer to retain all required base certificates and exact encrypted bodies before protected output. Custody proves retention, not legality or view delivery.
- The proposed 200 ms pipeline uses only already returned authenticated anchors, at most four tracked calls and 24 cohorts/48 ticks per call. Its separate delivered-view debt gates new input authorizations and custody ACKs against the latest actually verified/decrypted own view; same-epoch replies, fresh timestamps and re-encryption cannot restore credit. This is unfinished private delivery and fairness research, not a latency guarantee. Keep proofs, receipt counts, source identities and most byte/equation budgets in Markdown.
- Do not turn missing traffic or ordinary prediction corrections into cheating. Current prepare_final queries prepare Winner/Draw certificates and settle_match updates commit score once; ordered abort/expiry yields VOID without scoring. Funded pots, private ABORT_REFUND and live evidence/control/exclusion remain separate research. Explain legal-input automation and the explicit trust/availability limits without claiming a complete private implementation or whole-protocol security proof.
- Preserve all nine earlier films. Keep this film standalone as
out/icgame-lesson.mp4, with one current narration, captions, player and review set. Use the established paper style, canonical components and paused explanation machinery.