Skip to main content

Local, version-aware documentation runtime for coding agents.

Project description

DocAtlas

Project Patch Contract Runtime for coding agents — local, source-attributed constraints from your repository docs and dependency evidence.

License: MIT Python 3.11 | 3.12 | 3.13

Quickstart | Project docs | Commands


DocAtlas turns reviewable project docs, lockfiles/dependency docs, and local code evidence into source-attributed Patch Contracts for coding agents. The runtime keeps agents on the project-owned path before they edit, then provides deterministic advisory validation and PR artifacts after a patch.

The first path for repository work is:

get_docs_context → get_patch_constraints → edit → validate_patch_against_constraints → advisory PR artifacts

Patch Contract output is advisory and non-blocking: it highlights source-backed constraints, deterministic violations, and unknown/manual-review areas, but it does not prove a patch is safe to merge.

Naming and compatibility

The product name is DocAtlas.

The PyPI package and CLI command are:

pipx install doc-atlas
doc-atlas --help

Some internal Python modules, storage paths, and older documentation may still use the legacy name docmancer, for example docmancer/ or ~/.docmancer/. Treat those as compatibility/internal names unless this README explicitly says otherwise.

Use doc-atlas ... for user-facing commands in new documentation. Configuration files may still be named docmancer.yaml for compatibility.

Quickstart

doc-atlas list                        # see indexed docs
doc-atlas ingest ./docs               # index local files
doc-atlas add https://docs.example.com
doc-atlas query "how to authenticate"

query prints estimated raw docs tokens, context-pack tokens, percent saved, and agentic runway:

Context pack: ~900 tokens vs ~4800 raw docs (81.2% less overhead, 5.33x agentic runway)

Prefer the compact default. Use --expand for adjacent sections and --expand page only when the whole page is necessary.

Core commands

doc-atlas setup
doc-atlas ingest ./docs
doc-atlas add https://docs.example.com
doc-atlas update
doc-atlas query "how to authenticate"
doc-atlas query "how to authenticate" --limit 10
doc-atlas query "how to authenticate" --expand
doc-atlas query "how to authenticate" --expand page
doc-atlas query "how to authenticate" --format json
doc-atlas list
doc-atlas inspect
doc-atlas remove <source>
doc-atlas doctor
doc-atlas fetch <url> --output <dir>

Project-docs MCP server

DocAtlas exposes its local project-constraint and documentation runtime through an MCP docs server:

doc-atlas mcp docs-serve

Project-docs tools let agents start from reviewable repository files, then move into a source-attributed Patch Contract before editing:

Tool Purpose
get_docs_context Recommended first call. Returns project, library, dependency, or mixed documentation context and routes patch-like tasks toward get_patch_constraints.
get_patch_constraints Builds a compact, source-attributed Patch Contract for the requested coding change.
validate_patch_against_constraints Performs deterministic advisory checks after a patch and keeps semantic uncertainty as unknown/manual review.
sync_project_docs Canonical lifecycle action. Discovers, reconciles, prunes orphaned/stale, and indexes project docs in one call. Prefer over ingest_project_docs.
inspect_project_docs Read-only discovery: reports discovered candidates, indexed docs, stale/ignored/orphaned sources, reason_code, and next_action.
ingest_project_docs Legacy low-level index operation. Does not reconcile — use sync_project_docs.
bootstrap_project_docs Safe high-level onboarding: inspect, sync if needed, inspect again. Stops before repo writes or network fetches.
get_project_docs Query indexed project docs for repo-specific architecture, conventions, README, ADRs, runbooks, or module docs.
get_project_context Compact repo-grounded context pack combining project docs with optional dependency-doc evidence and a Trust Contract.

Recommended workflow

For most MCP clients and coding agents, start with the unified high-level tool:

get_docs_context(question, project_path?, library?, mode="auto")

DocAtlas provides one high-level MCP entry point for project, library, dependency, and mixed documentation context. For patch-like tasks, follow its next action to get_patch_constraints, make the code change, then call validate_patch_against_constraints and attach the non-blocking review artifacts. It does not replace the lane-specific tools, and it does not fetch missing docs automatically unless the caller explicitly allows network work.

For coding/API/command questions, tools accept response_style with auto, snippet-first, or evidence-first. In auto, DocAtlas returns a trusted primary_snippet first when the selected sources contain a usable code/config/command example, while preserving context_pack, source attribution, exact-version diagnostics, and the Trust Contract. Snippets are extracted from indexed documentation; DocAtlas does not synthesize code.

{
  "question": "How do I use FastAPI Depends?",
  "library": "fastapi",
  "response_style": "snippet-first"
}

Advanced users can still call lane-specific tools directly.

sync_project_docs(project_path, with_vectors=true)     # discover + reconcile + index
get_project_context(project_path, question)             # compact grounded context

MCP Packs are an advanced layer for version-pinned API action tools. They are useful when an agent needs executable API operations, but the default repository workflow is the Patch Contract Runtime above.

For safe high-level onboarding:

bootstrap_project_docs(project_path, question?)
get_project_context(project_path, question)

sync_project_docs replaces the old two-step inspect → ingest loop. It:

  1. discovers current candidates from the filesystem;
  2. prunes orphaned indexed sources (deleted files);
  3. removes stale indexed sections (changed files);
  4. indexes new and changed candidates;
  5. returns current_count, new_count, changed_count, orphaned_removed, and indexed_sources.

Compact MCP responses

All project-docs lifecycle tools return compact responses by default:

{
  "tool": "sync_project_docs",
  "status": "success",
  "current_count": 3,
  "new_count": 1,
  "changed_count": 0,
  "orphaned_removed": 1
}

Pass "details": true for the full structured response.

When to use each tool

Situation Tool
First time in a repo sync_project_docs or bootstrap_project_docs
Check what docs exist inspect_project_docs (read-only)
Reconcile after file changes sync_project_docs
Old low-level index (no reconcile) ingest_project_docs
Answer "how does this repo work?" get_project_context or get_project_docs

Project-aware Flutter/Dart docs

DocAtlas can inspect a local Flutter/Dart project. It reads .fvmrc for Flutter channel/version hints and pubspec.lock for pub package versions. This enables exact-version documentation for the dependencies your project actually uses.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

doc_atlas-1.1.1.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

doc_atlas-1.1.1-py3-none-any.whl (392.4 kB view details)

Uploaded Python 3

File details

Details for the file doc_atlas-1.1.1.tar.gz.

File metadata

  • Download URL: doc_atlas-1.1.1.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for doc_atlas-1.1.1.tar.gz
Algorithm Hash digest
SHA256 94e31d4117a1d59006b35537ceb7709f1c855ffcd415bd89fc8d5a56fafc8487
MD5 20089d815909660b26abf4a52af723ed
BLAKE2b-256 83783043543e568b499cb0358fd2920dabd1ef11ee02a2bf15ea5c2f297756d5

See more details on using hashes here.

File details

Details for the file doc_atlas-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: doc_atlas-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 392.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for doc_atlas-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 daf7b027d86e6a8b41442f6454dc27a56933ea67a6d67b07db9ea95539ef9964
MD5 43eea35618ff2a1834e0ecd2f658b470
BLAKE2b-256 a29d783e3f46afdaf9a7619679b812b45c0bf6ff090d45644ae3acc470b3d205

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page