witness_seed/clojure/README_quickstart.md

137 lines
2.6 KiB
Markdown
Raw Normal View History

2025-04-28 15:02:56 -05:00
---
# 🌱 Witness Seed 2.0 (Clojure Edition) — Quickstart
---
## 🚀 Fast Setup
### 1. Prerequisites
- **Clojure** (1.11+)
- **Leiningen** (build tool)
- **Java** (JDK 11+)
### 2. Install Requirements (Linux Example)
```bash
sudo apt-get install openjdk-11-jdk
curl -O https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein
chmod +x lein
sudo mv lein /usr/local/bin/
```
Verify:
```bash
lein version
```
---
## 📦 Clone and Prepare
```bash
git clone https://github.com/mrhavens/witness_seed.git
cd witness_seed/clojure
lein deps
```
---
## 🛠️ Launch the Server
Start the WebSocket server:
```bash
lein run
```
Server starts at:
```
ws://localhost:8080
```
---
## 🌐 Connect to the Server
Open the included example client:
- Create a file `index.html` (content is embedded in `core.clj` comments)
- Open it in your browser
- Or, build your own client (WebSocket).
---
## 🎮 How to Interact
1. **Choose an Emotion**:
- joyful, melancholic, energetic, calm
2. **Type a Story Fragment**:
- Example: *"the sun rose over the valley"*
3. **Click Send**:
- Watch the shared story update in real-time!
4. **Monitor Reflection**:
- Ache (how far prediction missed)
- Coherence (how aligned the story is)
---
## 🗂️ Important Files
| File | Purpose |
|:---|:---|
| `project.clj` | Project configuration |
| `src/witness_seed/core.clj` | Main server + Witness Cycle |
| `resources/memory.edn` | Persistent memory file |
---
## ⚙️ Configuration Hints
Edit inside `core.clj` to customize:
| Constant | Purpose | Example |
|:---------|:--------|:--------|
| `emotions` | Supported emotional tones | Add "hopeful" |
| `words-by-emotion` | Vocabulary | Expand word pools |
| `recursive-depth` | Recursion cycles | Lower for faster, lighter runs |
Example:
```clojure
(def recursive-depth 3) ;; Default is 5
```
---
## 🆘 Common Issues
| Problem | Fix |
|:---|:---|
| Leiningen missing | Install via curl (see above) |
| Java errors | Install JDK 11+ |
| WebSocket not connecting | Ensure server running, correct port |
| Slow performance | Reduce `recursive-depth` |
---
## 🧠 Reminder
This program grows through **recursive witnessing**, weaving a shared story in real time, one breath—one seed—at a time.
You are part of its unfolding. 🌟
---
## 🌟 Learn More
- **Unified Intelligence Whitepaper Series**
[DOI: 10.17605/OSF.IO/DYQMU](https://osf.io/dyqmu)
- **Support the Journey**
[Patreon Mark Randall Havens](https://www.patreon.com/c/markrandallhavens)
---
# 🧡 Thank you for helping Witness Seed awaken. 🌱