This is just brainstorming so do not make any changes. We have previously used a concept…
- User
This is just brainstorming so do not make any changes. We have previously used a concept called a blueprint. What it is is basically a named composition of blocks, for example a distribution is a system with an extractor and many loaders. I was thinking of re-introducing that into the dashboard. It would appear as a dropdown on the integration flow page and selecting a blueprint there would render different layouts with the slot place holders. Selecting a distribution would render placeholders for extractor, a topuc and loaders. Selecting a transactional blueprint would render a placeholder for a transactional integration etc
Assistant
This is a brainstorm request — let me load the brainstorm skill to run this properly.
Assistant
Let me scan the repo for existing blueprint concepts and the integration flow / dashboard context before diving in.
Assistant
Good — no changes, dialogue only. I've scanned the current state so we can ground this. Here's what exists today:
- The flow canvas (
web/src/components/FlowView.tsx) already renders a fixed three-slot skeleton for empty systems: extractor → transactional → loader columns. Clicking a slot opens theCreateDrawer, filtered to templates with thatintropy.dev/block-kindlabel. - Block kinds in the CLI are exactly three:
extractor,loader,transactional-integration(internal/template/scaffold.go). - "Blueprint" as a named concept is gone from the codebase — it lives on only in the shape of that fixed skeleton.
- The flow canvas (
- User
I agree on option 3. We must have a general blueprint where you can basically build the system as you desire without being restricted to some pre-existing blueprint
Assistant
That lands well — and it simplifies the slot model. Since a blueprint is a guide rather than a constraint, multiplicity comes for free: "distribution" doesn't need to declare "1..N loaders." It just seeds the canvas with one extractor slot, a topic placeholder, and one loader slot — once you fill a loader, the general "add another block" behavior (which the general blueprint provides anyway) lets you add loader #2, #3, and the layout extends. The blueprint's job is only to shape the starting skeleton and give the system a named identity.
Which raises the next question: what does a blueprint carry beyond the initial slot layout?
- Layout only — a name, a set of slot placeholders (kind + position), and implied topics. Selecting "distribution" just arranges the empty canvas; every slot's create drawer behaves exactly as today (all templates of that kind).
- User
Perhaps we should try option 3 and work backwards? We should do it on a new branch off release/v1 and do not push anything
Assistant
Working backwards from the full option-3 experience is a good way to find the essential core. Before I start the spike, let me check the branch situation:
Assistant
There's a dirty
FlowView.tsxin the working tree (78 insertions). Let me see what it is before branching:Assistant
The working tree has uncommitted layout work in
FlowView.tsx— vertical centering of column stacks and topics centered on their wired neighbours. That looks like deliberate in-progress work, not something to sweep away.How do you want to handle it?
- Stash and carry it onto the new branch — it's canvas layout work, closely related to blueprint rendering; it travels with the spike.
- Leave it stashed on release/v1 — the blueprint spike starts from a clean tree; you can pop it back later.
- It belongs to you, not me — you commit or discard it first, then I branch.
Also one refinement to the spike scope before I start. Option 3 has two distinct mechanics, and I'd propose spiking them in this order:
- A. Blueprint catalog + selector + guided skeleton: blueprints defined as data (name, slots with kind/position, topic placeholders), a dropdown on the flow page, and persistence via a label on the system record — degrading to plain rendering once slots are filled. This includes your "general" blueprint, which is just the catalog entry whose skeleton is today's three-slot canvas.
- User
I fixed so that there is no uncommitted work now
Assistant
Clean. Branching off
release/v1and spiking both A and B — catalog + selector + guided skeleton first, shared facts layered on. Nothing will be pushed.Assistant
Now let me understand the pieces the spike touches. First the flow view and its data:
Assistant
Now let me look at the remaining pieces: the systems API (where a blueprint label would persist), the form field hook (where shared facts would pre-fill), and the CSS:
Assistant
I have the full picture now. Design for the spike:
Persistence: the dashboard is read-mostly — the only writes are CLI renders. Writing a new
blueprintfield into the host's.intropy/scaffold.jsonfrom the SPA would bypass the render path (and it's already JSON-marshalable, so it wouldn't break older CLIs). For the spike, blueprint assignment is a dashboard-local sidecar (<workspace>/.intropy/dashboard-blueprints.json) — zero schema risk, read/write through a small endpoint. If the concept graduates, the CLI can own it properly.Catalog: a TS data file — each blueprint is slots (kind + column) plus topic placeholders, plus shared-fact prompts keyed to template params (
topic,contract). "General" reproduces today's fixed skeleton and is the default.Fact propagation:
CreateDrawertakes prefill values;useTemplateFieldsalready merges seeds under user edits, so prefill is a seed layer — blueprint-provided values win until the user edits.Let me check the remaining details — CSS and the form field rendering:
Assistant
I have everything I need. Building the spike now — starting with the server side (a small blueprint assignment store):
Assistant
Now register the routes:
Assistant
Server side compiles. Now the frontend — the blueprint catalog first:
Assistant
API helper is compatible. Now wire prefill into
useTemplateFields:Assistant
Now the main work —
FlowView.tsx. Wiring in the blueprint state and fetch first:Assistant
Now the toolbar UI — blueprint picker and fact inputs:
Assistant
Now the
CreateDrawerinvocation gets the fact-derived prefill:Assistant
Update the slot-click plumbing through
FlowCanvas:Assistant
Now the core: rework
buildDeclaredGraphto take the blueprint and facts, render blueprint slots as guides with wiring hints, and add theprefillForhelper:Assistant
I need to add the
KIND_DATA_FLOW_FALLBACKmapping and place the blueprint slot/topic nodes. Let me add the constant nearKIND_DATA_FLOW:Assistant
Now replace the slot rail rendering with the two-mode version (guide vs rail):
Assistant
I left a nonsense expression in the
nodeBottomcomputation while restructuring — let me clean that up properly:Assistant
Now add
prefillForand adjust the guide-mode column counting (guide slots/topics already counted intocolRows, soplacehandles them):Assistant
Now add the CSS for the fact inputs and the dashed guide edges:
Assistant
rf-edge-extis already dashed — guide edges need a distinct, more ghostly treatment:Assistant
Builds clean. Now run the Go tests and check whether the embedded static assets need refreshing:
Assistant
Everything builds and passes. One design detail worth flagging before we call the spike done: the guide currently dissolves the moment any slot kind is filled — fill the extractor in a distribution, and the loader slot drops to the rail, losing its wired-topic position. I left a comment saying the graph can't tell which node replaced which slot; that's the conservative choice. A smarter version could keep unfilled blueprint slots in place until all are filled. Easy to change later.
Let me sanity-check the guide-mode geometry once more by reading the final layout section:
Assistant
The geometry checks out — but I spot a stale comment ("Slots never count: they pin to the bottom rail") that's now wrong in guide mode, where slots do count into
colRows. Fixing:Assistant
The layout logic is coherent. Final verification — full Go tests and a frontend rebuild: