Closed Loop Requirements and the Blueprint View
Closed loop requirements turn a finished program into a complete, gap-checked set of requirements. Once every question is answered or handed to its owner, code, Blueprints and pictures are all views of one source. This document explains the idea, the three Blueprint friction points, and what the Blueprint view prototype has built and measured so far.
At a glance
Code or a Blueprint goes in; the loop holds it as one logic graph tied to requirements; every view people read is printed from that, never edited apart from it.
Closed loop requirements
Closed loop requirements are every problem, solution and interaction a program carries, aimed at being complete enough for an AI to rebuild the program exactly, with nothing misread. No rebuild from requirements has been tried yet; what is measured is that each requirement's effect can be checked against the code. They are reached from a finished product, not imagined up front.
- Start from finished code. Source that already does everything its users need.
- Read every line into a node graph. The prototype's reader is
U2ue.CodeGraph, built on Roslyn, so it reads meaning and not only text. - Tie each node to a use case step. Use case descriptions are linear: a main path plus every alternate path, each with its stated outcome.
- Walk the chain. A node, path or source sentence with no requirement becomes a typed question. It is never filled with a plausible guess.
- Close the loop. The loop is closed when every question is answered or handed to its owner.
Why it is the new raw element. Strip the syntax off a program and three things are left: problems, solutions and the interactions between a person and the system. We write them as user stories, use case descriptions and class diagrams of the concepts (not necessarily the code's exact classes). Everything above that layer, C#, C++ or a Blueprint, becomes an interpreted form, picked for whoever is reading.
The compiler for requirements. Code has a compiler and requirements never had one, so nothing said a branch was missed. The gap checker fills that role:
usecase_model.pychecks the model as data with 17 rules, each shown able to fail by a planted fault.usecase_kg.pyholds the model as a SQLite knowledge graph and counts the independent evidence behind each requirement.interrogate.pyturns every hole in the chain into a question and exits non-zero while any is unanswered.
Measured on a public Blueprint. Each requirement is judged by what mistake can still get past it: 13 criteria. The requirement node as it stood could not hold 6 of them, so it gained three fields: an effect (what the code sets, calls, branches on or reads, and where), terms (words bound to names in the code) and a lock (fingerprints as last verified).
- 35 of 43 requirements carry a check (an effect that can fail); the other 8 carry a written reason instead, calls only the author can make. The 84 checks from the 25 requirements read from the code all hold; since they are checked against that same code, they guard against change rather than prove it correct.
- 13 checks from 10 of the owner's questions fail on the code as pasted: these are the defects the loop found.
- 97 of 97 planted faults flip the result.
- On a copy of the sample, an edited requirement and a changed statement it reads both came back stale.
- The loop is still open: 43 holes from 18 questions only the author can answer. 11 requirements rest on the code alone, so a mistake already in the code is in them too.
A hello world first. Pong, two public Blueprints with 32 nodes between them, went through the same tools: 6 use cases, 10 requirements, 12 of 12 paths, 13 of 13 effects hold and flip. Its loop is open too, on 3 questions for its owner: the score, the two speeds, and which end a serve goes to.
A whole game. siljaZ's asteroid shooter (Unreal Engine 5.0, January 2023) is the one whole asteroid game on blueprintue.com; no classic Asteroids is pasted there. 16 of its 23 pastes, 232 nodes, convert to 83 statements in 20 graphs. The model holds 12 use cases and 24 requirements read from the nodes, and all 65 of their effects hold on the code and flip when a fault is planted. All 232 nodes are tied to a requirement, 37 of 38 outcomes are cited (1 excluded with its reason) and 53 of 64 paths are covered (11 excluded). Its loop is open on 15 questions only the author can answer, with 0 holes of ours.
One source, many views
Because every view is printed from one logic graph, Blueprints convert to code and code converts to Blueprint-style graphs. The graph's canonical form is a small pseudo-language of its own; Blueprint, C#, C++, pseudo-code and the 3D city are renderings of it.
| Measured round trip | Result |
|---|---|
| Unreal Engine 5.7.1 template Blueprints to code | 92 Blueprints from 11 templates, 0 failed; 275 methods, 275 parse as C# |
| A game in production, code to graph and back | 4,201 of 4,201 methods print back to the same syntax tree |
| Every graph in every form | 16,804 text and block renders plus 4,201 Blueprint renders, 0 errors |
| A second game (Zombie Crossing, an XNA game, its MonoGame port, read only) | 1,270 of 1,270 round trip; needed two reader fixes |
| A public Blueprint pasted from blueprintue.com | 162 of 162 nodes converted, 12 methods, all parse |
Six nodes in the Unreal templates have no code form (4 Timelines, an async action, a DMX plugin node). They are marked as islands, never dropped.
The C++ view is not complete yet: it leaves 11.3% of the templates and 5.4% of the public Blueprint marked as C#.
The Blueprint frictions, one by one
RJ's discussion "The Blueprint Paradox" names three friction points (visual clutter, the object-oriented disconnect, the limits of a pure object graph) and two remedies (dictation and live observation). Each is measured on hitted's "Lock-On System", a public Blueprint on blueprintue.com (Unreal Engine 5.0, 162 nodes). The table is generated by the prototype's own friction tool; no number in it is typed by hand.
| Friction | In the public Blueprint | In the view | Status |
|---|---|---|---|
| Spaghetti wires | 200 wires (82 order, 118 value), 29 crossings | 148 wires drawn, 0 spanning 6 or more statements; a far read becomes a Get chip beside its reader | Answered, measured |
| Zoom blindness | Event graph spans 2,736 x 2,160 units | Fly to any of 99 statements by name, typed or spoken; labels fade in as you come close | Answered, measured |
| Order vs value clutter | 17 crossings are an order wire over a value wire | In 3D, order pipes run above the nodes and value pipes below; they cannot cross | Answered by construction |
| Hidden hierarchy | The pasted text names no parent class | Each class is a district on its parent's floor, the parent read from the code: FrankBP : Character, MasterEnemy : Actor. The event graph casts to Master_Enemy, at another asset path; the two are held apart until the author says whether they are one Blueprint | Answered; one question for the author |
| No encapsulation | 1 rule written twice, 3 events fired like functions, 3 members written by several graphs | Assembled as classes, with 9 proposals naming the object-oriented form that removes each pattern | Answered for reading |
| The Cast To trap | 4 Cast To nodes | One proposed interface holding exactly the members the code reads through the casts | Proposed, not applied |
| Grid problem | Logic in 12 graphs across 4 pasted texts | One command reaches any of them; a members panel lists who writes each field | Answered, measured |
| Invisible relationships | 5 calls made by a function name in a string | Every call between graphs is an arc; a call by name is drawn in orange and says so | Answered |
| Encapsulation gates | 43 of 162 nodes are variable reads and pure math | Folded into the statement that reads them, as the engine compiles them | Answered, measured |
| Voice to code | Every look is a click, a pan or a search box | A command bar takes typed or spoken commands; changes are typed commands behind three checks | Partly: speaking a change is not built |
| The icing concept | The Blueprint is the only form of the logic | The map is generated from the code, every node maps to a requirement (162 of 162), 0 nodes moved between two layouts | Answered, measured |
| Data as flowing water | Two functions run 100 times a second, with no sign in the editor | Pulses run the pipes; those two graphs burn red at their timers' rate; pipe thickness follows the value's type | Answered |
| Time-travel replay | A value shows only at a breakpoint, live | All 54 paths replay step by step; on the game, values too | Answered |
| Coding by observation | Changing a value means edit, compile, play | A valve changes a value and every battle replays with no rebuild (on the game; the sample has no runnable enemy) | Answered on the game |
No person has used the view yet. "Answered" means the view does the thing, measured by tools; whether it removes the friction for people is the next test.
Human ergonomics
Human ergonomics means breaking a hard problem into analogies and mnemonics a person already knows, arranged as parent and child, and read in a line. It is the shape layer: the same graph, laid out for a human mind rather than for the machine.
- Analogies. A class is a district in a city; its parent class is the floor it stands on. Inheritance becomes a place you can see, not a fact you have to remember.
- Parent and child. A large idea breaks into smaller ones you open one at a time. Use cases follow the same rule: epics hold user goals, and user goals hold subfunctions.
- Linear. Steps read in order, like a story. Order pipes run above the nodes and value pipes below them, so the two never cross.
- Stable places. Unchanged code lays out in the same place every time (0 nodes moved between two layouts), so spatial memory keeps working.
On the game's core, a one-to-one drawing would have 2,343 wires running six or more statements. The view draws 0: a value read far from where it was set gets a small Get chip beside its reader instead.
Two layout targets failed and are left as design calls, not patched: graphs average 2.5 nodes per line of code against an aim of 1.5, and big graphs open with every node showing against an aim of at most 30.
Observational understanding
Observational understanding means learning a system by watching it run, the way you learn plumbing by opening and closing valves. The system keeps running in front of you; you can see it, rewind it and change it mid-flight.
| What you do | What the view does | Measured |
|---|---|---|
| Watch it run | Pulses travel the order pipes; value pipes are as thick as their type is heavy; a hot path glows red | In the public Blueprint, DistanceToFrank and ToggleLockOn each run 100 times a second, read from their timers |
| Rewind it | Every path replays step by step and can be scrubbed back and forth; each step names its use case step and requirement | 54 of 54 paths in the public Blueprint. On the game, a crit multiplier planted in a copy (1 to 1.1) made 4 of 6 battles diverge at a named step (339 to 372 damage) |
| Change it mid-flight | A valve changes a value at a probe and replays every recorded battle, with no rebuild | Doubling one damage value doubled every battle's first hit (503 to 1,006); the slowest whole replay took 0.84 s against a 2 s target |
The valves run on headless replays of recorded battles, never on a live editor.
Try it: Pong plays live. What moves the ball is the converter's own graph of the Pong Blueprint, run statement by statement: each node glows in the city as it runs, Unreal 2D rings the nodes it came from, and the panel names the statement that just ran and the requirement it serves. The court around it (sizes, the speed, keys, the computer player) is authored, and the page lists every authored value. Run headless for 120 s, it made 52 paddle hits, each sent back, 19 wall turns and 17 goals, and all 13 converted statements ran. With the paddle's turn removed from a copy of the paste, the ball goes straight through (77 hits, 0 sent back).
The asteroid shooter plays too, the same way, on its converted Blueprints. 13 values are ours and listed on the page (sizes, speeds and the enemy waves, which live in the author's own macro that the converter does not inline yet). With the computer at the controls for 180 s: 3 games started, 2 ended on the last life, 93 of 99 enemy ships shot down, 61 shots swallowed by asteroids (the paste never breaks one), 11 lives lost, and 81 of 83 statements ran (the 2 that never run each have a reason on the page). With the enemy ship's own destroy taken out of a copy of the paste, 0 of 105 ships go down.
What the loop caught on a public Blueprint
The requirement graph holds 18 questions only the Blueprint's owner can answer; an AI reasoning from the converted code alone reached 9 of them. Every one of the 162 nodes is tied to a requirement and all 54 paths are accounted for (48 covered, 6 excluded with a reason).
Some of what it flagged, each tied to the requirement that found it:
- Two variables that never meet. The enemy writes DistanceToFrankVar; the search reads Distance to Frank Var.
- A lock that never lets go. When the locked target dies, the lock is not released.
- Hidden cost. Every enemy line-traces 100 times a second with debug drawing left on.
- An unanswered handover. Nothing in the pasted graphs tells the old target it is no longer the target.
- Calls a rename would break. Functions run by a timer are called by a name in a string, so a rename is not caught.
Status and open decisions
The prototype is built and machine-measured, and kept apart from the game it reads: it never writes the game's code or touches a live Unity or Unreal editor.
Built and measured: both converters, the five-way graph view, the 3D city (Three.js on WebGPU), two games playing on their converted Blueprints, replay and scrub, valves, the RAG layer (27.2 times fewer tokens than the converted code, 181 times fewer than the raw paste, all 10 test questions answered), the u2ue blueprint command, and two task rounds run by Claude (round 2: 32 of 32).
Looked at, not only measured. A city of nine classes once stood in a single row 631 units long and drew black beyond the fog, while the audit was green with 0 errors. Only looking at the screenshot caught it. Districts now wrap into rows. That is why every view here is both measured and looked at.
Not built or not verified:
- No person has used the view. Friction removed for people is unmeasured.
- Speaking a change (not just a command) and editing directly on the graph.
- The Unreal editor version of the view.
Open decisions: who tests the view and against what baseline; browser first or a panel inside the Unreal editor; what the Class Defaults and Viewport panels map to; whether big graphs open folded; and whether the view joins the u2ue toolkit as a product.
Where it lives
- The deck: I'm the Code Now, 39 slides built from this document's numbers.
- Blueprint City: play Pong and the asteroid shooter, fly Lock-On; replay any path, ask it questions, or press Unreal 2D to see a graph the way the Blueprint editor draws it.
- Fixing Blueprint Friction: the worked example, the online Blueprint traced node by node, each friction measured and the closed loop on it.
- The record: the use cases, requirements and gap checks behind it, as of early 28 October.
- The AI skills: the five playbooks the agents worked from.
- u2ue: Unity to Unreal: the porting toolkit this was built on, with its whole manual.
- Source code: open source under the MIT licence: the C# reader, the views and the 3D city, the Blueprint converter and the use case checkers.
The public samples. Pong (anonymous), the asteroid shooter (siljaZ) and the Lock-On System (hitted) are public pastes on blueprintue.com, and their authors keep the rights. This site never carries the pasted texts; the graphs shown are derived from them, each credited with a link to its original, and any of them comes down at its author's request.