@digital-lake/lognexus

中文文档
1.3.6发布于 2026/11/12MITTypeScriptES Module构建来源已验证近 30 天下载 4066

The Universal, Git-powered context & rules framework for native AI agents (Claude, OpenAI, Gemini, DeepSeek) across Linux, macOS, and Windows. Scaffolding CLI, native MCP server, and repository governance.

原始使用文档
文档目录23 节
  1. What is LogNexus?
  2. Key Features
  3. Model-Tier Routing Matrix
  4. Operational Tiers
  5. Example Deployment Setups
  6. Quickstart & Golden Path
  7. 1. Capture the Plan
  8. 2. Start Work on a Clean Branch
  9. 3. Commit with Traceability
  10. 4. Synthesize the Pull Request
  11. 5. Cross-Model Review & Gate Verification
  12. Installation & Setup
  13. 1. Scaffold Rules & Manage State with the CLI
  14. 2. Connect via Model Context Protocol (MCP)
  15. 3. Install Rules in Your Agent Environment
  16. ⚡ Production Telemetry & Field Benchmark
  17. Multi-Model Swarm Performance Matrix
  18. Disambiguation
  19. 🛡️ Verified Quality & Supply-Chain Security
  20. Provenance & Identities
  21. Based on & Acknowledgments
  22. Did you find this project useful? 🤖⚡
  23. License

LogNexus Logo

LogNexus

The Universal, Git-Powered Context & Rules Framework for Native AI Agents

CI npm version npm downloads LogNexus MCP server – quality and maintenance score on Glama Organization Ko-fi

SLSA Provenance Socket Security MCP TDQS TypeScript Node.js Platforms Privacy License: MIT


What is LogNexus?

As AI coding agents take on complex engineering tasks across different IDEs, they suffer from a fundamental failure mode: cognitive amnesia. Between conversation resets, context compactations, model handoffs, and unexpected bugs, the why behind design decisions, discarded alternatives, and technical discoveries vanishes.

LogNexus transforms Git and GitHub into a persistent, traceable knowledge graph. It is a 100% generic, model-agnostic and editor-agnostic framework that operates directly inside your native AI development environments:

  • Clients: Claude Code, Cursor, Codex, Google Antigravity, Kimi Code, VS Code, Zed.
  • Models: Google Gemini (Gemini 4 Argon, Gemini 4 Carbon, Gemini 3.8 Pro & Flash High), Moonshot AI (Kimi K3 / Kimi Code), DeepSeek (R1, V3, Chat), Anthropic Claude, OpenAI.
  • Supported Platforms: Linux, macOS, and Windows (linux, darwin, win32 — 100% cross-platform Node.js >= 20 & Git >= 2.28, zero native binary dependencies).
Issues (Why & Goals) ──▶ Branches (Task Scopes) ──▶ Commits (Context & Diffs) ──▶ PR (Timeline & Review)
         ▲                                                                                 │
         └─────────────────────── Git-Backed Knowledge Graph ──────────────────────────────┘

Framework, Not an API Proxy: LogNexus never intercepts network calls or wraps vendor APIs. Your models remain inside their native IDEs with full access to editor buffers, interactive diff viewers, terminals, MCP servers, and local tools.


