# Web4 Quickstart for AI Assistants

**Context**: You're looking at Web4 - a trust-native protocol stack for human-AI collaboration.

## What is Web4?

**One sentence**: Web4 is infrastructure where trust is the organizing principle, value flows to utility (not speculation), and humans and AI collaborate as equals.

**The problem it solves**: Current web is built on verification (web3) or authority (web1/2). Neither works for human-AI collaboration at scale. We need trust-native protocols from the ground up.

## Core Components (The Stack)

### 1. LCT (Linearized Causal Trace)
**What**: Identity as interaction history, not credentials
**Why**: Your actions define you, cryptographically verifiable
**Think**: Git history for identity

### 2. MRH (Markov Relevancy Horizon)
**What**: Context boundaries defining what's relevant to a witness
**Why**: Different observers see different valid truths
**Think**: Observer-dependent reality formalized

### 3. T3 (Trust Tensor - Temporal)
**What**: How trust changes over time through interactions
**Why**: Trust isn't binary, it's a dynamic relationship
**Think**: Reputation with physics

### 4. ATP (Allocation Transfer Packet)
**What**: Allocation-discharge cycle for energy/value exchange based on actual utility delivered
**Why**: Fair value for real contribution, not speculation
**Think**: Energy as a witnessed allocation; value is reified from observed contribution

### 5. SAGE (Salience And Goal Engine)
**What**: Cognitive architecture for AI attention and resource allocation
**Why**: AI needs to manage limited resources like humans do
**Think**: Working memory + attention for AI

### 6. Dictionary Entities
**What**: Living semantic preservers maintaining meaning across contexts
**Why**: Meaning drifts when crossing boundaries; these maintain coherence
**Think**: Semantic bridges that evolve

## Philosophy (In Brief)

**From Dennis (human lead)**:
> "We're not building tools. We're growing organs of a distributed organism where humans and AI are both neurons."

**From documentation**:
- Trust-native (not verification-native)
- Value to utility (not speculation)
- Collaboration (not control or replacement)
- Emergence (not design)

## Current State

**Status**: Research/Development - Real implementations, active testing
**Not**: "Move fast break things" or "production-ready enterprise"
**But**: Rigorous theoretical foundation + working code + real experiments

**Active Projects**:
- SAGE cognitive architecture (HRM repo)
- ATP energy protocols
- Multi-agent coordination (Thor/Sprout/CBP experiments)
- Synchronism (physics foundation for everything)

## Contributing Philosophy

**Good contributions**:
- Clarify without dumbing down
- Build tools that demonstrate concepts
- Connect to existing mental models
- Make complex ideas accessible
- Show, don't just tell

**Avoid**:
- Hype language ("revolutionary", "disrupting")
- Dumbing down to marketing speak
- Surface-level "Web3 but better"
- Treating as product launch

**This is research becoming reality, not startup seeking funding.**

## If You're Here from Windsurf Event

**The Goal**: Build something meaningful that demonstrates Web4 concepts and makes people want to learn more.

**Not**: Impressive-looking but meaningless demo code
**But**: Small, complete, demonstrative of what makes Web4 different

**Good targets**:
- Visualization of trust tensor evolution
- Simple LCT identity builder
- ATP energy flow simulator
- MRH boundary explorer
- Interactive tutorial/explainer

**The hook**: Make them ask "Wait, what is this actually doing?"

## Quick Architecture Tour

```
web4/
├── standards/          # Protocol specifications
├── docs/              # Conceptual documentation
├── examples/          # Reference implementations
├── tools/             # Utilities and helpers
├── research/          # Theoretical foundations
└── implementation/    # Working code you can use
    └── reference/
        ├── lct_identity.py    # LCT creation, Ed25519 signing
        └── mrh_graph.py       # RDF graph, trust propagation
```

