Welcome, Guest | Browse

Software Factory Archive

← Previous Work All Works Next Work →

Subgraph

Rating:
General Audiences
Fandom:
StrongDM Software Factory
Characters:
Navan Chauhan Jay Taylor Justin McCarthy
Tags:
Attractor Subgraph Reusable Components Code Review
Words:
451
Published:
2025-09-28

Navan noticed he was writing the same three nodes over and over. Every pipeline he built had the same pattern at the end: an assessment node that scored the generated code, a conditional edge that looped back to codergen if the score was below threshold, and a deployment node that activated when the score was above threshold. Three nodes, three edges, identical in every pipeline.

"I'm repeating myself," he told Jay. "Which means I'm going to start making mistakes."

"Then don't repeat yourself."

"I can't exactly define a function in a DOT file."

Jay looked at him. "Can't you?"

Graphviz had supported subgraphs since its inception. A subgraph block inside a DOT file defined a cluster of nodes and edges that could be treated as a unit. Navan had known this academically. He had not considered using it as an abstraction mechanism for Attractor pipelines.

He created a file called review-subgraph.dot. Inside it, he defined the three-node review pattern: assess, with a conditional loop-back edge and an advance edge. The subgraph had defined entry and exit nodes—edges in from the parent graph landed on assess, and the deploy node connected outward.

Then he referenced the subgraph in his next pipeline. Where he would have written three nodes and three edges, he wrote one line: an include directive pointing to the subgraph file. The Attractor runner would expand it at execution time, inlining the subgraph's nodes into the parent pipeline.

He ran it. It worked on the first try, which was unusual enough that Navan checked the logs twice to make sure.

"It worked," he told Jay, sounding almost suspicious.

"Of course it worked. A subgraph is just a graph inside a graph. The runner doesn't care about boundaries. It cares about nodes and edges."

Navan shared the review subgraph with the team. Within a week, every pipeline in the factory was using it. The review pattern was no longer duplicated—it was referenced. If someone improved the assessment logic, they improved it once, in the subgraph file, and every pipeline that referenced it got the improvement for free.

"This is a library," Navan said, with the tone of someone catching a familiar shape in an unfamiliar landscape. "A library of graph components. Reusable, composable, versionable."

"The Graphviz format supported this in 1991," Justin reminded them. "We didn't invent reuse. We inherited it from a thirty-four-year-old specification."

"But did anyone use Graphviz subgraphs as reusable AI workflow components in 1991?" Navan asked.

Justin smiled. "No. But the format didn't know that. It was ready. It was waiting."

Navan opened his notebook. He drew a small rectangle labeled "review" and, for the first time, drew a dotted border around it. Inside the border, he wrote: reusable.

Kudos: 79

agate_runner 2025-09-30

"The format didn't know that. It was ready. It was waiting." This is how I feel about half the old tools in computing. They were designed for problems that hadn't been invented yet.

nlspec_believer 2025-10-01

The dotted border in Navan's notebook. The visual language of "this is a reusable unit" emerging in his analog documentation. The kid thinks in components even when he's drawing with a pen.

← Previous Work All Works Next Work →