Skip to content

Commit 6ec8a3c

Browse files
Jonathan D.A. Jewellclaude
andcommitted
feat: consolidate flatracoon-netstack and flatracoon-os into flatracoon monorepo
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0 parents  commit 6ec8a3c

174 files changed

Lines changed: 16670 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.

README.adoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
= flatracoon
2+
// SPDX-License-Identifier: PMPL-1.0-or-later
3+
:author: Jonathan D.A. Jewell <jonathan.jewell@open.ac.uk>
4+
5+
Flatracoon operating system and networking stack.
6+
7+
== Components
8+
9+
* `netstack/` - Network stack implementation
10+
* `os/` - Operating system core
11+
12+
== License
13+
14+
PMPL-1.0-or-later

netstack/.claude/CLAUDE.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# CLAUDE.md - AI Assistant Instructions
2+
3+
## Machine-Readable Artefacts
4+
5+
The following files in `.machine_readable/` contain structured project metadata:
6+
7+
- `STATE.scm` - Current project state and progress
8+
- `META.scm` - Architecture decisions and development practices
9+
- `ECOSYSTEM.scm` - Position in the ecosystem and related projects
10+
- `AGENTIC.scm` - AI agent interaction patterns
11+
- `NEUROSYM.scm` - Neurosymbolic integration config
12+
- `PLAYBOOK.scm` - Operational runbook
13+
14+
## Language Policy
15+
16+
See hyperpolymath/mustfile for the standard language policy.

netstack/.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

netstack/.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

netstack/.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+

netstack/.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SPDX-License-Identifier: MPL-2.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+

netstack/.github/workflows/ci.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# SPDX-License-Identifier: MPL-2.0-or-later
2+
# SPDX-FileCopyrightText: 2025 Hyperpolymath <hyperpolymath@proton.me>
3+
name: CI
4+
5+
on:
6+
push:
7+
branches: [main]
8+
pull_request:
9+
branches: [main]
10+
11+
permissions: read-all
12+
13+
jobs:
14+
validate-configs:
15+
name: Validate Nickel Configurations
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
20+
with:
21+
submodules: recursive
22+
23+
- name: Install Nickel
24+
run: |
25+
curl -sSL https://github.com/tweag/nickel/releases/latest/download/nickel-x86_64-linux -o nickel
26+
chmod +x nickel
27+
sudo mv nickel /usr/local/bin/
28+
29+
- name: Validate configurations
30+
run: |
31+
nickel export configs/base.ncl > /dev/null
32+
nickel export configs/modules.ncl > /dev/null
33+
nickel export configs/environments.ncl > /dev/null
34+
echo "✓ All Nickel configurations valid"
35+
36+
lint-spdx:
37+
name: Validate SPDX Headers
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout
41+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
42+
43+
- name: Check SPDX headers
44+
run: |
45+
missing=0
46+
for file in $(find . -type f \( -name "*.ncl" -o -name "*.ex" -o -name "*.exs" -o -name "*.res" -o -name "*.ada" -o -name "*.adb" -o -name "*.ads" -o -name "*.sh" \) -not -path "./.git/*" -not -path "./modules/*"); do
47+
if ! head -5 "$file" | grep -q "SPDX-License-Identifier"; then
48+
echo "Missing SPDX header: $file"
49+
missing=$((missing + 1))
50+
fi
51+
done
52+
if [ $missing -gt 0 ]; then
53+
echo "::error::$missing files missing SPDX headers"
54+
exit 1
55+
fi
56+
echo "✓ All files have SPDX headers"
57+
58+
lint-shell:
59+
name: Lint Shell Scripts
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Checkout
63+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
64+
65+
- name: Run ShellCheck
66+
run: |
67+
find . -name "*.sh" -not -path "./.git/*" -not -path "./modules/*" -exec shellcheck {} \;
68+
69+
security-scan:
70+
name: Security Scan
71+
runs-on: ubuntu-latest
72+
steps:
73+
- name: Checkout
74+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
75+
76+
- name: Run Trufflehog
77+
uses: trufflesecurity/trufflehog@8a8ef8526528d8a4ff3e2c90be08e25ef8efbd9b # v3
78+
with:
79+
extra_args: --only-verified
80+
81+
check-links:
82+
name: Check Documentation Links
83+
runs-on: ubuntu-latest
84+
steps:
85+
- name: Checkout
86+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v4
87+
88+
- name: Link Checker
89+
uses: lycheeverse/lychee-action@v2.7.0
90+
with:
91+
args: --verbose --no-progress '**/*.md' '**/*.adoc'
92+
fail: true
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# SPDX-License-Identifier: MPL-2.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+
language: ['actions']
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v3.28.1
31+
with:
32+
languages: ${{ matrix.language }}
33+
34+
- name: Perform CodeQL Analysis
35+
uses: github/codeql-action/analyze@cdefb33c0f6224e58673d9004f47f7cb3e328b89 # v3.28.1
36+
with:
37+
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: MPL-2.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@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
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)