maui-labs: Instructions file for GitHub Copilot

.github/instructions/devflow-architecture.instructions.md

maui-labs devflow-architecture.instructions.md is an instructions file for GitHub Copilot from dotnet/maui-labs. It costs 4,285 tokens per session, scanned A, original, MIT.

Architecture instructions for DevFlow, a system that connects a command-line tool or coding agent to a .NET MAUI app through a broker and an in-app agent. The instructions explain its communication layers, packages, abstractions, and extension points.

In plain words
What is it for?
Understanding connections between the CLI, broker, app agent, platform APIs, packages, and the split between shared abstractions and platform-specific backends.
Why use it?
They give developers the context needed to change or extend DevFlow without misunderstanding how its parts communicate.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is dotnet/maui-labs's own configuration. It tells GitHub Copilot how to work on maui-labs itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything maui-labs configures →

Reuse

Borrowing it

Nothing to install: this file belongs to dotnet/maui-labs. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dotnet/maui-labs/main/.github/instructions/devflow-architecture.instructions.md
Clone the repo
git clone --depth 1 https://github.com/dotnet/maui-labs

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for maui-labs devflow-architecture.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dotnet/maui-labs/devflow-architecture/github.svg)](https://agentmods.dev/instructions/dotnet/maui-labs/devflow-architecture)
Your own site
<a href="https://agentmods.dev/instructions/dotnet/maui-labs/devflow-architecture"><img src="https://agentmods.dev/badge/instructions/dotnet/maui-labs/devflow-architecture/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for maui-labs devflow-architecture.instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/dotnet/maui-labs/devflow-architecture"><img src="https://agentmods.dev/badge/instructions/dotnet/maui-labs/devflow-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,285 This file is loaded in full into every session.
When invoked 4,285 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.04285 $0.04285
Opus 5.5 $0.01714 $0.01714
Sonnet 5.5 $0.00857 $0.00857
Haiku 4.5 $0.00428 $0.00428

Measured today against content hash 96afce309e07, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

maui-labs devflow-architecture.instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/instructions/devflow-architecture.instructions.md · 286 lines

How it starts

The opening of the file, as written. The whole thing — 286 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DevFlow Architecture

Communication Model

DevFlow uses a three-tier architecture:

┌──────────────┐                ┌──────────────┐                ┌──────────────────────────┐
│  CLI / MCP   │  HTTP (direct) │    Broker     │  WebSocket     │  Agent (in-app)          │
│  (maui devflow)│ ◄──────────► │  (port 19223) │ ◄───────────── │  (dynamic port)          │
└──────────────┘  (after port   └──────────────┘  (registration) └──────────────────────────┘
      │            discovery)          │                                │
      │ HTTP (direct, after discovery) │                                │ Platform APIs
      └────────────────────────────────┼────────────────────────────────┘
      ▲                                                               
      │ MCP (stdio)                                                   
      ▼                                                               
┌──────────────┐                                              
│  AI Agent    │                                              
│  (Copilot,   │                                              
│   Claude,    │                                              
│   etc.)      │                                              
└──────────────┘
  1. Agent runs inside the app process (added via NuGet package — MAUI or plain .NET). Exposes HTTP API on a dynamic port. Registers with the Broker over WebSocket. Has direct access to the visual tree, pages, platform views.
  2. Broker runs on the developer machine (port 19223). Agents register with it via WebSocket. CLI discovers agent ports through the broker's HTTP API.
  3. CLI (maui devflow) discovers agents via the broker, then communicates directly with agents over HTTP. Also hosts the MCP server for AI agent integration.

Package Dependency Graph

Microsoft.Maui.DevFlow.CLI (global tool)
├── Microsoft.Maui.DevFlow.Driver (platform drivers)
│   └── Microsoft.Maui.DevFlow.Client (AgentClient — public protocol API)
├── ModelContextProtocol (MCP server)
├── System.CommandLine (CLI framework)
├── Spectre.Console (terminal UI)
└── Websocket.Client (broker transport)

Microsoft.Maui.DevFlow.Client (netstandard2.0 + modern .NET)
├── AgentClient, ElementInfo, protocol DTOs, HTTP/JSON operations
└── System.Text.Json

Microsoft.Maui.DevFlow.Driver (modern .NET, platform-specific)
├── Microsoft.Maui.DevFlow.Client
├── App process management, UI Automation, Mac accessibility
└── OS image facilities (macOS sips resizing; Windows GDI+ PNG encoding)

Microsoft.Maui.DevFlow.Agent.Abstractions (no MAUI dependency)
├── AgentHttpServer, AgentOptions, routing, DevFlowAgentService
├── ElementInfo + DTOs, Css/, Network/, Profiling/, extensions
├── Fizzler (CSS selector parsing)
└── SkiaSharp (screenshot capture/resize)

Microsoft.Maui.DevFlow.Agent.Core (MAUI UI backend)
└── Microsoft.Maui.DevFlow.Agent.Abstractions

Microsoft.Maui.DevFlow.Agent (NuGet package for MAUI app developers)
├── Microsoft.Maui.DevFlow.Agent.Core
└── Microsoft.Maui.DevFlow.Blazor (optional — CDP bridge for Blazor WebViews)

Microsoft.Maui.DevFlow.Agent.Gtk (NuGet package for GTK/Linux apps)
├── Microsoft.Maui.DevFlow.Agent.Core
└── Microsoft.Maui.DevFlow.Blazor.Gtk (optional — WebKitGTK CDP)

Microsoft.Maui.DevFlow.Agent.WPF (NuGet package for WPF apps)
└── Microsoft.Maui.DevFlow.Agent.Core

Microsoft.Maui.DevFlow.Agent.Native (plain .NET android/ios/maccatalyst/macos — no MAUI)
├── Microsoft.Maui.DevFlow.Agent.Abstractions
└── NativeUi.{Android,UIKit,AppKit}, NativeDevFlowAgentService, DevFlowAgent.Start()

Microsoft.Maui.DevFlow.Agent.Native.Essentials (optional add-on)
└── Microsoft.Maui.DevFlow.Agent.Native + Microsoft.Maui.Essentials

Microsoft.Maui.DevFlow.Logging (standalone — no MAUI dependency)

Read the full file on GitHub · 286 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +9 tokens per session 96afce309e07
  2. 9d ago Changed · +67 lines · +1,401 tokens per session ca0f631cf121
  3. 22d ago Changed · +8 lines · +140 tokens per session 0cc87be83943
  4. 2mo ago Changed · +6 lines · +92 tokens per session 36fb5da9a8f7
  5. 2mo ago First seen · 205 lines · 2,643 tokens per session scan A fdfde23ec283

Subscribe to this mod's changes

maui-labs devflow-architecture.instructions.md is an instructions file published in the GitHub repository dotnet/maui-labs (235 stars, last pushed yesterday), licensed MIT. It adds 4,285 tokens to every session, about $0.0171 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

maui-labs devflow-architecture.instructions.md compared with instructions from other repositories

maui-labs devflow-architecture.instructions.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
maui-labs devflow-architecture.instructions.mddotnet/maui-labsInstructions file235yesterdayMITA4,285GitHub Copilot
plan-forge api-patterns.instructions.mdsrnichols/plan-forgeInstructions file62d agoMITA2,049GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot