1
0
Fork 0
Code Issues Pull requests Projects Releases 2 Packages Wiki Activity Actions Pages
Successor repository for the DocForge project-scoped documentation graph.
Find a file
2026-07-29 16:39:21 -04:00
benchmarks Close Milestone 4 with adapter adoption evidence 2026-07-29 15:34:25 -04:00
docs Close Milestone 4 with adapter adoption evidence 2026-07-29 15:34:25 -04:00
schemas Bind generated clients to product version 2026-07-29 15:47:08 -04:00
src Close canonical cleanup race windows 2026-07-29 16:29:42 -04:00
tests Verify legacy tag in fresh-clone gate 2026-07-29 16:39:21 -04:00
tools Verify legacy tag in fresh-clone gate 2026-07-29 16:39:21 -04:00
.gitignore Add browser asset quality gate 2026-07-24 22:36:44 -04:00
.htmlvalidate.json Add browser asset quality gate 2026-07-24 22:36:44 -04:00
ACTIVE_SLICE.md Activate Milestone 5 release contract 2026-07-29 15:38:49 -04:00
AGENTS.md docs: adopt release-candidate closeout cadence 2026-07-28 18:23:11 -04:00
DEVELOPMENT_NOTES.md Activate Milestone 5 release contract 2026-07-29 15:38:49 -04:00
eslint.config.mjs Complete independent projection runtime 2026-07-29 12:38:25 -04:00
LICENSE Centralize release version identity 2026-07-29 15:42:45 -04:00
Makefile Add full and fresh-clone release rehearsals 2026-07-29 16:10:37 -04:00
package-lock.json Complete independent projection runtime 2026-07-29 12:38:25 -04:00
package.json Complete independent projection runtime 2026-07-29 12:38:25 -04:00
playwright.accessibility.config.mjs Complete independent projection runtime 2026-07-29 12:38:25 -04:00
pyproject.toml Add reproducible release artifact proof 2026-07-29 15:49:46 -04:00
README.md Close Milestone 4 with adapter adoption evidence 2026-07-29 15:34:25 -04:00
SLICE_HISTORY.md Close Milestone 4 with adapter adoption evidence 2026-07-29 15:34:25 -04:00
stylelint.config.mjs Add browser asset quality gate 2026-07-24 22:36:44 -04:00
toreview.md Add incremental adapter compiler boundary 2026-07-25 19:08:39 -04:00
uv.lock Centralize release version identity 2026-07-29 15:42:45 -04:00

DocForge

DocForge is a project-scoped documentation and source graph for people and AI agents. Canonical project files remain authoritative; DocForge validates them, builds disposable search and relationship indexes, compiles bounded context, manages reviewable changesets, renders declared manuals and portable graph views, and serves one project-bound MCP surface.

DocForge never treats indexed text as instructions. It does not run project build commands, compilers, Git operations, deployments, or arbitrary renderers, and it does not select projects globally.

DocForge 1.0.0 remains the first stable release in this product line. This checkout is the post-1.0 development line (1.3.0.dev0) and contains the Milestone 4 adapter-platform work. Milestone 4 is not a new product release, and Milestone 5 release and publication work remains separate.

Start here

Current capabilities

  • Validates Markdown and TOML nodes, stable IDs, typed relationships, project limits, and confined paths.
  • Builds a deterministic, disposable SQLite graph and search index with integrity and generation evidence.
  • Exposes project-bound CLI and MCP read, proposal, application, rendering, and visualization surfaces according to the startup policy.
  • Compiles versioned, generation-bound task context with cited evidence, explicit gaps, bounded output, and deterministic continuation.
  • Creates isolated documentation changesets, validates complete projected graphs, and applies only one explicitly approved changeset hash through a separately bound canonical applier.
  • Supports complete-projection adapters and opt-in incremental adapters with reverse-dependency invalidation, bounded extraction caches, and a clean full-build equivalence oracle.
  • Publishes function-scoped Logic separately from the primary graph for Python, JavaScript, TypeScript, and C++ integrations that provide it.
  • Compiles manual and portable graph plans into immutable packages for fixed detached renderers, then records bounded receipts.
  • Runs a managed loopback graph viewer with Nodes, Flow, Web, lazy Logic, source inspection, and branch-aware hiding.
  • Generates deterministic Codex, Claude, and OpenClaw client fragments without copying ambient environment values or secrets.

Adapter platform

Adapter authors use the public docforge.adapter_sdk surface for graph types, complete and incremental contracts, validation helpers, and verify_adapter_conformance(). Existing adapters that implement only load_projection() remain supported. Incremental adapters add a manifest and source extraction while retaining load_projection() as the complete graph oracle. An adapter that publishes Logic incrementally also supplies load_complete_assembly() so the complete oracle covers both graph and Logic.

The repository includes bounded reference integrations for:

  • Python, using the standard-library AST and publishing only project-local imports;
  • JavaScript and TypeScript, using their distinct optional Tree-sitter grammars and publishing only project-local static relative imports and re-exports;
  • C++, using compile_commands.json as translation-unit inventory and fingerprint evidence, without executing its commands or a compiler, and publishing only directly resolvable project-local quoted includes.

