Project-specific guidance for agents working on BuildMark - a .NET CLI tool for generating markdown build notes.
Before performing any work, agents must read and apply the relevant standards from .github/standards/:
csharp-language.md- For C# code development (literate programming, XML docs, dependency injection)csharp-testing.md- For C# test development (AAA pattern, naming, MSTest anti-patterns)reqstream-usage.md- For requirements management (traceability, semantic IDs, source filters)reviewmark-usage.md- For file review management (review-sets, file patterns, enforcement)software-items.md- For software categorization (system/subsystem/unit/OTS classification)technical-documentation.md- For documentation creation and maintenance (structure, Pandoc, README best practices)
Load only the standards relevant to your specific task scope and apply their quality checks and guidelines throughout your work.
The default agent should handle simple, straightforward tasks directly. Delegate to specialized agents only for specific scenarios:
- Light development work (small fixes, simple features) → Call @developer agent
- Light quality checking (linting, basic validation) → Call @quality agent
- Formal feature implementation (complex, multi-step) → Call the
@implementationagent - Formal bug resolution (complex debugging, systematic fixes) → Call the
@implementationagent - Formal reviews (compliance verification, detailed analysis) → Call @code-review agent
- Template consistency (downstream repository alignment) → Call @repo-consistency agent
- Production code and self-validation tests → Call software-developer agent
- Requirements management → Call Requirements Agent
- Documentation updates → Call Technical Writer
- Unit/integration tests → Call Test Developer
- code-review - Agent for performing formal reviews using standardized review processes
- developer - General-purpose software development agent that applies appropriate standards based on the work being performed
- implementation - Orchestrator agent that manages quality implementations through a formal state machine workflow
- quality - Quality assurance agent that grades developer work against DEMA Consulting standards and Continuous Compliance practices
- repo-consistency - Ensures BuildMark remains consistent with the TemplateDotNetTool template patterns and best practices
- software-developer - Writes production code and self-validation tests - targets design-for-testability and literate programming style
- Requirements Agent - Develops requirements and ensures test coverage linkage
- Technical Writer - Creates accurate documentation following regulatory best practices
- Test Developer - Creates unit and integration tests following AAA pattern
Configuration files and scripts are self-documenting with their design intent and modification policies in header comments.
- Linting Standards:
./lint.sh(Unix) orlint.bat(Windows) - comprehensive linting suite - Build Quality: Zero warnings (
TreatWarningsAsErrors=true) - Static Analysis: SonarQube/CodeQL passing with no blockers
- Requirements Traceability:
dotnet reqstream --enforcepassing - Test Coverage: All requirements linked to passing tests
- Documentation Currency: All docs current and generated
- File Review Status: All reviewable files have current reviews
This repository follows the DEMA Consulting Continuous Compliance https://github.com/demaconsulting/ContinuousCompliance approach, which enforces quality and compliance gates on every CI/CD run instead of as a last-mile activity.
- Requirements Traceability: Every requirement MUST link to passing tests
- Quality Gates: All quality checks must pass before merge
- Documentation Currency: All docs auto-generated and kept current
- Automated Evidence: Full audit trail generated with every build
- markdownlint-cli2: Markdown style and formatting enforcement
- cspell: Spell-checking across all text files (use
.cspell.yamlfor technical terms) - yamllint: YAML structure and formatting validation
- Language-specific linters: Based on repository technology stack
- SonarQube/SonarCloud: Code quality and security analysis
- CodeQL: Security vulnerability scanning (produces SARIF output)
- Static analyzers: Microsoft.CodeAnalysis.NetAnalyzers, SonarAnalyzer.CSharp, etc.
- ReqStream: Requirements traceability enforcement (
dotnet reqstream --enforce) - ReviewMark: File review status enforcement
- BuildMark: Tool version documentation
- VersionMark: Version tracking across CI/CD jobs
lint.sh/lint.bat- Cross-platform comprehensive linting scripts.editorconfig- Code formatting rules.cspell.yaml- Spell-check configuration and technical term dictionary.markdownlint-cli2.yaml- Markdown linting rules.yamllint.yaml- YAML linting configurationpackage.json- Node.js dependencies for linting tools
requirements.yaml- Root requirements file with includes.reviewmark.yaml- File review definitions and tracking- CI/CD pipeline files with quality gate enforcement
- Lint:
./lint.shorlint.bat- comprehensive linting suite - Build: Compile with warnings as errors
- Analyze: SonarQube/SonarCloud, CodeQL security scanning
- Test: Execute all tests, generate coverage reports
- Validate: Tool self-validation tests
- Document: Generate requirements reports, trace matrix, build notes
- Enforce: Requirements traceability, file review status
- Publish: Generate final documentation (Pandoc → PDF)
All stages must pass before merge. Pipeline fails immediately on:
- Any linting errors
- Build warnings or errors
- Security vulnerabilities (CodeQL)
- Requirements without test coverage
- Outdated file reviews
- Missing documentation
This repository follows continuous compliance practices from DEMA Consulting Continuous Compliance https://github.com/demaconsulting/ContinuousCompliance.
- ALL requirements MUST be linked to tests - Enforced in CI via
dotnet reqstream --enforce - NOT all tests need requirement links - Tests may exist for corner cases, design validation, failure scenarios
- Source filters are critical - Platform/framework requirements need specific test evidence
For detailed requirements format, test linkage patterns, and ReqStream integration, see the Requirements and Test Source Filters sections below.
- C# (latest), .NET 8.0/9.0/10.0, MSTest, dotnet CLI, NuGet
requirements.yaml- Root requirements file usingincludes:to referencedocs/reqstream/filesdocs/reqstream/- Per-software-unit, platform, and OTS requirements YAML files.editorconfig- Code style (file-scoped namespaces, 4-space indent, UTF-8, LF endings).cspell.yaml,.markdownlint-cli2.yaml,.yamllint.yaml- Linting configs
- All requirements MUST be linked to tests (prefer
BuildMark_*self-validation tests for command-line behavior) - Not all tests need to be linked to requirements (tests may exist for corner cases, design testing, failure-testing, etc.)
- 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
Test links in requirements.yaml can include a source filter prefix to restrict which test results count as
evidence. This is critical for platform and framework requirements - do not remove these filters.
windows@TestName- proves the test passed on a Windows platformubuntu@TestName- proves the test passed on a Linux (Ubuntu) platformmacos@TestName- proves the test passed on a macOS platformnet8.0@TestName- proves the test passed under the .NET 8 target frameworknet9.0@TestName- proves the test passed under the .NET 9 target frameworknet10.0@TestName- proves the test passed under the .NET 10 target frameworkdotnet8.x@TestName- proves the self-validation test ran on a machine with .NET 8.x runtimedotnet9.x@TestName- proves the self-validation test ran on a machine with .NET 9.x runtimedotnet10.x@TestName- proves the self-validation test ran on a machine with .NET 10.x runtime
Without the source filter, a test result from any platform/framework satisfies the requirement. Adding the filter ensures the CI evidence comes specifically from the required environment.
- Test Naming:
BuildMark_FeatureBeingValidatedfor self-validation tests - Self-Validation: All tests run via
--validateflag 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.Outin try/finally
- XML Docs: On ALL members (public/internal/private) with spaces after
///in summaries - Errors:
ArgumentExceptionfor parsing,InvalidOperationExceptionfor 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
docs/- Documentation and compliance artifactsreqstream/- Per-software-unit, platform, and OTS requirements YAML files (included by rootrequirements.yaml)- Auto-generated reports (requirements, justifications, trace matrix)
src/- Source code filestest/- Test files.github/workflows/- CI/CD pipeline definitions (build.yaml,build_on_push.yaml,release.yaml)- Configuration files:
.editorconfig,.reviewmark.yaml,.cspell.yaml,.yamllint.yaml, etc.
- 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 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- User Guide:
docs/guide/guide.md - Requirements:
requirements.yamlincludesdocs/reqstream/files → auto-generated docs - Build Notes: Auto-generated via BuildMark
- Code Quality: Auto-generated via CodeQL and SonarMark
- Trace Matrix: Auto-generated via ReqStream
- Quality Checks: Markdown lint, spell check, YAML lint
- Build: Multi-platform (Windows/Linux/macOS)
- CodeQL: Security scanning
- Integration Tests: .NET 8/9/10 on Windows/Linux/macOS
- Documentation: Auto-generated via Pandoc + Weasyprint
# Format code
dotnet format
# Run all linters
./lint.sh # Linux/macOS
lint.bat # Windows
# Pack as NuGet tool
dotnet pack --configuration ReleaseUpon completion, create a report file at .agent-logs/[agent-name]-[subject]-[unique-id].md that includes:
- A concise summary of the work performed
- Any important decisions made and their rationale
- Follow-up items, open questions, or TODOs
Store agent logs in the .agent-logs/ folder so they are ignored via .gitignore and excluded from linting and commits.
- AI agent markdown files (
.github/agents/*.md): Use inline links[text](url)so URLs are visible in agent context - README.md: Use absolute URLs (shipped in NuGet package)
- All other markdown files: Use reference-style links
[text][ref]with[ref]: urlat document end
- CHANGELOG.md: Not present - changes are captured in the auto-generated build notes