{"slug": "the-cool-new-stuff-trap", "title": "The “cool new stuff” trap", "summary": "A developer built an AI agentic loop using Temporal to convert STL mesh files into editable CAD models, but found that the key to success was not the AI's cleverness but a rigorous validation system. The project treats every output as 'guilty until measured otherwise,' using BRep checks, deviation measurements, and an editability score to select the best candidate. The developer emphasizes that 'The validator beat the vibes,' showing that evidence and validation are more critical than AI planning.", "body_md": "I did not start this project to make a point about AI.\n\nI started it because I had a boring, recurring problem.\n\nI have STL files that I want to turn back into editable CAD. Not “technically importable” CAD. Not a STEP file that opens as ten thousand little triangle faces and makes every real CAD operation feel like dental work. I mean *editable* CAD: holes that are cylinders, walls that are planes, seams that behave like edges, and a model that I can actually modify without recreating the whole thing by hand.\n\nThis sounds like a solved problem. STL is everywhere. STEP is everywhere. Fusion, FreeCAD, SolidWorks, OpenCASCADE, and a small civilization of mesh tools already exist. And yet the usual workflow is still: import the STL, squint at a faceted mess, swear a little, and rebuild the important parts manually.\n\nSo naturally, I thought: this seems like a perfect place for an [AI agent](https://temporal.io/solutions/ai).\n\nBy an agentic loop, I mean a model running in a cycle: inspect the current state, choose an action, call a tool, examine the result, and repeat until it decides the job is done.\n\nIt also seemed like a genuinely good use case for Temporal. The loop could run for a long time, call failure-prone geometry tools, preserve its progress, [retry failed work](https://docs.temporal.io/encyclopedia/retry-policies), and leave an audit trail of what it tried. Temporal could make the agentic loop durable.\n\nThe trap was assuming that [Durable Execution](https://temporal.io/blog/what-is-durable-execution) would make the agent’s geometric judgment better.\n\nAI was useful throughout the project. It helped me explore APIs, sketch strategies, explain geometry failures, and scaffold experiments. But I wanted the agentic loop itself to be the clever part: look at a mesh, reason about what it should become, try things, learn from failures, and gradually get better at the tedious work I was doing by hand.\n\nWhat made the project better was much less glamorous: generate candidates, validate them, inspect the written STEP, and keep the one that passes. Everything else gets deleted or demoted.\n\nThe validator beat the vibes.\n\nThe input is a triangulated mesh, usually exported for 3D printing. The output should be a valid STEP solid that a human can edit.\n\n“Valid STEP” is not enough. A faceted conversion can be perfectly valid and still miserable. If a rectangular wall becomes hundreds of tiny triangles, the file opens, but the model is not meaningfully editable. If a circular hole becomes a ring of flat faces, you are not working with the design anymore. You are negotiating with the aftermath.\n\nThe converter grew a lot of domain machinery:\n\nplanar and coplanar simplification\n\nholes, cylinders, counterbores, cones, and tapers\n\nsegmentation and primitive fitting\n\nB-spline charts for freeform regions\n\nmesh healing, STEP validation, deviation checks, and editability scoring\n\nThat list sounds like the kind of thing an AI planner should orchestrate.\n\nEarly on, I let the agent inspect diagnostics, decide what to try, and build a plan. But cleverness was not the scarce resource. Evidence was.\n\nBefore the converter could get better, I had to decide what “better” meant. “Looks better” was not good enough. Neither was “fewer faces.” A candidate could merge broad regions, move boundaries, erase holes, and become simpler but less correct.\n\nSo the converter started treating every output as guilty until measured otherwise.\n\nEvery candidate had to write a STEP file. The converter then read it back, ran BRep checks, and measured face counts, analytic surfaces, fallback triangle-like faces, solids, shells, projection tolerance, and sampled Hausdorff deviation against the original mesh. Later, I added an editability score for face economy, analytic share, feature semantics, seam quality, and validity.\n\nOnce the system had a validator, the agent was no longer the right judge. The job became: produce a candidate and survive inspection.\n\nThe current architecture is almost aggressively boring:\n\n``` php\nevaluate_all_passes\n-> build_conversion_plan\n-> build_candidate_direct\n-> select_best_valid_candidate\n```\n\nThe README now says the quiet part out loud: there is no planning loop or orchestration layer in the hot conversion path.\n\nThat line is there because I learned it the hard way.\n\nBuilding with AI right now comes with a strange pressure. You know the old approach: heuristics, tests, hard-coded thresholds, fixture baselines, and a lot of “nope, that did not improve anything.” Then you look at the current tools and think: surely the clever new thing should produce a clever new approach.\n\nSometimes it does.\n\nBut sometimes it adds another layer of plausible output between you and the thing you can measure. An agent could explain why a region looked planar, suggest that some triangles should become a cylinder, and write code that produced a STEP file. None of it mattered until the file passed validation.\n\nDuring one phase, I measured several possible improvements. Three were killed without shipping code because the numbers said they would not improve accepted output.\n\nOne proposed segmentation improvement had a theoretical ceiling of a 3.86% drop in freeform share on the file I was trying to tweak, and most of the fallback was two smooth, doubly curved shells thousands of times outside the fit band. Killed.\n\nOne extrusion idea ran into the fact that the gear teeth were not simple extrusions. They were herringbone-helical. Different surface class. Maybe future work, but not the thing we were pretending it was. Killed.\n\nOne blend recovery path measured exactly zero useful blend-like share on the audited fixtures. Killed.\n\nThat felt weirdly good.\n\nNo “maybe with more agentic reasoning.” No preserving old architecture because it had once seemed promising. This does not improve the accepted STEP output, so it does not get to stay.\n\nBy then, the project was starting to feel less like AI autonomy and more like lab work.\n\nI ran into the same thing when I tried to use Fusion more directly.\n\nFusion has real tools and APIs for this. The manual workflow I use runs **Generate Face Groups**, then **Convert Mesh** with the method set to **Prismatic**. Prismatic uses those groups to infer features and merge triangles into CAD-like surfaces. When it works, the result is dramatically cleaner than a one-face-per-triangle conversion.\n\nThat sounds exactly like the thing I wanted.\n\nI added Fusion as an optional candidate backend, not a replacement or an oracle. Just another candidate.", "url": "https://wpnews.pro/news/the-cool-new-stuff-trap", "canonical_source": "https://dev.to/temporalio/the-cool-new-stuff-trap-37i", "published_at": "2026-08-25 14:00:00+00:00", "updated_at": "2026-08-25 14:15:10.735272+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "developer-tools"], "entities": ["Temporal", "STL", "CAD", "STEP", "Fusion", "FreeCAD", "SolidWorks", "OpenCASCADE"], "alternates": {"html": "https://wpnews.pro/news/the-cool-new-stuff-trap", "markdown": "https://wpnews.pro/news/the-cool-new-stuff-trap.md", "text": "https://wpnews.pro/news/the-cool-new-stuff-trap.txt", "jsonld": "https://wpnews.pro/news/the-cool-new-stuff-trap.jsonld"}}