@lssm/example.lifecycle-cli 0.0.0-canary-20251217062139 → 0.0.0-canary-20251217072406

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (124) hide show
  1. package/.turbo/turbo-build$colon$bundle.log +202 -195
  2. package/.turbo/turbo-build.log +203 -18
  3. package/CHANGELOG.md +6 -5
  4. package/dist/bundles/lifecycle-managed/dist/agents/lifecycle-advisor-agent.js +67 -2
  5. package/dist/bundles/lifecycle-managed/dist/api/rest-handlers.js +22 -1
  6. package/dist/bundles/lifecycle-managed/dist/events/lifecycle-events.js +1 -1
  7. package/dist/bundles/lifecycle-managed/dist/index.js +4 -1
  8. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/agent/agent-factory.js +1 -1
  9. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/agent/contract-spec-agent.js +14 -1
  10. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/agent/index.js +2 -1
  11. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/approval/index.js +1 -1
  12. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/approval/workflow.js +1 -1
  13. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/index.js +14 -1
  14. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/schema/index.js +2 -1
  15. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/schema/json-schema-to-zod.js +1 -1
  16. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/schema/schema-output.js +3 -1
  17. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/spec/spec.js +23 -1
  18. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/tools/index.js +4 -1
  19. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/tools/knowledge-tool.js +2 -1
  20. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/tools/mcp-client.js +2 -1
  21. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/tools/mcp-server.js +3 -1
  22. package/dist/bundles/lifecycle-managed/dist/libs/ai-agent/dist/tools/tool-adapter.js +2 -1
  23. package/dist/bundles/lifecycle-managed/dist/libs/analytics/dist/churn/index.js +1 -1
  24. package/dist/bundles/lifecycle-managed/dist/libs/analytics/dist/churn/predictor.js +1 -1
  25. package/dist/bundles/lifecycle-managed/dist/libs/analytics/dist/cohort/index.js +1 -1
  26. package/dist/bundles/lifecycle-managed/dist/libs/analytics/dist/cohort/tracker.js +1 -1
  27. package/dist/bundles/lifecycle-managed/dist/libs/analytics/dist/index.js +4 -1
  28. package/dist/bundles/lifecycle-managed/dist/libs/lifecycle/dist/index.js +4 -1
  29. package/dist/bundles/lifecycle-managed/dist/libs/lifecycle/dist/types/axes.js +28 -1
  30. package/dist/bundles/lifecycle-managed/dist/libs/lifecycle/dist/types/milestones.js +1 -1
  31. package/dist/bundles/lifecycle-managed/dist/libs/lifecycle/dist/types/signals.js +1 -1
  32. package/dist/bundles/lifecycle-managed/dist/libs/lifecycle/dist/types/stages.js +15 -1
  33. package/dist/bundles/lifecycle-managed/dist/libs/lifecycle/dist/utils/formatters.js +1 -1
  34. package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/index.js +7 -1
  35. package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/intent/detector.js +1 -1
  36. package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/lifecycle/dist/index.js +4 -1
  37. package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/lifecycle/dist/types/milestones.js +1 -1
  38. package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/lifecycle/dist/types/signals.js +1 -1
  39. package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/lifecycle/dist/types/stages.js +143 -1
  40. package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/lifecycle/dist/utils/formatters.js +7 -1
  41. package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/logging/index.js +38 -1
  42. package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/metrics/index.js +20 -1
  43. package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/pipeline/evolution-pipeline.js +2 -1
  44. package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/pipeline/lifecycle-pipeline.js +73 -1
  45. package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/tracing/index.js +1 -1
  46. package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/tracing/middleware.js +2 -1
  47. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/ceremony/ceremony-designer.js +17 -1
  48. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/data/library-stage-map.js +90 -1
  49. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/data/stage-playbooks.js +240 -1
  50. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/index.js +3 -1
  51. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/index.js +4 -1
  52. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/milestones.js +1 -1
  53. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/signals.js +1 -1
  54. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/stages.js +143 -1
  55. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/utils/formatters.js +1 -1
  56. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/recommendations/library-recommender.js +19 -1
  57. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/recommendations/recommendation-engine.js +46 -1
  58. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/collectors/signal-collector.js +65 -1
  59. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/data/milestones-catalog.js +73 -1
  60. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/data/stage-weights.js +169 -1
  61. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/index.js +3 -1
  62. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/index.js +4 -1
  63. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/axes.js +28 -1
  64. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/milestones.js +1 -1
  65. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/signals.js +1 -1
  66. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/types/stages.js +143 -1
  67. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/libs/lifecycle/dist/utils/formatters.js +1 -1
  68. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/orchestrator/lifecycle-orchestrator.js +53 -1
  69. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/planning/milestone-planner.js +16 -1
  70. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-core/dist/scoring/stage-scorer.js +64 -1
  71. package/dist/bundles/lifecycle-managed/dist/services/assessment-service.js +72 -1
  72. package/dist/demo.js +53 -1
  73. package/dist/docs/index.js +1 -1
  74. package/dist/docs/lifecycle-cli.docblock.js +31 -14
  75. package/dist/example.js +37 -1
  76. package/dist/index.js +5 -1
  77. package/dist/libs/contracts/dist/docs/PUBLISHING.docblock.js +16 -76
  78. package/dist/libs/contracts/dist/docs/accessibility_wcag_compliance_specs.docblock.js +16 -350
  79. package/dist/libs/contracts/dist/docs/index.js +29 -1
  80. package/dist/libs/contracts/dist/docs/presentations.js +71 -1
  81. package/dist/libs/contracts/dist/docs/registry.js +44 -1
  82. package/dist/libs/contracts/dist/docs/tech/PHASE_1_QUICKSTART.docblock.js +16 -383
  83. package/dist/libs/contracts/dist/docs/tech/PHASE_2_AI_NATIVE_OPERATIONS.docblock.js +16 -68
  84. package/dist/libs/contracts/dist/docs/tech/PHASE_3_AUTO_EVOLUTION.docblock.js +16 -140
  85. package/dist/libs/contracts/dist/docs/tech/PHASE_4_PERSONALIZATION_ENGINE.docblock.js +16 -86
  86. package/dist/libs/contracts/dist/docs/tech/PHASE_5_ZERO_TOUCH_OPERATIONS.docblock.js +16 -1
  87. package/dist/libs/contracts/dist/docs/tech/auth/better-auth-nextjs.docblock.js +24 -2
  88. package/dist/libs/contracts/dist/docs/tech/contracts/openapi-export.docblock.js +21 -2
  89. package/dist/libs/contracts/dist/docs/tech/lifecycle-stage-system.docblock.js +16 -213
  90. package/dist/libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js +73 -5
  91. package/dist/libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js +37 -1
  92. package/dist/libs/contracts/dist/docs/tech/presentation-runtime.docblock.js +16 -1
  93. package/dist/libs/contracts/dist/docs/tech/schema/README.docblock.js +20 -262
  94. package/dist/libs/contracts/dist/docs/tech/studio/learning-events.docblock.js +48 -1
  95. package/dist/libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js +24 -2
  96. package/dist/libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js +23 -2
  97. package/dist/libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js +25 -16
  98. package/dist/libs/contracts/dist/docs/tech/studio/project-routing.docblock.js +67 -1
  99. package/dist/libs/contracts/dist/docs/tech/studio/sandbox-unlogged.docblock.js +22 -2
  100. package/dist/libs/contracts/dist/docs/tech/studio/team-invitations.docblock.js +40 -36
  101. package/dist/libs/contracts/dist/docs/tech/studio/workspace-ops.docblock.js +47 -1
  102. package/dist/libs/contracts/dist/docs/tech/studio/workspaces.docblock.js +23 -2
  103. package/dist/libs/contracts/dist/docs/tech/telemetry-ingest.docblock.js +36 -3
  104. package/dist/libs/contracts/dist/docs/tech/templates/runtime.docblock.js +20 -1
  105. package/dist/libs/contracts/dist/docs/tech/vscode-extension.docblock.js +36 -3
  106. package/dist/libs/contracts/dist/docs/tech/workflows/overview.docblock.js +20 -1
  107. package/dist/libs/lifecycle/dist/index.js +5 -1
  108. package/dist/libs/lifecycle/dist/types/axes.js +28 -1
  109. package/dist/libs/lifecycle/dist/types/milestones.js +1 -1
  110. package/dist/libs/lifecycle/dist/types/signals.js +1 -1
  111. package/dist/libs/lifecycle/dist/types/stages.js +151 -1
  112. package/dist/libs/lifecycle/dist/utils/formatters.js +1 -1
  113. package/dist/libs/logger/dist/context.node.js +78 -1
  114. package/dist/libs/logger/dist/elysia-plugin.js +3 -1
  115. package/dist/libs/logger/dist/formatters.js +163 -9
  116. package/dist/libs/logger/dist/index.js +7 -1
  117. package/dist/libs/logger/dist/logger.node.js +189 -1
  118. package/dist/libs/logger/dist/timer.js +126 -1
  119. package/dist/libs/logger/dist/tracer.node.js +115 -1
  120. package/dist/libs/logger/dist/types.js +13 -1
  121. package/package.json +8 -7
  122. package/tsconfig.tsbuildinfo +1 -1
  123. package/dist/bundles/lifecycle-managed/dist/libs/observability/dist/lifecycle/dist/types/axes.js +0 -1
  124. package/dist/bundles/lifecycle-managed/dist/modules/lifecycle-advisor/dist/libs/lifecycle/dist/types/axes.js +0 -1
