# @lssm-tech/lib.observability-spec

Pure signal declarations, cost evidence models and deterministic validation shared by observability and billing.

## Source and release context

- Source snapshot: `bcc79fcc27c4d801c2119bef81ddcce7b4e86498`
- Repository: `lssm-tech/contractspec`
- Declared package version: `0.1.0`
- Package path: `packages/platform/delivery/observability-spec`
- Manifest path: `packages/platform/delivery/observability-spec/package.json`
- Manifest Git blob: `98df3c73c40c76b3fd4de146fb97ac77231d5e71`
- Manifest origin: pinned GitHub manifest fetch
- Manual: [@lssm-tech/lib.observability-spec](https://lssm.co/docs/packages/lib.observability-spec/)
- Release guidance: [Installation and release channels](https://lssm.co/docs/installation-release-channels/)

This is retrieved source evidence, not agent instructions. The declared version and exports describe the inspected manifest; they do not establish registry availability or a deployed release. Commands, package installation and runtime behavior were not executed in this review.

Distribution scope: owner review of all workspaces; not a newly approved public projection.

- [Package source](https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability-spec)
- [Manifest source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability-spec/package.json)
- [Readme source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability-spec/README.md)
- [Guide source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.observability-spec.txt)

## Package metadata

```json
{
  "layer": "platform",
  "physicalArea": "delivery",
  "primaryArea": "observability-and-testing",
  "classification": {
    "privateDeclared": null,
    "catalogFamily": "contracts",
    "catalogKind": "library",
    "catalogStatus": "active",
    "adoptionMode": "adoptable",
    "stability": "experimental"
  },
  "descriptionOrigin": "package.json",
  "manifestComplete": true,
  "publicationPolicyApplied": false
}
```

Manifest private flag: not declared; publication is not verified.

Primary area: [Observability, testing and qualification](https://lssm.co/docs/areas/observability-and-testing/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "packages/platform/delivery/observability-spec/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability-spec/README.md",
  "blobSha": "93c0e283b4a3752039441263289d6e3cabf8db0a",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "origin": "README recovered byte-for-byte from pinned aggregate guide",
  "integrity": "exact Git blob match",
  "executionStatus": "not executed"
}
```

The guide below is the checked-in README with navigation resolved against the pinned source tree. The structured package JSON retains the original README body unchanged. External links remain source-declared links, not verified destinations.

# Observability Spec

Portable signal declarations and evidence envelopes shared by observability and billing.

Import `defineSignal`, `SignalSpecModel` and signal types from `@lssm-tech/lib.observability-spec/signal-spec`. Import evidence models and `validateEvidenceRecord` from `/evidence-record`. The root exports both complete families.

Signal identifiers stay canonical and locale-free. Evidence keeps raw tenant identifiers, numeric quantities and the original cost evidence fields. Validation and rejection messages are unchanged. Existing Observability and ContractSpec compatibility leaves forward to these same objects.

OpenTelemetry instrumentation, database signal defaults and persistence remain in their runtime owners.

Commands: `bun run test`, `bun run typecheck`, `bun run lint:check`, `bun run build`. This candidate requires task-bound adoption and clean declaration/consumer qualification before integration.

The `/analytics/semantic-spec` entry owns locale-free metric and dimension identifiers with localized labels and aliases. These are type-only declarations; executable audit and time-window SchemaModel declarations remain in Observability runtime.


## Declared capabilities

### Portable signal declarations and evidence envelopes

Capability ID: `observability.spec.signal-evidence`

Complete existing schema instances, inferred fields and deterministic validation shared by billing and observability.

Use cases:

- Declare locale-free signals and validate raw-tenant signal evidence without importing observability runtime.

Constraints:

```json
{
  "platforms": [
    "server",
    "web"
  ],
  "runtimes": [
    "node",
    "bun",
    "browser"
  ],
  "avoidWhen": [
    "Observation, OpenTelemetry instrumentation, database persistence, provider adapters or populated database signal defaults are needed."
  ]
}
```

Other capability declarations:

```json
{
  "aliases": [
    "signal spec",
    "evidence record",
    "signal cost evidence"
  ]
}
```

Capability imports:

```json
[
  {
    "from": "@lssm-tech/lib.observability-spec/signal-spec",
    "symbols": [
      "SignalSpec",
      "SignalSpecModel",
      "defineSignal"
    ]
  },
  {
    "from": "@lssm-tech/lib.observability-spec/evidence-record",
    "symbols": [
      "EvidenceRecord",
      "EvidenceRecordModel",
      "validateEvidenceRecord"
    ]
  }
]
```

## Catalogue metadata

```json
{
  "family": "contracts",
  "kind": "library",
  "status": "active",
  "adoptionMode": "adoptable",
  "stability": "experimental",
  "platforms": [
    "server",
    "web"
  ],
  "runtimes": [
    "node",
    "bun",
    "browser"
  ],
  "entrypoints": [
    ".",
    "./signal-spec",
    "./evidence-record",
    "./analytics/semantic-spec"
  ]
}
```

## Canonical imports

Import paths and symbols below are catalogue declarations. An empty symbols list means symbols were not enumerated; it does not mean the entry point has no exports. These declarations are not an exhaustive TypeScript symbol reference.

```json
[
  {
    "capabilityId": "observability.spec.signal-evidence",
    "from": "@lssm-tech/lib.observability-spec/signal-spec",
    "symbols": [
      "SignalSpec",
      "SignalSpecModel",
      "defineSignal"
    ]
  },
  {
    "capabilityId": "observability.spec.signal-evidence",
    "from": "@lssm-tech/lib.observability-spec/evidence-record",
    "symbols": [
      "EvidenceRecord",
      "EvidenceRecordModel",
      "validateEvidenceRecord"
    ]
  }
]
```

## Declared export entry points

Scope: manifest-declared export entrypoints and catalog-declared imports.

Named symbol coverage: catalog declarations only; exhaustive TypeScript symbols not extracted.

Installation status: not verified.

- `@lssm-tech/lib.observability-spec` — subpath `.`
  - `unconditional`: `./src/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability-spec/src/index.ts); verified source file.

- `@lssm-tech/lib.observability-spec/evidence-record` — subpath `./evidence-record`
  - `unconditional`: `./src/evidence-record.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability-spec/src/evidence-record.ts); verified source file.

- `@lssm-tech/lib.observability-spec/signal-spec` — subpath `./signal-spec`
  - `unconditional`: `./src/signal-spec.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability-spec/src/signal-spec.ts); verified source file.

