Skip to content

v0.10.0

Oak Dev-inter edited this page Apr 26, 2026 · 2 revisions

v0.10.0 β€” Mode System + Runtime Backend Hooks πŸ”₯

Released: 2026-04-24 Theme: Runtime enforcement alongside the prompt-level framework. Backend Python hooks that actually fire on Claude Code events β€” not just prose in SKILL.md.

TL;DR

Kasidit used to be 100% prompt convention. v0.10 adds a real backend: 5 Python/bash hooks wired into Claude Code's event system via an idempotent install.sh. A /kasi Mode command gates framework depth (router default β€” thin, fast, opt-in escalation). Three overlapping audit agents (code-reviewer, security-auditor, perf-profiler) merge into a single audit-specialist with a --focus flag.

Test suite: 10/10 pass under Python 3.9.19 and default interpreter. Backend validated end-to-end on fake HOME: route β†’ record β†’ route feedback loop works.

What's new

1. πŸ”₯ Backend hooks (runtime-enforced)

For the first time, Kasidit enforces some rules outside the LLM context. Bundled hooks under plugins/kasidit/hooks/:

Hook Event Job
kasidit-route.py UserPromptSubmit Classify incoming message into a mission kind, query route-memory.jsonl for the shortest successful mode on prior runs of this kind, inject a 1-line [kasidit] kind=... mode=... history=... recommendation into the turn.
kasidit-verify.py PostToolUse + Stop Scan assistant output for [high] confidence labels and cross-check against actual Read / Bash tool calls in the same turn. If a [high] claim has no matching verification call, print a downgrade notice. Also detects "delegating to specialist" claims paired with direct Edit / Write / Bash β€” the master orchestrator violation.
kasidit-record.py Stop / SubagentStop Parse [kasidit-log|pattern|memory|rule] emit lines from the final assistant output. Append to the matching JSONL in ~/.claude/skills/kasidit/center/. This is how the router's memory grows over time.
kasidit-update-check.sh SessionStart (1Γ—/UTC day) Hit GitHub Releases, compare vs. installed marketplace.json. Print 1-line update notice if newer. Silent on match / offline.
kasidit-drift-check.sh SessionStart Centerlite sync-staleness reminder (>7 days). Accepts both KASIDIT_CENTER and legacy KASIDIT_CENTER_DIR.

All stdlib-only. Tested under Python 3.9 and default interpreter. Backend-Hooks for payload contract.

What's still convention (not runtime-enforced):

  • Rule 1 (mission-driven) β€” AI decides whether to narrow.
  • Mode gating β€” AI decides whether full framework rules apply. Claude Code's skill harness has no conditional loader.
  • The rest of the 11 core rules β€” followed by prompt instruction, not harness gate.

Honest split disclosed in README.md Honesty section.

2. /kasi Mode system

A mode toggle to control framework load depth:

/kasi off      # skill inactive
/kasi router   # default β€” ~20 line classifier. Escalates only when needed.
/kasi lite     # Rule 1 + Rule 11 only (~100 line).
/kasi full     # all 11 rules + 8 agents + Gravity (~650 line).
/kasi ultra    # full + verifier pass + master self-check each turn.

Heavy /kasi-* commands auto-escalate for the mission, revert on end. Casual chat stays in router. Result: context tax drops roughly ~60% versus always-on framework.

State precedence: session override > project config > global config > default. Caveat: this chain is a spec β€” no runtime resolver reads and merges the three configs. The AI and the user apply them by reading the files directly. See Kasi-Mode for the full spec.

Install-time question (/kasi-init): one prompt β€” router / lite / full β€” saved to ~/.claude/skills/kasidit/center/config.json.

3. Agent consolidation: audit-specialist

Three prior agents overlapped heavily β€” same file reads, same checklist mechanics, different focus areas. Merged:

Old agent New invocation
code-reviewer audit-specialist --focus=quality
security-auditor audit-specialist --focus=security
perf-profiler audit-specialist --focus=perf
β€” audit-specialist --focus=all (runs all three sequentially)

The old three are kept as name-resolution stubs β€” empty files so references don't raise missing-agent errors. They do no work. Removed in v0.11.

No auto-mapping router β€” users and the master orchestrator must invoke audit-specialist --focus=<lens> explicitly. See Agent-Audit-Specialist.

4. install.sh β€” idempotent installer

Replaces the previous manual cp instructions. From a cloned repo:

bash plugins/kasidit/install.sh                 # standard install
bash plugins/kasidit/install.sh --dry-run       # preview plan, no writes
bash plugins/kasidit/install.sh --mode=lite     # set initial default mode
KASIDIT_SKIP_SETTINGS=1 bash install.sh         # hooks only, no settings.json merge

