Expand description
khive-pack-git — the git-lifecycle pack (ADR-088, amended by ADR-088
Amendment 1 and ADR-108).
Contributes three note kinds (commit, issue, pull_request) that make
repository provenance queryable through the KG graph, one read/ingest
agent-facing verb, git.digest(source, project?, max_items?, include?)
(handlers), that drives the batch, cursor-based ingester (ingest)
against either a local path or a remote https:// URL (cloned/fetched
into a daemon-owned scratch cache, cache), and three write verbs
(write_handlers, ADR-108) that shell to system git with hardened,
allowlisted argv construction (write_argv). See
docs/adr/ADR-088-git-lifecycle-pack.md,
docs/adr/ADR-088-amendment-1-git-digest.md, and
docs/adr/ADR-108-git-write-surface.md.
| Verb | Args | What it does |
|---|---|---|
git.digest | source, project?, max_items?, include? | Ingest commit/issue/PR provenance from a local path or https:// URL, bounded and cursor-resumable |
git.commit | repo, message, paths?, author? | Stage and commit against a local repo; returns the resulting SHA |
git.branch | repo, name, from? | Create a branch, optionally from a named ref/SHA |
git.push | repo, branch, remote? | Push a branch to a remote; force-push is always denied |
kkernel git-ingest remains the unbounded, all-kinds admin CLI path over
the same shared ingest::run_ingest core.
Modules§
- cache
- Scratch-clone cache for
git.digest’s remote-URL mode (ADR-088 Amendment 1). Clones/fetches into~/.khive/scratch/git-digest/<cache_key>/, keyed by canonical URL (crate::source::cache_key). An LRU cap (env-var configured:KHIVE_GIT_DIGEST_CACHE_MAX_REPOS,KHIVE_GIT_DIGEST_CACHE_MAX_BYTES,KHIVE_GIT_DIGEST_CLONE_MAX_BYTES,KHIVE_GIT_DIGEST_SCRATCH_ROOT) evicts least-recently-used clones once the cache exceeds its repo-count or total-byte limit; a per-clone size cap rejects an oversized clone/fetch before it enters the addressable cache slot. See crates/khive-pack-git/docs/api/cache.md for the full design rationale (ownership-proof eviction, staging-then-move installation, per-clone cap enforcement). - handlers
git.digestverb handler (ADR-088 Amendment 1).- hook
KindHookimplementations for the three note kinds this pack contributes. Validation only — provenance edges are supplied by the caller and linked by the runtime’screate_notepath itself. See crates/khive-pack-git/docs/api/hooks.md for why noafter_createedge work is needed here.- ingest
- Batch, cursor-based git-history ingester (ADR-088 §5). One-shot: walks
local git history plus (optionally)
gh-fetched issues and pull requests, and writescommit/issue/pull_requestnotes through the standardcreateverb. See crates/khive-pack-git/docs/api/ingest.md for the full module overview. - refs
- GitHub reference-grammar extraction (ADR-088 Amendment 1, ingest
enrichment riders):
Closes/Fixes/Resolves #Nand bare#Nmentions in commit messages and issue/PR bodies. - source
git.digestsource resolution (ADR-088 Amendment 1): local paths vs.https://remote URLs, canonicalization, andgithub.comowner/repo slug derivation forgh-based issue/PR ingestion.- write_
argv - Hardened argv construction for the git write verbs (ADR-108).
- write_
handlers git.commit/git.branch/git.pushverb handlers (ADR-108, amended by the ADR-108 Amendment).- write_
policy - Handler-level git-write policy allowlist (ADR-108 Amendment).
Structs§
- GitPack
- Git-lifecycle pack (ADR-088, amended by ADR-088 Amendment 1 and ADR-108)
— registers
commit/issue/pull_requestnote kinds populated by the batch ingester insrc/ingest.rs, one read/ingest agent-facing verb,git.digest(src/handlers.rs), and three write verbs,git.commit/git.branch/git.push(src/write_handlers.rs, ADR-108). Extends the base edge contract withprecedescommit→commit (parent→child lineage, ADR-088 Amendment 1 ingest enrichment) — the only new endpoint rule this pack contributes; everything else uses the baseannotatescontract.