1
0
Fork 0
Code Issues Pull requests Projects Releases 2 Packages Wiki Activity Actions Pages
DocForge2/docs/CANONICAL_APPLICATION.md

41 lines
1.8 KiB
Markdown
Raw Normal View History

# Canonical application
2026-07-22 12:06:04 -04:00
DocForge may apply one isolated changeset to canonical project sources through an explicit,
project-bound canonical applier. Application is available through both CLI and MCP. It is never an
implicit consequence of validation, diffing, previewing, or rendering.
2026-07-22 12:06:04 -04:00
The generic adapter owns a deterministic Markdown/TOML serializer. Custom adapters must provide a
project-owned `CanonicalApplier`. Core DocForge does not guess how adapter nodes map back to source
files.
2026-07-22 12:06:04 -04:00
## Authorization
2026-07-22 12:06:04 -04:00
- CLI requires `apply CHANGESET_ID --changeset-hash SHA256 --applier WRITER_ID`.
- MCP registers `docforge_apply_changeset` only when the server starts with an explicit canonical
applier identity and compatible applier implementation.
- The changeset creator and applier identity must match a configured proposal writer.
- The exact final changeset hash is required. Any proposal mutation invalidates an earlier
approval.
2026-07-22 12:06:04 -04:00
## Application boundary
2026-07-22 12:06:04 -04:00
Application revalidates the canonical base, node hashes, graph, permissions, conflicts, target
paths, and projection. Generic writes are staged, confined to declared content roots, and rolled
back if the result does not reproduce the approved projection. Successful application rebuilds and
checks the derived index and regenerates declared render views.
2026-07-22 12:06:04 -04:00
Application does not run project commands, tests, shell operations, Git, deployment, publication,
or arbitrary renderers. Those remain with the owning project workflow.
2026-07-22 12:06:04 -04:00
## Safety contract
2026-07-22 12:06:04 -04:00
The application boundary requires:
2026-07-22 12:06:04 -04:00
- exact changeset-hash approval;
- startup-bound applier identity;
- project-owned serializers for custom adapters;
- canonical path and symbolic-link confinement;
- rollback and semantic round-trip verification;
- deterministic derived-state refresh; and
- complete separation from Git, builds, deployment, and publication.