# `@lssm-tech/lib.contractspec-catalog`

Machine-readable package and capability metadata for ContractSpec consumers,
including repositories that cannot inspect the ContractSpec source repository.
The package has no dependency on the ContractSpec CLI or workspace bundle.

## Current coverage

The bundled `catalog.json` covers the exact repository publishable-package
inventory used by the release pipeline. It remains explicit about registry
reconciliation: prepared artifacts keep `contractSpecCatalogStatus.registryReconciled`
false; the signed release receipt records subsequent registry inventory parity.
All 454 non-private packages use restricted `@lssm-tech/*` GitHub Packages and
public `@lssm/*` npmjs projections. Public catalog JSON and compiled copies are
regenerated together with valid content hashes and legacy indexes during staging.
Consumers can inspect `sourceEvidence`, registry
integrity, and this status instead of guessing completeness or treating
workspace source as public availability.

## Library usage

```ts
import {
  contractSpecCatalog,
  getContractSpecCatalog,
} from "@lssm-tech/lib.contractspec-catalog";

console.log(contractSpecCatalog.contentHash);
const mutableCopy = getContractSpecCatalog();
```

The raw document is also exported as
`@lssm-tech/lib.contractspec-catalog/catalog.json`.

## Export command

Print the bundled document to standard output:

```sh
bunx --package @lssm-tech/lib.contractspec-catalog contractspec-catalog export
```

Write it to the conventional consumer path:

```sh
bunx --package @lssm-tech/lib.contractspec-catalog contractspec-catalog export \
  --output .contractspec/adoption/catalog.json
```

Use `--compact` for a single-line JSON document. Writing to a file creates its
parent directory and replaces that explicitly selected file.
