Skip to content

Commit 6775b79

Browse files
committed
initial
0 parents  commit 6775b79

15 files changed

Lines changed: 980 additions & 0 deletions

.editorconfig

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# REQ.UNIVERSAL: All professional GitHub project repositories MUST include .editorconfig.
2+
# WHY: Establish a cross-editor baseline so diffs stay clean and formatting is consistent.
3+
# ALT: Repository may omit .editorconfig ONLY if formatting is enforced equivalently by CI and formatter tooling.
4+
# CUSTOM: Adjust indent_size defaults only if organizational standards change; keep stable across projects.
5+
# NOTE: Sections are ordered by editorial importance, not strict alphabetical order.
6+
# EditorConfig is documented at https://editorconfig.org
7+
8+
[*.{editorconfig}]
9+
root = true
10+
11+
# === Global defaults (always apply) ===
12+
13+
[*]
14+
# WHY: Normalize line endings and encoding across Windows, macOS, and Linux.
15+
end_of_line = lf
16+
charset = utf-8
17+
18+
# WHY: Newline at EOF avoids noisy diffs and tool warnings.
19+
insert_final_newline = true
20+
21+
# WHY: Remove accidental whitespace noise in diffs.
22+
trim_trailing_whitespace = true
23+
24+
# WHY: Default to 2 spaces for configs and markup; language-specific overrides follow.
25+
indent_style = space
26+
indent_size = 2
27+
28+
29+
# === Build systems (special rules) ===
30+
31+
[Makefile]
32+
# WHY: Makefiles require tabs.
33+
indent_style = tab
34+
35+
[*.mk]
36+
# WHY: Makefile includes require tabs.
37+
indent_style = tab
38+
39+
40+
# === Citation and metadata ===
41+
42+
[CITATION.cff]
43+
# WHY: Citation tooling expects stable YAML formatting.
44+
indent_size = 2
45+
indent_style = space
46+
47+
48+
# === Markup and documentation ===
49+
50+
[*.md]
51+
# WHY: Keep Markdown clean; use explicit <br> for hard line breaks.
52+
indent_size = 2
53+
trim_trailing_whitespace = true
54+
55+
[*.{tex,cls,sty}]
56+
# WHY: LaTeX convention is 2 spaces.
57+
indent_size = 2
58+
indent_style = space
59+
60+
[*.xml]
61+
# WHY: XML convention is 2 spaces.
62+
indent_size = 2
63+
indent_style = space
64+
65+
[*.{yml,yaml}]
66+
# WHY: YAML convention is 2 spaces.
67+
indent_size = 2
68+
indent_style = space
69+
70+
71+
# === Data and configuration ===
72+
73+
[*.{json,jsonc,jsonl,ndjson}]
74+
# WHY: JSON tooling typically expects 2 spaces.
75+
indent_size = 2
76+
indent_style = space
77+
78+
[*.toml]
79+
# WHY: TOML often follows 4-space indentation in many projects.
80+
indent_size = 4
81+
indent_style = space
82+
83+
84+
# === Programming languages ===
85+
86+
[*.{js,ts}]
87+
# WHY: JS/TS ecosystem commonly uses 2 spaces.
88+
indent_size = 2
89+
indent_style = space
90+
91+
[*.{py,pyi}]
92+
# WHY: Python convention is 4 spaces.
93+
indent_size = 4
94+
indent_style = space
95+
96+
[*.ps1]
97+
# WHY: PowerShell convention is 4 spaces.
98+
indent_size = 4
99+
indent_style = space
100+
101+
[*.{c,cpp,h,java,cs,go,rs}]
102+
# WHY: Many C-family and systems languages commonly use 4 spaces.
103+
indent_size = 4
104+
indent_style = space
105+
106+
[*.{sh,bash}]
107+
# WHY: Shell script convention is 2 spaces.
108+
indent_size = 2
109+
indent_style = space
110+
111+
112+
# === Proof assistants and formal languages ===
113+
114+
[*.lean]
115+
# WHY: Lean 4 convention is 2 spaces; matches Mathlib and stdlib style.
116+
indent_size = 2
117+
indent_style = space
118+
119+
[*.{v,vo}]
120+
# WHY: Coq convention is 2 spaces.
121+
indent_size = 2
122+
indent_style = space

