@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.
- package/LICENSE +201 -0
- package/README.md +49 -0
- package/dist/assets/marketplace/.agents/plugins/marketplace.json +12 -0
- package/dist/assets/marketplace/.claude-plugin/marketplace.json +13 -0
- package/dist/assets/marketplace/marketplace-manifest.json +12 -0
- package/dist/assets/marketplace/plugins/ccl-skills/.claude-plugin/marketplace.json +16 -0
- package/dist/assets/marketplace/plugins/ccl-skills/.claude-plugin/plugin.json +5 -0
- package/dist/assets/marketplace/plugins/ccl-skills/.codex-plugin/plugin.json +5 -0
- package/dist/assets/marketplace/plugins/ccl-skills/.worktree-only +3 -0
- package/dist/assets/marketplace/plugins/ccl-skills/agent-context/session-start.md +45 -0
- package/dist/assets/marketplace/plugins/ccl-skills/agent-context/subagent-start.md +12 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/AGENTS.md +19 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/guard-delegation-owner.sh +125 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/guard-edit-isolation.sh +102 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/guard-merge-authorization.sh +1156 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/hooks.json +131 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/merge-authorization-prompt.sh +142 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/owner-dispatch-guard.sh +12 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/owner-dispatch-stop.sh +13 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/remind-post-merge-cleanup.sh +144 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/session-context.sh +87 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/session-start.sh +86 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/skill-extraction-gate-stop.sh +69 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/subagent-start.sh +26 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_guard_delegation_owner.sh +329 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_guard_edit_isolation.sh +322 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_guard_merge_authorization.sh +902 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_merge_authorization_prompt.sh +178 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_remind_post_merge_cleanup.sh +121 -0
- package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_session_start.sh +170 -0
- package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/AGENTS.md +17 -0
- package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/ccl-skills.ts +564 -0
- package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/commands/ccl-install-skills.md +14 -0
- package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/commands/ccl-update-skills.md +44 -0
- package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/commands/ccl-verify-skills.md +109 -0
- package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/commands/ccl-worktree-check.md +36 -0
- package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/AGENTS.md +28 -0
- package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/README.md +276 -0
- package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/owner-dispatch.example.json +10 -0
- package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/owner-dispatch.sh +1307 -0
- package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/test.sh +941 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/agents-file-coverage-gate/SKILL.md +45 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/agents-file-coverage-gate/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/SKILL.md +188 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/android-dev.md +92 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/flutter-dev.md +80 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/ios-dev.md +72 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/kotlin-multiplatform.md +93 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/mobile-platform-boundaries.md +77 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/mobile-quality-release.md +77 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/source-evidence-map.md +64 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/SKILL.md +353 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/client-routing.md +419 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/manual-invocation-and-prompts.md +126 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/staged-review-contract.md +197 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/timeout-auth-and-capabilities.md +179 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/AGENTS.md +98 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/classify_envelope.py +93 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/classify_timeout_exit.sh +15 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/claude_review.sh +1438 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/codex_review.sh +324 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/concern_excerpt.py +295 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/egress_schema.py +214 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/init_policy_matrix.py +642 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/kimi_packet_mcp.py +181 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/kimi_review.sh +1165 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/opencode_review.sh +1190 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/parse_cli_review.py +946 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/parse_opencode_review.py +474 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/parse_probe_result.py +1899 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/parse_review_json.py +200 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/review_gate.py +2845 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/review_gate.sh +6 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/run_claude_capture.py +71 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/runtime-surface-verification-design.md +53 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_classify_envelope.sh +68 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_claude_review_probe.sh +2311 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_cli_review_wrappers.sh +1832 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_code_review_identity.sh +73 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_concern_excerpt.sh +245 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_egress_schema.sh +177 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_init_policy_matrix.sh +272 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_kimi_packet_mcp.py +195 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_opencode_review_concurrency.sh +120 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_opencode_review_retry.sh +1005 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_parse_opencode_review.sh +258 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_parse_probe_result.sh +574 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_parse_review_json.sh +349 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_review_client_compat.py +434 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_review_client_order.sh +264 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_review_gate.sh +2412 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/verify_native_skill_binding.py +123 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/SKILL.md +153 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/references/diagnosis-playbook.md +54 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/references/prevention-routing.md +36 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/feature-risk-router/SKILL.md +69 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/feature-risk-router/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/feature-risk-router/references/security-review-gate.md +41 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/SKILL.md +165 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/api-security-boundaries.md +47 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/architecture-playbook.md +160 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/artifact-generation-architecture.md +37 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/audit-history-architecture.md +29 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/bulk-workflow-architecture.md +33 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/config-rule-routing-architecture.md +34 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/cross-cutting-concerns.md +72 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/data-modeling-and-migrations.md +79 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/data-platform-architecture.md +210 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/dependency-platform.md +105 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/developer-tooling-architecture.md +38 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/error-contract-architecture.md +36 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/event-driven-architecture.md +260 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/http-gateway-architecture.md +74 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/mq-consumer-architecture.md +38 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/multi-tenant-isolation.md +275 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/notification-architecture.md +25 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/ops-checklist.md +57 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/performance-capacity-architecture.md +38 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/protobuf-contract-architecture.md +119 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/redis-cache-coordination.md +93 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/release-runtime-readiness.md +65 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/replay-comparison-architecture.md +26 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/runtime-observability.md +94 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/service-scaffold.md +76 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/source-evidence-map.md +55 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/workflow-state-architecture.md +38 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/SKILL.md +159 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/artifact-generation-patterns.md +37 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/audit-history-patterns.md +28 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/bulk-import-export-patterns.md +56 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/config-rule-routing-patterns.md +38 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/data-access-patterns.md +55 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/db-schema-and-dal-patterns.md +109 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/dependency-client-patterns.md +130 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/developer-tooling-patterns.md +70 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/domain-feature-patterns.md +78 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/engineering-patterns.md +119 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/error-contract-patterns.md +55 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/feature-playbook.md +61 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/http-gateway-client-patterns.md +76 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/mq-consumer-patterns.md +55 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/notification-patterns.md +42 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/observability-implementation-patterns.md +101 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/performance-capacity-patterns.md +44 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/protobuf-contract-patterns.md +72 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/public-api-integration-patterns.md +56 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/quality-and-testing-patterns.md +91 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/redis-cache-lock-patterns.md +123 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/release-ops-patterns.md +112 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/reliability-patterns.md +83 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/replay-comparison-patterns.md +32 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/scaffold-and-codegen.md +86 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/source-evidence-map.md +54 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/state-machine-task-patterns.md +45 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/grill-me/SKILL.md +80 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/grill-me/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/SKILL.md +117 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-approval-auto-reviewer.md +106 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-command-sandbox.md +441 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-context-freshness.md +47 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-credentials-auth.md +13 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-extensions-skills.md +13 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-file-edit-protocol.md +129 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-ide-integration.md +5 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-input-ingestion.md +13 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-instruction-composition.md +13 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-lifecycle-hooks.md +92 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-messaging.md +5 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-runtime-bootstrap.md +5 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-session-persistence.md +448 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-task-orchestration.md +13 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-tool-dispatch.md +123 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-turn-lifecycle.md +131 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/inference-capacity-operations.md +162 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/llm-client-gateway.md +156 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/model-prompt-evaluation.md +146 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/retrieval-agent-safety.md +273 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/SKILL.md +202 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/contracts-and-state.md +62 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/cross-stack-alignment.md +94 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/framework-choice.md +76 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/online-practice-uptake.md +56 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/platform-capabilities.md +91 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/product-page-checklist.md +40 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/qa-release.md +72 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/source-evidence-map.md +82 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-agent-delegation/SKILL.md +103 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-agent-delegation/agents/openai.yaml +5 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-agent-delegation/references/multi-agent-delegation-playbook.md +100 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/SKILL.md +70 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/references/public-data-acquisition.md +549 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/references/public-disclosure-channels.md +97 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/references/research-prompts.md +66 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/scripts/AGENTS.md +32 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/scripts/test-public-data-acquisition-recipes.sh +379 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/SKILL.md +244 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/alerting-and-on-call.md +76 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/framework-middleware-checklist.md +142 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/infra-component-deployment.md +268 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/log-correlation-recipe.md +124 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/log-schema-canonical.md +208 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/metrics-conventions.md +105 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/obs-stack-architecture.md +107 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/sli-slo-design.md +95 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/source-register.md +11 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/SKILL.md +303 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/canary-and-rollout-strategy.md +163 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/config-center-via-etcd.md +245 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/custom-control-plane-boundary.md +298 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/deploy-cli-concrete-recipe.md +312 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/deploy-pipeline.md +165 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/env-and-lane-matrix.md +126 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/lane-orchestration-control-plane.md +383 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/multi-region-and-cluster.md +135 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/promotion-gate-and-review.md +149 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/python-package-registry-release.md +462 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/rollback-playbook.md +123 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/secret-and-config-management.md +231 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/version-authority-and-deprecation.md +21 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/SKILL.md +276 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/dual-sidecar-and-traffic-config-center.md +127 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/framework-middleware.md +143 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/grpc-authority-workaround.md +90 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/http-response-envelope-contract.md +24 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/mesh-architecture.md +127 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/multi-env-routing.md +192 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/protobuf-http-contract-signals.md +64 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/retry-timeout-circuit-breaker.md +124 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/rpc-framework-recipe.md +494 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/service-discovery-choice.md +113 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/service-discovery-migration-playbook.md +231 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/service-discovery-recipe.md +131 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/SKILL.md +235 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/adr-convention.md +146 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-checklist.md +30 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-evaluation-report-template.md +25 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-execution-spec.md +108 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-sop.md +457 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-templates.md +24 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/artifact-egress-confidentiality.md +58 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/code-review-checklist.md +86 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/cross-repo-coordination.md +46 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/delivery-lifecycle.md +192 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/design-review-gate-mechanics.md +62 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/design-routing-and-readiness.md +45 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/diagnostic-spec-match-gate.md +36 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/dispatch-owner-skills.md +35 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/dormant-code-activation.md +47 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/existing-project-assessment-report.md +223 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/external-skill-augmentation.md +46 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/feature-deprecation-cascade.md +15 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/high-risk-resilience-gates.md +73 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/implementation-completeness-and-minimality.md +120 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/implementation-entry-reentry-gate.md +122 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/modular-monolith-heuristic.md +105 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/pre-final-continuation-gate.md +115 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/problem-resolution-and-learning.md +62 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/quality-attributes.md +112 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/quality-remediation-program.md +88 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/rd-standards-doc-family-checklist.md +27 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/refactoring-discipline.md +52 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/review-reception.md +34 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/shared-gate-artifact-classification.md +76 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/source-evidence-map.md +31 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/status-tracker-sync.md +77 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/sync-spec-repo-contract.md +25 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/verify-developer-experience.md +34 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/worktree-mechanics.md +55 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/scripts/AGENTS.md +18 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/scripts/check-agent-contract-coverage.sh +213 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/SKILL.md +136 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/agents/openai.yaml +9 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/analytics-visualization-interactions.md +206 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/behavioral-aesthetic-logic.md +108 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/complex-creation-interactions.md +194 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/design-execution-checklist.md +214 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/design-impl-naming-and-versioning.md +53 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/design-intake-and-acceptance.md +129 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/design-system-source-of-truth.md +97 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/external-ui-ux-quality-benchmarks.md +79 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/frontend-code-evidence-map.md +63 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/interaction-design-patterns.md +146 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/layout-recipes-and-screenshot-acceptance.md +250 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/multi-project-token-consistency.md +237 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/multi-stack-strategy.md +65 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/operational-processing-workflows.md +237 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/platform-mobile-patterns.md +324 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/platform-web-desktop-patterns.md +456 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/product-lifecycle-acceptance-and-iteration.md +114 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/product-surface-patterns.md +79 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/resource-management-interactions.md +113 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/scenario-community-patterns.md +133 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/source-map.md +130 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/tokens-and-components.md +47 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/trust-sensitive-ai-and-data-patterns.md +96 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/ui-ux-audit.md +106 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/ui-ux-design-development.md +176 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/visual-craft.md +111 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/SKILL.md +157 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/ai-service-integration-boundaries.md +57 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/api-contract-and-schema.md +62 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/api-security-boundaries.md +39 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/architecture-playbook.md +46 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/async-execution-model.md +24 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/background-jobs-and-scheduling.md +18 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/batch-and-pipeline-architecture.md +11 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/config-secrets-runtime.md +22 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/data-modeling-and-migrations.md +64 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/data-platform-architecture.md +211 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/event-driven-architecture.md +263 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/multi-tenant-isolation.md +281 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/observability-and-ops.md +26 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/packaging-runtime-readiness.md +20 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/redis-cache-coordination.md +41 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/reliability-and-error-contract.md +17 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/source-evidence-map.md +55 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/web-framework-boundaries.md +26 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/SKILL.md +143 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/ai-service-wiring-patterns.md +16 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/async-and-worker-patterns.md +24 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/background-job-patterns.md +18 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/batch-and-artifact-patterns.md +13 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/dependency-client-patterns.md +39 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/error-handling-patterns.md +26 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/feature-playbook.md +43 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/observability-implementation-patterns.md +31 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/project-structure-and-tooling.md +24 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/public-api-security-patterns.md +52 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/redis-cache-lock-patterns.md +78 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/schema-and-validation-patterns.md +23 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/source-evidence-map.md +56 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/sqlalchemy-and-migrations-patterns.md +99 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/testing-and-quality-patterns.md +61 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/web-framework-patterns.md +35 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/SKILL.md +91 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/config-runtime-readback.md +20 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/mr-merge-authorization.md +31 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/post-release-env-reset.md +31 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/release-closeout-evidence.md +20 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/release-scope-confirmation.md +21 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/tag-and-prod-pipeline-gate.md +20 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/test-scope-prompt.md +24 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/watcher-discipline.md +14 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/SKILL.md +64 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/references/comment-safe-release-doc.md +19 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/references/release-evidence-workflow.md +23 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/references/release-testing-scope-section.md +15 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-baseline/SKILL.md +87 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-baseline/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/SKILL.md +130 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/references/prd-composition-contract.md +35 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/references/requirement-closure-contract.md +86 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/references/security-four-questions.md +38 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-intent/SKILL.md +91 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-intent/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-scope/SKILL.md +88 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-scope/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/SKILL.md +337 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/analysis-parse-fix-test-challenge-replay.md +47 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/attribution-verification.md +69 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/bootstrap-slim-c3-obligation-table.md +112 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/coverage-exhaustion-traps.md +45 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/description-authoring.md +162 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/dual-track-review-gate.md +507 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/eval-routing.md +86 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/evidence-card-template.md +51 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/example-domain-preselect.md +79 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/external-practice-controls.md +57 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/extraction-lifecycle-handoff.md +65 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/extraction-quickstart.md +194 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/firing-point-placement.md +75 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/harness-patterns-and-eval.md +286 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/incident-postmortem-extraction.md +190 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/l0-l1-l2-routing.md +114 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/online-skill-review.md +47 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/parallel-stack-references-pattern.md +164 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/r0-leakage-audit.md +90 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/recurring-anti-patterns-checklist.md +320 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/resume-paused-delivery.md +16 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/review-feedback-mining.md +33 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/review-finding-standards.md +57 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/review-rubric.md +40 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/rule-consolidation.md +118 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/skill-listing-budget.md +19 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/source-register.md +254 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/source-to-skill-extraction.md +658 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/two-source-extraction-pattern.md +167 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/uiux-judgment-extraction.md +179 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/uiux-routing-map.md +51 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/validation-and-landing.md +180 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/AGENTS.md +18 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-ccl-skills.sh +1452 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-evidence-card-leak.sh +491 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-mr-target-freshness.sh +173 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-size-budget.sh +488 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-sync-pointers.sh +419 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/eval-golden-trace.rb +197 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/eval-health.rb +327 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/eval-routing-bank.rb +401 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/eval-routing.rb +248 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/generic-r0-leak-scan.sh +282 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/governing-chain-diff.py +321 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/impact-chain-gate.rb +964 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/register-firing-path-resolution.rb +708 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/skill-behavior-eval.py +540 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/source-register-lifecycle.rb +51 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/source-register-pending-status.rb +55 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_ai_coding_implementation_gates.sh +829 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_impact_chain_refscripts.sh +1203 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_r0_status.sh +75 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_register_pending_exclusion.sh +137 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_regressions.sh +173 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_route_drift.sh +377 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_size_budget.sh +833 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_skill_catalog.sh +491 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_source_register_lifecycle.sh +114 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_mr_target_freshness.sh +261 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_sync_pointers.sh +538 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_controlled_escalation_pins.sh +154 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_eval_routing_bank_grader_diagnostics.sh +190 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_eval_routing_bank_surface_binding.sh +178 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_eval_routing_prose_target.sh +86 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_generic_r0_leak_scan.sh +131 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_git_identity_predicate_gate.sh +243 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_governing_chain_diff.sh +419 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_impact_chain_gate_dateless_host.sh +120 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_register_firing_path_resolution.sh +724 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_register_firing_path_wiring.sh +414 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_regression_runner_registration.sh +34 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_routing_bank_integrity.sh +205 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_routing_pointer_integrity.sh +194 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_validate_skill_credential_cwd.sh +61 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_validate_skill_cross_refs.sh +111 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_validate_skill_root_depth.sh +53 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/validate-skill.sh +257 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/SKILL.md +98 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/references/input-state-machines.md +36 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/references/streaming-rich-output.md +130 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/references/terminal-side-channels.md +96 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/SKILL.md +408 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/AGENTS.md +18 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/bitable-setup.md +573 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/ci_templates/README.md +120 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/ci_templates/github-actions.yml +119 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/ci_templates/gitlab-ci.yml +76 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/ci_templates/jenkins.Jenkinsfile +106 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/classical-test-design-techniques.md +279 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/gen_report.py +2807 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/makefile-template.md +200 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/report-config-schema.md +272 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/run_pytestless.py +475 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/source-to-case-workflows.md +258 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc-marker-conventions.md +316 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc-review-and-prioritization.md +145 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/AGENTS.md +16 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/tc.dart +129 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/tc.go +197 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/tc.py +135 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/tc.ts +285 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/test_gen_report.py +2144 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/update-lifecycle.md +62 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/SKILL.md +212 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/ci-fixtures-and-flake-control.md +75 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/client-runtime-test-matrices.md +50 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/data-and-workflow-testing.md +34 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/design-closed-contract-oracles.md +31 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/e2e-real-flow-testing.md +71 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/fitness-functions.md +240 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/integration-contract-testing.md +235 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/non-functional-specialized-scenarios.md +296 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/rd-testing-standard-template.md +126 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/run-killing-mutation-walk.md +43 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/scenario-testing.md +136 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/source-evidence-map.md +59 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/structured-tc-input-translation.md +67 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/test-code-authoring-patterns.md +392 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/test-data-and-determinism.md +39 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/test-topology-and-commands.md +92 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/unit-testing.md +46 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/vendored-contract-drift-checklist.md +64 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/verify-enforcement-mechanisms.md +18 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/AGENTS.md +17 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/client-terminal-ansi-check.py +140 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/client-terminal-ansi-check.test.sh +75 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/lang-basics-ast-check.py +170 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/lang-basics-ast-check.test.sh +87 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/lang-basics-go-check.go +198 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/lang-basics-go-check.test.sh +109 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/test_mutation_backup_recipe.sh +237 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/SKILL.md +184 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/comment-safe-feishu.md +93 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/cross-model-co-review.md +3 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/delivery-face-closeout.md +60 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/doc-charter-first.md +17 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/session-vantage-leakage.md +58 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/SKILL.md +126 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/complex-workspace-patterns.md +47 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/embedded-h5-in-host.md +87 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/react-architecture.md +194 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/source-evidence-map.md +60 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/web-quality-release.md +190 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/web-ui-quality.md +83 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/SKILL.md +179 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/agents/openai.yaml +4 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/references/shared-branch-rebase.md +25 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/AGENTS.md +23 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/test_worktree_status.sh +207 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/test_worktree_sweep.sh +481 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/worktree-status.sh +325 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/worktree-sweep.sh +245 -0
- package/dist/assets/release.json +2797 -0
- package/dist/claude-adapter.d.ts +9 -0
- package/dist/claude-adapter.js +240 -0
- package/dist/cli-worker.d.ts +1 -0
- package/dist/cli-worker.js +32 -0
- package/dist/cli.d.ts +22 -0
- package/dist/cli.js +214 -0
- package/dist/codex-host.d.ts +30 -0
- package/dist/codex-host.js +162 -0
- package/dist/fs-safe.d.ts +21 -0
- package/dist/fs-safe.js +241 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/manifest.d.ts +8 -0
- package/dist/manifest.js +135 -0
- package/dist/opencode-adapter.d.ts +10 -0
- package/dist/opencode-adapter.js +416 -0
- package/dist/operations.d.ts +3 -0
- package/dist/operations.js +956 -0
- package/dist/paths.d.ts +20 -0
- package/dist/paths.js +4 -0
- package/dist/types.d.ts +58 -0
- package/dist/types.js +1 -0
- package/dist/unified.d.ts +4 -0
- package/dist/unified.js +64 -0
- package/dist/version.d.ts +2 -0
- package/dist/version.js +5 -0
- package/package.json +35 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: go-microservice-dev
|
|
3
|
+
description: Use when implementing, modifying, scaffolding, generating, or testing a new product's Go microservice, backend feature, or standalone Go CLI/tooling binary using protobuf IDL, Kitex or similar RPC, Hertz or similar HTTP, Wire/DI, MySQL/GORM-style DAL, Redis, MQ, dynamic config, code generation, and focused tests. For reproduction, isolation, or root-cause debugging, use defect-diagnosis first; this skill owns the Go implementation/fix. Triggers also include "用 Go 写一个服务", "Go 后端怎么搞", "Kitex 接口怎么写", "GORM 加索引", "用 Go 写个命令行工具", "重构 Go 服务里的某文件/某类(局部)", "拆分 Go 服务中的大文件或大类", "refactor a file/class within a Go service".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Go Microservice Dev
|
|
7
|
+
|
|
8
|
+
Use this for implementation of new backend products and services. It should adapt to the repo in front of you, but the workflow is independent of any prior codebase.
|
|
9
|
+
|
|
10
|
+
## Skill Routing
|
|
11
|
+
|
|
12
|
+
- Use this skill for implementation, scaffolding, code generation, handlers, RPC methods, DAL, Redis, MQ, jobs, external clients, DI, 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 `go-microservice-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 Go-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 codebase-specific skills only when the task is explicitly about an existing legacy/workspace repository.
|
|
19
|
+
- Development references should turn already-chosen architecture into code, tests, and generated artifacts. If a change requires choosing ownership, security model, source of truth, or release governance, first apply `go-microservice-architecture`.
|
|
20
|
+
- 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`.
|
|
21
|
+
- 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.
|
|
22
|
+
|
|
23
|
+
## Generalization Discipline
|
|
24
|
+
|
|
25
|
+
- 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.
|
|
26
|
+
- Convert domain-specific source patterns into reusable mechanics: handler shape, contract evolution, repository pattern, transaction boundary, cache key strategy, idempotency, job lease, config, observability, or test style.
|
|
27
|
+
- If an observed pattern only works for one product domain, discard it instead of turning it into a rule.
|
|
28
|
+
- Resolve conflicts by choosing the safer generic default: explicit contracts over hidden conventions, DB constraints over cache-only correctness, typed config over ad hoc strings, idempotent consumers over retry-only consumers, focused unit tests over live-infra tests by default, and fail-closed for auth/permission/data-integrity paths.
|
|
29
|
+
- Fuse patterns only when both are product-agnostic and reduce implementation ambiguity; otherwise keep the simpler rule.
|
|
30
|
+
- When adding or revising durable Go implementation guidance, check whether the lesson is generic backend service practice that should also update `python-service-dev`, or belongs in a shared workflow skill instead. If the rule depends on Go tooling, protobuf/Kitex/Hertz, Go concurrency, or Go package layout, keep it here and do not force a Python mirror.
|
|
31
|
+
- Example: if an existing project uses inline Redis keys but another wraps keys in typed builders, implement typed builders and discard inline string formatting as a reusable pattern.
|
|
32
|
+
|
|
33
|
+
## Development Workflow
|
|
34
|
+
|
|
35
|
+
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.
|
|
36
|
+
|
|
37
|
+
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 (tooling: `references/developer-tooling-patterns.md`).
|
|
38
|
+
|
|
39
|
+
1. Establish the target service shape.
|
|
40
|
+
- Is this an HTTP API, internal RPC, worker/consumer, scheduled task, command-line tool, or shared library?
|
|
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
|
+
- Also classify SDK/tooling, generated-contract packages, and demo/test modules; do not treat every `go.mod`, `cmd/*`, or unfamiliar directory-naming/build-target convention as a deployable RPC service.
|
|
43
|
+
- Identify the nearest `go.mod`, service entrypoint, config files, IDL, generated code, DI setup, and test commands.
|
|
44
|
+
- When mining a local/internal reference tree for Go 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.
|
|
45
|
+
- Check whether tests are split into fast unit tests and infrastructure-dependent integration tests.
|
|
46
|
+
|
|
47
|
+
2. Start from contracts and data.
|
|
48
|
+
- Update protobuf IDL before changing request/response shape.
|
|
49
|
+
- For new or contract-visible services, confirm the globally unique service name, IDL source location, generation command, and generated artifact version before implementing handlers or service logic. Prefer consuming generated contract packages from the contract/generation boundary. When shared IDL and IDLGen repositories exist, Go implementation must use the generated Go artifacts from that shared boundary and keep compatibility with Python and client-side consumers; do not create service-local private IDL copies that drift from the shared contract.
|
|
50
|
+
- For protobuf-backed HTTP, confirm whether protobuf is only the contract source or also the binary wire format. For a new protobuf-backed HTTP surface, record the source/config/test location for the generator, route annotations, JSON/binary content-type policy, protobuf-generated clients, middleware order, error/envelope mapping, and compatibility tests before writing handlers. For modifications, confirm only the touched items; an additive non-wire claim must cite the out-of-scope evidence required by `../platform-service-connectivity/references/protobuf-http-contract-signals.md`. Without that cited evidence, the touched item is a blocker, not an additive pass.
|
|
51
|
+
- 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 transport boundary and do not return ad hoc top-level business fields from handlers.
|
|
52
|
+
- 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. Go 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.
|
|
53
|
+
- 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.
|
|
54
|
+
- Use generated request/response/common-field types where they exist. If domain or persistence models differ from transport DTOs, map them explicitly at the transport/application boundary; do not let generated API DTOs leak into domain code unless the architecture record makes them the public application contract.
|
|
55
|
+
- Define DB schema/model changes before DAL code. New Go MySQL services use GORM behind DAL/repository boundaries by default unless the repo already standardizes or conventionally uses another query layer, or the architecture records a deliberate alternative.
|
|
56
|
+
- Define Redis keys, TTLs, and idempotency/lock semantics before cache code.
|
|
57
|
+
- Define MQ topics/events, retry behavior, and idempotency before consumers.
|
|
58
|
+
- Define runtime config, health/readiness behavior, deploy metadata, traffic/canary switches, and rollback controls before release-facing code.
|
|
59
|
+
|
|
60
|
+
3. Keep layers clean.
|
|
61
|
+
- Transport layer: protocol mapping, validation, auth context, response mapping.
|
|
62
|
+
- Application/service layer: use-case orchestration and transactions.
|
|
63
|
+
- Domain layer: domain rules and invariants.
|
|
64
|
+
- Infrastructure layer: DB, Redis, MQ, RPC/HTTP clients, object storage, third-party APIs.
|
|
65
|
+
- Generated code: never hand-edit unless explicitly repairing generated output.
|
|
66
|
+
|
|
67
|
+
4. Wire dependencies explicitly.
|
|
68
|
+
- Constructors should declare what they need.
|
|
69
|
+
- Prefer small interfaces at boundaries where tests or adapters matter.
|
|
70
|
+
- Update DI provider sets and regenerate generated DI output if the repo uses it.
|
|
71
|
+
- Keep production and test dependency graphs separate when infrastructure clients need fakes.
|
|
72
|
+
- Reuse the repository's runtime wrappers for RPC/HTTP servers, clients, DB, Redis, MQ, logs, metrics, tracing, config, and service discovery before adding local one-off clients.
|
|
73
|
+
- 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 `Tx(ctx, fn)`, typed config client, MQ producer/consumer wrapper, context injector, error mapper, or query-safety hook. Safety-critical fragments — recover wrappers, timeout enforcement, untrusted-input decoding — must be a single shared implementation even at a dozen lines; a per-adapter copy that drifts fails as a process crash or a silent no-op, not as slowness.
|
|
74
|
+
- 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.
|
|
75
|
+
|
|
76
|
+
5. Verify at the right scope.
|
|
77
|
+
- Run focused unit tests for changed packages.
|
|
78
|
+
- Run integration-ish tests for DB/Redis/MQ wrappers only when environment is available.
|
|
79
|
+
- **TC traceability**: link tests via `tc.Mark(t, "TC-XX-NNN")` (helper from `test-artifact-management/references/tc_helpers/tc.go`, installed under `internal/testkit/tc/`).
|
|
80
|
+
- **`tc.Mark` MUST be the first non-comment line in the test body, BEFORE any `t.Skip` / `t.Skipf` / setup that may call `t.Fatal`** — otherwise the sidecar entry won't be written for skipped tests.
|
|
81
|
+
- See `test-artifact-management/references/tc-marker-conventions.md`.
|
|
82
|
+
- Before adding tests, `grep -rn 'tc\.Mark.*"TC-[A-Z]' .` plus the sidecar `test/results/tc-map.jsonl` to check for existing coverage — extend rather than duplicate.
|
|
83
|
+
- When a TC is marked 废弃, grep both source and sidecar for that TC ID; follow deprecation cascade and orphan rules in `testing-strategy`.
|
|
84
|
+
- Tests without `tc.Mark` calls: prompt user only when the underlying code is also removed.
|
|
85
|
+
- **废弃级联:业务代码是否仍在用** — Go 用 `go list` 拿真实导入图,不依赖手 grep:
|
|
86
|
+
1. 看测试文件导入的产品包:`go list -f '{{join .TestImports "\n"}}{{"\n"}}{{join .XTestImports "\n"}}' ./internal/foo/`
|
|
87
|
+
2. 对每个产品包,查谁还在 import:`go list -f '{{.ImportPath}}: {{join .Imports " "}}' ./... | grep "<pkg-path>"`
|
|
88
|
+
3. 只剩本测试 import → 同 commit 删 pkg + 测试;其他产品代码仍 import → 测试目标在用,不删
|
|
89
|
+
4. 边界:`go:build` tag 受限的 import 默认看不到,用对应 tag 跑 `go list`;反射 / interface 实现注册(`init()` 注册到全局 map)grep 抓不到,得运行时验证或人工确认
|
|
90
|
+
- Run codegen and formatting when generated inputs changed.
|
|
91
|
+
- Keep fast tests deterministic; isolate tests that need live infrastructure, long sleeps, generated files, or external credentials.
|
|
92
|
+
|
|
93
|
+
## Implementation Rules
|
|
94
|
+
|
|
95
|
+
- Pass `context.Context` through all external calls. The carve-out is narrow and behavioral: only a function that is and stays side-effect-free — no external calls, goroutines, filesystem/env, clock/random, or logging/trace/tenant/feature lookup across its body and callees — may omit `ctx`. A mapper or helper that does, or later gains, any such call takes `ctx`. "ctx on external calls" is not "ctx on every function", but the test is behavior, not the name.
|
|
96
|
+
- Set timeouts for RPC/HTTP/DB/Redis/MQ operations.
|
|
97
|
+
- Honor an existing context deadline when it is shorter than the local default timeout.
|
|
98
|
+
- Separate short serving-path request timeouts from longer admin, migration, bootstrap, and repair-operation timeouts. Do not reuse a sub-second request timeout for synchronous dependency setup, index builds, resource activation, schema creation, or other startup administration.
|
|
99
|
+
- Use one canonical error model and convert errors at transport boundaries.
|
|
100
|
+
- Add or preserve trace/log id in inbound, outbound, and async execution paths.
|
|
101
|
+
- MQ producers and consumers should preserve request context where possible, define retry/drop/dead-letter/alert behavior explicitly, and not return success after business failure unless the drop policy is deliberate and observable.
|
|
102
|
+
- MQ producer/consumer wrappers should centralize metadata propagation, topic/tag/filter config, worker sizing, retry/drop behavior, panic recovery, close/drain lifecycle, latency/error metrics, and replay or DLQ visibility. Business handlers should implement domain work and idempotency, not recreate consumer scaffolding.
|
|
103
|
+
- Use read/write DB separation if the service stack provides it.
|
|
104
|
+
- Use transactions for multi-step writes inside one database.
|
|
105
|
+
- Keep GORM/sqlx/raw SQL behind DAL or repository modules; handlers and application services should call intent-focused repository methods, not construct queries directly.
|
|
106
|
+
- When referencing an existing codebase or platform pattern, match the core abstraction shape, not just the concept. For example, if the reference stack exposes `Tx(ctx, fn)` plus transaction-scoped repository accessors or factories, add or reuse the same kind of platform/DAL helper instead of hand-writing `Begin/Commit/Rollback` or raw `tx.ExecContext` blocks in business code.
|
|
107
|
+
- Keep database read/write routing and transaction ownership in the shared DB/platform layer when the repository already has one. Business repositories should call the unified transaction interface and should not duplicate commit/rollback templates unless no shared primitive exists yet.
|
|
108
|
+
- For DB-heavy services, prefer shared transaction helpers that recover/rollback on panic or error, 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 DDL/DAL review evidence, bounded pagination assertions, or focused tests. These checks should become framework or DAL behavior, not reviewer folklore.
|
|
109
|
+
- For DB changes, keep DDL, generated model/query/updater/DAL output, and migration/rollback notes together.
|
|
110
|
+
- Before adding a DB index migration, inspect existing and final active migration indexes for the same table/column/order signature, including older migrations and later drops. If the repo has migration metadata or tests, add or extend a deterministic duplicate-index guard so redundant indexes are caught mechanically instead of by review memory.
|
|
111
|
+
- Treat MQ delivery as at-least-once; consumers must be idempotent.
|
|
112
|
+
- 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/MQ/job-restart behavior.
|
|
113
|
+
- 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.
|
|
114
|
+
- 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.
|
|
115
|
+
- 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.
|
|
116
|
+
- 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.
|
|
117
|
+
- 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.
|
|
118
|
+
- Use Redis locks with unique values and compare-and-delete unlock.
|
|
119
|
+
- Centralize Redis keys, TTLs, lock leases, counters, and rate-limit scopes in typed cache/coordination adapters.
|
|
120
|
+
- Keep config typed and environment-specific.
|
|
121
|
+
- Keep generated code reproducible with documented commands.
|
|
122
|
+
- For scheduled jobs, implement distributed lock, max execution time, retry/backoff, panic recovery, and clear retry-vs-skip behavior.
|
|
123
|
+
- For streaming or long-running generated-content flows, persist explicit state transitions: waiting/running, partial output when useful, timeout, cancellation, provider error, success/EOF, cost/usage recorded, and repair/alert when persistence fails. Close stream readers and reject conflicting concurrent work when the product state machine requires single-flight behavior.
|
|
124
|
+
- For high-risk config, add typed fields, production-safe defaults, tests for disabled/missing config, and explicit enablement checks before behavior can run.
|
|
125
|
+
- For external stateful dependency bootstrap, make the operation idempotent and self-healing: validate existing resources, repair missing sub-resources such as indexes or queues when safe, then activate or load the resource. Do not stop at an `exists` check when a prior partial failure could leave the resource unusable.
|
|
126
|
+
- 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.
|
|
127
|
+
- 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.
|
|
128
|
+
- When bumping a shared dependency's version, change it across **every** consuming module in the repo, not only the obviously-affected ones — including indirect consumers that reach the dependency through a local `replace => ../x` or that independently pin the same transitive dependency. Bump and `go mod tidy` each module to a consistent version, then run the **full** suite (`go test ./...` in every touched module, not just the directly-related one) and update any test that hard-asserts the dependency pin/version. A module left on the old pin makes its module graph inconsistent and typically fails only later — often surfacing as a CI dependency-fetch error that masks the real version mismatch. Separately, a local `replace => ../sibling` makes the stale-`require` failure class invisible to EVERY in-repo build and test (they all resolve through the replace), while external consumers resolve the real pinned version (`replace` is ignored outside the defining module) — so a module whose pinned sibling tag predates symbols it now uses publishes a tag that compiles everywhere internally and fails only for external importers. Before tagging a module in a multi-module repo that uses local `replace`, verify it from the external-consumer view: build from OUTSIDE the repo so the repo's own `replace` directives cannot apply — `replace` only takes effect in the main module being built, and `GOWORK=off` alone does NOT neutralize a replace in the module's own `go.mod` — and the passing gate must cover EVERY package of the candidate module — from a throwaway consumer that means building the candidate's import-path set (`go build <candidate-module>/...`; a bare `go build ./...` there builds only the consumer's own packages), with the consumer binding the unpublished candidate via a single `replace` to the candidate checkout ONLY while sibling deps resolve to published tags (confirm with `go list -m all`); from a verification checkout (local `replace` directives stripped/neutralized) it means `go build ./...` in the candidate — a broken symbol in one subpackage still publishes a broken tag. A checkout that keeps `replace` with the sibling directory present resolves locally and silently passes; one that keeps `replace` with the path absent merely fails on the missing directory even when the pins are correct (a negative control proving the replace would have applied — not a passing gate); the in-repo full suite can never catch this class. When siblings release together and a dependent needs the sibling's NEW tag, release in topological order: tag and push the dependency first, then verify the dependent's candidate the same consumer-view way (checkout outside the sibling layout, replaces stripped, building against the published dependency tag), then tag the dependent (a dependency cycle between modules stops for the release owner to break).
|
|
129
|
+
|
|
130
|
+
## Reference Loading
|
|
131
|
+
|
|
132
|
+
- For source provenance, current extraction boundary, and keep/merge/discard decisions, read `references/source-evidence-map.md` when auditing or re-extracting this skill.
|
|
133
|
+
- For feature implementation steps, read `references/feature-playbook.md`.
|
|
134
|
+
- For generated code, DB, Redis, MQ, and testing patterns, read `references/engineering-patterns.md`.
|
|
135
|
+
- For reliability, context, error handling, async jobs, and external calls, read `references/reliability-patterns.md`.
|
|
136
|
+
- For service setup, codegen commands, DI wiring, and test-target hygiene, read `references/scaffold-and-codegen.md`.
|
|
137
|
+
- For protobuf/IDL implementation, field numbering, enum/message patterns, generation commands, and compatibility tests, read `references/protobuf-contract-patterns.md`.
|
|
138
|
+
- For secret clients, service discovery clients, object storage, external HTTP clients, bounded concurrency, and dependency adapters, read `references/dependency-client-patterns.md`.
|
|
139
|
+
- For handler/service/DAL feature work, validation, transactions, pagination, and side effects, read `references/domain-feature-patterns.md`.
|
|
140
|
+
- For data access, local/Redis cache, locks, idempotency, and query design, read `references/data-access-patterns.md`.
|
|
141
|
+
- For public API auth, external app credentials, authorization-scope checks, callback verification, and audit behavior, read `references/public-api-integration-patterns.md`.
|
|
142
|
+
- For HTTP gateway handlers, generated route files, middleware hooks, request binding, response mapping, and generated HTTP clients, read `references/http-gateway-client-patterns.md`.
|
|
143
|
+
- For release-facing code, deployment config, health endpoints, canary checks, traffic config, approval tasks, and operations notifications, read `references/release-ops-patterns.md`.
|
|
144
|
+
- For test strategy, fakes/mocks, traffic replay, generated-output tests, and CI quality gates, read `references/quality-and-testing-patterns.md`.
|
|
145
|
+
- For cross-stack unit/integration/E2E test layer selection, fixtures, flake control, and CI gate design, use `testing-strategy`.
|
|
146
|
+
- For runtime middleware, context propagation, service discovery clients, logs, metrics, tracing, and request/response logging controls, read `references/observability-implementation-patterns.md`.
|
|
147
|
+
- For DDL-first DB implementation, generated models/DAL, sharding-safe queries, migrations, and transaction tests, read `references/db-schema-and-dal-patterns.md`.
|
|
148
|
+
- For Redis clients, key builders, local/distributed cache, CAS scripts, locks, rate limiting, counters, and task queues, read `references/redis-cache-lock-patterns.md`.
|
|
149
|
+
- For spreadsheet, CSV, file import/export jobs, row validation, slice processing, and error reports, read `references/bulk-import-export-patterns.md`.
|
|
150
|
+
- For durable task state machines, allowed transitions, duplicate delivery, retries, and terminal-state behavior, read `references/state-machine-task-patterns.md`.
|
|
151
|
+
- For MQ consumers, producers, typed payload decoding, dynamic activation, pre-handling, retry/drop behavior, and latency alerts, read `references/mq-consumer-patterns.md`.
|
|
152
|
+
- For audit logs, history records, redaction, async writes, and query APIs, read `references/audit-history-patterns.md`.
|
|
153
|
+
- For dynamic config schemas, rule validation, condition evaluation, routing, and rollout ratios, read `references/config-rule-routing-patterns.md`.
|
|
154
|
+
- For replay, shadow execution, response comparison, diff scoring, and replay result storage, read `references/replay-comparison-patterns.md`.
|
|
155
|
+
- For bounded concurrency, batch jobs, replay/shadow workers, DB performance guards, and stuck-task repair, read `references/performance-capacity-patterns.md`.
|
|
156
|
+
- For webhook or notification clients, templates, async delivery, retries, and alert throttling, read `references/notification-patterns.md`.
|
|
157
|
+
- For generated spreadsheets, PDFs, CSVs, reports, object upload, and download artifacts, read `references/artifact-generation-patterns.md`.
|
|
158
|
+
- For canonical errors, response builders, error wrapping, validation errors, and transport mapping, read `references/error-contract-patterns.md`.
|
|
159
|
+
- For developer CLIs, generators, DDL-to-model generation, generated file safety, and command tests, read `references/developer-tooling-patterns.md`.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Artifact Generation Patterns
|
|
2
|
+
|
|
3
|
+
Use this when implementing generated spreadsheets, PDFs, CSVs, reports, exports, or downloadable files.
|
|
4
|
+
|
|
5
|
+
## Generator Shape
|
|
6
|
+
|
|
7
|
+
- Split generators into data query, row/page model, template/style, writer, upload, and artifact record.
|
|
8
|
+
- Accept an `io.Writer` for generated output where possible; return bytes only for small artifacts.
|
|
9
|
+
- Keep templates, column definitions, fonts, styles, and page dimensions configurable or versioned.
|
|
10
|
+
- Avoid reflection-based row extraction unless field ordering and exported-field handling are explicit and tested.
|
|
11
|
+
- For spreadsheet columns, prefer typed column definitions over struct field order.
|
|
12
|
+
|
|
13
|
+
## Spreadsheets And CSV
|
|
14
|
+
|
|
15
|
+
- Use streaming writers for large spreadsheets.
|
|
16
|
+
- Set stable sheet names, header rows, column order, cell formats, and empty-value behavior.
|
|
17
|
+
- Validate sheet names and cell values for client compatibility.
|
|
18
|
+
- Close files/writers and propagate close errors when the library requires it.
|
|
19
|
+
- CSV generation should define delimiter, quoting, newline, encoding, and formula-injection protection.
|
|
20
|
+
|
|
21
|
+
## PDFs And Rich Reports
|
|
22
|
+
|
|
23
|
+
- Register fonts/assets before rendering and fail early if missing.
|
|
24
|
+
- Keep layout math isolated and covered by tests for pagination, wrapping, alignment, and overflow.
|
|
25
|
+
- Treat external images and assets as untrusted: set download timeout, size limit, content type validation, and cache policy.
|
|
26
|
+
- Render to a buffer or writer, then upload through the storage adapter.
|
|
27
|
+
|
|
28
|
+
## Storage And Download
|
|
29
|
+
|
|
30
|
+
- Upload generated artifacts with content type, size, checksum where available, and retention metadata.
|
|
31
|
+
- Store object key, file name, format, size, status, and expiry in the artifact/job record.
|
|
32
|
+
- Do not write server runtime outputs only to local disk.
|
|
33
|
+
- Signed download URLs should be short-lived and scoped to the requester.
|
|
34
|
+
|
|
35
|
+
## Tests
|
|
36
|
+
|
|
37
|
+
- Test empty dataset, large dataset, stable column order, invalid sheet name, formula injection, missing font/asset, pagination, upload failure, close error, content type, and generated file openability.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Audit And History Patterns
|
|
2
|
+
|
|
3
|
+
Use this when implementing audit logs, operation records, resource history, or change tracking.
|
|
4
|
+
|
|
5
|
+
## Audit Record Shape
|
|
6
|
+
|
|
7
|
+
- Capture actor, service identity, resource scope, resource id, operation name, operation type, request id, trace or log id, timestamp, result, and canonical error code.
|
|
8
|
+
- Store safe before/after summaries or field-level diffs when needed.
|
|
9
|
+
- Never store raw secrets, tokens, passwords, signatures, or credentials.
|
|
10
|
+
- Serialize params and data through redaction helpers; avoid dumping whole request or response objects.
|
|
11
|
+
- Use stable operation names rather than function names that change during refactors.
|
|
12
|
+
|
|
13
|
+
## Write Path
|
|
14
|
+
|
|
15
|
+
- Audit writes for critical operations should be in the same transaction or outbox as the state change when correctness depends on them.
|
|
16
|
+
- Best-effort audit is acceptable only when explicitly non-critical; recover panic and emit failure metrics or logs.
|
|
17
|
+
- Async audit writers need bounded queue, retry, backpressure or drop policy, and shutdown flush. For any async side-path (audit, ledger, usage reporting), the working posture is four pieces together: a detached context carrying only whitelisted correlation fields + durable work-item identity (never a wholesale `context.WithoutCancel` copy — it preserves request auth/session/secret values into work that outlives the request; the worker runs under service identity), derived only at the accept boundary for an already-accepted work item, with its own bounded deadline; for records of 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 after connection loss must never leave a fired detached record — and idempotent reconciliation of an unknown outcome is only possible if a durable intent/reconciliation key was 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 commit 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/tokens) invert the order: book a per-attempt reservation/outbox row before or independently of the local outcome, with idempotent reconciliation — gating them on local commit drops charges that already happened; a bounded semaphore/queue; shutdown ordering where the accept check + `wg.Add` are serialized under one lock against a `closed` flag that `Close` sets under the same lock — but `Close` releases the lock before calling `wg.Wait`, and worker `Done`/flush paths must not need that lock, or shutdown deadlocks; and a loss policy matched to the data class: an explicitly accepted bounded-loss policy paired with a reconciliation/repair job is valid 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.
|
|
18
|
+
- Audit write errors should be observable even when they do not fail the main request.
|
|
19
|
+
|
|
20
|
+
## Query Path
|
|
21
|
+
|
|
22
|
+
- Audit query APIs need resource-scope authorization, pagination, time range filters, and redaction on read.
|
|
23
|
+
- Default ordering should be deterministic, usually newest first with a stable tie-breaker.
|
|
24
|
+
- Large audit tables need partitioning, retention, or archive strategy before high-volume launch.
|
|
25
|
+
|
|
26
|
+
## Tests
|
|
27
|
+
|
|
28
|
+
- Test redaction, critical write rollback behavior, best-effort write failure, panic recovery, pagination, scope filtering, and time range boundaries.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Bulk Import And Export Patterns
|
|
2
|
+
|
|
3
|
+
Use this when implementing spreadsheet, CSV, file import, export, or other large batch jobs.
|
|
4
|
+
|
|
5
|
+
For status transitions, duplicate delivery, retry, and cancellation mechanics, use `state-machine-task-patterns.md` as the canonical implementation guide. This file covers row/file handling, slice execution, artifacts, and reports.
|
|
6
|
+
|
|
7
|
+
## Import Pipeline
|
|
8
|
+
|
|
9
|
+
- Represent each input row as a typed row object with row number, source name, raw values, normalized values, and `Errors []string`.
|
|
10
|
+
- Define source name as the sheet, tab, file part, or partition name from the input format.
|
|
11
|
+
- Validate file type, size, sheet/tab/partition count, visible sheets or partitions, header shape, start row, and min/max column count before row parsing.
|
|
12
|
+
- Normalize cells at the boundary: trim whitespace, pad missing optional columns, parse accepted list separators, and reject unsupported encodings or formats.
|
|
13
|
+
- Static row validation accumulates row errors; ordinary row errors should not fail the whole file.
|
|
14
|
+
- Cross-row validation detects duplicates and conflicts, then annotates every affected row.
|
|
15
|
+
- Enrichment and mapping resolve external names or codes to IDs through typed lookup caches.
|
|
16
|
+
- Mapping misses become row errors unless the workflow is explicitly fail-fast.
|
|
17
|
+
- Commit only valid rows, chunk large batches, and preserve per-row outcome.
|
|
18
|
+
|
|
19
|
+
## Job And Slice Processing
|
|
20
|
+
|
|
21
|
+
- Persist a job record with status, progress, total count, success count, failed count, error file pointer, actor, source file, and idempotency key.
|
|
22
|
+
- Split large jobs into slices or messages with stable slice index and job token.
|
|
23
|
+
- Use distributed locks or compare-and-update from the state-machine guide to claim each slice.
|
|
24
|
+
- Progress updates are best-effort; final status and counts must be durable.
|
|
25
|
+
- When all slices finish, generate a consolidated error report and transition the job to a terminal state.
|
|
26
|
+
|
|
27
|
+
## Error Reports
|
|
28
|
+
|
|
29
|
+
- Preserve original row order and include source row, source name, and failure reasons.
|
|
30
|
+
- Generate reports with streaming writers for large files.
|
|
31
|
+
- Upload reports to object storage with bounded expiry or retention and store only the object key or signed reference in the job record.
|
|
32
|
+
- Do not include secrets, tokens, credentials, or sensitive raw payloads in error reports.
|
|
33
|
+
- Empty error reports should be represented explicitly rather than failing report generation.
|
|
34
|
+
|
|
35
|
+
## Export Pipeline
|
|
36
|
+
|
|
37
|
+
- Use cursor or id-window pagination instead of offset for large datasets.
|
|
38
|
+
- Use streaming writers and chunked reads; avoid loading all rows into memory.
|
|
39
|
+
- Include stable column definitions, version, generated time, actor, and filter summary where useful.
|
|
40
|
+
- Apply the same authorization and resource-scope filters to export queries as API reads.
|
|
41
|
+
- Long exports should run as jobs with progress and downloadable artifact status.
|
|
42
|
+
|
|
43
|
+
## Cursor-Based Data Migration
|
|
44
|
+
|
|
45
|
+
- For large table migrations, read source rows by monotonic cursor or id window, not offset.
|
|
46
|
+
- Discover min/max cursor before splitting work, and persist or print chunk boundaries so failed chunks are replayable.
|
|
47
|
+
- Make worker count and chunk size explicit config with conservative defaults and validation.
|
|
48
|
+
- Insert into the target with idempotent create/upsert semantics before deleting from the source.
|
|
49
|
+
- Delete source rows only for the cursor window that was successfully written; prefer one transaction when source and target share a database boundary, otherwise record a replay or reconciliation path.
|
|
50
|
+
- Emit per-worker progress with current cursor, chunk range, migrated count, speed, and terminal error.
|
|
51
|
+
- Treat progress as best-effort and final migration state as durable or replayable; a closed progress channel is not proof that all chunks succeeded.
|
|
52
|
+
|
|
53
|
+
## Tests
|
|
54
|
+
|
|
55
|
+
- Test empty file, hidden or empty sheets/partitions, malformed headers, short rows, long rows, duplicate rows, mapping misses, partial success, error report generation, slice idempotency, cancellation, and retry after crash.
|
|
56
|
+
- For cursor migrations, test empty range, cursor boundary inclusiveness, idempotent insert, delete-after-insert ordering, worker error propagation, replaying a partial chunk, and progress reporting.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Config Rule Routing Patterns
|
|
2
|
+
|
|
3
|
+
Use this when implementing dynamic config, rule evaluation, filters, routing, rollout ratios, or controlled execution.
|
|
4
|
+
|
|
5
|
+
## Config Loading
|
|
6
|
+
|
|
7
|
+
- Represent config as typed structs with JSON/YAML tags, version, enabled flag, and default values.
|
|
8
|
+
- Load config through a provider interface so tests can supply fixed snapshots.
|
|
9
|
+
- Parse and validate into a new snapshot before swapping active config.
|
|
10
|
+
- Use an `RWMutex`, `atomic.Value`, or equivalent snapshot holder for high-read access.
|
|
11
|
+
- On provider or parse failure, keep the last valid snapshot and log/metric the failure.
|
|
12
|
+
- Avoid calling `defer cancel()` inside long-running loops; cancel each refresh context before the next iteration.
|
|
13
|
+
|
|
14
|
+
## Validation
|
|
15
|
+
|
|
16
|
+
- Validate required fields, enum values, regex syntax, ratio range, total ratio, max body size, timeout, concurrency, and target names.
|
|
17
|
+
- Keep validation errors structured with field and message.
|
|
18
|
+
- Register custom validators for complex objects instead of embedding ad hoc checks in handlers.
|
|
19
|
+
- Unknown rule fields should fail validation unless the schema explicitly supports forward-compatible metadata.
|
|
20
|
+
|
|
21
|
+
## Rule Evaluation
|
|
22
|
+
|
|
23
|
+
- Define a field registry that maps rule field names to typed extractors from request/context/metadata.
|
|
24
|
+
- Normalize values before comparison; numeric operators should parse both sides as numbers or fail predictably.
|
|
25
|
+
- Supported operators should be explicit: `eq`, `ne`, `lt`, `gt`, `le`, `ge`, `contains`, `regex`, `in`.
|
|
26
|
+
- Missing fields should have one documented behavior, usually no match.
|
|
27
|
+
- Nested condition groups should evaluate deterministically for `AND` and `OR`.
|
|
28
|
+
- Priority sorting should be stable and documented.
|
|
29
|
+
|
|
30
|
+
## Ratio Routing
|
|
31
|
+
|
|
32
|
+
- Use sticky hashing when route consistency matters for a subject or resource.
|
|
33
|
+
- Use random sampling only for stateless sampling where per-request variance is acceptable.
|
|
34
|
+
- Clamp ratios to valid bounds and test `0`, `1`, `50`, `99`, and `100`.
|
|
35
|
+
|
|
36
|
+
## Tests
|
|
37
|
+
|
|
38
|
+
- Test invalid config fallback, config version swap, concurrent reads during refresh, missing fields, bad regex, numeric parse errors, nested groups, priority ties, disabled rules, unknown target, and ratio boundaries.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Data Access Patterns
|
|
2
|
+
|
|
3
|
+
## Repository Shape
|
|
4
|
+
|
|
5
|
+
- Repositories should expose intent-focused methods such as `GetByID`, `GetByIDs`, `QueryPage`, `Create`, `UpdateStatus`, and `Upsert`.
|
|
6
|
+
- Keep `With(tx)` or an equivalent transaction binding method on repositories that participate in multi-write transactions.
|
|
7
|
+
- Return `nil, nil` for not-found only when the caller can distinguish it from an empty result; otherwise use a typed not-found error.
|
|
8
|
+
- Empty ID lists should be handled deliberately: no-op for optional filters, validation error for required keys.
|
|
9
|
+
- Keep raw SQL localized and covered by focused tests.
|
|
10
|
+
|
|
11
|
+
## Query Design
|
|
12
|
+
|
|
13
|
+
- Use read connections for reads and write connections for writes when the stack supports read/write separation.
|
|
14
|
+
- Use generated query builders for simple equality, range, order, and limit filters.
|
|
15
|
+
- For complex queries, keep conditions explicit and parameterized.
|
|
16
|
+
- Enforce safe defaults in repository methods: no unbounded list reads on serving paths, no update/delete without conditions, and no generic update with an empty update set.
|
|
17
|
+
- Convert time units at the boundary of a repository method and document whether fields use seconds, milliseconds, or database timestamps.
|
|
18
|
+
- Avoid offset pagination for long-running large reads; prefer `id > lastID` plus stable ascending order.
|
|
19
|
+
|
|
20
|
+
## Updates And Upserts
|
|
21
|
+
|
|
22
|
+
- Update only explicit columns; for upsert helpers, pass the intended update columns explicitly.
|
|
23
|
+
- Protect immutable fields such as primary key, create time, creator, and unique domain keys from generic update helpers.
|
|
24
|
+
- Use compare-and-update or row locking for counters, quotas, mutable quantities, and state machines.
|
|
25
|
+
- Re-read latest state inside a transaction before applying constrained updates or limits.
|
|
26
|
+
- Return affected row count when callers need to detect stale state or missing rows.
|
|
27
|
+
|
|
28
|
+
## Local Memory Cache
|
|
29
|
+
|
|
30
|
+
- Use local memory cache only for small, frequently read, eventually consistent data.
|
|
31
|
+
- Include TTL and capacity.
|
|
32
|
+
- Protect maps/LRU state with locks.
|
|
33
|
+
- Use singleflight or an equivalent duplicate-suppression mechanism for expensive cache misses.
|
|
34
|
+
- Cache key functions must be deterministic, panic-safe, and reject empty keys.
|
|
35
|
+
- If local cache is backed by a distributed store, distinguish local hit, distributed hit, miss, decode error, and store failure.
|
|
36
|
+
- Start cleanup workers carefully; make sure tests and short-lived commands are not polluted by infinite background goroutines unless acceptable.
|
|
37
|
+
- Cleanup workers should use stoppable tickers or be owned by a process-lifetime component with documented lifecycle.
|
|
38
|
+
- Cache miss and infrastructure/config failure should be distinguishable in callers.
|
|
39
|
+
|
|
40
|
+
## Redis Cache And Locks
|
|
41
|
+
|
|
42
|
+
- Centralize Redis key construction and include environment/lane/resource-scope dimensions where needed.
|
|
43
|
+
- Every cache key needs a TTL unless the data is intentionally durable.
|
|
44
|
+
- Lock values must be unique per attempt and unlock must compare value before delete.
|
|
45
|
+
- Use no-unlock throttling locks only when the lock's purpose is rate reduction and the TTL is the release mechanism.
|
|
46
|
+
- For work queues, record enough metadata to recover or inspect stuck work.
|
|
47
|
+
- Idempotency keys should include operation identity and retry window, not just message attempt count.
|
|
48
|
+
|
|
49
|
+
## Dynamic Config
|
|
50
|
+
|
|
51
|
+
- Wrap dynamic config access behind typed methods.
|
|
52
|
+
- Cache config briefly when it is read on hot paths.
|
|
53
|
+
- On dynamic config failure, choose an explicit default: fail closed for risk controls, fail open only when product behavior requires availability.
|
|
54
|
+
- Log config fetch failures with key name and safe context.
|
|
55
|
+
- Keep dynamic config keys stable and documented in code near the typed accessor.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# DB Schema And DAL Patterns
|
|
2
|
+
|
|
3
|
+
Use this when implementing DDL, generated DB models, DAL methods, transactions, sharding-aware queries, or DB migration tests.
|
|
4
|
+
|
|
5
|
+
## DDL-First Workflow
|
|
6
|
+
|
|
7
|
+
- Change DDL before model or repository code.
|
|
8
|
+
- Keep DDL, generated model/query/updater/DAL output, and hand-written repository changes in the same change.
|
|
9
|
+
- If a generator reads live DB schema, prefer a checked-in DDL file for reviewability when possible.
|
|
10
|
+
- Record migration order and rollback notes near the change or in the release plan.
|
|
11
|
+
- Run formatting and compile after codegen.
|
|
12
|
+
|
|
13
|
+
## Generated Model And DAL
|
|
14
|
+
|
|
15
|
+
- Generated model output should include:
|
|
16
|
+
- table name.
|
|
17
|
+
- column constants.
|
|
18
|
+
- struct fields and tags.
|
|
19
|
+
- query builder helpers.
|
|
20
|
+
- updater helpers.
|
|
21
|
+
- updatable column list.
|
|
22
|
+
- Generated DAL output should include a constructor, interface, embedded generic DAL, and `With(tx)` or equivalent transaction binding.
|
|
23
|
+
- Do not hand-edit generated model files. Fix generator input/templates or add hand-written repository methods beside generated code.
|
|
24
|
+
- Protect immutable columns from generic update helpers: primary key, create time, creator, immutable scope key, and unique domain keys.
|
|
25
|
+
|
|
26
|
+
## DB Proxy And Connections
|
|
27
|
+
|
|
28
|
+
- Build DB clients from typed config and secret provider; do not embed usernames/passwords in code or config files.
|
|
29
|
+
- Discover DB endpoints through service discovery or explicit environment config.
|
|
30
|
+
- Configure read/write separation when supported:
|
|
31
|
+
- reads use read connection.
|
|
32
|
+
- writes use write connection.
|
|
33
|
+
- transaction-bound repositories use the transaction connection.
|
|
34
|
+
- Match the reference stack's core DB abstraction shape, not just the concept. If the reference exposes `Tx(ctx, fn)` or repository `With(tx)`, add or reuse that shared helper instead of scattering hand-written transaction templates through business repositories.
|
|
35
|
+
- Set connection timeout, read timeout, write timeout, max open, max idle, idle lifetime, and max lifetime.
|
|
36
|
+
- Attach tracing and query logging at proxy initialization.
|
|
37
|
+
|
|
38
|
+
## Repository Methods
|
|
39
|
+
|
|
40
|
+
- Expose intent-focused methods such as `GetByID`, `GetByIDs`, `ListByStatus`, `Create`, `UpdateStatus`, `MarkDeleted`, and `Upsert`.
|
|
41
|
+
- Reject empty required conditions for update/delete/query-all helpers.
|
|
42
|
+
- Treat empty-condition protection as a hard invariant for generic helpers; callers that truly need full-table scans or bulk updates must use a separate, explicitly named admin/backfill path.
|
|
43
|
+
- Put a hard maximum limit on generic list helpers.
|
|
44
|
+
- Batch create/upsert helpers should enforce a max batch size and return affected rows when the caller needs retry or stale-write detection.
|
|
45
|
+
- When batch upsert must leave caller-owned objects with database-generated IDs or other generated fields, re-query by the exact domain unique key or conflict key after the write, map results back to the input objects, and fail if any non-deleted or non-skipped input row cannot be matched. Do not assume `CreateInBatches` plus `OnConflict` reliably hydrates generated IDs for every dialect or path.
|
|
46
|
+
- Prefer keyset pagination for large tables: `id > lastID` or another stable indexed key.
|
|
47
|
+
- Return affected row count when callers need to detect stale state, missing rows, or compare-and-update failure.
|
|
48
|
+
- Keep raw SQL localized and parameterized.
|
|
49
|
+
- If query or update builders are mutable or single-use, document that behavior and cover it with tests so callers do not accidentally reuse cleared conditions across reads, updates, or retries.
|
|
50
|
+
- **GORM generics API (gorm.io v1.30+, 2025) for new repository code** — call shape changes from `db.Where("status=?", s).Find(&users)` (uses shared `*gorm.DB` instance that has historically caused SQL-pollution bugs when the same `db` got reused with leftover where-clauses) to `gorm.G[User](db).Where(...).Find(ctx)` (generic typed query bound to `User`, each `gorm.G[T](db)` builds a fresh chain). Per gorm.io docs, the generics API is fully backward-compatible (mix generic + traditional in the same project; existing repositories untouched). **APIs DELIBERATELY REMOVED in the generics path**: `FirstOrCreate` and `Save` are not present in generics because the original semantics are race-prone / ambiguous (`FirstOrCreate` lacks atomicity guarantees on most dialects; `Save`'s "auto INSERT or UPDATE based on primary key presence" is the bug source the team has spent time on historically). **Migration trap for `Save` callers**: the legacy pattern `db.Save(&user)` does INSERT-or-UPDATE based on whether the primary key is zero; rewriting it as `gorm.G[User](db).Create(ctx, &user)` will FAIL with duplicate-key on the second call (no UPDATE fallback), and `gorm.G[User](db).Updates(ctx, &user)` does no INSERT for new rows. The correct generics rewrite is to branch explicitly: check whether the PK is set / fetch-by-PK first, then call `Create` for new rows or `Updates` for existing rows; for true upsert use `gorm.G[User](db).OnConflict(...).Create(ctx, &user)` (verify clause syntax against current docs). Audit each `Save` call site for the team's intended semantics before mechanical replacement — Save covered both "insert this" and "update this" cases under one verb, and they often need different branches in generics. Generics also adds transaction-timeout handling so a leaked transaction does not silently consume a pool slot forever. New repository methods on Go 1.21+ services should default to generics; legacy `db.Where(...).Find(&out)` repositories can stay until touched, then migrate per touch.
|
|
51
|
+
|
|
52
|
+
## Transactions
|
|
53
|
+
|
|
54
|
+
- Use `With(tx)` repositories inside a transaction; do not accidentally call the default read/write proxy mid-transaction.
|
|
55
|
+
- If the project does not yet expose a shared transaction helper, add it in the DB/platform/DAL layer before implementing business code that needs multi-step atomic writes.
|
|
56
|
+
- Roll back on error and panic; log panic stack with trace/log id.
|
|
57
|
+
- Keep transaction scope small. Do validation and remote calls outside the transaction when correctness allows.
|
|
58
|
+
- Re-read mutable rows inside the transaction before applying counters, quotas, quantities, or state transitions.
|
|
59
|
+
- For idempotent writes, use unique keys or persisted idempotency records, not only in-memory checks.
|
|
60
|
+
- If upsert falls back to update-all when the model does not declare updatable columns, treat that as a review finding for durable records. Either add an explicit mutable-column list or document why every column is safe to overwrite.
|
|
61
|
+
|
|
62
|
+
## Sharding-Safe Queries
|
|
63
|
+
|
|
64
|
+
- Sharded writes must include the shard key and primary/domain key needed by the routing function.
|
|
65
|
+
- Targeted reads, updates, and deletes must include shard key or another supported routing key.
|
|
66
|
+
- Do not update shard key columns.
|
|
67
|
+
- For migrations, generate DDL for every shard and apply consistently.
|
|
68
|
+
- For bypass/admin queries, require an explicit no-sharding mode and keep it out of normal request paths.
|
|
69
|
+
- Multi-shard fanout should be bounded, observable, and preferably offline or projection-backed.
|
|
70
|
+
|
|
71
|
+
## Index Safety
|
|
72
|
+
|
|
73
|
+
- Tests or local checks should catch common missing-index queries before production.
|
|
74
|
+
- For hot paths, inspect query plans for expected index use.
|
|
75
|
+
- If adding a query-plan checker plugin, guard against recursive checks, metadata/migration queries, and excessive production overhead.
|
|
76
|
+
- Query builders should make order, limit, equality filters, range filters, and unscoped soft-delete behavior explicit.
|
|
77
|
+
- Avoid `LIKE` prefixes, broad `IN` lists, and unbounded `ORDER BY` unless the index model supports them.
|
|
78
|
+
- Do not use production-only query-plan checks as the only guard; review schema and indexes in code.
|
|
79
|
+
- Review index safety from the DDL and DAL together. For every repository method that is expected to be hot, compare its equality predicates, `IN` predicates, joins, soft-delete predicate, order, and pagination with the left-prefix order of the table's composite indexes. A single-column index somewhere on the table is not enough evidence.
|
|
80
|
+
- If a method needs an index hint to be stable, treat the hint as a compatibility contract: the named index must exist in checked-in DDL, match the method's predicate order, and be covered by an assertion-based query-plan or integration test. Do not leave stale migration comments or hints that disagree with the DDL.
|
|
81
|
+
- Re-query-after-upsert paths should use the same unique/conflict key shape that the write uses. If the re-query adds extra filters, those filters must be covered by the same composite index, be redundant with the unique key, or be explicitly documented as a bounded narrowing condition.
|
|
82
|
+
- For tuple `IN`, large `IN` lists, offset pagination, `OR`, or leading-wildcard `LIKE`, record why the expected cardinality is bounded or move the path to a search/projection/keyset flow. These shapes require query-plan evidence before they become release-gating hot paths.
|
|
83
|
+
- Non-production query-plan checkers should fail or surface missing-index queries in tests or local development, but they are only smoke evidence unless they assert the expected key, row estimate, and representative predicates.
|
|
84
|
+
|
|
85
|
+
## Migration And Backfill Implementation
|
|
86
|
+
|
|
87
|
+
- Backfills should run in bounded batches with resume markers.
|
|
88
|
+
- Use idempotent batch writes or compare-and-update so retries are safe.
|
|
89
|
+
- Emit progress metrics: read, updated, skipped, failed, duration, and last marker.
|
|
90
|
+
- Keep sleep/backoff configurable.
|
|
91
|
+
- Stop on irreversible data corruption risk; skip and record individual bad rows only when product semantics allow it.
|
|
92
|
+
- Never run long backfills inside request handlers.
|
|
93
|
+
|
|
94
|
+
## Tests
|
|
95
|
+
|
|
96
|
+
- Unit-test query option builders for equality, range, ordering, limit, soft-delete, and empty-condition behavior.
|
|
97
|
+
- Test repository methods with fakes when SQL shape is not important and with integration tests when SQL shape matters.
|
|
98
|
+
- Test transactions for rollback on error and panic.
|
|
99
|
+
- Test upsert update-column lists protect immutable fields.
|
|
100
|
+
- Test sharding route logic for insert, select, update, delete, missing shard key, multi-shard rejection, and shard-key update rejection.
|
|
101
|
+
- Test migrations/backfills with small fixtures and repeated runs to prove idempotency.
|
|
102
|
+
|
|
103
|
+
## Outbox For Cross-Write Consistency
|
|
104
|
+
|
|
105
|
+
- When a DB write must be reflected in Redis, MQ, or an external system, use an outbox table written in the same transaction as the business row. A relay (sidecar, worker, or CDC consumer) publishes pending rows and marks them processed.
|
|
106
|
+
- Do not write to Redis or publish to MQ inside the DB transaction expecting both to succeed; either commit on the DB side and discover the external write failed, or fail the external write and leave the DB committed.
|
|
107
|
+
- Outbox publishing is at-least-once; downstream consumers must be idempotent — unique key, idempotency store, or state machine.
|
|
108
|
+
- Treat oldest-pending-age and failed-publish count as first-class metrics; both feed paging policy.
|
|
109
|
+
- For high-throughput cases, consider CDC (binlog tail or logical replication) instead of polling the outbox table. The choice between polling and CDC is an architecture decision, not an implementation detail.
|