How josh-paul/praxis-os works
1. This repo is a portable AI-agent framework, not a single app. Its core product is a Python MCP server plus a large content layer of standards and workflow definitions that get installed into another project’s local .praxis-os/ directory.
2. There are three major boundaries:
- Executable runtime: the Python server in .praxis-os/ouroboros/ and the mirrored dist/ouroboros/
- Knowledge/content: standards, workflows, specs, and generated guidance under .praxis-os/standards, .praxis-os/workflows, universal/, workflow-authoring/, and language-instructions/
- Distribution/install tooling: scripts/, installation/, and the packaged dist/ tree
3. The server runtime is organized as a layered Python package:
- server.py, mcp.py, and __main__.py expose the MCP entrypoint
- config/ loads typed configuration and schemas
- foundation/ handles process/runtime concerns like locks, ports, session mapping, transport selection, and state management
- middleware/ injects cross-cutting behavior such as query classification, session ID extraction, and query tracking
4. The main functional subsystems are under subsystems/:
- RAG: code and standards retrieval, indexing, locking, watching, and vector storage helpers
- Workflow: phase-gated workflow loading, parsing, rendering, evidence validation, and dynamic workflow registry
- Browser: browser/session-oriented tooling and state models
These are the main runtime services that MCP tools delegate to.
5. The RAG subsystem is the data/indexing backbone. It uses AST-aware code chunking, semantic indexing, graph traversal, reconciliation, and storage helpers for LanceDB and DuckDB. The watcher and lock manager indicate the index is meant to rebuild incrementally and safely while the server is running.
6. Workflow execution is definition-driven. Workflows are stored as YAML/Markdown phase trees under workflows/ and parsed by the workflow subsystem into validated phases, tasks, and gates. The engine, parser modules, and phase_gates.py form the execution path from static definitions to runtime guidance.
7. MCP tools are the public API surface. Tool implementations live in .praxis-os/ouroboros/tools/ and are registered through the tool registry. They expose project info, current date, browser operations, filesystem/search operations, and workflow operations to connected IDE agents.
8. The installation path is a second major flow. installation/ and the root scripts/install-praxis-os.py / scripts/configure-claude-code-mcp.py / scripts/update-cline-mcp.py copy the framework into a target project, create the .praxis-os/ directory structure, set up the virtual environment, and write IDE-specific MCP config such as .cursor/mcp.json or .claude/CLAUDE.md.
9. Runtime state is intentionally local to each consuming project. The .praxis-os/state/ tree stores workflow and browser session artifacts, .praxis-os/logs/ stores server logs, and .praxis-os/.cache/ stores the vector index and other ephemeral build data. This isolates each project’s knowledge base and avoids shared mutable infrastructure.
10. The dist/ tree is the packaged consumer artifact. It mirrors the source layout so the repo can distribute the same standards, workflows, server package, and universal content that the installer copies into target projects. In architecture terms, dist/ is the release boundary, while the repo root is the development/dogfooding boundary.
11. Documentation is not just reference material here; it is part of the system. docs/ is a Docusaurus site that explains the architecture, installation, and workflows, while .praxis-os/specs/ and workspace/analysis capture design decisions, evaluations, and completed feature specs that feed future workflow and standards changes.
12. Validation is multi-layered. There are unit, integration, performance, and repo-level tests under .praxis-os/tests/ and tests/, plus pre-commit scripts, YAML/docs validators, and workflow metadata checks. This supports the repo’s emphasis on schema correctness, thread safety, and safe operational updates.
13. The highest-level data flow is:
user/IDE command -> MCP transport -> server middleware -> tool registry -> RAG/workflow/browser subsystem -> local state/index/logs -> response back to the agent.
The key architectural idea is that the server is stateless in concept but stateful per-project through .praxis-os/.
14. Dual-transport support adds a second ingress path. Primary IDEs connect over stdio, while sub-agents can discover and use the same server over HTTP via .praxis-os/.mcp_server_state.json. That introduces a clear transport boundary without changing the core tool and subsystem model.
Main entry points: registry.py Tool registry · rag RAG · workflow Workflow · server.py MCP entry
Components 20
Runtime
Executable MCP server and tool runtime
- MCP entry · Server startup and transport entrypoints
.praxis-os/ouroboros/server.py - Config · Loads schemas and runtime configuration
.praxis-os/ouroboros/config/loader.py - Foundation · Locks, ports, transport selection, project/session state
.praxis-os/ouroboros/foundation - Middleware · Query classification, session extraction, query tracking
.praxis-os/ouroboros/middleware - Tool registry · Registers the public MCP tool surface
.praxis-os/ouroboros/tools/registry.py - RAG · Code and standards retrieval, indexing, storage, and watching
.praxis-os/ouroboros/subsystems/rag - Workflow · Parses, validates, gates, and renders workflow definitions
.praxis-os/ouroboros/subsystems/workflow - Browser · Browser/session-oriented tooling and state models
.praxis-os/ouroboros/subsystems/browser
Content
Standards, workflows, specs, and generated guidance
- Standards · Development and universal standards content
.praxis-os/standards - Workflows · YAML and Markdown workflow phase trees
.praxis-os/workflows - Specs · Approved, completed, and reviewed specs plus analyses
.praxis-os/specs - Universal content · Packaged cross-project standards and templates
dist/universal
Distribution
Packaged release artifacts and install targets
- Packaged server · Mirrored executable runtime shipped to consumers
dist/ouroboros - Packaged content · Release copy of standards, workflows, and universal assets
dist/universal
Tooling
Installers, builders, and maintenance scripts
- Installer · Copies the framework into target projects and writes IDE config
scripts/install-praxis-os.py - IDE config · Generates Claude/Cursor/Cline MCP configuration
scripts/configure-claude-code-mcp.py - Upgrade tools · Safe upgrade and dist sync utilities
scripts/upgrade-praxis-os.py
Docs
Documentation site and authored architecture notes
- Docs site · Architecture, installation, and workflow documentation
docs
Local State
Per-project runtime artifacts and ephemeral data
- Project state · Workflow artifacts, browser sessions, logs, and cache
.praxis-os/state
Validation
Tests and repository checks
- Validation · Unit, integration, performance, and repo-level checks
.praxis-os/tests
Connections 28
- MCP entry → Config: loads · Startup reads typed config and schemas
- MCP entry → Middleware: wraps · Requests pass through cross-cutting middleware
- MCP entry → Tool registry: serves · MCP entrypoint exposes registered tools
- Middleware → Tool registry: routes · Classified requests are delegated to tools
- Tool registry → RAG: delegates · Search and discovery tools use the retrieval subsystem
- Tool registry → Workflow: delegates · Workflow tools use the workflow subsystem
- Tool registry → Browser: delegates · Browser tools use browser/session subsystem
- RAG → Standards: indexes · RAG ingests standards and project knowledge
- RAG → Workflows: indexes · RAG also reads workflow definitions and supporting docs
- Workflow → Workflows: parses · Workflow engine loads YAML and Markdown phase trees
- Workflow → Specs: consumes · Specs and analysis documents inform workflow guidance
- RAG → Project state: stores · Vector index and cache are kept in local project state
- Workflow → Project state: writes · Workflow sessions and artifacts are persisted locally
- Browser → Project state: persists · Browser session artifacts live in project-local state
- Installer → Packaged server: copies · Installer brings the packaged runtime into target projects
- Installer → Packaged content: copies · Installer installs packaged standards and workflows
- IDE config → Installer: supports · IDE config scripts complement installation flow
- Upgrade tools → Packaged server: updates · Upgrade path refreshes the packaged runtime
- Upgrade tools → Packaged content: updates · Upgrade path refreshes packaged content
- Docs site → Standards: documents · Docs site explains the standards and operating model
- Docs site → Workflows: documents · Docs site explains workflows and installation
- Universal content → Packaged content: mirrors · Release artifact mirrors shared universal content
- Packaged server → MCP entry: mirrors · Release server mirrors source runtime layout
- Packaged content → Standards: packages · Packaged content is derived from source standards
- Packaged content → Workflows: packages · Packaged content is derived from source workflows
- Validation → MCP entry: validates · Tests cover runtime behavior and server integration
- Validation → RAG: validates · Tests cover indexing and retrieval behavior
- Validation → Workflow: validates · Tests cover parser, gates, and workflow execution