Skip to content

Add file-based Copilot instructions for backend, frontend, and tests#25

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-file-based-instructions
Draft

Add file-based Copilot instructions for backend, frontend, and tests#25
Copilot wants to merge 3 commits intomainfrom
copilot/add-file-based-instructions

Conversation

Copy link

Copilot AI commented Feb 5, 2026

Implements area-specific GitHub Copilot guidance using file-based instructions that activate automatically based on file patterns.

Implementation

.github/instructions/backend.instructions.md

  • Pattern: backend/**/*.java
  • Spring Boot: REST conventions, JPA patterns, circuit breaker with Resilience4j
  • H2-primary architecture, Feign client configuration, actuator patterns

.github/instructions/frontend.instructions.md

  • Pattern: frontend/**/*.{jsx,tsx,js,ts}
  • Vite build patterns, Material-UI theming (Navy #003366, Teal #008080)
  • React Query for server state, React Router v6, component organization

.github/instructions/tests.instructions.md

  • Pattern: tests/**/*.{js,ts}
  • Playwright: role-based locators, auto-waiting patterns, POM guidelines
  • Multi-viewport testing, fixture synchronization with H2 seed data

COPILOT_INSTRUCTIONS.md

  • Documentation: pattern-matching system, non-overlapping applyTo rules
  • Repo-specific customizations, integration with existing instructions

Structure

Each instruction file uses YAML frontmatter for pattern matching:

---
name: 'Backend Java Development'
description: 'Guidelines for Spring Boot backend development'
applyTo: 'backend/**/*.java'
---

All instructions adapted from github/awesome-copilot templates with Three Rivers Bank project-specific customizations.

Original prompt

Overview

Implement file-based instructions for the agentic-devops-demo monorepo to provide area-specific Copilot guidance for Java backend, React frontend, and Playwright tests.

Context

This repository has the following structure:

  • backend/: Java Spring Boot application (Maven-based)
  • frontend/: React + Vite application with Material-UI
  • tests/: Playwright E2E tests
  • docker/: Docker configuration

Reference issue: #24

Tasks

1. Create .github/instructions/ directory structure

Create the directory .github/instructions/ if it doesn't exist.

2. Backend Java Instructions (.github/instructions/backend.instructions.md)

Create a file-based instruction for the Java backend based on the reference: https://github.com/github/awesome-copilot/blob/main/instructions/java.instructions.md

Requirements:

  • YAML frontmatter with:
    • name: 'Backend Java Development'
    • description: 'Guidelines for Spring Boot backend development'
    • applyTo: 'backend/**/*.java'
  • Reference the source instruction file in a comment at the top
  • Adapt the generic Java guidelines for Spring Boot specifics:
    • Emphasize REST API conventions
    • Include Spring Boot annotations best practices
    • Add Spring Data JPA patterns
    • Include actuator and health check guidance
  • Document any local customizations clearly

3. Frontend React Instructions (.github/instructions/frontend.instructions.md)

Create a file-based instruction for the React frontend based on the reference: https://github.com/github/awesome-copilot/blob/main/instructions/reactjs.instructions.md

Requirements:

  • YAML frontmatter with:
    • name: 'Frontend React Development'
    • description: 'Guidelines for React + Vite + Material-UI development'
    • applyTo: 'frontend/**/*.{jsx,tsx,js,ts}'
  • Reference the source instruction file in a comment at the top
  • Adapt the generic React guidelines for this project:
    • Vite-specific patterns
    • Material-UI component usage
    • React Query patterns (already used in the project)
    • Theme customization guidelines
  • Document any local customizations clearly

4. Test Instructions (.github/instructions/tests.instructions.md)

Create a file-based instruction for Playwright tests

Requirements:

  • YAML frontmatter with:
    • name: 'E2E Test Development'
    • description: 'Guidelines for Playwright E2E tests'
    • applyTo: 'tests/**/*.{js,ts}'
  • Reference relevant testing best practices from github/awesome-copilot
  • Include:
    • Playwright test structure patterns
    • Page Object Model recommendations
    • Test naming conventions
    • Assertions and locator best practices
    • Configuration guidance

5. Documentation

Update or create a COPILOT_INSTRUCTIONS.md file in the root that:

  • Lists all file-based instructions
  • Explains the pattern-matching approach
  • References the source materials from github/awesome-copilot
  • Documents any repo-specific customizations

Acceptance Criteria

  • Three instruction files created in .github/instructions/
  • Each file has proper YAML frontmatter with name, description, and applyTo fields
  • Each file clearly references the github/awesome-copilot baseline it's based on
  • applyTo patterns are specific and non-overlapping
  • Backend instructions cover Spring Boot patterns
  • Frontend instructions cover Vite + Material-UI patterns
  • Test instructions cover Playwright patterns
  • Documentation file explains the instruction structure

References

This pull request was created from Copilot chat.


💡 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.

Copilot AI and others added 2 commits February 5, 2026 17:50
Co-authored-by: yortch <4576246+yortch@users.noreply.github.com>
…Each, add semicolon

Co-authored-by: yortch <4576246+yortch@users.noreply.github.com>
Copilot AI changed the title [WIP] Add file-based instructions for Copilot guidance Add file-based Copilot instructions for backend, frontend, and tests Feb 5, 2026
Copilot AI requested a review from yortch February 5, 2026 17:54
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.

2 participants