-
Notifications
You must be signed in to change notification settings - Fork 0
Build and Release Playbook:
The ASI-OS project is a self-evolving, autonomous cognitive ecosystem. Given this unique nature, an ad-hoc release process introduces unacceptable risks to system stability, safety, and mission alignment. This playbook is the authoritative guide for the build, validation, and deployment of all changes to the ASI-OS platform. Its purpose is to ensure that every enhancement to the system's capabilities is deployed safely, without compromising core stability or deviating from our guiding mission: "Made for a better world."
The system's architecture is founded on principles that demand this level of discipline. Any contribution must be integrated through a process that respects and verifies these core tenets:
-
Dual-Architecture System: ASI-OS is strategically separated into the
live runtime kernel (Sovereign-Loop)for real-time operations and theoffline cognitive ecosystemfor skill synthesis. This design allows for aggressive experimentation in the offline environment without jeopardizing the live system. This strict promotion process is our primary defense against contaminating the live, autonomous kernel with an unstable or misaligned capability developed in the offline ecosystem. -
Safety & Governance by Design: Transparency and safety are foundational pillars. This playbook is not merely a technical procedure; it is a governance mechanism. It integrates mandatory checks against key safety components, such as the
Safety Governorand immutableAudit Trails, directly into the pre-deployment workflow to ensure every release adheres to our commitment to responsible operation. -
Modularity and Extensibility: The professional
srclayout encourages contributions by providing clear locations for newskillsandagents. However, this modularity requires a rigorous, standardized validation process. This playbook ensures that all new components integrate seamlessly and safely, preserving the integrity of the whole.
This document outlines the practical, step-by-step workflow that translates these high-level principles into a reliable and repeatable release methodology.
A standardized contribution workflow is our first line of defense against regressions and instability. This section details the mandatory process for all developers, ensuring that any code committed to the repository adheres to project standards before it enters the formal release pipeline. Following these steps guarantees consistency and reduces integration friction.
- Dependency Management: All project dependencies must be installed exclusively using the locked requirements file. This mandate prevents dependency drift, a common source of catastrophic production failures where subtle changes in underlying libraries introduce unpredictable behavior that bypasses the test suite.
-
Modular Contribution: All code contributions must be placed in the appropriate directory within the
srclayout. This is required to maintain architectural separation and leverage the system's automatic discovery features.
- Local Validation: Before a pull request is submitted for review, the developer must run the complete test suite locally and verify that all tests pass. A passing local test suite is a non-negotiable prerequisite for code integration. This step ensures that the developer has performed a baseline integrity check, catching obvious errors early and respecting the resources of code reviewers and the release manager.
Adherence to this workflow ensures that code is well-structured and validated before it proceeds to the formal pre-release validation stage.
This protocol is the most critical phase for preventing regressions and ensuring a smooth deployment. It is a systematic, human-gated series of checks performed on a release candidate to validate its integrity, safety, and functionality in a controlled environment. No release may proceed to deployment without successfully passing every step in this sequence.
- Execute the Full Test Suite: The release manager must execute the entire test suite in a clean, dedicated environment that mirrors the production configuration. This validates the logical correctness of the codebase and ensures the results are not influenced by local configurations, providing a definitive statement on the code's health.
-
Initiate a Controlled Learning Session: Execute a short, autonomous learning cycle to verify the integration of core cognitive components. Unlike traditional software, a logical error in the cognitive loop between
ProfessorandAlphacould lead not just to a crash, but to the generation of flawed, unsafeskills. This test verifies that the core feedback loop of self-improvement is healthy and operating as an integrated whole. -
Verify Safety Governor and Audit Trails: Following the learning session, inspect the
data/ledger/directory. This step is a direct validation of the system's governance pillar. You must meticulously verify that every autonomous action taken during the session is recorded in the audit trail and that no action breached the cognitive guardrails defined insrc/core/safety_governor.py. A clean ledger is a mandatory gate for release. - Clean System Artifacts: Before packaging the release, remove all temporary files generated during testing and validation. This command ensures the final build artifact is created from a pristine source state, eliminating any risk of residual files from test sessions being mistakenly included in the production release.
Once these validation steps are successfully completed, the release candidate is approved for packaging and deployment.
This procedure transforms the validated source code into a versioned, immutable deployment artifact. A standardized build process is essential for ensuring that the exact code that passed validation is what gets deployed, eliminating any possibility of configuration drift or last-minute changes corrupting the release.
-
Code Merge and Tagging: The validated code is merged into the
mainbranch. Immediately following the merge, a new semantic version tag (e.g.,v0.2.1) must be created in Git. Git tagging is a non-negotiable step in our release process. It creates a permanent pointer to the exact release commit, providing the absolute traceability required for rapid, reliable rollbacks. -
Containerization: Build the Docker image using the provided
Dockerfile(orDockerfile.cicdfor automated CI/CD environments). Containerization is the ultimate guarantee of consistency, encapsulating the application and its locked dependencies into a single artifact. This eliminates "it works on my machine" problems and ensures the application runs identically across all environments. - Create Official Release: Create a formal release on the project's GitHub repository, associating it with the Git tag from the previous step. The release notes must summarize the significant changes and link to the relevant pull requests or issues that were resolved.
With the creation of this versioned artifact, the release is officially packaged and ready for deployment into the live environment.
Deploying the artifact is not the final step of the release process. It marks the beginning of a crucial observation period to confirm that the system is operating as expected in its live Sovereign-Loop mode. A disciplined approach to deployment and monitoring is key to a successful release.
- Deploy the Artifact: Start the server from the newly built and tagged container image, ensuring it is launched in the correct operational mode.
-
Initial Health Check: Immediately following deployment, review the system's startup logs. You must confirm that the
Sovereign-Loopinitializes without any errors or critical warnings and that all core services report a healthy status. -
Monitor Audit Trails: For the first few hours of operation, actively monitor the real-time generation of logs in the
data/ledger/directory. The audit trail is the primary tool for observing the system's autonomous behavior in the live environment. This provides immediate insight into the actions being performed and is the fastest way to detect unexpected behavior. - Rollback Procedure: If post-deployment monitoring reveals critical issues, instability, or behavior that violates safety principles, the emergency rollback procedure must be initiated. Stop the current deployment immediately and redeploy the container image associated with the previous stable Git tag.
By adhering to this disciplined, end-to-end process, the team can confidently evolve the ASI-OS platform, shipping powerful changes without regressions or operational drama.