Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 3, 2025

Summary

This PR significantly improves the Copilot instructions file by making it more succinct, adding folder-specific guidance, and capturing best practices for development, testing, and PR/commit styling.

Key Changes

1. More Succinct Main Instructions

  • Reduced from 155 to 135 lines (-13%) while retaining all essential information
  • Eliminated duplication: Consolidated timing information scattered across 3 sections into a single table
  • Streamlined structure: Reorganized into logical sections (Quick Start → Structure → Workflow → Best Practices)
  • Actionable commands: Added Quick Start section with copy-paste ready command blocks

2. Folder-Specific Instructions

Created two new instruction files for detailed guidance:

.github/copilot-instructions-src.md (74 lines)

  • Architecture overview mapping all components and their responsibilities
  • State management patterns (contexts, readonly history)
  • Guidance for adding features and making changes
  • JavaScript-specific testing instructions

.github/copilot-instructions-windows.md (79 lines)

  • C++/WinRT and UWP architecture explanation
  • Native module details (VersionInfo, Speech) with codegen structure
  • Building, debugging, and Visual Studio integration
  • Platform-specific limitations and requirements

3. PR and Commit Guidelines

Added new section with explicit guidance:

  • Commit messages: Capture WHY (context) not what/how, use imperative mood, be succinct
  • Good examples: "Fix crash when API key is empty" vs "Fixed bug"
  • PR titles: Short summary in imperative mood, describe the change not the issue
  • Reference: Links to https://cbea.ms/git-commit/ for detailed best practices

4. Best Practices for Development

Added comprehensive guidance to prevent common issues:

  • Minimal changes: Only modify what's necessary, don't mix functional and style changes
  • Testing: Test product code not tests themselves, match existing patterns
  • Linting: Fix only on modified lines unless PR is specifically for linting
  • File changes: Quick reference for what files to modify for different tasks

5. Clearer Build Instructions

  • Quick Start section: All essential commands in one place at the top
  • Platform clarity: Clear indication of Windows vs cross-platform commands
  • Timing table: Consolidated all timing expectations into scannable format
  • Prerequisites: Explicit Windows build setup with PowerShell command

Benefits

  • Faster onboarding: Quick Start gets developers productive immediately
  • Better discovery: Folder-specific guides help developers find relevant information
  • Higher quality PRs: Explicit guidelines encourage better commit messages and minimal changes
  • Reduced confusion: No more scattered timing info or repeated prerequisites
  • Easier maintenance: Modular structure makes updates simpler

Verification

  • ✅ Metro bundler compiles successfully
  • ✅ No new linting errors introduced
  • ✅ All existing workflows and commands preserved
  • ✅ Total documentation expanded from 155 to 288 lines across 3 well-organized files

Fixes #176

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/react-native-community/rn-diff-purge/tags
    • Triggering command: node /home/REDACTED/work/artificial-chat/artificial-chat/node_modules/.bin/react-native start (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Improve Copilot instructions file</issue_title>
<issue_description>### Summary

Copilot created an initial instructions file with #163
I'd like to improve it in a number of ways:

Make more succinct

The instructions file today has a fair amount of duplication that I don't think helps

Folder-specific instructions

Where appropriate, create instructions files for detail on specific folders (example: clarifying the windows folders where the app lives, or the src folder where the JavaScript lives and can be detailed)

PR and Commit styling

I don't actually know if these will modify Copilot behavior, but I'd like to curate good commit messages and PR descriptions. Example:
| PR title should be a short summary in imperative mood (Fix, not Fixing or Fixed).
| A good commit message
| - captures the why (context) not how / what (which git diff can always show)
| - is succinct.
https://cbea.ms/git-commit/

Capture common good practices

I've seen a lot of PRs go by that add tests that test themselves and not product code. Or that touch more lines of code than are strictly necessary. Or combine styling changes with functional changes. None of these are good behavior.

Make it more clear how to build and run

I'm not confident the agents are executing the code they're building, and I'd like to improve that.</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #184

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

…ctices

Co-authored-by: chrisglein <26607885+chrisglein@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve Copilot instructions file Improve Copilot instructions with folder-specific guides and best practices Oct 3, 2025
Copilot AI requested a review from chrisglein October 3, 2025 18:02
Copilot finished work on behalf of chrisglein October 3, 2025 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Copilot instructions file

2 participants