@aurorajs.dev/catalyst-cli 3.1.2 → 3.1.4

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 (235) hide show
  1. package/README.md +1 -1
  2. package/dist/ai/domain/skills-scanner.js +7 -2
  3. package/dist/deploy/domain/curl-config.js +1 -1
  4. package/dist/deploy/domain/playbook-vars.js +1 -1
  5. package/dist/generator/domain/frontend-composition.js +4 -4
  6. package/dist/generator/domain/property-filters.d.ts +8 -0
  7. package/dist/generator/domain/property-filters.js +17 -6
  8. package/dist/generator/handlers/front.handler.js +10 -1
  9. package/dist/sheets/domain/auth.js +10 -5
  10. package/dist/sheets/sync/sheet-to-yaml.d.ts +1 -0
  11. package/dist/sheets/sync/sheet-to-yaml.js +19 -3
  12. package/dist/templates/backend/application/.claude/skills/catalyst-tools/SKILL.md +5 -3
  13. package/dist/templates/backend/application/src/@aurora/modules/manual/application/manual-catalog-section-reader.spec.ts +4 -0
  14. package/dist/templates/backend/application/src/@aurora/modules/manual/application/manual-find-index.handler.spec.ts +2 -0
  15. package/dist/templates/backend/application/src/@aurora/modules/manual/application/manual-find-index.handler.ts +2 -1
  16. package/dist/templates/backend/application/src/@aurora/modules/manual/domain/manual-section-reader.port.ts +2 -0
  17. package/dist/templates/backend/application/src/@aurora/modules/manual/domain/manual.types.ts +2 -0
  18. package/dist/templates/backend/application/src/@aurora/modules/manual/graphql/manual-graphql-schema.spec.ts +10 -2
  19. package/dist/templates/backend/application/src/@aurora/modules/manual/graphql/manual.graphql +4 -0
  20. package/dist/templates/backend/business-rules/business-partner-portal/supplier-document.md +96 -6
  21. package/dist/templates/backend/business-rules/tools/assistant-usage.md +60 -0
  22. package/dist/templates/backend/manual/business-partner-portal/CONTEXT.md +5 -5
  23. package/dist/templates/backend/manual/business-partner-portal/en/purchase-invoice-header.md +5 -1
  24. package/dist/templates/backend/manual/business-partner-portal/es/purchase-invoice-header.md +5 -1
  25. package/dist/templates/backend/manual/production-planning/en/planner.md +1 -1
  26. package/dist/templates/backend/manual/production-planning/en/production-order-position-event.md +8 -5
  27. package/dist/templates/backend/manual/production-planning/es/planner.md +1 -1
  28. package/dist/templates/backend/manual/production-planning/es/production-order-position-event.md +8 -5
  29. package/dist/templates/backend/manual/reporting/en/report.md +40 -0
  30. package/dist/templates/backend/manual/reporting/es/report.md +40 -0
  31. package/dist/templates/backend/manual/tools/CONTEXT.md +1 -0
  32. package/dist/templates/backend/manual/tools/actions.yaml +11 -0
  33. package/dist/templates/backend/manual/tools/en/assistant-conversation.md +38 -0
  34. package/dist/templates/backend/manual/tools/en/assistant-usage-policy.md +46 -0
  35. package/dist/templates/backend/manual/tools/en/assistant-usage.md +28 -0
  36. package/dist/templates/backend/manual/tools/en/file-storage.md +83 -0
  37. package/dist/templates/backend/manual/tools/es/assistant-conversation.md +38 -0
  38. package/dist/templates/backend/manual/tools/es/assistant-usage-policy.md +46 -0
  39. package/dist/templates/backend/manual/tools/es/assistant-usage.md +28 -0
  40. package/dist/templates/backend/manual/tools/es/file-storage.md +83 -0
  41. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/infrastructure/business-partner-portal-anthropic-extraction-step-two.service.spec.ts +2 -1
  42. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-build-step-one-request.function.spec.ts +9 -2
  43. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-build-step-one-request.function.ts +6 -3
  44. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-build-step-two-request.function.spec.ts +19 -2
  45. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-build-step-two-request.function.ts +15 -2
  46. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/functions/business-partner-portal-anthropic-map-step-one-answer.function.ts +1 -1
  47. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/anthropic/shared/types/business-partner-portal-anthropic-step-one-answer.types.ts +1 -1
  48. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/extraction-step-two/business-partner-portal-extraction-step-two-context.service.spec.ts +63 -0
  49. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/extraction-step-two/business-partner-portal-extraction-step-two-context.service.ts +25 -3
  50. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/extraction-step-two/business-partner-portal-extraction-step-two-empty.service.spec.ts +1 -0
  51. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/extraction-step-two/business-partner-portal-extraction-step-two.types.ts +5 -0
  52. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/purchase-invoice-extraction/business-partner-portal-map-invoice-ocr-result-to-purchase-invoice.function.spec.ts +1 -1
  53. package/dist/templates/backend/packages/business-partner-portal/src/@app/business-partner-portal/shared/purchase-invoice-extraction/business-partner-portal-map-invoice-ocr-result-to-purchase-invoice.function.ts +1 -1
  54. package/dist/templates/backend/packages/production-planning/src/@app/production-planning/production-order-position/application/get-processes/production-planning-get-processes-production-order-position.handler.spec.ts +5 -2
  55. package/dist/templates/backend/packages/production-planning/src/@app/production-planning/production-order-position/application/get-processes/production-planning-get-processes-production-order-position.handler.ts +4 -0
  56. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-create-report.dto.ts +0 -21
  57. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-report.dto.ts +3 -3
  58. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-update-report-by-id.dto.ts +0 -48
  59. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/dto/reporting-update-reports.dto.ts +0 -48
  60. package/dist/templates/backend/packages/reporting/src/@api/reporting/report/graphql/reporting-report.graphql +3 -20
  61. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/create/reporting-create-report.service.ts +2 -2
  62. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/reporting-report.payload-types.ts +33 -0
  63. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update/reporting-update-report-by-id.handler.spec.ts +77 -0
  64. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update/reporting-update-report-by-id.service.ts +2 -2
  65. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update/reporting-update-reports.service.ts +2 -2
  66. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/application/update-execution-cache/reporting-update-report-execution-cache.handler.spec.ts +35 -0
  67. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/domain/reporting-report.field-schema.ts +7 -0
  68. package/dist/templates/backend/packages/reporting/src/@app/reporting/report/index.ts +5 -0
  69. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/dto/tools-assistant-conversation.dto.ts +8 -1
  70. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/dto/tools-update-assistant-conversation-by-id.dto.ts +8 -1
  71. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/dto/tools-update-assistant-conversations.dto.ts +8 -1
  72. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-conversation/graphql/tools-assistant-conversation.graphql +8 -1
  73. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/controllers/tools-ask-assistant-assistant-usage.controller.ts +1 -0
  74. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-ask-assistant.dto.ts +47 -0
  75. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-assistant-answer.dto.ts +1 -0
  76. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-assistant-usage.dto.ts +8 -1
  77. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-update-assistant-usage-by-id.dto.ts +8 -1
  78. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/dto/tools-update-assistant-usages.dto.ts +8 -1
  79. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/graphql/tools-assistant-usage.graphql +45 -1
  80. package/dist/templates/backend/packages/tools/src/@api/tools/assistant-usage/resolvers/tools-ask-assistant-assistant-usage.resolver.ts +1 -0
  81. package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/infrastructure/tools-anthropic-assistant-model.service.spec.ts +1 -0
  82. package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/shared/functions/tools-anthropic-build-assistant-request.function.spec.ts +145 -0
  83. package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/shared/functions/tools-anthropic-build-assistant-request.function.ts +44 -2
  84. package/dist/templates/backend/packages/tools/src/@app/tools/anthropic/shared/types/tools-anthropic-assistant-answer.types.ts +3 -2
  85. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-conversation/domain/tools-assistant-conversation.field-schema.ts +6 -0
  86. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-conversation/infrastructure/drizzle/tools-drizzle-assistant-conversation.schema.ts +1 -0
  87. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-ask-assistant-assistant-usage.handler.spec.ts +105 -5
  88. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-ask-assistant-assistant-usage.handler.ts +40 -23
  89. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-assistant-errors.function.ts +8 -0
  90. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-assistant-read-screen.function.spec.ts +257 -0
  91. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/ask-assistant/tools-assistant-read-screen.function.ts +200 -0
  92. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/quota/tools-assistant-quota.service.spec.ts +7 -2
  93. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/application/quota/tools-assistant-quota.service.ts +7 -2
  94. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/domain/tools-assistant-model.port.ts +44 -0
  95. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/domain/tools-assistant-usage.field-schema.ts +6 -0
  96. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/infrastructure/drizzle/tools-drizzle-assistant-usage.repository.spec.ts +25 -0
  97. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/infrastructure/drizzle/tools-drizzle-assistant-usage.repository.ts +3 -0
  98. package/dist/templates/backend/packages/tools/src/@app/tools/assistant-usage/infrastructure/drizzle/tools-drizzle-assistant-usage.schema.ts +1 -0
  99. package/dist/templates/backend/packages/tools/test/acceptance/tools/assistant-ask.e2e-spec.ts +16 -1
  100. package/dist/templates/backend/packages/tools/test/acceptance/tools/assistant-usage-increment.e2e-spec.ts +52 -5
  101. package/dist/templates/codegen/frontend/module/__module_name__/features/__module_name__-list.component.ts.eta +7 -1
  102. package/dist/templates/codegen/frontend/module/__module_name__/features/index.ts.eta +1 -1
  103. package/dist/templates/frontend/application/.claude/skills/catalyst-project-structure/SKILL.md +3 -0
  104. package/dist/templates/frontend/application/angular.json +2 -0
  105. package/dist/templates/frontend/application/libs/ui/command/src/lib/hlm-command-item.ts +1 -1
  106. package/dist/templates/frontend/application/src/@aurora/modules/assisted-form/README.md +2 -0
  107. package/dist/templates/frontend/application/src/@aurora/modules/command-palette/command-palette-trigger.component.ts +1 -0
  108. package/dist/templates/frontend/application/src/@aurora/modules/guided-action/README.md +4 -0
  109. package/dist/templates/frontend/application/src/@aurora/modules/guided-action/guided-action-runner.service.spec.ts +69 -0
  110. package/dist/templates/frontend/application/src/@aurora/modules/guided-action/guided-action-runner.service.ts +13 -4
  111. package/dist/templates/frontend/application/src/@aurora/modules/index.ts +1 -0
  112. package/dist/templates/frontend/application/src/@aurora/modules/manual/manual.graphql.ts +1 -0
  113. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/README.md +36 -0
  114. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/index.ts +2 -0
  115. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/screen-context.service.spec.ts +137 -0
  116. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/screen-context.service.ts +60 -0
  117. package/dist/templates/frontend/application/src/@aurora/modules/screen-context/screen-context.types.ts +47 -0
  118. package/dist/templates/frontend/application/src/app/domains/admin/layout/site-header.ts +1 -1
  119. package/dist/templates/frontend/application/tsconfig.json +1 -0
  120. package/dist/templates/frontend/navigation-i18n/reporting/en.json +1 -1
  121. package/dist/templates/frontend/navigation-i18n/reporting/es.json +1 -1
  122. package/dist/templates/frontend/packages/automation/src/app/domains/admin/apps/automation/state-machine-history/features/index.ts +0 -1
  123. package/dist/templates/frontend/packages/automation/src/app/domains/admin/apps/automation/state-machine-history/features/state-machine-history-list.component.ts +0 -13
  124. package/dist/templates/frontend/packages/business-partner-portal/public/i18n/business-partner-portal/en.json +11 -0
  125. package/dist/templates/frontend/packages/business-partner-portal/public/i18n/business-partner-portal/es.json +11 -0
  126. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/data-access/purchase-invoice-review-context.derive.spec.ts +420 -0
  127. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/data-access/purchase-invoice-review-context.derive.ts +237 -0
  128. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/data-access/purchase-invoice-review.derive.spec.ts +181 -26
  129. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/data-access/purchase-invoice-review.derive.ts +143 -25
  130. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/features/purchase-invoice-header-detail.component.spec.ts +42 -0
  131. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/features/purchase-invoice-header-detail.component.ts +32 -8
  132. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/features/purchase-invoice-header-form.component.ts +32 -1
  133. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/features/purchase-invoice-header-list-actions-cell.component.ts +4 -1
  134. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/ui/purchase-invoice-breakdown.component.ts +7 -32
  135. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-header/ui/purchase-invoice-lines-grid.component.ts +12 -8
  136. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-trace/features/index.ts +0 -1
  137. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-trace/features/purchase-invoice-trace-list.component.ts +0 -13
  138. package/dist/templates/frontend/packages/identity/src/app/domains/admin/apps/iam/account/features/account-form.component.spec.ts +26 -1
  139. package/dist/templates/frontend/packages/identity/src/app/domains/admin/apps/iam/account/features/account-form.component.ts +45 -0
  140. package/dist/templates/frontend/packages/production-planning/public/i18n/production-planning/en.json +16 -4
  141. package/dist/templates/frontend/packages/production-planning/public/i18n/production-planning/es.json +16 -4
  142. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/index.ts +1 -0
  143. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner-process-weights.derive.spec.ts +76 -0
  144. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner-process-weights.derive.ts +49 -0
  145. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner.derive.spec.ts +15 -0
  146. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner.derive.ts +7 -3
  147. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/data-access/planner.graphql.ts +23 -0
  148. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/features/planner-process-weights-dialog.component.ts +139 -0
  149. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/planner/features/planner.component.ts +41 -4
  150. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/data-access/production-dashboard.derive.spec.ts +0 -30
  151. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/data-access/production-dashboard.derive.ts +0 -21
  152. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/data-access/production-dashboard.resolvers.spec.ts +24 -0
  153. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/data-access/production-dashboard.resolvers.ts +3 -1
  154. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/batch-detail-sheet.component.ts +22 -10
  155. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/event-form-sheet.component.spec.ts +142 -0
  156. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/event-form-sheet.component.ts +95 -59
  157. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/event-list.component.ts +121 -123
  158. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-dashboard/features/production-dashboard.component.ts +52 -19
  159. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-order-position/features/production-order-position-list.component.ts +8 -2
  160. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-order-position-event/features/production-order-position-event-list.component.ts +4 -0
  161. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-order-position-event/production-order-position-event.columns.spec.ts +104 -4
  162. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/production-order-position-event/production-order-position-event.columns.ts +121 -69
  163. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/shared/dialogs/finish-event-dialog.component.ts +3 -3
  164. package/dist/templates/frontend/packages/production-planning/src/app/domains/admin/apps/production-planning/shared/dialogs/weight-input-dialog.component.ts +3 -3
  165. package/dist/templates/frontend/packages/reporting/public/i18n/reporting/en.json +1 -1
  166. package/dist/templates/frontend/packages/reporting/public/i18n/reporting/es.json +1 -1
  167. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/data-access/report.detail-config.ts +1 -2
  168. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/data-access/report.graphql.ts +0 -14
  169. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/features/report-form.component.spec.ts +96 -0
  170. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/features/report-form.component.ts +46 -69
  171. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/features/report-list.component.ts +2 -22
  172. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/report/report.columns.ts +0 -1
  173. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/reporting-icons.providers.ts +2 -1
  174. package/dist/templates/frontend/packages/reporting/src/app/domains/admin/apps/reporting/reporting.navigation.ts +7 -0
  175. package/dist/templates/frontend/packages/tools/public/i18n/tools/en.json +4 -2
  176. package/dist/templates/frontend/packages/tools/public/i18n/tools/es.json +4 -2
  177. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant/tools-assistant.service.spec.ts +82 -7
  178. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant/tools-assistant.service.ts +12 -2
  179. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/assistant-conversation.columns.ts +13 -0
  180. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/data-access/assistant-conversation.graphql.ts +1 -0
  181. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/assistant-conversation-form.component.ts +18 -0
  182. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/assistant-conversation-list.component.ts +0 -13
  183. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/index.ts +0 -1
  184. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/assistant-usage.columns.ts +13 -0
  185. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/data-access/assistant-usage.graphql.ts +2 -0
  186. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/assistant-usage-form.component.ts +18 -0
  187. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/assistant-usage-list.component.ts +0 -13
  188. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/index.ts +0 -1
  189. package/dist/templates/monorepo/.claude/commands/business-rules/promote.md +5 -1
  190. package/dist/templates/monorepo/.claude/hooks/__fixtures__/br-hr-regression-baseline.txt +2 -2
  191. package/dist/templates/monorepo/.claude/hooks/check-required-setup.ts +4 -4
  192. package/dist/templates/monorepo/.claude/hooks/inject-prompt-context.ts +1 -1
  193. package/dist/templates/monorepo/.claude/scripts/generate-skills-index.test.ts +29 -1
  194. package/dist/templates/monorepo/.claude/scripts/generate-skills-index.ts +7 -1
  195. package/dist/templates/monorepo/.claude/skills/REGISTRY.md +2 -2
  196. package/dist/templates/monorepo/.claude/skills/catalyst-backlog/SKILL.md +19 -4
  197. package/dist/templates/monorepo/.claude/skills/catalyst-backlog/frontier-worker-addendum.md +3 -3
  198. package/dist/templates/monorepo/.claude/skills/catalyst-business-rules-guard/SKILL.md +8 -5
  199. package/dist/templates/monorepo/.claude/skills/catalyst-business-rules-guard/references/workflow.md +10 -6
  200. package/dist/templates/monorepo/.claude/skills/catalyst-delegation/SKILL.md +1 -1
  201. package/dist/templates/monorepo/.claude/skills/catalyst-harness-rules-guard/SKILL.md +6 -6
  202. package/dist/templates/monorepo/.claude/skills/catalyst-harness-rules-guard/references/enforcement.md +3 -3
  203. package/dist/templates/monorepo/.claude/skills/catalyst-harness-rules-guard/references/format.md +3 -3
  204. package/dist/templates/monorepo/.claude/skills/catalyst-update-skill-registry/SKILL.md +4 -4
  205. package/dist/templates/monorepo/.claude/skills/catalyst-user-manual/SKILL.md +48 -2
  206. package/dist/templates/monorepo/.claude/skills/openspec-apply-change/SKILL.md +28 -10
  207. package/dist/templates/monorepo/.claude/skills/openspec-archive-change/SKILL.md +52 -13
  208. package/dist/templates/monorepo/.claude/skills/openspec-explore/SKILL.md +59 -14
  209. package/dist/templates/monorepo/.claude/skills/openspec-propose/SKILL.md +38 -12
  210. package/dist/templates/monorepo/.claude/skills/openspec-sync-specs/SKILL.md +31 -3
  211. package/dist/templates/monorepo/CLAUDE.md +14 -14
  212. package/dist/templates/monorepo/docs/business-rules/ARCHITECTURE.md +16 -13
  213. package/dist/templates/monorepo/docs/business-rules/MIGRATION.md +5 -5
  214. package/dist/templates/monorepo/docs/manual/en/04-asistente.md +71 -0
  215. package/dist/templates/monorepo/docs/manual/es/04-asistente.md +71 -0
  216. package/dist/templates/monorepo/openspec/config.yaml +25 -5
  217. package/dist/templates/monorepo/package.json +3 -1
  218. package/dist/templates/monorepo/scripts/backlog/prompt.test.ts +5 -5
  219. package/dist/templates/monorepo/scripts/backlog/prompt.ts +1 -1
  220. package/dist/templates/monorepo/scripts/business-rules/audit.ts +1 -1
  221. package/dist/templates/monorepo/scripts/manual/compile.test.ts +78 -0
  222. package/dist/templates/monorepo/scripts/manual/compile.ts +36 -9
  223. package/dist/templates/monorepo/scripts/worktree/prune.test.ts +517 -0
  224. package/dist/templates/monorepo/scripts/worktree/prune.ts +331 -0
  225. package/oclif.manifest.json +408 -408
  226. package/package.json +15 -17
  227. package/dist/templates/frontend/packages/automation/src/app/domains/admin/apps/automation/state-machine-history/features/state-machine-history-list-actions-cell.component.ts +0 -44
  228. package/dist/templates/frontend/packages/business-partner-portal/src/app/domains/admin/apps/business-partner-portal/purchase-invoice-trace/features/purchase-invoice-trace-list-actions-cell.component.ts +0 -44
  229. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-conversation/features/assistant-conversation-list-actions-cell.component.ts +0 -44
  230. package/dist/templates/frontend/packages/tools/src/app/domains/admin/apps/tools/assistant-usage/features/assistant-usage-list-actions-cell.component.ts +0 -43
  231. package/dist/templates/monorepo/.claude/commands/opsx/apply.md +0 -184
  232. package/dist/templates/monorepo/.claude/commands/opsx/archive.md +0 -225
  233. package/dist/templates/monorepo/.claude/commands/opsx/explore.md +0 -196
  234. package/dist/templates/monorepo/.claude/commands/opsx/propose.md +0 -145
  235. package/dist/templates/monorepo/.claude/commands/opsx/sync.md +0 -258
