Skip to content

Commit c7438c1

Browse files
Copilotbrabster
andauthored
Remove Gemini Code Assist elements and consolidate into Copilot instructions (#44)
* Initial plan * Remove Gemini-specific elements and incorporate content into copilot-instructions.md Co-authored-by: brabster <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: brabster <[email protected]>
1 parent 77e8ff0 commit c7438c1

14 files changed

+42
-654
lines changed

.github/copilot-instructions.md

Lines changed: 42 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This repository produces container images for data-centric development on Google Cloud Platform. The images include Terraform, Google Cloud SDK, and Python. They are designed for use in GitHub Codespaces and GitHub Actions.
44

5-
**Always review `GEMINI.md` for complete project information, goals, and principles.**
5+
The container images are used for data processing systems using Python, dbt and GCP. The README file and any other documentation must always reflect what the repository does and how it works. Changes to the README file can be proposed, but must be carefully considered to minimise impact to consumers.
66

77
## Project goals and principles
88

@@ -14,6 +14,12 @@ This repository produces container images for data-centric development on Google
1414
- Use sentence case for headings, labels, and badges
1515
- Make minimal changes - don't reformat code unnecessarily
1616
- Ensure README and documentation always reflect what the project actually does
17+
- Where possible, ensure that a push to GitHub Actions is not required to exercise and test things and instead capabilities and features can be tested interactively first
18+
- The number of dependencies must be minimised
19+
- Trust for a dependency must be determined primarily based on the methods described at https://snyk.io/advisor
20+
- Trusted maintainers and suppliers take responsibility for the transitive dependencies of their projects. Only direct dependencies need to be considered
21+
- Each dependency must be annotated at point of inclusion with a comment declaring the maintaining party
22+
- A list of all direct dependencies and maintaining parties must be called out in a README section
1723

1824
## Agent environment
1925

@@ -42,16 +48,46 @@ The CI/CD pipeline (`.github/workflows/docker-publish.yml`) automatically builds
4248
- All dependencies must automatically update to latest versions when the image is built
4349
- Every dependency must be annotated with its maintaining party
4450
- Only add software from explicitly trusted maintainers
45-
- Python packages must have a Snyk Advisor package health score greater than 80
46-
- Review the detailed rules in `prompts/rules/03-supply-chain-security.md`
51+
- Python packages must have a Snyk Advisor package health score greater than 80 (check at https://snyk.io/advisor/python/packagename)
52+
- NEVER ADD ANY SOFTWARE FROM A MAINTAINER THAT IS NOT EXPLICITLY TRUSTED
53+
- Dependencies include: GitHub actions, Docker base images, operating system packages, installed libraries and applications, Python packages, and dbt packages
4754

4855
## Code style and contribution guidelines
4956

50-
- Follow rules documented in `prompts/rules/` directory
51-
- Bash scripts must follow practices in `prompts/rules/01-bash-scripting-rules.md`
52-
- Dockerfile changes must follow `prompts/rules/02-dockerfile-best-practices.md`
5357
- Commit messages should describe **why** the change was made, not what was changed
5458
- Test interactively before pushing to GitHub Actions when possible
59+
- Keep responses concise and to the point
60+
61+
### Bash scripting
62+
63+
- Write scripts that are reliable, maintainable, and secure
64+
- Scripts should be idempotent, meaning they can be run multiple times with the same outcome
65+
- Use `set -euo pipefail` to make scripts more robust (fail fast, treat unset variables as errors, fail on pipeline errors)
66+
- Always start scripts with `#!/bin/env bash` to specify the interpreter
67+
- Use comments to explain complex logic
68+
- Break down code into functions to avoid repetition
69+
- Use clear and descriptive variable names
70+
- Never hardcode secrets - use environment variables or a secure vault
71+
- Validate inputs to prevent command injection
72+
- Use absolute paths for files and commands
73+
- Use tools like `shellcheck` to identify potential issues
74+
- Implement logging to help with debugging
75+
76+
### Dockerfile best practices
77+
78+
- Dockerfiles should be clear, concise, and easy to understand
79+
- Images should be as small as possible while still containing all necessary dependencies
80+
- Security is a primary concern; images should be secure by default
81+
- Use official and trusted base images
82+
- Default to a rolling tag like `latest` or `rolling` to ensure base images are continuously updated (trades stability for security)
83+
- Employ multi-stage builds to separate build-time dependencies from runtime dependencies
84+
- Minimize the number of layers by combining related commands
85+
- Use a `.dockerignore` file to exclude unnecessary files
86+
- Avoid running containers as the root user - create and switch to a non-root user
87+
- Each new command should be on a new line with appropriate continuation characters (`\` and `&&`)
88+
- Use `COPY` instead of `ADD` unless you need ADD's specific features
89+
- Keep image dependencies to a minimum
90+
- Never store secrets in Dockerfiles
5591

5692
## Code quality and refactoring
5793

@@ -74,7 +110,6 @@ The AI performing a pull request review is an expert in modern engineering pract
74110

75111
Code reviews must include:
76112

77-
- review of `GEMINI.md` to understand the goals and style of the project
78113
- a review of what has changed for any security issues or improvements that could be made
79114
- whether the `CHANGELOG.md` file includes the current PR. If it does not, the reviewer should propose an entry for the PR, following the layout and content of existing entries
80115
- whether the `README.md` file reflects what the project actually does

GEMINI.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

GEMINI_LOG.md

Lines changed: 0 additions & 92 deletions
This file was deleted.

prompts/02-chat-pinning.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

prompts/features/00-feature-template-meta.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)