Refresh current documentation

This commit is contained in:
2026-06-01 21:48:05 +00:00
parent f2f3bdf784
commit c8b22d13a2
3 changed files with 32 additions and 16 deletions

View File

@@ -92,7 +92,8 @@ Each published destination bundle contains `.distributor.json`. This file is the
- publication timestamp; - publication timestamp;
- source manifest used for publication; - source manifest used for publication;
- copied source output metadata; - copied source output metadata;
- generated output metadata. - generated output metadata;
- optional public URL metadata when destination links are configured.
`manifest.json` from the source bundle is not copied as destination state. `manifest.json` from the source bundle is not copied as destination state.

View File

@@ -22,19 +22,21 @@ The current core workflow is:
2. open the source backend; 2. open the source backend;
3. discover source bundles beneath the source root; 3. discover source bundles beneath the source root;
4. validate each source bundle and its `manifest.json`; 4. validate each source bundle and its `manifest.json`;
5. for each configured destination, inspect destination state; 5. select the source bundle or bundles for each destination according to that destination's path mapping policy;
6. compare source state to destination state; 6. open each destination backend independently;
7. build a publish plan; 7. inspect destination state at the resolved destination bundle path;
8. optionally transform Markdown to HTML for that destination; 8. compare source state to destination state;
9. publish selected source and generated artifacts; 9. build a publish plan that selects source files, generated files, destination paths, and optional public URLs;
10. write `.distributor.json` as the destination sentinel/state file; 10. optionally transform Markdown to HTML for that destination;
11. run the notification hook, whose default implementation is currently a no-op. 11. publish selected source and generated artifacts;
12. write `.distributor.json` as the destination sentinel/state file;
13. run the notification hook, whose default implementation is currently a no-op.
## Pipeline Model ## Pipeline Model
A pipeline has exactly one source and one or more destinations. A pipeline has exactly one source and one or more destinations.
The source is discovered and validated once. Each destination has independent backend configuration, publication policy, transform policy, replacement behavior, state, and notification behavior. The source is discovered and validated once. Each destination has independent backend configuration, path mapping, publication policy, transform policy, public link policy, replacement behavior, state, and notification behavior.
The pipeline model is fan-out by design: The pipeline model is fan-out by design:
@@ -101,6 +103,7 @@ Each destination bundle path is managed by `.distributor.json`. This file is bot
- the normalized source manifest used for publication; - the normalized source manifest used for publication;
- metadata for copied source outputs; - metadata for copied source outputs;
- metadata for generated outputs, such as HTML files; - metadata for generated outputs, such as HTML files;
- optional URL metadata for published outputs;
- any additional metadata required by `distributor`. - any additional metadata required by `distributor`.
A representative destination state file is: A representative destination state file is:
@@ -127,14 +130,18 @@ A representative destination state file is:
] ]
} }
}, },
"links": {
"primary_url": "https://reports.example.com/weather-daily/"
},
"outputs": [ "outputs": [
{ {
"path": "report.html", "path": "index.html",
"kind": "generated", "kind": "generated",
"source_path": "report.md", "source_path": "report.md",
"transform": "markdown_to_html", "transform": "markdown_to_html",
"sha256": "sha256:...", "sha256": "sha256:...",
"size": 23456 "size": 23456,
"url": "https://reports.example.com/weather-daily/"
} }
] ]
} }
@@ -157,6 +164,8 @@ Transforms are configured per destination. A destination may receive source file
The MVP supports only Markdown-to-HTML transformation. HTML generation must not mutate the source bundle. Generated outputs must be deterministic from the source bundle and destination transform configuration, and must be recorded in `.distributor.json`. The MVP supports only Markdown-to-HTML transformation. HTML generation must not mutate the source bundle. Generated outputs must be deterministic from the source bundle and destination transform configuration, and must be recorded in `.distributor.json`.
Destination path mapping and public link generation are destination behavior. Source manifests do not declare where a bundle is published or which public URLs are recorded.
The application should distinguish: The application should distinguish:
- transform policy: how derived files are generated; - transform policy: how derived files are generated;
@@ -229,17 +238,20 @@ Pipeline configuration should express:
- pipeline id; - pipeline id;
- one source backend; - one source backend;
- one or more destinations; - one or more destinations;
- per-destination path mapping;
- per-destination publish policy; - per-destination publish policy;
- per-destination transform policy; - per-destination transform policy;
- per-destination public link policy;
- validation behavior; - validation behavior;
- destination conflict/replacement behavior. - destination conflict/replacement behavior.
## Modules, Stages, and Registries ## Modules and Registries
Each major stage should have an explicit input/output contract: Each major workflow step should have an explicit input/output contract:
- source discovery; - source discovery;
- source validation; - source validation;
- destination bundle selection;
- destination state inspection; - destination state inspection;
- destination comparison; - destination comparison;
- transform planning/execution; - transform planning/execution;
@@ -298,8 +310,10 @@ Important tests include:
- relative path safety and path traversal rejection; - relative path safety and path traversal rejection;
- destination `.distributor.json` parsing and comparison; - destination `.distributor.json` parsing and comparison;
- same/older/newer/conflict publish decisions; - same/older/newer/conflict publish decisions;
- destination bundle path mapping;
- destructive replacement safety checks; - destructive replacement safety checks;
- transform output planning and metadata recording; - transform output planning and metadata recording;
- public URL planning and state metadata;
- dry-run output; - dry-run output;
- local backend behavior with temporary directories; - local backend behavior with temporary directories;
- fake backend behavior for storage-facing core logic. - fake backend behavior for storage-facing core logic.

View File

@@ -25,9 +25,10 @@ Use it with `docs/policy/architecture.md` and `docs/policy/documentation.md`.
- `docs`: current user, operator, policy, internal, and roadmap documentation. - `docs`: current user, operator, policy, internal, and roadmap documentation.
- `examples`: copyable example configs and source bundles. - `examples`: copyable example configs and source bundles.
Do not create new top-level package families such as public `pkg/...` packages beyond `pkg/bundle`, `internal/stage`, Do not create new top-level package families such as public `pkg/...` packages
`internal/modules`, or service-specific adapter directories unless the beyond `pkg/bundle`, generic workflow containers, or service-specific adapter
architecture policy or a current roadmap explicitly calls for them. directories unless the architecture policy or a current roadmap explicitly
calls for them.
## Common Commands ## Common Commands