Skip to content

Commit d91ef0c

Browse files
hyperpolymathclaude
andcommitted
chore(developer-ecosystem): absorb cadre-router, drop uninitialized template scaffolds
cadre-router previously had its own .git dir inside this monorepo, violating the "no .git dirs in monorepo subdirs" rule. GitHub origin was 404. Absorbing as a regular monorepo subdirectory and dropping the uninitialized src/abi/ + ffi/zig/ template scaffolds ({{project}} placeholders never substituted; not wired into any build). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d6ad2ca commit d91ef0c

125 files changed

Lines changed: 14852 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cadre-router/.claude/CLAUDE.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
## Machine-Readable Artefacts
2+
3+
The following files in `.machine_readable/` contain structured project metadata:
4+
5+
- `STATE.scm` - Current project state and progress
6+
- `META.scm` - Architecture decisions and development practices
7+
- `ECOSYSTEM.scm` - Position in the ecosystem and related projects
8+
- `AGENTIC.scm` - AI agent interaction patterns
9+
- `NEUROSYM.scm` - Neurosymbolic integration config
10+
- `PLAYBOOK.scm` - Operational runbook
11+
12+
---
13+
14+
# CLAUDE.md - AI Assistant Instructions
15+
16+
## Language Policy (Hyperpolymath Standard)
17+
18+
### ALLOWED Languages & Tools
19+
20+
| Language/Tool | Use Case | Notes |
21+
|---------------|----------|-------|
22+
| **ReScript** | Primary application code | Compiles to JS, type-safe |
23+
| **Deno** | Runtime & package management | Replaces Node/npm/bun |
24+
| **Rust** | Performance-critical, systems, WASM | Preferred for CLI tools |
25+
| **Tauri 2.0+** | Mobile apps (iOS/Android) | Rust backend + web UI |
26+
| **Dioxus** | Mobile apps (native UI) | Pure Rust, React-like |
27+
| **Gleam** | Backend services | Runs on BEAM or compiles to JS |
28+
| **Bash/POSIX Shell** | Scripts, automation | Keep minimal |
29+
| **JavaScript** | Only where ReScript cannot | MCP protocol glue, Deno APIs |
30+
| **Nickel** | Configuration language | For complex configs |
31+
| **Guile Scheme** | State/meta files | STATE.scm, META.scm, ECOSYSTEM.scm |
32+
| **Julia** | Batch scripts, data processing | Per RSR |
33+
| **OCaml** | AffineScript compiler | Language-specific |
34+
| **Ada** | Safety-critical systems | Where required |
35+
36+
### BANNED - Do Not Use
37+
38+
| Banned | Replacement |
39+
|--------|-------------|
40+
| TypeScript | ReScript |
41+
| Node.js | Deno |
42+
| npm | Deno |
43+
| Bun | Deno |
44+
| pnpm/yarn | Deno |
45+
| Go | Rust |
46+
| Python | Julia/Rust/ReScript |
47+
| Java/Kotlin | Rust/Tauri/Dioxus |
48+
| Swift | Tauri/Dioxus |
49+
| React Native | Tauri/Dioxus |
50+
| Flutter/Dart | Tauri/Dioxus |
51+
52+
### Mobile Development
53+
54+
**No exceptions for Kotlin/Swift** - use Rust-first approach:
55+
56+
1. **Tauri 2.0+** - Web UI (ReScript) + Rust backend, MIT/Apache-2.0
57+
2. **Dioxus** - Pure Rust native UI, MIT/Apache-2.0
58+
59+
Both are FOSS with independent governance (no Big Tech).
60+
61+
### Enforcement Rules
62+
63+
1. **No new TypeScript files** - Convert existing TS to ReScript
64+
2. **No package.json for runtime deps** - Use deno.json imports
65+
3. **No node_modules in production** - Deno caches deps automatically
66+
4. **No Go code** - Use Rust instead
67+
5. **No Python anywhere** - Use Julia for data/batch, Rust for systems, ReScript for apps
68+
6. **No Kotlin/Swift for mobile** - Use Tauri 2.0+ or Dioxus
69+
70+
### Package Management
71+
72+
- **Primary**: Guix (guix.scm)
73+
- **Fallback**: Nix (flake.nix)
74+
- **JS deps**: Deno (deno.json imports)
75+
76+
### Security Requirements
77+
78+
- No MD5/SHA1 for security (use SHA256+)
79+
- HTTPS only (no HTTP URLs)
80+
- No hardcoded secrets
81+
- SHA-pinned dependencies
82+
- SPDX license headers on all files
83+

