Skip to content

Documentation Reconciliation System - Automatically reconcile, deduplicate, and resolve conflicts in Git repository documentation using content-addressable storage and graph-based conflict resolution.

License

Notifications You must be signed in to change notification settings

hyperpolymath/recon-silly-ation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

recon-silly-ation

Documentation Reconciliation System - Automatically reconcile, deduplicate, and resolve conflicts in Git repository documentation using content-addressable storage and graph-based conflict resolution.

CI License Deno WASM

Features

WASM Acceleration - Rust-powered WebAssembly for high-performance hashing
🦕 Deno Runtime - Secure, modern TypeScript/JavaScript runtime
🚀 Content-Addressable Storage - SHA-256 hashing for automatic deduplication
🤖 Auto-Resolution - Confidence-scored conflict resolution (>0.9 auto-applies)
📊 Graph Database - ArangoDB for multi-model storage and traversal
🔄 Idempotent Pipeline - Rerunnable 7-stage reconciliation process
🧠 Logical Inference - miniKanren/Datalog-style cross-document reasoning
🛡️ Schema Validation - Haskell bridge for type-safe validation
🤖 LLM Integration - Auto-generate docs with guardrails (always requires approval)
⚠️ CCCP Compliance - Python detection with ReScript/Deno migration suggestions
📈 Visualization - DOT/Mermaid graph generation
📦 Podman Ready - Containerized deployment with Podman

Quick Start

Installation

# Clone repository
git clone https://github.com/Hyperpolymath/recon-silly-ation.git
cd recon-silly-ation

# Install Deno (if not already installed)
curl -fsSL https://deno.land/install.sh | sh

# Build WASM modules (requires Rust)
deno task build:wasm

# Build ReScript code
deno task build

Basic Usage

# Scan a repository
deno run --allow-all src/main.ts scan --repo /path/to/repo

# With custom ArangoDB
deno run --allow-all src/main.ts scan \
  --repo /path/to/repo \
  --arango-url http://localhost:8529 \
  --arango-db reconciliation

# Run in daemon mode (continuous scanning)
deno run --allow-all src/main.ts daemon \
  --repo /path/to/repo \
  --interval 300

AOT Compilation

Compile to standalone binary (no Deno runtime needed):

# Compile with WASM acceleration
deno task compile:aot

# Run compiled binary
./bin/recon-silly-ation-aot scan --repo /path/to/repo

Using Just

# Setup development environment
just dev-setup

# Scan a repository
just scan /path/to/repo

# Run with local ArangoDB
just dev-run /path/to/repo

# Run tests
just test

# Compile AOT binary
just compile

Podman Deployment

# Build container with Podman
podman build -t recon-silly-ation:latest -f Containerfile .

# Full stack (ReScript + ArangoDB + WASM)
podman-compose up

# Run scan
podman run --rm \
  -v /my/repo:/workspace:ro \
  recon-silly-ation:latest scan --repo /workspace

Architecture

Pipeline Stages

Scan → Normalize → Deduplicate → Detect → Resolve → Ingest → Report

Each stage is idempotent and can be rerun safely.

Core Guarantees

  1. Zero Duplicates - Content hashing ensures no duplicate content

  2. Always Latest - Temporal ordering + semver ensures most recent versions

  3. Auto-Resolution - High-confidence (>0.9) conflicts resolved automatically

  4. Minimal Manual Input - Smart inference reduces human intervention

  5. WASM Performance - Critical operations run in compiled WebAssembly

Technology Stack

  • Deno - Secure TypeScript/JavaScript runtime

  • ReScript - Type-safe functional programming

  • Rust/WASM - High-performance compiled modules

  • ArangoDB - Multi-model graph database

  • Haskell - Schema validation bridge

  • Podman - Containerized deployment

Documentation Types Supported

Type Supported

README

LICENSE

SECURITY

CONTRIBUTING

CODE_OF_CONDUCT

FUNDING

CITATION

CHANGELOG

AUTHORS

SUPPORT

Resolution Rules

Rule Confidence Description

duplicate-keep-latest

1.0

Keep most recent for exact duplicates

funding-yaml-canonical

0.98

FUNDING.yml is authoritative

license-file-canonical

0.95

LICENSE file is authoritative

explicit-canonical

1.0

Explicitly marked canonical wins

keep-highest-semver

0.85

Prefer highest semantic version

canonical-over-inferred

0.80

Canonical source over inferred

Configuration

Environment Variables

export ARANGO_URL=http://localhost:8529
export ARANGO_DATABASE=reconciliation
export ARANGO_USERNAME=root
export ARANGO_PASSWORD=your_secure_password

Deno Permissions

Required permissions:

  • --allow-read - Read repository files

  • --allow-write - Write reports and cache

  • --allow-net - Connect to ArangoDB

  • --allow-env - Access environment variables

  • --allow-run - Execute subprocesses (Haskell validator)

  • --allow-ffi - Load WASM modules

Or use --allow-all for convenience.

CLI Options

--repo <path>           Repository path (can specify multiple)
--daemon                Run in daemon mode
--interval <seconds>    Scan interval (default: 300)
--threshold <float>     Auto-resolve threshold (default: 0.9)
--arango-url <url>      ArangoDB URL
--arango-db <name>      Database name
--arango-user <user>    Username
--arango-password       Password

Advanced Features

WASM Acceleration

Performance-critical operations run in WebAssembly:

  • SHA-256 content hashing (2-3x faster)

  • Content normalization (1.5-2x faster)

  • Batch processing optimizations

