Skip to main content

Initialization

Running davia init will:
  • Create a .davia folder in your project root
  • Add .davia to your .gitignore file
If you specify an agent with --agent=cursor (or github-copilot, windsurf), it will:
  • Add the agent rule file (e.g., .cursor/rules for Cursor)
  • Add the agent rule directory to your .gitignore

Why agent rules?

The agent rule file tells your coding agent how to interact with Davia and document your codebase. Each time you want to document your project, your coding agent will read this rule and write documentation files in .davia, maintaining context from previous documentation sessions. The .davia folder is gitignored so that generated documentation remains local and your coding agent can build upon previous documentation sessions.

.davia Folder Structure

.davia/
├── AGENTS.md          # Do not modify - contains the prompt for your coding agent
└── assets/
    ├── *.html         # HTML documentation pages
    ├── components/    # MDX component files (.mdx)
    ├── data/          # JSON data files + converted whiteboard diagrams
    └── mermaids/      # .mmd files (transitional, auto-converted to .json in data/)

What goes where

FolderPurposeFile type
assets/ (root)Documentation pages.html
components/Interactive React components.mdx
data/Persistent data + whiteboard diagrams.json
mermaids/Mermaid source files (auto-converted).mmd
The agent creates .mmd files in mermaids/ — these are automatically converted to .json in data/. HTML pages always reference the .json version, never the .mmd directly.
Do not modify agents.md. Do not let your coding agent modify it. It contains the prompt that explains to your coding agent how to interact with the .davia folder structure.

File System to Workspace Mapping

The structure in your .davia folder directly corresponds to what you see in the Davia workspace interface. The HTML files in .davia/assets/ become the documentation pages shown in the workspace navigation:
.davia folder structure in file explorerDavia workspace interface showing documentation
When you open Davia with davia open, the web interface reads from these files and displays them as interactive documentation pages. The navigation menu items (like “Autocomplete API Flow”) correspond to the HTML files in your assets/ folder (like autocomplete-api-flow.html).