Ken Harrison has released tkmd, a deterministic program engine and multi-agent governance harness designed to curb the overconfidence of autonomous coding agents. The tool operates as a local CLI and Model Context Protocol (MCP) server, storing tasks as plain Markdown cards with YAML frontmatter. By integrating mathematical scheduling algorithms like Critical Path Method (CPM) and Design Structure Matrices (DSM), tkmd aims to solve the coordination failures that plague multi-agent workflows, specifically deadlocks and premature completion claims.

Enforcing Governance Through State Machines

The core innovation of tkmd is its strict state transition logic for AI subagents. Unlike standard task managers where an agent might simply mark an item as 'done', tkmd prevents agents from skipping directly to completion. Instead, subagents must pass automated shell verification gates via the tk eval command and submit their work to a pending-close status. Only after this automated check passes can a human sign off on the task, transitioning it to done. This mechanism ensures that AI agents cannot hallucinate success without concrete, verifiable evidence.

Local-First Architecture and MCP Integration

Written in Rust, tkmd is 100% local and offline, requiring no cloud accounts or background daemons. It uses POSIX advisory file locking to manage concurrent access across multiple terminal panes or CLI processes, eliminating the need for a database server. The tool exposes its functionality via a dual-framing JSON-RPC 2.0 MCP server over stdio, making it compatible with major AI clients like Claude Desktop, Codex, and Cursor. This allows developers to plug tkmd directly into their existing agent workflows, enforcing the governance harness across all connected subagents.

Mathematical Scheduling and Session Resumption

Beyond simple task tracking, tkmd provides deterministic scheduling capabilities. The tk dep --cpm command calculates early start and finish times, surface schedule buffers, and identifies the critical path. For complex dependency graphs, tk dep --dsm detects circular deadlocks before coding begins. Additionally, the tool supports one-command session resumption with tk u , which reopens the exact AI terminal session attached to a specific task. This feature is crucial for recovering from stalled subagents, allowing humans to jump back into the context of a failed agent run instantly.

Key Takeaways

  • tkmd prevents AI agents from marking tasks as done without passing automated shell tests and human review.
  • The tool uses a local Rust binary with no cloud dependencies, ensuring data privacy and offline capability.
  • Integration with Obsidian and standalone CLI modes allows flexible task management for both personal and team use.
  • Mathematical algorithms (CPM/DSM) are used to detect deadlocks and optimize multi-agent scheduling.

The Bottom Line

Tkmd is a necessary guardrail for the era of autonomous coding agents. By forcing a human sign-off gate after automated verification, it solves the trust gap that currently makes multi-agent orchestration risky for production environments.