Skip to content

Commit 3d369cf

Browse files
committed
initial
1 parent 6775b79 commit 3d369cf

7 files changed

Lines changed: 79 additions & 24 deletions

File tree

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# WHY-FILE: Minimal checks for specification repositories.
2+
# REQ: Any check that can be run locally MUST be available locally via pre-commit.
3+
# REQ: CI MUST NOT introduce arbitrary rules that are not reproducible locally.
4+
# OBS: CI does not introduce additional style rules beyond repo configuration.
5+
6+
name: CI
7+
8+
on:
9+
pull_request:
10+
push:
11+
branches: [main]
12+
workflow_dispatch:
13+
14+
jobs:
15+
hygiene:
16+
name: Repository checks
17+
runs-on: ubuntu-latest
18+
19+
permissions:
20+
contents: read
21+
22+
steps:
23+
- name: 1) Checkout repository code
24+
# WHY: Needed to access files for checks.
25+
uses: actions/checkout@v6
26+
27+
- name: 2) Run pre-commit (all files)
28+
# WHY: Single source of truth for locally runnable quality gates.
29+
# OBS: Fails if hooks would modify files; does not commit changes.
30+
uses: pre-commit/action@v3.0.1
31+
with:
32+
extra_args: --all-files

.github/workflows/links.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@ jobs:
2121
lychee:
2222
runs-on: ubuntu-latest
2323

24-
permissions: # WHY: Permissions needed for PR comments and issue creation
24+
permissions:
2525
contents: read
2626
issues: write
2727
pull-requests: write
2828

2929
steps:
30-
- name: 1) Checkout repository code # WHY: Needed to access files for link checking
30+
- name: 1) Checkout repository code
3131
uses: actions/checkout@v6 # OBS: v6 current as of Dec 2025
3232

33-
- name: 2) Check links with Lychee # WHY: Check documentation and config files for broken links
34-
uses: lycheeverse/lychee-action@v2 # OBS: Pin to major for stability
33+
- name: 2) Check links with Lychee
34+
uses: lycheeverse/lychee-action@v2
3535
with:
3636
args: >
37-
--config lychee.toml
37+
--config lychee.toml
3838
--user-agent "${{ github.repository }}/lychee"
3939
'./**/*.bib'
4040
'./**/*.md'
@@ -46,9 +46,9 @@ jobs:
4646
env:
4747
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4848

