agentleFS
pandiarajan-srcpandiarajan-src/skills-getting-started-with-github-copilot/.github/copilot-instructions.md

skills-getting-started-with-github-copilot

Copilot instructions0 starsChanged 12 months agoMITView on GitHub

This is a web application for managing extracurricular activities at Mergington High School. Students can browse available activities and sign up using their school email addresses. Adding a new activity: - Add entry to activities dictionary in app.py - No frontend changes needed (automatically populated) Adding a new API endpoint: - Define route in app.py with appropriate decorator (@app.get, @app.post) - Update frontend JavaScript to call new endpoint Adding validation: - Backend: Use Pydantic models or manual validation - Frontend:…

  • Installs packages

The file

Show its rules and text

We split this copilot-instructions.md into the rules it gives an agent

26 rules. About 0 are common, 17 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈17

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No Framework: Use plain JavaScript, avoid adding React/Vue/Angular

    line 50
  2. Very specific:

    API Communication: Use native fetch() API with async/await

    line 51
  3. Very specific:

    DOM Manipulation: Use querySelector, createElement, appendChild

    line 52
  4. Very specific:

    Event Handling: Add listeners via addEventListener

    line 53
  5. Distinctive:

    Styling: Use CSS classes, avoid inline styles

    line 54
  6. Distinctive:

    Use type hints for function parameters and return values

    line 60
  7. Distinctive:

    Follow PEP 8 style guide

    line 61
  8. Distinctive:

    Use async/await for async endpoints (if needed in future)

    line 62
  9. Very specific:

    Keep business logic in app.py (simple monolithic structure)

    line 64
  10. Distinctive:

    Use ES6+ syntax (const/let, arrow functions, template literals)

    line 68
  11. Distinctive:

    Use class selectors over IDs for styling

    line 83
  12. Very specific:

    Backend changes: Update src/app.py with new endpoints or logic

    line 96
  13. Very specific:

    Styling: Add classes to src/static/styles.css

    line 98
  14. Very specific:

    Data changes: Update the activities dictionary structure if needed

    line 99
  15. Very specific:

    Add entry to activities dictionary in app.py

    line 104
  16. Distinctive:

    No frontend changes needed (automatically populated)

    line 105
  17. Distinctive:

    Update frontend JavaScript to call new endpoint

    line 109
  18. Distinctive:

    Email Format: Must be valid email (validated client-side)

    line 117
  19. Distinctive:

    Participants: No duplicate checking currently implemented

    line 119
  20. Distinctive:

    No database (in-memory storage only)

    line 126
  21. Distinctive:

    No email domain validation (@mergington.edu)

    line 127
  22. Distinctive:

    No duplicate signup prevention

    line 128
  23. Distinctive:

    When suggesting improvements, consider:

    line 135
  24. Distinctive:

    Test signup with various email formats

    line 170
  25. Distinctive:

    Verify activity list displays correctly

    line 171
  26. Distinctive:

    Check error handling for invalid activity names

    line 172

≈ “Common” is an estimate: at least 1 in 5 of the 3,950 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Copilot Instructions for Mergington High School Activities Platform

Project Overview

This is a web application for managing extracurricular activities at Mergington High School. Students can browse available activities and sign up using their school email addresses.

Technology Stack

  • Backend: Python 3.x with FastAPI framework
  • Frontend: Vanilla JavaScript (ES6+), HTML5, CSS3
  • Server: Uvicorn ASGI server
  • Data Storage: In-memory Python dictionary (non-persistent)

Project Structure

src/
├── app.py              # FastAPI application with REST endpoints
└── static/
    ├── index.html      # Main HTML page
    ├── app.js          # Frontend JavaScript logic
    └── styles.css      # Application styling

Architecture Guidelines

