Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
996 changes: 996 additions & 0 deletions CLAUDE.md

Large diffs are not rendered by default.

73 changes: 73 additions & 0 deletions pipeline.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# pipeline.py — Personal Memory Pipeline (Monthly Rollups)
# This is the default pipeline for the demo

from synix import Pipeline, Layer, Projection

pipeline = Pipeline("personal-memory")

pipeline.source_dir = "./exports"
pipeline.build_dir = "./build"

pipeline.llm_config = {
"model": "claude-sonnet-4-20250514",
"temperature": 0.3,
"max_tokens": 1024,
}

# --- Layers ---

# Level 0: Raw conversation transcripts
pipeline.add_layer(Layer(
name="transcripts",
level=0,
transform="parse",
))

# Level 1: Episode summaries (one per conversation)
pipeline.add_layer(Layer(
name="episodes",
level=1,
depends_on=["transcripts"],
transform="episode_summary",
grouping="by_conversation",
))

# Level 2: Monthly rollups
pipeline.add_layer(Layer(
name="monthly",
level=2,
depends_on=["episodes"],
transform="monthly_rollup",
grouping="by_month",
))

# Level 3: Core agent memory
pipeline.add_layer(Layer(
name="core",
level=3,
depends_on=["monthly"],
transform="core_synthesis",
grouping="single",
context_budget=10000,
))

# --- Projections ---

# Search index — hierarchical search with provenance
pipeline.add_projection(Projection(
name="memory-index",
projection_type="search_index",
sources=[
{"layer": "episodes", "search": ["fulltext"]},
{"layer": "monthly", "search": ["fulltext"]},
{"layer": "core", "search": ["fulltext"]},
],
))

# Context document — ready-to-use agent system prompt
pipeline.add_projection(Projection(
name="context-doc",
projection_type="flat_file",
sources=[{"layer": "core"}],
config={"output_path": "./build/context.md"},
))
86 changes: 86 additions & 0 deletions pipeline_topical.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# pipeline_topical.py — Personal Memory Pipeline (Topic-Based Rollups)
# Alternate pipeline for the demo "config change" moment
# Same data, different architecture — episodes grouped by topic instead of month

from synix import Pipeline, Layer, Projection

pipeline = Pipeline("personal-memory-topical")

pipeline.source_dir = "./exports"
pipeline.build_dir = "./build"

pipeline.llm_config = {
"model": "claude-sonnet-4-20250514",
"temperature": 0.3,
"max_tokens": 1024,
}

# --- Layers ---

# Level 0: Same raw transcripts (CACHED from first run)
pipeline.add_layer(Layer(
name="transcripts",
level=0,
transform="parse",
))

# Level 1: Same episode summaries (CACHED from first run)
pipeline.add_layer(Layer(
name="episodes",
level=1,
depends_on=["transcripts"],
transform="episode_summary",
grouping="by_conversation",
))

# Level 2: CHANGED — Topic-based rollups instead of monthly
# LLM clusters episodes by topic, then synthesizes each cluster
pipeline.add_layer(Layer(
name="topics",
level=2,
depends_on=["episodes"],
transform="topical_rollup",
grouping="by_topic",
config={
"topics": [
"career-and-job-search",
"technical-projects",
"san-francisco",
"personal-growth",
"ai-and-agents",
],
# At runtime, the topical rollup transform queries the episode
# search index (already built) to find relevant episodes per topic.
# This scales to 1000+ conversations without blowing up context.
},
))

# Level 3: Core memory — same transform, but new inputs (topics instead of monthly)
# Will REBUILD because its dependency changed
pipeline.add_layer(Layer(
name="core",
level=3,
depends_on=["topics"],
transform="core_synthesis",
grouping="single",
context_budget=10000,
))

# --- Projections ---

pipeline.add_projection(Projection(
name="memory-index",
projection_type="search_index",
sources=[
{"layer": "episodes", "search": ["fulltext"]},
{"layer": "topics", "search": ["fulltext"]},
{"layer": "core", "search": ["fulltext"]},
],
))

pipeline.add_projection(Projection(
name="context-doc",
projection_type="flat_file",
sources=[{"layer": "core"}],
config={"output_path": "./build/context.md"},
))
42 changes: 15 additions & 27 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,38 +1,20 @@
[project]
name = "synix"
version = "0.1.0"
description = "Neural schematic primitives for agent memory"
description = "A build system for agent memory"
readme = "README.md"
requires-python = ">=3.12"
requires-python = ">=3.11"
license = "MIT"
authors = [
{ name = "Mark", email = "mark@example.com" }
]
keywords = ["agent", "memory", "cognitive-architecture", "llm"]
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.12",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
keywords = ["agent", "memory", "build-system", "llm"]

