CogniTrail
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π§ CogniTrail
Deterministic AI Workflow Orchestrator: Code Graph Indexing, Governed Memory, Multi-Role Personas & Cryptographic Evidence QA
Stars and forks track this distribution repository; download counts track the npm package. GitHub's exact repository view counts are private maintainer analytics and are not exposed by these badges.
Quick Start β’ CLI Commands β’ Architecture β’ MCP Tools & Resources β’ 10-Role Catalog β’ Client Configuration
π Overview
CogniTrail is a local-first, portable Model Context Protocol (MCP) server and CLI for autonomous AI coding agents. It prevents AI drift, hallucinations, and skipped development gates through four foundational capabilities:
Trail-Code Graph Indexing: Ground agent reasoning in verified source spans (
map,ask,grep,skeleton,callers) with SHA-256 source hashing and automatic stale-context invalidation.Governed Memory Lifecycle: Three-tier memory (
working,episodic,semantic) with formula-driven ranking ($0.35R + 0.25S + 0.20F + 0.10C + 0.10A$), reciprocal conflict surfacing, and independent review approval (proposer !== reviewer).Dynamic Role Composition: 10 specialized engineering roles with strict authority hierarchy: $$\text{Security Policy} > \text{Workspace Rules} > \text{Task Policy} > \text{Primary Role} > \text{Supporting Roles} > \text{Memory}$$
Evidence-Based QA & 15-Section DOCX Generator: Cryptographically auditable test matrices (API payloads, code lines, database diffs, logs) without mandatory screenshot attachments, compiling professional 15-section DOCX report bundles.
Related MCP server: christina
π Quick Start
Set up CogniTrail in any repository with three simple commands:
1. Install the CLI globally
npm install -g cognitrail2. Initialize in your project repository
cognitrail init --yesThis automatically:
Creates the
.cognitrail/workspace directory.Generates a local cryptographic state secret in
.cognitrail/config.json.Initializes and migrates the local SQLite database (
.cognitrail/workflow.sqlite).Wires the MCP server into
.vscode/mcp.jsonand.cursor/mcp.json.Verifies all 10 engineering role packages and checks Trail integration.
Updates
.gitignoreto keep local SQLite databases and secrets untracked.
3. Check workspace status
cognitrail statusDisplays database health, active tasks, governed memory entries, loaded roles, and Trail connectivity.
4. Restart your AI Agent
Restart your IDE or agent (Visual Studio Code, Cursor, or Claude Desktop) so the session connects to the newly configured CogniTrail MCP server.
π» CLI Commands
Command | Flags | Description |
|
| Initialize |
|
| Display workflow database, tasks, governed memory, roles, and Trail status. |
| (none) | Start the MCP stdio server (default when launched without arguments by MCP clients). |
| (none) | Show command usage and options. |
| (none) | Print installed version number. |
π Architecture
flowchart TD
Client[MCP Client: Claude / Cursor / VS Code Copilot] <-->|stdio JSON-RPC| Server[CogniTrail MCP Server]
subgraph "Core Orchestrator"
Server --> Orchestrator[Workflow State Machine]
Orchestrator --> Classifier[Task Classifier & Policy Engine]
Orchestrator --> ContextEngine[Trail Adapter & Source Provenance]
Orchestrator --> MemoryEngine[3-Tier Memory & Review Lifecycle]
Orchestrator --> RoleComposer[Role Composition & Conflict Resolver]
Orchestrator --> EvidenceLedger[Evidence Ledger & QA Evaluator]
EvidenceLedger --> ReportGenerator[15-Section DOCX Generator & Bundler]
end
subgraph "Local Storage"
Orchestrator <-->|WAL Immediate Transactions| SQLite[(SQLite: workflow.sqlite)]
ContextEngine <--> LocalRepo[Workspace Repositories]
ReportGenerator --> QABundle[qa-artifacts/ Bundles]
endSee the Architecture Specification and Policy Matrix for complete details.
π§° MCP Tools & Resources
MCP Tools (13 Tools)
Tool Name | Category | Description |
| Lifecycle | Initialize a task, classify risk, select policy, and issue state token. |
| Lifecycle | Read current state, satisfied/missing gates, blockers, and active roles. |
| Lifecycle | Transition task state following policy order and entry gate requirements. |
| Lifecycle | Finalize task after all policy gates and audit evidence are satisfied. |
| Context | Execute Trail queries and atomically record a grounded context snapshot. |
| Memory | Propose a candidate semantic or episodic memory fact with source references. |
| Memory | Execute review actions ( |
| Roles | List all 10 available engineering role packages and manifests. |
| Roles | Dynamically compose primary and supporting roles with conflict resolution. |
| Roles | Inspect effective instructions, tool policies, and merged checklists. |
| QA | Record test case steps, expected/actual outcomes, and artifact SHA-256 hashes. |
| QA | Retrieve evidence ledger summary and test case records for a task. |
| Reporting | Compile a deterministic 15-section DOCX report and QA artifact bundle. |
MCP Resources (4 Resources)
Resource URI | Description |
| Read-only catalog of all available engineering role packages (JSON). |
| Read-only JSON snapshot of grounded source code context. |
| Relevant promoted and fresh memory facts for the active task. |
| Complete test case ledger and execution summary for the task. |
π₯ 10-Role Engineering Catalog
Every role contains an explicit manifest, tool permissions, checklist, and evidence schema:
software-architect: Module boundaries, bounded contexts, decoupling, and interface contracts.frontend-developer: Project-native UI components, form validation, accessibility, and API contract integration.backend-developer: Service interfaces, safe data access, API contracts, and transactional consistency.database-engineer: Data modeling, project-native migrations, query-driven indexing, and applicable isolation boundaries.qa-tester: Requirements traceability, boundary analysis, parity verification, and non-screenshot test ledgers.code-reviewer: Read-only static analysis, DRY/YAGNI enforcement, type safety, and error recovery audits.security-reviewer: OWASP Top 10, authorization checks, secret/PII screening, and read-only tool policy.migration-specialist: Strangler migration, legacy-to-modern parity contracts, and cutover orchestration.devops-engineer: Build configs, lockfile integrity, dependency management, and process lifecycle.tech-writer: Technical documentation, architecture decision records, and unambiguous operator guides.
All 10 built-in roles are project- and stack-neutral. Repository documentation, workspace rules, and task requirements supply concrete frameworks, API methods, SQL binding syntax, tenancy models, migration tooling, and validation commands. Project-specific conventions belong in workspace/task context, not the shared role catalog. Role package version 1.1.0 preserves existing role IDs, priorities, tool policies, evidence schemas, and completion gates; previously saved compositions remain historical snapshots and must be recomposed to adopt updated instructions.
Read the Role Composition Guide for detail on conflict resolution rules.
π Evidence-Based QA & 15-Section DOCX Reports
CogniTrail replaces token-heavy visual screenshots with machine-verifiable evidence (api_response, code_reference, database_diff, console_log, exported_file).
When qa_generate_report runs, it emits a complete audit bundle:
qa-artifacts/<task-slug>-<date>/
βββ report.docx # Formal 15-section Microsoft Word document
βββ evidence-manifest.json # Machine-readable list of all evidence items and hashes
βββ test-results.json # Test case execution records and results
βββ environment.json # Git commits, testing environment, and metadata
βββ hashes.sha256 # Composite SHA-256 checksums of all bundle filesThe 15 standardized sections:
Halaman Judul
Ringkasan Eksekutif
Ruang Lingkup dan Tujuan
Environment dan Versi yang Diuji
Metodologi serta Kriteria Kelulusan
Traceability Requirement ke Test Case
Ringkasan Hasil
Detail Hasil Per Fungsi
Parity PHP vs React/Express
Temuan, Severity, dan Dampak
Bukti Kode (
file:baris)Bukti API, Data, Console, dan Runtime
Risiko, Batasan, serta Item Belum Diuji
Rekomendasi dan Keputusan Go/No-Go
Lampiran Manifest Evidence dan Hash
Read the Evidence & QA Strategy Guide and DOCX Reporting Guide.
β Client Configuration
If cognitrail init was run in your repository, .vscode/mcp.json and .cursor/mcp.json are already configured. For manual setup:
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"cognitrail": {
"command": "npx",
"args": ["-y", "cognitrail", "serve"],
"env": {
"WORKFLOW_STATE_SECRET": "YOUR_RANDOMLY_GENERATED_32_CHAR_SECRET",
"WORKFLOW_DATABASE_PATH": ".cognitrail/workflow.sqlite",
"WORKFLOW_WORKSPACE_ROOTS": "."
}
}
}
}Visual Studio Code (.vscode/mcp.json) / Cursor (.cursor/mcp.json)
{
"mcpServers": {
"cognitrail": {
"command": "cognitrail",
"args": ["serve"],
"env": {
"WORKFLOW_STATE_SECRET": "YOUR_RANDOMLY_GENERATED_32_CHAR_SECRET",
"WORKFLOW_DATABASE_PATH": ".cognitrail/workflow.sqlite",
"WORKFLOW_WORKSPACE_ROOTS": "."
}
}
}
}π License
Proprietary. Copyright (c) 2026 onenotdev. All rights reserved.
Public source visibility does not make CogniTrail open source. Viewing is permitted; use, copying, modification, redistribution, and commercial exploitation require prior written permission, subject to applicable law and hosting-platform terms. No rights to the CogniTrail name or logos are granted. Do not misrepresent the original work's authorship or imply official endorsement of a derivative product.
See LICENSE for the full terms, including third-party licensing and previously granted rights.
Protected distribution
The public distribution repository contains packaged runtime files, not the development source or Git history. npm pack runs a fresh TypeScript build followed by identifier obfuscation and compaction. Source maps, TypeScript sources, and tests are excluded from the published artifact. Runtime role definitions and SQL migrations remain readable because the application needs them.
This is obfuscation, not encryption or a guarantee against reverse engineering. Published JavaScript can still be inspected or modified. Previously published versions remain readable and are not retroactively protected. Proprietary license terms continue to apply.
Maintainers build and validate from the private development repository; the public distribution is not a source checkout.
Support and community
If CogniTrail helps your workflow, star the official repository or buy the maintainer a coffee. Support is optional and does not change the license or grant additional usage rights.
View CogniTrail on Trendshift. Daily/monthly award cards will be added only when Trendshift provides an official working badge for this repository.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
AI Agent with Architectural Memory. Impact analysis (free), tests and code from the graph (pro).
Cuts coding agent token burn up to 72% continuously via contradiction-free memory & verification.
Persistent engineering memory designed to follow developers across coding agents.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides AI coding agents with an embedded knowledge graph and architecture governance tools, enabling blast radius analysis, compliance checks, and smart context extraction from codebases.Apache 2.0
- AlicenseCqualityBmaintenanceEnables AI coding agents to navigate massive codebases through fast code property graph queries, sandboxed recursive language model execution, durable semantic memory, and swarm concurrency coordination.4MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to access evidence-backed repository memory, code graph, project DNA, and deterministic change validation so they understand design decisions, past bugs, and invariants while working.1,521 npm17Functional Source , Version 1.1, ALv2 Future
- AlicenseNot gradedqualityAmaintenanceEnables AI coding providers to run structured multi-agent workflows with tracked tasks, document specifications, handoffs, health gates, and server-owned evidence across providers like Claude Code, Codex CLI, Cursor, Grok Build, and OpenCode.29 npmMIT