Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Agentic OS Filesystem Architecture: Document Types, VFS, and Virtual Relational Layer

A-26005: Agentic OS Filesystem Architecture: Document Types, VFS, and Virtual Relational Layer

Problem Statement

The repository has 13 distinct document types but only 4 have formal interfaces (schema + validation + lifecycle). The remaining 9 exist by convention, not by contract. This creates the “Architectural Orphanage” problem (first identified in S-26004): documents outside governed decision-making cannot be reliably discovered, filtered, or validated — by humans or AI agents.

ADR-26035 established the Evidence taxonomy (Decisions / Evidence / Governance) and proved it works with 4 analyses, 5 formal sources, and a working validation script. But the taxonomy only covers architecture-related documents. Content notebooks, script instructions, guides, plans, and promotional posts remain untyped. There is no uniform interface that defines what “a document type” is across the repo.

The Agentic OS model (A-26002, S-26005) positions documentation as the file system of an AI-native operating system. In UNIX, every file has a type and metadata (the inode). In this system, every document should have a type and metadata (YAML frontmatter). The gap: UNIX has a VFS layer that provides a uniform interface across all file types. This repo has no equivalent — each validation script implements its own type-specific logic with no shared abstraction.

Beyond the typing gap, there is a relational integrity gap. Documents reference each other — analyses cite sources (sources: [S-26004]), ADRs produce artifacts (produces: [ADR-26035]). These are foreign key relationships, but no validation enforces them. A source ID can be typo’d, a referenced ADR can be deleted, and no CI gate catches it. The knowledge base has referential links but no referential integrity.

There is also an integration gap. The Agentic OS model (A-26002) describes three layers — Control Plane (governance), Kernel (cognitive processing), Execution (sandboxed skills) — but the filesystem architecture that ties them together is not formalized. The document type system sits at the intersection of all three layers: governance defines types, the kernel queries types for routing, and execution produces new typed documents. Without a unified filesystem design, these layers cannot interoperate reliably.

This analysis applies two theoretical foundations — UNIX system design and Codd’s relational theory — as blueprints to design the Agentic OS filesystem architecture, with Document Type Interfaces as the VFS layer and a Virtual Relational Layer (VRL) providing referential integrity over Git/YAML.

Interim artifact caveat. This analysis is itself an interim artifact. The Agentic OS methodology is under active revision — ADRs, the evidence pipeline, and the document type taxonomy are all subject to redesign as the OS architecture crystallizes. The structures described here should be understood as the current best model, not a final specification. The focus is on interfaces (stable contracts) rather than implementations (which will evolve).

Key Insights

The Documentation Landscape — 13 Types, 4 Governed

