@ccoalm/ccl-skills 0.1.0

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 (561) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +49 -0
  3. package/dist/assets/marketplace/.agents/plugins/marketplace.json +12 -0
  4. package/dist/assets/marketplace/.claude-plugin/marketplace.json +13 -0
  5. package/dist/assets/marketplace/marketplace-manifest.json +12 -0
  6. package/dist/assets/marketplace/plugins/ccl-skills/.claude-plugin/marketplace.json +16 -0
  7. package/dist/assets/marketplace/plugins/ccl-skills/.claude-plugin/plugin.json +5 -0
  8. package/dist/assets/marketplace/plugins/ccl-skills/.codex-plugin/plugin.json +5 -0
  9. package/dist/assets/marketplace/plugins/ccl-skills/.worktree-only +3 -0
  10. package/dist/assets/marketplace/plugins/ccl-skills/agent-context/session-start.md +45 -0
  11. package/dist/assets/marketplace/plugins/ccl-skills/agent-context/subagent-start.md +12 -0
  12. package/dist/assets/marketplace/plugins/ccl-skills/hooks/AGENTS.md +19 -0
  13. package/dist/assets/marketplace/plugins/ccl-skills/hooks/guard-delegation-owner.sh +125 -0
  14. package/dist/assets/marketplace/plugins/ccl-skills/hooks/guard-edit-isolation.sh +102 -0
  15. package/dist/assets/marketplace/plugins/ccl-skills/hooks/guard-merge-authorization.sh +1156 -0
  16. package/dist/assets/marketplace/plugins/ccl-skills/hooks/hooks.json +131 -0
  17. package/dist/assets/marketplace/plugins/ccl-skills/hooks/merge-authorization-prompt.sh +142 -0
  18. package/dist/assets/marketplace/plugins/ccl-skills/hooks/owner-dispatch-guard.sh +12 -0
  19. package/dist/assets/marketplace/plugins/ccl-skills/hooks/owner-dispatch-stop.sh +13 -0
  20. package/dist/assets/marketplace/plugins/ccl-skills/hooks/remind-post-merge-cleanup.sh +144 -0
  21. package/dist/assets/marketplace/plugins/ccl-skills/hooks/session-context.sh +87 -0
  22. package/dist/assets/marketplace/plugins/ccl-skills/hooks/session-start.sh +86 -0
  23. package/dist/assets/marketplace/plugins/ccl-skills/hooks/skill-extraction-gate-stop.sh +69 -0
  24. package/dist/assets/marketplace/plugins/ccl-skills/hooks/subagent-start.sh +26 -0
  25. package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_guard_delegation_owner.sh +329 -0
  26. package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_guard_edit_isolation.sh +322 -0
  27. package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_guard_merge_authorization.sh +902 -0
  28. package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_merge_authorization_prompt.sh +178 -0
  29. package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_remind_post_merge_cleanup.sh +121 -0
  30. package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_session_start.sh +170 -0
  31. package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/AGENTS.md +17 -0
  32. package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/ccl-skills.ts +564 -0
  33. package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/commands/ccl-install-skills.md +14 -0
  34. package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/commands/ccl-update-skills.md +44 -0
  35. package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/commands/ccl-verify-skills.md +109 -0
  36. package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/commands/ccl-worktree-check.md +36 -0
  37. package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/AGENTS.md +28 -0
  38. package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/README.md +276 -0
  39. package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/owner-dispatch.example.json +10 -0
  40. package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/owner-dispatch.sh +1307 -0
  41. package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/test.sh +941 -0
  42. package/dist/assets/marketplace/plugins/ccl-skills/skills/agents-file-coverage-gate/SKILL.md +45 -0
  43. package/dist/assets/marketplace/plugins/ccl-skills/skills/agents-file-coverage-gate/agents/openai.yaml +4 -0
  44. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/SKILL.md +188 -0
  45. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/agents/openai.yaml +4 -0
  46. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/android-dev.md +92 -0
  47. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/flutter-dev.md +80 -0
  48. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/ios-dev.md +72 -0
  49. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/kotlin-multiplatform.md +93 -0
  50. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/mobile-platform-boundaries.md +77 -0
  51. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/mobile-quality-release.md +77 -0
  52. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/source-evidence-map.md +64 -0
  53. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/SKILL.md +353 -0
  54. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/agents/openai.yaml +4 -0
  55. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/client-routing.md +419 -0
  56. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/manual-invocation-and-prompts.md +126 -0
  57. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/staged-review-contract.md +197 -0
  58. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/timeout-auth-and-capabilities.md +179 -0
  59. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/AGENTS.md +98 -0
  60. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/classify_envelope.py +93 -0
  61. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/classify_timeout_exit.sh +15 -0
  62. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/claude_review.sh +1438 -0
  63. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/codex_review.sh +324 -0
  64. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/concern_excerpt.py +295 -0
  65. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/egress_schema.py +214 -0
  66. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/init_policy_matrix.py +642 -0
  67. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/kimi_packet_mcp.py +181 -0
  68. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/kimi_review.sh +1165 -0
  69. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/opencode_review.sh +1190 -0
  70. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/parse_cli_review.py +946 -0
  71. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/parse_opencode_review.py +474 -0
  72. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/parse_probe_result.py +1899 -0
  73. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/parse_review_json.py +200 -0
  74. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/review_gate.py +2845 -0
  75. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/review_gate.sh +6 -0
  76. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/run_claude_capture.py +71 -0
  77. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/runtime-surface-verification-design.md +53 -0
  78. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_classify_envelope.sh +68 -0
  79. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_claude_review_probe.sh +2311 -0
  80. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_cli_review_wrappers.sh +1832 -0
  81. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_code_review_identity.sh +73 -0
  82. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_concern_excerpt.sh +245 -0
  83. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_egress_schema.sh +177 -0
  84. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_init_policy_matrix.sh +272 -0
  85. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_kimi_packet_mcp.py +195 -0
  86. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_opencode_review_concurrency.sh +120 -0
  87. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_opencode_review_retry.sh +1005 -0
  88. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_parse_opencode_review.sh +258 -0
  89. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_parse_probe_result.sh +574 -0
  90. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_parse_review_json.sh +349 -0
  91. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_review_client_compat.py +434 -0
  92. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_review_client_order.sh +264 -0
  93. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_review_gate.sh +2412 -0
  94. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/verify_native_skill_binding.py +123 -0
  95. package/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/SKILL.md +153 -0
  96. package/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/agents/openai.yaml +4 -0
  97. package/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/references/diagnosis-playbook.md +54 -0
  98. package/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/references/prevention-routing.md +36 -0
  99. package/dist/assets/marketplace/plugins/ccl-skills/skills/feature-risk-router/SKILL.md +69 -0
  100. package/dist/assets/marketplace/plugins/ccl-skills/skills/feature-risk-router/agents/openai.yaml +4 -0
  101. package/dist/assets/marketplace/plugins/ccl-skills/skills/feature-risk-router/references/security-review-gate.md +41 -0
  102. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/SKILL.md +165 -0
  103. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/agents/openai.yaml +4 -0
  104. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/api-security-boundaries.md +47 -0
  105. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/architecture-playbook.md +160 -0
  106. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/artifact-generation-architecture.md +37 -0
  107. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/audit-history-architecture.md +29 -0
  108. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/bulk-workflow-architecture.md +33 -0
  109. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/config-rule-routing-architecture.md +34 -0
  110. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/cross-cutting-concerns.md +72 -0
  111. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/data-modeling-and-migrations.md +79 -0
  112. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/data-platform-architecture.md +210 -0
  113. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/dependency-platform.md +105 -0
  114. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/developer-tooling-architecture.md +38 -0
  115. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/error-contract-architecture.md +36 -0
  116. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/event-driven-architecture.md +260 -0
  117. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/http-gateway-architecture.md +74 -0
  118. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/mq-consumer-architecture.md +38 -0
  119. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/multi-tenant-isolation.md +275 -0
  120. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/notification-architecture.md +25 -0
  121. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/ops-checklist.md +57 -0
  122. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/performance-capacity-architecture.md +38 -0
  123. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/protobuf-contract-architecture.md +119 -0
  124. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/redis-cache-coordination.md +93 -0
  125. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/release-runtime-readiness.md +65 -0
  126. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/replay-comparison-architecture.md +26 -0
  127. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/runtime-observability.md +94 -0
  128. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/service-scaffold.md +76 -0
  129. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/source-evidence-map.md +55 -0
  130. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/workflow-state-architecture.md +38 -0
  131. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/SKILL.md +159 -0
  132. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/agents/openai.yaml +4 -0
  133. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/artifact-generation-patterns.md +37 -0
  134. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/audit-history-patterns.md +28 -0
  135. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/bulk-import-export-patterns.md +56 -0
  136. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/config-rule-routing-patterns.md +38 -0
  137. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/data-access-patterns.md +55 -0
  138. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/db-schema-and-dal-patterns.md +109 -0
  139. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/dependency-client-patterns.md +130 -0
  140. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/developer-tooling-patterns.md +70 -0
  141. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/domain-feature-patterns.md +78 -0
  142. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/engineering-patterns.md +119 -0
  143. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/error-contract-patterns.md +55 -0
  144. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/feature-playbook.md +61 -0
  145. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/http-gateway-client-patterns.md +76 -0
  146. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/mq-consumer-patterns.md +55 -0
  147. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/notification-patterns.md +42 -0
  148. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/observability-implementation-patterns.md +101 -0
  149. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/performance-capacity-patterns.md +44 -0
  150. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/protobuf-contract-patterns.md +72 -0
  151. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/public-api-integration-patterns.md +56 -0
  152. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/quality-and-testing-patterns.md +91 -0
  153. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/redis-cache-lock-patterns.md +123 -0
  154. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/release-ops-patterns.md +112 -0
  155. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/reliability-patterns.md +83 -0
  156. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/replay-comparison-patterns.md +32 -0
  157. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/scaffold-and-codegen.md +86 -0
  158. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/source-evidence-map.md +54 -0
  159. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/state-machine-task-patterns.md +45 -0
  160. package/dist/assets/marketplace/plugins/ccl-skills/skills/grill-me/SKILL.md +80 -0
  161. package/dist/assets/marketplace/plugins/ccl-skills/skills/grill-me/agents/openai.yaml +4 -0
  162. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/SKILL.md +117 -0
  163. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/agents/openai.yaml +4 -0
  164. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-approval-auto-reviewer.md +106 -0
  165. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-command-sandbox.md +441 -0
  166. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-context-freshness.md +47 -0
  167. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-credentials-auth.md +13 -0
  168. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-extensions-skills.md +13 -0
  169. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-file-edit-protocol.md +129 -0
  170. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-ide-integration.md +5 -0
  171. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-input-ingestion.md +13 -0
  172. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-instruction-composition.md +13 -0
  173. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-lifecycle-hooks.md +92 -0
  174. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-messaging.md +5 -0
  175. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-runtime-bootstrap.md +5 -0
  176. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-session-persistence.md +448 -0
  177. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-task-orchestration.md +13 -0
  178. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-tool-dispatch.md +123 -0
  179. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-turn-lifecycle.md +131 -0
  180. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/inference-capacity-operations.md +162 -0
  181. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/llm-client-gateway.md +156 -0
  182. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/model-prompt-evaluation.md +146 -0
  183. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/retrieval-agent-safety.md +273 -0
  184. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/SKILL.md +202 -0
  185. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/agents/openai.yaml +4 -0
  186. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/contracts-and-state.md +62 -0
  187. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/cross-stack-alignment.md +94 -0
  188. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/framework-choice.md +76 -0
  189. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/online-practice-uptake.md +56 -0
  190. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/platform-capabilities.md +91 -0
  191. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/product-page-checklist.md +40 -0
  192. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/qa-release.md +72 -0
  193. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/source-evidence-map.md +82 -0
  194. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-agent-delegation/SKILL.md +103 -0
  195. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-agent-delegation/agents/openai.yaml +5 -0
  196. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-agent-delegation/references/multi-agent-delegation-playbook.md +100 -0
  197. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/SKILL.md +70 -0
  198. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/agents/openai.yaml +4 -0
  199. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/references/public-data-acquisition.md +549 -0
  200. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/references/public-disclosure-channels.md +97 -0
  201. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/references/research-prompts.md +66 -0
  202. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/scripts/AGENTS.md +32 -0
  203. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/scripts/test-public-data-acquisition-recipes.sh +379 -0
  204. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/SKILL.md +244 -0
  205. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/agents/openai.yaml +4 -0
  206. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/alerting-and-on-call.md +76 -0
  207. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/framework-middleware-checklist.md +142 -0
  208. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/infra-component-deployment.md +268 -0
  209. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/log-correlation-recipe.md +124 -0
  210. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/log-schema-canonical.md +208 -0
  211. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/metrics-conventions.md +105 -0
  212. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/obs-stack-architecture.md +107 -0
  213. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/sli-slo-design.md +95 -0
  214. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/source-register.md +11 -0
  215. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/SKILL.md +303 -0
  216. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/agents/openai.yaml +4 -0
  217. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/canary-and-rollout-strategy.md +163 -0
  218. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/config-center-via-etcd.md +245 -0
  219. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/custom-control-plane-boundary.md +298 -0
  220. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/deploy-cli-concrete-recipe.md +312 -0
  221. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/deploy-pipeline.md +165 -0
  222. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/env-and-lane-matrix.md +126 -0
  223. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/lane-orchestration-control-plane.md +383 -0
  224. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/multi-region-and-cluster.md +135 -0
  225. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/promotion-gate-and-review.md +149 -0
  226. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/python-package-registry-release.md +462 -0
  227. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/rollback-playbook.md +123 -0
  228. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/secret-and-config-management.md +231 -0
  229. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/version-authority-and-deprecation.md +21 -0
  230. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/SKILL.md +276 -0
  231. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/agents/openai.yaml +4 -0
  232. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/dual-sidecar-and-traffic-config-center.md +127 -0
  233. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/framework-middleware.md +143 -0
  234. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/grpc-authority-workaround.md +90 -0
  235. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/http-response-envelope-contract.md +24 -0
  236. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/mesh-architecture.md +127 -0
  237. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/multi-env-routing.md +192 -0
  238. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/protobuf-http-contract-signals.md +64 -0
  239. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/retry-timeout-circuit-breaker.md +124 -0
  240. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/rpc-framework-recipe.md +494 -0
  241. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/service-discovery-choice.md +113 -0
  242. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/service-discovery-migration-playbook.md +231 -0
  243. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/service-discovery-recipe.md +131 -0
  244. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/SKILL.md +235 -0
  245. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/agents/openai.yaml +4 -0
  246. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/adr-convention.md +146 -0
  247. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-checklist.md +30 -0
  248. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-evaluation-report-template.md +25 -0
  249. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-execution-spec.md +108 -0
  250. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-sop.md +457 -0
  251. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-templates.md +24 -0
  252. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/artifact-egress-confidentiality.md +58 -0
  253. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/code-review-checklist.md +86 -0
  254. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/cross-repo-coordination.md +46 -0
  255. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/delivery-lifecycle.md +192 -0
  256. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/design-review-gate-mechanics.md +62 -0
  257. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/design-routing-and-readiness.md +45 -0
  258. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/diagnostic-spec-match-gate.md +36 -0
  259. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/dispatch-owner-skills.md +35 -0
  260. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/dormant-code-activation.md +47 -0
  261. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/existing-project-assessment-report.md +223 -0
  262. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/external-skill-augmentation.md +46 -0
  263. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/feature-deprecation-cascade.md +15 -0
  264. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/high-risk-resilience-gates.md +73 -0
  265. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/implementation-completeness-and-minimality.md +120 -0
  266. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/implementation-entry-reentry-gate.md +122 -0
  267. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/modular-monolith-heuristic.md +105 -0
  268. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/pre-final-continuation-gate.md +115 -0
  269. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/problem-resolution-and-learning.md +62 -0
  270. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/quality-attributes.md +112 -0
  271. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/quality-remediation-program.md +88 -0
  272. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/rd-standards-doc-family-checklist.md +27 -0
  273. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/refactoring-discipline.md +52 -0
  274. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/review-reception.md +34 -0
  275. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/shared-gate-artifact-classification.md +76 -0
  276. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/source-evidence-map.md +31 -0
  277. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/status-tracker-sync.md +77 -0
  278. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/sync-spec-repo-contract.md +25 -0
  279. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/verify-developer-experience.md +34 -0
  280. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/worktree-mechanics.md +55 -0
  281. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/scripts/AGENTS.md +18 -0
  282. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/scripts/check-agent-contract-coverage.sh +213 -0
  283. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/SKILL.md +136 -0
  284. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/agents/openai.yaml +9 -0
  285. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/analytics-visualization-interactions.md +206 -0
  286. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/behavioral-aesthetic-logic.md +108 -0
  287. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/complex-creation-interactions.md +194 -0
  288. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/design-execution-checklist.md +214 -0
  289. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/design-impl-naming-and-versioning.md +53 -0
  290. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/design-intake-and-acceptance.md +129 -0
  291. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/design-system-source-of-truth.md +97 -0
  292. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/external-ui-ux-quality-benchmarks.md +79 -0
  293. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/frontend-code-evidence-map.md +63 -0
  294. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/interaction-design-patterns.md +146 -0
  295. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/layout-recipes-and-screenshot-acceptance.md +250 -0
  296. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/multi-project-token-consistency.md +237 -0
  297. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/multi-stack-strategy.md +65 -0
  298. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/operational-processing-workflows.md +237 -0
  299. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/platform-mobile-patterns.md +324 -0
  300. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/platform-web-desktop-patterns.md +456 -0
  301. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/product-lifecycle-acceptance-and-iteration.md +114 -0
  302. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/product-surface-patterns.md +79 -0
  303. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/resource-management-interactions.md +113 -0
  304. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/scenario-community-patterns.md +133 -0
  305. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/source-map.md +130 -0
  306. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/tokens-and-components.md +47 -0
  307. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/trust-sensitive-ai-and-data-patterns.md +96 -0
  308. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/ui-ux-audit.md +106 -0
  309. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/ui-ux-design-development.md +176 -0
  310. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/visual-craft.md +111 -0
  311. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/SKILL.md +157 -0
  312. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/agents/openai.yaml +4 -0
  313. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/ai-service-integration-boundaries.md +57 -0
  314. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/api-contract-and-schema.md +62 -0
  315. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/api-security-boundaries.md +39 -0
  316. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/architecture-playbook.md +46 -0
  317. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/async-execution-model.md +24 -0
  318. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/background-jobs-and-scheduling.md +18 -0
  319. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/batch-and-pipeline-architecture.md +11 -0
  320. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/config-secrets-runtime.md +22 -0
  321. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/data-modeling-and-migrations.md +64 -0
  322. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/data-platform-architecture.md +211 -0
  323. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/event-driven-architecture.md +263 -0
  324. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/multi-tenant-isolation.md +281 -0
  325. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/observability-and-ops.md +26 -0
  326. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/packaging-runtime-readiness.md +20 -0
  327. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/redis-cache-coordination.md +41 -0
  328. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/reliability-and-error-contract.md +17 -0
  329. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/source-evidence-map.md +55 -0
  330. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/web-framework-boundaries.md +26 -0
  331. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/SKILL.md +143 -0
  332. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/agents/openai.yaml +4 -0
  333. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/ai-service-wiring-patterns.md +16 -0
  334. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/async-and-worker-patterns.md +24 -0
  335. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/background-job-patterns.md +18 -0
  336. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/batch-and-artifact-patterns.md +13 -0
  337. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/dependency-client-patterns.md +39 -0
  338. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/error-handling-patterns.md +26 -0
  339. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/feature-playbook.md +43 -0
  340. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/observability-implementation-patterns.md +31 -0
  341. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/project-structure-and-tooling.md +24 -0
  342. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/public-api-security-patterns.md +52 -0
  343. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/redis-cache-lock-patterns.md +78 -0
  344. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/schema-and-validation-patterns.md +23 -0
  345. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/source-evidence-map.md +56 -0
  346. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/sqlalchemy-and-migrations-patterns.md +99 -0
  347. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/testing-and-quality-patterns.md +61 -0
  348. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/web-framework-patterns.md +35 -0
  349. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/SKILL.md +91 -0
  350. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/agents/openai.yaml +4 -0
  351. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/config-runtime-readback.md +20 -0
  352. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/mr-merge-authorization.md +31 -0
  353. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/post-release-env-reset.md +31 -0
  354. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/release-closeout-evidence.md +20 -0
  355. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/release-scope-confirmation.md +21 -0
  356. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/tag-and-prod-pipeline-gate.md +20 -0
  357. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/test-scope-prompt.md +24 -0
  358. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/watcher-discipline.md +14 -0
  359. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/SKILL.md +64 -0
  360. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/agents/openai.yaml +4 -0
  361. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/references/comment-safe-release-doc.md +19 -0
  362. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/references/release-evidence-workflow.md +23 -0
  363. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/references/release-testing-scope-section.md +15 -0
  364. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-baseline/SKILL.md +87 -0
  365. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-baseline/agents/openai.yaml +4 -0
  366. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/SKILL.md +130 -0
  367. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/agents/openai.yaml +4 -0
  368. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/references/prd-composition-contract.md +35 -0
  369. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/references/requirement-closure-contract.md +86 -0
  370. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/references/security-four-questions.md +38 -0
  371. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-intent/SKILL.md +91 -0
  372. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-intent/agents/openai.yaml +4 -0
  373. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-scope/SKILL.md +88 -0
  374. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-scope/agents/openai.yaml +4 -0
  375. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/SKILL.md +337 -0
  376. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/agents/openai.yaml +4 -0
  377. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/analysis-parse-fix-test-challenge-replay.md +47 -0
  378. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/attribution-verification.md +69 -0
  379. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/bootstrap-slim-c3-obligation-table.md +112 -0
  380. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/coverage-exhaustion-traps.md +45 -0
  381. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/description-authoring.md +162 -0
  382. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/dual-track-review-gate.md +507 -0
  383. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/eval-routing.md +86 -0
  384. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/evidence-card-template.md +51 -0
  385. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/example-domain-preselect.md +79 -0
  386. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/external-practice-controls.md +57 -0
  387. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/extraction-lifecycle-handoff.md +65 -0
  388. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/extraction-quickstart.md +194 -0
  389. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/firing-point-placement.md +75 -0
  390. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/harness-patterns-and-eval.md +286 -0
  391. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/incident-postmortem-extraction.md +190 -0
  392. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/l0-l1-l2-routing.md +114 -0
  393. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/online-skill-review.md +47 -0
  394. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/parallel-stack-references-pattern.md +164 -0
  395. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/r0-leakage-audit.md +90 -0
  396. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/recurring-anti-patterns-checklist.md +320 -0
  397. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/resume-paused-delivery.md +16 -0
  398. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/review-feedback-mining.md +33 -0
  399. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/review-finding-standards.md +57 -0
  400. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/review-rubric.md +40 -0
  401. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/rule-consolidation.md +118 -0
  402. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/skill-listing-budget.md +19 -0
  403. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/source-register.md +254 -0
  404. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/source-to-skill-extraction.md +658 -0
  405. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/two-source-extraction-pattern.md +167 -0
  406. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/uiux-judgment-extraction.md +179 -0
  407. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/uiux-routing-map.md +51 -0
  408. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/validation-and-landing.md +180 -0
  409. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/AGENTS.md +18 -0
  410. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-ccl-skills.sh +1452 -0
  411. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-evidence-card-leak.sh +491 -0
  412. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-mr-target-freshness.sh +173 -0
  413. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-size-budget.sh +488 -0
  414. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-sync-pointers.sh +419 -0
  415. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/eval-golden-trace.rb +197 -0
  416. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/eval-health.rb +327 -0
  417. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/eval-routing-bank.rb +401 -0
  418. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/eval-routing.rb +248 -0
  419. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/generic-r0-leak-scan.sh +282 -0
  420. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/governing-chain-diff.py +321 -0
  421. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/impact-chain-gate.rb +964 -0
  422. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/register-firing-path-resolution.rb +708 -0
  423. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/skill-behavior-eval.py +540 -0
  424. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/source-register-lifecycle.rb +51 -0
  425. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/source-register-pending-status.rb +55 -0
  426. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_ai_coding_implementation_gates.sh +829 -0
  427. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_impact_chain_refscripts.sh +1203 -0
  428. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_r0_status.sh +75 -0
  429. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_register_pending_exclusion.sh +137 -0
  430. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_regressions.sh +173 -0
  431. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_route_drift.sh +377 -0
  432. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_size_budget.sh +833 -0
  433. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_skill_catalog.sh +491 -0
  434. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_source_register_lifecycle.sh +114 -0
  435. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_mr_target_freshness.sh +261 -0
  436. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_sync_pointers.sh +538 -0
  437. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_controlled_escalation_pins.sh +154 -0
  438. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_eval_routing_bank_grader_diagnostics.sh +190 -0
  439. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_eval_routing_bank_surface_binding.sh +178 -0
  440. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_eval_routing_prose_target.sh +86 -0
  441. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_generic_r0_leak_scan.sh +131 -0
  442. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_git_identity_predicate_gate.sh +243 -0
  443. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_governing_chain_diff.sh +419 -0
  444. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_impact_chain_gate_dateless_host.sh +120 -0
  445. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_register_firing_path_resolution.sh +724 -0
  446. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_register_firing_path_wiring.sh +414 -0
  447. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_regression_runner_registration.sh +34 -0
  448. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_routing_bank_integrity.sh +205 -0
  449. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_routing_pointer_integrity.sh +194 -0
  450. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_validate_skill_credential_cwd.sh +61 -0
  451. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_validate_skill_cross_refs.sh +111 -0
  452. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_validate_skill_root_depth.sh +53 -0
  453. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/validate-skill.sh +257 -0
  454. package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/SKILL.md +98 -0
  455. package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/agents/openai.yaml +4 -0
  456. package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/references/input-state-machines.md +36 -0
  457. package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/references/streaming-rich-output.md +130 -0
  458. package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/references/terminal-side-channels.md +96 -0
  459. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/SKILL.md +408 -0
  460. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/agents/openai.yaml +4 -0
  461. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/AGENTS.md +18 -0
  462. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/bitable-setup.md +573 -0
  463. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/ci_templates/README.md +120 -0
  464. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/ci_templates/github-actions.yml +119 -0
  465. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/ci_templates/gitlab-ci.yml +76 -0
  466. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/ci_templates/jenkins.Jenkinsfile +106 -0
  467. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/classical-test-design-techniques.md +279 -0
  468. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/gen_report.py +2807 -0
  469. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/makefile-template.md +200 -0
  470. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/report-config-schema.md +272 -0
  471. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/run_pytestless.py +475 -0
  472. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/source-to-case-workflows.md +258 -0
  473. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc-marker-conventions.md +316 -0
  474. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc-review-and-prioritization.md +145 -0
  475. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/AGENTS.md +16 -0
  476. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/tc.dart +129 -0
  477. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/tc.go +197 -0
  478. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/tc.py +135 -0
  479. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/tc.ts +285 -0
  480. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/test_gen_report.py +2144 -0
  481. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/update-lifecycle.md +62 -0
  482. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/SKILL.md +212 -0
  483. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/agents/openai.yaml +4 -0
  484. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/ci-fixtures-and-flake-control.md +75 -0
  485. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/client-runtime-test-matrices.md +50 -0
  486. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/data-and-workflow-testing.md +34 -0
  487. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/design-closed-contract-oracles.md +31 -0
  488. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/e2e-real-flow-testing.md +71 -0
  489. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/fitness-functions.md +240 -0
  490. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/integration-contract-testing.md +235 -0
  491. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/non-functional-specialized-scenarios.md +296 -0
  492. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/rd-testing-standard-template.md +126 -0
  493. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/run-killing-mutation-walk.md +43 -0
  494. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/scenario-testing.md +136 -0
  495. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/source-evidence-map.md +59 -0
  496. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/structured-tc-input-translation.md +67 -0
  497. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/test-code-authoring-patterns.md +392 -0
  498. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/test-data-and-determinism.md +39 -0
  499. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/test-topology-and-commands.md +92 -0
  500. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/unit-testing.md +46 -0
  501. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/vendored-contract-drift-checklist.md +64 -0
  502. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/verify-enforcement-mechanisms.md +18 -0
  503. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/AGENTS.md +17 -0
  504. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/client-terminal-ansi-check.py +140 -0
  505. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/client-terminal-ansi-check.test.sh +75 -0
  506. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/lang-basics-ast-check.py +170 -0
  507. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/lang-basics-ast-check.test.sh +87 -0
  508. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/lang-basics-go-check.go +198 -0
  509. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/lang-basics-go-check.test.sh +109 -0
  510. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/test_mutation_backup_recipe.sh +237 -0
  511. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/SKILL.md +184 -0
  512. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/agents/openai.yaml +4 -0
  513. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/comment-safe-feishu.md +93 -0
  514. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/cross-model-co-review.md +3 -0
  515. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/delivery-face-closeout.md +60 -0
  516. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/doc-charter-first.md +17 -0
  517. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/session-vantage-leakage.md +58 -0
  518. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/SKILL.md +126 -0
  519. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/agents/openai.yaml +4 -0
  520. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/complex-workspace-patterns.md +47 -0
  521. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/embedded-h5-in-host.md +87 -0
  522. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/react-architecture.md +194 -0
  523. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/source-evidence-map.md +60 -0
  524. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/web-quality-release.md +190 -0
  525. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/web-ui-quality.md +83 -0
  526. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/SKILL.md +179 -0
  527. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/agents/openai.yaml +4 -0
  528. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/references/shared-branch-rebase.md +25 -0
  529. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/AGENTS.md +23 -0
  530. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/test_worktree_status.sh +207 -0
  531. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/test_worktree_sweep.sh +481 -0
  532. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/worktree-status.sh +325 -0
  533. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/worktree-sweep.sh +245 -0
  534. package/dist/assets/release.json +2797 -0
  535. package/dist/claude-adapter.d.ts +9 -0
  536. package/dist/claude-adapter.js +240 -0
  537. package/dist/cli-worker.d.ts +1 -0
  538. package/dist/cli-worker.js +32 -0
  539. package/dist/cli.d.ts +22 -0
  540. package/dist/cli.js +214 -0
  541. package/dist/codex-host.d.ts +30 -0
  542. package/dist/codex-host.js +162 -0
  543. package/dist/fs-safe.d.ts +21 -0
  544. package/dist/fs-safe.js +241 -0
  545. package/dist/index.d.ts +2 -0
  546. package/dist/index.js +1 -0
  547. package/dist/manifest.d.ts +8 -0
  548. package/dist/manifest.js +135 -0
  549. package/dist/opencode-adapter.d.ts +10 -0
  550. package/dist/opencode-adapter.js +416 -0
  551. package/dist/operations.d.ts +3 -0
  552. package/dist/operations.js +956 -0
  553. package/dist/paths.d.ts +20 -0
  554. package/dist/paths.js +4 -0
  555. package/dist/types.d.ts +58 -0
  556. package/dist/types.js +1 -0
  557. package/dist/unified.d.ts +4 -0
  558. package/dist/unified.js +64 -0
  559. package/dist/version.d.ts +2 -0
  560. package/dist/version.js +5 -0
  561. package/package.json +35 -0
