# @lssm-tech/lib.opportunity-spec

Provider-neutral opportunity scoring and selection contracts for autonomous-company candidates.

## Source and release context

- Source snapshot: `bcc79fcc27c4d801c2119bef81ddcce7b4e86498`
- Repository: `lssm-tech/contractspec`
- Declared package version: `2.0.4`
- Package path: `packages/domains/opportunity/spec`
- Manifest path: `packages/domains/opportunity/spec/package.json`
- Manifest Git blob: `ee1103e1e19f0aa0826839379c180f1110c48435`
- Manifest origin: pinned GitHub manifest fetch
- Manual: [@lssm-tech/lib.opportunity-spec](https://lssm.co/docs/packages/lib.opportunity-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/domains/opportunity/spec)
- [Manifest source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/opportunity/spec/package.json)
- [Readme source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/opportunity/spec/README.md)
- [Guide source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/lib.opportunity-spec.txt)

## Package metadata

```json
{
  "layer": "domains",
  "physicalArea": "opportunity",
  "primaryArea": "intelligence-and-research",
  "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: [Intelligence, research and applications](https://lssm.co/docs/areas/intelligence-and-research/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "packages/domains/opportunity/spec/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/opportunity/spec/README.md",
  "blobSha": "3c0093131997fa317e486839e5b3d343110e796f",
  "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.

# `@lssm-tech/lib.opportunity-spec`

Provider-neutral opportunity scoring and selection contracts for autonomous-company candidates.

This package closes the first canonical ContractSpec slice for the Autonomous Company Opportunity Engine. It defines reviewable candidate, scorecard, evidence, gate, validation, simulation, portfolio, and handoff contracts; it does not research markets, call providers, mutate CompanyOS/Builder state, or approve production implementation.

## Scope

Use this package to model:

- autonomous-company opportunity candidates;
- core scorecards: AFS, BVS, GFS, CES, DMS, RTS, RCS, SFS, and TMS;
- diagnostic scores: QAS, DRS, TVS, VCS, and OTS;
- per-score and per-estimate evidence claims from hypothesis to live customer metrics;
- hard kill gates, downgrade gates, HITL load, GTM/CAC/budget assumptions, validation experiments, simulations, and portfolio decisions;
- branded refs to CompanyOS, Builder, ProductIntent, growth, finance, assurance, and orchestration surfaces.

## Boundary

This package is contract-only. It must not contain provider credentials, network calls, filesystem mutation, live research, customer-facing sends, production workflow creation, or module imports. High opportunity scores are decision evidence, not implementation approval.

## Public entrypoints

- `@lssm-tech/lib.opportunity-spec` — root barrel
- `@lssm-tech/lib.opportunity-spec/types` — Zod schemas and inferred types
- `@lssm-tech/lib.opportunity-spec/validation` — semantic validation helpers
- `@lssm-tech/lib.opportunity-spec/validation-rules` — reusable validation rule primitives for score coverage and evidence ref checks
- `@lssm-tech/lib.opportunity-spec/fixtures` — safe synthetic fixtures

## Evidence thresholds

- `customer_validated` requires evidence level `3` or higher.
- `pilot_validated` requires evidence level `4` or higher.
- `live_proven` requires evidence level `5`.

## Distribution-first drafts (additive, experimental)

`@lssm-tech/lib.opportunity-spec/discovery` exports `OpportunityDraftSchema`,
`OpportunityWaveSchema`, scoped evidence/metric contracts, the owning
`OpportunityDiscoveryWaveFeature`, and `validateOpportunityDraft` /
`validateOpportunityWave`. Drafts preserve unassessed fields and unknown customer
metrics; they do not require a company, canonical scores, budgets or simulations.

Commercial roles, acquisition mechanisms, creative production, publishing,
offers and retention modes are independent dimensions. Catalog cash/effort/time
ranges are editorial planning priors, never measured CAC, churn or conversion.
Evidence supports its particular product, claim, audience, geography and period;
vendor offers establish category facts, not our willingness to pay or demand.

Use the repository's `scripts/opportunity-wave.ts` captured-input runner to emit
the generation prompt, validate, screen and export another wave. The runtime's
separate `selfserve-first@1.0.0` profile produces research/experiment priorities,
without granting implementation, campaign or spending authority. Promotion to
`OpportunityCandidate` requires independently supplied mature requirements and
canonical validation. Existing mature contracts remain unchanged.

### Wave 1.1.0: sales-assisted profile, production assets, channel variety

`OpportunityWaveV11Schema` (`schemaVersion: "1.1.0"`) sits beside the frozen
1.0.0 schema; validate either with `validateOpportunityDiscoveryWave`.

- `profileId` is `selfserve-first` or `sales-assisted` (`OPPORTUNITY_DISCOVERY_PROFILE_REQUIREMENTS`).
  `sales-assisted` replaces the `selfserve_purchase` gate with `bounded_sales_effort`
  and the `selfserve_adoption` dimension with `assisted_conversion`.
- A play may declare `salesMotion`: AI preparation, a human role, a handoff
  boundary. It passes `bounded_sales_effort` only with at most two calls and at
  most 90 planned human minutes per closed account; a play above the ceiling must
  fail the gate and is deferred. Under `selfserve-first` a mandatory call cannot
  pass `selfserve_purchase`. `sales_led`, `ai_sdr_calls` and `webinar_demo` plays
  must declare a motion under `sales-assisted`.
- A play may declare `productionAsset` (paid UGC, AI UGC, founder content,
  product demo, commissioned creator, customer content). It supplies creative,
  never reach. AI UGC declares a synthetic person; paid or synthetic people are
  never presented as customers; creator amplification needs explicit ad
  authorization.
- A wave of eight or more drafts keeps any primary method at or below 25% and
  spans at least four method families (`OPPORTUNITY_WAVE_V11_CHANNEL_VARIETY`).

## Package verification

- `bun run test`
- `bun run typecheck`
- `bun run lint:check`
- `bun run build`


## Declared capabilities

### Lib Opportunity Spec

Capability ID: `package.lssm.tech.lib.opportunity.spec`

Provider-neutral opportunity scoring and selection contracts for autonomous-company candidates.

Use cases:

- Adopt provider-neutral opportunity scoring and selection contracts for autonomous-company candidates

Constraints:

```json
{
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "avoidWhen": [
    "The @lssm-tech/lib.opportunity-spec package constraints do not match the target runtime or platform."
  ],
  "requires": [
    "TypeScript"
  ]
}
```

Other capability declarations:

```json
{
  "status": "active",
  "aliases": [
    "lib",
    "opportunity",
    "spec"
  ],
  "pythonEquivalents": [],
  "alternatives": [],
  "relationships": [],
  "resolutionPriority": 50
}
```

Capability imports:

```json
[
  {
    "from": "@lssm-tech/lib.opportunity-spec",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.opportunity-spec/fixtures",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.opportunity-spec/types",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.opportunity-spec/validation",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.opportunity-spec/validation-rules",
    "symbols": []
  },
  {
    "from": "@lssm-tech/lib.opportunity-spec/discovery",
    "symbols": []
  }
]
```

## Catalogue metadata

```json
{
  "family": "contracts",
  "kind": "library",
  "status": "active",
  "adoptionMode": "adoptable",
  "stability": "experimental",
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "entrypoints": [
    ".",
    "./fixtures",
    "./types",
    "./validation",
    "./validation-rules",
    "./discovery"
  ],
  "examples": [],
  "replacements": []
}
```

## 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": "package.lssm.tech.lib.opportunity.spec",
    "from": "@lssm-tech/lib.opportunity-spec",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.opportunity.spec",
    "from": "@lssm-tech/lib.opportunity-spec/fixtures",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.opportunity.spec",
    "from": "@lssm-tech/lib.opportunity-spec/types",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.opportunity.spec",
    "from": "@lssm-tech/lib.opportunity-spec/validation",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.opportunity.spec",
    "from": "@lssm-tech/lib.opportunity-spec/validation-rules",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.lib.opportunity.spec",
    "from": "@lssm-tech/lib.opportunity-spec/discovery",
    "symbols": []
  }
]
```

## 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.opportunity-spec` — subpath `.`
  - `unconditional`: `./src/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/opportunity/spec/src/index.ts); verified source file.

- `@lssm-tech/lib.opportunity-spec/contracts/opportunity-wave` — subpath `./contracts/opportunity-wave`
  - `unconditional`: `./src/contracts/opportunity-wave.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/opportunity/spec/src/contracts/opportunity-wave.ts); verified source file.

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

