Cambium

KimGLee活跃维护

给 LLM 维护的知识库定治理规范,并提供参考工具链,让 AI 代理改文档时有确定性校验和人工审核,避免知识库越改越乱。

Governance standard and reference toolset for LLM-maintained knowledge corpora

暂无版本663star42fork同步于 2026-11-07 07:33 UTC

怎么上手

由 README 提炼,执行前请确认
python3 Tools/scaffold_profile.py . --profile-id my-profile --apply
python3 Tools/check_queue.py . --resume-status
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

给 LLM 维护的知识库定治理规则和确定性工具链,让任务可恢复、变更可审计

给 LLM 维护的知识库定治理规范,并提供参考工具链,让 AI 代理改文档时有确定性校验和人工审核,避免知识库越改越乱。

核心能力

  • 用 kernel 加单一 profile 定义仓库治理规则与扩展点
  • 用 Coverage、Required Queue、Progress 三本账管理长任务状态
  • 提供确定性任务与批次状态迁移、受控修订和中断恢复
  • 生成 host 中立的 MCP 接口,暴露叶子工具与有界 Runner
  • 内置页面、结构、词汇、链接、边界、新鲜度等确定性检查

容易踩的坑

采纳前需先按 Tools/README.md 完成 Agent 驱动的 Host 准备与工具链安装;不要手工编辑 .cambium/ 下的规范状态,须用对应写入工具;仓库默认未实例化,需自行创建并批准 profile 才算采纳

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Cambium

    English | 简体中文

    Cambium is a governance standard and reference toolset for knowledge repositories maintained with LLM agents.

    It helps an operator answer five practical questions:

    1. What rules apply to this repository?
    2. What work is required, and who may change shared state?
    3. What evidence must exist before work can close?
    4. How can an interrupted task resume without guessing?
    5. Which decisions belong to the operator rather than the agent?

    Cambium is not a knowledge base, a RAG engine, an agent scheduler, or a default domain policy. It governs work; it does not supply the corpus or decide its meaning.

    Start Here

    The Mental Model

    effective governance
      = Cambium kernel
      + exactly one selected profile
      + adopter-owned runtime state
    

    The diagram shows how these layers connect to runtime routes, deterministic tools, and agent execution contexts.

    Cambium architecture overview

    LayerWhat it owns
    kernel/Cross-domain governance semantics, invariants, state meanings, and extension points
    Card/Curated, non-authoritative flight checklists for an already selected task route or phase
    Read Set/Machine-resolvable declarations of what canonical material an already selected route or phase must load
    Selected profileOne repository's scope, language, architecture, sources, priorities, roles, scans, and allowed extensions
    .cambium/The adopter's current governance identity, task state, Queue, plans, deltas, receipts, and recovery evidence
    Tools/Stable public commands and Area/Domain implementations for deterministic checks, controlled writes, schemas, and generated projections

    The kernel is normative. A profile can fill or tighten an extension point, but cannot disable a kernel rule. Tools execute declared rules; they do not make the final semantic judgment.

    Cards are short, curated checklists, not routes or a second copy of the standard. Read Sets own the static loading boundary. When a Card is insufficient or disputed, its read-back hook resolves through the paired Read Set to the canonical owner.

    This repository is intentionally uninstantiated. It contains one candidate Profile template and non-authoritative examples, but selects no adopter profile and creates no fabricated task state.

    What Ships Today

    Cambium currently provides:

    • one empty TOML Profile candidate, Agent-assisted interviews, safe creation and snapshot-bound editing tools, read-only review/status views, and CUE-backed Profile checks;
    • persistent Coverage, Required Queue, and Progress state for resumable work;
    • deterministic task and batch transitions, controlled Amendments, active-task Standards adoption, interruption recovery, and build or maintenance closure;
    • append-only receipts and Terminal Proof bindings;
    • explicit Global Map, Capability Matrix, and Gap Register validation;
    • deterministic page, structure, vocabulary, link, boundary, freshness, and residual-content checks;
    • a generated host-neutral interface: each tool's own CLI declaration and the closed agent-interface capability policy compile into the agent-facing MCP projection and per-host configuration; every active caller-visible path is retained as a descriptor capability through subprocess consumption;
    • a typed Task Runtime Runner that advances registered deterministic tools to the next Agent, user, Host, repair, or terminal boundary;
    • Card-first activation and progressive Read Set delivery primitives.

    The generated MCP surface exposes both leaf calls and the bounded Runner. The Runner is not a scheduler or governance engine: it derives one identity-bound next action from current runtime state, invokes only registered capabilities, reads the result back, and stops at every semantic boundary. Each underlying Tool still decides whether its operation is valid and whether its evidence counts. For every active typed path, the transport retains the admitted file or parent-directory descriptor through subprocess consumption; an unsupported platform fails server initialization instead of claiming this assurance.

    What Does Not Ship Yet

    Cambium does not currently bundle:

    • agent dispatch or scheduling;
    • isolated worker workspaces;
    • a complete single-writer integrator loop;
    • durable Assignment lifecycle management;
    • authenticated actor or reviewer identity;
    • protected whole-workspace execution against arbitrary concurrent mutation;
    • automatic corpus-wide dependency propagation;
    • an independent evaluator that re-derives the complete expected corpus;
    • an installable OpenAI Plugin package, Hooks, UI, or marketplace entry.

    These boundaries are intentional. A host may add capabilities, but it must not claim evidence for a capability it cannot prove. See ROADMAP.md for the delivery order.

    The Three Runtime Ledgers

    Long-running work uses three state objects with different owners:

    State objectWhat it answers
    Coverage LedgerWhich knowledge objects exist, what disposition they have, and which batch currently owns unfinished work?
    Required QueueWhich batches exist, what are their manifests and dependencies, and what lifecycle state is each batch in?
    Progress LedgerWhat is the task contract, whole-task state, checkpoint, Standards identity, and accepted Queue fingerprint?

    They must agree, but they are not interchangeable task lists.

    The adopter-owned namespace contains six lifecycle classes:

    .cambium/
    ├── <canonical current state>
    ├── <bound operational inputs>
    ├── <evidence and history>
    ├── <recovery state>
    ├── <transient workspace>
    └── <derived projections>
    

    Do not edit canonical state by hand. Use the owning writer so revisions, hashes, receipts, and recovery evidence move together. Tools/execution/task_runtime/runtime_paths.py is the single machine owner of the current physical path spellings and object classifications; this README does not maintain a second directory contract.

    Adopt Cambium

    Adoption creates and approves one profile for one repository. Copying a template or example does not select it.

    Run the authoring workflow from a Cambium source checkout after the Agent-driven Host preparation. With terminal access and installation authorization, the Agent prepares and verifies the required toolchain; users do not choose dependency versions or fill in local paths. The user supplies and confirms repository decisions, without manually copying template files or writing TOML.

    1. Create a candidate profile

    python3 Tools/scaffold_profile.py . --profile-id my-profile
    python3 Tools/scaffold_profile.py . --profile-id my-profile --apply
    

    The first command is a dry run. The second creates profiles/my-profile/profile.toml with the confirmed identity and empty slots, copies only the declared supporting files, and refuses to overwrite an existing candidate. It makes no policy choice and performs no adoption.

    2. Answer the open decisions and validate

    The assisting agent uses profiles/interview.yaml to discuss the repository's needs and Tools/profile_candidate.py to read, preview, edit, and render the candidate. User answers live once in profile.toml; independently referenced policy bodies retain their own owner. profiles/README.md describes the exact workflow and snapshot preconditions.

    The Kernel owns slot meaning and legal values through K00/19 and domain-owned contracts. Tools own TOML encoding—including the root version, slots packaging, and draft-validation entry point—plus file layout, evaluation, and presentation. Existing domain YAML contracts remain sole owners where other consumers need them; their CUE projections are generated and checked, not parallel handwritten rules.

    python3 Tools/profile_onboarding_status.py . --profile-id my-profile --json
    python3 Tools/check_profile.py profiles/my-profile
    

    Unanswered draft fields remain unanswered: omission is not agreement to disable an option or inherit a default. Existing legal defaults still apply where the completed contract permits them, but do not prove user confirmation. Mechanical validity, user confirmation, and adoption are separate; a rendered view or successful check never selects the Profile.

    3. Approve the profile through R09

    Prepare a plan from Tools/schemas/profile_adoption_plan.template.yaml, then dry-run and apply it:

    python3 Tools/apply_profile_adoption.py . --plan <plan>.yaml \
      --upstream-root <local-cambium-repository> --upstream-ref <git-ref>
    python3 Tools/apply_profile_adoption.py . --plan <plan>.yaml \
      --upstream-root <local-cambium-repository> --upstream-ref <git-ref> --apply
    

    The transaction resolves the upstream ref to its full Git commit SHA and records that SHA as the sole Standards identity in upstream_revision_id. It binds the selected Profile and resulting adopter-owned contracts/evidence, and restores the previous control plane if any step fails. It never restamps or rewrites the adopter's upstream Card bytes. Adoption remains an explicit CLI maintenance operation: its external upstream repository input is never exposed as an unrestricted MCP argument.

    An empty corpus follows the same adoption contract. First perform bounded founding work to create real canonical owners and the residual-scan witness — one page may serve as both owner and witness when that is semantically natural, but pages are never merged only to save files. Then a second R09 revision configures the Corpus Planning slot before large-scale work begins. The candidate and adoption boundary is documented in profiles/README.md.

    Start Or Resume A Task

    Always check for existing runtime state before writing:

    python3 Tools/check_queue.py . --resume-status
    

    If .cambium/state/ exists, this command reports the recorded task, locks, holds, in-flight batches, recovery state, and exact next_action. Do not initialize over it.

    Bounded work does not need persistent state. For long-running, resumable, or multi-batch work, first copy and complete the single Task Plan:

    cp Tools/schemas/task_plan.template.yaml \
      .cambium/deltas/task-plans/TP-001.yaml
    
    python3 Tools/init_state.py . \
      --plan .cambium/deltas/task-plans/TP-001.yaml
    
    python3 Tools/init_state.py . \
      --plan .cambium/deltas/task-plans/TP-001.yaml --apply
    
    # Run the exact compile_queue command printed by init_state.py; it already carries the Queue revision and SHA bound to the published Task Plan.
    python3 Tools/compile_queue.py . --apply --actor-role integrator \
      --expected-queue-revision REVISION \
      --expected-sha256 SHA256
    
    python3 Tools/check_queue.py .
    python3 Tools/render_queue.py .
    

    init_state.py has no parallel flags for task identity, objective, scope, Standards, Profile, completion model, or concurrency. Those confirmed values have one owner: the Task Plan. The command atomically publishes the empty Queue, complete Task Contract, planning-only Coverage, and the Receipt retained by Progress; compile_queue.py remains the sole Queue materializer.

    Controlled Changes

    After the Queue exists, shared state changes go through a controlled writer:

    • register_amendment.py and apply_amendment.py handle approved operational replans such as bounded scope/disposition changes and batch cancellation;
    • apply_contract_amendment.py handles the two supported Task Contract fields: policy_exceptions and amendment_authority;
    • adopt_standards.py moves an active task to an approved Standards/Profile revision without rewriting its lifecycle history;
    • apply_delta.py, update_queue.py, and update_task.py own batch and task progression.

    Writers are dry runs unless --apply is present. Shared-state writes are integrator-only and require current revisions or hashes where the tool asks for them. Exact commands, schemas, and recovery procedures are in Tools/README.md.

    Use Cambium From An Agent Host

    Cambium renders registration and corpus binding for Claude Code, Codex, Kimi Code, and dsh from one canonical server definition:

    python3 Tools/render_host_configs.py . \
      --projection-target carried-runtime \
      --output-dir /absolute/path/to/corpus/.host-config-staging \
      --distribution-root /absolute/path/to/corpus \
      --workspace-root /absolute/path/to/corpus
    
    python3 Tools/render_host_configs.py . \
      --projection-target carried-runtime \
      --output-dir /absolute/path/to/corpus/.host-config-staging \
      --distribution-root /absolute/path/to/corpus \
      --workspace-root /absolute/path/to/corpus \
      --check
    

    Run this from the adopted corpus root after its carried interface has been generated. Bound products land in .host-config-staging/; install the selected product through the host's own mechanism. Tools/compiled/host-configs/ remains the source-distribution template set and is only regenerated or checked by Cambium maintenance.

    HostInstall the generated configuration at
    Claude Code<corpus>/.mcp.json
    Codex<corpus>/.codex/config.toml
    Kimi Code<corpus>/.kimi-code/mcp.json
    dshthe operator profile for registration and <corpus>/.env for binding

    Registration answers “where is the server?” Corpus binding answers “which repository does this session govern?” They are separate capabilities.

    Installing a host configuration is not Cambium adoption. It does not approve a profile, create task state, or migrate Standards. The MCP server exposes the generated CLI projection and passes tool verdicts through; it does not create a second policy engine.

    Card delivery also has a strict evidence boundary. A server can prove what it sent, but not by itself what a host placed in the model context or what an agent read. Machine-enforced Assignment delivery remains an in-progress roadmap capability; until its gate is complete, do not turn transport metadata into a claim of cognition or independent execution.

    Safety And Trust Boundary

    • A surviving writer lock is recovery evidence. Do not delete it until the writer, state files, receipts, pending deltas, and archive moves are reconciled.
    • Component-byte comparison must run from a separately trusted upstream checkout (or protected runner) against the adopter. It detects drift but cannot make an adopter's unchecked Tool copy authenticate itself.
    • JSONL receipts are append-only. An uncertain append keeps the lock rather than guessing whether the receipt landed.
    • Exit code 2 is a hold, not success and not an ordinary failure.
    • Reports and generated projections are views, never canonical input.
    • Repository-provided verifier code is not run automatically; its source and effects require explicit authorization.

    SHA-256 bindings detect drift and inconsistent history inside the adopter's local trust domain. They are not signatures. Without a protected runner or external attestation, Cambium does not authenticate actor labels, reviewer labels, operating-system identities, or workspace isolation. A party that can rewrite the repository, tools, and evidence can construct a new internally consistent history. The MCP transport rejects unsafe arguments and static path aliases inside this local trust domain. For every caller-visible typed path, it also prevents a post-admission name or parent replacement from redirecting the child tool: the exact admitted object is retained and consumed. This is not protected whole-workspace execution. A concurrently privileged process can still attack fixed or derived internal paths that are not part of the public call surface, rewrite repository code and evidence together, or interfere outside the filesystem capability boundary; those wider guarantees require an isolated workspace or external trust anchor.

    Repository Map

    PathPurpose
    kernel/Normative common governance rules and Kernel-owned machine contracts
    Card/Curated, non-authoritative action checklists
    Read Set/Canonical static loading declarations and generated navigation
    profiles/Candidate template, interview, adoption guidance, and non-authoritative examples
    Tools/Stable Tools/<tool>.py public commands, Tool contracts, schemas, and operating guidance
    Tools/governance/, Tools/knowledge/, Tools/execution/, Tools/platform/Implementations grouped by the machine-checked Area/Domain hierarchy
    Tools/TOOL_CATALOG.mdGenerated Tool hierarchy, interface, and dependency navigation
    Tools/compiled/Generated CLI, MCP, metadata, host, and Tool-catalog projections
    assets/readme/Public diagrams embedded by the root READMEs
    ROADMAP.mdStatus-based implementation roadmap
    CONTRIBUTING.mdIssue ownership, defect promotion, and pull-request contract

    Kernel module numbers are stable identities, not a contiguous display sequence. A number is not reused after its module moves or retires; the active reading order is the one listed by each Standard entry page's Module Index.

    Examples show answer shape; they are not defaults and must not be selected in place of an adopter-owned profile.

    License

    Cambium uses path-based licensing:

    • software and repository-engineering material under Tools/, .github/, Makefile, and distribution-boundary.yaml uses Apache-2.0;
    • standards under kernel/, curated Card/ and Read Set/ material, profiles, README and contributing documentation, the roadmap, and diagrams under assets/readme/ use CC BY 4.0.

    See LICENSE.md, ATTRIBUTION.md, and LICENSES/ for the authoritative terms and notices.

    Adopter-generated profiles, state, receipts, and evidence do not acquire a Cambium license merely because Cambium tools manage them.