Case Study generate_fo_artifacts

51% Faster. Zero Build Failures. First Try.

A controlled comparison of generate_fo_artifacts across three production runs of the same D365 F&O requirement. All three succeeded — the difference is what it cost to get there.

The Setup

One Requirement, Three Runs

A Journey Plan module — header-lines form, 5 tables, 4 EDTs, 2 enums, 1 form, security objects, and menu items — scored by an automated test suite of 25 test cases.

Held Constant

  • Same D365 F&O development environment
  • Same requirement specification
  • Same AI development agent
  • Same 25-case automated test suite
  • Same hardware (dedicated dev machine)

The Variable

  • Run A & B: Agent writes every XML file by hand
  • Run C: Agent calls generate_fo_artifacts — 26 files deployed in under 2 seconds

The generator handles structural XML. The agent handles business logic, test fixes, and deployment.

The Results

Headline Metrics

All three runs succeeded. Run B needed 2 attempts and nearly 10 hours. Run C finished in one attempt, in half the time.

Metric Run A (no generator) Run B (no generator, combined) Run C (with generator)
Outcome SUCCESS SUCCESS (2 attempts) SUCCESS
Wall time (total) 6h 41m 9h 37m 4h 0m
Attempts needed 1 2 1
Total builds 10 15 7
Build failures 10 8 0
Structural error retries 8 6 0
First test pass rate 57% 0% 68%
Final pass rate 82% Completed on retry 92%

Build Error Elimination

The Biggest Win: Zero Build Failures

D365 form structure validation (FormPatternValidation) enforces a strict control hierarchy. AI agents struggle to learn these hierarchies through trial and error — the generator can’t produce them wrong.

Run A
10
Run B
8
Run C
0
“The agent spent 5 consecutive retry cycles on the same form structure validation error because it couldn’t learn the required control hierarchy for the header-lines form pattern. The generator emits this hierarchy correctly by construction.”

Error Category Attribution

Error Category Run A Run B Run C Generator Prevents?
Form structure validation (XML hierarchy) 8 retries 0* 0 Yes
Control type names (e.g. AxFormIntControl) 1 retry 1 retry 0 Yes
Missing module references 1 retry 0 0 Yes
Menu item / form deployment 0 Persistent 0 Yes
Functional logic (DataSource binding) 0 0 5 retries No

*Run B never reached form structure validation — the form was too structurally broken at a higher level.

Wall Time Breakdown

Where the Time Goes

Build-error retry cycles (red) are the segment the generator eliminates. That time converts directly into functional testing.

Run A
37m
2h 36m
41m
14m
Run B
39m
39m
1h 42m
39m
4h 46m
+1h 11m
Run C
24m
57m
2h 31m
Init Coding / Generation Build-error retries Testing Functional fix cycles Diagnostic retry (2nd attempt)
Run C has zero red. The 2h 31m of fix cycles (amber) were all spent on a single functional bug — a DataSource binding on the lines grid. That’s a logic error, not a structural one. The generator doesn’t make logic decisions, so this class of bug is expected.

First-Test Quality

What Happens on the First Test Run

First-test pass rate is the most telling metric. It measures how much of the requirement works before any fix cycles — the generator’s structural correctness lets the agent reach functional testing immediately.

Run A
57%
57%
Run B
0%
Run C
68%
68%

Run B scored 0% on first test — not because the business logic was wrong, but because the form was never structurally deployed. The menu item didn’t exist, the form had a broken grid with display:none, and header fields weren’t rendering. All 24 remaining tests were blocked.

Run C scored 68% immediately. The 4 failures were all the same root cause: a DataSource binding bug on the lines grid — a logic error, not structural. The generator had produced a working deployment from the start.

Fix Loop Efficiency

Productive vs. Wasted Retry Cycles

A “productive” retry fixes a real functional bug. A “wasted” retry fights XML structure — element names, control hierarchies, missing references.

11%

Run A

1 of 9 retries fixed a real bug

33%

Run B

3 of 9 retries fixed real bugs

100%

Run C

5 of 5 retries fixed real bugs

Every retry cycle in the generator run addressed a real functional bug. Without the generator, 67–89% of retries were spent on XML structure — errors the generator eliminates by construction.

The Retry Case

Run B: 2 Attempts, Nearly 10 Hours

The strongest argument for the generator isn’t speed — it’s preventing costly retries.

Run B’s first attempt ran for 8 hours and 26 minutes without reaching a working form. The menu item that launches the form didn’t exist. The lines grid had display:none applied. Header fields weren’t rendering. These are all structural deployment issues — the form compiled, but was broken at a level the compiler doesn’t catch.

A diagnostic retry analyzed what went wrong. The second attempt completed in 1 hour and 11 minutes — bringing the total to 9 hours and 37 minutes across 2 attempts.

On first test, none of the tests passed. The entire form was inaccessible. The agent then spent 5+ hours fighting structural issues it couldn’t diagnose from build logs alone — the builds compiled, but the form was broken at a level the compiler doesn’t catch.

Without the generator, one run needed 2 attempts and nearly 10 hours to achieve what the generator run completed in 4 hours on the first attempt. The generator emits correct form structure, menu item bindings, and grid configuration by construction — eliminating the class of errors that forced the retry.

Limitations

What the Generator Does NOT Solve

Credibility requires honesty. The generator handles structure. The agent handles logic.

Generator Handles

  • XML schema compliance
  • Form control hierarchies
  • Menu item bindings
  • Security object structure
  • Cross-reference resolution
  • Data entity staging tables
  • Naming conventions

Agent Still Handles

  • DataSource binding logic
  • Business validation rules
  • Status transitions
  • Number sequences
  • X++ event handlers
  • Custom display methods
  • Integration logic

Run C’s only bug — a DataSource binding on the lines grid — took 5 retry cycles to resolve. This is a logic error: the generator produces the grid control, but the agent decides which data source to bind it to. That class of error is expected and appropriate for an AI agent to handle.

Summary

Computed Deltas

Manual average (Run A + B) vs. generator run (Run C).

Metric Manual Average With Generator Delta
Wall time to success 8h 9m 4h 0m −51%
Attempts needed 1.5 avg 1 −33%
Build failures 9.0 0 −100%
Total retry cycles 9.0 5 −44%
Structural error retries 7.0 0 −100%
First-test pass rate 28.5% 68% +39pp
Retry cycle efficiency 22% productive 100% productive +78pp

Get Started

Try It Yourself

5 free calls, no subscription required. Works with any MCP-compatible AI client.