Skip to content

Commit 2b6839d

Browse files
committed
initial
0 parents  commit 2b6839d

17 files changed

Lines changed: 1137 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: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
.pre-commit-config.yaml text eol=lf
25+
.yamllint.yml text eol=lf
26+
27+
# === GitHub Linguist ===
28+
# Improve language statistics and UI without affecting builds
29+
docs/** linguist-documentation
30+
31+
# Jupyter notebooks: custom diff/merge drivers (if configured)
32+
*.ipynb diff=jupyternotebook
33+
*.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/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/[email protected]
31+
with:
32+
extra_args: --all-files

.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:
25+
contents: read
26+
issues: write
27+
pull-requests: write
28+
29+
steps:
30+
- name: 1) Checkout repository code
31+
uses: actions/checkout@v6 # OBS: v6 current as of Dec 2025
32+
33+
- name: 2) Check links with Lychee
34+
uses: lycheeverse/lychee-action@v2
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
50+
if: failure() && github.event_name == 'pull_request'
51+
uses: actions/github-script@v8
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
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/

0 commit comments

Comments
 (0)