@stackonward/cli 0.0.1 → 1.0.1

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 (638) hide show
  1. package/dist/index.js +4588 -205
  2. package/dist/index.js.map +1 -1
  3. package/dist/resources/apple/.claude/docs/architecture-template.md +54 -0
  4. package/dist/resources/apple/.claude/docs/architecture.md +52 -0
  5. package/dist/resources/apple/.claude/docs/index.md +13 -0
  6. package/dist/resources/apple/.claude/docs/security-lifecycle.md +57 -0
  7. package/dist/resources/apple/.claude/docs/stack.md +93 -0
  8. package/dist/resources/apple/.claude/docs/verification.md +63 -0
  9. package/dist/resources/apple/AGENTS.md +397 -0
  10. package/dist/resources/apple/CLAUDE.md +397 -0
  11. package/dist/resources/apple/Gemfile +2 -0
  12. package/dist/resources/apple/Gemfile.lock +365 -0
  13. package/dist/resources/apple/_gitignore +14 -0
  14. package/dist/resources/apple/fastlane/Fastfile +123 -0
  15. package/dist/resources/components/nuxt/site-source/app/app.vue +42 -0
  16. package/dist/resources/components/nuxt/site-source/app/assets/css/site-shell.css +1035 -0
  17. package/dist/resources/components/nuxt/site-source/app/assets/icons/brand/.gitkeep +0 -0
  18. package/dist/resources/components/nuxt/site-source/app/assets/icons/common/.gitkeep +0 -0
  19. package/dist/resources/components/nuxt/site-source/app/components/site/ApplicationHeader.vue +35 -0
  20. package/dist/resources/components/nuxt/site-source/app/components/site/ApplicationShell.vue +56 -0
  21. package/dist/resources/components/nuxt/site-source/app/components/site/ApplicationSidebar.vue +40 -0
  22. package/dist/resources/components/nuxt/site-source/app/components/site/BackToTop.vue +42 -0
  23. package/dist/resources/components/nuxt/site-source/app/components/site/ContentArticlePage.vue +40 -0
  24. package/dist/resources/components/nuxt/site-source/app/components/site/ContentListPage.vue +30 -0
  25. package/dist/resources/components/nuxt/site-source/app/components/site/CookieConsent.vue +18 -0
  26. package/dist/resources/components/nuxt/site-source/app/components/site/MarketingFooter.vue +52 -0
  27. package/dist/resources/components/nuxt/site-source/app/components/site/MarketingHeader.vue +106 -0
  28. package/dist/resources/components/nuxt/site-source/app/components/site/MarketingShell.vue +35 -0
  29. package/dist/resources/components/nuxt/site-source/app/components/site/SiteBrand.vue +10 -0
  30. package/dist/resources/components/nuxt/site-source/app/components/site/StaticPage.vue +21 -0
  31. package/dist/resources/components/nuxt/site-source/app/components/site/ToastViewport.vue +25 -0
  32. package/dist/resources/components/nuxt/site-source/app/components/ui/BaseButton.vue +86 -0
  33. package/dist/resources/components/nuxt/site-source/app/components/ui/BaseGradientBorder.vue +59 -0
  34. package/dist/resources/components/nuxt/site-source/app/components/ui/BaseModal.vue +131 -0
  35. package/dist/resources/components/nuxt/site-source/app/components/ui/BasePopover.vue +150 -0
  36. package/dist/resources/components/nuxt/site-source/app/components/ui/BaseText.vue +138 -0
  37. package/dist/resources/components/nuxt/site-source/app/components/ui/CheckoutStatus.vue +112 -0
  38. package/dist/resources/components/nuxt/site-source/app/components/ui/CheckoutSummary.vue +172 -0
  39. package/dist/resources/components/nuxt/site-source/app/components/ui/GoogleSignInButton.vue +113 -0
  40. package/dist/resources/components/nuxt/site-source/app/components/ui/InfiniteScroll.vue +123 -0
  41. package/dist/resources/components/nuxt/site-source/app/components/ui/YoutubeEmbed.vue +126 -0
  42. package/dist/resources/components/nuxt/site-source/app/composables/useAnalytics.ts +24 -0
  43. package/dist/resources/components/nuxt/site-source/app/composables/useCheckout.ts +121 -0
  44. package/dist/resources/components/nuxt/site-source/app/composables/useConsent.ts +31 -0
  45. package/dist/resources/components/nuxt/site-source/app/composables/useGoogleIdentity.ts +163 -0
  46. package/dist/resources/components/nuxt/site-source/app/composables/useNavigation.ts +11 -0
  47. package/dist/resources/components/nuxt/site-source/app/composables/useSeo.ts +33 -0
  48. package/dist/resources/components/nuxt/site-source/app/composables/useSiteShell.ts +58 -0
  49. package/dist/resources/components/nuxt/site-source/app/composables/useToasts.ts +48 -0
  50. package/dist/resources/components/nuxt/site-source/app/layouts/app.vue +5 -0
  51. package/dist/resources/components/nuxt/site-source/app/layouts/default.vue +5 -0
  52. package/dist/resources/components/nuxt/site-source/app/plugins/analytics.client.ts +121 -0
  53. package/dist/resources/components/nuxt/site-source/app/plugins/google-identity.client.ts +24 -0
  54. package/dist/resources/components/nuxt/site-source/app/theme/accordion.ts +9 -0
  55. package/dist/resources/components/nuxt/site-source/app/theme/breadcrumb.ts +8 -0
  56. package/dist/resources/components/nuxt/site-source/app/theme/button.ts +92 -0
  57. package/dist/resources/components/nuxt/site-source/app/theme/carousel.ts +11 -0
  58. package/dist/resources/components/nuxt/site-source/app/theme/checkbox.ts +12 -0
  59. package/dist/resources/components/nuxt/site-source/app/theme/index.ts +30 -0
  60. package/dist/resources/components/nuxt/site-source/app/theme/input.ts +47 -0
  61. package/dist/resources/components/nuxt/site-source/app/theme/modal.ts +9 -0
  62. package/dist/resources/components/nuxt/site-source/app/theme/pagination.ts +6 -0
  63. package/dist/resources/components/nuxt/site-source/app/theme/select.ts +23 -0
  64. package/dist/resources/components/nuxt/site-source/app/theme/stepper.ts +10 -0
  65. package/dist/resources/components/nuxt/site-source/app/theme/toast.ts +8 -0
  66. package/dist/resources/components/nuxt/site-source/app/theme/tooltip.ts +6 -0
  67. package/dist/resources/components/nuxt/site-source/app/types/site-shell.ts +85 -0
  68. package/dist/resources/components/react/ui/Button.tsx +73 -0
  69. package/dist/resources/components/react/ui/Input.tsx +44 -0
  70. package/dist/resources/components/registry.json +355 -0
  71. package/dist/resources/components/vue/feedback/Toast.vue +120 -0
  72. package/dist/resources/components/vue/feedback/useToast.ts +70 -0
  73. package/dist/resources/components/vue/media/FileUpload.vue +229 -0
  74. package/dist/resources/components/vue/media/VideoPlayer.vue +157 -0
  75. package/dist/resources/components/vue/ui/AppImage.vue +147 -0
  76. package/dist/resources/components/vue/ui/BottomSheet.vue +217 -0
  77. package/dist/resources/components/vue/ui/Button.vue +154 -0
  78. package/dist/resources/components/vue/ui/Card.vue +111 -0
  79. package/dist/resources/components/vue/ui/Input.vue +113 -0
  80. package/dist/resources/components/vue/ui/Modal.vue +193 -0
  81. package/dist/resources/components/vue/ui/ScrollArea.vue +163 -0
  82. package/dist/resources/components/vue/ui/Tooltip.vue +115 -0
  83. package/dist/resources/registry.json +158 -0
  84. package/dist/resources/snippets/node/cache.ts +116 -0
  85. package/dist/resources/snippets/node/date.ts +126 -0
  86. package/dist/resources/snippets/node/logger.ts +104 -0
  87. package/dist/resources/snippets/node/validation.ts +132 -0
  88. package/dist/resources/snippets/react/useDebounce.ts +90 -0
  89. package/dist/resources/snippets/registry.json +65 -0
  90. package/dist/resources/snippets/vue/useAsync.ts +96 -0
  91. package/dist/resources/snippets/vue/usePagination.ts +102 -0
  92. package/dist/resources/templates/base/.claude/docs/architecture-template.md +459 -0
  93. package/dist/resources/templates/base/.claude/docs/architecture.md +137 -0
  94. package/dist/resources/templates/base/.claude/docs/index.md +42 -0
  95. package/dist/resources/templates/base/.claude/docs/security-lifecycle.md +129 -0
  96. package/dist/resources/templates/base/.claude/docs/verification.md +121 -0
  97. package/dist/resources/templates/base/AGENTS.md +415 -0
  98. package/dist/resources/templates/base/CLAUDE.md +415 -0
  99. package/dist/resources/templates/go-backend/.claude/docs/api-design.md +486 -0
  100. package/dist/resources/templates/go-backend/.claude/docs/architecture-template.md +449 -0
  101. package/dist/resources/templates/go-backend/.claude/docs/check-list.md +155 -0
  102. package/dist/resources/templates/go-backend/.claude/docs/database.md +369 -0
  103. package/dist/resources/templates/go-backend/.claude/docs/e2e-standards.md +161 -0
  104. package/dist/resources/templates/go-backend/.claude/docs/error-handling.md +558 -0
  105. package/dist/resources/templates/go-backend/.claude/docs/event-runtime-boundary.md +124 -0
  106. package/dist/resources/templates/go-backend/.claude/docs/identifier-contract.md +195 -0
  107. package/dist/resources/templates/go-backend/.claude/docs/index.md +22 -0
  108. package/dist/resources/templates/go-backend/.claude/docs/logging.md +314 -0
  109. package/dist/resources/templates/go-backend/.claude/docs/mediagen-provider-onboarding-sop.md +917 -0
  110. package/dist/resources/templates/go-backend/.claude/docs/mediagen-provider-quick-reference.md +195 -0
  111. package/dist/resources/templates/go-backend/.claude/docs/module-standards.md +309 -0
  112. package/dist/resources/templates/go-backend/.claude/docs/openapi-contract.md +141 -0
  113. package/dist/resources/templates/go-backend/.claude/docs/payment-gateway-onboarding.md +283 -0
  114. package/dist/resources/templates/go-backend/.claude/docs/platform-boundary.md +191 -0
  115. package/dist/resources/templates/go-backend/.claude/docs/quality-gates.md +112 -0
  116. package/dist/resources/templates/go-backend/.dockerignore +6 -0
  117. package/dist/resources/templates/go-backend/.env.example +13 -0
  118. package/dist/resources/templates/go-backend/.gitattributes +2 -0
  119. package/dist/resources/templates/go-backend/AGENTS.md +1139 -0
  120. package/dist/resources/templates/go-backend/CLAUDE.md +1139 -0
  121. package/dist/resources/templates/go-backend/Dockerfile +14 -0
  122. package/dist/resources/templates/go-backend/Makefile +71 -0
  123. package/dist/resources/templates/go-backend/README.md +66 -0
  124. package/dist/resources/templates/go-backend/_gitignore +10 -0
  125. package/dist/resources/templates/go-backend/api/openapi/README.md +29 -0
  126. package/dist/resources/templates/go-backend/api/openapi/dist/artifact-manifest.json +19 -0
  127. package/dist/resources/templates/go-backend/api/openapi/dist/conformance-matrix.json +276 -0
  128. package/dist/resources/templates/go-backend/api/openapi/document.go +30 -0
  129. package/dist/resources/templates/go-backend/api/openapi/package.json +28 -0
  130. package/dist/resources/templates/go-backend/api/openapi/pnpm-lock.yaml +3052 -0
  131. package/dist/resources/templates/go-backend/api/openapi/redocly-source.yaml +18 -0
  132. package/dist/resources/templates/go-backend/api/openapi/redocly.yaml +8 -0
  133. package/dist/resources/templates/go-backend/api/openapi/sdk-generators.json +16 -0
  134. package/dist/resources/templates/go-backend/api/openapi/service-registry.json +39 -0
  135. package/dist/resources/templates/go-backend/api/openapi/services/product-api/conformance/runtime.arazzo.yaml +65 -0
  136. package/dist/resources/templates/go-backend/api/openapi/services/product-api/dist/internal.openapi.json +327 -0
  137. package/dist/resources/templates/go-backend/api/openapi/services/product-api/dist/runtime-contract.json +56 -0
  138. package/dist/resources/templates/go-backend/api/openapi/services/product-api/openapi.yaml +222 -0
  139. package/dist/resources/templates/go-backend/api/openapi/services/worker/conformance/runtime.arazzo.yaml +65 -0
  140. package/dist/resources/templates/go-backend/api/openapi/services/worker/dist/internal.openapi.json +327 -0
  141. package/dist/resources/templates/go-backend/api/openapi/services/worker/dist/runtime-contract.json +56 -0
  142. package/dist/resources/templates/go-backend/api/openapi/services/worker/openapi.yaml +222 -0
  143. package/dist/resources/templates/go-backend/api/openapi/tooling/breaking.mjs +416 -0
  144. package/dist/resources/templates/go-backend/api/openapi/tooling/build.mjs +103 -0
  145. package/dist/resources/templates/go-backend/api/openapi/tooling/conformance_coverage.mjs +111 -0
  146. package/dist/resources/templates/go-backend/api/openapi/tooling/contract_compiler.mjs +62 -0
  147. package/dist/resources/templates/go-backend/api/openapi/tooling/contract_policy.mjs +208 -0
  148. package/dist/resources/templates/go-backend/api/openapi/tooling/delegated_contract.mjs +302 -0
  149. package/dist/resources/templates/go-backend/api/openapi/tooling/deterministic_archive.mjs +69 -0
  150. package/dist/resources/templates/go-backend/api/openapi/tooling/documentation_example_privacy.mjs +93 -0
  151. package/dist/resources/templates/go-backend/api/openapi/tooling/documentation_projection.mjs +498 -0
  152. package/dist/resources/templates/go-backend/api/openapi/tooling/documentation_quality.mjs +346 -0
  153. package/dist/resources/templates/go-backend/api/openapi/tooling/git_artifact_history.mjs +188 -0
  154. package/dist/resources/templates/go-backend/api/openapi/tooling/manifest.mjs +170 -0
  155. package/dist/resources/templates/go-backend/api/openapi/tooling/overlay.mjs +98 -0
  156. package/dist/resources/templates/go-backend/api/openapi/tooling/project.mjs +549 -0
  157. package/dist/resources/templates/go-backend/api/openapi/tooling/route_contract.mjs +156 -0
  158. package/dist/resources/templates/go-backend/api/openapi/tooling/runtime_conformance.mjs +193 -0
  159. package/dist/resources/templates/go-backend/api/openapi/tooling/scalar_asset_localization.mjs +164 -0
  160. package/dist/resources/templates/go-backend/api/openapi/tooling/sdk_generator.mjs +229 -0
  161. package/dist/resources/templates/go-backend/api/openapi/tooling/semantic_version.mjs +64 -0
  162. package/dist/resources/templates/go-backend/api/openapi/tooling/service_contract_inputs.mjs +16 -0
  163. package/dist/resources/templates/go-backend/api/openapi/tooling/test/breaking.test.mjs +365 -0
  164. package/dist/resources/templates/go-backend/api/openapi/tooling/test/build.test.mjs +42 -0
  165. package/dist/resources/templates/go-backend/api/openapi/tooling/test/conformance_coverage.test.mjs +88 -0
  166. package/dist/resources/templates/go-backend/api/openapi/tooling/test/contract_policy.test.mjs +257 -0
  167. package/dist/resources/templates/go-backend/api/openapi/tooling/test/delegated_contract.test.mjs +205 -0
  168. package/dist/resources/templates/go-backend/api/openapi/tooling/test/documentation_example_privacy.test.mjs +51 -0
  169. package/dist/resources/templates/go-backend/api/openapi/tooling/test/documentation_projection.test.mjs +368 -0
  170. package/dist/resources/templates/go-backend/api/openapi/tooling/test/documentation_quality.test.mjs +151 -0
  171. package/dist/resources/templates/go-backend/api/openapi/tooling/test/git_artifact_history.test.mjs +60 -0
  172. package/dist/resources/templates/go-backend/api/openapi/tooling/test/head_policy.test.mjs +8 -0
  173. package/dist/resources/templates/go-backend/api/openapi/tooling/test/overlay.test.mjs +44 -0
  174. package/dist/resources/templates/go-backend/api/openapi/tooling/test/projection.test.mjs +270 -0
  175. package/dist/resources/templates/go-backend/api/openapi/tooling/test/redocly_documentation_rules.test.mjs +146 -0
  176. package/dist/resources/templates/go-backend/api/openapi/tooling/test/release_manifest.test.mjs +76 -0
  177. package/dist/resources/templates/go-backend/api/openapi/tooling/test/route_contract.test.mjs +119 -0
  178. package/dist/resources/templates/go-backend/api/openapi/tooling/test/runtime_conformance.test.mjs +75 -0
  179. package/dist/resources/templates/go-backend/api/openapi/tooling/test/scalar_asset_localization.test.mjs +50 -0
  180. package/dist/resources/templates/go-backend/api/openapi/tooling/test/sdk_generator.test.mjs +31 -0
  181. package/dist/resources/templates/go-backend/api/openapi/tooling/test/semantic_version.test.mjs +60 -0
  182. package/dist/resources/templates/go-backend/api/openapi/tooling/test/service_contract_inputs.test.mjs +27 -0
  183. package/dist/resources/templates/go-backend/cmd/internal/runtime/resources.go +125 -0
  184. package/dist/resources/templates/go-backend/cmd/internal/runtime/runtime.go +102 -0
  185. package/dist/resources/templates/go-backend/cmd/internal/runtime/runtime_test.go +70 -0
  186. package/dist/resources/templates/go-backend/cmd/product-api/lifecycle_test.go +58 -0
  187. package/dist/resources/templates/go-backend/cmd/product-api/main.go +32 -0
  188. package/dist/resources/templates/go-backend/cmd/product-api/wire.go +13 -0
  189. package/dist/resources/templates/go-backend/cmd/product-api/wire_gen.go +94 -0
  190. package/dist/resources/templates/go-backend/cmd/worker/main.go +47 -0
  191. package/dist/resources/templates/go-backend/cmd/worker/wire.go +14 -0
  192. package/dist/resources/templates/go-backend/cmd/worker/wire_gen.go +111 -0
  193. package/dist/resources/templates/go-backend/configs/config.yaml +37 -0
  194. package/dist/resources/templates/go-backend/deployments/compose.yaml +71 -0
  195. package/dist/resources/templates/go-backend/docs/openapi-provenance.json +489 -0
  196. package/dist/resources/templates/go-backend/docs/runtime-provenance.json +175 -0
  197. package/dist/resources/templates/go-backend/docs/source-provenance.json +3568 -0
  198. package/dist/resources/templates/go-backend/docs/standards-provenance.json +1624 -0
  199. package/dist/resources/templates/go-backend/go.mod +256 -0
  200. package/dist/resources/templates/go-backend/go.sum +805 -0
  201. package/dist/resources/templates/go-backend/internal/common/canonicaljson/canonical.go +370 -0
  202. package/dist/resources/templates/go-backend/internal/common/canonicaljson/canonical_test.go +223 -0
  203. package/dist/resources/templates/go-backend/internal/common/checkoutbff/contracts.go +125 -0
  204. package/dist/resources/templates/go-backend/internal/common/checkoutbff/platform_client.go +212 -0
  205. package/dist/resources/templates/go-backend/internal/common/checkoutbff/platform_client_test.go +319 -0
  206. package/dist/resources/templates/go-backend/internal/common/contentaccess/contentaccess.go +50 -0
  207. package/dist/resources/templates/go-backend/internal/common/contracts/contact.go +85 -0
  208. package/dist/resources/templates/go-backend/internal/common/ctxutil/identity.go +20 -0
  209. package/dist/resources/templates/go-backend/internal/common/ctxutil/product.go +53 -0
  210. package/dist/resources/templates/go-backend/internal/common/enumdomain/payment.go +12 -0
  211. package/dist/resources/templates/go-backend/internal/common/enums/dto_admin.go +9 -0
  212. package/dist/resources/templates/go-backend/internal/common/enums/enum.go +1247 -0
  213. package/dist/resources/templates/go-backend/internal/common/enums/handler_admin.go +66 -0
  214. package/dist/resources/templates/go-backend/internal/common/enums/module.go +46 -0
  215. package/dist/resources/templates/go-backend/internal/common/enums/provider.go +10 -0
  216. package/dist/resources/templates/go-backend/internal/common/enums/register.go +11 -0
  217. package/dist/resources/templates/go-backend/internal/common/enums/register_audit.go +274 -0
  218. package/dist/resources/templates/go-backend/internal/common/enums/register_command_replay.go +12 -0
  219. package/dist/resources/templates/go-backend/internal/common/enums/register_config.go +27 -0
  220. package/dist/resources/templates/go-backend/internal/common/enums/register_locale.go +37 -0
  221. package/dist/resources/templates/go-backend/internal/common/enums/register_ops.go +14 -0
  222. package/dist/resources/templates/go-backend/internal/common/enums/register_outbox.go +15 -0
  223. package/dist/resources/templates/go-backend/internal/common/enums/register_rule_expression.go +63 -0
  224. package/dist/resources/templates/go-backend/internal/common/enums/registry.go +77 -0
  225. package/dist/resources/templates/go-backend/internal/common/httporigin/origin.go +62 -0
  226. package/dist/resources/templates/go-backend/internal/common/httporigin/origin_test.go +38 -0
  227. package/dist/resources/templates/go-backend/internal/common/iamcredential/plaintext.go +35 -0
  228. package/dist/resources/templates/go-backend/internal/common/iamcredential/plaintext_test.go +29 -0
  229. package/dist/resources/templates/go-backend/internal/common/iamscope/scope.go +212 -0
  230. package/dist/resources/templates/go-backend/internal/common/iamscope/scope_binding.go +26 -0
  231. package/dist/resources/templates/go-backend/internal/common/iamscope/scope_filter.go +173 -0
  232. package/dist/resources/templates/go-backend/internal/common/iamscope/scope_filter_test.go +279 -0
  233. package/dist/resources/templates/go-backend/internal/common/internalapi/authorization_details.go +10 -0
  234. package/dist/resources/templates/go-backend/internal/common/internalapi/route_permission_policies.go +660 -0
  235. package/dist/resources/templates/go-backend/internal/common/internalapi/route_permission_policies_test.go +331 -0
  236. package/dist/resources/templates/go-backend/internal/common/internalservice/audience_token_source.go +166 -0
  237. package/dist/resources/templates/go-backend/internal/common/internalservice/bootstrap_token_exchanger.go +183 -0
  238. package/dist/resources/templates/go-backend/internal/common/internalservice/bound_service_token_signer.go +52 -0
  239. package/dist/resources/templates/go-backend/internal/common/internalservice/delegated_access_token_exchanger.go +189 -0
  240. package/dist/resources/templates/go-backend/internal/common/internalservice/delegated_access_token_exchanger_test.go +159 -0
  241. package/dist/resources/templates/go-backend/internal/common/internalservice/product_scoped_service_token_signer.go +92 -0
  242. package/dist/resources/templates/go-backend/internal/common/internalservice/provider.go +25 -0
  243. package/dist/resources/templates/go-backend/internal/common/internalservice/request_signer.go +86 -0
  244. package/dist/resources/templates/go-backend/internal/common/internalservice/resolver.go +69 -0
  245. package/dist/resources/templates/go-backend/internal/common/internalservice/resolver_test.go +42 -0
  246. package/dist/resources/templates/go-backend/internal/common/internalservice/route_scope.go +95 -0
  247. package/dist/resources/templates/go-backend/internal/common/internalservice/route_scope_test.go +78 -0
  248. package/dist/resources/templates/go-backend/internal/common/internalservice/service_identity_test.go +387 -0
  249. package/dist/resources/templates/go-backend/internal/common/jsonschema/compiler.go +100 -0
  250. package/dist/resources/templates/go-backend/internal/common/jsonschema/compiler_test.go +41 -0
  251. package/dist/resources/templates/go-backend/internal/common/jwksapi/handler.go +83 -0
  252. package/dist/resources/templates/go-backend/internal/common/jwksapi/handler_test.go +104 -0
  253. package/dist/resources/templates/go-backend/internal/common/locale/locale.go +145 -0
  254. package/dist/resources/templates/go-backend/internal/common/locale/locale_test.go +75 -0
  255. package/dist/resources/templates/go-backend/internal/common/mediaref/mediaref.go +54 -0
  256. package/dist/resources/templates/go-backend/internal/common/mediaref/mediaref_test.go +77 -0
  257. package/dist/resources/templates/go-backend/internal/common/middleware/apikey_auth.go +320 -0
  258. package/dist/resources/templates/go-backend/internal/common/middleware/apikey_throttle.go +158 -0
  259. package/dist/resources/templates/go-backend/internal/common/middleware/auth.go +40 -0
  260. package/dist/resources/templates/go-backend/internal/common/middleware/auth_test.go +50 -0
  261. package/dist/resources/templates/go-backend/internal/common/middleware/client_context.go +86 -0
  262. package/dist/resources/templates/go-backend/internal/common/middleware/cors.go +68 -0
  263. package/dist/resources/templates/go-backend/internal/common/middleware/event_context.go +18 -0
  264. package/dist/resources/templates/go-backend/internal/common/middleware/gateway_identity.go +279 -0
  265. package/dist/resources/templates/go-backend/internal/common/middleware/helpers.go +159 -0
  266. package/dist/resources/templates/go-backend/internal/common/middleware/iam_delegated_route_permission.go +171 -0
  267. package/dist/resources/templates/go-backend/internal/common/middleware/iam_delegated_token_auth.go +151 -0
  268. package/dist/resources/templates/go-backend/internal/common/middleware/iam_delegated_token_auth_test.go +99 -0
  269. package/dist/resources/templates/go-backend/internal/common/middleware/iam_service_identity.go +138 -0
  270. package/dist/resources/templates/go-backend/internal/common/middleware/iam_service_token_auth.go +74 -0
  271. package/dist/resources/templates/go-backend/internal/common/middleware/idempotent.go +273 -0
  272. package/dist/resources/templates/go-backend/internal/common/middleware/idempotent_test.go +83 -0
  273. package/dist/resources/templates/go-backend/internal/common/middleware/internal_route_permission.go +45 -0
  274. package/dist/resources/templates/go-backend/internal/common/middleware/internal_route_permission_test.go +186 -0
  275. package/dist/resources/templates/go-backend/internal/common/middleware/logging.go +191 -0
  276. package/dist/resources/templates/go-backend/internal/common/middleware/metrics.go +45 -0
  277. package/dist/resources/templates/go-backend/internal/common/middleware/middleware_test.go +1516 -0
  278. package/dist/resources/templates/go-backend/internal/common/middleware/principal_context.go +160 -0
  279. package/dist/resources/templates/go-backend/internal/common/middleware/principal_context_test.go +355 -0
  280. package/dist/resources/templates/go-backend/internal/common/middleware/product_context.go +100 -0
  281. package/dist/resources/templates/go-backend/internal/common/middleware/recovery.go +40 -0
  282. package/dist/resources/templates/go-backend/internal/common/middleware/referral_attribution.go +178 -0
  283. package/dist/resources/templates/go-backend/internal/common/middleware/requestid.go +48 -0
  284. package/dist/resources/templates/go-backend/internal/common/middleware/resource_permission.go +790 -0
  285. package/dist/resources/templates/go-backend/internal/common/middleware/resource_permission_test.go +440 -0
  286. package/dist/resources/templates/go-backend/internal/common/middleware/service_credential_auth.go +67 -0
  287. package/dist/resources/templates/go-backend/internal/common/middleware/tenant.go +148 -0
  288. package/dist/resources/templates/go-backend/internal/common/middleware/throttle.go +310 -0
  289. package/dist/resources/templates/go-backend/internal/common/middleware/trusted_client_ip.go +23 -0
  290. package/dist/resources/templates/go-backend/internal/common/middleware/trusted_client_ip_test.go +60 -0
  291. package/dist/resources/templates/go-backend/internal/common/money/currency.go +25 -0
  292. package/dist/resources/templates/go-backend/internal/common/money/errors.go +23 -0
  293. package/dist/resources/templates/go-backend/internal/common/money/format.go +123 -0
  294. package/dist/resources/templates/go-backend/internal/common/money/format_test.go +204 -0
  295. package/dist/resources/templates/go-backend/internal/common/money/gateway.go +144 -0
  296. package/dist/resources/templates/go-backend/internal/common/money/gateway_test.go +165 -0
  297. package/dist/resources/templates/go-backend/internal/common/money/rounding.go +56 -0
  298. package/dist/resources/templates/go-backend/internal/common/money/rounding_test.go +51 -0
  299. package/dist/resources/templates/go-backend/internal/common/principal/context.go +56 -0
  300. package/dist/resources/templates/go-backend/internal/common/principal/principal.go +49 -0
  301. package/dist/resources/templates/go-backend/internal/common/productcode/code.go +24 -0
  302. package/dist/resources/templates/go-backend/internal/common/productcode/code_test.go +35 -0
  303. package/dist/resources/templates/go-backend/internal/common/providerconfig/schema.go +577 -0
  304. package/dist/resources/templates/go-backend/internal/common/providerconfig/schema_test.go +47 -0
  305. package/dist/resources/templates/go-backend/internal/common/requestprivacy/request.go +246 -0
  306. package/dist/resources/templates/go-backend/internal/common/requestprivacy/request_test.go +170 -0
  307. package/dist/resources/templates/go-backend/internal/common/response/pagination.go +60 -0
  308. package/dist/resources/templates/go-backend/internal/common/response/response.go +110 -0
  309. package/dist/resources/templates/go-backend/internal/common/response/response_test.go +463 -0
  310. package/dist/resources/templates/go-backend/internal/common/ruleexpression/ast.go +141 -0
  311. package/dist/resources/templates/go-backend/internal/common/ruleexpression/ast_test.go +81 -0
  312. package/dist/resources/templates/go-backend/internal/common/ruleexpression/canonical.go +184 -0
  313. package/dist/resources/templates/go-backend/internal/common/ruleexpression/canonical_test.go +319 -0
  314. package/dist/resources/templates/go-backend/internal/common/ruleexpression/decoder.go +555 -0
  315. package/dist/resources/templates/go-backend/internal/common/ruleexpression/decoder_test.go +260 -0
  316. package/dist/resources/templates/go-backend/internal/common/ruleexpression/errors.go +55 -0
  317. package/dist/resources/templates/go-backend/internal/common/ruleexpression/evaluator.go +96 -0
  318. package/dist/resources/templates/go-backend/internal/common/ruleexpression/evaluator_test.go +220 -0
  319. package/dist/resources/templates/go-backend/internal/common/ruleexpression/fuzz_test.go +116 -0
  320. package/dist/resources/templates/go-backend/internal/common/ruleexpression/limits.go +331 -0
  321. package/dist/resources/templates/go-backend/internal/common/ruleexpression/schema.go +412 -0
  322. package/dist/resources/templates/go-backend/internal/common/ruleexpression/schema_test.go +164 -0
  323. package/dist/resources/templates/go-backend/internal/common/runtimeinput/runtime_input.go +627 -0
  324. package/dist/resources/templates/go-backend/internal/common/runtimeinput/runtime_input_test.go +245 -0
  325. package/dist/resources/templates/go-backend/internal/common/semver/errors.go +6 -0
  326. package/dist/resources/templates/go-backend/internal/common/semver/semver.go +125 -0
  327. package/dist/resources/templates/go-backend/internal/common/semver/semver_test.go +205 -0
  328. package/dist/resources/templates/go-backend/internal/common/serviceidentity/audience.go +48 -0
  329. package/dist/resources/templates/go-backend/internal/common/serviceidentity/audience_test.go +35 -0
  330. package/dist/resources/templates/go-backend/internal/common/serviceidentity/resource_identifier.go +33 -0
  331. package/dist/resources/templates/go-backend/internal/common/serviceidentity/resource_identifier_test.go +32 -0
  332. package/dist/resources/templates/go-backend/internal/common/tradeno/generator.go +99 -0
  333. package/dist/resources/templates/go-backend/internal/common/tradeno/generator_test.go +396 -0
  334. package/dist/resources/templates/go-backend/internal/common/tradeno/prefix.go +247 -0
  335. package/dist/resources/templates/go-backend/internal/common/types/asset_url.go +11 -0
  336. package/dist/resources/templates/go-backend/internal/common/types/billing.go +89 -0
  337. package/dist/resources/templates/go-backend/internal/common/types/billing_test.go +77 -0
  338. package/dist/resources/templates/go-backend/internal/common/types/country.go +74 -0
  339. package/dist/resources/templates/go-backend/internal/common/types/country_test.go +28 -0
  340. package/dist/resources/templates/go-backend/internal/common/types/currency.go +60 -0
  341. package/dist/resources/templates/go-backend/internal/common/types/identifiers.go +41 -0
  342. package/dist/resources/templates/go-backend/internal/common/types/operator.go +28 -0
  343. package/dist/resources/templates/go-backend/internal/common/types/subscription_entitlement.go +24 -0
  344. package/dist/resources/templates/go-backend/internal/common/types/subscription_entitlement_test.go +35 -0
  345. package/dist/resources/templates/go-backend/internal/common/types/tier.go +72 -0
  346. package/dist/resources/templates/go-backend/internal/common/types/types.go +411 -0
  347. package/dist/resources/templates/go-backend/internal/common/types/types_test.go +295 -0
  348. package/dist/resources/templates/go-backend/internal/common/utils/constants.go +100 -0
  349. package/dist/resources/templates/go-backend/internal/common/utils/crypto.go +158 -0
  350. package/dist/resources/templates/go-backend/internal/common/utils/crypto_test.go +345 -0
  351. package/dist/resources/templates/go-backend/internal/common/utils/duration.go +25 -0
  352. package/dist/resources/templates/go-backend/internal/common/utils/helpers.go +18 -0
  353. package/dist/resources/templates/go-backend/internal/common/utils/json.go +62 -0
  354. package/dist/resources/templates/go-backend/internal/common/utils/json_test.go +76 -0
  355. package/dist/resources/templates/go-backend/internal/common/utils/pagination.go +51 -0
  356. package/dist/resources/templates/go-backend/internal/common/utils/pagination_test.go +45 -0
  357. package/dist/resources/templates/go-backend/internal/common/utils/pointer.go +107 -0
  358. package/dist/resources/templates/go-backend/internal/common/utils/pointer_test.go +15 -0
  359. package/dist/resources/templates/go-backend/internal/common/utils/slice.go +24 -0
  360. package/dist/resources/templates/go-backend/internal/common/utils/snowflake.go +110 -0
  361. package/dist/resources/templates/go-backend/internal/common/utils/snowflake_test.go +316 -0
  362. package/dist/resources/templates/go-backend/internal/common/utils/string.go +16 -0
  363. package/dist/resources/templates/go-backend/internal/common/utils/timefmt.go +42 -0
  364. package/dist/resources/templates/go-backend/internal/common/validator/validator.go +136 -0
  365. package/dist/resources/templates/go-backend/internal/common/validator/validator_test.go +240 -0
  366. package/dist/resources/templates/go-backend/internal/common/youtubeapi/client.go +224 -0
  367. package/dist/resources/templates/go-backend/internal/core/apicontract/document.go +269 -0
  368. package/dist/resources/templates/go-backend/internal/core/apicontract/document_test.go +104 -0
  369. package/dist/resources/templates/go-backend/internal/core/apicontract/route_validator.go +78 -0
  370. package/dist/resources/templates/go-backend/internal/core/apicontract/route_validator_test.go +108 -0
  371. package/dist/resources/templates/go-backend/internal/core/apidocs/assets/scalar-api-reference.js +2385 -0
  372. package/dist/resources/templates/go-backend/internal/core/apidocs/assets/scalar-api-reference.metadata.json +10 -0
  373. package/dist/resources/templates/go-backend/internal/core/apidocs/route.go +107 -0
  374. package/dist/resources/templates/go-backend/internal/core/apidocs/route_test.go +200 -0
  375. package/dist/resources/templates/go-backend/internal/core/apidocs/scalar.go +117 -0
  376. package/dist/resources/templates/go-backend/internal/core/apidocs/scalar_test.go +99 -0
  377. package/dist/resources/templates/go-backend/internal/core/audit/access_log_policy.go +91 -0
  378. package/dist/resources/templates/go-backend/internal/core/audit/access_log_policy_test.go +51 -0
  379. package/dist/resources/templates/go-backend/internal/core/audit/actor_resolver.go +36 -0
  380. package/dist/resources/templates/go-backend/internal/core/audit/constants.go +30 -0
  381. package/dist/resources/templates/go-backend/internal/core/audit/context.go +119 -0
  382. package/dist/resources/templates/go-backend/internal/core/audit/context_test.go +310 -0
  383. package/dist/resources/templates/go-backend/internal/core/audit/dto.go +468 -0
  384. package/dist/resources/templates/go-backend/internal/core/audit/dto_admin.go +172 -0
  385. package/dist/resources/templates/go-backend/internal/core/audit/enum.go +460 -0
  386. package/dist/resources/templates/go-backend/internal/core/audit/enum_test.go +314 -0
  387. package/dist/resources/templates/go-backend/internal/core/audit/errors.go +9 -0
  388. package/dist/resources/templates/go-backend/internal/core/audit/handler.go +568 -0
  389. package/dist/resources/templates/go-backend/internal/core/audit/listener.go +319 -0
  390. package/dist/resources/templates/go-backend/internal/core/audit/listener_test.go +98 -0
  391. package/dist/resources/templates/go-backend/internal/core/audit/middleware.go +669 -0
  392. package/dist/resources/templates/go-backend/internal/core/audit/middleware_test.go +268 -0
  393. package/dist/resources/templates/go-backend/internal/core/audit/model.go +306 -0
  394. package/dist/resources/templates/go-backend/internal/core/audit/partition_job.go +316 -0
  395. package/dist/resources/templates/go-backend/internal/core/audit/ports.go +9 -0
  396. package/dist/resources/templates/go-backend/internal/core/audit/provider.go +30 -0
  397. package/dist/resources/templates/go-backend/internal/core/audit/repository.go +1007 -0
  398. package/dist/resources/templates/go-backend/internal/core/audit/repository_test.go +934 -0
  399. package/dist/resources/templates/go-backend/internal/core/audit/router.go +85 -0
  400. package/dist/resources/templates/go-backend/internal/core/audit/service.go +770 -0
  401. package/dist/resources/templates/go-backend/internal/core/audit/service_test.go +331 -0
  402. package/dist/resources/templates/go-backend/internal/core/audit/vo_admin.go +475 -0
  403. package/dist/resources/templates/go-backend/internal/core/cache/config.go +30 -0
  404. package/dist/resources/templates/go-backend/internal/core/cache/key.go +41 -0
  405. package/dist/resources/templates/go-backend/internal/core/cache/key_test.go +62 -0
  406. package/dist/resources/templates/go-backend/internal/core/cache/l1.go +153 -0
  407. package/dist/resources/templates/go-backend/internal/core/cache/l1_test.go +212 -0
  408. package/dist/resources/templates/go-backend/internal/core/cache/manager.go +278 -0
  409. package/dist/resources/templates/go-backend/internal/core/cache/manager_provider.go +24 -0
  410. package/dist/resources/templates/go-backend/internal/core/cache/metrics.go +126 -0
  411. package/dist/resources/templates/go-backend/internal/core/cache/namespace.go +46 -0
  412. package/dist/resources/templates/go-backend/internal/core/cache/namespace_test.go +90 -0
  413. package/dist/resources/templates/go-backend/internal/core/cache/options.go +39 -0
  414. package/dist/resources/templates/go-backend/internal/core/cache/options_test.go +96 -0
  415. package/dist/resources/templates/go-backend/internal/core/cache/redis.go +311 -0
  416. package/dist/resources/templates/go-backend/internal/core/cache/redis_test.go +51 -0
  417. package/dist/resources/templates/go-backend/internal/core/cache/serializer.go +31 -0
  418. package/dist/resources/templates/go-backend/internal/core/cache/serializer_test.go +139 -0
  419. package/dist/resources/templates/go-backend/internal/core/cache/singleflight.go +53 -0
  420. package/dist/resources/templates/go-backend/internal/core/cache/singleflight_test.go +211 -0
  421. package/dist/resources/templates/go-backend/internal/core/cache/warming.go +86 -0
  422. package/dist/resources/templates/go-backend/internal/core/clock/clock.go +66 -0
  423. package/dist/resources/templates/go-backend/internal/core/clock/clock_test.go +26 -0
  424. package/dist/resources/templates/go-backend/internal/core/clock/runtime_clock.go +283 -0
  425. package/dist/resources/templates/go-backend/internal/core/clock/runtime_clock_test.go +98 -0
  426. package/dist/resources/templates/go-backend/internal/core/commandreplay/errors.go +6 -0
  427. package/dist/resources/templates/go-backend/internal/core/commandreplay/model.go +90 -0
  428. package/dist/resources/templates/go-backend/internal/core/commandreplay/model_test.go +79 -0
  429. package/dist/resources/templates/go-backend/internal/core/commandreplay/namespace.go +7 -0
  430. package/dist/resources/templates/go-backend/internal/core/commandreplay/persistence.go +269 -0
  431. package/dist/resources/templates/go-backend/internal/core/commandreplay/persistence_test.go +185 -0
  432. package/dist/resources/templates/go-backend/internal/core/commandreplay/provider.go +9 -0
  433. package/dist/resources/templates/go-backend/internal/core/commandreplay/repository.go +22 -0
  434. package/dist/resources/templates/go-backend/internal/core/commandreplay/service.go +853 -0
  435. package/dist/resources/templates/go-backend/internal/core/commandreplay/service_persistence_test.go +432 -0
  436. package/dist/resources/templates/go-backend/internal/core/commandreplay/service_test.go +891 -0
  437. package/dist/resources/templates/go-backend/internal/core/commandreplay/types.go +121 -0
  438. package/dist/resources/templates/go-backend/internal/core/config/config.go +2069 -0
  439. package/dist/resources/templates/go-backend/internal/core/config/config_test.go +1122 -0
  440. package/dist/resources/templates/go-backend/internal/core/config/contract/contract_test.go +388 -0
  441. package/dist/resources/templates/go-backend/internal/core/config/contract/docs.go +198 -0
  442. package/dist/resources/templates/go-backend/internal/core/config/contract/verify.go +424 -0
  443. package/dist/resources/templates/go-backend/internal/core/config/enum.go +46 -0
  444. package/dist/resources/templates/go-backend/internal/core/config/metadata.go +717 -0
  445. package/dist/resources/templates/go-backend/internal/core/config/metadata_test.go +228 -0
  446. package/dist/resources/templates/go-backend/internal/core/config/product_admin_config_test.go +210 -0
  447. package/dist/resources/templates/go-backend/internal/core/crypto/aes_gcm.go +111 -0
  448. package/dist/resources/templates/go-backend/internal/core/crypto/aes_gcm_test.go +364 -0
  449. package/dist/resources/templates/go-backend/internal/core/crypto/encryptor.go +12 -0
  450. package/dist/resources/templates/go-backend/internal/core/crypto/envelope_encryptor.go +134 -0
  451. package/dist/resources/templates/go-backend/internal/core/crypto/envelope_encryptor_test.go +118 -0
  452. package/dist/resources/templates/go-backend/internal/core/crypto/pem.go +112 -0
  453. package/dist/resources/templates/go-backend/internal/core/crypto/pem_test.go +44 -0
  454. package/dist/resources/templates/go-backend/internal/core/crypto/provider.go +130 -0
  455. package/dist/resources/templates/go-backend/internal/core/crypto/provider_test.go +92 -0
  456. package/dist/resources/templates/go-backend/internal/core/database/base_model.go +24 -0
  457. package/dist/resources/templates/go-backend/internal/core/database/clickhouse.go +121 -0
  458. package/dist/resources/templates/go-backend/internal/core/database/database.go +112 -0
  459. package/dist/resources/templates/go-backend/internal/core/database/database_logger_test.go +95 -0
  460. package/dist/resources/templates/go-backend/internal/core/database/errors.go +25 -0
  461. package/dist/resources/templates/go-backend/internal/core/database/metrics_plugin.go +105 -0
  462. package/dist/resources/templates/go-backend/internal/core/database/pool_collector.go +71 -0
  463. package/dist/resources/templates/go-backend/internal/core/database/read_replica.go +520 -0
  464. package/dist/resources/templates/go-backend/internal/core/database/transaction.go +170 -0
  465. package/dist/resources/templates/go-backend/internal/core/database/transaction_test.go +282 -0
  466. package/dist/resources/templates/go-backend/internal/core/distlock/lock.go +353 -0
  467. package/dist/resources/templates/go-backend/internal/core/distlock/lock_test.go +106 -0
  468. package/dist/resources/templates/go-backend/internal/core/errors/handler.go +189 -0
  469. package/dist/resources/templates/go-backend/internal/core/errors/handler_test.go +515 -0
  470. package/dist/resources/templates/go-backend/internal/core/eventbus/eventbus.go +667 -0
  471. package/dist/resources/templates/go-backend/internal/core/eventbus/eventbus_test.go +792 -0
  472. package/dist/resources/templates/go-backend/internal/core/eventstream/noop.go +22 -0
  473. package/dist/resources/templates/go-backend/internal/core/eventstream/provider.go +20 -0
  474. package/dist/resources/templates/go-backend/internal/core/eventstream/publisher.go +38 -0
  475. package/dist/resources/templates/go-backend/internal/core/eventstream/redis.go +109 -0
  476. package/dist/resources/templates/go-backend/internal/core/eventstream/routing.go +104 -0
  477. package/dist/resources/templates/go-backend/internal/core/eventstream/routing_test.go +71 -0
  478. package/dist/resources/templates/go-backend/internal/core/geoip/model.go +19 -0
  479. package/dist/resources/templates/go-backend/internal/core/geoip/service.go +88 -0
  480. package/dist/resources/templates/go-backend/internal/core/health/health.go +333 -0
  481. package/dist/resources/templates/go-backend/internal/core/health/health_test.go +27 -0
  482. package/dist/resources/templates/go-backend/internal/core/httpclient/client.go +772 -0
  483. package/dist/resources/templates/go-backend/internal/core/httpclient/client_test.go +287 -0
  484. package/dist/resources/templates/go-backend/internal/core/httpclient/download.go +578 -0
  485. package/dist/resources/templates/go-backend/internal/core/httpclient/download_test.go +374 -0
  486. package/dist/resources/templates/go-backend/internal/core/jwtkeyring/jwk.go +38 -0
  487. package/dist/resources/templates/go-backend/internal/core/jwtkeyring/keyring.go +144 -0
  488. package/dist/resources/templates/go-backend/internal/core/jwtkeyring/keyring_test.go +128 -0
  489. package/dist/resources/templates/go-backend/internal/core/jwtkeyring/registry.go +60 -0
  490. package/dist/resources/templates/go-backend/internal/core/logger/logger.go +53 -0
  491. package/dist/resources/templates/go-backend/internal/core/logger/logger_test.go +194 -0
  492. package/dist/resources/templates/go-backend/internal/core/observability/metrics.go +358 -0
  493. package/dist/resources/templates/go-backend/internal/core/observability/sentry.go +445 -0
  494. package/dist/resources/templates/go-backend/internal/core/observability/sentry_privacy_test.go +175 -0
  495. package/dist/resources/templates/go-backend/internal/core/observability/tracing.go +187 -0
  496. package/dist/resources/templates/go-backend/internal/core/outbox/model.go +314 -0
  497. package/dist/resources/templates/go-backend/internal/core/outbox/model_test.go +77 -0
  498. package/dist/resources/templates/go-backend/internal/core/outbox/persistence.go +51 -0
  499. package/dist/resources/templates/go-backend/internal/core/outbox/provider.go +23 -0
  500. package/dist/resources/templates/go-backend/internal/core/outbox/relay.go +1138 -0
  501. package/dist/resources/templates/go-backend/internal/core/outbox/relay_postgres_test.go +257 -0
  502. package/dist/resources/templates/go-backend/internal/core/outbox/relay_test.go +690 -0
  503. package/dist/resources/templates/go-backend/internal/core/outbox/rescheduler.go +164 -0
  504. package/dist/resources/templates/go-backend/internal/core/outbox/rescheduler_test.go +209 -0
  505. package/dist/resources/templates/go-backend/internal/core/outbox/writer.go +249 -0
  506. package/dist/resources/templates/go-backend/internal/core/outbox/writer_postgres_test.go +170 -0
  507. package/dist/resources/templates/go-backend/internal/core/outbox/writer_test.go +123 -0
  508. package/dist/resources/templates/go-backend/internal/core/provider.go +198 -0
  509. package/dist/resources/templates/go-backend/internal/core/queue/metrics_middleware.go +38 -0
  510. package/dist/resources/templates/go-backend/internal/core/queue/metrics_middleware_test.go +12 -0
  511. package/dist/resources/templates/go-backend/internal/core/queue/queue.go +288 -0
  512. package/dist/resources/templates/go-backend/internal/core/queue/queue_test.go +159 -0
  513. package/dist/resources/templates/go-backend/internal/core/resilience/bulkhead.go +514 -0
  514. package/dist/resources/templates/go-backend/internal/core/resilience/bulkhead_test.go +984 -0
  515. package/dist/resources/templates/go-backend/internal/core/resilience/circuitbreaker.go +358 -0
  516. package/dist/resources/templates/go-backend/internal/core/resilience/circuitbreaker_test.go +788 -0
  517. package/dist/resources/templates/go-backend/internal/core/resilience/retry.go +318 -0
  518. package/dist/resources/templates/go-backend/internal/core/resilience/retry_test.go +735 -0
  519. package/dist/resources/templates/go-backend/internal/core/schedule/recorder.go +305 -0
  520. package/dist/resources/templates/go-backend/internal/core/schedule/run_context.go +124 -0
  521. package/dist/resources/templates/go-backend/internal/core/schedule/run_context_test.go +85 -0
  522. package/dist/resources/templates/go-backend/internal/core/schedule/scheduler.go +1589 -0
  523. package/dist/resources/templates/go-backend/internal/core/schedule/scheduler_control_test.go +808 -0
  524. package/dist/resources/templates/go-backend/internal/core/storage/oss_provider.go +398 -0
  525. package/dist/resources/templates/go-backend/internal/core/storage/oss_provider_test.go +89 -0
  526. package/dist/resources/templates/go-backend/internal/core/storage/path.go +110 -0
  527. package/dist/resources/templates/go-backend/internal/core/storage/path_test.go +301 -0
  528. package/dist/resources/templates/go-backend/internal/core/storage/s3_provider.go +489 -0
  529. package/dist/resources/templates/go-backend/internal/core/storage/s3_provider_test.go +60 -0
  530. package/dist/resources/templates/go-backend/internal/core/storage/storage.go +268 -0
  531. package/dist/resources/templates/go-backend/internal/core/storage/validation.go +225 -0
  532. package/dist/resources/templates/go-backend/internal/core/storage/validation_test.go +495 -0
  533. package/dist/resources/templates/go-backend/internal/core/temporal/logger.go +38 -0
  534. package/dist/resources/templates/go-backend/internal/core/temporal/provider.go +126 -0
  535. package/dist/resources/templates/go-backend/internal/core/temporal/provider_test.go +67 -0
  536. package/dist/resources/templates/go-backend/internal/core/websocket/client.go +282 -0
  537. package/dist/resources/templates/go-backend/internal/core/websocket/client_test.go +81 -0
  538. package/dist/resources/templates/go-backend/internal/core/websocket/config.go +58 -0
  539. package/dist/resources/templates/go-backend/internal/core/websocket/handler.go +53 -0
  540. package/dist/resources/templates/go-backend/internal/core/websocket/hub.go +269 -0
  541. package/dist/resources/templates/go-backend/internal/core/websocket/message.go +273 -0
  542. package/dist/resources/templates/go-backend/internal/core/websocket/notifier.go +92 -0
  543. package/dist/resources/templates/go-backend/internal/core/websocket/provider.go +33 -0
  544. package/dist/resources/templates/go-backend/internal/integrations/onex/iam/action.go +77 -0
  545. package/dist/resources/templates/go-backend/internal/integrations/onex/iam/action_test.go +238 -0
  546. package/dist/resources/templates/go-backend/internal/integrations/onex/iam/condition.go +107 -0
  547. package/dist/resources/templates/go-backend/internal/integrations/onex/iam/decision.go +256 -0
  548. package/dist/resources/templates/go-backend/internal/integrations/onex/iam/enum.go +643 -0
  549. package/dist/resources/templates/go-backend/internal/integrations/onex/iam/errors.go +102 -0
  550. package/dist/resources/templates/go-backend/internal/integrations/onex/iam/principal_record.go +21 -0
  551. package/dist/resources/templates/go-backend/internal/integrations/onex/iam/product_context.go +486 -0
  552. package/dist/resources/templates/go-backend/internal/integrations/onex/iam/resource.go +215 -0
  553. package/dist/resources/templates/go-backend/internal/integrations/onex/iam/resource_test.go +242 -0
  554. package/dist/resources/templates/go-backend/internal/products/README.md +5 -0
  555. package/dist/resources/templates/go-backend/internal/sharedevents/README.md +5 -0
  556. package/dist/resources/templates/go-backend/migrations/000001_infrastructure.down.sql +13 -0
  557. package/dist/resources/templates/go-backend/migrations/000001_infrastructure.up.sql +886 -0
  558. package/dist/resources/templates/go-backend/pkg/apierror/error.go +327 -0
  559. package/dist/resources/templates/go-backend/pkg/apierror/error_code.go +65 -0
  560. package/dist/resources/templates/go-backend/pkg/apierror/error_test.go +41 -0
  561. package/dist/resources/templates/go-backend/pkg/apierror/error_type.go +14 -0
  562. package/dist/resources/templates/go-backend/pkg/apierror/http_response.go +216 -0
  563. package/dist/resources/templates/go-backend/pkg/apierror/http_response_test.go +216 -0
  564. package/dist/resources/templates/go-backend/scripts/check-openapi-clean-deletion.sh +54 -0
  565. package/dist/resources/templates/go-backend/scripts/test-migrations.sh +32 -0
  566. package/dist/resources/templates/go-backend/tests/infrastructure.sql +69 -0
  567. package/dist/resources/templates/mcp-server/.claude/docs/stack.md +338 -0
  568. package/dist/resources/templates/mcp-server/.editorconfig +13 -0
  569. package/dist/resources/templates/mcp-server/.env.example +8 -0
  570. package/dist/resources/templates/mcp-server/.github/ISSUE_TEMPLATE/bug_report.yml +104 -0
  571. package/dist/resources/templates/mcp-server/.github/ISSUE_TEMPLATE/feature_request.yml +54 -0
  572. package/dist/resources/templates/mcp-server/.github/PULL_REQUEST_TEMPLATE.md +36 -0
  573. package/dist/resources/templates/mcp-server/.github/workflows/ci.yml +78 -0
  574. package/dist/resources/templates/mcp-server/.husky/commit-msg +1 -0
  575. package/dist/resources/templates/mcp-server/.husky/pre-commit +1 -0
  576. package/dist/resources/templates/mcp-server/.lintstagedrc.json +4 -0
  577. package/dist/resources/templates/mcp-server/.nvmrc +1 -0
  578. package/dist/resources/templates/mcp-server/.prettierrc +8 -0
  579. package/dist/resources/templates/mcp-server/CONTRIBUTING.md +184 -0
  580. package/dist/resources/templates/mcp-server/Dockerfile +23 -0
  581. package/dist/resources/templates/mcp-server/LICENSE +21 -0
  582. package/dist/resources/templates/mcp-server/README.md +123 -0
  583. package/dist/resources/templates/mcp-server/_gitignore +26 -0
  584. package/dist/resources/templates/mcp-server/commitlint.config.js +24 -0
  585. package/dist/resources/templates/mcp-server/eslint.config.js +30 -0
  586. package/dist/resources/templates/mcp-server/package.json +72 -0
  587. package/dist/resources/templates/mcp-server/src/index.ts +27 -0
  588. package/dist/resources/templates/mcp-server/src/resources.ts +33 -0
  589. package/dist/resources/templates/mcp-server/src/services/.gitkeep +0 -0
  590. package/dist/resources/templates/mcp-server/src/tools.ts +43 -0
  591. package/dist/resources/templates/mcp-server/src/types/index.ts +19 -0
  592. package/dist/resources/templates/mcp-server/src/utils/index.ts +31 -0
  593. package/dist/resources/templates/mcp-server/tsconfig.json +22 -0
  594. package/dist/resources/templates/mcp-server/tsup.config.ts +14 -0
  595. package/dist/resources/templates/mcp-server/vitest.config.ts +15 -0
  596. package/dist/resources/templates/nuxt/.claude/docs/stack.md +666 -0
  597. package/dist/resources/templates/nuxt/.editorconfig +15 -0
  598. package/dist/resources/templates/nuxt/.env.example +22 -0
  599. package/dist/resources/templates/nuxt/.github/workflows/ci.yml +34 -0
  600. package/dist/resources/templates/nuxt/.husky/commit-msg +1 -0
  601. package/dist/resources/templates/nuxt/.husky/pre-commit +1 -0
  602. package/dist/resources/templates/nuxt/.nvmrc +1 -0
  603. package/dist/resources/templates/nuxt/.prettierignore +9 -0
  604. package/dist/resources/templates/nuxt/.prettierrc +1 -0
  605. package/dist/resources/templates/nuxt/README.md +23 -0
  606. package/dist/resources/templates/nuxt/_gitignore +7 -0
  607. package/dist/resources/templates/nuxt/app/app.config.ts +105 -0
  608. package/dist/resources/templates/nuxt/app/i18n/locales/en.json +5 -0
  609. package/dist/resources/templates/nuxt/app/pages/app/index.vue +224 -0
  610. package/dist/resources/templates/nuxt/app/pages/authors/[slug].vue +37 -0
  611. package/dist/resources/templates/nuxt/app/pages/blog/[slug].vue +55 -0
  612. package/dist/resources/templates/nuxt/app/pages/blog/category/[category].vue +38 -0
  613. package/dist/resources/templates/nuxt/app/pages/blog/index.vue +46 -0
  614. package/dist/resources/templates/nuxt/app/pages/index.vue +626 -0
  615. package/dist/resources/templates/nuxt/app/pages/legal/privacy.vue +21 -0
  616. package/dist/resources/templates/nuxt/app/pages/legal/terms.vue +21 -0
  617. package/dist/resources/templates/nuxt/app/pages/ui/index.vue +397 -0
  618. package/dist/resources/templates/nuxt/commitlint.config.mjs +1 -0
  619. package/dist/resources/templates/nuxt/eslint.config.mjs +4 -0
  620. package/dist/resources/templates/nuxt/lint-staged.config.mjs +8 -0
  621. package/dist/resources/templates/nuxt/nuxt.config.ts +71 -0
  622. package/dist/resources/templates/nuxt/package.json +67 -0
  623. package/dist/resources/templates/nuxt/public/apple-touch-icon.png +0 -0
  624. package/dist/resources/templates/nuxt/public/favicon.ico +0 -0
  625. package/dist/resources/templates/nuxt/public/favicon.svg +5 -0
  626. package/dist/resources/templates/nuxt/public/icon-16x16.png +0 -0
  627. package/dist/resources/templates/nuxt/public/icon-192x192.png +0 -0
  628. package/dist/resources/templates/nuxt/public/icon-32x32.png +0 -0
  629. package/dist/resources/templates/nuxt/public/icon-512x512.png +0 -0
  630. package/dist/resources/templates/nuxt/public/logo.svg +6 -0
  631. package/dist/resources/templates/nuxt/public/media/hero-product-gallery.png +0 -0
  632. package/dist/resources/templates/nuxt/server/api/content/sitemap-urls.get.ts +12 -0
  633. package/dist/resources/templates/nuxt/server/api/preview.get.ts +9 -0
  634. package/dist/resources/templates/nuxt/stylelint.config.mjs +3 -0
  635. package/dist/resources/templates/nuxt/test/e2e/rendering.test.ts +13 -0
  636. package/dist/resources/templates/nuxt/tsconfig.json +3 -0
  637. package/dist/resources/templates/nuxt/vitest.config.ts +8 -0
  638. package/package.json +8 -5
