Skip to content

v2.0.0 — The Honest Architecture Release

Choose a tag to compare

@nokhodian nokhodian released this 11 Jul 23:34

Monomind 2.0.0 — The Honest Architecture Release

This is a major release, and an unusual one: 2.0.0 is smaller than 1.19.0 — by about 46,000 lines. Every layer of monomind was put through an evidence-based audit: disk artifacts, real logged data, and provably-executed code paths counted; code comments, docs, and marketing claims counted for nothing. What survived is real. What didn't is gone.

Why 2.0.0

The major bump reflects breaking changes to the CLI and MCP surface, not new machinery. Monomind now claims exactly what it does:

  • A codebase knowledge graph (Monograph) — tree-sitter + SQLite, impact analysis, dead-code detection
  • Autonomous agent orgs — define a goal as JSON, walk away, come back to commits; loops terminate on git-verified empty rounds
  • A hooks runtime — routing, session context injection, enforcement gates, background workers that now demonstrably run
  • MonoFence — prompt-injection detection at ~0.04ms per check

Breaking changes

Removed CLI commands (40 → 31)

  • workflow — reported "running" for steps nothing ever executed
  • transfer-store (top-level) — its fallback registry fabricated a marketplace (invented download counts and ratings); now returns an honest empty result
  • enrich — controlled a pipeline no code ever invoked
  • claims — authorization config that nothing enforced
  • issues — 1,900+ lines whose only consumer was itself
  • daemon — replaced by hooks-integrated workers (see below)
  • neural → merged into hooks intelligence (all 8 subcommands preserved)
  • replay → merged into session replay (and now prints actual replay data)
  • scan → merged into search scan (search auto-scans on stale fingerprint)
  • analyze boundaries|modules|dependencies|circular — their resolvers were never shipped and always failed
  • guidance slimmed to guidance setup (gate enforcement lives in the hook handler, which is self-contained)
  • start --port / start --skip-mcp — parsed and never used

Removed packages

  • @monomind/guidance — a call-site audit proved it dead at runtime; live enforcement never depended on it
  • @monomind/security — 272 lines inlined into the CLI
  • SPARC methodology (commands, skills, agents) — zero invocations across 27 real sessions

MCP surface

  • Monograph tools: 19 exposed by default (build, query, suggest, impact, context, neighbors, dead_code, stats, health, augment, god_nodes, detect_changes, get_node, api_impact, route_map, staleness, watch, watch_stop, doctor). 27 advanced tools available via MONOGRAPH_MCP_ADVANCED=1. Deleted: monograph_embed (deprecated no-op), monograph_suggest_auto (folded into suggest as checkStaleness), 3 redundant rerank variants.
  • Removed 5 simulated hooks_worker-* tools that faked progress with timers, and the hive-mind/workflow tools that fabricated results.
  • Hive-mind "consensus strategies" are now documented as what they are: vote-count thresholds on an in-process tally, not distributed consensus protocols.

New: workers that actually run

The old design had a background daemon almost nobody started, while the statusline, doctor, and routing context readers waited for files it never wrote. 2.0.0 deletes the daemon and folds the four workers with real consumers — map, audit, optimize, consolidate — plus ddd and security into the hooks runtime:

  • Workers fire at session start with a 6-hour staleness gate (atomic tmp+rename writes, never block session start)
  • Sessions now receive a [CODEBASE] context block from the live codebase map
  • The statusline DDD segment shows real metrics instead of a silent heuristic fallback
  • monomind hooks worker list|run <name> drives them directly, in-process
  • monomind doctor reports worker-output freshness instead of daemon liveness

Fixed: the learning loop actually closes now

  • Pattern recall ran for the first time. The route handler asked the pattern store for context without ever initializing it — every recall silently returned nothing. Fixed.
  • Patterns are worth recalling now. Stored patterns were "Successful task editing N files: …" at a hardcoded confidence. They now capture the session's prompt and commit subject, filter build noise, dedupe, and carry evidence-based confidence.
  • Routing feedback carries signal. Session success was hardcoded-optimistic (100% success in every record, forever). It now defaults to null and becomes a boolean only from evidence; agent labels are normalized; monomind doctor reports the real numbers.
  • @monomind/hooks loads in live sessions. The bridge import never resolved from the hook path (pnpm workspace linking); it now falls back to the built package and is runtime-verified.

Packaging

  • npm tarball: 13.8MB / 1,806 files → 10.7MB / 1,359 files. Removed a duplicate 2.77MB .claude/ tree that installs never read, stale globs pointing at directories that don't exist, and runtime state files that had leaked into the package.
  • Fixed a real install bug: monomind init installed mastermind commands that invoke mastermind-skills, but never installed that skill — user projects got broken references. Fixed.
  • Defused a publish footgun: a sync script wired into prepublishOnly would have deleted 21 shipped skill directories on the next publish.

Test suite

  • CLI package suite was flaky (4–34 failures oscillating across identical runs) due to split in-memory fs mocks; now 687/687, deterministic
  • Root suite: 38 files, 744 passed, zero errors — including the long-standing process.exit error, fixed with a require.main guard
  • Deleted 9 tests asserting subcommands that never existed

Published packages

Package Version
monomind 2.0.0
@monoes/monomindcli 2.0.0
@monoes/monograph 1.4.0
@monoes/monobrowse 1.0.2 (unchanged)
monofence-ai 1.0.0 (unchanged)

Upgrade notes

  • If you scripted monomind daemon start, remove it — workers now run automatically at session start. Use monomind hooks worker run <name> for manual runs.
  • monomind neural …monomind hooks intelligence …
  • monomind replay …monomind session replay …
  • monomind scanmonomind search scan
  • If you need the advanced Monograph tools (cypher, snapshots, export, wiki, multi-repo groups), set MONOGRAPH_MCP_ADVANCED=1 on the MCP server.

The audit methodology behind this release — value judges, convergence arbiters, and git-diff-verified empty rounds — ran as a monomind org (/mastermind:runorg) auditing monomind itself, across five phases and ~119,000 deleted lines total.