This guide is for a person opening the repository for the first time.
For a less technical introduction, start with
POPULAR_PRESENTATION.md. It explains the project
through the transition from MS-DOS batch files to semantic Markdown operating
programs orchestrated by Codex.
MD-OS (Artificial Prefrontal Cortex) v5.0 is a Markdown-native Operating Filesystem. It externalizes the operational context of persistent AI agents and robotic systems into readable, auditable, reconstructible, and actionable files.
The important point: the repository is not the model and not a real-time hardware OS. It is the filesystem-backed operating context around a model, host runtime, robotic system, device, or other bounded substrate.
Said directly: MD-OS creates a natural-language agentic layer between itself and the host machine’s real substrates: the OS, hardware, peripherals, desktop, installed applications, filesystems, terminals, browsers, APIs, services, robots, controllers, sensors, and actuators. It does not replace them. It discovers them, registers them, routes explicit user intent through bounded connectors, captures artifacts, and audits actions.
On a Raspberry Pi, this means Raspberry Pi OS or Linux remains the hardware operating system. MD-OS runs above it as the readable memory, connector, agenda, audit, and continuity layer for bounded device coordination.
MD-OS (Artificial Prefrontal Cortex) v5.0 is the persistent agent and Operating Filesystem on disk. It does not include the LLM host runtime inside the package.
For local filesystem operation you need Node.js 20 or newer and the cortex or
node md-os/os/*.js commands. For the intended LLM-operated workflow, install
Codex separately. Other coding-agent CLIs, MCP-compatible clients, or custom
host loops can be integrated, but Codex is the verified runtime path for
this 5.0 release.
OpenCode can be tried as a secondary host, but do not assume Codex parity. It is less compatible until the same bootstrap, launcher, permission, command, and runtime-readback behavior has been verified.
Verify that the Codex host command exists before using the repository launcher:
codex --help
./bootstrap-md-os-codex.sh
The launchers do not install Codex. They start an already-installed Codex
runtime in this workspace with the MD-OS cognitive bootstrap loaded. Use
./bootstrap-md-os-codex.sh resume when you want to recover the most recent
Codex session instead of opening a fresh one.
The programmable agentic structure is easy to inspect as an Obsidian vault because the operating knowledge and generated views are Markdown-first.
Useful Markdown entry points:
AGENTS.md
ME.md
README.md
docs/
md-os/kb/
md-os/ops/global_index.md
md-os/ops/summary/active_work_items.md
md-os/ops/agenda/global_agenda.md
md-os/ops/projects/*/status.md
md-os/ops/projects/*/agenda.md
Obsidian is only a navigation and editing surface. The runtime remains the
filesystem plus deterministic builders in md-os/os/.
sed -n '1,160p' AGENTS.md
sed -n '1,120p' ME.md
sed -n '1,220p' README.md
npm run build:all
npm run replay
sed -n '1,160p' md-os/ops/global_index.md
sed -n '1,160p' md-os/ops/projects/demo_general_system/status.md
sed -n '1,160p' md-os/ops/projects/demo_general_system/agenda.md
sed -n '1,160p' md-os/ops/summary/active_work_items.md
node md-os/os/register_manual_signal.js demo_general_system "Review connector documentation for a new external host runtime"
node md-os/os/build_project_state.js demo_general_system
node md-os/os/build_global_agenda.js
node md-os/os/archive_runtime_state.js
sed -n '1,200p' md-os/ops/projects/demo_general_system/work_items.ndjson
sed -n '1,160p' md-os/ops/agenda/global_agenda.md
md-os/kb/ is stable knowledge.md-os/ops/ is runtime memory.md-os/os/ is deterministic code.md-os/ops/programs/ and compile into
md-os/ops/compiled/.cortex compact builds the hot active-work summary and terminal archive
views without deleting canonical work items.cortex propose-change <target_path> <summary> records contested edits as
append-only proposals under md-os/ops/changes/.cortex software bootstrap builds a cleanable host-local application and
service inventory under md-os/ops/local/software/.When an LLM host opens this repo, use this order:
On a fresh public clone, run npm run init:demo before reading paths under
md-os/ops/. If md-os/ops/ already contains readable runtime state, preserve
it and do not initialize it again.
AGENTS.mdME.mdREADME.mdmd-os/kb/README.mdmd-os/kb/OPERATIONS.mdmd-os/ops/global_index.mdmd-os/ops/continuity.mdmd-os/ops/state.jsonmd-os/ops/last_summary.mdIf md-os/ops/ is readable, do not enter recovery mode and do not recreate
runtime state implicitly.
For a new project:
md-os/examples/project.template.json.md-os/ops/projects/<project_id>/project.json.md-os/ops/sources/manual/ or
md-os/ops/sources/connectors/.node md-os/os/build_project_state.js <project_id>.node md-os/os/build_global_agenda.js.node md-os/os/archive_runtime_state.js.node md-os/os/build_markdown_graph.js.node md-os/os/build_global_index.js.For a new natural-language program:
md-os/ops/programs/<program_id>.md.Trigger, Conditions, Actions, and Output sections.node md-os/os/compile_programs.js.md-os/ops/compiled/programs.json.For workplace role onboarding from a messy handover:
This is the path for forming MD-OS APFC against a real job role when the company has no clean training package and can only provide files, exports, procedures, examples, and scattered notes.
Give the assisted new hire the real work surface through MCP where available: mail, calendar, agenda, planning boards, tickets, documents, folders, internal apps, and other bounded resources. The goal is to use the company’s existing tools without forcing a new custom API project before onboarding can start. These resources should be systems and sessions already authenticated and authorized for the new hire, supervised by the new hire during the work.
md-os/ops/roles/<role_id>/ROLE.md.md-os/ops/roles/<role_id>/intake/raw/.cortex role intake <role_id>.inventory.md, task_map.md, candidate_operations.md, and
questions_for_expert.md.cortex role sensemake <role_id>.analysis/role_understanding.md, cases/cases.md,
graph/relation_graph.md, analysis/root_cause_candidates.md, and
analysis/work_patterns.md.md-os/ops/programs/.For a new connector:
md-os/kb/CONNECTOR_CONTRACT.md.md-os/ops/connectors/connector_registry.json.md-os/ops/sources/connectors/.See CONNECTORS.md.
md-os/ops/.