Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
34b41fc
feat(compiler): add GF16-native Rust codegen backend to meta_compile …
gHashTag Apr 18, 2026
66d93b5
fix(build): restore bridge.rs, fix allowlist + clippy + gf4 stub
gHashTag Apr 21, 2026
04cf728
fix(parser): handle ColonColon token in use-path + emit const as loca…
gHashTag Apr 21, 2026
b1d6145
chore: clippy auto-fix — 328 → 282 warnings (no logic changes)
gHashTag Apr 21, 2026
db770a5
fix(ci): resolve 6 workflow failures — merge conflicts, jq syntax, L1…
gHashTag Apr 21, 2026
a35fa78
feat: FPGA VSA acceleration + PhD chapters (Closes #305)
gHashTag May 5, 2026
714fb98
feat(fpga): working phi-heartbeat + GF16 dot4 on XC7A100T via openXC7…
gHashTag May 9, 2026
bee6826
feat(depin): L-TRI-1 POST /prove endpoint + phi-challenge PoUC
gHashTag May 9, 2026
08a8505
feat(depin): GET /epoch-challenge + Ed25519 signature verification
gHashTag May 9, 2026
fd0b576
feat(depin): G-TRI-3 adversarial tests — phi-challenge spoofing impos…
gHashTag May 9, 2026
3707ce3
feat(solana): L-TRI-2 Anchor mining program — PoUC on-chain
gHashTag May 9, 2026
cb7d6c4
feat(depin): merkle proof validation + Solana 3-node test
gHashTag May 10, 2026
4997342
feat(fpga): synthesized bitstream + igla weights for XC7A100T
gHashTag May 10, 2026
2234603
feat(depin): L-TRI-3 V2 phi-challenge — 16x16 GF16 matmul + adversari…
gHashTag May 10, 2026
4d969ec
hw: DSLogic JTAG diagnostics configs + UART bench template
gHashTag May 10, 2026
189c5cd
feat(fpga): DLC-10 STATUS read + XC7A100T verified on silicon
gHashTag May 10, 2026
120327d
feat(fpga): tri fpga CLI + SPI flash constraints
gHashTag May 10, 2026
016f65f
feat(bridge): trios-bridge remote access binary + Cloudflare tunnel
gHashTag May 10, 2026
abb4edb
feat(fpga): flash-spi Rust binary for persistent SPI flash + remove p…
May 10, 2026
9231d05
feat(dlc10): pure-Rust driver for Xilinx Platform Cable USB II + SPI …
gHashTag May 14, 2026
8bf8434
fix(l3): English NOW.md line 18 + allowlist tri-language-core.md
May 14, 2026
4a4db70
fix(bootstrap): resolve 8 compile errors from cherry-pick incompat
May 14, 2026
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
40 changes: 22 additions & 18 deletions .claude/hooks/check-l1-traceability.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
#!/bin/bash
# L1 Traceability Check - Ensures commits reference issues
# L1: "No code merged without `Closes #N`"

#!/usr/bin/env bash
# L1 TRACEABILITY gate — thin forwarder to the Rust implementation.
#
# Real logic lives in `cli/tri` (`tri hooks l1-check`). This file exists
# only so that pre-existing harness wiring that exec's the .sh path keeps
# working. Do not add logic here — edit `cli/tri/src/hooks.rs` instead.
set -euo pipefail

# Get last commit message
COMMIT_MSG=$(git log -1 --pretty=%B HEAD)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"

# Check for issue reference pattern
if ! echo "$COMMIT_MSG" | grep -qE "Closes #|Fixes #|Resolves #|Reference #"; then
for p in \
"$REPO_ROOT/target/release/tri" \
"$REPO_ROOT/target/debug/tri" \
; do
if [[ -x "$p" ]]; then
exec "$p" hooks l1-check
fi
done

# Fallback if the Rust binary is not yet built (e.g. fresh clone).
COMMIT_MSG=$(git log -1 --pretty=%B HEAD)
if ! echo "$COMMIT_MSG" | grep -qE "(Closes|Fixes|Resolves|Reference) #[0-9]+"; then
echo "L1 VIOLATION: Commit missing issue reference"
echo "Commit message: $COMMIT_MSG"
echo "Required pattern: Closes #N, Fixes #N, etc."
echo "Required pattern: Closes #N | Fixes #N | Resolves #N | Reference #N"
exit 1
fi

# Check for issue number after pattern
ISSUE_NUM=$(echo "$COMMIT_MSG" | grep -oE "#[0-9]+" | head -1)
if [ -z "$ISSUE_NUM" ]; then
echo "L1 VIOLATION: No issue number found"
exit 1
fi

echo "L1 PASSED: Issue #$ISSUE_NUM referenced"
exit 0
echo "L1 PASSED: Issue $ISSUE_NUM referenced"
84 changes: 84 additions & 0 deletions .claude/mcp/tri-ssot/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
{
"name": "tri-ssot",
"description": "SSOT Integration for t27: GitHub Issues + PRs + Documentation → NotebookLM",
"version": "1.0.0",
"executable": {
"command": "python3",
"args": ["-m", "contrib.backend.github.mcp_server"]
},
"tools": [
{
"name": "tri_issue",
"description": "GitHub Issue management: create, update, list, close",
"inputSchema": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": ["create", "update", "list", "close", "get"]
},
"title": {"type": "string"},
"body": {"type": "string"},
"labels": {"type": "string"},
"issue_id": {"type": "string"},
"state": {"type": "string", "enum": ["open", "in_progress", "closed"]}
}
}
},
{
"name": "tri_pr",
"description": "GitHub PR management: create, merge, close, get status",
"inputSchema": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": ["create", "merge", "close", "get"]
},
"title": {"type": "string"},
"body": {"type": "string"},
"pr_id": {"type": "string"},
"issue_id": {"type": "string"}
}
}
},
{
"name": "tri_docs",
"description": "Documentation management: upload to NotebookLM, sync, query",
"inputSchema": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": ["upload", "sync", "query"]
},
"file_path": {"type": "string"},
"title": {"type": "string"}
}
}
},
{
"name": "tri_sync",
"description": "Unified sync: sync all entities (issues, prs, docs) with NotebookLM",
"inputSchema": {
"type": "object",
"properties": {
"scope": {
"type": "string",
"enum": ["all", "issues", "prs", "docs"]
}
}
}
},
{
"name": "tri_search",
"description": "Unified search across GitHub Issues, PRs, NotebookLM docs",
"inputSchema": {
"type": "object",
"properties": {
"query": {"type": "string"}
}
}
}
]
}
73 changes: 73 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/usr/bin/env bash
# Gate: NOW.md must be updated today before any commit.
# Plus: NotebookLM continuous sync integration.
# Pipeline entry: ./scripts/tri check-now → t27c check-now (Rust; see tests/OWNERS.md).
set -euo pipefail

