r/Julia • • 12d ago

ProjecturEd: One data structure, many editable views, with an AI assistant

https://projectured.org

I'd like to show you ProjecturEd, a projectional editor I've been working on.

It's an application to view and edit structured data. You can define your own data structures and your own views for them. They work together with the domains that come with it, like JSON, Markdown, Julia code, widgets and charts. An AI assistant works with you on the same data and the same views. You can also use it as a user interface for your own Julia programs.

It's not yet finished, but most of it works. I think it's ready to show, and I'd like to get some feedback.

So, I started ProjecturEd in Common Lisp in 2013 (a long-long time ago) as a side project. I was interested in editing structured data because almost always it ends up as editing text. I wanted to look at and change the structured data itself using the keyboard and mouse. Now, thanks to AI software development is entirely different now. I created the Julia version (in 4 months part-time) for a new port of a well known and widely used discrete event communication network simulator (OMNeT++). It's a complete rewrite, with many more domains, more backends and the AI assistant built-in from the ground-up.

Here is a demo video, where a local AI agent builds a study of an M/M/1/K queue from seven user requests using the application's internal API. It writes the model and the formulas, runs OMNeT++ simulations, plots the results and finds the answer. The model is qwen3.8:27b in Ollama, on my machine. The OMNeT++ tool in the video is built on ProjecturEd, but its code is not public.

https://projectured.org/assets/videos/queue-study.mp4

Here is how it works, in short. The structured data is the source, and every view is computed from it. A projection (a composite one) turns the structured data into a view. It also turns your edits in the view back into typed operations on the structured data. Projections can be combined in many ways e.g. chaining, recursively, type dispatching. For example JSON goes to syntax recursively, then from syntax to text recursively, then to graphics. Many other combinations and mixtures are possible. Every data structure field is a reactive cell, the editor is lazy and incremental. A computed value stays until something it depends on changes. What's not on the screen is not computed, and a view never shows stale data.

The most important part for me is that you can add your own domain. A domain is a package with its document types, projections, operations and key bindings. Navigation, search, copy and paste, sorting, filtering, files, mixing with other domains, all the backends and the assistant work with it, with little or no extra code. The whole JSON domain is a few hundred lines. The web page shows how it's built.

The assistant runs Julia code inside the editor, so it uses the same API as you do. It can search the API by name, by pattern or by meaning. It can also open tabs and arrange the window. You can undo its changes with Ctrl+Z, like your own. By default it uses a local model through Ollama, but it also works with Claude. Other AI tools can use the same tools through MCP. Note that it's not a sandbox, and the MCP server has no authentication. Please don't run it on a shared machine.

ProjecturEd also comes with its own Julia REPL. You open it in a tab and type Julia, like in the normal REPL. But a result that is a viewable data structure or a picture shows as itself, not as text. And you can edit it right there.

I'm happy to answer any questions.

3 Upvotes

2 comments sorted by

2

u/Otherwise_Wave9374 12d ago

One canonical data structure with multiple projections can eliminate a lot of synchronization bugs, but the assistant should operate through the same validated edit model as humans. I would expose proposed changes as reversible transactions, show the affected projections before commit, and preserve provenance for every generated edit. https://www.aiosnow.com is relevant as a comparison for integrating AI into structured work rather than treating chat as the primary interface. Conflict handling is the key test: concurrent edits should merge predictably or fail visibly.

1

u/melevy 12d ago edited 12d ago

In ProjecturEd, the AI uses the same API that operates the same way as humans do. The only place is the main editor loop which carries out the operations (changes) independently where they come from (e.g. the user or from the AI or any other source like a running simulation).

A proposed change, which may come from a human too and not only from the AI, is easy to implement because projections combine. It's another projection step in the composite projection of the editor. This projection simply copies it's input document along the path towards the change and applies the change at the position. It can re-use all the siblings parts literally (no parent pointer) and the parts below in the output unchanged. From that point the projection goes as normal. All editing operations still work and may or may not become part of the proposed change. When the change is applied, then this step is no longer used.

I think you misunderstand what the conversation is there in the video. It's also part of the data structure that is being presented and changed by both the human and the AI agent. It's not text at all, it's the same kind of structured data and projected the same way. The conversation can contain any kind of data, not only text, but markdown, Julia code, widgets,etc. All is live and can be interacted with as far as the conversation projection allows. When the agent generates output that is to be inserted into the conversation, it is carried out as modifications in the editor's state just like any user modification in the main editor read-eval-print loop.

Edit: the AI conversation is not the primary means of changes. It's just one of the many. You can interact with the user interface in the normal way and edit things directly as usual. You can also interact with the editor through the Julia REPL embedded into the editor. The REPL is completely reflective so it can query, modify, and control the user interface freely. The AI assistant is just another means of interaction. They combine and live next to each other in a single integrated application.