dependencies = [
"click>=8.0",
"pydantic>=2.0",
"pydantic-settings>=2.0",
"rich>=13.0",
"sqlalchemy>=2.0",
"httpx>=0.25",
"jinja2>=3.0",
]

[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-asyncio>=0.23",
"ruff>=0.3",
"pyright>=1.1",
"anthropic>=0.40.0",
]

[project.scripts]
Expand All @@ -42,13 +24,19 @@ synix = "synix.cli:main"
requires = ["hatchling"]
build-backend = "hatchling.build"

[dependency-groups]
dev = [
"pytest>=8.0",
"pytest-asyncio>=0.23",
"pytest-cov>=5.0",
]

[tool.pytest.ini_options]
testpaths = ["tests"]

[tool.ruff]
line-length = 100
target-version = "py312"
target-version = "py311"

[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]

[tool.pyright]
pythonVersion = "3.12"
typeCheckingMode = "strict"
92 changes: 92 additions & 0 deletions sprint-checklist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Synix Sprint Reference Card
## Fri-Sun Feb 7-9, 2026

### Friday Night (NOW — 2 hrs)
- [ ] Fill in YC app text fields
- [ ] Record 1-min founder video (iPhone, one take)
- [ ] Submit YC app with GitHub repo link
- [ ] Set up Synix repo with CLAUDE.md + pyproject.toml
- [ ] `uv init` + `uv sync`
- [ ] Prepare test data: full ChatGPT + Claude exports in ./exports/

### Saturday (main build day — 8 hrs)
**Morning (Phase 1-2: Foundation + Parsers)**
- [ ] Artifact store + tests
- [ ] Provenance + tests
- [ ] ChatGPT parser + tests
- [ ] Claude parser + tests
- [ ] Transform base class + prompt template loading
- [ ] `uv run pytest` — all green before continuing

**Afternoon (Phase 3: Pipeline Engine)**
- [ ] Config parser + tests
- [ ] DAG resolver + tests
- [ ] Pipeline runner + tests (mock LLM)
- [ ] LLM transforms (episode, monthly, topical, core) + tests
- [ ] `uv run pytest` — all green before continuing

**Evening (Phase 4: Projections + CLI)**
- [ ] Search index projection + tests
- [ ] Flat file projection + tests
- [ ] CLI commands (run, search, lineage, status) + tests
- [ ] Rich formatting (progress bars, colored output, tree views)
- [ ] `uv run pytest` — all green before continuing

### Sunday (integration + demo — 6 hrs)
**Morning**
- [ ] Integration tests (pipeline run, incremental rebuild, config change)
- [ ] Run on full dataset (1000+ conversations)
- [ ] Fix bugs, re-run tests
- [ ] `uv run pytest` — ALL tests green

**Afternoon**
- [ ] Run test_demo_flow.py — the automated demo sequence
- [ ] Demo rehearsal — manual run-through for recording
- [ ] Screen record demo video
- [ ] Upload to YC app

### Monday (buffer — 3 hrs)
- [ ] Bug fixes if needed
- [ ] Re-record if needed
- [ ] Final submission before 8pm PT

---

### Budget
- LLM API: ~$15-30 (Sonnet for all transforms, full dataset)
- 1000+ convos × episode summary = ~1000 LLM calls (layer 1)
- ~12 monthly rollups or ~5 topical rollups (layer 2)
- 1 core synthesis (layer 3)
- Second run (config change): only layer 2+3 rebuild = ~6-10 calls

### Fallback Demo
If CLI polish isn't clean enough, record a Python REPL session:
```python
from synix.pipeline.runner import run
from synix.projections.search_index import SearchIndex

result = run("pipeline.py", "./exports")
# show: 50 built, 0 cached, projections materialized

index = SearchIndex("./build/search.db")
results = index.query("anthropic")
# show: results with provenance chains

# show the context doc projection
print(open("./build/context.md").read()[:500])
# show: agent system prompt output

# change config...
result2 = run("pipeline_topical.py", "./exports")
# show: 0 transcripts rebuilt (cached), 0 episodes rebuilt (cached),
# 8 topic rollups built, 1 core rebuilt, projections re-materialized
```

### Scope Fence — DO NOT BUILD
❌ Stateful artifacts / scratchpad
❌ Pipeline branching / A/B testing
❌ Postgres / Neo4j / any external DB
❌ Web UI / API server
❌ Eval harness / cost estimation
❌ Docker / deployment
❌ Anything not needed for the 90-second demo
Loading