@@ -1,4 +1,22 @@
1
- import{a as e}from"../../registry.js";e([{id:`docs.tech.llm.overview`,title:`LLM Integration Overview`,summary:`Export specs to LLM-friendly formats, generate implementation guides, and verify implementations.`,kind:`reference`,visibility:`public`,route:`/docs/tech/llm/overview`,tags:[`llm`,`ai`,`export`,`guide`,`verify`],body:`# LLM Integration
1
+ import { registerDocBlocks } from "../../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/llm/llm-integration.docblock.js
4
+ const tech_llm_integration_DocBlocks = [
5
+ {
6
+ id: "docs.tech.llm.overview",
7
+ title: "LLM Integration Overview",
8
+ summary: "Export specs to LLM-friendly formats, generate implementation guides, and verify implementations.",
9
+ kind: "reference",
10
+ visibility: "public",
11
+ route: "/docs/tech/llm/overview",
12
+ tags: [
13
+ "llm",
14
+ "ai",
15
+ "export",
16
+ "guide",
17
+ "verify"
18
+ ],
19
+ body: `# LLM Integration
2
20
 
3
21
  ContractSpec provides first-class LLM integration to bridge specifications and AI coding agents.
4
22
 
@@ -86,7 +104,21 @@ const result = await verifyService.verify(mySpec, implementationCode, {
86
104
  tiers: ['structure', 'behavior']
87
105
  });
88
106
  \`\`\`
89
- `},{id:`docs.tech.llm.export-formats`,title:`LLM Export Formats`,summary:`Detailed explanation of the three export formats for LLM consumption.`,kind:`reference`,visibility:`public`,route:`/docs/tech/llm/export-formats`,tags:[`llm`,`export`,`markdown`],body:`# LLM Export Formats
107
+ `
108
+ },
109
+ {
110
+ id: "docs.tech.llm.export-formats",
111
+ title: "LLM Export Formats",
112
+ summary: "Detailed explanation of the three export formats for LLM consumption.",
113
+ kind: "reference",
114
+ visibility: "public",
115
+ route: "/docs/tech/llm/export-formats",
116
+ tags: [
117
+ "llm",
118
+ "export",
119
+ "markdown"
120
+ ],
121
+ body: `# LLM Export Formats
90
122
 
91
123
  ContractSpec provides three export formats optimized for different LLM use cases.
92
124
 
@@ -151,7 +183,23 @@ The prompt format adapts based on task type:
151
183
  - **test**: Test generation for existing code
152
184
  - **refactor**: Refactoring while maintaining behavior
153
185
  - **review**: Code review against spec
154
- `},{id:`docs.tech.llm.agent-adapters`,title:`Agent Adapters`,summary:`Adapters for different AI coding agents (Claude, Cursor, MCP).`,kind:`reference`,visibility:`public`,route:`/docs/tech/llm/agent-adapters`,tags:[`llm`,`agents`,`claude`,`cursor`,`mcp`],body:`# Agent Adapters
186
+ `
187
+ },
188
+ {
189
+ id: "docs.tech.llm.agent-adapters",
190
+ title: "Agent Adapters",
191
+ summary: "Adapters for different AI coding agents (Claude, Cursor, MCP).",
192
+ kind: "reference",
193
+ visibility: "public",
194
+ route: "/docs/tech/llm/agent-adapters",
195
+ tags: [
196
+ "llm",
197
+ "agents",
198
+ "claude",
199
+ "cursor",
200
+ "mcp"
201
+ ],
202
+ body: `# Agent Adapters
155
203
 
156
204
  ContractSpec provides specialized adapters for different AI coding agents.
157
205
 
@@ -208,7 +256,22 @@ The generic adapter is the default and works across all agents.
208
256
  | Claude Code | Complex implementations | Extended thinking, detailed steps |
209
257
  | Cursor CLI | IDE-integrated work | Cursor rules, compact format |
210
258
  | Generic MCP | Any MCP agent | Universal compatibility |
211
- `},{id:`docs.tech.llm.verification`,title:`Implementation Verification`,summary:`Tiered verification of implementations against specifications.`,kind:`reference`,visibility:`public`,route:`/docs/tech/llm/verification`,tags:[`llm`,`verify`,`validation`,`testing`],body:`# Implementation Verification
259
+ `
260
+ },
261
+ {
262
+ id: "docs.tech.llm.verification",
263
+ title: "Implementation Verification",
264
+ summary: "Tiered verification of implementations against specifications.",
265
+ kind: "reference",
266
+ visibility: "public",
267
+ route: "/docs/tech/llm/verification",
268
+ tags: [
269
+ "llm",
270
+ "verify",
271
+ "validation",
272
+ "testing"
273
+ ],
274
+ body: `# Implementation Verification
212
275
 
213
276
  ContractSpec provides tiered verification to check if implementations comply with specs.
214
277
 
@@ -286,4 +349,9 @@ Each issue has:
286
349
  - **category**: type, export, import, scenario, error_handling, semantic
287
350
  - **message**: Description of the issue
288
351
  - **suggestion**: How to fix it
289
- `}]);
352
+ `
353
+ }
354
+ ];
355
+ registerDocBlocks(tech_llm_integration_DocBlocks);
356
+
357
+ //#endregion
@@ -1 +1,37 @@
1
- import{a as e}from"../registry.js";e([{id:`docs.tech.mcp.endpoints`,title:`ContractSpec MCP endpoints`,summary:`Dedicated MCP servers for docs, CLI usage, and internal development.`,kind:`reference`,visibility:`mixed`,route:`/docs/tech/mcp/endpoints`,tags:[`mcp`,`docs`,`cli`,`internal`],body:"# ContractSpec MCP endpoints\n\nThree dedicated MCP servers keep AI agents efficient and scoped:\n\n- **Docs MCP**: `/api/mcp/docs` — exposes DocBlocks as resources + presentations. Tool: `docs.search`.\n- **CLI MCP**: `/api/mcp/cli` — surfaces CLI quickstart/reference/README and suggests commands. Tool: `cli.suggestCommand`.\n- **Internal MCP**: `/api/mcp/internal` — internal routing hints, playbook, and example registry access. Tool: `internal.describe`.\n\n### Usage notes\n- Transports are HTTP POST (streamable HTTP); SSE is disabled.\n- Resources are namespaced (`docs://*`, `cli://*`, `internal://*`) and are read-only.\n- Internal MCP also exposes the examples registry via `examples://*` resources:\n - `examples://list?q=<query>`\n - `examples://example/<id>`\n- Prompts mirror each surface (navigator, usage, bootstrap) for quick agent onboarding.\n- GraphQL remains at `/graphql`; health at `/health`.\n"}]);
1
+ import { registerDocBlocks } from "../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/mcp-endpoints.docblock.js
4
+ const tech_mcp_endpoints_DocBlocks = [{
5
+ id: "docs.tech.mcp.endpoints",
6
+ title: "ContractSpec MCP endpoints",
7
+ summary: "Dedicated MCP servers for docs, CLI usage, and internal development.",
8
+ kind: "reference",
9
+ visibility: "mixed",
10
+ route: "/docs/tech/mcp/endpoints",
11
+ tags: [
12
+ "mcp",
13
+ "docs",
14
+ "cli",
15
+ "internal"
16
+ ],
17
+ body: `# ContractSpec MCP endpoints
18
+
19
+ Three dedicated MCP servers keep AI agents efficient and scoped:
20
+
21
+ - **Docs MCP**: \`/api/mcp/docs\` — exposes DocBlocks as resources + presentations. Tool: \`docs.search\`.
22
+ - **CLI MCP**: \`/api/mcp/cli\` — surfaces CLI quickstart/reference/README and suggests commands. Tool: \`cli.suggestCommand\`.
23
+ - **Internal MCP**: \`/api/mcp/internal\` — internal routing hints, playbook, and example registry access. Tool: \`internal.describe\`.
24
+
25
+ ### Usage notes
26
+ - Transports are HTTP POST (streamable HTTP); SSE is disabled.
27
+ - Resources are namespaced (\`docs://*\`, \`cli://*\`, \`internal://*\`) and are read-only.
28
+ - Internal MCP also exposes the examples registry via \`examples://*\` resources:
29
+ - \`examples://list?q=<query>\`
30
+ - \`examples://example/<id>\`
31
+ - Prompts mirror each surface (navigator, usage, bootstrap) for quick agent onboarding.
32
+ - GraphQL remains at \`/graphql\`; health at \`/health\`.
33
+ `
34
+ }];
35
+ registerDocBlocks(tech_mcp_endpoints_DocBlocks);
36
+
37
+ //#endregion
@@ -1 +1,16 @@
1
- import{a as e}from"../registry.js";e([{id:`docs.tech.presentation-runtime`,title:`Presentation Runtime`,summary:`Cross-platform runtime for list pages and presentation flows.`,kind:`reference`,visibility:`public`,route:`/docs/tech/presentation-runtime`,tags:[`tech`,`presentation-runtime`],body:"## Presentation Runtime\n\nCross-platform runtime for list pages and presentation flows.\n\n### Packages\n\n- `@lssm/lib.presentation-runtime-core`: shared types and config helpers\n- `@lssm/lib.presentation-runtime-react`: React hooks (web/native-compatible API)\n- `@lssm/lib.presentation-runtime-react-native`: Native entrypoint (re-exports React API for now)\n\n### Next.js config helper\n\n```ts\n// next.config.mjs\nimport { withPresentationNextAliases } from '@lssm/lib.presentation-runtime-core/next';\n\nconst nextConfig = {\n webpack: (config) => withPresentationNextAliases(config),\n};\n\nexport default nextConfig;\n```\n\n### Metro config helper\n\n```js\n// metro.config.js (CJS)\nconst { getDefaultConfig } = require('expo/metro-config');\nconst {\n withPresentationMetroAliases,\n} = require('@lssm/lib.presentation-runtime-core/src/metro.cjs');\n\nconst projectRoot = __dirname;\nconst config = getDefaultConfig(projectRoot);\n\nmodule.exports = withPresentationMetroAliases(config);\n```\n\n### React hooks\n\n- `useListCoordinator`: URL + RHF + derived variables (no fetching)\n- `usePresentationController`: Same plus `fetcher` integration\n- `DataViewRenderer` (design-system): render `DataViewSpec` projections (`list`, `table`, `detail`, `grid`) using shared UI atoms\n\nBoth accept a `useUrlState` adapter. On web, use `useListUrlState` (design-system) or a Next adapter.\n\n### KYC molecules (bundle)\n\n- `ComplianceBadge` in `@lssm/bundle.strit/presentation/components/kyc` renders a status badge for KYC/compliance snapshots. It accepts a `state` (missing_core | incomplete | complete | expiring | unknown) and optional localized `labels`. Prefer consuming apps to pass translated labels (e.g., via `useT('appPlatformAdmin')`).\n\n### Markdown routes and llms.txt\n\n- Each web app exposes `/llms` (and `/llms.txt`, `/llms.md`) via rewrites. See [llmstxt.org](https://llmstxt.org/).\n- Catch‑all markdown handler lives at `app/[...slug].md/route.ts`. It resolves a page descriptor from `app/.presentations.manifest.json` and renders via the `presentations.v2` engine (target: `markdown`).\n- Per‑page companion convention: add `app/<route>/ai.ts` exporting a `PresentationDescriptorV2`.\n- Build‑time tool: `tools/generate-presentations-manifest.mjs <app-root>` populates the manifest.\n- CI check: `pnpm llms:check` verifies coverage (% of pages with descriptors) and fails if below threshold.\n"}]);
1
+ import { registerDocBlocks } from "../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/presentation-runtime.docblock.js
4
+ const tech_presentation_runtime_DocBlocks = [{
5
+ id: "docs.tech.presentation-runtime",
6
+ title: "Presentation Runtime",
7
+ summary: "Cross-platform runtime for list pages and presentation flows.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/tech/presentation-runtime",
11
+ tags: ["tech", "presentation-runtime"],
12
+ body: "## Presentation Runtime\n\nCross-platform runtime for list pages and presentation flows.\n\n### Packages\n\n- `@lssm/lib.presentation-runtime-core`: shared types and config helpers\n- `@lssm/lib.presentation-runtime-react`: React hooks (web/native-compatible API)\n- `@lssm/lib.presentation-runtime-react-native`: Native entrypoint (re-exports React API for now)\n\n### Next.js config helper\n\n```ts\n// next.config.mjs\nimport { withPresentationNextAliases } from '@lssm/lib.presentation-runtime-core/next';\n\nconst nextConfig = {\n webpack: (config) => withPresentationNextAliases(config),\n};\n\nexport default nextConfig;\n```\n\n### Metro config helper\n\n```js\n// metro.config.js (CJS)\nconst { getDefaultConfig } = require('expo/metro-config');\nconst {\n withPresentationMetroAliases,\n} = require('@lssm/lib.presentation-runtime-core/src/metro.cjs');\n\nconst projectRoot = __dirname;\nconst config = getDefaultConfig(projectRoot);\n\nmodule.exports = withPresentationMetroAliases(config);\n```\n\n### React hooks\n\n- `useListCoordinator`: URL + RHF + derived variables (no fetching)\n- `usePresentationController`: Same plus `fetcher` integration\n- `DataViewRenderer` (design-system): render `DataViewSpec` projections (`list`, `table`, `detail`, `grid`) using shared UI atoms\n\nBoth accept a `useUrlState` adapter. On web, use `useListUrlState` (design-system) or a Next adapter.\n\n### KYC molecules (bundle)\n\n- `ComplianceBadge` in `@lssm/bundle.strit/presentation/components/kyc` renders a status badge for KYC/compliance snapshots. It accepts a `state` (missing_core | incomplete | complete | expiring | unknown) and optional localized `labels`. Prefer consuming apps to pass translated labels (e.g., via `useT('appPlatformAdmin')`).\n\n### Markdown routes and llms.txt\n\n- Each web app exposes `/llms` (and `/llms.txt`, `/llms.md`) via rewrites. See [llmstxt.org](https://llmstxt.org/).\n- Catch‑all markdown handler lives at `app/[...slug].md/route.ts`. It resolves a page descriptor from `app/.presentations.manifest.json` and renders via the `presentations.v2` engine (target: `markdown`).\n- Per‑page companion convention: add `app/<route>/ai.ts` exporting a `PresentationDescriptorV2`.\n- Build‑time tool: `tools/generate-presentations-manifest.mjs <app-root>` populates the manifest.\n- CI check: `pnpm llms:check` verifies coverage (% of pages with descriptors) and fails if below threshold.\n"
13
+ }];
14
+ registerDocBlocks(tech_presentation_runtime_DocBlocks);
15
+
16
+ //#endregion
@@ -1,262 +1,20 @@
1
- import{a as e}from"../../registry.js";e([{id:`docs.tech.schema.README`,title:`Multi‑File Prisma Schema Conventions (per database)`,summary:`We adopt Prisma multi‑file schema (GA ≥ v6.7) to organize each database’s models by domain and to import core LSSM module schemas locally.`,kind:`reference`,visibility:`public`,route:`/docs/tech/schema/README`,tags:[`tech`,`schema`,`README`],body:`# Multi‑File Prisma Schema Conventions (per database)
2
-
3
- We adopt Prisma multi‑file schema (GA ≥ v6.7) to organize each database’s models by domain and to import core LSSM module schemas locally.
4
-
5
- Canonical layout per DB:
6
-
7
- \`\`\`
8
- prisma/
9
- schema/
10
- main.prisma # datasource + generators only
11
- imported/
12
- lssm_sigil/*.prisma # imported models/enums only (no datasource/generator)
13
- lssm_content/*.prisma # idem
14
- <domain>/*.prisma # vertical‑specific models split by bounded context
15
- \`\`\`
16
-
17
- Notes:
18
-
19
- - Imported files contain only \`model\` and \`enum\` blocks (strip \`datasource\`/\`generator\`).
20
- - Preserve \`@@schema("…")\` annotations to keep tables in their Postgres schemas; we now explicitly list schemas in \`main.prisma\` to avoid P1012: \`schemas = ["public","lssm_sigil","lssm_content","lssm_featureflags","lssm_ops","lssm_planning","lssm_quill","lssm_geoterro"]\`.
21
- - Use \`@lssm/app.cli-database\` CLI: \`database import|check|generate|migrate:*|seed\` to manage a single DB; \`@lssm/app.cli-databases\` orchestrates multiple DBs.
22
-
23
- ## Typed merger config
24
-
25
- - Define imported module list once per DB with a typed config:
26
-
27
- \`\`\`ts
28
- // prisma-merger.config.ts
29
- import { defineMergedPrismaConfig } from '@lssm/app.cli-database';
30
-
31
- export default defineMergedPrismaConfig({
32
- modules: [
33
- '@lssm/app.cli-database-sigil',
34
- '@lssm/app.cli-database-content',
35
- // ...
36
- ],
37
- });
38
- \`\`\`
39
-
40
- - Then run \`database import --target .\` (no need to pass \`--modules\`).
41
-
42
- ## Prisma Config (prisma.config.ts)
43
-
44
- We use Prisma Config per official docs to point Prisma to the multi-file schema folder and migrations:
45
-
46
- \`\`\`ts
47
- // prisma.config.ts
48
- import path from 'node:path';
49
- import { defineConfig } from 'prisma/config';
50
-
51
- export default defineConfig({
52
- schema: path.join('prisma', 'schema'),
53
- migrations: { path: path.join('prisma', 'migrations') },
54
- });
55
- \`\`\`
56
-
57
- Reference: Prisma blog – Organize Your Prisma Schema into Multiple Files: https://www.prisma.io/blog/organize-your-prisma-schema-with-multi-file-support
58
-
59
- ---
60
-
61
- # LSSM Auth (Sigil) – Models & Integration
62
-
63
- This document tracks the identity models and integration points used by the LSSM Sigil module.
64
-
65
- ## Models (Prisma \`lssm_sigil\`)
66
-
67
- - \`User\` – core identity with email, optional phone, role, passkeys, apiKeys
68
- - \`Session\` – session tokens and metadata; includes \`activeOrganizationId\`
69
- - \`Account\` – external providers (password, OAuth)
70
- - \`Organization\` – tenant boundary; includes \`type\` additional field
71
- - \`Member\`, \`Invitation\`, \`Team\`, \`TeamMember\` – org/teams
72
- - \`Role\`, \`Permission\`, \`PolicyBinding\` – RBAC
73
- - \`ApiKey\`, \`Passkey\` – programmable access and WebAuthn
74
- - \`SsoProvider\` – OIDC/SAML provider configuration (org- or user-scoped)
75
- - \`OAuthApplication\`, \`OAuthAccessToken\`, \`OAuthConsent\` – first/third-party OAuth
76
-
77
- These mirror STRIT additions so Better Auth advanced plugins (admin, organization, apiKey, passkey, genericOAuth) work uniformly across apps.
78
-
79
- ## Better Auth (server)
80
-
81
- Enabled methods:
82
-
83
- - Email & password
84
- - Phone OTP (Telnyx)
85
- - Passkey (WebAuthn)
86
- - API keys
87
- - Organizations & Teams
88
- - Generic OAuth (FranceConnect+ via OIDC with JWE/JWS using JOSE)
89
-
90
- Server config lives at \`packages/lssm/modules/sigil/src/application/services/auth.ts\`.
91
-
92
- ## Clients (Expo / React)
93
-
94
- Client config lives at \`packages/lssm/modules/sigil/src/presentation/providers/auth/expo.ts\` with plugins for admin, passkey, apiKey, organization, phone, genericOAuth.
95
-
96
- ## Environment Variables
97
-
98
- Telnyx (phone OTP):
99
-
100
- - \`TELNYX_API_KEY\`
101
- - \`TELNYX_MESSAGING_PROFILE_ID\`
102
- - \`TELNYX_FROM_NUMBER\`
103
-
104
- FranceConnect+ (prefer LSSM*… but STRIT*… fallbacks are supported):
105
-
106
- - \`LSSM_FRANCECONNECTPLUS_DISCOVERY_URL\`
107
- - \`LSSM_FRANCECONNECTPLUS_CLIENT_ID\`
108
- - \`LSSM_FRANCECONNECTPLUS_CLIENT_SECRET\`
109
- - \`LSSM_FRANCECONNECTPLUS_ENC_PRIVATE_KEY_PEM\` (PKCS8; RSA-OAEP-256)
110
-
111
- Generic:
112
-
113
- - \`API_URL_IDENTITIES\` – base URL for Better Auth server
114
- - \`BETTER_AUTH_SECRET\` – server secret
115
-
116
- Keep this in sync with code changes to avoid drift.
117
-
118
- ## HCircle domain splits and auth removal
119
-
120
- - Auth/identity models are not defined locally anymore. They come from \`@lssm/app.cli-database-sigil\` under the \`lssm_sigil\` schema.
121
- - \`packages/hcircle/libs/database-coliving/prisma/schema/domain/\` is split by domain; newsletter/waiting list lives in \`newsletter.prisma\` and uses \`@@map("waiting_list")\`.
122
- - To avoid collisions with module names, the local event models were renamed to \`SocialEvent\`, \`SocialEventAttendee\`, and \`SocialEventRecurrence\` with \`@@map\` pointing to existing table names.
123
-
124
- ---
125
-
126
- ## Vertical profiles (current)
127
-
128
- ### STRIT
129
-
130
- - prisma-merger modules:
131
- - \`@lssm/app.cli-database-sigil\`, \`@lssm/app.cli-database-content\`, \`@lssm/app.cli-database-ops\`, \`@lssm/app.cli-database-planning\`, \`@lssm/app.cli-database-quill\`, \`@lssm/app.cli-database-geoterro\`
132
- - main.prisma schemas:
133
- - \`schemas = ["public","lssm_sigil","lssm_content","lssm_ops","lssm_planning","lssm_quill","lssm_geoterro"]\`
134
- - domain splits (\`packages/strit/libs/database/prisma/schema/domain/\`):
135
- - \`bookings.prisma\` (Booking, StritDocument + links to Content \`File\` and Sigil \`Organization\`)
136
- - \`commerce.prisma\` (Wholesale models; \`sellerId\` linked to Sigil \`Organization\`)
137
- - \`files.prisma\` (PublicFile, PublicFileAccessLog; \`ownerId\`→Organization, \`uploadedBy\`→User)
138
- - \`geo.prisma\` (PublicCountry, PublicAddress, City; links to Spots/Series)
139
- - \`spots.prisma\`, \`urbanism.prisma\`, \`analytics.prisma\`, \`onboarding.prisma\`, \`referrals.prisma\`, \`subscriptions.prisma\`, \`content.prisma\`
140
- - auth models are imported from Sigil (no local auth tables).
141
- - Back-relations for \`Organization\` (e.g., \`files\`, seller relations) are declared in the Sigil module to avoid scattering.
142
-
143
- ### ARTISANOS
144
-
145
- - prisma-merger modules:
146
- - \`@lssm/app.cli-database-sigil\`, \`@lssm/app.cli-database-content\`, \`@lssm/app.cli-database-featureflags\`, \`@lssm/app.cli-database-ops\`, \`@lssm/app.cli-database-planning\`, \`@lssm/app.cli-database-quill\`, \`@lssm/app.cli-database-geoterro\`
147
- - main.prisma schemas:
148
- - \`schemas = ["public","lssm_sigil","lssm_content","lssm_featureflags","lssm_ops","lssm_planning","lssm_quill","lssm_geoterro"]\`
149
- - domain splits (\`packages/artisanos/libs/database-artisan/prisma/schema/domain/\`):
150
- - \`sales.prisma\` (Client, Quote, QuoteTemplate, Invoice, FollowUps)
151
- - \`subsidies.prisma\` (SubsidyProgram, AidApplication, SupportingDocument)
152
- - \`projects.prisma\` (Project, ProjectPlanningSettings)
153
- - \`crm.prisma\` (OrganizationProfessionalProfile, OrganizationCertification)
154
- - \`professions.prisma\`, \`products.prisma\`, \`templates.prisma\`, \`analytics.prisma\`, \`onboarding.prisma\`, \`referrals.prisma\`, \`subscriptions.prisma\`, \`files.prisma\`
155
- - auth/organization/team models are provided by Sigil; local legacy copies were removed.
156
- - Where names collide with Content, local models are prefixed (e.g., \`PublicFile\`) and use \`@@map\` to keep existing table names where applicable.
157
-
158
- ## Schema Dictionary: \`@lssm/lib.schema\`
159
-
160
- ### Purpose
161
-
162
- Describe operation I/O once and generate:
163
-
164
- - zod (runtime validation)
165
- - GraphQL (Pothos types/refs)
166
- - JSON Schema (via \`zod-to-json-schema\` or native descriptors)
167
-
168
- ### Primitives
169
-
170
- - **FieldType<T>**: describes a scalar or composite field and carries:
171
- - \`zod\` schema for validation
172
- - optional JSON Schema descriptor
173
- - optional GraphQL scalar reference/name
174
- - **SchemaModel**: named object model composed of fields. Exposes helpers:
175
- - \`getZod(): z.ZodObject<ZodShapeFromFields<Fields>> | z.ZodArray<z.ZodObject<...>>\`
176
- - Preserves each field's schema, optionality, and array-ness
177
- - Top-level lists are supported via \`config.isArray: true\`
178
- - \`getJsonSchema(): JSONSchema7\` (export for docs, MCP, forms)
179
- - \`getPothosInput()\` (GraphQL input object name)
180
-
181
- ### Conventions
182
-
183
- - Name models with PascalCase; suffix with \`Input\`/\`Result\` when ambiguous.
184
- - Use explicit enums for multi-value constants; reuse the same enum across input/output.
185
- - Define domain enums via \`defineEnum('Name', [...])\` in the relevant domain package (e.g., \`packages/strit/libs/contracts-strit/src/enums/\`), not in \`ScalarTypeEnum\`.
186
- - Reference those enums in \`SchemaModel\` fields directly (they expose \`getZod\`, \`getPothos\`, \`getJsonSchema\`).
187
-
188
- #### Example (STRIT)
189
-
190
- \`\`\`ts
191
- // packages/strit/libs/contracts-strit/src/enums/recurrence.ts
192
- import { defineEnum } from '@lssm/lib.schema';
193
- export const SpotEnum = {
194
- Weekday: () =>
195
- defineEnum('Weekday', ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'] as const),
196
- RecurrenceFrequency: () =>
197
- defineEnum('RecurrenceFrequency', [
198
- 'DAILY',
199
- 'WEEKLY',
200
- 'MONTHLY',
201
- 'YEARLY',
202
- ] as const),
203
- } as const;
204
- \`\`\`
205
-
206
- \`\`\`ts
207
- // usage in contracts
208
- frequency: { type: SpotEnum.RecurrenceFrequency(), isOptional: false },
209
- byWeekday: { type: SpotEnum.Weekday(), isOptional: true, isArray: true },
210
- \`\`\`
211
-
212
- - Use \`Date\` type for temporal values and ensure ISO strings in JSON transports where needed.
213
-
214
- ### Mapping rules (summary)
215
-
216
- - Strings → GraphQL \`String\`
217
- - Numbers → \`Int\` if safe 32-bit integer else \`Float\`
218
- - Booleans → \`Boolean\`
219
- - Dates → custom \`Date\` scalar
220
- - Arrays<T> → list of mapped T (set \`isArray: true\` on the field)
221
- - Top-level arrays → set \`isArray: true\` on the model config
222
- - Objects → input/output object types with stable field order
223
- - Unions → supported for output; input unions map to JSON (structural input is not supported by GraphQL)
224
-
225
- ### JSON Schema export
226
-
227
- Prefer \`getZod()\` + \`zod-to-json-schema\` for consistency. For advanced cases, provide a custom \`getJsonSchema()\` on the model.
228
-
229
- ### Example
230
-
231
- \`\`\`ts
232
- import { ScalarTypeEnum, SchemaModel } from '@lssm/lib.schema';
233
-
234
- // Nested model
235
- const Weekday = new SchemaModel({
236
- name: 'Weekday',
237
- fields: {
238
- value: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
239
- },
240
- });
241
-
242
- // Parent model with array field and nested object
243
- const Rule = new SchemaModel({
244
- name: 'Rule',
245
- fields: {
246
- timezone: { type: ScalarTypeEnum.TimeZone(), isOptional: false },
247
- byWeekday: { type: Weekday, isOptional: true, isArray: true },
248
- },
249
- });
250
-
251
- const CreateThingInput = new SchemaModel({
252
- name: 'CreateThingInput',
253
- fields: {
254
- name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },
255
- rule: { type: Rule, isOptional: false },
256
- },
257
- });
258
-
259
- // zod
260
- const z = CreateThingInput.getZod();
261
- \`\`\`
262
- `}]);
1
+ import { registerDocBlocks } from "../../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/schema/README.docblock.js
4
+ const tech_schema_README_DocBlocks = [{
5
+ id: "docs.tech.schema.README",
6
+ title: "Multi‑File Prisma Schema Conventions (per database)",
7
+ summary: "We adopt Prisma multi‑file schema (GA ≥ v6.7) to organize each database’s models by domain and to import core LSSM module schemas locally.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/tech/schema/README",
11
+ tags: [
12
+ "tech",
13
+ "schema",
14
+ "README"
15
+ ],
16
+ body: "# Multi‑File Prisma Schema Conventions (per database)\n\nWe adopt Prisma multi‑file schema (GA ≥ v6.7) to organize each database’s models by domain and to import core LSSM module schemas locally.\n\nCanonical layout per DB:\n\n```\nprisma/\n schema/\n main.prisma # datasource + generators only\n imported/\n lssm_sigil/*.prisma # imported models/enums only (no datasource/generator)\n lssm_content/*.prisma # idem\n <domain>/*.prisma # vertical‑specific models split by bounded context\n```\n\nNotes:\n\n- Imported files contain only `model` and `enum` blocks (strip `datasource`/`generator`).\n- Preserve `@@schema(\"…\")` annotations to keep tables in their Postgres schemas; we now explicitly list schemas in `main.prisma` to avoid P1012: `schemas = [\"public\",\"lssm_sigil\",\"lssm_content\",\"lssm_featureflags\",\"lssm_ops\",\"lssm_planning\",\"lssm_quill\",\"lssm_geoterro\"]`.\n- Use `@lssm/app.cli-database` CLI: `database import|check|generate|migrate:*|seed` to manage a single DB; `@lssm/app.cli-databases` orchestrates multiple DBs.\n\n## Typed merger config\n\n- Define imported module list once per DB with a typed config:\n\n```ts\n// prisma-merger.config.ts\nimport { defineMergedPrismaConfig } from '@lssm/app.cli-database';\n\nexport default defineMergedPrismaConfig({\n modules: [\n '@lssm/app.cli-database-sigil',\n '@lssm/app.cli-database-content',\n // ...\n ],\n});\n```\n\n- Then run `database import --target .` (no need to pass `--modules`).\n\n## Prisma Config (prisma.config.ts)\n\nWe use Prisma Config per official docs to point Prisma to the multi-file schema folder and migrations:\n\n```ts\n// prisma.config.ts\nimport path from 'node:path';\nimport { defineConfig } from 'prisma/config';\n\nexport default defineConfig({\n schema: path.join('prisma', 'schema'),\n migrations: { path: path.join('prisma', 'migrations') },\n});\n```\n\nReference: Prisma blog – Organize Your Prisma Schema into Multiple Files: https://www.prisma.io/blog/organize-your-prisma-schema-with-multi-file-support\n\n---\n\n# LSSM Auth (Sigil) – Models & Integration\n\nThis document tracks the identity models and integration points used by the LSSM Sigil module.\n\n## Models (Prisma `lssm_sigil`)\n\n- `User` – core identity with email, optional phone, role, passkeys, apiKeys\n- `Session` – session tokens and metadata; includes `activeOrganizationId`\n- `Account` – external providers (password, OAuth)\n- `Organization` – tenant boundary; includes `type` additional field\n- `Member`, `Invitation`, `Team`, `TeamMember` – org/teams\n- `Role`, `Permission`, `PolicyBinding` – RBAC\n- `ApiKey`, `Passkey` – programmable access and WebAuthn\n- `SsoProvider` – OIDC/SAML provider configuration (org- or user-scoped)\n- `OAuthApplication`, `OAuthAccessToken`, `OAuthConsent` – first/third-party OAuth\n\nThese mirror STRIT additions so Better Auth advanced plugins (admin, organization, apiKey, passkey, genericOAuth) work uniformly across apps.\n\n## Better Auth (server)\n\nEnabled methods:\n\n- Email & password\n- Phone OTP (Telnyx)\n- Passkey (WebAuthn)\n- API keys\n- Organizations & Teams\n- Generic OAuth (FranceConnect+ via OIDC with JWE/JWS using JOSE)\n\nServer config lives at `packages/lssm/modules/sigil/src/application/services/auth.ts`.\n\n## Clients (Expo / React)\n\nClient config lives at `packages/lssm/modules/sigil/src/presentation/providers/auth/expo.ts` with plugins for admin, passkey, apiKey, organization, phone, genericOAuth.\n\n## Environment Variables\n\nTelnyx (phone OTP):\n\n- `TELNYX_API_KEY`\n- `TELNYX_MESSAGING_PROFILE_ID`\n- `TELNYX_FROM_NUMBER`\n\nFranceConnect+ (prefer LSSM*… but STRIT*… fallbacks are supported):\n\n- `LSSM_FRANCECONNECTPLUS_DISCOVERY_URL`\n- `LSSM_FRANCECONNECTPLUS_CLIENT_ID`\n- `LSSM_FRANCECONNECTPLUS_CLIENT_SECRET`\n- `LSSM_FRANCECONNECTPLUS_ENC_PRIVATE_KEY_PEM` (PKCS8; RSA-OAEP-256)\n\nGeneric:\n\n- `API_URL_IDENTITIES` – base URL for Better Auth server\n- `BETTER_AUTH_SECRET` – server secret\n\nKeep this in sync with code changes to avoid drift.\n\n## HCircle domain splits and auth removal\n\n- Auth/identity models are not defined locally anymore. They come from `@lssm/app.cli-database-sigil` under the `lssm_sigil` schema.\n- `packages/hcircle/libs/database-coliving/prisma/schema/domain/` is split by domain; newsletter/waiting list lives in `newsletter.prisma` and uses `@@map(\"waiting_list\")`.\n- To avoid collisions with module names, the local event models were renamed to `SocialEvent`, `SocialEventAttendee`, and `SocialEventRecurrence` with `@@map` pointing to existing table names.\n\n---\n\n## Vertical profiles (current)\n\n### STRIT\n\n- prisma-merger modules:\n - `@lssm/app.cli-database-sigil`, `@lssm/app.cli-database-content`, `@lssm/app.cli-database-ops`, `@lssm/app.cli-database-planning`, `@lssm/app.cli-database-quill`, `@lssm/app.cli-database-geoterro`\n- main.prisma schemas:\n - `schemas = [\"public\",\"lssm_sigil\",\"lssm_content\",\"lssm_ops\",\"lssm_planning\",\"lssm_quill\",\"lssm_geoterro\"]`\n- domain splits (`packages/strit/libs/database/prisma/schema/domain/`):\n - `bookings.prisma` (Booking, StritDocument + links to Content `File` and Sigil `Organization`)\n - `commerce.prisma` (Wholesale models; `sellerId` linked to Sigil `Organization`)\n - `files.prisma` (PublicFile, PublicFileAccessLog; `ownerId`→Organization, `uploadedBy`→User)\n - `geo.prisma` (PublicCountry, PublicAddress, City; links to Spots/Series)\n - `spots.prisma`, `urbanism.prisma`, `analytics.prisma`, `onboarding.prisma`, `referrals.prisma`, `subscriptions.prisma`, `content.prisma`\n- auth models are imported from Sigil (no local auth tables).\n- Back-relations for `Organization` (e.g., `files`, seller relations) are declared in the Sigil module to avoid scattering.\n\n### ARTISANOS\n\n- prisma-merger modules:\n - `@lssm/app.cli-database-sigil`, `@lssm/app.cli-database-content`, `@lssm/app.cli-database-featureflags`, `@lssm/app.cli-database-ops`, `@lssm/app.cli-database-planning`, `@lssm/app.cli-database-quill`, `@lssm/app.cli-database-geoterro`\n- main.prisma schemas:\n - `schemas = [\"public\",\"lssm_sigil\",\"lssm_content\",\"lssm_featureflags\",\"lssm_ops\",\"lssm_planning\",\"lssm_quill\",\"lssm_geoterro\"]`\n- domain splits (`packages/artisanos/libs/database-artisan/prisma/schema/domain/`):\n - `sales.prisma` (Client, Quote, QuoteTemplate, Invoice, FollowUps)\n - `subsidies.prisma` (SubsidyProgram, AidApplication, SupportingDocument)\n - `projects.prisma` (Project, ProjectPlanningSettings)\n - `crm.prisma` (OrganizationProfessionalProfile, OrganizationCertification)\n - `professions.prisma`, `products.prisma`, `templates.prisma`, `analytics.prisma`, `onboarding.prisma`, `referrals.prisma`, `subscriptions.prisma`, `files.prisma`\n- auth/organization/team models are provided by Sigil; local legacy copies were removed.\n- Where names collide with Content, local models are prefixed (e.g., `PublicFile`) and use `@@map` to keep existing table names where applicable.\n\n## Schema Dictionary: `@lssm/lib.schema`\n\n### Purpose\n\nDescribe operation I/O once and generate:\n\n- zod (runtime validation)\n- GraphQL (Pothos types/refs)\n- JSON Schema (via `zod-to-json-schema` or native descriptors)\n\n### Primitives\n\n- **FieldType<T>**: describes a scalar or composite field and carries:\n - `zod` schema for validation\n - optional JSON Schema descriptor\n - optional GraphQL scalar reference/name\n- **SchemaModel**: named object model composed of fields. Exposes helpers:\n - `getZod(): z.ZodObject<ZodShapeFromFields<Fields>> | z.ZodArray<z.ZodObject<...>>`\n - Preserves each field's schema, optionality, and array-ness\n - Top-level lists are supported via `config.isArray: true`\n - `getJsonSchema(): JSONSchema7` (export for docs, MCP, forms)\n - `getPothosInput()` (GraphQL input object name)\n\n### Conventions\n\n- Name models with PascalCase; suffix with `Input`/`Result` when ambiguous.\n- Use explicit enums for multi-value constants; reuse the same enum across input/output.\n- Define domain enums via `defineEnum('Name', [...])` in the relevant domain package (e.g., `packages/strit/libs/contracts-strit/src/enums/`), not in `ScalarTypeEnum`.\n- Reference those enums in `SchemaModel` fields directly (they expose `getZod`, `getPothos`, `getJsonSchema`).\n\n#### Example (STRIT)\n\n```ts\n// packages/strit/libs/contracts-strit/src/enums/recurrence.ts\nimport { defineEnum } from '@lssm/lib.schema';\nexport const SpotEnum = {\n Weekday: () =>\n defineEnum('Weekday', ['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'] as const),\n RecurrenceFrequency: () =>\n defineEnum('RecurrenceFrequency', [\n 'DAILY',\n 'WEEKLY',\n 'MONTHLY',\n 'YEARLY',\n ] as const),\n} as const;\n```\n\n```ts\n// usage in contracts\nfrequency: { type: SpotEnum.RecurrenceFrequency(), isOptional: false },\nbyWeekday: { type: SpotEnum.Weekday(), isOptional: true, isArray: true },\n```\n\n- Use `Date` type for temporal values and ensure ISO strings in JSON transports where needed.\n\n### Mapping rules (summary)\n\n- Strings → GraphQL `String`\n- Numbers → `Int` if safe 32-bit integer else `Float`\n- Booleans → `Boolean`\n- Dates → custom `Date` scalar\n- Arrays<T> → list of mapped T (set `isArray: true` on the field)\n- Top-level arrays → set `isArray: true` on the model config\n- Objects → input/output object types with stable field order\n- Unions → supported for output; input unions map to JSON (structural input is not supported by GraphQL)\n\n### JSON Schema export\n\nPrefer `getZod()` + `zod-to-json-schema` for consistency. For advanced cases, provide a custom `getJsonSchema()` on the model.\n\n### Example\n\n```ts\nimport { ScalarTypeEnum, SchemaModel } from '@lssm/lib.schema';\n\n// Nested model\nconst Weekday = new SchemaModel({\n name: 'Weekday',\n fields: {\n value: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },\n },\n});\n\n// Parent model with array field and nested object\nconst Rule = new SchemaModel({\n name: 'Rule',\n fields: {\n timezone: { type: ScalarTypeEnum.TimeZone(), isOptional: false },\n byWeekday: { type: Weekday, isOptional: true, isArray: true },\n },\n});\n\nconst CreateThingInput = new SchemaModel({\n name: 'CreateThingInput',\n fields: {\n name: { type: ScalarTypeEnum.NonEmptyString(), isOptional: false },\n rule: { type: Rule, isOptional: false },\n },\n});\n\n// zod\nconst z = CreateThingInput.getZod();\n```\n"
17
+ }];
18
+ registerDocBlocks(tech_schema_README_DocBlocks);
19
+
20
+ //#endregion
@@ -1 +1,48 @@
1
- import{a as e}from"../../registry.js";e([{id:`docs.tech.studio.learning-events`,title:`Studio Learning Events`,summary:`Studio persists learning/activity events to the database; Sandbox keeps learning local-first and unlogged.`,kind:`reference`,visibility:`public`,route:`/docs/tech/studio/learning-events`,tags:[`studio`,`learning`,`events`,`analytics`,`sandbox`],body:"# Studio Learning Events\n\nStudio emits lightweight **learning/activity events** to support onboarding, ambient coaching, and learning journeys.\n\n## Persistence model\n\n- **Studio**: events are persisted to the database in `StudioLearningEvent` and are organization-scoped (optionally project-scoped).\n- **Sandbox**: events remain **local-only** (unlogged); they must never be sent to backend services.\n\n## GraphQL API\n\n- `recordLearningEvent(input: { name, projectId?, payload? })`\n- `myLearningEvents(projectId?, limit?)`\n- `myOnboardingTracks(productId?, includeProgress?)`\n- `myOnboardingProgress(trackKey)`\n- `dismissOnboardingTrack(trackKey)`\n\n## Common event names (convention)\n\n- `module.navigated` — user navigated to a Studio module (payload at minimum: `{ moduleId }`).\n- `studio.template.instantiated` — created a new Studio project (starter template). Payload commonly includes `{ templateId, projectSlug }`.\n- `spec.changed` — created or updated a Studio spec. Payload may include `{ action: 'create' | 'update', specId?, specType? }`.\n- `regeneration.completed` — finished a “regen/deploy” action (currently emitted on successful Studio deploy actions).\n- `studio.evolution.applied` — completed an Evolution session (payload commonly includes `{ evolutionSessionId }`).\n\nThese events are intentionally minimal and must avoid PII/secrets in payloads.\n"}]);
1
+ import { registerDocBlocks } from "../../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/studio/learning-events.docblock.js
4
+ const tech_studio_learning_events_DocBlocks = [{
5
+ id: "docs.tech.studio.learning-events",
6
+ title: "Studio Learning Events",
7
+ summary: "Studio persists learning/activity events to the database; Sandbox keeps learning local-first and unlogged.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/tech/studio/learning-events",
11
+ tags: [
12
+ "studio",
13
+ "learning",
14
+ "events",
15
+ "analytics",
16
+ "sandbox"
17
+ ],
18
+ body: `# Studio Learning Events
19
+
20
+ Studio emits lightweight **learning/activity events** to support onboarding, ambient coaching, and learning journeys.
21
+
22
+ ## Persistence model
23
+
24
+ - **Studio**: events are persisted to the database in \`StudioLearningEvent\` and are organization-scoped (optionally project-scoped).
25
+ - **Sandbox**: events remain **local-only** (unlogged); they must never be sent to backend services.
26
+
27
+ ## GraphQL API
28
+
29
+ - \`recordLearningEvent(input: { name, projectId?, payload? })\`
30
+ - \`myLearningEvents(projectId?, limit?)\`
31
+ - \`myOnboardingTracks(productId?, includeProgress?)\`
32
+ - \`myOnboardingProgress(trackKey)\`
33
+ - \`dismissOnboardingTrack(trackKey)\`
34
+
35
+ ## Common event names (convention)
36
+
37
+ - \`module.navigated\` — user navigated to a Studio module (payload at minimum: \`{ moduleId }\`).
38
+ - \`studio.template.instantiated\` — created a new Studio project (starter template). Payload commonly includes \`{ templateId, projectSlug }\`.
39
+ - \`spec.changed\` — created or updated a Studio spec. Payload may include \`{ action: 'create' | 'update', specId?, specType? }\`.
40
+ - \`regeneration.completed\` — finished a “regen/deploy” action (currently emitted on successful Studio deploy actions).
41
+ - \`studio.evolution.applied\` — completed an Evolution session (payload commonly includes \`{ evolutionSessionId }\`).
42
+
43
+ These events are intentionally minimal and must avoid PII/secrets in payloads.
44
+ `
45
+ }];
46
+ registerDocBlocks(tech_studio_learning_events_DocBlocks);
47
+
48
+ //#endregion
@@ -1,4 +1,22 @@
1
- import{a as e}from"../../registry.js";e([{id:`docs.tech.studio.learning-journeys`,title:`Studio learning journeys (onboarding + coach)`,summary:`DB-backed learning journeys tracked per organization: seeded tracks/steps, event-driven progress, XP/streaks, and a Studio coach surface.`,kind:`reference`,visibility:`public`,route:`/docs/tech/studio/learning-journeys`,tags:[`studio`,`learning`,`onboarding`,`journey`,`graphql`,`database`],body:`# Studio learning journeys
1
+ import { registerDocBlocks } from "../../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/studio/learning-journeys.docblock.js
4
+ const tech_studio_learning_journeys_DocBlocks = [{
5
+ id: "docs.tech.studio.learning-journeys",
6
+ title: "Studio learning journeys (onboarding + coach)",
7
+ summary: "DB-backed learning journeys tracked per organization: seeded tracks/steps, event-driven progress, XP/streaks, and a Studio coach surface.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/tech/studio/learning-journeys",
11
+ tags: [
12
+ "studio",
13
+ "learning",
14
+ "onboarding",
15
+ "journey",
16
+ "graphql",
17
+ "database"
18
+ ],
19
+ body: `# Studio learning journeys
2
20
 
3
21
  Studio supports **DB-backed learning journeys** (onboarding tracks + ambient coach tips) that are advanced by **recorded learning events**.
4
22
 
@@ -54,4 +72,8 @@ Learning journey progress lives in the \`lssm_learning\` schema:
54
72
 
55
73
  - Do not put secrets/PII in \`payload\` fields of learning events.
56
74
  - Prefer shallow payload filters (small, stable keys).
57
- `}]);
75
+ `
76
+ }];
77
+ registerDocBlocks(tech_studio_learning_journeys_DocBlocks);
78
+
79
+ //#endregion
@@ -1,4 +1,21 @@
1
- import{a as e}from"../../registry.js";e([{id:`docs.tech.studio.platform-admin-panel`,title:`Studio Platform Admin Panel`,summary:`How PLATFORM_ADMIN organizations manage tenant orgs and integration connections without session switching.`,kind:`reference`,visibility:`public`,route:`/docs/tech/studio/platform-admin-panel`,tags:[`studio`,`admin`,`multi-tenancy`,`integrations`,`better-auth`],body:`# Studio Platform Admin Panel
1
+ import { registerDocBlocks } from "../../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/studio/platform-admin-panel.docblock.js
4
+ const tech_studio_platform_admin_panel_DocBlocks = [{
5
+ id: "docs.tech.studio.platform-admin-panel",
6
+ title: "Studio Platform Admin Panel",
7
+ summary: "How PLATFORM_ADMIN organizations manage tenant orgs and integration connections without session switching.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/tech/studio/platform-admin-panel",
11
+ tags: [
12
+ "studio",
13
+ "admin",
14
+ "multi-tenancy",
15
+ "integrations",
16
+ "better-auth"
17
+ ],
18
+ body: `# Studio Platform Admin Panel
2
19
 
3
20
  ContractSpec Studio exposes a dedicated **Platform Admin Panel** for users whose **active organization** has:
4
21
 
@@ -60,4 +77,8 @@ The platform-admin GraphQL operations are guarded by the active org type and inc
60
77
  - Admin GraphQL module: \`packages/bundles/contractspec-studio/src/infrastructure/graphql/modules/platform-admin.ts\`
61
78
  - Integrations admin service: \`packages/bundles/contractspec-studio/src/modules/platform-integrations/index.ts\`
62
79
  - Web route: \`packages/apps/web-landing/src/app/(app-customer)/studio/admin/*\`
63
- `}]);
80
+ `
81
+ }];
82
+ registerDocBlocks(tech_studio_platform_admin_panel_DocBlocks);
83
+
84
+ //#endregion
@@ -1,4 +1,21 @@
1
- import{a as e}from"../../registry.js";e([{id:`docs.tech.studio.project-access-teams`,title:`Studio Project Access via Teams`,summary:`Projects live under organizations; team sharing refines access with an admin/owner override.`,kind:`reference`,visibility:`public`,route:`/docs/tech/studio/project-access-teams`,tags:[`studio`,`projects`,`teams`,`rbac`,`access-control`],body:`# Studio Project Access via Teams
1
+ import { registerDocBlocks } from "../../registry.js";
2
+
3
+ //#region ../../libs/contracts/dist/docs/tech/studio/project-access-teams.docblock.js
4
+ const tech_studio_project_access_teams_DocBlocks = [{
5
+ id: "docs.tech.studio.project-access-teams",
6
+ title: "Studio Project Access via Teams",
7
+ summary: "Projects live under organizations; team sharing refines access with an admin/owner override.",
8
+ kind: "reference",
9
+ visibility: "public",
10
+ route: "/docs/tech/studio/project-access-teams",
11
+ tags: [
12
+ "studio",
13
+ "projects",
14
+ "teams",
15
+ "rbac",
16
+ "access-control"
17
+ ],
18
+ body: `# Studio Project Access via Teams
2
19
 
3
20
  Studio access control is **organization-first** with optional **team-based sharing**.
4
21
 
@@ -16,21 +33,13 @@ Studio access control is **organization-first** with optional **team-based shari
16
33
 
17
34
  ## GraphQL surfaces
18
35
 
19
- - Read:
20
- - \`myStudioProjects\` (returns only projects you can access)
21
- - \`studioProjectBySlug(slug)\` (enforces the same access rules)
22
- - \`myTeams\`
23
- - \`projectTeams(projectId)\`
24
-
25
- - Write:
26
- - \`createStudioProject(input.teamIds?)\` (teamIds optional)
27
- - \`setProjectTeams(projectId, teamIds)\` (admin-only)
28
-
29
- ## Related
30
- +
31
- +- Team administration + invitations: see \`/docs/tech/studio/team-invitations\`.
32
- +
36
+ - Read:\n - \`myStudioProjects\` (returns only projects you can access)\n - \`studioProjectBySlug(slug)\` (enforces the same access rules)\n - \`myTeams\`\n - \`projectTeams(projectId)\`\n\n- Write:\n - \`createStudioProject(input.teamIds?)\` (teamIds optional)\n - \`setProjectTeams(projectId, teamIds)\` (admin-only)\n
37
+ ## Related\n+\n+- Team administration + invitations: see \`/docs/tech/studio/team-invitations\`.\n+
33
38
  ## Notes
34
39
 
35
40
  Payloads and events must avoid secrets/PII. For Sandbox, the model remains local-first and unlogged.
36
- `}]);
41
+ `
42
+ }];
43
+ registerDocBlocks(tech_studio_project_access_teams_DocBlocks);
44
+
45
+ //#endregion