Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# RSR-template-repo - Editor Configuration
# https://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.adoc]
trim_trailing_whitespace = false

[*.rs]
indent_size = 4

[*.ex]
indent_size = 2

[*.exs]
indent_size = 2

[*.zig]
indent_size = 4

[*.ada]
indent_size = 3

[*.adb]
indent_size = 3

[*.ads]
indent_size = 3

[*.hs]
indent_size = 2

[*.res]
indent_size = 2

[*.resi]
indent_size = 2

[*.ncl]
indent_size = 2

[*.rkt]
indent_size = 2

[*.scm]
indent_size = 2

[*.nix]
indent_size = 2

[Justfile]
indent_style = space
indent_size = 4

[justfile]
indent_style = space
indent_size = 4
54 changes: 54 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# SPDX-License-Identifier: MPL-2.0
# RSR-compliant .gitattributes

* text=auto eol=lf

# Source
*.rs text eol=lf diff=rust
*.ex text eol=lf diff=elixir
*.exs text eol=lf diff=elixir
*.jl text eol=lf
*.res text eol=lf
*.resi text eol=lf
*.ada text eol=lf diff=ada
*.adb text eol=lf diff=ada
*.ads text eol=lf diff=ada
*.hs text eol=lf
*.chpl text eol=lf
*.scm text eol=lf
*.ncl text eol=lf
*.nix text eol=lf

# Docs
*.md text eol=lf diff=markdown
*.adoc text eol=lf
*.txt text eol=lf

# Data
*.json text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
*.toml text eol=lf

# Config
.gitignore text eol=lf
.gitattributes text eol=lf
justfile text eol=lf
Makefile text eol=lf
Containerfile text eol=lf

# Scripts
*.sh text eol=lf

# Binary
*.png binary
*.jpg binary
*.gif binary
*.pdf binary
*.woff2 binary
*.zip binary
*.gz binary

# Lock files
Cargo.lock text eol=lf -diff
flake.lock text eol=lf -diff
31 changes: 31 additions & 0 deletions .github/PROVEN-INTEGRATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# proven Integration Plan

