13 KiB
Implementation Roadmap
This roadmap records current implementation status and deferred work for
distributor. Implemented behavior is documented in the user, operator, and
internal documentation listed below.
Canonical current-behavior docs:
README.mddocs/cli.mddocs/config.mddocs/operations.mddocs/troubleshooting.mddocs/internal/docs/integrations/markdown.mddocs/policy/examples/
Future, planned, or aspirational behavior belongs under docs/roadmap/ until
it is implemented.
Current State
distributor is ready for routine use against producer pipelines using the
implemented local, SSH/SFTP, and S3-compatible backends.
Active Roadmap
The active roadmap implements the focused feature roadmaps in an order intended to minimize later rewrites. The sequence establishes shared CLI output before new CLI commands, establishes producer bundle APIs before manifest creation, and implements destination path mapping before link generation so URL construction does not need to be reworked later.
Each stage is sized for one implementation prompt. Future behavior stays under
docs/roadmap/ until the stage is implemented and current-behavior docs are
updated.
Stage 1: CLI Output Policy
Goal: implement the shared CLI output contract in
docs/roadmap/cli_output_policy.md.
Implementation scope:
- add per-command
--format text|jsonto current output-producing commands:version,validate,inspect, andrun; - keep
textas the default and preserve existing text output unless the policy explicitly requires a change; - implement the shared JSON envelope, warnings array, fatal setup error
behavior, and
runpartial-result JSON withok: false; - keep help and usage output text-only.
Documentation updates after implementation:
- update
docs/cli.mdwith the shared--format text|jsonpolicy; - update
docs/operations.mdwhere JSON output materially improves automation workflows; - update
docs/troubleshooting.mdonly for implemented JSON-mode recovery behavior.
Tests:
- CLI parsing accepts
--format textand--format json; - invalid
--formatvalues are usage errors; - each JSON-capable command emits exactly one valid JSON document on success;
- JSON-mode warnings appear in
warningsand are not duplicated to stderr; - fatal setup errors write no JSON stdout and return non-zero;
run --format jsonemits partial-result JSON and exits non-zero when destination failures occur after planning begins.
Completion criteria: all current output-producing commands support the shared
policy, text output remains backward compatible, and go test ./... passes.
Stage 2: Public Bundle Package Core
Goal: implement the core and manifest-building parts of
docs/roadmap/public_bundle_package.md.
Implementation scope:
- introduce
pkg/bundlewith the public source manifest model, schema version, digest logic, parsing, validation, explicit file-list building, scan-based building, and zero-Createddefaulting to current UTC; - implement the locked Stage 2 exported API symbols defined in
docs/roadmap/public_bundle_package.md; - update internal validation to consume the shared implementation without behavior drift;
- keep destination state, publish planning, storage backends, transforms, notifications, and config internal.
Documentation updates after implementation:
- add package documentation for
pkg/bundle; - update
README.mdanddocs/operations.mdonly for implemented Go producer support; - update
docs/internal/bundle.mdif internal ownership changes.
Tests:
- public package tests cover explicit lists, scan mode, ordering, digest
calculation, parsing, validation, unsafe paths, symlinks, and zero
Created; - internal bundle tests continue to pass against the shared implementation;
- public examples compile where practical.
Completion criteria: public and internal validation use one manifest contract, and tests prove identical semantics.
Stage 3: Public Bundle Local Writer
Goal: implement the local bundle writer portion of
docs/roadmap/public_bundle_package.md.
Implementation scope:
- add producer-side local bundle writing with staging, atomic filesystem operations where practical, and best-effort restore on overwrite failure;
- implement the locked Stage 3 exported API symbols defined in
docs/roadmap/public_bundle_package.md; - keep the writer filesystem-local and producer-focused;
- do not expose distributor storage backends or publication behavior through the public package.
Documentation updates after implementation:
- document the writer API in
pkg/bundle; - update producer workflow docs only for implemented behavior.
Tests:
- writer creates a complete valid local bundle through staged promotion;
- writer output validates through distributor's normal validation path;
- overwrite and failure behavior avoid leaving a completed bundle path without a valid manifest where practical.
Completion criteria: producers can create complete valid local bundles through the public API without hand-writing manifest files.
Stage 4: Manifest Create CLI
Goal: implement docs/roadmap/manifest_create.md.
Implementation scope:
- add
distributor manifest createoverpkg/bundle; - support explicit-first
--fileselection, recursive scan fallback,--overwrite, optional--created, and shared--format text|json; - use temp-and-rename replacement for
manifest.jsonwhere practical; - do not duplicate bundle contract logic in CLI or app code.
Documentation updates after implementation:
- update
docs/cli.mdwith command syntax, flags, output, and examples; - update
docs/operations.mdwith a producer workflow; - cross-reference
pkg/bundlefor Go producers.
Tests:
- command creates valid manifests for explicit and scanned files;
- ordering, dotfile inclusion, metadata exclusion, symlink rejection, and overwrite behavior match the roadmap;
- text and JSON output follow the shared CLI output policy.
Completion criteria: the command writes valid manifest.json, supports
text/JSON output, and generated manifests validate through distributor.
Stage 5: Remote Validate and Inspect
Goal: implement docs/roadmap/remote_validate_inspect.md.
Implementation scope:
- extend
validateandinspectwith mutually exclusive local-path and--config --pipelinemodes; - reuse
runsource backend construction and secrets resolution; - support configured local, SSH, and S3 sources;
- preserve
--pipelineas required in config mode; - keep the commands source-only and do not open destinations.
Documentation updates after implementation:
- update
docs/cli.mdwith local and config-driven syntax; - update
docs/operations.mdwith remote validation examples; - update
docs/troubleshooting.mdfor common configured-source failures.
Tests:
- existing local behavior remains unchanged;
- config-mode validation and inspection work for local and fake/app-level source backends;
- SSH and S3 behavior is covered by focused unit tests and existing opt-in integration patterns;
- JSON output follows the shared CLI output policy.
Completion criteria: local behavior is stable, configured local/SSH/S3 sources can be validated and inspected, and no destination backend is opened.
Stage 6: HTML Index Mode
Goal: implement docs/roadmap/html_index_mode.md.
Implementation scope:
- add
markdown_to_html.mode: indexwith fixedindex.htmloutput; - keep
sidecaras the default and existing explicit mode; - implement deterministic input selection through explicit input or exactly one manifest-listed Markdown file;
- reject enabled Markdown-to-HTML transform config when
publish.htmlis false; - record generated state metadata with
transform: markdown_to_html.
Documentation updates after implementation:
- update
docs/config.mdwith Markdown-to-HTML modes and input selection; - update
docs/integrations/markdown.md; - update
docs/operations.mdwith an implemented static-site example where useful.
Tests:
- sidecar behavior remains unchanged;
- index mode handles explicit input, single Markdown fallback, ambiguous input, unsafe input, state metadata, dry-run, source-only publication, and output collisions.
Completion criteria: source publication, sidecar mode, index mode, state metadata, dry-run, and collision behavior are all covered.
Stage 7: Latest Path Destinations
Goal: implement docs/roadmap/latest_paths.md.
Implementation scope:
- add destination-level
path_mapping.modewith defaultpreserve_relativeand newfixed; - make destination bundle path mapping destination-local;
- for fixed destinations, select only the newest discovered bundle per destination before planning writes;
- add fixed-path dry-run warnings and summary counts;
- allow
--forcefor fixed backend roots while keeping deletion bounded to the configured backend root.
Documentation updates after implementation:
- update
docs/config.mdwithpath_mapping; - update
docs/operations.mdwith archive-plus-latest fan-out examples; - update
docs/cli.mdif dry-run output gains fixed-path indicators.
Tests:
- omitted and explicit
preserve_relativematch existing behavior; - fixed destinations publish at local, SSH, and S3 backend roots;
- newest-only selection is deterministic;
- older discovered bundles are not planned or written to fixed destinations;
- dry-run reports candidate count, selected bundle, and destructive replacement warnings;
- force remains bounded at the backend root.
Completion criteria: fixed destination roots work across implemented backends, archive-style destinations remain unchanged, and destructive behavior is clear in dry-run output.
Stage 8: Link Generation Support
Goal: implement docs/roadmap/link_generation.md.
Implementation scope:
- add destination-level
links.base_urlandlinks.primary; - generate per-output and primary URLs using URL semantics, not filesystem or storage joins;
- handle
index.htmlas a directory-style URL; - store optional URL metadata under destination state schema version 1 while pre-release;
- expose links through JSON command output only where supported by the CLI output policy.
Documentation updates after implementation:
- update
docs/config.mdwith destinationlinksfields; - update
docs/operations.mdwith static-site URL examples; - update
docs/internal/state.mdfor URL metadata; - update
docs/cli.mdonly for implemented CLI link output.
Tests:
- config validation accepts valid links and rejects invalid schemes, query strings, and fragments;
- nested bundle paths and fixed latest paths generate correct URLs;
index.htmlomits the filename;- primary selection is deterministic;
- destinations without
linksproduce no URL metadata.
Completion criteria: URL generation respects archive and fixed path mapping, state records optional URL metadata when configured, and unconfigured destinations remain unchanged.
Stage 9: Roadmap Closeout
Goal: remove completed roadmap drift after Stages 1-8 are implemented.
Implementation scope:
- remove or rewrite completed roadmap files whose behavior is fully documented in current docs;
- ensure current docs describe implemented behavior;
- keep
docs/roadmap/focused only on remaining future work.
Documentation updates after implementation:
- update
README.md,docs/cli.md,docs/config.md,docs/operations.md,docs/troubleshooting.md,docs/internal/,docs/integrations/markdown.md, and examples only where implemented behavior requires it.
Tests:
- run documentation consistency searches for completed-feature language that still appears only as future work;
- run focused tests for any examples or docs backed by tests;
- run
go test ./...if behavior docs and examples changed with code.
Completion criteria: completed features are documented as current behavior, and
docs/roadmap/ contains only future or deferred work.
Deferred Work
These items are not implemented and should stay out of current-behavior docs until a roadmap entry is selected and implemented:
- external notification adapters;
- warning-only digest mismatch handling;
- additional auth mechanisms beyond the implemented SSH and S3 credential paths;
- compatibility parsing for legacy SSH URI config;
- broad recursive destination deletion outside managed bundle paths;
- concurrent fan-out publishing;
- streaming, resumable, or multipart S3 uploads;
- cloud-provider-specific IAM integration docs;
- repository-managed packaging, release, and deployment automation.
Roadmap Maintenance
When adding future roadmap work:
- describe user-visible behavior and safety boundaries;
- define which existing docs must change after implementation;
- keep examples secret-free and runnable or clearly environment-gated;
- avoid workflow labels in production code, tests, config fields, and user documentation;
- run focused tests for the changed behavior and
go test ./...for cross-package changes.