Skip to content

feat(demo): a slide deck that a code mode agent builds and edits - #11

Open
smithclay wants to merge 2 commits into
mainfrom
feat/demo-deck
Open

smithclay wants to merge 2 commits into
mainfrom
feat/demo-deck

Conversation

@smithclay

Copy link
Copy Markdown
Owner

Summary

  • demo/deck: the demo as a slide deck, built and edited by a Code Mode agent. Each slide is a program in a deck-slides Artifacts repo (slides/<id>.js plus the spec it returns), and the presenter renders slides from that repo. In the chat panel you ask the agent to add, change, remove or reorder slides. Every slides.write runs the program in a fresh Dynamic Worker, checks the layout, and commits. The agent's own runs land in a deck-agent repo through GitHistoryConnector.
  • Editing behind Cloudflare Access: the deck is public to view at https://deck.clay.gripe. An Access app covers /edit and /api/agent, and the Worker also verifies the Access JWT (signature, audience, expiry). Without Access configured, only localhost can edit.
  • Design tokens: all colors, type, strokes and motion live in src/design/tokens.css. slide.css styles slide elements by class, and the layout checker reads its metrics from the same tokens. Slides fade in once, with no per-element animation.
  • fix(sink) in @smithclay/codemode-git, as its own commit:
    • Cold-start push fix. Artifacts can leave lastPushAt null after git pushes. A cold sink (a new or evicted Durable Object) then ran git init, built a new root commit, and had every push rejected as non-fast-forward. It now checks the remote's refs instead.
    • Deletes. A commit can delete files (null in SinkCommit.files).

The deck can also export to PDF for presenting offline (npm run pdf -w demo/deck).

Test plan

  • npm run typecheck and npm test across workspaces
  • Sink smoke test against a real Artifacts repo: fresh repo, cold clone with lastPushAt null, and a delete
  • Agent built all 18 slides from outline.md, then edited, added, reordered and removed slides; checked in the deck-slides git log
  • Deployed: viewing is public; /api/agent redirects to Access when signed out; a forged JWT gets 401
  • Sign in through Access on deck.clay.gripe and make an edit in the browser (needs the owner's account)

smithclay and others added 2 commits October 20, 2026 09:58
…deletes

Artifacts can report lastPushAt as null after git pushes, so a sink that
started cold (a new or evicted Durable Object) ran git init instead of
cloning, built a new root commit, and every push after that was rejected
as not a fast-forward. The sink now asks the remote whether the branch
exists (listServerRefs) instead of trusting lastPushAt.

Commits can also delete files now: a null file in SinkCommit removes that
path. The smoke test covers both against a real repo.

Co-Authored-By: Claude <noreply@anthropic.com>
demo/deck is the demo as slides. A deck agent (Code Mode plus codemode-git)
keeps one program per slide in a deck-slides Artifacts repo, and the
presenter renders slides from it. You chat with the agent to add, change,
remove or reorder slides; every write runs the program in a fresh Dynamic
Worker, checks the layout, and commits. The agent's own runs go to a
deck-agent repo through GitHistoryConnector.

Viewing is public. Editing goes through Cloudflare Access on /edit and
/api/agent, and the Worker verifies the Access JWT itself. Design tokens
live in src/design/tokens.css. npm run pdf saves an offline copy.

Co-Authored-By: Claude <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant