Skip to content

Commit 905a61b

Browse files
Jonathan D.A. Jewellclaude
andcommitted
docs: update SCM files with actual project state
- STATE.scm: Add components, working features, milestones, blockers - META.scm: Add 5 ADRs (eBPF, SQL AST, BLAKE3, Rust-first, Nebula) - ECOSYSTEM.scm: Add related projects and ecosystem relationships Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent a0103f8 commit 905a61b

3 files changed

Lines changed: 201 additions & 28 deletions

File tree

ECOSYSTEM.scm

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,60 @@
11
;; SPDX-License-Identifier: PMPL-1.0
2+
;; SPDX-FileCopyrightText: 2025 Jonathan D. A. Jewell <hyperpolymath>
3+
;;
24
;; ECOSYSTEM.scm - Project relationship mapping
5+
;; Media-Type: application/vnd.ecosystem+scm
36

47
(ecosystem
58
(version "1.0")
69
(name "project-wharf")
7-
(type "project")
8-
(purpose "image:https://img.shields.io/badge/license-Palimpsest--MPL--1.0-purple.svg[Palim")
10+
(type "security-infrastructure")
11+
(purpose "Sovereign web hypervisor providing database virtual sharding and file integrity for CMS platforms")
912

1013
(position-in-ecosystem
11-
(role "component")
12-
(layer "application")
13-
(description "image:https://img.shields.io/badge/license-Palimpsest--MPL--1.0-purple.svg[Palim"))
14+
(role "security-layer")
15+
(layer "infrastructure")
16+
(description "Sits between web application and database/filesystem, enforcing security zones and integrity constraints"))
1417

15-
(related-projects . ())
18+
(related-projects
19+
((nebula
20+
((relationship . "integration-target")
21+
(description . "Mesh VPN for Mooring protocol between Wharf controller and Yacht agents")
22+
(url . "https://github.com/slackhq/nebula")))
23+
24+
(wordpress
25+
((relationship . "primary-consumer")
26+
(description . "Initial target CMS platform for database virtual sharding")
27+
(url . "https://wordpress.org")))
28+
29+
(aya-rs
30+
((relationship . "dependency")
31+
(description . "Rust eBPF library for XDP firewall implementation")
32+
(url . "https://github.com/aya-rs/aya")))
33+
34+
(sqlparser-rs
35+
((relationship . "dependency")
36+
(description . "SQL parsing for policy engine AST analysis")
37+
(url . "https://github.com/sqlparser-rs/sqlparser-rs")))
38+
39+
(januskey
40+
((relationship . "sibling-project")
41+
(description . "Hardware security key standard - potential integration for Mooring authentication")
42+
(url . "https://github.com/hyperpolymath/januskey")))
43+
44+
(bunsenite
45+
((relationship . "sibling-project")
46+
(description . "Configuration language - could provide Nickel-based policy definitions")
47+
(url . "https://github.com/hyperpolymath/bunsenite")))))
1648

1749
(what-this-is
18-
"image:https://img.shields.io/badge/license-Palimpsest--MPL--1.0-purple.svg[Palim")
50+
("A security layer between CMS applications and their databases")
51+
("Database virtual sharding using SQL AST analysis")
52+
("File integrity verification with BLAKE3 manifests")
53+
("Offline controller (Wharf) + online agent (Yacht) architecture")
54+
("eBPF XDP packet filtering with nftables fallback"))
1955

20-
(what-this-is-not . ()))
56+
(what-this-is-not
57+
("A replacement for database replication")
58+
("A web application firewall (WAF)")
59+
("A full CMS platform")
60+
("A general-purpose database proxy")))

META.scm

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,79 @@
11
;; SPDX-License-Identifier: PMPL-1.0
2+
;; SPDX-FileCopyrightText: 2025 Jonathan D. A. Jewell <hyperpolymath>
3+
;;
24
;; META.scm - Project metadata and architectural decisions
5+
;; Schema: hyperpolymath/META-FORMAT-SPEC v1.0
36

