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
3 changes: 3 additions & 0 deletions .build/Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ test:
# All checks before commit
pre-commit: build test
@echo "All checks passed!"

secret-scan-trufflehog:
@command -v trufflehog >/dev/null && trufflehog filesystem . --only-verified || true
2 changes: 2 additions & 0 deletions .build/config/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0
// Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
Expand Down
2 changes: 2 additions & 0 deletions .build/config/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// SPDX-License-Identifier: MPL-2.0

Check failure

Code scanning / Hypatia

Hypatia code_safety: js_wildcard_cors Error

Wildcard CORS -- restrict to specific origins or use env var (1 occurrences, CWE-942)
// Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
const path = require('path');

module.exports = {
Expand Down
20 changes: 12 additions & 8 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
SPDX-License-Identifier: MPL-2.0
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
-->
## Machine-Readable Artefacts

The following files in `.machine_readable/` contain structured project metadata:
Expand All @@ -19,14 +23,14 @@ The following files in `.machine_readable/` contain structured project metadata:

| Language/Tool | Use Case | Notes |
|---------------|----------|-------|
| **ReScript** | Primary application code | Compiles to JS, type-safe |
| **AffineScript** | Primary application code | Compiles to JS, type-safe |
| **Deno** | Runtime & package management | Replaces Node/npm/bun |
| **Rust** | Performance-critical, systems, WASM | Preferred for CLI tools |
| **Gossamer** | Desktop & mobile apps | Ephapax backend + web UI, linear type safety |
| **Dioxus** | Mobile apps (native UI) | Pure Rust, React-like |
| **Gleam** | Backend services | Runs on BEAM or compiles to JS |
| **Bash/POSIX Shell** | Scripts, automation | Keep minimal |
| **JavaScript** | Only where ReScript cannot | MCP protocol glue, Deno APIs |
| **JavaScript** | Only where AffineScript cannot | MCP protocol glue, Deno APIs |
| **Nickel** | Configuration language | For complex configs |
| **Guile Scheme** | State/meta files | .machine_readable/6a2/STATE.a2ml, .machine_readable/6a2/META.a2ml, .machine_readable/6a2/ECOSYSTEM.a2ml |
| **Julia** | Batch scripts, data processing | Per RSR |
Expand All @@ -37,13 +41,13 @@ The following files in `.machine_readable/` contain structured project metadata:

| Banned | Replacement |
|--------|-------------|
| TypeScript | ReScript |
| TypeScript | AffineScript |
| Node.js | Deno |
| npm | Deno |
| Bun | Deno |
| pnpm/yarn | Deno |
| Go | Rust |
| Python | Julia/Rust/ReScript |
| Python | Julia/Rust/AffineScript |
| Java/Kotlin | Rust/Gossamer/Dioxus |
| Swift | Gossamer/Dioxus |
| React Native | Gossamer/Dioxus |
Expand All @@ -54,18 +58,18 @@ The following files in `.machine_readable/` contain structured project metadata:

**No exceptions for Kotlin/Swift** - use Rust-first approach:

1. **Gossamer** - Web UI (ReScript) + Ephapax/Zig backend, MPL-2.0 (own stack)
1. **Gossamer** - Web UI (AffineScript) + Ephapax/Zig backend, MPL-2.0 (own stack)
2. **Dioxus** - Pure Rust native UI, MIT/Apache-2.0

Both are FOSS with independent governance (no Big Tech). Gossamer is hyperpolymath's own webview shell with linear type safety.

### Enforcement Rules

1. **No new TypeScript files** - Convert existing TS to ReScript
2. **No package.json for runtime deps** - Use deno.json imports
1. **No new TypeScript files** - Convert existing TS to AffineScript
2. **No package.json - use deno.json deps** - Use deno.json imports
3. **No node_modules in production** - Deno caches deps automatically
4. **No Go code** - Use Rust instead
5. **No Python anywhere** - Use Julia for data/batch, Rust for systems, ReScript for apps
5. **No Python anywhere** - Use Julia for data/batch, Rust for systems, AffineScript for apps
6. **No Kotlin/Swift for mobile** - Use Gossamer or Dioxus
7. **No Tauri** - Use Gossamer (hyperpolymath's own webview shell)

Expand Down
4 changes: 4 additions & 0 deletions .claude/PROJECT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
SPDX-License-Identifier: MPL-2.0
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
-->
# Economic Toolkit v2.0 - Project Documentation

## Project Summary
Expand Down
34 changes: 34 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# SPDX-License-Identifier: MPL-2.0
# CODEOWNERS - Define code review assignments for GitHub
# See: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

# Default: sole maintainer for all files
* @hyperpolymath

# Security-sensitive files require explicit ownership
SECURITY.md @hyperpolymath
.github/workflows/ @hyperpolymath
.machine_readable/ @hyperpolymath
contractiles/ @hyperpolymath

# License files
LICENSE @hyperpolymath
LICENSES/ @hyperpolymath

# Configuration
.gitignore @hyperpolymath
.github/ @hyperpolymath

# Documentation
README* @hyperpolymath
CONTRIBUTING* @hyperpolymath
CODE_OF_CONDUCT* @hyperpolymath
GOVERNANCE* @hyperpolymath
MAINTAINERS* @hyperpolymath
CHANGELOG* @hyperpolymath
ROADMAP* @hyperpolymath

# Build and CI
Justfile @hyperpolymath
Makefile @hyperpolymath
*.sh @hyperpolymath
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
SPDX-License-Identifier: MPL-2.0
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
-->
---
name: Bug report
about: Create a report to help us improve
Expand Down
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/custom.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
SPDX-License-Identifier: MPL-2.0
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
-->
---
name: Custom issue template
about: Describe this issue template's purpose here.
Expand Down
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/documentation.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
SPDX-License-Identifier: MPL-2.0
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
-->
---
name: Documentation
about: Report unclear, missing, or incorrect documentation
Expand Down
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
SPDX-License-Identifier: MPL-2.0
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
-->
---
name: Feature request
about: Suggest an idea for this project
Expand Down
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<!--
SPDX-License-Identifier: MPL-2.0
Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
-->
---
name: Question
about: Ask a question about usage or behaviour
Expand Down
7 changes: 7 additions & 0 deletions .github/TEST_CI_MULTI.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# CI TEST: Multiple workflows (CodeQL + Governance)
# SPDX-License-Identifier: MPL-2.0
# Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>

Test commit to verify multiple workflow types.

DELETE AFTER VERIFICATION.
6 changes: 6 additions & 0 deletions .github/copilot/coding-agent.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mcp_servers:
boj-server:
command: npx
args: ["-y", "@hyperpolymath/boj-server@latest"]
env:
BOJ_URL: http://localhost:7700
2 changes: 2 additions & 0 deletions .github/workflows/boj-build.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# // Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
# SPDX-License-Identifier: MPL-2.0
name: BoJ Server Build Trigger
on:
Expand All @@ -7,6 +8,7 @@ on:
jobs:
trigger-boj:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/casket-pages.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,34 @@
# // Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
# SPDX-License-Identifier: MPL-2.0
name: GitHub Pages

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

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

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

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
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:
Expand All @@ -42,11 +37,9 @@ jobs:
~/.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: Prepare site source
shell: bash
run: |
Expand Down Expand Up @@ -89,26 +82,23 @@ jobs:
echo "Project-specific site content can be added later under site/."
} > .site-src/index.md
fi

- name: Build site
run: |
mkdir -p _site
cd .casket-ssg && cabal run casket-ssg -- build ../.site-src ../_site
touch ../_site/.nojekyll

- 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
timeout-minutes: 15
needs: build
steps:
- name: Deploy to GitHub Pages
Expand Down
22 changes: 10 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
# // Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
# SPDX-License-Identifier: MPL-2.0
permissions:
contents: read

name: CI/CD Pipeline

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
release:
types: [published]

env:
JULIA_VERSION: '1.10'
NODE_VERSION: '20'

jobs:
lint-julia:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: julia-actions/setup-julia@ac0d62164df5a47de404f4e96ce86a1a28a28d56 # v1
Expand All @@ -29,9 +27,9 @@ jobs:
- name: Check Julia formatting
run: |
julia -e 'using JuliaFormatter; format("src/julia", verbose=true, overwrite=false) || exit(1)'

lint-typescript:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
Expand All @@ -44,9 +42,9 @@ jobs:
run: npm run lint
- name: Check Prettier formatting
run: npx prettier --check "src/**/*.{ts,tsx,js,jsx}"

test-julia:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: julia-actions/setup-julia@ac0d62164df5a47de404f4e96ce86a1a28a28d56 # v1
Expand All @@ -70,9 +68,9 @@ jobs:
with:
files: lcov.info
flags: julia

test-typescript:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
Expand All @@ -88,9 +86,9 @@ jobs:
with:
files: ./coverage/cobertura-coverage.xml
flags: typescript

build:
runs-on: ubuntu-latest
timeout-minutes: 15
needs: [lint-julia, lint-typescript, test-julia, test-typescript]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
Expand Down Expand Up @@ -121,9 +119,9 @@ jobs:
with:
name: libreoffice-extension
path: dist/uno/economic-toolkit.oxt

security:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
Expand All @@ -136,9 +134,9 @@ jobs:
continue-on-error: true
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

docker-build:
runs-on: ubuntu-latest
timeout-minutes: 15
needs: [build]
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop')
steps:
Expand Down Expand Up @@ -172,9 +170,9 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

release:
runs-on: ubuntu-latest
timeout-minutes: 15
needs: [build, security]
if: github.event_name == 'release'
steps:
Expand All @@ -201,9 +199,9 @@ jobs:
dist/uno/economic-toolkit.oxt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

coverage-report:
runs-on: ubuntu-latest
timeout-minutes: 15
needs: [test-julia, test-typescript]
steps:
- name: Coverage summary
Expand Down
Loading
Loading