docs(skills): implement v1 agent-authored-content quality program #2853
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| pull_request: | |
| # Non-agent PRs are exempt from the agent-contract sections (see the | |
| # "Check documentation-risk PR contract" step below), so the default | |
| # trigger types are not enough on their own. `edited` re-runs the check | |
| # when the finalizer repairs the PR body without pushing a new commit; | |
| # `labeled` re-runs it when `warpy-factory` is applied after PR open. | |
| types: [opened, synchronize, reopened, ready_for_review, edited, labeled] | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| docs-editorial-quality: | |
| name: Docs editorial quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| # Changed-file-only style lint. Error-severity findings block; warning- | |
| # severity tone/judgment findings remain visible to review-docs-pr. | |
| - name: Run style_lint --changed | |
| run: python3 .agents/skills/style_lint/style_lint.py --changed | |
| docs-technical-references: | |
| name: Docs technical references | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| # Validates changed UI paths, Command Palette names, and UI-reference | |
| # formatting against the committed valid_paths.json snapshot. Uses the | |
| # committed snapshot only — no warpdotdev/warp checkout required. | |
| - name: Validate changed UI references | |
| run: python3 .agents/skills/validate_ui_refs/validate_ui_refs.py --changed --require-provenance | |
| # Doc-quality policy unit tests (risk allowlist, VERIFY accounting, | |
| # override boundaries, PR-contract validation). | |
| - name: Test doc_quality_policy | |
| run: | | |
| python3 .agents/skills/doc_quality_policy/test_policy.py | |
| python3 .agents/skills/doc_quality_policy/test_check_pr_contract.py | |
| python3 .agents/skills/doc_quality_policy/test_check_compression_contract.py | |
| python3 .agents/skills/doc_quality_policy/test_verify_review_signal.py | |
| python3 .agents/skills/doc_quality_policy/test_manifest.py | |
| - name: Test validate_ui_refs --changed mode and snapshot provenance | |
| run: python3 .agents/skills/validate_ui_refs/test_changed_mode.py | |
| - name: Test improve-drafting-skills metrics command | |
| run: | | |
| python3 .agents/skills/improve-drafting-skills/scripts/test_compute_metrics.py | |
| python3 .agents/skills/improve-drafting-skills/scripts/test_build_baseline_records.py | |
| # PR-contract check: unlisted VERIFY markers and missing/invalid risk | |
| # metadata. Only agent-marked PRs carry this contract (see | |
| # doc-quality-policy.md) — an ordinary human docs PR has no | |
| # "## Documentation risk" section and must not be failed for lacking | |
| # one, so this step is scoped to `warpy-factory` PRs. The human | |
| # engineering gate is intentionally not evaluated on each push: a | |
| # pending approval is expected while a PR is in review. A push-to-main | |
| # run (no open PR) also has nothing to check. | |
| - name: Check documentation-risk PR contract | |
| if: >- | |
| github.event_name == 'pull_request' && | |
| contains(github.event.pull_request.labels.*.name, 'warpy-factory') | |
| env: | |
| PR_BODY: ${{ github.event.pull_request.body }} | |
| run: | | |
| printf '%s' "$PR_BODY" > /tmp/pr-body.md | |
| python3 .agents/skills/doc_quality_policy/check_pr_contract.py \ | |
| --body /tmp/pr-body.md | |
| build: | |
| name: Build, link-check, audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Type-check | |
| run: npm run typecheck | |
| - name: Build site | |
| run: npm run build | |
| - name: Check internal links | |
| run: python3 .agents/skills/check_for_broken_links/check_links.py --internal-only | |
| # Stdlib-only tests for the missing_docs skill scripts. The reviewer-resolver | |
| # unit tests run fully here; the audit integration tests skip gracefully | |
| # because the warp/warp-server code repos aren't checked out in docs CI. | |
| - name: Test missing_docs skill scripts | |
| run: | | |
| python3 .agents/skills/missing_docs/scripts/test_suggest_reviewers.py | |
| python3 .agents/skills/missing_docs/scripts/test_audit_docs.py | |
| python3 .agents/skills/missing_docs/scripts/test_check_new_release.py | |
| # Stdlib-only tests for the PR body integrity checker, including the | |
| # feature-summary lead section that drafting PRs must open with. | |
| - name: Test create_pr body checker | |
| run: python3 .agents/skills/create_pr/test_check_pr_body.py | |
| # Extracts the documented reviewer-request bash snippet from SKILL.md and | |
| # runs it against a stubbed gh/suggest_reviewers.py, so CI exercises the | |
| # exact text agents copy rather than a paraphrase of it. | |
| - name: Test create_pr reviewer-request snippet | |
| run: python3 .agents/skills/create_pr/test_request_reviewers.py | |
| # Validate the validate_ui_refs snapshot and script invariants. Uses | |
| # a synthetic warp client fixture internally — no checkout required. | |
| - name: Self-test validate_ui_refs skill | |
| run: python3 .agents/skills/validate_ui_refs/validate_ui_refs.py --self-test | |
| # Production-only audit; gate on high+ so dev-only deprecation chatter | |
| # doesn't break PRs. The `|| true` keeps it informational; tighten this | |
| # to a hard fail once we're confident the noise is gone. | |
| - name: npm audit (production deps) | |
| run: npm audit --omit=dev --audit-level=high || true |