agentleFS
MicrosoftKnown publishermicrosoft/WhatTheHack-Codespaces/076-GitHubCopilotCostOptimization/Student/Resources/Challenge-02-NYCApp/.github/copilot-instructions.md

WhatTheHack-Codespaces / Challenge-02-NYCApp

Copilot instructions5 starsChanged 15 months agoMITView on GitHub

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 1

    1. microsoft/WhatTheHack★ 1.9k100% same

    Edited · 0

    None found.

    Wrote their own version · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repositoryOne other file it gives its agents.

The file

Show its rules and text

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

42 rules. About 2 are common, 40 are distinctive, and 0 are very specific to this project.

  • ≈2

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈40

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Always use REST APIs

    line 6
  2. Distinctive:

    Always use React hooks

    line 7
  3. Distinctive:

    Always write clean, maintainable, scalable, and production-ready code

    line 20
  4. Distinctive:

    Always validate all inputs at every layer of the application

    line 21
  5. Common:

    Always handle errors gracefully with meaningful error messages

    line 22
  6. Distinctive:

    Always use descriptive variable and function naming

    line 23
  7. Distinctive:

    Always include comments explaining business logic

    line 24
  8. Distinctive:

    Avoid deeply nested logic whenever possible

    line 25
  9. Distinctive:

    Prefer modular and reusable components

    line 26
  10. Distinctive:

    Ensure all code is optimized for performance

    line 27
  11. Distinctive:

    Avoid unnecessary computations and loops

    line 28
  12. Distinctive:

    Use RESTful conventions for all endpoints

    line 32
  13. Distinctive:

    Ensure consistent naming for endpoints (plural nouns)

    line 33
  14. Distinctive:

    Always return JSON responses

    line 34
  15. Distinctive:

    Always include HTTP status codes

    line 35
  16. Common:

    Use middleware for validation and error handling

    line 37
  17. Distinctive:

    Never expose internal implementation details in responses

    line 43
  18. Distinctive:

    Use React functional components only

    line 46
  19. Distinctive:

    Prefer hooks over class components

    line 47
  20. Distinctive:

    Use useEffect and useState appropriately

    line 48
  21. Distinctive:

    Ensure accessibility (ARIA labels, keyboard navigation)

    line 49
  22. Distinctive:

    Use responsive design principles

    line 51
  23. Distinctive:

    Ensure clean UI/UX design patterns

    line 53
  24. Distinctive:

    Use consistent field naming across all datasets

    line 58
  25. Distinctive:

    Prefer arrays of objects for collections

    line 59
  26. Distinctive:

    Always use ISO date formats (YYYY-MM-DD)

    line 60
  27. Distinctive:

    Avoid null values when possible

    line 61
  28. Distinctive:

    Ensure backward compatibility of schema changes

    line 62
  29. Distinctive:

    Use engaging and descriptive language

    line 86
  30. Distinctive:

    Ensure event data is complete and valid

    line 99
  31. Distinctive:

    Write unit tests for business logic

    line 102
  32. Distinctive:

    Write integration tests for endpoints

    line 103
  33. Distinctive:

    Ensure proper test coverage (at least 80%)

    line 105
  34. Distinctive:

    Test edge cases thoroughly

    line 106
  35. Distinctive:

    Ensure logs are structured

    line 112
  36. Distinctive:

    Avoid logging sensitive data

    line 114
  37. Distinctive:

    Avoid exposing secrets or keys

    line 119
  38. Distinctive:

    Use environment variables for configuration

    line 120
  39. Distinctive:

    Follow principle of least privilege

    line 121
  40. Distinctive:

    Keep examples fun and NYC-specific

    line 124
  41. Distinctive:

    Use relatable, local descriptions

    line 126
  42. Distinctive:

    Avoid generic or bland wording

    line 127

≈ “Common” is an estimate: at least 1 in 5 of the 3,779 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 (INTENTIONALLY BLOATED) - Always validate inputs - Always handle errors - Always use REST APIs - Always use React hooks - Always optimize performance - Always write tests - Always ensure accessibility - Always normalize JSON - Restaurants must include cuisine and borough - Neighborhoods must include transit and vibe - Events must include price and date filtering # TOO BIG ON PURPOSE -->