47
(define project-meta
58
`((version . "1.0.0")
6-
(architecture-decisions . ())
9+
10+
(architecture-decisions
11+
((adr-001
12+
((title . "Use eBPF XDP for packet filtering with nftables fallback")
13+
(status . "accepted")
14+
(date . "2025-01-01")
15+
(context . "Need kernel-level packet filtering for security. Not all systems support eBPF.")
16+
(decision . "Implement XDP-based firewall using aya-bpf, with automatic nftables fallback for non-eBPF systems")
17+
(consequences . ("Maximum performance on modern kernels"
18+
"Broader compatibility via fallback"
19+
"Two code paths to maintain"))))
20+
21+
(adr-002
22+
((title . "SQL AST-based policy enforcement")
23+
(status . "accepted")
24+
(date . "2025-01-01")
25+
(context . "Need to classify database queries into security zones without regex pattern matching")
26+
(decision . "Use sqlparser-rs to parse SQL into AST, then analyze table references and operation types")
27+
(consequences . ("Accurate query classification"
28+
"Dialect-aware parsing (MySQL, PostgreSQL)"
29+
"Performance overhead for AST parsing"))))
30+
31+
(adr-003
32+
((title . "BLAKE3 for file integrity")
33+
(status . "accepted")
34+
(date . "2025-01-01")
35+
(context . "Need fast, secure hashing for file integrity manifests")
36+
(decision . "Use BLAKE3 instead of SHA-256 for integrity checksums")
37+
(consequences . ("10x faster than SHA-256"
38+
"Modern cryptographic security"
39+
"Less widespread tooling support"))))
40+
41+
(adr-004
42+
((title . "Rust-first architecture")
43+
(status . "accepted")
44+
(date . "2025-01-01")
45+
(context . "Security-critical system needs memory safety and performance")
46+
(decision . "Write all components in Rust (wharf-core, yacht-agent, wharf-cli, wharf-ebpf)")
47+
(consequences . ("Memory safety without GC"
48+
"Single language across stack"
49+
"Steeper learning curve"))))
50+
51+
(adr-005
52+
((title . "Nebula mesh VPN for Mooring")
53+
(status . "proposed")
54+
(date . "2025-01-10")
55+
(context . "Wharf (offline) and Yacht (online) need secure communication channel")
56+
(decision . "Use Nebula overlay network for Mooring protocol between controller and agents")
57+
(consequences . ("End-to-end encryption"
58+
"NAT traversal capability"
59+
"Certificate-based identity"))))))
60+
761
(development-practices
8-
((code-style . "standard")
62+
((code-style . "rustfmt + clippy")
963
(security . "openssf-scorecard")
64+
(testing . "cargo-test + cargo-fuzz")
1065
(versioning . "semver")
1166
(documentation . "asciidoc")
12-
(branching . "trunk-based")))
13-
(design-rationale . ())))
67+
(branching . "trunk-based")
68+
(ci-cd . "github-actions")
69+
(licensing . "PMPL-1.0")))
70+
71+
(design-rationale
72+
((why-database-virtual-sharding
73+
"CMS platforms like WordPress mix user content with admin config in shared databases. Virtual sharding enforces zone separation at the SQL level without schema changes.")
74+
(why-offline-online-split
75+
"Separating the controller (Wharf) from runtime (Yacht) allows air-gapped administration. Changes only sync during explicit Mooring sessions.")
76+
(why-ebpf-over-iptables
77+
"eBPF XDP processes packets before they enter the network stack, providing lower latency and higher throughput than iptables/nftables.")
78+
(why-blake3-over-sha256
79+
"BLAKE3 is SIMD-optimized and 10x faster than SHA-256 while providing equivalent security. Critical for large file manifests.")))))

STATE.scm

Lines changed: 83 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,101 @@
11
;; SPDX-License-Identifier: PMPL-1.0
2-
;; STATE.scm - Current project state
2+
;; SPDX-FileCopyrightText: 2025 Jonathan D. A. Jewell <hyperpolymath>
3+
;;
4+
;; STATE.scm - Project Wharf State Tracking
5+
;; Schema: hyperpolymath/state.scm v1.0
36

47
(define project-state
58
`((metadata
69
((version . "1.0.0")
710
(schema-version . "1")
8-
(created . "2026-01-10T13:50:29+00:00")
9-
(updated . "2026-01-10T13:50:29+00:00")
11+
(created . "2025-01-10T13:50:29+00:00")
12+
(updated . "2025-01-12T04:45:00+00:00")
1013
(project . "project-wharf")
11-
(repo . "project-wharf")))
14+
(repo . "https://github.com/hyperpolymath/project-wharf")))
15+
16+
(project-context
17+
((name . "Project Wharf")
18+
(tagline . "Sovereign Web Hypervisor - Database Virtual Sharding")
19+
(tech-stack . (rust aya-ebpf sqlparser blake3 tokio axum))))
1220