#TypeLocationValidationInterface Level
1ADRarchitecture/adr/check_adr.pyFull (schema + sections + lifecycle)
2Analysisevidence/analyses/check_evidence.pyFull
3Retrospectiveevidence/retrospective/check_evidence.pyFull
4Sourceevidence/sources/check_evidence.pyFull
5Notebookai_system/*/jupytext_sync/verifyPartial (Jupytext + naming)
6Script Instructiontools/docs/scripts_instructions/check_script_suite.pyPartial (existence only)
7Git Workflow Guidetools/docs/git/link checks onlyNone
8Manifestoarchitecture/noneNone
9Telegram Postmisc/pr/noneNone
10Planmisc/plan/noneNone
11Tech Debt Registermisc/plan/techdebt.mdnoneNone
12Package Specarchitecture/packages/noneNone
13Prompt (JSON)ai_system/3_prompts/consultants/check_json_files.py (syntax)None

Types 1-4 are the “governed” types — they have schema, validation, and lifecycle. Types 5-6 have partial interfaces (Jupytext enforcement, naming conventions). Types 7-13 are “untyped” — they exist by convention, not by contract.

Industry Convergence — The 4-6 Base Types

Across DITA (OASIS), Diataxis, ISO 26514, Google, and GitLab CTRT, a stable set of 4-6 base types emerges:

Semantic RoleDITADiataxisISO 26514GoogleGitLab CTRT
“What is it?”ConceptExplanationConceptualConceptualConcept
“How do I do it?”TaskHow-to GuideInstructional—Task
“Teach me”—Tutorial—TutorialTutorial
“Look it up”ReferenceReferenceReferenceReferenceReference
“Fix a problem”Troubleshooting—Troubleshooting—Troubleshooting
“Why decided?”———Design Doc—

The “Design Doc” gap: none of the standard taxonomies have a first-class type for architectural decisions. ADRs (Michael Nygard, 2011) fill this gap. This repo’s ADR system is an innovation relative to documentation standards.

DITA Specialization — The Interface Inheritance Model

DITA implements document type inheritance — the most mature precedent for typed documentation:

topic (base type — abstract interface)
├── concept (extends topic — adds conbody)
├── task (extends topic — adds steps, prerequisites)
├── reference (extends topic — adds tables, parameter lists)
└── troubleshooting (extends topic — adds cause, remedy)

Key properties:

DITA proves typed documentation with formal interfaces is production-viable at enterprise scale (IBM, SAP, Cisco). But DITA’s XML toolchain is antithetical to Markdown-native docs-as-code. The opportunity: bring DITA’s conceptual model (typed topics with schema validation) into a Markdown/YAML world.

Modern Type Systems for Markdown

ToolSchema LanguageValidatesStatus
Astro Content CollectionsZod (TypeScript)FrontmatterProduction-ready
ContentlayerJS configFrontmatter + routingStalled (2023)
mdschemaYAMLBody structure (sections, headings)Early stage

Astro Content Collections is the most mature precedent — Zod schemas for frontmatter validation in a content-centric framework. Our check_adr.py and check_evidence.py already implement this pattern — but in Python/YAML, without a shared abstraction.

AI-Native Documentation Standards

Two emerging standards address AI consumption directly:

Both validate the manifesto’s thesis: documentation is not just for humans anymore. AI consumers need machine-readable metadata to filter before they read. This is the Progressive Disclosure pattern from A-26002: the agent reads frontmatter type + tags + description fields (Level 1) to decide whether to load the full document (Level 2) — saving tokens.

Metadata for RAG Filtering

Research on production RAG systems converges on these critical metadata fields:

Dublin Core (ISO 15836) provides a standardized 15-element metadata set. Schema.org provides TechArticle, HowTo, LearningResource types. Both are reference vocabularies, though neither is directly usable as a validation schema.

Duplication in Validation Scripts — The Common Kernel

Six shared patterns are duplicated across 2+ scripts:

PatternScripts Using ItDuplication
Frontmatter Parsing (regex + YAML)check_adr.py, check_evidence.py~15 LOC × 2
Section Extraction (code fence removal + heading regex)check_adr.py, check_evidence.py~10 LOC × 2
File Discovery (rglob + exclusion filtering)check_broken_links.py, check_link_format.py, check_json_files.py~40 LOC × 3
Config Loading (repo root → pyproject.toml → YAML)check_adr.py, check_evidence.py, validate_commit_msg.py~25 LOC × 3
Git Client (root, staged files, renamed files)check_adr.py, check_evidence.py, check_link_format.py, check_script_suite.py~20 LOC × 4
CLI / Error Reporting (argparse + exit codes)All 10 scripts~30 LOC × 10

Per SVA (ADR-26037): extraction is justified only when duplication causes maintenance pain or behavioral inconsistency. The first three patterns (frontmatter, sections, file discovery) are the strongest candidates — they implement the same logic with the same bugs and the same edge cases.

Virtual Relational Layer — Codd’s Theory Applied to Git/YAML

Traditional filesystems are hierarchical and opaque — they organize by location, not by relationship. Codd’s relational model (1970) solved this exact problem for data: Data Independence — the logical structure of data is independent of its physical storage. The same principle applies to the Agentic OS filesystem.

S-26006 proposes a Virtual Relational Layer (VRL) — treating the Git repository as a relational system without introducing an actual database (which would violate SVA C4: Orchestration Bloat):

Relational ConceptVRL ImplementationExample
Tuple (row)YAML frontmatter (1NF — each field is atomic)id: A-26005, title: "...", date: 2026-03-07
Primary Keyid field (globally unique, namespace-prefixed)A-26005, S-26006, ADR-26035
Foreign Keysources, produces, extracted_into fieldssources: [S-26004, S-26005]
Schemaevidence.config.yaml, adr_config.yamlRequired fields, controlled vocabularies
Shared Attribute Tablearchitecture.config.yaml (parent config)Tag vocabulary, shared metadata
TransactionGit commit (atomic, all-or-nothing)Single commit changes source + analysis
Transaction LogGit history (append-only, durable)git log --all --full-history
Constraint CheckValidation scripts in CI/CDcheck_evidence.py validates FK existence
Materialized ViewBuild-time catalog.json (future)Pre-computed index for agent queries

Git provides ACID properties:

Referential integrity is the critical gap. Currently, an analysis can declare sources: [S-99999] and no validation catches the invalid FK. The VRL design requires a referential integrity gate: CI/CD validates that every value in sources: [], produces: [], and extracted_into exists as a valid primary key in the ecosystem. This is the check_evidence.py equivalent of a database FK constraint.

Normalization principles apply — but only to metadata. Shared attribute tables (tag vocabularies, controlled status values) already live in config files rather than being duplicated in every document. This is 2NF normalization. The document body (Markdown text) remains denormalized — it is the “unstructured payload” that the relational layer does not govern. Over-normalizing the body would create artificial JOIN dependencies that hurt readability without improving integrity.

The JOIN problem. Filesystems do not natively support JOINs. If an agent needs to answer “What ADRs resulted from research source S-26004?”, it must scan the metadata of all ADR files looking for sources containing S-26004. For small repos this is acceptable. At scale, the solution is a materialized view — a catalog.json generated at build time that pre-computes the relational graph, enabling O(1) lookups by the agent. This is analogous to database indexing.

S-26006 rates the VRL methodology at WRC 0.925 (Production-Ready): E=0.95 (Codd’s relational algebra is the most validated data theory in existence), A=0.85 (used in data catalogs and semantic web standards), P=0.95 (native to Git/YAML stack, zero runtime overhead).

Contract-Based Documentation — Docs as ISA

S-26006 introduces a conceptual reframing that extends the AI-First Methodology principle: documentation is not just “content consumed by agents” — it is the Instruction Set Architecture (ISA) for the LLM processor.

In traditional computing:

In the Agentic OS:

This three-level layering has a precise precedent in HPC engineering. The GEMM handbook documents the BLAS Interface / API / ABI hierarchy:

LayerBLAS (HPC)Agentic OS (Documentation)
Interface (semantic contract)BLAS specification: “SGEMM must perform C=αAB+βCC = \alpha AB + \beta C”Doc-Type Interface: “an ADR must have status, sections, lifecycle”
API (source-level binding)CBLAS header: void cblas_sgemm(...)YAML config: adr_config.yaml (field names, controlled vocabularies)
ABI (runtime binding)Compiled .so with calling conventionsValidation script: check_adr.py (the executable validator)

The BLAS standard originated c. 1972 and still governs HPC 50+ years later — implementations changed (Fortran → C → CUDA → ROCm), hardware changed (mainframes → GPUs → TPUs), but the interface survived. The GEMM handbook documents a cautionary counterexample: Soviet engineers built math code specific to the BESM-6 machine without standard interfaces, making migration to new hardware an arduous multi-year process.

The lesson for the Agentic OS: the interface is the asset, not the implementation. Document Type Interfaces (adr_config.yaml, evidence.config.yaml) should be designed to outlive any specific validation tool (vadocs), agent (Claude, Gemini), or infrastructure (Git, GitHub Actions). Implementations will be replaced; interfaces persist.

This creates a Self-Documenting Runtime where:

The practical implication: when a new agent (Claude, Gemini, a local SLM) connects to this system, it reads the Doc-Type Interfaces to understand what the system offers — the same way a compiler reads header files to understand what functions are available. The agent doesn’t need system-specific training; it needs to read the ISA.

Taxonomy Design

The UNIX Blueprint — Document Types as File Types

S-26005 provides the foundational UNIX ↔ Agentic OS mapping from Bach (The Design of the UNIX Operating System) and Billimoria (Linux Kernel Programming):

UNIX/Linux ConceptAgentic OS EquivalentFunctional Comparison
CPU / Instruction SetLLM EngineExecutes tokens instead of binary opcodes
Kernel (Scheduler)Agent FrameworkOrchestrates task flow, manages context windows
System Calls (open, read, write)Tool InvocationsControlled interfaces to external resources
User Space ProcessesSkills / PluginsModular capabilities on top of the agent framework
Memory Management (VM/Paging)Context Window ManagementSwapping information in/out of context (RAG)
File SystemKnowledge Base / Vector StorePersistent storage and retrieval
Permissions (UID/GID)Policy & Safety GuardsControlling tool/skill execution
Kernel Modules (LKM)Dynamic Skill LoadingNew capabilities without restarting

The missing row — S-26005 doesn’t map file types to the Agentic OS. This analysis fills that gap:

UNIX ConceptAgentic OS EquivalentThis Repo’s Implementation
File types (regular, directory, socket, pipe, device)Document types (adr, tutorial, analysis, source, guide)13 types discovered, 4 governed
VFS (Virtual File System)Document Type RegistryDoes not exist yet (the gap)
inode metadata (size, permissions, timestamps, type)YAML frontmatter (id, title, date, status, tags, type)Partial — only governed types have frontmatter
stat() syscall (read inode without opening file)parse_frontmatter() (read metadata without parsing body)Duplicated across check_adr.py and check_evidence.py
file command (detect type from magic bytes)resolve_type(path, frontmatter) (detect type from location + metadata)Does not exist — type is implicit from directory
File permissions (rwx for owner/group/other)Document lifecycle (status controls valid operations)Only ADRs and evidence have lifecycle
Mount point (where a filesystem is attached)Directory convention (where a type’s files live)Implicit — no registry maps directories to types
File descriptor (handle for open file)Document model (in-memory representation)vadocs Document dataclass (v0.1.0 PoC)
VFS operations (open, read, write, close)Validation primitives (parse, extract, validate, fix)Duplicated per-script, not abstracted

The VFS Analogy — Why It Matters

In UNIX, the VFS is the critical abstraction that allows applications to work with files regardless of the underlying filesystem (ext4, NFS, tmpfs). The open() syscall works the same whether the file is on a local disk or a network mount. The application never knows the difference.

In the Agentic OS, the Document Type Registry would serve the same role: a validation script (or an AI agent) calls parse_frontmatter() and extract_sections() without knowing whether the document is an ADR, a tutorial, or a retrospective. The registry resolves the type and returns the appropriate schema and validators.

Without the VFS, UNIX applications would need filesystem-specific code for every operation. Without the Document Type Registry, validation scripts duplicate type-specific logic — which is exactly the current state (6 duplicated patterns across 10 scripts).

The inode Metadata Model — Frontmatter as the Document Header

In UNIX, every file has an inode — a fixed-size metadata record that the kernel reads without opening the file body. The stat() syscall returns inode data instantly, enabling ls -l, find, du, and every file operation to make decisions before performing I/O. The inode is the entry point for all file operations.

In the Agentic OS, YAML frontmatter serves the same role. It is the entry point for an LLM to understand a document. An agent reads frontmatter (the stat() call) to decide whether to read the body (the read() call). This is the Progressive Disclosure pattern (A-26002): metadata filtering saves tokens the same way stat() saves disk I/O.

The inode analogy must be taken seriously — each field must justify its existence as essential metadata:

inode fieldAgentic OS equivalentDocument frontmatter fieldJustification
i_mode (file type)What kind of documenttype: adrAgent routing: “What was decided?” → filter to type adr
i_mode (permissions)Lifecycle stagestatus: acceptedAgent filtering: skip deprecated/draft content
i_size (file size in bytes)Token budget costtoken_size: 2450Context budget planning: can I fit this document?
i_mtime (modification time)Last meaningful updatedate: 2026-03-06Recency filtering
i_ctime (creation time)Birth datebirth: 2026-02-15Document age tracking
i_uid (owner)Document authorauthor: rudakow.wadim@gmail.comProvenance
i_nlink (hard link count)Cross-referencesproduces: [ADR-26035]Dependency graph (type-specific)
— (no UNIX equivalent)Human-readable summarydescription: "..."THE critical field — see below
— (no UNIX equivalent)Semantic classificationtags: [governance]Domain filtering for RAG and agent routing
— (no UNIX equivalent)Artifact versionversion: 1.0.0Production traceability (SemVer per AVP policy)
The description Field — Context Management Mechanism

The description field has no UNIX inode equivalent because UNIX files don’t need to explain themselves to a probabilistic processor. But in the Agentic OS, every document competes for the agent’s finite context window. The description is the document’s elevator pitch — it lets the agent decide in ~20 tokens whether to spend ~2000 tokens reading the body.

This is not a nice-to-have. It is a context management mechanism. Without description:

With description:

The description must be:

References