Skip to content
ContractSpec
Start here

Package manual · examples

·Examples and implementation patterns

example.companyos-product-engineering-loop

Deterministic CompanyOS V1 operating review replay using public spec and pure runtime APIs.

examplesexamplev2.0.5experimentalservernode
@lssm-tech/example.companyos-product-engineering-loop
bun add @lssm-tech/example.companyos-product-engineering-loop
Package source ↗Manifest ↗

Manifest declarations describe the current workspace; they do not verify registry publication or runtime execution.

Package guide

Deterministic CompanyOS V1 product/engineering operating-loop example using public @lssm-tech/lib.companyos-spec and pure @lssm-tech/lib.companyos-runtime APIs.

What this demonstrates

A provider-free replay of the CompanyOS V1 fixture:

txt
onboarding-confusion signal
-> product feedback
-> customer commitment
-> quarterly objective drift
-> temporal memory snapshot
-> weekly operating review packet
-> company brain entry / gap
-> candidate decision
-> proposed engineering work
-> ContractSpec proposal
-> scoped agent organization
-> handoff/delegation policy
-> agent-native operation authority/autonomy classification
-> product-lead review surface selection
-> draft-only agent action
-> operator inbox approval
-> V1 operating review summary

The example validates the V1 fixture with CompanyOS public validation helpers before building the replay. It uses pure runtime projections for authority, autonomy, inbox routing, and operating-review summarization. It does not bind real providers, send customer messages, perform filesystem/network I/O, or execute production work. The optional ./ui surface is a deterministic compatibility preview adapter over the package replay data while canonical reusable CompanyOS UI is promoted into @lssm-tech/module.companyos/ui.

Preview / export workflow

This package stays provider-free and replay-led. It must not add live provider bindings, network I/O, filesystem I/O, outbound sends, or production mutation paths.

./ui is a thin deterministic compatibility adapter for the focused example: it derives preview metrics from buildCompanyOsProductEngineeringReplay() and preserves draft-only, dry-run, approval-gated semantics. New reusable/canonical CompanyOS UI should live in @lssm-tech/module.companyos/ui; this example should consume that module-owned surface once available rather than growing new canonical screens here.

Running locally

From examples/companyos-product-engineering-loop:

  • bun run build
  • bun run typecheck
  • bun run test
  • bun run smoke
  • bun run preflight

Usage

ts
import { buildCompanyOsProductEngineeringReplay } from '@lssm-tech/example.companyos-product-engineering-loop/replay';

const replay = buildCompanyOsProductEngineeringReplay();
console.log(replay.reviewPacket.runtimeSummary);
console.log(replay.steps.map((step) => step.label));

Public entry points

  • @lssm-tech/example.companyos-product-engineering-loop
  • @lssm-tech/example.companyos-product-engineering-loop/example
  • @lssm-tech/example.companyos-product-engineering-loop/companyos-product-engineering-loop.feature
  • @lssm-tech/example.companyos-product-engineering-loop/replay
  • @lssm-tech/example.companyos-product-engineering-loop/docs
  • @lssm-tech/example.companyos-product-engineering-loop/ui

Safety boundaries

  • The replay consumes public CompanyOS fixture, validation, and runtime APIs only.
  • Agent-native operations remain draft-only, dry-run constrained, and approval-gated.
  • Customer-facing action execution is represented as an operator inbox approval, not a provider write.
  • No real providers, network I/O, filesystem I/O, outbound sends, or production mutation paths are included.
  • ./ui remains a deterministic preview adapter and must not become the canonical reusable CompanyOS UI surface.

Declaration publication uses contractspec-bun-build types through build:types; build runs bundle and declaration generation. The build config preserves declared exports and excludes test-only files from generated build artifacts. Package tests and typecheck remain separate verification gates.

Relationships

THIS PACKAGEexample.companyos-product-engineering-loop7 import paths

Arrows point from a package to its direct dependency. Counts are derived from captured workspace manifests.

7 declarations

Declared capabilities

This manifest does not declare a capability catalogue. Use the guide, import map and source to assess the package.

Scripts

  • buildcontractspec-bun-build build
  • typechecktsgo --noEmit
  • testbun test
  • smokebun test src/example.smoke.test.ts
  • preflightbun run build && bun run typecheck && bun run test && bun run smoke
  • build:bundlecontractspec-bun-build transpile
  • build:typescontractspec-bun-build types