# @lssm-tech/example.content-generation

Content generation example using @lssm-tech/lib.content-gen.

## Source and release context

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

## Package metadata

```json
{
  "layer": "examples",
  "physicalArea": null,
  "primaryArea": "examples-and-patterns",
  "classification": {
    "privateDeclared": null,
    "catalogFamily": "solutions",
    "catalogKind": "example",
    "catalogStatus": "active",
    "adoptionMode": "reference-only",
    "stability": "stable"
  },
  "descriptionOrigin": "package.json",
  "manifestComplete": true,
  "publicationPolicyApplied": false
}
```

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

Primary area: [Examples and implementation patterns](https://lssm.co/docs/areas/examples-and-patterns/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "examples/content-generation/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/content-generation/README.md",
  "blobSha": "9ecd7c0d8ed46c2574dc5da488f8b84a20b839f8",
  "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/example.content-generation

Website: https://contractspec.io

**Content generation example using @lssm-tech/lib.content-gen.**

## What This Demonstrates

- Content generation pipeline with typed contracts.
- Integration with the content-gen library.
- Structured logging for generation steps.
- DocBlock documentation for the generation flow.
- Deterministic provider-free preview data for content, image, video, TTS, STT, and conversation workflow artifacts.
- `src/docs/` contains docblocks and documentation-facing exports.

## Preview / export workflow

Content Generation previews use deterministic local pipeline fixtures for brief/prompt editing, generation review, publishing/version snapshots, and audit status. The `./ui` export must not call LLM providers, production endpoints, or live storage.

The first-class preview packet covers these local artifact kinds:

- `content` — blog, email, landing, social, and SEO draft outputs from typed briefs.
- `image` — campaign hero image fixture references.
- `video` — launch teaser storyboard fixture references.
- `tts` — narration script fixture references.
- `stt` — transcript fixture references.
- `conversation` — human review assistant handoff fixture references.

Public key behavior is compatibility-sensitive because current catalog consumers may resolve both `examples.content-generation` and normalized keys. Document and test any alias migration before release. The Phase 0 compatibility gate lives in `.omx/plans/content-generation-compatibility-matrix.md`.

## Compatibility / Migration Notes

- Keep `content-generation` as the canonical feature key; any registry alias cleanup is major-version-only.
- Prefer future contract-source imports from `@lssm-tech/lib.contracts-spec/content-generation` once the contracts lane lands them; existing `@lssm-tech/lib.content-gen` generator imports remain valid for this example.
- Provider credentials are non-goals for this package. Real provider adapters belong in integration packages and are injected by apps/modules, while this example stays deterministic.
- Keep this README synchronized with `packages/apps/web-landing/public/llms-packages/example.content-generation.txt` until generated docs own the mirror.

## Running Locally

From `examples/content-generation`:
- `bun run dev`
- `bun run build`
- `bun run test`
- `bun run typecheck`

## Usage

Use `@lssm-tech/example.content-generation` as a reference implementation, or import its exported surfaces into a workspace that composes ContractSpec examples and bundles.

## Architecture

- `src/content-generation.feature.ts` defines a feature entrypoint.
- `src/docs/` contains docblocks and documentation-facing exports.
- `src/example.ts` is the runnable example entrypoint.
- `src/generate.ts` is part of the package's public or composition surface.
- `src/index.ts` is the root public barrel and package entrypoint.

## Public Entry Points

- Export `.` resolves through `./src/index.ts`.
- Export `./content-generation.feature` resolves through `./src/content-generation.feature.ts`.
- Export `./docs` resolves through `./src/docs/index.ts`.
- Export `./docs/content-generation.docblock` is an alias of `./docs` and resolves through `./src/docs/index.ts`.
- Export `./example` resolves through `./src/example.ts`.
- Export `./generate` resolves through `./src/generate.ts`.
- Export `./ui` resolves through `./src/ui/index.ts`.
- Export `./ui/content-generation-preview.data` resolves through `./src/ui/content-generation-preview.data.ts`.
- Export `./ui/ContentGenerationPreview` resolves through `./src/ui/ContentGenerationPreview.tsx`.

## Local Commands

- `bun run dev` — contractspec-bun-build dev
- `bun run build` — contractspec-bun-build build
- `bun run test` — bun test --pass-with-no-tests
- `bun run lint` — bun lint:fix
- `bun run lint:check` — biome check .
- `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
- `bun run typecheck` — tsgo --noEmit
- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose
- `bun run publish:pkg:canary` — bun publish:pkg --tag canary
- `bun run clean` — rimraf dist .turbo
- `bun run build:bundle` — contractspec-bun-build transpile
- `bun run build:types` — contractspec-bun-build types
- `bun run prebuild` — contractspec-bun-build prebuild

## Recent Updates

- Replace eslint+prettier by biomejs to optimize speed.
- Missing contract layers.

## Notes

- Works alongside `@lssm-tech/lib.content-gen`, `@lssm-tech/lib.contracts-spec`, `@lssm-tech/lib.logger`, `@lssm-tech/tool.bun`, `@lssm-tech/tool.typescript`.


## Declared capabilities

This manifest does not declare a capability catalogue. Assess the package using its guide, import map and source.

## Catalogue metadata

```json
{
  "family": "solutions",
  "kind": "example",
  "status": "active",
  "adoptionMode": "reference-only",
  "stability": "stable",
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "entrypoints": [
    ".",
    "./content-generation.feature",
    "./docs",
    "./docs/content-generation.docblock",
    "./example",
    "./generate",
    "./ui",
    "./ui/content-generation-preview.data",
    "./ui/ContentGenerationPreview"
  ],
  "examples": [],
  "replacements": [],
  "nonAdoptableRationale": "This example is published for reference and learning, not as a reusable library dependency.",
  "visualTesting": {
    "status": "deferred",
    "owner": "@contractspec-core",
    "targetWave": "wave-3-react-packages",
    "rationale": "Foundational Storybook adoption establishes shared catalogs and guardrails before this package migrates."
  }
}
```

## 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
[]
```

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

- `@lssm-tech/example.content-generation/content-generation.feature` — subpath `./content-generation.feature`
  - `unconditional`: `./src/content-generation.feature.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/content-generation/src/content-generation.feature.ts); verified source file.

- `@lssm-tech/example.content-generation/docs` — subpath `./docs`
  - `unconditional`: `./src/docs/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/content-generation/src/docs/index.ts); verified source file.

