@bluefly/openstandardagents 0.2.5-RC → 0.2.7

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 (238) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.yml +63 -0
  2. package/.github/ISSUE_TEMPLATE/feature_request.yml +40 -0
  3. package/.github/workflows/dependabot-comment.yml +34 -0
  4. package/.github/workflows/pr-comment.yml +33 -0
  5. package/.husky/pre-commit +5 -0
  6. package/.kiro/config.json +21 -0
  7. package/.kiro/settings/mcp.json +61 -0
  8. package/.kiro/specs/scripts-migration-api-first/design.md +883 -0
  9. package/.kiro/specs/scripts-migration-api-first/requirements.md +165 -0
  10. package/.kiro/specs/scripts-migration-api-first/tasks.md +539 -0
  11. package/.kiro/specs/{website-design-audit → website-brand-identity}/design.md +381 -0
  12. package/.kiro/specs/{website-design-audit → website-brand-identity}/requirements.md +88 -0
  13. package/.kiro/specs/website-brand-identity/tasks.md +981 -0
  14. package/CHANGELOG.md +23 -0
  15. package/README.md +12 -3
  16. package/bin/ossa-dev +42 -0
  17. package/bin/ossa-export +32 -0
  18. package/bin/ossa-generate +60 -0
  19. package/bin/ossa-health +40 -0
  20. package/bin/ossa-init +26 -0
  21. package/dist/repositories/schema.repository.d.ts.map +1 -1
  22. package/dist/repositories/schema.repository.js +15 -10
  23. package/dist/repositories/schema.repository.js.map +1 -1
  24. package/dist/services/github-sync/github-client.d.ts +14 -0
  25. package/dist/services/github-sync/github-client.d.ts.map +1 -0
  26. package/dist/services/github-sync/github-client.js +41 -0
  27. package/dist/services/github-sync/github-client.js.map +1 -0
  28. package/dist/services/github-sync/gitlab-client.d.ts +17 -0
  29. package/dist/services/github-sync/gitlab-client.d.ts.map +1 -0
  30. package/dist/services/github-sync/gitlab-client.js +42 -0
  31. package/dist/services/github-sync/gitlab-client.js.map +1 -0
  32. package/dist/services/github-sync/schemas.d.ts +46 -0
  33. package/dist/services/github-sync/schemas.d.ts.map +1 -0
  34. package/dist/services/github-sync/schemas.js +36 -0
  35. package/dist/services/github-sync/schemas.js.map +1 -0
  36. package/dist/services/github-sync/sync.service.d.ts +27 -0
  37. package/dist/services/github-sync/sync.service.d.ts.map +1 -0
  38. package/dist/services/github-sync/sync.service.js +99 -0
  39. package/dist/services/github-sync/sync.service.js.map +1 -0
  40. package/dist/services/runtime/claude/capability-mapper.d.ts +84 -0
  41. package/dist/services/runtime/claude/capability-mapper.d.ts.map +1 -0
  42. package/dist/services/runtime/claude/capability-mapper.js +245 -0
  43. package/dist/services/runtime/claude/capability-mapper.js.map +1 -0
  44. package/dist/services/runtime/claude/claude-adapter.d.ts +80 -0
  45. package/dist/services/runtime/claude/claude-adapter.d.ts.map +1 -0
  46. package/dist/services/runtime/claude/claude-adapter.js +287 -0
  47. package/dist/services/runtime/claude/claude-adapter.js.map +1 -0
  48. package/dist/services/runtime/claude/manifest-parser.d.ts +77 -0
  49. package/dist/services/runtime/claude/manifest-parser.d.ts.map +1 -0
  50. package/dist/services/runtime/claude/manifest-parser.js +169 -0
  51. package/dist/services/runtime/claude/manifest-parser.js.map +1 -0
  52. package/dist/services/runtime/claude/types.d.ts +115 -0
  53. package/dist/services/runtime/claude/types.d.ts.map +1 -0
  54. package/dist/services/runtime/claude/types.js +6 -0
  55. package/dist/services/runtime/claude/types.js.map +1 -0
  56. package/dist/services/validation.service.d.ts.map +1 -1
  57. package/dist/services/validation.service.js +12 -1
  58. package/dist/services/validation.service.js.map +1 -1
  59. package/dist/spec/v0.2.4/ossa-0.2.4.schema.json +85 -208
  60. package/dist/spec/v0.2.6/CHANGELOG.md +401 -0
  61. package/dist/spec/v0.2.6/README.md +72 -0
  62. package/dist/spec/v0.2.6/migrations/v0.2.3-to-v0.2.4.md +599 -0
  63. package/dist/spec/v0.2.6/migrations/v0.2.5-RC-to-v0.2.6.md +65 -0
  64. package/dist/spec/v0.2.6/ossa-0.2.6.schema.json +1786 -0
  65. package/dist/spec/v0.2.6/ossa-0.2.6.yaml +581 -0
  66. package/dist/spec/v0.2.6-dev/CHANGELOG.md +164 -0
  67. package/dist/spec/v0.2.6-dev/README.md +75 -0
  68. package/dist/spec/v0.2.6-dev/migrations/v0.2.2-to-v0.2.3.md +343 -0
  69. package/dist/spec/v0.2.6-dev/migrations/v0.2.3-to-v0.2.4.md +599 -0
  70. package/dist/spec/{v0.2.4/ossa-0.2.4-dev.schema.json → v0.2.6-dev/ossa-0.2.5.schema.json} +9 -9
  71. package/dist/spec/v0.2.6-dev/ossa-0.2.5.yaml +581 -0
  72. package/{spec/v0.2.4/ossa-0.2.4-dev.schema.json → dist/spec/v0.2.6-dev/ossa-0.2.6-dev.schema.json} +9 -9
  73. package/dist/spec/v0.2.6-dev/ossa-0.2.6-dev.yaml +448 -0
  74. package/dist/spec/v0.2.7/core/agentgraph.md +324 -0
  75. package/dist/spec/v0.2.7/resources/agentgraph.yaml +135 -0
  76. package/docs/brand-guide/01-brand-overview.md +37 -0
  77. package/docs/brand-guide/02-logo-usage.md +43 -0
  78. package/docs/brand-guide/03-color-palette.md +70 -0
  79. package/docs/brand-guide/04-typography.md +82 -0
  80. package/docs/brand-guide/05-voice-and-tone.md +108 -0
  81. package/docs/brand-guide/06-visual-elements.md +137 -0
  82. package/docs/brand-guide/07-application-examples.md +153 -0
  83. package/docs/brand-guide/OssaLogo/OssA_Logo.svg +21 -0
  84. package/docs/brand-guide/OssaLogo/brand.af +0 -0
  85. package/docs/brand-guide/README.md +107 -0
  86. package/docs/comparison.md +315 -0
  87. package/docs/operations/automation-roadmap.md +245 -0
  88. package/docs/operations/github-sync-strategy.md +357 -0
  89. package/examples/anthropic/claude-assistant.ossa.json +5 -4
  90. package/examples/autogen/multi-agent.ossa.json +6 -4
  91. package/examples/crewai/research-team.ossa.json +14 -5
  92. package/examples/cursor/code-review-agent.ossa.json +21 -6
  93. package/examples/langchain/chain-agent.ossa.json +21 -5
  94. package/examples/langflow/workflow-agent.ossa.json +2 -3
  95. package/examples/langgraph/state-machine-agent.ossa.json +2 -3
  96. package/examples/llamaindex/rag-agent.ossa.json +2 -3
  97. package/examples/openai/multi-tool-agent.ossa.json +32 -9
  98. package/examples/openai/swarm-agent.ossa.json +18 -5
  99. package/examples/vercel/edge-agent.ossa.json +5 -4
  100. package/openapi/github-sync.yaml +115 -0
  101. package/package.json +25 -4
  102. package/scripts/README.md +103 -0
  103. package/scripts/auto-rebase-mrs.ts +106 -0
  104. package/scripts/batch-dependabot.sh +57 -0
  105. package/scripts/configure-gitlab-branch-protection.ts +95 -0
  106. package/scripts/create-issue-helper.ts +238 -0
  107. package/scripts/create-milestone-issue.ts +73 -0
  108. package/scripts/fix-schema-formats.js +82 -0
  109. package/scripts/generate-agents-catalog.ts +77 -0
  110. package/scripts/generate-api-docs.ts +218 -0
  111. package/scripts/generate-cli-docs.ts +410 -0
  112. package/scripts/generate-config-docs.ts +109 -0
  113. package/scripts/generate-errors-docs.ts +76 -0
  114. package/scripts/generate-examples-docs.ts +99 -0
  115. package/scripts/generate-schema-docs.ts +296 -0
  116. package/scripts/generate-types-docs.ts +48 -0
  117. package/scripts/lowercase-docs.ts +43 -0
  118. package/scripts/manage-milestone-mrs.ts +279 -0
  119. package/scripts/rebase-all-mrs.sh +75 -0
  120. package/scripts/sync-github-pr.sh +48 -0
  121. package/scripts/sync-version.js +40 -0
  122. package/scripts/sync-wiki.sh +50 -0
  123. package/scripts/validate-all.js +127 -0
  124. package/spec/v0.2.4/ossa-0.2.4.schema.json +85 -208
  125. package/spec/v0.2.6/CHANGELOG.md +401 -0
  126. package/spec/v0.2.6/README.md +72 -0
  127. package/spec/v0.2.6/migrations/v0.2.3-to-v0.2.4.md +599 -0
  128. package/spec/v0.2.6/migrations/v0.2.5-RC-to-v0.2.6.md +65 -0
  129. package/spec/v0.2.6/ossa-0.2.6.schema.json +1786 -0
  130. package/spec/v0.2.6/ossa-0.2.6.yaml +581 -0
  131. package/spec/v0.2.6-dev/CHANGELOG.md +164 -0
  132. package/spec/v0.2.6-dev/README.md +75 -0
  133. package/spec/v0.2.6-dev/migrations/v0.2.2-to-v0.2.3.md +343 -0
  134. package/spec/v0.2.6-dev/migrations/v0.2.3-to-v0.2.4.md +599 -0
  135. package/spec/v0.2.6-dev/ossa-0.2.5.schema.json +1696 -0
  136. package/spec/v0.2.6-dev/ossa-0.2.5.yaml +581 -0
  137. package/spec/v0.2.6-dev/ossa-0.2.6-dev.schema.json +1696 -0
  138. package/spec/v0.2.6-dev/ossa-0.2.6-dev.yaml +448 -0
  139. package/spec/v0.2.7/core/agentgraph.md +324 -0
  140. package/spec/v0.2.7/resources/agentgraph.yaml +135 -0
  141. package/website/DESIGN_SYSTEM_IMPLEMENTATION.md +445 -0
  142. package/website/app/about/page.tsx +53 -44
  143. package/website/app/ecosystem/page.tsx +146 -111
  144. package/website/app/globals.scss +256 -21
  145. package/website/app/page.tsx +394 -182
  146. package/website/app/page.tsx.bak +679 -0
  147. package/website/app/page.tsx.bak2 +649 -0
  148. package/website/app/schema/page.tsx +3 -3
  149. package/website/app/specification/page.tsx +1 -1
  150. package/website/components/layout/Header.tsx +27 -23
  151. package/website/components/ui/Badge.tsx +82 -0
  152. package/website/components/ui/Button.tsx +116 -0
  153. package/website/components/ui/Card.tsx +167 -0
  154. package/website/components/ui/Checkbox.tsx +141 -0
  155. package/website/components/ui/Input.tsx +169 -0
  156. package/website/components/ui/Radio.tsx +141 -0
  157. package/website/components/ui/Select.tsx +182 -0
  158. package/website/components/ui/Tag.tsx +158 -0
  159. package/website/components/ui/Textarea.tsx +195 -0
  160. package/website/components/ui/index.ts +11 -0
  161. package/website/content/docs/{00-HOME.md → 00-home.md} +1 -1
  162. package/website/content/docs/agents/catalog.md +28 -0
  163. package/website/content/docs/{AIFlow-Framework-Integration-with-OSSA.md → aiflow-framework-integration-with-ossa.md} +2 -2
  164. package/website/content/docs/api-reference/index.md +38 -0
  165. package/website/content/docs/api-reference/ossa-core-api.md +634 -0
  166. package/website/content/docs/api-reference/ossa-registry-api.md +515 -0
  167. package/website/content/docs/api-reference/unified-agent-gateway.md +599 -0
  168. package/website/content/docs/cli-reference/index.md +111 -0
  169. package/website/content/docs/cli-reference/ossa-agents.md +70 -0
  170. package/website/content/docs/cli-reference/ossa-export.md +56 -0
  171. package/website/content/docs/cli-reference/ossa-generate.md +66 -0
  172. package/website/content/docs/cli-reference/ossa-gitlab-agent.md +57 -0
  173. package/website/content/docs/cli-reference/ossa-import.md +56 -0
  174. package/website/content/docs/cli-reference/ossa-init.md +57 -0
  175. package/website/content/docs/cli-reference/ossa-migrate.md +62 -0
  176. package/website/content/docs/cli-reference/ossa-run.md +66 -0
  177. package/website/content/docs/cli-reference/ossa-schema.md +57 -0
  178. package/website/content/docs/cli-reference/ossa-setup.md +57 -0
  179. package/website/content/docs/cli-reference/ossa-validate.md +66 -0
  180. package/website/content/docs/configuration/index.md +97 -0
  181. package/website/content/docs/deployment/github-mirroring.md +924 -0
  182. package/website/content/docs/documentation.md +100 -0
  183. package/website/content/docs/ecosystem/framework-support.md +551 -9
  184. package/website/content/docs/errors/index.md +10 -0
  185. package/website/content/docs/examples/{AIFlow-Framework-Integration-with-OSSA.md → aiflow-framework-integration-with-ossa.md} +2 -2
  186. package/website/content/docs/examples/catalog.md +300 -0
  187. package/website/content/docs/for-audiences/{Students-Researchers.md → students-researchers.md} +1 -1
  188. package/website/content/docs/getting-started/{Installation.md → installation.md} +1 -1
  189. package/website/content/docs/getting-started.md +1 -1
  190. package/website/content/docs/integrations/aiflow.md +2 -2
  191. package/website/content/docs/migration-guides/anthropic-mcp-to-ossa.md +5 -5
  192. package/website/content/docs/migration-guides/crewai-to-ossa.md +3 -3
  193. package/website/content/docs/migration-guides/drupal-eca-to-ossa.md +7 -7
  194. package/website/content/docs/migration-guides/langchain-to-ossa.md +4 -4
  195. package/website/content/docs/openapi-extensions/index.md +1 -1
  196. package/website/content/docs/ossa-compliant-badge.md +1 -1
  197. package/website/content/docs/pre-release/index.md +5 -5
  198. package/website/content/docs/releases/v0.2.6.md +99 -0
  199. package/website/content/docs/schema-reference/agent-capabilities.md +50 -0
  200. package/website/content/docs/schema-reference/agent-id.md +52 -0
  201. package/website/content/docs/schema-reference/agent-name.md +50 -0
  202. package/website/content/docs/schema-reference/agent-role.md +54 -0
  203. package/website/content/docs/schema-reference/agent-version.md +50 -0
  204. package/website/content/docs/schema-reference/index.md +26 -157
  205. package/website/content/docs/types-reference/index.md +105 -0
  206. package/website/content/docs/versioning.md +3 -3
  207. package/website/dev.sh +53 -0
  208. package/website/docker-compose.dev.yml +36 -0
  209. package/website/lib/version.ts +1 -1
  210. package/website/lib/versions.json +45 -20
  211. package/website/package.json +1 -1
  212. package/website/styles/_spacing.scss +453 -0
  213. package/website/styles/_tokens.scss +245 -0
  214. package/website/styles/_typography.scss +361 -0
  215. package/website/styles/_variables.scss +270 -19
  216. package/website/tailwind.config.ts +113 -79
  217. package/.kiro/specs/agent-buildkit-templates/design.md +0 -495
  218. package/.kiro/specs/agent-buildkit-templates/requirements.md +0 -165
  219. package/.kiro/specs/kiro-ide-supercharger/README.md +0 -202
  220. package/.kiro/specs/kiro-ide-supercharger/design.md +0 -1005
  221. package/.kiro/specs/kiro-ide-supercharger/requirements.md +0 -141
  222. package/.kiro/specs/kiro-ide-supercharger/tasks.md +0 -507
  223. package/docs/issue-19-completion-summary.md +0 -648
  224. package/docs/issue-19-validation.md +0 -351
  225. package/website/content/docs/Examples.md +0 -71
  226. package/website/content/docs/OpenAPI-Extensions.md +0 -934
  227. package/website/content/docs/core-concepts/Project-Structure.md +0 -348
  228. package/website/content/docs/examples/Migration-Guides.md +0 -214
  229. package/website/content/docs/for-audiences/Architects.md +0 -224
  230. package/website/content/docs/for-audiences/Developers.md +0 -220
  231. package/website/content/docs/for-audiences/Enterprises.md +0 -256
  232. package/website/content/docs/getting-started/5-Minute-Overview.md +0 -85
  233. package/website/content/docs/getting-started/First-Agent.md +0 -196
  234. package/website/content/docs/getting-started/Hello-World.md +0 -184
  235. package/website/content/docs/migration-guides/00-INDEX.md +0 -76
  236. package/website/content/docs/migration-guides/README.md +0 -133
  237. /package/dist/spec/v0.2.4/{ossa-0.2.4-dev.yaml → ossa-0.2.4.yaml} +0 -0
  238. /package/spec/v0.2.4/{ossa-0.2.4-dev.yaml → ossa-0.2.4.yaml} +0 -0
