Skip to main content

Host-agnostic knowledge-capture transport — one MCP + CLI that forwards a capture manifest to the kmint ingestion engine (the sole writer).

Project description

kcapture

One knowledge-capture MCP + CLI, host-agnostic. When you reach a decision while reading code with an LLM, kcapture records it — by validating a capture manifest and forwarding it to kmint, the single deterministic writer. kcapture writes nothing itself; units are born SubmittedForRefinement and never auto-published (the host's tool-approval prompt is the human gate). kledger stays read-only.

This is the transport for the reverse-engineering.code source-type binding (ADR-KCM-FUNC-0003). The contract — the capture manifest — is owned by kmint (kmint/schemas/capture-manifest.v1.json); the vocabulary by the ADR catalogue (kmint source-types --json). kcapture keeps no copy of either.

Two faces, one core

  • CLIkcapture validate|record|list-source-types
  • MCP (stdio)kcapture serve-mcp exposes three tools: list_source_types, validate_manifest, record_capture.

Both are thin adapters over the same manifest validation + kmint shell-out.

Install into your AI host — one command

kcapture install --host <vendor> writes/updates that host's MCP config idempotently, launching the server via uvx --from <pin> kcapture serve-mcp (zero pre-install — the pin hides the proprietary index):

Host Command Config written Sibling doc
Claude Code kcapture install --host claude ./.mcp.json (mcpServers) install/claude.md
GitHub Copilot kcapture install --host copilot ./.vscode/mcp.json (servers, type: stdio) install/copilot.md
Gemini CLI kcapture install --host gemini ./.gemini/settings.json (mcpServers) install/gemini.md
Cursor kcapture install --host cursor ./.cursor/mcp.json (mcpServers) install/cursor.md

Add --dry-run to preview, --config-path P to target a specific file, --pin S to override the source uvx resolves. Adding a vendor = one row in kcapture/hosts.py + one sibling doc.

The single MCP, many vendors as siblings

There is exactly one host-agnostic capture MCP (kcapture/mcp_server.py). The per-vendor difference is small and parallel — config location, the mcpServers vs servers key, and the optional type: stdio. That difference is a table (kcapture/hosts.py), not a fork. A vendor graduates to its own repo only if its packaging becomes a genuinely separate published artefact (a VS Code Marketplace extension, a Gemini extension); then only that vendor's packaging splits, the core stays shared here.

Manifest, in one glance

{
  "sourceType": "reverse-engineering.code",
  "domain": "PAYMENTS",
  "source": { "kind": "code", "repoUrl": "…", "commit": "<full-sha>", "path": "src/pay.py" },
  "derivedFrom": [ { "kind": "llm-output", "text": "what the model said about the code" } ],
  "units": [ { "text": "the recovered decision, in one sentence" } ],
  "trigger": { "mode": "model-proposed", "by": "copilot:knowledge-capture@<model>", "at": "<ISO-8601>" }
}
  • domain → the minted handle BNK.KNOW.MD.<DOMAIN>.<NNN>.
  • derivedFrom is the two-capture case: the raw LLM output is captured as its own artefact DERIVED_FROM the code capture (FUNC-0003 R3) — provenance the human gate reviews.
  • kmint derives provider + confidence and mints the handles; the manifest does not assign them.
  • trigger.mode is mandatory and honest (URBA-0003 P5).

Dev

pip install -e ".[dev]"     # needs the pinned kmint installed too
pytest -q                   # unit + drift guard; the contract test skips unless KCAPTURE_CONTRACT=1

Run primarily as a local wheel + console script; the GHCR image exists for k-family parity only.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kcapture-0.0.1.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kcapture-0.0.1-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file kcapture-0.0.1.tar.gz.

File metadata

  • Download URL: kcapture-0.0.1.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kcapture-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f3b9cf176dccea535d47792a19c1e55426fae1f83dfa345d662850a0b69d1640
MD5 d35b52246ca8a1fadede12936921777f
BLAKE2b-256 075dc6fbf3d709a3c8dfdae02490b7151bc8df39e0d880fc43466e62d1d01f62

See more details on using hashes here.

Provenance

The following attestation bundles were made for kcapture-0.0.1.tar.gz:

Publisher: release.yml on papeete-consulting/kcapture

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file kcapture-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: kcapture-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for kcapture-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7c15692ccaefc0a4289a1f6dd8adb8a713901cb0b4a9a1cd97f0b6e7841be497
MD5 d6fbc0fbed3c3762a617bf4bd41262e1
BLAKE2b-256 da888818d649e5f26d59e865d3c4b7d712b2e633f5d483e845ca7eec595c256e

See more details on using hashes here.

Provenance

The following attestation bundles were made for kcapture-0.0.1-py3-none-any.whl:

Publisher: release.yml on papeete-consulting/kcapture

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page