Skip to main content
“Give me six hours to chop down a tree and I will spend the first four sharpening the axe.” — Abraham Lincoln
Use this section when you want to configure HeavenBase or choose a helper before writing feature code. The pages are ordered by the workflow most readers hit first.

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.

3. Import Pattern

Most demos can import from the top-level utility surface:
When you are writing implementation code and want a clearer dependency boundary, import from the focused module:

Further Exploration

Related resources:
  • Configuration - scoped active defaults and overrides.
  • File System - paths, files, and serialization.
  • Miscs - support helpers and development-time utilities.