Skip to content

Commit a9d7700

Browse files
committed
initial
1 parent d2296c0 commit a9d7700

37 files changed

Lines changed: 2217 additions & 1 deletion

.editorconfig

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

.gitattributes

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# ============================================================
2+
# .gitattributes (Keep files consistent across operating systems)
3+
# ============================================================
4+
5+
# REQ.UNIVERSAL: All professional GitHub project repositories MUST include .gitattributes.
6+
# WHY: Ensure consistent line endings, diff behavior, and file classification
7+
# across Windows, macOS, and Linux environments.
8+
# ALT: Repository may omit .gitattributes ONLY if equivalent normalization is
9+
# enforced reliably by tooling and CI (rare and fragile).
10+
# CUSTOM: Update file-type rules only when introducing new languages,
11+
# binary artifacts, or documentation formats.
12+
# NOTE: Rules are ordered by impact and generality, not alphabetically.
13+
# Git attributes are documented at https://git-scm.com/docs/gitattributes
14+
15+
# === Core defaults (always apply) ===
16+
17+
# WHY: Auto-detect text files and normalize line endings to avoid cross-platform drift.
18+
* text=auto
19+
20+
21+
# === Programming languages and scripts ===
22+
23+
# WHY: Python and shell scripts must use LF for CI/CD, Linux environments, and containers.
24+
*.py text eol=lf
25+
*.sh text eol=lf
26+
27+
# WHY: PowerShell convention on Windows uses CRLF.
28+
*.ps1 text eol=crlf
29+
30+
31+
# === Markup and documentation ===
32+
33+
# WHY: Documentation and markup files use LF; standard for cross-platform tooling.
34+
*.md text eol=lf
35+
*.tex text eol=lf
36+
*.sty text eol=lf
37+
*.cls text eol=lf
38+
*.bib text eol=lf
39+
40+
41+
# === Configuration and structured text ===
42+
43+
# WHY: Configuration and structured text formats use LF for stable diffs.
44+
*.json text eol=lf
45+
*.jsonc text eol=lf
46+
*.jsonl text eol=lf
47+
*.ndjson text eol=lf
48+
*.toml text eol=lf
49+
*.yaml text eol=lf
50+
*.yml text eol=lf
51+
52+
53+
# === Proof assistants and formal languages ===
54+
55+
# WHY: Lean source files must use LF for cross-platform consistency and CI.
56+
*.lean text eol=lf
57+
58+
# WHY: Lean build artifacts are binary; prevent normalization and meaningless diffs.
59+
*.olean binary
60+
*.ilean binary
61+
*.trace binary
62+
63+
# WHY: Coq source uses LF; compiled objects are binary.
64+
*.v text eol=lf
65+
*.vo binary
66+
*.vok binary
67+
*.vos binary
68+
*.glob binary
69+
70+
# WHY: Lake build directory should be excluded, but if tracked, treat as binary.
71+
.lake/** binary
72+
73+
74+
# === Notebooks ===
75+
76+
# WHY: Jupyter notebooks require specialized diff and merge handling.
77+
*.ipynb diff=jupyternotebook
78+
*.ipynb merge=jupyternotebook
79+
80+
81+
# === Databases (binary) ===
82+
83+
# WHY: Database files are binary; prevent text normalization and meaningless diffs.
84+
*.db binary
85+
*.duckdb binary
86+
*.sqlite binary
87+
*.sqlite3 binary
88+
89+
90+
# === Columnar and analytical data (binary) ===
91+
92+
# WHY: Columnar and analytical data formats are binary; diffs are not meaningful.
93+
*.arrow binary
94+
*.avro binary
95+
*.feather binary
96+
*.orc binary
97+
*.parquet binary
98+
99+
100+
# === Office, BI, PDFs, and compressed artifacts (binary) ===
101+
102+
# WHY: Office documents, BI files, PDFs, and compressed artifacts are binary.
103+
*.7z binary
104+
*.bz2 binary
105+
*.docx binary
106+
*.gz binary
107+
*.pbix binary
108+
*.pbit binary
109+
*.pdf binary
110+
*.pptx binary
111+
*.rar binary
112+
*.tar binary
113+
*.tgz binary
114+
*.xls binary
115+
*.xlsm binary
116+
*.xlsx binary
117+
*.xz binary
118+
*.zip binary
119+
120+
121+
# === GitHub metadata and UI ===
122+
123+
# WHY: Exclude documentation and tests from GitHub language statistics.
124+
docs/** linguist-documentation
125+
tests/** linguist-documentation
126+
127+
# === LOG FILES ===
128+
# WHY: Log files are typically large and binary in nature; prevent text normalization.
129+
*.log binary
130+
project.log binary

.github/.yamllint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ============================================================
2+
# .github/.yamllint.yml (Keep YAML files clean and consistent)
3+
# ============================================================
4+
# Updated: 2026-04-13
5+
6+
# WHY: Enforce YAML correctness (.github/.yamllint.yml) without arbitrary style constraints.
7+
# OBS: Default yamllint rules conflict with GitHub Actions YAML.
8+
# Line length, document start, truthy, and comment spacing are intentionally disabled.
9+
10+
extends: default
11+
12+
rules:
13+
line-length: disable
14+
document-start: disable
15+
truthy: disable
16+
comments: disable

.github/dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# ============================================================
2+
# .github/dependabot.yml (Check for GitHub Actions updates)
3+
# ============================================================
4+
# REQ.PROJECT: This repository SHOULD track GitHub Actions updates automatically.
5+
# WHY-FILE: GitHub Actions are executable dependencies and may receive security or behavior updates.
6+
# OBS: Language-level dependencies (e.g., Python packages) are upgraded manually.
7+
# OBS: GitHub Actions are the only dependency class automated here.
8+
# ALT: Dependabot could be omitted if workflows are pinned and reviewed manually.
9+
# CUSTOM: Update interval if CI cadence or security posture changes.
10+
11+
# NOTE: This file automatically updates the versions used in Actions workflows.
12+
# You don't need to modify this file.
13+
# To disable: Delete this file or set enabled: false below.
14+
# enabled: false # Uncomment to disable Dependabot
15+
16+
version: 2 # Dependabot configuration version
17+
18+
updates:
19+
- package-ecosystem: "github-actions" # Dependency type
20+
directory: "/" # Location of GitHub Actions workflows
21+
schedule:
22+
interval: "monthly" # ALT: Use "weekly" for higher security when needed
23+
commit-message:
24+
prefix: "(deps)" # WHY: enable filtering by commit type

.github/lychee.toml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# ============================================================
2+
# .github/lychee.toml (Lychee link checker configuration)
3+
# ============================================================
4+
# Updated: 2026-04-13
5+
6+
# REQ.PROJECT: Automatic link checking using GitHub Actions and Lychee.
7+
# WHY-FILE: Shared Lychee configuration (lychee.toml) for documentation-heavy repositories.
8+
# REQ: Link checking MUST be reliable and CI-safe.
9+
# WHY: Configures Lychee link checker behavior for CI/CD.
10+
# OBS: Flat structure required by lychee v0.22+; no nested sections.
11+
# OBS: No path exclusions; all documentation files are expected to be link-clean.
12+
# OBS: Link integrity preserves stable, reconstructible references over time.
13+
# OBS: Link integrity maintains connections to external resources.
14+
15+
# WHY: Control verbosity and CI-friendly output
16+
verbose = "info" # WHY: Balance between detail and noise
17+
no_progress = true # WHY: Progress bars don't work well in CI logs
18+
19+
# WHY: Performance tuning for link checking
20+
max_concurrency = 6 # WHY: Parallel requests without overwhelming servers
21+
max_retries = 3 # WHY: Retry flaky connections before failing
22+
retry_wait_time = 8 # WHY: Wait 8 seconds between retries
23+
timeout = 30 # WHY: 30 seconds per request before timeout
24+
25+
# WHY: Accept common status codes that don't indicate broken links
26+
# OBS: 403 and 429 reduce false positives
27+
accept = [
28+
200, # OK
29+
206, # Partial content
30+
301, # Moved permanently
31+
302, # Found (temporary redirect)
32+
307, # Temporary redirect
33+
308, # Permanent redirect
34+
403, # Forbidden (often false positive)
35+
429, # Too many requests (rate limiting)
36+
]
37+
38+
# WHY: Exclude patterns that shouldn't be checked
39+
exclude = [
40+
"^https://shields\\.io", # WHY: Shields.io badges often have anti-bot measures that cause false positives
41+
"^https://img\\.shields\\.io", # WHY: Shields.io image badges often have anti-bot measures that cause false positives
42+
"^https://badges\\.github\\.com", # WHY: GitHub badges often have anti-bot measures that cause false positives
43+
"^https://www\\.linkedin\\.com", # WHY: LinkedIn often blocks automated requests, causing false positives
44+
"example\\.com", # WHY: Exclude example domains in documentation
45+
"localhost", # WHY: Exclude local development URLs
46+
"127\\.0\\.0\\.1", # WHY: Exclude local loopback
47+
"\\.local", # WHY: Exclude local network domains
48+
]

.github/workflows/ci-lean.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# ============================================================
2+
# .github/workflows/ci-lean.yml (Continuous Integration)
3+
# ============================================================
4+
# Updated: 2026-04-28 THEORY VARIANT, ONLY BUILD
5+
6+
name: CI Lean
7+
8+
on:
9+
push:
10+
branches: [main]
11+
pull_request:
12+
branches: [main]
13+
workflow_dispatch:
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
lean:
20+
name: Build Lean and export contract
21+
runs-on: ubuntu-latest
22+
timeout-minutes: 20
23+
24+
steps:
25+
# ============================================================
26+
# A) ASSEMBLE: Get code and set up Lean
27+
# ============================================================
28+
29+
- name: A1) Checkout repository code
30+
uses: actions/checkout@v6
31+
32+
- name: A2) Set up Lean toolchain
33+
uses: leanprover/lean-action@v1
34+
35+
# ============================================================
36+
# B) BUILD: Compile Lean project
37+
# ============================================================
38+
39+
- name: B1) Build Lean project
40+
run: lake build
41+
# WHY: Compiles the Lean formal contract surface.
42+
# OBS: Uses the Lean version declared in lean-toolchain.

0 commit comments

Comments
 (0)