-
Notifications
You must be signed in to change notification settings - Fork 0
chore: sync AGENTS.md, agent definitions, standards, and lint scripts from TemplateDotNetTool #68
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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,70 @@ | ||
| --- | ||
| name: Coding Principles | ||
| description: Follow these standards when developing any software code. | ||
| --- | ||
|
|
||
| # Coding Principles Standards | ||
|
|
||
| This document defines universal coding principles and quality standards for software development within | ||
| Continuous Compliance environments. | ||
|
|
||
| # Core Principles | ||
|
|
||
| ## Literate Coding | ||
|
|
||
| All code MUST follow literate programming principles: | ||
|
|
||
| - **Intent Comments**: Every function/method begins with a comment explaining WHY (not what) | ||
| - **Logical Separation**: Complex functions use comments to separate logical blocks | ||
| - **Public Documentation**: All public interfaces have comprehensive documentation | ||
| - **Clarity Over Cleverness**: Code should be immediately understandable by team members | ||
|
|
||
| ## Universal Code Architecture Principles | ||
|
|
||
| ### Design Patterns | ||
|
|
||
| - **Single Responsibility**: Functions with focused, testable purposes | ||
| - **Dependency Injection**: External dependencies injected for testing | ||
| - **Pure Functions**: Minimize side effects and hidden state | ||
| - **Clear Interfaces**: Well-defined API contracts | ||
| - **Separation of Concerns**: Business logic separate from infrastructure | ||
| - **Repository Structure Adherence**: Before creating any new files, analyze the repository structure to | ||
| understand established directory conventions and file placement patterns. Place new files in locations | ||
| consistent with existing patterns. | ||
|
|
||
| ### Compliance-Ready Code Structure | ||
|
|
||
| - **Documentation Standards**: Language-appropriate documentation required on ALL members | ||
| - **Error Handling**: Comprehensive error cases with appropriate exception handling and logging | ||
| - **Configuration**: Externalize settings for different compliance environments | ||
| - **Resource Management**: Proper resource cleanup using language-appropriate patterns | ||
|
|
||
| # Quality Gates | ||
|
|
||
| ## Code Quality Standards | ||
|
|
||
| - [ ] Zero compiler warnings (use language-specific warning-as-error flags) | ||
| - [ ] All code follows literate programming style | ||
| - [ ] Language-appropriate documentation complete on all members | ||
| - [ ] Passes static analysis (language-specific tools) | ||
|
|
||
| ## Universal Anti-Patterns | ||
|
|
||
| - **Skip Literate Coding**: Don't skip literate programming comments - they are required for maintainability | ||
| - **Ignore Compiler Warnings**: Don't ignore compiler warnings - they exist for quality enforcement | ||
| - **Hidden Dependencies**: Don't create untestable code with hidden dependencies | ||
| - **Hidden Functionality**: Don't implement functionality without requirement traceability | ||
| - **Monolithic Functions**: Don't write monolithic functions with multiple responsibilities | ||
| - **Overcomplicated Solutions**: Don't make solutions more complex than necessary - favor simplicity and clarity | ||
| - **Premature Optimization**: Don't optimize for performance before establishing correctness | ||
| - **Copy-Paste Programming**: Don't duplicate logic - extract common functionality into reusable components | ||
| - **Magic Numbers**: Don't use unexplained constants - either name them or add clear comments | ||
|
|
||
| # Language-Specific Implementation | ||
|
|
||
| For each detected language: | ||
|
|
||
| - **Load Standards**: Read the appropriate `{language}-language.md` file from `.github/standards/` | ||
| - **Apply Tooling**: Use language-specific formatting, linting, and build tools | ||
| - **Follow Conventions**: Apply language-specific naming, patterns, and best practices | ||
| - **Generate Documentation**: Use language-appropriate documentation format (XmlDoc, Doxygen, JSDoc, etc.) |
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
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
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
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
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
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
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
Oops, something went wrong.
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.