Skip to content

Commit c82b7c8

Browse files
Merge pull request #5898 from himeshsiriwardana/copilot-instructions.md
Added copilot style guide for WSO2 IS
2 parents 32dfe70 + 83747bb commit c82b7c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+389
-2203
lines changed

.github/copilot-instructions.md

Lines changed: 352 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,352 @@
1-
We are writing the documents for,
2-
- Developers – Integrating the product, need examples and clear config steps.
3-
- Testers/QA – Verifying workflows, often need quick references.
4-
- Support Engineers / Admins – Solving problems, need troubleshooting and clarity.
5-
- Newcomers – Just getting started, need onboarding and context.
6-
7-
We assume that user only has the basic knowledge of,
8-
- Programming
9-
- Authentication
10-
- What API means
11-
12-
Content should be always written assuming that the user has no prior knowledge of other concepts.
13-
14-
We follow below instructions in our documentation:
15-
- Make the document scannable
16-
- Aim for short, simple sentences. (Maximum 20-25 words)
17-
- Bold key terms or phrases.
18-
- Leave enough white space (line breaks between paragraphs, sections and list items.)
19-
- Keep your content succinct. Nothing more, nothing less.
20-
- Have smaller paragraphs with logical separation.
21-
- Avoid inline lists. Use bullet points whenever necessary.
22-
- Improving task-based documentation
23-
- Explain how to implement it step by step. What you see first, comes first.
24-
- Explain the WHY of each task. Your readers are engineers. They will not blindly follow you.
25-
- Use CLEAR, PLAIN, ACTION-FIRST writing
26-
- Sentence-case titles
27-
- Avoid passive voice
28-
- Avoid is, are, be, being, was, were
29-
- Avoid weasel words
1+
# WSO2 Identity Server documentation creation and reviewing instructions
2+
3+
Follow these instructions when creating new documentation content for WSO2 Identity Server. Adhere to all guidelines to ensure consistency, clarity, and quality.
4+
5+
## Scope and boundaries
6+
7+
### Audience
8+
9+
- Your primary audience is WSO2 Identity Server users, including system administrators, developers, and IT professionals.
10+
- Assume the audience has a basic understanding of IT concepts but may be unfamiliar with WSO2 Identity Server specifics.
11+
- Avoid jargon and explain concepts clearly.
12+
13+
### What you must do
14+
15+
- Strictly adhere to the authoring standards outlined below.
16+
- Choose the appropriate navigation location for the new content based on its topic and relevance.
17+
- Create content that is clear, concise, and actionable for the intended audience.
18+
- Ensure all technical details are accurate and up-to-date.
19+
- Use the provided templates and formatting rules consistently.
20+
21+
## Authoring standards
22+
23+
You must follow these standards when creating documentation content for WSO2 Identity Server.
24+
25+
### Voice and tone
26+
27+
- Use active voice and present tense. You can only use passive voice when the actor is unknown or unimportant.
28+
- Use plain language and short sentences.
29+
- Address the reader as “you.”
30+
- Keep a professional, friendly, neutral tone.
31+
- Avoid slang, jokes, sarcasm, and marketing language.
32+
33+
## Terminology and consistency
34+
35+
### 1. Product and feature names
36+
37+
- Use official product and feature names exactly as defined.
38+
- Do not invent shorthand names.
39+
- Do not change capitalization.
40+
- Do not alternate between long and short forms unless formally introduced.
41+
42+
**Correct:**
43+
- WSO2 Identity Server Console
44+
- Passkey Authentication
45+
46+
**Incorrect:**
47+
- WSO2 Identity Server console
48+
- Passkey auth
49+
50+
### 2. Acronyms and abbreviations
51+
52+
- Define acronyms on first use unless universally known (API, URL, JSON, HTTP).
53+
- After definition, use the acronym consistently.
54+
- Do not redefine an acronym within the same document.
55+
- Do not mix expanded and abbreviated forms randomly.
56+
57+
**Correct:**
58+
59+
> Multi-Factor Authentication (MFA)
60+
> Enable MFA for the application.
61+
62+
**Incorrect:**
63+
64+
> Multi-Factor Authentication (MFA)
65+
> Enable multi-factor authentication for the application.
66+
67+
### 3. Term consistency
68+
69+
- Use one term per concept.
70+
- Do not switch terminology mid-document.
71+
- If two terms are synonymous, choose one and use it consistently.
72+
73+
**Incorrect examples:**
74+
- application / app
75+
- organization / tenant
76+
- sign in / login (unless intentionally differentiated)
77+
78+
Consistency overrides preference.
79+
80+
### 4. Use standard technical terminology
81+
82+
- Prefer established technical terms.
83+
- Avoid inventing alternative phrases for common concepts.
84+
85+
**Prefer:**
86+
- server
87+
- endpoint
88+
- token
89+
- request
90+
- response
91+
- database
92+
- session
93+
94+
**Avoid:**
95+
- backend machine
96+
- link point
97+
- data store system (unless specific)
98+
99+
### 5. Avoid ambiguous pronouns
100+
101+
- Avoid “it,” “this,” “that,” or “they” if the referent is unclear.
102+
- Replace pronouns with explicit nouns when ambiguity exists.
103+
104+
**Ambiguous:**
105+
106+
> Configure the server and restart it.
107+
108+
**Clear:**
109+
110+
> Configure the server and restart the server.
111+
112+
### 6. Avoid weak “be” verb constructions
113+
114+
Reduce unnecessary use of:
115+
- am
116+
- is
117+
- are
118+
- was
119+
- were
120+
121+
Prefer direct verbs.
122+
123+
**Instead of:**
124+
125+
> The configuration is located in `deployment.toml`.
126+
127+
**Write:**
128+
129+
> The configuration file is `deployment.toml`.
130+
> Or:
131+
> Find the configuration in `deployment.toml`.
132+
133+
**Instead of:**
134+
135+
> The token is used to authenticate requests.
136+
137+
**Write:**
138+
139+
> The token authenticates requests.
140+
141+
Use “is” only when it improves clarity.
142+
143+
### 7. Prefer concrete language
144+
145+
- Use precise nouns and strong verbs.
146+
- Avoid vague verbs such as:
147+
- handle
148+
- manage
149+
- deal with
150+
- perform
151+
- utilize
152+
153+
**Instead of:**
154+
155+
> The system handles authentication.
156+
157+
**Write:**
158+
159+
> The system validates credentials and issues tokens.
160+
161+
### 8. Formal language policy
162+
163+
Avoid informal shorthand in prose:
164+
165+
- config → configuration
166+
- dev → development
167+
- prod → production
168+
- env → environment
169+
- repo → repository
170+
171+
These are allowed only inside code blocks, file paths, commands, or environment variable names.
172+
173+
### Heading capitalization rules
174+
175+
- Use **Sentence case** for all headings (document titles).
176+
- Capitalize the first word and any proper nouns.
177+
178+
Example:
179+
`# Configure passwordless authentication`
180+
181+
- Use consistent heading levels to reflect document structure.
182+
- Make headings task-focused and descriptive. Do not use generic headings like “Introduction” or “Details.”
183+
184+
### Lists
185+
186+
- Use numbered lists for procedures and ordered steps.
187+
- Use bulleted lists for non-sequential information.
188+
- Keep list items parallel in grammar and structure.
189+
190+
### Formatting rules
191+
192+
- UI labels, buttons, menu items: use **bold**.
193+
- Example: Select **Save**.
194+
195+
- Code elements, file names, paths, config keys, commands, URLs: use backticks.
196+
- Example: Update `deployment.toml`.
197+
198+
- Use descriptive link text. Do not paste raw URLs as link text.
199+
- Example: `[Microsoft Writing Style Guide](https://learn.microsoft.com/en-us/style-guide/welcome/)`
200+
201+
### Code blocks
202+
203+
- Use fenced code blocks with a language tag when known.
204+
- Keep code blocks focused.
205+
- Do not include secrets, tokens, passwords, or realistic keys.
206+
207+
Example:
208+
209+
```toml
210+
[server]
211+
hostname = "localhost"
212+
```
213+
214+
### Configuration guidance
215+
216+
When documenting configuration:
217+
218+
- Describe what the setting controls.
219+
- State the default value.
220+
- State constraints (type, valid range, allowed values).
221+
- Provide a minimal example.
222+
- Explain when the user should change it.
223+
224+
### Links and references
225+
226+
#### Internal links
227+
228+
- Use descriptive link text.
229+
- Prefer linking to canonical pages (overview or primary reference).
230+
- Avoid linking to unstable or temporary resources.
231+
232+
#### External links
233+
234+
- Use external links sparingly and only when they add clear value.
235+
- Use descriptive link text.
236+
- Prefer authoritative sources (official documentation or standards).
237+
238+
### Images and screenshots
239+
240+
- Do not add, generate, or request new images or screenshots as part of documentation creation.
241+
- Do not reference an image unless the user explicitly confirms it exists and is accessible.
242+
- Do not make images required to complete a task. Provide text alternatives.
243+
244+
## Documentation structure requirements
245+
246+
All task-based documentation must follow a logical, goal-oriented structure that guides the reader from start to finish. This should only apply to Guides and Tutorials. Community, Reference and API documentation may follow a different structure as appropriate.
247+
248+
The document must clearly communicate:
249+
250+
- What the reader will achieve.
251+
- When the task is applicable.
252+
- What prerequisites are required.
253+
- How to complete the task (clear, sequential steps).
254+
- How to confirm the outcome.
255+
- How to troubleshoot common issues (if applicable).
256+
- What to do next (related tasks or follow-up actions).
257+
258+
Each section must build on the previous one and move the reader toward successful task completion.
259+
260+
Avoid:
261+
- Unnecessary background information.
262+
- Repetition.
263+
- Conceptual digressions unrelated to the task.
264+
- Sections with no actionable value.
265+
266+
## Quality checklist (must pass)
267+
268+
Before finalizing output, ensure:
269+
270+
- Headings are sentence case.
271+
- Procedures use numbered lists.
272+
- UI labels are **bold**.
273+
- Code elements and paths are in backticks.
274+
- Links use descriptive text.
275+
- Content is concise, active voice, present tense.
276+
- No unverified claims or placeholders remain.
277+
- No secrets or sensitive data appear in examples.
278+
- After creating content, run Vale locally and resolve all warnings.
279+
- If Vale flags a word as a spelling error, check whether it is a legitimate product term, technical term, or widely accepted term. If yes, add it to `.vale/styles/config/vocabularies/vocab/accept.txt`. If not, fix the spelling instead.
280+
- When reviewing a pull request on GitHub, check the output for adherence to all guidelines. Comment on any issues and request changes if necessary.
281+
282+
## Output requirements
283+
284+
- Output must be Markdown.
285+
- Use a single top-level title (`# ...`).
286+
- Use consistent section ordering and headings.
287+
- If assumptions are made, include an **Assumptions** section near the top.
288+
- End with a **Next steps** section when appropriate.
289+
290+
### Vale verification requirement
291+
292+
Before finalizing documentation output:
293+
294+
- If Vale output is provided, resolve all reported errors and warnings before finalizing.
295+
- If Vale output is not available, remind the user to run Vale locally.
296+
297+
### CI feedback handling
298+
299+
When Vale feedback is provided through CI checks:
300+
301+
- Only respond to the **latest** Vale check run.
302+
- Ignore resolved or outdated annotations from previous commits.
303+
- Do NOT repeat or expand on previously addressed Vale findings.
304+
- If the latest CI run is clean, do not comment on earlier issues.
305+
306+
## Vocabulary guidelines
307+
308+
Strictly follow these vocabulary guidelines when writing WSO2 Identity Server documentation.
309+
310+
### Use of "multiple"
311+
312+
- Use multiple only when it adds clarity about behavior, constraints, or guarantees.
313+
- Avoid multiple when the plural form already conveys the meaning.
314+
- Use multiple when it expresses a real capability, constraint, or relationship.
315+
316+
- Examples
317+
318+
- A user can belong to multiple organizations.
319+
- A policy can include multiple conditions.
320+
- An application can have multiple identity providers.
321+
- A tenant may configure multiple authentication methods.
322+
323+
In these cases, removing multiple would make the statement ambiguous or weaker.
324+
325+
### Use of 'login' and 'sign-in'
326+
327+
- Use login and sign-in consistently based on context.
328+
- They are not interchangeable in documentation.
329+
330+
#### Login / log in — system and developer perspective
331+
332+
Use login for system-level and developer-facing terminology, especially when the term is widely known, standardized, or protocol-defined.
333+
334+
Examples:
335+
- social login
336+
- login endpoint
337+
- login_hint
338+
- login URI
339+
- last login time
340+
341+
Avoid using login to describe user-facing flows or actions.
342+
343+
#### Sign-in / sign in — user-facing perspective
344+
345+
Use sign-in for end-user UI text, user actions, and user-facing flows or journeys.
346+
347+
Examples:
348+
- Sign in with Google
349+
- Sign in to the WSO2 Identity Server Console
350+
- when the user signs in
351+
- sign-in flow
352+
- sign-in journey

0 commit comments

Comments
 (0)