@@ -0,0 +1,165 @@
1
+ # Requirements Document
2
+
3
+ ## Introduction
4
+
5
+ This document outlines the requirements for migrating the `/scripts` directory into `/src` following API-first, DRY (Don't Repeat Yourself), CRUD, Zod validation, and OpenAPI principles. The current scripts directory contains 30+ utility scripts with duplicated logic, inconsistent error handling, and no formal API contracts. This migration will transform these scripts into a well-architected, type-safe, API-first service layer with proper separation of concerns.
6
+
7
+ ## Glossary
8
+
9
+ - **Script**: A standalone executable file in the `/scripts` directory that performs automation tasks
10
+ - **Service**: A class-based module in `/src/services` that encapsulates business logic with dependency injection
11
+ - **Repository**: A data access layer class that handles CRUD operations for a specific domain entity
12
+ - **API Contract**: An OpenAPI specification defining the interface for a service or endpoint
13
+ - **Zod Schema**: A TypeScript-first schema validation library used for runtime type checking
14
+ - **DRY Principle**: Don't Repeat Yourself - eliminating code duplication through abstraction
15
+ - **CRUD Operations**: Create, Read, Update, Delete - standard data manipulation operations
16
+ - **CLI Command**: A command-line interface entry point that delegates to services
17
+ - **Validation Service**: The existing service at `src/services/validation.service.ts`
18
+ - **Generation Service**: The existing service at `src/services/generation.service.ts`
19
+ - **Migration Service**: The existing service at `src/services/migration.service.ts`
20
+
21
+ ## Requirements
22
+
23
+ ### Requirement 1
24
+
25
+ **User Story:** As a developer, I want all script functionality exposed through well-defined service APIs, so that I can reuse logic programmatically without duplicating code.
26
+
27
+ #### Acceptance Criteria
28
+
29
+ 1. WHEN analyzing the scripts directory THEN the system SHALL identify all unique functional domains (version management, documentation generation, GitLab operations, schema operations, validation)
30
+ 2. WHEN creating services THEN the system SHALL define OpenAPI specifications for each service before implementation
31
+ 3. WHEN implementing services THEN the system SHALL use dependency injection with the existing DI container at `src/di-container.ts`
32
+ 4. WHEN exposing service methods THEN the system SHALL validate all inputs using Zod schemas
33
+ 5. WHERE a service performs data persistence THEN the system SHALL implement a repository pattern with CRUD operations
34
+
35
+ ### Requirement 2
36
+
37
+ **User Story:** As a developer, I want version management operations centralized in a service, so that version bumping, syncing, and validation follow consistent patterns.
38
+
39
+ #### Acceptance Criteria
40
+
41
+ 1. WHEN the VersionService is created THEN the system SHALL consolidate logic from `bump-version.ts`, `sync-version.ts`, `sync-versions.ts`, and `enhanced-version-manager.ts`
42
+ 2. WHEN performing version operations THEN the system SHALL validate version strings using Zod schemas matching semver format
43
+ 3. WHEN reading version data THEN the system SHALL use a VersionRepository implementing CRUD operations for `.version.json` and `package.json`
44
+ 4. WHEN bumping versions THEN the system SHALL support major, minor, patch, and RC bump types
45
+ 5. WHEN syncing versions THEN the system SHALL update all version references across package.json, .version.json, and spec directories
46
+
47
+ ### Requirement 3
48
+
49
+ **User Story:** As a developer, I want documentation generation operations centralized in a service, so that generating API docs, CLI docs, schema docs, and other documentation follows a unified pattern.
50
+
51
+ #### Acceptance Criteria
52
+
53
+ 1. WHEN the DocumentationService is created THEN the system SHALL consolidate logic from all `generate-*-docs.ts` scripts (8 scripts total)
54
+ 2. WHEN generating documentation THEN the system SHALL validate input specifications using Zod schemas
55
+ 3. WHEN processing OpenAPI specs THEN the system SHALL use a shared OpenAPI parser with type-safe interfaces
56
+ 4. WHEN generating markdown THEN the system SHALL use a MarkdownBuilder utility class for consistent formatting
57
+ 5. WHEN writing documentation files THEN the system SHALL use a DocumentationRepository implementing CRUD operations
58
+
59
+ ### Requirement 4
60
+
61
+ **User Story:** As a developer, I want GitLab operations centralized in a service, so that merge request management, branch protection, and issue creation follow consistent patterns.
62
+
63
+ #### Acceptance Criteria
64
+
65
+ 1. WHEN the GitLabService is created THEN the system SHALL consolidate logic from `auto-rebase-mrs.ts`, `configure-gitlab-branch-protection.ts`, `create-issue-helper.ts`, `create-milestone-issue.ts`, and `manage-milestone-mrs.ts`
66
+ 2. WHEN making GitLab API calls THEN the system SHALL use the existing `@gitbeaker/node` client with proper error handling
67
+ 3. WHEN validating GitLab inputs THEN the system SHALL use Zod schemas for project IDs, merge request IDs, and issue data
68
+ 4. WHEN performing GitLab operations THEN the system SHALL implement retry logic with exponential backoff for rate limiting
69
+ 5. WHERE GitLab operations require authentication THEN the system SHALL validate API tokens using environment variable validation
70
+
71
+ ### Requirement 5
72
+
73
+ **User Story:** As a developer, I want schema operations centralized in a service, so that schema validation, generation, and fixing follow consistent patterns.
74
+
75
+ #### Acceptance Criteria
76
+
77
+ 1. WHEN the SchemaService is created THEN the system SHALL consolidate logic from `validate-schema.ts`, `fix-schema-formats.js`, `gen-types.ts`, and `gen-zod.ts`
78
+ 2. WHEN validating schemas THEN the system SHALL use the existing SchemaRepository at `src/repositories/schema.repository.ts`
79
+ 3. WHEN generating TypeScript types THEN the system SHALL use `json-schema-to-typescript` with consistent compiler options
80
+ 4. WHEN generating Zod schemas THEN the system SHALL use `json-schema-to-zod` with proper type mappings
81
+ 5. WHEN fixing schema formats THEN the system SHALL remove unsupported format constraints while preserving schema semantics
82
+
83
+ ### Requirement 6
84
+
85
+ **User Story:** As a developer, I want all services to follow CRUD repository patterns, so that data access is consistent and testable.
86
+
87
+ #### Acceptance Criteria
88
+
89
+ 1. WHEN creating repositories THEN the system SHALL implement a base Repository interface with create, read, update, delete, and list methods
90
+ 2. WHEN implementing repositories THEN the system SHALL use Zod schemas to validate data before persistence
91
+ 3. WHEN reading data THEN the system SHALL return typed domain objects, not raw JSON
92
+ 4. WHEN handling errors THEN the system SHALL throw typed domain errors, not generic Error objects
93
+ 5. WHERE repositories access the filesystem THEN the system SHALL use the existing file-ops utilities with proper error handling
94
+
95
+ ### Requirement 7
96
+
97
+ **User Story:** As a developer, I want all service inputs and outputs validated with Zod, so that runtime type safety matches compile-time types.
98
+
99
+ #### Acceptance Criteria
100
+
101
+ 1. WHEN defining service methods THEN the system SHALL create Zod schemas for all input parameters
102
+ 2. WHEN service methods return data THEN the system SHALL validate output data against Zod schemas
103
+ 3. WHEN validation fails THEN the system SHALL throw ZodError with detailed error messages
104
+ 4. WHERE complex validation logic exists THEN the system SHALL use Zod refinements and transforms
105
+ 5. WHEN schemas are reused THEN the system SHALL export them from a central `schemas` directory
106
+
107
+ ### Requirement 8
108
+
109
+ **User Story:** As a developer, I want OpenAPI specifications for all services, so that service contracts are documented and can be validated.
110
+
111
+ #### Acceptance Criteria
112
+
113
+ 1. WHEN creating a service THEN the system SHALL define an OpenAPI 3.1 specification in `openapi/services/` before implementation
114
+ 2. WHEN defining operations THEN the system SHALL use OpenAPI operation objects with complete parameter and response definitions
115
+ 3. WHEN services have shared types THEN the system SHALL use OpenAPI components and $ref for reusability
116
+ 4. WHEN OpenAPI specs are created THEN the system SHALL validate them using Redocly CLI
117
+ 5. WHERE services expose HTTP endpoints THEN the system SHALL generate API documentation from OpenAPI specs
118
+
119
+ ### Requirement 9
120
+
121
+ **User Story:** As a developer, I want CLI commands to delegate to services, so that business logic is not embedded in CLI code.
122
+
123
+ #### Acceptance Criteria
124
+
125
+ 1. WHEN creating CLI commands THEN the system SHALL use the existing Commander.js setup in `src/cli/`
126
+ 2. WHEN CLI commands execute THEN the system SHALL resolve services from the DI container
127
+ 3. WHEN CLI commands receive arguments THEN the system SHALL validate them using Zod before passing to services
128
+ 4. WHEN services throw errors THEN the system SHALL catch them in CLI commands and format user-friendly error messages
129
+ 5. WHERE CLI commands need progress indication THEN the system SHALL use consistent spinner/progress bar patterns
130
+
131
+ ### Requirement 10
132
+
133
+ **User Story:** As a developer, I want comprehensive test coverage for all services, so that refactoring is safe and regressions are caught early.
134
+
135
+ #### Acceptance Criteria
136
+
137
+ 1. WHEN implementing services THEN the system SHALL achieve minimum 80% code coverage
138
+ 2. WHEN writing unit tests THEN the system SHALL mock repository dependencies using Jest
139
+ 3. WHEN writing property-based tests THEN the system SHALL use fast-check with minimum 100 iterations
140
+ 4. WHEN testing error conditions THEN the system SHALL verify proper error types and messages are thrown
141
+ 5. WHERE services have complex business logic THEN the system SHALL write integration tests with real file system operations
142
+
143
+ ### Requirement 11
144
+
145
+ **User Story:** As a developer, I want the migration to be incremental, so that the system remains functional throughout the transition.
146
+
147
+ #### Acceptance Criteria
148
+
149
+ 1. WHEN migrating scripts THEN the system SHALL maintain backward compatibility by keeping original scripts as thin wrappers
150
+ 2. WHEN services are implemented THEN the system SHALL update one functional domain at a time
151
+ 3. WHEN testing migration THEN the system SHALL verify original script behavior matches new service behavior
152
+ 4. WHERE scripts are deprecated THEN the system SHALL add deprecation warnings with migration instructions
153
+ 5. WHEN migration is complete THEN the system SHALL remove deprecated scripts and update all documentation
154
+
155
+ ### Requirement 12
156
+
157
+ **User Story:** As a developer, I want shared utilities properly organized, so that common functionality is easily discoverable and reusable.
158
+
159
+ #### Acceptance Criteria
160
+
161
+ 1. WHEN organizing utilities THEN the system SHALL move `scripts/lib/*` to `src/utils/` with proper exports
162
+ 2. WHEN creating new utilities THEN the system SHALL follow single responsibility principle with focused modules
163
+ 3. WHEN utilities are used THEN the system SHALL import from path aliases (`@utils/*`) not relative paths
164
+ 4. WHERE utilities have configuration THEN the system SHALL use Zod schemas for configuration validation
165
+ 5. WHEN utilities throw errors THEN the system SHALL use typed domain errors with proper error codes