topmark.core package index¶
topmark / core
Core, UI-agnostic primitives shared across TopMark.
The topmark.core package provides small, reusable building
blocks that are safe to import from anywhere in the codebase without pulling in
CLI, presentation, pipeline execution, or public API command concerns.
Included modules:
-
constantsPackage metadata, marker strings, registry token patterns, resource names, and newline definitions shared across the project. -
outcomesStable outcome enum values, deterministic outcome ordering, and fallback reason text shared by API DTOs, pipeline classifiers, and presentation code. -
errorsCore exception types used to classify configuration, TOML, registry, processing, and runtime failures. -
exit_codesCentralized exit codes for the CLI and runtime, aligned with BSD-stylesysexitswhere practical, with a dedicatedWOULD_CHANGEcode for dry-run mode. -
enum_mixinsTyping-friendly enum utilities and mixins for introspection and parsing. -
machineShared machine-output envelopes, payload contracts, and schemas used by higher-level serializers. -
presentationMinimal semantic presentation primitives that remain independent of concrete text, Markdown, or CLI renderers. -
typing_guardsNarrow runtime type guards used to keep public and internal parsing code precise under strict type checking.
Design goals:
- Keep this package free of UI dependencies and side effects.
- Avoid imports from CLI commands, presentation renderers, pipeline steps, or public API command helpers.
- Prefer small, well-typed helpers over framework-specific utilities.
- Maintain stable internal contracts that higher-level layers can rely on.
Immediate children in this package¶
- topmark.core.constants
- Core constants and package metadata used across TopMark.
- topmark.core.enum_mixins
- Generic Enum utilities for TopMark (typing-friendly, UI-agnostic).
- topmark.core.errors
- Core TopMark exceptions.
- topmark.core.exit_codes
- Exit codes for the TopMark runtime and CLI.
- topmark.core.formats
- Shared output format definitions used across TopMark frontends.
- topmark.core.keys
- Shared canonical argument keys.
- topmark.core.logging
- Custom TopMark logging with TRACE logging.
- topmark.core.machine
- Core machine-readable output infrastructure.
- topmark.core.merge
- Merge and extraction helpers for TopMark configuration.
- topmark.core.outcomes
- Stable outcome primitives shared by API, pipeline, and presentation layers.
- topmark.core.presentation
- Semantic presentation primitives for human-facing rendering.
- topmark.core.typing_guards
- Generic type guards and normalization helpers for TopMark.