agentleFS
MicrosoftKnown publishermicrosoft/fabric-org-app-template/AGENTS.md

fabric-org-app-template

AGENTS.md1 starsChanged 6 months agoMITView on GitHub

Instructions for the migration agent that turns this template into a working app for the user's Power BI Org App. This file is auto-loaded by GitHub Copilot CLI (and by other agentic tools that read AGENTS.md). Migrate a Power BI Org App into this template. Inputs from the user: Before doing anything, confirm with the user: where <WORKSPACE_GUID> is the workspace that hosts the Org App. Always pass --workspace-id explicitly — the interactive workspace search often fails when many workspaces…

  • Reads credentials
  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,691 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository7 other files it gives its agents.

The file

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

9 rules. About 0 are common, 6 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

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

    All validation gates passing (pnpm tsc --noEmit, pnpm build)

    line 19
  2. Distinctive:

    Before doing anything, confirm with the user:

    line 27
  3. Very specific:

    Rayfin is connected to the workspace that hosts the Org App: Check .env.local for VITE_FABRIC_API_URL, VITE_FABRIC_PORTAL_URL, and …

    line 33
  4. Distinctive:

    If any are missing, ask for them.

    line 39
  5. Very specific:

    Update the five --color-app-* tokens in src/global.css's @theme block

    line 60
  6. Distinctive:

    All must pass before declaring success.

    line 71
  7. Distinctive:

    If the user asks for UI polish, load the app-design skill.

    line 95
  8. Distinctive:

    If the user asks to verify the migration end-to-end in a browser, load the playwright-cli skill.

    line 97
  9. Distinctive:

    If a report fails to load, load the powerbi-secure-embed skill for the debugging checklist.

    line 99

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 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

AGENTS.md

Instructions for the migration agent that turns this template into a working app for the user's Power BI Org App.

This file is auto-loaded by GitHub Copilot CLI (and by other agentic tools that read AGENTS.md).


Primary task

Migrate a Power BI Org App into this template. Inputs from the user:

  • Org App ID — a GUID like 1b663c51-10f8-4fdf-8863-d24e49622988

Outputs:

  • src/config/orgAppManifest.ts populated with workspace ID, reports, tenant ID, theme
  • src/global.css @theme block patched with Org App brand colors
  • All validation gates passing (pnpm tsc --noEmit, pnpm build)

Workflow

Step 1 — Confirm prerequisites

Before doing anything, confirm with the user:

  1. They have viewer access to the Org App
  2. They are signed in to Azure CLI in the same tenant as the Org App
    • Run: az account show --query "{user: user.name, tenantId: tenantId}"
  3. They have provided the Org App ID (GUID)
  4. Rayfin is connected to the workspace that hosts the Org App. Check .env.local for VITE_FABRIC_API_URL, VITE_FABRIC_PORTAL_URL, and VITE_RAYFIN_API_KEY. If any are missing, ask the user to run:
    npx rayfin up --workspace-id <WORKSPACE_GUID>
    where <WORKSPACE_GUID> is the workspace that hosts the Org App. Always pass --workspace-id explicitly — the interactive workspace search often fails when many workspaces match the user's filter.

If any are missing, ask for them. Do not proceed until all four are confirmed.

Step 2 — Fetch the Org App envelope

Load and follow the org-app-fetch skill. It will produce:

  • $envelope — the parsed JSON response from metadata/artifacts/{orgAppId}
  • $tenantId — from az account show

Step 3 — Parse into the manifest

Load and follow the org-app-parsing skill. It will:

  • Two-stage parse $envelope.workloadPayload
  • Filter elements for reports only
  • Write src/config/orgAppManifest.ts

Step 4 — Patch the theme

Load and follow the org-app-theming skill. It will:

  • Update the five --color-app-* tokens in src/global.css's @theme block

Step 5 — Validate

Load and follow the app-validation skill. It runs:

  • pnpm tsc --noEmit
  • pnpm build
  • Manifest sanity checks
  • Theme tokens patched check

All must pass before declaring success.

Step 6 — Tell the user

Once validation passes:

✅ Done. Your Org App is migrated.

Next steps:

  1. Run pnpm dev
  2. Open http://localhost:5173
  3. Sign in with your work account
  4. You'll land on the home page with a tile for every report.

A few things to try:

  • Click the gear icon (top-right) → Theme to switch between the Org App brand colors and any built-in Power BI theme (Default, Executive, Frontier, Innovate, Bloom, Tidal, Sunset, Storm). Your choice is remembered per browser.
  • Same menu → Configuration shows the source Org App metadata and the raw manifest. To pull in changes from the source app later, just run copilot again and ask for a re-migrate.
  • Collapse the sidebar with the toggle in the top-left to give reports the full width.
  • Hover any sidebar report (or any home-page tile) and use the ↗ button to jump to the same report in the Power BI portal.

Optional follow-ups

If the user asks for UI polish, load the app-design skill.

If the user asks to verify the migration end-to-end in a browser, load the playwright-cli skill.

If a report fails to load, load the powerbi-secure-embed skill for the debugging checklist.


Skills available

SkillPathPurpose
org-app-fetch.agents/skills/org-app-fetch/SKILL.mdPull Org App envelope from internal Power BI API
org-app-parsing.agents/skills/org-app-parsing/SKILL.mdTurn envelope into manifest
org-app-theming.agents/skills/org-app-theming/SKILL.mdPatch global.css with Org App colors
powerbi-secure-embed.agents/skills/powerbi-secure-embed/SKILL.mdReference for the embed iframe
app-design.agents/skills/app-design/SKILL.mdFabric design tokens / Segoe UI conventions
app-validation.agents/skills/app-validation/SKILL.mdFinal acceptance gates
playwright-cli.agents/skills/playwright-cli/SKILL.mdBrowser automation for E2E validation

Hard constraints

  • Tenant boundary. Cross-tenant migration is not supported. The user's az login tenant must match the Org App's tenant.
  • Reports only. Datasets, dashboards, folders, and other element types are not added to the sidebar. (User confirmed this at template design time.)
  • Static manifest. The manifest is written at migration time and committed to source control. No runtime fetch of the Org App definition.
  • Secure embed only. This template uses autoAuth=true iframe embed — no embed token, no service principal. If the user needs embed tokens, that is a separate refactor.

Failure modes

FailureAction
az not signed inAsk the user to run az login --tenant <tenant-id>. Do not proceed.
401/403 from metadata APIVerify token resource is https://analysis.windows.net/powerbi/api and the user has viewer access.
404 from metadata APIRe-check the Org App ID with the user. Confirm the tenant matches.
artifactType !== "OrgApp"The ID is for a different artifact type. Ask the user to verify the ID is from the Org App URL in the Power BI portal.
pnpm tsc --noEmit fails after manifest writeRe-run org-app-parsing — the manifest shape drifted from OrgAppManifest. Do not hand-fix; regenerate.

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.