agentleFS
HumbleDaanHumbleDaan/fabric-project-structure/.github/copilot-instructions.md

fabric-project-structure

Copilot instructions0 starsChanged 2 months agoMITView on GitHub

You are working in a Microsoft Fabric repository. Fabric items in this repo are synchronised with live Fabric workspaces through Git integration. Treat them accordingly. Git integration is bidirectional, and authoring in Git is much of the point. You can change an item in Fabric and commit it, or change the definition in Git and sync it into the workspace. Microsoft supports both — and for Warehouse actively recommends the Git-first path over incremental live edits. So the rule is…

  • Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.

    Of the Copilot instructions files we read, the 2,349 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 repository6 other files it gives its agents.

The file

We split this copilot-instructions.md into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    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:

    Read standards/naming-conventions.md — every artefact you create needs a compliant name.

    line 89
  2. Very specific:

    Read the target project's project-context.md — it carries the domain language and constraints.

    line 90
  3. Very specific:

    Check standards/branching-and-workspaces.md — know which workspace maps to which branch before you touch anything.

    line 91
  4. Distinctive:

    If a question is *"how does Fabric do X"* → Fabric skills.

    line 107
  5. Distinctive:

    If a question is *"how do we do X"* → this repository.

    line 108
  6. Distinctive:

    Update the index in the same change: Every folder has a README.md.

    line 119

≈ “Common” is an estimate: at least 1 in 5 of the 3,779 Copilot instructions 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
copilot-instructions.md

Copilot Instructions

You are working in a Microsoft Fabric repository. Fabric items in this repo are synchronised with live Fabric workspaces through Git integration. Treat them accordingly.

How this repository is organised

PathWhat it isCan you edit it?
.github/Shared core — standards, skills, agents, prompts. True for every project.Yes, via PR
projects/<project>/Project docs, context, decisionsYes
projects/<project>/workspaces/<workspace>/Synced with a live Fabric workspace.Yes — under the rules below
docs/How to operate this repoYes
scripts/Validation, bootstrapYes

The rules that matter

Git integration is bidirectional, and authoring in Git is much of the point. You can change an item in Fabric and commit it, or change the definition in Git and sync it into the workspace. Microsoft supports both — and for Warehouse actively recommends the Git-first path over incremental live edits.

So the rule is not don't edit. It is don't edit the identity layer, and don't author in both directions at once.

1. Never touch the identity layer

Three things in an item folder are the plumbing that links the file to the item. Changing them is what actually breaks a sync:

  • logicalId in .platform — the link itself. Docs are unambiguous: "it's essential not to change it in any way."
  • type in .platform — case-sensitive; changing how it's generated can fail the sync.
  • The item directory name — renaming it in Git stops the name syncing, and silently breaks dependency paths in other items (a report's definition.pbir refers to its semantic model by path). Rename in the workspace instead, or update every dependent reference by hand.

Copying an item folder to seed a new item is fine, but you must give the copy a fresh logicalId GUID and a unique displayName — duplicate names fail the update outright.

2. Sync one direction at a time

"You can only sync in one direction at a time. You can't commit and update at the same time."

Decide who authors a given change before starting, then finish the round trip:

  • Git-first — edit the definition → PR → Update from Git into the workspace.
  • Fabric-first — change it in the portal → Commit to Git → review the diff.

Half-finished changes sitting on both sides at once is what produces conflicts. That is the real hazard here, and it is operational, not corruption.

3. Know which files are meant to be hand-written

FileAuthor it by hand?
definition/*.tmdl — semantic modelYes — TMDL exists for exactly this
notebook-content.pyYes
Warehouse database project (.sqlproj + SQL)Yes — MS recommends it over live edits
function-app.py — user data functionsYes — docs call it "the main file you edit"
*.rdl — paginated reportCarefully; it's XML with a schema
report.json, definition.pbirOnly with the schema open — don't improvise it
resources/functions.jsonNo — docs: "Don't edit this file manually"
.platformNo, other than description

Expect cosmetic diff noise after a Git-authored change. The engine that regenerates a definition may reorder things — rename a semantic model column in Git and it gets pushed to the end of the columns array on the next commit. Docs call this semantically insignificant. Don't chase it. (The same applies to line endings: Fabric writes LF, which is why .gitattributes pins eol=lf.)

4. Nothing extra inside an item folder

"During the Commit to Git process, the Fabric service deletes files inside the item folder that aren't part of the item definition."

A note left inside LH_Sales.Lakehouse/ is deleted on the next commit. Files outside an item folder survive — but we still keep workspace documentation beside the synced directory (ws-sales-dev.md next to ws-sales-dev/) so the sync surface is exactly what Fabric manages. That second part is a house rule, not a platform constraint.

References: source code format · basic concepts · warehouse Git integration

Before you start work

  1. Read standards/naming-conventions.md — every artefact you create needs a compliant name.
  2. Read the target project's project-context.md — it carries the domain language and constraints.
  3. Check standards/branching-and-workspaces.md — know which workspace maps to which branch before you touch anything.

Where your knowledge comes from

Fabric platform mechanics — Spark, Warehouse, Direct Lake, Dataflows, Eventhouse, REST APIs, Power BI modelling — come from the Agent Skills for Fabric bundle published by Microsoft. Use it. Don't reimplement it here, and don't copy chunks of it into this repo — it is updated continuously and a copy goes stale fast.

This repository adds only what Microsoft cannot know about us:

  • standards/ — our naming, branching, review and security rules
  • skills/ — our functional skills (domain logic, house patterns)
  • agents/ — the roles we work in
  • prompts/ — our repeatable workflows
  • projects/*/project-context.md — per-project business context

If a question is "how does Fabric do X" → Fabric skills. If a question is "how do we do X" → this repository.

House rules

  • Never write to a production workspace. Production changes ship through the release process.
  • No secrets in the repo. Connection strings, keys, tokens and sensitive workspace IDs belong in the pipeline's variable/secret store. See standards/security-and-access.md.
  • Small, reviewable commits. One item or one logical change per commit.
  • Conventional commits: feat:, fix:, docs:, chore:, refactor:, data:.
  • State uncertainty. Fabric ships monthly and preview features change. If you are not sure a capability is GA, say so and link the docs rather than asserting.
  • Update the index in the same change. Every folder has a README.md; if you add a file, add its row to that README in the same commit.

Definition of done for a change

  • Names follow the naming convention
  • No logicalId, type, or item folder name was changed
  • Changes to a workspace directory went one direction, and the round trip is finished
  • No secrets, no hard-coded workspace/capacity IDs outside the parameter file
  • The relevant README.md index was updated
  • A decision that future-you would question is written up in projects/<project>/decisions/
  • scripts/validate-structure.ps1 passes

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.