@lssm-tech/module.self-improving-system
Headless orchestration for governed improvement programs. It validates and persists sanitized inputs, evaluates the existing G01-G25 gate bundle, resolves autonomy policy, and delegates authorization and effects through explicit ports.
Execution resolves the stored program and candidate rather than trusting caller copies. Programs delegate candidate targets directly and capabilities or paths with capability: and path: prefixes. Approval-required execution accepts only an unexpired, independently signed approval artifact authenticated through the approval-verifier port and bound to the exact program revision, candidate fingerprint, and evaluated gate bundle; the authorization envelope must echo both the approval and verification receipt before any effect runs.
SelfImprovementLifecycleOrchestratorV1 drives qualified candidates through shadow, canary, observation, promotion, rollback, and kill phases. Every effect receives an idempotency key plus the expected state digest and transition sequence. The resulting receipt is appended only after the effect succeeds; retries return the existing receipt, invalid edges fail before effects, hard regressions roll back, and exact replay must match the persisted status, digest, and receipt count.
The lifecycle also records review requests, rejection, cancellation, and bounded shadow/canary stops. Cancellation fails closed through an allowed terminal transition: queued work is killed, proposing/evaluating/review/shadow work is rejected, and active canary/observation work is rolled back. Promoted work remains rollback-only.
SelfImprovementOperationServiceV1 is the transport-neutral application surface for the generated operation registry. It parses nested program, candidate, and signal documents, enforces mutation revisions and full ecosystem/tenant/workspace/jurisdiction/purpose scope, routes evidence and review decisions through ports, and sends every lifecycle mutation through the durable orchestrator. Program kill first disables the program, then kills each non-terminal candidate with a deterministic replay-safe receipt identifier.
SelfImprovementRegistrationServiceV1 is the minimal reusable registration surface for managed composition roots. It validates program/signal schemas, program revisions, and delegated candidate targets/capabilities/paths without requiring dummy execution, approval, or authorization ports.
Published exports resolve built Bun/Node modules and declaration files. Workspace source exports remain unchanged; downstream packages can typecheck against the published artifacts without importing this module's source into their own root directory.