2026-07-22 01:29:32 -04:00
|
|
|
# DocForge
|
|
|
|
|
|
2026-07-25 16:00:19 -04:00
|
|
|
DocForge is a project-scoped documentation graph for people and AI agents. It validates canonical
|
|
|
|
|
documentation, builds a disposable search and relationship index, compiles bounded context, renders
|
|
|
|
|
declared manuals, visualizes project structure, and manages reviewable documentation changesets.
|
2026-07-22 01:29:32 -04:00
|
|
|
|
2026-07-25 16:00:19 -04:00
|
|
|
## What it does
|
2026-07-22 01:29:32 -04:00
|
|
|
|
2026-07-25 16:00:19 -04:00
|
|
|
- Validates stable Markdown/TOML nodes and typed relationships.
|
|
|
|
|
- Builds a deterministic SQLite search and graph index.
|
|
|
|
|
- Exposes project-bound CLI and MCP query surfaces.
|
|
|
|
|
- Creates, validates, diffs, and previews isolated changesets.
|
|
|
|
|
- Applies one explicitly approved changeset hash through CLI or gated MCP.
|
2026-07-25 17:34:58 -04:00
|
|
|
- Runs a managed loopback graph browser with neighborhood, semantic Flow, convergence Web,
|
|
|
|
|
source inspection, and branch-aware node hiding.
|
2026-07-25 16:00:19 -04:00
|
|
|
- Supports generic documentation projects and project-owned source adapters.
|
2026-07-22 01:29:32 -04:00
|
|
|
|
2026-07-25 16:00:19 -04:00
|
|
|
DocForge never treats indexed text as instructions. It does not run shell commands, mutate Git,
|
|
|
|
|
build applications, deploy, publish, or select projects globally.
|
2026-07-22 01:29:32 -04:00
|
|
|
|
2026-07-25 17:43:41 -04:00
|
|
|
## Graph views
|
|
|
|
|
|
|
|
|
|
The browser presents the same indexed graph through three complementary views:
|
|
|
|
|
|
|
|
|
|
- **Nodes** shows a bounded, relation-neutral neighborhood around the focus. It is the broad
|
|
|
|
|
inspection view for seeing stored incoming and outgoing relationships without changing their
|
|
|
|
|
direction.
|
|
|
|
|
- **Flow** shows semantic origin-to-destination paths that terminate at the focus. DocForge
|
|
|
|
|
reverses prerequisite-style relationships for presentation, so imports, dependencies, reads,
|
|
|
|
|
inheritance, definitions, and tests flow toward the thing they help create or exercise.
|
|
|
|
|
- **Web** shows the larger convergence picture: Flow contributors plus contextual relationships,
|
|
|
|
|
callers, containers, and direct members or execution dependencies owned by the focus.
|
|
|
|
|
|
|
|
|
|
**Hide node** removes noise without changing the index. In Flow and Web, hiding a contributor also
|
|
|
|
|
removes upstream ancestors that no longer have a path to the focus. Nodes between the hidden
|
|
|
|
|
contributor and the focus stay visible, and alternate ancestor paths remain intact. **Restore
|
|
|
|
|
hidden** restores the presentation.
|
|
|
|
|
|
2026-07-25 16:00:19 -04:00
|
|
|
## Five-minute start
|
2026-07-24 16:01:03 -04:00
|
|
|
|
2026-07-25 16:23:23 -04:00
|
|
|
Requirements are Python 3.12+, `uv`, and Node.js/npm.
|
2026-07-24 22:26:01 -04:00
|
|
|
|
2026-07-22 01:29:32 -04:00
|
|
|
```bash
|
2026-07-25 01:16:05 -04:00
|
|
|
git clone forgejo@repo.andraxion.net:administrator/DocForge.git /absolute/path/DocForge
|
|
|
|
|
cd /absolute/path/DocForge
|
2026-07-25 16:23:23 -04:00
|
|
|
uv sync --group dev
|
2026-07-24 22:36:44 -04:00
|
|
|
npm ci
|
2026-07-25 01:16:05 -04:00
|
|
|
|
|
|
|
|
PROJECT=/absolute/path/MyProject
|
2026-07-25 16:00:19 -04:00
|
|
|
.venv/bin/docforge --project-root "$PROJECT" validate
|
|
|
|
|
.venv/bin/docforge --project-root "$PROJECT" reindex
|
|
|
|
|
.venv/bin/docforge --project-root "$PROJECT" visualize
|
2026-07-25 01:16:05 -04:00
|
|
|
```
|
|
|
|
|
|
2026-07-25 16:00:19 -04:00
|
|
|
Install the persistent per-user graph viewer once:
|
2026-07-25 01:16:05 -04:00
|
|
|
|
|
|
|
|
```bash
|
2026-07-25 16:00:19 -04:00
|
|
|
.venv/bin/docforge-viewer-manager install-user-service
|
2026-07-25 01:16:05 -04:00
|
|
|
```
|
|
|
|
|
|
2026-07-25 16:00:19 -04:00
|
|
|
Start an MCP server for one project:
|
2026-07-25 01:16:05 -04:00
|
|
|
|
|
|
|
|
```bash
|
2026-07-25 16:00:19 -04:00
|
|
|
.venv/bin/docforge-mcp \
|
|
|
|
|
--project-root "$PROJECT" \
|
|
|
|
|
--proposal-writer project-editor
|
2026-07-25 01:16:05 -04:00
|
|
|
```
|
|
|
|
|
|
2026-07-25 16:00:19 -04:00
|
|
|
Add `--canonical-applier project-editor` only when that MCP integration should expose the
|
|
|
|
|
hash-bound `docforge_apply_changeset` tool.
|
2026-07-25 01:16:05 -04:00
|
|
|
|
2026-07-25 16:00:19 -04:00
|
|
|
## Documentation
|
2026-07-25 01:16:05 -04:00
|
|
|
|
2026-07-25 16:00:19 -04:00
|
|
|
- [User manual](docs/USER_MANUAL.md) — features, setup, visualization, CLI, MCP, apply, adapters,
|
|
|
|
|
and troubleshooting.
|
|
|
|
|
- [Core contract](docs/CONTRACT.md) — invariants and security boundary.
|
|
|
|
|
- [MCP contract](docs/MCP_CONTRACT.md) — exact tool and process boundary.
|
|
|
|
|
- [Viewer manager](docs/VIEWER_MANAGER.md) — native service setup and lifecycle.
|
|
|
|
|
- [Adapter decision](docs/APPLICATION_DECISION.md) — why custom adapters own canonical
|
|
|
|
|
serialization.
|
2026-07-25 01:16:05 -04:00
|
|
|
|
2026-07-25 16:00:19 -04:00
|
|
|
## Development
|
2026-07-25 01:16:05 -04:00
|
|
|
|
|
|
|
|
```bash
|
2026-07-25 16:23:23 -04:00
|
|
|
npx pyright
|
2026-07-25 16:00:19 -04:00
|
|
|
npm run lint:web
|
|
|
|
|
uv run ruff check src tests tools
|
|
|
|
|
uv run ruff format --check src tests tools
|
|
|
|
|
uv run python -m compileall -q src tests tools
|
2026-07-25 16:23:23 -04:00
|
|
|
uv run pytest -q
|
2026-07-25 01:16:05 -04:00
|
|
|
```
|
|
|
|
|
|
2026-07-25 16:00:19 -04:00
|
|
|
See [AGENTS.md](AGENTS.md) before changing core boundaries.
|