Copilot Control Plane Architecture
Design and govern the .github/ customization stack as a layered system.
Apply This Skill
Use this skill to:
- Explain interaction between instructions, prompts, agents, and workflows
- Define a clean folder strategy for Copilot customization
- Audit conflicting instruction files and propose deconfliction
- Plan migration from legacy
*.chatmode.md to *.agent.md
- Create a practical starter blueprint for team adoption
- Create or update concrete control-plane files on request
Execution Modes
Choose one mode based on user intent:
Architecture Advisory Mode
- Use for analysis, audits, governance recommendations, and migration plans
- Produce structured findings and prioritized actions
File Creation Mode
- Use when user asks for concrete artifacts (agent, prompt, instructions, workflow)
- Create files directly in the proper
.github/ locations using templates
- Keep output minimal, valid, and immediately usable
Refactor Mode
- Use when existing files are bloated, conflicting, or outdated
- Preserve intent while consolidating duplicated or contradictory rules
Inputs To Collect
Collect these artifacts first:
.github/copilot-instructions.md
.github/instructions/**/*.instructions.md
.github/prompts/**/*.prompt.md
.github/agents/**/*.agent.md
.github/workflows/**/*.yml
- Any legacy
chatmodes/ folders or _deactivated archives
Then load supporting docs as needed:
./references/control-plane-audit-checklist.md
./references/file-creation-workflows.md
./references/conflict-resolution-rules.md
Layer Model
Treat the system as five layers:
- Always-on policy: repo-wide baseline in
copilot-instructions.md
- Scoped policy: conditional rules in
.instructions.md with applyTo
- Task playbooks: manually invoked prompt files
- Role/tool guardrails: custom agents and handoffs
- Enforcement automation: CI/CD and governance workflows
Use this hierarchy to avoid policy duplication and context drift.
Workflow
1) Map The Current State
- Inventory files per layer
- Identify missing layers or overlap
- Detect legacy naming (
chatmode vs agent)
2) Check For Conflicts
- Find contradictory instructions across global and scoped files
- Flag rules duplicated in instructions, prompts, and agents
- Identify vague or low-signal trigger descriptions in skills/agents/prompts
3) Normalize Responsibilities
- Keep stable non-negotiables in
copilot-instructions.md
- Keep path/language specific behavior in
.instructions.md
- Keep reusable task procedures in
.prompt.md
- Keep role behavior and tool restrictions in
.agent.md
- Keep mandatory quality gates in workflows
4) Apply Guardrails
- Ensure read-only planner mode exists where needed
- Restrict tools by role for risky domains
- Keep autonomous workflows narrow, reviewable, and reversible
5) Define Migration Path
- Convert
*.chatmode.md to *.agent.md
- Move active personas into
.github/agents/
- Keep deactivated files archived but out of discovery paths
6) Deliver Blueprint
Provide:
- Recommended target folder layout
- Top 5 conflict fixes
- Starter set suggestion: 1 global instruction, 3 scoped instructions, 3 agents, 5 prompts
- Governance checklist for PR review
7) Create Files When Requested
- If user asks to create or save files, switch to File Creation Mode immediately
- Select template(s) from
./templates/ that match request intent
- Materialize artifacts in target locations:
.github/agents/*.agent.md
.github/prompts/*.prompt.md
.github/instructions/*.instructions.md
.github/workflows/*.yml
.github/copilot-instructions.md
- Validate naming, frontmatter, and minimal required sections
- Summarize what was created and where
File Creation Routing
Map user requests to templates:
- “create a new agent” →
./templates/agent-template.agent.md
- “save this as prompt” →
./templates/prompt-template.prompt.md
- “add scoped rule/instruction” →
./templates/instruction-template.instructions.md
- “add repository workflow” →
./templates/workflow-template.yml
- “create global copilot instructions” →
./templates/copilot-instructions-template.md
For complete creation flow and fill-in guidance, follow:
./references/file-creation-workflows.md
Quality Bar
Ensure output is:
- Layered: each rule lives in one canonical place
- Non-conflicting: no competing directives across instruction files
- Actionable: includes migration and rollout steps
- Auditable: includes explicit validation checkpoints
- Operational: can produce requested artifacts directly
Anti-Patterns
Avoid:
- Storing enforcement-only rules in prompt files
- Repeating identical rules in instructions, prompts, and agents
- Long monolithic instruction files without scoping
- Unrestricted agent tool access in high-risk repositories
- Creating files without matching repository conventions
Output Template
Use this structure for deliverables:
- BLUF — one-paragraph architecture summary
- Current State — what exists now by layer
- Gaps/Conflicts — highest-impact issues
- Target Architecture — recommended structure
- Migration Plan — phased rollout
- Governance — review checklist + ownership
For file-creation requests, use this structure:
- Intent Mapping — what file type(s) requested
- Artifacts Created — exact paths created/updated
- Template Source — which template(s) were applied
- Validation Checks — naming/frontmatter/tool constraints
- Next Optional Step — one suggested follow-up
Reference Facts To Preserve
Anchor recommendations on these facts:
- Repo instructions are always-on context
- Scoped instruction files are conditionally applied via file globs
- Prompt files are invoked on demand
- Agent files define role behavior and tool boundaries
- Workflows provide enforceable execution and compliance
1---2name: copilot-control-plane-architecture3description: Build, review, refactor, and operationalize a GitHub Copilot customization control plane in a repository. Use when users ask how `.github/copilot-instructions.md`, `.github/instructions/*.instructions.md`, `.github/prompts/*.prompt.md`, `.github/agents/*.agent.md`, and `.github/workflows/*.yml` should interact, or when they ask to create or update these files directly (for example: "create a new agent", "save this as prompt", "add scoped instructions", "add a governance workflow", "create new prompt", "create new instructions file", "edit prompt", "edit instructions file").4---56# Copilot Control Plane Architecture78Design and govern the `.github/` customization stack as a layered system.910## Apply This Skill1112Use this skill to:1314- Explain interaction between instructions, prompts, agents, and workflows15- Define a clean folder strategy for Copilot customization16- Audit conflicting instruction files and propose deconfliction17- Plan migration from legacy `*.chatmode.md` to `*.agent.md`18- Create a practical starter blueprint for team adoption19- Create or update concrete control-plane files on request2021## Execution Modes2223Choose one mode based on user intent:24251. **Architecture Advisory Mode**26 - Use for analysis, audits, governance recommendations, and migration plans27 - Produce structured findings and prioritized actions28292. **File Creation Mode**30 - Use when user asks for concrete artifacts (agent, prompt, instructions, workflow)31 - Create files directly in the proper `.github/` locations using templates32 - Keep output minimal, valid, and immediately usable33343. **Refactor Mode**35 - Use when existing files are bloated, conflicting, or outdated36 - Preserve intent while consolidating duplicated or contradictory rules3738## Inputs To Collect3940Collect these artifacts first:4142- `.github/copilot-instructions.md`43- `.github/instructions/**/*.instructions.md`44- `.github/prompts/**/*.prompt.md`45- `.github/agents/**/*.agent.md`46- `.github/workflows/**/*.yml`47- Any legacy `chatmodes/` folders or `_deactivated` archives4849Then load supporting docs as needed:5051- `./references/control-plane-audit-checklist.md`52- `./references/file-creation-workflows.md`53- `./references/conflict-resolution-rules.md`5455## Layer Model5657Treat the system as five layers:58591. **Always-on policy**: repo-wide baseline in `copilot-instructions.md`602. **Scoped policy**: conditional rules in `.instructions.md` with `applyTo`613. **Task playbooks**: manually invoked prompt files624. **Role/tool guardrails**: custom agents and handoffs635. **Enforcement automation**: CI/CD and governance workflows6465Use this hierarchy to avoid policy duplication and context drift.6667## Workflow6869### 1) Map The Current State7071- Inventory files per layer72- Identify missing layers or overlap73- Detect legacy naming (`chatmode` vs `agent`)7475### 2) Check For Conflicts7677- Find contradictory instructions across global and scoped files78- Flag rules duplicated in instructions, prompts, and agents79- Identify vague or low-signal trigger descriptions in skills/agents/prompts8081### 3) Normalize Responsibilities8283- Keep stable non-negotiables in `copilot-instructions.md`84- Keep path/language specific behavior in `.instructions.md`85- Keep reusable task procedures in `.prompt.md`86- Keep role behavior and tool restrictions in `.agent.md`87- Keep mandatory quality gates in workflows8889### 4) Apply Guardrails9091- Ensure read-only planner mode exists where needed92- Restrict tools by role for risky domains93- Keep autonomous workflows narrow, reviewable, and reversible9495### 5) Define Migration Path9697- Convert `*.chatmode.md` to `*.agent.md`98- Move active personas into `.github/agents/`99- Keep deactivated files archived but out of discovery paths100101### 6) Deliver Blueprint102103Provide:104105- Recommended target folder layout106- Top 5 conflict fixes107- Starter set suggestion: 1 global instruction, 3 scoped instructions, 3 agents, 5 prompts108- Governance checklist for PR review109110### 7) Create Files When Requested111112- If user asks to create or save files, switch to File Creation Mode immediately113- Select template(s) from `./templates/` that match request intent114- Materialize artifacts in target locations:115 - `.github/agents/*.agent.md`116 - `.github/prompts/*.prompt.md`117 - `.github/instructions/*.instructions.md`118 - `.github/workflows/*.yml`119 - `.github/copilot-instructions.md`120- Validate naming, frontmatter, and minimal required sections121- Summarize what was created and where122123## File Creation Routing124125Map user requests to templates:126127- “create a new agent” → `./templates/agent-template.agent.md`128- “save this as prompt” → `./templates/prompt-template.prompt.md`129- “add scoped rule/instruction” → `./templates/instruction-template.instructions.md`130- “add repository workflow” → `./templates/workflow-template.yml`131- “create global copilot instructions” → `./templates/copilot-instructions-template.md`132133For complete creation flow and fill-in guidance, follow:134135- `./references/file-creation-workflows.md`136137## Quality Bar138139Ensure output is:140141- **Layered**: each rule lives in one canonical place142- **Non-conflicting**: no competing directives across instruction files143- **Actionable**: includes migration and rollout steps144- **Auditable**: includes explicit validation checkpoints145- **Operational**: can produce requested artifacts directly146147## Anti-Patterns148149Avoid:150151- Storing enforcement-only rules in prompt files152- Repeating identical rules in instructions, prompts, and agents153- Long monolithic instruction files without scoping154- Unrestricted agent tool access in high-risk repositories155- Creating files without matching repository conventions156157## Output Template158159Use this structure for deliverables:1601611. **BLUF** — one-paragraph architecture summary1622. **Current State** — what exists now by layer1633. **Gaps/Conflicts** — highest-impact issues1644. **Target Architecture** — recommended structure1655. **Migration Plan** — phased rollout1666. **Governance** — review checklist + ownership167168For file-creation requests, use this structure:1691701. **Intent Mapping** — what file type(s) requested1712. **Artifacts Created** — exact paths created/updated1723. **Template Source** — which template(s) were applied1734. **Validation Checks** — naming/frontmatter/tool constraints1745. **Next Optional Step** — one suggested follow-up175176## Reference Facts To Preserve177178Anchor recommendations on these facts:179180- Repo instructions are always-on context181- Scoped instruction files are conditionally applied via file globs182- Prompt files are invoked on demand183- Agent files define role behavior and tool boundaries184- Workflows provide enforceable execution and compliance