원클릭으로
skill-doc-diff
Reference for the Qt Doc Team diff format - generic feedback and recommendation template with validation and approval workflow
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Reference for the Qt Doc Team diff format - generic feedback and recommendation template with validation and approval workflow
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Qt documentation products, modules, repository structure, and API types. Apply when working with Qt documentation, resolving module names, or understanding Qt's documentation ecosystem.
Authoritative style rules for writing accessibility alt text in Qt documentation, including priority order, formatting rules, and terminology guidelines. Use when adding alt text to images.
Cross-product impact checking for Qt documentation changes. Load this skill whenever a doc change (page rename, title change, filename change, API rename, QML type rename) may affect products outside the changed module. Covers all doc.qt.io products, all doc-snapshots.qt.io products, and qt.io marketing pages. Provides verified snapshot paths, index file availability, link mechanisms per product, and search procedures in priority order. Use alongside doc-impact-analyzer Steps 5–6 or standalone when auditing cross-product reference breakage.
Structured findings report format shared by doc-structure-auditor and doc-impact-analyzer. Covers severity levels, finding types, summary tables, validation blocks, notes, and verdicts.
Language, grammar, and style guidelines for Qt documentation including active voice, terminology, QUIP 25 standards, and proper API documentation patterns. Covers both WHAT to write (style/content) and HOW to write it (QDoc syntax).
Reference for Qt's 80-column rule and text wrapping guidelines for documentation
| name | skill-doc-diff |
| description | Reference for the Qt Doc Team diff format - generic feedback and recommendation template with validation and approval workflow |
| metadata | {"version":"5.22"} |
A structured template for presenting documentation changes for human review and approval.
CRITICAL: Always use ```diff code fence for syntax highlighting.
**Suggestion N of X for {basename}:{line}:**
**Warning:** `{exact warning text}` (if from QDoc warning)
**Category:** {Issue Type}
**Source:** `{full/path/from/repo/root}`
**Output:** `{output-file.html}` (if verifiable)
```diff
NN→{context}
- NN→{removed}
+ →{added}
NN→{context}
Cause: {Why this issue occurs + evidence from searches}
Validation:
Comments: {Why this matters}
Should I apply this fix to the file?
**With multiple fix options:**
```markdown
**Suggestion N of X for {basename}:{line}:**
**Warning:** `{exact warning text}`
**Category:** {Issue Type}
**Source:** `{full/path/from/repo/root/{basename}}`
**Output:** `{output-file.html}` (for link fixes)
**Cause:** {Why this warning occurs}
**Fix Options:**
1. **{Option name}** - {description}
2. **{Option name}** - {description}
**Recommended:** Option N because {reason}
```diff
{diff for recommended option}
Validation: ...
Which option should I apply?
**Progress tracking:**
- Use "Suggestion N of X" (e.g., "Suggestion 8 of 20")
- Or "File N of X" when showing multiple files
- Helps user track progress through large change sets
## Source Field
**Purpose:** Provide both scannable identification (header) and precise location (Source field) for disambiguation.
**Header format:** `**Suggestion N of X for {basename}:{line}:**`
- `{basename}` - Filename only (e.g., `qquickfolderdialog.cpp`)
- `{line}` - Primary line number of the change
- Keeps header scannable and concise
**Source field:** `**Source:** \`{full/path/from/repo/root}\``
- Full path to the source file being edited
- Resolves ambiguity (multiple files with same basename)
- Enables copy-paste to editor
- Placed after Warning and Category fields
**Examples:**
```markdown
**Suggestion 3 of 7 for qquickfolderdialog.cpp:27:**
**Source:** `qtdeclarative/src/quickdialogs/quickdialogs/qquickfolderdialog.cpp`
**Suggestion 1 of 5 for qquickfolderdialog.cpp:42:**
**Source:** `qtdeclarative/src/labs/platform/qquicklabsplatformfolderdialog.cpp`
When Source can be omitted:
Automation parsing:
# Header provides quick identification
header = re.match(r"\*\*Suggestion (\d+) of (\d+) for (.+):(\d+):\*\*", line)
basename, line_num = header.group(3), header.group(4)
# Source field provides full path for file operations
source = re.search(r"\*\*Source:\*\* `(.+)`", block).group(1)
Purpose: Clearly identify the type of issue being addressed.
Placement: After the Warning field, before the Source field.
Common categories:
Combined categories (when multiple issues in one suggestion):
80-Column Violation + Inconsistent CapitalizationCharacter Encoding + QDoc SyntaxExample:
**Suggestion 3 of 10 for example.qdoc:42:**
**Warning:** `\image is without a textual description`
**Category:** Missing Alt Text
**Source:** `qtdoc/doc/src/examples/example.qdoc`
```diff
...
## Warning Field
**Purpose:** Show the exact QDoc warning being addressed. Enables traceability from warning to fix.
**Placement:** Immediately after the suggestion header, before Category. Optional for non-warning issues.
**Format:** Use backticks to show the exact warning text.
```markdown
**Warning:** `Can't link to 'SamplerHint'`
Common warning patterns:
Can't link to 'Target' - Link resolution failureFailed to find function when parsing \fn ... - Signature mismatchNo output generated for property '...' because '...' is undocumented - Missing parent class docsOutput file already exists, overwriting ... - Duplicate page definitionsPurpose: Show the generated HTML output page where the documented text appears. This enables the reviewer to verify the fix in the actual published documentation.
Why it matters: After applying a fix, the reviewer can navigate to this HTML page (on doc.qt.io or doc-snapshots.qt.io) to confirm the link works correctly in the rendered output.
Placement: After Source field, before diff block. Optional but helpful for context.
Format: **Output:** \{filename.html}``
New pages: When adding \qmltype, \class, or \page documentation that creates a new HTML page (rather than editing an existing one), add (new) suffix:
**Output:** `qml-qt-labs-stylekit-theme.html` (new)
CRITICAL: Only include if verified. If you cannot find the output file, omit the field entirely. It cannot be wrong or guessed.
Important distinction:
qml-qtlocation-place.html). Reviewer opens THIS page to verify the fix.qml-geocoordinate.html just because you're fixing a \l geoCoordinate link)How to find the output file:
NEVER GUESS. Use the method appropriate for the document type:
For \page docs (overviews, manual pages)
Read the source file and find the \page command:
\page sbom.html
\title Qt SBOM Overview
The HTML filename is specified directly: sbom.html
For type docs (class, QML type, module) Search index files for the CONTAINING TYPE being documented:
grep 'name="Place"' */doc/*/*.index
Extract the href attribute:
<qmltype name="Place" href="qml-qtlocation-place.html" ...>
Published docs - URL path = HTML filename
Local build output
ls <module>/doc/<submodule>/*.html | grep <type>
For NEW documentation (no index entry yet) Apply the QDoc filename algorithm from skill-qdoc-output:
{classname}.htmlqml-{module}-{type}.html (all lowercase){module}-module.html or {module}-qmlmodule.htmlgenerator.cpp:fileBase() (lines 308-376)Mark with (new) suffix in the Output field.
Naming patterns (see skill-qdoc-output for full reference):
| Type | Pattern | Example |
|---|---|---|
| C++ class | {classname}.html | qwidget.html |
| QML type | qml-{module}-{type}.html | qml-qtquick-rectangle.html |
| QML value type | qml-{type}.html | qml-color.html |
| C++ module | {module}-module.html | qtcore-module.html |
| QML module | {module}-qmlmodule.html | qtquick-qmlmodule.html |
| Group | {groupname}.html | animation.html |
| Example | {project}-{name}-example.html | qtbase-calculator-example.html |
| Page | per \page command | getting-started.html |
Examples:
**Output:** `qml-qtlocation-place.html` (existing QML type)
**Output:** `qml-qt-labs-stylekit-theme.html` (new) (new QML type)
**Output:** `mapviewer-example.html` (existing example)
When to include:
(new) suffixPurpose: Explain WHY the issue occurs and show evidence from your investigation.
Placement: After the diff block.
Include:
Examples:
**Cause:** `SamplerHint` is a nested enum in `QQuick3DTextureProviderExtension` and requires full qualification. Searched `grep 'name="SamplerHint"'` in index files — not found at top level, only under parent class.
**Cause:** The `\fn` signature uses `AttachmentSelector` but QDoc expects `QSSGFrameData::AttachmentSelector`. Verified in header: `enum class AttachmentSelector` is declared inside `QSSGFrameData`.
**Cause:** Uses "via" which is a Latin term. Per R38, use "through", "using", or "with" instead.
Purpose: Present multiple valid solutions when there's genuinely no single correct answer.
IMPORTANT: Search codebase first. Before presenting options, grep for existing usage patterns. If the codebase already has an established pattern, consistency, or best practice that indicates one correct solution, recommend that solution directly WITHOUT presenting Fix Options.
When to use Fix Options:
When NOT to use Fix Options:
Format:
**Fix Options:**
1. **Fully qualify** - Use `QSSGFrameData::AttachmentSelector` in `\fn`
2. **Use typedef** - Create a typedef at namespace scope
3. **Simplify signature** - Remove the parameter from docs
**Recommended:** Option 1 because it matches the actual function signature.
Approval prompt for options:
Which option should I apply? (1/2/3 or skip)
Purpose: Separate actionable suggestions from informational observations.
Rule: Only actionable fixes get numbered as "Suggestion N of X". Exemptions and observations go in a separate Notes section at the end of the review.
What goes in Notes (not numbered):
Format:
## Notes
**Legal Text (lines 79-86):** Exempt from style review per R57. No changes suggested.
**Line Length:** All prose lines within advisory threshold. No issues.
Wrong (numbered as suggestion):
**Suggestion 4 of 5 for file.qdoc:79:**
**Category:** Legal Text - Exempt
...
**Decision:** EXEMPT - No changes suggested.
Correct (in Notes section):
**Suggestion 3 of 4 for file.qdoc:43:**
... [actionable fix] ...
---
## Notes
**Legal Text (lines 79-86):** Exempt per R57. The "General Legal Disclaimer" section uses standard legal boilerplate that should not be modified without legal counsel.
Counting: Only count actionable suggestions in "N of X". If you have 4 actionable fixes and 1 exemption, use "Suggestion N of 4" (not "N of 5").
Arrow (→) is the fixed anchor. All lines align to keep arrows in the same column.
Purpose: The aligned arrows create a visual column marking where file content begins. This lets readers:
Arrow position = line number width + 5
Formats (3-digit example):
122→content (4 spaces + number + arrow) - 123→content (2 spaces + minus + space + number + arrow) + →content (2 spaces + plus + space + 3 spaces + arrow)Key: Added lines replace the line number with spaces to keep arrow aligned. For 2-digit lines use 2 spaces after + ; for 3-digit use 3 spaces; for 4-digit use 4 spaces.
2-digit (arrow at position 7):
40→content
- 42→deleted
+ →added
4-digit (arrow at position 9):
1097→content
- 1098→deleted
+ →added
Addition:
22→Q_QML_DEBUG_PLUGIN_LOADER(Adapter)
+ →/*!
+ → \class QQmlProfilerServiceImpl
+ → \inmodule QtQml
+ →*/
23→QQmlProfilerServiceImpl::QQmlProfilerServiceImpl() :
Replacement:
40→ \section1 Basic Style
- 42→ \image qtquickcontrols-basic-thumbnail.png
+ → \image qtquickcontrols-basic-thumbnail.png
+ → {Gallery of controls in Basic style}
43→
Purpose: Show your work — what you checked and verified before suggesting the fix.
The agent fills this field. Include only relevant checks for the specific change.
Language:
Alt text:
QDoc:
Formatting:
Simple (4 checks):
**Validation:**
- ✓ Descriptive: "Gallery of controls in Basic style"
- ✓ Generic terms: "controls" (not "QQuickControls")
- ✓ Indentation: 7 spaces under \image
- ✓ Line length: 62 characters (within 80-column limit)
Complex (6 checks):
**Validation:**
- ✓ Active voice: "method returns" (changed from "is returned")
- ✓ Present tense: "returns"
- ✓ Clear: Subject and action explicit
- ✓ Concise: Reduced from 28 to 22 characters
- ✓ Generic terms: "method" (not "QObject::method")
- ✓ Line length: 67 characters (within 80-column limit)
With issue:
**Validation:**
- ✓ Descriptive: Page topic + element
- ✗ Class names: Uses "QLineEdit" (should be "text field")
- ✓ Indentation: 7 spaces
- ✓ Line length: 58 characters (within limit)
Purpose: Additional notes, context, or explanation from the agent.
Format: 1-2 sentences. Can include why the change matters, alternatives considered, or follow-up suggestions.
Examples:
**Comments:** Resolves QDoc warning. Consider also adding \since tag.
**Comments:** Active voice is clearer per Microsoft Style Guide.
**Comments:** Alt text improves accessibility for screen reader users.
**Comments:** This pattern is used 15+ times elsewhere in qtbase.
Always use exactly:
Should I apply this fix to the file?
Responses:
**Suggestion 3 of 7 for qtquickcontrols-basic.qdoc:42:**
**Warning:** `\image is without a textual description`
**Category:** Missing Alt Text
**Source:** `qtquickcontrols/src/quickcontrols/doc/src/qtquickcontrols-basic.qdoc`
```diff
40→ \section1 Basic Style
41→
- 42→ \image qtquickcontrols-basic-thumbnail.png
+ → \image qtquickcontrols-basic-thumbnail.png
+ → {Gallery of controls in Basic style}
43→
44→ The Basic style is a simple and lightweight style.
Validation:
Comments: Improves accessibility by describing the gallery of controls for screen reader users.
Should I apply this fix to the file?
### QDoc Warning Fix
```markdown
**Suggestion 5 of 12 for qquick3dtextureproviderextension.cpp:56:**
**Warning:** `Can't link to 'SamplerHint'`
**Category:** QDoc Link Error
**Source:** `qtquick3d/src/runtimerender/qquick3dtextureproviderextension.cpp`
**Output:** `qquick3dtextureproviderextension.html`
```diff
54→ \note This property is only used when using CustomMaterials.
55→
- 56→ \sa SamplerHint
+ → \sa QQuick3DTextureProviderExtension::SamplerHint
57→*/
Cause: SamplerHint is an enum class nested inside QQuick3DTextureProviderExtension. Searched grep 'name="SamplerHint"' — found only under parent class, not at top level. QDoc requires full qualification for nested types.
Validation:
QQuick3DTextureProviderExtension::SamplerHint exists (verified in header)Comments: Resolves QDoc warning by using fully qualified enum name.
Should I apply this fix to the file?
### Multiple Fix Options
```markdown
**Suggestion 8 of 12 for qssgrenderextensions.cpp:116:**
**Warning:** `Can't link to 'QSSGRenderGraphObject::Type'`
**Category:** QDoc Link Error
**Source:** `qtquick3d/src/runtimerender/qssgrenderextensions.cpp`
**Cause:** `QSSGRenderGraphObject` is in a private header (`_p.h`). Searched `grep 'name="QSSGRenderGraphObject"'` — not found in index files. No `\class` documentation exists. Links to undocumented types fail.
**Fix Options:**
1. **Use `\c` instead of `\l`** - Render as code without attempting to link
2. **Remove the link** - Rewrite to avoid referencing the internal type
3. **Add documentation** - Create `\class QSSGRenderGraphObject` (if meant to be public API)
**Recommended:** Option 1 because the type is intentionally internal but useful to mention.
```diff
114→ This function is useful to determine the type of a \a nodeId.
115→
-116→ \sa QSSGRenderGraphObject::Type
+ → \sa \c{QSSGRenderGraphObject::Type}
117→*/
Validation:
\c{} renders as code without link attemptComments: Preserves type reference for developers while avoiding link to internal API.
Which option should I apply? (1/2/3 or skip)
## Special Cases
**Multiple changes close together (<10 lines):** Combine in one diff
**Multiple changes far apart (>20 lines):** Show separately
**File boundaries:**
```diff
+ → /*! \file */
1→#include "header.h"
Skip (no diff needed):
**Analysis Report:**
...
**Decision:** SKIP - Class has Q_QUICK_EXPORT (public API)
---
Moving to next warning...
CRITICAL: Every suggestion must be verified against ALL applicable rules before presenting.
Before suggesting \l additions or commenting on autolinking:
Follow the Reviewer Verification Checklist in skill-qdoc/references/link-resolution.md.
Key requirement: Fetch module index and verify target type BEFORE suggesting. Include verification evidence in Validation field.
DO NOT present link-related suggestions until index verification is complete.
Fixes that address one issue often introduce another:
Before presenting ANY suggestion:
Include this in your working notes (not in final output):
DRAFT FIX: "..."
CHECK:
- [ ] R1 Active voice: No passive constructions?
- [ ] R2 Concise: No wordiness patterns?
- [ ] R38 Latin: No via/e.g./i.e./etc.?
- [ ] R10 Articles: Correct article usage?
- [ ] R40 Length: ≤80 columns?
- [ ] Grammar: Correct agreement, possessives?
- [ ] Clear: Readable and unambiguous?
If any check fails → REVISE and re-check
If all checks pass → Present suggestion
Original: "The data can be also assigned directly"
Fix: "The data can also be assigned directly" ← Still passive! (R1 violation)
Presented without verifying → User catches the error → Trust lost.
Original: "The data can be also assigned directly"
Draft 1: "The data can also be assigned directly"
CHECK: ✗ R1 - still passive ("can be assigned")
→ REVISE
Draft 2: "You can also assign the data directly"
CHECK:
- ✓ R1 Active: "You can assign" is active
- ✓ R2 Concise: No wordiness
- ✓ R38 Latin: No Latin terms
- ✓ R40 Length: 42 chars
- ✓ Grammar: Correct
→ PRESENT
Before flagging terminology as incorrect, verify it's not a valid technical term:
Example: "inplace" or "in-place" is valid C++ terminology (in-place construction, emplace). Do NOT flag as spelling error.
for file.cpp:27: not for file.cpp:```diff code fenceWhen commit references a bug, include verification in review output.
Workflow: See CLAUDE.md "Bug Report Verification Context" for fetch methods (MCP → WebFetch → manual).
Output format template:
## Bug Report Verification
**Task-number:** {PROJECT}-XXXXX
**Issue:** [Brief description of reported issue]
**Verdict:** ✓ Patch addresses the reported issue
[Or if concerns: ✗ Patch may not address the reported issue + explanation]
If bug tracker inaccessible: Note "Unable to verify (bug tracker inaccessible)" and proceed with review.
The Doc Team diff format (above) is the default and most detailed format. Two alternative formats are available for specific use cases.
For posting inline comments directly to Gerrit code review. The comment text goes above the suggestion block as plain text. The suggestion block contains ONLY the replacement code with original indentation preserved.
Format:
{Rule}: {Brief explanation of the issue}
```suggestion
{replacement code with original indentation}
**Example:**
R1: Passive voice "is needed" → active voice.
The \c update() method returns a timestamp indicating when the engine
needs the next update, allowing devices to enter sleep modes between
updates.
**Rules:**
- No markdown formatting in comment text (Gerrit renders plain text)
- Preserve original indentation in the suggestion block
- Keep explanations brief (one line preferred)
- Suggestion block contains ONLY replacement text, nothing else
### Plain Format
For quick summaries when detailed validation is not needed.
Line X: {Issue}. Fix: {replacement}
**Example:**
Line 42: Passive voice. Fix: "when the engine needs the next update" Line 58: Missing \c markup. Fix: \c{file://}
## Integration
- **skill-qdoc:** QDoc syntax, link resolution, warning diagnosis
- **skill-qdoc-output:** HTML filename patterns by node type
- **skill-language-style:** Rule references (R1-R50) for validation checks
- **skill-alttext:** Alt text formatting and terminology
- **skill-line-wrap:** 80-column validation (R40)
- **skill-module-export:** Public API detection via export macros
**Changelog:** See `CHANGELOG.md`