Expand description
Automated remediation and migrations for OKF concepts, bundles, and logs.
Continuous authoring by agents and humans naturally introduces hygiene issues
or leaves documents in older specification versions (such as v0.1 timestamp
and body # Citations). This module provides deterministic, safe, automated
remediation and migration transformations:
- Frontmatter key ordering (
L18): Normalizes frontmatter keys to the canonicalPREFERRED_KEY_ORDER. - v0.1
timestampmigration (L5): Migrates legacytimestampinto a structuredgenerated: { by, at }block (or removes redundant timestamp). - v0.1
# Citationsmigration (L6): Converts legacy body citations to frontmattersourcesentries and turns inline references into footnotes. - Missing title (
L1): Derives and inserts human-readabletitlefrom filename stem. - Missing generated (
L3): Insertsgenerated: { by, at }attribution. - Missing top heading (
L8): Prepends# <title>heading to document body. - Computation syntax tagging (
L26): Adds language syntax tag to# Computationcode blocks. - Duplicate log dates (
L27): Consolidates duplicate## YYYY-MM-DDheadings inlog.md. - Index sync (
L16): Re-indexes all bundle directories.
Structs§
- Bundle
FixReport - Remediation report for a whole bundle.
- File
FixReport - Remediation report for a single file.
- FixOptions
- Options controlling automated remediation and migration.
- Remediation
- A single remediation action applied to a document or file.
Enums§
- Remediation
Kind - What kind of remediation or migration was applied.
Functions§
- remediate_
bundle - Remediates an entire bundle directory tree.
- remediate_
document - Remediates and migrates a single
Document. - remediate_
file - Remediates a single file on disk.
- remediate_
log - Remediates a parsed
log.mdfile (consolidating duplicate date headings).