Behavior:

  • Copies hooks to ~/.claude/hooks/, chmods +x.
  • Merges ~/.claude/settings.json idempotently (jq primary, python3 stdlib fallback). Backs up to settings.json.kasidit-backup-<ts> before editing. Keeps last 3 backups.
  • Registers 6 hook entries across SessionStartΓ—2, UserPromptSubmit, PostToolUse, StopΓ—2.
  • Skips entries already registered (command-string match).
  • Seeds Gravity hub: 5 JSONL files (route-memory, patterns, memory, rules, missions), 12 default checklists, 2 knowledge templates, .last_sync and .last_update_check stamps.
  • Writes center/config.json with the chosen --mode (default router).

Honors CLAUDE_PLUGIN_ROOT if Claude Code provides it.

5. 12 default checklists

Seeded at install under ~/.claude/skills/kasidit/center/checklists/:

security code-review perf
PHP βœ“ βœ“ βœ“
Node.js βœ“ βœ“ βœ“
Python βœ“ βœ“ βœ“
Go βœ“ βœ“ βœ“

4 stacks Γ— 3 lenses = 12 files. Pulled into project .kasidit/CHECKLISTS/ by /kasi-init Gravity-pull step or /kasi-pull checklist <name> ad-hoc.

6. Incremental backend save ("ΰΈ­ΰΈ­ΰΈ‘")

When AI emits tiny structured lines at mission end or pattern discovery, kasidit-record.py parses them and appends to the matching backend store. Cost per mission: ~20-50 tokens emitted by AI.

[kasidit-log] kind=bug-fix-single-file mode=lite turns=2 outcome=pass
[kasidit-pattern] name=sanctum-bearer-auth file=app/Middleware/ApiAuth.php note="..."
[kasidit-memory] fact="project uses PHP 7.4 + Laravel 8"
[kasidit-rule] scope=project rule="no composer update without lock diff"
Emit Target store Consumer
[kasidit-log] center/route-memory.jsonl router recommendations
[kasidit-pattern] center/patterns.jsonl /kasi-pull pattern, PATTERNS.md seed
[kasidit-memory] center/memory.jsonl cross-session fact recall
[kasidit-rule] scope=project .kasidit/rules.jsonl project-local rules
[kasidit-rule] scope=global center/rules.jsonl user-wide rules

Over months the router gets sharper β€” the shortest mode that has worked for each mission kind, based on history. Privacy: no prompt text in these files, only metrics. Safe to keep local.

7. sudo <mission> β€” speed shortcut

Session-only keyword that spawns min 2 parallel specialists with "skip clarifying questions" pacing.

sudo fix auth bug             # 2 parallel specialists, reasonable assumptions
sudo 6 review AuthService.php  # 6 agents explicit
/kasi-multi --fast <mission>  # equivalent flag form

Not a permission escalation. Does not bypass destructive-op confirmation, tier caps, or scope narrowing. Purely a pacing signal: "trust defaults, go fast, use parallel."

8. Python 3.9 compatibility

macOS's default python3 is often 3.9. Hooks verified under pyenv 3.9.19:

  • from __future__ import annotations in every hook.
  • Optional, List, Tuple from typing instead of PEP 585 / 604 syntax.
  • Test suite runs green on both 3.9 and default interpreter.

9. SKILL.md merge β€” Full Framework back inline

The v0.9.3 experiment of splitting SKILL.md into router-lite and SKILL-full.md was reverted. Claude Code's skill harness loads one file β€” there is no conditional loader for "full mode" escalation. Honest fix: merged back into a single SKILL.md with a "Full Framework" header that tells the model to treat the body as inert outside full/ultra mode. Prompt-level gate, best-effort, not runtime-enforced.

Honesty caveats (disclosed, not hidden)

The v0.10 release does not ship these, despite prose that may imply otherwise:

  • No runtime resolver for mode precedence. /kasi status reports what the AI reads from config files; it is not enforced by a hook.
  • No auto-mapping of old agent names. Users must invoke audit-specialist --focus=<lens> explicitly.
  • No /kasi-memory subcommand. Inspect route-memory.jsonl with jq manually.
  • Mode gating is prompt-level. AI compliance is best-effort.
  • Master Orchestrator enforcement is partial. kasidit-verify.py detects the "claimed delegation + direct edit" pattern but does not block it β€” only prints a warning.

These are called out in README.md Honesty section and CHANGELOG.md.

Tests

  • plugins/kasidit/hooks/test_hooks.py β€” 10 isolated snapshot tests. Per-test fresh tempdir. No shared state. All pass under Python 3.9.19 and default interpreter.
  • End-to-end validated on fake HOME: install.sh β†’ route.py classify β†’ record.py append β†’ route.py re-query reads history.

Upgrade path

/plugin marketplace update kasidit
/plugin install kasidit@kasidit
/kasi-init            # answer 1, 2, or 3 when prompted; default mode=router

Existing users: /kasi-init is idempotent. It detects existing config.json and skips the question. Re-run install.sh to wire new hooks added in v0.10.

See also

Links

Kasidit

Core

Version History

Concepts

Commands

Agents

Deprecated v0.10 (stubs β†’ audit-specialist --focus=..., removed in v0.11)

Clone this wiki locally