# @lssm-tech/example.kb-update-pipeline

Example: KB update automation pipeline with HITL review and auditability.

## Source and release context

- Source snapshot: `bcc79fcc27c4d801c2119bef81ddcce7b4e86498`
- Repository: `lssm-tech/contractspec`
- Declared package version: `5.0.4`
- Package path: `examples/kb-update-pipeline`
- Manifest path: `examples/kb-update-pipeline/package.json`
- Manifest Git blob: `86b518ad48080d1e4f46aba68f086d70a3037054`
- Manifest origin: pinned GitHub manifest fetch
- Manual: [@lssm-tech/example.kb-update-pipeline](https://lssm.co/docs/packages/example.kb-update-pipeline/)
- 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/kb-update-pipeline)
- [Manifest source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/kb-update-pipeline/package.json)
- [Readme source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/kb-update-pipeline/README.md)
- [Guide source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/example.kb-update-pipeline.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/kb-update-pipeline/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/kb-update-pipeline/README.md",
  "blobSha": "500473673249df710b9745c043b6b4aa1b152471",
  "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.kb-update-pipeline

Website: https://contractspec.io

**Example: KB update automation pipeline with HITL review and auditability.**

## What This Demonstrates

- HITL (human-in-the-loop) review pipeline pattern.
- Entity models for KB articles and update proposals.
- Event-driven pipeline with typed operations.
- Feature definition with presentations and test-specs.
- In-memory handlers for demo scenarios.
- `src/docs/` contains docblocks and documentation-facing exports.

## Running Locally

From `examples/kb-update-pipeline`:
- `bun run dev`
- `bun run build`
- `bun run test`
- `bun run typecheck`

## Usage

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

## Architecture

- `src/docs/` contains docblocks and documentation-facing exports.
- `src/entities/` contains domain entities and value objects.
- `src/events.ts` is package-level event definitions.
- `src/example.ts` is the runnable example entrypoint.
- `src/handlers/` contains handlers or demo adapters wired to contract surfaces.
- `src/index.ts` is the root public barrel and package entrypoint.
- `src/kb-update-pipeline.feature.ts` defines a feature entrypoint.

## Public Entry Points

- Export `.` resolves through `./src/index.ts`.
- Export `./docs` resolves through `./src/docs/index.ts`.
- Export `./docs/kb-update-pipeline.docblock` is an alias of `./docs` and resolves through `./src/docs/index.ts`.
- Export `./entities` resolves through `./src/entities/index.ts`.
- Export `./entities/models` resolves through `./src/entities/models.ts`.
- Export `./events` resolves through `./src/events.ts`.
- Export `./example` resolves through `./src/example.ts`.
- Export `./handlers` resolves through `./src/handlers/index.ts`.
- Export `./handlers/memory.handlers` resolves through `./src/handlers/memory.handlers.ts`.
- Export `./kb-update-pipeline.feature` resolves through `./src/kb-update-pipeline.feature.ts`.
- The package publishes 14 total export subpaths; keep docs aligned with `package.json`.

## Local Commands

- `bun run dev` — contractspec-bun-build dev
- `bun run build` — contractspec-bun-build build
- `bun run test` — bun test
- `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.contracts-spec`, `@lssm-tech/lib.schema`, `@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": [
    ".",
    "./docs",
    "./docs/kb-update-pipeline.docblock",
    "./entities",
    "./entities/models",
    "./events",
    "./example",
    "./handlers",
    "./handlers/memory.handlers",
    "./kb-update-pipeline.feature",
    "./operations",
    "./operations/pipeline",
    "./presentations",
    "./tests/operations.test-spec"
  ],
  "examples": [],
  "replacements": [],
  "nonAdoptableRationale": "This example is published for reference and learning, not as a reusable library dependency."
}
```

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

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

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

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

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

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

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

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

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

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

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

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

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

- `@lssm-tech/example.kb-update-pipeline/tests/operations.test-spec` — subpath `./tests/operations.test-spec`
  - `unconditional`: `./src/tests/operations.test-spec.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/kb-update-pipeline/src/tests/operations.test-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": [
    "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"
    },
    "./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/kb-update-pipeline.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"
    },
    "./entities": {
      "types": "./dist/entities/index.d.ts",
      "browser": "./dist/browser/entities/index.js",
      "bun": "./dist/entities/index.js",
      "node": "./dist/node/entities/index.js",
      "default": "./dist/entities/index.js"
    },
    "./entities/models": {
      "types": "./dist/entities/models.d.ts",
      "browser": "./dist/browser/entities/models.js",
      "bun": "./dist/entities/models.js",
      "node": "./dist/node/entities/models.js",
      "default": "./dist/entities/models.js"
    },
    "./events": {
      "types": "./dist/events.d.ts",
      "browser": "./dist/browser/events.js",
      "bun": "./dist/events.js",
      "node": "./dist/node/events.js",
      "default": "./dist/events.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"
    },
    "./handlers": {
      "types": "./dist/handlers/index.d.ts",
      "browser": "./dist/browser/handlers/index.js",
      "bun": "./dist/handlers/index.js",
      "node": "./dist/node/handlers/index.js",
      "default": "./dist/handlers/index.js"
    },
    "./handlers/memory.handlers": {
      "types": "./dist/handlers/memory.handlers.d.ts",
      "browser": "./dist/browser/handlers/memory.handlers.js",
      "bun": "./dist/handlers/memory.handlers.js",
      "node": "./dist/node/handlers/memory.handlers.js",
      "default": "./dist/handlers/memory.handlers.js"
    },
    "./kb-update-pipeline.feature": {
      "types": "./dist/kb-update-pipeline.feature.d.ts",
      "browser": "./dist/browser/kb-update-pipeline.feature.js",
      "bun": "./dist/kb-update-pipeline.feature.js",
      "node": "./dist/node/kb-update-pipeline.feature.js",
      "default": "./dist/kb-update-pipeline.feature.js"
    },
    "./operations": {
      "types": "./dist/operations/index.d.ts",
      "browser": "./dist/browser/operations/index.js",
      "bun": "./dist/operations/index.js",
      "node": "./dist/node/operations/index.js",
      "default": "./dist/operations/index.js"
    },
    "./operations/pipeline": {
      "types": "./dist/operations/pipeline.d.ts",
      "browser": "./dist/browser/operations/pipeline.js",
      "bun": "./dist/operations/pipeline.js",
      "node": "./dist/node/operations/pipeline.js",
      "default": "./dist/operations/pipeline.js"
    },
    "./presentations": {
      "types": "./dist/presentations.d.ts",
      "browser": "./dist/browser/presentations.js",
      "bun": "./dist/presentations.js",
      "node": "./dist/node/presentations.js",
      "default": "./dist/presentations.js"
    },
    "./tests/operations.test-spec": {
      "types": "./dist/tests/operations.test-spec.d.ts",
      "browser": "./dist/browser/tests/operations.test-spec.js",
      "bun": "./dist/tests/operations.test-spec.js",
      "node": "./dist/node/tests/operations.test-spec.js",
      "default": "./dist/tests/operations.test-spec.js"
    }
  }
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

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

### 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 --unsafe --only=nursery/useSortedClasses . && 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

- [Example Kb Update Pipeline documentation](https://www.npmjs.com/package/%40lssm-tech%2Fexample.kb-update-pipeline) — declared link; destination not verified.

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

## Existing agent-guide projection

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