From c69b3935e2cd96fd54fb7be04cfe998966abcad1 Mon Sep 17 00:00:00 2001 From: vladmandic Date: Sat, 18 Apr 2026 19:33:51 +0200 Subject: [PATCH] update skills and wiki Co-authored-by: Copilot Signed-off-by: vladmandic --- .github/skills/update-docs/SKILL.md | 13 ++++++++++- test/check-docs | 35 +++++++++++++++++++++++++++++ wiki | 2 +- 3 files changed, 48 insertions(+), 2 deletions(-) create mode 100755 test/check-docs diff --git a/.github/skills/update-docs/SKILL.md b/.github/skills/update-docs/SKILL.md index be45a9694..ca0c728be 100644 --- a/.github/skills/update-docs/SKILL.md +++ b/.github/skills/update-docs/SKILL.md @@ -19,7 +19,8 @@ Read markdown files in the `wiki/` folder, fix markdown syntax issues, and impro Primary scope: -- Files under `wiki/**/*.md` +- Files under `wiki/**/*.md`, but can be used on any markdown file in the repo if specified by the user +- Skip any files starting with `_` (e.g. `_footer.md`) or non-markdown files (e.g. `LICENSE.txt`) to avoid unintended edits to non-doc files or templates. Baseline actions: @@ -53,6 +54,14 @@ Expanded actions (when user allows full pass): ## Procedure +## Validation Tool + +Use the repo-local validation script before and after doc edits when possible: + +- `test/check-docs` to validate all wiki markdown files +- `test/check-docs wiki/File.md` to validate one or more specific files +- `test/check-docs --fix wiki/File.md` only when a safe markdownlint auto-fix is appropriate + ### 1. Confirm Target And Depth Extract from user prompt: @@ -67,6 +76,7 @@ If targets are missing, ask for paths before editing. For each target file: +- If the scope is broad or unclear, run `test/check-docs` first to establish the current markdown baseline. - Scan for syntax/rendering issues - Identify readability pain points (dense blocks, weak headings, mixed terminology) - Note risky sections where edits may alter meaning @@ -129,6 +139,7 @@ For fenced code blocks: Validate each edited file against this checklist: +- `test/check-docs` or `test/check-docs ` passes for the affected scope - markdown renders correctly - heading hierarchy is logical - code fences include language where known diff --git a/test/check-docs b/test/check-docs new file mode 100755 index 000000000..0f95a844b --- /dev/null +++ b/test/check-docs @@ -0,0 +1,35 @@ +#!/usr/bin/env bash + +set -euo pipefail + +ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +cd "$ROOT_DIR" + +if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then + cat <<'EOF' +Usage: + test/check-docs + test/check-docs wiki/File.md wiki/Other.md + test/check-docs --fix wiki/File.md + +Runs markdownlint-cli2 against wiki markdown files. +If no files are provided, all wiki markdown files are checked except files whose +basename starts with an underscore. + +Any arguments are passed through to markdownlint-cli2. +EOF + exit 0 +fi + +if [[ $# -eq 0 ]]; then + mapfile -t targets < <(rg --files wiki | rg '\.md$' | rg -v '(^|/)_') +else + targets=("$@") +fi + +if [[ ${#targets[@]} -eq 0 ]]; then + echo "No markdown files matched." >&2 + exit 1 +fi + +exec npx --yes markdownlint-cli2 "${targets[@]}" \ No newline at end of file diff --git a/wiki b/wiki index 90887c335..9508720eb 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 90887c3356ec6231e0749c9ba5ad9ae1f76eb53a +Subproject commit 9508720eb9281e3bf908bb31b52894dda54d95a4