Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
5152b75
Unify all data paths under ~/.openexp/ (#1)
anthroos Mar 22, 2026
fb3a106
Fix 10 security issues (3 HIGH, 7 MEDIUM) (#2)
anthroos Mar 22, 2026
e152454
Add QDRANT_API_KEY to configuration docs (#3)
anthroos Mar 22, 2026
edfe613
feat: additive Q-learning + outcome-based rewards (#1)
anthroos Mar 22, 2026
7d25c28
feat: additive Q-learning + outcome-based rewards (#4)
anthroos Mar 22, 2026
da0ef13
fix: Q-value init consistency + security hardening (#2)
anthroos Mar 22, 2026
a46014d
Merge remote-tracking branch 'public/main'
Mar 22, 2026
604f3f5
feat: add CLAUDE.md with memory protocol and dev instructions (#3)
anthroos Mar 23, 2026
f3968a7
feat: add CLAUDE.md with memory protocol and dev instructions (#6)
anthroos Mar 23, 2026
e2f0350
Merge remote-tracking branch 'public/main'
Mar 23, 2026
f3daf73
feat: add search_memory reminder to UserPromptSubmit hook (#4)
anthroos Mar 23, 2026
9ace8ab
feat: add search_memory reminder to UserPromptSubmit hook (#7)
anthroos Mar 23, 2026
40d3f10
Merge remote-tracking branch 'public/main'
Mar 23, 2026
0be06e3
feat: always show search_memory reminder in UserPromptSubmit hook (#5)
anthroos Mar 23, 2026
9903e99
docs: add badges, comparison table, templates for open-source readine…
anthroos Mar 23, 2026
0c3dea8
fix: README UX polish — BibTeX key, example data, troubleshooting (#7)
anthroos Mar 23, 2026
d9c1bb7
feat: add Experiences — per-domain Q-value contexts (#8)
anthroos Mar 24, 2026
078186c
feat: add dealflow experience + experiences documentation (#9)
anthroos Mar 25, 2026
295a809
feat: add `openexp experience create` interactive wizard (#10)
anthroos Mar 25, 2026
f613473
feat: add 6 new reward signals (#11)
anthroos Mar 25, 2026
e250f95
feat: per-project experience via .openexp.yaml (#12)
anthroos Mar 25, 2026
56b563c
feat: add convergence-based memory compaction (#13)
anthroos Mar 25, 2026
1d8bcd0
feat: L3 cold storage for full-context reward events (#14)
anthroos Mar 25, 2026
8bf6c10
feat: L4 explanation system — LLM-generated reward explanations
Mar 30, 2026
89965e9
feat: visualization — session replay and dashboard export
Mar 30, 2026
9d04e3a
docs: 5-level storage pyramid, product page content, architecture update
Mar 30, 2026
9cc5661
feat: add CI workflow + update README for full feature set
Mar 30, 2026
3d21979
fix: security hardening — command injection, path traversal, secret f…
Mar 30, 2026
47abcb9
fix: reward only recalled memories, count only per-session observations
Mar 30, 2026
96cd581
feat: auto-tag observations with client_id from CRM companies
Mar 30, 2026
8beb700
fix: remove hardcoded usernames from sanitize patterns (#15)
anthroos Mar 30, 2026
5afe144
fix: correct Q-learning formula and q_init in README (#16)
anthroos Mar 30, 2026
0e9b553
feat: pivot to business process learning engine (#17)
anthroos Mar 30, 2026
e028595
docs: update positioning — skills say how, OpenExp teaches what works…
anthroos Mar 30, 2026
becea33
Fix per-experience Q-value routing in observation ingest (#19)
anthroos Apr 6, 2026
d65417a
Fix Q-value wiring, add cache locking, fix test isolation (#20)
anthroos Apr 6, 2026
3f03863
feat: auto-detect experience from prompt keywords (#21)
anthroos Apr 6, 2026
631368f
fix: JSONL format and multi-line parser for observations
Apr 6, 2026
6398e19
docs: update architecture with auto-detect, research, hippocampus ana…
Apr 6, 2026
9c40a16
feat: extract decisions from session transcripts via Opus 4.6 (#22)
anthroos Apr 6, 2026
d3cae18
docs: comprehensive update — decision extraction, 4-phase learning cy…
anthroos Apr 6, 2026
5b64e83
docs: add honest outreach pitch with 4-phase learning cycle (#23)
anthroos Apr 6, 2026
275fce8
feat: decision extraction, experience auto-detect, Q-value fixes, docs
Apr 6, 2026
84331ca
fix: install package in CI so tests can import openexp
Apr 6, 2026
913f0f3
fix: install package in CI so tests can import openexp
Apr 6, 2026
65427a2
fix: move anthropic import inside None check to fix CI tests
Apr 6, 2026
a0a8c2d
fix: move anthropic import inside None check to fix CI tests
Apr 6, 2026
e167c7c
fix: security hardening and code review fixes
Apr 6, 2026
7516824
Merge remote-tracking branch 'public/main'
Apr 6, 2026
b276c34
feat: add memory protection classes
Apr 6, 2026
18081bf
feat: add multi-level retrospective system (daily/weekly/monthly) (#25)
anthroos Apr 7, 2026
c34ea38
fix: strip ANTHROPIC_API_KEY from claude -p subprocess env (#26)
anthroos Apr 7, 2026
3dab016
refactor: replace observation pipeline with transcript ingest (#28)
anthroos Apr 9, 2026
d683732
feat: add idempotency guard + tests for transcript ingest (#29)
anthroos Apr 9, 2026
6cc571a
feat: add --all and --force flags to CLI ingest, progress indicator (…
anthroos Apr 9, 2026
d3c361a
feat: zero Q-value weight in scoring, boost semantic to 50% (#31)
anthroos Apr 9, 2026
cd37193
feat: add conversation-aware search filters (#32)
anthroos Apr 9, 2026
d0b7b06
refactor: simplify SessionEnd and SessionStart hooks (#33)
anthroos Apr 9, 2026
568b98e
feat: Experience Library pipeline (#34)
anthroos Apr 14, 2026
5e22f0f
chore: remove private data for public release (#35)
anthroos Apr 14, 2026
f75bdc6
fix(setup): remove --user flag - Qdrant container runs as root by def…
alpiua Apr 16, 2026
9cf8447
fix(setup): handle collection check failures gracefully
alpiua Apr 16, 2026
ac3f781
fix(setup): correct jq array paths and null handling for hooks
alpiua Apr 16, 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
8 changes: 6 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,19 @@
QDRANT_HOST=localhost
QDRANT_PORT=6333
OPENEXP_COLLECTION=openexp_memories
# Qdrant API key (RECOMMENDED — without this, any local process can read your memories)
# If set, setup.sh will also pass it to the Docker container as QDRANT__SERVICE__API_KEY
# Generate one with: python3 -c "import secrets; print(secrets.token_urlsafe(32))"
# QDRANT_API_KEY=

# Data directory (default: ~/.openexp/data)
# OPENEXP_DATA_DIR=~/.openexp/data

# Observations directory (where Claude Code hooks write observations)
# OPENEXP_OBSERVATIONS_DIR=~/.claude-memory/observations
# OPENEXP_OBSERVATIONS_DIR=~/.openexp/observations

# Sessions directory (where Claude Code writes session summaries)
# OPENEXP_SESSIONS_DIR=~/.claude-memory/sessions
# OPENEXP_SESSIONS_DIR=~/.openexp/sessions

# Anthropic API key (optional — only needed for LLM-based enrichment)
# Without this, memories are stored with basic metadata (still works great!)
Expand Down
31 changes: 31 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Bug Report
about: Report a bug in OpenExp
title: "[Bug] "
labels: bug
---

## Description

A clear description of the bug.

## Steps to Reproduce

1. ...
2. ...
3. ...

## Expected Behavior

What you expected to happen.

## Actual Behavior

What actually happened. Include error messages or logs if available.

## Environment

- OS: [e.g., macOS 14, Ubuntu 22.04]
- Python version: [e.g., 3.11.5]
- OpenExp version/commit: [e.g., commit hash or tag]
- Qdrant version: [e.g., latest]
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature Request
about: Suggest a new feature or improvement
title: "[Feature] "
labels: enhancement
---

## Problem

What problem does this feature solve?

## Proposed Solution

How you'd like it to work.

## Alternatives Considered

Any other approaches you've thought about.

## Additional Context

Anything else that helps explain the request.
14 changes: 14 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Summary

Brief description of changes.

## Changes

- ...

## Checklist

- [ ] Tests pass (`pytest tests/ -v`)
- [ ] No personal data in code (`grep -rn "sk-ant\|api_key.*=.*sk" $(git ls-files)`)
- [ ] No hardcoded paths
- [ ] Documentation updated (if applicable)
38 changes: 38 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Tests

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]

services:
qdrant:
image: qdrant/qdrant:latest
ports:
- 6333:6333

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -e .
pip install pytest

- name: Run tests
run: pytest tests/ -v --tb=short
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,7 @@ Thumbs.db

# Qdrant data
qdrant_storage/

# Generated HTML
*.html
!openexp/static/*.html
79 changes: 79 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# OpenExp — Development Instructions

## Memory Protocol (MANDATORY)

OpenExp gives Claude Code persistent memory with Q-learning. For it to work, follow this protocol **every task**:

### Before starting any task:
```
search_memory("relevant context for this task")
```
Find prior experience, decisions, mistakes. Hooks do auto-recall on each message, but you MUST do a targeted search before complex tasks.

### After completing a task:
```
add_memory("what was decided/done and why", type="decision")
```
Capture outcomes, not just actions. Q-learning needs explicit signals.

### When the user shares context:
```
add_memory("the context", type="fact")
```
Immediately. Don't wait. Every piece of context improves future retrieval.

### Prediction loop (build judgment over time):
When you make a prediction or recommendation (deal outcome, approach success, client reaction):
```
log_prediction("prediction text", confidence=0.7, memory_ids=["ids-that-informed-this"])
```
Later, when the outcome is known:
```
log_outcome(prediction_id="pred_xxx", outcome="what happened", reward=0.8)
```
This is how Q-learning builds real judgment — not from heuristics, but from verified outcomes.
Use for: deal predictions, strategy recommendations, client behavior forecasts, technical approach bets.

## Architecture

**Full reference:** `docs/storage-system.md` for Q-learning details, `docs/experience-library.md` for the Experience Library pipeline.

- `openexp/core/` — Q-learning engine, hybrid search, scoring, lifecycle
- `openexp/ingest/` — Transcript ingest + Experience Library pipeline (chunking, topic mapping, experience extraction)
- `openexp/mcp_server.py` — MCP STDIO server (5 tools: search_memory, add_memory, log_prediction, log_outcome, memory_stats)
- `openexp/cli.py` — CLI (search, ingest, chunk, topics, stats, compact, experience, viz)
- `scripts/batch_label.py` — Batch experience labeling across all threads
- `tests/` — 300 tests across 13 files

## Q-Learning (do not change without discussion)

- Formula: `Q = clamp(Q + α*reward, floor, ceiling)`
- q_init=0.0, alpha=0.25, floor=-0.5, ceiling=1.0
- Three layers: action (50%), hypothesis (20%), fit (30%)
- Scoring: vector 30%, BM25 10%, recency 15%, importance 15%, Q-value 30%

## Development Workflow

Two remotes: `origin` (private), `public` (open-source).

```bash
# Branch from main
git checkout -b feat/my-feature

# Test
.venv/bin/python3 -m pytest tests/ -v

# Verify no private data
grep -rn "sk-ant\|welababeldata\|ivanpasichnyk" $(git ls-files)

# Push to private first, public when ready
git push origin feat/my-feature # daily work
git push public main # releases
```

## Rules

- No hardcoded paths. Everything via env vars.
- No personal data in code (API keys, usernames, company names).
- `.env` is gitignored — never commit it.
- Always branch → PR → squash merge. Never push to main directly.
55 changes: 55 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Contributing to OpenExp

Thanks for your interest in contributing! Here's how to get started.

## Development Setup

```bash
# Clone and set up
git clone https://github.com/anthroos/openexp.git
cd openexp
./setup.sh

# Activate the venv
source .venv/bin/activate
```

Prerequisites: Python 3.11+, Docker (for Qdrant), jq.

## Workflow

1. **Branch from main:** `git checkout -b feat/your-feature`
2. **Make changes**
3. **Run tests:** `pytest tests/ -v`
4. **Check for personal data:** `grep -rn "sk-ant\|api_key.*=.*['\"]sk" $(git ls-files)`
5. **Push and open a PR**
6. **Squash merge** after review

## Running Tests

```bash
# All tests
.venv/bin/python3 -m pytest tests/ -v

# Specific test file
.venv/bin/python3 -m pytest tests/test_q_value.py -v
```

## Code Guidelines

- No hardcoded paths — use environment variables or relative paths
- No personal data in code (API keys, usernames, company names)
- `.env` is gitignored — never commit it
- Keep dependencies minimal — avoid adding new packages without discussion

## Areas Where Help Is Welcome

- **Reward signals** — beyond commits/PRs, what indicates a productive session?
- **Compaction** — merging duplicate or outdated memories automatically
- **Multi-project learning** — sharing relevant context across projects
- **Benchmarks** — measuring retrieval quality improvement over time
- **More lifecycle transitions** — automated contradiction detection

## Questions?

Open an issue or start a discussion. We're happy to help you get oriented.
Loading