inka — Full Implementation Plan (beyond the PoC)¶
Test evidence follows the test evidence contracts. Producing and delivering evidence JSON is the responsibility of the source repository and capsula; inka evaluates imported evidence.
Capability areas that build on the PoC. The ordering below is dependency-informed, not a schedule; nothing here commits to dates or sequence beyond the stated dependencies. Japanese version: 日本語版.
Capability areas¶
- Policy language. Selectors (mode × id/namespace/
#tag) and predicates (any,role,including,not-author,fresh,forbidden) parsed from a policy file referenced byinka.toml;policy_hashrecorded in approvals; a selector matching no existing tag warns (the tag-typo detector). Replaces the built-inany(1). - Approval-session upgrades. Diff against the local view the approver last
approved (requires recovering the prior source); approver-side
until:enforcement; a review session in the browser, served byinka serve, that presents each target asinka reviewdoes and records the same record (Web UI). The no-subtree-expansion rule holds in any UI. - What-if evaluation.
--forecast <phase>,--margin,--without-approver,--as-of,--diff-approvals— all thin wrappers that re-run the pure eval with substituted inputs. - LSP. Workspace split (core / cli / lsp; core stays sync, no tokio);
lsp-server+lsp-types; diagnostics, hover, inlay hints (children's descriptions at reference sites), read-only code lenses (approval state), goto/references, rename (the zero-invalidation demo). Semantic tokens supply rich description highlighting: the server parses each description range with a real CommonMark parser and emits tokens, superseding the deliberately simple TextMate grammar inside the editor. - Signatures and integrity. SSH signatures (ed25519, sshsig) over the
canonical record bytes;
eval --verify; lightweight anchoring (record count + hash chain) to make deletion tamper-evident; phase transitions as approvable events (eval-cleanpredicate + promotion attestations). - Evidence-provider extensions. Function-granularity test evidence
(source-side adapter collection; reviewable source with CRLF-only normalization);
execution-closure hashing recorded per evidence item, surfacing
effective-content changes behind a stable interface as an eval warning,
with an opt-in
closure-freshpolicy predicate for selective strictness. Signed CI attestations (OIDC/Sigstore) attach through the signature machinery. - veriq integration. A Python-side export (graph, statements,
assumesreferences, contract hashes from normalized ASTs); the shared-assumption registry; identity-based aggregation of the total assumption set through interfaces; the bind hash's assumption slot filled; assumption-set diffs presented at bind approval. Rust never parses Python — the JSON adapter is the entire seam. - LLM lint. A version-controlled prompt template; local-view-only review
("does the parent follow from the children?", "what presupposes knowledge
outside the view?");
llm:<model>attestations recording template hash and model id; decline resolvable by a single human override with a logged reason. - Cross-project reuse. Export/import of bundles (nodes + attestations + originating policy); trust clauses on the importing side; portability rules (structure approvals travel; fiat must be re-accepted; bind must be re-bound and re-approved). Depends on signatures.
- Visualization. The graph surface of the Web UI: the argument as cards carrying description and evaluation status, explored by expanding and collapsing from the objectives down; layout delegated to an existing JS graph library. The graph itself records nothing — a decision is only ever taken on a node's local view, under the Web UI's recording conditions.
Standing technology choices¶
Hand-written recursive descent (no parser generator);
lsp-server + lsp-types (sync); ed25519-dalek + ssh-key; ureq for any
batch HTTP; similar for diffs; insta + proptest + cargo-fuzz for
testing. Deliberately absent: incremental-computation frameworks (full
recomputation until measured otherwise), async in core, and any binary format
— everything stays text.
Discipline¶
- The dogfood argument is updated as each capability lands, and the approval loop is re-run on it — the tool's own argument stays its first user.
- Golden-vector directories stay append-only; incompatible layout changes ship as a parallel v2, never in place.
- Fuzz the parser and normalizer early (malformed UTF-8, huge inputs, deep reference chains).