Skip to main content

validate-docs

Validate documentation pages against project conventions. Use when checking if doc pages are correctly set up, debugging broken navigation, or before committing doc changes. Checks all three registration points, TOC consistency, section IDs, and YAML schema compliance.

소스 정보

저장소
thisrohangupta/v0-harness-documentation-website
최근 소스 활동
2026년 3월 3일 06:38
감지된 SKILL.md 언어
영어
스타
1
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
validate-docs
description
Validate documentation pages against project conventions. Use when checking if doc pages are correctly set up, debugging broken navigation, or before committing doc changes. Checks all three registration points, TOC consistency, section IDs, and YAML schema compliance.
argument-hint
["page-slug"]
allowed-tools
Read, Grep, Glob, Bash(npx tsc --noEmit)
# Validate Documentation Pages Validate that documentation pages follow all project conventions. If `$ARGUMENTS` is provided, validate only the specified page slug. Otherwise, validate all pages. ## Validation checklist Run each check below and report results as PASS/FAIL with details. ### Check 1: Four-file registration For each page being validated, confirm it exists in all four locations: 1. **`lib/docs-data.ts`** — slug appears in `docSections` items array 2. **`lib/docs-data.ts`** — slug has entries in `tocByPage` 3. **`components/docs/page-content.tsx`** — slug has an import and entry in `pageComponents` 4. **`components/docs/pages/<slug>.tsx`** — component file exists 5. **`docs/<section-slug>/<slug>.md`** — markdown backup file exists Report any pages that are missing from one or more locations. ### Check 2: TOC-to-section ID consistency For each page: 1. Read the TOC entries from `tocByPage` in `lib/docs-data.ts` 2. Read the page component file 3. Extract all `id="..."` attributes on elements with `scroll-mt-20` 4. Verify every TOC `id` has a matching element `id` in the component 5. Verify the first TOC entry is `{ title: "Overview", id: "overview" }` Report any mismatches (TOC IDs without matching sections, or sections without TOC entries). ### Check 3: Section structure For each page component, verify: 1. Every `<section>` tag has both an `id` attribute AND `className` containing `scroll-mt-20` 2. The header element uses `id="overview"` and `scroll-mt-20` 3. Sections are separated by `<Separator className="my-8" />` ### Check 4: Import consistency In `components/docs/page-content.tsx`, verify: 1. Every slug in `pageComponents` has a corresponding import statement 2. The import path matches `@/components/docs/pages/<expected-filename>` 3. The export name follows PascalCase-of-slug + "Page" convention ### Check 5: YAML schema compliance Search all page component files for CodeBlock usage with `language="yaml"`. For any YAML that appears to be Harness pipeline configuration, verify it follows v1 schema: - NO `projectIdentifier`, `orgIdentifier`, or `identifier` fields - NO `type: Deployment` (should be `type: deploy`) - NO `spec:` blocks inside steps (should use `with:`) - NO `<+expression>` syntax (should use `${{ expression }}`) - NO `serviceRef` or `environmentRef` (should be `service` and `environment`) ### Check 6: TypeScript compilation Run `npx tsc --noEmit` and report any type errors. ## Output format ``` Documentation Validation Report ================================ Page: <slug> [PASS] Registered in docSections [PASS] Registered in tocByPage [PASS] Registered in pageComponents [PASS] Component file exists [PASS] Markdown backup exists [PASS] TOC IDs match section IDs [FAIL] Missing scroll-mt-20 on section "foo-section" ... Summary: X pages checked, Y passed all checks, Z have issues ``` If all checks pass, congratulate the user. If there are failures, provide specific fix instructions for each issue.
GitHub에서 보기