analyze_project
[Inspect · Composite] One-shot cognition snapshot (governance + handoff + state). Prefer ask_project or inspect_* for targeted reads; use this for a broad diagnostic dump.
Keep a project's decisions, reasoning and constraints in a local layer every AI tool can read — and find out which of those decisions no longer hold.
LABSCO SUMMARY
The decision lifecycle is the part that earns its keep. A decision does not sit valid forever: it moves through warning, decaying, suspected invalid and needs revalidation as the assumptions under it change, and the review queue is what surfaces the ones worth looking at. Everything lives in a directory inside the project, so switching from one AI tool to another does not reset the accumulated understanding. Be aware of the size: this is a lot of surface, and the descriptions themselves point you at the preferred read for each job — inspect_state over get_cognitive_state, get_decision_context over the legacy control one.
A project intelligence layer stored locally in a .contora/ directory beside your code. It preserves intent, decisions, reasoning, structure, history and current state so a new session can read the project's accumulated understanding instead of reconstructing it. The surface is large, and organised around three operations: capture, inspect, transfer.
Nothing beyond the package: everything is stored locally in .contora/ inside the project, with no account and no provider tie. It ships as a CLI and an MCP server from the same package, and integrates with Cursor, Claude Code, Gemini CLI, Codex, VS Code and any MCP client. The default mode is pure observation; the cognitive overlay has to be switched on.
One command — npm install -g @contorium/mcp
USE CASES
Read the current state and intent, then continue rather than reconstruct.
Ask the project directly and get the decision and the reasoning connected, not a grep result.
The review queue surfaces the ones whose assumptions changed, and you commit or dismiss each.
Capture the decision with its alternatives at the moment it is made, not from memory later.
Export a compact context payload instead of pasting a summary you wrote by hand.
The graph connects intent to module to file, so the blast radius is a query rather than a guess.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
analyze_project[Inspect · Composite] One-shot cognition snapshot (governance + handoff + state). Prefer ask_project or inspect_* for targeted reads; use this for a broad diagnostic dump.
ask_project[CIL · Prefer for Q&A] Natural-language project question (what happened, why, impact, validity, next). Call when the user asks in plain language. Prefer over chaining multiple inspect_* tools. Does not execute work.
build_decision_provenance[SLOW · Legacy · prefer derive_decision_provenance] Same heavy cycle — do not call for ordinary Q&A.
capture_decision[PIL · Capture · Write] Record a decision (append-only log). Side effect: persists decision. Requires selected; optional reason / intent_id / decision_id.
capture_focus[PIL · Capture · Write] Set current project focus (state.json currentTask). Side effect: persists focus.
capture_note[PIL · Capture · Write] Append a timestamped note to state.json. Side effect: persists note.
commit_decision[PIL · Capture · Write] Accept Decision — promotes a pending decision into ADR (.contora/decisions/). Reasoning State accept (not Git commit). REQUIRES user_confirmed=true after explicit human confirmation. Agents must NOT auto-accept.
confirm_handoff_injection[Write · New chat] After user confirms (Y): write .contora/mcp.auto-context.md and mark injection done. Optional format: json | markdown | compact (default markdown). Side effect: persists context file.
decision_snapshot[SLOW · Alias · prefer derive_decision_provenance] Same derive cycle (persist=true only if you need a written snapshot) — not a separate API.
derive_decision_provenance[SLOW · ~2–3 min · Prefer once] Derive decision provenance (review → decision → scope → trace). Records only — no code execution. Pass active_file + mode=advisory + persist=false for lighter runs. Do NOT also call aliases in the same turn (derive_decision_trace / decision_snapshot / run_governance_cycle / build_decision_provenance / trace_governance_cycle). Prefer get_decision_context or ask_project for quick reads.
derive_decision_trace[SLOW · Alias · prefer derive_decision_provenance] Same handler — avoid calling both in one turn.
ensure_control_ready[SLOW · Legacy · prefer inspect_cognition_ready] Same ready check (~10–20s). Avoid unless caller already uses this name.
explain_context[PIL · Retrieval] Explain why specific context items were included for a task. Read-only.
export_decision_provenance[Decision Provenance · read] Export decision / scope / trace appendix for AI context.
export_governance_context[Legacy alias] Same as export_decision_provenance.
generate_inject_payload[Legacy alias] Same as synthesize_context_payload.
get_active_intentsReturn ACTIVE / WEAKENING / PARTIAL intent nodes from the Contorium intent graph (compact summary for agents).
get_ai_status[CIL · AI Layer] LLM explanation-layer status — enabled flag, provider, model, module switches, intent router mode. Does not expose API keys.
get_blast_radius[CIL · Impact] Blast radius / affected nodes for a module or file. Requires module. Prefer inspect_impact for PIL impact graph; use this for CIL module-centric impact.
get_change_log[Inspect] Recent guard / change-log records. Optional limit (1–50, default 20). Prefer get_recent_events for cognitive timeline.
get_cognitive_health[CIL · Health] Cognitive health score and warnings (missing WHY, stale ADR, conflicts). For decision lifecycle trust prefer get_knowledge_health; for PIL metrics prefer inspect_health.
get_cognitive_insights[Cognitive Overlay · Mode B only] Full insight bundle: intent, skills, tools, model preset. Read-only — never installs or executes.
get_cognitive_mode[Cognitive Overlay] Read MCP mode A/B. Contorium MCP mode (v2): A = Core Runtime DEFAULT (pure observation — project, task, feed) B = Cognitive Overlay (A + skill suggestions + model presets + external search)
get_cognitive_snapshot[Legacy alias · prefer transfer_context] Compressed Cognitive Snapshot (~300–800 tokens).
get_cognitive_state[Inspect] Derived cognitive projection (.contora/cognitive/). Prefer inspect_state / inspect_intent for PIL facts.
get_confidence_index[Dimension · CONFIDENCE · inspect] Trustworthiness of recorded intelligence (.contora/confidence/confidence_index.json).
get_control_context[Legacy] Decision provenance context — prefer get_decision_context.
get_decision_context[Decision Provenance · read] Project state, git, and latest decision snapshot.
get_decision_evolution[PIL · Evolution · Prefer] Decision Evolution Graph + waiting pending + project-state fingerprint. How the project evolved decision-by-decision.
get_decision_graph[CIL · Decision Center] Decision DAG (.contora/decisions/graph.json). Prefer inspect_decision for PIL provenance + governance decision together.
get_decision_log[v1.1.3 · inspect] Append-only decision log (.contora/decision/decision_log.json). Records selected alternatives — not recommendations.
get_decisions[CIL · Decision Center] ADR-style decisions with Why / Risk / Alternatives. Use when listing or reviewing recorded decisions. Prefer ask_project for one-off “why was X decided”.
get_entity_knowledge[CIL · Knowledge] Everything related to an entity/topic (module name, feature, system). Requires entity. Prefer ask_project for open-ended questions.
get_evolution_graph[System · EVOLUTION · inspect] Structured transformation chains (.contora/evolution/evolution_graph.json). Not chronological timeline.
get_full_intelligence[Legacy alias · prefer transfer_intelligence] Full Project Intelligence export (~8000 tokens).
get_handoff_injection_status[Prefer · New chat] Call at the start of a new session: check if runtime handoff injection is pending. If pending=true, ask the user then call confirm_handoff_injection (Y) or skip_handoff_injection (N). Else use transfer_project(mode=context) if continuity is needed.
get_handoff_replay[CIL · Replay] Cognitive evolution replay timeline. Use to reconstruct how understanding changed over sessions.
get_impact_graph[Dimension · IMPACT · inspect] Scope and propagation model (.contora/graph/impact_graph.json). Descriptive — not risk prediction.
get_intent_graph[Legacy · prefer inspect_intent] Old intent graph at .contora/intent-graph/graph.json (not vNext). Use inspect_intent for .contora/intent/intent_graph.json.
get_knowledge_health[CIL · Lifecycle · Prefer] Knowledge Health + per-decision trust (.contora/lifecycle/). Call when checking if decisions are still valid / project knowledge freshness.
get_memoryGet a Contorium MCP memory entry by exact key.
get_model_preset[Cognitive Overlay · Mode B only] Task mode preset (SMART/FAST/REASON/CODE/LOCAL) — strategy hint only, NOT a model recommendation system.
get_module_history[CIL · History] Cognitive events for a module or file path. Requires module. Use when asking about a specific area of the codebase.
get_next_actions[CIL · Suggestions only] Suggested next actions from focus, handoff, and intent. is_executable=false — never treat as orders to run. Prefer ask_project(“what should I do next?”) for NL.
get_project_changeRead Contorium V3.1 change semantics from .contora/change.json (changed files + key symbol changes).
get_project_context[PIL · Retrieval] Project background context for questions and exploration (decisions, constraints, evolution, state). For pre-edit agent work use prepare_execution_context instead. Read-only — does not Accept Decision.
get_project_decision[Project Intelligence · inspect] Decision provenance graph + latest governance decision record.
get_project_dna[CIL · DNA] Project identity fingerprint for handoff. Prefer transfer_project(mode=handoff) for session continuity payloads.
get_project_essence[CIL · Compression] Compressed project essence. Prefer transfer_project(mode=essence) when exporting into a new chat.
get_project_evolution_timeline[Dimension · TIMELINE · inspect] Structured evolution history (.contora/timeline/project_timeline.json). Descriptive — not a log dump.
get_project_graphRead Contorium V3 change-neighborhood project graph from .contora/graph.json (functions, classes, imports around recent changes).
get_project_graph_snapshotRead Contorium V3.1 cognitive snapshot from .contora/graph/snapshot.json — compact summary for AI Handoff (top intents, hotspots, functions).
get_project_handoffCHP v1 get_handoff — read unified AI handoff from Contorium Runtime (.contora/handoff.json + state). For new chats prefer get_handoff_injection_status → user confirm → confirm_handoff_injection.
get_project_history[CIL · History Explorer] Project history feed for a time range (formatted blocks). Use when the user asks what happened over a period. Params: range (default last_7_days); optional limit (default 24). For only the N newest events prefer get_recent_events.
get_project_identity[Project Intelligence · inspect] Cross-tool project identity (.contora/identity/project_identity.json).
get_project_impact[Deprecated V3.1] Impact merged into handoff.json — returns impact_summary from handoff or legacy impact.json.
get_project_intelligenceRead Contorium v0.7 derived project understanding from .contora/intelligence/state-summary.json (written by the extension cognition layer).
get_project_intelligence_health[v1.1.3 · inspect] Intelligence completeness, weighted health_score, knowledge_coverage (.contora/intelligence/health.json). Measures asset completeness — not project quality.
get_project_intent[Legacy · prefer inspect_intent] Compact intent summary artifact. Prefer inspect_intent (vNext graph) or ask_project for NL.
get_project_intent_graph[Project Intelligence · inspect] Intent graph (.contora/intent/intent_graph.json).
get_project_journey[CIL · Evolution] Project growth roadmap narrative. Use for long-horizon “how did we get here / where next”.
get_project_knowledge_graphRead Contorium V3.1 Project Knowledge Graph from .contora/graph/knowledge.json (Intent → Module → File → Function + intent mappings).
get_project_snapshotRead Contorium PROJECT SNAPSHOT markdown from .contora/state-builder/project-snapshot.md for cross-AI project continuity.
get_project_stateRead Contorium State Builder structured project state from .contora/state-builder/project-state.json (goal, stage, decisions, problems, next actions).
get_project_story[CIL · Narrative] Combined story — goal, events, decisions, journey. Prefer transfer_project(mode=story) when exporting into a chat; use this to read the story payload in-place. Alias of kernel story (same as transfer_story).
get_project_timelineRead Contorium V3.1 code evolution timeline from .contora/timeline.json (recent commits + symbol changes).
get_project_why[Project Intelligence · inspect] Why layer (.contora/intent/why.json).
get_provenance_chain[System · PROVENANCE · inspect] Trace-back chains WHY → DECISION → INTENT → TIMELINE (.contora/provenance/provenance_chain.json).
get_recent_changes[MCP v1 standard] Recent file/function changes from .contora/change.json — alias of get_project_change.
get_recent_events[CIL · History] Latest cognitive events (timeline + decision + why). Use for a short recent feed. Params: limit (default 12); optional range filters then applies limit. For a dated window with narrative blocks prefer get_project_history.
get_review_queue[CIL · Lifecycle · Prefer] Decisions needing review (stale, expired, conflict, missing owner, invalidation). Call before trusting old ADRs; pair with set_decision_lifecycle_meta after human verify.
get_runtime_state[MCP v1 standard] Runtime session view — bootstrap, dashboard worker, session marker (read-only).
get_skill_suggestions[Cognitive Overlay · Mode B only] Skill discovery from local registry + GitHub/NPM search. Display-only links — no auto install.
get_snapshot[CIL · Time travel] Project snapshot nearest a date (YYYY-MM-DD) or latest if date omitted. Optional perspective: historical | retrospective.
get_stability_index[Legacy alias] Same as get_confidence_index.
get_state_conflictsRead Contorium v2 unresolved state conflicts from .contora/state-engine/conflicts.json (audit only — system does not auto-resolve).
get_suggested_questions[CIL · Onboarding] Suggested Ask Contorium questions. Call when starting exploration or the user asks what they can ask.
get_understanding_graph[MCP v1 standard] Runtime understanding graph — call chains + impact from .contora/understanding_graph.json.
get_workspace_contextRead Contorium workspace snapshot from .contora/state.json (current focus, notes, files, Git) written by the VS Code/Cursor extension.
ignore_pending_decision[PIL · Write] Mark a pending decision as ignored after human decline. Requires pending_id.
inspect_cognition_ready[SLOW · Ready] Verify Decision Provenance layer is initialized (~10–20s). Call before derive_decision_provenance on a fresh workspace; skip if already initialized this session.
inspect_confidence[PIL · Inspect] Confidence index (CONFIDENCE dimension).
inspect_control_ready[SLOW · Legacy · prefer inspect_cognition_ready] Same ready check (~10–20s).
inspect_decision[PIL · Inspect · Prefer] Decision provenance + governance decision + decision log. Prefer over get_decision_graph / get_project_decision for a full decision picture.
inspect_evolution[PIL · Inspect] Evolution graph — structured transformation chains (EVOLUTION system).
inspect_graph[PIL · Inspect] Change-neighborhood graph (.contora/graph.json).
inspect_health[PIL · Inspect] Project intelligence health metrics.
inspect_impact[PIL · Inspect] Impact graph (IMPACT dimension).
inspect_intent[PIL · Inspect · Prefer] vNext intent graph (.contora/intent/intent_graph.json). Prefer over legacy get_intent_graph / get_project_intent_graph.
inspect_pending_decisions[PIL · Inspect · Prefer] List pending decisions awaiting human review (.contora/lifecycle/pending-decisions/). AI may read; must NOT auto-commit.
inspect_provenance[PIL · Inspect] Provenance chain — WHY → DECISION → INTENT trace-back (PROVENANCE system).
inspect_state[PIL · Inspect] Workspace state — state.json, status, built project state. Call first when grounding on current focus/stage. Prefer ask_project for NL questions.
inspect_system_ready[SLOW · Legacy · prefer inspect_cognition_ready] Same ready check (~10–20s).
inspect_timeline[PIL · Inspect] Project evolution timeline (TIMELINE dimension).
inspect_why[PIL �� Inspect] Why layer — feature rationale records.
note_change_event[PIL · Evolution] Record a file ChangeEvent into the active Task Session (MCP tool-result bridge). Prefer after write/edit tools; does not Accept Decision.
prepare_execution_context[PIL · Retrieval · Prefer] Prepare minimal must-know context before the agent executes a task (Analyzer → Risk → Retrieval → Budget). Call immediately before architecture-sensitive edits. Read-only — does not Accept Decision.
record_project_intent[Write · Intent] Record project direction for intent/why layers (human → system). Requires user_input. Prefer capture_focus for simple current-task updates.
resolve_scope_context[Governance V4 · fast] Resolve diff/file/project into primary, related, risk, and dependency scopes. mode: auto | strict | minimal (not "project"). Prefer before a SLOW derive_decision_provenance when scoping a single file.
review_decisions[PIL · Lifecycle · Prefer] Review pending decision queue or one pending_id. AI may read; must NOT auto-accept. Prefer before commit_decision.
review_pending_decisions[Legacy alias · prefer inspect_pending_decisions] Same as inspect_pending_decisions(status=waiting_review).
run_decision_evolution[PIL · Evolution] Detect project-state transitions and enqueue pending decisions for human review. Does NOT auto-commit. Call after significant architectural changes or sync. Ingests git working-tree changes as ChangeEvents first.
run_governance_cycle[SLOW · Legacy · prefer derive_decision_provenance] Same heavy cycle. Not task execution. Avoid unless caller already uses this name.
search_memorySearch Contorium MCP memory entries by keyword.
set_cognitive_mode[Cognitive Overlay] Switch MCP mode A/B. Does NOT change runtime core behavior — overlay only. Contorium MCP mode (v2): A = Core Runtime DEFAULT (pure observation — project, task, feed) B = Cognitive Overlay (A + skill suggestions + model presets + external search)
set_decision_lifecycle_meta[CIL · Lifecycle · Write] Update decision owner, verification, or expiry → .contora/lifecycle/. Side effect: persists meta and refreshes knowledge lifecycle index. Requires decision_id.
skip_handoff_injection[Write · New chat] User declined injection (N). Marks skip for this runtime session; get_project_handoff / transfer_project remain available on demand.
store_memoryStore important coding context into Contorium memory (persisted under .contora/mcp/).
synthesize_context_payload[Prefer · Inject] Build structured AI context from decision provenance (no autonomous action). Call after derive_decision_provenance when injecting governance context.
test_ai_connection[CIL · AI Layer] Test LLM provider connectivity using workspace llm.json + api_key_env. Returns ok/latency/message.
trace_governance_cycle[SLOW · Legacy · prefer derive_decision_provenance] Same heavy cycle — alias only.
transfer_context[Legacy alias · prefer transfer_project mode=context] Intelligence Transfer Context (~300–800 tokens).
transfer_handoff[Legacy alias · prefer transfer_project mode=handoff] Compact handoff (~100–300 tokens) for new-chat continuity.
transfer_intelligence[Legacy alias · prefer transfer_project mode=intelligence] Full Intelligence Transfer (~8000 tokens).
transfer_project[CIL · Prefer for Transfer] Unified export into the current chat. mode: context (~300–800 tok) | intelligence (~8k) | story | essence | handoff. Prefer this over transfer_context / transfer_intelligence / transfer_handoff / transfer_story aliases.
transfer_runtime[Legacy alias · prefer transfer_handoff] Same as transfer_handoff.
transfer_story[Legacy alias · prefer transfer_project mode=story or get_project_story] Same kernel story payload — not a separate Transfer pipeline.
update_project_intent[Legacy alias · prefer record_project_intent] Record user direction overlay for cognition. Requires user_input. Does not execute work.
BEFORE YOU INSTALL
118 tools when we connected.
All 4 documented clients run the server on your machine.
CONTEXT COST
Rated by the size of the 118 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
npm install -g @contorium/mcp{
"mcpServers": {
"contorium": {
"command": "npx",
"args": [
"@contorium/mcp"
],
"env": {
"CONTORIUM_WORKSPACE": "<YOUR_CONTORIUM_WORKSPACE>"
}
}
}
}Add it to .cursor/mcp.json; <YOUR_CONTORIUM_WORKSPACE> is your project folder.
claude mcp add --scope project contorium -- npx @contorium/mcpcodex mcp add contorium -- npx @contorium/mcp{
"mcpServers": {
"contorium": {
"command": "npx",
"args": [
"@contorium/mcp"
],
"env": {
"CONTORIUM_WORKSPACE": "<YOUR_CONTORIUM_WORKSPACE>"
}
}
}
}Add it under mcpServers in ~/.gemini/settings.json; <YOUR_CONTORIUM_WORKSPACE> is your project folder.