Description
Therefactor_okf.py tool processes files across the repository, strips leading UTF-8 Byte Order Marks (BOM), and enforces proper ordering of YAML variables (such as placing topics immediately after description in skill schemas).
Script path
tools/refactor_okf.py
CLI signature
Internal Python API
This script imports logic fromtools/apply_okf_frontmatter.py to preserve consistency:
FRONTMATTER_RE: Pattern identifying Markdown fences.process_file(filepath, root_dir, dry_run): Main orchestrator implementing parsing, normalisation, and atomic replacement.
Excluded directories
The tool ignores these directories to prevent unnecessary modifications:.gitnode_modules.pytest_cache.venv
Deep State of Mind (DSOM) For My AI Protocol | Harisfazillah Jamel (LinuxMalaysia) | 2026-08-14 Standard: UK English | DBP-standard Bahasa Melayu Malaysia (Piawai) | GNU General Public License v3.0