agentleFS
MicrosoftKnown publishermicrosoft/Copilot-Managed-Runtime/plugins/copilot-managed-runtime/AGENTS.md

Copilot-Managed-Runtime / copilot-managed-runtime

AGENTS.md4 starsChanged 8 days agoMITView on GitHub

This file provides instructions for assistants working on the Copilot Managed Runtime plugin itself (not for end-users of the plugin). The Copilot Managed Runtime plugin wraps @microsoft/cmr-cli (binary ms) to scaffold, develop, and ship apps on Copilot Managed Runtime end-to-end. It provides skills for: This plugin uses a memory bank (memory-bank.md) to persist state across sessions.

  • Installs packages

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

19 rules. About 0 are common, 5 are distinctive, and 14 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 14

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create the file in shared/ (e.g., new-policy.md).

    line 36
  2. Very specific:

    Add a section to shared/shared-instructions.md referencing it.

    line 37
  3. Very specific:

    No changes needed to individual SKILL.md files — they already link to shared-instructions.md.

    line 38
  4. Distinctive:

    All Rayfin work requires the Rayfin feature gate.

    line 85
  5. Very specific:

    Use only Agent Skills frontmatter fields.

    line 124
  6. Very specific:

    Keep one skill set for all clients.

    line 125
  7. Distinctive:

    After modifying this plugin:

    line 137
  8. Very specific:

    Update the canonical plugin.json at this plugin's root, including its version.

    line 139
  9. Very specific:

    Update the matching version and description in the repo-root .claude-plugin/marketplace.json.

    line 141
  10. Very specific:

    Keep the repo-root .agents/plugins/marketplace.json entry pointed at this same plugin directory.

    line 142
  11. Very specific:

    Run node scripts/validate-plugin-compatibility.mjs from the repository root.

    line 143
  12. Distinctive:

    Follow the client test matrix in README.md before claiming runtime compatibility.

    line 149
  13. Very specific:

    Verify any new allowed-tools entries are minimal — request only what the skill needs.

    line 150
  14. Very specific:

    Keep agents/microsoft-apps-architect.md as the source for the architect.

    line 152
  15. Very specific:

    Keep executable hooks in hooks/.

    line 157
  16. Very specific:

    Only the native Copilot entry point passes --github-copilot / -GitHubCopilot to report MS_PLUGIN_REPORT_AGENT=github-copilot.

    line 162
  17. Very specific:

    Keep the agent report independent of MS_CLI_ORIGIN=plugin and user-provided origin overrides.

    line 164
  18. Distinctive:

    Keep both hook payload contracts when editing a script.

    line 165
  19. Distinctive:

    Add future PR checks as separate jobs in this workflow.

    line 172

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Copilot Managed Runtime Plugin — Development Guidelines

This file provides instructions for assistants working on the Copilot Managed Runtime plugin itself (not for end-users of the plugin).

Overview

The Copilot Managed Runtime plugin wraps @microsoft/cmr-cli (binary ms) to scaffold, develop, and ship apps on Copilot Managed Runtime end-to-end. It provides skills for:

  • Creating a new app (/create-app) — global install of the CLI, scaffold, local dev loop.
  • Iterating locally (/dev) — ms app dev, hot reload against the App Player.
  • Lifecycle ops (/deploy, /share, /delete-app, /list-apps).
  • Defining an app backend database (/add-backend) — entities and a typed runtime client.
  • Binding data sources (/add-dataverse, /add-sharepoint, etc.) — generates typed TypeScript services under src/.

Memory Bank System

