Skip to content

Open-source skills for designing and reviewing software with AI agents

Show contribution tracks at the top of CONTRIBUTING.md (#227)

Aryan Atre3ee14548cd7d
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index a053c26..bb90d21 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -3,6 +3,20 @@
We welcome contributions! We all benefit when new ideas, skills, and reviewer
perspectives are shared across the open-source community.
+## Which track is my change?
+
+Pick a track before you open an issue or PR. The full rules for each track are
+in [Contribution Tracks & Workflow](#contribution-tracks--workflow); this
+section points to them.
+
+* **Small fix within the Track 1 limits:** open a PR with the
+ [PR template](.github/PULL_REQUEST_TEMPLATE.md).
+* **New feature, architectural change, or anything over the Track 1
+ limits:** open a
+ [feature proposal issue](https://github.com/google/elephant-goldfish-model/issues/new?template=feature_proposal.md)
+ and follow the Track 2 steps. Existing design docs are listed in
+ [docs/designs/README.md](docs/designs/README.md).
+
## Design Principles
These general principles guide development of the EGM framework:
diff --git a/tests/unit/test_link_integrity.py b/tests/unit/test_link_integrity.py
index 578d66a..52d5a52 100644
--- a/tests/unit/test_link_integrity.py
+++ b/tests/unit/test_link_integrity.py
@@ -39,13 +39,21 @@ def extract_headers(content: str) -> Set[str]:
slugs = set()
for match in HEADER_PATTERN.finditer(content):
title = match.group(2).strip().lower()
- # Normalize slug: remove punctuation, replace spaces with hyphens
- slug = re.sub(r"[^a-z0-9\s-]", "", title)
- slug = re.sub(r"\s+", "-", slug)
+ # Turn each space into its own hyphen, as GitHub does, so removed
+ # punctuation leaves "--": "Tracks & Workflow" -> "tracks--workflow".
+ slug = re.sub(r"[^a-z0-9 -]", "", title)
+ slug = slug.replace(" ", "-")
slugs.add(slug)
return slugs
+def test_heading_slug_keeps_one_hyphen_per_space() -> None:
+ """Verifies removed punctuation leaves a double hyphen, as on GitHub."""
+ assert extract_headers(
+ "## Contribution Tracks & Workflow\n## Design Principles\n"
+ ) == {"contribution-tracks--workflow", "design-principles"}
+
+
def test_relative_markdown_links_resolve_on_disk(
repo_root: pathlib.Path,
) -> None: