The .mem Format
A structured text format for encoding enterprise software environments as self-contained, human-readable memory files.
What is .mem?
The .mem format is a plain-text document structure designed to encode complex, multi-faceted knowledge about enterprise software environments into portable files. Each .mem file is self-contained — it holds everything needed to understand a single company's engineering context, including its architecture, operational data, behavioral rules, and narrative history.
The format draws inspiration from structured document standards like YAML and Markdown, combining human readability with machine-parseable sections. Every SWE-Enterprise world includes a .mem file as its canonical reference document.
Format Specification
A .mem file is organized into sections, each prefixed with a !section_name directive. Sections are ordered by convention but parsed independently.
!meta
Document metadata: name, version, description, and source attribution. Every .mem file begins with a !meta block that defines its identity. This is the only required section.
!state
Current session state: task description, completion status, decisions made, and next steps. Tracks the active work context and progress through objectives.
!arch
Architecture documentation: system design, component relationships, data flow, and technical decisions. Mirrors an Architecture Decision Record (ADR) in structured form.
!data
Structured data: domain distributions, sample counts, file locations, and quantitative metrics. Supports key-value pairs and nested structures.
!rules
Behavioral rules and best practices: coding standards, operational guidelines, preference constraints, and invariants that apply to the described environment.
!mem
Narrative memory entries: chronological records of decisions, events, and context changes. Each entry is timestamped and describes a discrete unit of work or discovery.