The Atlas
AnyLegal OSS — documentation bound to its code
Journeys
The agentic chat loop, end to end
Follow one chat request from the SSE endpoint through the reactive turn loop to tool dispatch — the system's beating heart, doc claims bound to the code.
6 stops →The DOCX tracked-change pipeline
How a plain-text edit from the model becomes surgical Word tracked-change markup that preserves formatting — from the skill the model reads to the OOXML engine and LibreOffice finalization.
6 stops →How agent behaviour is assembled: skills & tools
The system prompt is deliberately thin on procedure — it defers to skills and a tool registry. Trace how a SKILL.md becomes a loaded procedure and how the tool pool is built and scoped.
6 stops →Run it locally: services, sandbox, knowledge
From `docker compose up` to the hardened code sandbox and the optional knowledge sidecar — what boots, what to lock down, and what is opt-in.
6 stops →Getting Started
The front door: what AnyLegal OSS is and how to stand it up. A single-tenant, multi-LLM agent harness for legal work that loads Anthropic-format SKILL.md files unmodified and runs on `docker compose up`. Start here to understand the product surface and boot the four services before reading any internals.
- AnyLegal OSS First stop for anyone installing, evaluating, or orienting to the project.
Architecture
How the system actually works, verified against the tree rather than the README. The code-verified Architecture & Technology analysis walks the agentic SSE loop, the OpenAI-compatible provider layer, the OOXML tracked-change pipeline, persistence, and the divergences it found; the LexWiki compiler README documents the optional knowledge-base sidecar in detail.
- Architecture & Technology — AnyLegal OSS When you need the real mechanics of a subsystem, not the marketing summary — the best single map before editing backend code.
- lexwiki-compiler When working on knowledge-base compilation, or deciding whether to run or disable the wiki sidecar.
Agents & Skills
Everything that shapes the agent's behaviour: the cross-cutting system prompt (the "legal brain" rules, memory model, citation and scope discipline), the eight Anthropic-format SKILL.md procedures the agent invokes for document work, and the seed files that ship as the starting instructions and playbook a new workspace is initialised with.
- Commercial Contracts — Standard Positions When you want the commercial-contracts playbook example, or to see how named per-type playbooks differ from the generic positions seed.
- Contract Review When the user asks to review, risk-assess, flag, or redline a contract.
- Document Comparison When the user has two document versions, asks "what changed", or wants a redline of a counterparty markup.
- Document Drafting (docx-js, from-scratch only) When generating new legal content from scratch — agreements, memos, letters, resolutions, term sheets.
- DOCX Editing Skill When redlining, filling, finalizing, or commenting on an existing Word document — the default DOCX editing playbook.
- DOCX XML — Advanced Skill When a structural Word edit is genuinely beyond edit_document and you need the raw OOXML manipulation patterns.
- Legal Research When the user needs cited legal information — statutes, regulations, case law, or market standards.
- Playbook — Standard Positions When you want the default playbook the agent checks contracts against, before a firm tailors its own.
- Quality Assurance Review When verifying a finished document before sign-off, or producing an audit-trail QA report.
- system_prompt When tuning agent behaviour, debugging a refusal or a hallucination, or understanding why the agent reaches for a skill before acting.
- Workspace Instructions When you want to see the default Instructions a fresh workspace ships with, or what the setup skill personalises.
- Workspace Setup When onboarding a new workspace, or to understand how Instructions and the starter playbook get created.
Developer Tools
The static analysis sites shipped alongside the code, each self-contained and dependency-light: a Skills & Prompts Explorer (assessment cards + workflow diagrams for every prompt artifact) and a Repository Explorer (browsable docs + the code-verified architecture page), plus the authoring spec that governs how their curated data is written. The Atlas deep-links into the former.
- AnyLegal — Agent Skills & Prompts Explorer When you want the curated, per-prompt view of the agent's skills, or need to regenerate the Explorer after adding a skill.
- Authoring spec — curated explorer data fragments Before writing or editing an Explorer assessment card or workflow diagram.
- Repository Explorer — AnyLegal OSS When you want to browse the docs as a rendered site, or need to regenerate the architecture analysis and its manifest.
Testing & Quality
The credibility artifacts that demonstrate the system tests itself. Currently the hallucination regression harness — an end-to-end demo that runs prompts × context sizes through the real system prompt and classifies the responses for hallucination signatures.
- Hallucination harness — OSS demo When running or extending the hallucination regression tests, or citing how the system is evaluated.
Governance
The terms that govern using and reproducing the code. The Additional Terms layer modifies the base MIT license with legal-services revenue thresholds, a "Powered by Anylegal.ai" attribution path, an anti-aggregator managed-service clause, and an explicit rule that AI-mediated rewrites count as reproduction.
- Additional Terms — Anylegal-OSS License Before redistributing, forking, offering it as a service, or generating derivative code from it with an AI agent.