What it is
Claude Code is already a capable agent. khaness adds the discipline of a senior engineering process on top of it — structure, gates, and memory — so that the agent designs before it builds and verifies before it claims done.
It is a meta-layer: you keep using Claude Code as normal, and khaness wraps each substantial task in a DGE loop:
- Designer — "are we building the right thing?" For architectural decisions, a 3-agent debate (Planner → Critic → Architect) converges on a design, deterministically.
- Generator — "did we build it as designed?" Implement the agreed design, nothing more.
- Evaluator — "does it actually work?" A 3-tier stack: mechanical validators → a semantic LLM evaluator → optional multi-model consensus. Verification gates the next step.
Claude Code is powerful. khaness makes it disciplined.
How it works
- You state a goal. A prompt hook detects design-class work and surfaces the debate engine.
- Design converges.
/harness-debate spins up Planner / Critic / Architect subagents. The Critic attacks the proposal on assumption, failure, and over-simplification axes; the Architect renders a verdict. Convergence is deterministic — two consecutive approvals with an identical ontology-snapshot hash — and every step is appended to an event log so the decision is replayable.
- Generation proceeds against the locked design, with lifecycle hooks enforcing guardrails (destructive-command denial, sensitive-file protection, branch/PR conventions).
- Evaluation gates done. ~40 mechanical validators run as a regression suite; a semantic evaluator scores 5 axes plus a strict completeness boolean; a paradox guard stops an agent from grading its own work as finished.
- The harness improves itself. A repeated failure becomes a permanent skill or hook rule (the 2-Strike Rule), so the same mistake can't recur.
Quickstart
As a Claude Code plugin (recommended):
claude plugin marketplace add github:trevi00/khaness
claude plugin install khaness@khaness
The plugin bundles the commands, agents, skills, and hooks; Claude Code resolves the bundled scripts via ${CLAUDE_PLUGIN_ROOT}, and runtime state lives in your ~/.claude. pip install -r requirements.txt once for the PyYAML dependency.
Or as a ~/.claude clone (for hacking on the harness itself):
git clone https://github.com/trevi00/khaness ~/.claude
cd ~/.claude && bash install.sh
install.sh generates a portable settings.json from the template (interpolating your clone location into the hook paths), installs Python deps, and runs the regression suite to prove the install is sound. Then open a new Claude Code session in that directory.
A few commands to try:
/harness-debate <a design decision> # 3-agent design convergence
/harness-autopilot # drive a task through the DGE phases
/harness-audit # 6-axis harness self-check
First thing in any project: create .claude/tech-stack.yaml declaring your stack, so the skill tree filters to what's relevant.
What's inside
| |
|---|
| 42 subagents | Planner / Critic / Architect debate roles, evaluators, researchers, and project-workflow agents |
17 harness-* commands | debate, autopilot, audit, interview, team, ultrawork, … |
69 kha-* workflow skills | spec → plan → execute → verify project lifecycle |
| ~40 validators | mechanical pass/fail gates run as a regression suite |
| 254 skill docs total | the 69 kha-* above + per-stack trees (java, kotlin, typescript, flutter, …) + the always-on _common/ set |
The scripts/ codebase is a one-directional 4-layer stack — lib/ → validators/ → handlers/ → engine/ — and is Open/Closed by design: a new provider, worker, or validator is a new file + one registry line, never an edit to existing code.