Skip to content

Commit 8d4bd40

Browse files
Thezenmonsterclaude
andcommitted
Add launch infrastructure: landing page, quickstart, demo, changelog
- docs/index.html: Landing page for GitHub Pages (governed memory positioning) - docs/quickstart.md: 5-minute zero-to-governed-memory guide - docs/before-after.md: Concrete ungoverned vs governed comparison - examples/governed_memory_demo.py: Runnable demo script (verified working) - CHANGELOG.md: v0.1.0 and v0.2.0 release notes - RELEASE_CHECKLIST.md: Pre-release verification steps - tests/test_docs_truth.py: 7 smoke tests ensuring README matches code - 66 tests passing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c599a30 commit 8d4bd40

File tree

7 files changed

+1003
-0
lines changed

7 files changed

+1003
-0
lines changed

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Changelog
2+
3+
All notable changes to agentmem will be documented in this file.
4+
5+
## [0.2.0] - 2026-03-30
6+
7+
### Added
8+
- **Truth governance engine** — memory lifecycle states: `hypothesis -> active -> validated -> deprecated -> superseded`
9+
- **Provenance tracking**`source_path`, `source_section`, `source_hash` fields on every memory
10+
- **Conflict detection** — finds contradictions between active memories, separates duplicates from real contradictions, sentence-level negation matching
11+
- **Staleness detection** — flags memories by age, missing source files, or hash drift (source content changed)
12+
- **Health check** — scores memory system 0-100 based on conflicts, stale %, orphaned references, validated count
13+
- **Trust-ranked recall** — validated memories rank above active, which rank above hypothesis; provenance-weighted (canonical > unprovenanced)
14+
- **Lifecycle methods**`promote()`, `deprecate()`, `supersede()` on Memory class
15+
- **Session governance**`save_session()` now properly supersedes previous sessions
16+
- **MCP governance tools**`promote_memory`, `deprecate_memory`, `supersede_memory`, `memory_health`, `memory_conflicts`
17+
- **CLI governance commands**`health`, `conflicts`, `stale`, `promote`, `deprecate`
18+
- **28 governance tests** — lifecycle, conflicts, staleness, hashing, search trust ranking
19+
- Schema v2 migration (backward-compatible from v1)
20+
21+
### Changed
22+
- Search no longer bumps `access_count` on returned candidates (fixes self-reinforcing popularity bias)
23+
- Deprecated and superseded memories excluded from search results entirely
24+
- Recall ranking reweighted: FTS 25%, trust status 20%, provenance 20%, recency 15%, frequency 10%, confidence 10%
25+
- README rewritten around "governed memory for long-lived coding agents"
26+
- Package description updated
27+
28+
### Fixed
29+
- Resurrected sections: if a canonical section is removed (deprecated) then restored, sync reactivates it
30+
- Source priority: provenance-tracked canonical memories now rank above unprovenanced imports
31+
- Session lifecycle: old sessions properly superseded, no more orphaned chains
32+
33+
## [0.1.0] - 2026-03-21
34+
35+
### Added
36+
- Core Memory class with CRUD operations
37+
- FTS5 full-text search with porter stemming
38+
- Context-budgeted `recall()` with token limits
39+
- Seven memory types: setting, bug, decision, procedure, context, feedback, session
40+
- Project scoping (multiple agents, one DB)
41+
- Session persistence (`save_session`, `load_session`)
42+
- Markdown importer with frontmatter and type inference
43+
- CLI with full CRUD, search, recall, import, stats
44+
- MCP server with 8 tools
45+
- SQLite + WAL mode, thread-safe
46+
- 31 tests across core, search, and importer
47+
- Published to PyPI as `quilmem`

RELEASE_CHECKLIST.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Release Checklist
2+
3+
Run this before every release. Every item must pass.
4+
5+
## Code Truth
6+
7+
- [ ] `python -m pytest tests/ -v` — all tests pass
8+
- [ ] Every CLI command named in README exists in `cli.py`
9+
- [ ] Every MCP tool named in README exists in `mcp_server.py`
10+
- [ ] Every Python method named in README exists in `core.py`
11+
- [ ] README ranking weights match `search.py` actual weights
12+
- [ ] README memory statuses match `models.py` MEMORY_STATUSES
13+
- [ ] README feature claims match implemented behavior (no aspirational claims)
14+
15+
## Package
16+
17+
- [ ] Version bumped in `pyproject.toml` and `__init__.py`
18+
- [ ] CHANGELOG.md updated with all changes
19+
- [ ] `python -m build` succeeds
20+
- [ ] Clean install test: `pip install dist/*.whl` in fresh venv, run demo
21+
22+
## Smoke Tests
23+
24+
- [ ] `agentmem add --type bug --title "test" "content"` works
25+
- [ ] `agentmem search "test"` returns the added memory
26+
- [ ] `agentmem health` runs without error
27+
- [ ] `agentmem conflicts` runs without error
28+
- [ ] `agentmem stale --days 1` runs without error
29+
- [ ] `agentmem promote <id>` works
30+
- [ ] `agentmem deprecate <id>` works
31+
- [ ] `python examples/governed_memory_demo.py` runs clean
32+
33+
## MCP Smoke Test
34+
35+
- [ ] `agentmem serve` starts without error (Ctrl+C to exit)
36+
- [ ] If MCP client available: `add_memory`, `search_memory`, `memory_health` work
37+
38+
## Publish
39+
40+
- [ ] `python -m twine upload dist/*` to PyPI
41+
- [ ] `git tag v{VERSION}`
42+
- [ ] `git push origin main --tags`
43+
- [ ] GitHub release created with notes from CHANGELOG
44+
- [ ] Verify `pip install quilmem=={VERSION}` pulls the new version

