Metadata-Version: 2.4
Name: repodna-engine
Version: 1.0.1
Summary: RepoDNA — Developer Repository Intelligence Platform for AI agent context packing, architectural graph analysis, deep code intelligence, and live architecture monitoring.
Author-email: Cihan Akalın <250541107@firat.edu.tr>
License-Expression: MIT
Project-URL: Homepage, https://github.com/Cihanak1/RepoDNA
Project-URL: Repository, https://github.com/Cihanak1/RepoDNA.git
Project-URL: Issues, https://github.com/Cihanak1/RepoDNA/issues
Project-URL: Changelog, https://github.com/Cihanak1/RepoDNA/blob/main/CHANGELOG.md
Project-URL: Security, https://github.com/Cihanak1/RepoDNA/blob/main/SECURITY.md
Keywords: static-analysis,architecture,dependency-graph,circular-dependencies,tree-sitter,code-health,developer-tools
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi>=0.115.0
Requires-Dist: uvicorn[standard]>=0.30.0
Requires-Dist: pydantic>=2.9.0
Requires-Dist: tree-sitter>=0.23.0
Requires-Dist: tree-sitter-python>=0.23.0
Requires-Dist: tree-sitter-javascript>=0.23.0
Requires-Dist: tree-sitter-typescript>=0.23.0
Requires-Dist: tree-sitter-go>=0.23.0
Requires-Dist: tree-sitter-rust>=0.23.0
Requires-Dist: tree-sitter-c-sharp>=0.23.0
Requires-Dist: tree-sitter-java>=0.23.0
Requires-Dist: tree-sitter-c>=0.23.0
Requires-Dist: tree-sitter-cpp>=0.23.0
Requires-Dist: mcp>=2.0.0
Requires-Dist: PyYAML>=6.0.0
Requires-Dist: pathspec>=0.11.0
Requires-Dist: watchfiles>=1.0.0
Provides-Extra: tokenizer
Requires-Dist: tiktoken>=0.7.0; extra == "tokenizer"
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.24.0; extra == "dev"
Requires-Dist: httpx>=0.27.0; extra == "dev"
Requires-Dist: ruff>=0.7.0; extra == "dev"
Requires-Dist: mypy>=1.11.0; extra == "dev"
Dynamic: license-file

# RepoDNA — Architecture & Code Intelligence Workstation

