mindforge-cc 10.0.2 → 10.7.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 (322) hide show
  1. package/.mindforge/config.json +73 -2
  2. package/.mindforge/engine/autonomous/cross-iteration-bridge.md +96 -0
  3. package/.mindforge/engine/cost-tracking/budget-enforcer.md +68 -0
  4. package/.mindforge/engine/cost-tracking/router.md +58 -0
  5. package/.mindforge/engine/cost-tracking/token-ledger.md +77 -0
  6. package/.mindforge/engine/council/council-protocol.md +96 -0
  7. package/.mindforge/engine/council/council-templates.md +85 -0
  8. package/.mindforge/engine/council/synthesis-engine.md +71 -0
  9. package/.mindforge/engine/cross-model-eval.md +74 -0
  10. package/.mindforge/engine/instincts/capture-engine.md +63 -0
  11. package/.mindforge/engine/instincts/instinct-schema.md +76 -0
  12. package/.mindforge/engine/instincts/promotion-engine.md +77 -0
  13. package/.mindforge/engine/proactive/signal-detector.md +60 -0
  14. package/.mindforge/engine/proactive/suggestion-engine.md +100 -0
  15. package/.mindforge/engine/skills/composition.md +83 -0
  16. package/.mindforge/engine/skills/loader.md +16 -0
  17. package/.mindforge/personas/agent-architect.md +57 -0
  18. package/.mindforge/personas/agent-evaluator.md +162 -0
  19. package/.mindforge/personas/agent-memory-designer.md +157 -0
  20. package/.mindforge/personas/agent-ops-engineer.md +120 -0
  21. package/.mindforge/personas/agent-orchestrator.md +112 -0
  22. package/.mindforge/personas/ai-economist.md +57 -0
  23. package/.mindforge/personas/ai-safety-engineer.md +57 -0
  24. package/.mindforge/personas/analytics-engineer.md +57 -0
  25. package/.mindforge/personas/anti-pattern-hunter.md +61 -0
  26. package/.mindforge/personas/api-gateway-designer.md +132 -0
  27. package/.mindforge/personas/auth-engineer.md +112 -0
  28. package/.mindforge/personas/build-engineer.md +57 -0
  29. package/.mindforge/personas/business-analyst.md +56 -0
  30. package/.mindforge/personas/cache-architect.md +100 -0
  31. package/.mindforge/personas/causal-scientist.md +57 -0
  32. package/.mindforge/personas/cdn-architect.md +118 -0
  33. package/.mindforge/personas/change-agent.md +104 -0
  34. package/.mindforge/personas/code-narrator.md +52 -0
  35. package/.mindforge/personas/codegen-specialist.md +68 -0
  36. package/.mindforge/personas/communication-architect.md +102 -0
  37. package/.mindforge/personas/compliance-engineer.md +96 -0
  38. package/.mindforge/personas/consensus-engineer.md +116 -0
  39. package/.mindforge/personas/contract-tester.md +60 -192
  40. package/.mindforge/personas/cost-optimizer.md +71 -0
  41. package/.mindforge/personas/council-architect.md +66 -0
  42. package/.mindforge/personas/council-critic.md +67 -0
  43. package/.mindforge/personas/council-pragmatist.md +71 -0
  44. package/.mindforge/personas/council-skeptic.md +73 -0
  45. package/.mindforge/personas/data-architect.md +108 -0
  46. package/.mindforge/personas/data-mesh-architect.md +57 -0
  47. package/.mindforge/personas/data-pipeline-architect.md +120 -0
  48. package/.mindforge/personas/de-sloppifier.md +60 -0
  49. package/.mindforge/personas/debt-manager.md +66 -0
  50. package/.mindforge/personas/decision-architect.md +82 -51
  51. package/.mindforge/personas/deployment-captain.md +74 -0
  52. package/.mindforge/personas/design-system-lead.md +112 -0
  53. package/.mindforge/personas/dmux-orchestrator.md +75 -0
  54. package/.mindforge/personas/doc-auditor.md +84 -0
  55. package/.mindforge/personas/dx-engineer.md +96 -0
  56. package/.mindforge/personas/ecommerce-engineer.md +57 -0
  57. package/.mindforge/personas/edge-engineer.md +94 -0
  58. package/.mindforge/personas/edtech-architect.md +106 -0
  59. package/.mindforge/personas/embedding-architect.md +57 -0
  60. package/.mindforge/personas/environment-engineer.md +57 -0
  61. package/.mindforge/personas/eval-judge.md +55 -0
  62. package/.mindforge/personas/event-architect.md +102 -0
  63. package/.mindforge/personas/experiment-designer.md +138 -0
  64. package/.mindforge/personas/feature-store-engineer.md +57 -0
  65. package/.mindforge/personas/finops-analyst.md +66 -0
  66. package/.mindforge/personas/fintech-architect.md +57 -0
  67. package/.mindforge/personas/flutter-engineer.md +104 -0
  68. package/.mindforge/personas/gaming-engineer.md +57 -0
  69. package/.mindforge/personas/graphql-designer.md +73 -0
  70. package/.mindforge/personas/healthcare-engineer.md +57 -0
  71. package/.mindforge/personas/hiring-strategist.md +105 -0
  72. package/.mindforge/personas/hitl-architect.md +165 -0
  73. package/.mindforge/personas/i18n-architect.md +69 -0
  74. package/.mindforge/personas/instinct-curator.md +83 -0
  75. package/.mindforge/personas/iot-architect.md +105 -0
  76. package/.mindforge/personas/knowledge-curator.md +139 -0
  77. package/.mindforge/personas/knowledge-engineer.md +57 -0
  78. package/.mindforge/personas/lakehouse-architect.md +57 -0
  79. package/.mindforge/personas/llm-orchestrator.md +57 -0
  80. package/.mindforge/personas/logistics-architect.md +106 -0
  81. package/.mindforge/personas/market-analyst.md +53 -0
  82. package/.mindforge/personas/marketplace-engineer.md +105 -0
  83. package/.mindforge/personas/mcp-designer.md +54 -0
  84. package/.mindforge/personas/meeting-designer.md +104 -0
  85. package/.mindforge/personas/mentorship-lead.md +106 -0
  86. package/.mindforge/personas/migration-architect.md +57 -0
  87. package/.mindforge/personas/ml-ops-engineer.md +101 -0
  88. package/.mindforge/personas/mobile-architect.md +105 -0
  89. package/.mindforge/personas/mobile-security-engineer.md +106 -0
  90. package/.mindforge/personas/multi-model-bridge.md +86 -0
  91. package/.mindforge/personas/multi-tenancy-architect.md +71 -0
  92. package/.mindforge/personas/multimodal-engineer.md +57 -0
  93. package/.mindforge/personas/offline-specialist.md +105 -0
  94. package/.mindforge/personas/onboarding-navigator.md +63 -0
  95. package/.mindforge/personas/payments-engineer.md +135 -0
  96. package/.mindforge/personas/pipeline-engineer.md +115 -0
  97. package/.mindforge/personas/platform-engineer.md +97 -0
  98. package/.mindforge/personas/platform-lead.md +57 -0
  99. package/.mindforge/personas/privacy-engineer.md +57 -0
  100. package/.mindforge/personas/product-owner.md +56 -0
  101. package/.mindforge/personas/productivity-analyst.md +57 -0
  102. package/.mindforge/personas/prompt-architect.md +101 -0
  103. package/.mindforge/personas/proofreader.md +53 -0
  104. package/.mindforge/personas/pwa-architect.md +105 -0
  105. package/.mindforge/personas/quality-scorer.md +63 -0
  106. package/.mindforge/personas/react-native-engineer.md +106 -0
  107. package/.mindforge/personas/resilience-engineer.md +69 -0
  108. package/.mindforge/personas/rfc-architect.md +64 -0
  109. package/.mindforge/personas/saga-orchestrator.md +80 -0
  110. package/.mindforge/personas/secrets-engineer.md +57 -0
  111. package/.mindforge/personas/skill-smith.md +79 -0
  112. package/.mindforge/personas/sre-lead.md +107 -0
  113. package/.mindforge/personas/stream-engineer.md +57 -0
  114. package/.mindforge/personas/streaming-engineer.md +64 -0
  115. package/.mindforge/personas/swarm-templates.json +695 -38
  116. package/.mindforge/personas/system-designer.md +57 -0
  117. package/.mindforge/personas/team-coach.md +120 -0
  118. package/.mindforge/personas/tech-lead-coach.md +103 -0
  119. package/.mindforge/personas/technical-writer-lead.md +111 -0
  120. package/.mindforge/personas/threat-modeler.md +82 -0
  121. package/.mindforge/personas/vibe-checker.md +75 -0
  122. package/.mindforge/personas/worktree-manager.md +56 -0
  123. package/.mindforge/personas/zero-trust-engineer.md +113 -0
  124. package/.mindforge/skills/a11y-testing/SKILL.md +143 -0
  125. package/.mindforge/skills/agent-evaluation-framework/SKILL.md +227 -0
  126. package/.mindforge/skills/agent-introspection-debugging/SKILL.md +88 -0
  127. package/.mindforge/skills/agent-loops/SKILL.md +84 -0
  128. package/.mindforge/skills/agent-memory-design/SKILL.md +199 -0
  129. package/.mindforge/skills/agent-orchestration-patterns/SKILL.md +129 -0
  130. package/.mindforge/skills/agent-tool-selection/SKILL.md +204 -0
  131. package/.mindforge/skills/ai-agent-deployment/SKILL.md +176 -0
  132. package/.mindforge/skills/ai-cost-management/SKILL.md +57 -0
  133. package/.mindforge/skills/ai-safety-alignment/SKILL.md +53 -0
  134. package/.mindforge/skills/analytics-instrumentation/SKILL.md +172 -0
  135. package/.mindforge/skills/api-gateway-patterns/SKILL.md +177 -0
  136. package/.mindforge/skills/api-marketplace/SKILL.md +56 -0
  137. package/.mindforge/skills/api-versioning/SKILL.md +100 -0
  138. package/.mindforge/skills/app-store-deployment/SKILL.md +44 -0
  139. package/.mindforge/skills/architecture-tradeoff-analysis/SKILL.md +97 -0
  140. package/.mindforge/skills/audit-logging/SKILL.md +140 -0
  141. package/.mindforge/skills/auth-patterns/SKILL.md +148 -0
  142. package/.mindforge/skills/autonomous-agent-harness/SKILL.md +218 -0
  143. package/.mindforge/skills/autonomous-agents/SKILL.md +59 -0
  144. package/.mindforge/skills/autonomous-loops/SKILL.md +105 -0
  145. package/.mindforge/skills/build-system-optimization/SKILL.md +54 -0
  146. package/.mindforge/skills/build-vs-buy/SKILL.md +80 -0
  147. package/.mindforge/skills/bundle-optimization/SKILL.md +174 -0
  148. package/.mindforge/skills/business-analyst/SKILL.md +82 -0
  149. package/.mindforge/skills/caching-strategies/SKILL.md +132 -0
  150. package/.mindforge/skills/capacity-planning/SKILL.md +96 -0
  151. package/.mindforge/skills/causal-inference/SKILL.md +42 -0
  152. package/.mindforge/skills/cdn-optimization/SKILL.md +212 -0
  153. package/.mindforge/skills/change-management/SKILL.md +106 -0
  154. package/.mindforge/skills/chaos-engineering/SKILL.md +99 -0
  155. package/.mindforge/skills/ci-cd-pipeline/SKILL.md +118 -0
  156. package/.mindforge/skills/cli-design/SKILL.md +118 -0
  157. package/.mindforge/skills/code-generation-patterns/SKILL.md +92 -0
  158. package/.mindforge/skills/code-review-methodology/SKILL.md +180 -0
  159. package/.mindforge/skills/code-tour/SKILL.md +145 -0
  160. package/.mindforge/skills/codebase-onboarding/SKILL.md +95 -0
  161. package/.mindforge/skills/compliance-as-code/SKILL.md +195 -0
  162. package/.mindforge/skills/conflict-resolution/SKILL.md +87 -0
  163. package/.mindforge/skills/connection-pooling/SKILL.md +151 -0
  164. package/.mindforge/skills/container-security/SKILL.md +151 -0
  165. package/.mindforge/skills/context-engineering/SKILL.md +114 -0
  166. package/.mindforge/skills/continuous-learning/SKILL.md +84 -0
  167. package/.mindforge/skills/contract-testing/SKILL.md +85 -0
  168. package/.mindforge/skills/cost-aware-routing/SKILL.md +83 -0
  169. package/.mindforge/skills/cost-estimation/SKILL.md +82 -0
  170. package/.mindforge/skills/council/SKILL.md +68 -0
  171. package/.mindforge/skills/cqrs-event-sourcing/SKILL.md +95 -0
  172. package/.mindforge/skills/cross-platform-testing/SKILL.md +43 -0
  173. package/.mindforge/skills/data-governance/SKILL.md +42 -0
  174. package/.mindforge/skills/data-lakehouse/SKILL.md +42 -0
  175. package/.mindforge/skills/data-mesh/SKILL.md +42 -0
  176. package/.mindforge/skills/data-modeling/SKILL.md +107 -0
  177. package/.mindforge/skills/data-pipeline-design/SKILL.md +171 -0
  178. package/.mindforge/skills/data-privacy-engineering/SKILL.md +42 -0
  179. package/.mindforge/skills/database-performance/SKILL.md +174 -0
  180. package/.mindforge/skills/database-sharding-advanced/SKILL.md +206 -0
  181. package/.mindforge/skills/de-sloppify/SKILL.md +120 -0
  182. package/.mindforge/skills/defense-in-depth/SKILL.md +84 -0
  183. package/.mindforge/skills/delegation-patterns/SKILL.md +123 -0
  184. package/.mindforge/skills/dependency-management/SKILL.md +94 -0
  185. package/.mindforge/skills/deployment-workflow/SKILL.md +135 -0
  186. package/.mindforge/skills/design-system/SKILL.md +113 -0
  187. package/.mindforge/skills/developer-onboarding/SKILL.md +99 -0
  188. package/.mindforge/skills/developer-productivity-metrics/SKILL.md +59 -0
  189. package/.mindforge/skills/distributed-consensus/SKILL.md +141 -0
  190. package/.mindforge/skills/dmux-workflows/SKILL.md +141 -0
  191. package/.mindforge/skills/dns-architecture/SKILL.md +167 -0
  192. package/.mindforge/skills/doc-health-audit/SKILL.md +102 -0
  193. package/.mindforge/skills/ecommerce-architecture/SKILL.md +41 -0
  194. package/.mindforge/skills/edge-computing/SKILL.md +91 -0
  195. package/.mindforge/skills/edtech-platform/SKILL.md +41 -0
  196. package/.mindforge/skills/email-deliverability/SKILL.md +177 -0
  197. package/.mindforge/skills/embedding-systems/SKILL.md +55 -0
  198. package/.mindforge/skills/environment-management/SKILL.md +54 -0
  199. package/.mindforge/skills/error-handling-architecture/SKILL.md +118 -0
  200. package/.mindforge/skills/estimation-techniques/SKILL.md +113 -0
  201. package/.mindforge/skills/eval-harness/SKILL.md +180 -0
  202. package/.mindforge/skills/event-driven-architecture/SKILL.md +162 -0
  203. package/.mindforge/skills/experiment-design/SKILL.md +139 -0
  204. package/.mindforge/skills/experiment-platform/SKILL.md +43 -0
  205. package/.mindforge/skills/feature-engineering/SKILL.md +42 -0
  206. package/.mindforge/skills/feature-flag-management/SKILL.md +183 -0
  207. package/.mindforge/skills/fine-tuning-workflow/SKILL.md +189 -0
  208. package/.mindforge/skills/fintech-patterns/SKILL.md +41 -0
  209. package/.mindforge/skills/flutter-architecture/SKILL.md +42 -0
  210. package/.mindforge/skills/gaming-backend/SKILL.md +41 -0
  211. package/.mindforge/skills/git-workflow-design/SKILL.md +129 -0
  212. package/.mindforge/skills/graceful-degradation/SKILL.md +95 -0
  213. package/.mindforge/skills/graphql-patterns/SKILL.md +243 -0
  214. package/.mindforge/skills/guardrails-and-safety/SKILL.md +137 -0
  215. package/.mindforge/skills/healthcare-systems/SKILL.md +40 -0
  216. package/.mindforge/skills/hiring-engineering/SKILL.md +119 -0
  217. package/.mindforge/skills/human-in-the-loop-design/SKILL.md +234 -0
  218. package/.mindforge/skills/i18n-architecture/SKILL.md +147 -0
  219. package/.mindforge/skills/idempotency-patterns/SKILL.md +84 -0
  220. package/.mindforge/skills/incident-communication/SKILL.md +96 -0
  221. package/.mindforge/skills/incident-management/SKILL.md +97 -0
  222. package/.mindforge/skills/infrastructure-as-code/SKILL.md +98 -0
  223. package/.mindforge/skills/instinct-clustering/SKILL.md +190 -0
  224. package/.mindforge/skills/internal-developer-platform/SKILL.md +51 -0
  225. package/.mindforge/skills/iot-platform/SKILL.md +41 -0
  226. package/.mindforge/skills/k8s-deployment/SKILL.md +358 -0
  227. package/.mindforge/skills/knowledge-graphs/SKILL.md +56 -0
  228. package/.mindforge/skills/knowledge-sharing-systems/SKILL.md +112 -0
  229. package/.mindforge/skills/llm-cost-optimization/SKILL.md +198 -0
  230. package/.mindforge/skills/llm-orchestration/SKILL.md +56 -0
  231. package/.mindforge/skills/load-testing/SKILL.md +84 -0
  232. package/.mindforge/skills/logistics-optimization/SKILL.md +40 -0
  233. package/.mindforge/skills/market-researcher/SKILL.md +99 -0
  234. package/.mindforge/skills/marketplace-trust/SKILL.md +40 -0
  235. package/.mindforge/skills/mcp-server-patterns/SKILL.md +264 -0
  236. package/.mindforge/skills/media-streaming/SKILL.md +41 -0
  237. package/.mindforge/skills/meeting-architecture/SKILL.md +146 -0
  238. package/.mindforge/skills/mentoring-patterns/SKILL.md +77 -0
  239. package/.mindforge/skills/microservices-patterns/SKILL.md +83 -0
  240. package/.mindforge/skills/migration-platform/SKILL.md +61 -0
  241. package/.mindforge/skills/migration-strategies/SKILL.md +129 -0
  242. package/.mindforge/skills/ml-feature-store/SKILL.md +56 -0
  243. package/.mindforge/skills/ml-monitoring/SKILL.md +42 -0
  244. package/.mindforge/skills/mobile-performance/SKILL.md +44 -0
  245. package/.mindforge/skills/mobile-security/SKILL.md +45 -0
  246. package/.mindforge/skills/model-evaluation/SKILL.md +53 -0
  247. package/.mindforge/skills/monorepo-management/SKILL.md +100 -0
  248. package/.mindforge/skills/multi-llm-consult/SKILL.md +75 -0
  249. package/.mindforge/skills/multi-tenancy-patterns/SKILL.md +145 -0
  250. package/.mindforge/skills/multi-turn-conversation-design/SKILL.md +206 -0
  251. package/.mindforge/skills/multimodal-ai/SKILL.md +51 -0
  252. package/.mindforge/skills/mutation-testing/SKILL.md +97 -0
  253. package/.mindforge/skills/notification-system-design/SKILL.md +168 -0
  254. package/.mindforge/skills/observability-stack/SKILL.md +136 -0
  255. package/.mindforge/skills/offline-first-design/SKILL.md +43 -0
  256. package/.mindforge/skills/on-call-design/SKILL.md +111 -0
  257. package/.mindforge/skills/pagination-patterns/SKILL.md +230 -0
  258. package/.mindforge/skills/payment-integration/SKILL.md +176 -0
  259. package/.mindforge/skills/performance-reviews/SKILL.md +140 -0
  260. package/.mindforge/skills/platform-observability/SKILL.md +58 -0
  261. package/.mindforge/skills/platform-reliability/SKILL.md +52 -0
  262. package/.mindforge/skills/post-incident-learning/SKILL.md +96 -0
  263. package/.mindforge/skills/product-manager/SKILL.md +104 -0
  264. package/.mindforge/skills/progressive-web-app/SKILL.md +44 -0
  265. package/.mindforge/skills/prompt-engineering/SKILL.md +94 -0
  266. package/.mindforge/skills/proofreader/SKILL.md +158 -0
  267. package/.mindforge/skills/push-notification-architecture/SKILL.md +45 -0
  268. package/.mindforge/skills/python-performance/SKILL.md +183 -0
  269. package/.mindforge/skills/quality-audit/SKILL.md +171 -0
  270. package/.mindforge/skills/queue-design/SKILL.md +85 -0
  271. package/.mindforge/skills/rag-architecture/SKILL.md +176 -0
  272. package/.mindforge/skills/rate-limiting-design/SKILL.md +94 -0
  273. package/.mindforge/skills/react-native-patterns/SKILL.md +42 -0
  274. package/.mindforge/skills/react-performance/SKILL.md +229 -0
  275. package/.mindforge/skills/real-time-analytics/SKILL.md +42 -0
  276. package/.mindforge/skills/real-time-sync/SKILL.md +83 -0
  277. package/.mindforge/skills/responsive-native/SKILL.md +44 -0
  278. package/.mindforge/skills/responsive-patterns/SKILL.md +141 -0
  279. package/.mindforge/skills/rfc-pipeline/SKILL.md +114 -0
  280. package/.mindforge/skills/saas-multi-tenant/SKILL.md +41 -0
  281. package/.mindforge/skills/santa-method/SKILL.md +134 -0
  282. package/.mindforge/skills/search-implementation/SKILL.md +98 -0
  283. package/.mindforge/skills/secrets-platform/SKILL.md +56 -0
  284. package/.mindforge/skills/secrets-rotation/SKILL.md +173 -0
  285. package/.mindforge/skills/self-serve-infrastructure/SKILL.md +51 -0
  286. package/.mindforge/skills/serverless-patterns/SKILL.md +119 -0
  287. package/.mindforge/skills/skill-creator-meta/SKILL.md +146 -0
  288. package/.mindforge/skills/sprint-retrospective-facilitation/SKILL.md +112 -0
  289. package/.mindforge/skills/stakeholder-communication/SKILL.md +85 -0
  290. package/.mindforge/skills/state-management/SKILL.md +104 -0
  291. package/.mindforge/skills/stream-processing/SKILL.md +43 -0
  292. package/.mindforge/skills/streaming-architecture/SKILL.md +81 -0
  293. package/.mindforge/skills/supply-chain-security/SKILL.md +145 -0
  294. package/.mindforge/skills/synthetic-data-generation/SKILL.md +52 -0
  295. package/.mindforge/skills/system-design/SKILL.md +88 -0
  296. package/.mindforge/skills/team-topology-design/SKILL.md +107 -0
  297. package/.mindforge/skills/technical-debt-management/SKILL.md +86 -0
  298. package/.mindforge/skills/technical-interview-design/SKILL.md +98 -0
  299. package/.mindforge/skills/technical-leadership/SKILL.md +75 -0
  300. package/.mindforge/skills/technical-writing/SKILL.md +237 -0
  301. package/.mindforge/skills/technology-radar/SKILL.md +88 -0
  302. package/.mindforge/skills/testing-anti-patterns/SKILL.md +288 -0
  303. package/.mindforge/skills/threat-modeling/SKILL.md +109 -0
  304. package/.mindforge/skills/tool-design/SKILL.md +138 -0
  305. package/.mindforge/skills/typescript-advanced/SKILL.md +198 -0
  306. package/.mindforge/skills/using-git-worktrees/SKILL.md +139 -0
  307. package/.mindforge/skills/verification-loop/SKILL.md +97 -0
  308. package/.mindforge/skills/vibe-security/SKILL.md +165 -0
  309. package/.mindforge/skills/visual-regression-testing/SKILL.md +97 -0
  310. package/.mindforge/skills/websocket-patterns/SKILL.md +203 -0
  311. package/.mindforge/skills/writing-plans/SKILL.md +170 -0
  312. package/.mindforge/skills/writing-skills/SKILL.md +216 -0
  313. package/.mindforge/skills/zero-trust-architecture/SKILL.md +166 -0
  314. package/CHANGELOG.md +195 -0
  315. package/MINDFORGE.md +4 -4
  316. package/README.md +2 -2
  317. package/RELEASENOTES.md +66 -0
  318. package/bin/installer-core.js +1 -1
  319. package/bin/wizard/theme.js +2 -2
  320. package/docs/commands-reference.md +18 -1
  321. package/package.json +2 -2
  322. package/.mindforge/personas/data-privacy-engineer.md +0 -187
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: technical-leadership
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.3.0
5
+ status: stable
6
+ triggers: technical leadership, engineering management decision, team velocity improvement, technical vision setting, architecture governance, tech lead responsibilities, engineering culture, technical strategy, staff engineer guidance, principal engineer, tech leadership transition, engineering org design
7
+ ---
8
+
9
+ # Technical Leadership
10
+
11
+ ## When this skill activates
12
+
13
+ This skill activates when making engineering management decisions, setting technical vision for a team or organization, governing architectural standards, improving team velocity, or transitioning into technical leadership roles. It applies to tech leads, staff engineers, principal engineers, and engineering managers responsible for technical direction and team performance.
14
+
15
+ ## Mandatory actions when this skill is active
16
+
17
+ ### Before making any leadership decision
18
+
19
+ 1. **Establish decision context** — Identify stakeholders, time horizon (tactical vs strategic), reversibility (one-way door vs two-way door), and blast radius. High-stakes irreversible decisions require more scrutiny than low-stakes experiments.
20
+ 2. **Gather signal, not noise** — Talk to engineers who have touched the code recently, not those with opinions but no context. Review metrics (deploy frequency, MTTR, cycle time) before making velocity assessments.
21
+ 3. **Write down your reasoning** — Document the problem, alternatives considered, tradeoffs, and decision rationale. Leadership decisions without artifacts create organizational amnesia.
22
+ 4. **Identify your biases** — Are you anchoring on past experience? Optimizing for your personal preferences? Overweighting recency? Name the bias before it distorts the decision.
23
+
24
+ ### During technical leadership activities
25
+
26
+ #### Vision & Strategy
27
+
28
+ - **Set technical vision in layers** — Near-term (3-6 months): concrete projects with clear outcomes. Mid-term (6-18 months): architectural bets and platform investments. Long-term (18-36 months): directional hypotheses, not detailed plans.
29
+ - **Make the implicit explicit** — Document coding standards, architecture principles, trade-off frameworks. Teams align on shared mental models, not vague aspirations.
30
+ - **Balance innovation and stability** — 70% of engineering time on core features and maintenance. 20% on incremental improvements and modernization. 10% on exploratory bets. Adjust ratios based on business stage.
31
+ - **Connect technical work to business outcomes** — Engineers need to understand how their work impacts revenue, retention, or cost. Translate technical milestones into user or business value.
32
+
33
+ #### Architectural Governance
34
+
35
+ - **Define guardrails, not mandates** — Specify constraints (must use relational DB for transactional data, must have rollback plan for migrations) but let teams choose implementations. Mandates kill autonomy and innovation.
36
+ - **Create Architecture Decision Record (ADR) culture** — Every significant architectural choice gets a lightweight ADR: context, decision, consequences, alternatives rejected. No ADR, no merge.
37
+ - **Run design reviews, not rubber stamps** — Effective design reviews probe assumptions, identify edge cases, and challenge the status quo. Ineffective reviews just approve what's already built.
38
+ - **Enforce technical debt budgets** — Cap tech debt at 20% of sprint capacity. If debt exceeds cap, pause feature work and pay it down. Uncapped debt compounds until the system becomes unmaintainable.
39
+
40
+ #### Team Velocity
41
+
42
+ - **Measure flow, not output** — Deploy frequency, lead time for changes, change failure rate, and mean time to restore (DORA metrics) predict team effectiveness better than story points or velocity charts.
43
+ - **Eliminate toil systematically** — Track where engineers spend time. Automate the top 3 toil sources each quarter. Manual deploy scripts, flaky tests, and brittle CI pipelines are velocity killers.
44
+ - **Protect maker time** — Engineers need 4-hour uninterrupted blocks for deep work. Meetings before 10am or after 3pm. No meetings on focus days (e.g., Tuesdays and Thursdays).
45
+ - **Run blame-free incident reviews** — Focus on system improvements, not individual mistakes. If an engineer caused an outage, the real failure is the system that allowed a single mistake to cascade.
46
+
47
+ #### Engineering Culture
48
+
49
+ - **Model the behavior you want** — If you want engineers to write tests, write tests yourself. If you want transparency, share your own mistakes publicly. Culture is what leaders do, not what they say.
50
+ - **Give feedback early and often** — Waiting for performance reviews is too late. Real-time feedback after code reviews, design reviews, and incident responses creates faster learning loops.
51
+ - **Celebrate learning, not just shipping** — Recognize engineers who identified a critical edge case, refactored a brittle module, or wrote excellent documentation. Shipping features is necessary but not sufficient.
52
+ - **Defend technical values against business pressure** — When product pushes for shortcuts that compromise quality, your job is to articulate the long-term cost and negotiate scope cuts, not quality cuts.
53
+
54
+ #### Delegation & Escalation
55
+
56
+ - **Use the delegation ladder** — Level 1: You decide, inform them. Level 2: You decide after consulting them. Level 3: They decide after consulting you. Level 4: They decide, inform you. Level 5: They decide, no need to inform you. Move up the ladder as trust and competence grow.
57
+ - **Escalate with recommendations, not problems** — When escalating to your manager or execs, always include: problem summary, impact, options with pros/cons, your recommended path, and what you need from them.
58
+ - **Own outcomes, delegate tasks** — You remain accountable for the team's results even when you delegate execution. Check-in without micromanaging.
59
+
60
+ ### After leadership actions
61
+
62
+ - **Verify alignment** — After setting vision or making decisions, verify that the team understood correctly. Ask engineers to summarize in their own words. Misalignment is the default.
63
+ - **Measure impact** — Leadership actions should move metrics. If velocity decisions don't improve DORA metrics within 1-2 quarters, the intervention failed. Adjust or abandon.
64
+ - **Document decisions publicly** — Share architectural decisions, process changes, and strategic shifts in team channels or wikis. Private decisions create information silos and distrust.
65
+ - **Create feedback loops** — Schedule retrospectives after major milestones. What worked? What didn't? What will we do differently next time? Learning compounds with reflection.
66
+
67
+ ## Self-check before task completion
68
+
69
+ - [ ] Technical vision is articulated in concrete near-term projects, not vague aspirations
70
+ - [ ] Architectural guardrails are documented with clear rationale and exceptions process
71
+ - [ ] Team velocity is measured with DORA metrics, not story points or velocity charts
72
+ - [ ] Engineering culture values (testing, documentation, code review rigor) are modeled by leadership
73
+ - [ ] Delegation is explicit: who owns what, at what decision level, with what reporting cadence
74
+ - [ ] Decisions are documented with context, alternatives, and tradeoffs
75
+ - [ ] Feedback loops exist to measure impact and adjust course
@@ -0,0 +1,237 @@
1
+ ---
2
+ name: technical-writing
3
+ version: 1.0.0
4
+ min_mindforge_version: 0.1.0
5
+ status: stable
6
+ triggers: technical writing methodology, ADR authoring guide, RFC structure template, design document framework, runbook authoring standard, api documentation methodology, technical document structure, documentation methodology, document template design, tech spec writing guide, architecture document format, writing quality framework
7
+ ---
8
+
9
+ # Skill — Technical Writing
10
+
11
+ ## When this skill activates
12
+ Any task involving authoring ADRs, RFCs, design documents, runbooks, API documentation,
13
+ or establishing documentation standards and templates.
14
+
15
+ ## Mandatory actions when this skill is active
16
+
17
+ ### Before writing
18
+ 1. Identify the document type (ADR, RFC, design doc, runbook, API doc).
19
+ 2. Identify the audience (developers, ops, product, executives).
20
+ 3. Determine what decision or action the reader needs to take after reading.
21
+
22
+ ### During writing
23
+ - Front-load the conclusion (busy readers skim — give them the answer first).
24
+ - One idea per section, one point per paragraph.
25
+ - Use examples — never say "consider using X" without showing the code/config.
26
+ - Write for the reader who has zero context about this system.
27
+ - Use active voice and concrete nouns.
28
+
29
+ ### After writing
30
+ - Read the document as if you have never seen this codebase.
31
+ - Verify every claim is backed by a code reference or data point.
32
+ - Check that a reader can take action based solely on this document.
33
+
34
+ ## Document types and templates
35
+
36
+ ### ADR (Architecture Decision Record)
37
+ ```markdown
38
+ # ADR-NNN: [Short Descriptive Title]
39
+
40
+ - **Status**: Proposed | Accepted | Deprecated | Superseded by ADR-XXX
41
+ - **Date**: YYYY-MM-DD
42
+ - **Deciders**: [Names]
43
+
44
+ ## Context
45
+ [What forces are at play? What problem triggered this decision?]
46
+
47
+ ## Decision
48
+ [What did we decide? State it clearly in one sentence, then elaborate.]
49
+
50
+ ## Options Considered
51
+ ### Option A: [Name]
52
+ - Pros: ...
53
+ - Cons: ...
54
+
55
+ ### Option B: [Name]
56
+ - Pros: ...
57
+ - Cons: ...
58
+
59
+ ## Consequences
60
+ - [What becomes easier?]
61
+ - [What becomes harder?]
62
+ - [What new risks are introduced?]
63
+ ```
64
+ Rules: One page max. Immutable once accepted (create new ADR to supersede). Record the "why" so future engineers don't revert to failed paths.
65
+
66
+ ### RFC (Request for Comments)
67
+ ```markdown
68
+ # RFC: [Title]
69
+
70
+ - **Author**: [Name]
71
+ - **Status**: Draft | Under Review | Accepted | Rejected
72
+ - **Date**: YYYY-MM-DD
73
+ - **Reviewers**: [Names]
74
+
75
+ ## Summary
76
+ [2-3 sentences: what is this and why does it matter?]
77
+
78
+ ## Motivation
79
+ [Why are we doing this? What problem does it solve? Include data if possible.]
80
+
81
+ ## Detailed Design
82
+ [The meat — how does it work? Include diagrams, code samples, data models.]
83
+
84
+ ## Drawbacks
85
+ [Why might we NOT do this? Be honest.]
86
+
87
+ ## Alternatives Considered
88
+ [What else did we evaluate? Why were they rejected?]
89
+
90
+ ## Open Questions
91
+ [What don't we know yet? What needs more investigation?]
92
+
93
+ ## Rollout Plan
94
+ [How do we ship this incrementally? What's the rollback strategy?]
95
+ ```
96
+ Rules: Seek feedback before implementation. Time-box review (1-2 weeks). Address all open questions before accepting.
97
+
98
+ ### Design Document
99
+ ```markdown
100
+ # Design: [Feature/System Name]
101
+
102
+ - **Author**: [Name]
103
+ - **Date**: YYYY-MM-DD
104
+ - **Status**: Draft | Approved | Implemented
105
+
106
+ ## Problem Statement
107
+ [What problem are we solving? For whom? What's the impact of not solving it?]
108
+
109
+ ## Background
110
+ [What context does the reader need? Prior art, related systems, constraints.]
111
+
112
+ ## Goals and Non-Goals
113
+ ### Goals
114
+ - [Measurable outcome 1]
115
+ - [Measurable outcome 2]
116
+
117
+ ### Non-Goals
118
+ - [Explicitly out of scope item 1]
119
+
120
+ ## Design
121
+ [Architecture, data model, API contracts, sequence diagrams]
122
+
123
+ ## Alternatives Considered
124
+ [What else was evaluated? Why was it rejected?]
125
+
126
+ ## Security / Privacy Considerations
127
+ [Data handling, auth, PII, encryption]
128
+
129
+ ## Timeline
130
+ [Milestones with dates]
131
+ ```
132
+
133
+ ### Runbook
134
+ ```markdown
135
+ # Runbook: [Incident/Procedure Name]
136
+
137
+ - **Last Updated**: YYYY-MM-DD
138
+ - **Owner**: [Team/Person]
139
+ - **Severity**: P1 | P2 | P3
140
+
141
+ ## Trigger
142
+ [When should someone use this runbook? What alert fires?]
143
+
144
+ ## Diagnosis
145
+ 1. [Step 1 — check this metric/log]
146
+ 2. [Step 2 — verify this service status]
147
+ 3. [Step 3 — confirm scope of impact]
148
+
149
+ ## Mitigation
150
+ 1. [Step 1 — immediate action to stop bleeding]
151
+ 2. [Step 2 — apply fix]
152
+ 3. [Step 3 — verify fix applied]
153
+
154
+ ## Escalation
155
+ - If Step 2 fails: page [Team/Person]
156
+ - If impact > [threshold]: declare incident via [process]
157
+
158
+ ## Verification
159
+ - [ ] [How to confirm the issue is resolved]
160
+ - [ ] [Metric returns to baseline]
161
+
162
+ ## Post-Incident
163
+ - [ ] Update this runbook if steps were wrong
164
+ - [ ] File ticket for permanent fix
165
+ ```
166
+
167
+ ### API Documentation
168
+ ```markdown
169
+ ## POST /api/v1/todos
170
+
171
+ Create a new todo item.
172
+
173
+ ### Request
174
+ | Field | Type | Required | Description |
175
+ |-------|------|----------|-------------|
176
+ | title | string | yes | Todo title (1-200 chars) |
177
+ | priority | enum | no | low, medium, high (default: medium) |
178
+
179
+ ### Response (201 Created)
180
+ ```json
181
+ {
182
+ "id": "abc123",
183
+ "title": "Buy groceries",
184
+ "priority": "medium",
185
+ "created_at": "2025-01-15T10:30:00Z"
186
+ }
187
+ ```
188
+
189
+ ### Errors
190
+ | Status | Code | Description |
191
+ |--------|------|-------------|
192
+ | 400 | VALIDATION_ERROR | Title is required or exceeds 200 chars |
193
+ | 401 | UNAUTHORIZED | Missing or invalid auth token |
194
+ | 429 | RATE_LIMITED | Exceeded 100 requests/minute |
195
+ ```
196
+
197
+ ## Writing principles
198
+
199
+ ### Front-Load the Important Bits
200
+ - Lead with the conclusion/recommendation, then explain.
201
+ - The first sentence of every section should tell the reader whether to keep reading.
202
+ - If someone reads only the headings, they should get 80% of the message.
203
+
204
+ ### Write for Zero Context
205
+ - Define acronyms on first use.
206
+ - Link to related documents rather than assuming knowledge.
207
+ - Include "Background" sections for non-obvious domain knowledge.
208
+
209
+ ### Examples Over Abstractions
210
+ - Bad: "Use parameterized queries to prevent injection."
211
+ - Good: "Use parameterized queries: `db.query('SELECT * FROM users WHERE id = $1', [userId])`"
212
+
213
+ ### Active Voice
214
+ - Bad: "The configuration file should be updated."
215
+ - Good: "Update the configuration file."
216
+
217
+ ### Concrete Nouns
218
+ - Bad: "The system processes the data appropriately."
219
+ - Good: "The ingestion service validates JSON payloads against the schema."
220
+
221
+ ## Anti-patterns to avoid
222
+ - Writing documentation after the fact (write during implementation).
223
+ - Documents with no audience or action defined.
224
+ - "See code for details" (the reader came to the doc to NOT read all the code).
225
+ - Undated documents with no owner (will rot immediately).
226
+ - ADRs that only list the chosen option (record alternatives and their trade-offs).
227
+
228
+ ## Self-check before task completion
229
+
230
+ Before marking a task done when this skill was active:
231
+
232
+ - [ ] Document type correctly identified and template applied?
233
+ - [ ] Audience defined — who reads this and what action do they take?
234
+ - [ ] Conclusion/recommendation front-loaded?
235
+ - [ ] Every claim backed by example, code reference, or data?
236
+ - [ ] A reader with zero context can understand and act on this?
237
+ - [ ] Document has owner and date?
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: technology-radar
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.1.0
5
+ status: stable
6
+ triggers: technology radar, tech adoption, trial technology, hold technology, retire technology, tech evaluation, ecosystem maturity, technology lifecycle, adopt or retire, tech assessment, emerging technology, technology governance
7
+ ---
8
+
9
+ # Technology Radar
10
+
11
+ ## When this skill activates
12
+
13
+ This skill activates when the team needs to evaluate, adopt, trial, or retire a
14
+ technology. It provides a structured governance framework for technology decisions
15
+ using the four-ring radar model, ensuring technologies are assessed objectively
16
+ and lifecycle-managed with clear migration paths.
17
+
18
+ ## Mandatory actions when this skill is active
19
+
20
+ ### Before
21
+
22
+ 1. **Identify the technology under evaluation** — Name, category (language, framework,
23
+ tool, platform, technique), and the problem it claims to solve.
24
+ 2. **Determine current ring placement** — Where does this technology sit today in the
25
+ organization's radar? (Adopt / Trial / Assess / Hold / Not yet tracked)
26
+ 3. **Gather context** — Who is requesting the evaluation? What project would use it?
27
+ What does it replace or complement?
28
+
29
+ ### During
30
+
31
+ 4. **Apply the Four Rings model:**
32
+ - **Adopt** — Proven in production, recommended as default choice. Teams should use
33
+ this unless there is a compelling reason not to.
34
+ - **Trial** — Worth pursuing on a specific project with clear boundaries. Team has
35
+ committed to evaluate with production-quality implementation.
36
+ - **Assess** — Worth exploring to understand potential. Research spikes, prototypes,
37
+ and conference talks. No production use yet.
38
+ - **Hold** — Proceed with caution. Do not start new projects with this technology.
39
+ Existing usage should plan migration path.
40
+
41
+ 5. **Evaluate against criteria:**
42
+ - **Community size** — Contributors, GitHub stars trend, Stack Overflow activity,
43
+ corporate backing stability.
44
+ - **Maintenance activity** — Release frequency, issue response time, bus factor of
45
+ maintainers, funding model sustainability.
46
+ - **Breaking change frequency** — Semver discipline, migration tooling quality,
47
+ deprecation communication practices.
48
+ - **Performance benchmarks** — Relevant benchmarks compared to current stack and
49
+ alternatives. Avoid synthetic-only benchmarks.
50
+ - **Hiring pool** — Can you hire people who know this? Is the talent market growing
51
+ or shrinking? Training cost for existing team.
52
+ - **Ecosystem maturity** — Library availability, tooling quality, IDE support,
53
+ documentation completeness, testing story.
54
+
55
+ 6. **Governance rules:**
56
+ - Quarterly radar review — Reassess all Trial and Assess items every quarter.
57
+ - Trial time-box — Maximum 3 months. At end: promote to Adopt, extend with
58
+ justification, or move to Hold.
59
+ - Clear migration paths — Every Hold decision must include a recommended alternative
60
+ and migration timeline estimate.
61
+ - Retire explicitly — Technologies leaving Adopt must have deprecation plan with
62
+ timeline and responsible team.
63
+
64
+ 7. **Risk assessment:**
65
+ - What happens if this technology is abandoned by maintainers?
66
+ - What is the switching cost if we adopt and later need to leave?
67
+ - Does this create a single-vendor dependency?
68
+ - Are there regulatory/compliance implications?
69
+
70
+ ### After
71
+
72
+ 8. **Update the radar** — Record the ring placement decision with date, rationale, and
73
+ evaluation evidence.
74
+ 9. **Communicate the decision** — Share with engineering org via radar changelog.
75
+ Include: what changed, why, and what teams should do differently.
76
+ 10. **Set review date** — Schedule next evaluation based on ring (Adopt: annually,
77
+ Trial: 3 months, Assess: 6 months, Hold: review migration progress quarterly).
78
+
79
+ ## Self-check before task completion
80
+
81
+ - [ ] Technology placed in exactly one ring with clear justification
82
+ - [ ] All six evaluation criteria scored or explicitly marked not-applicable
83
+ - [ ] Risk assessment completed including abandonment and switching cost
84
+ - [ ] Migration path defined if placing in Hold ring
85
+ - [ ] Time-box set if placing in Trial ring
86
+ - [ ] Radar changelog entry written
87
+ - [ ] Next review date scheduled
88
+ - [ ] Decision communicated to affected teams
@@ -0,0 +1,288 @@
1
+ ---
2
+ name: testing-anti-patterns
3
+ version: 1.0.0
4
+ min_mindforge_version: 10.0.4
5
+ status: stable
6
+ triggers: testing anti-pattern, mock behavior, test-only method, test smell, over-mocking, incomplete mock, integration afterthought, test fragility, testing iron law, test coupling, bad test practice
7
+ compose:
8
+ - testing-standards
9
+ ---
10
+
11
+ # Skill — Testing Anti-Patterns (Detection & Remediation)
12
+
13
+ ## When this skill activates
14
+ When writing, reviewing, or debugging tests. This skill acts as a negative-space
15
+ guide — it defines what NOT to do, complementing the testing-standards skill which
16
+ defines what TO do. Activate whenever test suites feel brittle, when mocks dominate
17
+ test code, or when tests pass but production breaks.
18
+
19
+ ## Mandatory actions when this skill is active
20
+
21
+ ### Before writing or reviewing tests
22
+
23
+ 1. **Internalize the Three Iron Laws:**
24
+ - **Iron Law 1**: Test behavior, not implementation. If you refactor internals and tests break without behavior changing, the tests are wrong.
25
+ - **Iron Law 2**: Mocks verify contracts, not internals. A mock should assert "I called the dependency with these inputs and expected this shape of output" — never "I called internal method X before internal method Y."
26
+ - **Iron Law 3**: Integration tests validate the seams. Unit tests prove components work in isolation. Integration tests prove they work together. Both are required — neither substitutes for the other.
27
+
28
+ 2. **Load the Red Flags Checklist** (scan code for these signals):
29
+ - [ ] Test file is longer than the source file it tests
30
+ - [ ] More than 5 mocks in a single test setup
31
+ - [ ] Test names describe implementation steps, not behaviors
32
+ - [ ] Changing a private method breaks tests
33
+ - [ ] Tests pass with an obviously wrong implementation (tests test nothing)
34
+ - [ ] Mock setup is copy-pasted across 10+ tests identically
35
+ - [ ] No integration tests exist for code with 2+ external dependencies
36
+ - [ ] Tests assert on internal state rather than observable output
37
+ - [ ] Test requires `sleep()` or arbitrary timeouts to pass
38
+ - [ ] Removing a test causes no coverage decrease (dead test)
39
+
40
+ ### During test writing/review
41
+
42
+ **The Five Named Anti-Patterns:**
43
+
44
+ ---
45
+
46
+ **Anti-Pattern 1: Mock Behavior Testing**
47
+
48
+ *What it looks like:*
49
+ ```typescript
50
+ // BAD: Testing that the mock returns what you told it to return
51
+ mockDb.query.mockResolvedValue([{ id: 1, name: 'Alice' }]);
52
+ const result = await getUser(1);
53
+ expect(result).toEqual({ id: 1, name: 'Alice' }); // You're testing the mock!
54
+ ```
55
+
56
+ *Detection gate:*
57
+ ```
58
+ IF test assertion matches mock return value exactly
59
+ AND no transformation logic exists between mock and assertion
60
+ THEN this is Mock Behavior Testing
61
+ ```
62
+
63
+ *Why it's harmful:* You're verifying your test setup, not your code. The test will pass even if `getUser` is `return mockDb.query()` with zero logic.
64
+
65
+ *Fix:*
66
+ ```typescript
67
+ // GOOD: Test the transformation/logic your code adds
68
+ mockDb.query.mockResolvedValue([{ id: 1, name: 'alice', role_id: 3 }]);
69
+ const result = await getUser(1);
70
+ // Assert on the TRANSFORMATION your code performs
71
+ expect(result.displayName).toBe('Alice'); // capitalization logic
72
+ expect(result.permissions).toContain('read'); // role mapping logic
73
+ ```
74
+
75
+ *Decision tree:*
76
+ 1. Does my code transform the mock's return value? → If NO, this test adds zero value
77
+ 2. Am I testing the transformation or the passthrough? → Must be transformation
78
+ 3. Would this test catch a real bug? → If you can't name the bug, delete the test
79
+
80
+ ---
81
+
82
+ **Anti-Pattern 2: Test-Only Methods**
83
+
84
+ *What it looks like:*
85
+ ```typescript
86
+ class PaymentService {
87
+ // This method exists ONLY so tests can inspect internal state
88
+ _getInternalQueue() { return this.queue; }
89
+
90
+ // This method exists ONLY so tests can bypass validation
91
+ _processWithoutValidation(payment) { ... }
92
+ }
93
+ ```
94
+
95
+ *Detection gate:*
96
+ ```
97
+ IF method is prefixed with _ or marked @visibleForTesting
98
+ AND method is called ONLY in test files (zero production callers)
99
+ AND method exposes internal state or bypasses guards
100
+ THEN this is a Test-Only Method
101
+ ```
102
+
103
+ *Why it's harmful:* It couples tests to internals, creates maintenance burden, and the bypassed logic is now untested in the path that matters.
104
+
105
+ *Fix:*
106
+ - Test through the public API only
107
+ - If you can't test behavior through the public API, your design needs refactoring (extract a collaborator, use dependency injection)
108
+ - If state inspection is needed: add an observable side-effect (event emitted, log written, metric incremented)
109
+
110
+ *Decision tree:*
111
+ 1. Is this method called anywhere in production code? → If NO, delete it
112
+ 2. Can I verify the same behavior through a public method? → If YES, use that instead
113
+ 3. Do I need to see internal state? → Refactor: make the state observable through legitimate outputs
114
+
115
+ ---
116
+
117
+ **Anti-Pattern 3: Mocking Without Understanding**
118
+
119
+ *What it looks like:*
120
+ ```typescript
121
+ // BAD: Blindly mocking everything without understanding contracts
122
+ jest.mock('./emailService');
123
+ jest.mock('./database');
124
+ jest.mock('./cache');
125
+ jest.mock('./logger');
126
+ jest.mock('./metrics');
127
+ // Test only proves: "my code calls things" — not that it calls them CORRECTLY
128
+ ```
129
+
130
+ *Detection gate:*
131
+ ```
132
+ IF mock count > 3 in a single test
133
+ AND mock return values are generic/default (undefined, {}, [])
134
+ AND no assertions verify mock call arguments
135
+ THEN this is Mocking Without Understanding
136
+ ```
137
+
138
+ *Why it's harmful:* The mocks don't reflect real behavior. When the real dependency changes its contract, these tests keep passing while production breaks.
139
+
140
+ *Fix:*
141
+ ```typescript
142
+ // GOOD: Mock with contract awareness
143
+ const mockEmail = {
144
+ send: jest.fn().mockImplementation((to, subject, body) => {
145
+ // Validate contract: email service requires these fields
146
+ if (!to.includes('@')) throw new Error('Invalid email');
147
+ if (!subject) throw new Error('Subject required');
148
+ return Promise.resolve({ messageId: 'msg-123', status: 'queued' });
149
+ })
150
+ };
151
+ // Assert on the CONTRACT, not just "was called"
152
+ expect(mockEmail.send).toHaveBeenCalledWith(
153
+ expect.stringContaining('@'),
154
+ expect.stringMatching(/Order #\d+/),
155
+ expect.objectContaining({ html: expect.any(String) })
156
+ );
157
+ ```
158
+
159
+ *Decision tree:*
160
+ 1. Do I know what the real dependency's contract is? → If NO, read its docs/types first
161
+ 2. Does my mock enforce the same constraints as the real dep? → If NO, fix the mock
162
+ 3. Am I asserting on call arguments? → If NO, add contract assertions
163
+
164
+ ---
165
+
166
+ **Anti-Pattern 4: Incomplete Mocks (Happy Path Only)**
167
+
168
+ *What it looks like:*
169
+ ```typescript
170
+ // BAD: Only mocking the success case
171
+ mockPaymentGateway.charge.mockResolvedValue({ success: true });
172
+ // Never testing: what if it throws? Returns { success: false }? Times out? Returns malformed data?
173
+ ```
174
+
175
+ *Detection gate:*
176
+ ```
177
+ IF mock only has .mockResolvedValue / .mockReturnValue (never .mockRejectedValue)
178
+ AND the real dependency can fail (network, validation, timeout)
179
+ AND no test exercises the failure path
180
+ THEN this is Incomplete Mocking
181
+ ```
182
+
183
+ *Why it's harmful:* Production failures in dependency error paths are the #1 source of incidents. If you only test happy path, you're only testing the path that rarely breaks.
184
+
185
+ *Fix:*
186
+ ```typescript
187
+ // GOOD: Test all response categories
188
+ describe('PaymentService.charge', () => {
189
+ it('should process successful payment', async () => {
190
+ mockGateway.charge.mockResolvedValue({ success: true, txId: '123' });
191
+ // ...assert success handling
192
+ });
193
+
194
+ it('should handle declined card gracefully', async () => {
195
+ mockGateway.charge.mockResolvedValue({ success: false, code: 'DECLINED' });
196
+ // ...assert decline handling (user message, no retry)
197
+ });
198
+
199
+ it('should retry on transient network error', async () => {
200
+ mockGateway.charge
201
+ .mockRejectedValueOnce(new Error('ETIMEDOUT'))
202
+ .mockResolvedValue({ success: true, txId: '456' });
203
+ // ...assert retry logic
204
+ });
205
+
206
+ it('should circuit-break after 3 consecutive failures', async () => {
207
+ mockGateway.charge.mockRejectedValue(new Error('SERVICE_UNAVAILABLE'));
208
+ // ...assert circuit breaker trips
209
+ });
210
+ });
211
+ ```
212
+
213
+ *Decision tree:*
214
+ 1. Can this dependency fail? → YES (all external deps can fail)
215
+ 2. How many failure modes does it have? → List them: timeout, rejection, malformed, partial
216
+ 3. Do I have a test for each failure mode? → If NO, add them
217
+
218
+ ---
219
+
220
+ **Anti-Pattern 5: Integration-as-Afterthought**
221
+
222
+ *What it looks like:*
223
+ - 200 unit tests, 0 integration tests
224
+ - All dependencies mocked in every test
225
+ - Tests pass, but the system fails when components connect
226
+ - "Works on my machine" because mocks hide contract mismatches
227
+
228
+ *Detection gate:*
229
+ ```
230
+ IF test suite has > 50 unit tests
231
+ AND zero integration tests exist
232
+ AND code has 2+ external dependencies (DB, API, queue, cache)
233
+ THEN this is Integration-as-Afterthought
234
+ ```
235
+
236
+ *Why it's harmful:* Unit tests prove each brick is solid. Integration tests prove the mortar holds. Without integration tests, you have a pile of solid bricks, not a wall.
237
+
238
+ *Fix:*
239
+ - For every external dependency boundary, write at least one integration test that uses the real (or containerized) dependency
240
+ - Integration tests should cover: connection setup, happy path through the seam, error propagation across the seam
241
+ - Use test containers (Docker) for databases, queues, caches
242
+ - Use contract tests (Pact) for HTTP API dependencies
243
+ - Minimum ratio: 1 integration test per 10 unit tests for code with external deps
244
+
245
+ *Decision tree:*
246
+ 1. Does this module talk to something external? → If YES, integration tests required
247
+ 2. Do I have at least one test that uses the real dependency? → If NO, add one
248
+ 3. Have I tested error propagation across the boundary? → If NO, add failure path integration tests
249
+
250
+ ---
251
+
252
+ ### After test review
253
+
254
+ **Gate Function Summary — Run these checks on every test file:**
255
+
256
+ ```
257
+ GATE 1 (Iron Law 1): For each test, ask:
258
+ "If I refactored internals without changing behavior, would this test break?"
259
+ → If YES: test is coupled to implementation. Rewrite to test behavior.
260
+
261
+ GATE 2 (Iron Law 2): For each mock assertion, ask:
262
+ "Does this verify the CONTRACT with the dependency or INTERNAL sequencing?"
263
+ → If INTERNAL: rewrite to verify inputs/outputs at the boundary.
264
+
265
+ GATE 3 (Iron Law 3): For the module as a whole, ask:
266
+ "If all mocks were replaced with real deps, would the system work?"
267
+ → If UNSURE: you need integration tests to find out.
268
+ ```
269
+
270
+ **Remediation priority:**
271
+ 1. Fix Anti-Pattern 4 first (incomplete mocks) — highest incident correlation
272
+ 2. Fix Anti-Pattern 5 next (missing integration tests) — catches contract drift
273
+ 3. Fix Anti-Pattern 1 (mock behavior testing) — eliminate false confidence
274
+ 4. Fix Anti-Pattern 3 (mocking without understanding) — improve mock fidelity
275
+ 5. Fix Anti-Pattern 2 (test-only methods) — clean up API surface
276
+
277
+ ## Self-check before task completion
278
+
279
+ Before marking a task done when this skill was active:
280
+
281
+ - [ ] Did I verify tests test behavior, not implementation? (Iron Law 1)
282
+ - [ ] Did I check that mock contracts match real dependency contracts? (Iron Law 2)
283
+ - [ ] Did I verify integration test coverage exists for external boundaries? (Iron Law 3)
284
+ - [ ] Did I scan the Red Flags Checklist (10 items)?
285
+ - [ ] Did I run the 3 Gate Functions on modified test files?
286
+ - [ ] For each mock: does it enforce constraints the real dep enforces?
287
+ - [ ] For each mock: are failure paths tested, not just happy paths?
288
+ - [ ] Are there zero test-only methods in production code?