Skip to content

Config drift is silent both ways: the schema detector has no caller, and feature drift has no detector #511

Closed

Description

@sandstream

Two ways a .kit.toml falls behind, and neither reaches the operator. One has a detector nobody calls; the other has no detector at all.

Drift 1 — the schema detector exists and nothing routes to it

$ grep ^version .kit.toml
(nothing — legacy v0)

$ kit config migrate --check
✗ Config is at v0; current is v1. Run `kit config migrate`.        exit 1

That is a working detector. But kit status (the adoption checklist, 8 rows) and kit check (declared vs reality) both say nothing about it:

$ kit status
kit status  6/8 set up
  ✓ .kit.toml  present
  ✓ secrets vault  store: …
  ✓ tools  4 declared
  ✓ gitignore hygiene  sensitive paths covered
  ○ dependency policy  no allowlist  → run `kit security policy init`
  ✓ agent wired  CLAUDE.md kit block present
  ✓ memory indexed  …
  ○ memory hooks  not installed  → run `kit memory install`

✓ .kit.toml present is the only row about the config, and "present" is not "current". So you find kit config migrate --check by already knowing it exists.

Measured on kit's own repo: the config is v0 while the schema is v1, and nothing said so until someone asked the question directly. Same shape as #470 (an anchor record read by nothing) and #500 (latest compared to nothing): the mechanism is right, the reader is missing.

Drift 2 — feature drift has no detector

A .kit.toml written several versions ago does not know about the sections kit has learned since — [deploy], [policy.agent_writes], [context], [air_gap], [governance.audit]. Nothing reports "this repo could adopt X". The knowledge exists but is not readable:

  • applyRecommendedHardening() (src/recommended.ts) knows the recommended posture — memory hooks, the triage gates in pre-commit, a context-check pre-push when [context] is declared;
  • it is reachable only from kit setup (src/commands/setup.ts:36), and it applies rather than reports. There is no way to ask "what would this give me?" without letting it write to ~/.claude, ~/.codex and the repo's git hooks.

So a long-lived repo silently keeps whatever posture it was set up with, and the only path to the current one is a command that mutates.

On kit rebase (the shape this was raised as)

Recommend not adding a verb. rebase already means something specific and different to every git user, and kit has the vocabulary for both halves — this is a missing reader, not a missing command.

Proposed

  1. A config schema row in kit status and kit check. No new logic: call the existing kit config migrate --check path and render it. ○ config schema v0, current v1 → run kit config migrate. A detector with no caller is the defect; this is the caller.
  2. kit config recommend — read-only. The knowledge in applyRecommendedHardening(), rendered instead of applied: which sections this repo could adopt, one line each on what it buys, and nothing written. kit setup keeps applying it; the report is what a repo that already exists needs.
  3. Optional, and only if (1) proves useful: let kit fix offer the migration (it already applies the safe fixes), keeping the write behind the same explicit step as today.

Not proposed

Auto-migrating on load. A config that changes shape underneath a session is worse than one that is behind, and the whole point of the schema version is that the change is explicit and reviewable.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions