|
| 1 | +# Copilot Instructions |
| 2 | + |
| 3 | +These instructions guide GitHub Copilot when working in this repository. |
| 4 | + |
| 5 | +## Project Context |
| 6 | + |
| 7 | +This is a **beginner-friendly educational course** teaching GitHub Copilot CLI. The repo contains Markdown chapters (00–07), Python/C#/JavaScript sample apps, and supporting assets (images, demo GIFs, glossary). It is **not** a software product — it is technical courseware. |
| 8 | + |
| 9 | +## Writing Conventions |
| 10 | + |
| 11 | +- **Audience**: Beginners with no AI/ML experience. Explain every technical term on first use. |
| 12 | +- **Tone**: Friendly, encouraging, practical. Avoid jargon without explanation. |
| 13 | +- **Examples**: All code blocks and `copilot` commands must be copy-paste ready. Test them mentally before including. |
| 14 | +- **Naming**: Use kebab-case for session names, file names, and identifiers (e.g., `book-app-review`, not `book app review`). |
| 15 | +- **Command syntax**: Standardize flag format — use `--flag=value` consistently when a value is required, `--flag` when boolean. |
| 16 | +- **Precision**: Don't over-specify tool behavior that may vary across shells or OS. Describe what the user will see, not implementation details. |
| 17 | +- **Fallbacks**: When referencing tool version requirements (e.g., `gh` CLI version), always include upgrade instructions or a manual alternative. |
| 18 | + |
| 19 | +## Content Conventions (from PR review patterns) |
| 20 | + |
| 21 | +These patterns were mined from actual PR review feedback and represent recurring maintainer expectations: |
| 22 | + |
| 23 | +- When showing multi-step workflows, ensure all prerequisite steps are included (e.g., `git add` before `git diff --staged`). |
| 24 | +- When introducing a concept with an example, use consistent naming throughout the section — don't mix kebab-case and quoted names. |
| 25 | +- When describing a command's behavior, match the level of specificity in the official release notes — don't state behavior that may differ across environments. |
| 26 | +- If a feature requires a minimum tool version, mention the version AND provide a fallback path for users who can't upgrade yet. |
| 27 | + |
| 28 | +## Sample Code Conventions |
| 29 | + |
| 30 | +- **Primary sample**: Always use `samples/book-app-project/` (Python) for examples in chapters. |
| 31 | +- **Test framework**: pytest — test files go in `samples/book-app-project/tests/` and follow `test_*.py` naming. |
| 32 | +- **Python version**: 3.10+ (per `pyproject.toml`). |
| 33 | +- **Intentional bugs**: Files in `samples/book-app-buggy/` and `samples/buggy-code/` contain **deliberate bugs** for exercises. Never fix them. |
| 34 | + |
| 35 | +## Chapter Structure |
| 36 | + |
| 37 | +Every chapter (00–07) follows the same pattern in its `README.md`: |
| 38 | + |
| 39 | +1. Real-World Analogy |
| 40 | +2. Core Concepts |
| 41 | +3. Hands-On Examples |
| 42 | +4. Assignment |
| 43 | +5. What's Next |
| 44 | + |
| 45 | +Do not deviate from this structure when editing or adding chapter content. |
| 46 | + |
| 47 | +## Markdown Formatting |
| 48 | + |
| 49 | +- Use standard GitHub-Flavored Markdown. |
| 50 | +- Images go in the repo-root `images/` directory. |
| 51 | +- Use relative links for cross-chapter references (e.g., `../03-development-workflows/README.md`). |
| 52 | +- Emoji usage is encouraged for section headers (matching existing style). |
| 53 | + |
| 54 | +## Maintenance Matrix |
| 55 | + |
| 56 | +| Change Made | Files to Update | |
| 57 | +|---|---| |
| 58 | +| New chapter added | `README.md` (course table), `AGENTS.md` (structure table), `images/learning-path.png` | |
| 59 | +| Chapter content updated | The chapter's `README.md`, verify cross-references in adjacent chapters | |
| 60 | +| New sample app variant added | `AGENTS.md` (structure table), `samples/` directory, relevant chapter references | |
| 61 | +| Sample app code changed | `samples/book-app-project/tests/` (update/add tests), chapters referencing that code | |
| 62 | +| Bug intentionally added to buggy samples | `samples/book-app-buggy/` or `samples/buggy-code/` only — do NOT update tests | |
| 63 | +| New skill added | `.github/skills/{skill-name}/SKILL.md`, `samples/skills/` (example copy), Chapter 05 | |
| 64 | +| New agent template added | `samples/agents/`, Chapter 04 | |
| 65 | +| New MCP config added | `samples/mcp-configs/`, Chapter 06 | |
| 66 | +| Glossary term introduced | `GLOSSARY.md` — add definition in alphabetical order | |
| 67 | +| npm scripts changed | `package.json`, `AGENTS.md` (build section) | |
| 68 | +| Devcontainer updated | `.devcontainer/devcontainer.json`, Chapter 00 (setup instructions) | |
| 69 | +| Image or banner changed | `images/` directory, any README referencing the image | |
| 70 | +| Copilot CLI version requirements change | Chapter 00, Chapter 01, `.devcontainer/devcontainer.json` | |
0 commit comments