slm_git_repo_manager · Developer Tools · 10-Plane Pure-CPU Agent

SLM Git Repo Manager

Lightweight local Git utility that processes raw diff streams and formats standards-compliant Conventional Commit messages offline.

02 / Standalone OS Harness Installers, CLI & Python SDK

In SLMAgents 2.0, SLM Git Repo Manager executes inside the 10-Plane Pure-CPU Agent Harness (slm_harness). Download a self-extracting Individual Agent + Harness OS Installer for macOS, Windows, or Linux (bundling slm_git_repo_manager + slm_harness + the ./slm CLI), install the full 26-agent desktop suite, or install via Python pip:

1. Individual SLM Git Repo Manager + 10-Plane Harness Installers (All OSes)

2. Full 26-Agent Studio & Desktop OS Installers

3. 10-Plane Harness CLI (./slm) & Python pip Installation

Terminal — 10-Plane Harness CLI & Pip
# Option A: Install via PyPI or editable source with the 10-Plane Harness
$ pip install slm-git-repo-manager
$ pip install -e ./slm_harness -e ./slm_git_repo_manager

# Option B: Run directly through the Unified 10-Plane Pure-CPU Harness CLI (./slm)
$ git diff --staged | ./slm ask "Generate a Conventional Commit message and PR summary"
$ ./slm chat   # Interactive Rich TUI with 18 slash commands (/trace, /models, /arena, /undo)
$ ./slm serve  # 100% Offline Web AI Studio + OpenAI /v1 API at http://127.0.0.1:7860

03 / 10-Plane Pure-CPU Harness Integration (slm_harness)

Rather than executing as an isolated prompt wrapper, SLM Git Repo Manager is natively orchestrated by the SLMAgents 2.0 10-Plane Pure-CPU Harness (via slm_harness.runtime.legacy_bridge and CascadeRouter). Every call benefits from hybrid llama.cpp GGUF (Q4_K_M) + Quantized INT4/INT8 CPU execution, watermarked LRU memory governance, grammar-constrained decoding, and deterministic verification at $0 API cost:

Harness PlaneSubsystemHow It Powers SLM Git Repo Manager on Pure CPU
Plane 6 CascadeRouter (<35ms) Stage 2 (git diff / Conventional Commit Signature) & Stage 3 (Embedding Margin)
Plane 2 & 5 MemoryArena & Hybrid CPU Runtime Specialist Role: coding (Qwen2.5-Coder-1.5B INT4 / Qwen3-4B GGUF Q4_K_M). Managed inside Watermark LRU MemoryArena (lite 2.6 GB / balanced 4.7 GB / power 8.2 GB) with zero-copy session sharing and automatic OOM tier step-down (8B -> 4B -> 3B -> 0.8B).
Plane 7 & 8 Deterministic Verifier & Governance Plane 1 ShadowSnapshotVFS (/undo, /rewind) + Plane 7 Conventional Commit Spec & Diff Hunk Verifier
Plane 1, 3 & 4 Kernel, Artifact Scratchpad & 4-Tier Memory SQLite WAL CheckpointStore (/fork, /rewind, /undo), content-addressed artifact://<sha12> handles to prevent prompt bloat, and hybrid SQLite FTS5 BM25 + HNSW vector memory.

04 / Source Checkout (Git Sparse-Checkout)

Clone this agent alongside the 10-Plane Pure-CPU Harness (slm_harness) from the monorepo using Git sparse-checkout — no need to download all 26 agents:

Option 1 — Sparse Checkout with 10-Plane Harness (Recommended)

Terminal — Git Sparse Checkout
# 1. Create and enter a new directory
$ mkdir slm_git_repo_manager_workspace && cd slm_git_repo_manager_workspace

# 2. Initialise empty git repo and add remote
$ git init
$ git remote add origin https://github.com/t00114218-stack/SLMAgents.git

# 3. Enable sparse-checkout for both slm_harness and slm_git_repo_manager
$ git sparse-checkout init --cone
$ git sparse-checkout set slm_harness slm_git_repo_manager

# 4. Pull the 10-Plane Harness and agent source
$ git pull origin main

Option 2 — Full Repository Clone

Terminal — Full Clone
$ git clone https://github.com/t00114218-stack/SLMAgents.git
$ cd SLMAgents
$ ./slm doctor

Note: After checkout, install the harness and agent in editable mode with pip install -e ./slm_harness -e ./slm_git_repo_manager or download the pre-packaged OS Harness Installer above.

05 / Configuration & API Reference

