Repository navigation
A window an agent tells biology on, step by step - #1
Merged
Merged
Conversation
cellstage is an MCP server over standard input and output, and a Bevy window. An agent splits the window into up to four panels and shows in them proteins at their measured atomic structure, fetched from the Protein Data Bank and cached outside the project; one cell under a fluorescence microscope whose fuller network cellweave runs live; and sections of skin stained with haematoxylin and eosin, normal or with a melanocytic lesion at ten stages. The user turns and zooms what is shown and clicks on it; the agent hears what was under the pointer, can pin notes, turn a protein to a residue, and take a picture of the window. Every panel says what it is: a measured structure, a simulation, or an illustration drawn from histology. The protein and cell code comes from cellweave's learning program, made independent of its catalogue: the agent chooses colours, highlights and hidden chains for any entry. The skin generator is new: rete ridges, keratinocytes in a mosaic, a basal layer with its melanocytes, collagen in bundles, vessels; nevus nests maturing with depth, bridging in a dysplastic nevus, pagetoid spread, a dermal nodule, solar elastosis and a follicle for lentigo maligna, the horn of a sole; colours by the Beer-Lambert law with Ruifrok and Johnston's stain vectors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rary The window was a fixed board of four panels that knew three things: a protein, the cell, a section of skin. An agent asked how melanocytes leave the neural crest had to fall back on ASCII art in the terminal, and everything it showed was gone when the conversation ended. Now an agent tells a story in steps the user moves through with the arrow keys, each step with its words under the pictures and up to six panels. A new panel kind shows drawings the agent writes in SVG, in a house style of classes and ready-made shapes, still or moving: frames given whole or as what changes from the one before move smoothly into each other. Every call that changes a step is kept in the story, and every story is written to a library on disk, to be found by subject and opened again at once, by the agent or from the window. Notes point at parts by name, a drawing's ids, a section's regions, a cell's compartments, and the window places them. Pinned notes on proteins and clicks on atoms now use window coordinates, as Bevy's viewport functions expect; they were off in every panel but the first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…arts, pages, pictures, predicted proteins The house now holds 120 shapes and 31 templates of whole things with their parts named (the body, the brain in three views, organs and their sections, the inside of a cell, the embryo from the egg to four weeks), set in a drawing with <insert>, and shorthands that scatter, ring, row, grid or lay shapes along a path, or draw a bilayer or a helix along one. A drawing carries only the house shapes it uses, renamed so that the agent's ids never meet them. New panels, each written as a drawing so that notes, clicks, the library and the moves between steps work for them: a diagram laid out in layers from nodes and edges, a chart of numbers with their source, a page of words, a picture from Wikimedia Commons with its author and licence. show_protein shows the AlphaFold prediction for a UniProt accession, labelled as predicted. protein_search, pathway_lookup and image_search read UniProt, the PDB, Reactome and Commons; what is fetched is kept in the user's cache, never in the project. Notes point at a point on a part, not at the middle of its box; a part that holds others is pointed at on its edge. A change that brings in a transform or an opacity gives the frames before a neutral one, so they move rather than fade; a moving drawing renders at half the pixels. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e melanocyte's DNA, and a mole's life The agent directs and the window renders: a film of shots, each a place the camera flies to across scales along van Wijk and Nuij's smooth path, words said over it as subtitles, the world's clock, and what stands out while the rest dims. The skin is built cell by cell from histology's sizes: the epidermis's four layers, melanocytes handing pigment up their arms, the basement membrane over the rete ridges, the dermis with collagen, fibroblasts and capillary loops with red cells running; a melanocyte's nucleus, chromatin, nucleosomes and the double helix at BRAF's codon 600. The clock is a common mole's course: the mutation, the clone gathering in nests, the brake, the nests sinking into the dermis, with the surface's mole growing, then raised and paler. Cells glow on the dark, their edges bright, seen through, with a confocal-like optical section. The glow is drawn additively with the opaque pass, so tens of thousands of cells are drawn in batches, and the scale's fades are read by the shader from the camera's near plane, so that no material is written every frame. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The engine's parts (groups that share a look and fade across scales, the camera, what a world is told each frame) are set apart from the skin, which becomes one world among those to come, each with its own places, stories and clock. The skin's clock can now tell a melanoma as well as a mole: one cell of the first nest losing p16 and spreading along the junction and up into the epidermis, telomerase switched on, the basement membrane digested away, a nodule filling in the dermis, its middle short of oxygen, capillaries sprouting towards it from both ends and meeting, cells leaving through the new vessels, and mutations piling up in the helix. At the surface it grows uneven in shape and colour, and a nodule stands up out of it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eath, telomeres growth_signals: one cell reading EGF, from the receptors pairing in the membrane through GRB2 and SOS, RAS switching on, RAF, MEK and ERK, ERK into the nucleus, cyclin D, to RB letting go of E2F on the genes for copying DNA; with RAS stuck on, or with a stop signal that p16 enforces, or that goes unheard once p16 is lost. cell_death: a cell with broken DNA among its neighbours, p53 building up, BAX pores in the mitochondria, cytochrome c leaking, apoptosomes, caspases, the cell shrinking, blebbing and falling into bodies a macrophage eats; or, with BCL2 high or p53 lost, living on and dividing with its broken DNA. telomeres: a metaphase spread whose telomeres wear down with each division until bare ends set off the alarm, unless telomerase writes the repeats back, or until chromosomes fuse end to end in crisis; and a telomere up close, its repeats, shelterin and T-loop. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er language Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A hidden window was still drawn as fast as the loop could turn, with nothing to hold it to the screen's refresh: closed, or not yet shown, cellstage kept more than a whole core busy for the whole session. The loop now waits while the window is hidden, and the agent's every message wakes it, so a call is answered at once and the window still quits when its input closes. Measured: about 130 % of a core with a world shown, 0.6 % once closed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The window no longer looks for pictures on Wikimedia Commons: image_search and show_image are gone, and a drawing that holds an <image> is refused, the renderer reading no picture from a file or from the drawing itself. The agent is told that when a subject is in none of the worlds and none of the tools, it says plainly that cellstage cannot show it yet, rather than looking for pictures elsewhere. A step kept with a picture shows its panel empty. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The agent was told anything in the body could be shown, and drew what no world covered. It is now told what cellstage knows how to build (its worlds, proteins, the live cell, sections of skin), to say plainly that cellstage cannot show a subject outside them, and to draw only beside a subject cellstage shows, never in its place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The link to cellweave named a folder beside this one, which means nothing on GitHub; it now names cellweave's repository, and the steps to run cellstage clone both side by side. The licence GitHub added is named at the end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The live cell read examples/spheroid-fuller.toml from a cellweave checkout beside this one, at a path fixed when cellstage was built, so moving either folder broke the cell. It now asks cellweave_io::shipped_network for the fuller cell, compiled into cellweave. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and licences CI and Security as in cellweave, Dependabot for the crates and the actions, a pull request template. cellweave's crates now name their version beside their tag, which cargo-deny asks of a git dependency. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cellstage shows only what it builds: worlds in 3D, proteins, the live cell, sections of skin. The draw, drawing_kit, show_diagram, show_chart and show_text tools go, with the house of shapes and templates and the SVG renderer. A step kept from before with such a panel shows it empty. The CI guard refuses an SVG file as it refuses a picture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
The first version of cellstage: a Model Context Protocol server and a window, on which an agent tells biology in steps that the user moves through with the arrow keys. The README says what it shows and how to run it.
What it brings
~/.local/share/cellstagethat opens again without the agent.cellweave_io::shipped_network.Rules it keeps
Checks on every pull request
As in cellweave: format, lints and docs, tests, the oldest supported Rust (1.97), and cargo-deny for advisories, licences and sources, also every Saturday. A guard refuses data, pictures or SVG files committed to the repository. Dependabot raises the crates and the actions. Two advisories are lived with in
deny.toml, each with its reason: ttf-parser unmaintained (winit parses only the system's fonts with it, for the Wayland title bar) and ruzstd in bevy_image (only for KTX2 textures, none loaded). cellweave's crates name their version beside their tag.How it was checked
🤖 Generated with Claude Code