Skip to content

Commit a144619

Browse files
hyperpolymathclaude
andcommitted
chore(floor-raise): add foundational tool integrations
Add AI manifest, Trustfile, Dustfile, and assail recipe as part of the Floor Raise campaign to establish baseline tooling across all repos. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a52e2e0 commit a144619

12 files changed

Lines changed: 405 additions & 32 deletions
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Dustfile — Cleanup and Hygiene Contract
3+
4+
[dustfile]
5+
version = "1.0.0"
6+
format = "a2ml"
7+
8+
[cleanup]
9+
stale-branch-policy = "delete-after-merge"
10+
artifact-retention = "90-days"
11+
cache-policy = "clear-on-release"
12+
13+
[hygiene]
14+
linting = "required"
15+
formatting = "required"
16+
dead-code-removal = "encouraged"
17+
todo-tracking = "tracked-in-issues"
18+
19+
[reversibility]
20+
backup-before-destructive = true
21+
rollback-mechanism = "git-revert"
22+
data-retention-policy = "preserve-30-days"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Feedback-o-Tron Integration — Autonomous Bug Reporting
3+
4+
[integration]
5+
name = "feedback-o-tron"
6+
type = "bug-reporter"
7+
repository = "https://github.com/hyperpolymath/feedback-o-tron"
8+
9+
[reporting-config]
10+
platforms = ["github", "gitlab", "bugzilla"]
11+
deduplication = true
12+
audit-logging = true
13+
auto-file-upstream = "on-external-dependency-failure"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Proven Integration — Formally Verified Safety Library
3+
4+
[integration]
5+
name = "proven"
6+
type = "safety-library"
7+
repository = "https://github.com/hyperpolymath/proven"
8+
version = "1.2.0"
9+
10+
[binding-policy]
11+
approach = "thin-ffi-wrapper"
12+
unsafe-patterns = "replace-with-proven-equivalent"
13+
modules-available = ["SafeMath", "SafeString", "SafeJSON", "SafeURL", "SafeRegex", "SafeSQL", "SafeFile", "SafeTemplate", "SafeCrypto"]
14+
15+
[adoption-guidance]
16+
priority = "high"
17+
scope = "all-string-json-url-crypto-operations"
18+
migration = "incremental — replace unsafe patterns as encountered"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# VeriSimDB Feed — Cross-Repo Analytics Data Store
3+
4+
[integration]
5+
name = "verisimdb"
6+
type = "data-feed"
7+
repository = "https://github.com/hyperpolymath/nextgen-databases"
8+
data-store = "verisimdb-data"
9+
10+
[feed-config]
11+
emit-scan-results = true
12+
emit-build-metrics = true
13+
emit-dependency-graph = true
14+
format = "hexad"
15+
destination = "verisimdb-data/feeds/"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Vexometer Integration — Irritation Surface Analysis
3+
4+
[integration]
5+
name = "vexometer"
6+
type = "friction-measurement"
7+
repository = "https://github.com/hyperpolymath/vexometer"
8+
9+
[measurement-config]
10+
dimensions = 10
11+
emit-isa-reports = true
12+
lazy-eliminator = true
13+
satellite-interventions = true
14+
15+
[hooks]
16+
cli-tools = "measure-on-error"
17+
ui-panels = "measure-on-interaction"
18+
build-failures = "measure-on-failure"

README.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

boj-unify-repos.sh

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#!/bin/bash
2+
3+
# boj-unify-repos.sh
4+
# Safely attaches repositories to the BoJ Server / Casket build pipeline.
5+
# Replaces legacy Jekyll workflows with the unified boj-build trigger.
6+
7+
WORKSPACE="/var/mnt/eclipse/repos"
8+
9+
find "$WORKSPACE" -maxdepth 2 -name ".git" -type d | while read -r gitdir; do
10+
repo_path=$(dirname "$gitdir")
11+
repo_name=$(basename "$repo_path")
12+
13+
# Skip boj-server itself and scripts
14+
if [ "$repo_name" == "boj-server" ] || [ "$repo_name" == "scripts" ]; then
15+
continue
16+
fi
17+
18+
cd "$repo_path" || continue
19+
20+
# 1. Initialize metadata structure
21+
mkdir -p .machine_readable/{anchors,policies,bot_directives}
22+
23+
# 2. Add the ANCHOR.a2ml if it doesn't exist
24+
if [ ! -f ".machine_readable/anchors/ANCHOR.a2ml" ]; then
25+
cat <<ANCHOR > .machine_readable/anchors/ANCHOR.a2ml
26+
# ⚓ ANCHOR: $repo_name
27+
# This is the canonical authority for the $repo_name repository.
28+
29+
id: "org.hyperpolymath.$repo_name"
30+
version: "1.0.0"
31+
clade: "unknown"
32+
status: "active"
33+
34+
# SSG Configuration (Unified boj-server build)
35+
ssg:
36+
engine: "casket"
37+
output_dir: "public"
38+
boj_trigger: true
39+
cartridge: "ssg-mcp"
40+
41+
# Relationships
42+
parents:
43+
- "org.hyperpolymath.boj-server"
44+
ANCHOR
45+
fi
46+
47+
# 3. Add the unified GitHub Action
48+
mkdir -p .github/workflows
49+
cat <<ACTION > .github/workflows/boj-build.yml
50+
name: BoJ Server Build Trigger
51+
52+
on:
53+
push:
54+
branches: [ main, master ]
55+
workflow_dispatch:
56+
57+
jobs:
58+
trigger-boj:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Checkout
62+
uses: actions/checkout@v4
63+
64+
- name: Trigger BoJ Server (Casket/ssg-mcp)
65+
run: |
66+
# Send a secure trigger to boj-server to build this repository
67+
curl -X POST "http://boj-server.local:7700/cartridges/ssg-mcp/build" \
68+
-H "Content-Type: application/json" \
69+
-d "{\"repo\": \"\${{ github.repository }}\", \"branch\": \"\${{ github.ref_name }}\", \"engine\": \"casket\"}"
70+
continue-on-error: true
71+
ACTION
72+
73+
echo "Unified: $repo_name"
74+
75+
done

