Skip to content

Commit c05d638

Browse files
Merge pull request #3406 from anupras-mohapatra-arm/copilot-instructions
Attempt at refactoring copilot-instructions into skills
2 parents 59993a8 + 2679d91 commit c05d638

23 files changed

Lines changed: 2066 additions & 817 deletions

File tree

.github/copilot-instructions.md

Lines changed: 11 additions & 771 deletions
Large diffs are not rendered by default.

.github/review-guidelines.md

Lines changed: 17 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,17 @@
1-
### Maintenance checks for Learning Paths and Install Guides
2-
3-
Please review the content in the specified content path and support my manual review by:
4-
5-
1. **Summarizing what this guide does**
6-
- What the end goal is
7-
- What platform(s) and environments it targets
8-
- Any key assumptions the reader must meet
9-
10-
2. **Identifying dependencies and moving parts**
11-
- OS, architecture, toolchains, frameworks, SDKs
12-
- External repositories, models, downloads, or services
13-
- Commands or workflows that are central to the guide
14-
15-
3. **Flagging potential risk areas**
16-
- References to old OS versions, runtimes, or toolchains
17-
- Dependencies that may be stale, deprecated, or fragile
18-
- Links or resources that might require checking
19-
- Steps that rely heavily on UI flows or screenshots
20-
21-
4. **Calling out anything that may need a closer human look**
22-
- Ambiguous or unclear instructions
23-
- Areas where “latest” or unpinned versions are used
24-
- Places where ecosystem changes could affect correctness
25-
26-
---
27-
28-
### How to behave
29-
30-
- Be conservative and transparent — if something is uncertain, say so.
31-
- Prefer **flagging** over **fixing**.
32-
- Do not invent new commands, tools, or workflows.
33-
- If suggesting changes, keep them minimal and clearly optional.
34-
- Treat this as a *conversation starter* for the reviewer, not a final verdict.
35-
36-
---
37-
38-
### Output format (keep it lightweight)
39-
40-
Please respond with:
41-
- A short summary of the guide
42-
- A bulleted list of dependencies
43-
- A bulleted list of review flags or questions to consider
44-
45-
No code changes are required unless I explicitly ask for them.
1+
# Maintenance review guidance
2+
3+
Use `.github/skills/stale-content-review/SKILL.md` for stale-content risk scans and maintenance triage.
4+
5+
The skill includes:
6+
7+
- A periodic scan workflow for Learning Paths and install guides.
8+
- A deterministic script for finding likely stale-content signals.
9+
- Reference guidance for interpreting temporal wording, screenshots, mutable dependencies, external links, old dates, and version-sensitive content.
10+
11+
For one-off manual reviews, run:
12+
13+
```bash
14+
python3 .github/skills/stale-content-review/scripts/stale_content_scan.py <content-path>
15+
```
16+
17+
No content changes are required unless explicitly requested.
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
name: audit-images
3+
description: Audit and fix Markdown image alt text in Arm Learning Paths and install guides. Use when the user asks to review images, find deficient alt text, count faulty images, run project-level or path-level image audits, track before/after image quality, or update image alt text and captions against repository image guidance.
4+
---
5+
6+
# Audit images
7+
8+
## Description
9+
10+
Audit Markdown image references in Arm Learning Paths and install guides, report deficient alt text and image syntax, and help fix alt text with useful instructional descriptions.
11+
12+
Use the script for repeatable inventory and counting. Use assistant judgment for semantic alt-text quality and final edits.
13+
14+
## Prerequisites
15+
16+
- Work from the repository root.
17+
- Read `AGENTS.md` to locate shared guidance.
18+
- Read `references/image-guidance.md` before editing image alt text, captions, or image syntax.
19+
20+
## Trigger
21+
22+
Use this skill when the user asks to:
23+
24+
- Audit images or alt text.
25+
- Find placeholder, vague, missing, malformed, or duplicated alt text.
26+
- Count faulty images across the project or inside one Path/guide.
27+
- Track image audit counts before and after fixes.
28+
- Fix image alt text, captions, or `#center` syntax.
29+
30+
## Review levels
31+
32+
### Project-level review
33+
34+
Scan all Learning Paths and install guides unless the user gives a narrower scope.
35+
36+
Use project-level review to:
37+
38+
- Count total image references and faulty image references.
39+
- Group faults by content unit and issue type.
40+
- Identify high-priority directories or files for cleanup.
41+
- Produce a before/after baseline for tracking progress.
42+
43+
Don't mass-edit the whole project unless the user explicitly asks. Prefer reporting the project-level inventory and then fixing one Path, guide, category, or batch.
44+
45+
### Path/guide-level review
46+
47+
Scan one Learning Path directory, install guide file, or install guide directory.
48+
49+
Use path/guide-level review to:
50+
51+
- List each faulty image with file, line, image path, current alt text, caption, and issue type.
52+
- Inspect surrounding Markdown context before changing alt text.
53+
- View local images when visual inspection is needed.
54+
- Fix alt text and syntax in place.
55+
- Re-run the audit and report before/after counts.
56+
57+
## Workflow
58+
59+
1. Identify whether the requested scope is project-level or path/guide-level.
60+
2. Run `.github/skills/audit-images/scripts/audit_images.py` on that scope.
61+
3. Record the baseline summary: total images, faulty images, content units affected, and issue counts.
62+
4. Depending on the request level, do the following:
63+
- For project-level requests, summarize the results and suggest prioritized cleanup batches unless the user asked for edits.
64+
- For path/guide-level edit requests, inspect the relevant Markdown context and image files.
65+
5. Suggest rewrites for deficient alt text using `references/image-guidance.md`.
66+
6. After the reviewer accepts suggestions, rewrite text, then re-run the audit on the same scope.
67+
7. Report before/after counts, files changed, and any remaining issues.
68+
69+
## Validation rules
70+
71+
- Treat the script as a detector, not the final authority. It flags likely problems for review.
72+
- Use `references/image-guidance.md` as the source of truth for alt text, captions, placeholder text, `#center` syntax, and figure numbering.
73+
- Don't replace meaningful alt text only because it is long or short; judge whether it helps the learner complete the task.
74+
- Preserve valid local image paths and existing captions unless they are wrong, vague, or outdated.
75+
- Preserve repository image syntax unless syntax cleanup is the target of the edit.
76+
77+
## Error handling
78+
79+
- If the script reports a missing local image path, verify whether the path is site-root-relative, file-relative, or intentionally external before changing content.
80+
- If an image cannot be inspected, fix only issues that can be resolved from surrounding Markdown context and state the limitation.
81+
- If project-level results are too large to edit safely, report the inventory and recommend a smaller batch.
82+
- If the audit script and visual/context review disagree, explain the judgment and leave a short note in the final response.
83+
84+
## Script usage
85+
86+
Run a project-level audit:
87+
88+
```bash
89+
python3 .github/skills/audit-images/scripts/audit_images.py
90+
```
91+
92+
Run a path-level audit:
93+
94+
```bash
95+
python3 .github/skills/audit-images/scripts/audit_images.py content/learning-paths/servers-and-cloud-computing/example-path
96+
```
97+
98+
Write JSON for tracking:
99+
100+
```bash
101+
python3 .github/skills/audit-images/scripts/audit_images.py --format json --output image-audit.json
102+
```
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# Image guidance
2+
3+
## Image formatting, alt text, and captions
4+
5+
In this repository, the text before `#center` in an image tag is the alt text.
6+
7+
Use this format:
8+
9+
```md
10+
![Descriptive alt text#center](image.png "Optional caption")
11+
```
12+
13+
Rules:
14+
- Do not use placeholder values such as `alt-txt`, `alt text`, or similar
15+
- Do not wrap alt text in extra quotation marks inside `[]`
16+
- Keep `#center` attached directly to the alt text with no extra space before it
17+
- The caption is optional and should be short, descriptive, and natural
18+
- Avoid outdated figure numbering such as `Figure 1:` unless the content genuinely depends on numbered cross-references
19+
20+
Correct:
21+
22+
```md
23+
![Diagram showing the WebGPU rendering flow for drawing a triangle#center](images/webgpu-draw-high-level.svg "WebGPU rendering flow for drawing a triangle")
24+
```
25+
26+
Incorrect:
27+
28+
```md
29+
!["Triangle using WebGPU" #center](images/webgpu-draw-high-level.svg "Figure 8: Triangle using WebGPU")
30+
```
31+
32+
Incorrect:
33+
34+
```md
35+
![alt-txt#center](images/webgpu-draw-high-level.svg "Figure 8: Triangle using WebGPU")
36+
```
37+
38+
## Alt text requirements for tutorials
39+
40+
Learning Paths and install guides are instructional content. Images are usually not decorative. Alt text must help the learner understand what they would otherwise miss.
41+
42+
For every image, alt text should explain:
43+
- What is shown
44+
- What the learner should notice
45+
- Why it matters in the current step
46+
47+
For screenshots:
48+
- Name the screen, tool, or interface shown
49+
- Mention the relevant UI element, tab, field, button, or output
50+
- Explain what the learner should look for in the screenshot
51+
- Connect the image to the current step or expected result
52+
53+
For diagrams:
54+
- Describe the components and relationships shown
55+
- Explain the purpose of the diagram in the current task
56+
- Focus on the workflow, architecture, or sequence the learner needs to understand
57+
58+
For terminal or output images:
59+
- State what command result or status is shown
60+
- Highlight the important confirmation, value, or error message
61+
- Explain why that output matters
62+
63+
For hardware images:
64+
- Describe the device or setup only if it helps the learner complete the task
65+
- Avoid purely decorative descriptions
66+
67+
## Alt text quality rules
68+
69+
- Write meaningful alt text, not placeholders
70+
- Keep it concise but complete. One to three sentences is usually enough
71+
- Prefer instructional value over visual detail
72+
- Include visible text only when the learner needs that text
73+
- Do not use captions as a substitute for alt text
74+
- Do not encode alignment instructions inside the caption
75+
76+
## Caption guidance
77+
78+
- Use short, descriptive captions when needed
79+
- Captions should add context for all readers
80+
- Avoid `Figure X` numbering unless explicit image cross-references are required
81+
82+
Preferred example:
83+
84+
```md
85+
![Screenshot of the Arm Performance Studio timeline showing CPU activity spikes during Mandelbrot rendering. The Timeline tab is selected and the spike region is highlighted so the learner can identify where CPU activity increases during the run.#center](images/timeline-spike.png "Arm Performance Studio timeline showing CPU activity during Mandelbrot rendering")
86+
```
87+
88+
## Image cleanup workflow
89+
90+
- Replace all placeholder alt text such as `alt-txt` with meaningful descriptions
91+
- Keep the repository-specific `#center` syntax when fixing alt text
92+
- Do not remove valid alignment syntax during cleanup
93+
- For bulk cleanup, update the guidance first, then fix content by category or directory in manageable batches

0 commit comments

Comments
 (0)