The chezmoi render path for the KI MCP binding
You are governing one render path: how the canonical MCP single source becomes the file-editable surfaces that run the servers, through chezmoi. This is a governance skill and a composition skill — it sits on top of two siblings and adds a delta over them, never forking their shared modes (ADR-KI-HARNESS-SKILLS-004, the composition-for-backends corollary: a render path is its own skill, not a --backend flag on ki-env-binding).
The two composed layers:
ki-env-bindingowns the portable canonical source and mcporter evidence; runtime adapters own their native client surfaces.ki-repo-dotfiles-chezmoiis the house standard for any chezmoi source repo — naming prefixes, templating,chezmoi apply, surgical-patch reverse-merge — with no knowledge of MCP.
This skill's delta is the render contract that ties them together — the mcp-servers-json template, its source-data wiring, and the chezmoi apply that generates the surfaces ki-env-binding audits. That contract belongs to neither sibling: ki-env-binding owns no renderer, and ki-repo-dotfiles-chezmoi covers only generic dotfile templating. The full model is in the standard; the checkable criteria are in the generated rubric; provenance is in the sources list.
Operating modes
Like every governance skill it carries the universal AUDIT · CONFORM · EDUCATE · REFRESH.
Mode HELP — orient without changing anything
Invoked as help / -h / ?, it explains itself and stops: name, purpose, invocation, modes, and off-ramps, taking no action. With no mode it does the same, then, in an interactive session only, offers the mode choice and prompts for the target the chosen mode requires.
Mode AUDIT — check the render path, by composition
The AUDIT is a composition, declared here and run in sequence — it does not fork or re-implement the sibling criteria:
- Run
ki repo audit --repo <chezmoi-repo> --skill ki-repo-dotfiles-chezmoifor generic chezmoi repository shape. - Run
ki repo audit --repo <chezmoi-repo> --skill ki-env-bindingfor the canonical source and mcporter evidence. - Run
ki repo audit --repo <chezmoi-repo> --skill ki-env-binding-chezmoifor this skill's delta: the target is safely inspectable (BINDCHEZ-1), source structure is distinguished from rendered and applied state (BINDCHEZ-2), valid MCP render data exists (BINDCHEZ-3), the exactmcp-servers-jsonpartial exists (BINDCHEZ-4), and at least one target template uses it (BINDCHEZ-5). - Judge the [J] criteria by reading: does separately authorised, secret-safe evidence establish render parity (
BINDCHEZ-6), and do the standard, rubric, provenance, and sibling boundaries remain coherent (BINDCHEZ-7)? - Report sibling findings under their owning skill and BINDCHEZ findings under this one. Its mechanical violations are WARN-level because the external render choice requires an operator decision.
Mode CONFORM — bring the render path into step
- Run AUDIT first.
- Compose the sibling write passes. Run
ki-repo-dotfiles-chezmoiCONFORM on the chezmoi repo, thenki-env-bindingfor the canonical source — in sequence, never forked. - Resolve the report-only choices. This skill deliberately proposes no writes or commands: choose the repository's existing data pattern, template location, and target set from the findings. Those are external chezmoi policy decisions, not defaults the rubric can infer safely.
- Render — edit the chosen MCP source, preview with
chezmoi diff, then runchezmoi apply. The render path regenerates a surface from the source; it never blesses a hand-edited rendered config, which would diverge from the source. - Re-run AUDIT until clean.
Mode EDUCATE — explain and activate the render contract
EDUCATE scaffolds no standalone artifact. Use ki repo educate --skill ki-env-binding-chezmoi --repo <target> to explain the render contract after the repository declares this skill and its ki-env-binding and ki-repo-dotfiles-chezmoi dependencies.
Mode REFRESH — re-anchor the render contract
Precondition: REFRESH edits this skill's own canonical files, which exist only in ki-agent-backpack. Invoked from an installed copy, it stops here and names the harness as where to run it — or, for a pattern recurring across bases, routes it through ki-repo-kb's IMPROVE mode instead.
Re-anchor when the chezmoi render contract changes — the mcp-servers-json template shape, the .chezmoidata wiring, or the chezmoi apply behaviour — or when either composed sibling's contract moves. Read the sources list, confirm the standard still matches the render template and each surface's real config, propose a diff, bump the dates.
Composition
ki-env-binding— owns the renderer-neutral surface audit (surfaces agree with the single source). This skill composes its AUDIT / CONFORM for the surface half; it never re-implements the surface check.ki-repo-dotfiles-chezmoi— owns the generic chezmoi source-repo standard. This skill composes its AUDIT / CONFORM for the repo half; it never re-checks generic repo shape.ki-repo-mcp— owns each MCP server's own code and the cross-surface-enablement design record. For a single server's layout, route there.
Notes
- Why a separate skill, not a flag:
ki-env-bindingis renderer-neutral by design — folding chezmoi into it would couple every surface audit to one renderer. The render path is a genuine delta over both siblings, so it composes them rather than forking their modes (ADR-KI-HARNESS-SKILLS-004). - Not coverage-scoped everywhere: this skill is installed only where the chezmoi render path is actually in use; a plain (non-chezmoi) setup runs
ki-env-bindingalone and re-renders through whatever tool reads the canonical source.