- `@lssm-tech/example.content-generation/docs/content-generation.docblock` — subpath `./docs/content-generation.docblock`
  - `unconditional`: `./src/docs/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/content-generation/src/docs/index.ts); verified source file.

- `@lssm-tech/example.content-generation/example` — subpath `./example`
  - `unconditional`: `./src/example.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/content-generation/src/example.ts); verified source file.

- `@lssm-tech/example.content-generation/generate` — subpath `./generate`
  - `unconditional`: `./src/generate.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/content-generation/src/generate.ts); verified source file.

- `@lssm-tech/example.content-generation/ui` — subpath `./ui`
  - `unconditional`: `./src/ui/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/content-generation/src/ui/index.ts); verified source file.

- `@lssm-tech/example.content-generation/ui/content-generation-preview.data` — subpath `./ui/content-generation-preview.data`
  - `unconditional`: `./src/ui/content-generation-preview.data.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/content-generation/src/ui/content-generation-preview.data.ts); verified source file.

- `@lssm-tech/example.content-generation/ui/ContentGenerationPreview` — subpath `./ui/ContentGenerationPreview`
  - `unconditional`: `./src/ui/ContentGenerationPreview.tsx` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/content-generation/src/ui/ContentGenerationPreview.tsx); verified source file.

## Package publication metadata

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

```json
{
  "types": "./dist/index.d.ts",
  "files": [
    "LICENSE",
    "README.md",
    "dist",
    "!**/*.test.*",
    "!**/*.spec.*",
    "!**/*.tsbuildinfo"
  ],
  "publishExports": {
    ".": {
      "types": "./dist/index.d.ts",
      "browser": "./dist/browser/index.js",
      "bun": "./dist/index.js",
      "node": "./dist/node/index.js",
      "default": "./dist/index.js"
    },
    "./content-generation.feature": {
      "types": "./dist/content-generation.feature.d.ts",
      "browser": "./dist/browser/content-generation.feature.js",
      "bun": "./dist/content-generation.feature.js",
      "node": "./dist/node/content-generation.feature.js",
      "default": "./dist/content-generation.feature.js"
    },
    "./docs": {
      "types": "./dist/docs/index.d.ts",
      "browser": "./dist/browser/docs/index.js",
      "bun": "./dist/docs/index.js",
      "node": "./dist/node/docs/index.js",
      "default": "./dist/docs/index.js"
    },
    "./docs/content-generation.docblock": {
      "types": "./dist/docs/index.d.ts",
      "browser": "./dist/browser/docs/index.js",
      "bun": "./dist/docs/index.js",
      "node": "./dist/node/docs/index.js",
      "default": "./dist/docs/index.js"
    },
    "./example": {
      "types": "./dist/example.d.ts",
      "browser": "./dist/browser/example.js",
      "bun": "./dist/example.js",
      "node": "./dist/node/example.js",
      "default": "./dist/example.js"
    },
    "./generate": {
      "types": "./dist/generate.d.ts",
      "browser": "./dist/browser/generate.js",
      "bun": "./dist/generate.js",
      "node": "./dist/node/generate.js",
      "default": "./dist/generate.js"
    },
    "./ui": {
      "types": "./dist/ui/index.d.ts",
      "browser": "./dist/browser/ui/index.js",
      "bun": "./dist/ui/index.js",
      "node": "./dist/node/ui/index.js",
      "default": "./dist/ui/index.js"
    },
    "./ui/content-generation-preview.data": {
      "types": "./dist/ui/content-generation-preview.data.d.ts",
      "browser": "./dist/browser/ui/content-generation-preview.data.js",
      "bun": "./dist/ui/content-generation-preview.data.js",
      "node": "./dist/node/ui/content-generation-preview.data.js",
      "default": "./dist/ui/content-generation-preview.data.js"
    },
    "./ui/ContentGenerationPreview": {
      "types": "./dist/ui/ContentGenerationPreview.d.ts",
      "browser": "./dist/browser/ui/ContentGenerationPreview.js",
      "bun": "./dist/ui/ContentGenerationPreview.js",
      "node": "./dist/node/ui/ContentGenerationPreview.js",
      "default": "./dist/ui/ContentGenerationPreview.js"
    }
  }
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

- [@lssm-tech/lib.content-gen](https://lssm.co/docs/packages/lib.content-gen/): `workspace:^`
- [@lssm-tech/lib.contracts-spec](https://lssm.co/docs/packages/lib.contracts-spec/): `workspace:^`
- [@lssm-tech/lib.design-system](https://lssm.co/docs/packages/lib.design-system/): `workspace:^`
- [@lssm-tech/lib.logger](https://lssm.co/docs/packages/lib.logger/): `workspace:^`
- `react`: `catalog:`
- `react-dom`: `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/react`: `catalog:types`
- `@types/react-dom`: `catalog:types`
- `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 --unsafe --only=nursery/useSortedClasses . && node ../../scripts/biome.cjs check --write .",
  "lint:check": "node ../../scripts/biome.cjs check .",
  "test": "bun test --pass-with-no-tests",
  "prebuild": "contractspec-bun-build prebuild",
  "typecheck": "tsgo --noEmit"
}
```

## Declared documentation links

- [Example Content Generation documentation](https://www.npmjs.com/package/%40lssm-tech%2Fexample.content-generation) — declared link; destination not verified.

```json
{
  "url": "https://www.npmjs.com/package/%40lssm-tech%2Fexample.content-generation",
  "kind": "readme"
}
```

## Existing agent-guide projection

```json
{
  "path": "packages/apps/web-landing/public/llms-packages/example.content-generation.txt",
  "route": "/llms/example.content-generation",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/example.content-generation.txt",
  "blobSha": "9ecd7c0d8ed46c2574dc5da488f8b84a20b839f8",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "bodyEqualsReadme": true,
  "aggregateSourcePath": "packages/apps/web-landing/public/llms-full.txt",
  "aggregateBlobSha": "691b1d33efee24c440598b9106c81432f56aafaf"
}
```
