HomeToolsArchitecture QuickstartBenchmarksPatterns Main Site
Research Flow
Explore, understand, discover gaps
𝔻
Code Change
Safe modification with blast radius
Build Loop
Iterative build with graph learning
Session Recovery
Resume context across sessions

Research Flow

For exploring an unfamiliar area of the codebase. Ask broad questions, narrow down, find gaps, and teach the graph what worked.

ingest
Load code
activate
Explore topic
why
Trace links
missing
Find gaps
learn
Feedback
1
ingest
Load the codebase into the graph. Use mode: "full" for first time, "incremental" after.
2
activate
Query the topic broadly. Start with depth 3, threshold 0.3 for maximum coverage.
3
why
For interesting connections in the results, trace the path between them. "Why does auth relate to billing?"
4
missing
Identify what the research did not find. Gaps and structural holes in the topic area.
5
learn
Provide feedback. "correct" if the activation results were useful, "wrong" if they led astray.
// Research flow example: understanding the auth system m1nd.ingest({ "source": "./backend", "mode": "incremental" }) m1nd.activate({ "query": "authentication and authorization", "depth": 3 }) // Returns: auth_middleware, jwt_handler, rbac_guard, session_store, ... m1nd.why({ "from": "jwt_handler", "to": "session_store" }) // Returns: jwt_handler -> token_validator -> session_lookup -> session_store m1nd.missing({ "context": "authentication" }) // Returns: No rate limiting on login endpoint, no token rotation m1nd.learn({ "query": "authentication and authorization", "feedback": "correct" })

Code Change Flow

For safely modifying existing code. Understand the blast radius before touching anything, then verify completeness after.

𝔻
impact
Blast radius
𝔻
predict
Co-changes
𝔻
counterfactual
Simulate
warmup
Prime
1
impact
Check the blast radius of your planned change. How many other files are affected? Which tests might break?
2
predict
Based on co-change history, what other files typically change alongside your target? Do not miss them.
3
counterfactual
If removing or significantly changing the module, simulate the removal. What breaks? What becomes orphaned?
4
warmup
Prime the graph for the change task. Subsequent queries in this area will be faster and more precise.
// Code change flow: refactoring the database layer m1nd.impact({ "node": "database_pool.py", "depth": 4 }) // Returns: 23 affected modules, 5 direct dependents, 18 transitive m1nd.predict({ "changed_nodes": ["database_pool.py"] }) // Returns: database_config.py (0.95), migration_runner.py (0.88), test_db.py (0.82) m1nd.counterfactual({ "remove_nodes": ["legacy_db_adapter"] }) // Returns: 2 orphaned modules, 0 broken paths (safe to remove!) m1nd.warmup({ "context": "database pool refactoring and connection management" })

Build Loop

For iterative development. After each module is built, update the graph, get feedback, and prepare for the next module. The graph improves with each iteration.

// Build loop: constructing a new feature module by module // Module 1: API routes // ... write the code ... m1nd.ingest({ "source": "./backend", "mode": "incremental" }) m1nd.learn({ "query": "new feature routes", "feedback": "correct" }) m1nd.predict({ "changed_nodes": ["feature_routes.py"] }) // Returns: feature_models.py (predicted), feature_tests.py (predicted) m1nd.warmup({ "context": "building feature models and validation" }) // Module 2: Models (predicted by the graph) // ... write the code ... m1nd.ingest({ "source": "./backend", "mode": "incremental" }) m1nd.learn({ "query": "feature models", "feedback": "correct" }) // ... continue loop ...
Compounding Intelligence

Each learn call makes the graph smarter. By the 3rd iteration, predict is significantly more accurate because it has observed your co-change patterns for this feature. This is Hebbian plasticity in action.

Session Recovery

When you start a new session (new agent instance, new day, after compaction), use this pattern to recover your context from the persisted graph state.

health
Verify alive
drift
What changed
ingest
Update graph
warmup
Resume task
// Session recovery: starting fresh, graph persisted from last session m1nd.health({}) // Returns: healthy, 2341 nodes, 4892 edges, uptime: 3s m1nd.drift({ "since": "last_session" }) // Returns: 14 weight changes, 3 new Hebbian strengthenings in auth subgraph m1nd.ingest({ "source": "./backend", "mode": "incremental" }) // Returns: 5 files changed since last ingest, graph updated m1nd.warmup({ "context": "resuming auth refactoring from yesterday" }) // Graph primed with auth subgraph pre-activated. Ready to work.
Graph Persistence

The graph auto-persists to disk. When m1nd restarts, it loads the full graph including all learned weights. Your learn feedback from previous sessions carries forward. The graph remembers even when the agent forgets.

Multi-Agent Coordination

Multiple agents can share the same m1nd instance. Writes from one agent are instantly visible to all others. Use locks to coordinate concurrent work on the same subgraph.

Agent A
Researching auth
Agent B
Building API routes
SharedGraph
1 m1nd instance
Real-time visibility
// Agent A: lock the auth subgraph while working on it m1nd.lock_create({ "scope": "backend/auth/", "agent_id": "agent-a" }) // Returns: lock_id = "lock-abc123" // Agent A: periodically check if anyone else modified the locked region m1nd.lock_diff({ "lock_id": "lock-abc123", "agent_id": "agent-a" }) // Returns: Agent B modified user_model.py (edge to auth_middleware changed) // Agent A: accept the changes and rebase m1nd.lock_rebase({ "lock_id": "lock-abc123", "agent_id": "agent-a" }) // Agent A: done, release the lock m1nd.lock_release({ "lock_id": "lock-abc123", "agent_id": "agent-a" })