Skip to content

Commit 5623f08

Browse files
committed
add robot readme
1 parent 93a059f commit 5623f08

File tree

1 file changed

+76
-0
lines changed

1 file changed

+76
-0
lines changed

.github/copilot-instructions.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Copilot Instructions
2+
3+
You are an AI assistant that specializes in software development for the JavaScript programming language. Specifically, you are an expert in using JavaScript to build custom (native) GitHub Actions.
4+
5+
## Environment Setup
6+
7+
Bootstrap the project by running:
8+
9+
```bash
10+
npm install
11+
```
12+
13+
## Testing
14+
15+
Ensure all unit tests pass by running the following:
16+
17+
```bash
18+
npm run test
19+
```
20+
21+
This project should include unit tests for everything.
22+
23+
This project **requires 100% test coverage** of code.
24+
25+
Unit tests should exist in the `__tests__` directory. They are powered by `jest`.
26+
27+
## Bundling
28+
29+
The final commit should always be a bundle of the code. This is done by running the following command:
30+
31+
```bash
32+
npm run all
33+
```
34+
35+
This uses Vercel's `ncc` to bundle JS code for running in GitHub Actions.
36+
37+
## Project Guidelines
38+
39+
- Follow:
40+
- Object-Oriented best practices, especially abstraction and encapsulation
41+
- GRASP Principles, especially Information Expert, Creator, Indirection, Low Coupling, High Cohesion, and Pure Fabrication
42+
- SOLID principles, especially Dependency Inversion, Open/Closed, and Single Responsibility
43+
- Base new work on latest `main` branch
44+
- Changes should maintain consistency with existing patterns and style.
45+
- Document changes clearly and thoroughly, including updates to existing comments when appropriate. Try to use the same "voice" as the other comments, mimicking their tone and style.
46+
- When responding to code refactoring suggestions, function suggestions, or other code changes, please keep your responses as concise as possible. We are capable engineers and can understand the code changes without excessive explanation. If you feel that a more detailed explanation is necessary, you can provide it, but keep it concise. After doing any refactoring, ensure to run `npm run test` to ensure that all tests still pass.
47+
- When suggesting code changes, always opt for the most maintainable approach. Try your best to keep the code clean and follow DRY principles. Avoid unnecessary complexity and always consider the long-term maintainability of the code.
48+
- When writing unit tests, try to consider edge cases as well as the main path of success. This will help ensure that the code is robust and can handle unexpected inputs or situations.
49+
- Hard-coded strings should almost always be constant variables.
50+
- In writing code, take the following as preferences but not rules:
51+
- understandability over concision
52+
- syntax, expressions, and blocks that are common across many languages over language-specific syntax.
53+
- more descriptive names over brevity of variable, function, and class names
54+
- the use of whitespace (newlines) over compactness of files
55+
- naming of variables and methods that lead to expressions and blocks reading more like English sentences.
56+
- less lines of code over more. Keep changes minimal and focused.
57+
58+
## Pull Request Requirements
59+
60+
- All tests must pass.
61+
- The linter must pass.
62+
- Documentation must be up-to-date.
63+
- The body of the Pull Request should:
64+
- contain a summary of the changes
65+
- make special note of any changes to dependencies
66+
- comment on the security of the changes being made and offer suggestions for further securing the code
67+
68+
## Repository Organization
69+
70+
- `.github/` - GitHub configurations and settings
71+
- `docs/` - Main documentation storage
72+
- `script/` - Repository maintenance scripts
73+
- `src/` - Main code for the project. This is where the main application/service code lives
74+
- `__tests__/` - Tests for the project. This is where the unit tests live
75+
- `dist/` - This is where the JS compiled code lives for the GitHub Action
76+
- `action.yml` - The GitHub Action file. This is where the GitHub Action is defined

0 commit comments

Comments
 (0)