@neuraloom/contracts 0.0.0-stage → 0.1.23

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 (1141) hide show
  1. package/dist/analytics/community-movie/attribution.schema.d.ts +264 -0
  2. package/dist/analytics/community-movie/attribution.schema.js +57 -0
  3. package/dist/analytics/community-movie/consent.schema.d.ts +15 -0
  4. package/dist/analytics/community-movie/consent.schema.js +16 -0
  5. package/dist/analytics/community-movie/event-names.d.ts +11 -0
  6. package/dist/analytics/community-movie/event-names.js +113 -0
  7. package/dist/analytics/community-movie/event-params.schema.d.ts +622 -0
  8. package/dist/analytics/community-movie/event-params.schema.js +416 -0
  9. package/dist/analytics/community-movie/event-registry.d.ts +11 -0
  10. package/dist/analytics/community-movie/event-registry.js +486 -0
  11. package/dist/analytics/community-movie/index.d.ts +6 -0
  12. package/dist/analytics/community-movie/index.js +22 -0
  13. package/dist/analytics/community-movie/telemetry-record.schema.d.ts +157 -0
  14. package/dist/analytics/community-movie/telemetry-record.schema.js +26 -0
  15. package/dist/analytics/index.d.ts +1 -0
  16. package/dist/analytics/index.js +17 -0
  17. package/dist/community/actor-builder-options.d.ts +43 -0
  18. package/dist/community/actor-builder-options.js +197 -0
  19. package/dist/constants/AGENT_MCP_PERMISSIONS.d.ts +26 -0
  20. package/dist/constants/AGENT_MCP_PERMISSIONS.js +122 -0
  21. package/dist/constants/AGENT_ROLES.d.ts +37 -0
  22. package/dist/constants/AGENT_ROLES.js +199 -0
  23. package/dist/constants/audiobook-embed-placeholder-url.d.ts +5 -0
  24. package/dist/constants/audiobook-embed-placeholder-url.js +8 -0
  25. package/dist/constants/ci-config.d.ts +4 -0
  26. package/dist/constants/ci-config.js +7 -0
  27. package/dist/constants/kg-implement-stable-keys.d.ts +9 -0
  28. package/dist/constants/kg-implement-stable-keys.js +26 -0
  29. package/dist/constants/knowledge-edge-relation.d.ts +49 -0
  30. package/dist/constants/knowledge-edge-relation.js +42 -0
  31. package/dist/constants/knowledge-node.d.ts +21 -0
  32. package/dist/constants/knowledge-node.js +20 -0
  33. package/dist/constants/mission-control-nav.d.ts +13 -0
  34. package/dist/constants/mission-control-nav.js +75 -0
  35. package/dist/constants/model-mode-preset-defaults.d.ts +5 -0
  36. package/dist/constants/model-mode-preset-defaults.js +65 -0
  37. package/dist/constants/model-policies.d.ts +37 -0
  38. package/dist/constants/model-policies.js +656 -0
  39. package/dist/constants/navConfig.d.ts +43 -0
  40. package/dist/constants/navConfig.js +132 -0
  41. package/dist/constants/orchestration-execution.d.ts +5 -0
  42. package/dist/constants/orchestration-execution.js +10 -0
  43. package/dist/constants/payload-schema-map.d.ts +22 -0
  44. package/dist/constants/payload-schema-map.js +375 -0
  45. package/dist/constants/phase-guardian.d.ts +17 -0
  46. package/dist/constants/phase-guardian.js +43 -0
  47. package/dist/constants/pipeline-step-stages.d.ts +73 -0
  48. package/dist/constants/pipeline-step-stages.js +342 -0
  49. package/dist/constants/project-control-nav.d.ts +29 -0
  50. package/dist/constants/project-control-nav.js +65 -0
  51. package/dist/constants/software-index-targets.d.ts +17 -0
  52. package/dist/constants/software-index-targets.js +46 -0
  53. package/dist/constants/step-tools.d.ts +32 -0
  54. package/dist/constants/step-tools.js +53 -0
  55. package/dist/constants/workflow-agent-defaults.d.ts +4 -0
  56. package/dist/constants/workflow-agent-defaults.js +15 -0
  57. package/dist/constants/workflow-api-errors.d.ts +5 -0
  58. package/dist/constants/workflow-api-errors.js +8 -0
  59. package/dist/constants/workflow-phase-groups.d.ts +34 -0
  60. package/dist/constants/workflow-phase-groups.js +46 -0
  61. package/dist/constants/workflow-registry.d.ts +77 -0
  62. package/dist/constants/workflow-registry.js +421 -0
  63. package/dist/constants/workflow-semantics.d.ts +19 -0
  64. package/dist/constants/workflow-semantics.js +432 -0
  65. package/dist/constants/workflow-vocabulary.d.ts +23 -0
  66. package/dist/constants/workflow-vocabulary.js +227 -0
  67. package/dist/constants/workflow.d.ts +7 -0
  68. package/dist/constants/workflow.js +23 -0
  69. package/dist/data/model-registry.d.ts +36 -0
  70. package/dist/data/model-registry.js +59 -0
  71. package/dist/index.d.ts +47 -0
  72. package/dist/index.js +90 -0
  73. package/dist/integration/index.d.ts +8 -0
  74. package/dist/integration/index.js +24 -0
  75. package/dist/integration/schema-hash-manifest.json +26 -0
  76. package/dist/lib/graph-edge-resolve.d.ts +3 -0
  77. package/dist/lib/graph-edge-resolve.js +20 -0
  78. package/dist/lib/graph-id.d.ts +16 -0
  79. package/dist/lib/graph-id.js +169 -0
  80. package/dist/lib/step-navigation.d.ts +35 -0
  81. package/dist/lib/step-navigation.js +218 -0
  82. package/dist/marketing/acquisition-landing-matrix.d.ts +46 -0
  83. package/dist/marketing/acquisition-landing-matrix.js +64 -0
  84. package/dist/marketing/acquisition-recommendation.schema.d.ts +284 -0
  85. package/dist/marketing/acquisition-recommendation.schema.js +84 -0
  86. package/dist/marketing/ads-account.schema.d.ts +46 -0
  87. package/dist/marketing/ads-account.schema.js +15 -0
  88. package/dist/marketing/ads-ad-group.schema.d.ts +52 -0
  89. package/dist/marketing/ads-ad-group.schema.js +17 -0
  90. package/dist/marketing/ads-campaign.schema.d.ts +59 -0
  91. package/dist/marketing/ads-campaign.schema.js +18 -0
  92. package/dist/marketing/ads-conversion-action.schema.d.ts +60 -0
  93. package/dist/marketing/ads-conversion-action.schema.js +27 -0
  94. package/dist/marketing/ads-keyword.schema.d.ts +59 -0
  95. package/dist/marketing/ads-keyword.schema.js +19 -0
  96. package/dist/marketing/ads-metrics-daily.schema.d.ts +95 -0
  97. package/dist/marketing/ads-metrics-daily.schema.js +24 -0
  98. package/dist/marketing/ads-overview.schema.d.ts +479 -0
  99. package/dist/marketing/ads-overview.schema.js +44 -0
  100. package/dist/marketing/ads-query.schema.d.ts +33 -0
  101. package/dist/marketing/ads-query.schema.js +13 -0
  102. package/dist/marketing/ads-search-term.schema.d.ts +70 -0
  103. package/dist/marketing/ads-search-term.schema.js +19 -0
  104. package/dist/marketing/campaign-asset.schema.d.ts +51 -0
  105. package/dist/marketing/campaign-asset.schema.js +39 -0
  106. package/dist/marketing/community-movie-ads-free-signup-campaign.d.ts +23 -0
  107. package/dist/marketing/community-movie-ads-free-signup-campaign.js +29 -0
  108. package/dist/marketing/community-movie-campaign-matrix.d.ts +47 -0
  109. package/dist/marketing/community-movie-campaign-matrix.js +265 -0
  110. package/dist/marketing/community-movie-google-ads.constants.d.ts +49 -0
  111. package/dist/marketing/community-movie-google-ads.constants.js +59 -0
  112. package/dist/marketing/config.schema.d.ts +32 -0
  113. package/dist/marketing/config.schema.js +31 -0
  114. package/dist/marketing/date-range.schema.d.ts +12 -0
  115. package/dist/marketing/date-range.schema.js +10 -0
  116. package/dist/marketing/entities/index.d.ts +6 -0
  117. package/dist/marketing/entities/index.js +11 -0
  118. package/dist/marketing/ga4-conversion.schema.d.ts +87 -0
  119. package/dist/marketing/ga4-conversion.schema.js +22 -0
  120. package/dist/marketing/ga4-event.schema.d.ts +98 -0
  121. package/dist/marketing/ga4-event.schema.js +23 -0
  122. package/dist/marketing/ga4-funnel.schema.d.ts +90 -0
  123. package/dist/marketing/ga4-funnel.schema.js +23 -0
  124. package/dist/marketing/ga4-landing-page.schema.d.ts +131 -0
  125. package/dist/marketing/ga4-landing-page.schema.js +25 -0
  126. package/dist/marketing/ga4-overview.schema.d.ts +478 -0
  127. package/dist/marketing/ga4-overview.schema.js +31 -0
  128. package/dist/marketing/ga4-query.schema.d.ts +19 -0
  129. package/dist/marketing/ga4-query.schema.js +27 -0
  130. package/dist/marketing/ga4-retention.schema.d.ts +79 -0
  131. package/dist/marketing/ga4-retention.schema.js +21 -0
  132. package/dist/marketing/ga4-traffic.schema.d.ts +154 -0
  133. package/dist/marketing/ga4-traffic.schema.js +27 -0
  134. package/dist/marketing/gsc-organic-overview.schema.d.ts +338 -0
  135. package/dist/marketing/gsc-organic-overview.schema.js +28 -0
  136. package/dist/marketing/gsc-organic-query.schema.d.ts +121 -0
  137. package/dist/marketing/gsc-organic-query.schema.js +24 -0
  138. package/dist/marketing/gsc-page-performance.schema.d.ts +121 -0
  139. package/dist/marketing/gsc-page-performance.schema.js +24 -0
  140. package/dist/marketing/gsc-query.schema.d.ts +19 -0
  141. package/dist/marketing/gsc-query.schema.js +27 -0
  142. package/dist/marketing/index.d.ts +47 -0
  143. package/dist/marketing/index.js +63 -0
  144. package/dist/marketing/marketing-attribution-summary.schema.d.ts +165 -0
  145. package/dist/marketing/marketing-attribution-summary.schema.js +26 -0
  146. package/dist/marketing/marketing-challenge-performance.schema.d.ts +139 -0
  147. package/dist/marketing/marketing-challenge-performance.schema.js +28 -0
  148. package/dist/marketing/marketing-conversion-enqueue.schema.d.ts +88 -0
  149. package/dist/marketing/marketing-conversion-enqueue.schema.js +34 -0
  150. package/dist/marketing/marketing-executive-overview.schema.d.ts +1865 -0
  151. package/dist/marketing/marketing-executive-overview.schema.js +39 -0
  152. package/dist/marketing/marketing-health.schema.d.ts +366 -0
  153. package/dist/marketing/marketing-health.schema.js +65 -0
  154. package/dist/marketing/marketing-keyword-opportunity.schema.d.ts +158 -0
  155. package/dist/marketing/marketing-keyword-opportunity.schema.js +34 -0
  156. package/dist/marketing/marketing-landing-page-intelligence.schema.d.ts +159 -0
  157. package/dist/marketing/marketing-landing-page-intelligence.schema.js +30 -0
  158. package/dist/marketing/marketing-readiness.schema.d.ts +506 -0
  159. package/dist/marketing/marketing-readiness.schema.js +83 -0
  160. package/dist/marketing/marketing-test-traffic.d.ts +6 -0
  161. package/dist/marketing/marketing-test-traffic.js +28 -0
  162. package/dist/marketing/marketing-visibility-overview.schema.d.ts +949 -0
  163. package/dist/marketing/marketing-visibility-overview.schema.js +42 -0
  164. package/dist/marketing/marketing-world-catalog.d.ts +10 -0
  165. package/dist/marketing/marketing-world-catalog.js +16 -0
  166. package/dist/marketing/marketing-world-performance.schema.d.ts +179 -0
  167. package/dist/marketing/marketing-world-performance.schema.js +32 -0
  168. package/dist/marketing/routes.d.ts +77 -0
  169. package/dist/marketing/routes.js +79 -0
  170. package/dist/marketing/search-negative-keywords.d.ts +6 -0
  171. package/dist/marketing/search-negative-keywords.js +30 -0
  172. package/dist/registry/schema-registry.d.ts +74 -0
  173. package/dist/registry/schema-registry.js +1148 -0
  174. package/dist/registry/table-ownership-registry.d.ts +57 -0
  175. package/dist/registry/table-ownership-registry.js +932 -0
  176. package/dist/routes/assurance.d.ts +6 -0
  177. package/dist/routes/assurance.js +14 -0
  178. package/dist/routes/community-operator.d.ts +117 -0
  179. package/dist/routes/community-operator.js +119 -0
  180. package/dist/routes/community.d.ts +232 -0
  181. package/dist/routes/community.js +246 -0
  182. package/dist/routes/index.d.ts +2203 -0
  183. package/dist/routes/index.js +1440 -0
  184. package/dist/schemas/ai/ai-generate-inputs.schema.d.ts +2056 -0
  185. package/dist/schemas/ai/ai-generate-inputs.schema.js +167 -0
  186. package/dist/schemas/ai/ai-run-metadata.schema.d.ts +39 -0
  187. package/dist/schemas/ai/ai-run-metadata.schema.js +24 -0
  188. package/dist/schemas/ai/ai-runs-list.schema.d.ts +248 -0
  189. package/dist/schemas/ai/ai-runs-list.schema.js +27 -0
  190. package/dist/schemas/ai/analytics-generate.schema.d.ts +185 -0
  191. package/dist/schemas/ai/analytics-generate.schema.js +59 -0
  192. package/dist/schemas/ai/api-generate.schema.d.ts +49 -0
  193. package/dist/schemas/ai/api-generate.schema.js +16 -0
  194. package/dist/schemas/ai/api.schema.d.ts +80 -0
  195. package/dist/schemas/ai/api.schema.js +22 -0
  196. package/dist/schemas/ai/architecture-generate.schema.d.ts +47 -0
  197. package/dist/schemas/ai/architecture-generate.schema.js +19 -0
  198. package/dist/schemas/ai/argument-map-generate.schema.d.ts +433 -0
  199. package/dist/schemas/ai/argument-map-generate.schema.js +62 -0
  200. package/dist/schemas/ai/audit-existing-output-evidence.schema.d.ts +153 -0
  201. package/dist/schemas/ai/audit-existing-output-evidence.schema.js +46 -0
  202. package/dist/schemas/ai/brief-improve-generate.schema.d.ts +2291 -0
  203. package/dist/schemas/ai/brief-improve-generate.schema.js +293 -0
  204. package/dist/schemas/ai/chapter-revision.schema.d.ts +817 -0
  205. package/dist/schemas/ai/chapter-revision.schema.js +267 -0
  206. package/dist/schemas/ai/code-generate.schema.d.ts +1492 -0
  207. package/dist/schemas/ai/code-generate.schema.js +46 -0
  208. package/dist/schemas/ai/community-pitch-critique-generate.schema.d.ts +31 -0
  209. package/dist/schemas/ai/community-pitch-critique-generate.schema.js +17 -0
  210. package/dist/schemas/ai/community-suggestion-summary-generate.schema.d.ts +34 -0
  211. package/dist/schemas/ai/community-suggestion-summary-generate.schema.js +19 -0
  212. package/dist/schemas/ai/compliance-generate.schema.d.ts +24 -0
  213. package/dist/schemas/ai/compliance-generate.schema.js +11 -0
  214. package/dist/schemas/ai/compliance.schema.d.ts +58 -0
  215. package/dist/schemas/ai/compliance.schema.js +22 -0
  216. package/dist/schemas/ai/constitution-generate.schema.d.ts +221 -0
  217. package/dist/schemas/ai/constitution-generate.schema.js +52 -0
  218. package/dist/schemas/ai/constitution-kg-gate-status.schema.d.ts +33 -0
  219. package/dist/schemas/ai/constitution-kg-gate-status.schema.js +15 -0
  220. package/dist/schemas/ai/constitution-validate-input.schema.d.ts +18 -0
  221. package/dist/schemas/ai/constitution-validate-input.schema.js +10 -0
  222. package/dist/schemas/ai/constitution-writing-generate.schema.d.ts +437 -0
  223. package/dist/schemas/ai/constitution-writing-generate.schema.js +70 -0
  224. package/dist/schemas/ai/constitution.schema.d.ts +19 -0
  225. package/dist/schemas/ai/constitution.schema.js +12 -0
  226. package/dist/schemas/ai/counterclaim-framework-generate.schema.d.ts +479 -0
  227. package/dist/schemas/ai/counterclaim-framework-generate.schema.js +66 -0
  228. package/dist/schemas/ai/coverage-generate.schema.d.ts +61 -0
  229. package/dist/schemas/ai/coverage-generate.schema.js +27 -0
  230. package/dist/schemas/ai/definitions-generate.schema.d.ts +448 -0
  231. package/dist/schemas/ai/definitions-generate.schema.js +62 -0
  232. package/dist/schemas/ai/deployments-generate.schema.d.ts +40 -0
  233. package/dist/schemas/ai/deployments-generate.schema.js +18 -0
  234. package/dist/schemas/ai/docs-generate.schema.d.ts +51 -0
  235. package/dist/schemas/ai/docs-generate.schema.js +18 -0
  236. package/dist/schemas/ai/domain-context.d.ts +58 -0
  237. package/dist/schemas/ai/domain-context.js +185 -0
  238. package/dist/schemas/ai/draft-generate.schema.d.ts +32 -0
  239. package/dist/schemas/ai/draft-generate.schema.js +17 -0
  240. package/dist/schemas/ai/editorial-guardian-generate.schema.d.ts +470 -0
  241. package/dist/schemas/ai/editorial-guardian-generate.schema.js +60 -0
  242. package/dist/schemas/ai/editorial-revise-chapter.schema.d.ts +411 -0
  243. package/dist/schemas/ai/editorial-revise-chapter.schema.js +83 -0
  244. package/dist/schemas/ai/film-clip-review-generate.schema.d.ts +291 -0
  245. package/dist/schemas/ai/film-clip-review-generate.schema.js +35 -0
  246. package/dist/schemas/ai/film-keyframe-generate.schema.d.ts +359 -0
  247. package/dist/schemas/ai/film-keyframe-generate.schema.js +28 -0
  248. package/dist/schemas/ai/film-keyframe-register.schema.d.ts +67 -0
  249. package/dist/schemas/ai/film-keyframe-register.schema.js +16 -0
  250. package/dist/schemas/ai/film-shot-risk-assess.schema.d.ts +12 -0
  251. package/dist/schemas/ai/film-shot-risk-assess.schema.js +10 -0
  252. package/dist/schemas/ai/film-still-review-generate.schema.d.ts +232 -0
  253. package/dist/schemas/ai/film-still-review-generate.schema.js +31 -0
  254. package/dist/schemas/ai/film-workflow-generate.schema.d.ts +117 -0
  255. package/dist/schemas/ai/film-workflow-generate.schema.js +33 -0
  256. package/dist/schemas/ai/generate-response.schema.d.ts +66 -0
  257. package/dist/schemas/ai/generate-response.schema.js +26 -0
  258. package/dist/schemas/ai/guardian-gate-status.schema.d.ts +112 -0
  259. package/dist/schemas/ai/guardian-gate-status.schema.js +17 -0
  260. package/dist/schemas/ai/guardian-kg-gate-status.schema.d.ts +58 -0
  261. package/dist/schemas/ai/guardian-kg-gate-status.schema.js +30 -0
  262. package/dist/schemas/ai/guardian-rule-detail.schema.d.ts +74 -0
  263. package/dist/schemas/ai/guardian-rule-detail.schema.js +19 -0
  264. package/dist/schemas/ai/guardian-score-history.schema.d.ts +75 -0
  265. package/dist/schemas/ai/guardian-score-history.schema.js +16 -0
  266. package/dist/schemas/ai/implement-graph.schema.d.ts +323 -0
  267. package/dist/schemas/ai/implement-graph.schema.js +51 -0
  268. package/dist/schemas/ai/implement-kg-gate-status.schema.d.ts +36 -0
  269. package/dist/schemas/ai/implement-kg-gate-status.schema.js +16 -0
  270. package/dist/schemas/ai/implement.schema.d.ts +73 -0
  271. package/dist/schemas/ai/implement.schema.js +23 -0
  272. package/dist/schemas/ai/index.d.ts +46 -0
  273. package/dist/schemas/ai/index.js +62 -0
  274. package/dist/schemas/ai/knowledge-kg-gate-status.schema.d.ts +73 -0
  275. package/dist/schemas/ai/knowledge-kg-gate-status.schema.js +24 -0
  276. package/dist/schemas/ai/knowledge-search-generate.schema.d.ts +2 -0
  277. package/dist/schemas/ai/knowledge-search-generate.schema.js +6 -0
  278. package/dist/schemas/ai/manuscript-checks.schema.d.ts +6095 -0
  279. package/dist/schemas/ai/manuscript-checks.schema.js +440 -0
  280. package/dist/schemas/ai/model-policy/index.d.ts +9 -0
  281. package/dist/schemas/ai/model-policy/index.js +25 -0
  282. package/dist/schemas/ai/model-policy/model-mode-preset.schema.d.ts +83 -0
  283. package/dist/schemas/ai/model-policy/model-mode-preset.schema.js +20 -0
  284. package/dist/schemas/ai/model-policy/model-modes.schema.d.ts +13 -0
  285. package/dist/schemas/ai/model-policy/model-modes.schema.js +27 -0
  286. package/dist/schemas/ai/model-policy/model-policy-resolved.schema.d.ts +44 -0
  287. package/dist/schemas/ai/model-policy/model-policy-resolved.schema.js +27 -0
  288. package/dist/schemas/ai/model-policy/model-quality-summary.schema.d.ts +133 -0
  289. package/dist/schemas/ai/model-policy/model-quality-summary.schema.js +35 -0
  290. package/dist/schemas/ai/model-policy/model-usage-summary.schema.d.ts +204 -0
  291. package/dist/schemas/ai/model-policy/model-usage-summary.schema.js +38 -0
  292. package/dist/schemas/ai/model-policy/project-model-policy.schema.d.ts +1311 -0
  293. package/dist/schemas/ai/model-policy/project-model-policy.schema.js +33 -0
  294. package/dist/schemas/ai/model-policy/workflow-phase-model-override.schema.d.ts +66 -0
  295. package/dist/schemas/ai/model-policy/workflow-phase-model-override.schema.js +48 -0
  296. package/dist/schemas/ai/model-policy/workflow-step-ids.schema.d.ts +2 -0
  297. package/dist/schemas/ai/model-policy/workflow-step-ids.schema.js +24 -0
  298. package/dist/schemas/ai/model-policy/workflow-step-model-override.schema.d.ts +63 -0
  299. package/dist/schemas/ai/model-policy/workflow-step-model-override.schema.js +43 -0
  300. package/dist/schemas/ai/orchestration-generate-fields.schema.d.ts +9 -0
  301. package/dist/schemas/ai/orchestration-generate-fields.schema.js +8 -0
  302. package/dist/schemas/ai/payload-json-schemas.d.ts +110 -0
  303. package/dist/schemas/ai/payload-json-schemas.js +154 -0
  304. package/dist/schemas/ai/plan.schema.d.ts +137 -0
  305. package/dist/schemas/ai/plan.schema.js +36 -0
  306. package/dist/schemas/ai/refine-fields.schema.d.ts +34 -0
  307. package/dist/schemas/ai/refine-fields.schema.js +27 -0
  308. package/dist/schemas/ai/review-generate.schema.d.ts +35 -0
  309. package/dist/schemas/ai/review-generate.schema.js +15 -0
  310. package/dist/schemas/ai/review.schema.d.ts +77 -0
  311. package/dist/schemas/ai/review.schema.js +29 -0
  312. package/dist/schemas/ai/run-trace.schema.d.ts +105 -0
  313. package/dist/schemas/ai/run-trace.schema.js +43 -0
  314. package/dist/schemas/ai/schema-generate.schema.d.ts +185 -0
  315. package/dist/schemas/ai/schema-generate.schema.js +44 -0
  316. package/dist/schemas/ai/schema.schema.d.ts +205 -0
  317. package/dist/schemas/ai/schema.schema.js +50 -0
  318. package/dist/schemas/ai/screenplay.schema.d.ts +550 -0
  319. package/dist/schemas/ai/screenplay.schema.js +77 -0
  320. package/dist/schemas/ai/source-registry-generate.schema.d.ts +245 -0
  321. package/dist/schemas/ai/source-registry-generate.schema.js +41 -0
  322. package/dist/schemas/ai/spec.schema.d.ts +248 -0
  323. package/dist/schemas/ai/spec.schema.js +78 -0
  324. package/dist/schemas/ai/style-system-generate.schema.d.ts +319 -0
  325. package/dist/schemas/ai/style-system-generate.schema.js +67 -0
  326. package/dist/schemas/ai/tasks-kg-gate-status.schema.d.ts +24 -0
  327. package/dist/schemas/ai/tasks-kg-gate-status.schema.js +12 -0
  328. package/dist/schemas/ai/tasks.schema.d.ts +49 -0
  329. package/dist/schemas/ai/tasks.schema.js +17 -0
  330. package/dist/schemas/ai/ui-generation-standard.schema.d.ts +42 -0
  331. package/dist/schemas/ai/ui-generation-standard.schema.js +40 -0
  332. package/dist/schemas/ai/ui-kg-gate-status.schema.d.ts +42 -0
  333. package/dist/schemas/ai/ui-kg-gate-status.schema.js +18 -0
  334. package/dist/schemas/ai/ui.schema.d.ts +22 -0
  335. package/dist/schemas/ai/ui.schema.js +13 -0
  336. package/dist/schemas/ai/workflow-artifacts.schema.d.ts +36075 -0
  337. package/dist/schemas/ai/workflow-artifacts.schema.js +2829 -0
  338. package/dist/schemas/ai/workflow-execution-mode.schema.d.ts +4 -0
  339. package/dist/schemas/ai/workflow-execution-mode.schema.js +6 -0
  340. package/dist/schemas/ai/writing-draft-all-generate.schema.d.ts +3444 -0
  341. package/dist/schemas/ai/writing-draft-all-generate.schema.js +319 -0
  342. package/dist/schemas/ai/writing-tasks-generate.schema.d.ts +283 -0
  343. package/dist/schemas/ai/writing-tasks-generate.schema.js +52 -0
  344. package/dist/schemas/ai/zod-openai-json-schema.d.ts +2 -0
  345. package/dist/schemas/ai/zod-openai-json-schema.js +67 -0
  346. package/dist/schemas/ai-ci-generate.d.ts +47 -0
  347. package/dist/schemas/ai-ci-generate.js +19 -0
  348. package/dist/schemas/ai-llm-outputs.d.ts +52 -0
  349. package/dist/schemas/ai-llm-outputs.js +26 -0
  350. package/dist/schemas/api/create-orchestration-request.schema.d.ts +13 -0
  351. package/dist/schemas/api/create-orchestration-request.schema.js +10 -0
  352. package/dist/schemas/api/implement-orchestration-session.schema.d.ts +26 -0
  353. package/dist/schemas/api/implement-orchestration-session.schema.js +11 -0
  354. package/dist/schemas/api/orchestration-events-list-response.schema.d.ts +108 -0
  355. package/dist/schemas/api/orchestration-events-list-response.schema.js +27 -0
  356. package/dist/schemas/api/plans-list-response.schema.d.ts +203 -0
  357. package/dist/schemas/api/plans-list-response.schema.js +35 -0
  358. package/dist/schemas/api/project-model-usage-query.schema.d.ts +24 -0
  359. package/dist/schemas/api/project-model-usage-query.schema.js +42 -0
  360. package/dist/schemas/api/specs-list-response.schema.d.ts +78 -0
  361. package/dist/schemas/api/specs-list-response.schema.js +23 -0
  362. package/dist/schemas/api-envelope.schema.d.ts +131 -0
  363. package/dist/schemas/api-envelope.schema.js +60 -0
  364. package/dist/schemas/artifacts/artifact-upload-proxy.schema.d.ts +27 -0
  365. package/dist/schemas/artifacts/artifact-upload-proxy.schema.js +15 -0
  366. package/dist/schemas/assurance/assurance-mode.schema.d.ts +33 -0
  367. package/dist/schemas/assurance/assurance-mode.schema.js +25 -0
  368. package/dist/schemas/assurance/browser-outcome-proof.schema.d.ts +164 -0
  369. package/dist/schemas/assurance/browser-outcome-proof.schema.js +58 -0
  370. package/dist/schemas/assurance/computation-authority-registry.schema.d.ts +108 -0
  371. package/dist/schemas/assurance/computation-authority-registry.schema.js +36 -0
  372. package/dist/schemas/assurance/documentation-evidence.schema.d.ts +131 -0
  373. package/dist/schemas/assurance/documentation-evidence.schema.js +44 -0
  374. package/dist/schemas/assurance/domain-assurance-evidence-pack.schema.d.ts +743 -0
  375. package/dist/schemas/assurance/domain-assurance-evidence-pack.schema.js +28 -0
  376. package/dist/schemas/assurance/domain-assurance-verdict.schema.d.ts +40 -0
  377. package/dist/schemas/assurance/domain-assurance-verdict.schema.js +24 -0
  378. package/dist/schemas/assurance/domain-truth-brief.schema.d.ts +270 -0
  379. package/dist/schemas/assurance/domain-truth-brief.schema.js +73 -0
  380. package/dist/schemas/assurance/enterprise-targeting.schema.d.ts +46 -0
  381. package/dist/schemas/assurance/enterprise-targeting.schema.js +24 -0
  382. package/dist/schemas/assurance/gate-result.schema.d.ts +35 -0
  383. package/dist/schemas/assurance/gate-result.schema.js +35 -0
  384. package/dist/schemas/assurance/index.d.ts +13 -0
  385. package/dist/schemas/assurance/index.js +30 -0
  386. package/dist/schemas/assurance/provider-call-ledger.schema.d.ts +97 -0
  387. package/dist/schemas/assurance/provider-call-ledger.schema.js +36 -0
  388. package/dist/schemas/assurance/provider-ledger-response.schema.d.ts +113 -0
  389. package/dist/schemas/assurance/provider-ledger-response.schema.js +29 -0
  390. package/dist/schemas/assurance/release-verdict.schema.d.ts +87 -0
  391. package/dist/schemas/assurance/release-verdict.schema.js +47 -0
  392. package/dist/schemas/assurance/risk-class.schema.d.ts +30 -0
  393. package/dist/schemas/assurance/risk-class.schema.js +33 -0
  394. package/dist/schemas/audiobook/alice-pronunciation.schema.d.ts +80 -0
  395. package/dist/schemas/audiobook/alice-pronunciation.schema.js +45 -0
  396. package/dist/schemas/audiobook/audiobook-api.schema.d.ts +1937 -0
  397. package/dist/schemas/audiobook/audiobook-api.schema.js +201 -0
  398. package/dist/schemas/audiobook/audiobook-artifacts.schema.d.ts +4069 -0
  399. package/dist/schemas/audiobook/audiobook-artifacts.schema.js +469 -0
  400. package/dist/schemas/audiobook/audiobook-studio.schema.d.ts +670 -0
  401. package/dist/schemas/audiobook/audiobook-studio.schema.js +159 -0
  402. package/dist/schemas/audiobook/audiobook-validation.d.ts +227 -0
  403. package/dist/schemas/audiobook/audiobook-validation.js +23 -0
  404. package/dist/schemas/audiobook/chunk-narration-script.d.ts +17 -0
  405. package/dist/schemas/audiobook/chunk-narration-script.js +96 -0
  406. package/dist/schemas/audiobook/elevenlabs-provider.schema.d.ts +167 -0
  407. package/dist/schemas/audiobook/elevenlabs-provider.schema.js +93 -0
  408. package/dist/schemas/audiobook/index.d.ts +8 -0
  409. package/dist/schemas/audiobook/index.js +24 -0
  410. package/dist/schemas/audiobook/narration-chunk.schema.d.ts +114 -0
  411. package/dist/schemas/audiobook/narration-chunk.schema.js +38 -0
  412. package/dist/schemas/audiobook-embed/audiobook-embed.schema.d.ts +1732 -0
  413. package/dist/schemas/audiobook-embed/audiobook-embed.schema.js +259 -0
  414. package/dist/schemas/auth/session-context.schema.d.ts +177 -0
  415. package/dist/schemas/auth/session-context.schema.js +40 -0
  416. package/dist/schemas/cache/cache-ai-response.schema.d.ts +50 -0
  417. package/dist/schemas/cache/cache-ai-response.schema.js +28 -0
  418. package/dist/schemas/ci/ci-allow-skip-actionlint-patch.schema.d.ts +16 -0
  419. package/dist/schemas/ci/ci-allow-skip-actionlint-patch.schema.js +12 -0
  420. package/dist/schemas/ci/ci-apply-post-success.schema.d.ts +24 -0
  421. package/dist/schemas/ci/ci-apply-post-success.schema.js +15 -0
  422. package/dist/schemas/ci/ci-canonical-readiness.schema.d.ts +155 -0
  423. package/dist/schemas/ci/ci-canonical-readiness.schema.js +47 -0
  424. package/dist/schemas/ci/ci-dispatch-post.schema.d.ts +34 -0
  425. package/dist/schemas/ci/ci-dispatch-post.schema.js +20 -0
  426. package/dist/schemas/ci/ci-ingest-post.schema.d.ts +37 -0
  427. package/dist/schemas/ci/ci-ingest-post.schema.js +22 -0
  428. package/dist/schemas/ci/ci-operator-ready-patch.schema.d.ts +13 -0
  429. package/dist/schemas/ci/ci-operator-ready-patch.schema.js +11 -0
  430. package/dist/schemas/ci/ci-pipeline-status.schema.d.ts +3 -0
  431. package/dist/schemas/ci/ci-pipeline-status.schema.js +13 -0
  432. package/dist/schemas/ci/ci-run.schema.d.ts +44 -0
  433. package/dist/schemas/ci/ci-run.schema.js +27 -0
  434. package/dist/schemas/ci/ci-runs-list-response.schema.d.ts +91 -0
  435. package/dist/schemas/ci/ci-runs-list-response.schema.js +13 -0
  436. package/dist/schemas/ci/ci-status-get.schema.d.ts +155 -0
  437. package/dist/schemas/ci/ci-status-get.schema.js +12 -0
  438. package/dist/schemas/ci/ci-status-response.schema.d.ts +554 -0
  439. package/dist/schemas/ci/ci-status-response.schema.js +151 -0
  440. package/dist/schemas/ci/index.d.ts +12 -0
  441. package/dist/schemas/ci/index.js +28 -0
  442. package/dist/schemas/ci/pr-check-run.schema.d.ts +44 -0
  443. package/dist/schemas/ci/pr-check-run.schema.js +21 -0
  444. package/dist/schemas/ci/project-engine-context.schema.d.ts +70 -0
  445. package/dist/schemas/ci/project-engine-context.schema.js +26 -0
  446. package/dist/schemas/community/community-actor-comment-body.schema.d.ts +9 -0
  447. package/dist/schemas/community/community-actor-comment-body.schema.js +9 -0
  448. package/dist/schemas/community/community-actor-universe-vote.schema.d.ts +10 -0
  449. package/dist/schemas/community/community-actor-universe-vote.schema.js +10 -0
  450. package/dist/schemas/community/community-ad-capi.schema.d.ts +77 -0
  451. package/dist/schemas/community/community-ad-capi.schema.js +42 -0
  452. package/dist/schemas/community/community-billing-checkout.schema.d.ts +31 -0
  453. package/dist/schemas/community/community-billing-checkout.schema.js +43 -0
  454. package/dist/schemas/community/community-challenge.schema.d.ts +43 -0
  455. package/dist/schemas/community/community-challenge.schema.js +21 -0
  456. package/dist/schemas/community/community-content-translation.schema.d.ts +99 -0
  457. package/dist/schemas/community/community-content-translation.schema.js +63 -0
  458. package/dist/schemas/community/community-credit-transaction.schema.d.ts +36 -0
  459. package/dist/schemas/community/community-credit-transaction.schema.js +19 -0
  460. package/dist/schemas/community/community-development-input.schema.d.ts +20 -0
  461. package/dist/schemas/community/community-development-input.schema.js +16 -0
  462. package/dist/schemas/community/community-development-room.schema.d.ts +28 -0
  463. package/dist/schemas/community/community-development-room.schema.js +16 -0
  464. package/dist/schemas/community/community-email.schema.d.ts +96 -0
  465. package/dist/schemas/community/community-email.schema.js +65 -0
  466. package/dist/schemas/community/community-film-playback.schema.d.ts +287 -0
  467. package/dist/schemas/community/community-film-playback.schema.js +52 -0
  468. package/dist/schemas/community/community-film-video-variant.schema.d.ts +94 -0
  469. package/dist/schemas/community/community-film-video-variant.schema.js +53 -0
  470. package/dist/schemas/community/community-film-world-marketing.schema.d.ts +27 -0
  471. package/dist/schemas/community/community-film-world-marketing.schema.js +67 -0
  472. package/dist/schemas/community/community-film.schema.d.ts +183 -0
  473. package/dist/schemas/community/community-film.schema.js +105 -0
  474. package/dist/schemas/community/community-idea-promote.schema.d.ts +4 -0
  475. package/dist/schemas/community/community-idea-promote.schema.js +6 -0
  476. package/dist/schemas/community/community-idea-submission.schema.d.ts +54 -0
  477. package/dist/schemas/community/community-idea-submission.schema.js +22 -0
  478. package/dist/schemas/community/community-idea-version.schema.d.ts +72 -0
  479. package/dist/schemas/community/community-idea-version.schema.js +28 -0
  480. package/dist/schemas/community/community-idea.schema.d.ts +71 -0
  481. package/dist/schemas/community/community-idea.schema.js +36 -0
  482. package/dist/schemas/community/community-locale.schema.d.ts +8 -0
  483. package/dist/schemas/community/community-locale.schema.js +10 -0
  484. package/dist/schemas/community/community-membership-monthly-credits.d.ts +4 -0
  485. package/dist/schemas/community/community-membership-monthly-credits.js +18 -0
  486. package/dist/schemas/community/community-membership.schema.d.ts +34 -0
  487. package/dist/schemas/community/community-membership.schema.js +19 -0
  488. package/dist/schemas/community/community-moderation-flag.schema.d.ts +31 -0
  489. package/dist/schemas/community/community-moderation-flag.schema.js +17 -0
  490. package/dist/schemas/community/community-movie-actor-blueprint.schema.d.ts +196 -0
  491. package/dist/schemas/community/community-movie-actor-blueprint.schema.js +30 -0
  492. package/dist/schemas/community/community-movie-actor-card.schema.d.ts +37 -0
  493. package/dist/schemas/community/community-movie-actor-card.schema.js +20 -0
  494. package/dist/schemas/community/community-movie-actor-create-request.schema.d.ts +102 -0
  495. package/dist/schemas/community/community-movie-actor-create-request.schema.js +24 -0
  496. package/dist/schemas/community/community-movie-actor-create-response.schema.d.ts +35 -0
  497. package/dist/schemas/community/community-movie-actor-create-response.schema.js +12 -0
  498. package/dist/schemas/community/community-movie-actor-gate-result.schema.d.ts +15 -0
  499. package/dist/schemas/community/community-movie-actor-gate-result.schema.js +11 -0
  500. package/dist/schemas/community/community-movie-actor-image-prompt-pack.schema.d.ts +22 -0
  501. package/dist/schemas/community/community-movie-actor-image-prompt-pack.schema.js +14 -0
  502. package/dist/schemas/community/community-movie-actor-kg-seed.schema.d.ts +68 -0
  503. package/dist/schemas/community/community-movie-actor-kg-seed.schema.js +31 -0
  504. package/dist/schemas/community/community-movie-actor-option-selection.schema.d.ts +43 -0
  505. package/dist/schemas/community/community-movie-actor-option-selection.schema.js +22 -0
  506. package/dist/schemas/community/community-movie-actor-portrait-url.schema.d.ts +10 -0
  507. package/dist/schemas/community/community-movie-actor-portrait-url.schema.js +10 -0
  508. package/dist/schemas/community/community-movie-actor-vote-response.schema.d.ts +13 -0
  509. package/dist/schemas/community/community-movie-actor-vote-response.schema.js +9 -0
  510. package/dist/schemas/community/community-movie-canonical-character.schema.d.ts +78 -0
  511. package/dist/schemas/community/community-movie-canonical-character.schema.js +104 -0
  512. package/dist/schemas/community/community-movie-gallery.schema.d.ts +28 -0
  513. package/dist/schemas/community/community-movie-gallery.schema.js +90 -0
  514. package/dist/schemas/community/community-movie-gate-result.schema.d.ts +46 -0
  515. package/dist/schemas/community/community-movie-gate-result.schema.js +23 -0
  516. package/dist/schemas/community/community-movie-idea-card.schema.d.ts +31 -0
  517. package/dist/schemas/community/community-movie-idea-card.schema.js +17 -0
  518. package/dist/schemas/community/community-movie-idea-input.schema.d.ts +22 -0
  519. package/dist/schemas/community/community-movie-idea-input.schema.js +14 -0
  520. package/dist/schemas/community/community-movie-idea-structured.schema.d.ts +34 -0
  521. package/dist/schemas/community/community-movie-idea-structured.schema.js +20 -0
  522. package/dist/schemas/community/community-movie-kg-seed.schema.d.ts +73 -0
  523. package/dist/schemas/community/community-movie-kg-seed.schema.js +84 -0
  524. package/dist/schemas/community/community-movie-stage-transitions.d.ts +15 -0
  525. package/dist/schemas/community/community-movie-stage-transitions.js +35 -0
  526. package/dist/schemas/community/community-movie-world-cta.schema.d.ts +75 -0
  527. package/dist/schemas/community/community-movie-world-cta.schema.js +83 -0
  528. package/dist/schemas/community/community-partner-offers.d.ts +13 -0
  529. package/dist/schemas/community/community-partner-offers.js +22 -0
  530. package/dist/schemas/community/community-partner.schema.d.ts +41 -0
  531. package/dist/schemas/community/community-partner.schema.js +23 -0
  532. package/dist/schemas/community/community-poll.schema.d.ts +54 -0
  533. package/dist/schemas/community/community-poll.schema.js +27 -0
  534. package/dist/schemas/community/community-production-operator.schema.d.ts +320 -0
  535. package/dist/schemas/community/community-production-operator.schema.js +91 -0
  536. package/dist/schemas/community/community-referral.schema.d.ts +155 -0
  537. package/dist/schemas/community/community-referral.schema.js +63 -0
  538. package/dist/schemas/community/community-signup-intake.constants.d.ts +13 -0
  539. package/dist/schemas/community/community-signup-intake.constants.js +134 -0
  540. package/dist/schemas/community/community-signup-intake.schema.d.ts +87 -0
  541. package/dist/schemas/community/community-signup-intake.schema.js +82 -0
  542. package/dist/schemas/community/community-slate.schema.d.ts +60 -0
  543. package/dist/schemas/community/community-slate.schema.js +29 -0
  544. package/dist/schemas/community/community-stage-transition.schema.d.ts +33 -0
  545. package/dist/schemas/community/community-stage-transition.schema.js +18 -0
  546. package/dist/schemas/community/community-suggestion.schema.d.ts +35 -0
  547. package/dist/schemas/community/community-suggestion.schema.js +24 -0
  548. package/dist/schemas/community/community-vote.schema.d.ts +24 -0
  549. package/dist/schemas/community/community-vote.schema.js +14 -0
  550. package/dist/schemas/community/community-waitlist.schema.d.ts +12 -0
  551. package/dist/schemas/community/community-waitlist.schema.js +10 -0
  552. package/dist/schemas/community/community-world-contribution.schema.d.ts +102 -0
  553. package/dist/schemas/community/community-world-contribution.schema.js +86 -0
  554. package/dist/schemas/community/credit-disclosure-variant.schema.d.ts +4 -0
  555. package/dist/schemas/community/credit-disclosure-variant.schema.js +6 -0
  556. package/dist/schemas/community/index.d.ts +56 -0
  557. package/dist/schemas/community/index.js +72 -0
  558. package/dist/schemas/cortex/bridge-envelope.schema.d.ts +70 -0
  559. package/dist/schemas/cortex/bridge-envelope.schema.js +77 -0
  560. package/dist/schemas/cortex/bridge-event-catalogue.d.ts +14 -0
  561. package/dist/schemas/cortex/bridge-event-catalogue.js +138 -0
  562. package/dist/schemas/cortex/bridge-events.schema.d.ts +14645 -0
  563. package/dist/schemas/cortex/bridge-events.schema.js +828 -0
  564. package/dist/schemas/cortex/bridge-readiness.schema.d.ts +27 -0
  565. package/dist/schemas/cortex/bridge-readiness.schema.js +15 -0
  566. package/dist/schemas/cortex/film-bridge-events.schema.d.ts +301 -0
  567. package/dist/schemas/cortex/film-bridge-events.schema.js +116 -0
  568. package/dist/schemas/cortex/index.d.ts +7 -0
  569. package/dist/schemas/cortex/index.js +23 -0
  570. package/dist/schemas/cortex/product-release-package.schema.d.ts +370 -0
  571. package/dist/schemas/cortex/product-release-package.schema.js +123 -0
  572. package/dist/schemas/cortex/proof-run-recorder.schema.d.ts +144 -0
  573. package/dist/schemas/cortex/proof-run-recorder.schema.js +43 -0
  574. package/dist/schemas/deployments/deployment-predict.schema.d.ts +165 -0
  575. package/dist/schemas/deployments/deployment-predict.schema.js +92 -0
  576. package/dist/schemas/deployments/deployment-preflight.schema.d.ts +184 -0
  577. package/dist/schemas/deployments/deployment-preflight.schema.js +80 -0
  578. package/dist/schemas/deployments/deployment-rollback.schema.d.ts +519 -0
  579. package/dist/schemas/deployments/deployment-rollback.schema.js +102 -0
  580. package/dist/schemas/deployments/deployment-status.schema.d.ts +1359 -0
  581. package/dist/schemas/deployments/deployment-status.schema.js +421 -0
  582. package/dist/schemas/film/film-artifact-kind.schema.d.ts +2 -0
  583. package/dist/schemas/film/film-artifact-kind.schema.js +6 -0
  584. package/dist/schemas/film/film-artifact-payloads.schema.d.ts +532 -0
  585. package/dist/schemas/film/film-artifact-payloads.schema.js +174 -0
  586. package/dist/schemas/film/film-asset-review.schema.d.ts +83 -0
  587. package/dist/schemas/film/film-asset-review.schema.js +42 -0
  588. package/dist/schemas/film/film-asset-rights-profile.schema.d.ts +68 -0
  589. package/dist/schemas/film/film-asset-rights-profile.schema.js +33 -0
  590. package/dist/schemas/film/film-character-pack-api.schema.d.ts +216 -0
  591. package/dist/schemas/film/film-character-pack-api.schema.js +51 -0
  592. package/dist/schemas/film/film-character-pack.schema.d.ts +51 -0
  593. package/dist/schemas/film/film-character-pack.schema.js +24 -0
  594. package/dist/schemas/film/film-character-scene-state.schema.d.ts +36 -0
  595. package/dist/schemas/film/film-character-scene-state.schema.js +18 -0
  596. package/dist/schemas/film/film-clip-api.schema.d.ts +379 -0
  597. package/dist/schemas/film/film-clip-api.schema.js +159 -0
  598. package/dist/schemas/film/film-clip-review-orchestration.schema.d.ts +234 -0
  599. package/dist/schemas/film/film-clip-review-orchestration.schema.js +23 -0
  600. package/dist/schemas/film/film-clip-review-scores.schema.d.ts +51 -0
  601. package/dist/schemas/film/film-clip-review-scores.schema.js +49 -0
  602. package/dist/schemas/film/film-clip-structured-review-artifact.schema.d.ts +175 -0
  603. package/dist/schemas/film/film-clip-structured-review-artifact.schema.js +15 -0
  604. package/dist/schemas/film/film-clip-structured-review.schema.d.ts +267 -0
  605. package/dist/schemas/film/film-clip-structured-review.schema.js +54 -0
  606. package/dist/schemas/film/film-clip.schema.d.ts +171 -0
  607. package/dist/schemas/film/film-clip.schema.js +64 -0
  608. package/dist/schemas/film/film-comfyui-workflow-create.schema.d.ts +39 -0
  609. package/dist/schemas/film/film-comfyui-workflow-create.schema.js +20 -0
  610. package/dist/schemas/film/film-comfyui-workflow-update.schema.d.ts +54 -0
  611. package/dist/schemas/film/film-comfyui-workflow-update.schema.js +28 -0
  612. package/dist/schemas/film/film-comfyui-workflow.schema.d.ts +188 -0
  613. package/dist/schemas/film/film-comfyui-workflow.schema.js +65 -0
  614. package/dist/schemas/film/film-creative-read-model.schema.d.ts +675 -0
  615. package/dist/schemas/film/film-creative-read-model.schema.js +66 -0
  616. package/dist/schemas/film/film-deliverable.schema.d.ts +656 -0
  617. package/dist/schemas/film/film-deliverable.schema.js +252 -0
  618. package/dist/schemas/film/film-edit-sequence.schema.d.ts +1112 -0
  619. package/dist/schemas/film/film-edit-sequence.schema.js +106 -0
  620. package/dist/schemas/film/film-elevenlabs-voice.schema.d.ts +126 -0
  621. package/dist/schemas/film/film-elevenlabs-voice.schema.js +56 -0
  622. package/dist/schemas/film/film-enqueue-multi-take.schema.d.ts +57 -0
  623. package/dist/schemas/film/film-enqueue-multi-take.schema.js +24 -0
  624. package/dist/schemas/film/film-export.schema.d.ts +78 -0
  625. package/dist/schemas/film/film-export.schema.js +37 -0
  626. package/dist/schemas/film/film-generation-dashboard.schema.d.ts +1779 -0
  627. package/dist/schemas/film/film-generation-dashboard.schema.js +222 -0
  628. package/dist/schemas/film/film-generation-package.schema.d.ts +1665 -0
  629. package/dist/schemas/film/film-generation-package.schema.js +116 -0
  630. package/dist/schemas/film/film-generation-task.schema.d.ts +1086 -0
  631. package/dist/schemas/film/film-generation-task.schema.js +159 -0
  632. package/dist/schemas/film/film-hydrate.schema.d.ts +46 -0
  633. package/dist/schemas/film/film-hydrate.schema.js +23 -0
  634. package/dist/schemas/film/film-keyframe-brief.schema.d.ts +99 -0
  635. package/dist/schemas/film/film-keyframe-brief.schema.js +29 -0
  636. package/dist/schemas/film/film-keyframe-review.schema.d.ts +186 -0
  637. package/dist/schemas/film/film-keyframe-review.schema.js +25 -0
  638. package/dist/schemas/film/film-keyframe.schema.d.ts +214 -0
  639. package/dist/schemas/film/film-keyframe.schema.js +43 -0
  640. package/dist/schemas/film/film-lessons-manifest.schema.d.ts +589 -0
  641. package/dist/schemas/film/film-lessons-manifest.schema.js +83 -0
  642. package/dist/schemas/film/film-llm-field.d.ts +22 -0
  643. package/dist/schemas/film/film-llm-field.js +78 -0
  644. package/dist/schemas/film/film-location-pack.schema.d.ts +51 -0
  645. package/dist/schemas/film/film-location-pack.schema.js +24 -0
  646. package/dist/schemas/film/film-marketing-creative-api.schema.d.ts +276 -0
  647. package/dist/schemas/film/film-marketing-creative-api.schema.js +47 -0
  648. package/dist/schemas/film/film-marketing-creative.schema.d.ts +74 -0
  649. package/dist/schemas/film/film-marketing-creative.schema.js +58 -0
  650. package/dist/schemas/film/film-marketing-format-preset.schema.d.ts +22 -0
  651. package/dist/schemas/film/film-marketing-format-preset.schema.js +71 -0
  652. package/dist/schemas/film/film-media-asset-file.schema.d.ts +59 -0
  653. package/dist/schemas/film/film-media-asset-file.schema.js +45 -0
  654. package/dist/schemas/film/film-media-asset-promotion-api.schema.d.ts +219 -0
  655. package/dist/schemas/film/film-media-asset-promotion-api.schema.js +29 -0
  656. package/dist/schemas/film/film-media-asset-review-api.schema.d.ts +431 -0
  657. package/dist/schemas/film/film-media-asset-review-api.schema.js +41 -0
  658. package/dist/schemas/film/film-media-asset.schema.d.ts +131 -0
  659. package/dist/schemas/film/film-media-asset.schema.js +94 -0
  660. package/dist/schemas/film/film-media-kg.schema.d.ts +86 -0
  661. package/dist/schemas/film/film-media-kg.schema.js +70 -0
  662. package/dist/schemas/film/film-ofi-report.schema.d.ts +437 -0
  663. package/dist/schemas/film/film-ofi-report.schema.js +65 -0
  664. package/dist/schemas/film/film-otio-sidecar.schema.d.ts +136 -0
  665. package/dist/schemas/film/film-otio-sidecar.schema.js +28 -0
  666. package/dist/schemas/film/film-production-coverage.schema.d.ts +179 -0
  667. package/dist/schemas/film/film-production-coverage.schema.js +123 -0
  668. package/dist/schemas/film/film-production-graph.schema.d.ts +273 -0
  669. package/dist/schemas/film/film-production-graph.schema.js +43 -0
  670. package/dist/schemas/film/film-production-read-model.schema.d.ts +1038 -0
  671. package/dist/schemas/film/film-production-read-model.schema.js +65 -0
  672. package/dist/schemas/film/film-production-style.schema.d.ts +31 -0
  673. package/dist/schemas/film/film-production-style.schema.js +50 -0
  674. package/dist/schemas/film/film-project.schema.d.ts +115 -0
  675. package/dist/schemas/film/film-project.schema.js +50 -0
  676. package/dist/schemas/film/film-prompt-compiler.schema.d.ts +346 -0
  677. package/dist/schemas/film/film-prompt-compiler.schema.js +116 -0
  678. package/dist/schemas/film/film-prompt-performance.schema.d.ts +77 -0
  679. package/dist/schemas/film/film-prompt-performance.schema.js +37 -0
  680. package/dist/schemas/film/film-prompt-repair.schema.d.ts +41 -0
  681. package/dist/schemas/film/film-prompt-repair.schema.js +36 -0
  682. package/dist/schemas/film/film-prompt.schema.d.ts +265 -0
  683. package/dist/schemas/film/film-prompt.schema.js +47 -0
  684. package/dist/schemas/film/film-provider-hints.schema.d.ts +105 -0
  685. package/dist/schemas/film/film-provider-hints.schema.js +50 -0
  686. package/dist/schemas/film/film-provider-job.schema.d.ts +320 -0
  687. package/dist/schemas/film/film-provider-job.schema.js +181 -0
  688. package/dist/schemas/film/film-provider.schema.d.ts +100 -0
  689. package/dist/schemas/film/film-provider.schema.js +51 -0
  690. package/dist/schemas/film/film-queue-enqueue.schema.d.ts +423 -0
  691. package/dist/schemas/film/film-queue-enqueue.schema.js +98 -0
  692. package/dist/schemas/film/film-queue-task-detail.schema.d.ts +981 -0
  693. package/dist/schemas/film/film-queue-task-detail.schema.js +57 -0
  694. package/dist/schemas/film/film-reference-pack.schema.d.ts +48 -0
  695. package/dist/schemas/film/film-reference-pack.schema.js +23 -0
  696. package/dist/schemas/film/film-regeneration-plan.schema.d.ts +124 -0
  697. package/dist/schemas/film/film-regeneration-plan.schema.js +62 -0
  698. package/dist/schemas/film/film-resolve-ingest.schema.d.ts +278 -0
  699. package/dist/schemas/film/film-resolve-ingest.schema.js +35 -0
  700. package/dist/schemas/film/film-resolve-timeline-report.schema.d.ts +323 -0
  701. package/dist/schemas/film/film-resolve-timeline-report.schema.js +43 -0
  702. package/dist/schemas/film/film-review.schema.d.ts +65 -0
  703. package/dist/schemas/film/film-review.schema.js +47 -0
  704. package/dist/schemas/film/film-scene.schema.d.ts +175 -0
  705. package/dist/schemas/film/film-scene.schema.js +38 -0
  706. package/dist/schemas/film/film-screenplay.schema.d.ts +215 -0
  707. package/dist/schemas/film/film-screenplay.schema.js +38 -0
  708. package/dist/schemas/film/film-shot-risk-assessment.schema.d.ts +27 -0
  709. package/dist/schemas/film/film-shot-risk-assessment.schema.js +16 -0
  710. package/dist/schemas/film/film-shot-risk-level.schema.d.ts +5 -0
  711. package/dist/schemas/film/film-shot-risk-level.schema.js +7 -0
  712. package/dist/schemas/film/film-shot.schema.d.ts +564 -0
  713. package/dist/schemas/film/film-shot.schema.js +96 -0
  714. package/dist/schemas/film/film-still-review-artifact.schema.d.ts +154 -0
  715. package/dist/schemas/film/film-still-review-artifact.schema.js +15 -0
  716. package/dist/schemas/film/film-still-review-scores.schema.d.ts +161 -0
  717. package/dist/schemas/film/film-still-review-scores.schema.js +48 -0
  718. package/dist/schemas/film/film-take-comparison.schema.d.ts +437 -0
  719. package/dist/schemas/film/film-take-comparison.schema.js +73 -0
  720. package/dist/schemas/film/film-training-dataset-api.schema.d.ts +641 -0
  721. package/dist/schemas/film/film-training-dataset-api.schema.js +86 -0
  722. package/dist/schemas/film/film-training-dataset.schema.d.ts +171 -0
  723. package/dist/schemas/film/film-training-dataset.schema.js +69 -0
  724. package/dist/schemas/film/film-wardrobe-state.schema.d.ts +42 -0
  725. package/dist/schemas/film/film-wardrobe-state.schema.js +21 -0
  726. package/dist/schemas/film/film-workbench.schema.d.ts +379 -0
  727. package/dist/schemas/film/film-workbench.schema.js +58 -0
  728. package/dist/schemas/film/film-workflow-lineage.schema.d.ts +166 -0
  729. package/dist/schemas/film/film-workflow-lineage.schema.js +83 -0
  730. package/dist/schemas/film/film-world-ontology.schema.d.ts +250 -0
  731. package/dist/schemas/film/film-world-ontology.schema.js +79 -0
  732. package/dist/schemas/film/image-generation-provider.schema.d.ts +392 -0
  733. package/dist/schemas/film/image-generation-provider.schema.js +55 -0
  734. package/dist/schemas/film/index.d.ts +81 -0
  735. package/dist/schemas/film/index.js +97 -0
  736. package/dist/schemas/github/branches.schema.d.ts +61 -0
  737. package/dist/schemas/github/branches.schema.js +17 -0
  738. package/dist/schemas/github/issues.schema.d.ts +145 -0
  739. package/dist/schemas/github/issues.schema.js +27 -0
  740. package/dist/schemas/github/pulls.schema.d.ts +173 -0
  741. package/dist/schemas/github/pulls.schema.js +30 -0
  742. package/dist/schemas/github/repo-create.schema.d.ts +21 -0
  743. package/dist/schemas/github/repo-create.schema.js +11 -0
  744. package/dist/schemas/github/webhook-delivery.schema.d.ts +729 -0
  745. package/dist/schemas/github/webhook-delivery.schema.js +142 -0
  746. package/dist/schemas/github/workflow-runs.schema.d.ts +173 -0
  747. package/dist/schemas/github/workflow-runs.schema.js +52 -0
  748. package/dist/schemas/github-pr-create.schema.d.ts +175 -0
  749. package/dist/schemas/github-pr-create.schema.js +70 -0
  750. package/dist/schemas/github-status.schema.d.ts +418 -0
  751. package/dist/schemas/github-status.schema.js +122 -0
  752. package/dist/schemas/graph/edge-v2.schema.d.ts +85 -0
  753. package/dist/schemas/graph/edge-v2.schema.js +164 -0
  754. package/dist/schemas/graph/graph-query-v2.schema.d.ts +449 -0
  755. package/dist/schemas/graph/graph-query-v2.schema.js +83 -0
  756. package/dist/schemas/graph/index.d.ts +14 -0
  757. package/dist/schemas/graph/index.js +30 -0
  758. package/dist/schemas/graph/node-v2.schema.d.ts +68 -0
  759. package/dist/schemas/graph/node-v2.schema.js +120 -0
  760. package/dist/schemas/graph/sql-security-findings.schema.d.ts +71 -0
  761. package/dist/schemas/graph/sql-security-findings.schema.js +40 -0
  762. package/dist/schemas/guardian/guardian-score.schema.d.ts +13 -0
  763. package/dist/schemas/guardian/guardian-score.schema.js +24 -0
  764. package/dist/schemas/guardian/validate.schema.d.ts +51 -0
  765. package/dist/schemas/guardian/validate.schema.js +36 -0
  766. package/dist/schemas/implement/nextjs-scaffold-manifest.schema.d.ts +44 -0
  767. package/dist/schemas/implement/nextjs-scaffold-manifest.schema.js +25 -0
  768. package/dist/schemas/implement/patch-validation-diagnostic.schema.d.ts +17 -0
  769. package/dist/schemas/implement/patch-validation-diagnostic.schema.js +19 -0
  770. package/dist/schemas/implement-patch-detail.schema.d.ts +344 -0
  771. package/dist/schemas/implement-patch-detail.schema.js +78 -0
  772. package/dist/schemas/implement-patch-lifecycle.schema.d.ts +66 -0
  773. package/dist/schemas/implement-patch-lifecycle.schema.js +317 -0
  774. package/dist/schemas/implement-patch-task.schema.d.ts +29 -0
  775. package/dist/schemas/implement-patch-task.schema.js +26 -0
  776. package/dist/schemas/implement-patch.schema.d.ts +2955 -0
  777. package/dist/schemas/implement-patch.schema.js +573 -0
  778. package/dist/schemas/implement-quarantine.schema.d.ts +215 -0
  779. package/dist/schemas/implement-quarantine.schema.js +71 -0
  780. package/dist/schemas/index.d.ts +5249 -0
  781. package/dist/schemas/index.js +1649 -0
  782. package/dist/schemas/integrations/cursor-execution.schema.d.ts +530 -0
  783. package/dist/schemas/integrations/cursor-execution.schema.js +104 -0
  784. package/dist/schemas/integrations.d.ts +426 -0
  785. package/dist/schemas/integrations.js +149 -0
  786. package/dist/schemas/knowledge/api-retry-kg-persistence.schema.d.ts +130 -0
  787. package/dist/schemas/knowledge/api-retry-kg-persistence.schema.js +28 -0
  788. package/dist/schemas/knowledge/constitution-retry-kg-persistence.schema.d.ts +46 -0
  789. package/dist/schemas/knowledge/constitution-retry-kg-persistence.schema.js +12 -0
  790. package/dist/schemas/knowledge/coverage.schema.d.ts +98 -0
  791. package/dist/schemas/knowledge/coverage.schema.js +27 -0
  792. package/dist/schemas/knowledge/duplicates.schema.d.ts +62 -0
  793. package/dist/schemas/knowledge/duplicates.schema.js +23 -0
  794. package/dist/schemas/knowledge/graph-query.schema.d.ts +9 -0
  795. package/dist/schemas/knowledge/graph-query.schema.js +7 -0
  796. package/dist/schemas/knowledge/guardian-retry-kg-persistence.schema.d.ts +40 -0
  797. package/dist/schemas/knowledge/guardian-retry-kg-persistence.schema.js +12 -0
  798. package/dist/schemas/knowledge/implement-retry-kg-persistence.schema.d.ts +49 -0
  799. package/dist/schemas/knowledge/implement-retry-kg-persistence.schema.js +14 -0
  800. package/dist/schemas/knowledge/kg-generation-writers.schema.d.ts +338 -0
  801. package/dist/schemas/knowledge/kg-generation-writers.schema.js +73 -0
  802. package/dist/schemas/knowledge/kg-relations.schema.d.ts +70 -0
  803. package/dist/schemas/knowledge/kg-relations.schema.js +157 -0
  804. package/dist/schemas/knowledge/knowledge-graph-summary.schema.d.ts +170 -0
  805. package/dist/schemas/knowledge/knowledge-graph-summary.schema.js +43 -0
  806. package/dist/schemas/knowledge/knowledge-node-provenance.schema.d.ts +41 -0
  807. package/dist/schemas/knowledge/knowledge-node-provenance.schema.js +21 -0
  808. package/dist/schemas/knowledge/knowledge-retry-kg-persistence.schema.d.ts +76 -0
  809. package/dist/schemas/knowledge/knowledge-retry-kg-persistence.schema.js +14 -0
  810. package/dist/schemas/knowledge/knowledge-search.schema.d.ts +29 -0
  811. package/dist/schemas/knowledge/knowledge-search.schema.js +17 -0
  812. package/dist/schemas/knowledge/lineage.schema.d.ts +70 -0
  813. package/dist/schemas/knowledge/lineage.schema.js +28 -0
  814. package/dist/schemas/knowledge/project-brief-knowledge-node.schema.d.ts +45 -0
  815. package/dist/schemas/knowledge/project-brief-knowledge-node.schema.js +30 -0
  816. package/dist/schemas/knowledge/review-readiness.schema.d.ts +104 -0
  817. package/dist/schemas/knowledge/review-readiness.schema.js +30 -0
  818. package/dist/schemas/knowledge/sync-prs.schema.d.ts +54 -0
  819. package/dist/schemas/knowledge/sync-prs.schema.js +21 -0
  820. package/dist/schemas/knowledge/tasks-retry-kg-persistence.schema.d.ts +37 -0
  821. package/dist/schemas/knowledge/tasks-retry-kg-persistence.schema.js +14 -0
  822. package/dist/schemas/knowledge/ui-retry-kg-persistence.schema.d.ts +58 -0
  823. package/dist/schemas/knowledge/ui-retry-kg-persistence.schema.js +14 -0
  824. package/dist/schemas/knowledge-graph-response.schema.d.ts +376 -0
  825. package/dist/schemas/knowledge-graph-response.schema.js +56 -0
  826. package/dist/schemas/logging/logger-context.schema.d.ts +21 -0
  827. package/dist/schemas/logging/logger-context.schema.js +11 -0
  828. package/dist/schemas/metrics/project-kpi-summary.schema.d.ts +368 -0
  829. package/dist/schemas/metrics/project-kpi-summary.schema.js +80 -0
  830. package/dist/schemas/orchestration/durable-stage-progress.schema.d.ts +57 -0
  831. package/dist/schemas/orchestration/durable-stage-progress.schema.js +34 -0
  832. package/dist/schemas/orchestration-execution.d.ts +163 -0
  833. package/dist/schemas/orchestration-execution.js +89 -0
  834. package/dist/schemas/project-bmad-settings-patch.schema.d.ts +66 -0
  835. package/dist/schemas/project-bmad-settings-patch.schema.js +29 -0
  836. package/dist/schemas/project-kind.schema.d.ts +70 -0
  837. package/dist/schemas/project-kind.schema.js +38 -0
  838. package/dist/schemas/project-team.d.ts +48 -0
  839. package/dist/schemas/project-team.js +52 -0
  840. package/dist/schemas/projects/nl-kg-v2-enabled.schema.d.ts +10 -0
  841. package/dist/schemas/projects/nl-kg-v2-enabled.schema.js +16 -0
  842. package/dist/schemas/provider-sentinel/cleanup-manifest.schema.d.ts +78 -0
  843. package/dist/schemas/provider-sentinel/cleanup-manifest.schema.js +27 -0
  844. package/dist/schemas/provider-sentinel/execution-evidence.schema.d.ts +228 -0
  845. package/dist/schemas/provider-sentinel/execution-evidence.schema.js +78 -0
  846. package/dist/schemas/provider-sentinel/film-media-sentinel-config.schema.d.ts +55 -0
  847. package/dist/schemas/provider-sentinel/film-media-sentinel-config.schema.js +33 -0
  848. package/dist/schemas/provider-sentinel/index.d.ts +6 -0
  849. package/dist/schemas/provider-sentinel/index.js +22 -0
  850. package/dist/schemas/provider-sentinel/provider-sentinel-common.schema.d.ts +8 -0
  851. package/dist/schemas/provider-sentinel/provider-sentinel-common.schema.js +9 -0
  852. package/dist/schemas/provider-sentinel/provider-sentinel-result.schema.d.ts +743 -0
  853. package/dist/schemas/provider-sentinel/provider-sentinel-result.schema.js +126 -0
  854. package/dist/schemas/provider-sentinel/text-durable-sentinel-config.schema.d.ts +51 -0
  855. package/dist/schemas/provider-sentinel/text-durable-sentinel-config.schema.js +30 -0
  856. package/dist/schemas/publication/manuscript-export.schema.d.ts +249 -0
  857. package/dist/schemas/publication/manuscript-export.schema.js +47 -0
  858. package/dist/schemas/repo/repo-scan-run.schema.d.ts +60 -0
  859. package/dist/schemas/repo/repo-scan-run.schema.js +34 -0
  860. package/dist/schemas/repos/project-repo-link.schema.d.ts +148 -0
  861. package/dist/schemas/repos/project-repo-link.schema.js +28 -0
  862. package/dist/schemas/repos/repo-readiness.schema.d.ts +26 -0
  863. package/dist/schemas/repos/repo-readiness.schema.js +23 -0
  864. package/dist/schemas/repos/repo-scan.schema.d.ts +379 -0
  865. package/dist/schemas/repos/repo-scan.schema.js +98 -0
  866. package/dist/schemas/review/review-coverage.schema.d.ts +2238 -0
  867. package/dist/schemas/review/review-coverage.schema.js +182 -0
  868. package/dist/schemas/review/review-policy.schema.d.ts +87 -0
  869. package/dist/schemas/review/review-policy.schema.js +42 -0
  870. package/dist/schemas/runtime/index.d.ts +6 -0
  871. package/dist/schemas/runtime/index.js +22 -0
  872. package/dist/schemas/runtime/platform-health.schema.d.ts +83 -0
  873. package/dist/schemas/runtime/platform-health.schema.js +31 -0
  874. package/dist/schemas/runtime/probe-harness-gen.schema.d.ts +456 -0
  875. package/dist/schemas/runtime/probe-harness-gen.schema.js +91 -0
  876. package/dist/schemas/runtime/probe.schema.d.ts +1117 -0
  877. package/dist/schemas/runtime/probe.schema.js +278 -0
  878. package/dist/schemas/runtime/runtime-knowledge-node.schema.d.ts +862 -0
  879. package/dist/schemas/runtime/runtime-knowledge-node.schema.js +29 -0
  880. package/dist/schemas/runtime/runtime-loop.schema.d.ts +175 -0
  881. package/dist/schemas/runtime/runtime-loop.schema.js +84 -0
  882. package/dist/schemas/runtime/runtime-run.schema.d.ts +378 -0
  883. package/dist/schemas/runtime/runtime-run.schema.js +30 -0
  884. package/dist/schemas/security/index.d.ts +3 -0
  885. package/dist/schemas/security/index.js +19 -0
  886. package/dist/schemas/security/pre-pr-security-gate.schema.d.ts +486 -0
  887. package/dist/schemas/security/pre-pr-security-gate.schema.js +13 -0
  888. package/dist/schemas/security/security-finding.schema.d.ts +546 -0
  889. package/dist/schemas/security/security-finding.schema.js +138 -0
  890. package/dist/schemas/security/security-knowledge-node.schema.d.ts +285 -0
  891. package/dist/schemas/security/security-knowledge-node.schema.js +21 -0
  892. package/dist/schemas/task-complexity.schema.d.ts +3 -0
  893. package/dist/schemas/task-complexity.schema.js +6 -0
  894. package/dist/schemas/task-evidence-expectations.schema.d.ts +174 -0
  895. package/dist/schemas/task-evidence-expectations.schema.js +35 -0
  896. package/dist/schemas/traceability/index.d.ts +2 -0
  897. package/dist/schemas/traceability/index.js +18 -0
  898. package/dist/schemas/traceability/neuraloom-traceability-file.schema.d.ts +593 -0
  899. package/dist/schemas/traceability/neuraloom-traceability-file.schema.js +93 -0
  900. package/dist/schemas/traceability/traceability-graph.schema.d.ts +712 -0
  901. package/dist/schemas/traceability/traceability-graph.schema.js +112 -0
  902. package/dist/schemas/workflow/build-knowledge.schema.d.ts +672 -0
  903. package/dist/schemas/workflow/build-knowledge.schema.js +92 -0
  904. package/dist/schemas/workflow/build-truth-read-model.schema.d.ts +1218 -0
  905. package/dist/schemas/workflow/build-truth-read-model.schema.js +42 -0
  906. package/dist/schemas/workflow/canonicalization-decision.schema.d.ts +74 -0
  907. package/dist/schemas/workflow/canonicalization-decision.schema.js +22 -0
  908. package/dist/schemas/workflow/code-reality-artifacts.schema.d.ts +914 -0
  909. package/dist/schemas/workflow/code-reality-artifacts.schema.js +150 -0
  910. package/dist/schemas/workflow/code-reality-read-model.schema.d.ts +12708 -0
  911. package/dist/schemas/workflow/code-reality-read-model.schema.js +237 -0
  912. package/dist/schemas/workflow/code-reality-task-traceability.schema.d.ts +124 -0
  913. package/dist/schemas/workflow/code-reality-task-traceability.schema.js +107 -0
  914. package/dist/schemas/workflow/command-center-spine.schema.d.ts +62 -0
  915. package/dist/schemas/workflow/command-center-spine.schema.js +58 -0
  916. package/dist/schemas/workflow/context-bundle.schema.d.ts +111 -0
  917. package/dist/schemas/workflow/context-bundle.schema.js +62 -0
  918. package/dist/schemas/workflow/context-contamination.schema.d.ts +284 -0
  919. package/dist/schemas/workflow/context-contamination.schema.js +65 -0
  920. package/dist/schemas/workflow/deployment-evidence.schema.d.ts +269 -0
  921. package/dist/schemas/workflow/deployment-evidence.schema.js +55 -0
  922. package/dist/schemas/workflow/doc-draft-artifact.schema.d.ts +126 -0
  923. package/dist/schemas/workflow/doc-draft-artifact.schema.js +52 -0
  924. package/dist/schemas/workflow/domain-acceptance.schema.d.ts +206 -0
  925. package/dist/schemas/workflow/domain-acceptance.schema.js +62 -0
  926. package/dist/schemas/workflow/engineering-context.schema.d.ts +2235 -0
  927. package/dist/schemas/workflow/engineering-context.schema.js +566 -0
  928. package/dist/schemas/workflow/existing-capability-classification.schema.d.ts +79 -0
  929. package/dist/schemas/workflow/existing-capability-classification.schema.js +28 -0
  930. package/dist/schemas/workflow/existing-codebase-context.schema.d.ts +865 -0
  931. package/dist/schemas/workflow/existing-codebase-context.schema.js +56 -0
  932. package/dist/schemas/workflow/findings-register.schema.d.ts +148 -0
  933. package/dist/schemas/workflow/findings-register.schema.js +35 -0
  934. package/dist/schemas/workflow/implement-first-batch.schema.d.ts +190 -0
  935. package/dist/schemas/workflow/implement-first-batch.schema.js +49 -0
  936. package/dist/schemas/workflow/implement-gate-status.schema.d.ts +823 -0
  937. package/dist/schemas/workflow/implement-gate-status.schema.js +94 -0
  938. package/dist/schemas/workflow/implement-stale-batch-repair.schema.d.ts +71 -0
  939. package/dist/schemas/workflow/implement-stale-batch-repair.schema.js +28 -0
  940. package/dist/schemas/workflow/implement-task-guard.schema.d.ts +27 -0
  941. package/dist/schemas/workflow/implement-task-guard.schema.js +35 -0
  942. package/dist/schemas/workflow/implementation-packet.schema.d.ts +200 -0
  943. package/dist/schemas/workflow/implementation-packet.schema.js +88 -0
  944. package/dist/schemas/workflow/import-validity.schema.d.ts +177 -0
  945. package/dist/schemas/workflow/import-validity.schema.js +71 -0
  946. package/dist/schemas/workflow/index.d.ts +14 -0
  947. package/dist/schemas/workflow/index.js +30 -0
  948. package/dist/schemas/workflow/ingest-dashboard.schema.d.ts +1094 -0
  949. package/dist/schemas/workflow/ingest-dashboard.schema.js +76 -0
  950. package/dist/schemas/workflow/ingest-gate.schema.d.ts +133 -0
  951. package/dist/schemas/workflow/ingest-gate.schema.js +27 -0
  952. package/dist/schemas/workflow/ingest-inventory.schema.d.ts +203 -0
  953. package/dist/schemas/workflow/ingest-inventory.schema.js +52 -0
  954. package/dist/schemas/workflow/knowledge-graph-result.schema.d.ts +90 -0
  955. package/dist/schemas/workflow/knowledge-graph-result.schema.js +37 -0
  956. package/dist/schemas/workflow/patch-file-scope-policy.schema.d.ts +62 -0
  957. package/dist/schemas/workflow/patch-file-scope-policy.schema.js +38 -0
  958. package/dist/schemas/workflow/patch-review-result.schema.d.ts +139 -0
  959. package/dist/schemas/workflow/patch-review-result.schema.js +58 -0
  960. package/dist/schemas/workflow/plan-approval.schema.d.ts +184 -0
  961. package/dist/schemas/workflow/plan-approval.schema.js +102 -0
  962. package/dist/schemas/workflow/product-readiness-response.schema.d.ts +307 -0
  963. package/dist/schemas/workflow/product-readiness-response.schema.js +81 -0
  964. package/dist/schemas/workflow/product-realization.schema.d.ts +259 -0
  965. package/dist/schemas/workflow/product-realization.schema.js +207 -0
  966. package/dist/schemas/workflow/product-route-manifest.schema.d.ts +785 -0
  967. package/dist/schemas/workflow/product-route-manifest.schema.js +161 -0
  968. package/dist/schemas/workflow/repair-specify-gate.schema.d.ts +33 -0
  969. package/dist/schemas/workflow/repair-specify-gate.schema.js +13 -0
  970. package/dist/schemas/workflow/repo-intel-snapshot.schema.d.ts +471 -0
  971. package/dist/schemas/workflow/repo-intel-snapshot.schema.js +98 -0
  972. package/dist/schemas/workflow/repo-policy-snapshot.schema.d.ts +365 -0
  973. package/dist/schemas/workflow/repo-policy-snapshot.schema.js +83 -0
  974. package/dist/schemas/workflow/review-acceptance.schema.d.ts +182 -0
  975. package/dist/schemas/workflow/review-acceptance.schema.js +66 -0
  976. package/dist/schemas/workflow/review-release-decision-operator.schema.d.ts +220 -0
  977. package/dist/schemas/workflow/review-release-decision-operator.schema.js +65 -0
  978. package/dist/schemas/workflow/route-manifest.schema.d.ts +239 -0
  979. package/dist/schemas/workflow/route-manifest.schema.js +82 -0
  980. package/dist/schemas/workflow/runtime-contract.schema.d.ts +384 -0
  981. package/dist/schemas/workflow/runtime-contract.schema.js +71 -0
  982. package/dist/schemas/workflow/schema-page-read-model.schema.d.ts +185 -0
  983. package/dist/schemas/workflow/schema-page-read-model.schema.js +29 -0
  984. package/dist/schemas/workflow/ship-closure.schema.d.ts +516 -0
  985. package/dist/schemas/workflow/ship-closure.schema.js +96 -0
  986. package/dist/schemas/workflow/software-workflow-lineage.schema.d.ts +384 -0
  987. package/dist/schemas/workflow/software-workflow-lineage.schema.js +54 -0
  988. package/dist/schemas/workflow/specify-mutation-health.schema.d.ts +72 -0
  989. package/dist/schemas/workflow/specify-mutation-health.schema.js +24 -0
  990. package/dist/schemas/workflow/step-evidence-resolution.schema.d.ts +49 -0
  991. package/dist/schemas/workflow/step-evidence-resolution.schema.js +36 -0
  992. package/dist/schemas/workflow/step-gate.schema.d.ts +312 -0
  993. package/dist/schemas/workflow/step-gate.schema.js +90 -0
  994. package/dist/schemas/workflow/task-capsule.schema.d.ts +414 -0
  995. package/dist/schemas/workflow/task-capsule.schema.js +99 -0
  996. package/dist/schemas/workflow/tasks-github-sync.schema.d.ts +60 -0
  997. package/dist/schemas/workflow/tasks-github-sync.schema.js +24 -0
  998. package/dist/schemas/workflow/tasks-repair-stale-implementing.schema.d.ts +86 -0
  999. package/dist/schemas/workflow/tasks-repair-stale-implementing.schema.js +38 -0
  1000. package/dist/schemas/workflow/tasks-truth.schema.d.ts +616 -0
  1001. package/dist/schemas/workflow/tasks-truth.schema.js +76 -0
  1002. package/dist/schemas/workflow/tasks-unblock-implement-handoff.schema.d.ts +210 -0
  1003. package/dist/schemas/workflow/tasks-unblock-implement-handoff.schema.js +17 -0
  1004. package/dist/schemas/workflow/test-obligation-manifest.schema.d.ts +306 -0
  1005. package/dist/schemas/workflow/test-obligation-manifest.schema.js +131 -0
  1006. package/dist/schemas/workflow/workflow-doctor.schema.d.ts +942 -0
  1007. package/dist/schemas/workflow/workflow-doctor.schema.js +141 -0
  1008. package/dist/schemas/workflow/workflow-evidence.schema.d.ts +67 -0
  1009. package/dist/schemas/workflow/workflow-evidence.schema.js +23 -0
  1010. package/dist/schemas/workflow/workflow-intelligence-graph.schema.d.ts +415 -0
  1011. package/dist/schemas/workflow/workflow-intelligence-graph.schema.js +213 -0
  1012. package/dist/schemas/workflow/workflow-run-event.schema.d.ts +41 -0
  1013. package/dist/schemas/workflow/workflow-run-event.schema.js +55 -0
  1014. package/dist/schemas/workflow-ci-step-artifacts.schema.d.ts +60 -0
  1015. package/dist/schemas/workflow-ci-step-artifacts.schema.js +15 -0
  1016. package/dist/schemas/workflow-implement-read-model.schema.d.ts +86 -0
  1017. package/dist/schemas/workflow-implement-read-model.schema.js +22 -0
  1018. package/dist/schemas/workflow-knowledge-step-artifacts.schema.d.ts +60 -0
  1019. package/dist/schemas/workflow-knowledge-step-artifacts.schema.js +15 -0
  1020. package/dist/schemas/workflow-progression.d.ts +1955 -0
  1021. package/dist/schemas/workflow-progression.js +259 -0
  1022. package/dist/telemetry/index.d.ts +194 -0
  1023. package/dist/telemetry/index.js +93 -0
  1024. package/dist/transformation/canonical-semantic-model.d.ts +233 -0
  1025. package/dist/transformation/canonical-semantic-model.js +61 -0
  1026. package/dist/transformation/index.d.ts +6 -0
  1027. package/dist/transformation/index.js +22 -0
  1028. package/dist/transformation/transformation-registry.d.ts +136 -0
  1029. package/dist/transformation/transformation-registry.js +100 -0
  1030. package/dist/types/ai-responses.d.ts +98 -0
  1031. package/dist/types/ai-responses.js +42 -0
  1032. package/dist/types/ai.d.ts +4 -0
  1033. package/dist/types/ai.js +2 -0
  1034. package/dist/types/audiobook-embed.d.ts +22 -0
  1035. package/dist/types/audiobook-embed.js +2 -0
  1036. package/dist/types/audiobook.d.ts +30 -0
  1037. package/dist/types/audiobook.js +2 -0
  1038. package/dist/types/chapter-revision.types.d.ts +6 -0
  1039. package/dist/types/chapter-revision.types.js +6 -0
  1040. package/dist/types/ci.d.ts +14 -0
  1041. package/dist/types/ci.js +2 -0
  1042. package/dist/types/codebase.d.ts +309 -0
  1043. package/dist/types/codebase.js +83 -0
  1044. package/dist/types/community-credit-transaction-type.d.ts +2 -0
  1045. package/dist/types/community-credit-transaction-type.js +9 -0
  1046. package/dist/types/community-membership-tier.d.ts +2 -0
  1047. package/dist/types/community-membership-tier.js +4 -0
  1048. package/dist/types/community-operator-role.d.ts +9 -0
  1049. package/dist/types/community-operator-role.js +13 -0
  1050. package/dist/types/community-stage.d.ts +3 -0
  1051. package/dist/types/community-stage.js +19 -0
  1052. package/dist/types/graph-canvas.d.ts +109 -0
  1053. package/dist/types/graph-canvas.js +25 -0
  1054. package/dist/types/graph-question-mapping.d.ts +33 -0
  1055. package/dist/types/graph-question-mapping.js +36 -0
  1056. package/dist/types/index.d.ts +2187 -0
  1057. package/dist/types/index.js +53 -0
  1058. package/dist/types/manuscript-checks.d.ts +1 -0
  1059. package/dist/types/manuscript-checks.js +2 -0
  1060. package/dist/types/orchestration-execution.d.ts +16 -0
  1061. package/dist/types/orchestration-execution.js +5 -0
  1062. package/dist/types/product-readiness.d.ts +44 -0
  1063. package/dist/types/product-readiness.js +2 -0
  1064. package/dist/types/product-route-manifest.d.ts +5 -0
  1065. package/dist/types/product-route-manifest.js +21 -0
  1066. package/dist/types/project-capabilities.d.ts +20 -0
  1067. package/dist/types/project-capabilities.js +40 -0
  1068. package/dist/types/project-kind.d.ts +68 -0
  1069. package/dist/types/project-kind.js +216 -0
  1070. package/dist/types/pwa.d.ts +29 -0
  1071. package/dist/types/pwa.js +6 -0
  1072. package/dist/types/repo.d.ts +2 -0
  1073. package/dist/types/repo.js +2 -0
  1074. package/dist/types/resolve-model-policy-input.d.ts +37 -0
  1075. package/dist/types/resolve-model-policy-input.js +2 -0
  1076. package/dist/types/settings.d.ts +13 -0
  1077. package/dist/types/settings.js +20 -0
  1078. package/dist/types/supabase-generated.d.ts +1122 -0
  1079. package/dist/types/supabase-generated.js +13 -0
  1080. package/dist/types/workflow-action-panel.d.ts +41 -0
  1081. package/dist/types/workflow-action-panel.js +2 -0
  1082. package/dist/types/workflow-command-center.d.ts +50 -0
  1083. package/dist/types/workflow-command-center.js +6 -0
  1084. package/dist/types/workflow-completion.d.ts +154 -0
  1085. package/dist/types/workflow-completion.js +2 -0
  1086. package/dist/types/workflow-graph.d.ts +786 -0
  1087. package/dist/types/workflow-graph.js +119 -0
  1088. package/dist/ui/domain-templates.d.ts +35 -0
  1089. package/dist/ui/domain-templates.js +242 -0
  1090. package/dist/utils/github-closing-keywords.d.ts +8 -0
  1091. package/dist/utils/github-closing-keywords.js +27 -0
  1092. package/dist/utils/implement-pr-batch-policy.d.ts +17 -0
  1093. package/dist/utils/implement-pr-batch-policy.js +72 -0
  1094. package/dist/utils/implement-pr-batch.d.ts +19 -0
  1095. package/dist/utils/implement-pr-batch.js +95 -0
  1096. package/dist/utils/implement-pr-metadata.d.ts +32 -0
  1097. package/dist/utils/implement-pr-metadata.js +41 -0
  1098. package/dist/workflow/api-route-key-resolver.d.ts +11 -0
  1099. package/dist/workflow/api-route-key-resolver.js +51 -0
  1100. package/dist/workflow/assurance-selector-keys.d.ts +134 -0
  1101. package/dist/workflow/assurance-selector-keys.js +145 -0
  1102. package/dist/workflow/channel-registry.d.ts +959 -0
  1103. package/dist/workflow/channel-registry.js +1475 -0
  1104. package/dist/workflow/evaluate-existing-codebase-readiness.d.ts +28 -0
  1105. package/dist/workflow/evaluate-existing-codebase-readiness.js +329 -0
  1106. package/dist/workflow/evaluate-ingest-gate.d.ts +11 -0
  1107. package/dist/workflow/evaluate-ingest-gate.js +168 -0
  1108. package/dist/workflow/evaluate-repair-specify-gate.d.ts +10 -0
  1109. package/dist/workflow/evaluate-repair-specify-gate.js +93 -0
  1110. package/dist/workflow/existing-codebase-step-area-map.d.ts +4 -0
  1111. package/dist/workflow/existing-codebase-step-area-map.js +22 -0
  1112. package/dist/workflow/film-spine-nav-aliases.d.ts +23 -0
  1113. package/dist/workflow/film-spine-nav-aliases.js +76 -0
  1114. package/dist/workflow/index.d.ts +23 -0
  1115. package/dist/workflow/index.js +39 -0
  1116. package/dist/workflow/is-code-reality-semantically-mapped.d.ts +8 -0
  1117. package/dist/workflow/is-code-reality-semantically-mapped.js +21 -0
  1118. package/dist/workflow/is-repository-scan-complete.d.ts +11 -0
  1119. package/dist/workflow/is-repository-scan-complete.js +28 -0
  1120. package/dist/workflow/normalize-workflow-execution-mode.d.ts +4 -0
  1121. package/dist/workflow/normalize-workflow-execution-mode.js +16 -0
  1122. package/dist/workflow/project-kind-normalizer.d.ts +34 -0
  1123. package/dist/workflow/project-kind-normalizer.js +162 -0
  1124. package/dist/workflow/resolve-workflow-variant.d.ts +42 -0
  1125. package/dist/workflow/resolve-workflow-variant.js +101 -0
  1126. package/dist/workflow/step-id-canonical.d.ts +26 -0
  1127. package/dist/workflow/step-id-canonical.js +58 -0
  1128. package/dist/workflow/test-obligation-policy.d.ts +12 -0
  1129. package/dist/workflow/test-obligation-policy.js +82 -0
  1130. package/dist/workflow/test-policy-registry.d.ts +45 -0
  1131. package/dist/workflow/test-policy-registry.js +190 -0
  1132. package/dist/workflow/workflow-assurance-completion-probe-gates.d.ts +43 -0
  1133. package/dist/workflow/workflow-assurance-completion-probe-gates.js +88 -0
  1134. package/dist/workflow/workflow-assurance-manifest.d.ts +84 -0
  1135. package/dist/workflow/workflow-assurance-manifest.js +309 -0
  1136. package/dist/workflow/workflow-assurance-wiring-tiers.d.ts +13 -0
  1137. package/dist/workflow/workflow-assurance-wiring-tiers.js +32 -0
  1138. package/dist/workflow/workflow-doctor-closure.d.ts +16 -0
  1139. package/dist/workflow/workflow-doctor-closure.js +245 -0
  1140. package/package.json +83 -4
  1141. package/README.md +0 -3
