✨ feat(kavach): rule checks import the engine with types, 0.6.16

Merged
AT
15d ago
+55-3

Slice: #144

For athya_mono W-58 (athya-hq/athya_mono#3619).

Held: auto-merge stays off until athya-rules' ported checks pass against this build, so the exports in 0.6.16 are the ones they need. Then auto-merge, then tag v0.6.16.

Athya's rule checks move out of athya_mono into athya-rules (W-58) and run on this engine, so a consumer now imports the engine from kavach instead of keeping a copy beside its checks.

What changes

  • Declarations. tsconfig.build.json emits .d.ts; a TypeScript consumer type-checks against the engine. Checked from athya-rules (TypeScript 5.9, skipLibCheck): a wrong type for Context['git'] (declared in fire-log.ts, reached through runtime.d.ts) and for a Probe field are both refused.
  • Exports. rule-checks/live-runs, rule-checks/edit-text, rule-checks/spawn and rule-checks/fire-log, beside shell-words. Athya's checks use livePush, defaultProbe, readText, listDir, afterEdit, run, git and the Git type.
  • lessons. A registry row may list lessons, where the rule's lessons live now (owner/repo:path#anchor). A refusal then prints Lesson: <list>, or Lesson: none beyond this check for an empty list, in place of Memory: <notes>. Athya's memory notes moved into docs (athya_mono 0114 W-32), so its refusals already print Lesson:; without this, they would point at notes that no longer exist.
  • kavach 0.6.16.

Evidence

  • tsc -p tsconfig.json: clean.
  • The 14 rule-check test files: 594 of 594 pass. registry.ts 100% lines / 98.67% branches, runtime.ts 100%.
  • From athya-rules, the moved checks run on this build end to end: kavach's CLI with Athya's checks module and registry refuses git commit while the session worktree's push marker is live (H-02), and passes the same commit in main.

🤖 Generated with Claude Code