Skip to content

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).

  • A plugin folder that builds: dotnet new oadm-task, see Develop with the .NET SDK.
  • AGENTS.md in 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 read AGENTS.md find it by themselves; the folder’s CLAUDE.md points 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.
  1. Create the plugin folder and open it in your assistant, for example Claude Code:

    Terminal window
    dotnet new install Oadm.Plugin.Templates
    dotnet new oadm-task -n HostName # or oadm-page, oadm-action
    cd HostName
    dotnet tool restore
    dotnet build
  2. 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 Network
    group, with a dialog for one or many devices. Ask me what is unclear, then build it
    with tests.
  3. Answer its questions. Ask it to keep the decisions in a file of the folder, so the next session knows them too.

  4. Let it build in small steps. After each step: dotnet test.

  5. Try the plugin: dotnet oadm dev start runs 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.

  • 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.
  • Your own plugin: dotnet oadm pack writes <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.