@@ -0,0 +1,1475 @@
1
+ "use strict";
2
+ /**
3
+ * WorkflowChannelRegistry — canonical SSOT for all workflow channels.
4
+ *
5
+ * Platform law: a stage is valid only when registry, orchestrator, artifact schema,
6
+ * display component, completion rule, and stale rule all agree on the same step,
7
+ * stage IDs, artifact types, and workflow variant.
8
+ *
9
+ * No step page, route, or orchestrator may use stage IDs, artifact types, or
10
+ * orchestrator keys that are not declared in this registry.
11
+ */
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.normalizeWorkflowStepStatsStepId = exports.resolveCanonicalWorkflowStepId = exports.resolveWorkflowStepRoutePath = exports.resolveRegistryWorkflowStepId = exports.WORKFLOW_CHANNEL_REGISTRY = exports.NonfictionPeerReviewReducerOutputSchema = exports.NonfictionPeerReviewMapOutputSchema = exports.WORKFLOW_VARIANTS = exports.WORKFLOW_FAMILIES = void 0;
14
+ exports.getWorkflowChannel = getWorkflowChannel;
15
+ exports.getChannelStep = getChannelStep;
16
+ exports.getWorkflowStages = getWorkflowStages;
17
+ exports.getWorkflowStageIds = getWorkflowStageIds;
18
+ exports.getWorkflowFinalStage = getWorkflowFinalStage;
19
+ exports.getCompletionRule = getCompletionRule;
20
+ exports.getRequiredInputs = getRequiredInputs;
21
+ exports.getProducedArtifacts = getProducedArtifacts;
22
+ exports.getOrchestratorKey = getOrchestratorKey;
23
+ exports.getDisplayComponentKey = getDisplayComponentKey;
24
+ exports.getWorkflowFamily = getWorkflowFamily;
25
+ exports.getWorkflowPlan = getWorkflowPlan;
26
+ exports.isSoftwareAppCompletionSpine = isSoftwareAppCompletionSpine;
27
+ exports.isStageIdDeclared = isStageIdDeclared;
28
+ exports.getActiveVariants = getActiveVariants;
29
+ exports.getRegistryFinalStageIds = getRegistryFinalStageIds;
30
+ exports.buildRegistryPipelineCheckContext = buildRegistryPipelineCheckContext;
31
+ exports.asWorkflowOrchestratorFn = asWorkflowOrchestratorFn;
32
+ const zod_1 = require("zod");
33
+ const workflow_artifacts_schema_1 = require("../schemas/ai/workflow-artifacts.schema");
34
+ const workflow_registry_1 = require("../constants/workflow-registry");
35
+ // Value import only — transformation-registry.ts's only reference back to this file is the
36
+ // erased `type WorkflowVariant` import, so this does not form a runtime circular dependency.
37
+ const transformation_registry_1 = require("../transformation/transformation-registry");
38
+ // ─── Primitive Discriminators ──────────────────────────────────────────────────
39
+ exports.WORKFLOW_FAMILIES = [
40
+ 'software',
41
+ 'writing',
42
+ 'research',
43
+ 'media',
44
+ 'publication',
45
+ 'transformation',
46
+ ];
47
+ exports.WORKFLOW_VARIANTS = [
48
+ 'software_app',
49
+ 'nonfiction_book',
50
+ 'fiction_book',
51
+ 'research_report',
52
+ 'scientific_paper',
53
+ 'policy_framework',
54
+ 'screenplay',
55
+ 'movie_package',
56
+ 'audiobook',
57
+ 'documentary',
58
+ 'cross_channel_transformation',
59
+ 'film_production',
60
+ ];
61
+ // Nonfiction peer-review structured-output contracts live with their canonical channel.
62
+ const nonfictionPeerReviewTextSchema = zod_1.z.string().min(1).regex(/\S/u);
63
+ const nonfictionPeerReviewHashSchema = zod_1.z.string().regex(/^[a-f0-9]{64}$/u);
64
+ const nonfictionPeerReviewSeveritySchema = zod_1.z.enum(['critical', 'high', 'medium', 'low']);
65
+ const nonfictionPeerReviewContradictionTypeSchema = zod_1.z.enum(['logical', 'factual', 'tonal', 'definitional']);
66
+ const nonfictionPeerReviewFindingSchema = zod_1.z.object({
67
+ location: nonfictionPeerReviewTextSchema,
68
+ finding: nonfictionPeerReviewTextSchema,
69
+ whyItMatters: nonfictionPeerReviewTextSchema,
70
+ recommendation: nonfictionPeerReviewTextSchema,
71
+ severity: nonfictionPeerReviewSeveritySchema,
72
+ }).strict();
73
+ const nonfictionPeerReviewMapSegmentEchoSchema = zod_1.z.object({
74
+ segmentIndex: zod_1.z.number().int().nonnegative(),
75
+ draftArtifactId: nonfictionPeerReviewTextSchema,
76
+ chapterIndex: zod_1.z.number().int().nonnegative(),
77
+ chapterTitle: nonfictionPeerReviewTextSchema,
78
+ proseStart: zod_1.z.number().int().nonnegative(),
79
+ proseEnd: zod_1.z.number().int().positive(),
80
+ proseHash: nonfictionPeerReviewHashSchema,
81
+ }).strict();
82
+ /** Exact structured-output contract for one lossless nonfiction review map unit. */
83
+ exports.NonfictionPeerReviewMapOutputSchema = zod_1.z.object({
84
+ mapUnitEcho: zod_1.z.object({
85
+ unitId: nonfictionPeerReviewTextSchema,
86
+ unitHash: nonfictionPeerReviewHashSchema,
87
+ segments: zod_1.z.array(nonfictionPeerReviewMapSegmentEchoSchema).min(1),
88
+ }).strict(),
89
+ sourceQualityConcerns: zod_1.z.array(zod_1.z.object({
90
+ concern: nonfictionPeerReviewTextSchema,
91
+ severity: nonfictionPeerReviewSeveritySchema,
92
+ location: nonfictionPeerReviewTextSchema,
93
+ recommendation: nonfictionPeerReviewTextSchema,
94
+ }).strict()),
95
+ localContradictions: zod_1.z.array(zod_1.z.object({
96
+ claimA: nonfictionPeerReviewTextSchema,
97
+ claimB: nonfictionPeerReviewTextSchema,
98
+ contradictionType: nonfictionPeerReviewContradictionTypeSchema,
99
+ location: nonfictionPeerReviewTextSchema,
100
+ resolution: nonfictionPeerReviewTextSchema,
101
+ }).strict()),
102
+ unsupportedClaims: zod_1.z.array(zod_1.z.object({
103
+ claim: nonfictionPeerReviewTextSchema,
104
+ location: nonfictionPeerReviewTextSchema,
105
+ riskLevel: zod_1.z.enum(['high', 'medium', 'low']),
106
+ verificationAction: nonfictionPeerReviewTextSchema,
107
+ }).strict()),
108
+ underengagedCounterarguments: zod_1.z.array(zod_1.z.object({
109
+ counterargument: nonfictionPeerReviewTextSchema,
110
+ location: nonfictionPeerReviewTextSchema,
111
+ currentTreatment: nonfictionPeerReviewTextSchema,
112
+ recommendedTreatment: nonfictionPeerReviewTextSchema,
113
+ }).strict()),
114
+ claimLedger: zod_1.z.array(zod_1.z.object({
115
+ claim: nonfictionPeerReviewTextSchema,
116
+ location: nonfictionPeerReviewTextSchema,
117
+ stance: nonfictionPeerReviewTextSchema,
118
+ evidenceStatus: zod_1.z.enum(['supported', 'partially_supported', 'unsupported', 'speculative']),
119
+ sourceIds: zod_1.z.array(nonfictionPeerReviewTextSchema),
120
+ }).strict()),
121
+ qualityLedger: zod_1.z.object({
122
+ readerJourney: zod_1.z.array(nonfictionPeerReviewFindingSchema),
123
+ humanismStorytelling: zod_1.z.array(nonfictionPeerReviewFindingSchema),
124
+ printClarity: zod_1.z.array(nonfictionPeerReviewFindingSchema),
125
+ audiobookListenability: zod_1.z.array(nonfictionPeerReviewFindingSchema),
126
+ voiceStyleFidelity: zod_1.z.array(nonfictionPeerReviewFindingSchema),
127
+ }).strict(),
128
+ localRatings: zod_1.z.object({
129
+ sourceQuality: zod_1.z.enum(['high', 'medium', 'low', 'critical']),
130
+ coherence: zod_1.z.enum(['coherent', 'mostly_coherent', 'some_issues', 'significant_issues']),
131
+ hallucinationRisk: zod_1.z.enum(['high', 'medium', 'low', 'minimal']),
132
+ rhetoricalBalance: zod_1.z.enum(['balanced', 'slightly_one_sided', 'one_sided', 'polemical']),
133
+ }).strict(),
134
+ unitSummary: nonfictionPeerReviewTextSchema,
135
+ }).strict();
136
+ /** Exact structured-output contract for the compact full-book review reducer. */
137
+ exports.NonfictionPeerReviewReducerOutputSchema = zod_1.z.object({
138
+ crossChapterContradictions: zod_1.z.array(zod_1.z.object({
139
+ claimA: nonfictionPeerReviewTextSchema,
140
+ claimB: nonfictionPeerReviewTextSchema,
141
+ contradictionType: nonfictionPeerReviewContradictionTypeSchema,
142
+ locations: zod_1.z.array(nonfictionPeerReviewTextSchema).min(1),
143
+ resolution: nonfictionPeerReviewTextSchema,
144
+ }).strict()),
145
+ crossChapterRepetition: zod_1.z.array(zod_1.z.object({
146
+ repeatedIdea: nonfictionPeerReviewTextSchema,
147
+ locations: zod_1.z.array(nonfictionPeerReviewTextSchema).min(1),
148
+ readerCost: nonfictionPeerReviewTextSchema,
149
+ directEdit: nonfictionPeerReviewTextSchema,
150
+ severity: nonfictionPeerReviewSeveritySchema,
151
+ }).strict()),
152
+ readerJourney: zod_1.z.array(nonfictionPeerReviewFindingSchema),
153
+ humanismStorytelling: zod_1.z.array(nonfictionPeerReviewFindingSchema),
154
+ printClarity: zod_1.z.array(nonfictionPeerReviewFindingSchema),
155
+ audiobookListenability: zod_1.z.array(nonfictionPeerReviewFindingSchema),
156
+ voiceStyleFidelity: zod_1.z.array(nonfictionPeerReviewFindingSchema),
157
+ overallSourceQuality: zod_1.z.enum(['high', 'medium', 'low', 'critical']),
158
+ overallCoherence: zod_1.z.enum(['coherent', 'mostly_coherent', 'some_issues', 'significant_issues']),
159
+ overallHallucinationRisk: zod_1.z.enum(['high', 'medium', 'low', 'minimal']),
160
+ overallBalance: zod_1.z.enum(['balanced', 'slightly_one_sided', 'one_sided', 'polemical']),
161
+ bookLevelAssessment: nonfictionPeerReviewTextSchema,
162
+ }).strict();
163
+ // ─── Channel Definitions ───────────────────────────────────────────────────────
164
+ const SOFTWARE_APP_CHANNEL = {
165
+ projectKind: 'software',
166
+ family: 'software',
167
+ variant: 'software_app',
168
+ workflowVersion: '2.0.0',
169
+ label: 'Software Application',
170
+ description: 'Full-stack software development workflow. Canonical operator spine: ingest → spec → plan → schema/contracts → tasks → implement → CI → deploy → review → knowledge-graph. Deprecated parallel entries (scan, architecture-control) remain for registry compatibility only.',
171
+ steps: [
172
+ // ── DEPRECATED: Parallel Coding Quality spine (scan → architecture-control) ──
173
+ // Superseded by canonical Ingest (WORKFLOW_STEPS). Do not surface in operator nav.
174
+ {
175
+ stepId: 'scan',
176
+ label: 'Repo Scan',
177
+ routePath: '/scan',
178
+ orchestratorKey: 'softwareScan',
179
+ apiRouteKey: 'repo.scan',
180
+ displayComponentKey: 'SoftwareScanDisplay',
181
+ stages: [
182
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.repoIntelSnapshot, label: 'Repo Intel Snapshot', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.repoIntelSnapshot, required: true, final: true, displayOrder: 1 },
183
+ ],
184
+ requiredInputs: [],
185
+ producedArtifacts: [
186
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.repoIntelSnapshot, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.repoIntelSnapshot, final: true },
187
+ ],
188
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.repoIntelSnapshot], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.repoIntelSnapshot },
189
+ gates: [
190
+ { gateId: 'repoLinked', required: true, condition: 'Repository is linked and readable' },
191
+ ],
192
+ staleRules: [],
193
+ nextStepId: 'architecture-control',
194
+ experimental: true,
195
+ deprecated: true,
196
+ },
197
+ {
198
+ stepId: 'architecture-control',
199
+ label: 'Architecture Control',
200
+ routePath: '/architecture-control',
201
+ orchestratorKey: 'softwareArchitectureControl',
202
+ apiRouteKey: 'workflow.ingest.gate',
203
+ displayComponentKey: 'SoftwareArchitectureControlDisplay',
204
+ stages: [
205
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.repoPolicySnapshot, label: 'Repo Policy Snapshot', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.repoPolicySnapshot, required: true, final: false, displayOrder: 1 },
206
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.architectureControlPlan, label: 'Architecture Control Plan', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.architectureControlPlan, required: true, final: true, displayOrder: 2 },
207
+ ],
208
+ requiredInputs: [{ stepId: 'scan', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.repoIntelSnapshot, required: true }],
209
+ producedArtifacts: [
210
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.architectureControlPlan, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.architectureControlPlan, final: true },
211
+ ],
212
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.architectureControlPlan], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.architectureControlPlan },
213
+ gates: [
214
+ { gateId: 'ownershipDefined', required: true, condition: 'All domains have canonical owners' },
215
+ ],
216
+ staleRules: [{ triggerArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.repoIntelSnapshot], staleArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.architectureControlPlan], reason: 'Repo scan changed' }],
217
+ nextStepId: 'specify',
218
+ experimental: true,
219
+ deprecated: true,
220
+ },
221
+ // ── Canonical workflow steps ──────────────────────────────────────────────
222
+ {
223
+ stepId: 'specify',
224
+ label: 'Specify',
225
+ routePath: '/specify',
226
+ orchestratorKey: 'softwareSpec',
227
+ apiRouteKey: 'ai.spec.generate',
228
+ displayComponentKey: 'SoftwareSpecifyDisplay',
229
+ stages: [
230
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyDomainModel, label: 'Domain Model', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyDomainModel, required: true, final: false, displayOrder: 1 },
231
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyRequirements, label: 'Requirements', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyRequirements, required: true, final: false, displayOrder: 2 },
232
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyAcceptanceCriteria, label: 'Acceptance Criteria', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyAcceptanceCriteria, required: true, final: false, displayOrder: 3 },
233
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyEdgeCases, label: 'Edge Cases', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyEdgeCases, required: false, final: false, displayOrder: 4 },
234
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyConstraints, label: 'Constraints', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyConstraints, required: true, final: true, displayOrder: 5 },
235
+ ],
236
+ requiredInputs: [],
237
+ producedArtifacts: [
238
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyConstraints, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyConstraints, final: true },
239
+ ],
240
+ completion: {
241
+ mode: 'all_required_stages',
242
+ requiredStageIds: [
243
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyDomainModel,
244
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyRequirements,
245
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyAcceptanceCriteria,
246
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyConstraints,
247
+ ],
248
+ finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyConstraints,
249
+ },
250
+ gates: [],
251
+ staleRules: [],
252
+ nextStepId: 'plan',
253
+ },
254
+ {
255
+ stepId: 'plan',
256
+ label: 'Architecture Plan',
257
+ routePath: '/plan',
258
+ orchestratorKey: 'softwareArchitecture',
259
+ apiRouteKey: 'ai.architecture.generate',
260
+ displayComponentKey: 'SoftwarePlanDisplay',
261
+ stages: [
262
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planArchitecture, label: 'Architecture', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planArchitecture, required: true, final: false, displayOrder: 1 },
263
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planDataFlow, label: 'Data Flow', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planDataFlow, required: false, final: false, displayOrder: 2 },
264
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planModuleBoundaries, label: 'Module Boundaries', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planModuleBoundaries, required: false, final: false, displayOrder: 3 },
265
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planRisks, label: 'Risks', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planRisks, required: false, final: false, displayOrder: 4 },
266
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planDeliveryPhases, label: 'Delivery Phases', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planDeliveryPhases, required: false, final: false, displayOrder: 5 },
267
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planFinal, label: 'Plan Final', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planFinal, required: true, final: true, displayOrder: 6 },
268
+ ],
269
+ requiredInputs: [{ stepId: 'specify', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyConstraints, required: true }],
270
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planFinal, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planFinal, final: true }],
271
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planFinal], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planFinal },
272
+ gates: [],
273
+ staleRules: [{ triggerArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.specifyConstraints], staleArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planFinal], reason: 'Spec changed' }],
274
+ nextStepId: 'schema',
275
+ },
276
+ {
277
+ stepId: 'schema',
278
+ label: 'Database Schema',
279
+ routePath: '/schema',
280
+ orchestratorKey: 'softwareSchema',
281
+ apiRouteKey: 'ai.schema.generate',
282
+ displayComponentKey: 'SoftwareSchemaDisplay',
283
+ stages: [
284
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaDomainModel, label: 'Domain Model', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaDomainModel, required: true, final: false, displayOrder: 1 },
285
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaBlueprint, label: 'Blueprint', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaBlueprint, required: true, final: false, displayOrder: 2 },
286
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaRelations, label: 'Relations', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaRelations, required: true, final: false, displayOrder: 3 },
287
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaMigration, label: 'Migration', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaMigration, required: true, final: false, displayOrder: 4 },
288
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaSecurity, label: 'Security / RLS', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaSecurity, required: true, final: false, displayOrder: 5 },
289
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaTypes, label: 'Schema Types', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaTypes, required: true, final: true, displayOrder: 6 },
290
+ ],
291
+ requiredInputs: [{ stepId: 'plan', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planFinal, required: true }],
292
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaTypes, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaTypes, final: true }],
293
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaTypes], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaTypes },
294
+ gates: [],
295
+ staleRules: [{ triggerArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planFinal], staleArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.schemaTypes], reason: 'Plan changed' }],
296
+ nextStepId: 'tasks',
297
+ },
298
+ {
299
+ stepId: 'schema-contracts',
300
+ label: 'Schema / Contracts',
301
+ routePath: '/schema-contracts',
302
+ orchestratorKey: 'softwareSchemaContracts',
303
+ apiRouteKey: 'workflow.parityCheck',
304
+ displayComponentKey: 'SoftwareSchemaContractsDisplay',
305
+ stages: [
306
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.policyResult, label: 'Policy Check Result', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.policyResult, required: true, final: false, displayOrder: 1 },
307
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.parityCheckResult, label: 'Parity Check Result', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.parityCheckResult, required: true, final: false, displayOrder: 2 },
308
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.stepHandoffManifest, label: 'Step Handoff Manifest', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.stepHandoffManifest, required: true, final: true, displayOrder: 3 },
309
+ ],
310
+ requiredInputs: [{ stepId: 'plan', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planFinal, required: true }],
311
+ producedArtifacts: [
312
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.stepHandoffManifest, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.stepHandoffManifest, final: true },
313
+ ],
314
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.stepHandoffManifest], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.stepHandoffManifest },
315
+ gates: [
316
+ { gateId: 'parityPass', required: true, condition: 'Route/contract/client/schema parity checks pass' },
317
+ { gateId: 'policyPass', required: true, condition: 'Policy check returns no critical findings' },
318
+ ],
319
+ staleRules: [{ triggerArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planFinal], staleArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.stepHandoffManifest], reason: 'Plan changed' }],
320
+ nextStepId: 'tasks',
321
+ experimental: true,
322
+ },
323
+ {
324
+ stepId: 'tasks',
325
+ label: 'Tasks',
326
+ routePath: '/tasks',
327
+ orchestratorKey: 'softwareTasks',
328
+ apiRouteKey: 'ai.tasks.generate',
329
+ displayComponentKey: 'SoftwareTasksDisplay',
330
+ stages: [
331
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskContextIntake, label: 'Context Intake', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskContextIntake, required: true, final: false, displayOrder: 1 },
332
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskArtifactCoverage, label: 'Artifact Coverage', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskArtifactCoverage, required: false, final: false, displayOrder: 2 },
333
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskWorkBreakdown, label: 'Work Breakdown', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskWorkBreakdown, required: true, final: false, displayOrder: 3 },
334
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskDependencyGraph, label: 'Dependency Graph', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskDependencyGraph, required: false, final: false, displayOrder: 4 },
335
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskImplementationCards, label: 'Implementation Cards', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskImplementationCards, required: false, final: false, displayOrder: 5 },
336
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskValidation, label: 'Validation', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskValidation, required: false, final: false, displayOrder: 6 },
337
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskFinalGraph, label: 'Task Graph Final', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskFinalGraph, required: true, final: true, displayOrder: 7 },
338
+ ],
339
+ requiredInputs: [],
340
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskFinalGraph, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskFinalGraph, final: true }],
341
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskFinalGraph], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskFinalGraph },
342
+ gates: [],
343
+ staleRules: [],
344
+ nextStepId: 'implement',
345
+ },
346
+ {
347
+ stepId: 'implement',
348
+ label: 'Implement',
349
+ routePath: '/implement',
350
+ orchestratorKey: 'softwareImplement',
351
+ apiRouteKey: 'ai.code.generate',
352
+ displayComponentKey: 'SoftwareImplementDisplay',
353
+ stages: [
354
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.gateImportValidity, label: 'Import Validity Gate', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.gateImportValidity, required: false, final: false, displayOrder: 1 },
355
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.gateContextContamination, label: 'Context Contamination Gate', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.gateContextContamination, required: false, final: false, displayOrder: 2 },
356
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementFilePlan, label: 'File Plan', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementFilePlan, required: true, final: false, displayOrder: 3 },
357
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementCodeGen, label: 'Code Generation', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementCodeGen, required: true, final: false, displayOrder: 4 },
358
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementTests, label: 'Tests', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementTests, required: false, final: false, displayOrder: 5 },
359
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementPrCreate, label: 'PR Create', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementPrCreate, required: true, final: false, displayOrder: 6 },
360
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementGuardianReview, label: 'Guardian Review', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementGuardianReview, required: false, final: false, displayOrder: 7 },
361
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementFinal, label: 'Implementation Final', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementFinal, required: true, final: true, displayOrder: 8 },
362
+ ],
363
+ requiredInputs: [{ stepId: 'tasks', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.taskFinalGraph, required: true }],
364
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementFinal, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementFinal, final: true }],
365
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementFinal], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementFinal },
366
+ gates: [
367
+ { gateId: 'gateImportValidity', required: true, condition: 'No invalid imports detected' },
368
+ { gateId: 'gateContextContamination', required: true, condition: 'No context contamination detected' },
369
+ ],
370
+ staleRules: [{ triggerArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.planFinal], staleArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementFinal], reason: 'Plan changed' }],
371
+ nextStepId: 'patch-review',
372
+ },
373
+ {
374
+ stepId: 'patch-review',
375
+ label: 'Patch Review',
376
+ routePath: '/patch-review',
377
+ // Pre-deploy adversarial patch review: checks drift, scope, forbidden patterns,
378
+ // route/contract/schema parity, task capsule violations, and test obligations.
379
+ orchestratorKey: 'softwarePatchReview',
380
+ apiRouteKey: 'workflow.testObligation',
381
+ displayComponentKey: 'SoftwarePatchReviewDisplay',
382
+ stages: [
383
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.patchReviewResult, label: 'Patch Review Result', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.patchReviewResult, required: true, final: true, displayOrder: 1 },
384
+ ],
385
+ requiredInputs: [{ stepId: 'implement', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementFinal, required: true }],
386
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.patchReviewResult, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.patchReviewResult, final: true }],
387
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.patchReviewResult], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.patchReviewResult },
388
+ gates: [
389
+ { gateId: 'noDrift', required: true, condition: 'Adversarial patch review returns pass status' },
390
+ ],
391
+ staleRules: [{ triggerArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.implementFinal], staleArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.patchReviewResult], reason: 'Implementation changed' }],
392
+ nextStepId: 'deploy',
393
+ experimental: true,
394
+ },
395
+ {
396
+ stepId: 'deploy',
397
+ label: 'Deploy',
398
+ routePath: '/deploy',
399
+ // Technical deployment and reachability verification. Produces DeploymentEvidenceBundle.
400
+ orchestratorKey: 'softwareDeploy',
401
+ apiRouteKey: 'ai.deployments.generate',
402
+ displayComponentKey: 'SoftwareDeployDisplay',
403
+ stages: [
404
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.deploymentEvidence, label: 'Deployment Evidence', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.deploymentEvidence, required: true, final: true, displayOrder: 1 },
405
+ ],
406
+ requiredInputs: [{ stepId: 'patch-review', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.patchReviewResult, required: true }],
407
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.deploymentEvidence, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.deploymentEvidence, final: true }],
408
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.deploymentEvidence], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.deploymentEvidence },
409
+ gates: [
410
+ { gateId: 'healthProbe', required: true, condition: 'Health probe passes' },
411
+ { gateId: 'envCheck', required: true, condition: 'Required environment variables present' },
412
+ ],
413
+ staleRules: [],
414
+ nextStepId: 'review',
415
+ experimental: true,
416
+ },
417
+ {
418
+ stepId: 'review',
419
+ label: 'Review',
420
+ routePath: '/workflow/review',
421
+ // Post-deploy live acceptance review. Evaluates the deployed result against approved
422
+ // Spec/Plan criteria and produces a reviewAcceptance decision.
423
+ // orchestratorKey maps to runQualityReviewPipeline (softwareReview in orchestrator-registry).
424
+ orchestratorKey: 'softwareReview',
425
+ apiRouteKey: 'ai.review.generate',
426
+ displayComponentKey: 'SoftwareReviewArtifactView',
427
+ stages: [
428
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewArtifact, label: 'Review Artifact', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewArtifact, required: false, final: false, displayOrder: 1 },
429
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewCode, label: 'Code Review', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewCode, required: false, final: false, displayOrder: 2 },
430
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewSecurity, label: 'Security Review', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewSecurity, required: false, final: false, displayOrder: 3 },
431
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewReleaseDecision, label: 'Release Decision', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewReleaseDecision, required: false, final: false, displayOrder: 4 },
432
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewFinal, label: 'Review Final', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewFinal, required: false, final: false, displayOrder: 5 },
433
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewAcceptance, label: 'Review Acceptance', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewAcceptance, required: true, final: true, displayOrder: 6 },
434
+ ],
435
+ requiredInputs: [{ stepId: 'deploy', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.deploymentEvidence, required: true }],
436
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewAcceptance, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewAcceptance, final: true }],
437
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewAcceptance], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewAcceptance },
438
+ gates: [],
439
+ staleRules: [{ triggerArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.deploymentEvidence], staleArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewAcceptance], reason: 'Deployment evidence changed' }],
440
+ nextStepId: 'knowledge-graph',
441
+ },
442
+ {
443
+ stepId: 'knowledge-graph',
444
+ label: 'Knowledge Graph',
445
+ routePath: '/knowledge-graph',
446
+ // Persists workflow traceability (nodes, edges, decisions, findings) into the KG.
447
+ // Final step of the quality spine — produces knowledgeGraphResult.
448
+ orchestratorKey: 'softwareKnowledgeGraph',
449
+ apiRouteKey: 'ai.knowledge.generate',
450
+ displayComponentKey: 'SoftwareKnowledgeGraphDisplay',
451
+ stages: [
452
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.knowledgeGraphResult, label: 'Knowledge Graph Result', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.knowledgeGraphResult, required: true, final: true, displayOrder: 1 },
453
+ ],
454
+ requiredInputs: [{ stepId: 'review', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewAcceptance, required: true }],
455
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.knowledgeGraphResult, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.knowledgeGraphResult, final: true }],
456
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.knowledgeGraphResult], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.knowledgeGraphResult },
457
+ gates: [],
458
+ staleRules: [{ triggerArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.reviewAcceptance], staleArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.knowledgeGraphResult], reason: 'Review acceptance changed' }],
459
+ experimental: true,
460
+ },
461
+ ],
462
+ };
463
+ const FICTION_BOOK_CHANNEL = {
464
+ projectKind: 'fiction',
465
+ family: 'writing',
466
+ variant: 'fiction_book',
467
+ workflowVersion: '1.0.0',
468
+ label: 'Fiction Book',
469
+ description: 'Novel / fiction manuscript workflow: premise → story structure → world ontology → scene tasks → draft → review.',
470
+ steps: [
471
+ {
472
+ stepId: 'specify',
473
+ label: 'Premise',
474
+ routePath: '/specify',
475
+ orchestratorKey: 'fictionPremise',
476
+ apiRouteKey: 'ai.spec.generate',
477
+ displayComponentKey: 'FictionPremiseArtifactsDisplay',
478
+ stages: [
479
+ { stageId: 'premiseDraft', label: 'Premise Draft', artifactType: 'premiseDraft', required: true, final: false, displayOrder: 1 },
480
+ { stageId: 'themeArticulation', label: 'Theme Articulation', artifactType: 'themeArticulation', required: false, final: false, displayOrder: 2 },
481
+ { stageId: 'premiseFinal', label: 'Premise Final', artifactType: 'premiseFinal', required: true, final: true, displayOrder: 3 },
482
+ ],
483
+ requiredInputs: [],
484
+ producedArtifacts: [{ stageId: 'premiseFinal', artifactType: 'premiseFinal', final: true }],
485
+ completion: { mode: 'final_artifact', requiredStageIds: ['premiseDraft', 'premiseFinal'], finalStageId: 'premiseFinal' },
486
+ gates: [],
487
+ staleRules: [],
488
+ nextStepId: 'plan',
489
+ },
490
+ {
491
+ stepId: 'plan',
492
+ label: 'Story Structure',
493
+ routePath: '/plan',
494
+ orchestratorKey: 'fictionStoryStructure',
495
+ apiRouteKey: 'ai.architecture.generate',
496
+ displayComponentKey: 'FictionPlanDisplay',
497
+ stages: [
498
+ { stageId: 'actOutline', label: 'Act Outline', artifactType: 'actOutline', required: true, final: false, displayOrder: 1 },
499
+ { stageId: 'plotBeats', label: 'Plot Beats', artifactType: 'plotBeats', required: false, final: false, displayOrder: 2 },
500
+ { stageId: 'narrativeArc', label: 'Narrative Arc', artifactType: 'narrativeArc', required: false, final: false, displayOrder: 3 },
501
+ { stageId: 'storyStructureFinal', label: 'Story Structure Final', artifactType: 'storyStructureFinal', required: true, final: true, displayOrder: 4 },
502
+ ],
503
+ requiredInputs: [{ stepId: 'specify', stageId: 'premiseFinal', required: true }],
504
+ producedArtifacts: [{ stageId: 'storyStructureFinal', artifactType: 'storyStructureFinal', final: true }],
505
+ completion: { mode: 'final_artifact', requiredStageIds: ['storyStructureFinal'], finalStageId: 'storyStructureFinal' },
506
+ gates: [],
507
+ staleRules: [{ triggerArtifactTypes: ['premiseFinal'], staleArtifactTypes: ['storyStructureFinal'], reason: 'Premise changed' }],
508
+ nextStepId: 'schema',
509
+ },
510
+ {
511
+ stepId: 'schema',
512
+ label: 'World Ontology',
513
+ routePath: '/schema',
514
+ orchestratorKey: 'fictionWorldOntology',
515
+ apiRouteKey: 'ai.schema.generate',
516
+ displayComponentKey: 'FictionSchemaDisplay',
517
+ stages: [
518
+ { stageId: 'worldOntologyDraft', label: 'World Ontology Draft', artifactType: 'worldOntologyDraft', required: true, final: false, displayOrder: 1 },
519
+ { stageId: 'factionRegistry', label: 'Faction Registry', artifactType: 'factionRegistry', required: false, final: false, displayOrder: 2 },
520
+ { stageId: 'loreSystemDraft', label: 'Lore System Draft', artifactType: 'loreSystemDraft', required: false, final: false, displayOrder: 3 },
521
+ { stageId: 'symbolRegistry', label: 'Symbol Registry', artifactType: 'symbolRegistry', required: false, final: false, displayOrder: 4 },
522
+ { stageId: 'worldOntologyFinal', label: 'World Ontology Final', artifactType: 'worldOntologyFinal', required: true, final: true, displayOrder: 5 },
523
+ ],
524
+ requiredInputs: [{ stepId: 'plan', stageId: 'storyStructureFinal', required: true }],
525
+ producedArtifacts: [{ stageId: 'worldOntologyFinal', artifactType: 'worldOntologyFinal', final: true }],
526
+ completion: { mode: 'final_artifact', requiredStageIds: ['worldOntologyFinal'], finalStageId: 'worldOntologyFinal' },
527
+ gates: [],
528
+ staleRules: [{ triggerArtifactTypes: ['storyStructureFinal'], staleArtifactTypes: ['worldOntologyFinal'], reason: 'Story structure changed' }],
529
+ nextStepId: 'constitution',
530
+ },
531
+ {
532
+ stepId: 'constitution',
533
+ label: 'Narrative Constitution',
534
+ routePath: '/constitution',
535
+ orchestratorKey: 'fictionConstitution',
536
+ apiRouteKey: 'ai.constitution.generate',
537
+ displayComponentKey: 'FictionConstitutionArtifactsDisplay',
538
+ stages: [
539
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionMission, label: 'Editorial Mission', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionMission, required: true, final: false, displayOrder: 1 },
540
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionPrinciples, label: 'Editorial Principles', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionPrinciples, required: true, final: false, displayOrder: 2 },
541
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionGates, label: 'Quality Gates', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionGates, required: true, final: false, displayOrder: 3 },
542
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionWritingFinal, label: 'Constitution Final', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionWritingFinal, required: true, final: true, displayOrder: 4 },
543
+ ],
544
+ requiredInputs: [
545
+ { stepId: 'specify', stageId: 'premiseFinal', required: true },
546
+ { stepId: 'plan', stageId: 'storyStructureFinal', required: true },
547
+ ],
548
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionWritingFinal, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionWritingFinal, final: true }],
549
+ completion: {
550
+ mode: 'final_artifact',
551
+ requiredStageIds: [
552
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionMission,
553
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionPrinciples,
554
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionGates,
555
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionWritingFinal,
556
+ ],
557
+ finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionWritingFinal,
558
+ },
559
+ gates: [],
560
+ staleRules: [],
561
+ nextStepId: 'tasks',
562
+ },
563
+ {
564
+ stepId: 'tasks',
565
+ label: 'Scene Tasks',
566
+ routePath: '/tasks',
567
+ orchestratorKey: 'fictionSceneTasks',
568
+ apiRouteKey: 'ai.tasks.generate',
569
+ displayComponentKey: 'FictionTasksDisplay',
570
+ stages: [
571
+ { stageId: 'sceneTaskDecomposition', label: 'Scene Task Decomposition', artifactType: 'sceneTaskDecomposition', required: true, final: false, displayOrder: 1 },
572
+ { stageId: 'chapterSchedule', label: 'Chapter Schedule', artifactType: 'chapterSchedule', required: false, final: false, displayOrder: 2 },
573
+ { stageId: 'sceneTasksFinal', label: 'Scene Tasks Final', artifactType: 'sceneTasksFinal', required: true, final: true, displayOrder: 3 },
574
+ ],
575
+ requiredInputs: [{ stepId: 'schema', stageId: 'worldOntologyFinal', required: false }],
576
+ producedArtifacts: [{ stageId: 'sceneTasksFinal', artifactType: 'sceneTasksFinal', final: true }],
577
+ completion: { mode: 'final_artifact', requiredStageIds: ['sceneTaskDecomposition', 'sceneTasksFinal'], finalStageId: 'sceneTasksFinal' },
578
+ gates: [],
579
+ staleRules: [{ triggerArtifactTypes: ['worldOntologyFinal'], staleArtifactTypes: ['sceneTasksFinal'], reason: 'World ontology changed' }],
580
+ nextStepId: 'implement',
581
+ },
582
+ {
583
+ stepId: 'implement',
584
+ label: 'Draft Scenes',
585
+ routePath: '/implement',
586
+ orchestratorKey: 'fictionDraft',
587
+ apiRouteKey: 'ai.code.generate',
588
+ displayComponentKey: 'FictionDraftWorkflowPanel',
589
+ stages: [
590
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.sceneDraft, label: 'Scene Draft', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.sceneDraft, required: true, final: false, displayOrder: 1 },
591
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.chapterDraft, label: 'Chapter Draft', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.chapterDraft, required: false, final: false, displayOrder: 2 },
592
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.loreEntryDraft, label: 'Lore Entry Draft', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.loreEntryDraft, required: true, final: true, displayOrder: 3 },
593
+ ],
594
+ requiredInputs: [{ stepId: 'tasks', stageId: 'sceneTasksFinal', required: true }],
595
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.loreEntryDraft, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.loreEntryDraft, final: true }],
596
+ completion: { mode: 'all_required_stages', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.sceneDraft, workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.loreEntryDraft], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.loreEntryDraft },
597
+ gates: [],
598
+ staleRules: [{ triggerArtifactTypes: ['sceneTasksFinal'], staleArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.loreEntryDraft], reason: 'Scene tasks changed' }],
599
+ nextStepId: 'review',
600
+ },
601
+ {
602
+ stepId: 'review',
603
+ label: 'Continuity & Editorial Review',
604
+ routePath: '/review',
605
+ orchestratorKey: 'fictionEditorialReview',
606
+ apiRouteKey: 'ai.review.generate',
607
+ displayComponentKey: 'FictionReviewArtifactView',
608
+ stages: [
609
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.loreContinuityAudit, label: 'Lore Continuity Audit', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.loreContinuityAudit, required: true, final: false, displayOrder: 1 },
610
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.characterContinuityAudit, label: 'Character Continuity Audit', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.characterContinuityAudit, required: true, final: false, displayOrder: 2 },
611
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.tonalDriftCheck, label: 'Tonal Drift Check', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.tonalDriftCheck, required: false, final: false, displayOrder: 3 },
612
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.narrativePacingReview, label: 'Narrative Pacing Review', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.narrativePacingReview, required: false, final: false, displayOrder: 4 },
613
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.fictionEditorialFinal, label: 'Fiction Editorial Final', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.fictionEditorialFinal, required: true, final: true, displayOrder: 5 },
614
+ ],
615
+ requiredInputs: [{ stepId: 'implement', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.loreEntryDraft, required: true }],
616
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.fictionEditorialFinal, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.fictionEditorialFinal, final: true }],
617
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.fictionEditorialFinal], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.fictionEditorialFinal },
618
+ gates: [],
619
+ staleRules: [{ triggerArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.loreEntryDraft], staleArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.fictionEditorialFinal], reason: 'Draft scenes changed' }],
620
+ },
621
+ ],
622
+ };
623
+ const NONFICTION_BOOK_CHANNEL = {
624
+ projectKind: 'nonfiction',
625
+ family: 'writing',
626
+ variant: 'nonfiction_book',
627
+ workflowVersion: '1.0.0',
628
+ label: 'Nonfiction Book',
629
+ description: 'Nonfiction manuscript workflow: thesis → outline → definitions → sources → style → draft → editorial review.',
630
+ steps: [
631
+ {
632
+ stepId: 'specify',
633
+ label: 'Thesis',
634
+ routePath: '/specify',
635
+ orchestratorKey: 'nonfictionThesis',
636
+ apiRouteKey: 'ai.spec.generate',
637
+ displayComponentKey: 'ThesisArtifactsDisplay',
638
+ stages: [
639
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisDraft, label: 'Intent & Thesis Draft', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisDraft, required: true, final: false, displayOrder: 1 },
640
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisRefinement, label: 'Thesis Stress Test', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisRefinement, required: true, final: false, displayOrder: 2 },
641
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.audienceProfile, label: 'Reader & Audio Contract', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.audienceProfile, required: true, final: false, displayOrder: 3 },
642
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionThesisFinal, label: 'Thesis Final', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionThesisFinal, required: true, final: true, displayOrder: 4 },
643
+ ],
644
+ requiredInputs: [],
645
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionThesisFinal, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionThesisFinal, final: true }],
646
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisDraft, workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisRefinement, workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.audienceProfile, workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionThesisFinal], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionThesisFinal },
647
+ gates: [],
648
+ staleRules: [],
649
+ nextStepId: 'plan',
650
+ },
651
+ {
652
+ stepId: 'plan',
653
+ label: 'Outline',
654
+ routePath: '/plan',
655
+ orchestratorKey: 'nonfictionOutline',
656
+ apiRouteKey: 'ai.architecture.generate',
657
+ displayComponentKey: 'NonfictionPlanDisplay',
658
+ stages: [
659
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.argumentStructure, label: 'Argument Structure', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.argumentStructure, required: true, final: false, displayOrder: 1 },
660
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.chapterPlan, label: 'Semantic Chapter Plan', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.chapterPlan, required: true, final: false, displayOrder: 2 },
661
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.evidenceHierarchy, label: 'Evidence Hierarchy', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.evidenceHierarchy, required: true, final: false, displayOrder: 3 },
662
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionArgumentFinal, label: 'Argument Plan Final', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionArgumentFinal, required: true, final: true, displayOrder: 4 },
663
+ ],
664
+ requiredInputs: [{ stepId: 'specify', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionThesisFinal, required: true }],
665
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionArgumentFinal, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionArgumentFinal, final: true }],
666
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.argumentStructure, workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.chapterPlan, workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.evidenceHierarchy, workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionArgumentFinal], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionArgumentFinal },
667
+ gates: [],
668
+ staleRules: [{ triggerArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionThesisFinal], staleArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionArgumentFinal], reason: 'Thesis or human intent changed' }],
669
+ nextStepId: 'tasks',
670
+ },
671
+ {
672
+ stepId: 'tasks',
673
+ label: 'Research & Writing Tasks',
674
+ routePath: '/tasks',
675
+ orchestratorKey: 'nonfictionWritingTasks',
676
+ apiRouteKey: 'ai.tasks.generate',
677
+ displayComponentKey: 'WritingTasksDisplay',
678
+ stages: [
679
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.researchTaskDecomposition, label: 'Research Tasks', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.researchTaskDecomposition, required: true, final: false, displayOrder: 1 },
680
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.sourceValidation, label: 'Source Validation', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.sourceValidation, required: true, final: false, displayOrder: 2 },
681
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionChapterSchedule, label: 'Chapter Schedule', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionChapterSchedule, required: true, final: false, displayOrder: 3 },
682
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionResearchTasksFinal, label: 'Tasks Final', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionResearchTasksFinal, required: true, final: true, displayOrder: 4 },
683
+ ],
684
+ requiredInputs: [{ stepId: 'plan', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionArgumentFinal, required: true }],
685
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionResearchTasksFinal, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionResearchTasksFinal, final: true }],
686
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionResearchTasksFinal], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionResearchTasksFinal },
687
+ gates: [],
688
+ staleRules: [
689
+ { triggerArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionArgumentFinal], staleArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionResearchTasksFinal], reason: 'Approved semantic Plan changed' },
690
+ { triggerArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionSourceRegistryFinal], staleArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionResearchTasksFinal], reason: 'Citation-ready source truth changed' },
691
+ ],
692
+ nextStepId: 'implement',
693
+ },
694
+ {
695
+ stepId: 'implement',
696
+ label: 'Draft Chapters',
697
+ routePath: '/implement',
698
+ orchestratorKey: 'nonfictionDraftChapter',
699
+ apiRouteKey: 'ai.code.generate',
700
+ displayComponentKey: 'NonfictionDraftDisplay',
701
+ stages: [
702
+ { stageId: 'argumentProse', label: 'Argument Prose', artifactType: 'argumentProse', required: true, final: false, displayOrder: 1 },
703
+ { stageId: 'evidenceIntegration', label: 'Evidence Integration', artifactType: 'evidenceIntegration', required: false, final: false, displayOrder: 2 },
704
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.chapterDraft, label: 'Chapter Draft', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.chapterDraft, required: true, final: true, displayOrder: 3 },
705
+ ],
706
+ requiredInputs: [{ stepId: 'tasks', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionResearchTasksFinal, required: true }],
707
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.chapterDraft, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.chapterDraft, final: true }],
708
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.chapterDraft], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.chapterDraft },
709
+ gates: [],
710
+ staleRules: [{ triggerArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionResearchTasksFinal], staleArtifactTypes: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.chapterDraft], reason: 'Writing tasks changed' }],
711
+ nextStepId: 'review',
712
+ },
713
+ {
714
+ stepId: 'review',
715
+ label: 'Editorial Review',
716
+ routePath: '/review',
717
+ orchestratorKey: 'nonfictionEditorialReview',
718
+ apiRouteKey: 'ai.review.generate',
719
+ displayComponentKey: 'WritingReviewArtifactView',
720
+ stages: [
721
+ { stageId: 'sourceQualityAudit', label: 'Source Quality Audit', artifactType: 'sourceQualityAudit', required: true, final: false, displayOrder: 1 },
722
+ { stageId: 'contradictionAnalysis', label: 'Contradiction Analysis', artifactType: 'contradictionAnalysis', required: false, final: false, displayOrder: 2 },
723
+ { stageId: 'hallucinationCheck', label: 'Hallucination Check', artifactType: 'hallucinationCheck', required: false, final: false, displayOrder: 3 },
724
+ { stageId: 'rhetoricalBalanceReview', label: 'Rhetorical Balance Review', artifactType: 'rhetoricalBalanceReview', required: false, final: false, displayOrder: 4 },
725
+ { stageId: 'nonfictionPeerReviewFinal', label: 'Peer Review Final', artifactType: 'nonfictionPeerReviewFinal', required: true, final: true, displayOrder: 5 },
726
+ ],
727
+ requiredInputs: [{ stepId: 'implement', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.chapterDraft, required: true }],
728
+ producedArtifacts: [{ stageId: 'nonfictionPeerReviewFinal', artifactType: 'nonfictionPeerReviewFinal', final: true }],
729
+ completion: { mode: 'final_artifact', requiredStageIds: ['nonfictionPeerReviewFinal'], finalStageId: 'nonfictionPeerReviewFinal' },
730
+ gates: [],
731
+ staleRules: [{
732
+ triggerArtifactTypes: [
733
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionThesisFinal,
734
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.definitionsFinal,
735
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.constitutionWritingFinal,
736
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.styleSystemFinal,
737
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.argumentMapFinal,
738
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.counterclaimFrameworkFinal,
739
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionNarrativeVoiceFinal,
740
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionArgumentFinal,
741
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionSourceRegistryFinal,
742
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionResearchTasksFinal,
743
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.chapterDraft,
744
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.manuscriptDraft,
745
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.draftFinal,
746
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionDraftFinal,
747
+ ],
748
+ staleArtifactTypes: [
749
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.sourceQualityAudit,
750
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.contradictionAnalysis,
751
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.hallucinationCheck,
752
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.rhetoricalBalanceReview,
753
+ workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.nonfictionPeerReviewFinal,
754
+ ],
755
+ reason: 'Current manuscript changed',
756
+ }],
757
+ },
758
+ ],
759
+ };
760
+ const RESEARCH_REPORT_CHANNEL = {
761
+ projectKind: 'research',
762
+ family: 'research',
763
+ variant: 'research_report',
764
+ workflowVersion: '1.0.0',
765
+ label: 'Research Report',
766
+ description: 'Research report workflow: question → scope → sources → evidence → draft → review.',
767
+ steps: [
768
+ {
769
+ stepId: 'specify',
770
+ label: 'Research Question',
771
+ routePath: '/specify',
772
+ orchestratorKey: 'researchQuestion',
773
+ apiRouteKey: 'ai.spec.generate',
774
+ displayComponentKey: 'ResearchSpecifyDisplay',
775
+ stages: [
776
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisDomain, label: 'Research Domain', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisDomain, required: true, final: false, displayOrder: 1 },
777
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisStatement, label: 'Research Question', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisStatement, required: true, final: false, displayOrder: 2 },
778
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisFinal, label: 'Question Final', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisFinal, required: true, final: true, displayOrder: 3 },
779
+ ],
780
+ requiredInputs: [],
781
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisFinal, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisFinal, final: true }],
782
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisFinal], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisFinal },
783
+ gates: [],
784
+ staleRules: [],
785
+ nextStepId: 'plan',
786
+ },
787
+ {
788
+ stepId: 'plan',
789
+ label: 'Report Outline',
790
+ routePath: '/plan',
791
+ orchestratorKey: 'researchOutline',
792
+ apiRouteKey: 'ai.architecture.generate',
793
+ displayComponentKey: 'ResearchPlanDisplay',
794
+ stages: [
795
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.outlineDomain, label: 'Domain', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.outlineDomain, required: true, final: false, displayOrder: 1 },
796
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.outlineStructure, label: 'Structure', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.outlineStructure, required: true, final: false, displayOrder: 2 },
797
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.outlineChapters, label: 'Sections', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.outlineChapters, required: true, final: false, displayOrder: 3 },
798
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.outlineFinal, label: 'Outline Final', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.outlineFinal, required: true, final: true, displayOrder: 4 },
799
+ ],
800
+ requiredInputs: [{ stepId: 'specify', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.thesisFinal, required: true }],
801
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.outlineFinal, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.outlineFinal, final: true }],
802
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.outlineFinal], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.outlineFinal },
803
+ gates: [],
804
+ staleRules: [],
805
+ nextStepId: 'tasks',
806
+ },
807
+ {
808
+ stepId: 'tasks',
809
+ label: 'Research Tasks',
810
+ routePath: '/tasks',
811
+ orchestratorKey: 'researchTasks',
812
+ apiRouteKey: 'ai.tasks.generate',
813
+ displayComponentKey: 'WritingTasksDisplay',
814
+ stages: [
815
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.writingTasksScan, label: 'Tasks Scan', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.writingTasksScan, required: true, final: false, displayOrder: 1 },
816
+ { stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.writingTasksFinal, label: 'Tasks Final', artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.writingTasksFinal, required: true, final: true, displayOrder: 2 },
817
+ ],
818
+ requiredInputs: [{ stepId: 'plan', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.outlineFinal, required: false }],
819
+ producedArtifacts: [{ stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.writingTasksFinal, artifactType: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.writingTasksFinal, final: true }],
820
+ completion: { mode: 'final_artifact', requiredStageIds: [workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.writingTasksFinal], finalStageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.writingTasksFinal },
821
+ gates: [],
822
+ staleRules: [],
823
+ nextStepId: 'implement',
824
+ },
825
+ {
826
+ stepId: 'implement',
827
+ label: 'Draft Report',
828
+ routePath: '/implement',
829
+ orchestratorKey: 'researchReportDraft',
830
+ apiRouteKey: 'ai.code.generate',
831
+ displayComponentKey: 'NonfictionDraftDisplay',
832
+ stages: [
833
+ { stageId: 'argumentProse', label: 'Section Prose', artifactType: 'argumentProse', required: true, final: false, displayOrder: 1 },
834
+ { stageId: 'evidenceIntegration', label: 'Evidence Integration', artifactType: 'evidenceIntegration', required: false, final: false, displayOrder: 2 },
835
+ { stageId: 'nonfictionDraftFinal', label: 'Report Draft Final', artifactType: 'nonfictionDraftFinal', required: true, final: true, displayOrder: 3 },
836
+ ],
837
+ requiredInputs: [{ stepId: 'tasks', stageId: workflow_artifacts_schema_1.WORKFLOW_ARTIFACT_TYPE.writingTasksFinal, required: false }],
838
+ producedArtifacts: [{ stageId: 'nonfictionDraftFinal', artifactType: 'nonfictionDraftFinal', final: true }],
839
+ completion: { mode: 'final_artifact', requiredStageIds: ['nonfictionDraftFinal'], finalStageId: 'nonfictionDraftFinal' },
840
+ gates: [],
841
+ staleRules: [],
842
+ nextStepId: 'review',
843
+ },
844
+ {
845
+ stepId: 'review',
846
+ label: 'Report Review',
847
+ routePath: '/review',
848
+ orchestratorKey: 'researchReview',
849
+ apiRouteKey: 'ai.review.generate',
850
+ displayComponentKey: 'WritingReviewArtifactView',
851
+ stages: [
852
+ { stageId: 'sourceQualityAudit', label: 'Source Quality Audit', artifactType: 'sourceQualityAudit', required: true, final: false, displayOrder: 1 },
853
+ { stageId: 'contradictionAnalysis', label: 'Contradiction Analysis', artifactType: 'contradictionAnalysis', required: false, final: false, displayOrder: 2 },
854
+ { stageId: 'hallucinationCheck', label: 'Hallucination Check', artifactType: 'hallucinationCheck', required: false, final: false, displayOrder: 3 },
855
+ { stageId: 'nonfictionPeerReviewFinal', label: 'Review Final', artifactType: 'nonfictionPeerReviewFinal', required: true, final: true, displayOrder: 4 },
856
+ ],
857
+ requiredInputs: [{ stepId: 'implement', stageId: 'nonfictionDraftFinal', required: true }],
858
+ producedArtifacts: [{ stageId: 'nonfictionPeerReviewFinal', artifactType: 'nonfictionPeerReviewFinal', final: true }],
859
+ completion: { mode: 'final_artifact', requiredStageIds: ['nonfictionPeerReviewFinal'], finalStageId: 'nonfictionPeerReviewFinal' },
860
+ gates: [],
861
+ staleRules: [],
862
+ },
863
+ ],
864
+ };
865
+ // ─── Registry Map ──────────────────────────────────────────────────────────────
866
+ /**
867
+ * The canonical WorkflowChannelRegistry keyed by WorkflowVariant.
868
+ * This is the single source of truth for all active workflow channels.
869
+ */
870
+ exports.WORKFLOW_CHANNEL_REGISTRY = {
871
+ software_app: SOFTWARE_APP_CHANNEL,
872
+ fiction_book: FICTION_BOOK_CHANNEL,
873
+ nonfiction_book: NONFICTION_BOOK_CHANNEL,
874
+ research_report: RESEARCH_REPORT_CHANNEL,
875
+ // ── Experimental writing variants (scaffold from nonfiction spine) ──────────
876
+ scientific_paper: { ...NONFICTION_BOOK_CHANNEL, variant: 'scientific_paper', label: 'Scientific Paper', description: 'Scientific paper workflow.', experimental: true },
877
+ policy_framework: { ...NONFICTION_BOOK_CHANNEL, variant: 'policy_framework', label: 'Policy Framework', description: 'Policy framework workflow.', experimental: true },
878
+ // ── Media family — Screenplay (namespaced media_screenplay_* stage IDs) ────
879
+ screenplay: {
880
+ projectKind: 'fiction',
881
+ family: 'media',
882
+ variant: 'screenplay',
883
+ workflowVersion: '1.0.0',
884
+ label: 'Screenplay',
885
+ description: 'Film/TV screenplay workflow: concept → treatment → beat sheet → scene list → draft → coverage.',
886
+ experimental: true,
887
+ steps: [
888
+ {
889
+ stepId: 'specify',
890
+ label: 'Concept & Logline',
891
+ routePath: '/specify',
892
+ orchestratorKey: 'screenplayConcept',
893
+ apiRouteKey: 'ai.spec.generate',
894
+ displayComponentKey: 'FictionPremiseArtifactsDisplay',
895
+ stages: [
896
+ { stageId: 'media_screenplay_concept', label: 'Concept', artifactType: 'media_screenplay_concept', required: true, final: false, displayOrder: 1 },
897
+ { stageId: 'media_screenplay_logline', label: 'Logline', artifactType: 'media_screenplay_logline', required: true, final: true, displayOrder: 2 },
898
+ ],
899
+ requiredInputs: [],
900
+ producedArtifacts: [{ stageId: 'media_screenplay_logline', artifactType: 'media_screenplay_logline', final: true }],
901
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_screenplay_logline'], finalStageId: 'media_screenplay_logline' },
902
+ gates: [],
903
+ staleRules: [],
904
+ nextStepId: 'plan',
905
+ },
906
+ {
907
+ stepId: 'plan',
908
+ label: 'Treatment & Beat Sheet',
909
+ routePath: '/plan',
910
+ orchestratorKey: 'screenplayTreatment',
911
+ apiRouteKey: 'ai.architecture.generate',
912
+ displayComponentKey: 'FictionPlanDisplay',
913
+ stages: [
914
+ { stageId: 'media_screenplay_treatment', label: 'Treatment', artifactType: 'media_screenplay_treatment', required: true, final: false, displayOrder: 1 },
915
+ { stageId: 'media_screenplay_beatSheet', label: 'Beat Sheet', artifactType: 'media_screenplay_beatSheet', required: true, final: false, displayOrder: 2 },
916
+ { stageId: 'media_screenplay_actStructure', label: 'Act Structure', artifactType: 'media_screenplay_actStructure', required: true, final: true, displayOrder: 3 },
917
+ ],
918
+ requiredInputs: [{ stepId: 'specify', stageId: 'media_screenplay_logline', required: true }],
919
+ producedArtifacts: [{ stageId: 'media_screenplay_actStructure', artifactType: 'media_screenplay_actStructure', final: true }],
920
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_screenplay_actStructure'], finalStageId: 'media_screenplay_actStructure' },
921
+ gates: [],
922
+ staleRules: [{ triggerArtifactTypes: ['media_screenplay_logline'], staleArtifactTypes: ['media_screenplay_actStructure'], reason: 'Logline changed' }],
923
+ nextStepId: 'tasks',
924
+ },
925
+ {
926
+ stepId: 'tasks',
927
+ label: 'Scene List',
928
+ routePath: '/tasks',
929
+ orchestratorKey: 'screenplaySceneList',
930
+ apiRouteKey: 'ai.tasks.generate',
931
+ displayComponentKey: 'FictionTasksDisplay',
932
+ stages: [
933
+ { stageId: 'media_screenplay_sceneList', label: 'Scene List', artifactType: 'media_screenplay_sceneList', required: true, final: true, displayOrder: 1 },
934
+ ],
935
+ requiredInputs: [{ stepId: 'plan', stageId: 'media_screenplay_actStructure', required: true }],
936
+ producedArtifacts: [{ stageId: 'media_screenplay_sceneList', artifactType: 'media_screenplay_sceneList', final: true }],
937
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_screenplay_sceneList'], finalStageId: 'media_screenplay_sceneList' },
938
+ gates: [],
939
+ staleRules: [],
940
+ nextStepId: 'implement',
941
+ },
942
+ {
943
+ stepId: 'implement',
944
+ label: 'Screenplay Draft',
945
+ routePath: '/implement',
946
+ orchestratorKey: 'screenplayDraft',
947
+ apiRouteKey: 'ai.code.generate',
948
+ displayComponentKey: 'FictionDraftWorkflowPanel',
949
+ stages: [
950
+ { stageId: 'media_screenplay_draft', label: 'Screenplay Draft (Fountain)', artifactType: 'media_screenplay_draft', required: true, final: true, displayOrder: 1 },
951
+ ],
952
+ requiredInputs: [{ stepId: 'tasks', stageId: 'media_screenplay_sceneList', required: true }],
953
+ producedArtifacts: [{ stageId: 'media_screenplay_draft', artifactType: 'media_screenplay_draft', final: true }],
954
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_screenplay_draft'], finalStageId: 'media_screenplay_draft' },
955
+ gates: [],
956
+ staleRules: [{ triggerArtifactTypes: ['media_screenplay_sceneList'], staleArtifactTypes: ['media_screenplay_draft'], reason: 'Scene list changed' }],
957
+ nextStepId: 'review',
958
+ },
959
+ {
960
+ stepId: 'review',
961
+ label: 'Script Coverage',
962
+ routePath: '/review',
963
+ orchestratorKey: 'screenplayCoverage',
964
+ apiRouteKey: 'ai.review.generate',
965
+ displayComponentKey: 'FictionReviewArtifactView',
966
+ stages: [
967
+ { stageId: 'media_screenplay_coverage', label: 'Script Coverage Report', artifactType: 'media_screenplay_coverage', required: true, final: false, displayOrder: 1 },
968
+ { stageId: 'media_screenplay_final', label: 'Screenplay Final', artifactType: 'media_screenplay_final', required: true, final: true, displayOrder: 2 },
969
+ ],
970
+ requiredInputs: [{ stepId: 'implement', stageId: 'media_screenplay_draft', required: true }],
971
+ producedArtifacts: [{ stageId: 'media_screenplay_final', artifactType: 'media_screenplay_final', final: true }],
972
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_screenplay_final'], finalStageId: 'media_screenplay_final' },
973
+ gates: [],
974
+ staleRules: [{ triggerArtifactTypes: ['media_screenplay_draft'], staleArtifactTypes: ['media_screenplay_final'], reason: 'Draft changed' }],
975
+ },
976
+ ],
977
+ },
978
+ // ── Media family — Movie Package (namespaced media_movie_* stage IDs) ───────
979
+ movie_package: {
980
+ projectKind: 'fiction',
981
+ family: 'media',
982
+ variant: 'movie_package',
983
+ workflowVersion: '1.0.0',
984
+ label: 'Movie Package',
985
+ description: 'Movie production package: visual bible → shot list → sound bible → pitch package → production manifest.',
986
+ experimental: true,
987
+ steps: [
988
+ {
989
+ stepId: 'specify',
990
+ label: 'Visual Bible & Concept',
991
+ routePath: '/specify',
992
+ orchestratorKey: 'movieVisualBible',
993
+ apiRouteKey: 'ai.spec.generate',
994
+ displayComponentKey: 'FictionPremiseArtifactsDisplay',
995
+ stages: [
996
+ { stageId: 'media_movie_visualBible', label: 'Visual Bible', artifactType: 'media_movie_visualBible', required: true, final: false, displayOrder: 1 },
997
+ { stageId: 'media_movie_conceptArtPrompts', label: 'Concept Art Prompts', artifactType: 'media_movie_conceptArtPrompts', required: true, final: true, displayOrder: 2 },
998
+ ],
999
+ requiredInputs: [],
1000
+ producedArtifacts: [{ stageId: 'media_movie_conceptArtPrompts', artifactType: 'media_movie_conceptArtPrompts', final: true }],
1001
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_movie_conceptArtPrompts'], finalStageId: 'media_movie_conceptArtPrompts' },
1002
+ gates: [],
1003
+ staleRules: [],
1004
+ nextStepId: 'plan',
1005
+ },
1006
+ {
1007
+ stepId: 'plan',
1008
+ label: 'Shot List & Sound Bible',
1009
+ routePath: '/plan',
1010
+ orchestratorKey: 'movieShotPlan',
1011
+ apiRouteKey: 'ai.architecture.generate',
1012
+ displayComponentKey: 'FictionPlanDisplay',
1013
+ stages: [
1014
+ { stageId: 'media_movie_shotList', label: 'Shot List', artifactType: 'media_movie_shotList', required: true, final: false, displayOrder: 1 },
1015
+ { stageId: 'media_movie_soundBible', label: 'Sound Bible', artifactType: 'media_movie_soundBible', required: false, final: false, displayOrder: 2 },
1016
+ { stageId: 'media_movie_runwayClipPlan', label: 'Runway Clip Plan', artifactType: 'media_movie_runwayClipPlan', required: true, final: true, displayOrder: 3 },
1017
+ ],
1018
+ requiredInputs: [{ stepId: 'specify', stageId: 'media_movie_conceptArtPrompts', required: true }],
1019
+ producedArtifacts: [{ stageId: 'media_movie_runwayClipPlan', artifactType: 'media_movie_runwayClipPlan', final: true }],
1020
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_movie_shotList', 'media_movie_runwayClipPlan'], finalStageId: 'media_movie_runwayClipPlan' },
1021
+ gates: [],
1022
+ staleRules: [],
1023
+ nextStepId: 'implement',
1024
+ },
1025
+ {
1026
+ stepId: 'implement',
1027
+ label: 'Trailer Script',
1028
+ routePath: '/implement',
1029
+ orchestratorKey: 'movieTrailerScript',
1030
+ apiRouteKey: 'ai.code.generate',
1031
+ displayComponentKey: 'FictionDraftWorkflowPanel',
1032
+ stages: [
1033
+ { stageId: 'media_movie_trailerScript', label: 'Trailer Script', artifactType: 'media_movie_trailerScript', required: true, final: true, displayOrder: 1 },
1034
+ ],
1035
+ requiredInputs: [{ stepId: 'plan', stageId: 'media_movie_runwayClipPlan', required: true }],
1036
+ producedArtifacts: [{ stageId: 'media_movie_trailerScript', artifactType: 'media_movie_trailerScript', final: true }],
1037
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_movie_trailerScript'], finalStageId: 'media_movie_trailerScript' },
1038
+ gates: [],
1039
+ staleRules: [],
1040
+ nextStepId: 'review',
1041
+ },
1042
+ {
1043
+ stepId: 'review',
1044
+ label: 'Pitch Package & Manifest',
1045
+ routePath: '/review',
1046
+ orchestratorKey: 'moviePitchPackage',
1047
+ apiRouteKey: 'ai.review.generate',
1048
+ displayComponentKey: 'FictionReviewArtifactView',
1049
+ stages: [
1050
+ { stageId: 'media_movie_pitchPackage', label: 'Pitch Package', artifactType: 'media_movie_pitchPackage', required: true, final: false, displayOrder: 1 },
1051
+ { stageId: 'media_movie_productionManifest', label: 'Production Manifest', artifactType: 'media_movie_productionManifest', required: true, final: true, displayOrder: 2 },
1052
+ ],
1053
+ requiredInputs: [{ stepId: 'implement', stageId: 'media_movie_trailerScript', required: true }],
1054
+ producedArtifacts: [{ stageId: 'media_movie_productionManifest', artifactType: 'media_movie_productionManifest', final: true }],
1055
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_movie_productionManifest'], finalStageId: 'media_movie_productionManifest' },
1056
+ gates: [],
1057
+ staleRules: [],
1058
+ },
1059
+ ],
1060
+ },
1061
+ // ── Media family — Audiobook & Documentary (minimal scaffold) ────────────
1062
+ audiobook: { ...NONFICTION_BOOK_CHANNEL, variant: 'audiobook', label: 'Audiobook', description: 'Audiobook production workflow.', family: 'publication', experimental: true },
1063
+ documentary: { ...NONFICTION_BOOK_CHANNEL, variant: 'documentary', label: 'Documentary', description: 'Documentary film workflow.', family: 'media', experimental: true },
1064
+ // ── Film Production Domain Module (namespaced media_film_* stage IDs) ───────
1065
+ film_production: {
1066
+ projectKind: 'film',
1067
+ family: 'media',
1068
+ variant: 'film_production',
1069
+ workflowVersion: '2.0.0',
1070
+ label: 'Film Production',
1071
+ description: 'AI-assisted film production: intent → story and bibles → script → preproduction → generation → postproduction → review → release.',
1072
+ steps: [
1073
+ {
1074
+ stepId: 'intent',
1075
+ label: 'Intent',
1076
+ routePath: '/intent',
1077
+ phase: 1,
1078
+ orchestratorKey: 'filmIntent',
1079
+ apiRouteKey: 'ai.film.intent.generate',
1080
+ displayComponentKey: 'FilmIntentDisplay',
1081
+ stages: [
1082
+ { stageId: 'media_film_logline', label: 'Logline & Intent', artifactType: 'media_film_logline', required: true, final: true, displayOrder: 1 },
1083
+ ],
1084
+ requiredInputs: [],
1085
+ producedArtifacts: [{ stageId: 'media_film_logline', artifactType: 'media_film_logline', final: true }],
1086
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_film_logline'], finalStageId: 'media_film_logline' },
1087
+ gates: [
1088
+ { gateId: 'visual_continuity', required: false, condition: 'Film intent defines genre, tone, target runtime, and production mode' },
1089
+ ],
1090
+ staleRules: [],
1091
+ nextStepId: 'development',
1092
+ },
1093
+ {
1094
+ stepId: 'development',
1095
+ label: 'Story and Bibles',
1096
+ routePath: '/development',
1097
+ phase: 1,
1098
+ orchestratorKey: 'filmDevelopment',
1099
+ apiRouteKey: 'ai.film.development.generate',
1100
+ displayComponentKey: 'FilmDevelopmentDisplay',
1101
+ stages: [
1102
+ { stageId: 'media_film_storyBible', label: 'Story Bible', artifactType: 'media_film_storyBible', required: true, final: false, displayOrder: 1 },
1103
+ { stageId: 'media_film_characterBible', label: 'Character Bible', artifactType: 'media_film_characterBible', required: true, final: false, displayOrder: 2 },
1104
+ { stageId: 'media_film_styleBible', label: 'Style Bible (partial)', artifactType: 'media_film_styleBible', required: false, final: true, displayOrder: 3 },
1105
+ ],
1106
+ requiredInputs: [{ stepId: 'intent', stageId: 'media_film_logline', required: true }],
1107
+ producedArtifacts: [
1108
+ { stageId: 'media_film_storyBible', artifactType: 'media_film_storyBible', final: false },
1109
+ { stageId: 'media_film_characterBible', artifactType: 'media_film_characterBible', final: false },
1110
+ { stageId: 'media_film_styleBible', artifactType: 'media_film_styleBible', final: true },
1111
+ ],
1112
+ completion: {
1113
+ mode: 'all_required_stages',
1114
+ requiredStageIds: ['media_film_storyBible', 'media_film_characterBible'],
1115
+ finalStageId: 'media_film_styleBible',
1116
+ },
1117
+ gates: [
1118
+ { gateId: 'character_visual_consistency', required: true, condition: 'Character bible exists before script and preproduction' },
1119
+ ],
1120
+ staleRules: [{ triggerArtifactTypes: ['media_film_logline'], staleArtifactTypes: ['media_film_storyBible', 'media_film_characterBible', 'media_film_styleBible'], reason: 'Film intent changed' }],
1121
+ nextStepId: 'script',
1122
+ },
1123
+ {
1124
+ stepId: 'script',
1125
+ label: 'Script',
1126
+ routePath: '/script',
1127
+ phase: 2,
1128
+ orchestratorKey: 'filmScript',
1129
+ apiRouteKey: 'ai.film.script.generate',
1130
+ displayComponentKey: 'FilmScriptDisplay',
1131
+ stages: [
1132
+ { stageId: 'media_film_sceneList', label: 'Scene List', artifactType: 'media_film_sceneList', required: true, final: false, displayOrder: 1 },
1133
+ { stageId: 'media_film_screenplayDraft', label: 'Screenplay Draft', artifactType: 'media_film_screenplayDraft', required: true, final: true, displayOrder: 2 },
1134
+ ],
1135
+ requiredInputs: [{ stepId: 'development', stageId: 'media_film_storyBible', required: true }],
1136
+ producedArtifacts: [
1137
+ { stageId: 'media_film_sceneList', artifactType: 'media_film_sceneList', final: false },
1138
+ { stageId: 'media_film_screenplayDraft', artifactType: 'media_film_screenplayDraft', final: true },
1139
+ ],
1140
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_film_sceneList', 'media_film_screenplayDraft'], finalStageId: 'media_film_screenplayDraft' },
1141
+ gates: [],
1142
+ staleRules: [{ triggerArtifactTypes: ['media_film_storyBible'], staleArtifactTypes: ['media_film_sceneList', 'media_film_screenplayDraft'], reason: 'Story bible changed' }],
1143
+ nextStepId: 'preproduction',
1144
+ },
1145
+ {
1146
+ stepId: 'preproduction',
1147
+ label: 'Preproduction',
1148
+ routePath: '/preproduction',
1149
+ phase: 3,
1150
+ orchestratorKey: 'filmPreproduction',
1151
+ apiRouteKey: 'ai.film.preproduction.generate',
1152
+ displayComponentKey: 'FilmPreproductionDisplay',
1153
+ stages: [
1154
+ { stageId: 'media_film_shotList', label: 'Shot List', artifactType: 'media_film_shotList', required: true, final: false, displayOrder: 1 },
1155
+ { stageId: 'media_film_locationBible', label: 'Location Bible', artifactType: 'media_film_locationBible', required: false, final: false, displayOrder: 2 },
1156
+ { stageId: 'media_film_styleBible', label: 'Style Bible (final)', artifactType: 'media_film_styleBible', required: true, final: true, displayOrder: 3 },
1157
+ ],
1158
+ requiredInputs: [
1159
+ { stepId: 'script', stageId: 'media_film_sceneList', required: true },
1160
+ { stepId: 'development', stageId: 'media_film_characterBible', required: true },
1161
+ ],
1162
+ producedArtifacts: [
1163
+ { stageId: 'media_film_shotList', artifactType: 'media_film_shotList', final: false },
1164
+ { stageId: 'media_film_locationBible', artifactType: 'media_film_locationBible', final: false },
1165
+ { stageId: 'media_film_styleBible', artifactType: 'media_film_styleBible', final: true },
1166
+ ],
1167
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_film_shotList', 'media_film_styleBible'], finalStageId: 'media_film_styleBible' },
1168
+ gates: [
1169
+ { gateId: 'prompt_traceability', required: true, condition: 'Every shot links to a scene' },
1170
+ { gateId: 'shot_preflight', required: true, condition: 'All shots pass preflight validation (no disqualifying risk flags)' },
1171
+ { gateId: 'style_bible_coverage', required: true, condition: 'Style bible covers all declared production style dimensions before generation' },
1172
+ ],
1173
+ staleRules: [{ triggerArtifactTypes: ['media_film_sceneList', 'media_film_characterBible'], staleArtifactTypes: ['media_film_shotList', 'media_film_styleBible'], reason: 'Scene list or character bible changed' }],
1174
+ nextStepId: 'generation',
1175
+ },
1176
+ {
1177
+ stepId: 'generation',
1178
+ label: 'Generation',
1179
+ routePath: '/generation',
1180
+ phase: 4,
1181
+ orchestratorKey: 'filmGeneration',
1182
+ apiRouteKey: 'ai.film.generation.generate',
1183
+ displayComponentKey: 'FilmGenerationDisplay',
1184
+ stages: [
1185
+ { stageId: 'media_film_promptPack', label: 'Prompt Pack', artifactType: 'media_film_promptPack', required: true, final: true, displayOrder: 1 },
1186
+ ],
1187
+ requiredInputs: [
1188
+ { stepId: 'preproduction', stageId: 'media_film_shotList', required: true },
1189
+ { stepId: 'preproduction', stageId: 'media_film_styleBible', required: true },
1190
+ { stepId: 'development', stageId: 'media_film_characterBible', required: true },
1191
+ ],
1192
+ producedArtifacts: [{ stageId: 'media_film_promptPack', artifactType: 'media_film_promptPack', final: true }],
1193
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_film_promptPack'], finalStageId: 'media_film_promptPack' },
1194
+ gates: [
1195
+ { gateId: 'prompt_traceability', required: true, condition: 'Every prompt links to an approved shot and source artifacts' },
1196
+ { gateId: 'keyframe_to_video_approval', required: true, condition: 'All keyframes for included shots are approved before video generation' },
1197
+ { gateId: 'lessons_manifest_applied', required: false, condition: 'Cross-film lessons manifest applied (required from film 2 onwards)' },
1198
+ ],
1199
+ staleRules: [
1200
+ { triggerArtifactTypes: ['media_film_shotList', 'media_film_styleBible', 'media_film_characterBible'], staleArtifactTypes: ['media_film_promptPack'], reason: 'Shot list or bibles changed' },
1201
+ ],
1202
+ nextStepId: 'postproduction',
1203
+ },
1204
+ {
1205
+ stepId: 'postproduction',
1206
+ label: 'Postproduction',
1207
+ routePath: '/postproduction',
1208
+ phase: 4,
1209
+ orchestratorKey: 'filmPostproduction',
1210
+ apiRouteKey: 'ai.film.postproduction.generate',
1211
+ displayComponentKey: 'FilmPostproductionDisplay',
1212
+ stages: [
1213
+ { stageId: 'media_film_clipManifest', label: 'Clip Manifest', artifactType: 'media_film_clipManifest', required: true, final: false, displayOrder: 1 },
1214
+ { stageId: 'media_film_editSequence', label: 'Edit Sequence', artifactType: 'media_film_editSequence', required: false, final: true, displayOrder: 2 },
1215
+ ],
1216
+ requiredInputs: [{ stepId: 'generation', stageId: 'media_film_promptPack', required: true }],
1217
+ producedArtifacts: [
1218
+ { stageId: 'media_film_clipManifest', artifactType: 'media_film_clipManifest', final: false },
1219
+ { stageId: 'media_film_editSequence', artifactType: 'media_film_editSequence', final: true },
1220
+ ],
1221
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_film_clipManifest'], finalStageId: 'media_film_clipManifest' },
1222
+ gates: [
1223
+ { gateId: 'clip_review_status', required: true, condition: 'All registered clips have a review status' },
1224
+ ],
1225
+ staleRules: [
1226
+ { triggerArtifactTypes: ['media_film_promptPack'], staleArtifactTypes: ['media_film_clipManifest', 'media_film_editSequence'], reason: 'Prompt pack changed' },
1227
+ ],
1228
+ nextStepId: 'review',
1229
+ },
1230
+ {
1231
+ stepId: 'review',
1232
+ label: 'Review',
1233
+ routePath: '/review',
1234
+ phase: 5,
1235
+ orchestratorKey: 'filmReview',
1236
+ apiRouteKey: 'ai.film.review.generate',
1237
+ displayComponentKey: 'FilmReviewDisplay',
1238
+ stages: [
1239
+ { stageId: 'media_film_reviewReport', label: 'Review Report', artifactType: 'media_film_reviewReport', required: true, final: true, displayOrder: 1 },
1240
+ ],
1241
+ requiredInputs: [{ stepId: 'postproduction', stageId: 'media_film_clipManifest', required: true }],
1242
+ producedArtifacts: [{ stageId: 'media_film_reviewReport', artifactType: 'media_film_reviewReport', final: true }],
1243
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_film_reviewReport'], finalStageId: 'media_film_reviewReport' },
1244
+ gates: [
1245
+ { gateId: 'retake_budget', required: true, condition: 'Per-shot retake budget not exceeded; hero shots within hero budget' },
1246
+ { gateId: 'rights_provenance', required: false, condition: 'All selected clips have provenance metadata' },
1247
+ ],
1248
+ staleRules: [
1249
+ { triggerArtifactTypes: ['media_film_clipManifest'], staleArtifactTypes: ['media_film_reviewReport'], reason: 'Clip manifest changed' },
1250
+ ],
1251
+ nextStepId: 'release',
1252
+ },
1253
+ {
1254
+ stepId: 'release',
1255
+ label: 'Release',
1256
+ routePath: '/release',
1257
+ phase: 5,
1258
+ orchestratorKey: 'filmRelease',
1259
+ apiRouteKey: 'ai.film.release.generate',
1260
+ displayComponentKey: 'FilmReleaseDisplay',
1261
+ stages: [
1262
+ { stageId: 'media_film_exportPacket', label: 'Export Packet', artifactType: 'media_film_exportPacket', required: true, final: true, displayOrder: 1 },
1263
+ ],
1264
+ requiredInputs: [
1265
+ { stepId: 'review', stageId: 'media_film_reviewReport', required: true },
1266
+ { stepId: 'postproduction', stageId: 'media_film_clipManifest', required: true },
1267
+ ],
1268
+ producedArtifacts: [{ stageId: 'media_film_exportPacket', artifactType: 'media_film_exportPacket', final: true }],
1269
+ completion: { mode: 'final_artifact', requiredStageIds: ['media_film_exportPacket'], finalStageId: 'media_film_exportPacket' },
1270
+ gates: [
1271
+ { gateId: 'clip_review_status', required: true, condition: 'No rejected clip is selected for export' },
1272
+ ],
1273
+ staleRules: [
1274
+ { triggerArtifactTypes: ['media_film_reviewReport', 'media_film_clipManifest'], staleArtifactTypes: ['media_film_exportPacket'], reason: 'Review or clip manifest changed' },
1275
+ ],
1276
+ },
1277
+ ],
1278
+ },
1279
+ // ── Transformation Studio ────────────────────────────────────────────────
1280
+ cross_channel_transformation: {
1281
+ projectKind: 'mixed',
1282
+ family: 'transformation',
1283
+ variant: 'cross_channel_transformation',
1284
+ workflowVersion: '1.0.0',
1285
+ label: 'Cross-Channel Transformation',
1286
+ description: 'Transforms a mature artifact from one channel to another via semantic extraction.',
1287
+ experimental: true,
1288
+ steps: [
1289
+ {
1290
+ stepId: 'specify',
1291
+ label: 'Transformation Seed',
1292
+ routePath: '/specify',
1293
+ orchestratorKey: 'transformationSeed',
1294
+ apiRouteKey: 'ai.spec.generate',
1295
+ displayComponentKey: 'ThesisArtifactsDisplay',
1296
+ stages: [
1297
+ { stageId: 'transformation_scientificPaperSeed', label: 'Scientific Paper Seed', artifactType: 'transformation_scientificPaperSeed', required: false, final: false, displayOrder: 1 },
1298
+ { stageId: 'transformation_documentaryTreatment', label: 'Documentary Treatment', artifactType: 'transformation_documentaryTreatment', required: false, final: false, displayOrder: 2 },
1299
+ { stageId: 'transformation_chapterCompressionMap', label: 'Chapter Compression Map', artifactType: 'transformation_chapterCompressionMap', required: false, final: true, displayOrder: 3 },
1300
+ ],
1301
+ requiredInputs: [],
1302
+ // Each transformation produces exactly one of these per run — every one is an
1303
+ // alternative terminal artifact for this step, not a required set.
1304
+ producedArtifacts: (0, transformation_registry_1.getTransformationSeedArtifactTypes)().map((artifactType) => ({
1305
+ stageId: artifactType,
1306
+ artifactType,
1307
+ final: true,
1308
+ })),
1309
+ // Seeds exactly one of several mutually-exclusive target-specific artifacts per run
1310
+ // (never all of them), so completion is an any-of rule over every seed artifact type
1311
+ // TRANSFORMATION_REGISTRY declares — never a fixed final_artifact/all_required_stages
1312
+ // rule, and never a bespoke 'custom' completion path outside the shared reader.
1313
+ completion: { mode: 'any_of_stages', requiredStageIds: [], anyOfStageIds: (0, transformation_registry_1.getTransformationSeedArtifactTypes)() },
1314
+ gates: [],
1315
+ staleRules: [],
1316
+ },
1317
+ ],
1318
+ },
1319
+ };
1320
+ // ─── Registry Helpers ──────────────────────────────────────────────────────────
1321
+ /** Get the channel definition for a workflow variant. Returns undefined for unknown variants. */
1322
+ function getWorkflowChannel(variant) {
1323
+ const ch = exports.WORKFLOW_CHANNEL_REGISTRY[variant];
1324
+ if (!ch)
1325
+ throw new Error(`CHANNEL_NOT_FOUND: No channel registered for variant "${variant}"`);
1326
+ return ch;
1327
+ }
1328
+ /** Get a step definition from a channel. Returns undefined if stepId not registered. */
1329
+ function getChannelStep(variant, stepId) {
1330
+ return getWorkflowChannel(variant).steps.find(s => s.stepId === stepId);
1331
+ }
1332
+ /** Get all stage definitions for a step. Returns [] for unregistered steps. */
1333
+ function getWorkflowStages(variant, stepId) {
1334
+ return getChannelStep(variant, stepId)?.stages ?? [];
1335
+ }
1336
+ /** Get stage IDs for a step (for backwards compatibility with getPipelineStages callers). */
1337
+ function getWorkflowStageIds(variant, stepId) {
1338
+ return getWorkflowStages(variant, stepId).map(s => s.stageId);
1339
+ }
1340
+ /** Get the final stage definition for a step. */
1341
+ function getWorkflowFinalStage(variant, stepId) {
1342
+ return getWorkflowStages(variant, stepId).find(s => s.final);
1343
+ }
1344
+ /** Get the completion rule for a step. */
1345
+ function getCompletionRule(variant, stepId) {
1346
+ return getChannelStep(variant, stepId)?.completion;
1347
+ }
1348
+ /** Get required input artifact requirements for a step. */
1349
+ function getRequiredInputs(variant, stepId) {
1350
+ return getChannelStep(variant, stepId)?.requiredInputs ?? [];
1351
+ }
1352
+ /** Get produced artifact outputs for a step. */
1353
+ function getProducedArtifacts(variant, stepId) {
1354
+ return getChannelStep(variant, stepId)?.producedArtifacts ?? [];
1355
+ }
1356
+ /** Get the orchestrator key for a step. Returns undefined if step not registered. */
1357
+ function getOrchestratorKey(variant, stepId) {
1358
+ return getChannelStep(variant, stepId)?.orchestratorKey;
1359
+ }
1360
+ /** Get the display component key for a step. Returns undefined if step not registered. */
1361
+ function getDisplayComponentKey(variant, stepId) {
1362
+ return getChannelStep(variant, stepId)?.displayComponentKey;
1363
+ }
1364
+ /** Derive WorkflowFamily from WorkflowVariant without a DB column. */
1365
+ function getWorkflowFamily(variant) {
1366
+ return getWorkflowChannel(variant).family;
1367
+ }
1368
+ /**
1369
+ * One registry-derived plan shape shared by navigation, completion readers, and
1370
+ * durable execution. `software_app` retains its rich operator workflow while
1371
+ * every other variant is projected from its channel configuration.
1372
+ */
1373
+ function getWorkflowPlan(variant) {
1374
+ if (variant === 'software_app') {
1375
+ return workflow_registry_1.WORKFLOW_STEPS.filter((step) => (step.applicableKinds ?? workflow_registry_1.WORKFLOW_KINDS).includes('software'));
1376
+ }
1377
+ return getWorkflowChannel(variant).steps
1378
+ .filter((step) => !step.deprecated)
1379
+ .map((step, index) => ({
1380
+ id: step.stepId,
1381
+ name: step.label,
1382
+ title: step.label,
1383
+ description: getWorkflowChannel(variant).description,
1384
+ phase: step.phase ?? Math.min(index + 1, 6),
1385
+ order: index + 1,
1386
+ path: step.routePath,
1387
+ }));
1388
+ }
1389
+ /**
1390
+ * True only for `software_app`: completion uses API/UI KG gates, tasks row parity,
1391
+ * Vercel CI + product-realization + deployment verification, and implementation lineage checks.
1392
+ * All other variants use manuscript/publication/spine semantics — never infer from `isWritingKind`.
1393
+ */
1394
+ function isSoftwareAppCompletionSpine(variant) {
1395
+ return variant === 'software_app';
1396
+ }
1397
+ /** Check if a stage ID is declared for a given variant + step (used by dispatcher for validation). */
1398
+ function isStageIdDeclared(variant, stepId, stageId) {
1399
+ return getWorkflowStageIds(variant, stepId).includes(stageId);
1400
+ }
1401
+ /** List all registered (non-experimental) variants. */
1402
+ function getActiveVariants() {
1403
+ return Object.keys(exports.WORKFLOW_CHANNEL_REGISTRY).filter(v => {
1404
+ const ch = exports.WORKFLOW_CHANNEL_REGISTRY[v];
1405
+ return !ch.experimental;
1406
+ });
1407
+ }
1408
+ /**
1409
+ * Returns all unique final stage IDs for the given step across all registered active variants.
1410
+ * Used by compute-workflow-step-stats and step-completion to avoid hardcoded stage_id arrays.
1411
+ *
1412
+ * Example: getRegistryFinalStageIds('plan') →
1413
+ * ['planFinal', 'storyStructureFinal', 'outlineFinal']
1414
+ */
1415
+ function getRegistryFinalStageIds(stepId) {
1416
+ const seen = new Set();
1417
+ for (const variant of getActiveVariants()) {
1418
+ const finalStage = getWorkflowFinalStage(variant, stepId);
1419
+ if (finalStage)
1420
+ seen.add(finalStage.stageId);
1421
+ }
1422
+ return Array.from(seen);
1423
+ }
1424
+ var step_id_canonical_1 = require("./step-id-canonical");
1425
+ Object.defineProperty(exports, "resolveRegistryWorkflowStepId", { enumerable: true, get: function () { return step_id_canonical_1.resolveRegistryWorkflowStepId; } });
1426
+ Object.defineProperty(exports, "resolveWorkflowStepRoutePath", { enumerable: true, get: function () { return step_id_canonical_1.resolveWorkflowStepRoutePath; } });
1427
+ Object.defineProperty(exports, "resolveCanonicalWorkflowStepId", { enumerable: true, get: function () { return step_id_canonical_1.resolveCanonicalWorkflowStepId; } });
1428
+ Object.defineProperty(exports, "normalizeWorkflowStepStatsStepId", { enumerable: true, get: function () { return step_id_canonical_1.normalizeWorkflowStepStatsStepId; } });
1429
+ function toStageExpectations(stageIds, stages) {
1430
+ return stageIds.map((stageId) => {
1431
+ const stageDef = stages.find((s) => s.stageId === stageId);
1432
+ return {
1433
+ stageId,
1434
+ artifactType: stageDef?.artifactType ?? stageId,
1435
+ };
1436
+ });
1437
+ }
1438
+ /**
1439
+ * Build registry-backed pipeline expectations for `checkPipelineStages`.
1440
+ * Returns null when the step is not in the channel or has no required completion stages.
1441
+ */
1442
+ function buildRegistryPipelineCheckContext(variant, registryStepId) {
1443
+ const step = getChannelStep(variant, registryStepId);
1444
+ if (!step)
1445
+ return null;
1446
+ const { completion, staleRules } = step;
1447
+ if (completion.mode === 'any_of_stages') {
1448
+ const anyOfStageIds = completion.anyOfStageIds ?? [];
1449
+ if (anyOfStageIds.length === 0)
1450
+ return null;
1451
+ return {
1452
+ variant,
1453
+ workflowStepId: registryStepId,
1454
+ expectedStages: toStageExpectations(anyOfStageIds, step.stages),
1455
+ staleRules,
1456
+ matchMode: 'any',
1457
+ };
1458
+ }
1459
+ if (completion.requiredStageIds.length === 0) {
1460
+ return null;
1461
+ }
1462
+ return {
1463
+ variant,
1464
+ workflowStepId: registryStepId,
1465
+ expectedStages: toStageExpectations(completion.requiredStageIds, step.stages),
1466
+ staleRules,
1467
+ matchMode: 'all',
1468
+ };
1469
+ }
1470
+ /**
1471
+ * Canonical bridge from heterogeneous pipeline callables → dispatch shape (`===` identity at runtime).
1472
+ */
1473
+ function asWorkflowOrchestratorFn(native) {
1474
+ return native;
1475
+ }