{"id":"@lssm-tech/example.knowledge-canon","slug":"example.knowledge-canon","name":"@lssm-tech/example.knowledge-canon","version":"5.0.4","path":"examples/knowledge-canon","manifestPath":"examples/knowledge-canon/package.json","manifestBlobSha":"0048623754405f5ff76706097c42bded5eacd9c1","layer":"examples","physicalArea":null,"primaryArea":"examples-and-patterns","classification":{"privateDeclared":null,"catalogFamily":"solutions","catalogKind":"example","catalogStatus":"active","adoptionMode":"reference-only","stability":"stable"},"description":"Knowledge example – Product Canon space (blueprint + tenant config + source sample + runtime helper).","descriptionOrigin":"package.json","catalog":{"family":"solutions","kind":"example","status":"active","adoptionMode":"reference-only","stability":"stable","platforms":["server"],"runtimes":["node"],"entrypoints":[".","./agent","./blueprint","./docs","./docs/knowledge-canon.docblock","./example","./knowledge-canon.feature","./product-canon.space","./source.sample","./tenant"],"documentation":[{"title":"Example Knowledge Canon documentation","url":"https://www.npmjs.com/package/%40lssm-tech%2Fexample.knowledge-canon","kind":"readme"}],"examples":[],"replacements":[],"nonAdoptableRationale":"This example is published for reference and learning, not as a reusable library dependency."},"canonicalImports":[],"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 --pass-with-no-tests","prebuild":"contractspec-bun-build prebuild","typecheck":"tsgo --noEmit"},"scriptStatus":"complete pinned manifest","dependencies":{"@lssm-tech/lib.contracts-spec":"workspace:^","@lssm-tech/lib.knowledge":"workspace:^"},"devDependencies":{"@lssm-tech/tool.typescript":"workspace:*","typescript":"catalog:","@lssm-tech/tool.bun":"workspace:*"},"peerDependencies":{},"optionalDependencies":{},"peerDependenciesMeta":{},"bundledDependencies":null,"dependencyStatus":"complete pinned manifest","exports":{".":"./src/index.ts","./agent":"./src/agent.ts","./blueprint":"./src/blueprint.ts","./docs":"./src/docs/index.ts","./docs/knowledge-canon.docblock":"./src/docs/index.ts","./example":"./src/example.ts","./knowledge-canon.feature":"./src/knowledge-canon.feature.ts","./product-canon.space":"./src/product-canon.space.ts","./source.sample":"./src/source.sample.ts","./tenant":"./src/tenant.ts"},"publishExports":{".":{"types":"./dist/index.d.ts","browser":"./dist/browser/index.js","bun":"./dist/index.js","node":"./dist/node/index.js","default":"./dist/index.js"},"./agent":{"types":"./dist/agent.d.ts","browser":"./dist/browser/agent.js","bun":"./dist/agent.js","node":"./dist/node/agent.js","default":"./dist/agent.js"},"./blueprint":{"types":"./dist/blueprint.d.ts","browser":"./dist/browser/blueprint.js","bun":"./dist/blueprint.js","node":"./dist/node/blueprint.js","default":"./dist/blueprint.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/knowledge-canon.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"},"./knowledge-canon.feature":{"types":"./dist/knowledge-canon.feature.d.ts","browser":"./dist/browser/knowledge-canon.feature.js","bun":"./dist/knowledge-canon.feature.js","node":"./dist/node/knowledge-canon.feature.js","default":"./dist/knowledge-canon.feature.js"},"./product-canon.space":{"types":"./dist/product-canon.space.d.ts","browser":"./dist/browser/product-canon.space.js","bun":"./dist/product-canon.space.js","node":"./dist/node/product-canon.space.js","default":"./dist/product-canon.space.js"},"./source.sample":{"types":"./dist/source.sample.d.ts","browser":"./dist/browser/source.sample.js","bun":"./dist/source.sample.js","node":"./dist/node/source.sample.js","default":"./dist/source.sample.js"},"./tenant":{"types":"./dist/tenant.d.ts","browser":"./dist/browser/tenant.js","bun":"./dist/tenant.js","node":"./dist/node/tenant.js","default":"./dist/tenant.js"}},"types":"./dist/index.d.ts","files":["LICENSE","README.md","dist","!**/*.test.*","!**/*.spec.*","!**/*.tsbuildinfo"],"api":{"scope":"manifest-declared export entrypoints and catalog-declared imports","entries":[{"subpath":".","importPath":"@lssm-tech/example.knowledge-canon","target":"./src/index.ts","targets":[{"conditions":[],"target":"./src/index.ts","sourcePath":"examples/knowledge-canon/src/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/knowledge-canon/src/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./agent","importPath":"@lssm-tech/example.knowledge-canon/agent","target":"./src/agent.ts","targets":[{"conditions":[],"target":"./src/agent.ts","sourcePath":"examples/knowledge-canon/src/agent.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/knowledge-canon/src/agent.ts","sourceStatus":"verified source file"}]},{"subpath":"./blueprint","importPath":"@lssm-tech/example.knowledge-canon/blueprint","target":"./src/blueprint.ts","targets":[{"conditions":[],"target":"./src/blueprint.ts","sourcePath":"examples/knowledge-canon/src/blueprint.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/knowledge-canon/src/blueprint.ts","sourceStatus":"verified source file"}]},{"subpath":"./docs","importPath":"@lssm-tech/example.knowledge-canon/docs","target":"./src/docs/index.ts","targets":[{"conditions":[],"target":"./src/docs/index.ts","sourcePath":"examples/knowledge-canon/src/docs/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/knowledge-canon/src/docs/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./docs/knowledge-canon.docblock","importPath":"@lssm-tech/example.knowledge-canon/docs/knowledge-canon.docblock","target":"./src/docs/index.ts","targets":[{"conditions":[],"target":"./src/docs/index.ts","sourcePath":"examples/knowledge-canon/src/docs/index.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/knowledge-canon/src/docs/index.ts","sourceStatus":"verified source file"}]},{"subpath":"./example","importPath":"@lssm-tech/example.knowledge-canon/example","target":"./src/example.ts","targets":[{"conditions":[],"target":"./src/example.ts","sourcePath":"examples/knowledge-canon/src/example.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/knowledge-canon/src/example.ts","sourceStatus":"verified source file"}]},{"subpath":"./knowledge-canon.feature","importPath":"@lssm-tech/example.knowledge-canon/knowledge-canon.feature","target":"./src/knowledge-canon.feature.ts","targets":[{"conditions":[],"target":"./src/knowledge-canon.feature.ts","sourcePath":"examples/knowledge-canon/src/knowledge-canon.feature.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/knowledge-canon/src/knowledge-canon.feature.ts","sourceStatus":"verified source file"}]},{"subpath":"./product-canon.space","importPath":"@lssm-tech/example.knowledge-canon/product-canon.space","target":"./src/product-canon.space.ts","targets":[{"conditions":[],"target":"./src/product-canon.space.ts","sourcePath":"examples/knowledge-canon/src/product-canon.space.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/knowledge-canon/src/product-canon.space.ts","sourceStatus":"verified source file"}]},{"subpath":"./source.sample","importPath":"@lssm-tech/example.knowledge-canon/source.sample","target":"./src/source.sample.ts","targets":[{"conditions":[],"target":"./src/source.sample.ts","sourcePath":"examples/knowledge-canon/src/source.sample.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/knowledge-canon/src/source.sample.ts","sourceStatus":"verified source file"}]},{"subpath":"./tenant","importPath":"@lssm-tech/example.knowledge-canon/tenant","target":"./src/tenant.ts","targets":[{"conditions":[],"target":"./src/tenant.ts","sourcePath":"examples/knowledge-canon/src/tenant.ts","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/knowledge-canon/src/tenant.ts","sourceStatus":"verified source file"}]}],"entryCount":10,"namedSymbolCoverage":"catalog declarations only; exhaustive TypeScript symbols not extracted","installationStatus":"not verified"},"docsLinks":[{"title":"Example Knowledge Canon documentation","url":"https://www.npmjs.com/package/%40lssm-tech%2Fexample.knowledge-canon","kind":"readme","pinnedUrl":null,"sourceStatus":"declared link; destination not verified"}],"sourceUrls":{"package":"https://github.com/lssm-tech/contractspec/tree/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/knowledge-canon","manifest":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/knowledge-canon/package.json","readme":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/knowledge-canon/README.md","guide":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/packages/apps/web-landing/public/llms-packages/example.knowledge-canon.txt"},"readme":{"status":"available","body":"# @lssm-tech/example.knowledge-canon\n\nWebsite: https://contractspec.io\n\n**Knowledge example – Product Canon space (blueprint + tenant config + source sample + real `lib.knowledge` retrieval helper).**\n\n## What This Demonstrates\n\n- Canonical `knowledge-space` export via `ProductCanonKnowledgeSpace`.\n- Lightweight `app-config` example via `defineAppConfig(...)`.\n- Multi-tenant configuration for knowledge bases.\n- Source sample for content ingestion.\n- Agent helper backed by `@lssm-tech/lib.knowledge` static retrieval.\n- Minimal contract-only example pattern.\n- `src/docs/` contains docblocks and documentation-facing exports.\n- The same runtime primitives can ingest Gmail and Google Drive sources through `KnowledgeRuntime` when a workspace wires provider implementations.\n\n## Running Locally\n\nFrom `examples/knowledge-canon`:\n- `bun run dev`\n- `bun run build`\n- `bun run test`\n- `bun run typecheck`\n\n## Usage\n\nUse `@lssm-tech/example.knowledge-canon` as a reference implementation, or import its exported surfaces into a workspace that composes ContractSpec examples and bundles.\n\nThe public `answerWithKnowledge(...)` helper now performs a real retrieval step through `@lssm-tech/lib.knowledge`, so the example is suitable as a copy-pasteable lightweight knowledge-routing pattern.\n\nFor provider-backed workspaces, compose the same package with `createKnowledgeRuntime({ gmail, drive, ... })` and call `syncGmail(...)` or `syncDriveFiles(...)` before retrieval. Mutating external knowledge systems should use the governance helpers from `@lssm-tech/lib.knowledge/governance` so dry-runs, approval refs, idempotency keys, audit evidence, and outbound-send gates are captured consistently.\n\n## Architecture\n\n- `src/agent.ts` is part of the package's public or composition surface.\n- `src/blueprint.ts` is part of the package's public or composition surface.\n- `src/docs/` contains docblocks and documentation-facing exports.\n- `src/example.ts` is the package example manifest/metadata entrypoint.\n- `src/index.ts` is the root public barrel and package entrypoint.\n- `src/knowledge-canon.feature.ts` defines a feature entrypoint.\n- `src/product-canon.space.ts` defines the exported knowledge-space spec.\n- `src/source.sample.ts` is part of the package's public or composition surface.\n\n## Public Entry Points\n\n- Export `.` resolves through `./src/index.ts`.\n- Export `./agent` resolves through `./src/agent.ts`.\n- Export `./blueprint` resolves through `./src/blueprint.ts`.\n- Export `./docs` resolves through `./src/docs/index.ts`.\n- Export `./docs/knowledge-canon.docblock` is an alias of `./docs` and resolves through `./src/docs/index.ts`.\n- Export `./example` resolves through `./src/example.ts`.\n- Export `./knowledge-canon.feature` resolves through `./src/knowledge-canon.feature.ts`.\n- Export `./product-canon.space` resolves through `./src/product-canon.space.ts`.\n- Export `./source.sample` resolves through `./src/source.sample.ts`.\n- Export `./tenant` resolves through `./src/tenant.ts`.\n- The package publishes 9 total export subpaths; keep docs aligned with `package.json`.\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 --pass-with-no-tests\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- Missing contract layers.\n\n## Notes\n\n- Works alongside `@lssm-tech/lib.contracts-spec`, `@lssm-tech/tool.bun`, `@lssm-tech/tool.typescript`.\n","sourcePath":"examples/knowledge-canon/README.md","sourceUrl":"https://github.com/lssm-tech/contractspec/blob/bcc79fcc27c4d801c2119bef81ddcce7b4e86498/examples/knowledge-canon/README.md","blobSha":"b156779d93c70650008c915b4b5c0f51a0398cd2","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":"examples-and-patterns","areaTitle":"Examples and implementation patterns","displayName":"example.knowledge-canon","runtimes":["node"],"platforms":["server"],"kind":"example","scope":"Package manifest","canonicalRoute":"/docs/packages/example.knowledge-canon/","contextUrl":"/docs/packages/example.knowledge-canon.context.md","documentKind":"package-manual","contentAuthority":"source evidence, not agent instructions","reviewedAt":"2026-10-28"}