This plugin uses a memory bank (memory-bank.md) to persist state across sessions.

  • Location: <PROJECT_ROOT>/memory-bank.md (in the user's project, not the plugin).
  • Instructions: See shared/memory-bank.md for the full schema.
  • Skills read the memory bank at start and update it after major steps. The schema records the environment id the CLI resolved for reference only (e.g. reconstructing the App Player URL); it is not used to re-target ms app create, which resolves an environment automatically each run.

Shared Resources

FilePurpose
shared/shared-instructions.mdMeta file aggregating all cross-cutting concerns — every skill links to it.
shared/planning-policy.mdWhen to enter plan mode and what to include in the plan.
shared/memory-bank.mdMemory bank schema + read/update protocol.
shared/development-standards.mdTheme, CLI install pattern, build rules, TypeScript strict mode.
shared/allowed-actions.mdallowedActions authoring for shared connection references — required before pack/deploy.
shared/version-check.mdDaily plugin-version check against the marketplace.

Adding new shared instructions

  1. Create the file in shared/ (e.g., new-policy.md).
  2. Add a section to shared/shared-instructions.md referencing it.
  3. No changes needed to individual SKILL.md files — they already link to shared-instructions.md.

Skills

Stage 1: scaffold

SkillWhat it does
/create-appInstalls the CLI globally, scaffolds, ends on ms app dev.

Stage 2: lifecycle

SkillWraps
/devms app dev (local App Player, hot reload).
/deployms app deploy (default) plus optional ms app build / ms app build-status traceability flow.
/playms app play — open live or preview URL in browser.
/sharems app share / unshare.
/share-linkms app share link create / list / revoke.
/delete-appms app delete (idempotent).
/list-appsms app list / ms app show.

Stage 3: data sources

SkillWhat it adds
/stateBuilt-in app state schema via ms project state and generated TypeScript services.
/add-dataverseDataverse tables (typed services).
/add-sharepointSharePoint Online lists/documents.
/add-excelExcel Online (Business) workbooks.
/add-office365Office 365 Outlook (calendar, email).
/add-office365-usersOffice 365 Users (profiles, org relationships, profile photos).
/add-teamsTeams messaging.
/add-onedriveOneDrive for Business files.
/add-azuredevopsAzure DevOps work items / pipelines.
/add-mcscopilotMicrosoft Copilot Studio agents.
/add-workiqWork IQ Copilot MCP for Microsoft 365 knowledge-grounded search/chat.
/add-data-sourceGeneric fallback for any other connector.
/list-connectorsEnumerate connectors / bound data sources for discovery.

App backend database

Setup: /add-backend scaffolds backend configuration and code with ms app add backend --provider rayfin; scaffolding does not provision the database. Its local references use the installed SDK docs for API guidance.

Select it only for an explicit app backend database request (including /add-backend or Rayfin).

All Rayfin work requires the Rayfin feature gate.

ReferencePurpose
Data modelingWrite entities and the typed runtime client using installed SDK docs.
CRUD UIWrite database-backed lists, forms and CRUD operations; check UI behavior and persistence.

Workflow

/create-app
   └── /dev (default loop)
   └── /add-backend (when explicitly requested)
   └── /add-data-source (or a specific connector skill)
   └── /deploy (explicit, requires confirmation)
   └── /share, /delete-app (explicit, require confirmation)

Skill structure

skills/<skill-name>/
├── SKILL.md                  # Workflow
└── references/               # Optional deep-dive docs
    └── <topic>-reference.md

Skill header

---
name: kebab-case-name
description: Short, action-oriented sentence the model uses for retrieval. Mention `ms` CLI verbs explicitly.
allowed-tools: Read Edit Write Grep Glob Bash AskUserQuestion
---

**📋 Shared Instructions: [shared-instructions.md](../../shared/shared-instructions.md)** — Cross-cutting concerns.

Use only Agent Skills frontmatter fields. Keep one skill set for all clients. Do not add model or user-invocable. Skills inherit the client's selected model. Claude's default keeps skills user-invocable. Resolve resource links relative to the containing Markdown file, not the user's project.

Agent

AgentPurpose
microsoft-apps-architectArchitecture advisor for connector selection, codegen patterns, deploy.

Testing changes

After modifying this plugin:

  1. Update the canonical plugin.json at this plugin's root, including its version.
  2. Copy its metadata to .claude-plugin/plugin.json, excluding only $schema. Keep both files as regular JSON files, never symlinks.
  3. Update the matching version and description in the repo-root .claude-plugin/marketplace.json. Preserve its marketplace name, plugin name, and source path.
  4. Keep the repo-root .agents/plugins/marketplace.json entry pointed at this same plugin directory.
  5. Run node scripts/validate-plugin-compatibility.mjs from the repository root.
  6. Run node --test scripts/validate-plugin-compatibility.test.mjs from the repository root.
  7. Install validation dependencies with python -m pip install -r scripts/requirements-plugin-validation.txt in a virtual environment.
  8. Run python scripts/validate_plugin_skills.py.
  9. Run python -m unittest discover -s scripts -p "*_test.py".
  10. Run node --test scripts/plugin-hooks.test.mjs.
  11. Follow the client test matrix in README.md before claiming runtime compatibility.
  12. Verify any new allowed-tools entries are minimal — request only what the skill needs.

Keep agents/microsoft-apps-architect.md as the source for the architect. Copy it to com.github.copilot/agents/microsoft-apps-architect.agent.md after each edit. Change its ../shared/ links to ../../shared/ and ../skills/ links to ../../skills/ in the copy. The validator rejects any other difference.

Keep executable hooks in hooks/. Do not copy their scripts. Claude and legacy Copilot discover hooks/hooks.json. Agent Plugins Copilot discovers com.github.copilot/hooks/hooks.json. The latter uses native Copilot events, ${PLUGIN_ROOT}, and the same scripts. Validation checks both configurations for equivalent scripts, matchers, and timeouts. Only the native Copilot entry point passes --github-copilot / -GitHubCopilot to report MS_PLUGIN_REPORT_AGENT=github-copilot. Shared hooks must remove inherited reports. Do not detect the host from environment markers or shell type. Keep the agent report independent of MS_CLI_ORIGIN=plugin and user-provided origin overrides. Keep both hook payload contracts when editing a script.

The canonical manifest follows Agent Plugins 1.0.0. That version requires root plugin.json, not the older .plugin/plugin.json layout. The generic PR pipeline workflow in .github/workflows/pr.yml contains one job: plugin compatibility. This job checks manifests, component compatibility, resource links, skill validity, and hooks on Windows and Ubuntu. The Python dependency is the Agent Skills reference validator, pinned to a Git commit. Add future PR checks as separate jobs in this workflow. Client installation, updates, shared-resource resolution, and hook behavior still need host-level checks before claiming support for a new client.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.