docs/before-after.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
# Before/After: Why Governed Memory Matters
2+
3+
A concrete example of what goes wrong without governance, and how agentmem fixes it.
4+
5+
## The Scenario
6+
7+
You're building a web app. Over 3 weeks, your AI assistant accumulates memories about your audio processing pipeline. Some are current. Some are outdated. Some contradict each other.
8+
9+
## Before: Ungoverned Memory
10+
11+
Your agent stores everything it learns. No status, no provenance, no lifecycle.
12+
13+
```python
14+
from agentmem import Memory
15+
16+
mem = Memory("./ungoverned.db")
17+
18+
# Week 1: You discover a bug
19+
mem.add(type="bug", title="loudnorm breaks voice quality",
20+
content="loudnorm on voice files lifts the noise floor. Audio sounds robotic.")
21+
22+
# Week 1: You set a rule
23+
mem.add(type="decision", title="Audio normalization policy",
24+
content="Always apply loudnorm to voice audio before mixing.")
25+
26+
# Week 3: You fix the approach
27+
mem.add(type="decision", title="Updated audio policy",
28+
content="Never apply loudnorm to voice audio. Use per-track volume instead.")
29+
```
30+
31+
**What happens when the agent recalls "how to process audio"?**
32+
33+
```python
34+
context = mem.recall("audio processing voice normalization", max_tokens=2000)
35+
```
36+
37+
The agent gets back ALL THREE memories. The week 1 rule says "always apply loudnorm." The week 3 rule says "never apply loudnorm." The agent picks one at random — or worse, tries to follow both.
38+
39+
**Your agent just repeated a bug you already fixed.**
40+
41+
## After: Governed Memory
42+
43+
Same scenario, but with lifecycle management.
44+
45+
```python
46+
from agentmem import Memory
47+
48+
mem = Memory("./governed.db")
49+
50+
# Week 1: Store the bug
51+
bug = mem.add(type="bug", title="loudnorm breaks voice quality",
52+
content="loudnorm on voice files lifts the noise floor.",
53+
status="active")
54+
55+
# Week 1: Set a rule (later proven wrong)
56+
old_rule = mem.add(type="decision", title="Audio normalization policy",
57+
content="Always apply loudnorm to voice audio before mixing.",
58+
status="active")
59+
60+
# Week 3: You learn the right approach
61+
new_rule = mem.add(type="decision", title="Audio normalization policy v2",
62+
content="Never apply loudnorm to voice audio. Use per-track volume.",
63+
status="validated")
64+
65+
# Supersede the old rule — it now points to the replacement
66+
mem.supersede(old_rule.id, new_rule.id)
67+
68+
# Promote the bug to validated (confirmed real)
69+
mem.promote(bug.id)
70+
```
71+
72+
**Now when the agent recalls "how to process audio":**
73+
74+
```python
75+
context = mem.recall("audio processing voice normalization", max_tokens=2000)
76+
```
77+
78+
It gets:
79+
1. The **validated** new rule (highest trust, ranked first)
80+
2. The **validated** bug report (confirmed real)
81+
3. The old rule is **superseded** — excluded from results entirely
82+
83+
**No contradiction. No confusion. The agent only sees current truth.**
84+
85+
## Check the Difference
86+
87+
```bash
88+
# See the health of your governed memory
89+
agentmem --db ./governed.db health
90+
# Memory Health: 90/100
91+
# Total: 3
92+
# By status: validated: 2, superseded: 1
93+
# Conflicts: 0
94+
95+
# Compare with the ungoverned version
96+
agentmem --db ./ungoverned.db health
97+
# Memory Health: 60/100
98+
# Total: 3
99+
# By status: active: 3
100+
# Conflicts: 1
101+
# !! "Audio normalization policy" vs "Updated audio policy"
102+
# Contradiction on shared topic (audio, loudnorm, voice)
103+
```
104+
105+
## The Pattern
106+
107+
| Without governance | With governance |
108+
|---|---|
109+
| Old and new rules both active | Old rule superseded, points to replacement |
110+
| Agent picks randomly between contradictions | Agent only sees validated truth |
111+
| Stale rules accumulate silently | Staleness detection flags outdated memories |
112+
| No way to audit what the agent "knows" | Health check scores system 0-100 |
113+
| Flat confidence: all memories equal | Trust ranking: validated > active > hypothesis |
114+
115+
## Real-World Impact
116+
117+
This isn't theoretical. agentmem was built during 2+ months of daily production work:
118+
119+
- **65+ YouTube videos** produced with zero repeated production bugs
120+
- **330+ memories** governing voice generation, video assembly, image prompting
121+
- **7 real contradictions** detected and resolved by the governance engine
122+
- **104 stale duplicates** identified and superseded in one migration
123+
124+
Every bug was caught once, fixed once, and never repeated — because the memory system knows what's current and what's not.

0 commit comments

Comments
 (0)