[![CI](https://github.com/Cihanak1/RepoDNA/actions/workflows/ci.yml/badge.svg)](https://github.com/Cihanak1/RepoDNA/actions/workflows/ci.yml)
[![Release](https://img.shields.io/badge/release-v1.0.1-38bdf8)](https://github.com/Cihanak1/RepoDNA/releases)
[![Python 3.12+](https://img.shields.io/badge/python-3.12%2B-3776ab?logo=python&logoColor=white)](https://www.python.org/)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.7%20%2F%205.8-3178c6?logo=typescript&logoColor=white)](https://www.typescriptlang.org/)
[![License: MIT](https://img.shields.io/badge/License-MIT-10b981.svg)](./LICENSE)

**RepoDNA** is a local-first repository architecture, deep code quality, multi-repository, and AI agent intelligence platform with zero execution of analyzed target repository code.

| Professional Workstation (1440×900) | Code Quality & Complexity (1440×900) |
| :---: | :---: |
| ![Agent Workstation Desktop](./docs/design/after/agent-workstation-1440x900.png) | ![Quality Overview](./docs/design/after/quality-overview-1440.png) |

---

## Quickstart

Install from the verified [GitHub Release v1.0.1](https://github.com/Cihanak1/RepoDNA/releases/tag/v1.0.1) wheel (bundles the full production React Workstation UI — no Node.js build required):

```bash
# 1. Install the official release wheel into a Python 3.12+ virtual environment
pip install repodna_engine-1.0.1-py3-none-any.whl

# 2. Verify environment & ecosystem health
repodna --version
repodna doctor

# 3. Launch the local Workstation UI at http://127.0.0.1:8000 (auto-enables per-launch session auth)
repodna start --open-browser

# 4. Run CLI analysis or try the included multi-repository demo workspace
repodna analyze . --format json
repodna workspace analyze demo/repodna-workspace.yml --format json
```

> **Package Naming Notice:** The PyPI name `repodna` belongs to an unrelated third-party project (`github.com/repodna/repodna`). Do **not** run `pip install repodna`. RepoDNA's Python distribution name is `repodna-engine` (preserving `import repodna` and the `repodna` CLI command).

---

## Core Capabilities

- **9-Language Tree-sitter AST Analysis**: Python, TypeScript, JavaScript, Go, Rust, C#, Java, C, and C++ with bounded complexity contributors, Winnowing Type-1/Type-2 clone detection, conservative unused-code candidates, static test relationship mapping, AST security signals (with `[REDACTED]` secret masking), and validated SARIF 2.1.0 export.
- **Architecture Graph, Guardian, Time Machine & Refactoring Advisor**: Dependency graphs, circular dependency detection, declarative architecture contracts, Git commit history evolution, and graph-theoretic refactoring recommendations.
- **Live Architecture Engine**: Opt-in local filesystem monitoring with debounced incremental reconciliation, bounded SSE event streaming, and independent core/quality freshness tracking.
- **AI Agent Intelligence & 47 Read-Only MCP Tools**: Deterministic EN/TR task localization, signature-first repository maps, token-budgeted context packing (`exact` vs `estimated` tokenizer disclosure), acknowledged delta packs, read-only change preflight/patch/postflight verification, and 47 read-only MCP tools (`--tool-profile minimal|architecture|code-intelligence|full`).
- **Multi-Repository Intelligence**: Explicit `repodna-workspace.yml` federation, canonical repository identity (preventing basename collisions), multilingual package & version constraint checks, static service cataloging, SSRF-safe OpenAPI 3.0/3.1 parsing, variance-aware structural compatibility, and bounded cross-repository change impact.
- **Professional Workstation & Developer Ecosystem**: 7-domain Activity Rail, Unified Findings table (`25` rows/page), Report Center, Light/Dark/High-Contrast themes, TR/EN localization, declarative zero-execution Plugin SDK (`sdk/`), VS Code extension (`extensions/vscode/`), fork-safe Composite GitHub Action (`integrations/github-action/`), and hardened non-root Docker image (`docker/`).

---

## Verified Performance & Accuracy Summary

- **v1.0.1 Held-Out AI Retrieval & Negative-Task Abstention** ([`benchmarks/results/v101_ai_retrieval_abstention.json`](./benchmarks/results/v101_ai_retrieval_abstention.json)): **91.67%** File Recall@5 (`12` positive tasks) and **86.67%** negative-task abstention accuracy (`13/15` out-of-scope tasks) using the estimated local tokenizer (`heuristic_code_v1`). Earlier `v0.11.0` 11-repo / 52-task benchmark archived in [`docs/agent/BENCHMARKS.md`](./docs/agent/BENCHMARKS.md).
- **v1.0.1 Large Repository Stress Benchmarks** ([`benchmarks/results/v101_large_repo_stress.json`](./benchmarks/results/v101_large_repo_stress.json)): Real `RepoDNA` (`504` files, `93,316` LOC) `1,046 ms` cold → `261 ms` warm (`4.02×`); synthetic `1,050` files `1,789 ms` → `555 ms` (`3.22×`); synthetic `5,050` files `12,622 ms` → `4,836 ms` (`2.61×`, `120 MB` RSS).
- **v1.0.1 Real Open-Source Multi-Repository Validation** ([`benchmarks/results/v100_real_multi_repo_validation.json`](./benchmarks/results/v100_real_multi_repo_validation.json)):
  - Pallets Stack (`markupsafe@3.0.2` + `jinja@3.1.5` + `flask@3.1.0`, `402` files, `N=2` declared package edges): **2/2** precision/recall, `3/3` warm reuse (`3,840 ms` → `911 ms`).
  - Encode HTTP Stack (`httpcore@1.0.7` + `httpx@0.28.1`, `205` files, `N=1` declared package edge): **1/1** precision/recall, `2/2` warm reuse (`2,577 ms` → `557 ms`).
  - *(Small sample caveat: these 3 edges validate Python package declarations only and do not imply 100% general cross-ecosystem accuracy.)*
- **Declarative Plugin Overhead (v0.11.0 baseline)** ([`docs/ecosystem/BENCHMARKS.md`](./docs/ecosystem/BENCHMARKS.md)): `0.925 ms` median evaluation across 4 rule packs on 388 files (`0.172%` of core analysis time).

---

## Security Model & Known Limitations

- **Zero-Execution & Local-First**: RepoDNA never executes target repository code, build scripts, tests, Docker Compose commands, or Python plugins, and never sends source code to external services. See [`SECURITY.md`](./SECURITY.md) and [`docs/release/THREAT-MODEL.md`](./docs/release/THREAT-MODEL.md).
- **Honest Boundaries**:
  - Static AST analysis is **not** compiler semantic analysis and does **not** replace runtime test suites.
  - Static test mapping is **not** runtime code coverage; AST security signals are **not** confirmed vulnerabilities.
  - Estimated context tokens are **not** LLM billing tokens; no independent external AI agent A/B study or external human UX study is claimed.
  - Full structural API compatibility currently covers **OpenAPI 3.0/3.1**; Protobuf, AsyncAPI, and GraphQL are marked `PARTIAL`/`UNSUPPORTED`.
  - External registries (PyPI, VS Code Marketplace, Open VSX, GitHub Marketplace, GHCR) are currently `NOT PUBLISHED` pending maintainer registry credentials; official artifacts are published on GitHub Releases with SHA-256 checksums and a CycloneDX 1.5 SBOM.

---

## Documentation & Contributing

- [Public API Freeze (`v1.0.0`)](./docs/release/PUBLIC-API-FREEZE.md) · [Threat Model](./docs/release/THREAT-MODEL.md) · [40-Point Go/No-Go Review](./docs/release/GO-NO-GO-REVIEW.md)
- [Workstation Guides](./docs/workstation/INFORMATION-ARCHITECTURE.md) · [Multi-Repository Guides](./docs/multi-repo/ARCHITECTURE.md) · [Ecosystem & Plugin SDK](./docs/ecosystem/INSTALLATION.md)
- [Reproducible Demo Workspace](./demo/README.md) · [Contributing Guide](./CONTRIBUTING.md) · [Security Policy](./SECURITY.md) · [Changelog](./CHANGELOG.md)

Licensed under the [MIT License](./LICENSE).
