Skip to content

Commit b66f076

Browse files
Optimize agent documentation and add developer tooling (#42)
* Initial plan * Fix code formatting: Remove trailing whitespace in test files - Fix 4 instances of trailing whitespace in PathHelpersTests.cs - Fix 5 instances of trailing whitespace in SarifResultsTests.cs - All multi-line lambda expressions now properly formatted - Verified with dotnet format --verify-no-changes * Enhance documentation with FAQ section, update instructions, and compatibility matrix - Add comprehensive FAQ section to usage guide covering common questions - Add update instructions to README for both global and local installations - Add compatibility matrix showing supported .NET versions, SARIF format, and operating systems - Update spell check dictionary with static analysis tool names (Checkmarx, Pylint, Qube, Semgrep, Trivy) - Create comprehensive documentation review report Documentation improvements: - FAQ section addresses 9 common questions with detailed answers - Update instructions provide clear upgrade paths - Compatibility matrix provides quick reference for supported versions - All changes pass markdown linting and spell checking * Update .gitignore to exclude test results and log files - Add test-results/ directory to .gitignore - Add *.log pattern to exclude all log files - Prevents accidental commits of build, test, and format logs * Streamline agent documentation and add developer tooling - Reduce agent docs from 3,464 to 746 words (78% reduction) - Remove generic coding instructions, keep only SarifMark-specific guidance - Add DEVELOPMENT.md with quick start guide - Add build.sh/bat and lint.sh/bat scripts for common tasks - Add .vscode/tasks.json for VS Code integration - Focus on project-specific requirements, testing, and quality standards Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> * Address PR feedback: clarify agent invocation and remove review artifact - Add "When to Invoke This Agent" section to documentation-writer.md - Clarify when to delegate to documentation-writer and software-quality-enforcer - Update AGENTS.md Custom Agents section with invocation guidance - Remove DOCUMENTATION_REVIEW.md (should not be checked in) Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
1 parent 940151a commit b66f076

File tree

16 files changed

+568
-613
lines changed

16 files changed

+568
-613
lines changed

.cspell.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"Anson",
66
"Blockquotes",
77
"camelcase",
8+
"Checkmarx",
89
"copilot",
910
"cspell",
1011
"csproj",
@@ -34,17 +35,21 @@
3435
"opencover",
3536
"pagetitle",
3637
"pandoc",
38+
"Pylint",
39+
"Qube",
3740
"reqstream",
3841
"ReqStream",
3942
"Sarif",
4043
"SarifMark",
4144
"SBOM",
45+
"Semgrep",
4246
"semver",
4347
"snupkg",
4448
"spdx",
4549
"testname",
4650
"tracematrix",
4751
"triaging",
52+
"Trivy",
4853
"trx",
4954
"vbproj",
5055
"vcxproj",
Lines changed: 29 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,47 @@
11
---
22
name: Documentation Writer
3-
description: >-
4-
Expert agent for creating, updating, and maintaining project documentation including README, guides, and API
5-
documentation
3+
description: Expert agent for SarifMark documentation, requirements.yaml maintenance, and markdown/spell/YAML linting
64
---
75

8-
# Documentation Writer Agent
6+
# Documentation Writer - SarifMark
97

10-
You are a specialized documentation writer agent for the SarifMark project. Your primary responsibility is to create,
11-
update, and maintain high-quality documentation that is clear, accurate, and helpful for users and contributors.
8+
Create and maintain clear, accurate documentation for the SarifMark .NET CLI tool.
129

13-
## Responsibilities
10+
## When to Invoke This Agent
1411

15-
### Core Documentation Tasks
12+
Invoke the documentation-writer agent for:
1613

17-
- Create and update README files with clear, concise information
18-
- Write and maintain user guides and tutorials
19-
- Document API endpoints and command-line interfaces
20-
- Create examples and code snippets that demonstrate functionality
21-
- Update CONTRIBUTING.md with relevant development information
22-
- Maintain SECURITY.md with security policies and reporting procedures
23-
- Keep AGENTS.md up to date with agent configurations
24-
- Maintain requirements documentation in `requirements.yaml`
25-
- Update requirements when features are added or changed
14+
- Documentation updates and reviews (README.md, guides, CONTRIBUTING.md, etc.)
15+
- Requirements updates in `requirements.yaml` (adding, modifying, or reviewing requirements)
16+
- Ensuring requirements are properly linked to tests
17+
- Markdown, spell checking, and YAML linting issues
18+
- Documentation structure and organization improvements
2619

27-
### Documentation Standards
20+
For requirements quality: After this agent updates requirements, invoke the software-quality-enforcer
21+
agent to ensure requirements have proper test coverage and quality.
2822

29-
- **Clarity**: Write in clear, simple language that is easy to understand
30-
- **Accuracy**: Ensure all technical details are correct and up to date
31-
- **Completeness**: Cover all features and functionality comprehensively
32-
- **Examples**: Provide practical examples that users can follow
33-
- **Consistency**: Maintain consistent style and formatting throughout
23+
## SarifMark-Specific Rules
3424

35-
## Project-Specific Guidelines
25+
### Markdown
3626

37-
### Markdown Style
27+
- **README.md ONLY**: Absolute URLs (shipped in NuGet) - `https://github.com/demaconsulting/SarifMark/blob/main/FILE.md`
28+
- **All other .md**: Reference-style links - `[text][ref]` with `[ref]: url` at file end
29+
- Max 120 chars/line, lists need blank lines (MD032)
3830

39-
- Follow the rules in `.markdownlint.json`
40-
- Maximum line length: 120 characters
41-
- Use ATX-style headers (e.g., `# Header`)
42-
- Use reference-style links for maintainability (e.g., `[text][ref]` with `[ref]: url` at end of document)
43-
- **Exception**: README.md must use absolute URLs to GitHub (e.g.,
44-
`https://github.com/demaconsulting/SarifMark/blob/main/FILE.md`) because it is included in the NuGet package
31+
### Requirements (requirements.yaml)
4532

46-
### Spell Checking
33+
- All requirements MUST link to tests (prefer `SarifMark_*` self-validation over unit tests)
34+
- When adding features: add requirement + test linkage
35+
- Test CLI commands before documenting
36+
- After updating requirements, recommend invoking software-quality-enforcer to verify test quality
4737

48-
- Use `.cspell.json` for spell checking configuration
49-
- Add project-specific terms to the custom dictionary
50-
- Ensure all markdown files pass cspell validation
38+
### Linting Before Commit
5139

52-
### Documentation Content
40+
- markdownlint (see CI workflow)
41+
- cspell (add terms to `.cspell.json`)
42+
- yamllint
5343

54-
- **README.md**: Keep concise and focused on getting started quickly
55-
- **Code Examples**: Use proper formatting for examples
56-
- **CLI Usage**: Document all command-line options and arguments
57-
- **API Documentation**: Use clear descriptions and examples
58-
- **Requirements**: Keep `requirements.yaml` synchronized with features and tests
44+
## Don't
5945

60-
### Requirements Management
61-
62-
- **Requirements File**: `requirements.yaml` contains all project requirements
63-
- **Test Linkage**: All requirements must be linked to test methods that validate them
64-
- **Self-Validation**: Prefer linking to self-validation tests (e.g., `SarifMark_*`) over unit tests
65-
- **Test Naming**: Use the convention `ClassName_Method_Scenario_ExpectedBehavior` for clarity
66-
- **Enforcement**: Requirements are enforced via the `dotnet reqstream --enforce` command in CI/CD
67-
- **Updates**: When adding features, add corresponding requirements; when adding tests, link them to requirements
68-
69-
### Technical Accuracy
70-
71-
- Verify all code examples work correctly
72-
- Test CLI commands before documenting them
73-
- Keep documentation synchronized with code changes
74-
- Reference actual file names, paths, and configurations
75-
76-
## Quality Checks
77-
78-
Before finalizing documentation changes:
79-
80-
1. **Markdown Linting**: Ensure markdown files follow project conventions
81-
2. **Spell Checking**: Verify spelling is correct
82-
3. **Link Validation**: Verify all links are valid and point to correct locations
83-
4. **Example Testing**: Test all code examples and CLI commands
84-
5. **Consistency Review**: Ensure consistent terminology and formatting
85-
86-
## Best Practices
87-
88-
- **User-Focused**: Write from the user's perspective
89-
- **Incremental Updates**: Update documentation as features are added or changed
90-
- **Version Awareness**: Note version-specific features when relevant
91-
- **Accessibility**: Use clear headings and structure for easy navigation
92-
- **Searchability**: Use keywords that users might search for
93-
94-
## Boundaries
95-
96-
### Do
97-
98-
- Update documentation to reflect code changes
99-
- Improve clarity and organization of existing documentation
100-
- Add missing documentation for features
101-
- Fix typos and grammatical errors
102-
- Update examples to use current syntax
103-
104-
### Do Not
105-
106-
- Change code to match documentation (unless fixing a bug)
107-
- Remove important information without replacement
108-
- Add documentation for features that don't exist
109-
- Use overly technical jargon without explanation
110-
- Make breaking changes to public documentation links
111-
112-
## Integration with Development
113-
114-
- Review pull requests for documentation completeness
115-
- Suggest documentation improvements during code review
116-
- Coordinate with developers to understand feature intent
117-
- Validate technical accuracy with project maintainers
118-
119-
## Tools and Resources
120-
121-
- **Markdown Style**: Follow `.markdownlint.json` configuration
122-
- **Spell Checking**: Follow `.cspell.json` dictionary
123-
- **Style Guide**: Follow project conventions in AGENTS.md
124-
- **Code of Conduct**: Reference CODE_OF_CONDUCT.md for community guidelines
46+
- Change code to match docs
47+
- Add docs for non-existent features

0 commit comments

Comments
 (0)