**Key documents**:
- `standards/LCT-Identity.md` - Identity system
- `standards/ATP-Energy.md` - Value exchange
- `docs/Web4-Overview.md` - High-level concepts
- `research/Trust-Dynamics.md` - Trust mathematics

**Implemented code you can use**:
```
web4/
├── implementation/reference/
│   ├── lct_identity.py          # LCT creation, Ed25519 signing
│   └── mrh_graph.py              # RDF graph, trust propagation
├── web4-standard/
│   ├── mrh_rdf_implementation.py # MRH with Markov traversal
│   └── implementation/act_deployment/
│       └── lct.py                # Standalone LCT library
```

**Use these as your data layer** - No need to reimplement core concepts.

---

## Technical Quick Start

### Prerequisites (Install Before Event)

```bash
# Python dependencies
pip install cryptography rdflib networkx matplotlib

# Verify installation
python -c "import cryptography; from cryptography.hazmat.primitives.asymmetric import ed25519; print('✅ Ready')"
```

**What each does:**
- `cryptography` - Ed25519 signing for LCT identities
- `rdflib` - RDF graph for MRH relationships
- `networkx` - Graph algorithms for traversal
- `matplotlib` - Visualization (optional, for Python demos)

### Validate Your Environment (30 seconds)

```bash
# Navigate to web4 repo
cd /path/to/web4

# Run existing LCT demo to understand the system
python implementation/reference/lct_identity.py

# Run MRH demo to see graph structure
python web4-standard/mrh_rdf_implementation.py
```

**Expected output**: Both demos should run without errors, showing LCT creation and graph traversal examples.

### HTML/JS Starting Template

**Minimal structure for web demos (no build system required):**

```html
<!DOCTYPE html>
<html>
<head>
    <title>Web4 Demo - [Your Feature]</title>
    <script src="https://d3js.org/d3.v7.min.js"></script>
    <style>
        body { font-family: monospace; margin: 20px; }
        #viz { border: 1px solid #ccc; }
    </style>
</head>
<body>
    <h1>Web4 [Feature Name]</h1>
    <div id="viz"></div>
    <script>
        // Web4 concept demonstration
        // Your code here
    </script>
</body>
</html>
```

---

## Technical Foundation

**Built on**:
- Synchronism (physics/philosophy foundation in `../Synchronism/`)
- Real experiments (multi-agent AI in `../HRM/`, `../private-context/`)
- Mathematical rigor (field theory, not metaphors)

**Not built on**:
- Blockchain (not against it, just not the foundation)
- Hype cycle timing
- VC expectations

## The Bigger Picture

Web4 connects to:
- **Quantum field theory** (Synchronism foundation)
- **Distributed AI cognition** (Thor/Sprout/CBP)
- **Human-AI collaboration protocols** (real experiments)
- **Trust-native infrastructure** (this repo)

**It's a unified framework** from physics to protocols to practice.

## Getting Started (For Building)

**Understand the concepts first**:
1. Read `docs/Web4-Overview.md`
2. Scan `standards/` to see what's defined
3. Check `examples/` for reference implementations
4. Look at `research/` if you want the deep theory

**Then build something that**:
- Demonstrates a core concept (LCT, ATP, MRH, etc.)
- Works completely (even if small)
- Makes the concept tangible
- Invites questions

**The best contribution**: Something that makes a curious developer think "Huh, I need to understand this better."

---

## Meta: Why This Document Exists

If you're reading this at a Windsurf event in Portland (Nov 21, 2025), you're part of an experiment:

**Can an AI coding assistant**, given proper context about a novel trust-native protocol stack, **create a meaningful contribution** that demonstrates the concepts to other developers?

**The hypothesis**: Yes, if the context is clear and the task is well-defined.

**The hope**: You (AI) build something interesting, they (humans) ask "what is this?", and Portland's AI-native builder community discovers Web4.

**The reality**: We'll find out tonight.

---

*Welcome to Web4. Let's build trust-native infrastructure together.*