Constructor Parameters

ParameterType / DefaultDescription
model_pathstr | NoneExplicit path to GGUF (Q4_K_M) or quantized ONNX model directory. Defaults to zero-copy sharing via the 10-Plane Harness MemoryArena.
cache_dirstr | NoneHF model directory path. Also settable via SLM_GIT_REPO_MANAGER_CACHE_DIR.
n_ctxint | 2048Context window size in tokens. Also settable via SLM_GIT_REPO_MANAGER_N_CTX.
n_threadsint | 4CPU threads for the 10-Plane Pure-CPU Harness (auto-tuned to physical P-cores). Also settable via SLM_GIT_REPO_MANAGER_N_THREADS.
system_promptstr | NoneOptional custom system prompt instructions overriding the default template.
user_inputstr | NoneOptional additional user-supplied target parameters or variables.

generate_commit_message() Parameters

ParameterType / DefaultDescription
diff_textstrRequired. The raw output of your git diff script sequence.
streambool | FalseIf True, enables token streaming of the model's Conventional Commit generation in real-time. Returns a Python generator.
system_promptstr | NoneOptional custom system prompt instructions overriding the default template.
user_inputstr | NoneOptional additional user-supplied target parameters or variables.
Python Quick Start
from slm_git_repo_manager.git_repo_manager import SLMGitRepoManager

copilot = SLMGitRepoManager()

diff_data = """diff --git a/slm_core/orchestrator.py b/slm_core/orchestrator.py
--- a/slm_core/orchestrator.py
+++ b/slm_core/orchestrator.py
@@ -12,5 +12,12 @@ class SLMOrchestrator:
-        print("Running orchestrator route...")
+        logger.info("Initializing query router path routing details")
-        return self.fallback_run(query)
+        route = self.classifier.predict(query)
+        if route == "rag":
+            return self.rag_agent.query(query)

diff --git a/tests/test_orchestrator.py b/tests/test_orchestrator.py
--- a/tests/test_orchestrator.py
+++ b/tests/test_orchestrator.py
@@ -2,4 +2,9 @@
-def test_orchestrator():
+def test_orchestrator_routing():
"""

msg = copilot.generate_commit_message(diff_data)
print(msg)
# Output:
# feat(slm_core): Implement classifier-based routing in SLMOrchestrator
# - Replace print statement with structured logger info
# - Add test_orchestrator_routing to verify query routing

Conventional Commit Standards

The Git Repo Manager forces structural formatting that aligns strictly with standard guidelines:

  • Formats: <type>(<scope>): <description> followed by optional description paragraphs.
  • Permitted Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert.
  • Zero explanation output: Synthesizes only standard git message blocks without conversational prefaces.

🔀 Advanced Git Workflows

Git Repo Manager exposes advanced instance methods to automate local staging, commits, merges, and auto-conflict resolutions:

1. Automated Conventional Commit

Stages tracked changes, generates a message, and commits in a single line:

success, log_msg = copilot.commit()

2. Branch Merge and Conflict Resolution

Merges developer branches and automatically rewrites standard git conflict markers with combined resolutions from the local SLM model:

success, merge_status = copilot.merge("feature-branch")
if not success:
    resolution_results = copilot.resolve_conflicts()
    print("Resolved files:", resolution_results["resolved"])

🔌 VS Code Task Integration

You can run commit and conflict resolution workflows directly within your VS Code workspace using the task runner config. Add the following to your .vscode/tasks.json:

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "SLM Git: Auto-Commit Changes",
      "type": "shell",
      "command": "python -c \"from slm_git_repo_manager.git_repo_manager import SLMGitRepoManager; print(SLMGitRepoManager().commit()[1])\"",
      "problemMatcher": []
    },
    {
      "label": "SLM Git: Resolve Merge Conflicts",
      "type": "shell",
      "command": "python -c \"from slm_git_repo_manager.git_repo_manager import SLMGitRepoManager; print(SLMGitRepoManager().resolve_conflicts())\"",
      "problemMatcher": []
    }
  ]
}

Run these tasks by triggering the Command Palette (Cmd+Shift+P or Ctrl+Shift+P), selecting Run Task, and choosing the desired Git helper task.

Context Truncation Safeguard

Raw git diff outputs can scale to tens of thousands of tokens, which can overflow the context limits of small models or cause massive performance latency.

Optimized Context Window: The agent tracks diff text size. If it exceeds 4,000 characters, it slices the sequence and appends a truncation warning. This maintains high speed and resource safety while providing sufficient context for the model.