Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/governance-docs-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Governance Docs Lint

on:
pull_request:
paths:
- 'docs/**/*.md'
- '.markdownlint.json'
- '.markdownlintignore'
- 'scripts/lint_governance_docs.sh'
- 'tests/test_lint_governance_docs.sh'
- 'Makefile'
- 'tests/test_lint_governance_docs.sh'
- 'Makefile'
- '.github/workflows/governance-docs-lint.yml'
push:
branches: [ main ]

Check failure on line 16 in .github/workflows/governance-docs-lint.yml

View check run for this annotation

codefactor.io / CodeFactor

.github/workflows/governance-docs-lint.yml#L16

Too many spaces inside brackets.

Check failure on line 16 in .github/workflows/governance-docs-lint.yml

View check run for this annotation

codefactor.io / CodeFactor

.github/workflows/governance-docs-lint.yml#L16

Too many spaces inside brackets.
paths:
- 'docs/**/*.md'
- '.markdownlint.json'
- '.markdownlintignore'
- 'scripts/lint_governance_docs.sh'
- 'tests/test_lint_governance_docs.sh'
- 'Makefile'
- '.github/workflows/governance-docs-lint.yml'

permissions:
contents: read

concurrency:
group: governance-docs-lint-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint-governance-docs:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Validate lint script syntax
run: bash -n scripts/lint_governance_docs.sh

- name: Validate test script syntax
run: bash -n tests/test_lint_governance_docs.sh

- name: Shellcheck lint scripts
uses: ludeeus/action-shellcheck@2.0.0

Check warning on line 53 in .github/workflows/governance-docs-lint.yml

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

.github/workflows/governance-docs-lint.yml#L53

An action sourced from a third-party repository on GitHub is not pinned to a full length commit SHA. Pinning an action to a full length commit SHA is currently the only way to use an action as an immutable release.
with:
scandir: "scripts tests"
severity: warning

- name: Run governance docs check target
run: make governance-docs-check
3 changes: 3 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"default": true
}
2 changes: 2 additions & 0 deletions .markdownlintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
docs/governance/AGI_ASI_GSIFI_Blueprint_2026_2030.md
docs/governance/LINTING_NOTES.md
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,16 @@ gov-suite-ci:
gov-clean:
$(PYTHON) -c "from pathlib import Path; import shutil; report=Path('governance-artifact-validation-report.json'); suite=Path('governance-validation-suite-report.json'); report.exists() and report.unlink(); suite.exists() and suite.unlink(); [shutil.rmtree(p) for p in Path('governance_blueprint/validation').rglob('__pycache__') if p.is_dir()]"

.PHONY: governance-docs-lint governance-docs-test governance-docs-check

governance-docs-lint:
bash scripts/lint_governance_docs.sh
bash scripts/lint_governance_docs.sh all

governance-docs-test:
bash tests/test_lint_governance_docs.sh

governance-docs-check: governance-docs-lint governance-docs-test
.PHONY: gstack-setup gstack-validate gstack-validate-strict gstack-validate-json gstack-validate-json-check gstack-test gstack-check gstack-ci gstack-clean

gstack-setup:
Expand Down
19 changes: 19 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Documentation Index

## Governance

- See `docs/governance/README.md` for the AGI/ASI governance blueprint,
supporting templates, and linting notes used for G‑SIFI policy artifacts.

## Linting

- Markdown linting is enabled by default (`.markdownlint.json`).
- Long-form governance policy files are explicitly listed in
`.markdownlintignore` to preserve dense regulatory tables/checklists.

## Validation Commands

- `scripts/lint_governance_docs.sh` verifies required ignore entries and lints
governance index docs (`strict`, default).
- `scripts/lint_governance_docs.sh all` lints all governance markdown files
while honoring `.markdownlintignore`.
Loading
Loading