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.
- package/.mindforge/config.json +73 -2
- package/.mindforge/engine/autonomous/cross-iteration-bridge.md +96 -0
- package/.mindforge/engine/cost-tracking/budget-enforcer.md +68 -0
- package/.mindforge/engine/cost-tracking/router.md +58 -0
- package/.mindforge/engine/cost-tracking/token-ledger.md +77 -0
- package/.mindforge/engine/council/council-protocol.md +96 -0
- package/.mindforge/engine/council/council-templates.md +85 -0
- package/.mindforge/engine/council/synthesis-engine.md +71 -0
- package/.mindforge/engine/cross-model-eval.md +74 -0
- package/.mindforge/engine/instincts/capture-engine.md +63 -0
- package/.mindforge/engine/instincts/instinct-schema.md +76 -0
- package/.mindforge/engine/instincts/promotion-engine.md +77 -0
- package/.mindforge/engine/proactive/signal-detector.md +60 -0
- package/.mindforge/engine/proactive/suggestion-engine.md +100 -0
- package/.mindforge/engine/skills/composition.md +83 -0
- package/.mindforge/engine/skills/loader.md +16 -0
- package/.mindforge/personas/agent-architect.md +57 -0
- package/.mindforge/personas/agent-evaluator.md +162 -0
- package/.mindforge/personas/agent-memory-designer.md +157 -0
- package/.mindforge/personas/agent-ops-engineer.md +120 -0
- package/.mindforge/personas/agent-orchestrator.md +112 -0
- package/.mindforge/personas/ai-economist.md +57 -0
- package/.mindforge/personas/ai-safety-engineer.md +57 -0
- package/.mindforge/personas/analytics-engineer.md +57 -0
- package/.mindforge/personas/anti-pattern-hunter.md +61 -0
- package/.mindforge/personas/api-gateway-designer.md +132 -0
- package/.mindforge/personas/auth-engineer.md +112 -0
- package/.mindforge/personas/build-engineer.md +57 -0
- package/.mindforge/personas/business-analyst.md +56 -0
- package/.mindforge/personas/cache-architect.md +100 -0
- package/.mindforge/personas/causal-scientist.md +57 -0
- package/.mindforge/personas/cdn-architect.md +118 -0
- package/.mindforge/personas/change-agent.md +104 -0
- package/.mindforge/personas/code-narrator.md +52 -0
- package/.mindforge/personas/codegen-specialist.md +68 -0
- package/.mindforge/personas/communication-architect.md +102 -0
- package/.mindforge/personas/compliance-engineer.md +96 -0
- package/.mindforge/personas/consensus-engineer.md +116 -0
- package/.mindforge/personas/contract-tester.md +60 -192
- package/.mindforge/personas/cost-optimizer.md +71 -0
- package/.mindforge/personas/council-architect.md +66 -0
- package/.mindforge/personas/council-critic.md +67 -0
- package/.mindforge/personas/council-pragmatist.md +71 -0
- package/.mindforge/personas/council-skeptic.md +73 -0
- package/.mindforge/personas/data-architect.md +108 -0
- package/.mindforge/personas/data-mesh-architect.md +57 -0
- package/.mindforge/personas/data-pipeline-architect.md +120 -0
- package/.mindforge/personas/de-sloppifier.md +60 -0
- package/.mindforge/personas/debt-manager.md +66 -0
- package/.mindforge/personas/decision-architect.md +82 -51
- package/.mindforge/personas/deployment-captain.md +74 -0
- package/.mindforge/personas/design-system-lead.md +112 -0
- package/.mindforge/personas/dmux-orchestrator.md +75 -0
- package/.mindforge/personas/doc-auditor.md +84 -0
- package/.mindforge/personas/dx-engineer.md +96 -0
- package/.mindforge/personas/ecommerce-engineer.md +57 -0
- package/.mindforge/personas/edge-engineer.md +94 -0
- package/.mindforge/personas/edtech-architect.md +106 -0
- package/.mindforge/personas/embedding-architect.md +57 -0
- package/.mindforge/personas/environment-engineer.md +57 -0
- package/.mindforge/personas/eval-judge.md +55 -0
- package/.mindforge/personas/event-architect.md +102 -0
- package/.mindforge/personas/experiment-designer.md +138 -0
- package/.mindforge/personas/feature-store-engineer.md +57 -0
- package/.mindforge/personas/finops-analyst.md +66 -0
- package/.mindforge/personas/fintech-architect.md +57 -0
- package/.mindforge/personas/flutter-engineer.md +104 -0
- package/.mindforge/personas/gaming-engineer.md +57 -0
- package/.mindforge/personas/graphql-designer.md +73 -0
- package/.mindforge/personas/healthcare-engineer.md +57 -0
- package/.mindforge/personas/hiring-strategist.md +105 -0
- package/.mindforge/personas/hitl-architect.md +165 -0
- package/.mindforge/personas/i18n-architect.md +69 -0
- package/.mindforge/personas/instinct-curator.md +83 -0
- package/.mindforge/personas/iot-architect.md +105 -0
- package/.mindforge/personas/knowledge-curator.md +139 -0
- package/.mindforge/personas/knowledge-engineer.md +57 -0
- package/.mindforge/personas/lakehouse-architect.md +57 -0
- package/.mindforge/personas/llm-orchestrator.md +57 -0
- package/.mindforge/personas/logistics-architect.md +106 -0
- package/.mindforge/personas/market-analyst.md +53 -0
- package/.mindforge/personas/marketplace-engineer.md +105 -0
- package/.mindforge/personas/mcp-designer.md +54 -0
- package/.mindforge/personas/meeting-designer.md +104 -0
- package/.mindforge/personas/mentorship-lead.md +106 -0
- package/.mindforge/personas/migration-architect.md +57 -0
- package/.mindforge/personas/ml-ops-engineer.md +101 -0
- package/.mindforge/personas/mobile-architect.md +105 -0
- package/.mindforge/personas/mobile-security-engineer.md +106 -0
- package/.mindforge/personas/multi-model-bridge.md +86 -0
- package/.mindforge/personas/multi-tenancy-architect.md +71 -0
- package/.mindforge/personas/multimodal-engineer.md +57 -0
- package/.mindforge/personas/offline-specialist.md +105 -0
- package/.mindforge/personas/onboarding-navigator.md +63 -0
- package/.mindforge/personas/payments-engineer.md +135 -0
- package/.mindforge/personas/pipeline-engineer.md +115 -0
- package/.mindforge/personas/platform-engineer.md +97 -0
- package/.mindforge/personas/platform-lead.md +57 -0
- package/.mindforge/personas/privacy-engineer.md +57 -0
- package/.mindforge/personas/product-owner.md +56 -0
- package/.mindforge/personas/productivity-analyst.md +57 -0
- package/.mindforge/personas/prompt-architect.md +101 -0
- package/.mindforge/personas/proofreader.md +53 -0
- package/.mindforge/personas/pwa-architect.md +105 -0
- package/.mindforge/personas/quality-scorer.md +63 -0
- package/.mindforge/personas/react-native-engineer.md +106 -0
- package/.mindforge/personas/resilience-engineer.md +69 -0
- package/.mindforge/personas/rfc-architect.md +64 -0
- package/.mindforge/personas/saga-orchestrator.md +80 -0
- package/.mindforge/personas/secrets-engineer.md +57 -0
- package/.mindforge/personas/skill-smith.md +79 -0
- package/.mindforge/personas/sre-lead.md +107 -0
- package/.mindforge/personas/stream-engineer.md +57 -0
- package/.mindforge/personas/streaming-engineer.md +64 -0
- package/.mindforge/personas/swarm-templates.json +695 -38
- package/.mindforge/personas/system-designer.md +57 -0
- package/.mindforge/personas/team-coach.md +120 -0
- package/.mindforge/personas/tech-lead-coach.md +103 -0
- package/.mindforge/personas/technical-writer-lead.md +111 -0
- package/.mindforge/personas/threat-modeler.md +82 -0
- package/.mindforge/personas/vibe-checker.md +75 -0
- package/.mindforge/personas/worktree-manager.md +56 -0
- package/.mindforge/personas/zero-trust-engineer.md +113 -0
- package/.mindforge/skills/a11y-testing/SKILL.md +143 -0
- package/.mindforge/skills/agent-evaluation-framework/SKILL.md +227 -0
- package/.mindforge/skills/agent-introspection-debugging/SKILL.md +88 -0
- package/.mindforge/skills/agent-loops/SKILL.md +84 -0
- package/.mindforge/skills/agent-memory-design/SKILL.md +199 -0
- package/.mindforge/skills/agent-orchestration-patterns/SKILL.md +129 -0
- package/.mindforge/skills/agent-tool-selection/SKILL.md +204 -0
- package/.mindforge/skills/ai-agent-deployment/SKILL.md +176 -0
- package/.mindforge/skills/ai-cost-management/SKILL.md +57 -0
- package/.mindforge/skills/ai-safety-alignment/SKILL.md +53 -0
- package/.mindforge/skills/analytics-instrumentation/SKILL.md +172 -0
- package/.mindforge/skills/api-gateway-patterns/SKILL.md +177 -0
- package/.mindforge/skills/api-marketplace/SKILL.md +56 -0
- package/.mindforge/skills/api-versioning/SKILL.md +100 -0
- package/.mindforge/skills/app-store-deployment/SKILL.md +44 -0
- package/.mindforge/skills/architecture-tradeoff-analysis/SKILL.md +97 -0
- package/.mindforge/skills/audit-logging/SKILL.md +140 -0
- package/.mindforge/skills/auth-patterns/SKILL.md +148 -0
- package/.mindforge/skills/autonomous-agent-harness/SKILL.md +218 -0
- package/.mindforge/skills/autonomous-agents/SKILL.md +59 -0
- package/.mindforge/skills/autonomous-loops/SKILL.md +105 -0
- package/.mindforge/skills/build-system-optimization/SKILL.md +54 -0
- package/.mindforge/skills/build-vs-buy/SKILL.md +80 -0
- package/.mindforge/skills/bundle-optimization/SKILL.md +174 -0
- package/.mindforge/skills/business-analyst/SKILL.md +82 -0
- package/.mindforge/skills/caching-strategies/SKILL.md +132 -0
- package/.mindforge/skills/capacity-planning/SKILL.md +96 -0
- package/.mindforge/skills/causal-inference/SKILL.md +42 -0
- package/.mindforge/skills/cdn-optimization/SKILL.md +212 -0
- package/.mindforge/skills/change-management/SKILL.md +106 -0
- package/.mindforge/skills/chaos-engineering/SKILL.md +99 -0
- package/.mindforge/skills/ci-cd-pipeline/SKILL.md +118 -0
- package/.mindforge/skills/cli-design/SKILL.md +118 -0
- package/.mindforge/skills/code-generation-patterns/SKILL.md +92 -0
- package/.mindforge/skills/code-review-methodology/SKILL.md +180 -0
- package/.mindforge/skills/code-tour/SKILL.md +145 -0
- package/.mindforge/skills/codebase-onboarding/SKILL.md +95 -0
- package/.mindforge/skills/compliance-as-code/SKILL.md +195 -0
- package/.mindforge/skills/conflict-resolution/SKILL.md +87 -0
- package/.mindforge/skills/connection-pooling/SKILL.md +151 -0
- package/.mindforge/skills/container-security/SKILL.md +151 -0
- package/.mindforge/skills/context-engineering/SKILL.md +114 -0
- package/.mindforge/skills/continuous-learning/SKILL.md +84 -0
- package/.mindforge/skills/contract-testing/SKILL.md +85 -0
- package/.mindforge/skills/cost-aware-routing/SKILL.md +83 -0
- package/.mindforge/skills/cost-estimation/SKILL.md +82 -0
- package/.mindforge/skills/council/SKILL.md +68 -0
- package/.mindforge/skills/cqrs-event-sourcing/SKILL.md +95 -0
- package/.mindforge/skills/cross-platform-testing/SKILL.md +43 -0
- package/.mindforge/skills/data-governance/SKILL.md +42 -0
- package/.mindforge/skills/data-lakehouse/SKILL.md +42 -0
- package/.mindforge/skills/data-mesh/SKILL.md +42 -0
- package/.mindforge/skills/data-modeling/SKILL.md +107 -0
- package/.mindforge/skills/data-pipeline-design/SKILL.md +171 -0
- package/.mindforge/skills/data-privacy-engineering/SKILL.md +42 -0
- package/.mindforge/skills/database-performance/SKILL.md +174 -0
- package/.mindforge/skills/database-sharding-advanced/SKILL.md +206 -0
- package/.mindforge/skills/de-sloppify/SKILL.md +120 -0
- package/.mindforge/skills/defense-in-depth/SKILL.md +84 -0
- package/.mindforge/skills/delegation-patterns/SKILL.md +123 -0
- package/.mindforge/skills/dependency-management/SKILL.md +94 -0
- package/.mindforge/skills/deployment-workflow/SKILL.md +135 -0
- package/.mindforge/skills/design-system/SKILL.md +113 -0
- package/.mindforge/skills/developer-onboarding/SKILL.md +99 -0
- package/.mindforge/skills/developer-productivity-metrics/SKILL.md +59 -0
- package/.mindforge/skills/distributed-consensus/SKILL.md +141 -0
- package/.mindforge/skills/dmux-workflows/SKILL.md +141 -0
- package/.mindforge/skills/dns-architecture/SKILL.md +167 -0
- package/.mindforge/skills/doc-health-audit/SKILL.md +102 -0
- package/.mindforge/skills/ecommerce-architecture/SKILL.md +41 -0
- package/.mindforge/skills/edge-computing/SKILL.md +91 -0
- package/.mindforge/skills/edtech-platform/SKILL.md +41 -0
- package/.mindforge/skills/email-deliverability/SKILL.md +177 -0
- package/.mindforge/skills/embedding-systems/SKILL.md +55 -0
- package/.mindforge/skills/environment-management/SKILL.md +54 -0
- package/.mindforge/skills/error-handling-architecture/SKILL.md +118 -0
- package/.mindforge/skills/estimation-techniques/SKILL.md +113 -0
- package/.mindforge/skills/eval-harness/SKILL.md +180 -0
- package/.mindforge/skills/event-driven-architecture/SKILL.md +162 -0
- package/.mindforge/skills/experiment-design/SKILL.md +139 -0
- package/.mindforge/skills/experiment-platform/SKILL.md +43 -0
- package/.mindforge/skills/feature-engineering/SKILL.md +42 -0
- package/.mindforge/skills/feature-flag-management/SKILL.md +183 -0
- package/.mindforge/skills/fine-tuning-workflow/SKILL.md +189 -0
- package/.mindforge/skills/fintech-patterns/SKILL.md +41 -0
- package/.mindforge/skills/flutter-architecture/SKILL.md +42 -0
- package/.mindforge/skills/gaming-backend/SKILL.md +41 -0
- package/.mindforge/skills/git-workflow-design/SKILL.md +129 -0
- package/.mindforge/skills/graceful-degradation/SKILL.md +95 -0
- package/.mindforge/skills/graphql-patterns/SKILL.md +243 -0
- package/.mindforge/skills/guardrails-and-safety/SKILL.md +137 -0
- package/.mindforge/skills/healthcare-systems/SKILL.md +40 -0
- package/.mindforge/skills/hiring-engineering/SKILL.md +119 -0
- package/.mindforge/skills/human-in-the-loop-design/SKILL.md +234 -0
- package/.mindforge/skills/i18n-architecture/SKILL.md +147 -0
- package/.mindforge/skills/idempotency-patterns/SKILL.md +84 -0
- package/.mindforge/skills/incident-communication/SKILL.md +96 -0
- package/.mindforge/skills/incident-management/SKILL.md +97 -0
- package/.mindforge/skills/infrastructure-as-code/SKILL.md +98 -0
- package/.mindforge/skills/instinct-clustering/SKILL.md +190 -0
- package/.mindforge/skills/internal-developer-platform/SKILL.md +51 -0
- package/.mindforge/skills/iot-platform/SKILL.md +41 -0
- package/.mindforge/skills/k8s-deployment/SKILL.md +358 -0
- package/.mindforge/skills/knowledge-graphs/SKILL.md +56 -0
- package/.mindforge/skills/knowledge-sharing-systems/SKILL.md +112 -0
- package/.mindforge/skills/llm-cost-optimization/SKILL.md +198 -0
- package/.mindforge/skills/llm-orchestration/SKILL.md +56 -0
- package/.mindforge/skills/load-testing/SKILL.md +84 -0
- package/.mindforge/skills/logistics-optimization/SKILL.md +40 -0
- package/.mindforge/skills/market-researcher/SKILL.md +99 -0
- package/.mindforge/skills/marketplace-trust/SKILL.md +40 -0
- package/.mindforge/skills/mcp-server-patterns/SKILL.md +264 -0
- package/.mindforge/skills/media-streaming/SKILL.md +41 -0
- package/.mindforge/skills/meeting-architecture/SKILL.md +146 -0
- package/.mindforge/skills/mentoring-patterns/SKILL.md +77 -0
- package/.mindforge/skills/microservices-patterns/SKILL.md +83 -0
- package/.mindforge/skills/migration-platform/SKILL.md +61 -0
- package/.mindforge/skills/migration-strategies/SKILL.md +129 -0
- package/.mindforge/skills/ml-feature-store/SKILL.md +56 -0
- package/.mindforge/skills/ml-monitoring/SKILL.md +42 -0
- package/.mindforge/skills/mobile-performance/SKILL.md +44 -0
- package/.mindforge/skills/mobile-security/SKILL.md +45 -0
- package/.mindforge/skills/model-evaluation/SKILL.md +53 -0
- package/.mindforge/skills/monorepo-management/SKILL.md +100 -0
- package/.mindforge/skills/multi-llm-consult/SKILL.md +75 -0
- package/.mindforge/skills/multi-tenancy-patterns/SKILL.md +145 -0
- package/.mindforge/skills/multi-turn-conversation-design/SKILL.md +206 -0
- package/.mindforge/skills/multimodal-ai/SKILL.md +51 -0
- package/.mindforge/skills/mutation-testing/SKILL.md +97 -0
- package/.mindforge/skills/notification-system-design/SKILL.md +168 -0
- package/.mindforge/skills/observability-stack/SKILL.md +136 -0
- package/.mindforge/skills/offline-first-design/SKILL.md +43 -0
- package/.mindforge/skills/on-call-design/SKILL.md +111 -0
- package/.mindforge/skills/pagination-patterns/SKILL.md +230 -0
- package/.mindforge/skills/payment-integration/SKILL.md +176 -0
- package/.mindforge/skills/performance-reviews/SKILL.md +140 -0
- package/.mindforge/skills/platform-observability/SKILL.md +58 -0
- package/.mindforge/skills/platform-reliability/SKILL.md +52 -0
- package/.mindforge/skills/post-incident-learning/SKILL.md +96 -0
- package/.mindforge/skills/product-manager/SKILL.md +104 -0
- package/.mindforge/skills/progressive-web-app/SKILL.md +44 -0
- package/.mindforge/skills/prompt-engineering/SKILL.md +94 -0
- package/.mindforge/skills/proofreader/SKILL.md +158 -0
- package/.mindforge/skills/push-notification-architecture/SKILL.md +45 -0
- package/.mindforge/skills/python-performance/SKILL.md +183 -0
- package/.mindforge/skills/quality-audit/SKILL.md +171 -0
- package/.mindforge/skills/queue-design/SKILL.md +85 -0
- package/.mindforge/skills/rag-architecture/SKILL.md +176 -0
- package/.mindforge/skills/rate-limiting-design/SKILL.md +94 -0
- package/.mindforge/skills/react-native-patterns/SKILL.md +42 -0
- package/.mindforge/skills/react-performance/SKILL.md +229 -0
- package/.mindforge/skills/real-time-analytics/SKILL.md +42 -0
- package/.mindforge/skills/real-time-sync/SKILL.md +83 -0
- package/.mindforge/skills/responsive-native/SKILL.md +44 -0
- package/.mindforge/skills/responsive-patterns/SKILL.md +141 -0
- package/.mindforge/skills/rfc-pipeline/SKILL.md +114 -0
- package/.mindforge/skills/saas-multi-tenant/SKILL.md +41 -0
- package/.mindforge/skills/santa-method/SKILL.md +134 -0
- package/.mindforge/skills/search-implementation/SKILL.md +98 -0
- package/.mindforge/skills/secrets-platform/SKILL.md +56 -0
- package/.mindforge/skills/secrets-rotation/SKILL.md +173 -0
- package/.mindforge/skills/self-serve-infrastructure/SKILL.md +51 -0
- package/.mindforge/skills/serverless-patterns/SKILL.md +119 -0
- package/.mindforge/skills/skill-creator-meta/SKILL.md +146 -0
- package/.mindforge/skills/sprint-retrospective-facilitation/SKILL.md +112 -0
- package/.mindforge/skills/stakeholder-communication/SKILL.md +85 -0
- package/.mindforge/skills/state-management/SKILL.md +104 -0
- package/.mindforge/skills/stream-processing/SKILL.md +43 -0
- package/.mindforge/skills/streaming-architecture/SKILL.md +81 -0
- package/.mindforge/skills/supply-chain-security/SKILL.md +145 -0
- package/.mindforge/skills/synthetic-data-generation/SKILL.md +52 -0
- package/.mindforge/skills/system-design/SKILL.md +88 -0
- package/.mindforge/skills/team-topology-design/SKILL.md +107 -0
- package/.mindforge/skills/technical-debt-management/SKILL.md +86 -0
- package/.mindforge/skills/technical-interview-design/SKILL.md +98 -0
- package/.mindforge/skills/technical-leadership/SKILL.md +75 -0
- package/.mindforge/skills/technical-writing/SKILL.md +237 -0
- package/.mindforge/skills/technology-radar/SKILL.md +88 -0
- package/.mindforge/skills/testing-anti-patterns/SKILL.md +288 -0
- package/.mindforge/skills/threat-modeling/SKILL.md +109 -0
- package/.mindforge/skills/tool-design/SKILL.md +138 -0
- package/.mindforge/skills/typescript-advanced/SKILL.md +198 -0
- package/.mindforge/skills/using-git-worktrees/SKILL.md +139 -0
- package/.mindforge/skills/verification-loop/SKILL.md +97 -0
- package/.mindforge/skills/vibe-security/SKILL.md +165 -0
- package/.mindforge/skills/visual-regression-testing/SKILL.md +97 -0
- package/.mindforge/skills/websocket-patterns/SKILL.md +203 -0
- package/.mindforge/skills/writing-plans/SKILL.md +170 -0
- package/.mindforge/skills/writing-skills/SKILL.md +216 -0
- package/.mindforge/skills/zero-trust-architecture/SKILL.md +166 -0
- package/CHANGELOG.md +195 -0
- package/MINDFORGE.md +4 -4
- package/README.md +2 -2
- package/RELEASENOTES.md +66 -0
- package/bin/installer-core.js +1 -1
- package/bin/wizard/theme.js +2 -2
- package/docs/commands-reference.md +18 -1
- package/package.json +2 -2
- package/.mindforge/personas/data-privacy-engineer.md +0 -187
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: quality-audit
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.0.4
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: quality audit, quality score, clarity score, completeness check, accuracy check, usefulness score, four-dimension, weighted scoring, quality scoring, output quality, quality threshold, quality comparison
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill — Quality Audit (Four-Dimension Weighted Scoring)
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
When evaluating the quality of any output — code, documentation, architecture
|
|
13
|
+
decisions, generated content, or deliverables. Use to enforce a consistent,
|
|
14
|
+
evidence-based quality bar across all work products. Especially valuable when
|
|
15
|
+
"good enough" is ambiguous and you need a defensible, repeatable score.
|
|
16
|
+
|
|
17
|
+
Three modes of operation:
|
|
18
|
+
- **Quick mode**: Accuracy dimension only (fast gate check)
|
|
19
|
+
- **Full mode**: All 4 dimensions scored (standard quality gate)
|
|
20
|
+
- **Comparative mode**: Score artifact A vs artifact B on all dimensions
|
|
21
|
+
|
|
22
|
+
## Mandatory actions when this skill is active
|
|
23
|
+
|
|
24
|
+
### Before scoring
|
|
25
|
+
|
|
26
|
+
1. **Identify the artifact type** — code, documentation, API design, generated output, architecture decision, etc.
|
|
27
|
+
2. **Select scoring mode:**
|
|
28
|
+
- Quick: when you need a fast go/no-go on factual correctness
|
|
29
|
+
- Full: standard quality gate for all deliverables
|
|
30
|
+
- Comparative: when choosing between alternatives
|
|
31
|
+
3. **Load custom rubric** (if exists): check `validation/rubric.yaml` in project root or `.mindforge/validation/rubric.yaml`
|
|
32
|
+
4. **Establish context**: what is this artifact supposed to accomplish? Who is the audience?
|
|
33
|
+
|
|
34
|
+
### During scoring
|
|
35
|
+
|
|
36
|
+
**The Four Dimensions:**
|
|
37
|
+
|
|
38
|
+
| Dimension | Weight | Definition | Measures |
|
|
39
|
+
|-----------|--------|------------|----------|
|
|
40
|
+
| Clarity | 25% | How easily understood is the output? | Structure, naming, formatting, progressive disclosure, lack of ambiguity |
|
|
41
|
+
| Completeness | 25% | Does it cover all requirements? | Missing cases, TODOs, partial implementations, unstated assumptions |
|
|
42
|
+
| Accuracy | 30% | Is it factually and logically correct? | Bugs, wrong behavior, incorrect statements, logic errors, type mismatches |
|
|
43
|
+
| Usefulness | 20% | Does it solve the actual problem? | User value, practical applicability, appropriate scope, actionability |
|
|
44
|
+
|
|
45
|
+
**5-Point Scale (apply consistently):**
|
|
46
|
+
|
|
47
|
+
| Score | Label | Meaning |
|
|
48
|
+
|-------|-------|---------|
|
|
49
|
+
| 1 | Poor | Fundamentally broken, requires complete rewrite |
|
|
50
|
+
| 2 | Below Average | Significant issues, multiple major fixes needed |
|
|
51
|
+
| 3 | Acceptable | Meets minimum bar, minor issues remain |
|
|
52
|
+
| 4 | Good | Solid work, only cosmetic improvements possible |
|
|
53
|
+
| 5 | Excellent | Exemplary, could serve as a reference implementation |
|
|
54
|
+
|
|
55
|
+
**Scoring Protocol:**
|
|
56
|
+
1. Read the entire artifact before scoring any dimension
|
|
57
|
+
2. Score each dimension independently (don't let one influence others)
|
|
58
|
+
3. Provide specific evidence for each score (line numbers, examples, quotes)
|
|
59
|
+
4. Calculate weighted average: `(Clarity * 0.25) + (Completeness * 0.25) + (Accuracy * 0.30) + (Usefulness * 0.20)`
|
|
60
|
+
|
|
61
|
+
**Passing Thresholds:**
|
|
62
|
+
- **Weighted average >= 3.0** — artifact passes overall quality gate
|
|
63
|
+
- **Accuracy >= 3.0 (BLOCKING)** — accuracy must independently meet this bar regardless of other scores
|
|
64
|
+
- An artifact with Clarity=5, Completeness=5, Accuracy=2, Usefulness=5 still FAILS (accuracy blocking gate)
|
|
65
|
+
|
|
66
|
+
**Scoring Output Format:**
|
|
67
|
+
```json
|
|
68
|
+
{
|
|
69
|
+
"mode": "quick" | "full" | "comparative",
|
|
70
|
+
"artifact": "description",
|
|
71
|
+
"timestamp": "ISO-8601",
|
|
72
|
+
"scores": {
|
|
73
|
+
"clarity": {
|
|
74
|
+
"score": 1-5,
|
|
75
|
+
"weight": 0.25,
|
|
76
|
+
"evidence": ["specific observation 1", "specific observation 2"],
|
|
77
|
+
"improvements": ["actionable suggestion"]
|
|
78
|
+
},
|
|
79
|
+
"completeness": {
|
|
80
|
+
"score": 1-5,
|
|
81
|
+
"weight": 0.25,
|
|
82
|
+
"evidence": ["..."],
|
|
83
|
+
"improvements": ["..."]
|
|
84
|
+
},
|
|
85
|
+
"accuracy": {
|
|
86
|
+
"score": 1-5,
|
|
87
|
+
"weight": 0.30,
|
|
88
|
+
"evidence": ["..."],
|
|
89
|
+
"improvements": ["..."],
|
|
90
|
+
"blocking_gate": true
|
|
91
|
+
},
|
|
92
|
+
"usefulness": {
|
|
93
|
+
"score": 1-5,
|
|
94
|
+
"weight": 0.20,
|
|
95
|
+
"evidence": ["..."],
|
|
96
|
+
"improvements": ["..."]
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"weighted_average": 0.0,
|
|
100
|
+
"accuracy_gate_passed": true | false,
|
|
101
|
+
"overall_verdict": "PASS" | "FAIL",
|
|
102
|
+
"fail_reason": "null | description"
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Quick Mode (accuracy only):**
|
|
107
|
+
- Score only the Accuracy dimension
|
|
108
|
+
- Pass if Accuracy >= 3.0
|
|
109
|
+
- Use when you need a fast gate check and other dimensions are less relevant
|
|
110
|
+
- Output: simplified JSON with only accuracy scores
|
|
111
|
+
|
|
112
|
+
**Comparative Mode:**
|
|
113
|
+
- Score both artifacts A and B on all 4 dimensions
|
|
114
|
+
- Report per-dimension winner and overall winner
|
|
115
|
+
- Tie-breaking: Accuracy wins ties, then Usefulness, then Completeness, then Clarity
|
|
116
|
+
- Output includes side-by-side comparison table
|
|
117
|
+
|
|
118
|
+
**Custom Rubric Support:**
|
|
119
|
+
If `validation/rubric.yaml` exists, it overrides default dimension definitions:
|
|
120
|
+
```yaml
|
|
121
|
+
dimensions:
|
|
122
|
+
clarity:
|
|
123
|
+
weight: 0.20 # can adjust weights (must sum to 1.0)
|
|
124
|
+
criteria:
|
|
125
|
+
- "Code uses consistent naming conventions"
|
|
126
|
+
- "Comments explain WHY, not WHAT"
|
|
127
|
+
passing_score: 3
|
|
128
|
+
accuracy:
|
|
129
|
+
weight: 0.35
|
|
130
|
+
criteria:
|
|
131
|
+
- "All edge cases handled"
|
|
132
|
+
- "No logic errors in conditional paths"
|
|
133
|
+
passing_score: 4 # can raise the bar per-dimension
|
|
134
|
+
blocking: true
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### After scoring
|
|
138
|
+
|
|
139
|
+
1. **Determine verdict:**
|
|
140
|
+
- If `accuracy_gate_passed == false` → FAIL (regardless of other scores)
|
|
141
|
+
- If `weighted_average < 3.0` → FAIL
|
|
142
|
+
- Otherwise → PASS
|
|
143
|
+
|
|
144
|
+
2. **If FAIL:**
|
|
145
|
+
- List all dimensions below threshold
|
|
146
|
+
- Provide specific, actionable improvements for each
|
|
147
|
+
- Prioritize: fix accuracy issues first (blocking), then lowest-scoring dimension
|
|
148
|
+
- Re-score after fixes (don't assume the fix worked)
|
|
149
|
+
|
|
150
|
+
3. **If PASS:**
|
|
151
|
+
- Log the score to `.mindforge/quality/[artifact-name]-[timestamp].json`
|
|
152
|
+
- Note any dimensions at exactly 3.0 (borderline — flag for future improvement)
|
|
153
|
+
- Record the weighted average as the artifact's quality score
|
|
154
|
+
|
|
155
|
+
4. **Track trends:**
|
|
156
|
+
- Compare current score to previous scores for same artifact type
|
|
157
|
+
- If quality trending downward: flag in session report
|
|
158
|
+
- If quality consistently above 4.0: consider raising the threshold
|
|
159
|
+
|
|
160
|
+
## Self-check before task completion
|
|
161
|
+
|
|
162
|
+
Before marking a task done when this skill was active:
|
|
163
|
+
|
|
164
|
+
- [ ] Did I score all 4 dimensions (unless using quick mode)?
|
|
165
|
+
- [ ] Did I check the accuracy blocking gate independently?
|
|
166
|
+
- [ ] Did I provide specific evidence (not just scores) for each dimension?
|
|
167
|
+
- [ ] Did I calculate the weighted average correctly?
|
|
168
|
+
- [ ] If the artifact failed: did I provide actionable improvements?
|
|
169
|
+
- [ ] If using custom rubric: did I load it from validation/rubric.yaml?
|
|
170
|
+
- [ ] Is the scoring output in structured JSON format?
|
|
171
|
+
- [ ] Did I avoid letting one dimension's score influence another?
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: queue-design
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.0.9
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: queue design, message broker selection, kafka vs rabbitmq, queue topology, consumer pattern, message TTL, priority queue, dead letter queue design, queue partitioning, message ordering queue, queue scaling, broker architecture
|
|
7
|
+
compose: event-driven-architecture
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Skill — Queue Design
|
|
11
|
+
|
|
12
|
+
## When this skill activates
|
|
13
|
+
Any task involving message broker selection, queue topology, consumer patterns,
|
|
14
|
+
TTL policies, priority queues, dead letter queues, or partition strategies.
|
|
15
|
+
|
|
16
|
+
## Mandatory actions when this skill is active
|
|
17
|
+
|
|
18
|
+
### Before writing any code
|
|
19
|
+
1. Identify throughput requirements (messages/sec peak and sustained).
|
|
20
|
+
2. Determine ordering and delivery guarantee requirements.
|
|
21
|
+
3. Select broker based on the decision matrix.
|
|
22
|
+
|
|
23
|
+
### During implementation
|
|
24
|
+
- Configure DLQ for every consumer with retry limits.
|
|
25
|
+
- Set TTL on messages to prevent unbounded queue growth.
|
|
26
|
+
- Implement consumer health checks and graceful shutdown.
|
|
27
|
+
- Use partition keys for ordering-sensitive flows.
|
|
28
|
+
|
|
29
|
+
### After implementation
|
|
30
|
+
- Set up queue depth monitoring with alerting thresholds.
|
|
31
|
+
- Document topology, routing rules, and consumer ownership.
|
|
32
|
+
- Verify DLQ workflow (inspect, fix, replay, discard).
|
|
33
|
+
|
|
34
|
+
## Broker Selection
|
|
35
|
+
|
|
36
|
+
| Broker | Strength | Ordering | Use For |
|
|
37
|
+
|--------|----------|----------|---------|
|
|
38
|
+
| Kafka | Extreme throughput, replay, retention | Per-partition | Event sourcing, stream processing, audit logs |
|
|
39
|
+
| RabbitMQ | Flexible routing, per-message ack | Per-queue FIFO | Task queues, RPC, complex routing |
|
|
40
|
+
| SQS | Zero ops, infinite scale, built-in DLQ | FIFO queues (limited) | Decoupling services, background jobs |
|
|
41
|
+
|
|
42
|
+
## Queue Topologies
|
|
43
|
+
|
|
44
|
+
- **Point-to-Point**: one queue, competing consumers. Each message consumed once.
|
|
45
|
+
- **Fan-Out**: one message to multiple queues/groups. Use for event broadcasting.
|
|
46
|
+
- **Topic-Based**: route by pattern matching. Use for selective subscription.
|
|
47
|
+
|
|
48
|
+
## Consumer Patterns
|
|
49
|
+
|
|
50
|
+
- **Competing Consumers**: multiple instances share workload, scale by adding consumers.
|
|
51
|
+
- **Exclusive Consumer**: one active at a time, failover pattern for ordered processing.
|
|
52
|
+
|
|
53
|
+
## TTL and Expiration
|
|
54
|
+
- Queue-level TTL: all messages expire after N seconds if unconsumed.
|
|
55
|
+
- Per-message TTL: individual expiration. Typical: notifications 5min, business 24h, audit 7d.
|
|
56
|
+
- Expired messages route to DLQ or silently drop (configure explicitly).
|
|
57
|
+
|
|
58
|
+
## Priority Queues
|
|
59
|
+
- Limited levels (1-10 max, typically 3: high/normal/low).
|
|
60
|
+
- Risk: starvation of low-priority. Mitigate with aging or separate queues.
|
|
61
|
+
|
|
62
|
+
## Dead Letter Queue Design
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
message → consumer → FAIL → retry (3x exponential) → FAIL → DLQ → alert
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
- Retain original body, headers, error details, retry count.
|
|
69
|
+
- Alert on first DLQ arrival. Never auto-replay without root-cause fix.
|
|
70
|
+
- Replay tool moves DLQ → original queue in small monitored batches.
|
|
71
|
+
|
|
72
|
+
## Partition Strategies
|
|
73
|
+
- Partition key = entity ID ensures per-entity ordering.
|
|
74
|
+
- Start with 2x expected consumer count as partition count.
|
|
75
|
+
- Monitor for hot partitions (skewed key distribution).
|
|
76
|
+
|
|
77
|
+
## Self-check before task completion
|
|
78
|
+
|
|
79
|
+
- [ ] Is the right broker selected for throughput and routing needs?
|
|
80
|
+
- [ ] Are DLQs configured with alerting for every consumer?
|
|
81
|
+
- [ ] Is TTL set to prevent unbounded growth?
|
|
82
|
+
- [ ] Are ordering guarantees maintained where business logic requires?
|
|
83
|
+
- [ ] Is the consumer pattern correct (competing vs exclusive)?
|
|
84
|
+
- [ ] Are queue depth and consumer lag monitored?
|
|
85
|
+
- [ ] Is the DLQ replay workflow documented?
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rag-architecture
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 0.1.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: rag architecture, chunking strategy, embedding model selection, retrieval pipeline, dense retrieval, sparse retrieval, hybrid retrieval, re-ranking, context packing, semantic chunking, overlap strategy, retrieval evaluation
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill — RAG Architecture
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
Any task involving Retrieval-Augmented Generation pipeline design, document
|
|
13
|
+
chunking, embedding model selection, retrieval strategies, re-ranking, or
|
|
14
|
+
RAG evaluation metrics.
|
|
15
|
+
|
|
16
|
+
## Mandatory actions when this skill is active
|
|
17
|
+
|
|
18
|
+
### Before writing any code
|
|
19
|
+
1. Define the corpus characteristics (document types, sizes, update frequency).
|
|
20
|
+
2. Choose chunking strategy based on content structure.
|
|
21
|
+
3. Select embedding model based on accuracy vs cost vs latency trade-offs.
|
|
22
|
+
|
|
23
|
+
### During implementation
|
|
24
|
+
- Implement hybrid retrieval (dense + sparse) with score fusion.
|
|
25
|
+
- Add re-ranking stage for precision improvement.
|
|
26
|
+
- Instrument retrieval metrics (latency, recall, relevance scores).
|
|
27
|
+
|
|
28
|
+
### After implementation
|
|
29
|
+
- Evaluate with ground-truth Q&A pairs (recall@k, MRR, answer correctness).
|
|
30
|
+
- Document the RAG pipeline in ARCHITECTURE.md.
|
|
31
|
+
- Set up monitoring for retrieval quality degradation.
|
|
32
|
+
|
|
33
|
+
## Chunking Strategies
|
|
34
|
+
|
|
35
|
+
### Fixed-Size Chunking
|
|
36
|
+
- Split at token/character boundary (e.g., 512 tokens per chunk).
|
|
37
|
+
- Add overlap between chunks (50-100 tokens) to preserve context at boundaries.
|
|
38
|
+
- Simplest approach, works well for homogeneous content.
|
|
39
|
+
- Trade-off: may split mid-sentence or mid-concept.
|
|
40
|
+
|
|
41
|
+
### Semantic Chunking
|
|
42
|
+
- Split on topic/meaning boundaries (not arbitrary positions).
|
|
43
|
+
- Use embedding similarity: when similarity drops between sentences, split there.
|
|
44
|
+
- Better for: heterogeneous documents, technical content.
|
|
45
|
+
- More expensive to compute but produces coherent chunks.
|
|
46
|
+
|
|
47
|
+
### Recursive/Hierarchical Chunking
|
|
48
|
+
- Split by document structure: headers → paragraphs → sentences.
|
|
49
|
+
- Respect document hierarchy (never split a heading from its content).
|
|
50
|
+
- Best for: well-structured documents (markdown, HTML, documentation).
|
|
51
|
+
- Preserves context and organizational meaning.
|
|
52
|
+
|
|
53
|
+
### Chunking Parameters
|
|
54
|
+
| Parameter | Recommended Range | Trade-off |
|
|
55
|
+
|-----------|------------------|-----------|
|
|
56
|
+
| Chunk size | 256-1024 tokens | Larger = more context, less precise retrieval |
|
|
57
|
+
| Overlap | 10-20% of chunk size | More overlap = fewer boundary issues, more storage |
|
|
58
|
+
| Min chunk size | 50 tokens | Avoid tiny fragments that lack meaning |
|
|
59
|
+
|
|
60
|
+
## Embedding Models
|
|
61
|
+
|
|
62
|
+
### Commercial Models
|
|
63
|
+
| Model | Dimensions | Context | Best For |
|
|
64
|
+
|-------|-----------|---------|----------|
|
|
65
|
+
| OpenAI text-embedding-3-large | 3072 | 8191 tokens | Highest accuracy, general purpose |
|
|
66
|
+
| OpenAI text-embedding-3-small | 1536 | 8191 tokens | Good accuracy, lower cost |
|
|
67
|
+
| Cohere embed-v3 | 1024 | 512 tokens | Multilingual, search-optimized |
|
|
68
|
+
|
|
69
|
+
### Open-Source Models
|
|
70
|
+
| Model | Dimensions | Context | Best For |
|
|
71
|
+
|-------|-----------|---------|----------|
|
|
72
|
+
| bge-large-en-v1.5 | 1024 | 512 tokens | English, self-hosted |
|
|
73
|
+
| e5-large-v2 | 1024 | 512 tokens | Instruction-tuned retrieval |
|
|
74
|
+
| GTE-large | 1024 | 512 tokens | General text embeddings |
|
|
75
|
+
|
|
76
|
+
### Selection Criteria
|
|
77
|
+
- **Accuracy**: benchmark on your domain data (MTEB leaderboard as starting point).
|
|
78
|
+
- **Cost**: per-token pricing for commercial, compute cost for self-hosted.
|
|
79
|
+
- **Latency**: batch encoding speed matters for ingestion pipeline.
|
|
80
|
+
- **Dimensions**: higher = more accurate but more storage and slower search.
|
|
81
|
+
|
|
82
|
+
## Retrieval Strategies
|
|
83
|
+
|
|
84
|
+
### Dense Retrieval (Vector Search)
|
|
85
|
+
- Embed query → find nearest neighbors in vector space.
|
|
86
|
+
- Good for: semantic similarity, paraphrase matching.
|
|
87
|
+
- Weak for: exact keyword matching, rare terms, proper nouns.
|
|
88
|
+
- Indexes: HNSW (fast, approximate), IVF (memory-efficient), flat (exact).
|
|
89
|
+
|
|
90
|
+
### Sparse Retrieval (BM25/TF-IDF)
|
|
91
|
+
- Term frequency-based scoring.
|
|
92
|
+
- Good for: exact keyword matching, rare/specific terms, proper nouns.
|
|
93
|
+
- Weak for: semantic similarity, paraphrases.
|
|
94
|
+
- Fast, no GPU needed, works out-of-the-box.
|
|
95
|
+
|
|
96
|
+
### Hybrid Retrieval (Recommended)
|
|
97
|
+
- Run both dense and sparse retrieval.
|
|
98
|
+
- Combine results using Reciprocal Rank Fusion (RRF):
|
|
99
|
+
```
|
|
100
|
+
RRF_score = sum(1 / (k + rank_i)) for each retrieval method
|
|
101
|
+
k = 60 (standard constant)
|
|
102
|
+
```
|
|
103
|
+
- Gets best of both worlds: semantic understanding + keyword precision.
|
|
104
|
+
|
|
105
|
+
## Re-Ranking
|
|
106
|
+
|
|
107
|
+
### Cross-Encoder Re-Ranking
|
|
108
|
+
- Take top-k results from retrieval (e.g., top 20-50).
|
|
109
|
+
- Score each (query, document) pair with a cross-encoder model.
|
|
110
|
+
- Re-order by cross-encoder score, return top-n (e.g., top 5).
|
|
111
|
+
- Much more accurate than bi-encoder similarity, but slower.
|
|
112
|
+
|
|
113
|
+
### Models for Re-Ranking
|
|
114
|
+
- Cohere Rerank v3 (commercial, high quality).
|
|
115
|
+
- bge-reranker-large (open-source, good quality).
|
|
116
|
+
- ms-marco-MiniLM (lightweight, fast).
|
|
117
|
+
|
|
118
|
+
### When to Re-Rank
|
|
119
|
+
- Always (unless latency budget is extremely tight).
|
|
120
|
+
- Especially valuable when initial retrieval returns many marginal results.
|
|
121
|
+
- Cost: adds 50-200ms per query (for 20-50 candidates).
|
|
122
|
+
|
|
123
|
+
## Context Packing
|
|
124
|
+
|
|
125
|
+
### Strategies
|
|
126
|
+
- Fill LLM context window efficiently with retrieved chunks.
|
|
127
|
+
- Order by relevance (most relevant first).
|
|
128
|
+
- Deduplicate overlapping chunks (remove redundant content).
|
|
129
|
+
- Include source metadata (document title, section heading) for grounding.
|
|
130
|
+
|
|
131
|
+
### Context Window Management
|
|
132
|
+
```
|
|
133
|
+
[System prompt] + [Retrieved chunks] + [User query] + [Generation buffer]
|
|
134
|
+
~500 tokens ~3000-6000 tokens ~100 tokens ~1000 tokens
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Diminishing Returns
|
|
138
|
+
- More context is not always better.
|
|
139
|
+
- After ~5-8 highly relevant chunks, quality often plateaus or degrades.
|
|
140
|
+
- "Lost in the middle" effect: LLMs pay less attention to middle of context.
|
|
141
|
+
- Place most relevant chunks at beginning and end.
|
|
142
|
+
|
|
143
|
+
## Evaluation Metrics
|
|
144
|
+
|
|
145
|
+
### Retrieval Quality
|
|
146
|
+
| Metric | Description | Target |
|
|
147
|
+
|--------|-------------|--------|
|
|
148
|
+
| Recall@k | % of relevant docs in top-k results | > 0.85 at k=10 |
|
|
149
|
+
| MRR (Mean Reciprocal Rank) | Average 1/rank of first relevant result | > 0.7 |
|
|
150
|
+
| NDCG@k | Normalized discounted cumulative gain | > 0.75 |
|
|
151
|
+
| Precision@k | % of top-k results that are relevant | > 0.5 at k=5 |
|
|
152
|
+
|
|
153
|
+
### End-to-End Quality
|
|
154
|
+
| Metric | Description | Target |
|
|
155
|
+
|--------|-------------|--------|
|
|
156
|
+
| Answer correctness | Does the answer match ground truth? | > 0.8 |
|
|
157
|
+
| Faithfulness | Is the answer supported by retrieved context? | > 0.9 |
|
|
158
|
+
| Relevance | Are retrieved documents relevant to query? | > 0.85 |
|
|
159
|
+
|
|
160
|
+
### Evaluation Process
|
|
161
|
+
1. Create ground-truth dataset: 50-200 Q&A pairs with source documents.
|
|
162
|
+
2. Run queries through pipeline, measure retrieval metrics.
|
|
163
|
+
3. Generate answers, measure end-to-end metrics.
|
|
164
|
+
4. Iterate on chunking/retrieval/prompting based on results.
|
|
165
|
+
|
|
166
|
+
## Self-check before task completion
|
|
167
|
+
|
|
168
|
+
Before marking a task done when this skill was active:
|
|
169
|
+
|
|
170
|
+
- [ ] Did I read the full SKILL.md before starting? (Not just the triggers)
|
|
171
|
+
- [ ] Is chunking strategy appropriate for the content type?
|
|
172
|
+
- [ ] Is hybrid retrieval implemented (dense + sparse)?
|
|
173
|
+
- [ ] Is re-ranking applied to improve precision?
|
|
174
|
+
- [ ] Is context packing efficient (deduplication, relevance ordering)?
|
|
175
|
+
- [ ] Are evaluation metrics defined with ground-truth data?
|
|
176
|
+
- [ ] Is retrieval quality monitored in production?
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rate-limiting-design
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.0.9
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: rate limiting design, token bucket algorithm, leaky bucket, sliding window counter, distributed rate limit, per-tenant quota, rate limit header, throttling strategy, quota management, burst allowance, rate limit bypass, adaptive rate limit
|
|
7
|
+
compose: api-gateway-patterns
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Skill — Rate Limiting Design
|
|
11
|
+
|
|
12
|
+
## When this skill activates
|
|
13
|
+
Any task involving rate limiting, algorithm selection, distributed rate limits,
|
|
14
|
+
per-tenant quotas, throttling, burst allowance, or adaptive limiting.
|
|
15
|
+
|
|
16
|
+
## Mandatory actions when this skill is active
|
|
17
|
+
|
|
18
|
+
### Before writing any code
|
|
19
|
+
1. Define limits per endpoint based on expected usage and resource cost.
|
|
20
|
+
2. Choose algorithm for traffic pattern (bursty vs smooth).
|
|
21
|
+
3. Determine scope (per-user, per-API-key, per-IP, per-tenant).
|
|
22
|
+
|
|
23
|
+
### During implementation
|
|
24
|
+
- Return standard rate limit headers on every response.
|
|
25
|
+
- Implement distributed limiting if multi-instance (Redis + Lua).
|
|
26
|
+
- Configure per-plan tier limits (free/pro/enterprise).
|
|
27
|
+
- Add bypass for internal services and health checks.
|
|
28
|
+
|
|
29
|
+
### After implementation
|
|
30
|
+
- Test under burst and sustained high load.
|
|
31
|
+
- Verify distributed consistency (same user, different instances).
|
|
32
|
+
- Document limits in API docs with examples.
|
|
33
|
+
|
|
34
|
+
## Algorithm Selection
|
|
35
|
+
|
|
36
|
+
| Algorithm | Behavior | Best For |
|
|
37
|
+
|-----------|----------|----------|
|
|
38
|
+
| Token Bucket | Allows bursts up to bucket size, smooth sustained rate | Most APIs (general purpose) |
|
|
39
|
+
| Leaky Bucket | Perfectly smooth output, no bursts | Outgoing rate limiting, pipelines |
|
|
40
|
+
| Sliding Window | Accurate counting, no boundary spikes | Precise per-minute/hour limits |
|
|
41
|
+
| Fixed Window | Simple INCR+EXPIRE, boundary spike risk | Simple cases, acceptable edge spikes |
|
|
42
|
+
|
|
43
|
+
## Distributed Implementation (Redis Lua)
|
|
44
|
+
- Atomic token bucket via Lua script (read + compute + write in one round-trip).
|
|
45
|
+
- Key format: `{user:123}:ratelimit` (hash tags for Redis Cluster slot).
|
|
46
|
+
- Fail-open if Redis unreachable (prefer availability) or fail-closed (prefer safety).
|
|
47
|
+
|
|
48
|
+
## Per-Tenant Quotas
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
Plan Req/min Req/day Burst
|
|
52
|
+
Free 60 10,000 10
|
|
53
|
+
Pro 600 100,000 100
|
|
54
|
+
Enterprise 6,000 1,000,000 1,000
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
- Store plan in cache. Key includes tenant: `ratelimit:{tenant}:{endpoint}`.
|
|
58
|
+
- Separate limits per endpoint if resource cost varies.
|
|
59
|
+
|
|
60
|
+
## Response Headers
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
X-RateLimit-Limit: 100
|
|
64
|
+
X-RateLimit-Remaining: 73
|
|
65
|
+
X-RateLimit-Reset: 1704067260 (Unix timestamp)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
429 response must include: `Retry-After` header, error message, and remaining=0.
|
|
69
|
+
|
|
70
|
+
## Adaptive Rate Limiting
|
|
71
|
+
- Normal (<60% load): relax limits 1.2x. High (80-90%): tighten to 0.5x.
|
|
72
|
+
- Emergency (>90%): tighten to 0.2x. Gradual steps over 30-60s (avoid thundering herd).
|
|
73
|
+
- Always return `Retry-After` so clients back off gracefully.
|
|
74
|
+
|
|
75
|
+
## Bypass Rules
|
|
76
|
+
- Exempt: health checks, internal mTLS calls, admin endpoints, webhook receivers.
|
|
77
|
+
- Bypass requires authentication. Log bypassed requests for audit.
|
|
78
|
+
- Decision happens BEFORE rate limit check (zero overhead path).
|
|
79
|
+
|
|
80
|
+
## Scope
|
|
81
|
+
|
|
82
|
+
- **Per-User**: by user ID or API key. Most common for SaaS.
|
|
83
|
+
- **Per-IP**: for unauthenticated (login, public). Risk: shared NAT IPs.
|
|
84
|
+
- **Per-Endpoint**: expensive ops (search, export) get lower limits.
|
|
85
|
+
|
|
86
|
+
## Self-check before task completion
|
|
87
|
+
|
|
88
|
+
- [ ] Is the algorithm appropriate for the traffic pattern?
|
|
89
|
+
- [ ] Are rate limit headers returned on every response?
|
|
90
|
+
- [ ] Is the implementation distributed-safe (no race conditions)?
|
|
91
|
+
- [ ] Are per-tenant quotas configured with tier differentiation?
|
|
92
|
+
- [ ] Is 429 response informative (Retry-After, error details)?
|
|
93
|
+
- [ ] Are bypass rules defined for health checks and internal services?
|
|
94
|
+
- [ ] Is adaptive limiting considered for overload protection?
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: react-native-patterns
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.4.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: react native architecture, react native navigation, native module bridge, react native performance, Hermes engine optimization, react native debugging, new architecture react native, JSI bridge, react native state management, turbo modules, fabric renderer, react native app design
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill — React Native Architecture Patterns
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
This skill activates when designing or implementing React Native applications, including navigation architecture, native module bridges, performance optimization with Hermes, or adopting the new architecture (Fabric/TurboModules).
|
|
13
|
+
|
|
14
|
+
## Mandatory actions when this skill is active
|
|
15
|
+
|
|
16
|
+
### Before writing any code
|
|
17
|
+
1. Verify Hermes engine is enabled in `android/app/build.gradle` and iOS build settings for optimal performance
|
|
18
|
+
2. Determine if new architecture (Fabric + TurboModules) should be enabled based on library compatibility
|
|
19
|
+
3. Establish navigation strategy (React Navigation vs native navigation) and state management approach (Context, Redux, Zustand, Jotai)
|
|
20
|
+
4. Review native module requirements and platform-specific functionality needs
|
|
21
|
+
|
|
22
|
+
### During implementation
|
|
23
|
+
- Use `React.memo()` and `useMemo`/`useCallback` strategically to prevent unnecessary re-renders in lists and heavy components
|
|
24
|
+
- Implement FlatList with `getItemLayout`, `removeClippedSubviews`, and proper `keyExtractor` for large datasets
|
|
25
|
+
- Keep JavaScript bridge crossings minimal — batch updates and avoid rapid state changes from native side
|
|
26
|
+
- Use JSI-based libraries (Reanimated 2+, react-native-mmkv) for performance-critical operations
|
|
27
|
+
- Follow platform-specific design patterns (Material Design for Android, Human Interface Guidelines for iOS)
|
|
28
|
+
- Leverage TurboModules for new native module implementations when new architecture is enabled
|
|
29
|
+
- Implement proper error boundaries and crash reporting (Sentry, Bugsnag) with sourcemap upload
|
|
30
|
+
|
|
31
|
+
### After implementation
|
|
32
|
+
- Profile with React DevTools Profiler and Flipper to identify performance bottlenecks
|
|
33
|
+
- Test on physical devices (not just simulators) across both platforms and multiple OS versions
|
|
34
|
+
- Verify memory leaks using Xcode Instruments and Android Studio Profiler
|
|
35
|
+
- Measure app startup time and optimize bundle size with bundle analyzer
|
|
36
|
+
|
|
37
|
+
## Self-check before task completion
|
|
38
|
+
- [ ] Navigation flows work correctly on both platforms with proper back button handling
|
|
39
|
+
- [ ] No performance warnings in Metro bundler or runtime (e.g., non-serializable values in navigation params)
|
|
40
|
+
- [ ] Native modules include proper error handling and type safety (TypeScript + Codegen if using new arch)
|
|
41
|
+
- [ ] Platform-specific code uses proper conditionals (`Platform.select`, `.ios.js`/`.android.js` files)
|
|
42
|
+
- [ ] Frame rate maintains 60fps during animations and list scrolling (use Perf Monitor)
|