49-
- name: 3) Comment on PR if links broken # WHY: Provide helpful feedback on PRs with broken links
49+
- name: 3) Comment on PR if links broken
5050
if: failure() && github.event_name == 'pull_request'
51-
uses: actions/github-script@v8 # OBS: current as of Dec 2025
51+
uses: actions/github-script@v8
5252
with:
5353
script: |
5454
const runUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`;
@@ -68,7 +68,7 @@ jobs:
6868
- name: 4) Create issue for scheduled failures # WHY: Track broken links found during scheduled checks
6969
# OBS: Only creates issue if none already open with 'broken-links' label
7070
if: failure() && github.event_name == 'schedule'
71-
uses: actions/github-script@v8 # OBS: current as of Dec 2025
71+
uses: actions/github-script@v8
7272
with:
7373
script: |
7474
const date = new Date().toISOString().split("T")[0];

.pre-commit-config.yaml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# REQ.PROJECT: This repository SHOULD include a .pre-commit-config.yaml when quality gates are required.
2-
# WHY: Provide fast, consistent local checks aligned with CI.
1+
# REQ.PROJECT: This repository SHOULD include a .pre-commit-config.yaml when quality gates are required.# REQ: Any check that can be run locally MUST be available here.# WHY: Provide fast, consistent local checks aligned with upstream quality gates.# WHY: Keep local checks compatible with repository-wide formatting rules.# OBS: Formatting baselines are defined in# .editorconfig (whitespace/indentation) and# .gitattributes (EOL normalization).# OBS: These hooks do not override .editorconfig or .gitattributes;# they only prevent common diff noise and validate repository metadata.# ALT: Checks that are inherently non-local are handled upstream.# CUSTOM: Keep the hook set minimal and non-destructive for normative Markdown specs.## OPTIONAL LOCAL USAGE (no repo venv required):# Install uv (once, user-level).# uv self update# uvx pre-commit install# uvx pre-commit run --all-files## OBS: If a hook reports "files were modified", re-run last command to confirm a clean pass.## NOTE: pre-commit is optional.# Repositories do not require Python, uv, or pre-commit to clone or commit.exclude: | (?x)^( \.DS_Store| \.ipynb_checkpoints/| \.mypy_cache/| \.pytest_cache/| \.ruff_cache/| \.tox/| \.venv/| build/| dist/| node_modules/| site/ )repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 # OBS: v6 current as of Dec 30 2025 hooks: - id: check-added-large-files # OBS: prevent large binary files - id: trailing-whitespace # OBS: clean trailing whitespace per .editorconfig - id: end-of-file-fixer # OBS: ensure files end with a newline per .gitattributes - id: check-merge-conflict # OBS: prevent committing unresolved merge conflicts # WHY: Workflow files may intentionally include marker-like strings (e.g., >>>>). exclude: ^\.github/workflows/.*\.(yml|yaml)$ - id: check-yaml # OBS: validate YAML syntax files: \.(yml|yaml)$ - repo: https://github.com/adrienverge/yamllint rev: v1.37.1 # OBS: pinned for reproducibility hooks: - id: yamllint # OBS: validate YAML structure and policy (no line-length enforcement) args: [-c, .yamllint.yml] files: \.(yml|yaml)$ - repo: https://github.com/rhysd/actionlint rev: v1.7.10 # OBS: v1.7.10 current as of Dec 30 2025 hooks: - id: actionlint # OBS: validate GitHub Actions workflow syntax files: ^\.github/workflows/.*\.(yml|yaml)$# REQ.PROJECT: This repository SHOULD include a .pre-commit-config.yaml when quality gates are required.
2+
# REQ: Any check that can be run locally MUST be available here.
3+
# WHY: Provide fast, consistent local checks aligned with upstream quality gates.
34
# WHY: Keep local checks compatible with repository-wide formatting rules.
4-
# OBS: Formatting baselines are defined in
5+
# OBS: Formatting baselines are defined in
56
# .editorconfig (whitespace/indentation) and
67
# .gitattributes (EOL normalization).
78
# OBS: These hooks do not override .editorconfig or .gitattributes;
8-
# they only prevent common diff noise.
9-
# ALT: CI-only checks are acceptable, but local pre-commit reduces cycle time
10-
# and prevents avoidable churn.
9+
# they only prevent common diff noise and validate repository metadata.
10+
# ALT: Checks that are inherently non-local are handled upstream.
1111
# CUSTOM: Keep the hook set minimal and non-destructive for normative Markdown specs.
1212
#
1313
# OPTIONAL LOCAL USAGE (no repo venv required):
@@ -16,7 +16,9 @@
1616
# uvx pre-commit install
1717
# uvx pre-commit run --all-files
1818
#
19-
# NOTE: pre-commit is optional.
19+
# OBS: If a hook reports "files were modified", re-run last command to confirm a clean pass.
20+
#
21+
# NOTE: pre-commit is optional.
2022
# Repositories do not require Python, uv, or pre-commit to clone or commit.
2123

2224
exclude: |
@@ -36,19 +38,30 @@ exclude: |
3638
3739
repos:
3840
- repo: https://github.com/pre-commit/pre-commit-hooks
39-
rev: v6.0.0 # OBS: v6 current as of Dec 30 2025
41+
rev: v6.0.0
4042
hooks:
4143
- id: check-added-large-files # OBS: prevent large binary files
4244
- id: trailing-whitespace # OBS: clean trailing whitespace per .editorconfig
43-
args: [--markdown-linebreak-ext=md] # OBS: respect Markdown line breaks
4445
- id: end-of-file-fixer # OBS: ensure files end with a newline per .gitattributes
46+
47+
- id: mixed-line-ending # OBS: normalize line endings before linters run
48+
# WHY: yamllint enforces LF; Windows working copies may be CRLF.
49+
args: [--fix=lf]
50+
4551
- id: check-merge-conflict # OBS: prevent committing unresolved merge conflicts
52+
4653
- id: check-yaml # OBS: validate YAML syntax
47-
files: \.(yml|yaml|md)$
54+
files: \.(yml|yaml)$
4855

56+
- repo: https://github.com/adrienverge/yamllint
57+
rev: v1.37.1
58+
hooks:
59+
- id: yamllint # OBS: validate YAML structure and policy (no line-length enforcement)
60+
args: [-c, .yamllint.yml]
61+
files: \.(yml|yaml)$
4962

5063
- repo: https://github.com/rhysd/actionlint
51-
rev: v1.7.10 # OBS: v1.7.10 current as of Dec 30 2025
64+
rev: v1.7.10
5265
hooks:
5366
- id: actionlint # OBS: validate GitHub Actions workflow syntax
5467
files: ^\.github/workflows/.*\.(yml|yaml)$

.yamllint.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# WHY: Enforce YAML correctness without arbitrary style constraints.
2+
# OBS: Default yamllint rules conflict with GitHub Actions YAML.
3+
# Line length, document start, truthy, and comment spacing are intentionally disabled.
4+
5+
extends: default
6+
7+
rules:
8+
line-length: disable
9+
document-start: disable
10+
truthy: disable
11+
comments: disable

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ keywords:
2222
- identity-regimes
2323
- formal-ontology
2424

25-
message: "If you use this software, please cite it as described in this file."
25+
message: "If using this software, please cite it as described in this file."

SPEC.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,3 @@ This does not define:
158158
- exchange or interaction mechanisms
159159

160160
These concerns are explicitly out of scope.
161-

lychee.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# WHY: Configures Lychee link checker behavior for CI/CD.
44
# OBS: Flat structure required by lychee v0.22+; no nested sections.
55
# OBS: No path exclusions; all documentation files are expected to be link-clean.
6-
# OBS: Link integrity supports Structural Explainability (SE)
6+
# OBS: Link integrity supports Structural Explainability (SE)
77
# by preserving stable, reconstructible references over time.
8-
# OBS: Link integrity also benefits Contextual Evidence & Explanations (CEE)
9-
# by maintaining the availability of cited evidence and provenance,
8+
# OBS: Link integrity also benefits Contextual Evidence & Explanations (CEE)
9+
# by maintaining the availability of cited evidence and provenance,
1010
# without enforcing interpretation.
1111

1212

0 commit comments

Comments
 (0)