check-language-compliance.sh

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
#!/usr/bin/env bash
2+
# SPDX-License-Identifier: PMPL-1.0-or-later
3+
# Check API/ABI/FFI language compliance across repositories
4+
5+
set -euo pipefail
6+
7+
REPOS_BASE="${REPOS_BASE:-/var/mnt/eclipse/repos}"
8+
LOG_FILE="/tmp/language-compliance-$(date +%Y%m%d).log"
9+
10+
echo "=== Language Compliance Check ===" | tee "$LOG_FILE"
11+
echo "Started: $(date)" | tee -a "$LOG_FILE"
12+
echo "" | tee -a "$LOG_FILE"
13+
14+
# Initialize counters
15+
API_VIOLATIONS=0
16+
ABI_VIOLATIONS=0
17+
FFI_VIOLATIONS=0
18+
COMPLIANT_REPOS=0
19+
TOTAL_REPOS=0
20+
21+
# Check a single repository
22+
check_repo() {
23+
local repo_path="$1"
24+
local repo_name="$(basename "$repo_path")"
25+
local violations=0
26+
27+
echo "Checking: $repo_name" | tee -a "$LOG_FILE"
28+
29+
# Check for non-V APIs (exclude internal scripts)
30+
if find "$repo_path" -name "*.ex" -o -name "*.exs" | grep -q .; then
31+
echo " ✓ Elixir found - checking API compliance" | tee -a "$LOG_FILE"
32+
# Elixir repos should use V for external APIs
33+
if [ ! -f "$repo_path/api/vlang" ] && find "$repo_path" -name "*.ex" | head -1 | grep -q .; then
34+
echo " ⚠️ Potential API violation: Elixir repo without V API layer" | tee -a "$LOG_FILE"
35+
((API_VIOLATIONS++))
36+
((violations++))
37+
fi
38+
fi
39+
40+
# Check for non-Idris2 ABIs
41+
if find "$repo_path" -name "*.zig" | grep -q .; then
42+
echo " ✓ Zig found - checking ABI compliance" | tee -a "$LOG_FILE"
43+
# Zig repos should use Idris2 for ABIs
44+
if [ ! -f "$repo_path/abi/idris2" ] && find "$repo_path" -name "*.zig" | head -1 | grep -q .; then
45+
echo " ⚠️ Potential ABI violation: Zig repo without Idris2 ABI layer" | tee -a "$LOG_FILE"
46+
((ABI_VIOLATIONS++))
47+
((violations++))
48+
fi
49+
fi
50+
51+
# Check for non-Zig FFIs
52+
if find "$repo_path" -name "*.c" -o -name "*.h" | grep -q .; then
53+
echo " ⚠️ Potential FFI violation: C headers found" | tee -a "$LOG_FILE"
54+
echo " Should use Zig with C compatibility layer only" | tee -a "$LOG_FILE"
55+
((FFI_VIOLATIONS++))
56+
((violations++))
57+
fi
58+
59+
# Check for proper C compatibility warnings
60+
if grep -r "c_compat" "$repo_path" 2>/dev/null | grep -q .; then
61+
if ! grep -r "compileError.*C.*compatibility" "$repo_path" 2>/dev/null | grep -q .; then
62+
echo " ⚠️ C compatibility without proper warnings" | tee -a "$LOG_FILE"
63+
((FFI_VIOLATIONS++))
64+
((violations++))
65+
fi
66+
fi
67+
68+
if [ $violations -eq 0 ]; then
69+
echo " ✅ Compliant" | tee -a "$LOG_FILE"
70+
((COMPLIANT_REPOS++))
71+
else
72+
echo "$violations violations found" | tee -a "$LOG_FILE"
73+
fi
74+
75+
((TOTAL_REPOS++))
76+
echo "" | tee -a "$LOG_FILE"
77+
}
78+
79+
# Export function for parallel execution
80+
export -f check_repo
81+
export REPOS_BASE
82+
83+
# Find all repositories
84+
echo "Scanning repositories in $REPOS_BASE..." | tee -a "$LOG_FILE"
85+
86+
# Check core repositories first
87+
for repo in hypatia gitbot-fleet ".git-private-farm"; do
88+
if [ -d "$REPOS_BASE/$repo" ]; then
89+
check_repo "$REPOS_BASE/$repo"
90+
fi
91+
done
92+
93+
# Check other repositories in parallel
94+
find "$REPOS_BASE" -maxdepth 1 -type d ! -name "." ! -name ".." ! -name ".git*" ! -name "nextgen-databases" ! -name "developer-ecosystem" | while read -r repo_dir; do
95+
check_repo "$repo_dir"
96+
done
97+
98+
# Summary
99+
echo "" | tee -a "$LOG_FILE"
100+
echo "=== Summary ===" | tee -a "$LOG_FILE"
101+
echo "Total repositories: $TOTAL_REPOS" | tee -a "$LOG_FILE"
102+
echo "Compliant: $COMPLIANT_REPOS" | tee -a "$LOG_FILE"
103+
echo "" | tee -a "$LOG_FILE"
104+
echo "Violations:" | tee -a "$LOG_FILE"
105+
echo " API (non-V): $API_VIOLATIONS" | tee -a "$LOG_FILE"
106+
echo " ABI (non-Idris2): $ABI_VIOLATIONS" | tee -a "$LOG_FILE"
107+
echo " FFI (non-Zig): $FFI_VIOLATIONS" | tee -a "$LOG_FILE"
108+
echo "" | tee -a "$LOG_FILE"
109+
110+
COMPLIANCE_PERCENT=$(( (COMPLIANT_REPOS * 100) / TOTAL_REPOS ))
111+
echo "Compliance: $COMPLIANCE_PERCENT%" | tee -a "$LOG_FILE"
112+
113+
if [ $COMPLIANCE_PERCENT -ge 90 ]; then
114+
echo "Status: ✅ PASSING" | tee -a "$LOG_FILE"
115+
exit 0
116+
elif [ $COMPLIANCE_PERCENT -ge 70 ]; then
117+
echo "Status: ⚠️ WARNING" | tee -a "$LOG_FILE"
118+
exit 1
119+
else
120+
echo "Status: ❌ FAILING" | tee -a "$LOG_FILE"
121+
exit 2
122+
fi