These integrations demonstrate the adapter contract; they do not claim resolved calls, inheritance, types, runtime behavior, macro expansion, compiler include semantics, or semantic ownership. Python works from the base wheel. Install the javascript, typescript, or cpp extra for the corresponding grammar, or languages for all three:

uv pip install "/absolute/path/DocForge[javascript]"
uv pip install "/absolute/path/DocForge[typescript]"
uv pip install "/absolute/path/DocForge[cpp]"
uv pip install "/absolute/path/DocForge[languages]"

Reference projects use the fixed .docforge/reference-adapter.toml descriptor and the installed docforge.reference_mcp module. That server is read-only and exposes no proposal or application surface.

Project-owned adapters use AdapterLauncherV1 and generate_adapter_client_configuration() to produce a client fragment from an explicitly constructed adapter project. The launcher is immutable and contains no command, caller arguments, working directory, environment, discovery rule, or callable selector. It resolves through isolated Python to one installed, project-owned top-level module; the only trusted dotted exception is the fixed docforge.reference_mcp binding. Generic docforge configure intentionally refuses custom adapters because it cannot safely reconstruct project-owned composition.

See the Adapter authoring guide, Reference adapters, and Agent integration for the supported routes.

Authority and projections

Canonical Markdown, TOML, adapter-declared sources, and descriptor files own project facts. The SQLite index, extraction cache, render packages, previews, portable artifacts, receipts, client fragments, and viewer processes are derived and replaceable.

The primary graph contains project nodes and relationships. Logic is a separate, lazy, function-scoped control-flow projection. Manual output, portable graph output, and the live viewer are independent consumers of one validated generation:

validated generation
    ├── ManualRenderPlanV1 → immutable package → detached manual renderer
    ├── GraphViewPlanV1    → immutable package → detached portable graph renderer
    └── pinned index       → managed read-only live viewer

The version-2 projection policy selects each consumer independently:

manual:         auto | explicit | disabled
portable_graph: explicit | disabled
live_viewer:    on-demand | disabled

The process capability policy is separate. Capability mode controls the registered read, proposal, application, or reserved operator surface; descriptor writers and the startup-bound canonical applier determine whether mutations are actually authorized. --no-ast is a restrictive binding policy over adapter evolution, Logic publication, and Logic retrieval. It is not a parser inspection mechanism or a filesystem sandbox, and the AST/Tree-sitter reference integrations should not be presented as no-AST adapters.

Read Policy precedence, Rendering and visualization, and Legacy and no-AST operation before changing those boundaries.

Five-minute generic project

Requirements are Python 3.12 or newer and an installed DocForge environment. From a development checkout, uv sync --group dev creates .venv:

git clone <repository-url> /absolute/path/DocForge
cd /absolute/path/DocForge
uv sync --group dev

PROJECT=/absolute/path/MyProject
.venv/bin/docforge --project-root "$PROJECT" onboard
.venv/bin/docforge --project-root "$PROJECT" onboard \
  --scaffold \
  --project-id my-project \
  --title "My Project"

The first command is read-only. Scaffolding is explicit and create-only: it writes a generic descriptor, one canonical overview node, and a built-in manual template, then indexes and renders them. Detected source languages remain adapter_required until a validated frontend is selected.

Operate the configured project:

.venv/bin/docforge --project-root "$PROJECT" validate
.venv/bin/docforge --project-root "$PROJECT" reindex
.venv/bin/docforge --project-root "$PROJECT" search architecture
.venv/bin/docforge --project-root "$PROJECT" visualize

Install the persistent per-user graph viewer manager once when using the live viewer:

.venv/bin/docforge-viewer-manager install-user-service

Start one generic, read-only MCP server:

.venv/bin/docforge-mcp \
  --project-root "$PROJECT" \
  --capability-mode read

Add a descriptor-authorized proposal writer only when the client should create proposals. Add a matching --canonical-applier only when that integration should expose exact-hash application. See the quickstart for the reference-adapter and generated-client paths.

Documentation

Learn and operate

Contracts and compatibility

Milestone evidence

Historical milestone records preserve the facts and dependency observations of their frozen candidates. Use the current guides and contracts for present behavior.

Development

Run the repository-native gate:

make gate

Milestone 4 maintenance entry points include:

make adoption-m4
make benchmark-m4-smoke
make benchmark-m4
make benchmark-m4-full
make command-reference-check
make docs-check

adoption-m4 builds and exercises a fresh base wheel without Tree-sitter packages and proves the Python reference plus a real isolated read-only MCP retrieval. The optional-language integrations have their own focused tests and extras. benchmark-m4 runs the maintained full adapter workload; the smoke target is for routine gate coverage, not final performance evidence.

Pass --diagnostics to docforge or docforge-mcp for bounded request-local timings and compiler work counters. Diagnostics are disabled by default and do not displace a primary result when the configured output budget is tight.

Read AGENTS.md before changing core boundaries.