<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nikhil Vankayalapati on Medium]]></title>
        <description><![CDATA[Stories by Nikhil Vankayalapati on Medium]]></description>
        <link>https://medium.com/@nikhilvank?source=rss-032fcc5f9a9a------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Nikhil Vankayalapati on Medium</title>
            <link>https://medium.com/@nikhilvank?source=rss-032fcc5f9a9a------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 01:01:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@nikhilvank/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[AI Agents for D365 F&O X++ Development: From a Vague Ticket to Tested Code]]></title>
            <link>https://medium.com/@nikhilvank/d365fo-agents-a6e3302de47a?source=rss-032fcc5f9a9a------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6e3302de47a</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[dynamics-365]]></category>
            <category><![CDATA[github-copilot]]></category>
            <category><![CDATA[claude-desktop]]></category>
            <category><![CDATA[d365-fo]]></category>
            <dc:creator><![CDATA[Nikhil Vankayalapati]]></dc:creator>
            <pubDate>Tue, 17 Nov 2026 02:33:38 GMT</pubDate>
            <atom:updated>2026-11-17T02:33:38.444Z</atom:updated>
            <content:encoded><![CDATA[<p><em>An open-source team of AI agents for Dynamics 365 Finance &amp; Operations that works the way a real project team does: analysis, signed-off designs, X++ that builds, review and QA.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Bt4YAKSoNYDYhuEvqgmpwQ.png" /><figcaption>The d365fo agents: one architect, seven specialists, grounded in your metadata through d365fo-mcp-server</figcaption></figure><h3>The problem</h3><p>Ask a general AI assistant to write X++ for Dynamics 365 Finance &amp; Operations and you usually get code that looks right and isn’t. It invents a field that doesn’t exist on CustTable. It hardcodes a value that should be a parameter. It suggests an overlayer, which hasn&#39;t been possible for years. And it starts coding before anyone has agreed what the change should do.</p><p>The code isn’t the hard part of D365 F&amp;O development. Knowing the standard process, finding the right extension point, checking security and licensing, and getting the business to agree on the design is. A good developer does all of that before writing a line.</p><p>So, I built a team of AI agents that does the same. They’re free and open source: <a href="https://github.com/vankayalapatin/d365fo-agents">github.com/vankayalapatin/d365fo-agents</a>.</p><h3>The foundation: d365fo-mcp-server</h3><p>The agents run on top of <a href="https://github.com/dynamics365ninja/d365fo-mcp-server">d365fo-mcp-server</a>, an open-source MCP (Model Context Protocol) server by Filip Maňas. It runs on your D365 development machine, indexes your real metadata (standard and custom tables, classes, forms, EDTs, labels, security objects) and gives an AI model tools to search it, generate objects, validate code, build and run the BP check.</p><p>That changes everything for an AI assistant. Before it claims a field exists, it can look. Before it writes a Chain of Command extension, it can read the method’s real signature. And after writing, it runs the real compiler instead of guessing.</p><h3>The agents</h3><p><a href="https://github.com/vankayalapatin/d365fo-agents">d365fo-agents</a> adds eight agents on top of that server, each with one job:</p><ul><li><strong>Architect</strong>: runs the team, writes the FDD and TDD, and asks you for sign-off.</li><li><strong>Finance functional</strong>: fit-gap and impact on GL, AP/AR, tax, dimensions and period close.</li><li><strong>Supply chain functional</strong>: procurement, sales, inventory, warehouse, production and costing.</li><li><strong>Security</strong>: current role coverage, the smallest role/duty/privilege change, licence impact and segregation of duties.</li><li><strong>Reporting</strong>: SSRS reports and Print management documents.</li><li><strong>Developer</strong>: writes the X++ from the signed-off TDD, builds it and runs the BP check.</li><li><strong>Reviewer</strong>: checks the build against the TDD and ten engineering standards.</li><li><strong>QA</strong>: checks every acceptance criterion and writes a UAT script.</li></ul><p>You only talk to the architect. It decides which specialists a ticket needs, starts them, and stops only when it needs you.</p><p>The flow is the one you’d follow on a real project:</p><p>ticket → assessments → FDD (you sign off) → TDD (you sign off) → build → review → QA → UAT script</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K7ZWjaoHCPG8YxHI1utrTQ.png" /><figcaption>What happens to a ticket: two sign-offs before any code is written.</figcaption></figure><p>Small changes take a shorter path. “Add a field to customers” doesn’t need a finance assessment, so the architect writes a one-screen design and asks for a single “go”.</p><p>Every step writes a file under d365fo-work/&lt;ticket&gt;/ in your repo: the ticket, each assessment, the FDD, the TDD, the build log, the review and the QA result. Requirements, acceptance criteria and objects carry IDs, so you can trace a line of the UAT script back to the sentence in the ticket it tests.</p><h3>How an agent is defined</h3><p>Each agent is a short Markdown file: a header that says what it may do, and plain-language instructions below it. This is the reviewer’s header:</p><pre>name: d365fo-reviewer<br>role: specialist<br>tools: [read, edit,<br>  d365fo/get_workspace_info, d365fo/search,<br>  d365fo/get_object_info, d365fo/find_references,<br>  d365fo/extension_info, d365fo/security_info,<br>  d365fo/validate_code, d365fo/validate_object_naming,<br>  d365fo/labels, d365fo/get_knowledge,<br>  d365fo/run_bp_check, d365fo/verify_d365fo_project]<br>skills: [d365fo-grounding, d365fo-work-files,<br>  d365fo-engineering-standards, d365fo-security-design]</pre><p>The tool list is the agent’s permission list. The reviewer can read your metadata and run the BP check, but it has no tool to write X++. Only the developer does. The skills are shared rule files, so a standard is written once and every agent that needs it loads the same text.</p><p>Each agent is written once, and a small build script turns it into the formats the Claude desktop app and GitHub Copilot expect. The build fails on an unknown tool name, a missing skill or a hardcoded path.</p><h3>The rules they enforce</h3><p>Every design and every review is checked against ten engineering standards, written down as rules the agents load:</p><ul><li>Configuration over hardcoding: values that might change go in a parameter.</li><li>Reversible: new blocking or data-changing behavior can be switched off without a deployment.</li><li>Extensions only: Chain of Command, event handlers, table and form extensions; never an overlayer.</li><li>Labels for every text the user sees, and EDTs for every field.</li><li>SysOperation for batch work.</li><li>Set-based, transaction-safe data access.</li><li>Security for every entry point, with the licence impact stated.</li><li>BP clean, with tests as agreed.</li><li>Grounded: every object, field and method is checked against your metadata first.</li></ul><h3>Gates you can’t skip</h3><p>The part I care about most: nothing gets built until a person has approved the design.</p><p>Asking an AI model to “wait for approval” isn’t enough. Models are eager to help, and a model can talk itself into treating “looks good” as a sign-off. So the gates are enforced outside the model, with small PowerShell hooks:</p><ul><li>When the architect asks “Go on 20261114-b1 TDD v1?” and you answer “go”, a hook records the approval, bound to that exact question and to the content of that version of the TDD.</li><li>Before any write to your metadata or any build, another hook checks for a valid approval. No approval, no write.</li><li>The developer can only write objects the signed-off TDD lists. If the design changes after sign-off, the approval no longer matches, and you’re asked again.</li></ul><p>This is the end of a real design summary for a small field ticket (names shortened):</p><pre>What gets built:<br>- New field type: text, 20 characters.<br>  No standard customer field fits.<br>- Customer table: added to the model&#39;s existing<br>  CustTable extension.<br>- Customer form: a column on All customers, and<br>  the General tab on the details page.<br>- Labels: two new ones (caption and help text).<br>- Security: no change. The field only appears on<br>  the existing customer form.<br><br>Differs from the ticket:<br>- I also put the field on the customer details<br>  page. Say so if you only want the list column.<br><br>Go on 20261116-plugincheck TDD v1?<br><br>&gt; go<br><br>I&#39;ve recorded your sign-off of TDD v1.<br>Your approval also covers the build plan.</pre><h3>An example</h3><p>One of the test tickets was deliberately short:</p><blockquote>“A purchase order for a vendor on hold for All must not be saved — show a clear error.”</blockquote><p>A naive assistant would add a check to validateWrite and be done. The architect first looked at what the standard code already does, and found that D365 F&amp;O already refuses to save the order. It only shows a warning. So the real gap was smaller than the ticket suggested: a clear error message, in the right place.</p><p>The design it brought for sign-off:</p><ul><li>a Chain of Command extension on PurchTable.checkAccount, calling next first and leaving the standard result unchanged, adding an error only for vendors on hold for <em>All</em>;</li><li>one new label for the message;</li><li>four SysTests, because I’d answered yes to automated tests;</li><li>and the alternatives it rejected, with the reason for each.</li></ul><p>After my “go”, the developer wrote the extension, the label and the tests through the MCP server, and built them with the BP check. This is the method it wrote (model prefix replaced, comments shortened):</p><pre>[ExtensionOf(tableStr(PurchTable))]<br>final class PurchTableMy_Extension<br>{<br>    /// &lt;summary&gt;<br>    /// Adds an error when the standard account check<br>    /// fails because the vendor is on hold for all.<br>    /// &lt;/summary&gt;<br>    public boolean checkAccount()<br>    {<br>        boolean ret = next checkAccount();<br><br>        if (!ret<br>            &amp;&amp; VendTable::blocked(this.OrderAccount)<br>                == CustVendorBlocked::All<br>            &amp;&amp; !VendTable::isVendReleaseDateExpired(<br>                this.OrderAccount))<br>        {<br>            error(strFmt(<br>                &quot;@MyModel:VendOnHoldAllPurchOrderError&quot;,<br>                this.OrderAccount));<br>        }<br><br>        return ret;<br>    }<br>}</pre><p>It calls the standard code first and never changes its result. It only adds a clear message when the standard check has already failed for the reason in the ticket, and it respects the vendor’s release date. In Visual Studio all four tests passed on the first run.</p><h3>How it was tested</h3><p>Prompts break in quiet ways: a fix for one ticket can spoil another. So the agents are tested against a fixed set of 23 sample tickets, re-run after every change. They cover new fields, lookups, parameters, list page filters, display methods, OData services with their own security, batch jobs, standard configuration that needs no code, and changes made in the middle of a build.</p><p>Each run is scored on eight checks: did the architect pick a sensible path, is the mechanism right, is every object needed and nothing more, was the ticket’s trap handled, does it build with no new BP warnings, does it work in the environment, were the questions worth asking, and are the manual steps exact. Four of the tickets form a smoke set that must pass before any release. The hooks have their own self-test of 95 break-it cases.</p><p>The test set and the scoring are in the repo (<a href="https://github.com/vankayalapatin/d365fo-agents/blob/main/eval/README.md">eval/README.md</a>), with a script that counts the tokens each ticket used.</p><h3>Install</h3><p>You need a D365 F&amp;O development environment with Visual Studio, and d365fo-mcp-server set up from its Quick Start. Then, in the Claude desktop app:</p><ol><li>Customize → Plugins → + Add, enter vankayalapatin/d365fo-agents, and install d365fo-agents.</li><li>Open a Code session on your D365 repo folder.</li><li>Type /d365fo-agents:d365fo-architect followed by your ticket.</li></ol><p>The agents read your model, prefix and environment type at runtime, so nothing needs editing. The README covers the GitHub Copilot app and a script install.</p><h3>Limits</h3><ul><li>Tested on UDE in the Claude desktop app. LCS Tier-1 cloud-hosted VMs and the GitHub Copilot app are supported by design but not yet verified.</li><li>Visual Studio is still part of the loop. On UDE, the database sync, the deploy and the test run happen in Visual Studio, once per ticket.</li><li>The agents are as good as the metadata index. If a standard object isn’t indexed, the agent says it couldn’t find it instead of guessing, but you have to fill the gap.</li><li>It costs tokens. A full ticket with assessments uses far more than a chat answer. Small changes take the shorter path for that reason.</li><li>The hooks stop mistakes, not a determined user. They check commands as text, not with an operating-system sandbox.</li></ul><h3>Try it</h3><p>The agents are free and open source under the MIT licence: <a href="https://github.com/vankayalapatin/d365fo-agents">github.com/vankayalapatin/d365fo-agents</a>.</p><p>If you try it on your own tickets, I’d like to hear what it got right and where it went wrong. Open an issue on the repo.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6e3302de47a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>