# Project Documentation

Orbitmap stores and serves Markdown documents to your agents. Documents can be project-level (specific to one project) or workspace-level (shared across projects).

## Importing Documents

Upload documents to Orbitmap via the web UI or via your agent.

**Via agent:**

```terminal
~/my-project

❯ JARVIS, upload docs/api-spec.md to
  Orbitmap as "API Specification"

JARVIS: Importing document...
✓ import_document(title='API Specification',
  content=<file contents>)

Document imported: "API Specification"
ID: doc-7x8y9z
Sections: 12
```

**Via web UI:** Navigate to your project → Documents → click "New Document". Paste or upload your Markdown content.

## Sharing Documents

Documents can be shared across projects within your workspace.

**Via agent:**

```terminal
~/my-project

❯ JARVIS, share the API Specification with
  the mobile-app project

JARVIS: Sharing document...
✓ manage_document_sharing(doc_id,
  action='share',
  project_id='mobile-app')

"API Specification" is now shared with
project mobile-app.
```

## Reading Documents via Agent

Agents read documents efficiently using a tiered approach to minimize token usage:

1. **TOC first** - `get_document(id)` returns context + table of contents (~200 tokens)
2. **Section** - `get_document(id, section="## Auth")` returns just that section (~500 tokens)
3. **Full content** - `get_document(id, full=True)` downloads the complete document

```terminal
~/my-project

❯ check the docs on authentication, JARVIS

JARVIS: Reading project documentation...
✓ get_project_docs()
✓ get_document(id='doc-auth',
  section='## Authentication Flow')

From "Architecture Guide", section
"Authentication Flow":

The app uses Supabase Auth with email+
password. The SupabaseAuth middleware
validates JWT tokens on every request...

Want me to read the full document?
```

**Workspace-level documents:** When a task is started via `start_task()`, the response includes `workspace_knowledge` - documents shared at the workspace level. These contain cross-project guidelines, coding standards, or architectural decisions that apply to all projects.
