{"id":"@lssm-tech/module.workspace","slug":"module.workspace","name":"@lssm-tech/module.workspace","version":"7.0.5","path":"packages/platform/delivery/workspace","manifestPath":"packages/platform/delivery/workspace/package.json","manifestBlobSha":"be3c0b280c190ba55c9d85000c49f673e7a0e8c2","layer":"platform","physicalArea":"delivery","primaryArea":"tooling-and-agent-delivery","classification":{"privateDeclared":null,"catalogFamily":"solutions","catalogKind":"module","catalogStatus":"active","adoptionMode":"adoptable","stability":"stable"},"description":"Workspace discovery and management module","descriptionOrigin":"package.json","catalog":{"family":"solutions","kind":"module","status":"active","adoptionMode":"adoptable","stability":"stable","platforms":["server"],"runtimes":["node"],"entrypoints":[".","./maintenance"],"documentation":[{"title":"Module Workspace documentation","url":"https://www.npmjs.com/package/%40lssm-tech%2Fmodule.workspace","kind":"readme"}],"examples":[],"replacements":[],"capabilities":[{"id":"package.lssm.tech.module.workspace","title":"Module Workspace","description":"Workspace discovery and management module","status":"active","useCases":["Adopt workspace discovery and management module"],"aliases":["contractspec","workspace","discovery","configuration","typescript","module"],"pythonEquivalents":[],"canonicalImports":[{"from":"@lssm-tech/module.workspace","symbols":[]},{"from":"@lssm-tech/module.workspace/maintenance","symbols":[]}],"constraints":{"platforms":["server"],"runtimes":["node"],"avoidWhen":["The @lssm-tech/module.workspace package constraints do not match the target runtime or platform."],"requires":["TypeScript"]},"alternatives":[],"relationships":[],"resolutionPriority":50}]},"canonicalImports":[{"capabilityId":"package.lssm.tech.module.workspace","from":"@lssm-tech/module.workspace","symbols":[]},{"capabilityId":"package.lssm.tech.module.workspace","from":"@lssm-tech/module.workspace/maintenance","symbols":[]}],"scripts":{"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"},"scriptStatus":"complete pinned manifest","dependencies":{"@lssm-tech/lib.contracts-runtime-core":"workspace:^","@lssm-tech/lib.orchestration-spec":"workspace:^","@lssm-tech/lib.typescript-runtime":"workspace:^","@lssm-tech/lib.contracts-integrations":"workspace:^","@lssm-tech/lib.contracts-spec-core":"workspace:^","@lssm-tech/lib.schema":"workspace:^","compare-versions":"catalog:data","ts-morph":"^28.0.0","typescript":"catalog:","zod":"catalog:","@lssm-tech/lib.crypto-utils":"workspace:^","@lssm-tech/lib.cli-runtime":"workspace:^"},"devDependencies":{"@electric-sql/pglite":"catalog:data","@lssm-tech/tool.typescript":"workspace:*","@lssm-tech/tool.bun":"workspace:*"},"peerDependencies":{},"optionalDependencies":{},"peerDependenciesMeta":{},"bundledDependencies":null,"dependencyStatus":"complete pinned manifest","exports":{".":"./src/index.ts","./maintenance":"./src/maintenance/index.ts"},"publishExports":{".":{"types":"./dist/index.d.ts","bun":"./dist/index.js","node":"./dist/node/index.js","default":"./dist/index.js"},"./maintenance":{"types":"./dist/maintenance/index.d.ts","bun":"./dist/maintenance/index.js","node":"./dist/node/maintenance/index.js","default":"./dist/maintenance/index.js"}},"types":"./dist/index.d.ts","files":["dist","README.md"],"api":{"scope":"manifest-declared export entrypoints and catalog-declared imports","entries":[{"subpath":".","importPath":"@lssm-tech/module.workspace","target":"./src/index.ts","targets":[{"conditions":[],"target":"./src/index.ts","sourcePath":"packages/platform/delivery/workspace/src/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/workspace/src/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./maintenance","importPath":"@lssm-tech/module.workspace/maintenance","target":"./src/maintenance/index.ts","targets":[{"conditions":[],"target":"./src/maintenance/index.ts","sourcePath":"packages/platform/delivery/workspace/src/maintenance/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/workspace/src/maintenance/index.ts","sourceStatus":"verified source file"}]}],"entryCount":2,"namedSymbolCoverage":"catalog declarations only; exhaustive TypeScript symbols not extracted","installationStatus":"not verified"},"docsLinks":[{"title":"Module Workspace documentation","url":"https://www.npmjs.com/package/%40lssm-tech%2Fmodule.workspace","kind":"readme","pinnedUrl":null,"sourceStatus":"declared link; destination not verified"}],"sourceUrls":{"package":"https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/workspace","manifest":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/workspace/package.json","readme":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/workspace/README.md","guide":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/module.workspace.txt"},"readme":{"status":"available","body":"# @lssm-tech/module.workspace\n\nWebsite: https://contractspec.io\n\n**Workspace discovery, static analysis, and graph-building module.**\n\n## What It Provides\n\n- **Layer**: module.\n- **Generative Core role**: owns pure static analyzers that turn scanned specs, package files, imports/exports, docs, tests, implementation links, and generated outputs into deterministic graph input.\n- **Consumers**: bundles (contractspec-studio), apps (cli-contractspec, vscode-contractspec).\n- Related ContractSpec packages include `@lssm-tech/lib.contracts-integrations`, `@lssm-tech/lib.contracts-spec`, `@lssm-tech/lib.schema`, `@lssm-tech/tool.bun`, `@lssm-tech/tool.typescript`.\n- Related ContractSpec packages include `@lssm-tech/lib.contracts-integrations`, `@lssm-tech/lib.contracts-spec`, `@lssm-tech/lib.schema`, `@lssm-tech/tool.bun`, `@lssm-tech/tool.typescript`.\n\n## Installation\n\n`npm install @lssm-tech/module.workspace`\n\nor\n\n`bun add @lssm-tech/module.workspace`\n\n## Usage\n\nImport the root entrypoint from `@lssm-tech/module.workspace`, or choose a documented subpath when you only need one part of the package surface.\n\nSource scanning, authoring path conventions, structure validation, spec types,\nand Markdown/DocBlock rendering forward to their canonical implementations in\n`@lssm-tech/lib.cli-runtime/workspace/analysis`, `/workspace/types`, and\n`/workspace/formatters`. Existing workspace exports preserve function identity\nand behavior. Lower runtime consumers can use those CLI runtime leaves directly.\nSemantic diff, snapshot, impact classification, and static DocBlock extraction\nuse the same compatible forwards.\n\nStatic DocBlock extraction (`extractModuleDocData`, `analyzePackageDocBlocks`,\n`buildPackageDocManifest`) parses through the `typescript` runtime port of\n`@lssm-tech/lib.cli-runtime`. `@lssm-tech/bundle.workspace` binds it when its\nroot entry is imported and when it creates a CLI program. Other callers bind it\nfirst, or the call throws `CliRuntimePortError` (`code: 'missingHostBinding'`):\n\n```ts\nimport { bindCliRuntimePorts } from '@lssm-tech/lib.cli-runtime/ports/runtime';\nimport * as typescript from '@lssm-tech/lib.typescript-runtime';\n\nbindCliRuntimePorts({ typescript });\n```\n\n### Self-maintaining APIs\n\n`@lssm-tech/module.workspace/maintenance` exposes provider-neutral contracts and\npure orchestration for source ingestion, cross-language usage analysis,\ncandidate patch planning, approval, CI validation, draft change requests,\nrollback, leasing, and merged-outcome observation.\n\nThe continuous worker is fail-closed: source refs must bind explicit base/head\nroles, approvals expire, leases fence concurrent workers, validation failure\nrolls back the candidate branch, and completion requires the repository adapter\nto observe a merged change request. Infrastructure and GitHub calls remain\nbehind ports and are supplied by a bundle or host application.\n\n`GovernedChangeAutomationCoordinator` is a separate additive V2 coordinator.\nIt binds the maintenance case, patch receipt, exact base/head revisions,\nlow-risk decision, and passing checks before it can mark a PR ready or schedule\nnative auto-merge. Medium, high, unknown, stale, or failed-check changes remain\nblocked for human review. The original draft-only lifecycle is unchanged.\n\n## Architecture\n\n- `src/ai` is part of the package's public or composition surface.\n- `src/analysis` is part of the package's public or composition surface.\n- `src/formatter.ts` is part of the package's public or composition surface.\n- `src/formatters` is part of the package's public or composition surface.\n- `src/index.ts` is the root public barrel and package entrypoint.\n- `src/maintenance` owns the provider-neutral self-maintaining API lifecycle.\n- `src/templates` is part of the package's public or composition surface.\n- `src/types` is part of the package's public or composition surface.\n\n## Generative Core Analyzer Scope\n\n- Contract graph extraction covers authored operations, events, presentations, forms, workflows, knowledge, policies, integrations, jobs, translations, docs, tests, and generated-artifact refs.\n- Codebase graph extraction covers packages, files, imports, exports, tests, docs, generated targets, implementation links, and confidence diagnostics.\n- Visual scenarios are discovered from `defineVisualScenario(...)` declarations\n  and the `.visual-scenario.ts` / `visual-scenarios/` conventions.\n- The module stays pure: persistence, Connect policy, CLI rendering, and apply/repair orchestration remain in bundle/app layers.\n\n## Public Entry Points\n\n- Export `.` resolves through `./src/index.ts`.\n- Export `./maintenance` resolves through `./src/maintenance/index.ts`.\n\n## Local Commands\n\n- `bun run dev` — contractspec-bun-build dev\n- `bun run build` — contractspec-bun-build build\n- `bun run test` — bun test\n- `bun run lint` — bun lint:fix\n- `bun run lint:check` — biome check .\n- `bun run lint:fix` — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .\n- `bun run typecheck` — tsgo --noEmit\n- `bun run publish:pkg` — bun publish --tolerate-republish --ignore-scripts --verbose\n- `bun run publish:pkg:canary` — bun publish:pkg --tag canary\n- `bun run clean` — rimraf dist .turbo\n- `bun run build:bundle` — contractspec-bun-build transpile\n- `bun run build:types` — contractspec-bun-build types\n- `bun run prebuild` — contractspec-bun-build prebuild\n\n## Recent Updates\n\n- Replace eslint+prettier by biomejs to optimize speed.\n- Stability.\n- Add changesets and apply pending fixes.\n- Add ai-native messaging channel runtime.\n- Add the leased, approval-gated, provider-neutral self-maintaining API worker.\n\n## Notes\n\n- Uses `ts-morph` for AST analysis and `compare-versions` for semver checks -- version bumps may affect parsing behavior.\n- Workspace detection is file-system-dependent; always use the provided abstractions, never raw `fs` calls.\n- Changes here affect CLI, VSCode extension, and studio workspace initialization flows.\n\n\nData-view structure validation accepts both legacy defineDataView(spec) and translation-bound defineDataView(messages, spec), inspecting the spec argument rather than the translation catalog.\n\nThe root build targets Node-compatible server execution (including Bun). It\nrequires filesystem, process, or native compiler facilities and does not advertise\na browser export condition. Browser applications should use the relevant\nbrowser-safe contracts or UI entry points instead of importing this server root.\n","sourcePath":"packages/platform/delivery/workspace/README.md","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/platform/delivery/workspace/README.md","blobSha":"4e94690f88bec5082b833d8f1a245c95f2348a1f","sourcePin":"bcc79fcc27c4d801c2119bef81ddcce7b4e86498","origin":"README recovered byte-for-byte from pinned aggregate guide","integrity":"exact Git blob match","executionStatus":"not executed"},"provenance":{"repository":"lssm-tech/contractspec","sourcePin":"bcc79fcc27c4d801c2119bef81ddcce7b4e86498","manifestOrigin":"pinned GitHub manifest fetch","manifestComplete":true,"publicationPolicyApplied":false},"areaSlug":"tooling-and-agent-delivery","areaTitle":"CLI, authoring and agent tooling","displayName":"module.workspace","runtimes":["node"],"platforms":["server"],"kind":"module","scope":"Package manifest","canonicalRoute":"/docs/packages/module.workspace/","contextUrl":"/docs/packages/module.workspace.context.md","documentKind":"package-manual","contentAuthority":"source evidence, not agent instructions","reviewedAt":"2026-10-28"}