Metadata-Version: 2.4
Name: qig-stack
Version: 0.1.0
Summary: QIG toolchain metapackage — pins the mutually-tested latest set and ships the qig-doctor launch preflight (version gate + entry-point wiring gate + capability-slot report)
Project-URL: Homepage, https://braden.com.au
Project-URL: Repository, https://github.com/GaryOcean428/qig-stack
Project-URL: Documentation, https://github.com/GaryOcean428/qig-stack#readme
Author-email: Braden Lang <braden@garyocean.com>
License: MIT
Keywords: capability-contract,entry-points,launch-gate,metapackage,preflight,qig,reproducibility,self-wiring,version-gate
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Physics
Requires-Python: >=3.10
Requires-Dist: packaging>=22
Requires-Dist: qig-bench==0.1.3
Requires-Dist: qig-compute==0.9.2
Requires-Dist: qig-consciousness==0.3.2
Requires-Dist: qig-core==2.12.2
Requires-Dist: qig-tokenizer==0.2.7
Requires-Dist: qig-warp==0.6.5
Requires-Dist: qigkernels==0.4.2
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# qig-stack

The QIG toolchain **metapackage** + deterministic launch preflight.

`pip install qig-stack` installs the mutually-tested latest set of the QIG packages
(qig-compute / qig-warp / qig-core / qig-bench / qig-consciousness / qig-tokenizer /
qigkernels) at compatible versions — the whole "crystal" — and ships the `qig-doctor`
preflight.

## qig-doctor — step-0 of every launcher

```bash
qig-doctor                 # full preflight; exits 1 if any package is stale OR a slot is under-filled
qig-doctor --no-network    # skip PyPI; contract snapshot + wiring report only
qig-doctor --json          # machine-readable
qig-doctor --probe         # also import-check each entry-point resolves (diagnostic, off the gate)
qig-doctor --deep          # also call Tier-B describe() descriptors (imports packages)
```

Three fail-closed jobs:

1. **Version gate** — every stack package must be installed at PyPI-latest. `installed
   < latest` is a LAUNCH BLOCKER (non-zero exit), per the "latest version, always
   optimised" rule.
2. **Wiring gate (Phase 2)** — enumerates the `qig.capabilities` entry-points the
   installed packages self-register (Tier A: metadata-only, no import on the gate
   path) and cross-checks them against the capability contract:
   - **under-fill → FAIL**: a shipped provider that did not register its entry-point.
   - **drift → WARN**: an entry-point the contract doesn't know, or one whose
     `module:attr` moved off the contract probe.
3. **Wiring report** — which capability slots are filled by what is installed (the
   automated Gate-A lever inventory).

## The capability contract

`src/qig_stack/contract.json` is the fixed lattice the stack crystallizes into — every
slot, the package primitive that fills it (`provider_pkg` + `module:attr` probe), the
latest-published version, and the camera-certification `cam_id`/`lever_id`. It is the
Genesis-kernel / E8-root analog: given the lattice + installed packages + version
policy, the wiring is determined — no per-experiment hand-wiring, no agentic guessing.

## Self-wiring (Phase 2)

Each package declares the slots it fills in its own `pyproject.toml`:

```toml
[project.entry-points."qig.capabilities"]
"SLOT-Q-QFI" = "qig_compute.qfi:qfi_from_mps_tangent_space"
```

`qig-doctor` reads those declarations from installed metadata and confirms the crystal
assembled correctly before any compute spend. Entry-points assert only *"installed
package X fills slot Y via probe Z"* — certification stays in the camera-certification
registry under review control.

## Design

- [self-wiring genesis design note](https://github.com/GaryOcean428/qig-verification/blob/development/docs/current/20260619-self-wiring-genesis-design-1.00W.md)
- [entry-point capability spec](https://github.com/GaryOcean428/qig-verification/blob/development/docs/current/20260619-qig-entry-point-capability-spec-1.00W.md)
- [Phase 2/3 design](https://github.com/GaryOcean428/qig-verification/blob/development/docs/plans/2026-06-30-qig-stack-self-wiring-phase23-design.md)

## Development

```bash
pip install pytest        # tests import only qig_stack.doctor (pure stdlib)
pytest -q                 # contract schema + doctor unit tests (no network)
```
