Skip to content

Commit c4587b8

Browse files
Merge pull request #5855 from pavinduLakshan/add_agent_skill
Add agent skill for fixing documentation issues
2 parents 1ce2372 + 47d8115 commit c4587b8

File tree

1 file changed

+181
-0
lines changed
  • .github/skills/fix-documentation-issues

1 file changed

+181
-0
lines changed
Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
---
2+
name: fix-documentation-related-issues
3+
description: Guidelines to follow for sending fixes for documentation related Github issues
4+
---
5+
6+
=========================================
7+
CORE RULES
8+
=========================================
9+
- MOST IMPORTANT: For all version control related operations, rely on the git command line tool and Github CLI. **NO THIRD PARTY TOOLS OR MCP SERVERS ARE ALLOWED.**
10+
- MOST IMPORTANT: The docs-is repository has all versions inside the en/identity-server directory. You need to fix ALL appropriate version directories that are affected.
11+
- MOST IMPORTANT: Create a SINGLE PR that includes changes to ALL affected version directories - DO NOT create separate PRs for each version.
12+
- MOST IMPORTANT: You CANNOT create, modify, or replace screenshots or images. If the issue requires changing screenshots or images, add the `AI-Agent/Cannot-Fix` label to the related Github issue and explain in a comment.
13+
- MOST IMPORTANT: For broken image issues (not accessible/not found):
14+
* First check the current version for the image
15+
* If not found, search ALL other version directories in the repository
16+
* If found in another version, copy the image to the current working branch
17+
* If the image doesn't exist in ANY version, add AI-Agent/Cannot-Fix label and explain why
18+
- Refer steps: go to LABEL-BASED PROCESSING section and refer **Step 5: Image Handling** section.
19+
- You MUST fix documentation in ALL appropriate version directories based on the issue description.
20+
- If a file is outside the version directories, fix that common file once.
21+
- If the issue is related to the file inside the version then fix it inside that specific version and check for other version as well.
22+
- Disregard any time constraints or efficiency concerns - creating comprehensive fix is required.
23+
- Never touch unrelated files, code, or system resources.
24+
- Allowed: documentation fixes (broken links, spelling mistakes, grammatical errors, formatting issues, Suggestions).
25+
- Forbidden: executables, code changes, or security-related modifications.
26+
- ABSOLUTELY MANDATORY: When creating NEW documentation, the ENTIRE document MUST 100% adhere to Microsoft Style Guide (https://learn.microsoft.com/en-us/style-guide/welcome/). This includes structure, headings, voice, terminology, formatting, lists, tables, examples, and all other aspects of the document. No exceptions.
27+
- MOST IMPORTANT: When editing existing documentation, apply Microsoft Style Guide standards ONLY to the newly created/added content. DO NOT modify existing content to match style guidelines unless specifically instructed to fix formatting/style issues. Style conformance is required for new content but should not be used as justification to change existing content.
28+
- MOST IMPORTANT: When creating new documents that require images, you MUST first verify that the images are accessible in the repository. Only use images that are confirmed to exist and are accessible. If needed images don't exist or aren't accessible in the current version branch, but exist in another version branch, copy those images to the correct directory in the current version branch before referencing them. NEVER add broken image links.
29+
30+
===============================
31+
FIXING DOCUMENTATION ISSUES
32+
===============================
33+
Follow this process to handle the documentation issues:
34+
35+
1. Version detection:
36+
- If the related Github issue explicitly mentions a version (in title/body/labels):
37+
* FIRST: Fix that specific version mentioned in the issue(from "en/identity-server/" can find the all version availables)
38+
* THEN: Check ALL other versions to see if they have the same issue
39+
* If other versions have the same issue, fix them ALL in the same PR
40+
- If NO version is mentioned in the issue:
41+
* START with the LATEST_VERSION.
42+
* Work backward from newest to oldest versions systematically
43+
* Fix ALL affected versions in a single PR
44+
- IMPORTANT: Even when a specific version is mentioned, you MUST verify if other versions need the same fix
45+
- Determine ALL version directories that need to be updated based on the issue
46+
- For files inside version-specific directories (e.g., en/identity-server/), identify ALL affected versions
47+
- For files outside version directories, make a single change that applies to all versions
48+
- NEVER skip version checks - always be thorough and comprehensive
49+
50+
2. Apply the fix required for the related Github issue to the appropriate file locations:
51+
- For version-specific issues, update files in ALL relevant version directories (en/identity-server/VERSION/)
52+
- For common issues, update files in the common location
53+
- Make all changes in the SAME branch
54+
- IMPORTANT: Ensure you're working in the docs-is directory by executing `cd $DOCS_IS_PATH` before any file operations
55+
- NEVER modify product-is files when creating a docs-is PR
56+
57+
3. Create a SINGLE PR containing all version changes in the docs-is repository:
58+
- Clearly document in PR which versions were updated and why
59+
- Find ALL version directories under en/identity-server/ that need updating
60+
- Update files in ALL affected version directories in the same branch
61+
- PR title: `Fix: [short description] for all affected versions (product-is#${ISSUE_NUMBER})`
62+
- Commit msg: `Fix: [short description] for all affected versions (product-is#${ISSUE_NUMBER})`
63+
- PR body template:
64+
65+
- Fixes https://github.com/wso2/product-is/issues/${ISSUE_NUMBER}
66+
- Type: [Broken Links / Spelling / Grammar / Documentation / Suggestions]
67+
- Summary: [1–2 line description of changes]
68+
- Affected Versions: [List all versions that were updated in this PR]
69+
- Style Scope Verification: [Include ONLY when adding to existing documents] Verify Microsoft Style Guidelines have been applied ONLY to newly added content without modifying existing content style unless specifically requested.
70+
- Image Verification: [Include ONLY when creating new documentation] Verify that all referenced images exist in the repository and are accessible. No broken image links have been added.
71+
72+
- After creating the PR, add a comment to the original product-is issue with the link to the PR. The comment must list all versions that were updated in the PR
73+
74+
=========================================
75+
DOCUMENTATION STYLE GUIDELINES
76+
=========================================
77+
All documentation changes, regardless of the issue type, MUST comply with the Microsoft Style Guide (https://learn.microsoft.com/en-us/style-guide/welcome/).
78+
MOST IMPORTANT:-
79+
Key rules that MUST be enforced:
80+
81+
- Use active voice and present tense
82+
- Be concise and use plain language
83+
- Use sentence case for all headings (capitalize only the first word and proper nouns)
84+
- Do NOT use decorative or special symbols (like ¶, →, ») in headings or text
85+
- Use numbered lists for sequential tasks and bulleted lists for non-sequential items
86+
- Format all code elements, UI labels, menu paths, and file names consistently:
87+
- Enclose UI labels and button names in **bold** (for example, **Create**)
88+
- Enclose code elements, file paths, and URLs in backticks (`` ` ``)
89+
- Always use correct and consistent product names and terminology
90+
- Use descriptive link text instead of raw URLs (for example, `[Azure portal](https://portal.azure.com)` instead of `https://portal.azure.com`)
91+
- Avoid colloquial language, jargon, and ambiguous pronouns
92+
- Use inclusive language
93+
- Follow proper punctuation and capitalization rules (end all complete sentences with periods)
94+
95+
MUST Reference the Microsoft Style Guide for specific guidance on:
96+
- Word choice and terminology (https://learn.microsoft.com/en-us/style-guide/word-choice/)
97+
- Grammar (https://learn.microsoft.com/en-us/style-guide/grammar/grammar-and-parts-of-speech)
98+
- Punctuation (https://learn.microsoft.com/en-us/style-guide/punctuation/)
99+
- Formatting (https://learn.microsoft.com/en-us/style-guide/text-formatting/)
100+
- Global content (https://learn.microsoft.com/en-us/style-guide/global-communications/)
101+
102+
FOR NEW DOCUMENTS - FULL COMPLIANCE REQUIRED:
103+
- When creating entirely new documentation files, EVERY aspect of the document MUST fully comply with Microsoft Writing Style Guide
104+
- This includes document structure, all headings, terminology choices, paragraph structure, examples, code formatting, links, and UI element formatting
105+
- New documents must be reviewed thoroughly to ensure 100% compliance before submission
106+
- No exceptions or partial compliance is acceptable for new documents
107+
- Include a verification statement in the PR that explicitly confirms full Microsoft Style Guide compliance
108+
109+
SCOPE LIMITATION FOR EXISTING DOCUMENTS:
110+
- When editing existing documents, apply Microsoft Style Guide standards ONLY to the newly created/added content
111+
- Do NOT modify existing content to match style guidelines unless the issue specifically requests formatting/style fixes
112+
- When adding new sections to existing documents, maintain stylistic consistency with the surrounding content while ensuring new content follows Microsoft guidelines
113+
- Focus style compliance efforts only on the portions you're creating or explicitly instructed to modify
114+
115+
=========================================
116+
ERROR HANDLING
117+
=========================================
118+
- For screenshot-related issues:
119+
* If the issue requests creating new screenshots, updating/replacing existing screenshots, or modifying images
120+
* If the issue reports that screenshots are unclear, blurry, or need to be regenerated
121+
* Comment: "This issue requires creation or modification of screenshots, which cannot be done automatically." in the RELATED GITHUB ISSUE.
122+
* Remove workflow label (`AI-Agent/In-Progress`) from the related GITHUB ISSUE.
123+
* Add label: `AI-Agent/Cannot-Fix`
124+
* NEVER attempt to generate or modify screenshots
125+
126+
- For GitHub push protection errors:
127+
- Large files error:
128+
* Check for large files with: `git status` and `git ls-files -s | sort -n -k 2`
129+
* Remove large files if not needed for the fix
130+
* If large files are needed, split the changes into smaller commits
131+
* If still encountering errors, note in the PR that manual intervention is needed
132+
133+
- Secret scanning error:
134+
* Check for accidentally included secrets, tokens, keys, passwords
135+
* Remove any sensitive information
136+
* If there are no actual secrets in your changes, note in PR that manual review is needed
137+
138+
- Always continue with the workflow as best you can even if you encounter push errors
139+
140+
- For external link verification:
141+
- Always verify external links thoroughly using multiple methods before reporting issues
142+
- For ANY external resource (blogs, documentation, forums, GitHub repos, etc.):
143+
* Try multiple verification approaches and user-agent settings
144+
* Check if the content is accessible through alternative means
145+
* Consider temporary network/regional access issues before marking as invalid
146+
- Only mark links as invalid if they are:
147+
* Completely unreachable after multiple attempts from different contexts
148+
* Containing irrelevant content with no connection to the topic
149+
* Known to be permanently removed or deprecated
150+
- If a link is technically challenging to access but likely valuable:
151+
* Note the access challenge in the PR
152+
* Include a summary of the content if you can access it
153+
* Proceed with implementation using the best available information
154+
* Consider suggesting an archive.org link as a fallback
155+
156+
- For invalid suggestions with references:
157+
- Comment: "Reference verification failed: [specific reason]. The provided reference [URL/source] does not align with current repository documentation or contains inaccurate information."
158+
- Remove workflow labels(AI-Agent/In-Progress)
159+
- Add label: AI-Agent/Cannot-Fix
160+
161+
- For partially verifiable suggestions:
162+
- Comment: "Partial verification completed. Verified: [what was confirmed]. Requires manual review for: [what needs verification]."
163+
- Remove workflow labels(AI-Agent/In-Progress)
164+
- Add label: AI-Agent/Cannot-Fix
165+
166+
=========================================
167+
SUCCESS CRITERIA
168+
=========================================
169+
- You must correctly identify ALL version directories in the docs-is repository that need to be updated.
170+
- Create a SINGLE PR that includes changes to ALL affected version directories.
171+
- Use a single branch for all changes, including changes across multiple version directories.
172+
- The task is NOT complete until ALL required version directories have been updated in the PR.
173+
- Only relevant files are changed in each version directory.
174+
- Fix verified with running the docs-is repository successfully after fixing. How to run --> README.md file of the docs-is repository.
175+
- MOST IMPORTANT: After successful build, you MUST verify that the reported issue is actually resolved. Building without errors is not sufficient - you must confirm that the specific problem mentioned in the issue has been fixed.
176+
- MOST IMPORTANT: The PR is comprehensive, includes changes to ALL affected version directories, and targets the master branch of docs-is.
177+
- MOST IMPORTANT: For all operations on the docs-is repository, you MUST be in the docs-is working directory ($DOCS_IS_PATH).
178+
- MOST IMPORTANT: Only docs-is content is ever pushed to the docs-is repository. NEVER push product-is content to docs-is.
179+
- For issues that cannot be resolved, add the label `AI-Agent/Cannot-Fix` and provide the reason in a comment on the related Github issue.
180+
- Add `AI-Agent/Fixed` label to the related Github issue after creating the PR.
181+
- Always add a comment to the related Github issue with the link to the created PR, clearly indicating which versions were updated.

0 commit comments

Comments
 (0)