@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,143 @@
1
+ ---
2
+ name: python-service-dev
3
+ description: 用 Python 写接口 / FastAPI / Django model / Celery 任务 / pytest → implement, modify, scaffold, test, and wire Python backend services, workers, packages, standalone CLI/tooling, migrations, Redis, queues, config, observability, and clients. Triggers also include "用 Python 写个命令行工具", "重构 Python 服务里的某文件/某类(局部)", "refactor a file/class within a Python service". For reproduction, isolation, or root-cause debugging, use defect-diagnosis first; for architecture/layering decisions or a service-wide refactor, use python-service-architecture; for a multi-stage / cross-module refactor delivery, re-enter product-rd-workflow.
4
+ ---
5
+
6
+ # Python Service Dev
7
+
8
+ Use this for implementation of Python backend products, services, microservices, AI-service hosts, workers, packages, and batch tools. For new backend products, implement the smallest deployable or package shape justified by ownership, data boundary, runtime isolation, scaling, release cadence, and rollback needs. It should adapt to the repository in front of you, but the workflow is independent of any prior codebase.
9
+
10
+ ## Skill Routing
11
+
12
+ - Use this skill for Python implementation, scaffolding, handlers/routes/views, schemas, services, microservices, repositories, migrations, Redis, queues, workers, external/inter-service clients, config, observability, packaging, and tests.
13
+ - Use `product-rd-workflow` first when the request is an end-to-end product delivery workflow, product idea to implementation plan, release workflow, cross-skill coordination, bug postmortem, or durable process improvement.
14
+ - Use `defect-diagnosis` first when the task is to reproduce, isolate, instrument, fix, verify, or root-cause a backend defect, regression, repeated failure, review finding, or failing test.
15
+ - Use `python-service-architecture` when the user asks for system design, service boundaries, contract strategy, storage ownership, reliability design, or architecture review without code changes.
16
+ - Use `testing-strategy` when the main question is which unit, integration, contract, or E2E layer should prove behavior; then return here for Python-specific implementation.
17
+ - Use `test-artifact-management` when the ask is about generating structured test cases from a Feishu requirements doc or codebase and tracking them in Feishu Bitable before implementation begins.
18
+ - Use `llm-inference-integration` for inference, RAG, prompt, model-routing, evaluation, replay, token-cost, and batch-inference design. Return here for Python API, worker, adapter, persistence, and observability implementation.
19
+ - Use `go-microservice-dev` for Go services. Do not load Go implementation rules for Python work unless the task is explicitly cross-language contract or generated-client integration.
20
+ - Use codebase-specific skills only when the task is explicitly about an existing repository.
21
+ - For money, billing, quota, permission, tenant/user data isolation, high-impact AI, repeated writes, async finality, or incident-explanation risk, apply `product-rd-workflow` high-risk resilience gates and route test-layer design through `testing-strategy`.
22
+ - When a change edits strings, templates, or config values that are returned to, persisted for, emitted to, served to, synchronized with, or configured for client consumption (error copy, labels, notification text, localization payloads, content/CMS/seed rows, message or notification templates, flag-delivered content), classify the consumers with a recorded bounded check (client repo / contract / locale search) before closing on API/log evidence; if any client surface renders the value user-facing, or consumers are unknown, load `product-ui-ux-design` and record its implementation-owner checkpoint — including the consuming client stack owner(s) and `testing-strategy` per that checkpoint's field list — with client-side rendered-evidence routing. Backend-only closure without that recorded consumer check is invalid.
23
+
24
+ ## Generalization Discipline
25
+
26
+ - Implement the repo in front of you, but do not import product nouns, service names, package paths, provider names, IDs, dashboards, or organization-specific habits from prior codebases.
27
+ - Convert domain-specific source patterns into reusable mechanics: route shape, schema validation, repository/unit-of-work boundary, transaction scope, cache key strategy, idempotency, job lease, config object, trace context, fake client, or test style.
28
+ - If an observed pattern only works for one product domain, discard it instead of turning it into a rule.
29
+ - Resolve conflicts by choosing the safer generic default: explicit schemas over dicts, typed settings over ad hoc environment reads, reviewed migrations over blind autogeneration, bounded async concurrency over unbounded gather, dependency injection over import-time clients, focused pytest tests over live-infra tests by default, and fail-closed for auth/permission/data-integrity paths.
30
+ - When adding or revising durable Python implementation guidance, check whether the lesson is generic backend service practice that should also update `go-microservice-dev`, or belongs in a shared workflow skill instead. If the rule depends on Python tooling, FastAPI/Flask/Django, Pydantic, asyncio, pytest, or Python package layout, keep it here and do not force a Go mirror.
31
+
32
+ ## Development Workflow
33
+
34
+ Before editing code, generated files, migrations, configs, or tests, complete enough analysis and planning for the change to be reviewable. Scale the plan to risk: a simple low-risk single-package change can use a short inline plan; multi-file, contract-visible, data/schema, async, release, bug-fix, branch/MR, unclear-risk, or high-risk work needs explicit task split, acceptance checks, verification commands, rollback or stop conditions, and named handoffs to architecture, testing, or diagnosis skills before edits.
35
+
36
+ Repo-local agent contracts (`AGENTS.md` at the repo root and in source directories) are part of the delivery contract: when a change moves a stable boundary, generated surface, workflow, or directory-local rule, update the nearest contract in the same MR and keep coverage in sync per `product-rd-workflow`'s spec / repo-contract sync gate.
37
+
38
+ 1. Establish the target Python project shape.
39
+ - Find the nearest `pyproject.toml`, lockfile, package root, app entrypoint, framework app, settings, migrations, tests, and documented commands.
40
+ - Identify whether this is an HTTP API microservice, internal microservice, worker service, scheduled job service, SDK/package, CLI, AI-service host, or batch tool.
41
+ - For internal service-to-service calls, use RPC/gRPC by default and HTTP when the service contract chooses it. Do not treat HTTP as a local shortcut: use the repository/platform HTTP client wrappers for discovery, auth, deadlines, retries, logging, metrics, tracing, and contract tests.
42
+ - For new backend products, implement a separate microservice slice only when ownership, scaling, data ownership, runtime isolation, deployment cadence, or rollback needs justify a separate deployable unit. Otherwise keep the slice inside the existing modular monolith, worker, package, or script shape and preserve clean contracts, config, observability, and tests.
43
+ - When mining a local/internal reference tree for Python implementation patterns, first detect nested git repositories, submodules, and implementation-bearing non-default branches or tags before judging the tree empty. Prefer read-only tree inspection over switching branches, and record the reusable mechanism rather than the source branch, module, or path.
44
+ - Check whether tests are split by unit, integration, contract, API, E2E, and live-infra markers.
45
+
46
+ 2. Start from contracts and data.
47
+ - Update Pydantic/OpenAPI, Django serializer/form, or protobuf/gRPC contracts before changing request/response behavior.
48
+ - When protobuf is in scope for gRPC or HTTP contracts, record the source/config/test location for the globally unique service name, IDL source, generation command, generated artifact version, framework binding, and JSON/binary wire-format policy before implementing handlers or service logic; any unconfirmed item is a blocker. Prefer consuming generated contract packages from the contract/generation boundary. When shared IDL and IDLGen repositories exist, Python implementation must use the generated Python artifacts from that shared boundary and keep compatibility with Go and client-side consumers; do not create service-local private IDL copies that drift from the shared contract.
49
+ - Implement JSON-wire business API responses through the contract-recorded envelope per `../platform-service-connectivity/references/http-response-envelope-contract.md`; when the canonical envelope applies, map domain errors to the canonical `code`/`message` model at the framework boundary and do not return ad hoc top-level business fields from routes/views.
50
+ - Select the transport contract first — the carrier is scenario-driven per the Carrier decision in `../platform-service-connectivity/references/rpc-framework-recipe.md`: on a platform that has standardized the in-message `base` carrier (or a contract that declares/publishes `base`), apply the recipe's ordered base-field gate as the single source of truth; on a metadata-carrier service (the default for ordinary gRPC), apply the R7 owner-recorded header-set gate (`../platform-service-connectivity/SKILL.md` R7) instead. Boundary-exposure classification (canonical trigger set, rerun conditions, dispositions) and the implementation population check are canonical in the same recipe; when any canonical boundary trigger fires, run boundary-exposure classification before release per that recipe — missing or contradictory classification evidence is an open release gap, and authz on unauthenticated caller-supplied identity is an immediate blocking implementation finding. Python service diffs cite the recipe evidence for the touched edit kind; service-authored proto snippets, service-local copied descriptors, uncited provenance claims, stale/wrong-version descriptors, or broad tag claims cannot self-certify the shared contract.
51
+ - Route/view/handler, adapter, or DTO diffs that manually construct generated request/response DTOs outside the middleware-filled path, or write/mutate/overwrite `base`, `LogId`, caller, `From`, `To`, `Tags`, or equivalent identity fields on generated DTOs, apply the implementation population check in `../platform-service-connectivity/references/rpc-framework-recipe.md` (carrier-neutral — it runs even when the base-field gate is not applicable); missing evidence is an open implementation gap.
52
+ - Convert generated protobuf types at the transport/application boundary unless a quotable architecture or repo-contract record deliberately treats generated DTOs as the public application contract. Without that record, domain code must not depend on generated transport types.
53
+ - Use generated or schema-owned request/response/common-field types where they exist. If domain or persistence models differ from transport DTOs, map them explicitly at the route/application boundary.
54
+ - Define ORM model and migration changes before repository code. New Python relational services use SQLAlchemy 2.x plus Alembic by default unless the service records a deliberate alternative data-access choice; use framework ORM and migrations when the chosen framework, such as Django, owns that boundary. For new MySQL async services, prefer `asyncmy`; `aiomysql` is allowed when deliberately chosen or already established. Do not replace an existing working `aiomysql` driver solely to comply with the default. Do not mix MySQL async drivers inside one service boundary.
55
+ - Define Redis keys, TTLs, and idempotency/lock semantics before cache code.
56
+ - Define queue payloads, retry behavior, and idempotency before consumers.
57
+ - Define runtime config, health/readiness, entrypoint, and rollback controls before release-facing code.
58
+
59
+ 3. Keep layers clean.
60
+ - Transport layer: framework mapping, validation, auth context, response mapping.
61
+ - Application/service layer: use-case orchestration and transactions.
62
+ - Domain layer: rules and invariants.
63
+ - Infrastructure layer: DB, Redis, MQ, HTTP clients, object storage, inference clients.
64
+ - Generated code: never hand-edit generated clients or protobuf output. Migration files are reviewable source.
65
+
66
+ 4. Wire dependencies explicitly.
67
+ - Constructors and dependency providers should declare what they need.
68
+ - Prefer small boundary interfaces or protocols where tests or adapters matter.
69
+ - Keep production and test dependency graphs separate when clients need fakes.
70
+ - Avoid import-time client creation and hidden global mutable state. When a library reads config only from process globals (env vars) and the mutation is unavoidable, confine it to a snapshot/restore context manager scoped to the minimal window — restoring by `pop` when the value was unset versus reassigning when it had a value — under any existing lock.
71
+ - If a mature internal reference has stronger wrappers than the target repo, reuse existing target-repo wrappers first. When no wrapper exists, add the smallest local adapter that the current task justifies, or route platform-wide wrapper extraction to architecture/platform skills before implementation. Do not paste reference business code or private package layout; preserve only the generic contract, such as unit-of-work transaction helper, typed config client, queue producer/consumer wrapper, context injector, error mapper, or query-safety hook. Safety-critical fragments — exception-firewall wrappers, timeout enforcement, untrusted-input parsing — must be a single shared implementation even at a dozen lines; a per-call-site copy that drifts fails as a dead worker or a silent no-op, not as slowness.
72
+ - If the implementation task directly mines an internal checkout, private repository, local path, or organization project, apply the same sanitization gate before landing any artifact: keep only mechanisms and generic contracts; remove source-identifying domains, paths, repository/module names, people, tickets, and business nouns.
73
+ - For service registration, model serving, or worker bootstraps, verify readiness before registration, publish environment/version/routing metadata, and make shutdown/polling loops bounded and testable.
74
+ - For Python-hosted inference or long-running service hosts, separate HTTP ingress, request routing, handler/model execution, SDK registration, and generated deployment config. Treat generated serving configs, model packages, debug downloads, and runtime outputs as artifacts, not source templates.
75
+
76
+ 5. Verify at the right scope.
77
+ - Run focused pytest tests for changed packages.
78
+ - Run async tests with the repo's configured `pytest-asyncio` mode.
79
+ - Run integration tests only when required services and credentials are available.
80
+ - **TC traceability**: link tests via `@pytest.mark.tc("TC-XX-NNN")` marker. Registers at collection time so `@skip` / `@skipif` / fixture failures still map to Bitable status. Needs the `tc` plugin from `test-artifact-management/references/tc_helpers/tc.py` loaded via `addopts = -p tc`. See `test-artifact-management/references/tc-marker-conventions.md`. Before adding tests, `grep -rn 'pytest\.mark\.tc' tests/` plus the sidecar `test/results/tc-map.jsonl` to check for existing coverage — extend rather than duplicate. When a TC is marked 废弃, grep both source and sidecar; follow deprecation cascade in `testing-strategy`. Tests without any TC link: prompt user only when the underlying code is also removed.
81
+ - **废弃级联:业务代码是否仍在用** — grep 只找出"测试函数引用了什么 import"是第一步;判断"该 import 是否还有其他 caller"才能定生死。Python 顺序:
82
+ 1. 看测试体导入的模块:`grep -E "^(from |import )" tests/test_<x>.py`
83
+ 2. 对每个产品模块(非 stdlib / 非测试 helper),找全仓库 caller:`grep -rEn "from <pkg>\.<mod>|import <pkg>\.<mod>" --include='*.py' --exclude-dir=tests`
84
+ 3. 零产品 caller → 同 commit 删该模块 + 测试;有产品 caller → 测试目标仍在用,不删测试(若 TC 已废弃但代码活,先确认产品决策)
85
+ 4. 边界:动态 import(`importlib.import_module("...")`)grep 抓不到;含 reflection 的代码人工确认;DI/插件注册(`@register` 装饰器)的产品代码需查注册表而非 import
86
+ - Run ruff, mypy/pyright, formatting, and codegen/migration checks when the repo uses them.
87
+ - Keep fast tests deterministic; isolate live infrastructure, long sleeps, generated files, and external credentials behind markers.
88
+
89
+ ## Implementation Rules
90
+
91
+ - Validate inputs at framework boundaries.
92
+ - When ingesting a dynamic set of headers by prefix, whitelist each derived key against a strict token/charset regex and reject empty or malformed keys; do not trust the shape of externally-supplied header names.
93
+ - Use typed Pydantic or framework schemas for public APIs.
94
+ - For finite domain values such as market, region, status, scene, source, provider, priority, permission, or channel, define a domain-owned `Enum`/`Literal` alias/constant set plus one parser or canonicalization helper before using the value across service, repository, schema, or tests. Transport enums, query/header strings, DB strings, and generated-client values convert at the boundary; business logic and tests reuse the domain symbols.
95
+ - Pass request/trace context through external calls where the stack supports it. The carve-out is narrow and behavioral: only a genuinely side-effect-free function — no external calls, task spawning, filesystem/env, clock/random, or logging/trace/tenant/feature lookup across its body and callees — may omit it. A mapper or helper that does, or later gains, any such call takes it. The test is behavior, not the name.
96
+ - Set timeouts for HTTP/DB/Redis/MQ/inference calls.
97
+ - Honor cancellation and request deadlines in async code.
98
+ - Do not block the event loop with sync clients, CPU-heavy processing, large file I/O, or GPU work.
99
+ - Use SQLAlchemy/Django transactions for multi-step writes inside one database.
100
+ - Keep SQLAlchemy, SQLModel, Django ORM, and raw SQL behind repository or data-access modules; routes/views and business services should not scatter SQL or ORM query construction.
101
+ - When a reference stack exposes unit-of-work or session/transaction-bound repositories, reuse or add that shape instead of passing raw sessions through business code. Service logic should enter one transaction boundary, then call repositories bound to that session, transaction, or unit of work.
102
+ - For DB-heavy services, prefer shared unit-of-work or transaction helpers that recover/rollback on exception, and add non-production query-safety checks where the repo has ORM hooks, query builders, migration metadata, or test infrastructure to support them. If the repo cannot mechanically check missing indexes or full scans yet, record the platform gap and cover changed high-risk queries with migration/repository review evidence, bounded pagination assertions, or focused tests. These checks should become framework or repository behavior, not reviewer folklore.
103
+ - Keep migrations, model changes, repository changes, and rollback notes together.
104
+ - For Python microservice work, keep API/OpenAPI or gRPC contract changes, generated clients, service-client adapters, auth headers/tokens, timeout/retry policy, and deployment config in the same implementation slice when they change together.
105
+ - Treat queue delivery as at-least-once; consumers must be idempotent.
106
+ - Queue producer/consumer wrappers should centralize metadata propagation, topic/routing-key/filter config, worker sizing, retry/drop behavior, exception recovery, close/drain lifecycle, latency/error metrics, and replay or DLQ visibility. Business handlers should implement domain work and idempotency, not recreate consumer scaffolding.
107
+ - Treat write retries as unsafe by default. Add automatic retry only when the operation has a durable idempotency key, unique constraint, state machine, dedupe table, or equivalent proof, and test duplicate submit/callback/queue/job-restart behavior.
108
+ - For money, quota, entitlement, permission, tenant/user isolation, privacy, and sensitive state changes, fail closed on uncertainty and return the canonical error before side effects.
109
+ - Do not default missing tenant, actor, subject, or resource scope on high-risk paths. Reject before side effects unless the code is an explicit bootstrap, seed, or maintenance path with separate approval.
110
+ - Do not rely on Redis-only, TTL-only, memory-only, or process-local dedupe for durable side effects. Use persistent idempotency or a state machine when the side effect is auditable, billable, externally acknowledged, or hard to reverse.
111
+ - Commit primary mutations with audit/outbox/governance evidence in one transaction when possible. If not possible, create a replayable repair record, surface stale/pending counts, and test the reconciliation gap.
112
+ - For high-risk user-visible operations, persist or return a stable request/task/order/support identifier and keep logs, audit records, or metrics sufficient for support explanation and compensation.
113
+ - Use Redis locks with unique values and compare-and-delete unlock.
114
+ - Centralize Redis keys, TTLs, lock leases, counters, and rate-limit scopes.
115
+ - Keep config typed and environment-specific.
116
+ - Do not hard-code registry endpoints, provider URLs, secrets, or production fallbacks. Missing production config for high-risk capabilities should keep the capability disabled or fail startup, not silently switch to a local/test default.
117
+ - For high-risk config, add typed settings, production-safe defaults, tests for disabled/missing config, and explicit enablement checks before behavior can run.
118
+ - Use pytest fakes/mocks for external clients by default; reserve live dependency tests for explicit integration gates.
119
+ - High-risk external flows that depend on real credentials, callback delivery, MQ/DB semantics, private-network services, or external model/runtime behavior need an explicit release-blocking integration, sandbox, replay, or manual evidence gate outside the default fast target. If that gate is unavailable, record the blocker, residual risk, and next unblock action instead of claiming fake-only confidence is complete.
120
+ - Python AI/service-host tests that require live model servers, real datasets, private-network endpoints, long sleeps, or manual scripts are integration/manual evidence. Keep the default fast gate on deterministic handler, router, config, readiness, metadata, parser, and error-mapping assertions, but do not use the fast gate alone to close high-risk runtime integration.
121
+ - Comments state invariants and why, not status snapshots that rot ("X is the only implementation", line counts, "temporary tool"). A comment claiming a guarantee the code does not provide (e.g. a per-attempt timeout that is never actually set) is worse than no comment; in review, treat every guarantee a comment claims as an assertion to verify against the code.
122
+ - Code that will live in production must not carry temporariness-implying names (spike/minimal/temp). Transitional scaffolding must state its retirement condition and expected retirement point explicitly, or it is not transitional.
123
+ - When bumping a shared dependency's version, change it across **every** consuming package/module, not only the obviously-affected ones — including indirect consumers that reach the dependency through a local/editable path install or that independently pin the same transitive dependency. Keep the version consistent everywhere it is declared (e.g. `pyproject.toml`, lockfile, and package `__version__` when present), then run the **full** test suite (not just the directly-related extra/subset) and update any test that hard-asserts the dependency pin/version. A consumer left on the old pin fails only later, often masked as a CI dependency-resolution error.
124
+ - For Python package releases, this skill owns package internals and tests; route registry upload, duplicate-publish recovery, simple-index metadata checks, and registry-only install verification through `platform-release-engineering/references/python-package-registry-release.md`.
125
+
126
+ ## Reference Loading
127
+
128
+ - For source provenance, current extraction boundary, and keep/merge/discard decisions, read `references/source-evidence-map.md` when auditing or re-extracting this skill.
129
+ - For feature implementation steps, read `references/feature-playbook.md`.
130
+ - For project layout, package roots, uv/poetry/pip, import mode, and tooling, read `references/project-structure-and-tooling.md`.
131
+ - For FastAPI, Flask, Django, routes/views, dependencies, and app factories, read `references/web-framework-patterns.md`.
132
+ - For Pydantic/OpenAPI/schema validation and generated clients, read `references/schema-and-validation-patterns.md`.
133
+ - For public API implementation, partner app auth, signature verification, callback handling, authorization scope, and API security tests, read `references/public-api-security-patterns.md`.
134
+ - For SQLAlchemy/Django ORM, Alembic, migrations, repositories, and transactions, read `references/sqlalchemy-and-migrations-patterns.md`.
135
+ - For asyncio, blocking work isolation, concurrency limits, and cancellation, read `references/async-and-worker-patterns.md`.
136
+ - For Redis, cache, locks, idempotency, counters, and rate limits, read `references/redis-cache-lock-patterns.md`.
137
+ - For Celery/RQ/arq, queues, scheduled tasks, and job execution, read `references/background-job-patterns.md`.
138
+ - For external HTTP clients, SDKs, generated clients, service discovery, and dependency adapters, read `references/dependency-client-patterns.md`.
139
+ - For errors, exception mapping, response envelopes, and validation errors, read `references/error-handling-patterns.md`.
140
+ - For logs, metrics, traces, health checks, and instrumentation, read `references/observability-implementation-patterns.md`.
141
+ - For pytest, async tests, fakes, fixtures, markers, ruff, mypy/pyright, and CI gates, read `references/testing-and-quality-patterns.md`.
142
+ - For Python API/worker wiring around LLM/RAG/inference systems, read `references/ai-service-wiring-patterns.md`.
143
+ - For import/export, backfill, repair scripts, generated artifacts, and batch reports, read `references/batch-and-artifact-patterns.md`.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Python Service Dev"
3
+ short_description: "Build Python backend and service features"
4
+ default_prompt: "Use $python-service-dev to implement a product-agnostic Python backend feature in the smallest service, worker, package, or script shape justified by the repo and boundary evidence."
@@ -0,0 +1,16 @@
1
+ # AI Service Wiring Patterns
2
+
3
+ Use this for Python implementation around LLM/RAG/inference calls after `llm-inference-integration` has defined the inference behavior.
4
+
5
+ ## Wiring
6
+
7
+ - Keep provider adapters separate from route handlers and domain orchestration.
8
+ - Add timeout, retry, rate limit, circuit-breaker/backpressure, and cost/usage logging where needed.
9
+ - Handle streaming with cancellation, heartbeat, and terminal error events.
10
+ - Persist request, response, citation/source, and audit metadata only according to product privacy rules.
11
+ - For CPU/GPU-heavy local inference, isolate concurrency and memory limits.
12
+ - Use fakes for provider tests and mark live provider tests explicitly.
13
+
14
+ ## Do Not
15
+
16
+ - Encode prompt policy, retrieval strategy, evaluation rubric, or model routing here; route those decisions to `llm-inference-integration`.
@@ -0,0 +1,24 @@
1
+ # Async And Worker Patterns
2
+
3
+ Use this for asyncio, async endpoints, workers, blocking work, and cancellation.
4
+
5
+ ## Async Rules
6
+
7
+ - Bound `asyncio.gather` with semaphores, pools, or queue limits.
8
+ - Use `asyncio.timeout`, client timeouts, or framework timeout controls where available.
9
+ - Use `asyncio.to_thread` only for bounded blocking calls that are safe to run in a thread.
10
+ - Do not run CPU-heavy work in the event loop.
11
+ - Clean up async clients through lifespan, context managers, or explicit close hooks.
12
+ - **`asyncio.TaskGroup` (Python 3.11+) is the default structured-concurrency primitive for fan-out work; prefer it over `asyncio.gather`** for any code where partial failure should cancel siblings. Per Python docs: when a child task raises, TaskGroup cancels remaining scheduled tasks; `gather(return_exceptions=False)` does not — sibling tasks keep running to completion, which is the wrong default for most fan-out (each leak burns a request budget or external rate-limit). Use `gather` only when partial success with independent siblings is the intended contract (and even then, pair with bounded concurrency + per-task timeout). Wrap TaskGroup with `async with asyncio.timeout(...):` for deadline enforcement, NOT per-task timeouts when the whole batch shares a deadline. **Exception-shape gotcha when outer timeout fires concurrently with a sibling failure**: the outer `asyncio.timeout()` cancels the TaskGroup scope; `TaskGroup.__aexit__` drains children and propagates failures as an `ExceptionGroup`. If a sibling raised an application error before the timeout cancellation completed, you do NOT receive a clean `TimeoutError` — you receive an `ExceptionGroup` containing both the application error AND a `CancelledError` (or `TimeoutError`) from the cancellation. Handle both shapes with `except* asyncio.TimeoutError` AND `except* DomainError` AND a fallback `except* BaseException`; do not assume `except TimeoutError` will catch the deadline case, because in this race it does not.
13
+ - **Handle TaskGroup failures with `try / except*` (PEP 654 ExceptionGroup, Python 3.11+) rather than `except Exception`** — when multiple sibling tasks fail, TaskGroup raises an `ExceptionGroup` (or `BaseExceptionGroup` for cancellation cases) that bundles all errors; a bare `except` strips the multi-error structure and discards diagnostics. Pattern: `try: async with asyncio.TaskGroup() as tg: ... except* SomeTransientError as eg: ... except* SomeFatalError as eg: ...`. Each `except*` handler receives an ExceptionGroup containing only the matching subset, and unmatched exceptions re-raise as a residual group. Document in API contracts that operations using TaskGroup may raise ExceptionGroup so consumers wrap with `except*`, not `except`.
14
+ - **Never swallow `asyncio.CancelledError` inside async code that runs under TaskGroup or `asyncio.timeout`** — Python docs warn that those structured-concurrency primitives are implemented via cancellation internally; a `try/except Exception` that catches CancelledError (because CancelledError is a `BaseException` in 3.8+ but some code still catches it as a transient) prevents the cancellation from completing and leaves the task group / timeout in an inconsistent state. Re-raise CancelledError explicitly after any cleanup, or use `except Exception:` (which excludes BaseException) so CancelledError propagates naturally.
15
+
16
+ ## Worker Rules
17
+
18
+ - Use workers for long-running or retryable work.
19
+ - Store progress and terminal status when user-visible work outlives a request.
20
+ - Separate the setup lifetime from the spawned-worker lifetime: work that must outlive the request must not be a child of the request's structured-concurrency scope — do not put it in a request-owned `TaskGroup`, and do not `await` it under the request's `asyncio.timeout` — or it is cancelled when the request ends. But "outside the request scope" is not fire-and-forget: register it with an application-lifetime supervisor / durable queue / tracked task registry that keeps a strong reference (a bare `asyncio.create_task` can be garbage-collected and lose its exception), observes failures, and gives the worker its own bounded deadline. The request handler's own setup still honors request cancellation; cancelling the request after the task is registered must not cancel it, and cancelling setup must not orphan an already-registered task.
21
+ - An exception inside a detached execution never reaches framework/request exception handlers: a bare `asyncio.create_task` failure surfaces only via the loop exception handler when the task is garbage-collected, a `threading.Thread` dies silently, an executor future swallows the exception until awaited, and a queue-job body gets only what the worker runner is configured to record. Route every production detached spawn (task, thread, executor submit, job body) through one shared firewall wrapper that catches, logs the traceback with the trace/correlation id, and increments a failure metric; enforce coverage with a checklist or lint, not memory. The only rigorous regression proof for "the process/worker survives this exception" is a subprocess exit code: a test runs a child process that triggers the exception inside the detached execution and asserts it exits cleanly — an in-process assertion cannot prove process survival. Scope that proof to per-item/per-request work where catch-and-continue is the policy; for a supervisor or global-invariant task (scheduler loop, registry owner), the test asserts the opposite — the worker goes non-serving/unready or exits nonzero on purpose rather than continuing on corrupted state.
22
+ - For any async side-path that outlives the request (audit, ledger, usage reporting, notifications), the working posture is four pieces together: detach the lifecycle but keep only correlation — re-attach the correlation/trace fields of the contextvars snapshot per `redis-cache-lock-patterns.md` rather than dropping the correlation id, but never a wholesale snapshot replay that smuggles request auth/session/secrets into work outliving the request (whitelist correlation + durable work-item identity; the worker runs under service identity), detaching only at the accept boundary for an already-accepted work item with its own bounded deadline; for the service's own rollbackable mutations the accept boundary is durable commit success — or a same-transaction/outbox row that commits and rolls back atomically with the mutation: before that, caller cancellation suppresses side-path work and nothing detached may be enqueued against an in-flight commit (a commit that fails, rolls back, or returns unknown must never leave a fired detached record — and idempotent reconciliation of an unknown outcome requires a durable intent/reconciliation key written with or before the mutation, the outbox row being exactly that key; post-commit async capture without such a durable key is a blocked design for audit/billing-relevant records unless unknown outcomes are impossible or reconciliation is provable from durable authoritative state); after it, capture is mandatory and not gated on the caller still being connected; records of NON-rollbackable external side effects (a provider call that already consumed quota) invert the order — book a per-attempt reservation/outbox row independently of the local outcome, with idempotent reconciliation; a bounded queue or semaphore; shutdown ordering where accepting new submissions and draining are serialized so no submit can race the drain — mark closed, stop accepting, then drain with a deadline without holding the accept lock through the drain wait (drain/flush paths must not need it, or shutdown deadlocks); and a loss policy matched to the data class: explicitly accepted bounded loss + a reconciliation/repair job only when a tested idempotent reconstruction source exists — for billing/ledger/usage data with no such source, use a same-transaction outbox or backpressure instead of drop.
23
+ - Make retries idempotent.
24
+ - Include exception handling, logs, metrics, and retry-vs-drop behavior.
@@ -0,0 +1,18 @@
1
+ # Background Job Patterns
2
+
3
+ Use this for Celery, RQ, arq, APScheduler, queue consumers, and scheduled tasks.
4
+
5
+ ## Job Implementation
6
+
7
+ - Define typed payloads.
8
+ - Add idempotency keys.
9
+ - Bound retries and backoff.
10
+ - Distinguish retryable, drop, quarantine, and terminal failures.
11
+ - Store status for user-visible jobs.
12
+ - Protect singleton jobs with locks or scheduler guarantees.
13
+
14
+ ## Request Boundary
15
+
16
+ - Do not hide long work behind a synchronous request unless the timeout budget proves it is safe.
17
+ - Return job IDs or status URLs for long-running work.
18
+ - Make cancellation and duplicate submissions explicit.
@@ -0,0 +1,13 @@
1
+ # Batch And Artifact Patterns
2
+
3
+ Use this for import/export scripts, backfills, reports, generated files, CSV/XLSX/PDF artifacts, and repair tools.
4
+
5
+ ## Implementation
6
+
7
+ - Add dry-run mode for destructive or broad updates.
8
+ - Use chunking, checkpointing, and resume for large jobs.
9
+ - Bound concurrency and external dependency rate.
10
+ - Write error reports for partial failures.
11
+ - For object or artifact migration, record success, error, skipped, and conflict rows in replayable output so reruns can resume or audit decisions without re-discovering every item.
12
+ - Make output artifact paths, object storage keys, retention, and download permissions explicit.
13
+ - Test parsing, validation, edge rows, and retry/resume behavior.
@@ -0,0 +1,39 @@
1
+ # Dependency Client Patterns
2
+
3
+ Use this for external HTTP clients, SDKs, object storage, service discovery, generated clients, and inference clients.
4
+
5
+ ## Rules
6
+
7
+ - Create clients through explicit providers or app startup, not scattered constructors.
8
+ - Import-time or module-level convenience clients must be replaceable through dependency overrides, app lifespan wiring, or provider injection. If initialization can perform network I/O or fail, keep it in startup/bootstrap and expose constructors that return ordinary errors for request-time dependencies.
9
+ - A must-never-break-the-caller adapter over an OPTIONAL dependency catches `Exception` on import/init, not just `ImportError` — a third-party module's import-time side effects can raise anything — but does not swallow `BaseException` subclasses such as `KeyboardInterrupt`/`SystemExit`. Degrade to a safe default and test the raising-import path, not only the missing-module path.
10
+ - Set timeout, retry, base URL, credentials, user agent, and observability labels.
11
+ - **A middleware/client WRAPPER (interceptor, governance layer) owns deadline *propagation*, not a fixed timeout *policy* — but every production call still gets a bounded effective deadline.** Honor the caller's deadline (the `context` / `asyncio.timeout` the caller set); don't bake an arbitrary fixed default into a wrapper that overrides it. But "no wrapper default" ≠ "unbounded": a caller with no deadline plus a hung dependency pins tasks/connections forever, so apply an **env-configured max backstop** as the effective deadline when the caller supplies none, overridable at the call site, with an explicit opt-out only for long-lived watch/stream calls **that still bound their own liveness** (idle/read timeout, heartbeat, bounded reconnect, cancel cleanup) — opt-out is from the request deadline only, not from all bounds, or a half-open stream pins tasks/connections forever. Clamp **every untrusted/external inbound deadline** — an inbound gRPC `grpc-timeout` as much as an HTTP deadline header — to platform min/max **before** honoring or propagating it, or an external caller sets a huge deadline to hold resources (slow-DoS). Propagate with the transport's **native** deadline mechanism where it exists (gRPC `grpc-timeout`, propagated + decremented), not a reinvented header — but an HTTP client's own timeout bounds only the *local* call and is **not** sent downstream: HTTP has no native on-wire deadline, so cross-hop propagation needs an explicit deadline-header contract, and that header is untrusted (strip a caller-supplied one at ingress; generate the internal one from the server-side clamped context). Don't add an *independent competing* timer, but a **derived** per-attempt cap is correct — `per-attempt = min(caller-remaining, configured max)`; and before each retry recompute the remaining budget and **skip** the attempt when it can't cover attempt + backoff + cleanup (doomed retries amplify overload).
12
+ - Validate status codes and response schemas.
13
+ - Wrap provider-specific exceptions into canonical service errors.
14
+ - Provide fakes for tests.
15
+ - Close async clients and connection pools.
16
+ - **Per-object state registries: release on lifecycle, and never key by `id()`.** When you keep state in a long-lived dict/registry tied to a per-object thing (a DB engine, connection, session, or client — e.g. per-engine listeners or per-connection counters), release the entry when that object is closed/disposed, or it leaks for the process lifetime. Do NOT key the registry by `id(obj)` — CPython **reuses** `id()` values after an object is garbage-collected, so a retained stale entry silently attributes one object's state to a *different, later* object. Prefer a `weakref.WeakKeyDictionary` (auto-releases when the object is collected) — but it needs **hashable, weak-referenceable** keys (a class with `__slots__` and no `__weakref__`, most C-extension/builtin types, or a type with `__eq__` but no `__hash__` raises `TypeError`); for those, use an owned stable token/wrapper plus a deterministic delete on close. It also keys by the object's `__eq__`/`__hash__`, **not identity** — a key type with value-based `__eq__`/`__hash__` aliases two distinct live objects into one entry (cross-attribution), so require identity equality/hash (default `object` identity) or key by an owned per-object identity token. And it only auto-releases when the stored **value does not strongly reference the key** — a listener/closure/back-pointer capturing the object keeps it alive, so the weak key never collects and you still leak; when values can reach the key, deterministic close-delete is mandatory, not weak auto-release. Make the registry own its lock: keep the `closed`/tombstone flag and the state under the **same** critical section, reject post-close get/create, and drain in-flight users before the final delete — otherwise a concurrent thread/task recreates stale state right after disposal. Keep the closed flag on the object itself (not only in the registry entry) so the delete doesn't erase the tombstone and let a later call on the still-referenced object recreate state.
17
+ - **Adapter / fake / test-substitution boundaries are typed with `typing.Protocol` (PEP 544, structural typing), not abstract base classes**. The Protocol declares the surface the application code needs (`def get(url: str) -> Response: ...`); production client and test fake both satisfy it implicitly — no inheritance, no registration. Reserve `abc.ABC` / nominal base classes for cases where you genuinely need an authoritative runtime type gate, or a published-package public hierarchy that downstream code subclasses. If a Protocol must be used with `isinstance`, decorate it `@runtime_checkable` and treat the check as a shallow runtime guard (it checks attribute presence, not signature shape) — prefer ABC / nominal base classes when the runtime gate must be authoritative. Do not invent an `IUserRepository` per concrete class out of habit — that is Java-style nominal interface inflation; Python's structural typing makes it unnecessary.
18
+
19
+ ## HTTP Clients
20
+
21
+ - Prefer `httpx` for modern sync/async clients when repo conventions allow it.
22
+ - Use `aiohttp` only when the project standard or dependency requires it.
23
+ - Avoid `requests` inside async endpoints unless isolated.
24
+
25
+ ## Dynamic Config And Discovery
26
+
27
+ - Wrap service discovery, secret lookup, and dynamic config behind typed provider classes or functions; do not let raw backend keys, registry metadata, or secret-store payload shape leak into route or domain code.
28
+ - Centralize namespace and backend key construction in the provider; list/watch APIs should return caller-facing keys or documented resume markers.
29
+ - Cache hot config reads with a bounded TTL only when stale behavior is acceptable, and expose cache hit/miss/error metrics when the stack supports it.
30
+ - Listener or watch callbacks should recover/log exceptions, update local cache atomically, and stop cleanly during application shutdown.
31
+ - Tests should cover missing config, malformed payloads, dependency failure, cache behavior, and dependency override/fake behavior.
32
+
33
+ ## Object Storage
34
+
35
+ - Add source service, environment/lane, request id, ownership, retention, and content metadata on writes when the provider supports it.
36
+ - For copy or migration tools, define overwrite/conflict policy before transfer, tag migrated objects with source identity, emit replayable success/error/conflict records, bound concurrency, and close or flush report writers on shutdown.
37
+ - Signed URLs must have explicit expiry and requester scope; do not log full signed URLs when they contain credentials.
38
+
39
+ Evidence note: object-migration rules here are generalized backend mechanics from Go shared-package evidence, not Python-source confirmation. When a Python codebase has its own object-migration framework, confirm or narrow these rules against that framework before treating them as local convention.
@@ -0,0 +1,26 @@
1
+ # Error Handling Patterns
2
+
3
+ Use this for exceptions, HTTP errors, validation errors, and response envelopes.
4
+
5
+ > Sibling sync: the Go counterpart `go-microservice-dev/references/error-contract-patterns.md` holds the **canonical** shared error-model invariant list (canonical typed error model; convert only at the transport boundary; no internal/secret leak; structured-details envelope, not a freeform status-message string; closed classification enums with fail-closed defaults, classification correct before retry/fallback policy). This file must stay consistent with that list rather than restating it. Advisory — there is no automated parity gate; keep in sync by hand.
6
+
7
+ ## Rules
8
+
9
+ - Keep one canonical error mapping per service.
10
+ - Convert internal exceptions at transport boundaries.
11
+ - Preserve original exceptions in logs where safe, but do not expose stack traces or secrets in API responses.
12
+ - Use typed domain exceptions for expected business failures.
13
+ - Do not simulate errors at the API/transport boundary with return-value shapes — `(data, err)` tuples, `None` plus a message, or `{"success": false}` / ad-hoc `{code, message}` dicts smuggled into the data payload. Expected failures raise typed exceptions (EAFP). A pure/domain layer MAY use an explicit `Result`/`Either` value internally — but **"boundary" is defined by behavior, not file/module name**: any code whose return value is serialized to an HTTP/RPC/WebSocket/job-terminal response is boundary code and must raise a typed exception or emit the canonical envelope, never return a `Result`/dict as the wire payload. Relabeling a handler as "domain" does not exempt it.
14
+ - Treat validation errors as client errors; treat dependency failures according to retry/fallback policy.
15
+ - For shipped response envelopes and error payloads, keep client-readable fields, status/code meanings, and business-data locations stable by default. Removing legacy fields or changing where clients read success/error information is a breaking contract change and requires explicit human approval plus a compatibility, rollout, and rollback plan.
16
+ - Test edge cases for error envelopes, status codes, and partial failures.
17
+
18
+ ## Cross-RPC Typed Error Envelope (Cross-Stack)
19
+
20
+ When Python services participate in a portfolio that propagates typed errors across gRPC / Kitex / HTTP boundaries with a shared envelope:
21
+
22
+ - Server side: convert internal exceptions — validation failures, RPC timeouts, dependency errors, panics — to the canonical typed error class and serialize it into the transport-level error slot per protocol. For gRPC, encode structured details via `google.rpc.Status` with `details` (carried in the `grpc-status-details-bin` trailer or via the framework's documented details mechanism); do NOT pack JSON into the freeform `status.message` string — that loses typed retry/security semantics and risks leaking server-rendered text. For HTTP, use the response body envelope `{code, message, data}`. Never let bare Python exceptions leak across the boundary.
23
+ - Client side: extract the canonical structured shape from the protocol-specific channel (gRPC `details` / HTTP body envelope) and reconstruct the typed error so callers can branch on `code` and use `isinstance` / pattern matching on the recovered error class. Parsing the freeform gRPC status text as JSON is fallback-only; wrap unknown wire shapes as a transport/unknown error without dropping the original cause.
24
+ - Numeric Code range allocation is portfolio-wide; Python services raising biz codes must use the same allocation table as Go services. Codes outside the allocated range fail at registration, not at runtime.
25
+ - i18n boundary: error messages in the envelope are one language (typically English). User-facing translations live in the gateway or front-end keyed by the code; do not localize on the Python producer side.
26
+ - Standard library wrap compatibility: prefer raising chained exceptions with `raise NewError(...) from cause` inside one process; when crossing a transport boundary forces JSON serdes, keep a reverse-path that reconstructs the chain on the client side rather than silently dropping it.
@@ -0,0 +1,43 @@
1
+ # Feature Playbook
2
+
3
+ Use this for concrete Python service implementation.
4
+
5
+ ## Steps
6
+
7
+ 1. Locate the project root and commands.
8
+ - Prefer `pyproject.toml` and lockfiles over guessing.
9
+ - Identify framework app, package root, tests, migrations, and scripts.
10
+ 2. Define the contract.
11
+ - Pydantic/OpenAPI, Django serializer/form, generated client, or protobuf.
12
+ 3. Define state changes.
13
+ - ORM model, migration, repository, transaction, cache, queue, or artifact.
14
+ 4. Implement the use case.
15
+ - Keep route/view thin and put decisions in service/domain code.
16
+ 5. Add focused tests.
17
+ - Unit for pure logic, API/contract for route behavior, integration only when real dependency behavior matters.
18
+ 6. Run the repo's quality commands.
19
+ - pytest target, ruff, mypy/pyright, formatting, migrations/codegen checks.
20
+
21
+ ## Common Implementation Slices
22
+
23
+ - New HTTP endpoint: update schema/OpenAPI or serializer first, add route/view wiring, keep handler thin, pass resolved auth/context into service code, add API/contract tests for success and canonical failures.
24
+ - New repository or DB mutation: design model and migration together, keep transaction scope explicit, add rollback/error-path tests, and verify pagination or uniqueness/idempotency behavior when relevant.
25
+ - New Redis cache/lock/idempotency path: define key namespace, tenant/resource scope, TTL, miss/error behavior, compare-and-delete unlock, and tests for expiry or duplicate submit.
26
+ - New queue or background worker: define payload schema, retry/drop/DLQ policy, idempotency key, concurrency bound, graceful shutdown, metrics, and duplicate-delivery tests before business handler logic.
27
+ - New external or inter-service client: define typed request/response, auth/signature headers, timeout, retry policy, error mapping, trace propagation, fake client, and integration marker for live contract checks.
28
+ - New generated artifact or report: render from typed inputs, write under a controlled output path, compare parsed structures or stable golden files, and verify generated-file drift in CI when deterministic.
29
+
30
+ ## Public API And Callback Security
31
+
32
+ - Authenticate before trusting request body, query, path, or header identity fields unless signature verification requires canonical raw body bytes.
33
+ - Resolve actor, tenant, resource scope, app/integration source, and permission from authenticated context; client-supplied owner/creator/scope fields are claims, not authority.
34
+ - Validate signatures/tokens, timestamp windows, nonce or request id replay protection, payload schema, event type, and resource id before callback side effects. State-changing public APIs and callbacks require replay defense unless the exception is explicitly read-only or already idempotent.
35
+ - Cache dynamic auth config briefly and fail closed for unknown app ids, disabled integrations, malformed config, expired timestamps, signature mismatch, or permission lookup errors.
36
+ - Add tests for signature canonicalization, timestamp expiry, replay, spoofed owner/tenant/scope fields, duplicate callback delivery, malformed payloads, and unknown event types. Keep provider sandbox/live-callback tests outside the default fast target.
37
+
38
+ ## Do Not
39
+
40
+ - Add untyped dictionaries at API boundaries when the repo uses schemas.
41
+ - Introduce hidden global clients or import-time network I/O.
42
+ - Mix live dependency tests into default fast test suites.
43
+ - Copy local business terms from source examples into generic implementation rules.
@@ -0,0 +1,31 @@
1
+ # Observability Implementation Patterns
2
+
3
+ Use this for logging, tracing, metrics, health checks, and instrumentation.
4
+
5
+ ## Implementation
6
+
7
+ - Add request IDs and trace IDs to logs.
8
+ - Use structured JSON logs when the service runs in aggregated logging environments.
9
+ - Instrument FastAPI/Flask/Django, HTTP clients, DB clients, Redis, queues, and inference calls when supported.
10
+ - Add runtime base attributes such as service name, environment, region/lane, process or worker group, pod/host identity, and version once at the recorder/provider layer; feature code should add only operation-specific attributes.
11
+ - Keep metric labels low-cardinality and bounded. Do not use raw path parameters, user IDs, request IDs, prompt text, provider payload values, or free-form error strings as labels.
12
+ - For HTTP/RPC/worker metrics, combine stable runtime attributes with endpoint, operation, status, canonical error code, and duration; use logs or traces for high-cardinality details.
13
+ - Add health and readiness endpoints according to deployment needs.
14
+ - Do not log secrets, tokens, raw PII, or full provider payloads unless explicitly safe.
15
+ - Add tests for logging, tracing, and metric-label helpers when they are shared packages.
16
+
17
+ ## Metric Naming And Standard Label Set (Cross-Stack)
18
+
19
+ Match the portfolio's cross-stack metric naming so Python services compose with Go services on the same dashboards.
20
+
21
+ - Metric name shape: `{category}_{operation}_{suffix}` snake_case. Categories name the surface (`http_server`, `grpc_server`, `grpc_client`, `worker`, `db`, `cache`); operation names what happens (`request`, `invoke`, `task`); suffix names what is measured (`qps`, `latency`, `err_qps`, `success_rate`).
22
+ - Define metric names in one central module (e.g., `app/observability/metric_names.py`); inline string literals in handlers are a regression.
23
+ - Use the portfolio's base label set for RPC/HTTP metrics so cross-service joins work without renaming: `caller`, `caller_cluster`, `caller_env`, `caller_method`, `callee`, `callee_cluster`, `callee_env`, `method`, `err_code`. New labels go through cardinality review.
24
+ - Never use high-cardinality identifiers (user id, tenant id, request id, trace id, prompt text) as metric labels. They belong in traces and logs.
25
+
26
+ ## Ctx-Aware Logger Trace Linkage (Cross-Stack)
27
+
28
+ - Wrap the chosen logger (structlog, stdlib logging with a formatter, or loguru) so it accepts the active context and automatically emits trace identity: `_trace_id`, `_span_id`, `_trace_flags`, and a request/log id field (`_logid`, `request_id`, etc.). Callers do not pass these manually.
29
+ - Pair logs with the active OTel span: at warn/error level, add `span.add_event(message, attributes)` so the trace backend correlates logs without manual join. Flip span status to error only at logical error boundaries (handler entry/exit, dependency call failure), not on every warn.
30
+ - For async/await, use `contextvars` to carry the logger context across `await` and `asyncio.create_task` boundaries. When spawning a task that should join the parent trace, capture the current OTel context at task-creation time via `opentelemetry.context.get_current()` (or `contextvars.copy_context()` for the broader ctx) and re-attach inside the spawned coroutine via `context.attach(captured) / context.detach(token)` so spans created in the child task become children of the originating span. Without this snapshot, `asyncio.create_task` inherits the contextvar snapshot at task-creation but subsequent OTel SDK calls in the child can still race with the parent's span lifecycle if the parent ends first.
31
+ - Configure the OTel resource (`service.name`, `service.namespace`, `service.version`, `lane`, `pod.ip`, `pod.name`) once at startup; per-call attributes belong on individual spans.
@@ -0,0 +1,24 @@
1
+ # Project Structure And Tooling
2
+
3
+ Use this for Python package layout, dependency management, imports, linting, and type checking.
4
+
5
+ ## Discovery
6
+
7
+ - Find `pyproject.toml`, `uv.lock`, `poetry.lock`, `requirements.txt`, `setup.py`, and workspace configuration.
8
+ - Identify package mode: app package, `src/` layout, namespace package, Django project, generated client, or script-only project.
9
+ - Use the repo's configured commands before inventing new ones.
10
+
11
+ ## Tooling Defaults
12
+
13
+ - Prefer `pyproject.toml` for pytest, ruff, mypy/pyright, and package metadata.
14
+ - Keep runtime and dev dependency groups separate.
15
+ - Use lockfiles for deployable services.
16
+ - Use `pytest --import-mode=importlib` when the repo standard sets it.
17
+ - Do not rely on developer-local absolute paths or implicit `PYTHONPATH` in durable commands.
18
+ - **`uv` (Astral, Rust-based) is the current default-recommendation single-tool stack for most pure-Python service workflows** — covers the pip + pip-tools + virtualenv + pipx + (most of) poetry + pyenv use cases with one static binary. Per Astral docs: ~10-100x faster than pip on resolve/install; built-in Python version management (`uv python install`), Cargo-style workspaces, cross-platform `uv.lock` reproducible builds. Drop-in pip-compatible interface via `uv pip` for migration. **Validate per-project edge cases before declaring full replacement**: editable installs in deeply nested monorepos (workspace path resolution rules differ from poetry / pip), private PyPI index auth (`.netrc` / keyring / index-url env precedence), post-install hooks (`pip install` script-execution semantics), conda-managed environments (uv does not replace conda's binary-package channel), vendored wheel directories used as offline indexes, Debian/RHEL system-Python policies (uv-installed Python lives parallel to system Python, which can confuse system service managers expecting `/usr/bin/python3`). When picking up an existing project: keep its established stack (poetry / pip-tools / pdm / rye / hatch) rather than forced-migrate during normal feature work; schedule the uv switch as its own slice with lockfile parity verified. The "single tool replaces N tools" framing means CI pipelines, Dockerfiles, dev-onboarding docs, and CI cache configs all need to flip together — not piecemeal.
19
+ - **PEP 723 inline script metadata + `uv run script.py`** for one-off scripts, batch tools, ad-hoc data jobs, repair scripts, and report generators — replaces "create a venv just to run this" and `requirements.txt` siblings. Inline format: `# /// script` block at top of file declaring `requires-python` and `dependencies = [...]`, then `uv run script.py` auto-creates the ephemeral environment per PEP 723. **Reproducibility is NOT automatic**: `uv run` without an explicit lock will re-resolve dependencies each run against the latest matching versions — fine for ad-hoc local use, NOT for CI or production replay. Pin reproducibility by running `uv lock --script script.py` to produce `script.py.lock` adjacent to the script AND committing the sidecar lock to source control; CI should run `uv run --script script.py` against the committed lock. **Scope**: single-file scripts where the cost of a project skeleton (pyproject.toml + venv + install) outweighs the script's value. PEP 723 scripts CANNOT import internal first-party packages unless those packages are published to a private index (declared in `[tool.uv.sources]` inline) or referenced via `--with-editable` workspace paths — for scripts that need internal-package access, promote them to a proper project rather than fighting the inline format. Anything that grows past one file or gets imported by other code → promote to a proper project.
20
+
21
+ ## Generated And Vendored Code
22
+
23
+ - Exclude generated clients, vendored libraries, migration output, and typings from strict lint/type rules when the repo already does so.
24
+ - Do not edit vendored third-party code to satisfy project style checks.
@@ -0,0 +1,52 @@
1
+ # Public API Security Patterns
2
+
3
+ Use this for implementing Python public APIs, partner integrations, signed callbacks, app credentials, authorization scope checks, and API security tests.
4
+
5
+ ## Auth Middleware
6
+
7
+ - Keep bypass path lists explicit and small.
8
+ - Preserve raw body bytes when signature verification requires them; otherwise authenticate before parsing domain payloads.
9
+ - Extract only the untrusted selector needed to find verification material, such as app id or key id; load auth config; verify token/signature; then resolve app/user identity and authorization/resource scope.
10
+ - Return canonical auth errors; log detailed causes with safe identifiers.
11
+ - Do not mutate global auth settings per request.
12
+
13
+ ## App Credential Model
14
+
15
+ - Store app id, secret/public-key reference, allowed source restrictions, allowed resource scopes, integration/source identity, status, and rotation metadata.
16
+ - Generate secrets with cryptographic randomness and keep secret values out of logs, tests, docs, generated files, and fixtures.
17
+ - Support disabled apps and rotated credentials.
18
+ - If auth config is dynamic, cache briefly and fail closed for unknown app ids, disabled apps, expired credentials, or malformed config.
19
+
20
+ ## Safer Composition (Python 3.14+)
21
+
22
+ - **Python 3.14 (released 7 October 2025) introduced t-strings via PEP 750** — template literals using `t"..."` syntax that evaluate to `string.templatelib.Template` objects rather than `str`, giving a consuming function access to interpolated values BEFORE they are combined into a string. The standard library exposes `string.templatelib.Template`. **t-strings are inert by themselves — they are NOT automatic injection protection by syntax**. A bare t-string only carries the raw values plus their surrounding template; safety arrives only when a trusted consumer library is t-string-aware and validates/escapes each interpolation according to its target language (SQL, shell, HTML). Writing `t"SELECT * FROM users WHERE id = {user_id}"` and passing it to an ORM/driver that has not added Template support gains nothing over an f-string — and passing it to a function expecting `str` triggers `Template.__str__()` which raises by default, surfacing the misuse rather than silently producing the wrong result. As of 2026-Q1: most popular template engines (Jinja2, Django templates) and most DB drivers do NOT yet consume `Template` directly — verify the specific library's Template support before relying on this rule. **PEP 787 (safer subprocess via t-strings) is currently Deferred to Python 3.15** per peps.python.org — PEP authors are pursuing experimental t-string subprocess work outside the stdlib through 3.14 beta before re-proposing for 3.15. Do NOT assume `subprocess.run(t"...")` works safely in 3.14; for shell/subprocess composition on 3.14, keep using `shlex.quote()` + argument-list form (`subprocess.run(["cmd", arg])`) until PEP 787 or its equivalent lands. For Python ≤3.13 targets, t-strings are unavailable — keep `shlex.quote()` / parameterized DB queries / framework-native HTML escaping; t-strings are a 3.14-and-later opt-in, not a backport.
23
+
24
+ ## Signature And Replay Verification
25
+
26
+ - Canonicalize signed data before verification.
27
+ - Include timestamp and nonce or request id in the signed payload.
28
+ - Enforce timestamp windows and replay protection for state-changing APIs and callbacks. Allow an exception only for explicitly read-only or already-idempotent calls with documented rationale.
29
+ - Use constant-time comparison for MAC/signature checks where applicable.
30
+ - Prefer HMAC or asymmetric signatures for new integrations.
31
+
32
+ ## Authorization Scope
33
+
34
+ - Treat client-supplied tenant, owner, actor, creator, account, permission, and resource fields as claims until resolved from authenticated context or an authoritative service.
35
+ - For write paths, use the resolved authenticated identity as source of truth. Reject mismatches or overwrite client-supplied owner fields before domain logic.
36
+ - Put resolved scope/source into typed request context and include it in cache keys, idempotency keys, rate limits, logs, and audit records.
37
+ - Scope-check bypass must be explicit config with audit logging, not a hidden branch in handler code.
38
+
39
+ ## Callback Handler
40
+
41
+ - Validate signature/token, timestamp, event type, resource id, and payload shape before side effects.
42
+ - Convert provider event codes into internal enums at the boundary.
43
+ - Persist a callback receipt or idempotency marker before expensive work when retries are expected.
44
+ - Treat empty payloads, unknown event types, and malformed signatures as permanent failures unless provider contract says otherwise.
45
+
46
+ ## Tests
47
+
48
+ - Unit-test signature canonicalization, timestamp expiry, replay handling, and authorization-scope checks.
49
+ - Add spoofing tests for owner, actor, tenant, creator, account, permission, and resource fields in every accepted input surface.
50
+ - Add fail-closed tests for auth, permission, profile-resolution, malformed config, and disabled integration errors before downstream side effects.
51
+ - Add duplicate-delivery, malformed-payload, and unknown-event callback tests.
52
+ - Use fake secrets in fixtures. Keep provider sandbox or live-callback tests behind explicit integration/live markers.
@@ -0,0 +1,78 @@
1
+ # Redis Cache Lock Patterns
2
+
3
+ Use this for Redis clients, keys, caches, locks, rate limits, and idempotency.
4
+
5
+ ## Implementation
6
+
7
+ - Centralize key builders and TTL constants.
8
+ - Include tenant/user/resource scope in keys when isolation matters.
9
+ - Use unique values for locks and compare-and-delete unlock.
10
+ - Renew locks with compare-and-expire when work can exceed one lease, and stop renewal on cancellation, timeout, or max lease.
11
+ - Set timeouts on Redis clients.
12
+ - Choose sync or async Redis clients to match the call path. Do not call sync Redis clients directly inside async request handlers or long-lived async loops unless the call is isolated through a thread/process boundary.
13
+ - Build Redis clients through dependency assembly or app lifespan, and close clients/pools on shutdown. Per-request connect/read/close loops are acceptable only for narrow scripts or tools, not hot service paths.
14
+ - Prefix keys through one adapter and keep pattern deletes bounded. If a method deletes by pattern, prefer `SCAN` with a limit/batch policy, observability, and tests for no-match and large-match behavior.
15
+ - For JSON cache values, validate decode and schema. Treat malformed cached payloads as explicit cache corruption or miss according to product risk, and avoid letting decode errors bypass source-of-truth checks.
16
+ - For compound atomic operations, use Lua scripts, Redis transactions, or a proven library rather than read-modify-write. Examples include compare-and-set, compare-and-delete, compare-and-expire, positive-only decrement, increment-if-exists, and atomic pop.
17
+ - Define explicit return meanings for success, compare failure, and missing key; callers should not infer these from raw Redis values.
18
+ - If using Lua scripts, load or register scripts during startup when possible; on missing script cache, reload and fall back once while emitting an observable metric or log.
19
+ - Idempotency stores need separate pending, completed, duplicate, and retryable-failure meanings. A pending marker should have a short TTL or owner lease; a completed marker should live for the dedupe window; retry counters should fail safe when Redis is unavailable on high-risk paths.
20
+ - Redis Streams need an explicit delivery contract: starting message id, heartbeat/no-message behavior, stream TTL/trim/delete policy, reconnect/resume behavior, and whether messages may be replayed or lost.
21
+ - Do not let cache misses silently bypass authorization or data-integrity checks.
22
+ - Keep cache invalidation close to writes or explicit events.
23
+
24
+ ## Tests
25
+
26
+ - Use fake Redis for service-level tests when behavior is simple.
27
+ - Use real Redis integration tests for locks, scripts, expiration, or cluster-specific behavior.
28
+ - Test wrong-token unlock, renewal cancellation, missing-key semantics, malformed JSON payloads, pattern-delete boundaries, script reload/fallback, invalid return type handling, pending-vs-completed idempotency states, stream heartbeat/resume, and positive-only counters when those helpers exist.
29
+
30
+ ## Cache Stampede Defense
31
+
32
+ Concurrent cache misses on a hot key turn into a thundering herd on the source of truth. Three defenses combine; pick all when miss cost is high.
33
+
34
+ - Single-flight: when a miss is detected, only one coroutine/process performs the fetch while others wait or read a placeholder. Implement with a per-key `asyncio.Lock` in-process, plus a short-lived Redis lock (`SET NX PX`) for cross-process coordination; followers re-read the cache after the leader publishes the value.
35
+ - Negative caching: cache the "not found" outcome with a shorter TTL (a few seconds to a minute) using a distinguishable sentinel value so distinct miss reasons (no row vs auth-denied) do not collapse into one cache entry.
36
+ - TTL jitter: add randomized ±10-20% to every TTL so bulk-loaded keys do not expire in lockstep. Apply jitter at write time, not at read time.
37
+ - For very hot read-mostly data, layer a short-TTL local cache in front of Redis so even Redis sees a flat load curve; coordinate invalidation through Pub/Sub or `CLIENT TRACKING` (RESP3) when staleness budget is tight.
38
+
39
+ ## Redis Cluster Slot And Hash Tag Rules
40
+
41
+ When the deployment is Redis Cluster (or Cluster-compatible managed Redis), every multi-key operation must stay within a single hash slot.
42
+
43
+ - Multi-key commands, `MULTI/EXEC`, Lua scripts, and pipelines that depend on key co-location must use hash tags: `user:{uid}:profile` and `user:{uid}:settings` share a slot because `{uid}` is the tagged section; `user:uid:profile` and `user:uid:settings` do not.
44
+ - A Lua script that touches keys passed via `KEYS[]` will be rejected with `CROSSSLOT` if those keys hash to different slots; design key schemas with the smallest co-location set you need (per-user, per-tenant, per-aggregate) and document the hash-tag convention next to the key builder.
45
+ - `SCAN` walks one cluster node at a time; cluster-aware delete-by-pattern means iterating all primary nodes, not the cluster as one space.
46
+ - Pipelines across slots split into per-slot batches; do not assume a single round-trip.
47
+ - Cluster clients refresh slot maps on `MOVED`/`ASK` responses; for very latency-sensitive paths cache the slot map in the client and refresh proactively on cluster topology change events.
48
+
49
+ ## TLS And IAM Authentication
50
+
51
+ Production Redis traffic must be authenticated and encrypted; cloud-managed Redis adds IAM/AAD-based auth on top of (or instead of) static passwords.
52
+
53
+ - Connect with TLS for any non-loopback Redis: pass `ssl=True` and a configured `ssl.SSLContext` to `redis.asyncio.Redis`. Share the `SSLContext` across clients to amortize handshake setup.
54
+ - For managed Redis with IAM/AAD auth (AWS ElastiCache IAM, Azure Cache for Redis with AAD), credentials are short-lived tokens fetched per connection: configure the client with an auth callback that retrieves a fresh token (e.g., via boto3/azure-identity) and handle the token's TTL by rotating before expiry.
55
+ - Use Redis ACL users for application accounts: grant the minimum command set required (no `FLUSHDB`, `CONFIG`, `DEBUG`, `KEYS`); store credentials through the platform secret provider, never inline in code or config files.
56
+ - Do not log connection URLs that contain passwords or tokens; redact at the logger configuration layer.
57
+
58
+ ## Retry And Circuit Breaker Coordination
59
+
60
+ Transient Redis errors (timeout, connection reset, `LOADING`, `BUSY`) sometimes warrant a retry; sustained failure warrants opening a circuit.
61
+
62
+ - Retry only for transient errors: connection errors, read/write timeouts on idempotent reads, `LOADING`, and `BUSY` (script in progress). Do not retry application-level errors, wrong-type errors, or write commands when retry could double-apply.
63
+ - Bound retries: max attempt count, exponential backoff with jitter, total deadline. A retry budget per request prevents amplification.
64
+ - Pair retry with a circuit breaker per upstream identity (Redis cluster endpoint, sentinel set): open after consecutive failures, half-open after a cool-down probe, close on success. Do not retry inside an open circuit — return the fast-fail outcome the product has chosen for that path.
65
+ - Coordinate with the lock and idempotency layer: a retry against a lock that you already hold should `COMPARE-AND-EXPIRE` not re-acquire; a retry against an idempotency store should treat duplicate `claimed` as success.
66
+ - Surface retry count, breaker state transitions, and budget exhaustion as metrics; sustained breaker-open is a paging condition, not a normal mode.
67
+
68
+ ## OpenTelemetry Instrumentation Across Await
69
+
70
+ Async Python loses span context easily when tasks are created outside the current `await` chain.
71
+
72
+ - Use OTel auto-instrumentation for SQLAlchemy and Redis when the package is available (`opentelemetry-instrumentation-sqlalchemy`, `opentelemetry-instrumentation-redis`); enable it once at app startup.
73
+ - For `asyncio.create_task`, `asyncio.gather`, and background workers, contextvars snapshot at task creation time — spans created in the parent after the child starts will not be visible to the child. Capture and re-attach context explicitly when launching a task that should join the parent trace (`context.attach(snapshot)` inside the task; `contextvars.copy_context().run(...)` for sync code launched from async).
74
+ - Emit DB and Redis attributes per OTel semantic conventions: `db.system`, `db.name`, `db.statement` (sanitized), `db.operation`, `network.peer.address`; for Redis, also `db.redis.database_index` when applicable.
75
+ - Do not emit raw SQL or raw key payloads as span attributes when they may contain secrets; use the framework's sanitization hook or a custom span processor.
76
+ - Long-running coroutines and SSE/websocket handlers should periodically end the per-message span instead of one giant span per connection; otherwise traces become unusable.
77
+
78
+ Evidence note: rules above derive from public specifications (SQLAlchemy 2.0 Async docs, Redis Cluster spec, Redis ACL/TLS docs, OpenTelemetry semantic conventions) and documented industry patterns (Cache-Aside variants, Circuit Breaker, Outbox via cross-stack reference). Lua/CAS/script-fallback rules earlier in this file were generalized from external Go evidence; under the portfolio-stability prefilter, the portfolio is not a confirmation baseline, so caveat wording elsewhere should be read as "generic best-practice baseline" rather than "pending verification".