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
101 changes: 13 additions & 88 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,88 +1,13 @@
<!--
SPDX-License-Identifier: CC-BY-SA-4.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:

- `STATE.scm` - Current project state and progress
- `META.scm` - Architecture decisions and development practices
- `ECOSYSTEM.scm` - Position in the ecosystem and related projects
- `AGENTIC.scm` - AI agent interaction patterns
- `NEUROSYM.scm` - Neurosymbolic integration config
- `PLAYBOOK.scm` - Operational runbook

---

# CLAUDE.md - AI Assistant Instructions

## Language Policy (Hyperpolymath Standard)

### ALLOWED Languages & Tools

| Language/Tool | Use Case | Notes |
|---------------|----------|-------|
| **AffineScript** | Primary application code | Compiles to JS, type-safe |
| **Bun** | JS runtime & package management (tier 1) | Default for all new work. Runs compiled ESM/JS directly — no bundler step. Uses an npm-compatible `package.json` plus `bun.lock` — both are expected, not anti-patterns. |
| **Rust** | Performance-critical, systems, WASM | Preferred for CLI tools |
| **Tauri 2.0+** | Mobile apps (iOS/Android) | Rust backend + web UI |
| **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 AffineScript cannot | MCP protocol glue, Bun APIs |
| **Nickel** | Configuration language | For complex configs |
| **Guile Scheme** | State/meta files | STATE.scm, META.scm, ECOSYSTEM.scm |
| **Julia** | Batch scripts, data processing | Per RSR |
| **OCaml** | AffineScript compiler | Language-specific |
| **Ada** | Safety-critical systems | Where required |

### BANNED - Do Not Use

| Banned | Replacement |
|--------|-------------|
| TypeScript | AffineScript |
| ReScript | AffineScript |
| Deno | Bun |
| Node.js | Bun |
| npm | Bun |
| pnpm/yarn | Bun |
| Go | Rust |
| Python | Julia/Rust/AffineScript |
| Java/Kotlin | Rust/Tauri/Dioxus |
| Swift | Tauri/Dioxus |
| React Native | Tauri/Dioxus |
| Flutter/Dart | Tauri/Dioxus |

### Mobile Development

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

1. **Tauri 2.0+** - Web UI (AffineScript) + Rust backend, MIT/Apache-2.0
2. **Dioxus** - Pure Rust native UI, MIT/Apache-2.0

Both are FOSS with independent governance (no Big Tech).

### Enforcement Rules

1. **No new TypeScript files** - Convert existing TS to AffineScript
2. **Use `package.json` + `bun.lock` for JS runtime deps** - Bun is npm-compatible; a manifest is REQUIRED
3. **`bun install --production` for production deps** - resolved from `package.json`, pinned via `bun.lock`
4. **No Go code** - Use Rust instead
5. **No Python anywhere** - Use Julia for data/batch, Rust for systems, AffineScript for apps
6. **No Kotlin/Swift for mobile** - Use Tauri 2.0+ or Dioxus

### Package Management

- **Primary**: Guix (guix.scm)
- **Fallback**: Nix (flake.nix)
- **JS deps**: Bun (`package.json` + `bun.lock`). Declare tooling as a devDependency and run `bunx --no-install --bun <tool>` — a bare `bunx <tool>` can fetch an unpinned package and may start Node via its shebang.

### Security Requirements

- No MD5/SHA1 for security (use SHA256+)
- HTTPS only (no HTTP URLs)
- No hardcoded secrets
- SHA-pinned dependencies
- SPDX license headers on all files

<!-- SPDX-License-Identifier: CC-BY-SA-4.0 -->
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
<!-- SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> -->
# Claude Code project notes

Use the repository-wide agent instructions in [`../CLAUDE.md`](../CLAUDE.md).
Repository-wide descriptive facts live in [`../phantom-metal-taste_chora.deed`](../phantom-metal-taste_chora.deed)
in the current DEED format. Do not recreate retired `.a2ml` files or the
former root-level `.scm` state layout.

Project-specific facts: Rust and Julia libraries plus a Bun site builder are
implemented to experimental depth; the AffineScript orchestrator is unfinished;
there is no HTTP API or database integration. All changes and claims must match
what the source and tests actually demonstrate.
44 changes: 5 additions & 39 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# phantom-metal-taste - Editor Configuration
# https://editorconfig.org
# SPDX-License-Identifier: MPL-2.0
# Editor configuration for the current Rust / Julia / Bun / Guix toolchain.

root = true

Expand All @@ -20,49 +20,15 @@ trim_trailing_whitespace = false
[*.rs]
indent_size = 4

[*.ex]
indent_size = 2

[*.exs]
indent_size = 2

[*.zig]
[*.jl]
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]
[*.affine]
indent_size = 2

[*.scm]
indent_size = 2

[*.nix]
[*.{js,mjs,json,yml,yaml,toml,scm,sh}]
indent_size = 2

[Justfile]
indent_style = space
indent_size = 4

[justfile]
indent_style = space
indent_size = 4
87 changes: 38 additions & 49 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,54 +1,43 @@
# SPDX-License-Identifier: MPL-2.0
# RSR-compliant .gitattributes
# RSR-compliant text and diff attributes for the current repository languages.

* 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
# Rust and Julia source
*.rs text eol=lf diff=rust
*.jl text eol=lf

# Bun site tooling
*.js text eol=lf
*.mjs text eol=lf

# AffineScript source/scaffolds
*.affine text eol=lf

# Guix Scheme and configuration
*.scm text eol=lf
*.toml text eol=lf
*.json text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
*.sh text eol=lf

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

# Build/task files
Justfile text eol=lf
justfile text eol=lf
Cargo.lock text eol=lf -diff

# Binary assets
*.png binary
*.jpg binary
*.jpeg 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
*.zip binary
*.gz binary
36 changes: 13 additions & 23 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,34 +1,24 @@
# 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
# Repository owner is the default reviewer; repository permissions govern merge authority.
* @hyperpolymath

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

# License files
# Licences and project policy.
LICENSE @hyperpolymath
LICENSES/ @hyperpolymath

# Configuration
.gitignore @hyperpolymath
.github/ @hyperpolymath

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

# Build and CI
# Source, build, and provisioning.
Cargo.toml @hyperpolymath
Cargo.lock @hyperpolymath
Project.toml @hyperpolymath
mise.toml @hyperpolymath
Justfile @hyperpolymath
Makefile @hyperpolymath
*.sh @hyperpolymath
build/just/ @hyperpolymath
launcher.sh @hyperpolymath
Loading
Loading