ROOT="$(git rev-parse --show-toplevel)"
cd "$ROOT"

# ===== NOW.md Gate =====
bash "$ROOT/scripts/tri" check-now

if ! git diff --cached --name-only | grep -q '^NOW.md$'; then
if git diff --name-only | grep -q '^NOW.md$'; then
echo ""
echo "⚠️ WARNING: NOW.md is modified but NOT staged."
echo " Run: git add NOW.md"
echo " Or: stage and commit NOW.md together with your changes."
echo ""
fi
fi

echo "✅ NOW.md gate passed"

# ===== NotebookLM Continuous Sync =====
# Track commits for periodic activity.md sync

COMMITS_FILE="$ROOT/.trinity/notebook_commit_count"
SYNC_INTERVAL=3 # Sync every 3 commits

# Initialize commit counter
if [ ! -f "$COMMITS_FILE" ]; then
mkdir -p "$(dirname "$COMMITS_FILE")"
echo "0" > "$COMMITS_FILE"
fi

# Increment counter
COMMIT_COUNT=$(cat "$COMMITS_FILE")
COMMIT_COUNT=$((COMMIT_COUNT + 1))
echo "$COMMIT_COUNT" > "$COMMITS_FILE"

# Check for .t27 file changes
SPEC_CHANGED=0
if git diff --cached --name-only | grep -q '\.t27$'; then
SPEC_CHANGED=1
fi

# Extract issue number from branch name for targeted sync
BRANCH_NAME=$(git branch --show-current)
ISSUE_NUM=$(echo "$BRANCH_NAME" | grep -oE '(issue-|#)?[0-9]+' | head -1 | tr -d 'issue-#' || echo "")

# Run sync on interval or spec change
if [ $((COMMIT_COUNT % SYNC_INTERVAL)) -eq 0 ] || [ "$SPEC_CHANGED" -eq 1 ]; then
echo "📊 NotebookLM sync: uploading activity.md..."

