From d14efff8ed1faa4187f004f79926f428c8074ec7 Mon Sep 17 00:00:00 2001 From: Matt Van Horn Date: Fri, 23 Oct 2026 03:06:30 -0700 Subject: [PATCH] docs: replace disabled Discussion links and the 404 stack clone URL (#543) Conduct reports now go only through the contact listed on uupm.cc. General questions now go to the repository issues page, and the README remains the other place to look. The quickstart clones this repository and enters ui-ux-pro-max-skill/stack before the existing setup step. A community-docs test checks those sections for the replacement destinations, the absence of the dead Discussion and old clone URLs, enforcement staying off public issues and mailto links, and the setup script being present. Refs #542 Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> --- CODE_OF_CONDUCT.md | 2 +- CONTRIBUTING.md | 2 +- scripts/tests/test_community_docs.py | 64 ++++++++++++++++++++++++++++ stack/README.md | 4 +- 4 files changed, 68 insertions(+), 4 deletions(-) create mode 100644 scripts/tests/test_community_docs.py diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 8190df1..0798234 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -31,7 +31,7 @@ This Code of Conduct applies within all community spaces (issues, pull requests, ## Enforcement -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the maintainers by opening a [GitHub Discussion](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill/discussions) marked private/moderation, or via the contact listed on [uupm.cc](https://www.uupm.cc). All complaints will be reviewed and investigated promptly and fairly. +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the maintainers via the contact listed on [uupm.cc](https://www.uupm.cc). All complaints will be reviewed and investigated promptly and fairly. ## Attribution diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 1993744..9cd4332 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -174,6 +174,6 @@ Harassment, spam, or low-effort contributions will be closed without review. ## Questions? -Open a [Discussion](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill/discussions) or check the [README](README.md) first. +Open an [issue](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill/issues) or check the [README](README.md) first. Happy contributing! 🚀 diff --git a/scripts/tests/test_community_docs.py b/scripts/tests/test_community_docs.py new file mode 100644 index 0000000..b6ecc06 --- /dev/null +++ b/scripts/tests/test_community_docs.py @@ -0,0 +1,64 @@ +"""Community docs must not point at disabled or missing destinations. + +Regression for #542. Discussions are disabled, so questions go to issues and +conduct reports stay on the uupm.cc contact. The stack quickstart clones this +repository and enters stack/ before ./scripts/setup.sh. +""" + +import re +import unittest +from pathlib import Path + +REPO = next( + parent for parent in Path(__file__).resolve().parents + if (parent / "scripts" / "generate-catalog-summary.py").is_file() +) +DISCUSSIONS_URL = "https://github.com/nextlevelbuilder/ui-ux-pro-max-skill/discussions" +ISSUES_URL = "https://github.com/nextlevelbuilder/ui-ux-pro-max-skill/issues" +STACK_CLONE = "git clone https://github.com/nextlevelbuilder/ui-ux-pro-max-skill.git" +STACK_CD = "cd ui-ux-pro-max-skill/stack" + + +def read_repo_text(relative_path): + return (REPO / relative_path).read_text(encoding="utf-8") + + +def section_until_next_heading(text, heading): + """Body under `heading`, up to the next `## ` heading. + + A missing heading fails here. Returning an empty slice would let the + negative checks (no /discussions, no old clone URL) pass vacuously. + """ + match = re.search( + rf"^## {re.escape(heading)}\n(.*?)(?=^## |\Z)", + text, + re.MULTILINE | re.DOTALL, + ) + if match is None: + raise AssertionError(f"missing heading: ## {heading}") + return match.group(1) + + +class CommunityDocsTest(unittest.TestCase): + def test_questions_issues_conduct_contact_and_stack_clone(self): + contributing = read_repo_text("CONTRIBUTING.md") + questions = section_until_next_heading(contributing, "Questions?") + self.assertIn(ISSUES_URL, questions) + self.assertIn("README.md", questions) + self.assertNotIn(DISCUSSIONS_URL, contributing) + + conduct = read_repo_text("CODE_OF_CONDUCT.md") + enforcement = section_until_next_heading(conduct, "Enforcement") + self.assertIn("https://www.uupm.cc", enforcement) + self.assertNotIn("/discussions", enforcement) + self.assertNotIn("/issues", enforcement) + self.assertNotIn("mailto:", enforcement) + self.assertNotIn(DISCUSSIONS_URL, conduct) + + quickstart = section_until_next_heading(read_repo_text("stack/README.md"), "Quickstart") + self.assertIn(STACK_CLONE, quickstart) + self.assertIn(STACK_CD, quickstart) + self.assertLess(quickstart.index(STACK_CLONE), quickstart.index(STACK_CD)) + self.assertLess(quickstart.index(STACK_CD), quickstart.index("./scripts/setup.sh")) + self.assertNotIn("YMungerDev/claude-website-design-stack", quickstart) + self.assertTrue((REPO / "stack" / "scripts" / "setup.sh").is_file()) diff --git a/stack/README.md b/stack/README.md index aff3100..1c5ac9e 100644 --- a/stack/README.md +++ b/stack/README.md @@ -23,8 +23,8 @@ design is missing: a **knowledge** layer, a **taste** layer, and a **visual feed ```bash # 1. Clone and enter -git clone https://github.com/YMungerDev/claude-website-design-stack -cd claude-website-design-stack +git clone https://github.com/nextlevelbuilder/ui-ux-pro-max-skill.git +cd ui-ux-pro-max-skill/stack # 2. Install the skills/plugins + Playwright browser ./scripts/setup.sh