Skip to content

Commit ec5a42d

Browse files
author
yeongseon
committed
feat: add content source validation tracking system
- Add content-validation-status.md to track MSLearn source coverage - Add Content Source Requirements section to AGENTS.md - Enforce MSLearn-first policy for all platform content and diagrams - Track 89 mermaid diagrams requiring source validation
1 parent ca75985 commit ec5a42d

3 files changed

Lines changed: 149 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,46 @@ For MkDocs admonitions (`!!!` / `???`), every line in the body must be indented
106106

107107
All architectural diagrams use Mermaid. Every documentation page should include at least one diagram. Test with `mkdocs build --strict`.
108108

109+
## Content Source Requirements
110+
111+
### MSLearn-First Policy
112+
113+
All content MUST be traceable to official Microsoft Learn documentation:
114+
115+
- **Platform content** (`docs/platform/`): MUST have direct Microsoft Learn source URLs
116+
- **Architecture diagrams**: MUST reference official Microsoft documentation
117+
- **Troubleshooting playbooks**: MAY synthesize Microsoft Learn content with clear attribution
118+
- **Self-generated content**: MUST have justification explaining the source basis
119+
120+
### Source Types
121+
122+
| Type | Description | Allowed? |
123+
|---|---|---|
124+
| `mslearn` | Directly from Microsoft Learn | Required for platform content |
125+
| `mslearn-adapted` | Microsoft Learn content adapted for this guide | Allowed with source URL |
126+
| `self-generated` | Original content for this guide | Requires justification |
127+
| `community` | From community sources | Not for core content |
128+
| `unknown` | Source not documented | Must be validated |
129+
130+
### Diagram Source Documentation
131+
132+
Every Mermaid diagram MUST have source metadata in frontmatter:
133+
134+
```yaml
135+
content_sources:
136+
diagrams:
137+
- id: architecture-overview
138+
type: flowchart
139+
source: mslearn
140+
mslearn_url: https://learn.microsoft.com/en-us/azure/storage/
141+
- id: troubleshooting-flow
142+
type: flowchart
143+
source: self-generated
144+
justification: "Synthesized from Microsoft Learn articles"
145+
based_on:
146+
- https://learn.microsoft.com/en-us/azure/storage/
147+
```
148+
109149
### Nested List Indentation
110150
111151
All nested list items MUST use **4-space indent** (Python-Markdown standard).
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
# Content Source Validation Status
2+
3+
This page tracks the source validation status of documentation content, including diagrams and text. All content must be traceable to official Microsoft Learn documentation.
4+
5+
## Summary
6+
7+
*Generated: 2026-04-10*
8+
9+
| Content Type | Total | MS Learn Sourced | Self-Generated | No Source |
10+
|---|---:|---:|---:|---:|
11+
| Mermaid Diagrams | 89 | 0 | 0 | 89 |
12+
| Text Sections |||||
13+
14+
!!! warning "Validation Required"
15+
All 89 mermaid diagrams require source validation. Content without Microsoft Learn sources must be either:
16+
17+
1. Linked to an official Microsoft Learn URL, or
18+
2. Marked as `self-generated` with clear justification
19+
20+
```mermaid
21+
pie title Content Source Status
22+
"Not Validated" : 89
23+
```
24+
25+
## Validation Categories
26+
27+
### Source Types
28+
29+
| Type | Description | Allowed? |
30+
|---|---|---|
31+
| `mslearn` | Content directly from Microsoft Learn | Yes |
32+
| `mslearn-adapted` | Microsoft Learn content adapted for this guide | Yes, with source URL |
33+
| `self-generated` | Original content created for this guide | Requires justification |
34+
| `community` | From community sources | Not for core content |
35+
| `unknown` | Source not documented | Must be validated |
36+
37+
### Diagram Validation Status
38+
39+
All mermaid diagrams are currently marked as not validated.
40+
41+
## How to Validate Content
42+
43+
### Step 1: Add Source Metadata to Frontmatter
44+
45+
Add `content_sources` to the document's YAML frontmatter:
46+
47+
```yaml
48+
---
49+
title: Example Page
50+
content_sources:
51+
diagrams:
52+
- id: architecture-overview
53+
type: flowchart
54+
source: mslearn
55+
mslearn_url: https://learn.microsoft.com/en-us/azure/storage/
56+
- id: request-flow
57+
type: sequence
58+
source: self-generated
59+
justification: "Synthesized from multiple Microsoft Learn articles for clarity"
60+
based_on:
61+
- https://learn.microsoft.com/en-us/azure/storage/
62+
text:
63+
- section: "## Summary"
64+
source: mslearn-adapted
65+
mslearn_url: https://learn.microsoft.com/en-us/azure/storage/
66+
---
67+
```
68+
69+
### Step 2: Mark Diagram Blocks with IDs
70+
71+
Add an HTML comment before each mermaid block to identify it:
72+
73+
```markdown
74+
<!-- diagram-id: architecture-overview -->
75+
```mermaid
76+
flowchart TD
77+
A[Client] --> B[Azure Storage]
78+
```
79+
```
80+
81+
### Step 3: Run Validation Script
82+
83+
```bash
84+
python3 scripts/validate_content_sources.py
85+
```
86+
87+
### Step 4: Update This Page
88+
89+
```bash
90+
python3 scripts/generate_content_validation_status.py
91+
```
92+
93+
## Validation Rules
94+
95+
!!! danger "Mandatory Rules"
96+
1. Platform diagrams (`docs/platform/`) must have Microsoft Learn sources
97+
2. Architecture diagrams must reference official Microsoft documentation
98+
3. Troubleshooting flowcharts may be self-generated if they synthesize Microsoft Learn content
99+
4. Self-generated content must have a `justification` field explaining the source basis
100+
101+
## See Also
102+
103+
- [Validation Status](validation-status.md)
104+
- [Reference Index](index.md)
105+
106+
## Sources
107+
108+
- [Microsoft Learn: Azure Storage documentation](https://learn.microsoft.com/en-us/azure/storage/)

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ nav:
166166
- SAS and Token Issues: troubleshooting/playbooks/security/sas-and-token-issues.md
167167
- Reference:
168168
- reference/index.md
169+
- Content Validation: reference/content-validation-status.md
169170
- Validation Status: reference/validation-status.md
170171
- Storage Service Selection Guide: reference/storage-service-selection-guide.md
171172
- Redundancy Options: reference/redundancy-options.md

0 commit comments

Comments
 (0)