Copilot Instructions (INTENTIONALLY BLOATED)

General Engineering Rules

  • Always write clean, maintainable, scalable, and production-ready code
  • Always validate all inputs at every layer of the application
  • Always handle errors gracefully with meaningful error messages
  • Always use descriptive variable and function naming
  • Always include comments explaining business logic
  • Avoid deeply nested logic whenever possible
  • Prefer modular and reusable components
  • Ensure all code is optimized for performance
  • Avoid unnecessary computations and loops
  • Minimize memory usage and API calls

API Design Rules

  • Use RESTful conventions for all endpoints
  • Ensure consistent naming for endpoints (plural nouns)
  • Always return JSON responses
  • Always include HTTP status codes
  • Validate all query parameters and request bodies
  • Use middleware for validation and error handling
  • Return responses in the format: { "count": number, "data": [] }
  • Never expose internal implementation details in responses

Frontend Rules (NOT RELEVANT BUT INCLUDED)

  • Use React functional components only
  • Prefer hooks over class components
  • Use useEffect and useState appropriately
  • Ensure accessibility (ARIA labels, keyboard navigation)
  • Optimize rendering performance
  • Use responsive design principles
  • Avoid unnecessary re-renders
  • Ensure clean UI/UX design patterns

Data Modeling Rules

  • Normalize JSON structures
  • Avoid duplicate data
  • Use consistent field naming across all datasets
  • Prefer arrays of objects for collections
  • Always use ISO date formats (YYYY-MM-DD)
  • Avoid null values when possible
  • Ensure backward compatibility of schema changes

Restaurant Domain Rules (NOT NEEDED FOR EVENTS)

  • Restaurants must include:
    • name
    • borough
    • cuisine
    • rating
    • priceLevel
  • Include vegetarian-friendly indicators
  • Include neighborhood information
  • Include vibe descriptions (e.g., cozy, lively, romantic)
  • Include wait time estimates for popular locations

Neighborhood Domain Rules (NOT NEEDED FOR EVENTS)

  • Neighborhoods must include:
    • borough
    • vibe
    • transit options
    • average rent tier
    • bestFor categories
  • Include walkability information
  • Include proximity to parks, restaurants, and nightlife
  • Include safety considerations
  • Use engaging and descriptive language

Events Domain Rules (ACTUALLY RELEVANT)

  • Events must include:
    • name
    • date
    • location
    • borough
    • price
  • Free events must have price === 0
  • Events must be filtered based on date when required
  • Events must be sorted by date ascending
  • Exclude past events
  • Ensure event data is complete and valid

Testing Rules (NOT USED IN THIS TASK)

  • Write unit tests for business logic
  • Write integration tests for endpoints
  • Mock dependencies when necessary
  • Ensure proper test coverage (at least 80%)
  • Test edge cases thoroughly
  • Validate error handling paths

Logging and Monitoring Rules

  • Log all important actions
  • Log errors with stack traces (but not in responses)
  • Ensure logs are structured
  • Include timestamps in logs
  • Avoid logging sensitive data

Security Rules

  • Validate all inputs to prevent injection attacks
  • Sanitize user input
  • Avoid exposing secrets or keys
  • Use environment variables for configuration
  • Follow principle of least privilege

NYC Content & Tone Rules

  • Keep examples fun and NYC-specific
  • Reference locations like Central Park, Brooklyn, SoHo, Williamsburg
  • Use relatable, local descriptions
  • Avoid generic or bland wording
  • Make the application feel like it’s built for a real NYC resident

Performance Optimization Rules

  • Optimize loops and filtering logic
  • Avoid redundant computations
  • Cache results where possible
  • Minimize memory footprint
  • Reduce unnecessary API calls

⚠️ THIS FILE IS INTENTIONALLY OVERLOADED

It includes:

  • ✅ relevant rules (events)
  • ❌ irrelevant domains (restaurants, neighborhoods)
  • ❌ unrelated layers (frontend, security, logging, testing)

👉 Students should REDUCE this drastically.

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.