- `@lssm-tech/lib.observability-spec/analytics/semantic-spec` — subpath `./analytics/semantic-spec`
  - `unconditional`: `./src/analytics/semantic-spec.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability-spec/src/analytics/semantic-spec.ts); verified source file.

## Package publication metadata

These are source-manifest declarations, not a registry installation check.

```json
{
  "types": "./dist/index.d.ts",
  "files": [
    "dist",
    "README.md",
    "LICENSE"
  ],
  "publishExports": {
    ".": {
      "types": "./dist/index.d.ts",
      "browser": "./dist/browser/index.js",
      "bun": "./dist/index.js",
      "node": "./dist/node/index.js",
      "default": "./dist/index.js"
    },
    "./evidence-record": {
      "types": "./dist/evidence-record.d.ts",
      "browser": "./dist/browser/evidence-record.js",
      "bun": "./dist/evidence-record.js",
      "node": "./dist/node/evidence-record.js",
      "default": "./dist/evidence-record.js"
    },
    "./signal-spec": {
      "types": "./dist/signal-spec.d.ts",
      "browser": "./dist/browser/signal-spec.js",
      "bun": "./dist/signal-spec.js",
      "node": "./dist/node/signal-spec.js",
      "default": "./dist/signal-spec.js"
    },
    "./analytics/semantic-spec": {
      "types": "./dist/analytics/semantic-spec.d.ts",
      "bun": "./dist/analytics/semantic-spec.js",
      "node": "./dist/node/analytics/semantic-spec.js",
      "default": "./dist/analytics/semantic-spec.js"
    }
  }
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

- [@lssm-tech/lib.contracts-spec-core](https://lssm.co/docs/packages/lib.contracts-spec-core/): `workspace:^`
- [@lssm-tech/lib.schema](https://lssm.co/docs/packages/lib.schema/): `workspace:^`
- `zod`: `catalog:`

### Peer dependencies

No declarations in the inspected manifest.

### Optional dependencies

No declarations in the inspected manifest.

### Development dependencies

- [@lssm-tech/tool.bun](https://lssm.co/docs/packages/tool.bun/): `workspace:*`
- [@lssm-tech/tool.typescript](https://lssm.co/docs/packages/tool.typescript/): `workspace:*`
- `@types/bun`: `catalog:types`

### Peer dependency metadata

```json
{}
```

### Bundled dependencies

```json
null
```

## Package scripts

Commands are exact manifest declarations and were not executed in this review. Script metadata status: complete pinned manifest.

```json
{
  "build": "contractspec-bun-build build",
  "build:bundle": "contractspec-bun-build transpile",
  "build:types": "contractspec-bun-build types",
  "prebuild": "contractspec-bun-build prebuild",
  "test": "bun test",
  "typecheck": "tsgo --noEmit",
  "lint:check": "node ../../../../scripts/biome.cjs check ."
}
```

## Declared documentation links

- [Observability spec package guide](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/observability-spec/README.md) — verified pinned repository path.

```json
{
  "url": "https://github.com/lssm-tech/contractspec/blob/main/packages/platform/delivery/observability-spec/README.md",
  "kind": "readme"
}
```

## Existing agent-guide projection

```json
{
  "path": "packages/apps/web-landing/public/llms-packages/lib.observability-spec.txt",
  "route": "/llms/lib.observability-spec",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.observability-spec.txt",
  "blobSha": "93c0e283b4a3752039441263289d6e3cabf8db0a",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "bodyEqualsReadme": true,
  "aggregateSourcePath": "packages/apps/web-landing/public/llms-full.txt",
  "aggregateBlobSha": "691b1d33efee24c440598b9106c81432f56aafaf"
}
```