@@ -0,0 +1,137 @@
1
+ # Application Architecture Standard
2
+
3
+ ## 1. Purpose and System Boundary
4
+
5
+ The generated repository owns application workflows, routes, branding, configuration and release. Shared libraries own reusable mechanisms exposed through public exports. Installed source belongs to the application; package internals remain in the package owner and change through a versioned release.
6
+
7
+ | Layer | Responsibility | Excluded responsibility |
8
+ | --------------------- | --------------------------------------------------- | ------------------------------------------------ |
9
+ | Presentation/protocol | Typed input, visible state, tool/resource schema | Credentials, transport retry, storage policy |
10
+ | State coordination | Drafts, selection, operation state, invalidation | Raw protocol parsing and authorization authority |
11
+ | Application service | Use case ordering, invariants, result semantics | Rendering or process connection startup |
12
+ | Adapter | External HTTP/storage/provider formats and failures | Navigation, feedback UI, pricing decisions |
13
+ | Composition | Configuration, dependencies and lifetime | Business rules copied out of services |
14
+ | Pure transformation | Deterministic conversion of explicit values | Framework imports, environment reads, network |
15
+
16
+ ## 2. Read and Reuse Gate (CRITICAL)
17
+
18
+ Before adding a file, read `package.json`, relevant public exports, existing owners and direct callers. Search responsibilities and sibling symbols with `rg`. Declare exact reused paths and symbols; “reuse common utilities” is insufficient.
19
+
20
+ **FORBIDDEN**: dependency deep imports into `src/`, copying runtime internals, or adding another HTTP client to bypass the existing error contract. A public export must exist in the installed package and have the required input/result semantics.
21
+
22
+ ```text
23
+ Pure value transformation?
24
+ → co-locate for one caller; share only with proven reuse
25
+ Uses Vue lifecycle/reactivity?
26
+ → composable or component
27
+ Translates an external protocol?
28
+ → service adapter
29
+ Encodes application workflow?
30
+ → feature owner
31
+ Defines process/request lifetime?
32
+ → entrypoint, plugin or request composition
33
+ ```
34
+
35
+ ✅ Correct: callers extract a byte count and pass it to `formatFileSize(byteLength)`.
36
+
37
+ ❌ Wrong: shared `formatUploadPageFileRow(response)` mixes a page DTO, extraction and formatting. Keep DTO extraction in its consumer; share the value transform.
38
+
39
+ ## 3. Module Complexity
40
+
41
+ | Complexity | Evidence | Required separation |
42
+ | ---------------------- | ------------------------------------ | ------------------------------------------------------- |
43
+ | Pure function | No I/O, state or framework lifetime | Function and precise types |
44
+ | Adapter-backed service | External boundary and typed use case | Contract, adapter and composition |
45
+ | Stateful workflow | Transitions, recovery or consistency | Domain invariants, service, adapter and recovery policy |
46
+
47
+ The complete architectural design remains required for a new boundary even when it occupies few files. File count does not turn a mechanical rename into architecture.
48
+
49
+ Use actual paths in [Stack](stack.md). Nuxt routes belong in `app/pages/`, server handlers in `server/api/`. MCP registrations belong in `src/tools.ts` / `src/resources.ts`; external adapters belong in `src/services/`. Do not create empty layers to match a diagram.
50
+
51
+ ## 4. File Placement and Types
52
+
53
+ Request/response types stay beside the service/API owner. Component props/emits stay with the component. A type moves to a shared owner only when callers share semantics, not merely field names.
54
+
55
+ | Type | Owner |
56
+ | -------------------------- | --------------------------------------------- |
57
+ | HTTP request/response | API or server contract |
58
+ | MCP tool input/result | Tool schema and protocol adapter |
59
+ | Component props/emits | Component |
60
+ | Global client preference | State owner |
61
+ | External provider response | Provider adapter |
62
+ | Shared pure value | Public library contract after reuse is proven |
63
+
64
+ **MUST** distinguish absence, failure, unsupported capability and partial completion. A boolean cannot represent request acceptance, running state and completion simultaneously.
65
+
66
+ ```typescript
67
+ interface OperationResult {
68
+ operationId: string;
69
+ state: "accepted" | "running" | "completed" | "failed";
70
+ requestedCount: number;
71
+ completedCount: number;
72
+ }
73
+ ```
74
+
75
+ This illustrates type design, not an installed endpoint. Actual API contracts control naming, states and counts.
76
+
77
+ ✅ Correct: parse unknown input before constructing a typed model.
78
+
79
+ ❌ Wrong: `JSON.parse(text) as OperationResult` is considered validation. Type assertions disappear at runtime.
80
+
81
+ ## 5. Extension Points (CRITICAL)
82
+
83
+ External APIs, provider choices, themes, configurable policy and tenant context start with a contract and configuration. Implement the current adapter after the consumer-facing interface. Do not first couple callers to a concrete provider and later extract its shape.
84
+
85
+ ```typescript
86
+ interface TextTransformer {
87
+ transform(input: string, signal: AbortSignal): Promise<string>;
88
+ }
89
+ interface TransformOptions {
90
+ transformer: TextTransformer;
91
+ signal: AbortSignal;
92
+ }
93
+ ```
94
+
95
+ Adding a provider should add an adapter and composition/configuration entry. If every page or tool must change, provider details leaked. Credentials, model names and provider parameters belong in configuration and adapters.
96
+
97
+ Do not combine unrelated workflows into an untyped universal config object. Shared mechanisms require compatible inputs, results, errors, lifetime and ownership.
98
+
99
+ ## 6. Dependency Direction
100
+
101
+ Framework adapters depend on framework-independent contracts. Shared contracts do not import Vue, Nuxt, MCP server instances or application routes. Composition supplies dependencies; services do not discover them through hidden globals.
102
+
103
+ Nuxt browser graphs cannot import server-only credentials or Node-only modules. SSR identity/state belongs to request/application context. MCP service code cannot write directly to stdout; the protocol transport owns it.
104
+
105
+ ## 7. Data and State Flow
106
+
107
+ Trace source → validation → service → adapter → result → state → presentation/protocol output. Preserve names, optionality, units, timezone, pagination, identity scope and unknown enum semantics.
108
+
109
+ Server state has one authoritative query/cache owner. Client preferences and drafts have separate lifetimes. Do not mirror a query result into another global store without a synchronization contract.
110
+
111
+ Mutations declare affected cache identities and refresh targets. Refresh failure preserves valid data and drafts. See [Security and Lifecycle](security-lifecycle.md).
112
+
113
+ ## 8. Configuration and Branding
114
+
115
+ Configuration declares supported choices; it is not authorization. Hidden UI controls cannot replace backend checks. Public environment variables contain only public values; invalid configuration must fail before effects.
116
+
117
+ Brand tokens, logos, locale and navigation belong to application composition. Generic packages do not branch on product names or hardcode customer routes. Registry-installed components remain editable application source.
118
+
119
+ ## 9. Generated Source Ownership
120
+
121
+ Projects must run outside the source checkout. **FORBIDDEN**: developer absolute paths, dependency escapes, symlinks to external rules and commands requiring unshipped helpers.
122
+
123
+ Template changes affect new projects. Existing applications receive reviewed source changes; regeneration never overwrites business code or credentials. CLAUDE and AGENTS remain synchronized complete files.
124
+
125
+ ## 10. Architecture and Delivery
126
+
127
+ Use [Architecture Template](architecture-template.md) for new architecture. Non-applicable sections require concrete ownership reasons. Plans and alignment evidence belong in ordinary `docs/`.
128
+
129
+ ### Pre-commit Checklist
130
+
131
+ - [ ] Each new symbol has a searched owner and precise responsibility.
132
+ - [ ] Dependencies use actual installed public exports.
133
+ - [ ] Types, parsing, policy and presentation have separate owners.
134
+ - [ ] Shared contracts have real consumers and explicit lifetime.
135
+ - [ ] Generated applications do not depend on a company checkout.
136
+ - [ ] Failure, retry, stale response and disposal follow the full data path.
137
+ - [ ] Direct consumers pass declared stack checks.
@@ -0,0 +1,42 @@
1
+ # Application Standards Index
2
+
3
+ Read [CLAUDE.md](../../CLAUDE.md) completely, then select the task boundary:
4
+
5
+ | Task | Standard |
6
+ | ---------------------------------- | ----------------------------------------------- |
7
+ | Modules, dependencies and reuse | [Architecture](architecture.md) |
8
+ | Input, secrets, state and disposal | [Security and Lifecycle](security-lifecycle.md) |
9
+ | Checks and delivery | [Verification](verification.md) |
10
+ | Framework directories and commands | [Selected Stack](stack.md) |
11
+
12
+ Use [Architecture Design Template](architecture-template.md) for new architecture or contract design.
13
+
14
+ This directory contains current engineering rules. Product designs and implementation evidence belong in ordinary `docs/`; unverified research is not a binding requirement.
15
+
16
+ ## Required Reading Sequence
17
+
18
+ 1. Read root `CLAUDE.md` or its identical full `AGENTS.md` body for the five execution phases and shared forbidden patterns.
19
+ 2. Read `stack.md` for the actual generated framework, environment consumers, commands and source owners.
20
+ 3. Read `architecture.md` before changing ownership, public types, dependencies or shared abstractions.
21
+ 4. Read `security-lifecycle.md` before changing external inputs, identity, credentials, requests, retries, cancellation or disposal.
22
+ 5. Read `verification.md` before selecting checks or declaring completion.
23
+ 6. Use `architecture-template.md` for the applicable Level A/B/C design depth.
24
+
25
+ ## Full Standard Ownership
26
+
27
+ | Standard | Complete topic coverage |
28
+ | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
29
+ | Root body | Understand, Design, Plan, Implement, Verify; shared SH rules; delivery; Git; comments; pre-commit |
30
+ | Architecture | Purpose, layers, reuse, placement, types, extension points, dependency direction, state flow, config, generated-source ownership |
31
+ | Security and lifecycle | Trust, secrets, authorization, result/error semantics, diagnostics, disposal, stale results, retries, drafts, URLs/files, privacy |
32
+ | Verification | Command authority, static gates, behavior, browser/protocol, packed consumers, migrations, review, Git and evidence |
33
+ | Nuxt selected stack | Modules/env, aliases, SSR, API/query/store, components/theme, full interaction rules, filters, locale and browser acceptance |
34
+ | MCP selected stack | Entrypoint, tool/resource schemas, type boundaries, adapters, permissions, stdio, retry, errors, transport and package acceptance |
35
+
36
+ Only the selected `stack.md` is installed. Base standards never overwrite it with a second framework's rules. Framework-specific source files take precedence over generic examples when resolving actual symbol names, while root security and delivery requirements remain binding.
37
+
38
+ ## Documentation Maintenance (CRITICAL)
39
+
40
+ **MUST** update the owning rule when a real contract changes; do not append a correction beside stale instructions. Keep useful examples, forbidden patterns and checklist coverage. Do not shorten a complete standard into an index-only entry.
41
+
42
+ CLAUDE and AGENTS are standalone full files and must remain equal. Relative links must resolve inside the generated project; external source-checkout paths and external symlinks are forbidden. Record source comparison and implementation evidence in ordinary project documentation, not these binding rules.
@@ -0,0 +1,129 @@
1
+ # Security and Lifecycle Standard
2
+
3
+ ## 1. Trust Boundaries (CRITICAL)
4
+
5
+ This standard applies to browser/server calls, MCP tools/resources, environment configuration and external adapters. **MUST** validate unknown values once at the owning boundary, then pass typed values internally. Do not add repeated null checks for values guaranteed by a framework or validated contract.
6
+
7
+ | Input | Validation owner | Required checks |
8
+ | ------------------ | ----------------------------------------- | -------------------------------------------------------- |
9
+ | Browser form/query | Client for feedback; server for authority | Type, size, range, allowlist and business rules |
10
+ | MCP tool arguments | Registered schema and use case | Type, bounds, required scope and operation permission |
11
+ | External response | Provider/API adapter | Shape, required fields, status and safe error conversion |
12
+ | Environment | Configuration consumer | Required values, finite numbers, supported values |
13
+ | URL/path | Outbound adapter or redirect owner | Protocol, host/root, normalized path and scope |
14
+
15
+ A generic parameter on JSON parsing is not runtime validation. The MCP `safeJsonParse<T>` utility parses syntax only; callers still validate semantics. Nuxt query parameters must be narrowed before use.
16
+
17
+ ✅ Correct: accept unknown tool input through the declared Zod schema, then authorize the concrete resource before effects.
18
+
19
+ ❌ Wrong: accept an arbitrary `user_id` or `product_code` and use it as proof of authority.
20
+
21
+ ## 2. Secrets and Configuration
22
+
23
+ Private tokens and credentials belong in process/server configuration. **FORBIDDEN**: credentials in source, public Nuxt runtime configuration, app configuration, tool descriptions, resource contents, logs or generated examples.
24
+
25
+ `NUXT_PUBLIC_*` values are browser-visible. Client IDs may be public; client secrets are not. MCP `.env.example` is a schema/example file and does not install dotenv or make the runtime consume variables automatically.
26
+
27
+ Declare a variable only with its real configuration consumer. Do not use a default production secret or convert missing credentials into a simulated successful result. Configuration documentation must state whether a value is read at build time or runtime.
28
+
29
+ ## 3. Authorization and Identity Scope
30
+
31
+ Client controls are presentation, never authorization. Every effectful server/tool operation must enforce the authenticated subject's resource scope at the authoritative service boundary. Do not forward a caller-selected identity header without checking its contract and audience.
32
+
33
+ | Boundary | Guarantee |
34
+ | ----------------------- | ------------------------------------------------------------- |
35
+ | Public route/tool | Explicit public capability and rate/size bounds |
36
+ | Authenticated operation | Subject from verified session/token, not payload identity |
37
+ | Resource read/write | Scope checked for the selected resource |
38
+ | Provider request | Only configured credentials sent to an allowed destination |
39
+ | Logout/account switch | Old identity cache and pending writes cannot affect new state |
40
+
41
+ For a consumer of an upstream identity platform, use the actual platform API contract. The template does not install OAuth clients, IAM policy engines, account services or backend authorization endpoints.
42
+
43
+ ## 4. Output and Error Contracts
44
+
45
+ Use stable machine codes and safe messages. Preserve validation, authentication, authorization, rate-limit, unavailable and internal-error distinctions. Presentation may localize safe codes; adapters do not navigate or display UI.
46
+
47
+ HTTP clients preserve response status and the agreed error envelope. MCP tools distinguish protocol failures from tool execution results with `isError`; failed execution cannot return an ordinary success-shaped result.
48
+
49
+ ✅ Correct: report “permission denied” with a safe code and correlation identifier; keep raw provider diagnostics in a controlled diagnostic boundary.
50
+
51
+ ❌ Wrong: return an empty array after an upstream timeout so the user believes the dataset is empty.
52
+
53
+ A `204` HTTP response has no body. Do not parse it as JSON. A successful transport exchange does not prove an asynchronous remote operation completed.
54
+
55
+ ## 5. Safe Diagnostics
56
+
57
+ Log operation IDs, safe error codes, duration and correlation identifiers. Never log passwords, tokens, signed URLs, complete request bodies or personal content by default. Error serialization must not expose credential-bearing request options.
58
+
59
+ MCP stdout is protocol-owned. Operational diagnostics use stderr and remain redacted. Nuxt browser output cannot reveal server-only stack traces or environment state.
60
+
61
+ ## 6. Resource Ownership (CRITICAL)
62
+
63
+ Every request, subscription, timer, stream and connection has a creation owner, lifetime and disposal point. State coordination owns active operations; presentation does not create hidden long-lived background work.
64
+
65
+ | Event | Required behavior |
66
+ | -------------------------- | ---------------------------------------------------------------- |
67
+ | Component/request creation | Bind resources to that scope |
68
+ | Route/query change | Invalidate old results before applying new scope |
69
+ | Account change/logout | Clear identity-scoped state and reject stale responses |
70
+ | Component disposal | Abort local work and detach subscriptions |
71
+ | MCP transport close | Stop owned listeners/resources through their real close contract |
72
+ | Process shutdown | Close resources in dependency order and surface failure |
73
+
74
+ Local cancellation only proves that this client stopped waiting unless the remote API acknowledges cancellation. Never display “cancelled” for a remote job solely because an HTTP request was aborted.
75
+
76
+ ## 7. Concurrency and Stale Responses
77
+
78
+ An operation result may update state only if its identity/query scope still matches the owner. Use the framework query lifecycle where present rather than parallel hand-written loading flags and watchers.
79
+
80
+ For manually coordinated work, bind an operation sequence or abort signal to the owner. Reject stale results before state changes; merely cancelling the previous fetch is insufficient when a provider ignores abort.
81
+
82
+ ✅ Correct: a query key includes the authenticated identity and resource filter; switching scope invalidates the previous result.
83
+
84
+ ❌ Wrong: a module-global `currentUser` or promise result writes to a new SSR request's state.
85
+
86
+ ## 8. Retries and Idempotency
87
+
88
+ Retry only failures the contract declares retryable. Bound attempts and total time; honor cancellation and server retry hints. Never retry a mutation automatically without an idempotency contract or proof that the operation was not accepted.
89
+
90
+ An idempotency key identifies an operation, not a user, display label or third-party resource ID. The authoritative backend owns uniqueness and replay guarantees. A client-side disabled button only prevents one local duplicate action.
91
+
92
+ | Outcome | Recovery |
93
+ | ---------------------- | -------------------------------------------------------------- |
94
+ | Validation failure | Correct input; do not retry unchanged |
95
+ | Authorization failure | Reauthenticate or resolve permission; no blind loop |
96
+ | Transient read failure | Bounded retry with visible stale-data state |
97
+ | Mutation timeout | Query operation status or replay by declared idempotency key |
98
+ | Partial completion | Preserve completed resources; retry only eligible failed items |
99
+
100
+ ## 9. Drafts and Partial Results
101
+
102
+ Draft state survives recoverable save failure. Do not close an editor, clear input or replace valid data until the authoritative write succeeds. After success, refresh all directly affected views through the owner cache contract.
103
+
104
+ Partial output must include meaningful status and completed/failed counts from the service. Do not manufacture progress from elapsed time or imply all resources completed when only a request was accepted.
105
+
106
+ ## 10. Content, URLs and Files
107
+
108
+ Render untrusted text through framework escaping. Raw HTML requires the specific sanitized-content boundary; a type assertion is not sanitization. Do not add uninstalled sanitizer imports merely to satisfy an example.
109
+
110
+ For outbound URLs, enforce allowed protocols and destinations at the adapter. For local paths, resolve against the allowed root and reject traversal. Upload size/type checks need authoritative server validation; browser accept filters are user guidance only.
111
+
112
+ ## 11. Audit and Privacy
113
+
114
+ For effectful operations, preserve actor, action, resource, result and safe correlation metadata through the actual backend/tool contract. A frontend success toast is not an audit record. Do not duplicate authoritative audit records in client stores.
115
+
116
+ Retention, consent, deletion and export operate on identified data owners. Browser storage and telemetry must respect the application's actual consent contract. Configuration toggles cannot retroactively make already-sent telemetry consented.
117
+
118
+ ## 12. Security and Lifecycle Checklist
119
+
120
+ - [ ] Unknown input is parsed before side effects.
121
+ - [ ] Public configuration and protocol output contain no private credentials.
122
+ - [ ] Scope is authorized by the owning service, not caller-supplied IDs.
123
+ - [ ] Errors preserve semantic failure and expose safe diagnostics only.
124
+ - [ ] Request, timer, connection and subscription lifetimes are explicit.
125
+ - [ ] Identity/query changes reject stale results and preserve request isolation.
126
+ - [ ] Mutation retries have a real idempotency or acceptance-status contract.
127
+ - [ ] Drafts and partial results survive recoverable failure.
128
+ - [ ] Shutdown/disposal and remote cancellation are distinguished.
129
+ - [ ] Runtime evidence is separate from unit fixtures and compilation.
@@ -0,0 +1,121 @@
1
+ # Verification and Delivery Standard
2
+
3
+ ## 1. Scope and Command Authority
4
+
5
+ **MUST** read the generated `package.json`, configuration and [Stack](stack.md) before selecting commands. Run only installed commands; unavailable scripts are not successful checks. Nuxt preparation/build, MCP compilation, browser interaction, protocol acceptance and external service acceptance are separate results.
6
+
7
+ | Change | Minimum evidence |
8
+ | ----------------- | --------------------------------------------------------------- |
9
+ | Pure local logic | Targeted behavior and relevant error paths |
10
+ | Public contract | Producer and direct consumer agree on complete payload |
11
+ | Async owner | Cancellation, stale response, retry and disposal |
12
+ | UI | Actual route, controls, state transitions and recovery |
13
+ | MCP tool/resource | Schema, protocol result, error result and compiled transport |
14
+ | Dependency/export | Resolution, lockfile, consumer compile and packed file coverage |
15
+ | Documentation | Real files, commands, links, examples and current behavior |
16
+
17
+ ## 2. Industry Gate Semantics
18
+
19
+ | Decision | Pattern | Application |
20
+ | ----------------- | ------------------------------------ | -------------------------------------------------------------------------------------------------- |
21
+ | Merge quality | Required CI status checks | Inspect actual repository protection and workflow jobs; do not infer protection from documentation |
22
+ | Local feedback | Installed Git hooks | Run existing setup and hooks; do not bypass failures |
23
+ | Existing findings | Non-regression baseline | Record existing failures separately; reject introduced in-scope regressions |
24
+ | Architecture | Dependency and contract verification | Check actual imports/exports and direct consumers |
25
+ | Persistence | Query-backed schema/index evidence | Apply only when this repository owns persistent schema |
26
+
27
+ The template does not ship OneX governance analyzers or its branch-protection settings. Their architectural purpose remains required; their command names cannot be copied into this application's instructions.
28
+
29
+ ## 3. Understand and Design Verification
30
+
31
+ Before edits, identify the owning module, public surface, direct consumers and relevant rules. Architecture designs must include concrete target types, state flow, error behavior, configuration, dependency assembly and verification.
32
+
33
+ Use [Architecture Template](architecture-template.md). Reconcile every accepted requirement to an implemented owner and observable result. A heading or an external link does not prove requirement coverage.
34
+
35
+ ✅ Correct: API field addition is traced through parsing, service result, query state and displayed value.
36
+
37
+ ❌ Wrong: a backend type compiles while the consumer still reads the old field.
38
+
39
+ ## 4. Static and Build Gates
40
+
41
+ Run the appropriate declared typecheck and build. Check changed imports, exports, config keys, routes and registrations with `rg`. Run `git diff --check` and inspect the final diff.
42
+
43
+ Nuxt declares format, lint, typecheck, test, build and the composed `pnpm check` gate. MCP declares format, lint, typecheck, test and build through its stack-owned scripts. Run the selected stack's actual commands; do not report MCP protocol results from Nuxt checks or Nuxt rendering results from MCP tests.
44
+
45
+ A build validates graph and artifact generation. It does not prove authorization, signed credentials, successful uploads, external jobs or publication.
46
+
47
+ ## 5. Behavioral Verification
48
+
49
+ Tests must assert observable guarantees at the changed boundary, not mirror implementation details. Use fake providers only inside tests. Verify explicit errors and avoid success-shaped defaults.
50
+
51
+ | Case | Question |
52
+ | ---------------------- | --------------------------------------------------------- |
53
+ | Valid input | Does the intended result reach the consumer? |
54
+ | Invalid input | Is it rejected before effects with meaningful details? |
55
+ | Missing identity/scope | Does the authoritative boundary reject access? |
56
+ | Provider failure | Does error identity survive translation? |
57
+ | Duplicate mutation | Is replay/idempotency behavior correct? |
58
+ | Timeout | Is ambiguous acceptance handled without double execution? |
59
+ | Partial result | Are completed items retained and failures recoverable? |
60
+ | Cancellation/disposal | Can stale work still modify current state? |
61
+
62
+ Do not add tests for a reversible wording-only change solely to increase counts. Test schema parsing, contract changes and asynchronous invariants because their behavior can fail.
63
+
64
+ ## 6. Nuxt Browser Acceptance
65
+
66
+ For touched UI, inspect the actual generated route. Include parent and child components, overlays, teleported content and responsive behavior. A parent source scan is not a runtime component inventory.
67
+
68
+ Required applicable states: initial loading, valid content, empty collection, absent optional field, recoverable error, expired/forbidden access, long text, partial output and refreshing existing data. Verify keyboard focus, dismissal, disabled actions and accessible names.
69
+
70
+ For writes, prove submit → network result → visible success/error → refresh. Keep drafts on failure. Browser console and relevant network results are part of the evidence; a screenshot alone does not prove action behavior.
71
+
72
+ ## 7. MCP Protocol Acceptance
73
+
74
+ Build first, then use the compiled stdio entry. Verify initialization, declared capabilities, tool listing/call, resource listing/read and connection close with a protocol client. stdout must contain protocol frames only.
75
+
76
+ Schema validation, result content type and `isError` behavior must match the SDK contract. Unknown tool/resource and invalid arguments need explicit protocol behavior. A `pnpm start:stdio` process launch alone is not a successful request exchange.
77
+
78
+ Tests of services with fake dependencies do not prove actual provider permission or availability. Report the external-service boundary separately.
79
+
80
+ ## 8. Distribution and Generated Projects
81
+
82
+ For template changes, generate an application outside the source workspace using the packed CLI. Verify substituted variables, complete CLAUDE/AGENTS bodies, `.claude/docs`, relative links, package resolution and executable commands.
83
+
84
+ Do not rely on workspace symlinks to satisfy dependencies. Inspect packed files and the consumer artifact. The generated project must not reference developer absolute paths or template placeholders.
85
+
86
+ Template updates do not authorize overwriting an existing application's source. Nonempty targets and consumer-owned edits must remain protected.
87
+
88
+ ## 9. Data Migration Evidence
89
+
90
+ When an application owns schema changes, validate migration sequence, fresh creation, supported existing-data state and reversibility where applicable. A clean empty database alone does not validate imported production data.
91
+
92
+ Every new index must name the real query path and its filter/sort/uniqueness rationale. Match equality prefixes and partial predicates to runtime queries; avoid indexes justified only by field existence. Runtime exact-match dedupe needs a matching authoritative uniqueness constraint.
93
+
94
+ When persistence belongs to an upstream service, verify that API contract instead of adding local copies of platform tables.
95
+
96
+ ## 10. Review and Failure Handling
97
+
98
+ Deterministic checks come first. LOCAL work uses no independent reviewer. FOCUSED/ARCHITECTURAL work selects only the relevant rule, architecture or integration dimensions whose judgment can falsify the touched scope, normally zero to three reviewers.
99
+
100
+ Fix every in-scope blocking finding. Limit ordinary review-fix cycles to two unless new blocking evidence appears. Unrelated findings are reported without expanding the change. Failed commands remain failures until rerun successfully or identified as an exact external blocker.
101
+
102
+ ## 11. Git and Release
103
+
104
+ Inspect working tree and staged files; preserve unrelated edits. Run the existing hooks when configured. Use normal commits only: no amend, history rewrite, rebase-based repair or force push.
105
+
106
+ Resolve push rejection by fetch, inspect and normal merge. Never bypass hook or CI failures. Publication and deployment require the relevant authorization; tests and builds do not implicitly publish.
107
+
108
+ ## 12. Delivery Evidence
109
+
110
+ Report concrete changed behavior, exact validation scope, command outcomes and remaining external limitations. Do not claim product authentication, payments or generation are accepted from foundation tests alone.
111
+
112
+ ### Pre-commit Checklist
113
+
114
+ - [ ] Source owners, consumer contracts and complete rules were read.
115
+ - [ ] Accepted requirements map to actual implementation and proof.
116
+ - [ ] Declared static/build checks pass for the touched stack.
117
+ - [ ] Applicable success, failure, cancellation and recovery behavior is verified.
118
+ - [ ] Browser/protocol evidence covers the changed interactions.
119
+ - [ ] Packed/template consumers are independent of the source checkout.
120
+ - [ ] No secrets, dead references, deferred code or process residue remain.
121
+ - [ ] Normal Git history and existing hook requirements are respected.