This document outlines the recommended [proven](https://github.com/hyperpolymath/proven) modules for Glyphbase.

## Recommended Modules

| Module | Purpose | Priority |
|--------|---------|----------|
| SafeTransaction | ACID transactions with isolation proofs for spreadsheet operations | High |
| SafeSchema | Schema migration with compatibility proofs for table structure changes | High |
| SafeOrdering | Temporal ordering with causality proofs for change tracking | High |
| SafeProvenance | Change tracking with audit proofs for "who changed what when" | High |

## Integration Notes

Glyphbase as an open-source Airtable alternative that "remembers everything" requires:

- **SafeTransaction** ensures spreadsheet operations maintain ACID properties. Cell edits, row insertions, and bulk operations are either fully committed or fully rolled back, preventing partial state corruption.

- **SafeSchema** manages table schema evolution with formal compatibility guarantees. The `isBackwardCompatible` check ensures existing data remains readable after schema changes, and `MigrationChain` verifies migration sequences are contiguous.

- **SafeOrdering** tracks the ordering of changes with verified causality. When multiple users edit concurrently, vector clocks determine the correct merge order.

- **SafeProvenance** is core to Glyphbase's value proposition - tracking who made what change when. The `ProvenanceChain` provides tamper-evident history, and `Lineage` tracks how each cell value was derived.

These modules together enable Glyphbase's promise of complete change tracking with mathematical guarantees.

## Related

- [proven library](https://github.com/hyperpolymath/proven)
- [Idris 2 documentation](https://idris2.readthedocs.io/)
98 changes: 98 additions & 0 deletions .github/workflows/casket-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# SPDX-License-Identifier: MPL-2.0
name: GitHub Pages

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Checkout casket-ssg
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
repository: hyperpolymath/casket-ssg
path: .casket-ssg

- name: Setup GHCup
uses: haskell-actions/setup@ec49483bfc012387b227434aba94f59a6ecd0900 # v2
with:
ghc-version: '9.8.2'
cabal-version: '3.10'

- name: Cache Cabal
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: |
~/.cabal/packages
~/.cabal/store
.casket-ssg/dist-newstyle
key: ${{ runner.os }}-casket-${{ hashFiles('.casket-ssg/casket-ssg.cabal') }}

- name: Build casket-ssg
working-directory: .casket-ssg
run: cabal build

- name: Build site
run: |
mkdir -p site _site
# Generate index.md from README if site/index.md doesn't exist
if [ ! -f site/index.md ]; then
if [ -f README.adoc ]; then
# Convert AsciiDoc to Markdown (basic conversion)
echo "---" > site/index.md
echo "title: $(basename $PWD)" >> site/index.md
echo "date: $(date +%Y-%m-%d)" >> site/index.md
echo "---" >> site/index.md
cat README.adoc >> site/index.md
elif [ -f README.md ]; then
echo "---" > site/index.md
echo "title: $(basename $PWD)" >> site/index.md
echo "date: $(date +%Y-%m-%d)" >> site/index.md
echo "---" >> site/index.md
cat README.md >> site/index.md
else
echo "---" > site/index.md
echo "title: $(basename $PWD)" >> site/index.md
echo "date: $(date +%Y-%m-%d)" >> site/index.md
echo "---" >> site/index.md
echo "" >> site/index.md
echo "# $(basename $PWD)" >> site/index.md
echo "" >> site/index.md
echo "Documentation coming soon." >> site/index.md
fi
fi
cd .casket-ssg && cabal run casket-ssg -- build ../site ../_site

- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5

- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: '_site'

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
40 changes: 40 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# SPDX-License-Identifier: MPL-2.0
name: CodeQL Security Analysis

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
schedule:
- cron: '0 6 * * 1'

permissions: read-all

jobs:
analyze:
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none

steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

- name: Initialize CodeQL
uses: github/codeql-action/init@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v3.28.1
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v3.28.1
with:
category: "/language:${{ matrix.language }}"
64 changes: 64 additions & 0 deletions .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# SPDX-License-Identifier: MPL-2.0
name: Deploy Landing Page

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Convert docs to HTML
run: |
# Convert AsciiDoc to HTML
sudo apt-get update && sudo apt-get install -y asciidoctor

# Convert USER-GUIDE.adoc
asciidoctor -o docs/site/USER-GUIDE.html docs/USER-GUIDE.adoc

# Convert QUICKSTART.md to HTML
echo '<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Quick Start</title>' > docs/site/QUICKSTART.html
echo '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/github-markdown-css@5/github-markdown.min.css">' >> docs/site/QUICKSTART.html
echo '<style>body{max-width:800px;margin:2rem auto;padding:2rem;}</style></head>' >> docs/site/QUICKSTART.html
echo '<body class="markdown-body">' >> docs/site/QUICKSTART.html

# Use pandoc for markdown conversion
sudo apt-get install -y pandoc
pandoc QUICKSTART.md -o temp.html
cat temp.html >> docs/site/QUICKSTART.html

echo '</body></html>' >> docs/site/QUICKSTART.html
rm temp.html

# Copy examples
mkdir -p docs/site/examples
cp examples/*.json docs/site/examples/

- name: Setup Pages
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5

- name: Upload artifact
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
with:
path: 'docs/site'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
26 changes: 26 additions & 0 deletions .github/workflows/governance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SPDX-License-Identifier: MPL-2.0
# governance.yml — single wrapper calling the shared estate governance bundle
# in hyperpolymath/standards instead of carrying per-repo copies.
#
# Replaces the per-repo governance scaffolding removed in the same commit:
# quality.yml, guix-nix-policy.yml, npm-bun-blocker.yml, ts-blocker.yml,
# security-policy.yml, rsr-antipattern.yml, wellknown-enforcement.yml,
# workflow-linter.yml
#
# Load-bearing build/security workflows stay standalone in the repo
# (rust-ci, codeql, dependabot, release, scan/mirror/pages plumbing).

name: Governance

on:
push:
branches: [main, master]
pull_request:
workflow_dispatch:

permissions:
contents: read

jobs:
governance:
uses: hyperpolymath/standards/.github/workflows/governance-reusable.yml@main
Loading
Loading