cleanup-git-branches.sh

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/bin/bash
2+
3+
# cleanup-git-branches.sh
4+
# Safely prunes and deletes merged branches across all repositories in the workspace.
5+
# Excludes protected branches: main, master, gh-pages, and branches containing 'docs'.
6+
7+
WORKSPACE="/var/mnt/eclipse/repos"
8+
PROTECTED_PATTERN="^(main|master|gh-pages|.*docs.*)$"
9+
REMOTE_EXCLUDE_PATTERN="^(origin/HEAD|origin/main|origin/master|origin/gh-pages|.*docs.*)$"
10+
11+
echo "Starting workspace-wide Git branch cleanup..."
12+
13+
find "$WORKSPACE" -maxdepth 2 -name ".git" -type d | while read -r gitdir; do
14+
repo_path=$(dirname "$gitdir")
15+
repo_name=$(basename "$repo_path")
16+
cd "$repo_path" || continue
17+
18+
echo "--- Checking $repo_name ---"
19+
20+
# 1. Sync remote metadata and prune deleted tracking branches
21+
# This fixes "broken ref" warnings.
22+
git fetch origin --prune >/dev/null 2>&1
23+
24+
# 2. Determine default branch
25+
main_branch=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
26+
[ -z "$main_branch" ] && main_branch=$(git branch --list main master | head -n 1 | sed 's/* //')
27+
[ -z "$main_branch" ] && main_branch="main"
28+
29+
# 3. Cleanup LOCAL merged branches
30+
# grep -Ev filters out the current branch (*), the default branch, and protected branches.
31+
merged_locals=$(git branch --merged "$main_branch" | grep -v "^\*" | grep -Ev "$PROTECTED_PATTERN" | tr -d ' ')
32+
33+
if [ -n "$merged_locals" ]; then
34+
for branch in $merged_locals; do
35+
echo " Deleting merged local branch: $branch"
36+
git branch -d "$branch" >/dev/null 2>&1
37+
done
38+
fi
39+
40+
# 4. Cleanup REMOTE merged branches (optional/safe mode)
41+
# We only delete remote branches that have been merged into origin/main.
42+
merged_remotes=$(git branch -r --merged "origin/$main_branch" | grep "origin/" | grep -Ev "$REMOTE_EXCLUDE_PATTERN" | sed 's/origin\///' | tr -d ' ')
43+
44+
if [ -n "$merged_remotes" ]; then
45+
for branch in $merged_remotes; do
46+
# Only delete if it's clearly a personal feature branch (optional)
47+
echo " Note: Remote branch '$branch' is merged on GitHub. (Skipping auto-delete for safety)."
48+
done
49+
fi
50+
51+
done
52+
53+
echo "Cleanup complete."

0 commit comments

Comments
 (0)