query_ledger
Search the Enterprise Context Ledger for Golden Patterns and episodes relevant to a task. Returns the highest-density context from repo memory.
intent必填repoRootmaxResults
io.github.codeledgerECF由 GitHub 账号 codeledgerECF 发布v0.10.82更新于 Oct 30, 2026
Local context and engineering evidence for AI coding agents.
本地 MCP 服务器,为编码智能体提供任务范围内的仓库上下文、激活范围契约、提示词校验与证据记录。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
参照 仓库 中的启动说明。
Give AI coding agents the right repo context before they start - then verify what changed.
CodeLedger is local-first context control for AI coding agents. It scans a repository, selects a bounded task-relevant set of files, and writes an evidence-backed context bundle before the agent begins work.
Works with Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, and other CLI or MCP-compatible coding agents.
CodeLedger initializes the repo if needed, refreshes the index, and creates the
task-specific bundle at .codeledger/active-bundle.md. Your agent reads that
artifact first so it starts with the files most relevant to the task.
Runtime analysis is local by default. Installing or updating may fetch packages or release artifacts from npm and GitHub Releases; CodeLedger runtime analysis does not send your source code through CodeLedger telemetry by default.
Example result from a mid-sized Node.js service. Results vary by repository, task, agent, and scenario.
Do not take the benchmark on faith - measure CodeLedger on your own repo:
If CodeLedger improves your coding-agent workflow, star the repo to follow releases and help other developers discover it.
.codeledger/active-bundle.md for your coding agent.Same task plus same repo state produces the same file ranking behavior.
For the full command surface, see the CLI Reference.
Claude Code can use CodeLedger hooks after codeledger ready initializes the
repo. Cursor, Codex, GitHub Copilot, Gemini CLI, Aider, Windsurf, and other
agents can read CLAUDE.md plus .codeledger/active-bundle.md, or use the
repo-local wrappers when available.
CodeLedger also includes an MCP server for supported tiers:
See MCP Server and Feature Tiers for setup and tier details.
SHA256SUMS and release-evidence artifacts.codeledger doctor checks the local install, hooks, config, index, and ledger
health.LICENSE-CORE.Or use the release zip:
install.sh.The installer uses the bundled package from the zip, so the installed wrapper version matches the release. The wrapper then fetches the matching hardened binary from the GitHub release unless your environment already provides it.
Inside an initialized repo, you can also use:
Browser, cloud, and sandboxed environments can use the repo-local runtime
deployed under .codeledger/bin/ after initialization or vendoring.
CodeLedger has an open public surface and a protected hardened runtime:
Use codeledger about, codeledger doctor, and command-specific --explain
output to inspect behavior and evidence without exposing protected
implementation internals.
GitHub may classify the combined licensing structure as "Other" because the repo includes both MIT-covered public files and separately licensed protected runtime terms. Changing the license files should be a human legal decision.
CodeLedger applies Intelligent Context AI's context-control architecture to software engineering. For enterprise-wide governed context across applications and agents, see ContextECF.
CodeLedger is produced by Intelligent Context AI, Inc. See codeledger.dev.
来源:README.md,提交 cf70f98
Search the Enterprise Context Ledger for Golden Patterns and episodes relevant to a task. Returns the highest-density context from repo memory.
intent必填repoRootmaxResultsRead current task context with provenance and separate readiness signals. Nonempty intent is authoritative for this invocation; empty arguments preserve prior activation. Security constraints still apply. Use get_activation_payload to inspect the activated scope.
intentcompactrepoRootexpectedRuntimeVersionRecord an execution outcome into the evidence buffer. Used by agents to report success/failure signals that compound into repo memory.
intent必填status必填repoRootthoughtTracefilesModifiedValidate a task prompt against enterprise prompt engineering best practices. Returns a scored report with findings, fix suggestions, and source attribution. Covers clarity, structure, safety (injection/secrets), examples, governance, and software-dev patterns.
task必填categoryrepoRootRetrieve the current Runtime Activation Payload — the machine-readable contract that governs what tools, files, and domains an agent is permitted to access for the active task. Use to understand task scope, allowed tool surface, risk posture, and enforcement rules before beginning implementation. This is the authoritative scope document for the session.
repoRootRun CodeLedger Agent Quality checks for bounded scope, prompt budget, roadmap slice coverage, and quality wins. Uses the same canonical builders and artifacts as codeledger agent-audit.
modetaskformatpersistsessionrepoRoottargetTokensRead the persisted canonical codeledger/unified-pr-judgment/v2 artifact for PR review adapters. Does not recompute PR truth.
pathrepoRootGet the full CodeLedger context cockpit snapshot: active bundle, status, file annotations, certification, and insight tabs. Use AFTER get_activation_payload to get the enriched view for an already-activated task.
taskrepoRoot已满足适用检查项的 80%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
请在仓库或注册中心条目中声明许可证。
npm install -g @codeledger/clicd your-projectcodeledger ready --task "Fix null handling in user service"codeledger compare \ --scenario .codeledger/harness/scenarios/auth-rate-limit.json \ --guidedcodeledger mcp startcodeledger mcp statusnpm install -g @codeledger/clicodeledger --versioncd your-projectcodeledger readycodeledger ready --task "Fix null handling in user service"codeledger activate --task "Fix null handling in user service"codeledger doctorPUBLIC: CLI wrapper, types, repo scanner, harness, reports, docs, hooksPROTECTED: Scoring engine, selection algorithm, confidence internals