1321
(current-position
14-
((phase . "Active Development")
15-
(overall-completion . 50)
16-
(working-features . ())))
22+
((phase . "Alpha Development")
23+
(overall-completion . 45)
24+
(components
25+
((wharf-core
26+
((status . "functional")
27+
(completion . 60)
28+
(notes . "PolicyEngine, IntegrityChecker, SyncManager implemented")))
29+
(yacht-agent
30+
((status . "in-progress")
31+
(completion . 40)
32+
(notes . "DB proxy, API endpoints, eBPF loader ready")))
33+
(wharf-cli
34+
((status . "in-progress")
35+
(completion . 35)
36+
(notes . "Basic commands implemented")))
37+
(wharf-ebpf
38+
((status . "planned")
39+
(completion . 10)
40+
(notes . "XDP shield spec ready")))))
41+
(working-features
42+
("Database virtual sharding policy engine"
43+
"SQL AST parsing for zone classification"
44+
"BLAKE3 file integrity manifests"
45+
"eBPF XDP firewall loader (userspace)"
46+
"rsync-based file synchronization"))))
1747

1848
(route-to-mvp
1949
((milestones
20-
((v1.0 . ((items . ("Initial setup" "Core functionality"))
21-
(status . "in-progress")))))))
50+
((core-hardening
51+
((target-completion . 70)
52+
(items . ("Complete nftables fallback"
53+
"Wire integrity ops in CLI"
54+
"Add configuration file support"))
55+
(status . "in-progress")))
56+
(nebula-integration
57+
((target-completion . 85)
58+
(items . ("Implement Mooring protocol"
59+
"Nebula mesh VPN coordination"
60+
"Certificate management"))
61+
(status . "pending")))
62+
(production-ready
63+
((target-completion . 100)
64+
(items . ("Performance optimization"
65+
"Comprehensive test suite"
66+
"Documentation and examples"))
67+
(status . "pending")))))))
2268

2369
(blockers-and-issues
2470
((critical . ())
25-
(high . ())
26-
(medium . ())
27-
(low . ())))
71+
(high . ("eBPF kernel-side shield not implemented"
72+
"nftables fallback incomplete"))
73+
(medium . ("CLI integrity commands not wired"
74+
"No configuration file support"))
75+
(low . ("Some unused function warnings in wharf-cli"))))
2876

2977
(critical-next-actions
30-
((immediate . ())
31-
(this-week . ())
32-
(this-month . ())))
78+
((immediate . ("Add META.scm and ECOSYSTEM.scm"
79+
"Set up ClusterFuzzLite fuzzing"))
80+
(this-week . ("Implement nftables fallback firewall"
81+
"Wire integrity commands in CLI"))
82+
(this-month . ("Complete eBPF kernel-side XDP shield"
83+
"Begin Nebula mesh integration"))))
84+
85+
(session-history
86+
(((timestamp . "2025-01-12T04:45:00Z")
87+
(session-id . "security-and-cleanup")
88+
(accomplishments
89+
("Fixed SPDX headers across all workflow files"
90+
"Fixed compiler warnings in wharf-core and yacht-agent"
91+
"Deleted duplicate rust.yml workflow"
92+
"Updated STATE.scm with actual project state")))))))
93+
94+
;; Helper functions
95+
(define (get-completion-percentage state)
96+
(cdr (assoc 'overall-completion
97+
(cdr (assoc 'current-position (cdr state))))))
3398

34-
(session-history . ())))
99+
(define (get-blockers state priority)
100+
(cdr (assoc priority
101+
(cdr (assoc 'blockers-and-issues (cdr state))))))

0 commit comments

Comments
 (0)