Loop engineering substrate for coding agents — state, lossless optimization, and hook enforcement: verify-gated loops that can't lie, run away, or go broke. For Claude Code, Codex, Cursor, Gemini CLI, VS Code Copilot, and any MCP client.
Knitbrain provides 37 well-named tools with mostly clear descriptions and complete input schemas across the board. Naming follows consistent verb_noun conventions (optimize, retrieve, search, read, classify, run, record, save, load, compose, etc.), which is excellent. All tools have descriptions ranging from 80-200+ characters, meeting the 10-1024 baseline. All input schemas visible in e2e-tools.mjs and src/mcp/tools.ts include type definitions and descriptions for parameters. However, several limitations prevent a higher score: (1) Output schemas are NOT documented, responses appear to be free-form text or JSON without published structure, forcing LLMs to parse unstructured data; (2) Error handling is minimal, tools lack recovery guidance and categorization (retryable vs fatal); (3) Many tools bundle related concerns (e.g., knitbrain_run orchestrates classify + compose + propose in one call, violating single-responsibility); (4) Composition gaps, tools like run_loop and run_workflow appear to do complex multi-step work internally rather than exposing granular steps; (5) Missing pagination support on list/search tools (e.g., brain_search, search_learnings, activity_log have no limit/offset beyond activity_log's limit param). The tool set is ambitious and coherent for a 'loop engineering' system, but lacks the precision and defensiveness of A-grade production tools.
Read the live activity log (dashboard CRM feed): brain events, tool calls, and learnings.
Propose agents (teammates) for the current task (requires prior classification).
Save an agent definition (charter + role) to the team board (requires prior classification).
Unified brain search: fan across memory, knowledge, wiki, and skills (sourced results).
Build the context closure for a goal: files, imports, and knowledge (the MCP agent's view) — without running edits.
Classify a task as 'quick', 'standard', or 'complex' (gates plan-mode protocol).
Compose a workflow file (PLAN + CONSTRAINTS + CHECKPOINTS) from a description (requires prior classification).
Output schemas not documented. Tools return free-form text or JSON structures without published schemas. LLMs must parse unstructured responses, increasing errors and token waste.
Error handling and recovery guidance missing. Tools lack clear error categorization (retryable vs fatal) and actionable recovery hints. E.g., what should the LLM do if knitbrain_run fails?
Multi-concern tools reduce composability. knitbrain_run orchestrates classify + compose + propose internally. knitbrain_run_loop couples iteration control with unknown edit semantics. Agents cannot reuse pieces of these workflows.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 67 | 2026-07-28+ | v2 |
Read the live meter: token savings, original/skeleton costs, and retrieval stats.
Read live context: current model, token budget, and session usage.
Fetch the full record of a single learning by id.
Record feedback (helpful/unhelpful) on a learning; loop-closes the lesson (requires prior classification).
List local projects (~/knitbrain/projects/ dirs) the server can switch to.
Load (or auto-initialize) the session: knowledge graph, handoff state, and loop context.
Load the composed workflow file (if it exists) — returns PLAN + CONSTRAINTS + CHECKPOINTS.
Read aggregate metrics: loop cycles, plan gate hits, token savings, learning health, skill health.
Push the team board to a shared hub (one-way, fire-and-forget; team sync).
Onboard a project: greeting + 5 intent questions → project charter (requires prior classification if answers provided).
Compress a payload (JSON / code / prose) into a skeleton + handle (lossless; exact original in CCR via knitbrain_retrieve).
Health check — returns pong and the server version.
Read the project: root README, structure, and stack (source of truth for the agent, stable across runs).
Query the imports and dependencies for a file (auto-scans the knowledge graph on first call).
Read a project file with automatic skeleton on large files (exact original in CCR via knitbrain_retrieve).
Record a false-positive (or correction) in the calibration voting pool.
Record a learning: a persistent insight about the codebase, workflow, or domain (requires prior classification).
Restore the exact original from a ⟨recall:HASH⟩ handle (byte-for-byte, lossless recovery).
Orchestrator: classify + compose workflow + propose skill (closed-loop dispatch).
Closed loop: given a goal, iterate with the orchestrator (run), apply edits, and cycle until met or max_iters.
Save session state (goal, progress, next step) for resume across restarts.
Audit context usage: token split (skeleton vs. full), retrieval hit rate, and what's cached (meter detail).
Search the project's code graph by semantic query (BM25 over signatures, not whole files — gated to relevant code chunks).
Search the learning store by semantic query (BM25).
Self-check: run the server's internal consistency checks (memory coherence, knowledge graph, calibration state).
Save a skill (a reusable decision or pattern) to the skills store (requires prior classification).
Search the skills store by semantic query.
Read the team board: agents, skills, and posted insights (summarized).
Verify a boolean claim against the codebase (gauntlet gate: closes the sycophancy loop on false claims).
Ingest a markdown page into the wiki (leg 5: compounding knowledge base) (requires prior classification).
Pagination missing on high-cardinality results. brain_search, search_learnings, activity_log, search_code have no offset/cursor pagination. Large result sets can exhaust context windows without explicit limits.
Vague parameter descriptions on procedural tools. knitbrain_run_loop accepts 'goal' and 'max_iters' but no guidance on what constitutes success, how edits are applied, or what happens on timeout.
Prerequisite chains unclear. Many tools note '(requires prior classification)' but do not document what 'classification' means, how it's stored, or what happens if omitted. Causes agent confusion and tool misuse.