# Run async in background to not block commit
(
if [ -n "$ISSUE_NUM" ]; then
python3.10 "$ROOT/contrib/backend/notebooklm/sync.py" \
--issue "$ISSUE_NUM" --event push >/dev/null 2>&1 || true
fi
python3.10 "$ROOT/contrib/backend/notebooklm/sync.py" \
--activity >/dev/null 2>&1 || true
) &

echo " Background sync started (commit #$COMMIT_COUNT)"
fi

if [ "$SPEC_CHANGED" -eq 1 ]; then
echo " ⚠️ .t27 files changed — notebook sources will update"
fi

echo "✅ Pre-commit complete — proceed"
127 changes: 127 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# GitHub CODEOWNERS — native syntax for PR reviewer routing
# See root OWNERS.md for constitutional ownership hierarchy

# ============================================================================
# REPOSITORY LEVEL
# ============================================================================

* @gHashTag # Default owner for all paths

# Root policy documents (A-Architect domain)
README.md @gHashTag
SOUL.md @gHashTag
AGENTS.md @gHashTag
TASK.md @gHashTag
CLAUDE.md @gHashTag
OWNERS.md @gHashTag
CONTRIBUTING.md @gHashTag
SECURITY.md @gHashTag
NOW.md @gHashTag

# ============================================================================
# DIRECTORIES
# ============================================================================

# Core specs — source of truth
/specs/ @gHashTag

# Bootstrap compiler (Rust)
/bootstrap/ @gHashTag

# Generated code (L2: do not hand-edit)
/gen/ @gHashTag

# Conformance vectors
/conformance/ @gHashTag

# Architecture docs
/OWNERS.md @gHashTag
/OWNERS.md @gHashTag

# Compiler frontends
/compiler/ @gHashTag

# FFI layer
/ffi/ @gHashTag

# Bindings
/bindings/ @gHashTag

# Tests and benchmarks
/tests/ @gHashTag
/benchmarks/ @gHashTag

# Coq proofs
/coq/ @gHashTag

# Research papers
/research/ @gHashTag
/neurips/ @gHashTag

# Documentation
/docs/ @gHashTag

# GitHub workflows and CI
.github/workflows/ @gHashTag

# Git hooks
.githooks/ @gHashTag

# Scripts
/scripts/ @gHashTag

# External/vendored code
/external/ @gHashTag

# ============================================================================
# SPECIFIC DOMAINS
# ============================================================================

# AR (CLARA Argumentation & Reasoning)
/specs/ar/ @gHashTag

# Neural Network components
/specs/nn/ @gHashTag

# FPGA/Hardware
/specs/fpga/ @gHashTag
/specs/isa/ @gHashTag

# Queen orchestration
/specs/queen/ @gHashTag

# VSA (Vector Symbolic Architecture)
/specs/vsa/ @gHashTag

# Compiler self-spec
/specs/compiler/ @gHashTag

# Numeric (GoldenFloat, TF3, phi)
/specs/numeric/ @gHashTag
/specs/math/ @gHashTag

# Base types and ops
/specs/base/ @gHashTag

# ============================================================================
# GENERATED FILES (always auto-assigned to default owner)
# ============================================================================

# Generated output should rarely need review beyond spec changes
/gen/** @gHashTag
/gen/** @gHashTag

# ============================================================================
# CONFIGURATION
# ============================================================================

# Docker, Railway, deployment
Dockerfile @gHashTag
railway.toml @gHashTag

# Zenodo publishing
.zenodo.json @gHashTag

# Cargo workspace
Cargo.toml @gHashTag
Cargo.lock @gHashTag
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/audit_task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Audit task
about: Repro bundle, release certification, external-review pack
title: "[audit] "
labels: ["audit-task", "phi-loop"]
---

## Goal

## Why this matters

## Source of truth
<!-- `docs/EXTERNAL_AUDIT_PACKAGE.md`, `docs/PUBLICATION_AUDIT.md` -->

## Deliverable

## Done when

## How to verify

## Risks

## Links
28 changes: 28 additions & 0 deletions .github/ISSUE_TEMPLATE/backend_task.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
name: Backend task
about: Zig / C / Verilog codegen or `t27c` bootstrap change
title: "[backend] "
labels: ["backend-task", "phi-loop"]
---

## Goal

## Why this matters

## Source of truth
<!-- spec path + docs/BACKEND_CONTRACT.md section -->

## Deliverable

## Done when

## How to verify
```bash
cd bootstrap && cargo test
bash tests/run_all.sh
```

## Risks
<!-- FROZEN_HASH / M5 if touching compiler core -->

## Links
Loading
Loading