Skip to content

Commit c8243e3

Browse files
committed
✨ feat: add documentation for system lifecycle and distribution
- Introduce two new markdown files detailing the distribution strategy and system lifecycle of VibeAuracle. - The new docs cover CI/CD pipeline, cross-compilation, metadata injection, and the philosophy behind a seamless user experience.
1 parent 67a982b commit c8243e3

2 files changed

Lines changed: 61 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Distribution & Integrity
2+
3+
VibeAuracle uses a highly portable distribution strategy centered around a single, statically-linked Go binary.
4+
5+
## CI/CD Pipeline
6+
7+
We use GitHub Actions (`release.yml`) to manage a complex matrix of builds. On every tag (`v*`) or push to the `release` branch, the following occurs:
8+
9+
1. **Cross-Compilation:** We build for 7+ targets:
10+
* `linux/amd64`, `linux/arm64`
11+
* `darwin/amd64`, `darwin/arm64` (macOS)
12+
* `windows/amd64`, `windows/arm64`
13+
* `android/arm64` (Native Termux support)
14+
2. **Metadata Injection:** Version strings, Git commits, and build timestamps are baked into the binary using `-ldflags`.
15+
3. **Checksum Generation:** A `checksums.txt` file is generated containing SHA-256 hashes of every artifact.
16+
4. **Rolling Releases:** The `release` branch always maintains a `latest` rolling tag, allowing users to track the "Stable-Edge" without waiting for semantic version increments.
17+
18+
## Strict Integrity Policy
19+
20+
Security is a primary concern for a tool with system-level access. VibeAuracle enforces a **Strict Integrity Policy**:
21+
22+
* **Mandatory Verification:** During any binary update, the tool *must* successfully download and parse the remote `checksums.txt`.
23+
* **Fail-Hard:** If the checksum file is missing, or if the downloaded binary's hash does not match, the update process is aborted immediately.
24+
* **Audit Trail:** Every integrity check (success or failure) is logged to the lifecycle audit database.
25+
26+
## Discovery Mechanism
27+
28+
The tool uses a multi-layered discovery process to check for updates:
29+
1. **Git Discovery:** Uses `git ls-remote` to bypass GitHub API rate limits and get the latest commit hashes directly from the repository.
30+
2. **API Fallback:** If Git is unavailable, it falls back to the GitHub Releases API.
31+
3. **Metadata Comparison:** It compares the embedded `Commit` hash of the running binary against the remote target to determine if an update is truly necessary, even if versions appear the same.

docs/docs/lifecycle/index.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# System Lifecycle & Distribution
2+
3+
VibeAuracle is designed with a **"System-Intimate"** philosophy. This extends beyond its runtime behavior to how it is delivered, maintained, and eventually removed from a host system.
4+
5+
This section provides a deep dive into the engineering behind VibeAuracle's distribution pipeline—covering the "why" and "how" of our autonomous update, installation, and self-healing mechanisms.
6+
7+
## Philosophy
8+
9+
Most CLI tools are static binaries managed by external package managers. VibeAuracle, however, treats itself as a **living process**. Our lifecycle goals are:
10+
11+
1. **Zero-Friction Updates:** The tool should evolve without requiring manual intervention or losing state.
12+
2. **Universal Portability:** Seamless operation across Linux, macOS, Windows, and Android (Termux) without platform-specific installers.
13+
3. **Strict Integrity:** Automated verification of every byte downloaded to the system.
14+
4. **Self-Healing:** The ability to detect corruption or build failures and automatically recover to a stable state.
15+
5. **Observability:** Every lifecycle event is audited and logged for long-term intelligence.
16+
17+
## Pipeline Overview
18+
19+
The lifecycle is divided into four main pillars:
20+
21+
* [**Distribution & CI/CD**](./distribution.md): How we build and verify binaries across architectures.
22+
* [**Installation & Migration**](./installation.md): How the tool integrates with the host system and shell.
23+
* [**Updates & Hot-Swapping**](./updates.md): Our multi-track update system and state-preserving restarts.
24+
* [**Audit & Debugging**](./audit.md): How we track system health and lifecycle events.
25+
* [**Uninstallation & Rollback**](./removal.md): Clean removal and version jumping.
26+
27+
---
28+
29+
### For AI Agents
30+
If you are an AI agent managing this system, you can find structured audit logs at `~/.vibeauracle/audit/lifecycle.jsonl`. These logs provide a machine-readable history of every update and installation event.

0 commit comments

Comments
 (0)