diff --git a/.github/workflows/docs-quality.yml b/.github/workflows/docs-quality.yml deleted file mode 100644 index 7013150b1..000000000 --- a/.github/workflows/docs-quality.yml +++ /dev/null @@ -1,80 +0,0 @@ -name: Docs Quality - -on: - pull_request: - paths: - - "docs/skills/**" - push: - branches: - - main - paths: - - "docs/skills/**" - merge_group: - -jobs: - check: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 - - - name: Validate skill docs - shell: bash - run: | - set -euo pipefail - SKILLS_DIR="docs/skills" - INDEX="$SKILLS_DIR/INDEX.md" - failed=0 - - echo "=== Frontmatter check ===" - for f in "$SKILLS_DIR"/*.md; do - name=$(basename "$f") - [[ "$name" == "INDEX.md" ]] && continue - # Must start with --- and have name: and description: fields - if ! head -1 "$f" | grep -q "^---$"; then - echo "::error file=$f::$name is missing YAML frontmatter (must start with ---)" - failed=1 - continue - fi - if ! awk '/^---$/{c++;if(c==2)exit} c==1' "$f" | grep -q "^name:"; then - echo "::error file=$f::$name frontmatter is missing required 'name' field" - failed=1 - fi - if ! awk '/^---$/{c++;if(c==2)exit} c==1' "$f" | grep -q "^description:"; then - echo "::error file=$f::$name frontmatter is missing required 'description' field" - failed=1 - fi - done - - echo "=== Line count check ===" - for f in "$SKILLS_DIR"/*.md; do - name=$(basename "$f") - lines=$(wc -l < "$f") - if [ "$lines" -gt 500 ]; then - echo "::error file=$f::$name has $lines lines (hard limit: 500 — extract to a reference file)" - failed=1 - elif [ "$lines" -gt 350 ]; then - echo "::warning file=$f::$name has $lines lines (warning threshold: 350)" - fi - done - - echo "=== INDEX.md coverage check ===" - for f in "$SKILLS_DIR"/*.md; do - name=$(basename "$f") - [[ "$name" == "INDEX.md" ]] && continue - if ! grep -qF "$name" "$INDEX"; then - echo "::error file=$INDEX::$name is not listed in INDEX.md" - failed=1 - fi - done - - echo "=== INDEX.md soundness check ===" - while IFS= read -r ref; do - target="$SKILLS_DIR/$ref" - if [ ! -f "$target" ]; then - echo "::error file=$INDEX::INDEX.md references $ref but file does not exist" - failed=1 - fi - done < <(grep -oP '(?<=\()[^)]+\.md(?=\))' "$INDEX" || true) - - exit "$failed"