The DITA Package Processor is a deterministic toolchain for inspecting DITA packages, normalizing them into planning contracts, generating execution plans, and applying those plans through bounded executors.
It is organized around explicit stages:
discover -> normalize -> plan -> execute
The run command orchestrates those stages for the common case. Dry-run is the default. Real filesystem mutation only happens when --apply is set.
- Discovery of maps, topics, media, relationships, and classification evidence
- Contract normalization from discovery output into
PlanningInput - Deterministic plan generation with schema validation
- Dry-run and filesystem-backed execution modes
- Materialization preflight and execution report emission
- Plugin-based extension points for discovery patterns, planning action emission, and execution handlers
From the repository root:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -e .The package requires Python 3.10+.
Run the full pipeline safely:
python3 -m dita_package_processor run \
--package /path/to/package \
--docx-stem OutputDocApply changes explicitly:
python3 -m dita_package_processor run \
--package /path/to/package \
--docx-stem OutputDoc \
--target ./build \
--apply \
--report ./build/execution-report.jsonExecute an existing plan directly:
python3 -m dita_package_processor execute \
--plan ./plan.json \
--source-root /path/to/package \
--output ./build \
--applyCurrent top-level commands:
discovernormalizeplanexecuterunplugindocscompletion
The plugin command group provides:
plugin listplugin info <name>plugin validate <path>
See README-CLI.md for command details.
Plugins are now the supported extension surface.
Each plugin can contribute:
- discovery
Patterndefinitions - planning-time
emit_actions(...)logic - execution handler classes
The built-in behavior is packaged as CorePlugin, and third-party plugins are loaded through the Python entry point group dita_package_processor.plugins.
Project docs live under docs/ and are wired through mkdocs.yml.
Important entry points:
docs/index.mddocs/getting-started.mddocs/extensions.mddocs/extensions-guide.mddocs/api-ref-cli.mddocs/api-ref-plugins.md
Run the test suite:
pytest -qUseful repo utilities:
tools/scaffold_plugin.pyto scaffold a plugin packagetools/generate_schema_docs.pyto refresh schema reference docstools/generate_pattern_docs.pyto refresh pattern reference docs
- Discovery is read-only.
- Planning does not mutate files.
- Execution is explicit and bounded to declared roots.
- Plans and reports are the contract, not log output.
- Ambiguity should fail loudly rather than being guessed through.