Include .md file similar to README.md in an Angular project as a reference for GitHub Copilot or any other LLMs #61450
Labels
Milestone
Content-Length: 236502 | pFad | http://github.com/angular/angular/issues/61450
5FFetched URL: http://github.com/angular/angular/issues/61450
Alternative Proxies:
Which @angular/* package(s) are relevant/related to the feature request?
core, common, platform-browser, router
Description
When setting up a new Angular project, it’s beneficial to include a .md file in the default folder structure to store predefined prompts for GitHub Copilot or other LLMs.
We can create a .md file—just like a README.md—to provide reference material for GitHub Copilot or any other LLM-based assistant in our Angular project. This markdown file can serve as documentation, guidelines, code snippets, or even prompts to help Copilot generate better suggestions.
For example, we can have a GUIDE.md or PROMPT_GUIDE.md with structured information, such as:
Project Overview: A short introduction about the purpose and architecture of the project.
Code Style & Guidelines: Define best practices that Copilot should follow when suggesting code.
Common Patterns & Examples: Include sample code snippets that Copilot can use as reference.
Prompt Engineering: If using an LLM chat, describe how to phrase queries effectively to get better responses.
Proposed solution
Create an Angular application:
ng new my-angular-app
The ideal propsed hierarchy should look like this:
src/
│── app/
│ │── core/ # Services & Singleton modules (Auth, API, Interceptors)
│ │── shared/ # Reusable components, pipes, and directives
│ │── features/ # Feature modules (Dashboard, Users, etc.)
│ │── layout/ # Header, Footer, Navigation components
│── assets/
│── environments/
│── styles/ # Global styles
│── docs/ # Documentation folder (Optional)
│ │── PROMPT_GUIDE.md # A collection of effective prompts for GitHub Copilot or other LLMs.
│── main.ts
│── index.html
Alternatives considered
We can include these files as well in the docs/ folder structe:
CODE_SNIPPETS.md – Pre-written code snippets that an LLM can use to generate related suggestions.
BEST_PRACTICES.md – Guidance on writing effective queries for AI-assisted coding.
WORKFLOW_AUTOMATION.md – How LLMs can assist with repetitive tasks like documentation, bug fixes, and refactoring.
The text was updated successfully, but these errors were encountered: