Skip to content

Commit 5de06c9

Browse files
committed
Added project facts, detection works!
1 parent d596092 commit 5de06c9

19 files changed

Lines changed: 1039 additions & 69 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dist/
66
build/
77
.eggs/
88
*.egg
9+
uv.lock
910

1011
# Virtual environments
1112
venv/

CLAUDE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Context graph for persistent memory across Claude Code sessions.
44

5+
## Development Process
6+
7+
- After changes, provide concise verification steps for the user
8+
- **CRITICAL** Self-learn: When learning new project conventions/rules, update this file or add indexed sub-folder CLAUDE.md files. Keep instructions concise with lossless compression.
9+
- Continuously optimize organization of all CLAUDE.md instruction files
10+
511
## Session Startup Requirement
612

713
**IMPORTANT:** If the session context shows "## Pending History Import" with conversations to import, you MUST immediately use `AskUserQuestion` to offer the user:
@@ -75,6 +81,7 @@ Container-internal (set in docker-compose.yml):
7581
- Avoid redundant comments
7682
- Keep names short and precise
7783
- Use enums for finite string value sets
84+
- Never use lazy/defensive exception catching (e.g. bare `except:` or `except Exception:`) — let errors surface with specific types so root causes are visible
7885

7986
## Architecture
8087

README.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
- [doc/DEVELOPMENT.md](doc/DEVELOPMENT.md) — Development setup
1010
- [doc/PROJECT_VISION.md](doc/PROJECT_VISION.md) — Full conceptual architecture
11+
- [doc/NEO4J_COOKBOOK.md](doc/NEO4J_COOKBOOK.md) — Query recipes for exploring the graph
1112
- [doc/TELEMETRY.md](doc/TELEMETRY.md) — Enterprise metrics framework
1213
- [doc/IMPLEMENTATION_PLAN.md](doc/IMPLEMENTATION_PLAN.md) — Phase 1 build specs
1314

@@ -75,19 +76,21 @@ Once containers are running, access:
7576
In Neo4j Browser (http://localhost:7474), try these queries:
7677

7778
```cypher
78-
# See all nodes and relationships
79-
MATCH (n)-[r]->(m) RETURN n, r, m LIMIT 100
80-
81-
# View decisions for a specific project
82-
MATCH (s:Session)-[:HAS_DECISION]->(d:Decision)
83-
WHERE s.projectName = 'your-project'
79+
// Your decision history — sessions with their decisions
80+
MATCH (s:Session {project: 'your-project'})-[:DECIDED]->(d:Decision)
8481
RETURN s, d
8582
86-
# See the full session structure
87-
MATCH (s:Session)-[r]->(n) RETURN s, r, n LIMIT 50
83+
// Full knowledge graph — sessions, decisions, corrections, insights
84+
MATCH (s:Session {project: 'your-project'})-[r]->(n)
85+
RETURN s, r, n
86+
LIMIT 100
87+
88+
// Learning from mistakes — corrections over time
89+
MATCH (s:Session {project: 'your-project'})-[:CORRECTED]->(c:Correction)
90+
RETURN s, c
8891
```
8992

90-
Click any node in the visualization to expand its connections. The graph view shows how sessions, decisions, corrections, and other memory types relate to each other.
93+
Click any node to expand connections. See [doc/NEO4J_COOKBOOK.md](doc/NEO4J_COOKBOOK.md) for more queries.
9194

9295
---
9396

dashboard/app.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""Flask dashboard for ccmemory."""
22

3+
import logging
34
import os
45

56
if os.getenv("GEVENT_SUPPORT") == "True":
@@ -25,6 +26,13 @@
2526
app.debug = False
2627
app.config["MAX_CONTENT_LENGTH"] = 50 * 1024 * 1024 # 50MB max upload
2728

29+
if os.getenv("FLASK_DEBUG") or os.getenv("GEVENT_SUPPORT"):
30+
logging.basicConfig(
31+
level=logging.INFO,
32+
format="%(asctime)s %(levelname)s %(message)s",
33+
datefmt="%Y-%m-%d %H:%M:%S",
34+
)
35+
2836
MCP_LOG = os.getenv("CCMEMORY_MCP_LOG", "instance/mcp.jsonl")
2937
NEO4J_LOG = os.getenv("CCMEMORY_NEO4J_LOG", "instance/neo4j.log")
3038

dashboard/templates/dashboard.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ <h2 class="title is-5 mb-0">Developer Console</h2>
220220
<button class="button filter-btn is-active" data-cat="hook" onclick="toggleFilter('hook', this)">Hooks</button>
221221
<button class="button filter-btn is-active" data-cat="tool" onclick="toggleFilter('tool', this)">Tools</button>
222222
<button class="button filter-btn is-active" data-cat="neo4j" onclick="toggleFilter('neo4j', this)">Neo4j</button>
223+
<button class="button filter-btn is-active" data-cat="prompt" onclick="toggleFilter('prompt', this)">Prompts</button>
223224
<button class="button is-small" onclick="clearConsole()">Clear</button>
224225
</div>
225226
</div>
@@ -425,7 +426,7 @@ <h2 class="title is-5 mb-0">Developer Console</h2>
425426
loadProjects();
426427

427428
// Developer Console WebSocket
428-
const filters = {hook: true, tool: true, neo4j: true, mcp: true};
429+
const filters = {hook: true, tool: true, neo4j: true, mcp: true, prompt: true};
429430
let ws;
430431
let reconnectDelay = 1000;
431432

@@ -463,6 +464,7 @@ <h2 class="title is-5 mb-0">Developer Console</h2>
463464
'hook': 'has-text-info',
464465
'tool': 'has-text-success',
465466
'neo4j': 'has-text-warning',
467+
'prompt': 'has-text-warning',
466468
}[cat] || 'has-text-grey';
467469
div.className = categoryClass;
468470
if (log.error || log.level === 'ERROR') div.classList.add('has-text-danger');

0 commit comments

Comments
 (0)