agentleFS
MicrosoftKnown publishermicrosoft/fabric-extensibility-toolkit/.github/copilot-instructions.md

fabric-extensibility-toolkit

Copilot instructions57 starsChanged 15 months agoMITView on GitHub

This file contains GitHub Copilot-specific instructions that extend the generic AI guidance found in the .ai/ folder. All AI tools should first reference the generic instructions, then apply the Copilot-specific enhancements below. REQUIRED: Before using these instructions, always reference the generic AI guidance:

  • Reads credentials

The file

Show its rules and text

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

24 rules. About 0 are common, 6 are distinctive, and 18 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.

  • 18

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    REQUIRED: Before using these instructions, always reference the generic AI guidance:

    line 9
  2. Very specific:

    Use @fabric or these keywords for specialized GitHub Copilot assistance:

    line 20
  3. Distinctive:

    File Creation: When creating items, automatically suggests the 4-file pattern structure

    line 59
  4. Very specific:

    Prefer components from @fluentui/react-components (v9) over @fluentui/react (v8).

    line 61
  5. Very specific:

    Ribbon Pattern: ALWAYS suggests homeToolbarActions (mandatory) + optional additionalToolbars pattern.

    line 62
  6. Very specific:

    Toolbar Components: ALWAYS suggests Tooltip + ToolbarButton pattern for toolbar actions.

    line 63
  7. Very specific:

    OneLakeStorageClient: ALWAYS use createItemWrapper() when working with OneLake storage in an item context.

    line 64
  8. Very specific:

    OneLakeView: ALWAYS use component from components/OneLakeView, not sample code.

    line 65
  9. Distinctive:

    Instead of manual file creation, GitHub Copilot can generate complete structures:

    line 78
  10. Very specific:

    Ribbon Components: Always creates homeToolbarActions array (mandatory) with createSaveAction(), createSettingsAction() factories, plus …

    line 106
  11. Very specific:

    OneLake Storage: Always creates itemWrapper = oneLakeClient.createItemWrapper({id, workspaceId}) for item-scoped operations

    line 108
  12. Very specific:

    OneLake Explorer: Always use component from components/OneLakeView, not sample code

    line 109
  13. Very specific:

    ItemEditor View Registration: ALWAYS use static view registration pattern with useViewNavigation() hook.

    line 110
  14. Very specific:

    ItemEditor Initial View: ALWAYS use getInitialView function for data-dependent view determination instead of static initialView.

    line 111
  15. Very specific:

    ItemEditor Scrolling: NEVER implement scrolling in item views.

    line 112
  16. Very specific:

    ItemEditor Notification Registration: ALWAYS use static messageBar registration pattern.

    line 113
  17. Very specific:

    View Navigation: ALWAYS suggests const { setCurrentView, goBack } = useViewNavigation() in view wrapper components for navigation between …

    line 114
  18. Very specific:

    ItemEditorDefaultView: Always suggests two-panel layouts with proper left/center panel configurations, resizable splitters, and collapsible …

    line 115
  19. Very specific:

    Detail View Navigation: Always use ItemEditorDetailView component with isDetailView: true for L2 drill-down pages (detail records, item …

    line 119
  20. Distinctive:

    Empty View Pattern: Use ItemEditorEmptyView for items used for the first time (no definition/state) with initial call-to-action buttons to …

    line 120
  21. Distinctive:

    Item Properties & Configuration: Use ItemSettings pattern for general item properties (version, endpoint configuration, descriptions).

    line 121
  22. Very specific:

    Generic Foundation: All files in .ai/context/ and .ai/commands/

    line 139
  23. Very specific:

    Add a timestamp (format: YYYY-MM-DD HH:MM UTC) at the end of each response

    line 146
  24. Distinctive:

    Only leave changes that actually contribute to the working solution

    line 148

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

GitHub Copilot Instructions for Microsoft Fabric Extensibility Toolkit

📋 Overview

This file contains GitHub Copilot-specific instructions that extend the generic AI guidance found in the .ai/ folder. All AI tools should first reference the generic instructions, then apply the Copilot-specific enhancements below.

🔗 Base AI Instructions

REQUIRED: Before using these instructions, always reference the generic AI guidance:

  • Primary Context: .ai/context/fabric-workload.md - Project structure and conventions
  • Platform Knowledge: .ai/context/fabric.md - Microsoft Fabric platform understanding
  • Available Commands: .ai/commands/ - All automation tasks and procedures
    • Item Operations: .ai/commands/item/ (createItem.md, deleteItem.md)
    • Workload Operations: .ai/commands/workload/ (runWorkload.md, updateWorkload.md, deployWorkload.md, publishworkload.md)

🤖 GitHub Copilot Enhanced Features

Agent Activation

Use @fabric or these keywords for specialized GitHub Copilot assistance:

  • fabric workload - Extensibility Toolkit-specific development help with autocomplete
  • fabric item - Item creation with intelligent code generation
  • fabric auth - Authentication patterns with secure defaults
  • fabric api - API integration with type inference
  • fabric deploy - Deployment automation with validation

Enhanced Capabilities

GitHub Copilot provides additional features beyond generic AI tools:

  • 🔮 Predictive Coding: Auto-completion for Fabric patterns and TypeScript interfaces
  • 🧠 Context-Aware Suggestions: Smart suggestions based on current file and cursor position
  • ⚡ Real-time Validation: Immediate feedback on code quality and Fabric compliance
  • 🎯 Pattern Recognition: Learns from existing codebase patterns for consistent suggestions
  • 📚 Inline Documentation: Generates JSDoc comments following Fabric conventions

🎯 GitHub Copilot Integration

Command Reference System

GitHub Copilot integrates with the generic .ai/commands/ structure:

Generic CommandGitHub Copilot Enhancement
.ai/commands/item/createItem.mdAuto-generates 4-file structure with intelligent TypeScript interfaces
.ai/commands/item/deleteItem.mdValidates dependencies before suggesting removal
.ai/commands/workload/runWorkload.mdProvides environment validation and startup optimization
.ai/commands/workload/updateWorkload.mdSuggests configuration updates with impact analysis
.ai/commands/workload/deployWorkload.mdValidates deployment readiness with security checks
.ai/commands/workload/publishworkload.mdEnsures production-ready manifest compliance

Context Enhancement

Beyond the generic .ai/context/ files, GitHub Copilot provides:

  • Real-time IntelliSense: Auto-completion for Fabric APIs and TypeScript definitions
  • Error Prevention: Immediate feedback on common Fabric development pitfalls
  • Pattern Matching: Suggests code based on similar implementations in the workspace
  • Dependency Tracking: Understands relationships between manifest and implementation files

🧠 GitHub Copilot Behavioral Enhancements

Smart Suggestions

  • File Creation: When creating items, automatically suggests the 4-file pattern structure
  • Import Resolution: Auto-imports Fabric platform types and client libraries
  • Prefer components from @fluentui/react-components (v9) over @fluentui/react (v8). Replace imports like import { DefaultButton } from '@fluentui/react' with import { Button } from '@fluentui/react-components'. Verify API and prop differences (appearance, tokens, and shorthands) when migrating components.
  • Ribbon Pattern: ALWAYS suggests homeToolbarActions (mandatory) + optional additionalToolbars pattern. Use createSaveAction(), createSettingsAction() factories from components/ItemEditor
  • Toolbar Components: ALWAYS suggests Tooltip + ToolbarButton pattern for toolbar actions. Auto-imports both from @fluentui/react-components and wraps ToolbarButtons in Tooltips with proper accessibility attributes
  • OneLakeStorageClient: ALWAYS use createItemWrapper() when working with OneLake storage in an item context. Never use direct OneLakeStorageClient methods with manual path construction
  • OneLakeView: ALWAYS use component from components/OneLakeView, not sample code. Initialize with initialItem config for content display
  • Error Recovery: Provides specific fixes for common Fabric authentication and manifest issues
  • Code Completion: Understands Fabric-specific patterns like callNotificationOpen() and saveItemDefinition()

Workspace Intelligence

  • Manifest Sync: Detects when implementation changes require manifest updates
  • Environment Awareness: Suggests appropriate .env configurations based on current context
  • Build Validation: Predicts build issues before they occur
  • Routing Updates: Automatically suggests route additions when new items are created

🚀 GitHub Copilot Quick Actions

Smart Code Generation

Instead of manual file creation, GitHub Copilot can generate complete structures:

// Type "fabric item create MyCustom" to generate:
// - MyCustomItemModel.ts with intelligent interface
// - MyCustomItemEditor.tsx with Fluent UI components
// - MyCustomItemEditorEmpty.tsx with onboarding flow
// - MyCustomItemEditorRibbon.tsx with action buttons

Enhanced Development Commands

GitHub Copilot understands context-aware shortcuts:

# Smart environment detection with .env-based configuration
fabric dev start    # Automatically uses .env.dev configuration

# Intelligent build with validation
fabric build check  # Pre-validates templates and manifest generation

# Context-aware deployment
fabric deploy prod   # Uses .env.prod for environment-specific manifests

Auto-completion Patterns

GitHub Copilot recognizes Fabric patterns and suggests:

  • API Calls: Complete authentication and error handling
  • Component Structure: Fluent UI patterns with proper TypeScript
  • Ribbon Components: Always creates homeToolbarActions array (mandatory) with createSaveAction(), createSettingsAction() factories, plus optional additionalToolbars array for complex items
  • Toolbar Integration: Mandatory Tooltip + ToolbarButton patterns for all toolbar implementations
  • OneLake Storage: Always creates itemWrapper = oneLakeClient.createItemWrapper({id, workspaceId}) for item-scoped operations
  • OneLake Explorer: Always use component from components/OneLakeView, not sample code
  • ItemEditor View Registration: ALWAYS use static view registration pattern with useViewNavigation() hook. Define views as static array like ribbon actions
  • ItemEditor Initial View: ALWAYS use getInitialView function for data-dependent view determination instead of static initialView. Called automatically when loading completes
  • ItemEditor Scrolling: NEVER implement scrolling in item views. ItemEditor center panel handles ALL overflow with automatic vertical scrolling. Items should use height: auto for natural growth
  • ItemEditor Notification Registration: ALWAYS use static messageBar registration pattern. Define messageBar as static array with showInViews to control visibility
  • View Navigation: ALWAYS suggests const { setCurrentView, goBack } = useViewNavigation() in view wrapper components for navigation between views (hook is part of ItemEditorDefaultView module)
  • ItemEditorDefaultView: Always suggests two-panel layouts with proper left/center panel configurations, resizable splitters, and collapsible panels when appropriate
  • Panel Usage Patterns:
    • Left Panel (Optional): For navigation trees, OneLakeView, file explorers, and secondary views (list views, catalog browsers, workspace explorers)
    • Center Panel (Required): For main content, editors, and primary workspace
  • Detail View Navigation: Always use ItemEditorDetailView component with isDetailView: true for L2 drill-down pages (detail records, item properties, configuration screens)
  • Empty View Pattern: Use ItemEditorEmptyView for items used for the first time (no definition/state) with initial call-to-action buttons to guide users through setup
  • Item Properties & Configuration: Use ItemSettings pattern for general item properties (version, endpoint configuration, descriptions). This creates a separate section in the settings flyout opened through the settings ribbon action. Item names and descriptions are managed there by default.
  • Panel Configuration: Suggests collapsible: true, proper panel titles, min/max width constraints, and accessibility labels for complex layouts
  • Manifest Updates: Template processing with placeholder replacement
  • Route Configuration: Automatic route registration
  • Environment Management: .env-based configuration patterns

Workspace-Aware Features

  • File Relationships: Understands manifest template ↔ implementation dependencies
  • Environment Detection: Suggests appropriate configurations for dev/test/prod
  • Template Processing: Recognizes placeholder patterns like {{WORKLOAD_NAME}}
  • Error Resolution: Provides specific fixes for Fabric development issues
  • Pattern Learning: Adapts suggestions based on existing codebase patterns

� Reference Architecture

For complete understanding, GitHub Copilot users should reference:

  • Generic Foundation: All files in .ai/context/ and .ai/commands/
  • Copilot Enhancements: This file's specific GitHub Copilot features
  • Live Workspace: Current implementation patterns and recent changes

This dual approach ensures consistency across all AI tools while providing GitHub Copilot users with enhanced, context-aware development assistance.

Response Guidelines

  • Add a timestamp (format: YYYY-MM-DD HH:MM UTC) at the end of each response
  • Clean up unsuccessful code attempts immediately when finding the correct solution
  • Only leave changes that actually contribute to the working solution

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.