@ccoalm/ccl-skills 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (561) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +49 -0
  3. package/dist/assets/marketplace/.agents/plugins/marketplace.json +12 -0
  4. package/dist/assets/marketplace/.claude-plugin/marketplace.json +13 -0
  5. package/dist/assets/marketplace/marketplace-manifest.json +12 -0
  6. package/dist/assets/marketplace/plugins/ccl-skills/.claude-plugin/marketplace.json +16 -0
  7. package/dist/assets/marketplace/plugins/ccl-skills/.claude-plugin/plugin.json +5 -0
  8. package/dist/assets/marketplace/plugins/ccl-skills/.codex-plugin/plugin.json +5 -0
  9. package/dist/assets/marketplace/plugins/ccl-skills/.worktree-only +3 -0
  10. package/dist/assets/marketplace/plugins/ccl-skills/agent-context/session-start.md +45 -0
  11. package/dist/assets/marketplace/plugins/ccl-skills/agent-context/subagent-start.md +12 -0
  12. package/dist/assets/marketplace/plugins/ccl-skills/hooks/AGENTS.md +19 -0
  13. package/dist/assets/marketplace/plugins/ccl-skills/hooks/guard-delegation-owner.sh +125 -0
  14. package/dist/assets/marketplace/plugins/ccl-skills/hooks/guard-edit-isolation.sh +102 -0
  15. package/dist/assets/marketplace/plugins/ccl-skills/hooks/guard-merge-authorization.sh +1156 -0
  16. package/dist/assets/marketplace/plugins/ccl-skills/hooks/hooks.json +131 -0
  17. package/dist/assets/marketplace/plugins/ccl-skills/hooks/merge-authorization-prompt.sh +142 -0
  18. package/dist/assets/marketplace/plugins/ccl-skills/hooks/owner-dispatch-guard.sh +12 -0
  19. package/dist/assets/marketplace/plugins/ccl-skills/hooks/owner-dispatch-stop.sh +13 -0
  20. package/dist/assets/marketplace/plugins/ccl-skills/hooks/remind-post-merge-cleanup.sh +144 -0
  21. package/dist/assets/marketplace/plugins/ccl-skills/hooks/session-context.sh +87 -0
  22. package/dist/assets/marketplace/plugins/ccl-skills/hooks/session-start.sh +86 -0
  23. package/dist/assets/marketplace/plugins/ccl-skills/hooks/skill-extraction-gate-stop.sh +69 -0
  24. package/dist/assets/marketplace/plugins/ccl-skills/hooks/subagent-start.sh +26 -0
  25. package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_guard_delegation_owner.sh +329 -0
  26. package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_guard_edit_isolation.sh +322 -0
  27. package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_guard_merge_authorization.sh +902 -0
  28. package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_merge_authorization_prompt.sh +178 -0
  29. package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_remind_post_merge_cleanup.sh +121 -0
  30. package/dist/assets/marketplace/plugins/ccl-skills/hooks/test_session_start.sh +170 -0
  31. package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/AGENTS.md +17 -0
  32. package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/ccl-skills.ts +564 -0
  33. package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/commands/ccl-install-skills.md +14 -0
  34. package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/commands/ccl-update-skills.md +44 -0
  35. package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/commands/ccl-verify-skills.md +109 -0
  36. package/dist/assets/marketplace/plugins/ccl-skills/packages/opencode-plugin/commands/ccl-worktree-check.md +36 -0
  37. package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/AGENTS.md +28 -0
  38. package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/README.md +276 -0
  39. package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/owner-dispatch.example.json +10 -0
  40. package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/owner-dispatch.sh +1307 -0
  41. package/dist/assets/marketplace/plugins/ccl-skills/scripts/owner-dispatch/test.sh +941 -0
  42. package/dist/assets/marketplace/plugins/ccl-skills/skills/agents-file-coverage-gate/SKILL.md +45 -0
  43. package/dist/assets/marketplace/plugins/ccl-skills/skills/agents-file-coverage-gate/agents/openai.yaml +4 -0
  44. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/SKILL.md +188 -0
  45. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/agents/openai.yaml +4 -0
  46. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/android-dev.md +92 -0
  47. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/flutter-dev.md +80 -0
  48. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/ios-dev.md +72 -0
  49. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/kotlin-multiplatform.md +93 -0
  50. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/mobile-platform-boundaries.md +77 -0
  51. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/mobile-quality-release.md +77 -0
  52. package/dist/assets/marketplace/plugins/ccl-skills/skills/app-cross-platform-dev/references/source-evidence-map.md +64 -0
  53. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/SKILL.md +353 -0
  54. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/agents/openai.yaml +4 -0
  55. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/client-routing.md +419 -0
  56. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/manual-invocation-and-prompts.md +126 -0
  57. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/staged-review-contract.md +197 -0
  58. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/timeout-auth-and-capabilities.md +179 -0
  59. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/AGENTS.md +98 -0
  60. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/classify_envelope.py +93 -0
  61. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/classify_timeout_exit.sh +15 -0
  62. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/claude_review.sh +1438 -0
  63. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/codex_review.sh +324 -0
  64. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/concern_excerpt.py +295 -0
  65. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/egress_schema.py +214 -0
  66. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/init_policy_matrix.py +642 -0
  67. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/kimi_packet_mcp.py +181 -0
  68. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/kimi_review.sh +1165 -0
  69. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/opencode_review.sh +1190 -0
  70. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/parse_cli_review.py +946 -0
  71. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/parse_opencode_review.py +474 -0
  72. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/parse_probe_result.py +1899 -0
  73. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/parse_review_json.py +200 -0
  74. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/review_gate.py +2845 -0
  75. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/review_gate.sh +6 -0
  76. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/run_claude_capture.py +71 -0
  77. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/runtime-surface-verification-design.md +53 -0
  78. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_classify_envelope.sh +68 -0
  79. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_claude_review_probe.sh +2311 -0
  80. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_cli_review_wrappers.sh +1832 -0
  81. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_code_review_identity.sh +73 -0
  82. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_concern_excerpt.sh +245 -0
  83. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_egress_schema.sh +177 -0
  84. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_init_policy_matrix.sh +272 -0
  85. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_kimi_packet_mcp.py +195 -0
  86. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_opencode_review_concurrency.sh +120 -0
  87. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_opencode_review_retry.sh +1005 -0
  88. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_parse_opencode_review.sh +258 -0
  89. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_parse_probe_result.sh +574 -0
  90. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_parse_review_json.sh +349 -0
  91. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_review_client_compat.py +434 -0
  92. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_review_client_order.sh +264 -0
  93. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_review_gate.sh +2412 -0
  94. package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/verify_native_skill_binding.py +123 -0
  95. package/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/SKILL.md +153 -0
  96. package/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/agents/openai.yaml +4 -0
  97. package/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/references/diagnosis-playbook.md +54 -0
  98. package/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/references/prevention-routing.md +36 -0
  99. package/dist/assets/marketplace/plugins/ccl-skills/skills/feature-risk-router/SKILL.md +69 -0
  100. package/dist/assets/marketplace/plugins/ccl-skills/skills/feature-risk-router/agents/openai.yaml +4 -0
  101. package/dist/assets/marketplace/plugins/ccl-skills/skills/feature-risk-router/references/security-review-gate.md +41 -0
  102. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/SKILL.md +165 -0
  103. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/agents/openai.yaml +4 -0
  104. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/api-security-boundaries.md +47 -0
  105. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/architecture-playbook.md +160 -0
  106. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/artifact-generation-architecture.md +37 -0
  107. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/audit-history-architecture.md +29 -0
  108. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/bulk-workflow-architecture.md +33 -0
  109. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/config-rule-routing-architecture.md +34 -0
  110. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/cross-cutting-concerns.md +72 -0
  111. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/data-modeling-and-migrations.md +79 -0
  112. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/data-platform-architecture.md +210 -0
  113. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/dependency-platform.md +105 -0
  114. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/developer-tooling-architecture.md +38 -0
  115. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/error-contract-architecture.md +36 -0
  116. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/event-driven-architecture.md +260 -0
  117. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/http-gateway-architecture.md +74 -0
  118. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/mq-consumer-architecture.md +38 -0
  119. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/multi-tenant-isolation.md +275 -0
  120. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/notification-architecture.md +25 -0
  121. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/ops-checklist.md +57 -0
  122. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/performance-capacity-architecture.md +38 -0
  123. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/protobuf-contract-architecture.md +119 -0
  124. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/redis-cache-coordination.md +93 -0
  125. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/release-runtime-readiness.md +65 -0
  126. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/replay-comparison-architecture.md +26 -0
  127. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/runtime-observability.md +94 -0
  128. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/service-scaffold.md +76 -0
  129. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/source-evidence-map.md +55 -0
  130. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-architecture/references/workflow-state-architecture.md +38 -0
  131. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/SKILL.md +159 -0
  132. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/agents/openai.yaml +4 -0
  133. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/artifact-generation-patterns.md +37 -0
  134. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/audit-history-patterns.md +28 -0
  135. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/bulk-import-export-patterns.md +56 -0
  136. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/config-rule-routing-patterns.md +38 -0
  137. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/data-access-patterns.md +55 -0
  138. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/db-schema-and-dal-patterns.md +109 -0
  139. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/dependency-client-patterns.md +130 -0
  140. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/developer-tooling-patterns.md +70 -0
  141. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/domain-feature-patterns.md +78 -0
  142. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/engineering-patterns.md +119 -0
  143. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/error-contract-patterns.md +55 -0
  144. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/feature-playbook.md +61 -0
  145. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/http-gateway-client-patterns.md +76 -0
  146. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/mq-consumer-patterns.md +55 -0
  147. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/notification-patterns.md +42 -0
  148. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/observability-implementation-patterns.md +101 -0
  149. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/performance-capacity-patterns.md +44 -0
  150. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/protobuf-contract-patterns.md +72 -0
  151. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/public-api-integration-patterns.md +56 -0
  152. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/quality-and-testing-patterns.md +91 -0
  153. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/redis-cache-lock-patterns.md +123 -0
  154. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/release-ops-patterns.md +112 -0
  155. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/reliability-patterns.md +83 -0
  156. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/replay-comparison-patterns.md +32 -0
  157. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/scaffold-and-codegen.md +86 -0
  158. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/source-evidence-map.md +54 -0
  159. package/dist/assets/marketplace/plugins/ccl-skills/skills/go-microservice-dev/references/state-machine-task-patterns.md +45 -0
  160. package/dist/assets/marketplace/plugins/ccl-skills/skills/grill-me/SKILL.md +80 -0
  161. package/dist/assets/marketplace/plugins/ccl-skills/skills/grill-me/agents/openai.yaml +4 -0
  162. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/SKILL.md +117 -0
  163. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/agents/openai.yaml +4 -0
  164. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-approval-auto-reviewer.md +106 -0
  165. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-command-sandbox.md +441 -0
  166. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-context-freshness.md +47 -0
  167. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-credentials-auth.md +13 -0
  168. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-extensions-skills.md +13 -0
  169. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-file-edit-protocol.md +129 -0
  170. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-ide-integration.md +5 -0
  171. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-input-ingestion.md +13 -0
  172. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-instruction-composition.md +13 -0
  173. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-lifecycle-hooks.md +92 -0
  174. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-messaging.md +5 -0
  175. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-runtime-bootstrap.md +5 -0
  176. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-session-persistence.md +448 -0
  177. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-task-orchestration.md +13 -0
  178. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-tool-dispatch.md +123 -0
  179. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/agent-turn-lifecycle.md +131 -0
  180. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/inference-capacity-operations.md +162 -0
  181. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/llm-client-gateway.md +156 -0
  182. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/model-prompt-evaluation.md +146 -0
  183. package/dist/assets/marketplace/plugins/ccl-skills/skills/llm-inference-integration/references/retrieval-agent-safety.md +273 -0
  184. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/SKILL.md +202 -0
  185. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/agents/openai.yaml +4 -0
  186. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/contracts-and-state.md +62 -0
  187. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/cross-stack-alignment.md +94 -0
  188. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/framework-choice.md +76 -0
  189. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/online-practice-uptake.md +56 -0
  190. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/platform-capabilities.md +91 -0
  191. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/product-page-checklist.md +40 -0
  192. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/qa-release.md +72 -0
  193. package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/references/source-evidence-map.md +82 -0
  194. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-agent-delegation/SKILL.md +103 -0
  195. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-agent-delegation/agents/openai.yaml +5 -0
  196. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-agent-delegation/references/multi-agent-delegation-playbook.md +100 -0
  197. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/SKILL.md +70 -0
  198. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/agents/openai.yaml +4 -0
  199. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/references/public-data-acquisition.md +549 -0
  200. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/references/public-disclosure-channels.md +97 -0
  201. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/references/research-prompts.md +66 -0
  202. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/scripts/AGENTS.md +32 -0
  203. package/dist/assets/marketplace/plugins/ccl-skills/skills/multi-perspective-research/scripts/test-public-data-acquisition-recipes.sh +379 -0
  204. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/SKILL.md +244 -0
  205. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/agents/openai.yaml +4 -0
  206. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/alerting-and-on-call.md +76 -0
  207. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/framework-middleware-checklist.md +142 -0
  208. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/infra-component-deployment.md +268 -0
  209. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/log-correlation-recipe.md +124 -0
  210. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/log-schema-canonical.md +208 -0
  211. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/metrics-conventions.md +105 -0
  212. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/obs-stack-architecture.md +107 -0
  213. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/sli-slo-design.md +95 -0
  214. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/references/source-register.md +11 -0
  215. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/SKILL.md +303 -0
  216. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/agents/openai.yaml +4 -0
  217. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/canary-and-rollout-strategy.md +163 -0
  218. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/config-center-via-etcd.md +245 -0
  219. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/custom-control-plane-boundary.md +298 -0
  220. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/deploy-cli-concrete-recipe.md +312 -0
  221. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/deploy-pipeline.md +165 -0
  222. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/env-and-lane-matrix.md +126 -0
  223. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/lane-orchestration-control-plane.md +383 -0
  224. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/multi-region-and-cluster.md +135 -0
  225. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/promotion-gate-and-review.md +149 -0
  226. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/python-package-registry-release.md +462 -0
  227. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/rollback-playbook.md +123 -0
  228. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/secret-and-config-management.md +231 -0
  229. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/references/version-authority-and-deprecation.md +21 -0
  230. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/SKILL.md +276 -0
  231. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/agents/openai.yaml +4 -0
  232. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/dual-sidecar-and-traffic-config-center.md +127 -0
  233. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/framework-middleware.md +143 -0
  234. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/grpc-authority-workaround.md +90 -0
  235. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/http-response-envelope-contract.md +24 -0
  236. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/mesh-architecture.md +127 -0
  237. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/multi-env-routing.md +192 -0
  238. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/protobuf-http-contract-signals.md +64 -0
  239. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/retry-timeout-circuit-breaker.md +124 -0
  240. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/rpc-framework-recipe.md +494 -0
  241. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/service-discovery-choice.md +113 -0
  242. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/service-discovery-migration-playbook.md +231 -0
  243. package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-service-connectivity/references/service-discovery-recipe.md +131 -0
  244. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/SKILL.md +235 -0
  245. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/agents/openai.yaml +4 -0
  246. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/adr-convention.md +146 -0
  247. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-checklist.md +30 -0
  248. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-evaluation-report-template.md +25 -0
  249. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-execution-spec.md +108 -0
  250. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-sop.md +457 -0
  251. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/algorithm-launch-templates.md +24 -0
  252. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/artifact-egress-confidentiality.md +58 -0
  253. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/code-review-checklist.md +86 -0
  254. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/cross-repo-coordination.md +46 -0
  255. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/delivery-lifecycle.md +192 -0
  256. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/design-review-gate-mechanics.md +62 -0
  257. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/design-routing-and-readiness.md +45 -0
  258. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/diagnostic-spec-match-gate.md +36 -0
  259. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/dispatch-owner-skills.md +35 -0
  260. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/dormant-code-activation.md +47 -0
  261. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/existing-project-assessment-report.md +223 -0
  262. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/external-skill-augmentation.md +46 -0
  263. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/feature-deprecation-cascade.md +15 -0
  264. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/high-risk-resilience-gates.md +73 -0
  265. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/implementation-completeness-and-minimality.md +120 -0
  266. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/implementation-entry-reentry-gate.md +122 -0
  267. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/modular-monolith-heuristic.md +105 -0
  268. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/pre-final-continuation-gate.md +115 -0
  269. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/problem-resolution-and-learning.md +62 -0
  270. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/quality-attributes.md +112 -0
  271. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/quality-remediation-program.md +88 -0
  272. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/rd-standards-doc-family-checklist.md +27 -0
  273. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/refactoring-discipline.md +52 -0
  274. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/review-reception.md +34 -0
  275. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/shared-gate-artifact-classification.md +76 -0
  276. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/source-evidence-map.md +31 -0
  277. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/status-tracker-sync.md +77 -0
  278. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/sync-spec-repo-contract.md +25 -0
  279. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/verify-developer-experience.md +34 -0
  280. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/worktree-mechanics.md +55 -0
  281. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/scripts/AGENTS.md +18 -0
  282. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/scripts/check-agent-contract-coverage.sh +213 -0
  283. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/SKILL.md +136 -0
  284. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/agents/openai.yaml +9 -0
  285. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/analytics-visualization-interactions.md +206 -0
  286. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/behavioral-aesthetic-logic.md +108 -0
  287. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/complex-creation-interactions.md +194 -0
  288. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/design-execution-checklist.md +214 -0
  289. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/design-impl-naming-and-versioning.md +53 -0
  290. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/design-intake-and-acceptance.md +129 -0
  291. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/design-system-source-of-truth.md +97 -0
  292. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/external-ui-ux-quality-benchmarks.md +79 -0
  293. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/frontend-code-evidence-map.md +63 -0
  294. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/interaction-design-patterns.md +146 -0
  295. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/layout-recipes-and-screenshot-acceptance.md +250 -0
  296. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/multi-project-token-consistency.md +237 -0
  297. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/multi-stack-strategy.md +65 -0
  298. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/operational-processing-workflows.md +237 -0
  299. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/platform-mobile-patterns.md +324 -0
  300. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/platform-web-desktop-patterns.md +456 -0
  301. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/product-lifecycle-acceptance-and-iteration.md +114 -0
  302. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/product-surface-patterns.md +79 -0
  303. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/resource-management-interactions.md +113 -0
  304. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/scenario-community-patterns.md +133 -0
  305. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/source-map.md +130 -0
  306. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/tokens-and-components.md +47 -0
  307. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/trust-sensitive-ai-and-data-patterns.md +96 -0
  308. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/ui-ux-audit.md +106 -0
  309. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/ui-ux-design-development.md +176 -0
  310. package/dist/assets/marketplace/plugins/ccl-skills/skills/product-ui-ux-design/references/visual-craft.md +111 -0
  311. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/SKILL.md +157 -0
  312. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/agents/openai.yaml +4 -0
  313. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/ai-service-integration-boundaries.md +57 -0
  314. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/api-contract-and-schema.md +62 -0
  315. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/api-security-boundaries.md +39 -0
  316. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/architecture-playbook.md +46 -0
  317. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/async-execution-model.md +24 -0
  318. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/background-jobs-and-scheduling.md +18 -0
  319. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/batch-and-pipeline-architecture.md +11 -0
  320. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/config-secrets-runtime.md +22 -0
  321. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/data-modeling-and-migrations.md +64 -0
  322. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/data-platform-architecture.md +211 -0
  323. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/event-driven-architecture.md +263 -0
  324. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/multi-tenant-isolation.md +281 -0
  325. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/observability-and-ops.md +26 -0
  326. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/packaging-runtime-readiness.md +20 -0
  327. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/redis-cache-coordination.md +41 -0
  328. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/reliability-and-error-contract.md +17 -0
  329. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/source-evidence-map.md +55 -0
  330. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-architecture/references/web-framework-boundaries.md +26 -0
  331. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/SKILL.md +143 -0
  332. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/agents/openai.yaml +4 -0
  333. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/ai-service-wiring-patterns.md +16 -0
  334. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/async-and-worker-patterns.md +24 -0
  335. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/background-job-patterns.md +18 -0
  336. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/batch-and-artifact-patterns.md +13 -0
  337. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/dependency-client-patterns.md +39 -0
  338. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/error-handling-patterns.md +26 -0
  339. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/feature-playbook.md +43 -0
  340. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/observability-implementation-patterns.md +31 -0
  341. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/project-structure-and-tooling.md +24 -0
  342. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/public-api-security-patterns.md +52 -0
  343. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/redis-cache-lock-patterns.md +78 -0
  344. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/schema-and-validation-patterns.md +23 -0
  345. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/source-evidence-map.md +56 -0
  346. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/sqlalchemy-and-migrations-patterns.md +99 -0
  347. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/testing-and-quality-patterns.md +61 -0
  348. package/dist/assets/marketplace/plugins/ccl-skills/skills/python-service-dev/references/web-framework-patterns.md +35 -0
  349. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/SKILL.md +91 -0
  350. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/agents/openai.yaml +4 -0
  351. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/config-runtime-readback.md +20 -0
  352. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/mr-merge-authorization.md +31 -0
  353. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/post-release-env-reset.md +31 -0
  354. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/release-closeout-evidence.md +20 -0
  355. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/release-scope-confirmation.md +21 -0
  356. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/tag-and-prod-pipeline-gate.md +20 -0
  357. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/test-scope-prompt.md +24 -0
  358. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-coordination/references/watcher-discipline.md +14 -0
  359. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/SKILL.md +64 -0
  360. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/agents/openai.yaml +4 -0
  361. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/references/comment-safe-release-doc.md +19 -0
  362. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/references/release-evidence-workflow.md +23 -0
  363. package/dist/assets/marketplace/plugins/ccl-skills/skills/release-doc-writer/references/release-testing-scope-section.md +15 -0
  364. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-baseline/SKILL.md +87 -0
  365. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-baseline/agents/openai.yaml +4 -0
  366. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/SKILL.md +130 -0
  367. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/agents/openai.yaml +4 -0
  368. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/references/prd-composition-contract.md +35 -0
  369. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/references/requirement-closure-contract.md +86 -0
  370. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/references/security-four-questions.md +38 -0
  371. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-intent/SKILL.md +91 -0
  372. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-intent/agents/openai.yaml +4 -0
  373. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-scope/SKILL.md +88 -0
  374. package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-scope/agents/openai.yaml +4 -0
  375. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/SKILL.md +337 -0
  376. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/agents/openai.yaml +4 -0
  377. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/analysis-parse-fix-test-challenge-replay.md +47 -0
  378. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/attribution-verification.md +69 -0
  379. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/bootstrap-slim-c3-obligation-table.md +112 -0
  380. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/coverage-exhaustion-traps.md +45 -0
  381. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/description-authoring.md +162 -0
  382. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/dual-track-review-gate.md +507 -0
  383. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/eval-routing.md +86 -0
  384. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/evidence-card-template.md +51 -0
  385. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/example-domain-preselect.md +79 -0
  386. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/external-practice-controls.md +57 -0
  387. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/extraction-lifecycle-handoff.md +65 -0
  388. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/extraction-quickstart.md +194 -0
  389. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/firing-point-placement.md +75 -0
  390. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/harness-patterns-and-eval.md +286 -0
  391. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/incident-postmortem-extraction.md +190 -0
  392. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/l0-l1-l2-routing.md +114 -0
  393. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/online-skill-review.md +47 -0
  394. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/parallel-stack-references-pattern.md +164 -0
  395. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/r0-leakage-audit.md +90 -0
  396. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/recurring-anti-patterns-checklist.md +320 -0
  397. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/resume-paused-delivery.md +16 -0
  398. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/review-feedback-mining.md +33 -0
  399. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/review-finding-standards.md +57 -0
  400. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/review-rubric.md +40 -0
  401. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/rule-consolidation.md +118 -0
  402. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/skill-listing-budget.md +19 -0
  403. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/source-register.md +254 -0
  404. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/source-to-skill-extraction.md +658 -0
  405. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/two-source-extraction-pattern.md +167 -0
  406. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/uiux-judgment-extraction.md +179 -0
  407. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/uiux-routing-map.md +51 -0
  408. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/validation-and-landing.md +180 -0
  409. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/AGENTS.md +18 -0
  410. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-ccl-skills.sh +1452 -0
  411. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-evidence-card-leak.sh +491 -0
  412. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-mr-target-freshness.sh +173 -0
  413. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-size-budget.sh +488 -0
  414. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/check-sync-pointers.sh +419 -0
  415. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/eval-golden-trace.rb +197 -0
  416. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/eval-health.rb +327 -0
  417. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/eval-routing-bank.rb +401 -0
  418. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/eval-routing.rb +248 -0
  419. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/generic-r0-leak-scan.sh +282 -0
  420. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/governing-chain-diff.py +321 -0
  421. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/impact-chain-gate.rb +964 -0
  422. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/register-firing-path-resolution.rb +708 -0
  423. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/skill-behavior-eval.py +540 -0
  424. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/source-register-lifecycle.rb +51 -0
  425. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/source-register-pending-status.rb +55 -0
  426. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_ai_coding_implementation_gates.sh +829 -0
  427. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_impact_chain_refscripts.sh +1203 -0
  428. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_r0_status.sh +75 -0
  429. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_register_pending_exclusion.sh +137 -0
  430. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_regressions.sh +173 -0
  431. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_route_drift.sh +377 -0
  432. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_size_budget.sh +833 -0
  433. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_skill_catalog.sh +491 -0
  434. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_source_register_lifecycle.sh +114 -0
  435. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_mr_target_freshness.sh +261 -0
  436. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_sync_pointers.sh +538 -0
  437. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_controlled_escalation_pins.sh +154 -0
  438. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_eval_routing_bank_grader_diagnostics.sh +190 -0
  439. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_eval_routing_bank_surface_binding.sh +178 -0
  440. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_eval_routing_prose_target.sh +86 -0
  441. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_generic_r0_leak_scan.sh +131 -0
  442. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_git_identity_predicate_gate.sh +243 -0
  443. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_governing_chain_diff.sh +419 -0
  444. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_impact_chain_gate_dateless_host.sh +120 -0
  445. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_register_firing_path_resolution.sh +724 -0
  446. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_register_firing_path_wiring.sh +414 -0
  447. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_regression_runner_registration.sh +34 -0
  448. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_routing_bank_integrity.sh +205 -0
  449. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_routing_pointer_integrity.sh +194 -0
  450. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_validate_skill_credential_cwd.sh +61 -0
  451. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_validate_skill_cross_refs.sh +111 -0
  452. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_validate_skill_root_depth.sh +53 -0
  453. package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/validate-skill.sh +257 -0
  454. package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/SKILL.md +98 -0
  455. package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/agents/openai.yaml +4 -0
  456. package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/references/input-state-machines.md +36 -0
  457. package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/references/streaming-rich-output.md +130 -0
  458. package/dist/assets/marketplace/plugins/ccl-skills/skills/terminal-cli-dev/references/terminal-side-channels.md +96 -0
  459. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/SKILL.md +408 -0
  460. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/agents/openai.yaml +4 -0
  461. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/AGENTS.md +18 -0
  462. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/bitable-setup.md +573 -0
  463. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/ci_templates/README.md +120 -0
  464. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/ci_templates/github-actions.yml +119 -0
  465. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/ci_templates/gitlab-ci.yml +76 -0
  466. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/ci_templates/jenkins.Jenkinsfile +106 -0
  467. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/classical-test-design-techniques.md +279 -0
  468. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/gen_report.py +2807 -0
  469. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/makefile-template.md +200 -0
  470. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/report-config-schema.md +272 -0
  471. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/run_pytestless.py +475 -0
  472. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/source-to-case-workflows.md +258 -0
  473. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc-marker-conventions.md +316 -0
  474. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc-review-and-prioritization.md +145 -0
  475. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/AGENTS.md +16 -0
  476. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/tc.dart +129 -0
  477. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/tc.go +197 -0
  478. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/tc.py +135 -0
  479. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/tc_helpers/tc.ts +285 -0
  480. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/test_gen_report.py +2144 -0
  481. package/dist/assets/marketplace/plugins/ccl-skills/skills/test-artifact-management/references/update-lifecycle.md +62 -0
  482. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/SKILL.md +212 -0
  483. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/agents/openai.yaml +4 -0
  484. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/ci-fixtures-and-flake-control.md +75 -0
  485. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/client-runtime-test-matrices.md +50 -0
  486. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/data-and-workflow-testing.md +34 -0
  487. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/design-closed-contract-oracles.md +31 -0
  488. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/e2e-real-flow-testing.md +71 -0
  489. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/fitness-functions.md +240 -0
  490. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/integration-contract-testing.md +235 -0
  491. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/non-functional-specialized-scenarios.md +296 -0
  492. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/rd-testing-standard-template.md +126 -0
  493. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/run-killing-mutation-walk.md +43 -0
  494. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/scenario-testing.md +136 -0
  495. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/source-evidence-map.md +59 -0
  496. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/structured-tc-input-translation.md +67 -0
  497. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/test-code-authoring-patterns.md +392 -0
  498. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/test-data-and-determinism.md +39 -0
  499. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/test-topology-and-commands.md +92 -0
  500. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/unit-testing.md +46 -0
  501. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/vendored-contract-drift-checklist.md +64 -0
  502. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/references/verify-enforcement-mechanisms.md +18 -0
  503. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/AGENTS.md +17 -0
  504. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/client-terminal-ansi-check.py +140 -0
  505. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/client-terminal-ansi-check.test.sh +75 -0
  506. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/lang-basics-ast-check.py +170 -0
  507. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/lang-basics-ast-check.test.sh +87 -0
  508. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/lang-basics-go-check.go +198 -0
  509. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/lang-basics-go-check.test.sh +109 -0
  510. package/dist/assets/marketplace/plugins/ccl-skills/skills/testing-strategy/scripts/test_mutation_backup_recipe.sh +237 -0
  511. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/SKILL.md +184 -0
  512. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/agents/openai.yaml +4 -0
  513. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/comment-safe-feishu.md +93 -0
  514. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/cross-model-co-review.md +3 -0
  515. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/delivery-face-closeout.md +60 -0
  516. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/doc-charter-first.md +17 -0
  517. package/dist/assets/marketplace/plugins/ccl-skills/skills/tighten-doc/references/session-vantage-leakage.md +58 -0
  518. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/SKILL.md +126 -0
  519. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/agents/openai.yaml +4 -0
  520. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/complex-workspace-patterns.md +47 -0
  521. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/embedded-h5-in-host.md +87 -0
  522. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/react-architecture.md +194 -0
  523. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/source-evidence-map.md +60 -0
  524. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/web-quality-release.md +190 -0
  525. package/dist/assets/marketplace/plugins/ccl-skills/skills/web-react-dev/references/web-ui-quality.md +83 -0
  526. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/SKILL.md +179 -0
  527. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/agents/openai.yaml +4 -0
  528. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/references/shared-branch-rebase.md +25 -0
  529. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/AGENTS.md +23 -0
  530. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/test_worktree_status.sh +207 -0
  531. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/test_worktree_sweep.sh +481 -0
  532. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/worktree-status.sh +325 -0
  533. package/dist/assets/marketplace/plugins/ccl-skills/skills/worktree-isolation/scripts/worktree-sweep.sh +245 -0
  534. package/dist/assets/release.json +2797 -0
  535. package/dist/claude-adapter.d.ts +9 -0
  536. package/dist/claude-adapter.js +240 -0
  537. package/dist/cli-worker.d.ts +1 -0
  538. package/dist/cli-worker.js +32 -0
  539. package/dist/cli.d.ts +22 -0
  540. package/dist/cli.js +214 -0
  541. package/dist/codex-host.d.ts +30 -0
  542. package/dist/codex-host.js +162 -0
  543. package/dist/fs-safe.d.ts +21 -0
  544. package/dist/fs-safe.js +241 -0
  545. package/dist/index.d.ts +2 -0
  546. package/dist/index.js +1 -0
  547. package/dist/manifest.d.ts +8 -0
  548. package/dist/manifest.js +135 -0
  549. package/dist/opencode-adapter.d.ts +10 -0
  550. package/dist/opencode-adapter.js +416 -0
  551. package/dist/operations.d.ts +3 -0
  552. package/dist/operations.js +956 -0
  553. package/dist/paths.d.ts +20 -0
  554. package/dist/paths.js +4 -0
  555. package/dist/types.d.ts +58 -0
  556. package/dist/types.js +1 -0
  557. package/dist/unified.d.ts +4 -0
  558. package/dist/unified.js +64 -0
  559. package/dist/version.d.ts +2 -0
  560. package/dist/version.js +5 -0
  561. package/package.json +35 -0
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: web-react-dev
3
+ description: Use when designing, implementing, reviewing, debugging, testing, or shipping React web client features, including component structure, routing, state ownership, API/data fetching, forms, browser behavior, accessibility, performance, build/deploy, and rendered browser verification. Product-agnostic; use miniapp-product-dev for WeChat/Alipay/Douyin/Baidu mini-programs, app-cross-platform-dev for Flutter/React Native/Android/iOS apps, product-ui-ux-design for UI/UX rules, backend skills for services, and testing-strategy for test-layer planning. Triggers also include "用 React 实现这个前端", "React 组件怎么写", "React 写一个", "Tailwind 怎么写", "Next.js / Vite 项目配置", "重构这个 React 组件/页面(局部)", "refactor a React component/file".
4
+ ---
5
+
6
+ # Web React Dev
7
+
8
+ Use this skill for React web client engineering. It covers browser-rendered React applications, React components, routing, data fetching, forms, frontend API integration, accessibility, performance, build, and deploy checks. It does not own mini-program host behavior, Flutter, native mobile, backend service design, or visual design system rules.
9
+
10
+ ## Routing
11
+
12
+ - Use `product-rd-workflow` first when the work spans product, design, architecture, implementation, testing, review, and release.
13
+ - Use `product-ui-ux-design` before or alongside coding for interaction model, layout, visual hierarchy, density, states, and UI acceptance.
14
+ - Use `miniapp-product-dev` for WeChat/Alipay/Douyin/Baidu mini-program pages, host-platform APIs, developer tools, review submission, and release. For React/H5 embedded inside a mini-program webview, this skill owns the React page while `miniapp-product-dev` owns the mini-program shell, bridge, host capabilities, and review/release evidence.
15
+ - For Taro projects (React syntax compiled to mini-program runtime): this skill owns the React layer (component decomposition, hooks, state ownership, effect discipline, accessibility primitives) and the **pure** shared layer in the repo's established shared module: DTOs, types, validators, pure mapping functions.
16
+ - `miniapp-product-dev` owns Taro lifecycle hooks (`useReady`/`useLoad`/`useDidShow`/`useDidHide`), `Taro.*` runtime APIs, platform branching (`process.env.TARO_ENV`, conditional compilation, platform-specific files), subpackage configuration, host capability adapters, multi-target build invocation, host review/release, and rendered mini-program evidence.
17
+ - Shared **runtime adapters** that mini-program targets consume are co-owned with a named final-decision owner per adapter, recorded in the repo. The adapter list and the miniapp acceptance-gate enumeration are canonical in `miniapp-product-dev` (the `Shared runtime adapters consumed by mini-program targets` row under `## Sibling Boundary With web-react-dev`); that gate is blocking and its miniapp contract tests must pass before mini-program targets import the adapter. Web sets browser semantics and cannot merge an adapter change that is browser-safe but mini-program-unsafe. Do not re-add a fixed kill-switch dimension list here: the owner's safety contract names the property (`fail-closed flag evaluation`) and its release contract makes each host platform's gray-release mechanism its own contract, so the dimensions a given adapter needs come from that platform's contract, not from a list on this side. Before merging an adapter change, the merge record must carry the canonical row's gate token and a passing miniapp-contract run recorded on the change under merge (rule canonical in that row); a merge record without the token, or asserting mini-program-safety without the contract run, is a violation.
18
+ - When shared code must run in both web and mini-program targets, keep `react-dom`, DOM mutation, browser observers (`IntersectionObserver`/`ResizeObserver`/`MutationObserver`), RAF/layout APIs, and other browser globals out of the shared layer; use Taro cross-platform equivalents at the consumer side.
19
+ - Use `app-cross-platform-dev` for Flutter, React Native, native Android, native iOS, app store release, and device-native capability work.
20
+ - Use Go or Python backend skills for API/service ownership, persistence, auth services, queues, and server contracts.
21
+ - For backend HTTP integrations, preserve current client wire behavior unless an explicit consumer-migration decision exists. Classify JSON vs protobuf-backed HTTP using `../platform-service-connectivity/references/protobuf-http-contract-signals.md`.
22
+ - First decide whether the client diff touches the HTTP contract or wire behavior. Wire-unchanged UI/component/state work does not need a backend owner round-trip and must not claim backend contract conformance.
23
+ - For unrelated client work, classify the diff with the canonical gate. If the surface is out of scope, client work may continue without claiming backend contract conformance.
24
+ - If the canonical gate classifies the diff as in scope, confirm the backend's recorded wire format or route back to the backend contract owner.
25
+ - Routine JSON/OpenAPI changes use the existing API contract record and do not require backend wire-format confirmation when the canonical reference classifies the surface as out of the protobuf wire-format gate.
26
+ - Client API wrappers must consume the backend contract's recorded response envelope per `../platform-service-connectivity/references/http-response-envelope-contract.md`: for surfaces on the canonical `code`/`message`/`data` envelope, components and domain state read typed business data from `data`; other shipped or non-JSON envelopes are consumed per their recorded contract. Read only fields present in the recorded contract — do not infer business fields from unrecorded top-level or fallback shapes — and scatter no duplicate envelope parsing across the client.
27
+ - If backend wire-format evidence is unreachable for an in-scope surface, stop at `pending-contract-owner`, name the backend owner or owning repo, record the attempted lookup, and set the next escalation path. An assumed-wire-format note never unblocks merge. The blocker clears only when a checkable owner record, quoted prior backend record, or explicit migration decision is available; if no owner responds within the team's review SLA, keep the client change blocked or downscope the touched wire-format surface and record the dropped surface as an open owner-routed gap. Do not claim backend contract conformance or completion for the removed slice.
28
+ - Do not fork IDL or hand-maintain duplicated DTOs in the web repo.
29
+ - Use `testing-strategy` to choose unit/component/API/E2E layers; return here for React-specific implementation.
30
+ - 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.
31
+ - Use `defect-diagnosis` first for failed tests, browser bugs, hydration/rendering issues, flaky UI, API integration symptoms, or production regressions.
32
+ - For money, quota, permission, tenant/user data, high-impact AI, repeated submit, async finality, or support-traceable incidents, apply `product-rd-workflow` high-risk resilience gates before treating the UI as complete.
33
+
34
+ ## Core Workflow
35
+
36
+ Before editing components, routes, state, API clients, styles, configs, or tests, complete enough analysis and planning for the change to be reviewable. Scale the plan to risk: a simple low-risk single-component change can use a short inline plan; multi-file, user-visible, API-visible, accessibility-sensitive, release, bug-fix, branch/MR, unclear-risk, or high-risk work needs explicit task split, design checkpoint, acceptance checks, verification commands, rollback or stop conditions, and named handoffs to design, testing, miniapp/app, backend, or diagnosis skills before edits.
37
+
38
+ 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.
39
+
40
+ When checking a React project against team standards, split findings into deterministic checks and agent review checks. Deterministic checks cover package scripts, typecheck/lint/test/E2E commands, generated API client usage, environment configuration, CI gates, bundle/performance budgets, and request/trace identifier propagation in central clients. Agent review checks cover component ownership, state placement, API contract alignment, finite-value mapping, accessibility/design quality, and whether tests assert behavior instead of only rendering. For the concrete deterministic executor list (ecosystem linter/analyzer rules — `eslint-plugin-react-hooks`, `@typescript-eslint` typed rules, `dependency-cruiser`, tsconfig `strict`/`noUncheckedIndexedAccess`) and the shipped client language-basics conformance checkers, see `testing-strategy/references/fitness-functions.md` §4.1.3 (client language-basics; spec 006). Prefer enabling ecosystem rules over hand-rolling checks.
41
+
42
+ 1. Define the web surface.
43
+ - Route/page, component boundary, URL params/query state, auth/permission state, responsive breakpoints, and browser support.
44
+ - User-visible states: loading, skeleton, empty, partial, success, error, retry, disabled, permission denied, stale/offline, and optimistic update.
45
+ - Data boundary: API client, request cancellation, cache/revalidation, mutation invalidation, pagination, streaming/websocket if used, and typed error mapping.
46
+ - API observability: central clients should attach or preserve request/trace/operation identifiers, measure duration, distinguish cancel from failure, classify upload or long-running requests, and map backend envelopes into typed user-facing errors.
47
+ - Finite-value boundary: generated API enums, backend string codes, URL query values, route params, filters, analytics dimensions, and display labels should flow through one typed client/domain mapping module. Components should use the mapped symbols and label tables instead of scattering raw values such as `"US"`, `"CN"`, `"active"`, or `"default"` in render, tests, routing, or tracking code. If shared client-domain ownership is unclear, keep a local mapper for the slice, mark temporary duplicate/raw uses with `finite-value-debt: <task-ref> <owner> <deadline> <reason>`, and record the consolidation owner. Architecture owns the cross-stack semantic decision when the same value must align across web, app, mini-program, backend, storage, and analytics.
48
+
49
+ 2. Analyze the existing web surface.
50
+ - Locate the owning route/page, component tree, state owner, API client, data-fetching layer, styling system, tests, and build scripts before editing.
51
+ - Identify whether state belongs in URL/query params, cache/server state, form state, local component state, browser storage, or global app state.
52
+ - Read repo wrappers first: package manager, dev/build scripts, lint/typecheck/test runners, browser/E2E tools, environment variables, and generated clients.
53
+ - If a design exists, map visible states and interactions to component ownership before implementing.
54
+ - For any visible UI change, map the design checkpoint to implementation ownership before coding: visual hierarchy/density, interaction flow, behavioral feedback, user psychology, responsive collapse, and screenshot acceptance. Do not reduce the design to component names. Also record `product-ui-ux-design`'s implementation-owner checkpoint before the first edit — its field list (design/stack/test owners, entry-rule evidence, rendered/device evidence status) and copy-only path are authoritative there; load the named owner skills rather than only naming them, and treat a completion claim without `captured/verified` rendered evidence as incomplete — an explicitly accepted gap closes the slice only as `pre-runtime-test ready` / handoff, never as complete/done.
55
+ - For UI/UX redesign slices meeting `product-ui-ux-design`'s page-slice trigger conditions — that gate's trigger list is authoritative and must be checked, not paraphrased, whenever a screen/surface change could be a redesign, restyle, new-style declaration, structural/visual-system change, continuation, or redesigned-surface reference — apply its cross-stack page-slice gate before React mechanics: RED-first focused assertion, IA regrouping by user intent/consequence, behavior-contract preservation, state matrix, rendered evidence, and the design verdict (`accepted` / `rejected` / `pending`; missing = `pending`, and `design-rejected` blocks complete/MR-ready/normal/draft MR per the **Rejected-surface rule**). Web is not a lower-evidence surface than app; component tests or DOM snapshots must be paired with browser-rendered evidence for changed layout, interaction, or visual states.
56
+
57
+ 3. Structure React code by ownership.
58
+ - Decompose UI by responsibility, not by arbitrary visual fragments.
59
+ - Put state at the lowest owner that needs to read/write it; lift only when siblings need shared state.
60
+ - Keep derived data derived during render or memoized only when measured or clearly necessary.
61
+ - Avoid Effects for pure derived state, event handling, or data transformations that can happen during render.
62
+ - Isolate side effects: network, subscriptions, timers, storage, analytics, and imperative browser APIs.
63
+ - Keep route loaders/actions, client caches, or data-fetching libraries aligned with the repo pattern.
64
+
65
+ 4. Implement browser behavior deliberately.
66
+ - Forms need validation, submit pending state, disabled/retry behavior, server error mapping, and keyboard behavior.
67
+ - Navigation needs route guards, deep links, back/forward behavior, scroll/focus restoration, and not-found/permission states.
68
+ - Tables/lists need stable keys, empty/error rows, pagination or virtualization when needed, persisted filters where useful, selected-count state, bulk operation feedback, clear reload/reset behavior after actions, and non-janky loading.
69
+ - Workbench pages need explicit route/layout ownership, context strips, active job/task entries, permission-gated actions, and drawer/detail inspection that preserves parent context.
70
+ - Workbench layout needs code-level geometry: bounded shell/header/control/work regions, sticky or preserved context, named collapse rules, stable empty/loading/error geometry, and secondary panels that collapse before primary content becomes unreadable.
71
+ - Complex workbench variants are reference-level material, not entrypoint material. If the surface is a dense review, report, assignment, resource, assistant, media/capture, or app-hosted workspace, load `references/complex-workspace-patterns.md` and apply only the relevant pattern family.
72
+ - In complex workspaces, declare state owners for route/context, selection, filters, permissions, async jobs, restored preferences, media readiness, submit/finality, and child drawers/panels before coding. Validate restored state against the current route, identity, permission, task type, and available item count.
73
+ - Mature workspace shells should implement code-level contracts, not only CSS: token-to-theme binding, startup context, route/permission-derived navigation, durable jobs, measured overflow, secondary-panel collapse, upload/parse state machines, and browser screenshot acceptance at declared stress widths.
74
+ - Token provenance must be visible in code: map design tokens into the component-library theme first, then local CSS should reference theme variables or documented semantic values.
75
+ - Workbench shell responsiveness needs explicit code thresholds: minimum widths, fallback layout, scroll owner, sticky enablement, and collapse order.
76
+ - Embedded, hosted, or app-container web shells need code-level ownership for entry paths, host/source detection, allowlisted origins, defensive message parsing, layout switching, persisted host flags, normal-browser fallback, lifecycle restore, and storage failure recovery.
77
+ - Auth, account, assistant, report, assignment, resource, media/capture, and AI-recognition variants are detailed in `references/complex-workspace-patterns.md`; do not keep their source-specific state catalogs in this entrypoint.
78
+ - Long work, high-risk submits, destructive actions, and AI/data operations need pending/final state, duplicate-submit protection, timeout/failure UI, retry/recovery, and a stable visible identifier when support or reconciliation may be needed.
79
+ - Configurable shortcuts or command palettes need a parsed and normalized registry, platform-aware display labels, reserved/non-rebindable shortcut checks, duplicate and conflict warnings before lossy config parsing, explicit scope/context priority, user override plus explicit unbind semantics, invalid-config fallback to defaults, reload/delete cleanup, command action allowlists, and collision-safe discovery UI. Dispatch must isolate shortcuts from text inputs, editable fields, composition/IME, modal focus traps, and command palette focus; chords or multi-step sequences need timeout/cancel handling, propagation rules, and cleanup on unmount.
80
+ - Chart, canvas, image, PDF, annotation, dense table, card, menu, browser storage, and cross-tab behavior need lifecycle cleanup, measured overflow, accessibility, and browser evidence at realistic container widths.
81
+
82
+ 5. Debug systematically when behavior is wrong.
83
+ - Reproduce with the smallest page, route, component test, browser trace, or network fixture that shows the failure.
84
+ - Classify the failure by layer: route, render/hydration, component state, effect/subscription, API contract, cache/revalidation, browser storage, permission/auth, build/env, or deployment/cache.
85
+ - Inspect console errors, failed network requests, request/response payloads, React warnings, route params, cache state, feature flags, and environment variables before changing code.
86
+ - Prove whether the issue is browser-only, data-contract, state ownership, styling/layout, or backend behavior; route backend fixes to backend skills.
87
+ - Add regression evidence at the lowest sufficient layer, then run browser smoke for visible flows.
88
+
89
+ 6. Verify in a real browser.
90
+ - Run the repo's formatter, typecheck, lint, unit/component tests, and build or affected checks.
91
+ - **TC traceability**: link tests via the `createTcSuite(test, describe)` factory wrapper. Registers at collection time so `.skip` / `.skipIf` / `.todo` still map to Bitable status. Full overloads supported: `.concurrent` / `.each` / `(name, options, fn)` / `(name, fn, timeout)`. Helper from `test-artifact-management/references/tc_helpers/tc.ts`, installed under `test/tc.ts`. See `test-artifact-management/references/tc-marker-conventions.md`. Before adding tests, `grep -rn 'tcTest\|tcDescribe' src/ __tests__/` plus the sidecar `test/results/tc-map.jsonl` to check for existing coverage — extend rather than duplicate. When a TC is marked 废弃, grep both source and sidecar; follow deprecation cascade in `testing-strategy`. Tests without any TC link: prompt user only when the underlying code is also removed.
92
+ - **废弃级联:业务代码是否仍在用** — TS/JS 用 `madge` 拿依赖图最准,没安装则 grep 兜底:
93
+ 1. `npx madge --dependents src/path/to/Module.tsx`(列出谁 import 了它);或 `grep -rEn "from ['\"][./]*<path>" src/`
94
+ 2. 排除测试文件后还有 import → 产品代码在用,不删;只剩这个测试 → 同 commit 删模块 + 测试
95
+ 3. 路由级别另查:`grep -rn "<RouteComponent>" src/router src/routes`;运行时 lazy import (`React.lazy(() => import('...'))`) madge 能抓但要 `--include-npm` 等参数核对
96
+ 4. 边界:路径别名(`@/foo`)需 madge 的 `tsconfig` 配;动态 `import(name)` 字面值为变量时 grep 抓不到;CSS / 静态资源 import 的 dead-asset 由 build 报告
97
+ - For API-backed UI, test component states, API client parsing/error translation, and at least one browser/E2E smoke path when feasible.
98
+ - Inspect the rendered page in a browser for any visible UI change, responsive behavior, empty/error states, and console/network errors.
99
+ - For UI/UX redesign evidence, include the declared stress viewport, or when none exists use the minimum supported width plus one narrow stress width such as 320px; text wrapping/overflow; loading/empty/error/final states; keyboard/focus path; and a browser screenshot or equivalent visual artifact. Mark each dimension covered or `N/A` with a one-line reason; `N/A` is valid only when the reason names a verifiable structural fact, explains why that fact makes the dimension unreachable or unchanged for this slice, and includes a checkable pointer such as a file path, config key, or commit that resolves at review time. Persist evidence artifacts where reviewers can access them using sanitized/test accounts and redacting tokens, PII, credentials, private paths, and raw personal data; delete temporary smoke pages or helper scripts before commit unless the repo intentionally owns them.
100
+ - For browser-runtime changes, browser smoke is a completion gate when lower layers cannot prove the behavior. This includes changes to routing, browser storage/session restore, streaming/fetch finality, visibility or foreground/background behavior, permission/capability prompts, WebView bridge callbacks, upload/media flows, and rendered loading/error/final states. If the browser or app server is missing, first attempt normal setup; if still unavailable, stop at `pre-runtime-test ready` or `blocked` and name the owner, attempted commands, residual risk, and next unblock action. `pre-runtime-test ready` is handoff-only, not merge-ready, release-ready, or complete.
101
+ - Check accessibility names, labels, focus order, keyboard navigation, aria only when semantic HTML is insufficient, contrast, and text wrapping.
102
+ - Check performance when relevant: bundle impact, unnecessary renders, long lists, image loading, code splitting, hydration/runtime errors, and Core Web Vitals risk.
103
+
104
+ ## Non-Negotiable Rules
105
+
106
+ - Do not use mocked happy-path component tests as proof that API integration works.
107
+ - Do not add Effects for state that can be derived from props/state during render.
108
+ - Do not ship user-visible UI without inspecting the rendered browser surface when layout or interaction changed.
109
+ - Do not add hidden keyboard traps, icon-only controls without accessible names, or mouse-only critical actions.
110
+ - Do not ship configurable shortcuts as scattered `keydown` handlers; centralize parsing, normalization, scope resolution, reserved-key enforcement, unbind/override behavior, and text-input or modal isolation.
111
+ - Do not let server transport errors leak directly into user copy; map them to useful UI states.
112
+ - Do not ship high-risk actions with only optimistic UI or generic success/error toasts; users must be able to tell whether the operation is pending, succeeded, failed, retryable, blocked, or needs support.
113
+ - Do not treat a frontend API client as done until empty response, invalid JSON, non-2xx envelope, auth expiry, network failure, cancellation, and backend error message extraction are covered at the client or component boundary when relevant.
114
+ - Do not scatter backend enum/string literals through React components, URL/query handling, analytics, or tests. Centralize finite-value parsing, display labels, defaults, and unknown-value behavior at the API/client-domain boundary, and keep raw literals only in clearly named boundary conversion tests that cover every known external value plus unknown/default behavior. Migrate existing non-boundary test raw literals for that value in the same pull request or mark each remaining use with `finite-value-debt: <task-ref> <owner> <deadline> <reason>`, even when the current slice does not introduce a new mapper.
115
+ - Do not debug React/browser failures from code inspection alone when a browser reproduction, console output, network trace, screenshot, or focused test can be collected.
116
+ - Do not claim a web client fix is complete without naming the browser/rendered verification that was run. If required browser/runtime verification is unavailable after remediation, the status is `pre-runtime-test ready` or `blocked`, not complete.
117
+
118
+ ## Reference Loading
119
+
120
+ - For source provenance, current extraction boundary, and keep/merge/discard decisions, read `references/source-evidence-map.md` when auditing or re-extracting this skill.
121
+ - For embedded H5 inside a host (mini-program `web-view` / native WebView / payment / vendor app WebView) — H5-author POV: env detection, bridge abstraction, auth-from-host (cookieless), hardware-back integration, safe-area + viewport-fit, host capability degradation, WeChat JSSDK specifics, offline / lifecycle, cross-app navigation, anti-patterns, multi-host smoke matrix — read `references/embedded-h5-in-host.md`. The host-side contract (web-view component / WebView shell config / native bridge setup) is owned by `miniapp-product-dev` (mini-program host) and `app-cross-platform-dev` (native WebView shell).
122
+ - For joint extraction from Figma design source AND a React/web monorepo (with package class mapping, design-token cross-validation, deprecation-marker detection), read `../skill-extraction-workflow/references/two-source-extraction-pattern.md`. Use when both sources are available; produces aligned design + implementation rules with cross-source token validation.
123
+ - For component decomposition, state ownership, effects, routing, forms, and data fetching, read `references/react-architecture.md`.
124
+ - For dense review, report, assignment, resource, assistant, media/capture, or app-hosted workspace state-machine patterns, read `references/complex-workspace-patterns.md`.
125
+ - For browser accessibility, keyboard/focus, responsive behavior, and visual verification, read `references/web-ui-quality.md`.
126
+ - For API integration, caching, error handling, testing, performance, build, and deployment readiness, read `references/web-quality-release.md`.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Web React Dev"
3
+ short_description: "Build React web client features"
4
+ default_prompt: "Use $web-react-dev to design, implement, test, or release a React web client feature."
@@ -0,0 +1,47 @@
1
+ # Complex Workspace Patterns
2
+
3
+ Use this reference after `web-react-dev/SKILL.md` identifies a React surface as a dense workspace rather than a normal page/form/list. Keep the entrypoint small; apply only the relevant pattern family below.
4
+
5
+ ## Pattern Families
6
+
7
+ ### Review / evaluation workspaces
8
+
9
+ - Own queue/task identity, selected record, selected sub-unit, current-item header, queue switching, batch selection, submit mode, incomplete-item confirmation, and queue-end recovery.
10
+ - Keep artifact layout readable by deriving split count from container width and a declared minimum card width. Persist user display preferences with scope and expiry, then validate restored settings against route, permission, task type, and item count.
11
+ - Preview media/documents with automatic transient retry plus manual retry. Keep per-item annotation, disabled reasons, local/global success feedback, quality/timing gates, and history/statistics drawers as separate state owners.
12
+
13
+ ### Insight / report / analytics workspaces
14
+
15
+ - Treat list filters, detail route params, selected report/module, menu state, local section anchors, scope filters, exports/downloads, module config changes, and parent return context as one route contract.
16
+ - Validate cached filters against the current option set; clear stale dependent filters deliberately and refetch authoritative data after create/edit/delete/default mutations.
17
+ - Chart, canvas, image, PDF, or annotation components need cleanup, resize handling, device-pixel-ratio correctness, zoom/pan/reset where relevant, and browser evidence for overflow, long labels, and drill-down linkage.
18
+
19
+ ### Assignment / roster / resource management workspaces
20
+
21
+ - Keep structure edits, owner edits, permission edits, quota edits, import/export jobs, save/autosave/finalize, and read-only/started variants as separate state transitions.
22
+ - Selection drawers need search, cascade filters, role/qualification filters, all/partial selection, selected-count panel, disabled existing owners, max-count handling, bulk clear, removal, and no-result states.
23
+ - Resource and taxonomy flows need route scope, resource type, hierarchy mode, selected tree node, filters, pagination, selected resource, preview/detail, share/publish/download settings, upload/import jobs, and cached-filter restoration as distinct owners.
24
+
25
+ ### Assistant / AI workspaces
26
+
27
+ - Compose state should separate prompt text, attachments, capability modifiers, model indicator, send/cancel, generated-output actions, IME composition, and scroll/history recovery.
28
+ - Streaming needs terminal states: waiting for first response, append, timeout abort, auth/session expiry, quota/content refusal/model unavailable, network/user-send failure, user cancel, server interrupt, done, regenerate, copy, and timer/controller cleanup.
29
+ - AI-generated structured output needs validation, renderer failure fallback, save/retry/remove semantics, already-saved state, and generated-to-saved-object reviewability.
30
+
31
+ ### Media / capture / import workspaces
32
+
33
+ - Capture/import flows should model file identity, metadata form state, parent/child cascades, consistency checks, parse/enrichment polling, background continue, retry/reupload, partial failure, and navigation to the next editor/detail step.
34
+ - Native-assisted or app-hosted capture treats the bridge payload as an API contract: normalize success/cancel/failure, parse payloads safely, validate object key/URL/file type/name, and keep callback cleanup scoped.
35
+ - Do not clear loading or host overlay state immediately after native success if a route handoff is still pending; hold it until the destination route mounts and signals readiness.
36
+
37
+ ### Auth / account / app-hosted foundations
38
+
39
+ - Auth/onboarding surfaces need explicit mode ownership: splash handoff, consent, password login, phone-code login, account opening/binding, first-password setup, reset, guest/public mode, privacy/legal links, and deterministic back paths.
40
+ - App-hosted React surfaces need lifecycle ownership in React code: save/restore foreground/background state, expire stale state, omit or protect sensitive fields, validate restored route/context, and recover when browser storage, host storage, or injected app info is unavailable.
41
+ - Account/profile/privacy/about routes should share logout, account deletion, legal document loading, version/about, cache cleanup, and post-action navigation contracts.
42
+
43
+ ## Acceptance Checks
44
+
45
+ - State owner map exists for every selected pattern family.
46
+ - Long content, empty/no-data, error/retry, slow/weak network, permission/disabled, narrow/responsive, accessibility text scaling, interruption/return recovery, and repeated-use/cache-hit behavior are either tested or explicitly out of scope.
47
+ - Browser or host-container evidence captures the declared stress widths and the primary pending/final/error states. If rendered evidence cannot run after normal remediation, status is `pre-runtime-test ready` or `blocked`, not complete.
@@ -0,0 +1,87 @@
1
+ # Embedded H5 In Host
2
+
3
+ Use this reference when the React web surface is embedded **inside a host** rather than running as a standalone browser page. Common hosts: mini-program `web-view` (WeChat / Alipay / Douyin / Baidu / QQ), native mobile WebView (`WKWebView` / Android `WebView`), payment-vendor WebView, vendor-app WebView (banking apps, super apps). Not for: standalone PWA, public website, marketing landing page.
4
+
5
+ The host imposes constraints a standalone React app does not face. This ref names the recurring contract surface; sibling responsibility lives in `miniapp-product-dev` (mini-program host side) and `app-cross-platform-dev/references/{ios-dev, android-dev, mobile-platform-boundaries}.md` (native WebView shell side).
6
+
7
+ ## When This Ref Applies
8
+
9
+ - The page loads inside a host's WebView, not the user's browser.
10
+ - The host owns auth, navigation, share, payment, scan, file/image upload, location, status bar, and back-button behavior. The H5 is a guest.
11
+ - Source-of-truth for the contract is the host's official docs (WeChat JSSDK / WKWebView WKScriptMessageHandler / Android `WebView` `addJavascriptInterface`); H5-side guesses without consulting host docs ship broken.
12
+
13
+ ## Host Environment Detection
14
+
15
+ - **Detect the host explicitly** before invoking any host-specific bridge: WeChat = prefer `wx.miniProgram.getEnv(...)` (canonical async check that resolves `{miniprogram: true|false}`) — `window.__wxjs_environment === 'miniprogram'` and UA `MicroMessenger` substring remain as legacy / early-detection fallbacks before WeChat JSSDK is loaded; Alipay = UA contains `AlipayClient`; mini-program `web-view` = check for `wx.miniProgram` / `my.miniProgram` / `tt.miniProgram` etc. Cache the detection at app init; do NOT re-sniff in every component.
16
+ - **Defensive feature checks** beat UA-sniffing for capability presence (`typeof wx !== 'undefined' && typeof wx.config === 'function'`). UA-sniffing is for env classification + analytics labeling; per-call feature check is for guarding the actual invocation.
17
+ - **In-browser fallback path** is mandatory: the same H5 may open outside the host (testing, sharing as plain URL, fallback when host restricts). For each host-capability touchpoint, design and test the in-browser degradation (disabled button + tooltip, alternative web-native flow, or explicit "open in <host>" prompt).
18
+
19
+ ## Bridge Contract Abstraction
20
+
21
+ - **Never hardcode one host's bridge directly in component code**: wrap all host calls in a thin per-host adapter (`HostBridge.share(...)`, `HostBridge.pay(...)`, `HostBridge.scan(...)`) plus a single registry that resolves to WeChat / Alipay / Native / Web-fallback at runtime. Without this, every host added later means rewriting call sites. When adopting an existing native bridge library (DSBridge, WebViewJavascriptBridge, custom in-house bridge), verify the library's current maintenance state and security posture — both legacy libraries are still in use in production codebases but their repos may be inactive; the abstraction layer above them lets you swap the implementation without touching call sites.
22
+ - **Bridge calls are async** and can fail / time out / be denied by the user. Treat every bridge invocation as a network call: typed result, error class, timeout, user-cancel state, and UI feedback when the host is slow. Synchronous-call assumption is the recurring source of "tap does nothing" bugs when the bridge is slow on first invocation.
23
+ - **JS-bridge auth is per-message, not per-handshake** (per `miniapp-product-dev/references/platform-capabilities.md` WebView bridge contract): the host re-validates origin + nonce + session tuple on every inbound bridge call. H5 cannot cache a successful handshake and assume future calls succeed.
24
+
25
+ ## Auth From Host (Cookieless Session)
26
+
27
+ - **Do not assume cookies / localStorage persist across host sessions**: mini-program `web-view` and many native WebViews isolate storage per app launch or even per page-open. Treat storage as cache, not as source of session truth.
28
+ - **Auth token comes from the host**, not from a cookie-based login flow. Standard patterns: (a) signed URL query parameter from the host (`?token=<host-issued-jwt>`); (b) bridge call to fetch token (`HostBridge.getAuthToken()`); (c) host-injected initial JavaScript variable. Document which pattern the project uses; do not mix.
29
+ - **Token rotation needs an explicit refresh path** (for authenticated H5 consuming a host-issued token; not needed for unauthenticated content surfaces): on 401, attempt token refresh via bridge; if refresh fails or no bridge, surface a re-login flow that respects the host's auth model (e.g., navigate back to host login surface, not to an H5 login page that the host can't drive).
30
+
31
+ ## Hardware Back Button + History Integration
32
+
33
+ - **Android hardware back is part of the contract**: the host's `Activity` `onBackPressed` (or modern `OnBackPressedDispatcher` per `app-cross-platform-dev/references/android-dev.md`) typically intercepts back and either calls `webView.goBack()` (when `canGoBack()` is true) or finishes the host activity. H5 `history.pushState` / `popstate` integrates correctly when host wires this through; without it, hardware back exits the entire WebView when H5 expected internal navigation.
34
+ - **WeChat Android JSSDK + HTML5 History API caveat**: per WeChat JSSDK docs (defensive against Android-WeChat-specific signing behavior, not anchored to a single historical version), `pushState` SPA routing can break `wx.config` signature on Android because the signed URL diverges from the runtime URL. Workaround: re-call `wx.config` after route change with a freshly-signed URL, or use hash routing (`#/path`) for WeChat-embedded SPAs.
35
+ - **iOS swipe-back gesture**: WKWebView's interactive `allowsBackForwardNavigationGestures` (host-side flag) drives the swipe-back-to-previous-page behavior. H5 cannot block this from the page; if a flow MUST prevent unsafe back (mid-payment, mid-upload), coordinate with the host to disable the gesture for that route.
36
+
37
+ ## Safe Area + Viewport In WebView
38
+
39
+ - **Viewport-fit cover + env(safe-area-inset-*) is mandatory for full-screen H5 on notched devices**: `<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">` is the opt-in for content extending into the safe-area region; CSS `padding-top: env(safe-area-inset-top)` / `padding-bottom: env(safe-area-inset-bottom)` etc. then keeps interactive content inside the safe region. Without `viewport-fit=cover` the page leaves system white space at notch; without `env(safe-area-inset-*)` the page hides behind the home indicator.
40
+ - **`100vh` is unreliable in WebView**: mobile browsers compute `100vh` including/excluding URL bar inconsistently; in WebView the host chrome height shifts on scroll. Use `100dvh` (dynamic viewport units, well-supported in modern browsers) or measure `window.innerHeight` + observe `visualViewport` for keyboard-affected sizing.
41
+ - **Keyboard handling**: iOS WebView pushes the entire viewport up when the keyboard appears (forcing layout shifts); Android WebView resizes the viewport (so `position: fixed` elements may not stay fixed). Use `visualViewport.height` + `visualViewport.offsetTop` to position keyboard-following UI, not raw `window.innerHeight` deltas.
42
+
43
+ ## Host Capability Surfaces
44
+
45
+ - **Native capability invocation routes through host APIs, not browser APIs**. Common surfaces with their host-vs-browser distinction:
46
+ - **Share** — host has its own share sheet (`wx.shareToTimeline` / `wx.miniProgram.postMessage` + `onShareAppMessage`); `navigator.share` is rarely available in WebView. Always check `HostBridge.canShare()` before showing share UI.
47
+ - **Image / file upload** — host wraps native camera + photo library (`wx.chooseImage` + `wx.uploadImage`); `<input type="file">` may be blocked / quirky inside WebView. Use the bridge if available.
48
+ - **Payment** — host has native payment (`wx.requestPayment` from mini-program web-view; WeChat Pay JSAPI; Alipay tradePay). Web payment via `<form>` POST works but loses the native UX (no Touch ID / Face ID prompt, no host wallet UX).
49
+ - **Scan (QR / barcode)** — host has native scan (`wx.scanQRCode`); web-only via `getUserMedia` + decoder library works but requires camera permission and adds bundle weight.
50
+ - **Location** — host has native location with the host's permission state (`wx.getLocation`); browser `navigator.geolocation` works but prompts independently of host permission and may have lower accuracy.
51
+ - **Subscribe message / push** — H5 cannot subscribe to mini-program / app push directly; coordinate with host (mini-program `requestSubscribeMessage` runs on the host page, not in `web-view`).
52
+ - **Degrade gracefully when the host capability is absent** (when running in browser): hide the action, swap to a web-native alternative, or show "Please open in <host>" call-to-action. Crashing or silently failing on missing host APIs is the recurring source of "works in WeChat, broken everywhere else" tickets.
53
+
54
+ ## WeChat JSSDK Specifics (Public Account / web-view)
55
+
56
+ - **`wx.config` signature requires all five parameters** (`appId` + `timestamp` + `nonceStr` + `signature` + `jsApiList`) — signature is computed server-side from the current page URL excluding hash. SPA hash routing keeps the signed URL stable; SPA `pushState` routing requires re-signing on every route change. Verify in WeChat developer tools / `wx.ready` + `wx.error` callbacks.
57
+ - **`web-view` in mini-program only exposes a subset of JSSDK** — the full JSSDK API list works in WeChat browser (公众号 H5); inside mini-program `web-view`, only `wx.miniProgram.*` bridge methods (`navigateTo`, `redirectTo`, `navigateBack`, `switchTab`, `reLaunch`, `postMessage`, `getEnv`) are reliably available. Test the actually-needed API on the actually-targeted host surface.
58
+ - **Domain whitelist (业务域名)**: per `miniapp-product-dev/references/platform-capabilities.md` Network Domain Allowlist, every domain the H5 loads (HTML / API / asset) must be registered in the mini-program / public-account console as an authorized business domain — production calls to unregistered domains are silently blocked. Developer-tool "skip domain check" masks this; CI / pre-release smoke disables that flag.
59
+
60
+ ## Offline / Cache / Lifecycle
61
+
62
+ - **Host may aggressively cache the entry HTML** (WeChat caches public-account HTML for performance). Cache-bust strategy: append a content-hash query parameter to the entry URL, OR use HTTP cache headers the host respects (`Cache-Control: no-cache, must-revalidate` for HTML; immutable hashed JS/CSS assets). Hash-busted JS without a fresh HTML reload = stale code shipping.
63
+ - **Service Workers in WebView are NOT a portable guarantee** — verify per target host. Android `WebView` has an official `ServiceWorkerController` API (must be explicitly enabled and respects same-origin); WeChat WebView's full SW support is not something you should assume. Do not bet on Service Worker for critical offline behavior in WebView without per-host verification; use host-side cache (where the host owns the WebView) or accept online-only operation.
64
+ - **Visibility / lifecycle events**: H5 inside WebView receives `pageshow` / `pagehide` / `visibilitychange` events but the timing differs from a browser tab (the host may freeze the WebView when backgrounded, terminate on memory pressure). Save in-progress state on `pagehide` / `visibilitychange`, not on `beforeunload` (often not fired in WebView).
65
+ - **Cold-start vs warm-start**: if the host keeps the WebView alive across navigations, the H5 may re-receive a `pageshow` event with `persisted=true` (BFCache-style restoration). Initialize idempotently — code that assumes single `DOMContentLoaded` per session breaks when warm-started.
66
+
67
+ ## Cross-App / Cross-Page Navigation
68
+
69
+ - **Open a mini-program from H5** (only in WeChat browser, NOT inside mini-program web-view): requires the page domain to be associated with the target mini-program in the WeChat console; primary API is the `wx-open-launch-weapp` web component (current public path). JSSDK `wx.invoke(...)` legacy paths may exist in some integrations but verify against current WeChat docs before adopting.
70
+ - **Open native app from H5**: URL schemes (`myapp://...`) work when the app is installed and the host allows it; Universal Links (iOS) / App Links (Android) are more reliable but require server-side `apple-app-site-association` / `assetlinks.json` setup. Inside many in-app WebViews, URL scheme jumps are blocked — coordinate with the host.
71
+ - **Inside mini-program `web-view`, navigation between H5 and mini-program pages** uses `wx.miniProgram.navigateTo` (to mini-program page) / `wx.miniProgram.postMessage` (sends data back to the mini-program's `web-view` `bindmessage` handler, delivered at host-defined moments — typically mini-program back navigation, component destroy, or share — NOT guaranteed immediate delivery).
72
+
73
+ ## Anti-Patterns — Avoid Or Require Justification
74
+
75
+ - Using `window.alert` / `window.confirm` / `window.prompt` as primary user UI — WebView host may render them in confusing ways or block them entirely; use host bridge for modal UI when available, otherwise an in-page React modal. Low-risk dev-only diagnostics in `alert()` are not blanket-forbidden, but should never ship as production user flow.
76
+ - Using `document.cookie` for **session** state — WebView cookie persistence is unreliable across cold-starts; use host token via bridge for session. First-party non-session cookies (preferences, tracking with consent) remain valid where the host respects them.
77
+ - Relying on third-party cookies — most WebViews and modern browsers block them; use first-party storage + server-side session if cross-origin auth is needed.
78
+ - Calling `window.open` for new windows — WebView typically does not support multi-window; route through host bridge.
79
+ - Assuming `console.log` reaches the developer — WebView consoles are not always exposed; use a host bridge logging method or remote logging service for production diagnostics.
80
+ - Polling `navigator.onLine` for connectivity — unreliable in WebView; use fetch-failure as the actual signal and let the host-level network indicator (mini-program / system notification) handle the user-visible offline state.
81
+ - Adopting **PWA acceptance criteria** (manifest install prompt, Service Worker offline-first, push notifications) for the H5-in-host build — these are valid for standalone PWA but are NOT acceptance criteria inside a host WebView; the host owns app-shell / push / offline. If the same H5 also ships as standalone PWA, treat as a separate build target with its own acceptance.
82
+
83
+ ## Verification
84
+
85
+ - **Real host device test is blocking when the change touches host-dependent behavior**: bridge invocation, auth-from-host, share / payment / scan / image-upload / location, hardware back, lifecycle (cold-start / warm-start / visibility), safe-area + viewport, keyboard handling. Browser smoke + responsive emulator is structural only for these. Per `mobile-quality-release.md` and `miniapp-product-dev/references/qa-release.md` real-host flow templates: open the H5 inside the actual host (real WeChat client, real native app build) on a real device; verify the host-specific path end-to-end. For copy-only / static-layout / pure-React-internal changes that don't cross the host boundary, browser smoke plus a single targeted host smoke is sufficient.
86
+ - **Multi-host smoke matrix** when shipping to ≥2 hosts: WeChat browser / WeChat mini-program web-view / native iOS app WebView / native Android app WebView are four distinct environments — the same H5 may render correctly in three and break in the fourth (most commonly: Android WebView with custom UA or AppCompat WebView).
87
+ - **In-browser fallback test**: open the H5 in a plain mobile browser (Safari iOS, Chrome Android). Confirm the in-browser degradation is sane: actions that need host APIs are disabled with explanation, no JavaScript errors in console, no host-specific assumptions break the page.
@@ -0,0 +1,194 @@
1
+ # React Architecture
2
+
3
+ ## Component And State Boundaries
4
+
5
+ - Build a component hierarchy from the UI model and data model. Components should have clear ownership of responsibility.
6
+ - Keep state at the lowest common owner. Lift state only when another component genuinely needs to coordinate with it.
7
+ - Distinguish server/cache state, route state, form state, transient interaction state, and derived render data.
8
+ - Prefer controlled forms when validation, submit state, or server errors matter; keep uncontrolled inputs only when the repo pattern and UX allow it.
9
+ - **React 19 form / async state primitives (released 2024-12-05)**: `useActionState` handles state + pending around Actions (covers common Action cases — not a universal replacement for every async pattern); `useFormStatus` lets a button / spinner read parent `<form>` pending state without prop drilling or Context; `useOptimistic` shows immediate UI feedback while the Action is in flight, reverting if the server rejects. For new React 19+ form code, prefer these over hand-rolled `useState` + `try/catch` + manual pending flag — they integrate with `<form action={...}>` and Server Functions without extra wiring.
10
+ - **`ref` is a prop starting in React 19** for function components — drop `forwardRef` for new components (still valid for code targeting React 18 or earlier). Pass `ref` like any other prop; the type is `Ref<T>`. Existing `forwardRef` components keep working; do not refactor working code for cosmetics.
11
+ - Use stable keys for lists. Do not use array index keys when ordering can change.
12
+ - Preserve the design judgment layers in component boundaries. Layout components own aesthetic hierarchy and density; flow components own entry/current/next/return logic; state machines own waiting/retry/cancel/recovery behavior; copy and feedback components own user certainty, risk explanation, and perceived control.
13
+
14
+ ## Effects And Side Effects
15
+
16
+ - Use Effects for synchronization with external systems: network subscriptions, browser APIs, timers, analytics, storage, and imperative widgets.
17
+ - Do not use Effects to calculate derived data, mirror props into state, or handle user events that can run in event handlers.
18
+ - Always define cleanup for subscriptions, timers, and long-running async work where cancellation matters.
19
+ - **Memoization (`React.memo` / `useMemo` / `useCallback`) is a perf optimization, not a default.** Before reaching for it, fix the root cause: state living too high (lift down), children re-rendering because the parent passes new object/array literals every render (move literals out or memoize the parent's state), Effects writing state that triggers more renders (eliminate the Effect). Apply memoization only when a measured render cost or a referentially-stable dependency contract (effect deps, memo child, third-party hook) actually requires it. Wrapping every component in `memo` and every value in `useMemo` adds overhead and obscures the real bottleneck — see also Dan Abramov "Before You memo()" framing.
20
+ - **React Compiler (stable as v1.0 since 2025-10) auto-memoizes components and hooks** based on static analysis — recommendation when the project is on a supported framework (Expo / Vite / Next.js shipped first-party integrations). Enable per `react.dev/learn/react-compiler` instructions; ESLint plugin `eslint-plugin-react-hooks` recommended preset ships the compiler-aware lint rules. With Compiler enabled, prefer compiler-driven memoization for new code; manual `React.memo` / `useMemo` / `useCallback` stay valid as escape hatches for precise control, existing behavior the team wants to preserve, or measured perf needs the compiler can't cover. React ships a `preserve-manual-memoization` lint mode that keeps existing manual memoization in place during adoption — use it to migrate incrementally rather than ripping out all hand-written memo at once.
21
+
22
+ ## Custom Hooks Discipline
23
+
24
+ Custom hooks are React's primary mechanism for reusing **stateful or effectful** logic. They are not a way to organize pure functions.
25
+
26
+ - **Only extract a custom hook when the logic owns state, effects, refs, context, subscriptions, or other hooks.** Pure transformations (formatting, mapping, validation) belong in plain functions — `formatCurrency(amount)`, not `useFormatCurrency(amount)`. Wrapping a pure function in `useCallback`/`useMemo` and calling it a hook adds re-render overhead with zero reuse benefit.
27
+ - **Cleanup is part of the hook contract.** Subscriptions, timers, observers (`IntersectionObserver` / `ResizeObserver`), `addEventListener`, AbortController-backed fetches, websockets — each MUST return cleanup from its effect. A hook that creates a side effect without exposing or owning its teardown leaks across HMR, route changes, and StrictMode double-invoke.
28
+ - **Hook output is the contract; internal state shape is private.** Return `{value, set, reset}` or `[value, setValue]`, not the raw `useState` tuple a caller might destructure. Renaming an internal state variable should never be a breaking change.
29
+ - **Stable references where it matters.** Callbacks returned from a hook that consumers will pass to effects or memoized children must be referentially stable (wrap in `useCallback` or use a ref pattern); values that change every render do not need stabilization.
30
+ - **One hook per concern.** `useUserProfile` that also handles toast notifications and analytics is three hooks. Compose at the call site (`useUserProfile()` + `useToastOnError()` + `useTrackView()`), not inside one mega-hook.
31
+ - **Don't reach for a library before writing the hook.** `useToggle` / `useDebounce` / `useLocalStorage` / `useEventListener` are <20 lines each; an in-repo `hooks/` directory is usually a better dependency than ahooks / react-use for these. Reach for the library only when the surface justifies it (focus management, drag-drop, virtualization, animation timeline).
32
+ - **Hook names declare reactivity.** A function that starts with `use` MUST follow the Rules of Hooks (called at the top level of a component or another hook, not inside conditions / loops / event handlers). If the logic does not need reactive integration, do not prefix with `use` — it misleads readers and trips lint. **Exception**: React's built-in `use(resource)` API (React 19+) is intentionally allowed inside conditions and loops, but still only inside a Component or another Hook and not inside `try`/`catch`. This exception applies ONLY to the built-in `use`; custom hooks remain bound by the standard Rules of Hooks.
33
+
34
+ ## TypeScript Discipline in React
35
+
36
+ TS in React is a correctness tool, not decoration. The patterns below catch the bug classes that React/JS leave latent.
37
+
38
+ - **`strict: true` is the floor.** `strictNullChecks` + `noImplicitAny` (both in the `strict` family) catch most of the "undefined surprise" class bugs that survive runtime tests. `noUncheckedIndexedAccess` is NOT in the `strict` family but is a strongly recommended additional flag — it makes `arr[i]` and `obj[key]` return `T | undefined`, catching a class of bugs the base `strict` does not. A repo on loose TS is not getting the value of TS.
39
+ - **Async/UI state is a discriminated union, not a boolean soup.** `{ isLoading, isError, isSuccess, data, error }` invites impossible states (`isLoading: true` AND `isSuccess: true`); model as `type State<T> = { status: 'idle' } | { status: 'loading' } | { status: 'success'; data: T } | { status: 'error'; error: Err }`. The render path switches on `state.status` and the compiler narrows `data`/`error` accordingly. Many server-state libraries (TanStack Query, RTK Query) expose this as `status` — use it; do not flatten it back into booleans.
40
+ - **Brand cross-boundary / security / cache identities, not every string.** Tenant id, user id, account id, report id, scope id, the routed-identity tuple keys in the heavy-dashboard cache section above — these carry permission and cache-key semantics and benefit from branding: `type TenantId = string & { __brand: 'TenantId' }`. Constructors validate at the boundary; downstream code cannot accidentally swap `userId` for `tenantId`. Catches the cache-key-collision and permission-tuple-mismatch bug class that pure-string typing cannot. Do NOT brand transient operational ids that never cross a security or cache boundary (per-request UUIDs, trace ids, ephemeral file upload keys with no authorization meaning) — the constructor / parse / mock cost outweighs the safety win.
41
+ - **Component prop types use `never` to make impossible combinations uncallable.** A variant prop like `type ButtonProps = ({ variant: 'icon'; icon: IconName; label?: never } | { variant: 'text'; label: string; icon?: never })` makes the wrong call site a compile error instead of a runtime warning.
42
+ - **Generic event handlers belong on the DOM, not on every wrapper.** `onClick: React.MouseEventHandler<HTMLButtonElement>` for raw DOM; a domain handler is `onConfirm: (item: ItemId) => void` — do not leak `React.SyntheticEvent` through three layers of abstraction.
43
+ - **No `any` in shipped code; `unknown` at boundaries.** API responses parse into `unknown`, narrow via Zod / Valibot / hand-written guards before reaching components. `any` from a third-party type defines a fix-it-yourself debt; track it.
44
+ - **`React.FC` is optional and discouraged for new code.** Prefer `function Component(props: Props) { ... }` — explicit return type, no implicit `children`, no `defaultProps` legacy. `React.FC` is not wrong, but the explicit form is easier to refactor.
45
+
46
+ ## Component Reuse Pattern Choice
47
+
48
+ Three reuse patterns recur in React libraries; pick by what the consumer needs to control:
49
+
50
+ - **Custom hook** — when reuse is logic only, no rendering shape required. Default choice for state machines, subscriptions, side-effect orchestration. See discipline above.
51
+ - **Headless / unstyled primitives** (Radix UI, Headless UI, Ariakit, downshift, react-aria) — when reuse is a11y + behavior (focus trap, keyboard navigation, ARIA contract) but every consumer needs different visual treatment. Default for design-system primitives: the primitive owns keyboard / focus / ARIA / portal / dismiss, the consumer owns styling. **Do not invent a custom focus-trap or ARIA implementation when a maintained headless primitive exists** — the bug surface is well-known and the maintained library has fixed bugs you have not heard of yet.
52
+ - **Compound components** (e.g., `<Select><Select.Trigger/><Select.Content/><Select.Item/></Select>`) — when consumers need to arrange children but share an implicit parent context. Cleaner than render props for this case. Default for `Tabs` / `Accordion` / `Select` / `Menu` / `Tooltip` shells.
53
+
54
+ **Legacy patterns to recognize, not to reach for**:
55
+ - **Higher-Order Components (HOCs)** — `withAuth(Component)` / `connect(mapStateToProps)(Component)`. For the same concern in NEW code, prefer a custom hook (`useAuth()` / `useSelector()`). Existing HOC APIs are acceptable when a library / framework contract requires them (React-Redux `connect` is still a valid public API) — do not refactor working HOC integrations on cosmetic grounds. Do not introduce a new HOC when a hook does the same job.
56
+ - **Render props** — `<DataLoader>{(data) => <UI data={data}/>}</DataLoader>`. Replaced by custom hooks + Suspense. A render-prop API in 2025+ is usually a code-review finding ("why not a hook?") unless the consumer genuinely needs to control wrapping JSX (rare).
57
+
58
+ When you see HOC or render props in new feature code, ask whether a hook + (optionally) a headless primitive does the same job with less indirection.
59
+
60
+ ## Routing And Data
61
+
62
+ - Treat URLs, route params, query params, and deep links as contracts.
63
+ - Keep auth/permission gates explicit. A hidden button is not enough if the route/API can still be reached.
64
+ - Treat runtime initialization as part of the route contract. Tenant/account/session context, selected workspace, role vector, feature flag, and external host context must either resolve before protected UI renders or produce an explicit login/permission/retry state.
65
+ - Permission is both navigation and action logic. Menus, routes, buttons, bulk operations, drawers, and API calls should share the same permission model instead of each inventing partial checks.
66
+ - Use the repo's data-fetching pattern first: framework loaders/actions, React Query/SWR/Apollo, or a local API client.
67
+ - **Router choice for non-framework SPAs**: when the project does NOT use a meta-framework (Next/Remix/Modern.js etc.), TanStack Router is the type-safe-first option — file-based routing with `.` for nested routes, end-to-end type inference for navigation / search params / loader data, built-in `loader` API + caching + automatic preloading. Pick it when type-safety on route navigation is a real concern (compile-error on broken `<Link to="/...">`) AND the team accepts the bundler-integrated route-generation step. For simpler apps or established React Router v6+ projects, the migration cost is not automatic; do not switch routers without a real type-safety pain point.
68
+ - Model loading, empty, partial, stale, error, retry, optimistic, and permission states. Do not rely on a single generic spinner for complex flows.
69
+ - Keep development-only diagnostics out of production. Debug consoles, mock accounts, bypass query params, and local-only bridge helpers must be gated by environment and reviewed as release risks.
70
+
71
+ ## UI Implementation Acceptance
72
+
73
+ - Tables/lists must implement stable header, row, cell, selection, hover, bulk action, truncation, empty, loading, and error behavior instead of relying on default table rendering.
74
+ - Modals, drawers, popovers, and detail panels must preserve parent context and return path. Closing or completing a child surface should leave filters, selection, scroll, and pending work predictable.
75
+ - Charts and metric cards must show data freshness, missing/partial/stale states, exact-value access, and drill-down or row linkage when the chart drives a decision.
76
+ - Progress steps and long-task UI must distinguish queued, running, partial, retryable failure, terminal failure, and success. A toast alone is not enough for work that users may wait on or retry.
77
+ - **Routes that temporarily want different chrome (sidebar collapsed, header hidden, footer minimized, dark-mode override) MUST NOT mutate the user's durable global preference.** A heavy-content workflow route reasonably wants more viewport, but `setCollapsed(true)` on mount with cleanup that only clears timers silently overwrites the user's last sidebar choice; on every leave the user must manually re-expand. **Default pattern: route-local override consumed by the layout as `(localOverride ?? globalPreference)`.** The override is route metadata (declared on the route definition or returned by a layout-aware loader), available before first render so the shell never shows a hydration flash, automatically scoped to the matched route/layout boundary (not arbitrary child mount lifetimes, not Suspense fallbacks, not keyed-child remounts), non-persistent (it does not touch localStorage / persisted store / cross-tab sync), and cleared by route exit. The global preference is never mutated by the route. **Read-modify-restore is a discouraged fallback** for hosts that cannot offer a route-local override slot; if it must be used: (a) require an owner-lease or ref-counted override registry so concurrent route owners don't restore each other's stale snapshots, (b) define "prior value" as the durable global preference excluding this route's override — not the mount-time snapshot — so a value the user changed in another tab or via a settings panel during the route's lifetime is preserved, (c) keep the override non-persistent (don't write through Redux-persist / Zustand persist / localStorage), (d) bind the override lifetime to the route/layout boundary, not a child component's mount lifetime. The same rule applies to any global-event-bus-driven UI override.
78
+
79
+ ## Multi-App Portfolio Stack Choice
80
+
81
+ When a portfolio has multiple React apps (desktop / mobile-H5 / PC / admin) sharing a back-end:
82
+
83
+ - Pick a single meta-framework per portfolio (Umi, Next, Modern.js, Remix, etc.) and document the rationale; mixing meta-frameworks across apps in the same portfolio multiplies tooling, lint, build, and onboarding cost.
84
+ - Pick one package manager (pnpm is the common choice) and one TypeScript base config shared via the meta-framework's generated tsconfig or an explicit `tsconfig.base.json`. Per-app `extends` only for app-specific overrides.
85
+ - Choose component library by surface type: a desktop React component suite for PC/admin apps and a mobile-optimized component suite for H5/mobile-web. Pair the mobile suite with a utility-first CSS engine when typography/spacing density varies; pair the desktop suite with the framework's design-token entry point.
86
+ - Allow per-app meta-framework patch versions but cap the major version skew. Frameworks evolve fast; portfolios that span more than one major version pay tax on every shared dependency.
87
+ - A portfolio without root-level `pnpm-workspace` and shared dependency lock points is a deliberate choice (each app self-contained) or an oversight; record which one.
88
+
89
+ ## State And Data Fetching Library Choice
90
+
91
+ - Pick one global-state library per portfolio (Redux + redux-persist, Zustand, Recoil, Jotai, or the meta-framework's built-in model store) and use it consistently. Mixing 2-3 state libraries across apps in the same portfolio is a portfolio-level finding, not an app-level decision.
92
+ - Pick one server-state cache library (TanStack Query, SWR, Apollo, RTK Query) for any portfolio that has more than one screen reading the same endpoint. Hand-rolled `useEffect + setState + manual cache` is acceptable only for single-screen prototypes; at portfolio scale it leaks stale/dedupe/revalidate concerns into every page.
93
+ - Pick one form library (react-hook-form + zod is the common choice; framework-native Form is acceptable when the component suite ships one) and use it consistently. Mixing react-hook-form, framework Form, and hand-rolled controlled inputs in the same portfolio is a finding.
94
+ - Declared-but-unused dependencies (`zustand` in package.json with zero imports, `@ahooks/use-url-state` declared but referenced nowhere) are dead deps. Audit them in lint or CI.
95
+
96
+ ## Feature-Domain Library Exceptions
97
+
98
+ The default "one library per concern per portfolio" rules above hold strictly for state-management, server-state cache, form, and routing. For library classes that govern narrower surfaces (a single visual primitive or a single non-visual capability), a narrow carve-out allows feature-local isolation when strict conditions are met. This subsection defines which classes are eligible, what evidence is required, and how containment is enforced.
99
+
100
+ ### Library class decision table
101
+
102
+ | Library class | Default rule | Carve-out eligibility |
103
+ |---|---|---|
104
+ | State-management, server-state cache, form, routing | One per portfolio | **Not eligible** — strict; mixing is always a portfolio-level finding |
105
+ | Toast / notification widget, animation library, icon set (see special case) | One per portfolio | **Visual-class eligible** — design-source evidence required (condition a visual path) |
106
+ | Charting engine without UI, virtualization engine without UI, date/timezone correctness library without UI, drag-drop keyboard/focus engine without UI, markdown / rich-text parser-and-renderer engine without UI, sanitization library, i18n rich-text engine without UI, upload protocol/client without UI, editor-extension contract without UI | One per portfolio | **Non-visual-class eligible** — measurable budget / contract evidence required (condition a non-visual path); check shared code / policy inventory (condition c non-visual path) |
107
+ | Chart widget, virtualized list/grid widget, date / time picker widget, drag-drop sortable / dropzone / list-reorder widget, markdown / rich-text editor or viewer widget, uploader widget, map widget, dialog / modal widget | One per portfolio | **Hybrid-class eligible** — both inventories (design-system + shared code / policy) must be silent; load `product-ui-ux-design/references/tokens-and-components.md` cross-reference for editor / rich-text classes |
108
+ | Icon set | One UI-kit family per stack (see `product-ui-ux-design/references/multi-stack-strategy.md` and `multi-project-token-consistency.md`) | **Eligible only as feature-local glyphs**, never as a second UI-kit family — see Icon-set special case below |
109
+ | Any class not listed above | One per portfolio | **Case-by-case escalation** — the carve-out applies only after the maintainer of the consuming skill / portfolio (typically `product-ui-ux-design` for visual classes, `app-cross-platform-dev` / `web-react-dev` for capability classes) reviews the case against the same four conditions and either extends this table or rejects. **Audit any new label against the anti-loophole meta-principle in condition (c) before adding it.** |
110
+
111
+ ### Four required conditions (all must hold simultaneously)
112
+
113
+ (a) **Evidenced requirement beyond default library's capability**, scoped by class:
114
+ - For **visual-class surfaces** (toast/notification widget, animation library, icon set — the entries in the visual-class table row): the requirement is a typed enumerable in the design source — the design file ships multiple distinct sizes / containers / interaction patterns / state variants for the surface class. Subjective "the default looks ugly", "easier API", or "I prefer this library" is **not** the carve-out.
115
+ - For **non-visual capability classes** (the headless `without UI` entries in the decision table — charting engine, virtualization engine, date/timezone correctness library, drag-drop keyboard/focus engine, markdown/rich-text parser-and-renderer engine, sanitization library, i18n rich-text engine, upload protocol/client, editor-extension contract): the requirement is a measurable budget or external contract — a performance budget (e.g. render 10k rows under 16ms / frame), a WCAG accessibility criterion, a security/sanitization specification, a locale or timezone correctness case the default library demonstrably mishandles, or a browser/device support matrix entry. Design-source evidence is not required for these classes, but the budget / criterion / spec / case / matrix must be cited and pinned to a specific version of the default library. **Bare nouns and "helper" / "plugin" suffixes are forbidden labels here** — see anti-loophole meta-principle in condition (c); any user-facing widget routes to the hybrid path, not this list.
116
+ - For **hybrid classes** (the `widget / picker / sortable / uploader / map / editor or viewer / dialog` entries in the decision table): the requirement is a named external contract that the default library / no-library path does not satisfy. Per-class evidence shapes: **Chart widget** needs an interaction / a11y / drill-down / large-series-performance contract beyond what the default chart wrapper exposes. **Virtualized list/grid widget** needs a row-count / scroll-restoration / variable-height / keyboard / a11y contract. **Date picker widget** needs a locale / range / mask / a11y contract. **Drag-drop widget** needs a keyboard / screen-reader / touch / multi-list contract. **Markdown/rich-text editor or viewer widget** needs a content-schema / serialization / cross-version migration / paste-sanitization / preview contract. **Uploader widget** needs storage / API / file-policy (types, max size, virus-scan) / resume contract. **Map widget** needs provider / license / data-privacy / performance / a11y contract. **Dialog/modal widget** needs focus-trap / portal / scroll-lock / a11y / nested-stacking contract. Vague "interaction need" or "feature request" is **not** sufficient for these classes — the hybrid carve-out requires evidence rigor matching the non-visual class PLUS a security / privacy / data-contract dimension.
117
+
118
+ (b) **Default library demonstrably cannot satisfy the requirement via its supported public API at the pinned version**:
119
+ - "Cannot satisfy" means the supported public API at the pinned version exposes no path. It does NOT mean "the default required private DOM selectors, monkey patches, forks, CSS hacks, or reimplementing the surface" — those routes are themselves anti-patterns, not evidence of an unsatisfied requirement.
120
+ - Documented by a docs link to the relevant default-library API surface OR a short spike commit reference showing the attempt and the result.
121
+
122
+ (c) **No shared abstraction owns this surface class — checked against the right authority for the class**:
123
+ - For **visual classes** (toast/notification widget, animation library, icon set — the entries in the visual-class table row): authoritative source is the design-system inventory. Load `product-ui-ux-design/references/design-system-source-of-truth.md` to identify the team's design-system file(s). Count only **published, in-use components** in that file — exclude WIP / todo / explicit-deprecation-marked components; exclude third-party mirror kits unless the mirror IS the team's documented design system.
124
+ - For **non-visual capability / security / data classes** (the headless `without UI` entries in the table — sanitization library, markdown/rich-text parser-and-renderer engine without UI, virtualization engine without UI, charting engine without UI, date/timezone correctness library without UI, drag-drop keyboard/focus engine without UI, i18n rich-text engine without UI, upload protocol/client without UI, editor-extension contract without UI): authoritative source is the shared code / package inventory plus owning policy docs — `shared/` modules, `lib/` packages, internal `@<org>/*` package registry, plus any security / platform / privacy policy doc that the team has named as canonical for this capability class. A feature-local sanitizer when `shared/security/sanitizeHtml` already exists is a **policy violation**, not a valid carve-out, regardless of design-system silence.
125
+ - **Anti-loophole meta-principle for class labels (binding rule)**: any class that exists as both a headless library (no UI) AND a user-facing widget MUST be split into two labels — `X engine / protocol / parser / library / renderer without UI` stays non-visual, `X widget / picker / sortable / dropzone / uploader / editor / viewer / dialog / chart / map` is hybrid. Bare nouns (`upload`, `date picker`, `drag-drop`, `chart`, `markdown`, `editor`, `i18n rich-text`) are forbidden as class labels because they conflate the two and let a feature reclassify its widget as "engine" to skip the design-system inventory check. Same forbid applies to ambiguous suffixes `helper` / `plugin` / `lib` — they are NOT valid labels in any bucket; disambiguate to either `... engine / contract / library / renderer / parser without UI` (non-visual) or to a concrete widget noun (hybrid). **When adding or editing a class entry anywhere in this subsection (decision table, condition (a), condition (c)), audit the label against this rule first; the rule applies recursively to every list and every row, not only to new additions.** A change that introduces or leaves a bare noun, `helper`, `plugin`, or `lib` suffix is itself a regression of this rule.
126
+ - For **hybrid classes** (the `widget / picker / uploader / editor or viewer / map / dialog` entries — concrete widget nouns; never bare nouns or `plugin` / `helper` / `lib` suffixes): check both inventories — design-system for the visual / interaction shell, shared code / policy for the data / security / contract layer. A hybrid carve-out passes only when both inventories are silent.
127
+ - If the authoritative inventory has the abstraction, the right fix is to use it (not to fork). If silent, the carve-out is one acceptable path; **promoting the feature's local choice into a shared abstraction is the better long-term fix** when other features will likely want the same capability — a feature that adopts the carve-out should also raise the promotion request to the owning skill (`product-ui-ux-design` for visual, security / platform skill for capability / data).
128
+
129
+ (d) **Isolation is structurally contained — all runtime / build / style references, not just component imports**:
130
+ - Every reference path to the alternate library — component imports, hook imports, service / API-client imports, route loader / action imports, worker / job-runner imports, style imports, generated wrapper imports, type imports, config / token reads — must originate inside `features/<X>/` (or the equivalent feature-path). A library imported by a feature's hook in `lib/` or by an API client in `services/` is **leaked**, even if no component outside the feature directory touches it.
131
+ - The package MUST NOT be loaded as: an app-root provider, a global stylesheet (`<link>` / `<style>` injection at app entry), a theme-mutation effect, a shared package export from a `shared/` / `common/` / `lib/` module, a shared route or layout dependency, a bundler alias / resolution rule, a CSS-in-JS theme augmentation, a generated client / typings ambient declaration, a peer dependency that other features inherit by virtue of being in the same workspace, or a worker / service-worker entrypoint.
132
+ - The feature's README names the alternate library as an intentional choice with citations satisfying (a), (b), and (c).
133
+ - A lint rule or module-boundary configuration enforces the containment — a check that runs in CI, not just a verbal convention. The lint rule MUST cover all reference paths above (not only component imports), or the containment is unenforceable.
134
+
135
+ When all four hold, the isolation is **not a portfolio-level finding** — it is a documented exception. When any one fails, fall back to the default rule: one library per concern per portfolio, mixing is a finding.
136
+
137
+ ### Icon-set special case
138
+
139
+ A second icon set is more often a second visual-system vocabulary than a narrow feature-local library. Even under the carve-out, icon-set isolation MUST be **feature-local glyphs only** (the feature's domain-specific glyphs that the design system does not provide), NOT the feature's primary icon vocabulary; MUST be **tokenized to brand colors** via the design-system's color tokens (not the third-party icon library's defaults); and MUST be confirmed not to function as a second UI-kit family. Before any icon-set package is added across more than one feature, escalate to `product-ui-ux-design/references/multi-stack-strategy.md` and `multi-project-token-consistency.md` review — multi-feature icon usage is typically a design-system update, not a feature carve-out.
140
+
141
+ ## Cross-Cutting Concerns Discipline
142
+
143
+ Several concerns recur in every front-end portfolio and benefit from portfolio-level rules rather than per-app reinvention:
144
+
145
+ - **i18n**: pick one library (react-intl, i18next, lingui) and one translation-file convention before the first user-facing string. Hard-coded strings across apps in a portfolio that ships in one language today become migration debt the day a second language is added.
146
+ - **a11y**: ARIA attributes, focus management, keyboard navigation, and contrast budgets are tooling choices (eslint-plugin-jsx-a11y baseline + a per-component checklist), not per-app investment.
147
+ - **Theme switching and design tokens**: design tokens (brand colors, spacing scale, typography units, radii, shadows) are owned by the design source of truth — typically the Figma file curated by `product-ui-ux-design`. **`web-react-dev` does not redefine tokens** and does not author them in front-end code; it consumes the synced output. For the canonical token set, sync mechanism, and per-platform desktop/mobile mapping, read `product-ui-ux-design/references/tokens-and-components.md` and the platform-specific pattern references. Hard-coded color literals in component code are a sync-pipeline finding (sync missing, or synced token not being referenced), not a place to invent a parallel front-end token file. Multi-theme support arrives by switching the token set in the design source and re-running the sync, not by rewriting components.
148
+ - **Theme injection completeness**: every app in the portfolio that depends on the brand theme must inject it at the framework or root level — examples vary by meta-framework (`antd: { theme: brandTheme }` in UmiJS / Next + antd, `<ConfigProvider theme={brandTheme}>` wrapping the app root in raw React + antd, `ThemeProvider theme={brandTheme}` in styled-components / MUI, etc.). Beware three failure modes that all read as "themed" to a naive grep: (1) **slot exists but is empty** — `antd: {}` or `ConfigProvider` with no `theme` prop — renders the UI-kit default; (2) **dark-mode library mistaken for brand theme** — a `ThemeProvider` from `next-themes`, `tailwindcss/dark`, or similar only handles light/dark, not brand color, so an app whose only theme provider is dark-mode-only is silently off-brand; (3) **theme module exists but is never imported** — the brand `themeConfig` is written but no entry imports it. Static check: grep for the framework-specific theme slot, confirm the slot references a non-empty brand theme object, AND confirm that object is reachable from the app entry. See `product-ui-ux-design/references/multi-project-token-consistency.md` "Empty framework-wrapper theme config" for the cross-stack rule and downstream verdict.
149
+ - **ErrorBoundary and global error UI**: define one error-boundary fallback component + one empty-state component + one loading skeleton at the portfolio level. Per-app re-rolls drift visually and behaviorally.
150
+ - **Responsive breakpoints**: pick one breakpoint scale (the CSS engine's, the component suite's, or a shared `breakpoints.ts`) and use it across desktop and mobile-web apps. Mobile-first utility-CSS on H5 + desktop-first grid on PC is acceptable; the breakpoint values must still come from one place.
151
+
152
+ ## Multi-Level Business Module Shell
153
+
154
+ Use this pattern when one product surface ships several hierarchy levels (per-row, per-group, per-tenant, per-org, per-federation) of the same business module, each with shared chrome and per-level differences.
155
+
156
+ - **One polymorphic shell, not N parallel implementations**. The shell owns header, filter bar, scope persistence, status polling, refresh, and export. Per-level differences (menu shape, available metric set, available export dimensions, navigation paradigm) inject via parameters — for example `<app-type>`, `<level>`, `getMenuItems`, `getExportDimensions` — rather than forking the shell into `<L1>Shell / <L2>Shell / <L3>Shell / <L4>Shell` files. Forks duplicate the shell drift surface and grow O(level × bugfix) maintenance cost.
157
+ - **Per-level menu/handler factory**: each level's `menu.tsx` exposes one or two factory functions (e.g. one set of menu items for the broad/aggregate `<mode-A>` view and another for the focused/single-entity `<mode-B>` view) plus one menu-items generator that filters items by mode/permission. Two factories per level, not one big switch on level inside one giant file.
158
+ - **Menu keys must be stable across levels; labels may vary — and "menu key" is NOT a routed/cache/persistence key**. Re-use the same menu identifier (`metricId` / `menuMetricId`) when the underlying metric/chart/calculation is the same, even when the user-facing label is different on different levels (one level says "row-level comparison", another says "group-level comparison"). Forking that shared identifier breaks the formula/calculation layer — it forces label-only design changes into code redeploys, and it splits analytics taxonomy at the metric level. The shared identifier drives: per-level label maps, formula references, analytics taxonomy entries. The shared identifier does NOT directly drive route / cache / persistence / export-job keys. Each of those is a separate key class with its own required shape (see `product-ui-ux-design/references/analytics-visualization-interactions.md` "Multi-Level Hierarchy Navigation" key-class section for the full matrix). Implementation summary: route / deep-link / export filename use routed identity `(moduleInstanceId | metricId, level, scope, report, tenant, schema-version)`; export job payload / server-side data request add `filter-set` + `config-version` + sheet selection + snapshot token; data cache adds `sheetType` + `filter-set` + `config-version` to the routed identity; local persistence uses `(userId, tenant, report, level, scope/resource, schema-version, surface-version)` plus module identity. Keep `metricId` and `moduleInstanceId` as separate types so the type system catches misuse.
159
+ - **Single permission gate per shared action — but the gate is `(action, level, scope, resource)`, not `(action)` alone**. The shell is one place where the check lives, but the check itself must evaluate the full tuple. A user who has `export` at the parent level often does not have `export` at the leaf level, or vice versa; collapsing the check to "can the user export at all" silently widens the surface. Server-side export job APIs must re-evaluate the same tuple — client gating is for UX, not for security. Submenu modules may rely on the shell gate for affordance visibility, but mutations (export, edit-rules, publish) must re-assert authority against the API on submit.
160
+ - **Two navigation paradigms in the same product are acceptable when the user role differs**: a per-row leaf level (frequent visit, browse top-to-bottom) reasonably uses an in-page anchor-scroll group (one viewport, all modules stacked, scroll-spy + URL menu key); a per-group leaf level (lower frequency, deeper inspection) reasonably uses leaf menu items that route to module-only views. Pick the navigation paradigm per role, not per developer preference. Mixing both inside one level confuses users.
161
+
162
+ ## Heavy Dashboard Cache And Invalidation
163
+
164
+ Use this pattern when one page composes many chart/table modules sharing the same scope (report id, time range, scope filter) but differing in axis (per-row, per-group, all).
165
+
166
+ - **Split sheet types by per-call cost, not by module count — and tag every in-flight request with a generation token**. Cache the all-scope sheet types (e.g. all-row comparison data) in one batch fetch; cache the single-scope sheet types (e.g. focused current-row drill data) per current scope; everything else stays on-demand. A monolithic "fetch everything per scope change" pattern bloats both wall time and bandwidth. The race-safety requirement is non-negotiable: every cache-key must encode the full `(sheetType | moduleInstanceId | metricId, report, level, scope, filter-set, tenant, schema-version, config-version)` tuple — omitting the data identity (sheetType / moduleInstanceId / metricId) collides every module within the same report/scope/filter and exports build from mixed snapshots. Every in-flight request must carry a request-generation token. When scope changes, abort or ignore responses for older generations — otherwise a slow all-scope response and a fast single-scope response can land out of order and the rendered page combines stale aggregates with fresh drill-downs. **Export must come from a consistent snapshot, not from "wait for nothing-in-flight"**: a naive "block export while any dependent query is in-flight or known-stale" rule deadlocks against long-running polls or slow background refreshes. The correct rule is: export builds from the last consistent snapshot of the cache (all keys in the snapshot share the same generation token); if no consistent snapshot exists yet, the export queues a refresh and waits on its completion (showing the user a "preparing export" state); the exported artifact carries timestamp and staleness disclosure so the recipient knows when the snapshot was taken.
167
+ - **Map config-key → affected sheet types and invalidate the minimum set, with a conservative default for unknown keys**. When the user changes a per-module setting (a threshold band, a segment interval, a hierarchy band), only refetch the sheet types that depend on it. A simple `Record<ConfigKey, SheetType[]>` map declared next to the cache makes the dependency explicit; "always refetch on any config change" is the lazy default that lights up the network tab on every interaction. **But hand-maintained maps go stale fast**: when a new config key ships and the engineer forgets to add it, the UI silently uses the old rule and exports based on the old config. Mitigate by (a) deriving the map from typed backend metadata where possible, (b) defaulting unknown config keys to "invalidate everything" rather than "invalidate nothing", (c) including a `config-version` epoch in every cache key so a config schema change forces a full refresh, and (d) writing a test per config key that asserts the affected sheet types refetch.
168
+ - **Polling cost compounds with concurrent reports**. If a status-polling pattern runs every N seconds per open report and users routinely open many reports in tabs, the absolute request rate becomes a server concern even when each request is cheap. Either move to push (WebSocket / SSE), centralize polling at the workspace level, or back off with exponential intervals after the first few cycles.
169
+ - **Local persistence keys need the full routed-identity tuple, not just `(userId, level)`**: filter state, comparison target, selected menu key persisted to local storage should compose at least `(userId, tenant, report, level, scope/resource, schema-version, surface-version)`, plus `metricId | moduleInstanceId` where the persisted value is module-specific. A persistence key of only `(userId, level)` corrupts on tenant switch, on report switch within the same level, or on schema/surface upgrade — the user opens a new report and sees a stale selected module / comparison target from a different report. Sharing the persistence cache across any of these dimensions accidentally is one of the easier ways to ship a state-leak bug.
170
+ - **Differentiate "compare with cache" vs "compare with target"**: a chart that color-codes cells by threshold band is one rendering rule; a chart that color-codes cells by comparison to a target row is a different rendering rule. Mixing them in one component (a single `cellRender` that branches on `mode==='threshold' | 'compare'`) is acceptable; mixing them in one rendered chart without an explicit mode switch / legend / copy is not. The user must know which rule colored their cell.
171
+
172
+ ## Rich Text Editor: Domain Extension
173
+
174
+ When a product ships an editor for domain-specific content (structured documents with fill-in-the-blank fields and inline math, content cards with frame/border decorations, documents with citations or annotations) rather than freeform prose, the editor framework is extended with domain primitives rather than rebuilt:
175
+
176
+ - **Pick an editor framework with an explicit extension model**: Quill (Parchment blots), TipTap (ProseMirror nodes/marks), Slate (custom element types), Lexical (custom nodes), ProseMirror direct. The extension model is what makes domain primitives first-class — schema-aware copy/paste, selection, undo/redo, serialization. Frameworks without an explicit extension model (`contenteditable` + hand-rolled mutation observer) collapse under second-order requirements (paste sanitization, collaborative editing, undo grouping).
177
+ - **Domain primitives are custom blot / node types, not nested DOM hacks**: a fill-in-the-blank field, a formula, a frame decoration, a citation marker are first-class Blot / Node subclasses with `blotName`, `tagName`, `className`, a typed `create(data)` constructor, and a typed `value(domNode)` deserializer. Treating them as styled spans with class hooks (`<span class="my-primitive">`) loses the editor's structural awareness: paste produces orphan spans, undo collapses them, and serialization round-trips drop the data.
178
+ - **Stable cross-edit identity uses a typed UUID prefix**: each blot instance carries an id like `<primitive-type>-<uuid>`; on subsequent renders the constructor accepts the existing id if it matches the prefix or generates a new one. Without stable identity, every keystroke regenerates the blot, breaks editing focus, and confuses collaborative-edit ID tracking.
179
+ - **External-rendering integration uses a reuse-vs-regenerate ladder, with a trust boundary**: when a blot wraps an external-rendered artifact (TeX → SVG via MathJax, code → highlighted HTML via Shiki, diagram → SVG via Mermaid), the create path is (1) reuse a pre-rendered element ONLY when it is trusted same-renderer output produced earlier in the same authenticated session (the editor itself just generated it); (2) for any caller-provided / paste / import / collaboration / API-originated / storage-roundtrip pre-rendered HTML/SVG, regenerate from the canonical source string (the TeX, the code, the diagram DSL) — inline SVG can carry script-adjacent payloads, inline event handlers, `foreignObject`, external references, and CSS abuse that the canonical-source path does not; (3) else if the rendering engine is loaded, call it synchronously on the canonical source; (4) else fall back to raw textual content. If the canonical source is unavailable and the pre-rendered element MUST be reused, sanitize under a strict same-renderer allowlist (tag set, attribute set, no event handlers, no script, no external references) — sanitization is fallback, not default.
180
+ - **Storage contract keeps canonical source, not just rendered output**: persisted content stores the source string (TeX, code, diagram DSL) AND the `renderer_version` used at last render, NOT just the rendered SVG/HTML. Without the canonical source, the multi-version migration below has nothing to re-render from and is stuck reusing untrusted historical output. The rendered output may be cached alongside as a performance optimization, but the source is the authoritative field.
181
+ - **Multi-version engine coexistence during upgrade**: when the math/render/highlight engine is upgraded (e.g. MathJax v2 → v3, formula engine v2 → v3), persisted content was authored against the old engine. The editor ships both engines during the rolling cutover; content's `renderer_version` field picks the matching engine to re-render from the canonical source. Migration is incremental: re-author touches migrate; un-touched content stays on the old engine until a deliberate batch migration runs over the canonical source. Old engines remain shipped until migration coverage is proven (a fraction-migrated metric reaches the policy threshold); a flag-flip cutover before then invalidates every historical document.
182
+ - **Renderer-engine asset loading is self-hosted and integrity-checked by default**: a product-critical editor engine (MathJax, Mermaid, Shiki grammar bundles) loads from self-hosted assets pinned to a specific version with Subresource Integrity (SRI) hash AND a strict Content Security Policy entry. Public-CDN sourcing introduces supply-chain risk, CSP fragmentation, version-skew across regions, and race conditions if the CDN is mutated. CDN sourcing is an availability fallback (when the self-hosted asset is unreachable), not the primary architecture; if used, every source in the fallback list carries the same SRI hash (not a different one per source) and a single-flight loader prevents two parallel scripts racing on `window.MathJax = ...`. Emit a metric on each fallback so source incidents are visible.
183
+ - **Asset URLs are config inputs, never literals**: the asset list, font URLs, and bucket addresses live in build/runtime config — never in editor library source. Hardcoded project/vendor asset URLs in shared editor library code bake project identity into the bundle, leak bucket addresses to anyone who reads the source, and break the library when used in another deployment.
184
+ - **Domain primitives have a serialization contract that survives copy/paste and storage**: each blot's `value()` exposes only the fields the contract guarantees; transient fields (computed dimensions, render cache, DOM-only flags) are not serialized. Round-trip discipline: serialize → deserialize → serialize MUST equal the original serialization. Test this per blot.
185
+ - **Editor framework choice is portfolio-wide, not per-app**: when multiple apps in a portfolio embed a rich editor (an authoring surface, a review surface, a mobile preview surface), pick one editor framework and one domain-primitive package; pair the per-platform variant via configuration rather than parallel framework-specific blot ports. Two editor frameworks in one portfolio doubles the maintenance and the bug surface.
186
+
187
+ ## Operations Console Surfaces
188
+
189
+ - For admin or operations consoles, treat list, detail, and edit drawer flows as one route contract: list filters and pagination, detail URL params, reload after mutation, and parent context must stay predictable.
190
+ - Tables that inspect runtime resources need explicit columns for identity, runtime/config, health/status, age, ownership, and actions; long identifiers and images need copy affordances plus measured truncation or tooltips.
191
+ - Runtime status tags should encode severity consistently and expose the underlying reason or message for non-healthy states.
192
+ - Form drawers that mutate deploy/runtime config need required-field validation, disabled immutable fields during edit, pending submit state, success-triggered authoritative refresh, and visible failure mapping.
193
+ - Link navigation should use route helpers or base-path ownership rather than hard-coded relative strings when the app can be hosted under a prefix.
194
+ - Generated API clients and generated typings are implementation surfaces: keep them reproducible, but wrap or normalize response envelopes at page boundaries so pages do not scatter `code <= 299` checks.