# Completed slices ## DFG-23 process-stable adapter implementation boundary ### Changed - Added a confined implementation boundary with explicit roots, files, and suffixes. - Inferred the project-local Python package containing a loader and included its declared descriptor without requiring every existing adapter to opt in manually. - Fingerprinted relative implementation paths and bytes at process start under fixed file and byte limits. - Rejected edits, additions, deletions, missing files, and unsafe replacements with `adapter_restart_required` before MCP synchronization or proposal validation. - Returned bounded change evidence and explicit non-retryable `restart_project_server` remediation. - Clarified that current source manifests must treat staged and unstaged deletions identically; Git staging is not a synchronization operation. ### Verification - Focused tests cover inferred and explicit implementation boundaries, descriptor changes, added, edited, and deleted files, ignored derived files, and exact MCP remediation. - Strict Pyright, Ruff lint and formatting, Python compilation, and the HTML/CSS/JavaScript quality gate passed. - The complete warning-strict suite passed 87 tests and 2 subtests. ## DFG-22 deterministic incremental adapter assembly ### Changed - Added an optional language-neutral assembly contract after incremental source extraction. - Kept raw source contributions inside DocForge's existing fingerprint, dependency invalidation, cache, and atomic publication path. - Required assembled projections to retain the manifest-bound identity, revision, and source hash. - Validated the assembled primary graph and function Logic owners before publication. - Preserved the stricter unique-source ownership path for adapters that do not need assembly. - Documented assembly for compilers and language tools that repeat shared declarations across extraction units. ### Verification - The overlap fixture caches two repeated source contributions, publishes one deterministic node, reuses both warm cache entries, reparses one changed source, preserves the selected fact, and passes full/incremental equivalence. - Focused adapter and onboarding tests passed 14 tests. - Strict Pyright, Ruff lint and formatting, Python compilation, and the HTML/CSS/JavaScript quality gate passed. - The complete warning-strict suite passed 82 tests and 2 subtests. ## DFG-21 language-neutral project onboarding ### Changed - Added a read-only onboarding assessment that detects common source languages, build evidence, likely documentation, existing configuration, and capability readiness without writing files. - Added explicit language selection for C, C++, C#, Go, Java, JavaScript, Kotlin, Lua, PHP, Python, Ruby, Rust, Scala, Swift, and TypeScript. - Added conflict-safe generic scaffolding that creates project configuration, one authoritative overview, a built-in manual template, the derived index, and the rendered starter manual. - Kept language detection separate from semantic extraction. Every detected source language remains `adapter_required` until a language frontend passes the adapter contract. - Added the complete language-neutral onboarding checklist covering authority, manual import, frontend ownership, C++, Rust, and Java build evidence, incremental compilation, source/manual links, views, MCP activation, and maintenance. ### Verification - Focused onboarding, CLI, and core tests passed 19 tests and 2 subtests. - Strict Pyright, Ruff lint and formatting, Python compilation, and the HTML/CSS/JavaScript quality gate passed. - The complete warning-strict suite passed 81 tests and 2 subtests. ## Dev-Rewrite multi-language Logic and traceable browser ### Changed - Added pinned Tree-sitter-backed JavaScript and C++ analyzers behind the existing language-neutral `LogicProjection` boundary. - Replaced ambiguous merge terminology with decision, case, loop-exit, and exception convergence. - Added composable text, family, node-kind, language, and capability filters plus common presets. - Added direct-neighbor and incident-edge highlighting when a canvas node is selected. - Increased Logic layer clearance and vertical spacing, with routed edge lanes for branches, returns, and loop-back paths. ### Verification - Tests cover JavaScript and C++ functions, methods, branches, short-circuit booleans, loops, cases, exceptions, and returns alongside Python behavior. - Visualization tests cover filter facets, capability filtering, trace controls, template identity, and browser asset validity. ## Dev-Rewrite function-scoped Logic ### Changed - Added a reusable Python AST control-flow analyzer for functions, methods, and nested functions. - Added dedicated schema-2 SQLite tables for function-scoped logic owners, nodes, and edges without placing statement-level data in primary graph search or traversal. - Added the bounded `docforge_get_logic` read tool and a lazy Logic visualization tab. - Added semantic Entry, Decision, Action, Control, Convergence, and Terminal cards with explicit branch, loop, exception, return, and raise paths. - Added Logic-specific hiding that bridges retained predecessors and successors with an explicit omitted path. - Preserved Release 1 adapters and full projections. Adapters may emit no logic or opt in source by source through the incremental extraction contract. ### Verification - Tests cover Python branching, compound booleans, loops, `match`, exceptions, nested functions, schema persistence, bounded reads, MCP registration, visualization APIs, and Logic UI assets. - Strict Pyright, Ruff, formatting, compilation, warning-strict tests, web linting, package builds, dependency audits, and browser QA pass. ## Dev-Rewrite incremental compiler boundary ### Changed - Added an opt-in source-scoped adapter manifest and extraction contract while preserving Release 1 complete projections. - Added persistent extraction caching with fingerprint, path, extractor-version, dependency, and project/adapter identity invalidation. - Added reverse-dependency invalidation for added, changed, renamed, deleted, and dependency-changed sources. - Added manifest-only stale-state checks so normal MCP reads do not reconstruct the complete projection. - Added full/incremental equivalence verification and deterministic build metrics. - Added first-class relationship-only proposal updates over the existing hash-bound projector. - Added a lazy function-scoped logic-projection boundary outside the primary architecture graph. ### Verification - Tests cover cache hits, reverse invalidation, renames, dependency changes, deletion, corrupt caches, failed extraction, atomic preservation, manifest-only stale checks, relationship-only proposals, lazy logic persistence, and full-build equivalence. - Strict Pyright, Ruff, formatting, compilation, warning-strict tests, web checks, dependency audits, source/wheel builds, and isolated wheel installation pass. ## Release 1.0.0 stable product boundary ### Changed - Designated the complete project-scoped graph, CLI, MCP, changeset, application, rendering, and visualization surface as DocForge 1.0.0. - Completed the Nodes, semantic Flow, and convergence Web model. - Replaced generic node-role circles with semantic cards for Structure, Behavior, Dependency, Execution, Data, Evidence, Context, and Related contributors. - Made readable leaf names and node kinds visible on the canvas without truncating long identifiers. Full qualified identities remain available in tooltips and inspectors. - Preserved branch-aware hiding so Flow and Web remove upstream-only ancestors while retaining descendants and alternate paths into the focus. ### Verification - Strict Pyright, Ruff, formatting, compilation, warning-strict tests, HTML/CSS/JavaScript checks, package builds, and browser QA pass for the Release 1 surface. - The Release 1 tag is `v1.0.0`. ## DFG-20 gated application and self-service graph operations ### Changed - Released DocForge 0.13.0 with exact-hash canonical application through CLI and opt-in MCP. - Added generic Markdown/TOML serialization, rollback, semantic verification, index refresh, and declared render refresh. Custom adapters retain ownership of canonical serialization. - Added CLI `reindex`, `visualize`, visualization status, and visualization stop commands. - Added browser-side node hiding/restoration, bounded source inspection at anchors, and a scrollable full inspector. - Replaced the repository quick reference with a dedicated user manual covering setup, CLI, MCP, visualization, application, adapters, and troubleshooting. ### Verification - Application tests cover all four proposal operations, exact-hash rejection, MCP gating, derived refresh, and CLI use. - Visualization tests cover source confinement, browser script validity, hiding controls, and inspector layout. ## DFG-19 cross-platform supervised viewer manager ### Changed - Released DocForge 0.12.0 with an authenticated loopback viewer-manager protocol. - Moved viewer process ownership out of the MCP stdio host and into an OS-supervised per-user manager. Linux uses systemd user services, macOS LaunchAgents, and Windows Task Scheduler. - Added `docforge_visualization_status` and changed worker lifetime to a one-hour browser-activity policy with explicit per-project stop. - Replaced Unix-socket and inherited-file-descriptor assumptions with loopback TCP and standard input/output worker control, so the manager protocol works on Windows as well as Unix platforms. ### Verification - Lifecycle tests cover manager worker reuse, browser activity renewal, idle reclamation, explicit stop, strict MCP surface registration, and manager-mediated visualization startup. ## DFG-18 persistent visualization lifecycle ### Changed - Released DocForge 0.11.0 with a persistent project-bound visualization worker. - Replaced browser leases and MCP-owner-process shutdown with an explicit `docforge_stop_visualization` read tool. - Added a private, atomically written project-cache registry. It reuses a live worker only when its authenticated loopback endpoint and exact index snapshot identity match the current request. - Removed the parent-process `Popen` lifecycle dependency by spawning the session-isolated worker directly, so no process cleanup warning or parent lifetime remains coupled to the browser. ### Verification - A process-boundary test terminates the launcher, confirms the viewer remains live, confirms a separate runner reuses its URL, and confirms the explicit stop tool terminates it. - Focused warning-strict lifecycle and MCP contract tests pass. ## DFG-17 relationship-aware graph and upstream flow ### Changed - Released DocForge 0.10.0 with the fixed `graph-browser@8` template. - Assigned generic semantic families, distinct colors, line patterns, and directional endpoint symbols to common structure, execution, data, dependency, evidence, and context relations. - Added a static visible-relationship key shared by Nodes and Flow, including deterministic fallback styling for project-defined relations. - Renamed topology-derived navigation from ambiguous Children and Edge language to Focus node, Outgoing paths, and Incoming & lateral. - Implemented bounded upstream Flow layers. Calls, dispatches, launches, activations, and writes keep declared direction; reads, imports, and dependencies reverse for lineage presentation; structure, evidence, context, and unknown relations remain excluded. - Separated relationship-line and context-node CSS classes to prevent style inheritance and DOM selector collisions. ### Verification - A deterministic JavaScript harness covers relation classification, fallback styling, semantic direction, evidence exclusion, upstream membership, dependency reversal, and layered placement. - Browser interaction QA verifies distinct line colors, dash patterns, endpoint markers, exact relationship keys, Nodes-to-Flow switching, evidence exclusion, and the destination-on-right layout without console or page errors. - HTML, CSS, and JavaScript validation, strict Pyright, Ruff, formatting, compilation, dependency locks, npm audit, the complete warning-strict suite, and diff checks pass. ### Limits - Flow operates on the already bounded neighborhood returned for the current focus and depth. - Unknown project-defined relations receive deterministic Nodes styling but do not enter Flow until their semantic direction is declared in the fixed relation map. - Cycles are bounded by visited-node traversal. A later gate may add explicit cycle-group rendering if real project graphs demonstrate that need. ## DFG-16 browser asset quality gate ### Changed - Added pinned ESLint, Stylelint, CSS-tree, and HTML Validate development tooling. - Added one `npm run lint:web` gate that extracts the exact embedded viewer assets without writing generated repository files. - Validated a freshly rendered fixture manual in addition to the graph viewer. - Corrected viewer landmark names, explicit input type, ARIA group semantics, inline legend styles, and HTML doctype casing. ### Verification - HTML Validate passes the served graph document and a freshly rendered manual. - Stylelint and CSS-tree pass the embedded stylesheet with syntax and property-value validation. - ESLint passes the embedded browser script with recommended browser rules and no inline disables. - Strict Pyright, Ruff, formatting, compilation, all 52 warning-strict tests, dependency locks, and diff checks pass. ## DFG-15 strict static typing gate ### Changed - Made the existing strict Pyright configuration resolve DocForge's `.venv` automatically. - Converted validated TOML, JSON, subprocess, socket, MCP, render, and visualization boundaries from unknown dynamic values into explicit checked types. - Kept runtime validation and fail-closed behavior at every untrusted input boundary. - Made strict `pyright` an explicit repository development gate. ### Verification - Pyright reports zero errors, warnings, or informational diagnostics across all source modules. - Ruff lint and formatting, Python compilation, all 52 warning-strict tests, and diff checks pass. ## DFG-14.1 detached viewer lifecycle correction ### Changed - Released DocForge 0.8.1 with the existing `graph-browser@5` interface. - Moved the loopback listener into a detached worker so MCP transport teardown cannot kill an active viewer. - Bound the worker to the longer-lived MCP client host plus the existing browser lease and startup grace. ### Verification - Added a process-boundary regression test that exits the launching transport process, verifies the viewer still responds, and then verifies lease expiry. - Retained the in-process listener tests for token confinement, read-only behavior, stale-index rejection, and lease renewal. ## DFG-14 durable graph navigation ### Changed - Released the fixed `graph-browser@5` template and DocForge 0.8.0. - Kept the loopback listener alive across short-lived MCP standard-input transactions with a browser-renewed lease, while preserving explicit process termination and bounded abandoned-page cleanup. - Added a visible disconnected state instead of leaving stale controls to fail silently. - Added pointer and keyboard resizing for both side panels. - Made the unblurred modal natively resizable and draggable by its constrained title bar. - Added generic topology-derived Primary focus, Children, and Edge & context navigation sections. - Arranged neighborhoods by shortest-hop rings and applied distinct role palettes that darken progressively by hop distance, capped at fifty percent. - Kept all category and color decisions client-side without changing project graph facts. ### Verification - Focused HTTP tests cover heartbeat renewal, bounded lease expiry, non-daemon listener ownership, and the unchanged token/read-only boundary. - A deterministic JavaScript harness proves topology roles, hop rings, and distance shading. - Embedded JavaScript syntax and interaction-contract checks cover panel resizing, modal movement and resizing, unblurred backdrop behavior, grouped navigation, and lease renewal. - Ruff, formatting, compilation, the complete warning-strict suite, and live project-bound viewer checks pass. ### Limits - Panel widths, modal geometry, viewport position, and open dialog state are not persisted. - Topology roles are presentation aids. They do not replace project-authored relationship meaning. - Background-browser timer throttling is tolerated by the three-minute lease but may delay cleanup. ### Next gate No further gate is planned. Measure use before adding saved layouts, minimaps, or export. ## DFG-13 graph activation reliability ### Changed - Released the fixed `graph-browser@4` template. - Delayed SVG pointer capture until movement crosses the four-pixel drag threshold so an ordinary click remains targeted at the graph node and reaches the modal inspection handler. - Preserved pointer capture and click suppression for actual canvas drags. - Added an explicit hidden-state rule so rendered neighborhoods remove the empty-canvas instruction. - Kept the token-bound HTTP surface, graph data, and listener lifetime unchanged. - Released the compatible fix as DocForge 0.7.3. ### Verification - Focused interaction-contract checks distinguish click setup from drag pointer capture and cover empty-state hiding. - Embedded JavaScript syntax validation, Ruff, formatting, compilation, and the complete warning-strict 49-test DocForge suite pass. ### Limits - The listener remains owned by the MCP process and closes when that process exits. - Browser state remains client-local and is not persisted. ### Next gate No further gate is planned. Measure graph-browser use before adding history, comparison, or editing surfaces. ## DFG-12 modal node inspection ### Changed - Released the fixed `graph-browser@3` template with a native modal node inspector. - Made graph-node activation inspect full validated node metadata and content without replacing the current neighborhood or viewport. - Added mouse and keyboard activation plus Escape, explicit close controls, and backdrop dismissal. - Added a separate Explore neighborhood action for intentional graph recentering. - Kept the existing token-bound, read-only HTTP surface and exact-node endpoint unchanged. - Released the compatible change as DocForge 0.7.2. ### Verification - Focused HTTP interaction-contract checks cover the dialog, inspection handler, and explicit neighborhood action. - Embedded JavaScript syntax validation and the complete warning-strict DocForge suite pass. ### Limits - Dialog state is session-local and is not persisted in the URL. - Node content remains plain text and is not rendered as trusted HTML. - The right sidebar continues to describe the current root neighborhood. ### Next gate No further gate is planned. Measure graph-browser use before adding history, comparison, or editing surfaces. ## DFG-11 graph viewport navigation ### Changed - Released the fixed `graph-browser@2` template with pointer-centered mouse-wheel zoom. - Added left-button drag pan with pointer capture and a four-pixel movement threshold. - Preserved normal node activation by suppressing click navigation only after an actual drag. - Added keyboard-operable zoom-in, zoom-out, and reset buttons plus a live zoom percentage. - Reset the viewport whenever a new root neighborhood loads. - Kept all viewport behavior client-side without adding HTTP endpoints or project authority. - Released the compatible change as DocForge 0.7.1. ### Verification - Focused HTTP tests and embedded JavaScript syntax validation cover button zoom, reset, pointer-centered wheel zoom, left-drag pan, and preserved node-click handling. The current agent runtime did not expose its rendered browser automation connection, so no rendered interaction claim is made for this gate. - The complete warning-strict DocForge suite passes. ### Limits - Viewport position is session-local and is not persisted. - The radial layout itself remains deterministic and fixed. - A minimap, saved node positions, and alternate layouts remain outside the current contract. ### Next gate No further gate is planned. Measure dense-graph use before adding more navigation or layout features. ## DFG-10 project-bound graph visualization ### Changed - Added the fixed `docforge_visualize` MCP read tool to generic, read-only adapter, and proposal-enabled adapter servers. - Added the built-in `graph-browser@1` HTML/CSS/JavaScript template with project overview, family filtering, lexical search, exact node content, and bounded neighborhood traversal. - Bound the ephemeral HTTP listener to `127.0.0.1` on an operating-system-selected port. - Added an unguessable per-process URL token and rejected every non-token path. - Exposed only fixed `GET` and `HEAD` endpoints. Rejected POST, PUT, PATCH, and DELETE. - Validated the complete project and index once per MCP invocation, then served fast queries from the exact validated SQLite snapshot. - Rejected index replacement or alteration after launch and required reinvocation to refresh. - Accepted no project root, database path, SQL, template path, bind address, command, or renderer. - Released the capability as DocForge 0.7.0 without changing canonical-write policy. ### Verification - Protocol tests exercised the new tool through the official in-memory MCP transport. - HTTP tests proved token confinement, loopback binding, security headers, read-only methods, deterministic results, exact node retrieval, and snapshot invalidation. - Cross-project tests ran two simultaneous visualization servers and proved separate project data, ports, tokens, and indexes. - The complete warning-strict DocForge suite passed. - Ani-web proof loaded 3,289 nodes and 6,292 edges. After one full validation, the graph overview returned in approximately 0.30 seconds and a node neighborhood in approximately 0.03 seconds. ### Limits - The browser is a validated index snapshot, not a live canonical-file watcher. - It is reachable only from the machine running the MCP process. - It does not persist, publish, or externally host a visualization. - It does not infer relationships beyond the configured project's graph. ### Next gate No further gate is planned. Measure actual graph-browser use before adding layout modes, exports, remote access, or project-declared visualization templates. ## DFG-9 controlled application decision ### Decision - Retained manual canonical integration as the permanent DocForge 0.x policy. - Added no application command to the library, CLI, or MCP server. - Kept project builders, tests, Git, deployment, and publication under developer or project-owner control. - Required a new approved gate with measured multi-project evidence before canonical application can be reconsidered. ### Evidence - DFG-8 produced one real content-only AssetForge proposal and one manual chapter replacement. - Validation, conflicts, diffs, previews, and stale-source handling were already automated. - Manual integration completed without an error, lost work, or meaningful repeated cost. - Automating the remaining step would require canonical writers, developer authorization, atomic rollback, failure recovery, and project-format ownership that the current evidence does not justify. - Existing exact-surface MCP tests prohibit application tools, and proposal tests preserve canonical source bytes. ### Limits - DocForge does not apply, commit, push, build, deploy, or publish canonical changes. - Reopening the decision requires a separately approved, versioned contract and cannot add MCP canonical application. ### Next gate No further DFG gate is planned. Continue measured adoption through project-owned integrations. ## DFG-0 contract freeze and DFG-1 standalone read-only core ### Changed - Created the standalone DocForge repository and versioned the project, node, edge, result, and reserved changeset contracts. - Added one-root project descriptors with confined canonical, authority, cache, and index paths. - Added generic Markdown front matter and TOML node loading, stable IDs, typed relationships, authority classes, limits, deterministic ordering, dependency-cycle validation, and hashes. - Added atomic SQLite FTS5 indexes with project-root fingerprints, source revisions, logical row validation, stale rejection, and preservation of the previous index when rebuilds fail. - Added exact lookup, bounded search and filtering, backlinks, dependencies, impact traversal, and cited token-budgeted context compilation with explicit omissions. - Added deterministic JSON CLI commands for project information, validation, index operations, retrieval, traversal, and context compilation. - Added two unrelated generic fixtures. No Worldforge or AssetForge vocabulary entered the core. ### Verification - Ruff lint and format checks passed. - Python compilation passed. - All 13 unit and integration tests passed. - Tests covered root and symbolic-link escapes, unknown configuration, cache overlap, duplicate and broken graph state, dependency cycles, source-set changes, stale indexes, tampered rows, cross-project cache reuse, query-time source changes, deterministic retrieval, and bounded context. - Installed CLI proof built and checked a temporary project index, returned the expected search result, selected the required node and dependency, used 153 of 180 estimated tokens, and reported the omitted proof node. ### Limits - No MCP server exists yet. - No changeset or write operation exists. - No project adapter or renderer exists. - The token estimator is deliberately conservative and lexical; measured project adoption remains a later gate. ### Next gate DFG-2: expose only the proven read operations through a project-bound local stdio MCP server. ## DFG-2 project-bound read-only MCP server ### Changed - Pinned the official stable MCP Python SDK to the compatible `mcp>=1.28,<2` release line. - Added a local standard input/output server bound to one immutable project root at startup. - Exposed eleven read tools for project health, contract boundaries, exact lookup, search, metadata filtering, backlinks, dependencies, impact, bounded context, source validation, and render status. - Added project identity, root fingerprint, revision, source hash, adapter version, staleness, server version, and an untrusted-content warning to tool results. - Added structured domain failures for missing nodes, stale indexes, and oversized results without returning partial content. - Exposed no write, proposal, arbitrary file, shell, Git, build, deployment, publication, or project-switching operation. - Kept cache rebuilding as an explicit CLI integration action. MCP queries fail closed when the derived index is missing or stale. ### Verification - Ruff lint and format checks passed. - Python compilation passed. - All 19 core, CLI, and MCP tests passed with `ResourceWarning` treated as an error. - Protocol tests called all eleven tools through the official in-memory MCP transport. - A separate subprocess test initialized the server through real stdio transport and retrieved only its configured fixture project. - Tests proved the exact read-only tool surface, fixed project identity, structured missing and stale failures, output limits, explicit omissions, safe fallback when passive Git revision detection is unavailable, and the absence of canonical write tools. ### Limits - The server cannot create changesets or proposals yet. - The server cannot rebuild its own index. - Render status reports `not_configured` until DFG-4 defines renderer orchestration. - Worldforge and AssetForge adapters remain unopened. ### Next gate DFG-3: add isolated, hash-bound proposal changesets without canonical write authority. ## DFG-3 isolated changesets ### Changed - Added a confined changeset root and project-declared proposal writers with explicit family and operation permissions. - Bound proposal identity once at MCP server startup. Tools cannot select or impersonate a writer. - Added ordered, project-bound JSON changesets with canonical base revision and source hash, root fingerprint, creator, optimistic changeset hash, expected node hashes, rationales, and structured relationship changes. - Added create, update, same-format move, and delete proposals. Deletes require exact removal of every incident relationship; required profile nodes cannot be deleted. - Added deterministic projected graph validation and structured metadata, content, source, and relationship diffs without changing canonical files. - Added exact stale-base, stale-node, stale-changeset, ownership, family, operation, path, graph, source, size, and cross-proposal conflict failures. - Added process-safe file locking, atomic replacement, symbolic-link rejection, source confinement, configured limits, and rollback if canonical inputs change during proposal storage. - Added nine MCP proposal tools, including stale-safe proposal inspection and bounded listing. Canonical application, previews, arbitrary commands, Git mutation, builds, deployment, and publication remain absent. ### Verification - Focused core tests cover all four operation types, deterministic diffs, canonical immutability, simultaneous append serialization, overlapping changesets, stale identities, atomic failures, family permissions, ownership, target confinement, symbolic links, and configuration validation. - Protocol tests call all four mutation tools through the official in-memory MCP transport and prove fixed writer identity, isolated output, validation, deterministic diff retrieval, and the disabled mutation behavior of a server without a writer. - Ruff formatting and lint checks, Python compilation, all five JSON schema parses, and the locked dependency check passed. - All 29 core, CLI, changeset, concurrency, in-memory MCP, and real stdio tests passed with `ResourceWarning` treated as an error. ### Limits - Changesets are proposals only. DocForge does not apply them to canonical project files. - A changeset may operate on a node once; a later operation on the same node requires another changeset after external integration. - Moves preserve the canonical source format. Cross-format conversion belongs to a future adapter or explicit migration contract. - Preview generation and renderer orchestration remain unopened. ### Next gate DFG-4: add deterministic previews and confined renderer orchestration without canonical application. ## DFG-4 deterministic previews and renderer orchestration ### Changed - Added optional project-declared template, preview, view, and derived-output configuration with strict root confinement, overlap rejection, stable view IDs, and configured size limits. - Added an explicit renderer protocol backed by a closed built-in registry. Configuration cannot name commands, modules, executable paths, or undeclared renderers. - Added the `generic_html` renderer with pinned `markdown-it-py` CommonMark parsing, disabled raw HTML, fixed safe template tokens, deterministic node ordering, navigation, metadata, content, and relationship output. - Added render identities covering canonical and proposal inputs, node and edge identities, view configuration, template hash, renderer contract, and exact Markdown parser version. - Added atomic per-view CLI rendering, non-writing render status, and isolated changeset previews. Input changes detected before replacement preserve prior output. - Added `docforge_preview_changeset` to MCP and made `docforge_render_status` report configured view hashes and state. MCP cannot render declared project output or select a renderer or command. - Split shared configuration validation, render configuration, renderer contract, and orchestration into focused modules instead of expanding the project loader or MCP translation layer. ### Verification - Renderer tests prove repeatable identities and bytes, current and stale status, isolated previews, escaped raw HTML, CommonMark conversion, unchanged canonical and declared output, configured limits, symbolic-link rejection, and preservation of prior output after invalid or changing input. - Configuration tests reject command-like fields, unsupported renderer IDs, protected output paths, undeclared views, oversized templates and output, and unsafe symbolic links. - CLI tests cover declared render, render status, isolated preview, and structured unknown-view failure. Protocol tests exercise preview through the official in-memory MCP transport and prove declared output remains absent. - Ruff formatting and lint checks, Python compilation, all five JSON schema parses, and the locked dependency check passed. - All 35 core, CLI, changeset, concurrency, renderer, in-memory MCP, and real stdio tests passed with `ResourceWarning` treated as an error. ### Limits - The first built-in renderer emits one self-contained HTML file per view. Multi-file asset bundles and project-specific view models remain future adapter work. - Preview generation validates proposals but does not apply them to canonical documentation. - Declared project-output rendering is an explicit local CLI integration action, not an MCP tool. - Worldforge and unrelated-project adapters remain unopened. ### Next gate DFG-5: reproduce Worldforge semantics and generated output through a shadow-only adapter without changing the live workflow. ## DFG-5A Worldforge non-AssetForge shadow proof ### Changed - Added a reusable adapter contract with ordered project projections, adapter metadata, root and identity validation, a standard read-index bridge, and byte-exact artifact comparison. - Generalized the derived index boundary to accept any immutable project service without changing generic project loading, proposals, rendering, or MCP behavior. - Added a Worldforge-local shadow adapter that translates the existing normalized manual index into core nodes and edges while retaining acceptance and relationship provenance as adapter metadata. - Kept Worldforge-specific weighted search, backlink ordering, context profiles, and render-model composition in the Worldforge adapter. - Excluded the independently managed AssetForge family and combined manual output from this subgate. ### Verification - The shadow graph matched 522 nodes and 805 edges exactly and built through DocForge's standard disposable index. - Exact lookup, three weighted searches, active-development filtering, Phase 5 backlinks, and Phase 5 dependency traversal matched the current Worldforge index. - Active, Phase 3, and Phase 5 context packs were byte-repeatable. Active also matched the current derived context cache. - All 31 generated outputs that do not require AssetForge matched committed bytes. The proof wrote only temporary derived files and removed them afterward. - DocForge adapter-contract tests cover standard index use, graph and metadata rejection, identity changes, cache confinement, and complete byte-exact artifact comparison. ### Limits - The remaining 10 AssetForge nodes, 25 incident edges, AssetForge context profile, and combined `manual/manual.html` output are not read or rebuilt by this proof. - The shadow adapter is an explicit local command. It is not discoverable or executable through the normal MCP server. ### Next gate DFG-5B: complete the full-family shadow proof when AssetForge is explicitly authorized. ## DFG-5B Worldforge full-family shadow completion ### Changed - Expanded the Worldforge-local adapter from the partial proof to all source families, including the ten AssetForge nodes and their 25 incident edges. - Added a Worldforge-owned AssetForge context profile with deterministic source ordering, stable node and source citations, a hard token budget, and explicit omission records. - Routed the shadow render comparison through the complete Worldforge builder output inventory, including the combined `manual/manual.html` output. - Released the adapter boundary as DocForge 0.4.0. Worldforge-specific context, query, and render policy remains outside the generic core. ### Verification - The shadow graph matched all 532 nodes and 830 edges exactly through DocForge's standard disposable index. - Exact lookup, five weighted searches, development and AssetForge filters, backlinks, and phase and AssetForge dependency traversal matched the current Worldforge index. - Active, Phase 3, Phase 5, and AssetForge contexts were byte-repeatable. Active matched the current cache; AssetForge included all ten nodes under the normal budget. - A reduced AssetForge budget retained the required root, stayed within budget, and recorded omissions. An invalid budget failed before producing a context. - All 32 generated outputs matched committed bytes. The proof wrote only temporary derived files and removed them afterward. ### Limits - The adapter remains an explicit local shadow command and is not loaded by the normal MCP server. - Canonical application and public deployment remain outside DocForge. - Reuse outside Worldforge is not yet proven. ### Next gate DFG-6: prove the generic core with an unrelated project and simultaneous project-isolated servers. ## DFG-6 unrelated-project proof ### Changed - Added an Awesome Ski Game fixture using the generic project descriptor, five unrelated node families, six relationships, a bounded `ride-day` context, one proposal writer, and one declared field-guide view. - Added an end-to-end proof covering generic loading, indexing, exact graph counts, search, filters, dependency traversal, deterministic bounded context, isolated updates, validation, diffs, and escaped preview rendering. - Added a source guard that rejects Worldforge, AssetForge, phase, or villager vocabulary in the generic core. - Added a live isolation proof with two simultaneous MCP server subprocesses bound to Awesome Ski Game and Alpha Documentation. ### Verification - Awesome Ski Game loaded through `adapter = "generic"` with five nodes, six edges, and trail, riding, safety, session, and proof families. - The 300-token context retained its required session node, stayed within budget, recorded omissions, and reproduced exactly. - The proposal changed only its isolated changeset and preview. Canonical sources and declared output remained unchanged, and raw HTML was escaped. - Both live servers returned their own project identity and nodes, rejected the other project's stable IDs, and wrote same-named changesets and previews only under their bound roots. - The complete DocForge suite passes with warnings treated as errors. ### Limits - This proof does not adopt DocForge inside Worldforge or enable any canonical write path. - The Worldforge adapter and generic Awesome Ski Game fixture remain separate ownership paths. - HTTP transport, accounts, and web administration remain unopened. ### Next gate DFG-7: adopt project-bound DocForge retrieval for real Worldforge read-only tasks with measured quality and a documented rollback path. ## DFG-7 Worldforge read-only adoption ### Changed - Added an explicit adapter-backed read-only MCP constructor that accepts one validated project service and an optional project-owned context provider. - Kept adapter discovery, session selection, family partitioning, and project context policy outside the generic core. - Added Worldforge-owned descriptors and separate Worldforge and AssetForge sessions with disjoint derived indexes and the exact fixed read tool surface. - Added durable retrieval, context-size, omission, latency, stale-state, and rollback evidence. - Released the adapter-backed read-only boundary as DocForge 0.5.0. ### Verification - Eight real Worldforge and AssetForge retrieval tasks retained every required node in the first five results; seven matched the current manual index result set exactly. - Active and Phase 5 contexts reduced the full structured Worldforge session by 97.3% and 98.2%. Tight budgets reported every omitted candidate. - Two simultaneous MCP processes retained separate identities, exposed only read tools, rejected cross-family node access, and kept Worldforge stale-state failure isolated from AssetForge. - Checked DocForge search measured 84.4 ms median in the adoption run versus 18.8 ms for the current manual index. The additional validation cost remained below 0.1 seconds. - The DocForge suite, Worldforge manual suite, integration tests, shadow proof, format, lint, and generated-output checks passed. ### Limits - DocForge read-only operations do not write canonical Worldforge files or replace its builder. - Adapter-backed read-only service construction is explicit; the generic server does not discover project adapters or sessions. - AssetForge proposal access, canonical application, publication, and deployment remain closed. ### Next gate DFG-8: adopt isolated AssetForge-only proposals with explicit review and the canonical Worldforge build and verification workflow. ## DFG-8 AssetForge proposal adoption ### Changed - Added confined adapter proposal settings for canonical sources, writer permissions, changesets, templates, previews, and declared review output. - Added a project-owned proposal-validation hook while retaining generic hash, permission, graph, conflict, atomic-storage, diff, and preview enforcement in the core. - Moved generic Markdown and TOML source-layout validation behind the generic project owner so an adapter can enforce its own canonical format without weakening graph validation. - Added an explicit full-surface server constructor for one configured project service and one startup-bound writer. - Marked base, content, source, adapter-source, and index conflicts as stale tool results. - Released the proposal-enabled adapter boundary as DocForge 0.6.0. ### Verification - OpenClaw was bound to the AssetForge-only session and update-only permission. - One real proposal updated an existing AssetForge chapter, validated, produced a structured diff, and rendered an isolated escaped preview before manual integration. - The Worldforge canonical builder and manual index rebuilt after review. The original changeset then failed with `base_conflict` against the new canonical source hash. - Live tests rejected create, metadata, root-manifest, relationship, and cross-family access; rejected an overlapping changeset; escaped raw HTML; preserved canonical bytes; and rejected stale canonical sources. - The complete DocForge and Worldforge manual suites, shadow proof, generated-output check, format, and lint passed. ### Limits - DFG-8 permits content-only updates to existing AssetForge chapters. Create, move, delete, metadata, relationship, and manifest changes remain closed. - DocForge does not apply canonical changes, run the Worldforge builder, use Git, deploy, or publish. - A developer must review and manually integrate accepted prose. ### Next gate DFG-9: decide from evidence whether a narrowly scoped developer-only application command is justified or manual integration should remain permanent.