Standalone observed-fact graph substrate for code and document structure
Project description
PragmaGraph
Standalone observed-fact graph substrate for code and document structure.
pragmagraph is a standalone observed-fact graph substrate for code and
document structure. The name comes from Greek pragma (πρᾶγμα), meaning a
deed, matter, fact, or thing done; in this package it frames the third brain as
a graph of reproducible structure: files, symbols, document sections, artifacts,
references, commits, and other facts an indexer can recover from source.
Use it when you want reproducible code, docs, git, and artifact facts that an indexer can recover without an LLM.
This semantic alpha includes deterministic DTOs, JSON snapshots, local code/document indexing, refresh manifests, structural deltas, query helpers, local service contracts, reports, exports, Graphify-shaped interop, benchmark helpers, and CLI commands for observed-fact graph work.
Trust and Brand Safety
- Official GitHub:
https://github.com/openminion/pragmagraph - Official website:
https://www.openminion.com - Official X account:
https://x.com/OpenMinion
pragmagraph has no official token, coin, NFT, airdrop, staking program,
treasury product, or investment offering. Any claim otherwise is unauthorized
and should be treated as a scam.
At a glance
- Current public package line:
0.0.4alpha - Best fit when: you want reproducible code, docs, git, and artifact facts that an indexer can recover without an LLM
- Public shape: deterministic DTOs, local indexing, query/report/export helpers, refresh manifests, and package-local service/workspace/UI preview contracts
- Relationship to the rest of the family: PragmaGraph is the observed-fact graph lane; Sophiagraph remains the durable-memory lane
- Not the claim: no hosted service, prompt orchestration, memory promotion, or implicit runtime-side inference lives here
- Preferred package validation gate:
make check, withmake release-checkfor release proof
Boundary
- Sophiagraph owns inferred, judged, lossy durable memory.
- PragmaGraph owns observed, indexer-extracted, reproducible facts and deeds.
- Graphify remains a third-brain adapter. PragmaGraph is the native package surface for OpenMinion's observed-fact graph lane, not a relabeling of Graphify.
Practical rule: if a parser, static analyzer, doc walker, git reader, or shell
command can reproduce the fact without an LLM, it belongs in PragmaGraph. If it
depends on a preference, operator pin, summary, design judgment, or memory
consolidation decision, it belongs in Sophiagraph. Sophiagraph may cite
PragmaGraph with pragma://... evidence references; PragmaGraph never stores
Sophiagraph's judgments.
What PragmaGraph provides
The package currently provides:
- Core graph contracts: stable alpha import roots centered on
pragmagraph,contracts,models,query,storage,adapters,refresh,report,service, andworkspace, plus immutable DTOs for refs, nodes, edges, snapshots, queries, diagnostics, and health - Indexing: deterministic JSON snapshots and a local indexer for files, Markdown structure, Python AST facts, TypeScript/JavaScript structure, selected config metadata, snippets, and git-history overlays
- Query and refresh: neighborhood/path/explain/impact helpers, reverse-edge lookups, content-hash refresh manifests, structural deltas, saved refresh profiles, explicit refresh state reporting, compact repo-map handoffs, and query-plan evidence
- Storage interchange: canonical JSON snapshot stores, local SQLite materialized stores, typed store manifests, capability reports, import/export commands, and store-backed query/service routing
- Reports, export, and interop: structural reports, DOT/Mermaid export, Graphify-shaped JSON interchange, stable symbol/reference interchange, topology/doc-graph views, git lineage, parser-support metadata, and certification packs
- Local runtime surfaces: stdio query service contracts, persistent workspace
helpers,
serve --workspace, and the package-local visual preview boundary underpragmagraph.ui - Operational support: benchmark helpers, repo-local regression fixtures, gitignore-aware indexing/security rules, CLI commands, install smoke, and compatibility/release docs
What PragmaGraph does not provide yet
This package does not currently provide:
- KuzuDB, Neo4j, hosted, vector, or typed-edge storage
- Graphify runtime API wrapping or Graphify replacement behavior
- file watchers, git hooks, daemons, or scheduled refresh
- MCP, HTTP, WebSocket, or hosted service transports
- OpenMinion runtime provider wiring
- prompt context merging
- the actual hosted operator-facing workbench runtime UI (that belongs to
OpenMinion;
pragmagraph.uiowns the package adapter and typed boundary, while GraphFakos owns the shared local viewer shell) - semantic inference from prose or model output
- automatic Sophiagraph memory writes or promotion
Those features belong to follow-on releases or to OpenMinion's provider adapter layer.
Install
Install from PyPI:
python3.11 -m pip install pragmagraph
Editable install during local development:
python3.11 -m pip install -e .
Install with development tools:
python3.11 -m pip install -e ".[dev]"
Install with the optional precise TypeScript/JavaScript parser family:
python3.11 -m pip install -e ".[precise]"
Wheel build:
python3.11 -m build
Standalone Smoke
Source-root smoke:
PYTHONPATH=src python3.11 -m pragmagraph --json
Installed-console-script smoke:
pragmagraph-smoke --json
Expected output is deterministic JSON with the package name, version, status,
stable import roots, and semantic_contract: true.
Docs and release
docs/README.mdsummarizes the package-local docs contract.API_COMPATIBILITY.mdrecords the supported public import roots and top-level export policy.RELEASING.mdrecords the package-local release and PyPI publish flow.docs/service-mode.mdrecords the local service request/response contract, including parser provenance in capabilities and health payloads.docs/workspace-mode.mdrecords the persistent local workspace contract.docs/refresh-operations.mdrecords the package-owned explicit refresh/profile/status contract.docs/report-mode.mdrecords the structural report contract.docs/export-mode.mdrecords the deterministic export contract.docs/graphify-interop.mdrecords the deterministic Graphify interchange contract.docs/benchmarking.mdrecords the benchmark surface and readiness posture.docs/git-history-mode.mdrecords the local git-overlay contract, privacy posture, and CLI shape.docs/advanced-structural-views.mdrecords symbol/reference interchange, topology, document-graph, query-plan, git-lineage, parser-support, and certification helper surfaces.docs/ui-contracts.mdrecords the package-owned UI boundary contract.docs/source-tree-owner-map.mdexplains the source-tree module layout and public-vs-repo-local boundary.scripts/release_check.pyis the canonical release smoke entrypoint.tests/fixtures/repos/andtests/contracts/hold repo-local regression fixtures and OpenMinion contract snapshots; they are validation assets, not public package API.
License and brand-use boundary
- Source code license:
Apache-2.0 - Brand/trademark grant:
none
The software license grants rights to use, modify, and redistribute the code. It does not grant rights to use the PragmaGraph, Sophiagraph, or OpenMinion names, logos, branding, website identity, or social identity except for truthful attribution. Forks, clones, and derivative distributions must not present themselves as the official PragmaGraph project or imply affiliation, endorsement, or maintenance by PragmaGraph or OpenMinion contributors unless that is actually true.
CLI Quickstart
Index a local code/docs root into a deterministic JSON snapshot:
pragmagraph index . \
--out .pragmagraph/snapshot.json \
--namespace my-project \
--git-identity-mode name_email_hash \
--json
Query the snapshot:
pragmagraph query .pragmagraph/snapshot.json "RuntimeGraph" --json
Refresh and explain with deterministic metadata:
pragmagraph refresh . \
--out .pragmagraph/snapshot.json \
--manifest-out .pragmagraph/manifest.json \
--namespace my-project \
--json
pragmagraph explain .pragmagraph/snapshot.json "RuntimeGraph" --json
Inspect git-aware provenance:
pragmagraph git-commits-for-path .pragmagraph/snapshot.json src/app.py --json
pragmagraph git-files-for-commit .pragmagraph/snapshot.json abc123def456 --json
pragmagraph git-commits-for-symbol \
.pragmagraph/snapshot.json \
"pragma://my-project/python_class/src/app.py:RuntimeGraph" \
--json
Inspect nearby graph facts:
pragmagraph neighborhood .pragmagraph/snapshot.json \
"pragma://my-project/file/src/app.py" --json
Check health:
pragmagraph health .pragmagraph/snapshot.json --json
Inspect impact and reverse edges:
pragmagraph neighborhood .pragmagraph/snapshot.json \
"pragma://my-project/module/src/app.py" \
--edge-kind imports \
--json
Run the local query service against a saved snapshot:
pragmagraph serve --snapshot .pragmagraph/snapshot.json
Build and query a local SQLite materialized store:
pragmagraph store-import .pragmagraph/snapshot.json \
--out .pragmagraph/graph.sqlite
pragmagraph store-query .pragmagraph/graph.sqlite RuntimeGraph --json
pragmagraph store-health .pragmagraph/graph.sqlite --json
Run the local query service against the materialized store:
pragmagraph serve --store .pragmagraph/graph.sqlite
Open the local visual UI against a saved snapshot:
pragmagraph-ui \
--snapshot .pragmagraph/snapshot.json \
--screen search \
--serve \
--open
Run the local query service against a repo root with explicit refresh support:
pragmagraph serve --root . --namespace my-project
Preview what an explicit refresh would touch:
pragmagraph refresh-plan . --manifest-in .pragmagraph/manifest.json --json
Create and run a repeatable explicit-refresh profile:
pragmagraph profile-init . \
--out .pragmagraph/profile.json \
--label my-project \
--namespace my-project \
--snapshot-out .pragmagraph/snapshot.json \
--manifest-out .pragmagraph/manifest.json \
--state-out .pragmagraph/status.json \
--json
pragmagraph profile-run .pragmagraph/profile.json --json
pragmagraph refresh-status .pragmagraph/status.json --json
Build a structural report:
pragmagraph report .pragmagraph/snapshot.json
pragmagraph report .pragmagraph/snapshot.json --json
Export graph text:
pragmagraph export .pragmagraph/snapshot.json --format dot
pragmagraph export .pragmagraph/snapshot.json --format mermaid
Benchmark a local repo:
pragmagraph benchmark /path/to/repo --namespace demo --query RuntimeGraph
pragmagraph benchmark /path/to/repo \
--namespace demo \
--query RuntimeGraph \
--json
Export and import Graphify-shaped JSON:
pragmagraph graphify-export .pragmagraph/snapshot.json > graphify.json
pragmagraph graphify-import graphify.json --out .pragmagraph/imported.json
External Consumer Quickstart
Minimal standalone flow for another framework or service:
import pragmagraph
snapshot = pragmagraph.index_path(".", namespace="example")
pragmagraph.save_snapshot(snapshot, ".pragmagraph/snapshot.json")
print(pragmagraph.PACKAGE_STATUS)
The package can also be checked from a shell:
python3.11 -m pragmagraph --json
Workspace quickstart:
pragmagraph workspace-init /path/to/repo --workspace .pragmagraph-workspace --json
Library consumers that want the typed workspace helpers can also import
pragmagraph.workspace directly.
Workspace visual UI:
pragmagraph-ui --workspace .pragmagraph-workspace --screen provider_status --serve
Reference docs:
- API_COMPATIBILITY.md — public import-root policy.
- docs/report-mode.md — structural report contract.
- docs/export-mode.md — deterministic graph exports.
- docs/benchmarking.md — benchmark/readiness surface.
- docs/storage-interchange.md — canonical snapshot and materialized store contract.
- docs/graphify-interop.md — Graphify-shaped JSON interchange.
- docs/workspace-mode.md — persistent local workspace contract.
- docs/certification-readiness-matrix.md — package/OpenMinion proof coverage.
- RELEASING.md — package-local release checks.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pragmagraph-0.0.4.tar.gz.
File metadata
- Download URL: pragmagraph-0.0.4.tar.gz
- Upload date:
- Size: 141.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dccb78f3daf06c7284134ea93b851d5d47d20ae2fbe4619acf5d8e1b04f30f85
|
|
| MD5 |
6a29b6ad26141b367e1b03b0fd76b4bf
|
|
| BLAKE2b-256 |
238947f78f87fd71508d20ab9fc2ba296df4c583092d1e44ae125551453693d6
|
Provenance
The following attestation bundles were made for pragmagraph-0.0.4.tar.gz:
Publisher:
release.yml on openminion/pragmagraph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pragmagraph-0.0.4.tar.gz -
Subject digest:
dccb78f3daf06c7284134ea93b851d5d47d20ae2fbe4619acf5d8e1b04f30f85 - Sigstore transparency entry: 2058326046
- Sigstore integration time:
-
Permalink:
openminion/pragmagraph@08e2d414c89eb92e3752b257fbfddbde03697191 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/openminion
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@08e2d414c89eb92e3752b257fbfddbde03697191 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pragmagraph-0.0.4-py3-none-any.whl.
File metadata
- Download URL: pragmagraph-0.0.4-py3-none-any.whl
- Upload date:
- Size: 105.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cb5b31ffaa4456f1e5dc6efa506dd68d7653a62a0837a994e77dad221d9129d
|
|
| MD5 |
9b8a00d2a406ca308d8439e345fc9705
|
|
| BLAKE2b-256 |
1497c1cef040d9f2e03c2b06471915fb14f518d90defc6f569cddb7af3ae450a
|
Provenance
The following attestation bundles were made for pragmagraph-0.0.4-py3-none-any.whl:
Publisher:
release.yml on openminion/pragmagraph
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pragmagraph-0.0.4-py3-none-any.whl -
Subject digest:
0cb5b31ffaa4456f1e5dc6efa506dd68d7653a62a0837a994e77dad221d9129d - Sigstore transparency entry: 2058326387
- Sigstore integration time:
-
Permalink:
openminion/pragmagraph@08e2d414c89eb92e3752b257fbfddbde03697191 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/openminion
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@08e2d414c89eb92e3752b257fbfddbde03697191 -
Trigger Event:
push
-
Statement type: