“Give me six hours to chop down a tree and I will spend the first four sharpening the axe.” — Abraham Lincoln
1. Choose a Utility
Configuration
Keep active defaults out of wrapper signatures, then override them by application scope.
File System
Normalize paths, resolve aliases, and read or write files with config-driven encoding defaults.
Hash
Bridge string IDs, deterministic hashes, and integer-like sortable identifiers.
Random
Generate data that stays reproducible by seed and stable under sampling changes.
Prompt
Turn structured context into prompt text, messages, templates, and stored prompt rows.
Miscs
Browse support helpers and development-time utilities: commands, parallel work, diagnostics, and migration bridges.
2. Core Idea
heavenbase.utils is not meant to become a giant public framework. It is a local toolbox for concerns that show up everywhere in HeavenBase: configuration, paths, serialization, deterministic IDs, deterministic data generation, prompt text, command execution, diagnostics, and a few migration bridges.
The rule of thumb is simple:
- Use the focused utility pages for app-facing helpers.
- Use feature docs for feature surfaces such as workspaces, backends, query, LLM, capsules, and toolkits.
- Treat system-only support modules as implementation details even if they are temporarily importable from
heavenbase.utils.
The utility public surface is finite. Registry internals, provider policy, and feature orchestration stay in their owning packages even when they reuse utility primitives.

