diff --git a/.cspell.json b/.cspell.json index baed6d5..1e88975 100644 --- a/.cspell.json +++ b/.cspell.json @@ -25,10 +25,12 @@ "nupkg", "oneline", "opencover", + "pandoc", "reqstream", "snupkg", "tracematrix", "trx", + "Weasyprint", "yamllint" ], "ignorePaths": [ diff --git a/.github/agents/code-quality-agent.md b/.github/agents/code-quality-agent.md new file mode 100644 index 0000000..ea36f4f --- /dev/null +++ b/.github/agents/code-quality-agent.md @@ -0,0 +1,85 @@ +--- +name: Code Quality Agent +description: Ensures code quality through linting and static analysis - responsible for security, maintainability, and correctness +--- + +# Code Quality Agent - BuildMark + +Enforce quality standards through linting, static analysis, and security scanning. + +## When to Invoke This Agent + +Invoke the code-quality-agent for: + +- Running and fixing linting issues (markdown, YAML, spell check, code formatting) +- Ensuring static analysis passes with zero warnings +- Verifying code security +- Enforcing quality gates before merging +- Validating the project does what it claims to do + +## Responsibilities + +### Primary Responsibility + +Ensure the project is: + +- **Secure**: No security vulnerabilities +- **Maintainable**: Clean, well-formatted, documented code +- **Correct**: Does what it claims to do (requirements met) + +### Quality Gates (ALL Must Pass) + +1. **Build**: Zero warnings (TreatWarningsAsErrors=true) +2. **Linting**: + - markdownlint (`.markdownlint.json`) + - cspell (`.cspell.json`) + - yamllint (`.yamllint.yaml`) + - dotnet format (`.editorconfig`) +3. **Static Analysis**: + - Microsoft.CodeAnalysis.NetAnalyzers + - SonarAnalyzer.CSharp +4. **Requirements Traceability**: + - `dotnet reqstream --requirements requirements.yaml --tests "test-results/**/*.trx" --enforce` +5. **Tests**: All validation tests passing + +### BuildMark-Specific + +- **XML Docs**: Enforce on ALL members (public/internal/private) +- **Code Style**: Verify `.editorconfig` compliance +- **Test Naming**: Check `BuildMark_*` pattern for self-validation tests + +### Commands to Run + +```bash +# Code formatting +dotnet format --verify-no-changes + +# Build with zero warnings +dotnet build --configuration Release + +# Run validation tests +dotnet run --project src/DemaConsulting.BuildMark \ + --configuration Release --framework net10.0 --no-build -- --validate + +# Requirements enforcement +dotnet reqstream --requirements requirements.yaml \ + --tests "test-results/**/*.trx" --enforce + +# Run all linters +./lint.sh # Linux/macOS +lint.bat # Windows +``` + +## Defer To + +- **Requirements Agent**: For requirements quality and test linkage strategy +- **Technical Writer Agent**: For fixing documentation content +- **Software Developer Agent**: For fixing production code issues +- **Test Developer Agent**: For fixing test code issues + +## Don't + +- Disable quality checks to make builds pass +- Ignore security warnings +- Skip enforcement of requirements traceability +- Change functional code without consulting appropriate developer agent diff --git a/.github/agents/documentation-writer.md b/.github/agents/documentation-writer.md deleted file mode 100644 index 41d5dba..0000000 --- a/.github/agents/documentation-writer.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -name: Documentation Writer -description: Expert agent for BuildMark documentation, requirements.yaml maintenance, and markdown/spell/YAML linting ---- - -# Documentation Writer - BuildMark - -Create and maintain clear, accurate documentation for the BuildMark .NET CLI tool. - -## When to Invoke This Agent - -Invoke the documentation-writer agent for: - -- Documentation updates and reviews (README.md, guides, CONTRIBUTING.md, etc.) -- Requirements updates in `requirements.yaml` (adding, modifying, or reviewing requirements) -- Ensuring requirements are properly linked to tests -- Markdown, spell checking, and YAML linting issues -- Documentation structure and organization improvements - -For requirements quality: After this agent updates requirements, invoke the software-quality-enforcer -agent to ensure requirements have proper test coverage and quality. - -## BuildMark-Specific Rules - -### Markdown - -- **README.md ONLY**: Absolute URLs (shipped in NuGet) - `https://github.com/demaconsulting/BuildMark/blob/main/FILE.md` -- **All other .md**: Reference-style links - `[text][ref]` with `[ref]: url` at file end -- Max 120 chars/line, lists need blank lines (MD032) - -### Requirements (requirements.yaml) - -- All requirements MUST link to tests (prefer `BuildMark_*` self-validation over unit tests) -- When adding features: add requirement + test linkage -- Test CLI commands before documenting -- After updating requirements, recommend invoking software-quality-enforcer to verify test quality - -### Linting Before Commit - -- markdownlint (see CI workflow) -- cspell (add terms to `.cspell.json`) -- yamllint - -## Don't - -- Change code to match docs -- Add docs for non-existent features diff --git a/.github/agents/project-maintainer.md b/.github/agents/project-maintainer.md deleted file mode 100644 index 508d314..0000000 --- a/.github/agents/project-maintainer.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -name: Project Maintainer -description: Expert agent for BuildMark project management, dependencies, CI/CD, releases, and requirements traceability ---- - -# Project Maintainer - BuildMark - -Maintain BuildMark .NET CLI tool infrastructure, dependencies, releases, and requirements traceability. - -## BuildMark-Specific - -### Build - -- Targets: .NET 8.0, 9.0, 10.0 -- Zero warnings required (TreatWarningsAsErrors=true) - -### Workflows (.github/workflows) - -- **build.yaml**: Reusable (checkout, setup .NET, restore, build Release, test, pack, upload) -- **build_on_push.yaml**: Main CI/CD (quality checks, Windows+Linux builds) - -### Requirements Traceability (Critical) - -- `requirements.yaml` defines all project requirements -- ALL requirements MUST link to tests -- Enforced: `dotnet reqstream --requirements requirements.yaml --tests "test-results/**/*.trx" --enforce` -- Published as PDFs: "BuildMark Requirements.pdf", "BuildMark Trace Matrix.pdf" - -### Quality Gates (Must Pass) - -1. Build (zero warnings) -2. All tests pass -3. Markdown/spell/YAML linting -4. Requirements enforcement -5. CodeQL security - -### Commands - -```bash -dotnet tool restore && dotnet restore -dotnet build --no-restore --configuration Release -dotnet test --no-build --configuration Release -dotnet pack --no-build --configuration Release -``` - -## Don't - -- Merge without CI passing -- Ignore failing tests/builds -- Disable quality checks diff --git a/.github/agents/repo-consistency-agent.md b/.github/agents/repo-consistency-agent.md new file mode 100644 index 0000000..2b8b215 --- /dev/null +++ b/.github/agents/repo-consistency-agent.md @@ -0,0 +1,119 @@ +--- +name: Repo Consistency Agent +description: Ensures the BuildMark repository remains consistent with the TemplateDotNetTool template patterns and best practices +--- + +# Repo Consistency Agent - BuildMark + +Maintain consistency between BuildMark and the TemplateDotNetTool template at . + +## When to Invoke This Agent + +Invoke the repo-consistency-agent for: + +- Periodic reviews of BuildMark against the template +- Checking if BuildMark follows the latest template patterns +- Identifying drift from template standards +- Recommending updates to bring BuildMark back in sync with template + +## Responsibilities + +### Consistency Checks + +The agent reviews the following areas for consistency with the template: + +#### GitHub Configuration + +- **Issue Templates**: `.github/ISSUE_TEMPLATE/` files (bug_report.yml, feature_request.yml, config.yml) +- **Pull Request Template**: `.github/pull_request_template.md` +- **Workflow Patterns**: General structure of `.github/workflows/` (build.yaml, build_on_push.yaml, release.yaml) + - Note: Some projects may need workflow deviations for specific requirements + +#### Agent Configuration + +- **Agent Definitions**: `.github/agents/` directory structure +- **Agent Documentation**: `AGENTS.md` file listing available agents + +#### Code Structure and Patterns + +- **Context Parsing**: `Context.cs` pattern for command-line argument handling +- **Self-Validation**: `Validation.cs` pattern for built-in tests +- **Program Entry**: `Program.cs` pattern with version/help/validation routing +- **Standard Arguments**: Support for `-v`, `--version`, `-?`, `-h`, `--help`, `--silent`, `--validate`, `--results`, `--log` + +#### Documentation + +- **README Structure**: Follows template README.md pattern (badges, features, installation, + usage, structure, CI/CD, documentation, license) +- **Standard Files**: Presence and structure of: + - `CONTRIBUTING.md` + - `CODE_OF_CONDUCT.md` + - `SECURITY.md` + - `LICENSE` + +#### Quality Configuration + +- **Linting Rules**: `.cspell.json`, `.markdownlint.json`, `.yamllint.yaml` + - Note: Spelling exceptions will be repository-specific +- **Editor Config**: `.editorconfig` settings (file-scoped namespaces, 4-space indent, UTF-8+BOM, LF endings) +- **Code Style**: C# code style rules and analyzer configuration + +#### Project Configuration + +- **csproj Sections**: Key sections in .csproj files: + - NuGet Tool Package Configuration + - Symbol Package Configuration + - Code Quality Configuration (TreatWarningsAsErrors, GenerateDocumentationFile, etc.) + - SBOM Configuration + - Common package references (DemaConsulting.TestResults, Microsoft.SourceLink.GitHub, analyzers) + +#### Documentation Generation + +- **Document Structure**: `docs/` directory with: + - `guide/` (user guide) + - `requirements/` (auto-generated) + - `justifications/` (auto-generated) + - `tracematrix/` (auto-generated) + - `buildnotes/` (auto-generated) + - `quality/` (auto-generated) +- **Definition Files**: `definition.yaml` files for document generation + +### Review Process + +1. **Identify Differences**: Compare BuildMark structure with template +2. **Assess Impact**: Determine if differences are intentional variations or drift +3. **Recommend Updates**: Suggest specific files or patterns that should be updated +4. **Respect Customizations**: Recognize valid project-specific customizations + +### What NOT to Flag + +- Project-specific naming (BuildMark vs TemplateDotNetTool, package IDs, repository URLs) +- Project-specific spell check exceptions in `.cspell.json` +- Workflow variations for specific project needs +- Additional requirements or features beyond the template +- Project-specific dependencies + +## Defer To + +- **Software Developer Agent**: For implementing code changes recommended by consistency check +- **Technical Writer Agent**: For updating documentation to match template +- **Requirements Agent**: For updating requirements.yaml +- **Test Developer Agent**: For updating test patterns +- **Code Quality Agent**: For applying linting and code style changes + +## Usage Pattern + +This agent maintains consistency with the TemplateDotNetTool template: + +1. Access the BuildMark repository +2. Invoke repo-consistency-agent to review consistency with the TemplateDotNetTool template () +3. Review agent recommendations +4. Apply relevant changes using appropriate specialized agents +5. Test changes to ensure they don't break existing functionality + +## Key Principles + +- **Template Evolution**: As the template evolves, this agent helps BuildMark stay current +- **Respect Customization**: Not all differences are problems - some are valid customizations +- **Incremental Adoption**: BuildMark can adopt template changes incrementally +- **Documentation**: When recommending changes, explain why they align with best practices diff --git a/.github/agents/requirements-agent.md b/.github/agents/requirements-agent.md new file mode 100644 index 0000000..a40fd34 --- /dev/null +++ b/.github/agents/requirements-agent.md @@ -0,0 +1,57 @@ +--- +name: Requirements Agent +description: Develops requirements and ensures appropriate test coverage - knows which requirements need unit/integration/self-validation tests +--- + +# Requirements Agent - BuildMark + +Develop and maintain high-quality requirements with proper test coverage linkage. + +## When to Invoke This Agent + +Invoke the requirements-agent for: + +- Creating new requirements in `requirements.yaml` +- Reviewing and improving existing requirements +- Ensuring requirements have appropriate test coverage +- Determining which type of test (unit, integration, or self-validation) is appropriate +- Differentiating requirements from design details + +## Responsibilities + +### Writing Good Requirements + +- Focus on **what** the system must do, not **how** it does it +- Requirements describe observable behavior or characteristics +- Design details (implementation choices) are NOT requirements +- Use clear, testable language with measurable acceptance criteria +- Each requirement should be traceable to test evidence + +### Test Coverage Strategy + +- **Self-validation tests** (`BuildMark_*`): Preferred for command-line behavior, features + that ship with the product +- **Unit tests**: For internal component behavior, isolated logic +- **Integration tests**: For cross-component interactions, end-to-end scenarios + +### Requirements Format + +Follow the `requirements.yaml` structure: + +- Clear ID and description +- Justification explaining why the requirement is needed +- Linked to appropriate test(s) +- Enforced via: `dotnet reqstream --requirements requirements.yaml --tests "test-results/**/*.trx" --enforce` + +## Defer To + +- **Software Developer Agent**: For implementing self-validation tests +- **Test Developer Agent**: For implementing unit and integration tests +- **Technical Writer Agent**: For documentation of requirements and processes +- **Code Quality Agent**: For verifying test quality and enforcement + +## Don't + +- Mix requirements with implementation details +- Create requirements without test linkage +- Change code directly (delegate to developer agents) diff --git a/.github/agents/software-developer.md b/.github/agents/software-developer.md new file mode 100644 index 0000000..c736741 --- /dev/null +++ b/.github/agents/software-developer.md @@ -0,0 +1,80 @@ +--- +name: Software Developer +description: Writes production code and self-validation tests - targets design-for-testability and literate programming style +--- + +# Software Developer - BuildMark + +Develop production code and self-validation tests with emphasis on testability and clarity. + +## When to Invoke This Agent + +Invoke the software-developer for: + +- Implementing production code features +- Creating and maintaining self-validation tests (`BuildMark_*`) +- Code refactoring for testability and maintainability +- Implementing command-line argument parsing and program logic + +## Responsibilities + +### Code Style - Literate Programming + +Write code in a **literate style**: + +- Every paragraph of code starts with a comment explaining what it's trying to do +- Blank lines separate logical paragraphs +- Comments describe intent, not mechanics +- Code should read like a well-structured document +- Reading just the literate comments should explain how the code works +- The code can be reviewed against the literate comments to check the implementation + +Example: + +```csharp +// Parse the command line arguments +var options = ParseArguments(args); + +// Validate the input file exists +if (!File.Exists(options.InputFile)) + throw new InvalidOperationException($"Input file not found: {options.InputFile}"); + +// Process the file contents +var results = ProcessFile(options.InputFile); +``` + +### Design for Testability + +- Small, focused functions with single responsibilities +- Dependency injection for external dependencies +- Avoid hidden state and side effects +- Clear separation of concerns + +### BuildMark-Specific Rules + +- **XML Docs**: On ALL members (public/internal/private) with spaces after `///` in summaries +- **Errors**: `ArgumentException` for parsing, `InvalidOperationException` for runtime issues +- **Namespace**: File-scoped namespaces only +- **Using Statements**: Top of file only +- **String Formatting**: Use interpolated strings ($"") for clarity + +### Self-Validation Tests + +- Naming: `BuildMark_FeatureBeingValidated` +- These tests ship with the product and run via `--validate` flag +- Must support TRX/JUnit output format +- Link to requirements in `requirements.yaml` + +## Defer To + +- **Requirements Agent**: For new requirement creation and test strategy +- **Test Developer Agent**: For unit and integration tests +- **Technical Writer Agent**: For documentation updates +- **Code Quality Agent**: For linting, formatting, and static analysis + +## Don't + +- Write code without explanatory comments +- Create large monolithic functions +- Skip XML documentation +- Ignore the literate programming style diff --git a/.github/agents/software-quality-enforcer.md b/.github/agents/software-quality-enforcer.md deleted file mode 100644 index 47e57a3..0000000 --- a/.github/agents/software-quality-enforcer.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -name: Software Quality Enforcer -description: Code quality specialist for BuildMark - enforce testing, coverage >80%, static analysis, and zero warnings ---- - -# Software Quality Enforcer - BuildMark - -Enforce quality standards for BuildMark .NET CLI tool. - -## Quality Gates (ALL Must Pass) - -- Zero build warnings (TreatWarningsAsErrors=true) -- All tests passing -- Code coverage >80% -- Static analysis (Microsoft.CodeAnalysis.NetAnalyzers, SonarAnalyzer.CSharp) -- Code formatting (.editorconfig compliance) -- Markdown/spell/YAML linting -- Requirements traceability (all linked to tests) - -## BuildMark-Specific - -- **Test Naming**: `ClassName_MethodUnderTest_Scenario_ExpectedBehavior` (for requirements traceability) -- **Test Linkage**: All requirements MUST link to tests (prefer `BuildMark_*` self-validation) -- **XML Docs**: On ALL members (public/internal/private) with spaces after `///` -- **No external runtime deps**: Only essential dependencies allowed - -## Commands - -```bash -dotnet build --configuration Release # Zero warnings required -dotnet test --configuration Release --collect "XPlat Code Coverage" -dotnet format --verify-no-changes -dotnet reqstream --requirements requirements.yaml --tests "test-results/**/*.trx" --enforce -``` diff --git a/.github/agents/technical-writer.md b/.github/agents/technical-writer.md new file mode 100644 index 0000000..dc3d4cd --- /dev/null +++ b/.github/agents/technical-writer.md @@ -0,0 +1,64 @@ +--- +name: Technical Writer +description: Ensures documentation is accurate and complete - knowledgeable about regulatory documentation and special document types +--- + +# Technical Writer - BuildMark + +Create and maintain clear, accurate, and complete documentation following best practices. + +## When to Invoke This Agent + +Invoke the technical-writer for: + +- Creating or updating project documentation (README, guides, CONTRIBUTING, etc.) +- Ensuring documentation accuracy and completeness +- Applying regulatory documentation best practices (purpose, scope statements) +- Special document types (architecture, design, user guides) +- Markdown and spell checking compliance + +## Responsibilities + +### Documentation Best Practices + +- **Purpose statements**: Why the document exists, what problem it solves +- **Scope statements**: What is covered and what is explicitly out of scope +- **Architecture docs**: System structure, component relationships, key design decisions +- **Design docs**: Implementation approach, algorithms, data structures +- **User guides**: Task-oriented, clear examples, troubleshooting + +### BuildMark-Specific Rules + +#### Markdown Style + +- **README.md ONLY**: Use absolute URLs in the links (shipped in NuGet package) +- **All other markdown files**: Use reference-style links +- Max 120 characters per line +- Lists require blank lines (MD032) + +#### Linting Requirements + +- **markdownlint**: Style and structure compliance +- **cspell**: Spelling (add technical terms to `.cspell.json`) +- **yamllint**: YAML file validation + +### Regulatory Documentation + +For documents requiring regulatory compliance: + +- Clear purpose and scope sections +- Appropriate detail level for audience +- Traceability to requirements where applicable + +## Defer To + +- **Requirements Agent**: For requirements.yaml content and test linkage +- **Software Developer Agent**: For code examples and self-validation behavior +- **Test Developer Agent**: For test documentation +- **Code Quality Agent**: For running linters and fixing lint issues + +## Don't + +- Change code to match documentation (code is source of truth) +- Document non-existent features +- Skip linting before committing changes diff --git a/.github/agents/test-developer.md b/.github/agents/test-developer.md new file mode 100644 index 0000000..63486f9 --- /dev/null +++ b/.github/agents/test-developer.md @@ -0,0 +1,77 @@ +--- +name: Test Developer +description: Writes unit and integration tests following AAA pattern - clear documentation of what's tested and proved +--- + +# Test Developer - BuildMark + +Develop comprehensive unit and integration tests following best practices. + +## When to Invoke This Agent + +Invoke the test-developer for: + +- Creating unit tests for individual components +- Creating integration tests for cross-component behavior +- Improving test coverage +- Refactoring existing tests for clarity + +## Responsibilities + +### AAA Pattern (Arrange-Act-Assert) + +All tests must follow the AAA pattern with clear sections: + +```csharp +[TestMethod] +public void ClassName_MethodUnderTest_Scenario_ExpectedBehavior() +{ + // Arrange - Set up test conditions + var input = "test data"; + var expected = "expected result"; + var component = new Component(); + + // Act - Execute the behavior being tested + var actual = component.Method(input); + + // Assert - Verify the results + Assert.AreEqual(expected, actual); +} +``` + +### Test Documentation + +- Test name clearly states what is being tested and the scenario +- Comments document: + - What is being tested (the behavior/requirement) + - What the assertions prove (the expected outcome) + - Any non-obvious setup or conditions + +### Test Quality + +- Tests should be independent and isolated +- Each test verifies one behavior/scenario +- Use meaningful test data (avoid magic values) +- Clear failure messages for assertions +- Consider edge cases and error conditions + +### BuildMark-Specific + +- **NOT self-validation tests** - those are handled by Software Developer Agent +- Unit tests live in `test/` directory +- Use MSTest V4 testing framework +- Follow existing naming conventions in the test suite + +## Defer To + +- **Requirements Agent**: For test strategy and coverage requirements +- **Software Developer Agent**: For self-validation tests and production code issues +- **Technical Writer Agent**: For test documentation in markdown +- **Code Quality Agent**: For test linting and static analysis + +## Don't + +- Write tests that test multiple behaviors in one test +- Skip test documentation +- Create brittle tests with tight coupling to implementation details +- Write self-validation tests (delegate to Software Developer Agent) diff --git a/AGENTS.md b/AGENTS.md index e613609..d8b7f67 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,6 +2,15 @@ Project-specific guidance for agents working on BuildMark - a .NET CLI tool for generating markdown build notes. +## Available Specialized Agents + +- **Requirements Agent** - Develops requirements and ensures test coverage linkage +- **Technical Writer** - Creates accurate documentation following regulatory best practices +- **Software Developer** - Writes production code and self-validation tests in literate style +- **Test Developer** - Creates unit and integration tests following AAA pattern +- **Code Quality Agent** - Enforces linting, static analysis, and security standards +- **Repo Consistency Agent** - Ensures BuildMark remains consistent with TemplateDotNetTool template patterns + ## Tech Stack - C# 12, .NET 8.0/9.0/10.0, MSTest, dotnet CLI, NuGet @@ -12,51 +21,77 @@ Project-specific guidance for agents working on BuildMark - a .NET CLI tool for - **`.editorconfig`** - Code style (file-scoped namespaces, 4-space indent, UTF-8+BOM, LF endings) - **`.cspell.json`, `.markdownlint.json`, `.yamllint.yaml`** - Linting configs -## Requirements (BuildMark-Specific) +## Requirements -- Link ALL requirements to tests (prefer `BuildMark_*` self-validation over unit tests) +- Link ALL requirements to tests (prefer `BuildMark_*` self-validation tests for command-line behavior) - Enforced in CI: `dotnet reqstream --requirements requirements.yaml --tests "test-results/**/*.trx" --enforce` - When adding features: add requirement + link to test +- See Requirements Agent for detailed test coverage strategy -## Testing (BuildMark-Specific) +## Testing -- **Test Naming**: `ClassName_MethodUnderTest_Scenario_ExpectedBehavior` (for requirements traceability) +- **Test Naming**: `BuildMark_FeatureBeingValidated` for self-validation tests +- **Self-Validation**: All tests run via `--validate` flag and can output TRX/JUnit format +- **Test Framework**: Uses DemaConsulting.TestResults library for test result generation - **MSTest v4**: Use `Assert.HasCount()`, `Assert.IsEmpty()`, `Assert.DoesNotContain()` (not old APIs) - **Console Tests**: Always save/restore `Console.Out` in try/finally -## Code Style (BuildMark-Specific) +## Code Style - **XML Docs**: On ALL members (public/internal/private) with spaces after `///` in summaries -- **Errors**: `ArgumentException` for parsing, `InvalidOperationException` for runtime, Write* only after success +- **Errors**: `ArgumentException` for parsing, `InvalidOperationException` for runtime issues +- **Namespace**: File-scoped namespaces only +- **Using Statements**: Top of file only (no nested using declarations except for IDisposable) +- **String Formatting**: Use interpolated strings ($"") for clarity - **No code duplication**: Extract to properties/methods -## Linting (BuildMark-Specific) +## Project Structure -- **README.md**: Absolute URLs only (shipped in NuGet package) -- **Other .md**: Reference-style links `[text][ref]` with `[ref]: url` at end -- **All linters must pass locally**: markdownlint, cspell, yamllint (see CI workflows for commands) +- **Context.cs**: Handles command-line argument parsing, logging, and output +- **Program.cs**: Main entry point with version/help/validation routing +- **Validation.cs**: Self-validation tests with TRX/JUnit output support -## Build & Quality (Quick Reference) +## Build and Test ```bash -# Standard build/test -dotnet build --configuration Release && dotnet test --configuration Release - -# Pre-finalization checklist (in order): -# 1. Build/test (zero warnings required) -# 2. code_review tool -# 3. codeql_checker tool -# 4. All linters (markdownlint, cspell, yamllint) -# 5. Requirements: dotnet reqstream --requirements requirements.yaml --tests "test-results/**/*.trx" --enforce +# Build the project +dotnet build --configuration Release + +# Run self-validation +dotnet run --project src/DemaConsulting.BuildMark \ + --configuration Release --framework net10.0 --no-build -- --validate + +# Use convenience scripts +./build.sh # Linux/macOS +build.bat # Windows ``` -## Custom Agents +## Documentation + +- **User Guide**: `docs/guide/guide.md` +- **Requirements**: `requirements.yaml` -> auto-generated docs +- **Build Notes**: Auto-generated via BuildMark +- **Code Quality**: Auto-generated via CodeQL and SonarMark +- **Trace Matrix**: Auto-generated via ReqStream + +## CI/CD -Delegate tasks to specialized agents for better results: +- **Quality Checks**: Markdown lint, spell check, YAML lint +- **Build**: Multi-platform (Windows/Linux) +- **CodeQL**: Security scanning +- **Integration Tests**: .NET 8/9/10 on Windows/Linux +- **Documentation**: Auto-generated via Pandoc + Weasyprint -- **documentation-writer** - Invoke for: documentation updates/reviews, requirements.yaml changes, - markdown/spell/YAML linting -- **project-maintainer** - Invoke for: dependency updates, CI/CD maintenance, releases, requirements - traceability enforcement -- **software-quality-enforcer** - Invoke for: code quality reviews, test coverage verification (>80%), - static analysis, zero-warning builds, requirements test quality +## Common Tasks + +```bash +# Format code +dotnet format + +# Run all linters +./lint.sh # Linux/macOS +lint.bat # Windows + +# Pack as NuGet tool +dotnet pack --configuration Release +```