Key Features

  • Universal Multi-Model Support: Native cognitive guidelines and prompt specifications for Google Gemini (Gemini 4 Argon, Gemini 4 Carbon, Gemini 3.8 Pro & Flash High), Moonshot AI (Kimi K3 / Kimi Code), DeepSeek (R1, V3, Chat), Anthropic Claude, and OpenAI.
  • Universal Client Compatibility: Drop-in support for Claude Code, Cursor, Codex, Google Antigravity, and Kimi Code / VS Code.
  • Atomic Commit Engine (lognexus commit & MCP lognexus_commit): Validates subtask file contracts, verifies reviewer separation, injects authorship trailers, commits changes, marks subtasks completed, and attaches Git Notes in a single ~0.15s execution.
  • Cross-Model Review Gates: Non-negotiable review separation (Authored-by: vs Reviewed-by:) enforced both at pre-flight note attachment time and during branch audits. No model merges its own code without independent verification from another model family.
  • Contract-First Subtasks & Alphanumeric Tickets: Tasks are bounded by strict decision budgets, file allowlists, and stop conditions—supporting both GitHub issues (feat(#42/T1)) and Jira/Linear ticket schemes (feat(SLM-201/T1)).
  • Persistent State & Session Recovery: Local session state engine (.lognexus/state.json) prevents amnesia across context compactations and conversation resets, retaining completed subtask metadata through the closing commit.
  • Automated Context Handoff (lognexus handoff): Regenerates a complete .lognexus/handoff.md from local state — cycle state, active subtask contract, live scope-drift report, completed-subtask table and next required action — so a fresh session (or a different model) resumes without re-deriving context. Auto-refreshed on state set-task and on every --finish-task commit.
  • Live Scope-Drift Guard (lognexus status / lognexus doctor): Diffs the working tree against the allowedFiles of the active contract on every status and diagnostic run, catching out-of-contract writes before they reach a commit.
  • Memory Recall Filter (lognexus note search): Queries the LogNexus Git Notes history by file, model, issue or free text, returning the newest matches first — the reasoning behind a decision stays retrievable months later.
  • Startup Update & Legal Terms Gate: A non-interactive gate surfaces update and legal-terms requirements at CLI startup, consulting the npm registry through execFileSync with shell: false and a 2500 ms timeout. The MCP transport is exempt.
  • Git Notes Engine (Quiet Mode / git-ai v3): Attaches structured session payloads and contracts to commits under refs/notes/lognexus without changing commit SHAs.
  • Native MCP Stdio Server (lognexus mcp): Zero-dependency JSON-RPC 2.0 stdio server exposing LogNexus tools, live state resources, and prompts to Claude Desktop, Cursor, and any MCP client.
  • Journey Timeline & Review Gate Audit: Reconstructs the complete branch journey into structured PR descriptions (lognexus timeline --pr-body) and programmatically audits review gate separation (lognexus audit).
  • Hidden Metadata Envelopes: HTML comments preserve machine-parseable state (<!-- lognexus: kind: state ... -->) without cluttering human-readable markdown.
  • Scaffolding & Health CLI (@digital-lake/lognexus): Lightweight CLI for repository scaffolding (init), health diagnostics (doctor), and real-time status inspection (status).
  • Optional Multi-Model Token Shield (init --protect-tokens): Opt-in, zero-runtime-overhead workspace hygiene flag that scaffolds official context-exclusion and read-deny rules (.geminiignore, .aiexclude, .cursorignore, .claude/settings.json, .rooignore, .codeiumignore, .aiderignore) tailored to the agent ecosystems detected in your repository—preventing accidental token leakage on lockfiles and build artifacts, translating directly into lower context costs without touching the MCP server.

Model-Tier Routing Matrix

LogNexus organizes development phases into three cognitive tiers. You can assign any model or native client to any tier according to your team's workflow and cost preferences:

Multi-Model Routing Cost and Performance Analysis

Operational Tiers

TierCognitive RoleAnthropic ClaudeOpenAIGoogle GeminiDeepSeekPrimary Activities
tier-1 (Reasoning)Deep synthesis, architectural design, narrative reviewClaude Opus 3.7 / 4.xo3, o1, GPT-5Gemini 4 Carbon / Argon, 3.8 ProDeepSeek R1Brainstorming-to-issue planning, PR journey timeline synthesis, cross-model review sign-offs.
tier-2 (Context & Triage)Long context ingestion, discovery triage, structured mappingClaude SonnetGPT-4.1, GPT-4oGemini 3.8 Flash High / Pro (1M)DeepSeek V3Large codebase exploration, discovery classification, knowledge retrieval.
tier-3 (Execution)Surgical implementation, template filling, fast executionClaude HaikuGPT-4o-miniGemini FlashDeepSeek Chat (V3)Subtask commits (feat(#N/Tk)), atomic code changes under closed contracts, timeline logging.

Example Deployment Setups

LogNexus adapts to your existing toolstack. Configure your advisory preferences in .lognexus/routing.md:

┌────────────────────────────────────────────────────────────────────────────────────────┐
│                                 POPULAR DEPLOYMENT SETUPS                              │
├────────────────────────────────────────────────────────────────────────────────────────┤
│ Setup A (Anthropic Pure):  Claude Opus (t1) + Claude Sonnet (t2) + Claude Haiku (t3)   │
│ Setup B (Google + DeepSeek): Gemini Pro (t1/t2) in Antigravity + DeepSeek Chat in Kimi │
│ Setup C (OpenAI + DeepSeek): OpenAI o3 (t1) in Cursor + DeepSeek Chat (t3) for code    │
│ Setup D (Claude + OpenAI):   Claude Opus (t1) for design + GPT-4o-mini (t3) for tasks  │
└────────────────────────────────────────────────────────────────────────────────────────┘

Quickstart & Golden Path

LogNexus coordinates the full issue-to-merge lifecycle through intuitive slash commands:

1. Capture the Plan

/lognexus plan

Transforms an exploratory brainstorm into a structured GitHub Issue with discrete subtasks (T1..Tn), verification criteria, and tier tags.

2. Start Work on a Clean Branch

/lognexus start <issue-number>

Creates an ID-prefixed branch (issue/<id>-<slug>) from the default branch tip and logs a signed [lognexus/session-start] note.

3. Commit with Traceability

/lognexus commit

Stages changes and generates structured, task-scoped commits (feat(#42/T1): ...) paired with an issue progress update.

4. Synthesize the Pull Request

/lognexus pr

Compiles all commits, discoveries, discarded alternatives, and verification steps into a comprehensive Journey Timeline inside the PR description.

5. Cross-Model Review & Gate Verification

/lognexus review

An independent model inspects the PR diff, verifies task contracts, and signs off (Reviewed-by: <model>) before merge.


Installation & Setup

1. Scaffold Rules & Manage State with the CLI

Initialize .lognexus/ rules, templates, and routing configuration:

npx @digital-lake/lognexus init

# Optional: scaffold official multi-model context-exclusion rules (zero runtime overhead)
# to prevent agents from burning tokens on lockfiles or build directories:
npx @digital-lake/lognexus init --protect-tokens

Verify your environment anytime:

npx @digital-lake/lognexus doctor

Inspect active branch and tier advisory:

npx @digital-lake/lognexus status

Manage persistent agent state (.lognexus/state.json) and session recovery:

npx @digital-lake/lognexus state sync
npx @digital-lake/lognexus state show
npx @digital-lake/lognexus state set-task T1 "Add user schema"
npx @digital-lake/lognexus state finish-task T1

Execute an Atomic Commit (validates subtask contract, enforces review-gate separation, injects trailers, commits, marks subtask completed, and attaches Git Note in a single ~0.15s call):

npx @digital-lake/lognexus commit -m "feat(#42/T1): add user schema" \
  --author "gemini/flash (antigravity)" \
  --reviewer "gemini/pro (lead-architect)" \
  --finish-task

# Or read message from file (cross-platform on Linux, macOS, and Windows shells):
npx @digital-lake/lognexus commit -F commit-msg.txt --finish-task

Quiet Mode with Git Notes (refs/notes/lognexus, standard git-ai v3):

npx @digital-lake/lognexus note attach HEAD
npx @digital-lake/lognexus note show HEAD
npx @digital-lake/lognexus note push origin

Journey Timeline reconstruction and Review Gate audit:

npx @digital-lake/lognexus timeline main
npx @digital-lake/lognexus timeline main --pr-body
npx @digital-lake/lognexus audit main

Session continuity, scope-drift and memory recall:

# Regenerate .lognexus/handoff.md from live state (--json for machines)
npx @digital-lake/lognexus handoff
npx @digital-lake/lognexus handoff --json

# Inspect the working tree against the active subtask contract
npx @digital-lake/lognexus status
npx @digital-lake/lognexus doctor

# Recall past reasoning from Git Notes, newest matches first
npx @digital-lake/lognexus note search "scope drift"
npx @digital-lake/lognexus note search --file src/cli.ts
npx @digital-lake/lognexus note search --issue 30 --limit 5
npx @digital-lake/lognexus note search --author "deepseek" --json

Opt-in Telemetry, Stack Profiling & ROI Cost-Savings Engine (100% local, zero network calls):

# Check telemetry status (disabled by default, 0% overhead)
npx @digital-lake/lognexus telemetry status

# Enable local telemetry (stores metrics only in .lognexus/telemetry.json)
npx @digital-lake/lognexus telemetry enable

# Generate .lognexus/telemetry.md report with ROI metrics
npx @digital-lake/lognexus telemetry report

# Inspect the exact local payload structure
npx @digital-lake/lognexus telemetry inspect

# Disable telemetry immediately
npx @digital-lake/lognexus telemetry disable

Telemetry is strictly local-only: no endpoint, no dispatch, no upload. The retired --share --accept-terms flags now fail with an explicit error, and pre-2.0.0 stores in community mode are migrated to local on read.

Read our strict Zero-PII, zero-network policy in docs/TELEMETRY_PRIVACY.md.

2. Connect via Model Context Protocol (MCP)

LogNexus includes a native, lightweight JSON-RPC 2.0 stdio server (lognexus mcp) with zero external SDK dependencies. Connect it to Claude Desktop, Cursor, Google Antigravity, or any MCP-compliant client:

claude_desktop_config.json or Cursor MCP settings — config file locations per operating system:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Cursor / VS Code: .cursor/mcp.json or .vscode/mcp.json
{
  "mcpServers": {
    "lognexus": {
      "command": "npx",
      "args": ["-y", "@digital-lake/lognexus", "mcp"]
    }
  }
}

Or install automatically via Smithery:

npx -y @smithery/cli install @digital-lake/lognexus --client claude

Or run via Python (uvx / pip from PyPI):

# Zero-install MCP stdio launch via uvx:
uvx lognexus-mcp

# Or install globally via pip / pipx:
pip install lognexus-mcp

Exposed Capabilities:

  • Tools: lognexus_status, lognexus_state_get, lognexus_state_sync, lognexus_state_set_task, lognexus_state_finish_task, lognexus_state_clear, lognexus_commit, lognexus_note_show, lognexus_note_attach, lognexus_timeline, lognexus_audit, lognexus_telemetry
  • Resources: lognexus://state, lognexus://routing
  • Prompts: lognexus-plan, lognexus-review

3. Install Rules in Your Agent Environment

  • Claude Code:
    claude plugin add digital-lake-ai/lognexus
    
  • Cursor / Codex / Agent Skills:
    npx skills add digital-lake-ai/lognexus
    
  • Google Antigravity: Active automatically via skills/lognexus/SKILL.md or workspace skills.
  • Kimi Code / VS Code: Active via .lognexus/ workspace instructions and prompts.

⚡ Production Telemetry & Field Benchmark

Corpus Analyzed Git Notes Coverage Traceability Audit Test Suite Health

LogNexus was battle-tested in a high-intensity production deployment governing the end-to-end engineering of an enterprise static analysis CLI and AI migration skill (Anonymous Project ID: prj-7a4e91c2) operating over 250,000+ lines of legacy code with 22 AST/CFG rules (SPH-001..SPH-022).

╔══════════════════════════════════════════════════════════════════════════════════════════════╗
║  LOGNEXUS TELEMETRY HUD // PRODUCTION SWARM BENCHMARK (PROJECT ID: PRJ-7A4E91C2)             ║
╠═════════════════════════════════════════════╦════════════════════════════════════════════════╣
║  ▸ GOVERNED FEATURES     12 Issues (#1-#12) ║  ▸ ORPHAN / UNTRACKED COMMITS   0 (0.0%)       ║
║  ▸ VERIFIED COMMITS      38 / 38 Signed     ║  ▸ SELF-APPROVAL VIOLATIONS     0 Blocked      ║
║  ▸ GIT NOTES ATTACHED    100% (git-ai v3)   ║  ▸ SCOPE CREEP INCIDENTS        0 (Allowlist)  ║
║  ▸ TEST SUITE INTEGRITY  536 Passed (100%)  ║  ▸ ATOMIC COMMIT LATENCY        ~0.15s / op    ║
╚═════════════════════════════════════════════╩════════════════════════════════════════════════╝

Multi-Model Swarm Performance Matrix

By enforcing Closed Delegation Contracts (allowedFiles, forbiddenFiles, decisionBudget: "none") and Cross-Model Review Gates, LogNexus coordinated three distinct AI model families in production without a single context leak or rogue commit:

Model FamilyAssigned TierProduction Strengths ObservedOptimal Contract Fit
Google Antigravity / Gemini Protier-1 & tier-2
(Architect & Orchestrator)
• Zero-drift multi-branch coordination
• Strict review-gate enforcement (lognexus audit)
• Rapid root-cause regression triage
Architecture synthesis, closed contract authoring, cross-model code review, release governance.
DeepSeek V3 / R1tier-3
(Scoped Implementer)
• Ultra-low latency & token cost
• Exceptional at mathematical AST parsing, pushdown automata & CFG tokenization
• Strict adherence to stop conditions when hitting out-of-scope test assertions
Algorithmic engines, deterministic parsers, isolated single-file modules (<500 LOC).
Kimi K2.7 Codetier-2 & tier-3
(High-Context Implementer)
• Massive context retention with zero file truncation on large modules (>500 LOC)
• Flawless single-shot multi-file generation (rule catalogs + visitors + test suites)
Large-context refactorings, multi-file rule catalogs, CI/CD matrices & standalone packaging.

Key Takeaway: Contract-driven development paired with refs/notes/lognexus completely eliminated scope creep by Tier-3 implementers while keeping the public Git commit graph 100% clean and human-readable.


Disambiguation

LogNexus by Digital Lake is an open-source development framework and Git memory system for AI agents. It is not affiliated with academic research papers on industrial log compression (e.g. ISSTA 2026).


🛡️ Verified Quality & Supply-Chain Security

LogNexus MCP server – quality and maintenance score on Glama

Every published release is continuously measured against independent third-party evaluators. The table below summarises the current external audit snapshot:

AuditorScopeResult
Glama MCP DirectoryServer quality & maintenance score (TDQS)Triple A grading · TDQS 4.3 / 5.0 (Grade A)
Socket SecurityVulnerability audit100 / 100 — 0 CVEs
Socket SecurityQuality & License compliance100 / 100
Socket SecurityMaintenance health96 / 100
SLSA ProvenanceBuild supply chainVerified (SLSA Provenance, OIDC-signed npm publish)
License & Contribution modelOpen governanceMIT — Open Source, Core-Maintained (Closed to Unsolicited External PRs)
Awesome MCP ServersCommunity MCP directory (punkpeye/awesome-mcp-servers / HorchataHTML/awesome-mcp-servers)Listed under Version Control (📇 🏠 🍎 🪟 🐧 — TypeScript, Local, macOS, Windows, Linux)
Smithery & Claude PluginNative MCP & Plugin registries (smithery.yaml, .claude-plugin/plugin.json, skills/lognexus/SKILL.md)Verified Cross-Platform (Linux, macOS, Windows)
MCP Registry & PyPIOfficial server.json & Python launcher (lognexus-mcp)Verified (io.github.digital-lake-ai/lognexus · npx & uvx across Linux, macOS, Windows)

Local-first by construction: LogNexus ships 0 runtime network calls, 0 PII, and 0 telemetry endpoints. See docs/TELEMETRY_PRIVACY.md and SECURITY.md.

Provenance & Identities

Every commit carries signed provenance trailers (Planned-by: / Authored-by: / Reviewed-by:). Identities are declared with their canonical spellings:

RoleCanonical identity
Master Architecture & Security OrchestratorsGemini 4 Argon · Gemini 4 Carbon
Implementation (VS Code client)deepseek/VS Code (kimi-code)
Cross-model review (Antigravity)Gemini 4 Carbon · google/gemini-3.8-flash-high (antigravity)

The Planned-by: trailer documents where an externally authored plan came from. It grants no review authority and no merge rights; an author model never writes its own Reviewed-by: trailer.


Based on & Acknowledgments

LogNexus is an independent hard fork and continuation of shiplog, originally created by devallibus under the MIT License.

We extend our deep gratitude to devallibus for pioneering the concept of Git-as-knowledge-graph for AI development. LogNexus builds upon that foundation by:

  • Expanding the model ecosystem to provide first-class native support for Google Gemini (Gemini 4 Argon, Gemini 4 Carbon, Gemini 3.8 Pro & Flash High), Moonshot AI (Kimi K3 / Kimi Code), and DeepSeek (R1, V3, Chat) alongside Claude and OpenAI.
  • Formalizing the multi-model tier routing taxonomy and closed delegation contracts.
  • Introducing the repository scaffolding CLI, Atomic Commit Engine, and native MCP server (@digital-lake/lognexus).
  • Providing seamless backwards-compatibility for existing .shiplog envelopes and workflows.

The Master Architecture & Security Plan governing frontier-model support, supply-chain hardening, and cross-model review governance is authored and signed by Gemini 4 Argon and Gemini 4 Carbon (Master Architecture & Security Orchestrators).

Additional inspirations and patterns are derived from OrchestKit and Superpowers. Detailed license texts are preserved in the LICENSES/ directory and in NOTICE.md.


Did you find this project useful? 🤖⚡

Maintaining and evolving open-source agentic infrastructure takes time, dedication, and... quite a few AI tokens to power multi-model benchmarking, automated testing, and continuous architecture updates.

If LogNexus saved you time, prevented context amnesia in your workflows, and you'd like to help cover the API and compute costs to keep it evolving, consider fueling the AI with a token:

Ko-fi - Fuel the AI

Every contribution goes straight into compute power, multi-model benchmarks, new MCP capabilities, and continuous improvements!


License

LogNexus is released under the MIT License.
Copyright (c) 2026 devallibus
Copyright (c) 2026 Digital Lake and LogNexus contributors.

版本与发布记录

@digital-lake/lognexus 共发布 23 个版本,首次发布于 2026/10/22;过去 12 个月发布了 23 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
1.3.6latest2026/11/12今天
1.3.52026/11/111 天前
1.3.42026/11/084 天前
1.3.32026/11/075 天前
1.3.22026/11/048 天前
1.3.12026/11/039 天前

其他发布通道:alpha → 1.0.0-alpha.5,next → 1.0.0-rc.1。

关于 @digital-lake/lognexus 的常见问题

@digital-lake/lognexus 是什么?

The Universal, Git-powered context & rules framework for native AI agents (Claude, OpenAI, Gemini, DeepSeek) across Linux, macOS, and Windows. Scaffolding CLI, native MCP server, and repository governance.

如何安装 @digital-lake/lognexus?

在项目目录运行 npm install @digital-lake/lognexus,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 lognexus,可以用 npx lognexus 直接运行。

@digital-lake/lognexus 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@digital-lake/lognexus 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@digital-lake/lognexus 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@digital-lake/lognexus 可以商用吗?

@digital-lake/lognexus 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@digital-lake/lognexus 的下载量有多少?

根据 npm 官方下载统计,@digital-lake/lognexus 在 2026/10/12 – 2026/11/10 这 30 天内被下载 4,066 次,日均约 136 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@digital-lake/lognexus 还在维护吗?

最新版本 1.3.6 发布于 2026/11/12(今天);至今共发布 23 个版本,其中过去 12 个月发布了 23 个;首次发布于 2026/10/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。