12 April 2026

Review AI or Code for 2 Days? Blueprint Coding Applied to Sage X3

We took a 4GL script for calculating public holidays and asked our AI to extend it internationally. Code generated in 20 minutes. One-shot. Zero rework. Here’s how, why it works, and most importantly why it wouldn’t work without a framework.

By Adrien & Laurent — IntellX · April 2026


The New Paradigm: Reviewing is Faster Than Writing

Reviewing code is infinitely faster than writing it. Any developer knows this instinctively. But this truth only holds under one condition: the code being reviewed must be excellent.

That’s the entire difference between using AI as a rough draft generator that needs rewriting (in which case you might as well code it yourself) and using AI as a high-level technical writer that produces code you could have written yourself.

Here’s what that looks like in practice.


The Concrete Case: A Public Holidays Script Extended Internationally

We took a 4GL script for managing public holidays. A brilliant algorithmic foundation, written by Gilbert, 100% native, zero API dependencies. The code handles Easter calculation (Meeus/Oudin algorithm), fixed holidays, and derived movable holidays. Clean, battle-tested 4GL code.

We asked ChatX3 to refactor it and extend it to all countries.

Generation One-shot
Rework needed Zero
Total time ~20 minutes
Code review Validated by Laurent, IntellX co-founder

Without AI: a developer takes about two days to write, indent, and debug hundreds of lines by hand. With ChatX3: 20 minutes, code review included.

Why an Algorithmic Approach Rather Than an API?

We’ve been asked the question: why not simply call a public holidays API (Nager.Date, Calendarific, Google Calendar) rather than coding an algorithm?

The answer is one word: pragmatism.

Yes, an API covers more cases (exceptional events like the coronation of Charles III, legislative changes, provincial rollover days). You go from 80-90% coverage to 99%. But in an ERP context, someone reviews the calendar anyway. Why? Because you need to add company-specific factory closures, remove holidays the company decides to work, and validate that everything is in order.

The real cost/benefit calculation is simple. Integrating an external API means 2-3 days of development (HTTP calls, JSON parsing, error handling, Sage X3 country code mapping, fallback, monitoring), plus ongoing maintenance if the provider changes their format or shuts down. The gain? The person doing the annual review saves about 5 minutes per country on the 3-4 dates the algorithm doesn’t cover.

The ROI is negative. The algorithm with human review is the right answer.

The Concrete, Quantified Gain

Our algorithm automatically pre-fills the 20+ public holidays for each country in seconds. The manager receives a notification, checks at a glance, and only intervenes for company-specific adjustments.

Countries managed Manual time/year Time with algo + review Gain
1 1h10 25 min 45 min
5 5h50 2h05 3h45
10 11h40 4h10 7h30
20 23h20 8h20 15h

And the real gain isn’t just time: it’s the risk of data entry errors that virtually disappears. A mistyped date in an ERP calendar can throw off production schedules, delivery time calculations, and payroll. The cost of a single undetected error far exceeds the hours saved.


Why It Works: Blueprint Coding

This result isn’t a fluke. It’s the product of a methodology.

Today, the trend is Vibe Coding: you give the AI a vague instruction, it generates code, you test visually, you iterate. Andrej Karpathy (OpenAI co-founder) popularized the term in early 2025, describing how he accepts all generated code without reading the diffs. The concept took off so much that it entered the Merriam-Webster dictionary.

While this method works wonders for web prototypes, it breaks against the reality of an ERP. And it’s not a matter of excessive caution—it’s a matter of a fundamentally different context.

There is no right to error. On the web, a bug is a display glitch. In an ERP, it’s an incorrect invoice, falsified inventory, a compliance risk. A documented case by Jellyfish: an AI-generated date validation function accepted February 30th. The error was only detected when financial reports diverged.

There is no “refresh the page.” Vibe Coding relies on a visual cycle: generate, look, correct. In 4GL, a process can appear to work and produce aberrant data that won’t be detected until weeks later, during an accounting close.

AI doesn’t know 4GL. Market models are trained on JavaScript, Python, TypeScript. SAP had to train its own model exclusively on ABAP to go from 50% to 84% success. Nobody has done this work for 4GL (We tried, and it would require resources comparable to SAP’s, which we don’t have).

The paradox of wasted time. Using generic AI on an ERP produces code that the developer spends more time fixing than writing themselves. The Faros AI report (10,000+ developers) confirms it: teams heavily equipped with AI see their PR sizes increase by 154% and review time by 91%. The apparent gain disappears in corrections.

That’s why we adopted a different approach.


Blueprint Coding: Specify First, Generate Second

The principle is simple: AI is never more reliable than when it’s constrained. The more you frame it, the better the result.

The industry is converging on this conclusion. Red Hat formalizes Spec-Driven Development and reports 95% success on first implementation when specs are clear. AWS launches Kiro, the first IDE with native SDD workflow. The AGENTS.md standard, backed by OpenAI, Anthropic, Google, and AWS, has been adopted by 60,000+ GitHub repositories.

