Skip to content

Jsofeng/NeuralCommit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NeuralCommit

NeuralCommit is an AI-native version control prototype: Git-shaped commands, a content-addressed object store, a SQLite commit DAG, local semantic search, and an autonomous review pipeline that runs on push.

Dashboard screenshot placeholder

flowchart LR
  CLI["nc CLI"] --> Store["Object Store SHA-256 blobs"]
  CLI --> DAG["SQLite Commit DAG"]
  CLI --> Vector["Local Vector Index"]
  CLI --> Agent["AI Agent Pipeline"]
  Agent --> A["Diff Analyzer"]
  A --> B["Bug & Vulnerability Scanner"]
  B --> C["Refactor Suggester"]
  C --> D["PR Summary Generator"]
  D --> E["Commit Scorer"]
  E --> DAG
  DAG --> API["FastAPI Dashboard Backend"]
  Vector --> API
  API --> UI["Self-contained Local Dashboard"]
Loading

What works locally

  • nc init creates .neuralcommit/ with objects, staging, config, SQLite metadata, and vector index.
  • nc add <files> stages snapshots and writes semantic change summaries.
  • nc commit --no-ai creates a commit, parent pointer, snapshot, conventional message, and searchable metadata.
  • nc diff, nc log, nc blame, nc rollback, and nc search work offline.
  • nc push --no-ai runs the local-safe agent pipeline and stores the report/score on the latest commit.
  • nc dashboard serves a local dashboard on http://localhost:3000.

How It Works

On nc push, NeuralCommit runs five agent steps using claude-sonnet-4-20250514 when ANTHROPIC_API_KEY is configured. Every call uses a system prompt, user prompt, structured JSON schema, and exponential backoff. If the SDK or key is unavailable, deterministic local fallbacks keep the tool usable.

  1. Diff Analyzer extracts changed files, likely developer intent, and a complexity score.
  2. Bug & Vulnerability Scanner flags bugs, injection risks, auth problems, exposed secrets, and severity.
  3. Refactor Suggester identifies code smells, duplication, and performance issues.
  4. PR Summary Generator turns the prior steps into a professional PR description.
  5. Commit Scorer scores quality, hygiene, tests, and docs from 0-100.

NeuralCommit vs Git

Feature Git NeuralCommit
Content-addressed snapshots Yes Yes, SHA-256 blobs
Staging area Yes Yes, with semantic summaries
Commit messages Manual Auto-generated conventional commits
Commit graph Files in .git SQLite DAG with metadata
Diff Raw text Diff plus inline AI annotations
Blame Author and commit Commit plus line-level rationale
Push Sync refs Sync concept plus agent review pipeline
Search Keyword/log tooling Natural language local vector search
Review External PR tools Built-in bug, security, refactor, PR summary, and score
Offline mode Yes Yes via --no-ai

Local Setup

python -m pip install -e ".[dev]"
nc init
echo "def hello(): return 'world'" > app.py
nc add app.py
nc commit --no-ai
nc push --no-ai
nc log
nc dashboard

For Claude-backed agent runs:

export ANTHROPIC_API_KEY="your-key"
nc push

Data Layer

  • .neuralcommit/objects/ stores content-addressed file blobs.
  • .neuralcommit/staging/index.json stores staged file metadata.
  • .neuralcommit/commits.db stores commits, parent pointers, file snapshots, scores, and agent reports.
  • .neuralcommit/vector_index.db stores local deterministic vectors for natural language search. The wrapper is intentionally isolated so ChromaDB plus all-MiniLM-L6-v2 can replace the fallback without touching the CLI.
  • .neuralcommit/config.json stores repo identity, remote URL, author, model, enabled agent steps, and severity threshold.

Dashboard

The dashboard is a FastAPI app serving a self-contained HTML/CSS/JS interface so it works in local and offline browser contexts. It shows:

  • Commit feed with RED/YELLOW/GREEN quality scores.
  • Agent report panel for selected commits.
  • Rolling repo health line chart.
  • High and critical security alerts.
  • Natural language search over commit metadata.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors