Skip to content

feat(docs): rebuild whitepaper pages #18

feat(docs): rebuild whitepaper pages

feat(docs): rebuild whitepaper pages #18

name: Repository Governance
on:
pull_request:
branches: [master]
paths:
- '.github/copilot-instructions.md'
- '.github/workflows/openspec-validation.yml'
- 'AGENTS.md'
- 'CLAUDE.md'
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- 'README.md'
- 'README.zh-CN.md'
- '_config.yml'
- '_includes/**'
- '_sass/**'
- 'assets/**'
- 'docs/**'
- 'index.md'
- 'openspec/**'
- 'specs.md'
- 'zh/**'
push:
branches: [master]
paths:
- '.github/copilot-instructions.md'
- '.github/workflows/openspec-validation.yml'
- 'AGENTS.md'
- 'CLAUDE.md'
- 'CHANGELOG.md'
- 'CONTRIBUTING.md'
- 'README.md'
- 'README.zh-CN.md'
- '_config.yml'
- '_includes/**'
- '_sass/**'
- 'assets/**'
- 'docs/**'
- 'index.md'
- 'openspec/**'
- 'specs.md'
- 'zh/**'
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install OpenSpec CLI
run: npm install -g @fission-ai/openspec@latest
- name: Validate required governance files
run: |
test -f AGENTS.md
test -f CLAUDE.md
test -f .github/copilot-instructions.md
test -f openspec/config.yaml
test -f specs.md
test -f openspec/specs/kernel/spec.md
test -f openspec/specs/architecture/spec.md
test -f openspec/specs/testing/spec.md
- name: Validate OpenSpec
run: openspec validate --all
- name: Check for active changes on master
run: |
changes=$(find openspec/changes -mindepth 1 -maxdepth 1 -type d ! -name "archive" 2>/dev/null || true)
if [ -n "$changes" ]; then
echo "Active change proposals found:"
echo "$changes"
echo "::warning::Unarchived changes on master"
fi
- name: Validate ID uniqueness
run: |
# Match complete IDs only, exclude sub-IDs like REQ-KERNEL-001.1
req_dups=$(grep -rhEo "REQ-[A-Z]+-[0-9]+(\\.[0-9]+)?" openspec/specs/ 2>/dev/null | grep -vE "\\.[0-9]+$" | sort | uniq -d || true)
dec_dups=$(grep -rhEo "DEC-[A-Z]+-[0-9]+(\\.[0-9]+)?" openspec/specs/ 2>/dev/null | grep -vE "\\.[0-9]+$" | sort | uniq -d || true)
con_dups=$(grep -rhEo "CON-[A-Z]+-[0-9]+(\\.[0-9]+)?" openspec/specs/ 2>/dev/null | grep -vE "\\.[0-9]+$" | sort | uniq -d || true)
test -z "$req_dups" || (echo "::error::Duplicate REQ IDs found: $req_dups" && exit 1)
test -z "$dec_dups" || (echo "::error::Duplicate DEC IDs found: $dec_dups" && exit 1)
test -z "$con_dups" || (echo "::error::Duplicate CON IDs found: $con_dups" && exit 1)
- name: Reject legacy spec path references
run: |
legacy_files=$(grep -RInE '(^|[[:space:]`(])specs/(product|rfc|testing)/' \
AGENTS.md CLAUDE.md CHANGELOG.md CONTRIBUTING.md README.md README.zh-CN.md \
specs.md zh/specs.md openspec/README.md openspec/AGENTS.md docs zh/docs .github/workflows 2>/dev/null || true)
if [ -n "$legacy_files" ]; then
echo "::error::Legacy spec path references found:"
echo "$legacy_files"
exit 1
fi
- name: Check nav_order conflicts in docs
run: |
nav_orders=$(grep -rh "nav_order:" docs/ 2>/dev/null | sort | uniq -d)
if [ -n "$nav_orders" ]; then
echo "::error::Duplicate nav_order values found in docs/:"
echo "$nav_orders"
exit 1
fi
zh_nav_orders=$(grep -rh "nav_order:" zh/docs/ 2>/dev/null | sort | uniq -d)
if [ -n "$zh_nav_orders" ]; then
echo "::error::Duplicate nav_order values found in zh/docs/:"
echo "$zh_nav_orders"
exit 1
fi