Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

93 changes: 0 additions & 93 deletions openspec/changes/lifecycle-model-core-internal-l1/design.md

This file was deleted.

41 changes: 0 additions & 41 deletions openspec/changes/lifecycle-model-core-internal-l1/proposal.md

This file was deleted.

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions openspec/changes/lifecycle-model-core-internal-l1/tasks.md

This file was deleted.

23 changes: 23 additions & 0 deletions openspec/specs/compatibility-contract/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,3 +489,26 @@ by itself, expand the published `quantex-core` method surface, change
- **AND THEN** no new SDK `upgrade` method appears solely because CLI `upgrade`
executes through in-repo Core

### Requirement: Internalizing lifecycle model types MUST NOT drift frozen v1 contracts

Moving lifecycle receipt and observation TypeScript types into a Core-internal module MUST NOT change persisted state schema version 2, the lifecycle receipt JSON shape, maintained command aliases, exit-code classes, or v1 `--json` / NDJSON envelopes. Structured output MUST still omit engine and route identifiers. The published `quantex-core` root MUST NOT gain lifecycle-model exports as part of this internalization.

#### Scenario: State v2 and receipt JSON stay byte-compatible

- **GIVEN** a valid schema version 2 `state.json` with lifecycle receipts
- **WHEN** Quantex loads or records receipts after the model move
- **THEN** the schema version remains `2`
- **AND THEN** receipt field names, requiredness, and meanings are unchanged

#### Scenario: Structured CLI output omits engine and route

- **WHEN** a maintained lifecycle command emits JSON or NDJSON after the model move
- **THEN** the payload does not include selected engine or route identifiers
- **AND THEN** aliases and exit-code classes remain the pre-move v1 contract

#### Scenario: Published SDK export list is unchanged

- **WHEN** a TypeScript consumer imports `quantex-core` or `src/core/index.ts`
- **THEN** the runtime export remains `createQuantex`
- **AND THEN** lifecycle receipt types are not added to that public surface

38 changes: 38 additions & 0 deletions openspec/specs/runtime-boundaries/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,41 @@ the agent-lifecycle update engine. JSON MUST still omit engine and route.
identifiers
- **AND THEN** engine or route diagnostics remain absent from those payloads

### Requirement: Lifecycle receipt types SHALL live in a Core-internal leaf

Quantex SHALL own agent lifecycle receipt, observation, plan, and outcome TypeScript types plus `LIFECYCLE_RECEIPT_SCHEMA_VERSION` in an in-repo Core-internal module under `src/core/`. That module MUST be a dependency leaf: it MUST NOT import Core runtime, `src/state`, remaining `src/lifecycle` engines, CLI, or providers. `src/state` MAY import that leaf (including a value re-export of the receipt schema constant) and MUST NOT import Core runtime modules such as `src/core/index.ts`, `createQuantex`, or mutation/execution executors. Relocating the types MUST NOT, by itself, expand the published `quantex-core` package export surface.

#### Scenario: Core no longer imports lifecycle model from src/lifecycle

- **WHEN** in-repo Core installation, uninstall, or update modules need `LifecycleReceipt` or `LIFECYCLE_RECEIPT_SCHEMA_VERSION`
- **THEN** they import those symbols from the Core-internal leaf
- **AND THEN** they do not import `src/lifecycle/model`

#### Scenario: State shares the leaf without depending on Core runtime

- **WHEN** persisted-state schema or store modules type lifecycle receipts
- **THEN** they import from the Core-internal leaf
- **AND THEN** they do not import `src/core/index.ts`, `createQuantex`, or Core executors

#### Scenario: Published SDK root stays free of the leaf

- **WHEN** a TypeScript consumer inspects `src/core/index.ts` or `packages/core/src/index.ts`
- **THEN** those entries do not export `LifecycleReceipt`, `LifecycleObservation`, `LIFECYCLE_RECEIPT_SCHEMA_VERSION`, or other lifecycle-model symbols
- **AND THEN** `createQuantex` remains the only runtime export

### Requirement: Remaining src/lifecycle engines SHALL stay outside Core until a later knife

Quantex MUST keep provider-binding, provider-evidence, agent-observation, update-planner, agent-execution, uninstall-postcondition, and the `src/lifecycle` barrel outside `src/core` for the L1 model move. L1 MUST NOT delete `src/lifecycle/` and MUST NOT fold those remaining modules into Core.

#### Scenario: L1 does not absorb remaining lifecycle engines

- **WHEN** the L1 model internalization is applied
- **THEN** `src/lifecycle/` still contains the remaining engine modules listed above
- **AND THEN** `src/lifecycle/model.ts` is absent

#### Scenario: Existing non-SDK barrel may re-export leaf types

- **WHEN** CLI services or Core modules already import lifecycle types from the `src/lifecycle` barrel
- **THEN** that barrel MAY re-export types and the receipt schema constant from the Core-internal leaf
- **AND THEN** that re-export is not a published `quantex-core` SDK export

1 change: 1 addition & 0 deletions src/lifecycle/uninstall-postcondition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// retry used by Core uninstall-executor. Not zero-ref; do not fold into src/core.
// Product-path touch so process-only PRs are not required to skip the macOS matrix.
// Product-path touch so the cursor-version-probe-targeting archive PR still runs the macOS test matrix.
// Product-path touch so the lifecycle-model-core-internal-l1 archive PR still runs the macOS test matrix.
export interface ExecutableAbsenceWaitOptions {
readonly attempts?: number
readonly delay?: (milliseconds: number) => Promise<void>
Expand Down