Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit 4fde59d

Browse files
authored
Update contributing guidlines with data architecture (#67)
* Enhance CONTRIBUTING.md with YAML frontmatter guidelines and key concepts * Revise contributing guidelines to clarify content contribution methods and provide detailed examples for adding learning materials and creating new topics * Add guidelines for contributing to archetypes and updating skill progression frontmatter * Update CONTRIBUTING.md to clarify frontmatter requirements for topics and archetypes * Add validation guidelines and common errors to CONTRIBUTING.md * Revise table of contents in CONTRIBUTING.md to enhance clarity on contributing content and validation processes * Revise contribution guidelines to clarify content overlap checks and topic scope requirements
1 parent 73934cc commit 4fde59d

1 file changed

Lines changed: 193 additions & 17 deletions

File tree

CONTRIBUTING.md

Lines changed: 193 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@ Please read it carefully to ensure a smooth and effective contribution process.
1111

1212
* [Code of Conduct](#code-of-conduct)
1313
* [How Can I Contribute?](#how-can-i-contribute)
14+
* [Understanding the Data Structure](#understanding-the-data-structure)
1415
* [Reporting Bugs or Suggesting Enhancements](#reporting-bugs-or-suggesting-enhancements)
15-
* [Contributing Content (Learning Materials)](#contributing-content-learning-materials)
16+
* [Contributing Content](#contributing-content)
17+
* [Adding Learning Materials to Topics](#adding-learning-materials-to-topics)
18+
* [Creating a New Topic](#creating-a-new-topic)
19+
* [Contributing to Archetypes](#contributing-to-archetypes)
1620
* [Working on Existing Issues](#working-on-existing-issues)
17-
* [Setting Up Your Development Environment](#setting-up-your-development-environment) (Optional - if applicable)
1821
* [Making Changes & Creating Pull Requests](#making-changes--creating-pull-requests)
1922
* [Forking the Repository](#forking-the-repository)
2023
* [Creating a Branch](#creating-a-branch)
24+
* [Validating Your Changes](#validating-your-changes)
2125
* [Committing Your Changes](#committing-your-changes)
2226
* [Writing Good Commit Messages](#writing-good-commit-messages)
2327
* [Submitting a Pull Request](#submitting-a-pull-request)
@@ -37,6 +41,17 @@ Please report unacceptable behaviour to the SWEX leadership team.
3741

3842
## How Can I Contribute?
3943

44+
### Understanding the Data Structure
45+
46+
Topics and archetypes use **YAML frontmatter** for structured data (learning resources, skill progressions, metadata). The frontmatter sits at the top of each markdown file and is validated against JSON schemas during build.
47+
48+
**Key concepts:**
49+
* **Frontmatter**: YAML block at file top containing structured data
50+
* **Schemas**: Define valid structure (see `schemas/` directory)
51+
* **Validation**: Build fails if frontmatter doesn't match schema
52+
53+
For full details, see [Data Architecture](docs/data-architecture.md) and [ADR-0001](docs/ADRs/ADR-0001.md).
54+
4055
### Reporting Bugs or Suggesting Enhancements
4156

4257
If you find a bug in the website or have an idea for an enhancement (including new content areas), please check the [issue tracker](https://github.com/Zuehlke/archetypes/issues) to see if it has already been reported.
@@ -53,21 +68,157 @@ When suggesting an enhancement:
5368
* Describe your proposed solution.
5469
* Explain the benefits this enhancement would bring to users.
5570

56-
### Contributing Content (Learning Materials)
71+
### Contributing Content
72+
We are excited to receive contributions of learning materials, new topics, and archetypes from the community!
73+
There are three main ways you can contribute content:
74+
75+
1. **Learning Materials** - Add resources to existing topics (books, tutorials, courses, etc.)
76+
2. **Topics** - Create new learning areas (e.g., "Version Control Systems", "Test Driven Development")
77+
3. **Archetypes** - Define or update career pathways that organize topics into skill progression stages
78+
79+
**Before starting:**
80+
1. **Search existing content:** Browse `src/topics/` and `src/archetypes/` for similar concepts
81+
2. **Check for overlap:**
82+
- Would your contribution substantially duplicate existing content?
83+
- Could you enhance existing content instead of creating new content?
84+
- Does your proposed content have a distinct, well-defined scope?
85+
3. **Check the issue tracker:** Someone might already be working on similar content
86+
4. **Open an issue (RECOMMENDED for new topics/archetypes):** Propose your idea to:
87+
- Discuss scope and boundaries
88+
- Identify potential overlaps with existing content
89+
- Get feedback on appropriate granularity
90+
91+
#### Adding Learning Materials to Topics
92+
93+
The most common contribution is adding learning resources to existing topics. Simply edit the topic's frontmatter:
94+
95+
```yaml
96+
---
97+
title: Version Control Systems
98+
learning_resources:
99+
- type: "external_link"
100+
title: "Learn Git Branching"
101+
url: "https://learngitbranching.js.org/"
102+
description: "Interactive tutorial for learning Git"
103+
104+
# Add your new resource here
105+
- type: "book"
106+
title: "Pro Git"
107+
author: "Scott Chacon"
108+
url: "https://git-scm.com/book"
109+
publisher: "Apress"
110+
year: 2014
111+
description: "Comprehensive guide to Git"
112+
---
113+
```
114+
115+
**Resource types:** `external_link`, `book`, `course`, `video`, `pdf`, `talk`, `presentation`
116+
117+
**Required fields:** `type`, `title`, `url`
118+
119+
**Optional fields:** `description`, `author`, `publisher`, `year`, `is_internal`, `embed_code`
120+
121+
#### Creating a New Topic
122+
123+
**Topic Scope Guidelines:**
124+
* **Single responsibility:** Each topic should cover one cohesive concept
125+
* **Appropriate granularity:** Not too broad (e.g., "Software Engineering") nor too narrow (e.g., "Git Merge Conflicts")
126+
* **Clear boundaries:** Topic scope should be well-defined and distinct from related topics
127+
* **Use cross-references:** Link related topics rather than duplicating content
128+
129+
**Examples:**
130+
* ✅ Good: "Version Control Systems" (clear scope, covers Git, SVN concepts)
131+
* ✅ Good: "Test Driven Development" (specific practice)
132+
* ❌ Too broad: "Software Development" (covers everything)
133+
* ❌ Too narrow: "How to Write a For Loop in Python" (too specific)
134+
* ❌ Overlapping: Creating both "Git Basics" and "Version Control Systems" when they cover similar ground
135+
136+
**Filename requirements:**
137+
* Use kebab-case: `your-topic-name.md` (lowercase, hyphens only)
138+
* Filename becomes the URL slug
139+
* Pattern: `^[a-z0-9]+(-[a-z0-9]+)*$` (no underscores, special chars, or uppercase)
140+
141+
**Minimal frontmatter template:**
142+
```yaml
143+
---
144+
title: Your Topic Title
145+
---
146+
147+
# Your Topic Title
148+
149+
Your topic content here...
150+
```
151+
152+
**With learning resources:**
153+
```yaml
154+
---
155+
title: Version Control Systems
156+
learning_resources:
157+
- type: "external_link"
158+
title: "Learn Git Branching"
159+
url: "https://learngitbranching.js.org/"
160+
description: "Interactive tutorial for learning Git"
161+
162+
- type: "book"
163+
title: "Pro Git"
164+
author: "Scott Chacon"
165+
url: "https://git-scm.com/book"
166+
publisher: "Apress"
167+
year: 2014
168+
169+
- type: "course"
170+
title: "Internal Git Workshop"
171+
url: "https://internal.zuhlke.com/git"
172+
is_internal: true
173+
description: "Advanced workshop (Zühlke only)"
174+
175+
cross_references:
176+
- pair-programming
177+
- continuous-integration
178+
---
179+
180+
# Version Control Systems
181+
182+
Your content here...
183+
184+
{{ render_learning_resources() }}
185+
```
57186

58-
We are excited to receive contributions in the form of learning materials for various skills. This could include:
59-
* Tutorials or how-to guides
60-
* Explanations of concepts
61-
* Collections of useful resources
62-
* Exercises or quizzes
63-
* Case studies
187+
**Resource types:** `external_link`, `book`, `course`, `video`, `pdf`, `talk`, `presentation`
64188

65-
Before starting to write new content, it's a good idea to:
66-
1. **Check existing content:** Ensure your proposed topic isn't already well-covered.
67-
2. **Check the issue tracker:** Someone might have already suggested or started working on a similar topic.
68-
3. **Open an issue (optional but recommended):** Propose your content idea by opening an issue.
69-
This allows for discussion with maintainers and other contributors, preventing duplicated effort and ensuring your idea aligns with the project's goals.
70-
Tag it as `content proposal` or similar.
189+
**Required fields:** `type`, `title`, `url`
190+
191+
Place new topics in `src/topics/your-topic-name.md`.
192+
193+
#### Contributing to Archetypes
194+
195+
Archetypes define career pathways by organizing topics into skill progression stages based on the Dreyfus model.
196+
197+
**To add a topic to an existing archetype**, edit the archetype's frontmatter:
198+
199+
```yaml
200+
---
201+
title: Core Software Engineer
202+
description: Foundation of technical excellence at Zühlke
203+
skill_stages:
204+
- name: "Novice"
205+
topics:
206+
- version-control-systems
207+
- developer-tooling-basics
208+
# Add your topic slug here
209+
210+
- name: "Advanced Beginner"
211+
topics:
212+
- test-driven-development
213+
- pair-programming
214+
---
215+
```
216+
217+
**Skill stages:** `Novice`, `Advanced Beginner`, `Competent`, `Proficient`, `Expert`
218+
219+
**Note:** Topics must exist in `src/topics/` before being referenced in archetypes.
220+
221+
Find archetypes in `src/archetypes/`.
71222

72223
### Working on Existing Issues
73224

@@ -96,6 +247,26 @@ just fmt
96247
just build
97248
```
98249

250+
**What gets validated:**
251+
* **Frontmatter schema** - YAML structure must match schemas in `schemas/` directory
252+
* **Broken links** - MkDocs strict mode catches missing pages and broken cross-references
253+
* **Markdown linting** - Ensures consistent formatting
254+
255+
**Common validation errors:**
256+
257+
*Schema validation:*
258+
```
259+
ValidationError: 'title' is a required property
260+
File: src/topics/my-new-topic.md
261+
```
262+
Fix: Add missing required field to frontmatter
263+
264+
*Link validation:*
265+
```
266+
WARNING - Doc file contains a link to 'topics/non-existent.md', but target not found
267+
```
268+
Fix: Create the referenced topic or remove the broken reference
269+
99270
This will format your code and rebuild the static website to ensure everything is up-to-date.
100271

101272
You can also run the local development server to visually inspect your changes:
@@ -149,8 +320,13 @@ To ensure consistency and quality, please adhere to the following guidelines whe
149320

150321
### Formatting
151322

152-
* **File Format:** Content should typically be submitted in Markdown (`.md`) format.
153-
* **File Naming:** Use lowercase, hyphenated file names (e.g., `my-new-skill-tutorial.md`).
323+
* **File Format:** Content should be submitted in Markdown (`.md`) format with YAML frontmatter.
324+
* **Frontmatter Requirements:**
325+
* Topics require at minimum a `title` field
326+
* Archetypes require `title`, `description`, and `skill_stages`
327+
* See examples in [Creating a New Topic](#creating-a-new-topic) and [Contributing to Archetypes](#contributing-to-archetypes)
328+
* Frontmatter is validated against JSON schemas in `schemas/` directory
329+
* **File Naming:** Use kebab-case file names (e.g., `test-driven-development.md`).
154330
* **Directory Structure:** Place new content files in the appropriate directory (e.g., `src/topics/your-topic.md`). Check existing structure or ask if unsure.
155331
* **Images/Assets:** If your content includes images or other assets:
156332
* Place them in a relevant assets folder (e.g., `assets/your-topic/your-image.png`).

0 commit comments

Comments
 (0)