Regenerate copilot-instructions.md for GitHub Copilot with preserved team directives
Regenerate GitHub Copilot instructions while preserving team directives. Use this when project state changes or to integrate AIWG framework with Copilot.
/plugin marketplace add jmagly/ai-writing-guide/plugin install jmagly-utils-plugins-utils@jmagly/ai-writing-guideRegenerate the .github/copilot-instructions.md file for GitHub Copilot integration, analyzing current project state while preserving team directives and organizational requirements.
| Flag | Description |
|---|---|
--no-backup | Skip creating backup file |
--dry-run | Preview changes without writing |
--show-preserved | List all detected preserved content and exit |
--full | Full regeneration, preserve nothing (destructive) |
Unless --no-backup specified:
.github/copilot-instructions.md exists.github/copilot-instructions.md.backup-{YYYYMMDD-HHMMSS}Same preservation patterns as other platforms:
<!-- PRESERVE --> ... <!-- /PRESERVE -->.github/workflows/).github/agents/ configurationCheck installed frameworks by scanning:
.github/agents/ for custom agents (YAML format).github/copilot/ for Copilot configuration.github/workflows/ for CI/CD workflowsRead registry for framework versions.
Document Structure:
# GitHub Copilot Instructions
Project instructions for GitHub Copilot AI assistance.
## Project Overview
{Description from README.md or package.json}
## Tech Stack
- **Language**: {detected languages}
- **Framework**: {detected frameworks}
- **Package Manager**: {npm/yarn/pnpm/etc.}
## Development Commands
| Command | Description |
|---------|-------------|
| `npm install` | Install dependencies |
| `npm run build` | Build project |
| `npm test` | Run tests |
## Project Structure
src/ → Source code test/ → Test files docs/ → Documentation .github/ → GitHub configuration
## Code Conventions
{Project-specific conventions}
---
## Team Directives
<!-- PRESERVED SECTION -->
{ALL PRESERVED CONTENT}
<!-- /PRESERVED SECTION -->
---
## AIWG Framework Integration
This project uses AIWG SDLC framework with GitHub Copilot.
### Custom Agents
Agents are deployed to `.github/agents/` as YAML files.
Invoke via @-mention in Copilot Chat:
```text
@security-architect Review the authentication implementation
@test-engineer Generate unit tests for the user service
For automated issue resolution:
| Request | Maps To |
|---|---|
| "run security review" | flow-security-review-cycle |
| "check status" | project-status |
| "start iteration N" | flow-iteration-dual-track |
{If .aiwg/ exists:}
| Category | Location |
|---|---|
| Requirements | @.aiwg/requirements/ |
| Architecture | @.aiwg/architecture/ |
| Topic | Reference |
|---|---|
| Orchestration | @~/.local/share/ai-writing-guide/agentic/code/addons/aiwg-utils/prompts/core/orchestrator.md |
| Agent Design | @~/.local/share/ai-writing-guide/agentic/code/addons/aiwg-utils/prompts/agents/design-rules.md |
{If SDLC framework installed:}
| Topic | Reference |
|---|---|
| Natural Language | @~/.local/share/ai-writing-guide/agentic/code/frameworks/sdlc-complete/docs/simple-language-translations.md |
~/.local/share/ai-writing-guide
### Step 6: Write Output
**If `--dry-run`:** Display content, do not write.
**Otherwise:**
1. Ensure `.github/` directory exists
2. Write to `.github/copilot-instructions.md`
3. Report summary
Backup: .github/copilot-instructions.md.backup-20251206-153512
Preserved: 2 sections, 15 lines Regenerated: Project overview, structure, AIWG integration
Output: .github/copilot-instructions.md (187 lines)
## Examples
```bash
# Regenerate copilot-instructions.md
/aiwg-regenerate-copilot
# Preview changes
/aiwg-regenerate-copilot --dry-run
# Check preserved content
/aiwg-regenerate-copilot --show-preserved
# Full regeneration
/aiwg-regenerate-copilot --full
| Command | Regenerates |
|---|---|
/aiwg-regenerate-claude | CLAUDE.md |
/aiwg-regenerate-warp | WARP.md |
/aiwg-regenerate-agents | AGENTS.md |
/aiwg-regenerate-cursorrules | .cursorrules |
/aiwg-regenerate-windsurfrules | .windsurfrules |
/aiwg-regenerate-copilot | copilot-instructions.md |
/aiwg-regenerate | Auto-detect |