cadre-router/.editorconfig

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# RSR-template-repo - Editor Configuration
2+
# https://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
end_of_line = lf
9+
indent_size = 2
10+
indent_style = space
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
trim_trailing_whitespace = false
16+
17+
[*.adoc]
18+
trim_trailing_whitespace = false
19+
20+
[*.rs]
21+
indent_size = 4
22+
23+
[*.ex]
24+
indent_size = 2
25+
26+
[*.exs]
27+
indent_size = 2
28+
29+
[*.zig]
30+
indent_size = 4
31+
32+
[*.ada]
33+
indent_size = 3
34+
35+
[*.adb]
36+
indent_size = 3
37+
38+
[*.ads]
39+
indent_size = 3
40+
41+
[*.hs]
42+
indent_size = 2
43+
44+
[*.res]
45+
indent_size = 2
46+
47+
[*.resi]
48+
indent_size = 2
49+
50+
[*.ncl]
51+
indent_size = 2
52+
53+
[*.rkt]
54+
indent_size = 2
55+
56+
[*.scm]
57+
indent_size = 2
58+
59+
[*.nix]
60+
indent_size = 2
61+
62+
[Justfile]
63+
indent_style = space
64+
indent_size = 4
65+
66+
[justfile]
67+
indent_style = space
68+
indent_size = 4

cadre-router/.gitattributes

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# SPDX-License-Identifier: AGPL-3.0-or-later
2+
# RSR-compliant .gitattributes
3+
4+
* text=auto eol=lf
5+
6+
# Source
7+
*.rs text eol=lf diff=rust
8+
*.ex text eol=lf diff=elixir
9+
*.exs text eol=lf diff=elixir
10+
*.jl text eol=lf
11+
*.res text eol=lf
12+
*.resi text eol=lf
13+
*.ada text eol=lf diff=ada
14+
*.adb text eol=lf diff=ada
15+
*.ads text eol=lf diff=ada
16+
*.hs text eol=lf
17+
*.chpl text eol=lf
18+
*.scm text eol=lf
19+
*.ncl text eol=lf
20+
*.nix text eol=lf
21+
22+
# Docs
23+
*.md text eol=lf diff=markdown
24+
*.adoc text eol=lf
25+
*.txt text eol=lf
26+
27+
# Data
28+
*.json text eol=lf
29+
*.yaml text eol=lf
30+
*.yml text eol=lf
31+
*.toml text eol=lf
32+
33+
# Config
34+
.gitignore text eol=lf
35+
.gitattributes text eol=lf
36+
justfile text eol=lf
37+
Makefile text eol=lf
38+
Containerfile text eol=lf
39+
40+
# Scripts
41+
*.sh text eol=lf
42+
43+
# Binary
44+
*.png binary
45+
*.jpg binary
46+
*.gif binary
47+
*.pdf binary
48+
*.woff2 binary
49+
*.zip binary
50+
*.gz binary
51+
52+
# Lock files
53+
Cargo.lock text eol=lf -diff
54+
flake.lock text eol=lf -diff

cadre-router/.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: [hyperpolymath]
2+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
version: 2
3+
updates:
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
open-pull-requests-limit: 10
9+
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
name: CodeQL Security Analysis
3+
4+
on:
5+
push:
6+
branches: [main, master]
7+
pull_request:
8+
branches: [main, master]
9+
schedule:
10+
- cron: '0 6 * * 1'
11+
12+
permissions: read-all
13+
14+
jobs:
15+
analyze:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
security-events: write
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
include:
24+
- language: javascript-typescript
25+
build-mode: none
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
30+
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@662472033e021d55d94146f66f6058822b0b39fd # v3.28.1
33+
with:
34+
languages: ${{ matrix.language }}
35+
build-mode: ${{ matrix.build-mode }}
36+
37+
- name: Perform CodeQL Analysis
38+
uses: github/codeql-action/analyze@662472033e021d55d94146f66f6058822b0b39fd # v3.28.1
39+
with:
40+
category: "/language:${{ matrix.language }}"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
name: Guix/Nix Package Policy
3+
on: [push, pull_request]
4+
5+
permissions: read-all
6+
7+
jobs:
8+
check:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
steps:
13+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
14+
- name: Enforce Guix primary / Nix fallback
15+
run: |
16+
# Check for package manager files
17+
HAS_GUIX=$(find . -name "*.scm" -o -name ".guix-channel" -o -name "guix.scm" 2>/dev/null | head -1)
18+
HAS_NIX=$(find . -name "*.nix" 2>/dev/null | head -1)
19+
20+
# Block new package-lock.json, yarn.lock, Gemfile.lock, etc.
21+
NEW_LOCKS=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E 'package-lock\.json|yarn\.lock|Gemfile\.lock|Pipfile\.lock|poetry\.lock|cargo\.lock' || true)
22+
if [ -n "$NEW_LOCKS" ]; then
23+
echo "⚠️ Lock files detected. Prefer Guix manifests for reproducibility."
24+
fi
25+
26+
# Prefer Guix, fallback to Nix
27+
if [ -n "$HAS_GUIX" ]; then
28+
echo "✅ Guix package management detected (primary)"
29+
elif [ -n "$HAS_NIX" ]; then
30+
echo "✅ Nix package management detected (fallback)"
31+
else
32+
echo "ℹ️ Consider adding guix.scm or flake.nix for reproducible builds"
33+
fi
34+
35+
echo "✅ Package policy check passed"

0 commit comments

Comments
 (0)