Skip to content

Commit 5d7f975

Browse files
Merge pull request #105 from OneFineStarstuff/codex/develop-agi-and-asi-governance-roadmap
Add governance docs linting CI, scripts, tests, and governance blueprint artifacts
2 parents d31edc0 + 09c6686 commit 5d7f975

10 files changed

Lines changed: 696 additions & 0 deletions
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Governance Docs Lint
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'docs/**/*.md'
7+
- '.markdownlint.json'
8+
- '.markdownlintignore'
9+
- 'scripts/lint_governance_docs.sh'
10+
- 'tests/test_lint_governance_docs.sh'
11+
- 'Makefile'
12+
- 'tests/test_lint_governance_docs.sh'
13+
- 'Makefile'
14+
- '.github/workflows/governance-docs-lint.yml'
15+
push:
16+
branches: [ main ]
17+
paths:
18+
- 'docs/**/*.md'
19+
- '.markdownlint.json'
20+
- '.markdownlintignore'
21+
- 'scripts/lint_governance_docs.sh'
22+
- 'tests/test_lint_governance_docs.sh'
23+
- 'Makefile'
24+
- '.github/workflows/governance-docs-lint.yml'
25+
26+
permissions:
27+
contents: read
28+
29+
concurrency:
30+
group: governance-docs-lint-${{ github.workflow }}-${{ github.ref }}
31+
cancel-in-progress: true
32+
33+
jobs:
34+
lint-governance-docs:
35+
runs-on: ubuntu-latest
36+
timeout-minutes: 10
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v4
40+
41+
- name: Set up Node.js
42+
uses: actions/setup-node@v4
43+
with:
44+
node-version: '20'
45+
46+
- name: Validate lint script syntax
47+
run: bash -n scripts/lint_governance_docs.sh
48+
49+
- name: Validate test script syntax
50+
run: bash -n tests/test_lint_governance_docs.sh
51+
52+
- name: Shellcheck lint scripts
53+
uses: ludeeus/action-shellcheck@2.0.0
54+
with:
55+
scandir: "scripts tests"
56+
severity: warning
57+
58+
- name: Run governance docs check target
59+
run: make governance-docs-check

.markdownlint.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"default": true
3+
}

.markdownlintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
docs/governance/AGI_ASI_GSIFI_Blueprint_2026_2030.md
2+
docs/governance/LINTING_NOTES.md

Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,16 @@ gov-suite-ci:
164164
gov-clean:
165165
$(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()]"
166166

167+
.PHONY: governance-docs-lint governance-docs-test governance-docs-check
168+
169+
governance-docs-lint:
170+
bash scripts/lint_governance_docs.sh
171+
bash scripts/lint_governance_docs.sh all
172+
173+
governance-docs-test:
174+
bash tests/test_lint_governance_docs.sh
175+
176+
governance-docs-check: governance-docs-lint governance-docs-test
167177
.PHONY: gstack-setup gstack-validate gstack-validate-strict gstack-validate-json gstack-validate-json-check gstack-test gstack-check gstack-ci gstack-clean
168178

169179
gstack-setup:

docs/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Documentation Index
2+
3+
## Governance
4+
5+
- See `docs/governance/README.md` for the AGI/ASI governance blueprint,
6+
supporting templates, and linting notes used for G‑SIFI policy artifacts.
7+
8+
## Linting
9+
10+
- Markdown linting is enabled by default (`.markdownlint.json`).
11+
- Long-form governance policy files are explicitly listed in
12+
`.markdownlintignore` to preserve dense regulatory tables/checklists.
13+
14+
## Validation Commands
15+
16+
- `scripts/lint_governance_docs.sh` verifies required ignore entries and lints
17+
governance index docs (`strict`, default).
18+
- `scripts/lint_governance_docs.sh all` lints all governance markdown files
19+
while honoring `.markdownlintignore`.

0 commit comments

Comments
 (0)