Refresh current documentation
This commit is contained in:
@@ -92,7 +92,8 @@ Each published destination bundle contains `.distributor.json`. This file is the
|
||||
- publication timestamp;
|
||||
- source manifest used for publication;
|
||||
- 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.
|
||||
|
||||
|
||||
@@ -22,19 +22,21 @@ The current core workflow is:
|
||||
2. open the source backend;
|
||||
3. discover source bundles beneath the source root;
|
||||
4. validate each source bundle and its `manifest.json`;
|
||||
5. for each configured destination, inspect destination state;
|
||||
6. compare source state to destination state;
|
||||
7. build a publish plan;
|
||||
8. optionally transform Markdown to HTML for that destination;
|
||||
9. publish selected source and generated artifacts;
|
||||
10. write `.distributor.json` as the destination sentinel/state file;
|
||||
11. run the notification hook, whose default implementation is currently a no-op.
|
||||
5. select the source bundle or bundles for each destination according to that destination's path mapping policy;
|
||||
6. open each destination backend independently;
|
||||
7. inspect destination state at the resolved destination bundle path;
|
||||
8. compare source state to destination state;
|
||||
9. build a publish plan that selects source files, generated files, destination paths, and optional public URLs;
|
||||
10. optionally transform Markdown to HTML for that destination;
|
||||
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
|
||||
|
||||
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:
|
||||
|
||||
@@ -101,6 +103,7 @@ Each destination bundle path is managed by `.distributor.json`. This file is bot
|
||||
- the normalized source manifest used for publication;
|
||||
- metadata for copied source outputs;
|
||||
- metadata for generated outputs, such as HTML files;
|
||||
- optional URL metadata for published outputs;
|
||||
- any additional metadata required by `distributor`.
|
||||
|
||||
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": [
|
||||
{
|
||||
"path": "report.html",
|
||||
"path": "index.html",
|
||||
"kind": "generated",
|
||||
"source_path": "report.md",
|
||||
"transform": "markdown_to_html",
|
||||
"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`.
|
||||
|
||||
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:
|
||||
|
||||
- transform policy: how derived files are generated;
|
||||
@@ -229,17 +238,20 @@ Pipeline configuration should express:
|
||||
- pipeline id;
|
||||
- one source backend;
|
||||
- one or more destinations;
|
||||
- per-destination path mapping;
|
||||
- per-destination publish policy;
|
||||
- per-destination transform policy;
|
||||
- per-destination public link policy;
|
||||
- validation 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 validation;
|
||||
- destination bundle selection;
|
||||
- destination state inspection;
|
||||
- destination comparison;
|
||||
- transform planning/execution;
|
||||
@@ -298,8 +310,10 @@ Important tests include:
|
||||
- relative path safety and path traversal rejection;
|
||||
- destination `.distributor.json` parsing and comparison;
|
||||
- same/older/newer/conflict publish decisions;
|
||||
- destination bundle path mapping;
|
||||
- destructive replacement safety checks;
|
||||
- transform output planning and metadata recording;
|
||||
- public URL planning and state metadata;
|
||||
- dry-run output;
|
||||
- local backend behavior with temporary directories;
|
||||
- fake backend behavior for storage-facing core logic.
|
||||
|
||||
@@ -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.
|
||||
- `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`,
|
||||
`internal/modules`, or service-specific adapter directories unless the
|
||||
architecture policy or a current roadmap explicitly calls for them.
|
||||
Do not create new top-level package families such as public `pkg/...` packages
|
||||
beyond `pkg/bundle`, generic workflow containers, or service-specific adapter
|
||||
directories unless the architecture policy or a current roadmap explicitly
|
||||
calls for them.
|
||||
|
||||
## Common Commands
|
||||
|
||||
|
||||
Reference in New Issue
Block a user