Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.

rename to rtk-plus: extended fork of rtk-ai/rtk #1

rename to rtk-plus: extended fork of rtk-ai/rtk

rename to rtk-plus: extended fork of rtk-ai/rtk #1

Workflow file for this run

name: Documentation Validation
on:
pull_request:
paths:
- 'src/**/*.rs'
- 'Cargo.toml'
- '**.md'
- '.claude/hooks/*.sh'
push:
branches:
- master
- feat/**
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate documentation consistency
run: bash scripts/validate-docs.sh
- name: Check module count consistency
run: |
MAIN_MODULES=$(grep -c '^mod ' src/main.rs)
# Check ARCHITECTURE.md if it exists
if [ -f "ARCHITECTURE.md" ]; then
ARCH_MODULES=$(grep 'Total:.*modules' ARCHITECTURE.md | grep -o '[0-9]\+' | head -1)
if [ -n "$ARCH_MODULES" ] && [ "$MAIN_MODULES" != "$ARCH_MODULES" ]; then
echo "❌ Module count mismatch"
echo "main.rs: $MAIN_MODULES modules"
echo "ARCHITECTURE.md: $ARCH_MODULES modules"
exit 1
fi
fi
echo "✅ Module count consistent: $MAIN_MODULES modules"
- name: Verify Python/Go commands documented
run: |
for cmd in ruff pytest pip go golangci; do
if ! grep -q "$cmd" README.md; then
echo "❌ README.md missing Python/Go command: $cmd"
exit 1
fi
if ! grep -q "$cmd" CLAUDE.md; then
echo "❌ CLAUDE.md missing Python/Go command: $cmd"
exit 1
fi
done
echo "✅ All Python/Go commands documented"
- name: Verify hook coverage
run: |
HOOK_FILE=".claude/hooks/rtk-rewrite.sh"
if [ ! -f "$HOOK_FILE" ]; then
echo "❌ Hook file not found: $HOOK_FILE"
exit 1
fi
# Since PR #241, the hook delegates to `rtk rewrite` (single source of truth).
# Command coverage is now in src/discover/registry.rs, not the hook bash script.
if ! grep -q "rtk rewrite" "$HOOK_FILE"; then
echo "❌ Hook does not delegate to 'rtk rewrite'"
exit 1
fi
# Verify all Python/Go commands are covered in the registry
# Since PR #241, constants live in src/discover/rules.rs (extracted from registry.rs)
for cmd in ruff pytest pip golangci; do
if ! grep -qr "\"$cmd\"" src/discover/; then
echo "❌ Registry missing rewrite_prefixes for: $cmd"
exit 1
fi
done
echo "✅ Hook delegates to rtk rewrite, registry covers all Python/Go commands"