# Build WASM modules from Rust
deno task build:wasm

# WASM is automatically loaded at runtime
deno run --allow-all src/main.ts scan --repo /repo

LLM Integration

Generate missing documentation with AI:

// Generate SECURITY.md
const response = await generateMissingDoc(
  DocumentType.SECURITY,
  repoContext,
  LLMProvider.Anthropic(apiKey)
);

Guardrails:

  • ✅ NEVER auto-commit LLM output

  • ✅ Always requiresApproval: true

  • ✅ Validation before use

  • ✅ Audit trail maintained

Logical Inference

Cross-document reasoning:

duplicate(X, Y) :- same_hash(X, Y), different_path(X, Y).
authoritative(X) :- has_canonical_source(X).
supersedes(X, Y) :- same_type(X, Y), version_greater(X, Y).

Schema Validation

Type-safe Haskell validator:

# Validate a document
validator-bridge LICENSE /path/to/LICENSE

CCCP Compliance

Python detection and migration recommendations:

just cccp-check /path/to/repo

Outputs "Patrojisign/insulti" warnings with migration suggestions to ReScript/Deno.

Graph Visualization

Generate DOT/Mermaid diagrams:

// Generate DOT format
const dot = generateDot(documents, edges, config);

// Generate Mermaid
const mermaid = generateMermaid(documents, edges);

Render with Graphviz:

dot -Tsvg -o graph.svg graph.dot

Development

Prerequisites

Build from Source

# Install Deno dependencies
deno cache src/main.ts

# Build WASM modules
deno task build:wasm

# Build ReScript
deno task build

# Build Haskell validator (optional)
cd validator
cabal build
cabal install --installdir=/usr/local/bin

# Run tests
deno task test

Project Structure

recon-silly-ation/
├── src/                      # TypeScript/ReScript source
│   ├── main.ts              # Deno entry point
│   ├── wasm/                # WASM module loader
│   ├── Types.res            # Core types
│   ├── Deduplicator.res     # Deduplication
│   └── ...                  # Other ReScript modules
├── wasm-modules/            # Rust WASM source
│   ├── Cargo.toml           # Rust configuration
│   └── src/lib.rs           # WASM implementations
├── validator/               # Haskell validator
├── tests/                   # Test suite
├── docs/                    # Documentation (AsciiDoc)
├── examples/                # Example configs
├── .github/workflows/       # CI/CD
├── Containerfile            # Podman build
├── podman-compose.yml       # Stack deployment
├── justfile                 # Build automation
├── deno.json                # Deno configuration
└── LICENSE.txt              # MIT license

Testing

# Run all tests
deno task test

# Or with just
just test

# Individual test suites
deno test --allow-all tests/deduplicator.test.ts

Contributing

See CONTRIBUTING.adoc for guidelines.

Contributor submission portal: https://your-gitlab-pages-url

CI/CD

GitHub Actions workflow includes:

  • ✅ Deno setup and caching

  • ✅ WASM module compilation

  • ✅ ReScript compilation

  • ✅ Haskell validator build

  • ✅ Podman image build

  • ✅ Integration tests with ArangoDB

  • ✅ Linting and formatting

Performance

Operation JavaScript Native Deno WASM/Rust

SHA-256 Hash (10KB)

~2ms

~1ms

~0.4ms

Normalization (10KB)

~1ms

~0.8ms

~0.5ms

Batch Hash (1000 docs)

~2000ms

~1000ms

~400ms

WASM provides 2-5x performance improvement for critical operations.

RSR Compliance

This project follows the RSR (Rhodium Standard Repository) framework for software quality and community governance.

Compliance Status: Silver Tier (Target: 80%+)

Framework Categories:

  • ✅ Documentation (README, CONTRIBUTING, CHANGELOG, etc.)

  • ✅ Security (.well-known/security.txt, SECURITY.md)

  • ✅ Licensing (Dual MIT + Palimpsest v0.8)

  • ✅ Build Reproducibility (flake.nix, justfile, Containerfile)

  • ✅ Testing (tests/, CI/CD)

  • ✅ Community Governance (CODE_OF_CONDUCT, MAINTAINERS)

  • ✅ Offline-First (documented capabilities)

  • ✅ Type Safety (ReScript + Haskell + Rust)

  • ✅ Memory Safety (Rust ownership model)

  • ✅ Attribution (.well-known/humans.txt)

  • ✅ AI Training Policy (.well-known/ai.txt)

TPCF Governance: Perimeter 3 (Community Sandbox) - See docs/TPCF.adoc

Compliance Audit: docs/RSR-COMPLIANCE-AUDIT.adoc

Verify compliance:

deno run --allow-read scripts/verify-rsr-compliance.ts

License

Dual License:

  • MIT License

  • Palimpsest License v0.8

See LICENSE.txt for details.

Security

See SECURITY.md for vulnerability reporting.

RFC 9116 security.txt: .well-known/security.txt

Acknowledgments

  • Deno team for secure runtime

  • Rust community for WebAssembly tooling

  • ReScript team for excellent type system

  • ArangoDB for multi-model database

  • miniKanren community for logic programming inspiration

  • Anthropic for Claude AI capabilities


Made with ❤️ using Deno + WASM + ReScript + ArangoDB + Haskell

About

Documentation Reconciliation System - Automatically reconcile, deduplicate, and resolve conflicts in Git repository documentation using content-addressable storage and graph-based conflict resolution.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 2

  •  
  •