diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index 495b66f5..aa281b4a 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -69,6 +69,27 @@ jobs: - name: markdownlint run: npm run lint:md + docs: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + cache: "npm" + + - name: Install dependencies + run: npm ci + + - name: Validate documentation links + run: npm run docs:validate-links + + - name: Build documentation + run: npm run docs:build + validate: runs-on: ubuntu-latest steps: diff --git a/.husky/pre-commit b/.husky/pre-commit index 1397d511..ae9e0c44 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -5,3 +5,16 @@ npx --no-install lint-staged # Validate everything npm test + +# Validate docs links only when docs change +if command -v rg >/dev/null 2>&1; then + if git diff --cached --name-only | rg -q '^docs/'; then + npm run docs:validate-links + npm run docs:build + fi +else + if git diff --cached --name-only | grep -Eq '^docs/'; then + npm run docs:validate-links + npm run docs:build + fi +fi diff --git a/docs/explanation/tea/risk-based-testing.md b/docs/explanation/tea/risk-based-testing.md index 554afbb3..d1b35f48 100644 --- a/docs/explanation/tea/risk-based-testing.md +++ b/docs/explanation/tea/risk-based-testing.md @@ -250,7 +250,7 @@ Risk scores inform test priorities (but aren't the only factor): - **Test Levels:** E2E smoke test only - **Example:** Theme customization, experimental features -**Note:** Priorities consider risk scores plus business context (usage frequency, user impact, etc.). See [Test Priorities Matrix](/docs/reference/tea/knowledge-base.md#test-priorities-matrix) for complete criteria. +**Note:** Priorities consider risk scores plus business context (usage frequency, user impact, etc.). See [Test Priorities Matrix](/docs/reference/tea/knowledge-base.md#quality-standards) for complete criteria. ### 3. Mitigation Plans diff --git a/docs/explanation/tea/test-quality-standards.md b/docs/explanation/tea/test-quality-standards.md index 58d5d318..e9c207e4 100644 --- a/docs/explanation/tea/test-quality-standards.md +++ b/docs/explanation/tea/test-quality-standards.md @@ -866,8 +866,8 @@ test('should work with optional button', async ({ page }) => { ## Technical Implementation For detailed test quality patterns, see: -- [Test Quality Fragment](/docs/reference/tea/knowledge-base.md#test-quality) -- [Test Levels Framework Fragment](/docs/reference/tea/knowledge-base.md#test-levels-framework) +- [Test Quality Fragment](/docs/reference/tea/knowledge-base.md#quality-standards) +- [Test Levels Framework Fragment](/docs/reference/tea/knowledge-base.md#quality-standards) - [Complete Knowledge Base Index](/docs/reference/tea/knowledge-base.md) ## Related Concepts diff --git a/tools/build-docs.js b/tools/build-docs.js index 791026b9..97f4f814 100644 --- a/tools/build-docs.js +++ b/tools/build-docs.js @@ -27,7 +27,17 @@ const REPO_URL = 'https://github.com/bmad-code-org/BMAD-METHOD'; const LLM_MAX_CHARS = 600_000; const LLM_WARN_CHARS = 500_000; -const LLM_EXCLUDE_PATTERNS = ['changelog', 'ide-info/', 'v4-to-v6-upgrade', 'downloads/', 'faq']; +const LLM_EXCLUDE_PATTERNS = [ + 'changelog', + 'ide-info/', + 'v4-to-v6-upgrade', + 'downloads/', + 'faq', + '_STYLE_GUIDE.md', + '_archive/', + 'reference/glossary/', + 'explanation/game-dev/', +]; // ============================================================================= // Main Entry Point @@ -335,7 +345,6 @@ function runAstroBuild() { stdio: 'inherit', env: { ...process.env, - NODE_OPTIONS: `${process.env.NODE_OPTIONS || ''} --disable-warning=MODULE_TYPELESS_PACKAGE_JSON`.trim(), }, }); }