Metadata-Version: 2.4
Name: graphite-graph
Version: 0.1.2
Summary: Mavis-native knowledge graph skill. Cross-corpus (code, ops, notes, images) with PII-safe extraction and Mavis memory wiring.
Author: Mavis contributors
License: MIT License
        
        Copyright (c) 2026 Mavis contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://test.pypi.org/project/graphite-graph/
Project-URL: Repository, https://github.com/Mavis/graphite-graph
Project-URL: Issues, https://github.com/Mavis/graphite-graph/issues
Keywords: knowledge-graph,memory,agent,code-analysis,rag
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: networkx>=3.2
Provides-Extra: mcp
Requires-Dist: mcp>=1.0; extra == "mcp"
Provides-Extra: cluster
Requires-Dist: leidenalg>=0.10; extra == "cluster"
Requires-Dist: python-igraph>=0.11; extra == "cluster"
Provides-Extra: test
Requires-Dist: pytest>=7.4; extra == "test"
Provides-Extra: dev
Requires-Dist: graphite-graph[cluster,mcp,test]; extra == "dev"
Dynamic: license-file

# graphite-graph

Mavis-native knowledge graph skill. Cross-corpus (code, ops, notes), privacy-aware, and wired into Mavis memory.

The binary is **`gph`** (not `graphite`) to avoid colliding with the unrelated `graphite` PyPI package (text graph renderer, v0.71).

## What this is

A Mavis-shaped fork of [graphify](https://github.com/safishamsi/graphify), with three deliberate additions:

| | graphify | graphite-graph |
|---|---|---|
| Multi-corpus (code + ops + notes) | single-folder | unified `corpus` tag on every node |
| PII safety | none | `.graphite-redact` config + per-node `pii_level` |
| Memory wiring | memory folder (graphify #1441, in proposal) | writes back to `AGENTS.md` / `MEMORY.md` |
| Provenance | `EXTRACTED / INFERRED / AMBIGUOUS` | same — kept verbatim |
| Platform bet | cross-platform (Claude, Codex, OpenCode, ...) | Mavis + Python |
| Clustering | Leiden via graspologic | Leiden via `leidenalg` (Python-only) |
| CLI binary | `graphify` | `gph` (no collision) |

## Install

```bash
# base install — gets you build/query/path/explain/redact/inspect
pip install graphite-graph

# with clustering (Leiden)
pip install graphite-graph[cluster]

# with MCP server (so Mavis agents can query the graph live)
pip install graphite-graph[mcp]

# all of the above
pip install graphite-graph[cluster,mcp]
```

## Use

```
gph build ./corpus           # build graph
gph query "tenant"           # ask the graph
gph path "AuthService" "DB"  # shortest path
gph explain "RateLimiter"    # explain a node
gph serve ./graph.json       # expose as MCP server
```

## What you get

- `graphite-out/GRAPH_REPORT.md` — readable report (god nodes, surprising connections, communities, suggested questions)
- `graphite-out/graph.json` — persistent, queryable graph
- `graphite-out/graph.html` — interactive viewer (M2 stub; full viz landing soon)

## Status

M3 complete. TestPyPI: https://test.pypi.org/project/graphite-graph/0.1.0/. Production release pending after this preview.

| Milestone | Status |
|---|---|
| M0 — pipeline shape (code-only corpus) | done, 74 tests |
| M1 — multi-extractor (text, ops, image) | done, 101 tests |
| M2 — cluster + analyze + query + MCP | done, 128 tests |
| M3 — PII redaction + memory wiring + SKILL.md | done, 144 tests |
