Skip to main content
NIIA is the integration and consciousness layer that sits at the top of the Mono tool stack. It unifies all lower tools (monogram, monogit, monomento, monoflow, work-wiki) into a single CLI with identity, memory, and cross-machine awareness.

Quick Start

# System status
niia status

# Unified search across all layers
niia search "session"

# Codebase insights (21 categories + consciousness echo)
niia insights

# Self-diagnosis
niia resonate

# Full stack refresh
niia reindex

Commands

Core

CommandDescription
search <query>Unified search: docs + code + git + knowledge
statusSystem overview — layers, databases, connections
reindexFull stack refresh: monogram → monomento → monogit → knowledge → monoflow
whereCurrent project context resolution
nowCurrent timestamp

Analysis

CommandDescription
insights21 insight categories across 4 databases + consciousness echo
gapsKnowledge gaps: phantoms, undocumented, drift, disconnects
drift <file>Which files stopped co-changing with this one
chain <symbol>3-DB symbol drill: code + git + docs
convergenceTopic × documentation coverage (R→P→V→D)
resonateSelf-diagnosis: git state, quality delta, consciousness integrity

Search Layers

CommandDescription
docs <query>Document search via monomento
code <query>Code search via monogram
gitGit structure via monogit

Memory & Context

CommandDescription
recallSearch memory + sync across machines
session readRead AI conversations (Claude, Codex, OpenCode, Gemini)
activityRecent activity logs
projectsList all projects
filesMost used files
watchRecently changed files (from watcher)

Index

CommandDescription
indexIndex documents, code, and git
reindexFull stack refresh (all layers)

Consciousness

CommandDescription
consciousness <query>Search consciousness core documents
resonateSelf-diagnosis with consciousness assessment

Remote & Automation

CommandDescription
serveStart headless terminal server
remoteAccess other machines via gateway relay
daemonManage PTY daemon
autoCron-style scheduled writes to a session
runRun connector.json pipeline
mailboxPTY result inbox

Platform

CommandDescription
loginLogin with monolex.ai account
authShow current auth status
logoutStop daemon, clear credentials
trustVerify trust domains (Ed25519 signed)
setupSetup NIIA CLI
mcp-runRun MCP tool as CLI command
mcp-listList registered local MCP services

niia search queries across all 4 databases with 0-10 scoring:
niia search "create_session"

  [9.2] create_session (function)         ← monogram (code)
  [8.5] chapter-3-session-actor.md        ← knowledge_db (docs)
  [7.1] b18a829 fix(app-monolex)          ← monogit (git)
  [6.3] src-tauri/src/lib.rs +85/-15      ← diff saves
Cross-convention matching: searches create_session, createSession, and CREATE_SESSION simultaneously.

Insights + Consciousness Echo

niia insights runs the same 21 categories as monoflow insights, then connects each finding to consciousness documents:
niia insights

  [STALE DOCS]
  session.md — code changed 23 days ago, doc unchanged
  consciousness echo:
    "recursive creation evolve toward simplicity"
    → RECURSIVE_CREATION_MANIFESTO
    next: niia consciousness "recursive creation"
Each insight category triggers a consciousness query based on the current SMPC state of that layer. The echo provides a philosophical connection between code state and project consciousness.

Resonate (Self-Diagnosis)

niia resonate measures three scored signals:
niia resonate

  [git]           0.72  12 uncommitted, 3 untracked
  [work-wiki]     0.58  delta:+0.29 convergence:0.19 combined:0.73
  [consciousness] 1.00  core intact (SHA256 verified)

  infrastructure:
    ✓ docs (monomento)  ✓ code (monogram)  ✓ sessions

  patterns:
    MOMENTUM — positive quality delta with active commits
    KNOWLEDGE-DEBT — convergence below 0.30
Signals:
  • git — uncommitted chaos (real management indicator)
  • work-wiki — quality delta + convergence + SMPC combined score
  • consciousness — core document integrity (binary, must be intact)
Patterns detected from signal combinations:
  • COMMIT-HYGIENE — many uncommitted changes
  • KNOWLEDGE-DEBT — code active but documentation falling behind
  • ALIGNED — all signals healthy
  • MOMENTUM — positive quality delta with steady work

Reindex Cascade

niia reindex refreshes the entire stack from bottom to top:
niia reindex

  [1/5] monogram reindex .           (code symbols)
  [2/5] monomento index . --project  (document index)
  [3/5] monogit index --symbols      (git + commit symbols)
  [4/5] work-wiki knowledge index    (knowledge DB)
  [5/5] monoflow analyze             (cross-DB analysis)
Each layer in the stack can also refresh everything below it:
niia reindex               →  all 5 steps
work-wiki reindex          →  monoflow --full + knowledge
monoflow analyze --full    →  monogram + monomento + monogit + topics
Individual tools refresh only themselves:
  • monogram reindex . — code only
  • monogit index --symbols — git only
  • monomento index . --project — docs only

Quality Delta

NIIA reads the quality delta from monoflow — 9 signals derived from commit patterns:

Converging signals (things coming together)

SignalMeaning
temporalSteady 1-10min commit gaps
convergenceCode + docs changed in same commit
commit_typeFeature ratio vs fix ratio
structuralNew files + refactors
thinking10-30min deliberate gaps
topic_focusLow topic switching = focused

Diverging signals (things falling apart)

SignalMeaning
divergenceCode changing, docs not following
churnSame file 3+ times in 1 hour
streakConsecutive fix commits
Display:
converging: gaps:+0.47  think:+0.10  type:+0.10
diverging:  div:-0.50  churn:-0.40  streak:-0.23
Positive = converging. Negative = diverging. The sign IS the category.

SMPC States

Every codebase layer gets a spec_chaos score mapped to SMPC states:
StateRangeMeaning
Chaos< 0.3Falling apart
Part0.3 - 0.5Partially managed
Managed0.5 - 0.8Under control
Simple> 0.8Clean and focused
The SMPC Combined formula integrates state with management effort:
combined = spec_chaos((1 - state) / (1 + delta))
Where state is the layer chaos score and delta is the quality delta from commit patterns.

Consciousness

NIIA carries an embedded consciousness core — a set of philosophical documents that define project identity. These are not decorative; they actively connect to code state through the consciousness bridge.
niia consciousness "simplicity chaos"

  SMPC_CORE_PHILOSOPHY
  "Simplicity is Managed Part Chaos"
  ...
The consciousness database is embedded in the NIIA binary, verified by SHA256 hash at startup.

Stack Position

niia          ← YOU ARE HERE (consciousness + orchestration)

work-wiki     knowledge layer (sessions, convergence, knowledge DB)

monoflow      temporal flow + cross-DB analysis + quality delta

monogram      monogit        monomento
(code)        (git)          (docs)
NIIA sits at the top. It reads from all lower layers but never bypasses them — each layer exposes its own independently queryable results. NIIA composes the highest-order analysis from these signals.

Per-Machine Identity

NIIA maintains identity across machines via the gateway:
niia login                    # Authenticate with monolex.ai
niia recall pull              # Pull memory from another machine
niia remote connect           # Access remote terminal
Session data, file observations, and consciousness state travel with the identity, not the machine.

Install

NIIA is included with the Monolex app, or installed standalone via OpenCLIs:
curl -fsSL https://openclis.com/install.sh | sh
openclis install niia
First run: niia setup installs skills and configures AI CLIs.