Architecture
TL;DR: genesis-vibes is a shared crate that generalizes cross-cutting concerns (CLI output, config, diagnostics, scaffolding) from the charly-vibes tool suite into reusable abstractions.
Why a shared crate?
Before genesis, each tool in the charly-vibes suite reimplemented the same patterns: structured JSON output, verbosity levels, config file management, test fixtures, and agent feedback. Each implementation was identical in intent but diverged in details — a classic case of structural duplication.
genesis-vibes extracts these patterns into a single crate that every tool depends on. This ensures:
- Consistent CLI output — every tool speaks the same envelope protocol
- Single source of truth — a bug fix in the envelope propagates to all tools
- Lower maintenance — new modules (doctor, status, discovery) ship once and are available everywhere
Module boundaries
Modules are organized by cross-cutting concern. The boundary rule: if only one tool uses it, it does not belong in genesis.
┌─────────────────────────────────────────────────────────┐
│ genesis-vibes │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ envelope │ │ guide │ │ config │ ... │
│ │ (output) │ │ (CLI) │ │ (files) │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ doctor │ │ status │ │ scaffold │ │
│ │ (checks) │ │(dashboard)│ │ (init) │ │
│ └──────────┘ └──────────┘ └──────────┘ │
│ │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │ fixture │ │ feedback │ │ discovery│ │
│ │ (tests) │ │ (issues) │ │ (manifest)│ │
│ └──────────┘ └──────────┘ └──────────┘ │
└─────────────────────────────────────────────────────────┘
▲ ▲ ▲
│ │ │
┌────┴────┐ ┌────┴────┐ ┌────┴────┐
│ wai │ │ dont │ │testaruda│ ...
└─────────┘ └─────────┘ └─────────┘
Module relationships
Some modules build on others:
- guide uses envelope —
Output<T>wrapsEnvelope<T> - doctor uses suite_linter —
DoctorCheckproducesLintResult - status uses doctor —
DoctorStatusBridgewrapsDoctorRunneras aStatusContributor - feedback uses envelope — error reporting follows the envelope protocol
- scaffold uses managed_block —
managed_block()delegates toBlockInjector - discovery uses config —
Manifestis aConfigFile
Extending genesis
New modules should follow the same patterns:
- Define a trait for the abstraction (e.g.,
DoctorCheck,StatusContributor) - Provide a runner/builder that orchestrates implementations
- Implement envelope serialization for structured output
- Document the module’s boundary rule — what belongs in genesis vs. what stays in the tool
Agent workflow integration
genesis modules are designed to be consumed by AI agents as well as humans:
- Envelope — agents parse JSON output;
okfield is a binary success check - Feedback — agents can call
handle_feedback()to report issues - Discovery — agents scan
.genesis/tools.tomlto discover registered tools - Scaffold — agents use
initcommands to set up project structure - AIX — agents generate
llms.txt/llm.txtfiles for project context