.gitattributes

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# WHY-FILE: Normalize line endings and GitHub language classification
2+
# to ensure cross-platform consistency and predictable CI behavior.
3+
4+
# === Core: Text normalization ===
5+
* text=auto
6+
7+
# WHY-SECTION: Explicit EOL rules avoid platform-specific diffs and tool failures.
8+
9+
# === Scripts ===
10+
# Python and shell scripts must always use LF (CI, Linux, macOS, containers)
11+
*.py text eol=lf
12+
*.sh text eol=lf
13+
14+
# PowerShell scripts follow Windows convention
15+
*.ps1 text eol=crlf
16+
17+
# === Docs and configs ===
18+
# Cross-platform; tooling expects LF
19+
*.md text eol=lf
20+
*.yaml text eol=lf
21+
*.yml text eol=lf
22+
*.json text eol=lf
23+
*.toml text eol=lf
24+
25+
# === GitHub Linguist ===
26+
# Improve language statistics and UI without affecting builds
27+
docs/** linguist-documentation
28+
29+
# Jupyter notebooks: custom diff/merge drivers (if configured)
30+
*.ipynb diff=jupyternotebook
31+
*.ipynb merge=jupyternotebook

.github/dependabot.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# REQ.PROJECT: This repository SHOULD track GitHub Actions updates automatically.
2+
# WHY: GitHub Actions are executable dependencies and may receive security or behavior updates.
3+
# OBS: This repository has no language-level dependencies (Python, JS, Rust, etc.).
4+
# OBS: GitHub Actions are the only dependency class currently in scope.
5+
# ALT: Dependabot could be omitted if workflows are pinned and reviewed manually.
6+
# CUSTOM: Update interval if CI cadence or security posture changes.
7+
8+
version: 2
9+
10+
updates:
11+
- package-ecosystem: "github-actions"
12+
directory: "/"
13+
14+
# WHY: Monthly cadence balances stability with security updates.
15+
# ALT: Use "weekly" for higher-security environments.
16+
schedule:
17+
interval: "monthly"
18+
19+
# WHY: Clear commit prefix simplifies changelog review and filtering.
20+
commit-message:
21+
prefix: "(deps)"

.github/workflows/links.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# WHY-FILE: Automated link checking.
2+
# OBS: Behavior is configured in lychee.toml in this repository.
3+
# OBS: Runs on pull requests and monthly on schedule; manual trigger always available.
4+
5+
name: Check Links
6+
7+
on:
8+
workflow_dispatch: # WHY: Manual trigger - always available
9+
10+
pull_request: # WHY: Validates PR links before merge
11+
12+
schedule:
13+
- cron: "0 6 1 * *" # WHY: Runs monthly (1st of month)
14+
15+
concurrency:
16+
# WHY: Prevent multiple simultaneous link checks on same ref
17+
group: link-check-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
lychee:
22+
runs-on: ubuntu-latest
23+
24+
permissions: # WHY: Permissions needed for PR comments and issue creation
25+
contents: read
26+
issues: write
27+
pull-requests: write
28+
29+
steps:
30+
- name: 1) Checkout repository code # WHY: Needed to access files for link checking
31+
uses: actions/checkout@v6 # OBS: v6 current as of Dec 2025
32+
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
35+
with:
36+
args: >
37+
--config lychee.toml
38+
--user-agent "${{ github.repository }}/lychee"
39+
'./**/*.bib'
40+
'./**/*.md'
41+
'./**/*.html'
42+
'./**/*.tex'
43+
'./**/*.yml'
44+
'./**/*.yaml'
45+
lycheeVersion: latest # OBS: Always use latest lychee release
46+
env:
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
49+
- name: 3) Comment on PR if links broken # WHY: Provide helpful feedback on PRs with broken links
50+
if: failure() && github.event_name == 'pull_request'
51+
uses: actions/github-script@v8 # OBS: current as of Dec 2025
52+
with:
53+
script: |
54+
const runUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`;
55+
const comment = [
56+
"## Link Check Results",
57+
"",
58+
`Some links appear broken. Check the workflow logs: ${runUrl}`,
59+
].join("\n");
60+
61+
await github.rest.issues.createComment({
62+
issue_number: context.issue.number,
63+
owner: context.repo.owner,
64+
repo: context.repo.repo,
65+
body: comment,
66+
});
67+
68+
- name: 4) Create issue for scheduled failures # WHY: Track broken links found during scheduled checks
69+
# OBS: Only creates issue if none already open with 'broken-links' label
70+
if: failure() && github.event_name == 'schedule'
71+
uses: actions/github-script@v8 # OBS: current as of Dec 2025
72+
with:
73+
script: |
74+
const date = new Date().toISOString().split("T")[0];
75+
const title = `Link Check Failed - ${date}`;
76+
const runUrl = `${context.payload.repository.html_url}/actions/runs/${context.runId}`;
77+
const body = `Monthly link check found broken links.\n\nWorkflow logs: ${runUrl}`;
78+
79+
const existing = await github.rest.issues.listForRepo({
80+
owner: context.repo.owner,
81+
repo: context.repo.repo,
82+
labels: "broken-links",
83+
state: "open",
84+
});
85+
86+
if (existing.data.length === 0) {
87+
await github.rest.issues.create({
88+
owner: context.repo.owner,
89+
repo: context.repo.repo,
90+
title,
91+
body,
92+
labels: ["maintenance", "broken-links"],
93+
});
94+
}

.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# REQ.UNIVERSAL: Spec repositories MUST ignore editor, OS, and transient artifacts.
2+
# WHY: Prevent accidental commits of local or generated noise.
3+
# ALT: Expand only if the repository adds tooling that generates artifacts.
4+
5+
# === OS artifacts ===
6+
.DS_Store
7+
Thumbs.db
8+
9+
# === Editor artifacts ===
10+
*.swp
11+
*.swo
12+
*.bak
13+
*~
14+
.vscode/
15+
.idea/
16+
17+
# === Temporary files ===
18+
.tmp/
19+
.temp/
20+
21+
# === LaTeX build artifacts (if SPEC is rendered locally) ===
22+
*.aux
23+
*.bbl
24+
*.blg
25+
*.log
26+
*.out
27+
*.toc
28+
*.fls
29+
*.fdb_latexmk
30+
31+
# === PDF previews ===
32+
*.pdf
33+
34+
# === Proof assistant artifacts (defensive, non-binding) ===
35+
*.olean
36+
*.ilean
37+
*.trace
38+
.lake/

.pre-commit-config.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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.
3+
# WHY: Keep local checks compatible with repository-wide formatting rules.
4+
# OBS: Formatting baselines are defined in
5+
# .editorconfig (whitespace/indentation) and
6+
# .gitattributes (EOL normalization).
7+
# 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.
11+
# CUSTOM: Keep the hook set minimal and non-destructive for normative Markdown specs.
12+
#
13+
# OPTIONAL LOCAL USAGE (no repo venv required):
14+
# Install uv (once, user-level).
15+
# uv self update
16+
# uvx pre-commit install
17+
# uvx pre-commit run --all-files
18+
#
19+
# NOTE: pre-commit is optional.
20+
# Repositories do not require Python, uv, or pre-commit to clone or commit.
21+
22+
exclude: |
23+
(?x)^(
24+
\.DS_Store|
25+
\.ipynb_checkpoints/|
26+
\.mypy_cache/|
27+
\.pytest_cache/|
28+
\.ruff_cache/|
29+
\.tox/|
30+
\.venv/|
31+
build/|
32+
dist/|
33+
node_modules/|
34+
site/
35+
)
36+
37+
repos:
38+
- repo: https://github.com/pre-commit/pre-commit-hooks
39+
rev: v6.0.0 # OBS: v6 current as of Dec 30 2025
40+
hooks:
41+
- id: check-added-large-files # OBS: prevent large binary files
42+
- id: trailing-whitespace # OBS: clean trailing whitespace per .editorconfig
43+
args: [--markdown-linebreak-ext=md] # OBS: respect Markdown line breaks
44+
- id: end-of-file-fixer # OBS: ensure files end with a newline per .gitattributes
45+
- id: check-merge-conflict # OBS: prevent committing unresolved merge conflicts
46+
- id: check-yaml # OBS: validate YAML syntax
47+
files: \.(yml|yaml|md)$
48+
49+
50+
- repo: https://github.com/rhysd/actionlint
51+
rev: v1.7.10 # OBS: v1.7.10 current as of Dec 30 2025
52+
hooks:
53+
- id: actionlint # OBS: validate GitHub Actions workflow syntax
54+
files: ^\.github/workflows/.*\.(yml|yaml)$

ANNOTATIONS.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Annotations
2+
3+
<!--
4+
WHY: This repository uses the Structural Explainability Annotation Standard
5+
to document decisions, constraints, and alternatives directly alongside
6+
code and configuration.
7+
-->
8+
9+
This repository uses the annotation standard defined at:
10+
<https://github.com/structural-explainability/.github/blob/main/ANNOTATIONS.md>

0 commit comments

Comments
 (0)