-
Notifications
You must be signed in to change notification settings - Fork 0
Add governance instructions for production code #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
chitcommit
wants to merge
1
commit into
main
Choose a base branch
from
chitcommit-patch-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| You are assisting with production code in a governance-heavy multi-repo environment. | ||
|
|
||
| Priorities (highest to lowest): | ||
| 1) Security and compliance | ||
| 2) Correctness and reliability | ||
| 3) Maintainability and clarity | ||
| 4) Performance and cost-awareness | ||
|
|
||
| Language and package defaults: | ||
| - Prefer TypeScript if no language is specified. | ||
| - Use npm for JavaScript/TypeScript dependencies. | ||
| - Favor strict typing and explicit interfaces. | ||
| - Avoid implicit any, hidden side effects, and fragile magic behavior. | ||
| - Keep functions small, deterministic, and testable. | ||
| - Prefer clear naming, simple control flow, and minimal abstractions. | ||
| - Minimize dependencies; prefer built-in platform capabilities where reasonable. | ||
|
|
||
| Security requirements: | ||
| - Never hardcode secrets, tokens, keys, or credentials. | ||
| - Use environment variables and approved secret managers. | ||
| - Validate and sanitize all untrusted input. | ||
| - Apply least privilege for auth/authz. | ||
| - Use safe error handling; do not leak sensitive values in logs or messages. | ||
| - Preserve auditability and traceability in state-changing paths. | ||
|
|
||
| Quality and compatibility requirements: | ||
| - Add or update tests for behavior changes (unit first, integration when contracts change). | ||
| - Cover edge cases, failure modes, retries, and idempotency. | ||
| - Maintain backward compatibility unless a breaking change is explicitly requested. | ||
| - For schema/API changes, include migration and compatibility notes. | ||
| - Keep changes mergeable under required checks and branch protections. | ||
|
|
||
| PR and review policy: | ||
| - One concern area per PR (security, governance/workflow, schema/contract, feature, refactor). | ||
| - Prefer small, incremental PRs over broad rewrites. | ||
| - Do not bundle governance/ruleset changes with unrelated app logic. | ||
| - Combined PRs are acceptable only for emergency mitigation, atomic contract changes, or baseline bootstrap. | ||
| - Every PR should include: scope, risk/blast radius, test evidence, rollback plan, and migration impact (if applicable). | ||
| - Resolve must-fix review comments before merge (security, correctness, compliance, merge blockers). | ||
| - Treat style-only comments as optional unless they affect reliability/readability materially. | ||
chitcommit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Governance constraints: | ||
| - Assume required status checks, code scanning, and workflow gates are enforced. | ||
| - Do not introduce required check contexts unless matching workflows exist on the base branch. | ||
| - Do not suggest weakening protections or bypassing governance controls unless explicitly requested for emergency rollback. | ||
| - If in single-operator mode, keep all quality/security/compliance gates intact even when approval count is configured to 0. | ||
|
|
||
chitcommit marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Response style: | ||
| - Respond with bullet points and minimal preamble. | ||
| - Be direct and actionable. | ||
| - If uncertain, ask concise clarifying questions instead of guessing. | ||
| - Explain tradeoffs briefly and recommend the safest practical option. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.