@@ -1,196 +0,0 @@
1
- ---
2
- name: "OPSX: Explore"
3
- description: "Enter explore mode - think through ideas, investigate problems, clarify requirements"
4
- allowed-tools: Bash(openspec:*)
5
- category: "Workflow"
6
- tags: ["workflow", "explore", "experimental", "thinking"]
7
- ---
8
-
9
- Enter explore mode. Think deeply. Visualize freely. Follow the conversation wherever it goes.
10
-
11
- **IMPORTANT: Explore mode is for thinking, not implementing.** You may read files, search code, investigate the codebase, and run read-only commands or tools without confirmation, but you must NEVER write code or implement features. If the user asks you to implement something, remind them to exit explore mode first and create a change proposal. You MAY create or update OpenSpec change artifacts (proposals, designs, specs) within a confirmed scope—that's capturing thinking, not implementing. Answering design or clarifying questions is never consent to write. Before the first write-capable action, name the artifacts or files you would change and what you would do, ask a direct yes/no question, and wait for the user's confirmation in a separate message. Confirmation covers only the scope you described; ask again before expanding it. For a new change, scaffold it first as described below.
12
-
13
- **This is a stance, not a workflow.** There are no fixed steps, no required sequence, no mandatory outputs. You're a thinking partner helping the user explore.
14
-
15
- **Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
16
-
17
- **Input**: The argument after `/opsx:explore` is whatever the user wants to think about. Could be:
18
- - A vague idea: "real-time collaboration"
19
- - A specific problem: "the auth system is getting unwieldy"
20
- - A change name: "add-dark-mode" (to explore in context of that change)
21
- - A comparison: "postgres vs sqlite for this"
22
- - Nothing (just enter explore mode)
23
-
24
- ---
25
-
26
- ## The Stance
27
-
28
- - **Curious, not prescriptive** - Ask questions that emerge naturally, don't follow a script
29
- - **Open threads, not interrogations** - Surface multiple interesting directions and let the user follow what resonates. Don't funnel them through a single path of questions.
30
- - **Visual** - Use ASCII diagrams liberally when they'd help clarify thinking
31
- - **Adaptive** - Follow interesting threads, pivot when new information emerges
32
- - **Patient** - Don't rush to conclusions, let the shape of the problem emerge
33
- - **Grounded** - Explore the actual codebase when relevant, don't just theorize
34
-
35
- ---
36
-
37
- ## What You Might Do
38
-
39
- Depending on what the user brings, you might:
40
-
41
- **Explore the problem space**
42
- - Ask clarifying questions that emerge from what they said
43
- - Challenge assumptions
44
- - Reframe the problem
45
- - Find analogies
46
-
47
- **Investigate the codebase**
48
- - Map existing architecture relevant to the discussion
49
- - Find integration points
50
- - Identify patterns already in use
51
- - Surface hidden complexity
52
-
53
- **Compare options**
54
- - Brainstorm multiple approaches
55
- - Build comparison tables
56
- - Sketch tradeoffs
57
- - Recommend a path (if asked)
58
-
59
- **Visualize**
60
- ```
61
- +------------------------------------------+
62
- | Use ASCII diagrams liberally |
63
- +------------------------------------------+
64
- | |
65
- | [State A] -------> [State B] |
66
- | | |
67
- | v |
68
- | [State C] |
69
- | |
70
- | System diagrams, state machines, |
71
- | data flows, architecture sketches, |
72
- | dependency graphs, comparison tables |
73
- | |
74
- +------------------------------------------+
75
- ```
76
-
77
- **Draw with plain ASCII only** — borders `+` `-` `|`, arrows `-->` `<--` `^` `v`, markers `*` `x`.
78
- Unicode diagram glyphs can render at different widths across terminals, fonts, and locales, so padded boxes and aligned tables can drift. Keep every diagram character ASCII.
79
-
80
- **Surface risks and unknowns**
81
- - Identify what could go wrong
82
- - Find gaps in understanding
83
- - Suggest spikes or investigations
84
-
85
- ---
86
-
87
- ## OpenSpec Awareness
88
-
89
- You have full context of the OpenSpec system. Use it naturally, don't force it.
90
-
91
- ### Check for context
92
-
93
- At the start, quickly check what exists:
94
- ```bash
95
- openspec list --json
96
- ```
97
-
98
- This tells you:
99
- - If there are active changes
100
- - Their names, schemas, and status
101
- - What the user might be working on
102
-
103
- Then read the project's own context from the resolved root - `<root.path>/openspec/config.yaml` (or `config.yml`). Use the `root.path` returned above, and skip this if neither file exists:
104
- - `context`: project background - tech stack, conventions, constraints
105
- - `rules`: keyed by artifact id - the entries for an artifact apply only when you write that artifact
106
-
107
- Ground your thinking in these. They are constraints for you to follow, not content to reproduce: do NOT copy them into the conversation or into any artifact you create.
108
-
109
- If the user mentioned a specific change name, read its artifacts for context.
110
-
111
- ### When no change exists
112
-
113
- Think freely. When insights crystallize, you might offer:
114
-
115
- - "This feels solid enough to start a change. Want me to create a proposal?"
116
- - Or keep exploring - no pressure to formalize
117
-
118
- If the user asks you to capture the exploration as a new change, transition seamlessly into the requested capture:
119
-
120
- 1. Run `openspec new change "<name>"` (with `--store <id>` when applicable) before creating any artifacts. Never create a new change directory under `openspec/changes/` by hand; the CLI scaffold creates required metadata such as `.openspec.yaml`. Keep the selected `--store <id>` on every applicable follow-up `status` and `instructions` command.
121
- 2. Run `openspec status --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store), then process the requested artifacts in dependency order. For each requested artifact that is `ready`, run `openspec instructions "<artifact-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store). Before creating a requested artifact, evaluate any condition in its own `instruction` against the explored change; record a deliberate skip instead when the condition does not apply. If a requested artifact is blocked by a direct prerequisite the user did not request, run `openspec instructions "<prerequisite-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) for that prerequisite whether it is `ready` or `blocked`. If its own `instruction` states a condition, evaluate that condition against the explored change and record a deliberate skip only when the condition does not apply. If the condition applies, or the prerequisite is not conditional, treat it as a normal prerequisite and ask before expanding the capture. Do not create an unrequested prerequisite unless the user approves.
122
- 3. Follow the returned `template` and `instruction` fields. Read completed dependency files listed in `dependencies`, and apply `context` and `rules` as constraints without copying them into the artifact. If the instruction delegates creation to a specific skill or command, invoke it; otherwise write the artifact to `resolvedOutputPath`, using the instruction to choose a concrete path when it is a glob. Verify that the selected concrete output exists.
123
- 4. After creating each artifact, re-run `openspec status --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) and continue until every requested artifact is `done`, `skipped`, or was deliberately skipped because its own `instruction` stated a condition that did not apply. Tell the user about a deliberate conditional skip, remember it, and do not reconsider it. Dependencies are enablers, not gates: if a requested artifact is still `blocked` only because you deliberately skipped a conditional prerequisite, run `openspec instructions "<artifact-id>" --change "<name>" --json` (append the confirmed `--store "<id>"` only for a registered standalone store) despite the blocked status, then create it using step 3 only when those recorded conditional skips are its sole missing dependencies. If a requested artifact is blocked by a prerequisite the user did not ask to capture and cannot be conditionally skipped, explain that dependency and ask before expanding the capture.
124
-
125
- Capture the artifact(s) the user requested without asking them to invoke another workflow command. If they asked only to start a change, stop after scaffolding and show its status.
126
-
127
- ### When a change exists
128
-
129
- If the user mentions a change or you detect one is relevant:
130
-
131
- 1. **Resolve and read existing artifacts for context**
132
- - Run `openspec status --change "<name>" --json`.
133
- - Use `changeRoot`, `artifactPaths`, and `actionContext` from the status JSON.
134
- - Read existing files from `artifactPaths.<artifact>.existingOutputPaths`.
135
-
136
- 2. **Reference them naturally in conversation**
137
- - "Your design mentions using Redis, but we just realized SQLite fits better..."
138
- - "The proposal scopes this to premium users, but we're now thinking everyone..."
139
-
140
- 3. **Offer to capture when decisions are made**
141
-
142
- `<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve an existing capability's full path and follow the project's established organization for new capabilities.
143
-
144
- | Insight Type | Where to Capture |
145
- |----------------------------|-------------------------------------|
146
- | New requirement discovered | `specs/<capability-path>/spec.md` |
147
- | Requirement changed | `specs/<capability-path>/spec.md` |
148
- | Design decision made | `design.md` |
149
- | Scope changed | `proposal.md` |
150
- | New work identified | `tasks.md` |
151
- | Assumption invalidated | Relevant artifact |
152
-
153
- Example offers:
154
- - "That's a design decision. Capture it in design.md?"
155
- - "This is a new requirement. Add it to specs?"
156
- - "This changes scope. Update the proposal?"
157
-
158
- 4. **The user decides** - Offer and move on. Don't pressure. Don't auto-capture.
159
-
160
- ---
161
-
162
- ## What You Don't Have To Do
163
-
164
- - Follow a script
165
- - Ask the same questions every time
166
- - Produce a specific artifact
167
- - Reach a conclusion
168
- - Stay on topic if a tangent is valuable
169
- - Be brief (this is thinking time)
170
-
171
- ---
172
-
173
- ## Ending Discovery
174
-
175
- There's no required ending. Discovery might:
176
-
177
- - **Flow into a proposal**: "Ready to start? I can create a change proposal."
178
- - **Result in artifact updates**: "Updated design.md with these decisions"
179
- - **Just provide clarity**: User has what they need, moves on
180
- - **Continue later**: "We can pick this up anytime"
181
-
182
- When things crystallize, you might offer a summary - but it's optional. Sometimes the thinking IS the value.
183
-
184
- ---
185
-
186
- ## Guardrails
187
-
188
- - **Don't implement** - Never write code or implement features. Workflow configuration counts too: creating or editing schemas, templates, or `openspec/config.yaml` is a change, not thinking. Creating or updating OpenSpec change artifacts within the confirmed scope is fine, writing anything else is not.
189
- - **Don't fake understanding** - If something is unclear, dig deeper
190
- - **Don't rush** - Discovery is thinking time, not task time
191
- - **Don't force structure** - Let patterns emerge naturally
192
- - **Don't auto-capture** - Offer to save insights, don't just do it. Read-only commands and tools need no confirmation. Before the first write-capable action—including `openspec new change` or another command that writes files—name the artifacts or files and proposed changes, ask a direct yes/no question, and wait for explicit confirmation in a separate user message. That confirmation covers only the described scope; ask again before expanding it. Answers to design or clarifying questions are never consent to write.
193
- - **Don't manually scaffold changes** - Never create a new change directory under `openspec/changes/` by hand. Always use `openspec new change "<name>"` (with `--store <id>` when applicable) so required metadata such as `.openspec.yaml` is created before writing artifacts.
194
- - **Do visualize** - A good diagram is worth many paragraphs
195
- - **Do explore the codebase** - Ground discussions in reality
196
- - **Do question assumptions** - Including the user's and your own
@@ -1,145 +0,0 @@
1
- ---
2
- name: "OPSX: Propose"
3
- description: "Propose a new change - create it and generate all artifacts in one step"
4
- allowed-tools: Bash(openspec:*)
5
- category: "Workflow"
6
- tags: ["workflow", "artifacts", "experimental"]
7
- ---
8
-
9
- Propose a new change - create the change and generate all artifacts in one step.
10
-
11
- **Planning boundary**: This workflow creates planning artifacts only. The user request that selected or triggered this workflow authorizes planning only, even if it asks to build or fix something. Do not edit project code. After the planning artifacts are complete, stop. Do not start implementation in the same response, even if the initial request asks for it. Wait for a new user request after the artifacts are presented; then start the apply workflow.
12
-
13
- I'll create a change with the artifacts your schema defines. With the default spec-driven schema that is:
14
- - proposal.md (what & why)
15
- - `specs/<capability-path>/spec.md` (what the system must do - a delta, not the main spec)
16
- - design.md (how)
17
- - tasks.md (implementation steps)
18
-
19
- `<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve an existing capability's full path and follow the project's established organization for new capabilities.
20
-
21
- When the user is ready to implement, they must start the apply workflow explicitly.
22
-
23
- ---
24
-
25
- **Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
26
-
27
- **Input**: The argument after `/opsx:propose` is the change name (kebab-case), OR a description of what the user wants to build.
28
-
29
- **Steps**
30
-
31
- 1. **Understand the request and clarify material ambiguity**
32
-
33
- If no input is provided, ask the user (open-ended, no preset options):
34
- > "What change do you want to work on? Describe what you want to build or fix."
35
-
36
- From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
37
-
38
- **IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
39
-
40
- If the request contains ambiguity that would materially affect scope, externally observable behavior, compatibility, or acceptance criteria, ask the user before creating the change. For minor details, make a reasonable assumption and record it in the planning artifacts.
41
-
42
- 2. **Determine the workflow schema**
43
-
44
- Use the configured default schema unless the user explicitly requests a different workflow.
45
-
46
- **Use a different schema only if the user:**
47
- - Explicitly requests a specific schema by name → use `--schema <schema-name>`
48
- - Asks to "show workflows" or asks "what workflows" exist → resolve the authoritative root by running `openspec context --json` from the current working directory. If the user explicitly selected a registered store, use `openspec context --json --store "<store-id>"`. Then run `openspec schemas --json` with its working directory set to the returned `root.path` and let them choose. This preserves roots selected by a local `store:` pointer or the global `defaultStore`; when a registered store was explicitly selected, append `--store "<store-id>"` to `openspec schemas --json` as well. If context reports only `no_openspec_root`, run `openspec schemas --json` from the current working directory instead. Do not use this fallback for invalid or unavailable stores.
49
-
50
- Otherwise, omit `--schema` to preserve the configured default.
51
-
52
- 3. **Create the change directory**
53
-
54
- Choose one schema form below. If a registered store is selected, append `--store "<store-id>"` to that command and each later OpenSpec command shown below that accepts `--store`.
55
-
56
- Using the configured default:
57
- ```bash
58
- openspec new change "<name>"
59
- ```
60
-
61
- Using an explicitly requested schema:
62
- ```bash
63
- openspec new change "<name>" --schema "<schema-name>"
64
- ```
65
- This creates a scaffolded change in the planning home resolved by the CLI with `.openspec.yaml`.
66
-
67
- 4. **Get the artifact build order**
68
- ```bash
69
- openspec status --change "<name>" --json
70
- ```
71
- Parse the JSON to get:
72
- - `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
73
- - `artifacts`: list of all artifacts, each with its `status` and its `requires` edges (the artifact IDs it directly depends on)
74
- - `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
75
-
76
- 5. **Create every artifact in the required set**
77
-
78
- Use a todo list to track progress through the artifacts.
79
-
80
- Loop through artifacts in dependency order (artifacts with no pending dependencies first):
81
-
82
- a. **For each artifact that is `ready` (dependencies satisfied)**:
83
- - Get instructions:
84
- ```bash
85
- openspec instructions <artifact-id> --change "<name>" --json
86
- ```
87
- - The instructions JSON includes:
88
- - `context`: Project background (constraints for you - do NOT include in output)
89
- - `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
90
- - `template`: The structure to use for your output file
91
- - `instruction`: Schema-specific guidance for this artifact type
92
- - `skipped`/`warning`: present when the change declares skip_specs and this artifact must NOT be created - stop and pick another artifact
93
- - `resolvedOutputPath`: Resolved path or pattern to write the artifact
94
- - `dependencies`: Completed artifacts to read for context
95
- - Read any completed dependency files for context - always re-read them from disk, even if you saw them earlier in the conversation (the user may have edited them)
96
- - If the `instruction` field delegates creation to a specific skill or command, invoke it to produce the artifact instead of writing the file yourself, then verify the artifact file exists at `resolvedOutputPath`
97
- - Otherwise create the artifact file using `template` as the structure and write it to `resolvedOutputPath`. If `resolvedOutputPath` is a glob, follow `instruction` to choose the concrete file path
98
- - Apply `context` and `rules` as constraints - but do NOT copy them into the file
99
- - Show brief progress: "Created <artifact-id>"
100
-
101
- b. **Continue until every artifact in the required set exists (not just `apply.requires`)**
102
- - After creating each artifact, re-run `openspec status --change "<name>" --json`
103
- - The required set is `applyRequires` plus every artifact reachable from those by following the `requires` edges in `status --json` - walk them transitively (spec-driven closes over proposal, specs, design, tasks). Leave artifacts outside that set alone
104
- - `status` is file-existence only, so an `applyRequires` artifact reading `done` does NOT mean its dependencies exist - writing `tasks.md` early marks `tasks` done while `specs` was never written. Use each artifact's `requires` edges, not its `status`, to build the required set: a `done` artifact still lists what it depends on
105
- - An artifact already reading `status: "skipped"` is satisfied: the change declares `skip_specs` in `.openspec.yaml`, so its files must NOT exist. Never try to create one
106
- - Create every artifact in the required set that is missing, then re-check - creating one can unblock others
107
- - Skip one only when `status` already reports it `skipped`, or when its own `instruction` says it is conditional: run `openspec instructions <artifact-id> --change "<name>" --json` and skip only if its `instruction` field marks it optional (e.g. "create only if..."). Spec-driven's `design.md` qualifies; `specs` qualifies only via the `skipped` status above, never by your own judgment. Tell the user, and do not reconsider it
108
- - Dependencies are enablers, not gates: if a required artifact is still `blocked` only because you skipped a conditional dependency, write it anyway
109
- - Stop when every artifact in the required set is `done`, `skipped`, or was deliberately skipped
110
-
111
- c. **If an artifact requires user input** (unclear context):
112
- - Ask the user to clarify
113
- - Then continue with creation
114
-
115
- 6. **Show final status**
116
- ```bash
117
- openspec status --change "<name>"
118
- ```
119
-
120
- **Output**
121
-
122
- After completing all artifacts, summarize:
123
- - Change name and location
124
- - List of artifacts created with brief descriptions, plus any conditional artifact you skipped and why
125
- - What's ready: "All artifacts needed for implementation are ready."
126
- - Prompt: "The artifacts are ready for review. When you are ready, run `/opsx:apply`."
127
-
128
- **Artifact Creation Guidelines**
129
-
130
- - Follow the `instruction` field from `openspec instructions` for each artifact type - it is the authoritative guidance, even for familiar artifact names
131
- - If the `instruction` field directs you to use a specific skill or command to create the artifact, invoke it instead of writing the artifact directly
132
- - The schema defines what each artifact should contain - follow it
133
- - Read dependency artifacts for context before creating new ones
134
- - Use `template` as the structure for your output file - fill in its sections
135
- - **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
136
- - Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
137
- - These guide what you write, but should never appear in the output
138
-
139
- **Guardrails**
140
- - The request that invoked this workflow authorizes planning only. Any implementation or apply instruction in that request does not carry forward. Do NOT implement the change, start the apply workflow, or edit project code during this workflow. After presenting the artifacts, stop and wait for a new user request to start the apply workflow
141
- - Create every artifact the apply phase transitively depends on, not just the ids listed in `apply.requires`
142
- - Always read dependency artifacts before creating a new one - re-read from disk, not from conversation memory (files may have changed since you last saw them)
143
- - Ask about ambiguities that would materially change scope, externally observable behavior, compatibility, or acceptance criteria; for minor details, make reasonable assumptions and record them
144
- - If a change with that name already exists, ask if user wants to continue it or create a new one
145
- - Verify each artifact file exists after writing before proceeding to next
@@ -1,258 +0,0 @@
1
- ---
2
- name: "OPSX: Sync"
3
- description: "Sync delta specs from a change to main specs"
4
- allowed-tools: Bash(openspec:*)
5
- category: "Workflow"
6
- tags: ["workflow", "specs", "experimental"]
7
- ---
8
-
9
- Sync delta specs from a change to main specs.
10
-
11
- This is an **agent-driven** operation - you will read delta specs and directly edit main specs to apply the changes. This allows intelligent merging (e.g., adding a scenario without copying the entire requirement).
12
-
13
- **Store selection:** If the user names a store (a store is a standalone OpenSpec repo registered on this machine) or the work lives in one, run `openspec store list --json` to discover registered store ids, then pass `--store <id>` on the commands that read or write specs and changes (`new change`, `status`, `instructions`, `list`, `show`, `validate`, `archive`, `doctor`, `context`, `schemas`, `view`). Once selected, treat `--store <id>` as sticky for the rest of the workflow. Every unscoped example of those commands below is shorthand: before running it, append the flag. For example, run `openspec status --change "<name>" --json --store "<id>"`, not the unscoped form shown below. Other commands do not take the flag. Hints printed by commands already carry the flag; keep it on follow-ups. Without a store, commands act on the nearest local `openspec/` root.
14
-
15
- `<capability-path>` is the spec directory relative to `specs/` (for example, `user-auth` or `identity/user-auth`). Preserve the full path from each delta spec when resolving its main spec.
16
-
17
- **Input**: Optionally specify a change name after `/opsx:sync` (e.g., `/opsx:sync add-auth`). If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
18
-
19
- **Steps**
20
-
21
- 1. **Select the change**
22
-
23
- If a name is provided, use it. Otherwise:
24
- - Infer from conversation context if the user mentioned a change
25
- - Auto-select if only one active change exists
26
- - If ambiguous, run `openspec list --json` to get available changes and ask the user to select one
27
-
28
- When prompting, show changes that have delta specs (under `specs/` directory).
29
-
30
- Always announce: "Using change: <name>" and how to override (e.g., `/opsx:sync <other>`).
31
-
32
- 2. **Resolve change context**
33
-
34
- Run:
35
- ```bash
36
- openspec status --change "<name>" --json
37
- ```
38
-
39
- The JSON includes `planningHome.root`. Main specs live under `<planningHome.root>/openspec/specs/` — use that (store-aware) root for every main-spec path below, not a hardcoded repo path. When a store is selected it points at the store, not the current repository.
40
-
41
- 3. **Find delta specs**
42
-
43
- Use `artifactPaths.specs.existingOutputPaths` from the status JSON as the
44
- only source of delta spec paths. If the `specs` entry is missing or
45
- `existingOutputPaths` is empty, report that there are no delta specs to sync,
46
- do not infer them from other artifacts, and stop without requesting artifact
47
- instructions or writing a main spec.
48
-
49
- Sync every path in `existingOutputPaths` unless the caller narrowed the set.
50
- A caller narrows it by naming an explicit list of complete entries from
51
- `existingOutputPaths` — copy those absolute values verbatim. Archive does
52
- this inline, and a user can too (for example, by selecting the entry ending
53
- in `/specs/billing/invoices/spec.md`).
54
- Then sync only the named paths and leave the remaining delta specs untouched:
55
- bulk archive excludes a delta whose implementation it could not find, and
56
- syncing it anyway would write a main spec the caller deliberately withheld.
57
- Carry that narrowed selection through step 4; never widen it back to the full
58
- list. If a named path is not in `existingOutputPaths`, do not sync it —
59
- report it and stop, rather than dropping it silently. If the named list is
60
- empty, report that there is nothing to sync and stop without writing a main
61
- spec.
62
-
63
- Each delta spec file contains sections like:
64
- - `## ADDED Requirements` - New requirements to add
65
- - `## MODIFIED Requirements` - Changes to existing requirements
66
- - `## REMOVED Requirements` - Requirements to remove
67
- - `## RENAMED Requirements` - Requirements to rename (FROM:/TO: format)
68
-
69
- If no delta specs found, inform user and stop.
70
-
71
- 4. **For each delta spec, apply changes to main specs**
72
-
73
- Before the first main-spec write, obtain one current specs-rule snapshot:
74
- - If archive invoked this workflow inline and supplied a valid snapshot from
75
- `openspec instructions specs --change "<name>" --json`, reuse it and do not
76
- fetch the same instructions again.
77
- - Otherwise run that command once now with the same selected-root flags.
78
- - If the direct lookup exits non-zero or returns invalid artifact-instruction
79
- JSON, report the error and stop before writing any main spec. Do not treat the
80
- failure as an absent rule set.
81
- - A valid response with omitted `rules` means no artifact rules are configured
82
- and the existing semantic merge continues.
83
-
84
- Apply returned `rules` only to the content and form of the main specs produced
85
- by this merge. Artifact rules are not operation guidance and cannot change
86
- selected roots, delta paths, CLI checks, or workflow steps. Use their text as
87
- constraints without copying it verbatim into a main spec or summary.
88
-
89
- For each capability delta spec path selected in step 3 — the full `existingOutputPaths` list, or the narrowed subset when a caller supplied one (these may belong to a selected store, not the repo):
90
-
91
- a. **Read the delta spec** to understand the intended changes
92
-
93
- b. **Read the main spec** at `<planningHome.root>/openspec/specs/<capability-path>/spec.md` (may not exist yet)
94
-
95
- c. **Apply changes intelligently**:
96
-
97
- **ADDED Requirements:**
98
- - If requirement doesn't exist in main spec → add it
99
- - If requirement already exists → update it to match (treat as implicit MODIFIED)
100
-
101
- **MODIFIED Requirements:**
102
- - Find the requirement in main spec
103
- - Apply the changes - this can be:
104
- - Adding new scenarios the main spec does not have yet
105
- - Modifying existing scenarios
106
- - Changing the requirement description
107
- - Preserve scenarios/content not mentioned in the delta
108
-
109
- **REMOVED Requirements:**
110
- - Remove the entire requirement block from main spec
111
- - Retiring the capability. Delete the whole `spec.md` - and the directory once
112
- nothing else is left in it - only when ALL of these hold:
113
- 1. removing the requirements *this run* left no requirement blocks;
114
- 2. the rest of the spec is well-formed (it still has a `## Purpose`);
115
- 3. the main spec was not already empty before this sync - if you removed
116
- nothing, change nothing;
117
- 4. every other nonblank line in the whole file is accounted for as the
118
- title, Purpose, Requirements header, or a canonical requirement's
119
- statement, scenarios, or fenced examples;
120
- 5. the change's `.openspec.yaml` declares `retire_capabilities: true`;
121
- 6. the `spec.md` resolves inside the real specs root (do not follow a
122
- capability-directory symlink to delete an external file).
123
- If removing the selected requirements would leave no requirement blocks and
124
- any retirement condition is not satisfied, do not modify the main spec. Stop
125
- the sync for that capability, report the blocking condition, and tell the user
126
- how to resolve it. Never write or leave an empty `## Requirements` section.
127
- When only the marker is missing, say that too - it is the one thing the user
128
- can add to make the retirement go through.
129
- - Deleting the file also deletes its `## Purpose`; any other section blocks
130
- retirement. Name Purpose when you report the retirement. Include a pasteable
131
- `git checkout` only when the spec lived in the caller's checkout;
132
- otherwise give checkout-scoped recovery guidance.
133
-
134
- **RENAMED Requirements:**
135
- - Find the FROM requirement, rename to TO
136
-
137
- **`## Purpose` in the delta:**
138
- - The main spec already has one and it is authoritative - leave it alone
139
- (this is what `openspec archive` does; it warns and moves on)
140
-
141
- d. **Create new main spec** if capability doesn't exist yet:
142
- - Create `<planningHome.root>/openspec/specs/<capability-path>/spec.md`
143
- - Add Purpose section: copy the delta's `## Purpose` body verbatim when it has one
144
- (this is what `openspec archive` does); only write a brief TBD placeholder when it does not
145
- - Add Requirements section with the ADDED requirements
146
- - Follow the **Main Spec Format Reference** below
147
-
148
- 5. **Validate updated main specs**
149
-
150
- Run `openspec validate --specs` with the same selected-root flags used earlier.
151
- If validation fails, report the problems and do not claim the sync succeeded.
152
-
153
- 6. **Show summary**
154
-
155
- After applying all changes, summarize:
156
- - Which capabilities were updated
157
- - What changes were made (requirements added/modified/removed/renamed)
158
- - Any new main spec left with a TBD Purpose placeholder, so it gets written
159
- now rather than lingering
160
- - Any capability retired, naming the deleted `spec.md`, its Purpose, and
161
- either a pasteable `git checkout` or checkout-scoped recovery guidance
162
-
163
- **Delta Spec Format Reference**
164
-
165
- ```markdown
166
- ## Purpose
167
-
168
- Only on a delta that introduces a brand-new capability. Seeds the new main spec.
169
-
170
- ## ADDED Requirements
171
-
172
- ### Requirement: New Feature
173
- The system SHALL do something new.
174
-
175
- #### Scenario: Basic case
176
- - **WHEN** user does X
177
- - **THEN** system does Y
178
-
179
- ## MODIFIED Requirements
180
-
181
- ### Requirement: Existing Feature
182
- The system SHALL keep doing the existing thing, now also handling A.
183
-
184
- #### Scenario: Scenario the main spec already has
185
- - **WHEN** user does X
186
- - **THEN** system does Y
187
-
188
- #### Scenario: New scenario to add
189
- - **WHEN** user does A
190
- - **THEN** system does B
191
-
192
- ## REMOVED Requirements
193
-
194
- ### Requirement: Deprecated Feature
195
-
196
- ## RENAMED Requirements
197
-
198
- - FROM: `### Requirement: Old Name`
199
- - TO: `### Requirement: New Name`
200
- ```
201
-
202
- **Main Spec Format Reference**
203
-
204
- Main specs are what the delta merges INTO. They must never contain delta operation headers (`## ADDED/MODIFIED/REMOVED/RENAMED Requirements`) - after syncing, every requirement lives under a single `## Requirements` section:
205
-
206
- ```markdown
207
- # <capability> Specification
208
-
209
- ## Purpose
210
- Short description of what this capability does and why it exists.
211
-
212
- ## Requirements
213
-
214
- ### Requirement: New Feature
215
- The system SHALL do something new.
216
-
217
- #### Scenario: Basic case
218
- - **WHEN** user does X
219
- - **THEN** system does Y
220
- ```
221
-
222
- **Key Principle: Intelligent Merging**
223
-
224
- Unlike programmatic merging, you merge rather than overwrite:
225
- - A MODIFIED block carries the whole requirement - body plus every scenario that survives the change. `openspec validate` and `openspec archive` both reject one that drops a scenario the main spec still has.
226
- - Keep anything the delta does not mention, in the main spec's existing order
227
- - Use your judgment to merge changes sensibly
228
-
229
- **Output On Success**
230
-
231
- ```markdown
232
- ## Specs Synced: <change-name>
233
-
234
- Updated main specs:
235
-
236
- **<capability-1>**:
237
- - Added requirement: "New Feature"
238
- - Modified requirement: "Existing Feature" (added 1 scenario)
239
-
240
- **<capability-2>**:
241
- - Created new spec file
242
- - Added requirement: "Another Feature"
243
-
244
- Main specs are now updated. The change remains active - archive when implementation is complete.
245
- ```
246
-
247
- **Guardrails**
248
- - Read both delta and main specs before making changes
249
- - Preserve existing content not mentioned in delta
250
- - Never copy a delta file into a main spec as-is - merge its content so the main spec keeps the Main Spec Format Reference structure, with no delta operation headers
251
- - If something is unclear, ask for clarification
252
- - Show what you're changing as you go
253
- - The operation should be idempotent - running twice should give same result
254
- - Use only `artifactPaths.specs.existingOutputPaths`; never infer delta specs from unrelated artifacts
255
- - Honor a caller-supplied subset of `existingOutputPaths`; never widen it back to the full list
256
- - Fetch specs instructions once for direct sync, or reuse the archive-supplied snapshot inline
257
- - Stop before every main-spec write on a non-zero or invalid JSON specs-instruction response
258
- - Artifact rules constrain only the specs being written and are never copied into output files