- `@lssm-tech/lib.opportunity-spec/discovery-draft` — subpath `./discovery-draft`
  - `unconditional`: `./src/discovery-draft.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/opportunity/spec/src/discovery-draft.ts); verified source file.

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

- `@lssm-tech/lib.opportunity-spec/discovery-observations` — subpath `./discovery-observations`
  - `unconditional`: `./src/discovery-observations.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/opportunity/spec/src/discovery-observations.ts); verified source file.

- `@lssm-tech/lib.opportunity-spec/discovery-results` — subpath `./discovery-results`
  - `unconditional`: `./src/discovery-results.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/opportunity/spec/src/discovery-results.ts); verified source file.

- `@lssm-tech/lib.opportunity-spec/discovery-validation` — subpath `./discovery-validation`
  - `unconditional`: `./src/discovery-validation.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/opportunity/spec/src/discovery-validation.ts); verified source file.

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

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

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

- `@lssm-tech/lib.opportunity-spec/validation-rules` — subpath `./validation-rules`
  - `unconditional`: `./src/validation-rules.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/opportunity/spec/src/validation-rules.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",
    "AGENTS.md"
  ],
  "publishExports": {
    ".": {
      "types": "./dist/index.d.ts",
      "browser": "./dist/browser/index.js",
      "bun": "./dist/index.js",
      "node": "./dist/node/index.js",
      "default": "./dist/index.js"
    },
    "./contracts/opportunity-wave": {
      "types": "./dist/contracts/opportunity-wave.d.ts",
      "browser": "./dist/browser/contracts/opportunity-wave.js",
      "bun": "./dist/contracts/opportunity-wave.js",
      "node": "./dist/node/contracts/opportunity-wave.js",
      "default": "./dist/contracts/opportunity-wave.js"
    },
    "./discovery": {
      "types": "./dist/discovery.d.ts",
      "browser": "./dist/browser/discovery.js",
      "bun": "./dist/discovery.js",
      "node": "./dist/node/discovery.js",
      "default": "./dist/discovery.js"
    },
    "./discovery-draft": {
      "types": "./dist/discovery-draft.d.ts",
      "browser": "./dist/browser/discovery-draft.js",
      "bun": "./dist/discovery-draft.js",
      "node": "./dist/node/discovery-draft.js",
      "default": "./dist/discovery-draft.js"
    },
    "./discovery-evidence": {
      "types": "./dist/discovery-evidence.d.ts",
      "browser": "./dist/browser/discovery-evidence.js",
      "bun": "./dist/discovery-evidence.js",
      "node": "./dist/node/discovery-evidence.js",
      "default": "./dist/discovery-evidence.js"
    },
    "./discovery-observations": {
      "types": "./dist/discovery-observations.d.ts",
      "browser": "./dist/browser/discovery-observations.js",
      "bun": "./dist/discovery-observations.js",
      "node": "./dist/node/discovery-observations.js",
      "default": "./dist/discovery-observations.js"
    },
    "./discovery-results": {
      "types": "./dist/discovery-results.d.ts",
      "browser": "./dist/browser/discovery-results.js",
      "bun": "./dist/discovery-results.js",
      "node": "./dist/node/discovery-results.js",
      "default": "./dist/discovery-results.js"
    },
    "./discovery-validation": {
      "types": "./dist/discovery-validation.d.ts",
      "browser": "./dist/browser/discovery-validation.js",
      "bun": "./dist/discovery-validation.js",
      "node": "./dist/node/discovery-validation.js",
      "default": "./dist/discovery-validation.js"
    },
    "./fixtures": {
      "types": "./dist/fixtures.d.ts",
      "browser": "./dist/browser/fixtures.js",
      "bun": "./dist/fixtures.js",
      "node": "./dist/node/fixtures.js",
      "default": "./dist/fixtures.js"
    },
    "./types": {
      "types": "./dist/types.d.ts",
      "browser": "./dist/browser/types.js",
      "bun": "./dist/types.js",
      "node": "./dist/node/types.js",
      "default": "./dist/types.js"
    },
    "./validation": {
      "types": "./dist/validation.d.ts",
      "browser": "./dist/browser/validation.js",
      "bun": "./dist/validation.js",
      "node": "./dist/node/validation.js",
      "default": "./dist/validation.js"
    },
    "./validation-rules": {
      "types": "./dist/validation-rules.d.ts",
      "browser": "./dist/browser/validation-rules.js",
      "bun": "./dist/validation-rules.js",
      "node": "./dist/node/validation-rules.js",
      "default": "./dist/validation-rules.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:^`
- `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:*`
- `typescript`: `catalog:`

### 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
{
  "publish:pkg": "bun publish --tolerate-republish --ignore-scripts --verbose",
  "publish:pkg:canary": "bun publish:pkg --tag canary",
  "build": "contractspec-bun-build build",
  "build:bundle": "contractspec-bun-build transpile",
  "build:types": "contractspec-bun-build types",
  "dev": "contractspec-bun-build dev",
  "clean": "rimraf dist .turbo",
  "lint": "bun lint:fix",
  "lint:fix": "node ../../../../scripts/biome.cjs check --write .",
  "lint:check": "node ../../../../scripts/biome.cjs check .",
  "test": "bun test",
  "prebuild": "contractspec-bun-build prebuild",
  "typecheck": "tsgo --noEmit"
}
```

## Declared documentation links

- [Lib Opportunity Spec documentation](https://www.npmjs.com/package/%40lssm-tech%2Flib.opportunity-spec) — declared link; destination not verified.

```json
{
  "url": "https://www.npmjs.com/package/%40lssm-tech%2Flib.opportunity-spec",
  "kind": "readme"
}
```

## Existing agent-guide projection

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