Build a plugin with AI
OADM is developed together with an AI assistant, and the repository is set up for it. You describe what the plugin should do; the assistant asks, writes the spec, then builds the plugin with tests.
You work either in a plugin folder made from the NuGet templates (your own plugin) or in a checkout of OADM (a plugin that ships with OADM).
What the assistant needs
Section titled “What the assistant needs”- A plugin folder that builds:
dotnet new oadm-task, see Develop with the .NET SDK. AGENTS.mdin that folder: the rules of OADM that apply to your plugin (device safety, UI texts, the shared controls, scale, tests), the commands and links to the guides. Assistants that readAGENTS.mdfind it by themselves; the folder’sCLAUDE.mdpoints Claude Code to it. Tell any other assistant to read it first.- The guides it links to: Develop with the .NET SDK, the tutorial of your kind of plugin, UI kit, Testing and the SDK reference.
CLAUDE.mdanddocs/spec/: the spec and the rules for code, UI, wording, device safety and tests. Claude Code readsCLAUDE.mdby itself; give it to other assistants first.plugins/README.md: how a plugin is built inside the repository, with a table that leads to the pages of this guide (website/src/content/docs/dev/in the checkout).- A working checkout that builds: see Build from source.
How to start
Section titled “How to start”-
Create the plugin folder and open it in your assistant, for example Claude Code:
Terminal window dotnet new install Oadm.Plugin.Templatesdotnet new oadm-task -n HostName # or oadm-page, oadm-actioncd HostNamedotnet tool restoredotnet build -
Describe the plugin like a user story, name the guides and ask the assistant to ask first:
Read AGENTS.md and the guides it links to. I want "Set host name" in the Networkgroup, with a dialog for one or many devices. Ask me what is unclear, then build itwith tests. -
Answer its questions. Ask it to keep the decisions in a file of the folder, so the next session knows them too.
-
Let it build in small steps. After each step:
dotnet test. -
Try the plugin:
dotnet oadm dev startruns an OADM server with it,dotnet oadm dev client(in a second terminal) the client. Every build puts the plugin into.oadm/plugins/<plugin id>/, where the development server loads it.
-
Clone the repository and open it in your assistant, for example Claude Code.
-
Describe the plugin like a user story and ask the assistant to ask first:
Read CLAUDE.md, plugins/README.md and the guide pages it names. I want a task plugin"Set host name" in the Network group, with a dialog for one or many devices. Ask mewhat is unclear, write the spec, then build it with tests and headless screenshots. -
Answer its questions. Decisions go into the spec, so the next session knows them too.
-
Let it build in small steps. After each step:
manage test unit, then look at the screenshots it rendered. -
Try the plugin with
manage run dev. The build puts it intoartifacts/plugins/, where OADM loads it.
How the assistant works
Section titled “How the assistant works”- Copies what works. It starts from the closest built-in plugin or tutorial and uses the shared controls and styles, so the plugin looks and behaves like the rest of OADM.
- Tests everything. Every non-trivial class gets tests with fake devices; nothing needs a network.
- Checks the UI headless. In a checkout it renders the dialogs and pages offscreen as screenshots. It never clicks on your desktop.
- Keeps devices safe. A plugin that changes a device checks the device first, validates every input before the first write and never locks OADM out.
Real devices
Section titled “Real devices”Share your plugin
Section titled “Share your plugin”- Your own plugin:
dotnet oadm packwrites<plugin id>-<version>.oadmplugin, the file you give to your users. See Ship it. - A plugin for OADM itself: open a pull request on GitHub. Every contributed plugin is reviewed for quality and security before it becomes part of a release. Keep the change focused: one plugin, its tests and its spec.