Backend (FastAPI)

  • Entry Point: src/app.py
  • API Endpoints:
    • GET / — Redirects to index.html
    • GET /activities — Returns all activities as JSON
    • POST /activities/{activity_name}/signup?email=<email> — Registers a student
  • Data Model: Activities stored as nested dictionary with structure:
    {
      "Activity Name": {
        "description": str,
        "schedule": str,
        "max_participants": int,
        "participants": list[str]
      }
    }
  • CORS: Enabled with CORSMiddleware for all origins (development setting)
  • Static Files: Mounted at /static route, served from src/static directory

Frontend (Vanilla JavaScript)

  • No Framework: Use plain JavaScript, avoid adding React/Vue/Angular
  • API Communication: Use native fetch() API with async/await
  • DOM Manipulation: Use querySelector, createElement, appendChild
  • Event Handling: Add listeners via addEventListener
  • Styling: Use CSS classes, avoid inline styles

Coding Conventions

Python/FastAPI

  • Use type hints for function parameters and return values
  • Follow PEP 8 style guide
  • Use async/await for async endpoints (if needed in future)
  • HTTP exceptions via fastapi.HTTPException
  • Keep business logic in app.py (simple monolithic structure)

JavaScript

  • Use ES6+ syntax (const/let, arrow functions, template literals)
  • Async functions with try/catch for error handling
  • Clear function names: loadActivities(), handleSignup(), showMessage()
  • Display user feedback via #message element
  • Auto-hide success messages after 5 seconds

HTML

  • Semantic HTML5 elements (<header>, <main>, <section>, <footer>)
  • Form validation attributes (required, type="email")
  • Accessibility: proper <label> associations with for attribute
  • IDs for JavaScript hooks: #activities-list, #signup-form, #message

CSS

  • Use class selectors over IDs for styling
  • Maintain consistent color scheme:
    • Primary: #1a237e (dark blue)
    • Accent: #ffa000 (amber)
    • Success: #4caf50 (green)
    • Error: #f44336 (red)
  • Mobile-first responsive design
  • Utility classes: .hidden for visibility toggling

Development Practices

When Adding Features

  1. Backend changes: Update src/app.py with new endpoints or logic
  2. Frontend changes: Modify src/static/app.js for new UI behavior
  3. Styling: Add classes to src/static/styles.css
  4. Data changes: Update the activities dictionary structure if needed

Common Tasks

Adding a new activity:

  • Add entry to activities dictionary in app.py
  • No frontend changes needed (automatically populated)

Adding a new API endpoint:

  • Define route in app.py with appropriate decorator (@app.get, @app.post)
  • Update frontend JavaScript to call new endpoint

Adding validation:

  • Backend: Use Pydantic models or manual validation
  • Frontend: Add HTML5 attributes or JavaScript checks

Data Constraints

  • Email Format: Must be valid email (validated client-side)
  • Activity Names: Case-sensitive, must match exactly
  • Participants: No duplicate checking currently implemented
  • Capacity: max_participants field exists but not enforced
  • Persistence: Data resets on server restart (in-memory only)

Known Limitations

  • No authentication/authorization
  • No database (in-memory storage only)
  • No email domain validation (@mergington.edu)
  • No duplicate signup prevention
  • No capacity enforcement
  • No admin interface
  • No logging infrastructure

Future Considerations

When suggesting improvements, consider:

  • Azure Cosmos DB for persistent storage (if asked about databases)
  • Pydantic models for request/response validation
  • Email domain validation for @mergington.edu
  • Duplicate signup prevention by email
  • Capacity checking before signup
  • Admin endpoints for activity management
  • Logging with Python's logging module

Demo/Tutorial Context

This project is part of a GitHub Copilot learning exercise. Focus on:

  • Clear, readable code over complex optimizations
  • Educational comments when appropriate
  • Following existing patterns and conventions
  • Incremental improvements rather than complete rewrites

Running the Application

# Activate virtual environment (Windows)
demoenv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run server
uvicorn src.app:app --reload

# Access at http://localhost:8000

Testing Approach

  • Manual testing via browser
  • Test signup with various email formats
  • Verify activity list displays correctly
  • Check error handling for invalid activity names
  • Validate responsive design on different screen sizes

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.