# @lssm-tech/module.builder-workbench

Reusable Builder workbench UI module.

## Source and release context

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

## Package metadata

```json
{
  "layer": "domains",
  "physicalArea": "builder",
  "primaryArea": "delivery-and-infrastructure",
  "classification": {
    "privateDeclared": null,
    "catalogFamily": "ui",
    "catalogKind": "module",
    "catalogStatus": "active",
    "adoptionMode": "adoptable",
    "stability": "experimental"
  },
  "descriptionOrigin": "package.json",
  "manifestComplete": true,
  "publicationPolicyApplied": false
}
```

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

Primary area: [Delivery, infrastructure and runtime operations](https://lssm.co/docs/areas/delivery-and-infrastructure/)

## Package guide

```json
{
  "status": "available",
  "sourcePath": "packages/domains/builder/module/README.md",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/builder/module/README.md",
  "blobSha": "672d506d0b0f8e9ef1d36a6633425f8f4c6db34a",
  "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/module.builder-workbench

Reusable React surfaces for the Builder control plane: workspace home, guided chat/voice, source inbox, omnichannel inbox, blueprint editing, and readiness review.

## Company context

Pass the optional `companyContext` controller to `BuilderWorkbench` to expose
`CompanyContextPanel` in Sources, or embed that panel independently. Hosts own
authenticated retrieval; the shared `projectCompanyContextView` rejects stale
workspace/question responses and malformed evidence before rendering text.
The panel distinguishes missing configuration, denied access, conflicting
sources, empty results, and loading. Knowledge does not grant release authority.
English, French, and Spanish catalogs are included. Live provider activation,
Storybook browser qualification, and visual baseline review remain required.

## Model route inspection

The workbench exports route visibility components for Builder governance: `ModelRouteBadge`, `ModelRouteInspector`, `ModelRouteOverridePanel`, `RiskFlagList`, and `RoutingEvidenceTimeline`. These surfaces expose selected policy, difficulty, provider/model, risk flags, fallback routes, and rejected unsafe downgrades.

## RoleMorph Workbench panels

The workbench exports `RoleMorphWorkbenchPanels` for rendering RoleMorph packet views with existing design-system/ui-kit primitives. The panel set covers role selection, surface preview/registry summaries, inspector diagnostics, policy diff summaries, safe missing-binding repairs, authorization/evidence summaries, and audit/replay timestamps. It renders serializable packet contracts only; provider execution, durable stores, and production authorization enforcement remain outside the module.

## Candidate controls

Pass the optional `candidate` controller to `BuilderWorkbench` to expose
`CandidateExecutionPanel` in the Plan tab, or embed that panel directly. Prepare,
approve, run and status controls follow server-resolved available actions.
Unconfigured, denied, stale and indeterminate states do not appear as successful
execution. English, French and Spanish messages are included. Candidate review
is distinct from hosted preview or release.

`useBuilderCandidate({ workspaceId, planRef, request, onRefreshPlan })` from
`./presentation/hooks` drives that controller: one in-flight action at a time,
stale responses dropped across workspace/plan switches, bounded status polling
(3 s, at most 20 polls) while queued or running, and `onRefreshPlan` on
stale/succeeded. Hosts inject the `request` transport (`BuilderCandidateRequest`)
and keep authentication and routing.


## Declared capabilities

### Module Builder Workbench

Capability ID: `package.lssm.tech.module.builder.workbench`

Reusable Builder workbench UI module.

Use cases:

- Adopt reusable builder workbench ui module

Constraints:

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

Other capability declarations:

```json
{
  "status": "active",
  "aliases": [
    "contractspec",
    "builder",
    "workbench",
    "ui",
    "react",
    "module"
  ],
  "pythonEquivalents": [],
  "alternatives": [],
  "relationships": [],
  "resolutionPriority": 50
}
```

Capability imports:

```json
[
  {
    "from": "@lssm-tech/module.builder-workbench",
    "symbols": []
  },
  {
    "from": "@lssm-tech/module.builder-workbench/core",
    "symbols": []
  },
  {
    "from": "@lssm-tech/module.builder-workbench/i18n",
    "symbols": []
  },
  {
    "from": "@lssm-tech/module.builder-workbench/presentation",
    "symbols": []
  },
  {
    "from": "@lssm-tech/module.builder-workbench/presentation/components",
    "symbols": []
  },
  {
    "from": "@lssm-tech/module.builder-workbench/presentation/hooks",
    "symbols": []
  }
]
```

## Catalogue metadata

```json
{
  "family": "ui",
  "kind": "module",
  "status": "active",
  "adoptionMode": "adoptable",
  "stability": "experimental",
  "platforms": [
    "server"
  ],
  "runtimes": [
    "node"
  ],
  "entrypoints": [
    ".",
    "./core",
    "./i18n",
    "./presentation",
    "./presentation/components",
    "./presentation/hooks"
  ],
  "examples": [],
  "replacements": [],
  "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
[
  {
    "capabilityId": "package.lssm.tech.module.builder.workbench",
    "from": "@lssm-tech/module.builder-workbench",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.module.builder.workbench",
    "from": "@lssm-tech/module.builder-workbench/core",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.module.builder.workbench",
    "from": "@lssm-tech/module.builder-workbench/i18n",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.module.builder.workbench",
    "from": "@lssm-tech/module.builder-workbench/presentation",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.module.builder.workbench",
    "from": "@lssm-tech/module.builder-workbench/presentation/components",
    "symbols": []
  },
  {
    "capabilityId": "package.lssm.tech.module.builder.workbench",
    "from": "@lssm-tech/module.builder-workbench/presentation/hooks",
    "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/module.builder-workbench` — subpath `.`
  - `unconditional`: `./src/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/builder/module/src/index.ts); verified source file.

- `@lssm-tech/module.builder-workbench/core` — subpath `./core`
  - `unconditional`: `./src/core/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/builder/module/src/core/index.ts); verified source file.

- `@lssm-tech/module.builder-workbench/i18n` — subpath `./i18n`
  - `unconditional`: `./src/i18n/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/builder/module/src/i18n/index.ts); verified source file.

- `@lssm-tech/module.builder-workbench/presentation` — subpath `./presentation`
  - `unconditional`: `./src/presentation/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/builder/module/src/presentation/index.ts); verified source file.

- `@lssm-tech/module.builder-workbench/presentation/components` — subpath `./presentation/components`
  - `unconditional`: `./src/presentation/components/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/builder/module/src/presentation/components/index.ts); verified source file.

- `@lssm-tech/module.builder-workbench/presentation/hooks` — subpath `./presentation/hooks`
  - `unconditional`: `./src/presentation/hooks/index.ts` — [pinned source](https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/domains/builder/module/src/presentation/hooks/index.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"
  ],
  "publishExports": {
    ".": {
      "types": "./dist/index.d.ts",
      "browser": "./dist/browser/index.js",
      "bun": "./dist/index.js",
      "node": "./dist/node/index.js",
      "default": "./dist/index.js"
    },
    "./core": {
      "types": "./dist/core/index.d.ts",
      "browser": "./dist/browser/core/index.js",
      "bun": "./dist/core/index.js",
      "node": "./dist/node/core/index.js",
      "default": "./dist/core/index.js"
    },
    "./i18n": {
      "types": "./dist/i18n/index.d.ts",
      "browser": "./dist/browser/i18n/index.js",
      "bun": "./dist/i18n/index.js",
      "node": "./dist/node/i18n/index.js",
      "default": "./dist/i18n/index.js"
    },
    "./presentation": {
      "types": "./dist/presentation/index.d.ts",
      "browser": "./dist/browser/presentation/index.js",
      "bun": "./dist/presentation/index.js",
      "node": "./dist/node/presentation/index.js",
      "default": "./dist/presentation/index.js"
    },
    "./presentation/components": {
      "types": "./dist/presentation/components/index.d.ts",
      "browser": "./dist/browser/presentation/components/index.js",
      "bun": "./dist/presentation/components/index.js",
      "node": "./dist/node/presentation/components/index.js",
      "default": "./dist/presentation/components/index.js"
    },
    "./presentation/hooks": {
      "types": "./dist/presentation/hooks/index.d.ts",
      "browser": "./dist/browser/presentation/hooks/index.js",
      "bun": "./dist/presentation/hooks/index.js",
      "node": "./dist/node/presentation/hooks/index.js",
      "default": "./dist/presentation/hooks/index.js"
    }
  }
}
```

## Dependencies

Metadata status: complete pinned manifest.

### Runtime dependencies

- [@lssm-tech/lib.builder-runtime](https://lssm.co/docs/packages/lib.builder-runtime/): `workspace:^`
- [@lssm-tech/lib.builder-spec](https://lssm.co/docs/packages/lib.builder-spec/): `workspace:^`
- [@lssm-tech/lib.contracts-spec-core](https://lssm.co/docs/packages/lib.contracts-spec-core/): `workspace:^`
- [@lssm-tech/lib.design-system](https://lssm.co/docs/packages/lib.design-system/): `workspace:^`
- [@lssm-tech/lib.provider-spec](https://lssm.co/docs/packages/lib.provider-spec/): `workspace:^`
- [@lssm-tech/lib.translation-runtime](https://lssm.co/docs/packages/lib.translation-runtime/): `workspace:^`
- [@lssm-tech/lib.ui-kit-web](https://lssm.co/docs/packages/lib.ui-kit-web/): `workspace:^`
- [@lssm-tech/module.ai-chat](https://lssm.co/docs/packages/module.ai-chat/): `workspace:^`
- `react`: `catalog:`

### Peer dependencies

- `react`: `catalog:`

### 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`
- `happy-dom`: `catalog:testing`
- `react-dom`: `catalog:`
- `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

- [Module Builder Workbench documentation](https://www.npmjs.com/package/%40lssm-tech%2Fmodule.builder-workbench) — declared link; destination not verified.

```json
{
  "url": "https://www.npmjs.com/package/%40lssm-tech%2Fmodule.builder-workbench",
  "kind": "readme"
}
```

## Existing agent-guide projection

```json
{
  "path": "packages/apps/web-landing/public/llms-packages/module.builder-workbench.txt",
  "route": "/llms/module.builder-workbench",
  "sourceUrl": "https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/module.builder-workbench.txt",
  "blobSha": "672d506d0b0f8e9ef1d36a6633425f8f4c6db34a",
  "sourcePin": "bcc79fcc27c4d801c2119bef81ddcce7b4e86498",
  "bodyEqualsReadme": true,
  "aggregateSourcePath": "packages/apps/web-landing/public/llms-full.txt",
  "aggregateBlobSha": "691b1d33efee24c440598b9106c81432f56aafaf"
}
```