@@ -0,0 +1,72 @@
1
+ # Cross-Cutting Concerns
2
+
3
+ ## Error Model
4
+
5
+ - Define a small canonical error taxonomy: success, invalid input, unauthorized, forbidden, not found, conflict, dependency failure, timeout, panic/internal.
6
+ - Keep internal error causes in logs and traces; expose stable code/message pairs to clients.
7
+ - Map transport-native failures into the canonical model:
8
+ - HTTP status and response body should agree.
9
+ - RPC domain errors should preserve code/message across client and server middleware.
10
+ - Worker failures should explicitly decide retry, dead-letter, or skip.
11
+ - Do not let raw dependency errors become public API contracts.
12
+
13
+ ## Context Propagation
14
+
15
+ - Every inbound request creates or accepts a trace/log id, then returns it in the response metadata where possible.
16
+ - Carry lane/environment, authorization/resource scope, auth subject, and request deadline through HTTP, RPC, DB, Redis, MQ, and external HTTP calls.
17
+ - Async producers should put trace/log metadata into the message when the queue supports it; consumers should create a new log id only when none exists.
18
+ - Avoid storing context values that are domain inputs better represented as typed request fields.
19
+
20
+ ## Auth And Permission Boundary
21
+
22
+ - Split authentication from authorization.
23
+ - Authentication resolves the subject, token/session state, resource scope, and client application.
24
+ - Authorization checks whether that subject can perform the operation on the target resource.
25
+ - Public bypass paths such as health/debug/login must be explicit and prefix-safe.
26
+ - Permission checks should be injectable so product-specific policy can evolve without rewriting transport middleware.
27
+
28
+ ## Internal Service Trust
29
+
30
+ - Treat internal RPC and internal HTTP as separate trust boundaries from public API, not as automatically trusted traffic.
31
+ - Prefer workload identity, mTLS, signed service tokens, or an equivalent service identity mechanism for service-to-service calls.
32
+ - Authorize service callers by operation and resource scope when a service boundary protects sensitive data or side effects.
33
+ - Propagate caller service identity separately from end-user subject so audit logs can distinguish user action from service delegation.
34
+ - Bypass rules for internal health, readiness, or discovery endpoints must be explicit and narrower than ordinary internal APIs.
35
+
36
+ ## Timeout Budgeting
37
+
38
+ - Set default timeouts for every transport and dependency.
39
+ - Allow method-specific overrides for high-latency operations, but keep an upper bound.
40
+ - Honor the caller's context deadline when it is shorter than the local default.
41
+ - For RPC clients, separate connection timeout from request timeout.
42
+ - For background jobs, set both lock lease and max execution time.
43
+
44
+ ## Observability Contract
45
+
46
+ - Metrics should cover QPS, latency, success, error by canonical error code, panic count, dependency latency, queue lag, retry count, and job duration.
47
+ - Attach low-cardinality tags: service, method/API/job, environment/lane, caller/callee, and canonical error code.
48
+ - Logs should include trace/log id and safe domain identifiers, but avoid request/response bodies unless gated by environment/config.
49
+ - Long-running requests/jobs should have heartbeat or progress visibility when they can exceed normal latency windows.
50
+
51
+ ## Admission Control And Backpressure
52
+
53
+ - Define inbound request limits by route/method, caller, authorization scope, or operation cost before traffic grows.
54
+ - Use concurrency limits for expensive handlers and worker pools; queue only when bounded wait time and cancellation behavior are defined. Do not share one concurrency/resource budget across workloads with different lifetime profiles (short unary request vs long-lived stream); give each a separate, opt-in budget, and validate the interdependent budget fields as a set rather than individually.
55
+ - Load shedding should return a stable canonical error and emit metrics that separate overload from dependency failure.
56
+ - Circuit breakers protect dependency calls and high-cost workflows; define open, half-open, and recovery behavior explicitly.
57
+ - Backpressure must be visible to upstream callers through retry-after hints, queue depth, or rejection metrics where the protocol supports it.
58
+
59
+ ## Streaming And Large Payloads
60
+
61
+ - Streaming RPC, server-sent events, WebSocket, upload, and download paths need explicit connection lifetime, idle timeout, max message/body size, and cancellation behavior.
62
+ - Validate content type, content length, file extension, and object metadata before expensive processing.
63
+ - Outbound file or URL fetches need scheme/host allowlists, redirect policy, size limits, content-type checks, and private-network protection.
64
+ - Temporary files and generated artifacts need namespace, quota, cleanup owner, and failure cleanup policy.
65
+ - Stream progress, partial failure, and client disconnects should map to stable errors and metrics.
66
+
67
+ ## Context Propagation Boundary
68
+
69
+ - The set of ctx keys a portfolio relies on is platform contract, not per-service convenience. Architecture defines tiers: global keys carried on every request (trace/log id, PSM/service identity, lane, IDC, cluster, stress tag), API-context keys derived after gateway auth (user, tenant, organization, role), and inbound HTTP header mappings (`X-*` → canonical ctx name).
70
+ - Every ctx key has a typed accessor; bare-string `ctx.Value(...)` returning `any` is an architecture finding, not an idiom to spread. Type assertion lives behind helpers, not in domain code.
71
+ - For frameworks that propagate metadata over the wire, define which keys travel persistently (every downstream hop forwards them) versus transiently (one hop only). Lane, stress tag, and trace identity are typically persistent; one-off control flags should not be promoted to persistent.
72
+ - Dual-injection compatibility: when one binary serves multiple transports (TTHeader Thrift + HTTP/2 gRPC), the propagation layer writes to both the framework's persistent value (`metainfo.WithPersistentValue`) and the transport's outgoing metadata so the framework's meta handler picks the right wire format at send time. Application code stays transport-agnostic.
@@ -0,0 +1,79 @@
1
+ # Data Modeling And Migrations
2
+
3
+ Use this when designing relational data ownership, schema, indexes, migrations, sharding, or generated DAL boundaries for a Go microservice.
4
+
5
+ ## Ownership
6
+
7
+ - Each service owns its write schema. Other services should not write owned tables directly.
8
+ - Cross-service reads should use RPC/API, events, or explicit read models.
9
+ - Shared database servers are an infrastructure detail; shared write ownership is an architecture smell.
10
+ - A table should have a clear owning service, lifecycle owner, retention policy, and operational contact.
11
+
12
+ ## Schema Design
13
+
14
+ - Start from domain invariants, not handler DTOs.
15
+ - Define primary key, domain unique keys, status/state fields, version fields, timestamps, and soft-delete behavior deliberately.
16
+ - Prefer explicit integer or enum-like status fields over free-form strings for state machines.
17
+ - Store counters, quotas, mutable quantities, and precise numeric amounts in types that preserve precision and are safe for atomic updates.
18
+ - Avoid JSON columns for core queryable truth unless the schema is intentionally extensible and indexed access is not required.
19
+ - Include created/updated metadata only when the product can maintain it consistently.
20
+
21
+ ## Index And Query Model
22
+
23
+ - Every list/query API should name its expected filters, sort order, and pagination strategy before schema is finalized.
24
+ - Unique constraints should represent product invariants, not just performance hints.
25
+ - Composite indexes should match common equality filters first, then range/order fields.
26
+ - Review composite indexes against actual access paths, not table columns in isolation. For each important read, update, delete, and post-upsert re-query path, name the leading equality or `IN` fields, optional range/order fields, join fields, soft-delete predicate, and expected cardinality; then verify the DDL has a matching left-prefix index or a deliberate projection/search alternative.
27
+ - When an upsert or de-duplication path later re-queries rows to recover generated fields, the schema must expose a stable unique or conflict key that matches that re-query. Extra predicates in the re-query must be redundant, indexed, or explicitly justified; otherwise the write path can silently miss rows or rely on accidental data shape.
28
+ - Add non-production query-plan checks when the stack supports them, but treat them as a safety net rather than a replacement for schema review.
29
+ - DAL/query helpers should make unsafe scans difficult: require explicit conditions for updates/deletes, require bounded limits for list reads, cap maximum batch size, and force explicit justification for full-table work.
30
+ - Avoid offset pagination for large or operational lists; prefer keyset pagination with a stable order.
31
+ - Leading-wildcard `LIKE`, broad `OR`, tuple or large `IN`, and `DISTINCT` over joined tables are schema-design warnings for hot user paths. Either prove bounded cardinality and a plan budget, or split the use case into exact-match filters plus a search/read-model path.
32
+ - Full-table reads need an explicit justification, bounded cardinality, or an offline/backfill execution model.
33
+ - Search, analytics, and document stores are projections unless explicitly chosen as source of truth.
34
+
35
+ ## Transactions
36
+
37
+ - A transaction boundary should align with one service-owned relational store.
38
+ - Re-read mutable state inside the transaction before applying quantities, quotas, counters, or state transitions.
39
+ - Prefer compare-and-update, row lock, optimistic version, or unique-key idempotency for concurrent writes.
40
+ - Cross-system writes need outbox/inbox, idempotency, compensation, or a clear reconciliation process.
41
+ - Do not rely on Redis locks as the only correctness mechanism for durable relational truth.
42
+
43
+ ## Sharding
44
+
45
+ - Decide sharding before data volume forces it; retrofitting sharding is a migration project.
46
+ - Define shard key, shard count, suffix format, routing function, and whether a main table is retained during migration.
47
+ - Shard key must be present in writes and targeted reads.
48
+ - Do not allow updates to shard key columns.
49
+ - Multi-shard queries should be rare, explicit, bounded, and preferably served by a projection/read model.
50
+ - DDL and index changes must apply consistently to every shard.
51
+
52
+ ## Migration Strategy
53
+
54
+ - Migrations must be compatible with currently deployed code and rollback path.
55
+ - Migration design should cover historical data, queued messages, cached values, generated models, and read/write compatibility rather than only the final schema.
56
+ - Safe order for most changes:
57
+ - add nullable column or new table.
58
+ - deploy code that dual-reads or writes both shapes when needed.
59
+ - backfill in bounded batches.
60
+ - switch reads.
61
+ - remove old shape only after all code paths are migrated.
62
+ - Risky migrations need feature gates, progress metrics, retry/skip behavior, and resume markers.
63
+ - Rollback plans should cover schema, data backfill, generated code, dynamic config, and message compatibility.
64
+
65
+ ## Generated DAL Boundary
66
+
67
+ - DDL can be the source for generated model structs, table constants, query builders, update builders, and baseline DAL interfaces.
68
+ - Generated code should protect immutable columns such as primary key, create time, creator, and unique domain keys from generic updates.
69
+ - Generated query/update builders should expose typed comparison operators and explicit update-column selection rather than raw string fragments by default.
70
+ - Generated query builders are for simple filters; complex query methods still belong in hand-written repositories with tests.
71
+ - Generated output is part of the change and should be reviewed for semantic drift.
72
+ - Generated repository helpers should encode write-safety invariants, but architecture review still owns the invariant behind them: which columns are immutable, which fields form unique identity, which filters are mandatory for tenant or scope isolation, and which paths are allowed to bypass normal sharding or soft-delete behavior.
73
+
74
+ ## Outbox And Dual-Write Consistency
75
+
76
+ - DB-plus-Redis or DB-plus-MQ writes that must reflect the same business fact use an outbox table; the outbox row is written in the same transaction as the business write. A relay (worker, sidecar, or CDC consumer) publishes pending rows at-least-once and marks them processed.
77
+ - Architecture declares which write paths cross a durability boundary and therefore need outbox; ad hoc dual writes are review findings. The consumer-side idempotency mechanism (unique key, idempotency store, state machine) is named per outbox topic.
78
+ - High-throughput paths may use CDC (binlog tail, logical replication) instead of polling; architecture names the chosen strategy and the durability contract it provides.
79
+ - Outbox health signals (oldest-pending-age, failed-publish count) belong to the platform observability layer; this skill names the emission contract.
@@ -0,0 +1,210 @@
1
+ # Data Platform Architecture (Go)
2
+
3
+ Use when designing the data-platform substrate of a service or service-fleet: DB engine choice (single-instance OLTP, managed cloud DB, distributed SQL, sharding middleware), HA topology, read scaling and replica routing, sharding and resharding strategy, cross-region replication, backup and restore (with rehearsed recovery), cluster lifecycle (provision / scale / decommission / re-shard), capacity planning, fleet-wide schema-migration coordination, and connection-pool / proxy topology.
4
+
5
+ This complements `data-modeling-and-migrations.md` (which owns schema, index, transaction, outbox, and per-service migration concerns): this file owns the **substrate** that schema and queries sit on. Load both when designing a new data-bound service or auditing an existing one.
6
+
7
+ > **Sibling sync.** A parallel `python-service-architecture/references/data-platform-architecture.md` mirrors **all non-stack-specific sections** of this file. Only the *Go-specific implementation patterns* section diverges by stack. The mirrored sections stay free of three categories of stack-specific token: DB-engine-specific syntax, runtime/concurrency-mechanic names, and library/framework API names. The concrete token list and grep command live in the *Mirrored-section grep gate* subsection at the end of this file's stack-glue.
8
+
9
+ > **Sanitization boundary.** Vendor names (PostgreSQL, MySQL, Vitess, TiDB, CockroachDB, Aurora, Cloud Spanner, AlloyDB, Cloud SQL, DynamoDB, RDS Proxy, PgBouncer, ProxySQL, S3, Glacier, gp3, io2, etc.) below are illustrative; concrete topology choices, region names, cluster identifiers, and capacity numbers live only in the maintainer's private alias map. The sanitization audience list is positive (external / client / regulator / SOC / procurement / internal-compliance / sales-engineering / partner draft / forwardable-internal); sanitize before any document leaves the implementation team's approved audience.
10
+ >
11
+ > **Sanitization vs grep gate are separate concerns.** The mirrored-section grep gate at the end of this file's stack-glue forbids *stack-specific implementation syntax* in mirrored content; "zero hits" on the gate is not "safe to forward externally." The illustrative vendor / cloud-service / storage-tier names above are *intentionally* in mirrored content (an architect must reason about engine choice across stacks); they require **manual sanitization review** before this file or excerpts are forwarded to the audiences above. Maintain the vendor-name list above as the canonical set of names that require manual replacement before external publication.
12
+
13
+ ## When this applies / does not apply
14
+
15
+ Apply when:
16
+ - the service owns a durable relational store (its own DB instance, schema, or shared cluster),
17
+ - the team owns operations of that store (per the business-team-owns-data-infra ownership model),
18
+ - the service or fleet faces a sharding, HA, replication, backup, or capacity decision that goes beyond schema design,
19
+ - the team is choosing between standard OLTP + manual sharding, sharding middleware, or a distributed SQL engine.
20
+
21
+ Skip when:
22
+ - the service uses a fully-managed external DB whose lifecycle is owned by the cloud provider (RDS Aurora / Cloud Spanner / DynamoDB), and the team is only choosing schema and queries — route to `data-modeling-and-migrations.md`,
23
+ - the service is stateless and only consumes data via the data platform owned by another team — route to that team's contract.
24
+
25
+ ## DB engine choice axis
26
+
27
+ The choice is not "PostgreSQL or MySQL" — it is the position on this axis:
28
+
29
+ - **Single-instance OLTP** (PostgreSQL / MySQL on one node, with replicas). Familiar, broad ecosystem, low operational complexity. Sharding becomes a migration project once one instance maxes out.
30
+ - **Single-instance OLTP + sharding middleware** (Vitess in front of MySQL, ShardingSphere, application-layer sharding). Keeps the operational model of single-instance OLTP per shard while spreading load across shards. Adds middleware layer to operate; routing complexity moves into the proxy.
31
+ - **Distributed SQL engine** (TiDB, CockroachDB, YugabyteDB, Spanner-shape). Native horizontal scale, transactions across shards, native HA. Trades latency (Raft / Paxos quorum write path) and operational model (cluster of stateful nodes with consensus protocols) for transparent scale.
32
+ - **Cloud-managed equivalents** (Aurora, Cloud SQL, AlloyDB, DynamoDB, Spanner). The provider owns operations; the team owns schema, queries, and contract. Cost model differs; vendor-specific scaling and pricing characteristics matter.
33
+
34
+ Pick by:
35
+ - **Expected scale** — single-instance maxes out at the box's IOPS / connection ceiling; sharding middleware scales horizontally but each shard is still single-instance ops; distributed SQL scales nodes transparently but at consensus latency cost.
36
+ - **Transaction shape** — single-shard transactions are cheap on all engines; multi-shard transactions are expensive on middleware (two-phase commit, distributed coordinator), built-in on distributed SQL, impossible without an outbox/saga on per-shard apps.
37
+ - **Operational ownership** — single-instance is straightforward; sharding middleware adds a layer to monitor; distributed SQL needs in-house consensus-protocol experience or vendor support; managed cloud DB outsources ops.
38
+ - **Migration path** — choose so the next-tier migration is reachable from this one (start single-instance with a sharding-key contract so a future shard migration does not require schema rewrite).
39
+
40
+ Document the chosen engine, the next-tier migration trigger, and the operational footprint per cluster.
41
+
42
+ ## HA topology
43
+
44
+ State the HA model explicitly per cluster:
45
+
46
+ - **Failover model** — single-primary + synchronous standby with automatic failover (most common); single-primary + async replicas (no automatic failover, RTO = manual promotion time); multi-primary (rare, conflict-resolution required); consensus-based (Raft / Paxos with N replicas, leader election internal to the engine).
47
+ - **Synchronous vs asynchronous replication** — sync gives RPO = 0 at the cost of write latency (every write waits for the standby to ack); async writes are faster but the standby lags. Mixed: sync to one standby (RPO = 0) + async to others (read scaling).
48
+ - **Failover trigger** — health check threshold, automatic promotion, split-brain protection (fencing of the demoted primary). Define the failover time budget; test it on a real schedule.
49
+ - **Quorum semantics** — for consensus engines, the write quorum (e.g., majority of N replicas). Loss of quorum = no writes. The minimum healthy replica count to remain writable is part of the topology contract.
50
+ - **Cross-AZ vs single-AZ** — single-AZ failover handles instance failure; cross-AZ handles AZ failure; cross-region handles region failure. Each tier costs more in latency.
51
+
52
+ Document the failover RTO and RPO targets per cluster, and the last date a failover was tested in production-like conditions (tested vs theoretical).
53
+
54
+ ## Read scaling and replica routing
55
+
56
+ Once read load exceeds a single primary's capacity, read replicas spread the load:
57
+
58
+ - **Replica lag** — async replicas lag the primary by milliseconds to seconds; sync replicas lag by zero but slow writes. Define the maximum acceptable lag per use case.
59
+ - **Read-your-writes consistency** — a read replica may not yet show a write the same client just made. Either route those reads to the primary (the standard "session pinning" pattern), use a per-tenant or per-session replica with a lag budget, or accept eventual consistency on that path.
60
+ - **Replica routing** — at the application layer (the service chooses primary or replica per query), at the proxy layer (the proxy routes by SQL shape), or at the engine layer (the engine routes read-only transactions to replicas). The proxy / engine path is more transparent but moves correctness into infrastructure.
61
+ - **Staleness budget** — per query class, declare the maximum acceptable replica lag; monitor and alert when exceeded; fall back to primary when budget is breached.
62
+
63
+ Replica use is not free: failure modes include lagging replicas serving stale rows, replica connection-pool exhaustion, and replicas falling out of sync after primary failover (must re-attach).
64
+
65
+ ## Sharding and resharding
66
+
67
+ When a single primary cannot handle write volume or storage, shard:
68
+
69
+ - **Shard key** — the column or hash that determines which shard a row lives on. Once committed it is hard to change. Choose carefully: tenant_id for SaaS; resource_id for partitioned workloads; time bucket for time-series; composite (tenant_id, year) for both.
70
+ - **Shard count and growth** — start with more shards than nodes (each node holds N shards), so adding nodes redistributes existing shards rather than re-keying. Shard count growth requires a re-shard migration.
71
+ - **Sharding model** — hash (uniform distribution, no range queries cross-shard), range (range queries cheap, hot range risk), lookup-table / directory (flexible, indirection layer to maintain), composite (tenant + sub-shard).
72
+ - **Cross-shard transactions** — expensive (two-phase commit or distributed coordinator) or impossible (no XA support). Design the domain so cross-shard transactions are rare; route those to outbox/saga workflows when needed.
73
+ - **Resharding path** — the upgrade from N shards to N+M, or from one engine to another. Define: new-shard provisioning, dual-write window, reconciliation, cutover, decommission. Resharding is a multi-week project; estimate it before starting.
74
+
75
+ ## Cross-region replication
76
+
77
+ When the service serves users in multiple regions, or compliance requires data residency, replicate across regions:
78
+
79
+ - **Sync vs async cross-region** — sync gives RPO = 0 but adds inter-region RTT to every write (50–100 ms typical, business-critical or not). Async lets writes complete in the originating region; the secondary region lags.
80
+ - **Multi-region writes** — global tables (each region writes locally, conflict resolution per-row), per-region partitions (each tenant pinned to one region, no cross-region writes for that tenant), single-primary-with-read-replicas-elsewhere (writes only in the home region, reads anywhere).
81
+ - **Data residency** — when "tenant X's data stays in region Y" is a contractual obligation (see `multi-tenant-isolation.md`), the data plane is region-per-tenant or region-pinned by tenant.
82
+ - **Cross-region failure scope** — what happens when a region goes down? Define which clusters fail over to which, which tenants are affected, and the time budget for restore-to-secondary.
83
+
84
+ ## Backup, restore, and tested recovery
85
+
86
+ Backup strategy is not the backup itself; it is the **tested ability to restore**:
87
+
88
+ - **Backup types** — full snapshots (consistent point-in-time, large), incremental snapshots (diff from last snapshot), WAL / binlog archive (continuous, supports PITR), logical exports (portable, slower restore).
89
+ - **Recovery objectives** — RPO (max data loss in seconds/minutes; depends on backup frequency and WAL archival), RTO (max time to restore; depends on backup size, restore mechanism, and tested practice).
90
+ - **Cross-region backup** — store backups in a different region than the primary so a region outage does not also lose the backups.
91
+ - **Encryption at rest in backups** — backups carry the same encryption boundary as the primary; key rotation includes backup re-encryption (or accept that old backups remain on old keys).
92
+ - **Tested recovery (the rule that distinguishes real from theatre)** — restore from backup on a schedule. Validate the restored state matches expected. Time the restore and compare to RTO. A backup that has never been restored is a backup of unknown quality. Date the last successful restore in the cluster contract.
93
+
94
+ ## Cluster lifecycle
95
+
96
+ The cluster has a lifecycle as concrete as any service:
97
+
98
+ - **Provision** — declarative infra (Terraform / equivalent), parameter group, encryption-at-rest configuration, network placement, audit log destination, monitoring scrape config, identity / role setup. Provisioning is reproducible; one-off manual clusters are technical debt.
99
+ - **Scale up** — increasing instance class (vertical) without downtime requires planned maintenance windows on most engines; budget for it.
100
+ - **Scale out** — adding nodes (replicas, shards) requires re-balancing and may briefly affect write latency. Define the scale-out runbook.
101
+ - **Decommission** — taking a cluster out of service: drain traffic, verify zero writes/reads against it for an observation window, snapshot for retention, then destroy. Premature destroy after "looks idle" is a real outage class.
102
+ - **Cluster identity** — the cluster has a name, owner, lifecycle stage, and a connection contract documented; services that connect to it are listed.
103
+
104
+ ## Capacity planning
105
+
106
+ A data cluster has multiple capacity dimensions, each can become the bottleneck:
107
+
108
+ - **Storage** — current usage, growth rate, headroom; alert at 70% / 80% / 90% with an explicit response. Storage growth past auto-extend limits is a hard outage.
109
+ - **IOPS / throughput** — provisioned (e.g., AWS gp3 / io2) or burst-limited; monitor utilization vs limit; right-size before the limit is hit.
110
+ - **Connection ceiling** — the engine's max connections; the proxy's connection pool size; the per-service pool. A connection storm at startup (every instance opens 100 connections) can exceed the ceiling instantly.
111
+ - **Query latency budget** — p50 / p95 / p99 latency; growth in p99 is a leading indicator before throughput saturates.
112
+ - **Replica lag headroom** — lag spikes during heavy writes are normal; sustained lag indicates the replica cannot keep up.
113
+
114
+ Each dimension has a documented limit, current usage, growth rate, and the action when the threshold trips. Capacity planning is monthly minimum, weekly during growth.
115
+
116
+ ## Fleet-wide schema migration coordination
117
+
118
+ When the fleet has more than ~20 service DBs and migration tooling is per-DB, fleet-wide coordination becomes its own concern:
119
+
120
+ - **Migration registry** — a catalog of which service owns which DB, which schema version each is on, and which migrations are pending. Without this, a fleet-wide change (e.g., adding a tenant_id column for compliance) cannot be tracked.
121
+ - **Coordinated change rollout** — when the change spans services (a new column in shared semantics, a deprecation of a cross-service contract), define the order: which service migrates first, which dual-reads, when the old shape is retired.
122
+ - **Migration tool unification** — fleet-wide migrations work best when every service uses the same migration tool with the same conventions; mixed tooling makes fleet operations brittle.
123
+ - **Migration approval gate** — at fleet scale, migrations need pre-merge review (does it break replicas? does it lock tables? does it require downtime?). A "migration approval" workflow + checklist beats heroics.
124
+
125
+ ## Connection pool and proxy topology
126
+
127
+ The path from app to DB has its own architecture:
128
+
129
+ - **Per-service pool** — each service instance holds its own connection pool. Simple, but fleet-wide connection count = (services × instances × pool_size). Watch the engine's max-connections ceiling.
130
+ - **Proxy layer** (PgBouncer, ProxySQL, Vitess gateway, RDS Proxy) — a proxy multiplexes many service connections into fewer DB connections. Reduces the connection count seen by the engine. Adds a hop (latency) and a layer to operate.
131
+ - **Transaction-mode vs session-mode pooling** — transaction-mode is denser (more service connections per DB connection) but breaks features that rely on session state (prepared statements, advisory locks, session variables). Session-mode preserves features at the cost of density.
132
+ - **Connection lifecycle** — the pool's idle timeout, max lifetime, and reconnect-on-error policy. A connection storm on app start (every instance opens 50 connections at once) is a common outage trigger.
133
+ - **Proxy HA** — the proxy must be HA-paired or per-AZ; a single proxy is a single point of failure for every service behind it.
134
+
135
+ ## Cost and efficiency
136
+
137
+ Data layer cost grows with scale; explicit cost ownership prevents drift:
138
+
139
+ - **Right-sizing** — instance class, storage tier (provisioned IOPS vs gp3 vs gp2), backup retention. Over-provisioned clusters are real money.
140
+ - **Cold storage and archival** — old rows that are rarely read move to cheaper storage (S3 / Glacier / equivalent); the archival path must preserve tenant scope and support re-hydration (see `multi-tenant-isolation.md`).
141
+ - **Read-replica tax** — replicas cost as much as primaries; only run replicas that have a real reader.
142
+ - **Cross-region transfer** — egress and inter-region replication traffic costs add up; budget per cluster.
143
+
144
+ ## Anti-patterns
145
+
146
+ Block these:
147
+
148
+ - **Sharding decided after a single-instance outage** — emergency sharding under load is a real outage class. Decide shard key and shard count before the migration is forced.
149
+ - **Backups that have never been restored** — backups of unknown quality; the first restore is during the incident. Schedule restore drills.
150
+ - **Failover that has never been tested in production-like conditions** — RTO is theoretical until proven. Test on a schedule with realistic load.
151
+ - **Cross-region sync writes used to hide application bugs** — using cross-region sync replication to mask consistency bugs in the app layer; the latency tax is permanent. Fix the bug.
152
+ - **Hot shard** — one shard absorbs the majority of writes (popular tenant, hot resource, time-bucket clustering). Audit shard key cardinality before launch.
153
+ - **Long-running transactions on primary** — analytical queries that hold long locks, blocking writes. Route analytical traffic to replicas or a separate warehouse.
154
+ - **Connection storm on app start** — every instance opens its full pool at boot, exceeding the engine ceiling. Stagger pool warmup or use a proxy.
155
+ - **Proxy as single point of failure** — one PgBouncer instance fronting the whole cluster. Pair or per-AZ.
156
+ - **Engine choice driven by hype, not by transaction shape** — picking distributed SQL for a 100-write/sec workload, or single-instance OLTP for a workload that needs distributed transactions. The transaction shape determines the engine, not vice versa.
157
+ - **Schema migration that locks the table on a hot path** — a migration that holds a strong lock for minutes; the service is effectively down. Use online-DDL tooling and review migration locking behavior pre-merge.
158
+ - **Backup retention shorter than the deletion / regulatory clock** — restoring a 30-day backup to recover yesterday's data only works if the backup is within retention. Coordinate backup retention with data-deletion SLAs (see `multi-tenant-isolation.md` per-store deletion modes).
159
+ - **Primary DB as cross-service queue** — using a service's primary OLTP table as the substrate for cross-service async messaging via polling. Adds queue load to the primary's connection pool and IOPS budget; couples the broker semantics to the DB's locking and transaction model; lacks fanout, replay, and lag visibility that a proper broker provides. Route durable cross-service async messaging to `event-driven-architecture.md` (broker + outbox poller); allow only low-volume same-service jobs with an explicit capacity budget against the primary.
160
+
161
+ ## Operations checklist (data platform launch)
162
+
163
+ Each item is a verifiable action:
164
+
165
+ - Engine choice declared with the next-tier migration trigger (e.g., "single-instance until 50k QPS sustained; migrate to sharding middleware at that threshold").
166
+ - HA topology documented: failover model, sync/async configuration, quorum semantics, cross-AZ placement, failover RTO/RPO targets, last tested-failover date.
167
+ - Read-replica routing decision documented per query class with staleness budget and fallback-to-primary path.
168
+ - Sharding model declared (shard key, shard count, growth path) before the first shard is provisioned; not retrofitted.
169
+ - Cross-region replication mode declared per cluster (sync / async / multi-region / per-region partitioned); residency commitments enforced at the data plane.
170
+ - Backup strategy declared: type (snapshot / WAL / logical), frequency, retention, cross-region location, encryption-at-rest, RPO target.
171
+ - Restore drill scheduled on a documented cadence; last successful restore dated; restore time vs RTO target measured.
172
+ - Cluster lifecycle steps documented: provision (declarative IaC), scale up/out (runbook), decommission (drain + observe + snapshot + destroy); no one-off manual clusters.
173
+ - Capacity dimensions monitored (storage, IOPS, connections, latency p99, replica lag) with documented alert thresholds and response runbooks.
174
+ - Fleet-wide migration registry exists; per-service migration tool + version recorded; coordinated migrations have an order and approval gate.
175
+ - Connection pool sizes documented per service; proxy topology declared (per-service / proxy layer / mixed) with HA pairing where a proxy is used.
176
+ - Cost reviewed monthly; right-sizing reviewed quarterly; cold-storage / archival path tested.
177
+
178
+ ## Go-specific implementation patterns
179
+
180
+ Stack-localized recipes; the sibling Python file localizes the same patterns differently.
181
+
182
+ - **DB driver and pool** — `database/sql` with the engine-specific driver (`pgx`/`lib/pq` for PostgreSQL, `go-sql-driver/mysql` for MySQL). Configure `SetMaxOpenConns`, `SetMaxIdleConns`, `SetConnMaxLifetime`, `SetConnMaxIdleTime` explicitly; do not rely on defaults. For higher-level access, GORM or sqlx on top of `database/sql`.
183
+ - **Sharding middleware integration** — Vitess via its grpc / mysql wire protocol; treat as a regular MySQL connection in `database/sql`. Sharding decisions visible to the proxy via routing rules (VSchema for Vitess); the app's job is to include the shard key in every query.
184
+ - **Replica routing** — connect strings for primary vs replica are separate DSNs; a small router in the service picks per-query (e.g., a wrapper around `*sql.DB` that exposes `PrimaryDB() *sql.DB` and `ReplicaDB() *sql.DB`). For session-stuck reads (read-your-writes), pin to primary for the session.
185
+ - **Migration tooling** — `golang-migrate/migrate` or `goose` for per-service migrations; `Atlas` for declarative schema management; pick one and stick to it across the fleet for the migration registry to be useful.
186
+ - **Outbox poller integration** — the data-platform-architecture decisions (which engine, what HA, replica lag budget) feed into the outbox poller's behavior described in `event-driven-architecture.md` and `data-modeling-and-migrations.md` (Outbox And Dual-Write Consistency).
187
+ - **PgBouncer with Go** — Go's `database/sql` works fine with PgBouncer in transaction-mode IF the app avoids prepared statements (`?` placeholders) and session-scoped state (advisory locks, session variables). For session-mode, all Go features work. Choose mode per service's feature usage.
188
+ - **Vitess gateway** — looks like MySQL on the wire; transactions across shards require explicit 2PC or routing to a single shard. The Vitess `vtgate` exposes a `direct` mode for unrouted queries; use sparingly.
189
+ - **Health checks for HA** — a service's readiness probe pings the DB; a failed ping → mark un-ready. Distinguish "primary unreachable" (fail) from "replica lagging" (degrade but still ready for non-critical reads).
190
+ - **Connection storm mitigation** — staggered pool warmup (sleep N×instance_id ms before opening connections at boot); circuit breaker on DB connect failures; exponential backoff on reconnect.
191
+ - **Test substitution** — define a repository interface; provide a real-DB integration test (`testcontainers-go` for PostgreSQL / MySQL containers); avoid mocking the DB driver directly (mocks lose SQL semantics).
192
+
193
+ ### Mirrored-section grep gate
194
+
195
+ The sibling-sync header forbids three categories of stack-specific token in mirrored sections (everything from "When this applies" through "Operations checklist"; everything *before* the `## Go-specific implementation patterns` H2). Run this grep against the mirrored region before every commit; zero hits required.
196
+
197
+ Forbidden tokens for this Go file's mirrored sections:
198
+
199
+ - **DB-engine syntax** — `SET LOCAL`, `set_config\(`, `current_setting\(`, `pg_try_advisory`, `pg_stat_activity`, `BYPASSRLS`, `FORCE ROW LEVEL SECURITY`, `search_path`, `GET_LOCK\(`.
200
+ - **Runtime / concurrency mechanic names** — `context\.Context`, `\bgoroutine\b`, `\bgoroutines\b`, `ctx\.Done`, `database/sql`, `\bsqlx\b`, `contextvars`, `\basyncio\b`, `run_in_executor`, `to_thread`, `ThreadPoolExecutor`, `ProcessPoolExecutor`, `copy_context`, `async with`, `after_commit`, `listens_for`, `asyncio\.Queue`, `asyncio\.Event`, `asyncio\.create_task`, `asyncio\.Task`.
201
+ - **Library / framework API names** — `GORM`, `Hertz`, `Kitex`, `golang-migrate`, `\bgoose\b`, `\bAtlas\b`, `pgx`, `lib/pq`, `go-sql-driver/mysql`, `SetMaxOpenConns`, `SetMaxIdleConns`, `SetConnMaxLifetime`, `SetConnMaxIdleTime`, `PingContext`, `(^|[^[:alnum:]_])\*?sql\.DB\b`, `(^|[^[:alnum:]_])sql\.Tx\b`, `BeginTx`, `QueryContext`, `ExecContext`, `(^|[^[:alnum:]_])sql\.Rows\b`, `(^|[^[:alnum:]_])sql\.NullString\b`, `DB\.Stats`, `PrimaryDB\(`, `ReplicaDB\(`, `testcontainers-go`, `\btestcontainers\b`, `SQLAlchemy`, `FastAPI`, `Starlette`, `Pydantic`, `httpx`, `Alembic`, `asyncpg`, `psycopg`, `aiomysql`, `asyncmy`, `mysqlclient`, `PyMySQL`, `Django`, `databases`, `sqlmodel`, `tortoise`, `pool_pre_ping`.
202
+
203
+ Run:
204
+
205
+ ```
206
+ awk '/^## Go-specific implementation patterns/{exit} 1' data-platform-architecture.md \
207
+ | grep -nE '(SET LOCAL|set_config\(|current_setting\(|pg_try_advisory|pg_stat_activity|BYPASSRLS|FORCE ROW LEVEL SECURITY|search_path|GET_LOCK\(|context\.Context|\bgoroutine\b|\bgoroutines\b|ctx\.Done|database/sql|\bsqlx\b|contextvars|\basyncio\b|run_in_executor|to_thread|ThreadPoolExecutor|ProcessPoolExecutor|copy_context|async with|after_commit|listens_for|asyncio\.Queue|asyncio\.Event|asyncio\.create_task|asyncio\.Task|GORM|Hertz|Kitex|golang-migrate|\bgoose\b|\bAtlas\b|pgx|lib/pq|go-sql-driver/mysql|SetMaxOpenConns|SetMaxIdleConns|SetConnMaxLifetime|SetConnMaxIdleTime|PingContext|(^|[^[:alnum:]_])\*?sql\.DB\b|(^|[^[:alnum:]_])sql\.Tx\b|BeginTx|QueryContext|ExecContext|(^|[^[:alnum:]_])sql\.Rows\b|(^|[^[:alnum:]_])sql\.NullString\b|DB\.Stats|PrimaryDB\(|ReplicaDB\(|testcontainers-go|\btestcontainers\b|SQLAlchemy|FastAPI|Starlette|Pydantic|httpx|Alembic|asyncpg|psycopg|aiomysql|asyncmy|mysqlclient|PyMySQL|Django|databases|sqlmodel|tortoise|pool_pre_ping)'
208
+ ```
209
+
210
+ Allowed exception: the *Sibling sync* header itself names the three category classes (without tokens) and references this gate; the *Sanitization boundary* header does not contain any of these tokens. Vendor names in mirrored sections that name a DB engine class (PostgreSQL / MySQL / Vitess / TiDB / CockroachDB / PgBouncer / ProxySQL) are allowed because they are engine choices an architect must reason about across stacks; the gate forbids stack-specific *implementation syntax*, not generic engine names.
@@ -0,0 +1,105 @@
1
+ # Dependency Platform
2
+
3
+ Use this when designing reusable dependency access for new Go backend services.
4
+
5
+ ## Secret Provider Contract
6
+
7
+ - Treat secrets as runtime dependencies, not config literals.
8
+ - Repo-committed config may contain secret references, credential names, key ids, roles, service identifiers, and endpoint identities; it must not contain raw app secrets, webhook secrets, passwords, access keys, or private tokens.
9
+ - Secret lookups need typed accessors per credential class: database, Redis, MQ, object storage, external API, and application credential.
10
+ - The secret provider should expose read paths separately from write/admin paths.
11
+ - Startup may fail fast when required credentials are missing; request handling should not panic on missing runtime secrets. More generally, never let a critical invariant ride on a dependency's incidental or undocumented behavior (e.g. it happening to panic on nil wiring); assert and own the invariant locally with a construction-time fail-fast guard, keeping an explicit test opt-out.
12
+ - Cache short-lived credentials with a safety buffer before expiry.
13
+ - Validate local clock skew when using time-bound credentials.
14
+ - Never log secret values, temporary tokens, signatures, raw encrypted payloads, or decrypted config.
15
+ - Prefer authenticated encryption or a managed secret store. If local encryption is unavoidable, keep keys outside source/config and rotate deliberately.
16
+
17
+ ## Service Discovery And Lane Routing
18
+
19
+ - Internal clients should resolve endpoints through a discovery abstraction, not hardcoded host lists.
20
+ - Health-filtered instances are the default.
21
+ - Lane/environment tags may route traffic, but fallback is operation-specific: read-only requests on idempotent endpoints MAY fall back to a stable baseline lane; writes, tenant-sensitive reads, and any request that mutates state or carries canary/stress assumptions MUST fail closed when the requested lane has no healthy instance. Document the fallback policy per route, default to fail-closed for unmarked routes.
22
+ - Keep service identity, lane, and endpoint selection visible in logs and traces.
23
+ - Do not let service discovery failure silently fall back to an unrelated public endpoint.
24
+ - If external components are registered into service discovery from config, model it as desired-state reconciliation: load desired endpoints, resolve hostnames, compare endpoint plus metadata, register changed instances, and deregister stale instances.
25
+ - Registration metadata should be low-cardinality and intentional: source host, lane/environment, protocol, ownership, and routing tags when needed.
26
+ - Reconciliation loops need a cancellable ticker, bounded lookup/register/deregister timeouts, and metrics for changed, unchanged, removed, and failed instances.
27
+
28
+ ## Dependency Client Policy
29
+
30
+ - Define a standard client wrapper for each dependency type with:
31
+ - context propagation.
32
+ - connect timeout and request timeout.
33
+ - credential source.
34
+ - retry budget.
35
+ - low-cardinality metrics.
36
+ - safe structured logs.
37
+ - test fake interface.
38
+ - Prefer constructing clients in DI providers; domain logic should receive interfaces.
39
+ - Separate internal service clients from external internet clients because timeout, auth, retry, and data-safety rules differ.
40
+ - For dependency status responses, validate transport success and domain success separately.
41
+
42
+ ## Dynamic Config
43
+
44
+ - If etcd is used, state explicitly whether it is a dynamic-config backing store or service discovery. Service mesh based systems may allow etcd for platform-owned dynamic config while still banning in-process etcd registry/resolver clients.
45
+ - First-party KMS can be backed by dynamic config for early versions, but secret envelopes must be encrypted, master keys must stay outside repo config, and readiness must fail closed when the KMS store or master key is unavailable.
46
+ - Dynamic config keys need typed accessors, namespace ownership, timeout, cache policy, and default behavior.
47
+ - Cache hot-path reads briefly and emit cache hit/miss/error metrics when the config system supports it.
48
+ - Watch/listener APIs must update local cache and recover panics inside callback handling.
49
+ - Keep admin write/delete APIs separate from ordinary runtime read clients.
50
+ - For missing or malformed dynamic config, choose fail-closed for safety controls and fail-open only for explicitly non-critical behavior.
51
+
52
+ ## ID Generation
53
+
54
+ - Decide whether IDs are generated locally, by a central service, or by the database before schema/API design.
55
+ - Central ID services need namespace registration, batch allocation, caller identity, timeout, and quota controls.
56
+ - Client-side ID caches should have bounded size and timeout on allocation.
57
+ - Local fallback generators are acceptable only when their uniqueness domain is explicit and collision risk is understood.
58
+ - Do not use timestamp-only fallback IDs for durable cross-service records unless collision handling exists.
59
+ - Persist allocator state durably when ID monotonicity or non-reuse matters.
60
+
61
+ ## Object Storage Architecture
62
+
63
+ - Wrap object storage behind an interface such as `Put`, `Get`, `Head`, `Delete`, `Sign`, and `List`.
64
+ - Store object metadata and tags for source service, lane/environment, trace/log id, retention class, and ownership when useful.
65
+ - Large uploads require multipart/resumable design, part size, retry policy, and abort/cleanup behavior.
66
+ - Range downloads should validate object size with metadata first.
67
+ - Signed URLs need explicit expiry, permission scope, and audit visibility.
68
+ - Object keys are durable identifiers; define namespace, uniqueness, lifecycle, and cleanup before exposing them in API contracts.
69
+ - Object storage is not a relational source of truth. Persist durable resource records in the service database when users or workflows depend on them.
70
+
71
+ ## Projection Stores
72
+
73
+ - Treat search indexes, document stores, and analytics stores as projections unless the service explicitly defines them as the source of truth.
74
+ - Define index/collection ownership, schema or mapping ownership, rebuild path, sync trigger, and eventual-consistency expectations.
75
+ - Projection clients need timeout, health policy, pool bounds, tracing, credential source, and endpoint-discovery policy.
76
+ - Query APIs need max limit, deterministic sort, filter allowlist, and pagination strategy.
77
+ - Bulk writes need chunk size, retry policy, per-item failure inspection, and reconciliation path.
78
+ - Avoid coupling domain invariants only to projection-store constraints; enforce durable invariants in the source-of-truth path.
79
+
80
+ ## Controlled Concurrency
81
+
82
+ - Fan-out work needs an explicit concurrency limit, timeout, retry count, retry interval, and partial-failure policy.
83
+ - Preserve output order or stable key mapping when concurrent work returns out of order.
84
+ - Recover panics at task boundaries and convert them into ordinary errors.
85
+ - Decide whether the first error cancels remaining work or whether all results should be collected.
86
+ - Avoid launching background goroutines from hot paths unless lifecycle, shutdown, and test isolation are defined.
87
+
88
+ ## Inference-As-RPC Client (Go Business → Python Inference)
89
+
90
+ When a Go business service calls a Python inference service (model server, OCR, VL chat, ML pipeline), the call sits between "regular HTTP/RPC client" and a domain-specific inference protocol. The architecture-layer rules:
91
+
92
+ - **Transport choice**: HTTP POST + JSON body is the common cross-language transport even when the inference server can speak gRPC or Triton-native. The trade-off is broad client support + easy debugging vs binary efficiency. Document the choice per service tier; do not let one service mix transports across methods.
93
+ - **URL construction**: derive the inference endpoint from a `method-name → service-identifier` mapping plus a `GeneratePredictPath(method, version)` helper. Hard-coded inference IPs in business code are a finding. Discovery owns the address; the helper owns the path.
94
+ - **Method-level timeout per model SLA**: each inference method has its own SLA (image feature extract ~90 s, image match ~120 s, OCR ~90 s, lightweight classifier ~10 s). The client picks the per-request timeout as `min(method-timeout, config-override, ctx-deadline)`. A single global "inference timeout" is wrong for fleets spanning two orders of magnitude in latency.
95
+ - **Per-attempt context discipline**: every HTTP attempt uses a sub-context of the request context. When the caller's deadline elapses, the in-flight call is cancelled. Long-running inference holding the socket past cancellation is a leak.
96
+ - **Large payload routing**: when the call carries an image, document, or multi-MB binary, the client uploads via signed URL (object storage) and sends URL + metadata, not inline bytes. Inline base64 is acceptable as a fallback with a documented size threshold. When the inference response is itself a binary, the server side should return a signed URL when possible; if the contract requires inline bytes, do not strip them from the response (that breaks callers) — apply size limits or field redaction at the logger / persistence layer so logs and traces are bounded without changing the wire contract.
97
+ - **Signed URL trust on the caller side**: a signed URL is a bearer credential plus a server-side fetch target. When the Go business service constructs the URL for the inference service to fetch, scope it strictly: short expiry (minutes), HTTP method GET (or PUT for upload — exclusive), narrow object key (caller-namespaced), content-length cap, and rotate the signing key on schedule. Log the URL with the signature query parameters redacted. The inference service is expected to validate the bucket/host against its allowlist and reject URLs outside it; design the caller's URL accordingly.
98
+ - **Inter-service authN/authZ**: the inference service is not behind an implicit trust boundary just because it sits inside the mesh. The Go caller authenticates with a verified workload identity (mTLS service cert, SPIFFE/SPIRE id, JWT issued by the platform IdP, or k8s service-account token) — the inference service refuses unauthenticated callers. The caller's allowlist on the inference side names which Go services are permitted to invoke which models. Tenant id and resource id carried in the request body are inputs to authorization, not statements of truth; the inference side validates the caller is permitted to use that tenant's / resource's data before loading inputs. Quota / rate-limit per caller × model × tenant is part of the contract; a GPU model is a shared resource.
99
+ - **Trace propagation**: every outbound inference request injects `X-Request-ID` and `X-Log-Id` (or the project's equivalent) so the Python service correlates. The Python service reads these headers in middleware once and threads them through every internal log line. Without this, the Go-to-Python call chain breaks at the boundary.
100
+ - **Cross-stack ctx-key constants**: define context-key constants in one shared package (e.g. request-id key, business-shard key, experiment-router key — name them per the platform's context-keys convention); business code reads through typed accessors, not raw string keys. The set is part of the inference contract.
101
+ - **Failure classification**: HTTP 2xx + envelope `code != success` is a domain inference error; HTTP non-2xx is a transport error. Map both to distinguishable Go error types so business retry and circuit-breaker rules can act differently. Generic `ServerError` swallowing both is a finding.
102
+ - **Inference-specific error codes**: reserve a numeric range or a typed error class for inference-side failures (model not found, GPU OOM, input shape mismatch, model load failed, version mismatch). Business code should branch on these without parsing free-text error messages.
103
+ - **Bounded retry without circuit breaker is incomplete**: short retry loops (2-3 attempts with backoff jitter) handle transient blips; sustained failure needs a circuit breaker per upstream / per model so the service fails fast and sheds load instead of amplifying the upstream incident.
104
+ - **Experiment / traffic routing as data**: when the inference fleet runs multiple model variants concurrently, the routing layer is data (rules with traffic ratio + matcher condition + target model/version), not code branches. Strategy types — A/B, canary, orthogonal, shadow — share one engine. Per-request metadata records the experiment id, variant, and served model version so evaluation can join.
105
+ - **TrafficLog persistence**: an out-of-band log of every inference call (caller, callee, method, version, latency, code, message, cost) goes to async storage. Failed call-record writes do not fail the inference call. Benchmark and offline lanes can persist locally for replay.
@@ -0,0 +1,38 @@
1
+ # Developer Tooling Architecture
2
+
3
+ Use this when designing CLIs, code generators, scaffolding commands, or generated-file ownership for a Go service stack.
4
+
5
+ ## Tool Boundaries
6
+
7
+ - Treat generators as build/development tools with explicit inputs, outputs, versions, and ownership.
8
+ - Prefer non-interactive command flags for CI and agent use; interactive prompts can be a convenience wrapper only.
9
+ - Generation inputs should be source-controlled where possible: DDL, IDL, templates, config, and command docs.
10
+ - Generated outputs should be clearly marked and should not require hand edits.
11
+ - Tools should be runnable from the repo root or document their required working directory.
12
+
13
+ ## Reproducibility
14
+
15
+ - Pin generator versions or verify them in preflight checks.
16
+ - Fail fast when required inputs, modules, config files, or external binaries are missing.
17
+ - Use temporary files safely and remove them after command completion.
18
+ - Avoid developer-local absolute paths in generated commands.
19
+ - Format generated Go files and keep generated diffs deterministic.
20
+
21
+ ## Safety
22
+
23
+ - Do not overwrite hand-written files unless the command explicitly opts in.
24
+ - Prefer generated file suffixes or directories that make ownership obvious.
25
+ - Tools that touch deploy config, database schemas, or remote systems need dry-run output and confirmation gates.
26
+ - Generated code should include tests or compile checks in the owning repo's verification workflow.
27
+
28
+ ## Codegen Entrypoint Ownership
29
+
30
+ - For multi-service portfolios, architecture mandates one canonical command per codegen kind (`make wire` for DI, `make gen_db` for DAL from DDL, `make idl` / `make_service` for IDL → server/client stubs, `make doc` for API docs) and a top-level fan-out target (`make codegen`) that runs all of them. New service onboarding and post-IDL-bump refreshes use the top-level target.
31
+ - The Makefile is the source of truth for both developers and CI; CI does not invoke generator binaries directly. Tool versions are pinned at the Makefile or container layer, not at the developer's local environment.
32
+ - Generated output directories are committed and reviewed; reformatters and linters skip them. Architecture review treats hand-edits to generated files as a finding unless the generator explicitly supports custom hooks.
33
+
34
+ ## Breaking-Change Governance
35
+
36
+ - Any IDL surface consumed by more than one team, more than one binary, or external clients requires a CI breaking-change gate (`buf breaking`, `kitex check`, or equivalent). Pre-commit syntax/format checks alone are not breaking-change checks.
37
+ - The gate compares the proposed IDL against the previous merged revision; intentional breaks route through an explicit approval path (PR label, separate branch, marker file the gate recognizes). Architecture review owns the approval list and the rationale per break.
38
+ - Multi-language consumers inherit the contract; if the canonical language has integration tests but other languages do not, architecture documents that asymmetry so consumers can decide whether to add their own coverage.
@@ -0,0 +1,36 @@
1
+ # Error Contract Architecture
2
+
3
+ Use this when designing service error codes, response envelopes, transport mappings, and cross-service error propagation.
4
+
5
+ ## Contract
6
+
7
+ - Define one canonical error shape with code, safe message, optional details, retryability, and trace id.
8
+ - Keep success separate from failure; success should not be represented by an absent or default error.
9
+ - Success and failure envelopes must be explicit and structurally stable; callers should never infer success from a missing error field or missing status field.
10
+ - Callers must check the canonical success/failure indicator before reading optional result fields.
11
+ - Reserve code ranges for common classes: invalid input, unauthorized, forbidden, not found, conflict, rate limit, timeout, dependency failure, internal error, and panic.
12
+ - Response envelopes should be consistent across HTTP, RPC, workers, and callbacks.
13
+ - Error messages returned to clients must be safe; logs may contain richer internal context under redaction policy.
14
+
15
+ ## Mapping
16
+
17
+ - Map transport status to canonical codes at the boundary.
18
+ - Preserve error chains internally, but expose only the canonical code and safe message externally. Error mapping is a total function — every error resolves to a canonical code, unknown falls back to the internal-failure class — and before any code is written into a client-facing response body it passes an allow-list separating client-safe codes from internal-only ones: codes that carry no client-actionable contract (raw panic, unclassified internal failure, and any diagnostic-only code) collapse to a generic safe code instead of being emitted, while genuinely client-facing classes (e.g. rate-limited, timeout, dependency-unavailable) stay on the wire only when the public contract declares them, keeping transport status and envelope code distinct.
19
+ - Dependency errors should be normalized before leaving the infrastructure adapter.
20
+ - Validation errors should identify fields without exposing sensitive values.
21
+ - Panics should map to a distinct internal failure class and include trace/log id for support.
22
+
23
+ ## Governance
24
+
25
+ - Error definitions should live near the owning module while common codes stay shared.
26
+ - Codes are API contracts; do not reuse retired codes for different meanings.
27
+ - New shared codes need documentation and tests for transport mapping.
28
+ - Metrics should group by canonical code and operation, not raw error string.
29
+
30
+ ## Cross-RPC Envelope And Code Range Allocation
31
+
32
+ - Architecture declares which transport-level slot carries the typed error envelope per protocol: for gRPC, encode structured details via `google.rpc.Status` with `details` (transported via the `grpc-status-details-bin` trailer or the framework's native details mechanism); for header-based RPC protocols, use protocol-native metadata frames; for HTTP, use a response body envelope. Do NOT pack JSON into the gRPC status message field — it is freeform text limited in size, not a structured channel. The serdes contract is symmetric — server writes, client reads — and is part of the platform contract, not per-service.
33
+ - Code range allocation is centrally governed. Reserve a numeric range (e.g., `[0, 11999]`) for shared codes and sub-allocate to tiers: platform codes (200/400/401/403/404/500/503/504), gateway/api codes, per-domain biz codes. Architecture owns the allocation table; new code requests route through the table.
34
+ - Distinguish system errors from biz errors in the envelope. Middleware decisions — alert vs ignore, retry-safe vs not, fallback path — depend on the class, not the specific code.
35
+ - i18n boundary: error message in the envelope is one language (often English). User-facing translations belong to the gateway or front-end, keyed by the code. Do not localize on the producer side.
36
+ - HTTP-200-always vs HTTP-status-as-semantic is a portfolio-level decision. The 200-always pattern simplifies SDK error parsing and avoids partial-success ambiguity but loses the ability for intermediate infrastructure (proxies, monitoring) to classify by HTTP status. Architecture documents the choice and applies it consistently.