At IntellX, we call it Blueprint Coding, and it’s what ChatX3 implements natively in four steps.

1. Scoping. Before writing a single line of code, ChatX3 questions the developer. It validates the need, the business context, and resolves ambiguities. Where a Vibe Coding tool immediately starts generating, ChatX3 takes the time to understand.

2. Specifications (Blueprint). The system writes the exact specifications of what will be built. The AI is constrained by this plan: data structures involved, controls to implement, edge cases to handle.

3. Tests before code. Success criteria are defined before implementation begins.

4. Constrained generation. Consumer AIs limit their reasoning to save “tokens” (the computational units that represent cost). ChatX3 uses all the power needed to iterate internally, verify consistency with 4GL standards, and produce clean code. It’s intentionally slower. And that’s precisely what makes the difference between code that impresses in a demo and code that runs in production.

The Golden Rule

The developer must understand, audit, and be able to explain every generated line. The tool must produce code that the developer could have written themselves. The point of AI is not to delegate thinking—which must remain human—but to achieve massive time savings on technical writing while maintaining absolute control.

59% of developers admit to using AI code they don’t fully understand (Clutch, June 2025). In an ERP, that’s unthinkable. ChatX3 takes the opposite approach: the system guides, questions, and enforces rigor so the developer remains in control of what is produced.


Three Levels of Use, From Safest to Most Ambitious

✅ Level 1 — Code Review & Recommendations. ChatX3 audits your existing 4GL code, identifies weaknesses, suggests optimizations. It doesn’t touch anything. Zero risk, 100% value. The developer decides what to apply. The ideal entry point, even for the most skeptical.

✅ Level 2 — Assisted Development. Script generation for atomic tasks: field actions, input validations, utility functions. ChatX3 automates tedious tasks, repetitive patterns, documentation. Restricted scope, maximum reliability. The developer stays in the driver’s seat.

✅ Level 3 — Complete and Structured Generation. Assembling complex building blocks, guided by a Blueprint. Step-by-step execution, validation at each milestone. That’s what we demonstrated with the public holidays script. AI is powerful because it’s constrained.


4GL in the Sage X3 Ecosystem

SAP launched Joule for Developers with a specialized ABAP LLM. Microsoft integrates Copilot into Dynamics 365. Oracle offers Code Assist for Java and PL/SQL.

Sage X3 integrated Sage Copilot in the 2025 R2 release: Sales Intelligence Agent, Copilot Chat, AP Automation, Supply Chain Intelligence, plus an AI Gateway with MCP server for partners.

But these advances concern the functional use of X3. Sage Copilot helps the end user navigate their ERP. It doesn’t help the developer write quality 4GL code. That’s exactly where ChatX3 is positioned.


What You Might Object

“A single concrete case is anecdotal.”

Fair point. A public holidays script is relatively deterministic logic: dates, rules per country. It’s not a purchase order validation workflow with multi-tier discount conditions and accounting interfaces. We’ll publish more cases. But the result on this bounded case is already significant, and the Blueprint Coding approach is the right foundation regardless of complexity.

“Tools like Cursor also allow framing AI.”

True. Cursor supports .cursorrules, Copilot has its project instructions, Claude Code uses CLAUDE.md. The difference: this framing remains the developer’s responsibility. They must write the instructions and hope the model follows them. ChatX3 integrates these constraints natively. But we acknowledge the gap is narrowing. Our advantage is 4GL specialization, not the framing concept itself.

“LLMs evolve so fast that your specialization will be obsolete.”

That’s a real risk. If a foundation model learns 4GL tomorrow, part of our advantage disappears. But this scenario assumes Sage X3 becomes a training priority for OpenAI or Google—unlikely given the installed base size. And language knowledge is only part of the problem. Knowledge of ERP business rules, X3 conventions, standard data structures—that’s where lasting value lies. An LLM that speaks 4GL without understanding X3 functionality is still a Vibe Coding tool.

“You’re both judge and jury.”

That’s why we exclusively cite third-party sources (GitHub, Veracode, METR, Faros AI, Red Hat, Stack Overflow) and publish the source code, session video, and raw results. We invite the community to reproduce our tests and tell us what they would have done differently.


The Augmented Developer

The good 4GL developer in this system is no longer someone who types code. They’re an architect who uses AI, educates it on their needs, reframes it through specifications, and extracts code they master 100%.

The real question isn’t about replacing the developer. It’s about giving them a tool that makes them better—faster on mechanical tasks, freer for thinking, more confident in what they produce.

Yes, AI in Sage X3 is possible and remarkably effective. But it demands methodology. Don’t let AI guess your business: frame it.


📄 The original source code (thanks Gilbert)
🤖 The code generated by ChatX3
🎥 The full coding session video

What would you have done differently? Tell us in the comments.

→ Discover ChatX3 at chatx3.com

#SageX3 #4GL #AI #ChatX3 #IntellX #BlueprintCoding

← All articles