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,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-marketplace
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.7.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: API marketplace internal, API discovery platform, API versioning governance, API deprecation workflow, API developer onboarding, API portal, API catalog, API consumer management, API usage tracking, API lifecycle governance, internal API standard, API documentation portal
|
|
7
|
+
compose: api-versioning
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Skill — API Marketplace
|
|
11
|
+
|
|
12
|
+
## When this skill activates
|
|
13
|
+
|
|
14
|
+
This skill activates when the user is designing or implementing an internal API marketplace. This includes API discovery platforms, versioning governance, deprecation workflows, developer onboarding for API consumers, API portals, API catalogs, consumer management, usage tracking, API lifecycle governance, internal API standards, and documentation portals.
|
|
15
|
+
|
|
16
|
+
## Mandatory actions when this skill is active
|
|
17
|
+
|
|
18
|
+
### Before writing any code
|
|
19
|
+
|
|
20
|
+
1. Inventory all internal APIs (REST, GraphQL, gRPC, event streams) and assess current discoverability and documentation quality.
|
|
21
|
+
2. Define API lifecycle stages (proposal, alpha, beta, stable, deprecated, retired) and governance requirements for each stage.
|
|
22
|
+
3. Identify API consumer personas (internal developers, data teams, mobile engineers) and their discovery and onboarding needs.
|
|
23
|
+
4. Establish API standards (authentication, versioning, error handling, pagination, rate limiting) that all APIs must follow.
|
|
24
|
+
5. Assess current API sprawl: duplicate APIs, shadow APIs (not documented), orphaned APIs (no owner).
|
|
25
|
+
|
|
26
|
+
### During implementation
|
|
27
|
+
|
|
28
|
+
- **API Discovery:** Central catalog searchable by domain, team, capability, or keyword. Each API should have: name, description, owner, SLA, OpenAPI spec, example requests, status (alpha/beta/stable/deprecated). Discovery should return results in under 500ms.
|
|
29
|
+
- **API Portal:** Single entry point for all internal APIs. Include: catalog, interactive docs (Swagger UI, GraphQL Playground), try-it-now sandbox, code examples in 3+ languages, changelog per API. Portal must be indexed by internal search.
|
|
30
|
+
- **Versioning Governance:** Enforce consistent versioning strategy (see `api-versioning` skill). APIs must publish a deprecation policy (minimum 6-month notice for stable APIs). Breaking changes require new major version.
|
|
31
|
+
- **Deprecation Workflow:** Automated workflow: API owner announces deprecation → sunset headers added → usage monitoring dashboard → consumer outreach (email + Slack) → grace period (6 months) → removal. Track deprecation status in catalog.
|
|
32
|
+
- **Developer Onboarding:** New API consumers should go from discovery to first successful API call in under 15 minutes. Include: API key provisioning (self-service), quick-start guide, sandbox environment, example code, troubleshooting tips.
|
|
33
|
+
- **Consumer Management:** Track which teams consume which APIs. Use API keys or OAuth clients for attribution. Consumer dashboard shows: usage metrics, quota limits, deprecation notices, breaking change alerts.
|
|
34
|
+
- **Usage Tracking:** Collect per-consumer metrics: request count, error rate, latency, quota consumption. Expose to API owners via dashboard. Alert when consumers exceed 80% of quota or hit high error rates.
|
|
35
|
+
- **API Lifecycle Governance:** Alpha APIs can break without notice. Beta APIs require 1-month deprecation notice. Stable APIs require 6-month notice. Retired APIs return 410 Gone. Enforce via automated policy checks.
|
|
36
|
+
- **Internal API Standards:** All APIs must: use standard authentication (OAuth2 or API keys), include OpenAPI spec, provide health check endpoint, emit structured logs, track RED metrics. Standards enforced via linting (Spectral) and API gateway policies.
|
|
37
|
+
|
|
38
|
+
### After implementation
|
|
39
|
+
|
|
40
|
+
- Verify the API catalog includes 100% of production-facing internal APIs with ownership and OpenAPI specs.
|
|
41
|
+
- Confirm API portal enables discovery-to-first-call in under 15 minutes via user testing.
|
|
42
|
+
- Validate deprecation workflows include automated sunset headers and consumer outreach.
|
|
43
|
+
- Ensure usage tracking is per-consumer with dashboards for API owners.
|
|
44
|
+
- Check that API standards are enforced via automated linting and gateway policies.
|
|
45
|
+
|
|
46
|
+
## Self-check before task completion
|
|
47
|
+
|
|
48
|
+
- [ ] API catalog is searchable and includes 100% of internal APIs with ownership and specs.
|
|
49
|
+
- [ ] API portal enables discovery-to-first-call in under 15 minutes.
|
|
50
|
+
- [ ] Versioning governance enforces consistent strategy across all APIs.
|
|
51
|
+
- [ ] Deprecation workflow includes sunset headers, monitoring, and 6-month grace period.
|
|
52
|
+
- [ ] Developer onboarding is self-service with API key provisioning and sandbox access.
|
|
53
|
+
- [ ] Consumer management tracks per-team usage with quota limits and alerts.
|
|
54
|
+
- [ ] Usage tracking provides per-consumer metrics to API owners via dashboard.
|
|
55
|
+
- [ ] API lifecycle governance enforces deprecation policies automatically.
|
|
56
|
+
- [ ] Internal API standards are enforced via linting and API gateway policies.
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: api-versioning
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.0.7
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: api version strategy, api deprecation lifecycle, breaking change detection, consumer contract strategy, sunset header strategy, version negotiation, api migration guide, backward compatibility strategy, api evolution pattern, api lifecycle management, api sunset policy, deprecation timeline
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# API Versioning
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
This skill activates when the user is designing, implementing, or managing API
|
|
14
|
+
versioning strategies. This includes choosing versioning schemes (URL, header, query),
|
|
15
|
+
managing deprecation lifecycles, detecting breaking changes, implementing consumer-driven
|
|
16
|
+
contracts, designing sunset policies, creating migration guides for consumers, and
|
|
17
|
+
planning backward-compatible API evolution.
|
|
18
|
+
|
|
19
|
+
## Mandatory actions
|
|
20
|
+
|
|
21
|
+
### Before
|
|
22
|
+
|
|
23
|
+
1. Identify the API type (REST, GraphQL, gRPC, event-driven) and existing versioning approach.
|
|
24
|
+
2. Determine the consumer landscape (internal teams, external partners, public developers).
|
|
25
|
+
3. Assess the current API lifecycle stage (greenfield, stable, legacy with many consumers).
|
|
26
|
+
4. Review existing breaking change history and consumer migration friction.
|
|
27
|
+
5. Check for contractual SLA obligations around API stability and deprecation timelines.
|
|
28
|
+
|
|
29
|
+
### During
|
|
30
|
+
|
|
31
|
+
**Versioning Strategies:**
|
|
32
|
+
- **URL Path (`/v1/`, `/v2/`):** Most explicit, easiest for consumers to understand. Best for public APIs. Downside: duplicates route definitions.
|
|
33
|
+
- **Header (`Accept: application/vnd.api+json;version=2`):** Cleaner URLs, version in content negotiation. Best for APIs with many versions. Downside: harder to test in browser.
|
|
34
|
+
- **Query Parameter (`?version=2`):** Easy to implement, visible in URLs. Best for internal APIs. Downside: pollutes query string, caching complexity.
|
|
35
|
+
- **No versioning (additive-only):** Evolve by only adding, never removing. Best for GraphQL. Downside: field bloat over time.
|
|
36
|
+
- Choose ONE strategy per API surface. Do not mix approaches.
|
|
37
|
+
|
|
38
|
+
**Breaking vs Non-Breaking Changes:**
|
|
39
|
+
- **Breaking (requires new version):** Field removal, type change, adding required field, changing response structure, removing endpoint, changing authentication, altering error codes.
|
|
40
|
+
- **Non-breaking (safe to deploy):** Adding optional field, adding new endpoint, adding optional query parameter, adding new enum value (if consumer ignores unknown), relaxing validation.
|
|
41
|
+
- When in doubt, treat it as breaking. Consumer assumptions are hard to predict.
|
|
42
|
+
|
|
43
|
+
**Deprecation Lifecycle:**
|
|
44
|
+
- **Phase 1 — Announce:** Document deprecation in changelog, API docs, and developer portal. Set `Sunset` header (RFC 8594) with target date.
|
|
45
|
+
- **Phase 2 — Sunset Header:** Return `Sunset: <date>` and `Deprecation: true` headers on every response from deprecated endpoints.
|
|
46
|
+
- **Phase 3 — Migration Period:** Minimum 6 months for external APIs, 3 months for internal. Provide migration guide with code examples.
|
|
47
|
+
- **Phase 4 — Usage Monitoring:** Track deprecated endpoint usage. Reach out to remaining consumers directly.
|
|
48
|
+
- **Phase 5 — Removal:** Return 410 Gone with a body pointing to the new version. Remove after usage drops to zero (or contractual deadline).
|
|
49
|
+
|
|
50
|
+
**Consumer-Driven Contracts:**
|
|
51
|
+
- Consumers declare what fields/endpoints they actually use (contract).
|
|
52
|
+
- Provider runs consumer contracts as part of CI (Pact, Spring Cloud Contract).
|
|
53
|
+
- Breaking changes are detected automatically when a provider change violates a consumer contract.
|
|
54
|
+
- Reduces false positives: only truly consumed features are protected.
|
|
55
|
+
- Each consumer maintains their own contract; provider tests against all.
|
|
56
|
+
|
|
57
|
+
**Sunset Header (RFC 8594):**
|
|
58
|
+
- Format: `Sunset: Sat, 01 Jan 2028 00:00:00 GMT`
|
|
59
|
+
- Accompanies `Deprecation: true` header.
|
|
60
|
+
- Signals to automated tooling when an endpoint will be removed.
|
|
61
|
+
- Include `Link` header pointing to migration documentation.
|
|
62
|
+
- Example: `Link: <https://api.example.com/docs/migrate-v1-v2>; rel="sunset"`
|
|
63
|
+
|
|
64
|
+
**Migration Guides:**
|
|
65
|
+
- One guide per breaking change (not per version — granularity matters).
|
|
66
|
+
- Include: what changed, why, before/after code examples, timeline.
|
|
67
|
+
- Provide automated migration tooling where possible (codemods, SDK upgrades).
|
|
68
|
+
- Offer a compatibility shim or adapter layer for complex migrations.
|
|
69
|
+
- Test migration guide accuracy with a sample consumer before publishing.
|
|
70
|
+
|
|
71
|
+
**Version Negotiation:**
|
|
72
|
+
- Default to latest stable version if no version specified (for new consumers).
|
|
73
|
+
- Return `API-Version` response header confirming which version served the request.
|
|
74
|
+
- Support version discovery endpoint (`GET /versions` or API docs endpoint).
|
|
75
|
+
- For header-based versioning, return 406 Not Acceptable if version is unsupported.
|
|
76
|
+
|
|
77
|
+
**Backward Compatibility Strategies:**
|
|
78
|
+
- Tolerant reader: consumers ignore unknown fields (Postel's law).
|
|
79
|
+
- Additive evolution: only add, never remove or rename.
|
|
80
|
+
- Envelope pattern: wrap responses so structure can evolve independently.
|
|
81
|
+
- Feature flags: toggle new behavior per consumer via API keys or headers.
|
|
82
|
+
|
|
83
|
+
### After
|
|
84
|
+
|
|
85
|
+
1. Verify the chosen versioning strategy is consistently applied across all endpoints.
|
|
86
|
+
2. Confirm deprecated endpoints include `Sunset` and `Deprecation` headers.
|
|
87
|
+
3. Validate migration guides include before/after code examples.
|
|
88
|
+
4. Check that consumer-driven contracts run in CI and detect breaking changes.
|
|
89
|
+
5. Ensure monitoring tracks deprecated endpoint usage for removal decisions.
|
|
90
|
+
|
|
91
|
+
## Self-check before task completion
|
|
92
|
+
|
|
93
|
+
- [ ] A single versioning strategy is chosen and applied consistently.
|
|
94
|
+
- [ ] Breaking vs non-breaking changes are clearly categorized.
|
|
95
|
+
- [ ] Deprecation lifecycle includes announcement, sunset headers, migration period, and removal.
|
|
96
|
+
- [ ] Migration period meets minimum duration (6 months external, 3 months internal).
|
|
97
|
+
- [ ] Consumer-driven contracts detect breaking changes automatically in CI.
|
|
98
|
+
- [ ] Sunset headers conform to RFC 8594 with linked documentation.
|
|
99
|
+
- [ ] Migration guides provide per-change code examples.
|
|
100
|
+
- [ ] Deprecated endpoint usage is monitored to inform removal timing.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: app-store-deployment
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.4.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: app store deployment, release management mobile, staged rollout mobile, app store compliance, app review guideline, mobile A/B testing, app store optimization deployment, mobile release pipeline, code push update, hot patch mobile, mobile feature flags, app store submission
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill — App Store Deployment & Release Management
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
This skill activates when managing mobile app releases, including app store submissions, staged rollouts, A/B testing, release automation, code push updates, or ensuring compliance with platform guidelines.
|
|
13
|
+
|
|
14
|
+
## Mandatory actions when this skill is active
|
|
15
|
+
|
|
16
|
+
### Before writing any code
|
|
17
|
+
1. Review App Store Review Guidelines (iOS) and Google Play policies (Android) to ensure compliance
|
|
18
|
+
2. Establish release checklist: version bumps, changelog, screenshots, metadata, certificates, entitlements
|
|
19
|
+
3. Plan rollout strategy: percentage-based staged rollout, internal testing groups, beta testing timelines
|
|
20
|
+
4. Configure feature flags or code push mechanism for post-release updates without app store review
|
|
21
|
+
|
|
22
|
+
### During implementation
|
|
23
|
+
- Implement proper build versioning (semantic versioning, build numbers, consistent across platforms)
|
|
24
|
+
- Use Fastlane or similar automation for code signing, building, uploading, and screenshot generation
|
|
25
|
+
- Configure app store metadata, descriptions, keywords, categories, and age ratings correctly
|
|
26
|
+
- Set up staged rollout configuration (Google Play: percentage rollout, iOS: phased release)
|
|
27
|
+
- Implement A/B testing framework with proper analytics events and experiment tracking
|
|
28
|
+
- Use code push (CodePush, Expo Updates) for JavaScript-only changes that don't require app store review
|
|
29
|
+
- Prepare app store assets: screenshots (all required device sizes), app previews, promotional text
|
|
30
|
+
|
|
31
|
+
### After implementation
|
|
32
|
+
- Submit to internal testing tracks first (TestFlight, Google Play Internal Testing) before production
|
|
33
|
+
- Monitor crash rates and user feedback during staged rollout, pause if issues detected
|
|
34
|
+
- Track rollout metrics: adoption rate, crash-free sessions, key performance indicators
|
|
35
|
+
- Respond to app review feedback promptly with clarifications or necessary changes
|
|
36
|
+
- Validate that all app store links, privacy policy URLs, and support contacts are functional
|
|
37
|
+
|
|
38
|
+
## Self-check before task completion
|
|
39
|
+
- [ ] App complies with platform guidelines (no private API usage, proper permission descriptions, content policies)
|
|
40
|
+
- [ ] Release pipeline is automated with minimal manual steps (Fastlane, GitHub Actions, Bitrise, CircleCI)
|
|
41
|
+
- [ ] Staged rollout is configured to gradually release to users with ability to halt if issues arise
|
|
42
|
+
- [ ] Feature flags are in place for high-risk features to enable quick rollback without new submission
|
|
43
|
+
- [ ] App store metadata is complete, optimized, and localized for target markets
|
|
44
|
+
- [ ] Monitoring and alerting are configured to detect issues during rollout (crash rates, performance regressions)
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architecture-tradeoff-analysis
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.1.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: architecture tradeoff, ATAM, quality attribute scenario, sensitivity point, tradeoff point, risk theme, architecture evaluation, quality attribute tradeoff, architecture decision quality, non-functional tradeoff, architecture risk, scenario-based evaluation
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Architecture Tradeoff Analysis Method (ATAM)
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
This skill activates when the team needs to evaluate architectural decisions against
|
|
14
|
+
competing quality attributes, identify sensitivity and tradeoff points, or assess
|
|
15
|
+
architectural risk. It implements the ATAM methodology for systematic architecture
|
|
16
|
+
evaluation using scenario-based analysis.
|
|
17
|
+
|
|
18
|
+
## Mandatory actions when this skill is active
|
|
19
|
+
|
|
20
|
+
### Before
|
|
21
|
+
|
|
22
|
+
1. **Present the architecture** — Document the current or proposed architecture with
|
|
23
|
+
sufficient detail: components, connectors, deployment topology, key design decisions,
|
|
24
|
+
and the rationale behind major choices.
|
|
25
|
+
2. **Identify stakeholders** — List all parties with quality attribute concerns
|
|
26
|
+
(developers, ops, security, product, business).
|
|
27
|
+
3. **Elicit quality attributes** — Gather the quality attributes that matter most for
|
|
28
|
+
this system from stakeholder interviews.
|
|
29
|
+
|
|
30
|
+
### During
|
|
31
|
+
|
|
32
|
+
4. **Define quality attributes under evaluation:**
|
|
33
|
+
- **Performance** — Latency, throughput, resource utilization targets.
|
|
34
|
+
- **Availability** — Uptime requirements, failover behavior, recovery time.
|
|
35
|
+
- **Security** — Authentication, authorization, data protection, audit requirements.
|
|
36
|
+
- **Modifiability** — Cost of change, deployment independence, backward compatibility.
|
|
37
|
+
- **Testability** — Isolation capability, observability, deterministic behavior.
|
|
38
|
+
- **Usability** — Learnability, efficiency, error recovery for operators and users.
|
|
39
|
+
- **Scalability** — Growth handling, elasticity, degradation under load.
|
|
40
|
+
|
|
41
|
+
5. **Generate quality attribute scenarios** (for each relevant attribute):
|
|
42
|
+
- **Source** — Who or what causes the stimulus?
|
|
43
|
+
- **Stimulus** — What event or condition triggers the scenario?
|
|
44
|
+
- **Artifact** — What part of the system is affected?
|
|
45
|
+
- **Environment** — Under what conditions (normal, peak, degraded)?
|
|
46
|
+
- **Response** — What should the system do?
|
|
47
|
+
- **Response measure** — How do we know the response was acceptable?
|
|
48
|
+
|
|
49
|
+
6. **Analyze via architectural approaches:**
|
|
50
|
+
- Map each scenario to the architectural decisions that address it.
|
|
51
|
+
- Identify which architectural patterns, tactics, or styles are employed.
|
|
52
|
+
- Assess whether the approach adequately satisfies the scenario's response measure.
|
|
53
|
+
|
|
54
|
+
7. **Identify sensitivity points:**
|
|
55
|
+
- A sensitivity point is an architectural decision that critically affects ONE
|
|
56
|
+
quality attribute.
|
|
57
|
+
- Document: "If we change X, quality attribute Y is significantly affected."
|
|
58
|
+
- These are single-attribute risks.
|
|
59
|
+
|
|
60
|
+
8. **Identify tradeoff points:**
|
|
61
|
+
- A tradeoff point is an architectural decision that affects MULTIPLE quality
|
|
62
|
+
attributes in opposing directions.
|
|
63
|
+
- Document: "Decision X improves attribute Y but degrades attribute Z."
|
|
64
|
+
- These are the hardest decisions and require explicit stakeholder prioritization.
|
|
65
|
+
|
|
66
|
+
9. **Generate risk themes:**
|
|
67
|
+
- Cluster related sensitivity and tradeoff points into themes.
|
|
68
|
+
- Name each theme descriptively (e.g., "Performance vs. Security tension in
|
|
69
|
+
the authentication layer").
|
|
70
|
+
- Prioritize risk themes by business impact and likelihood.
|
|
71
|
+
|
|
72
|
+
10. **Propose mitigations:**
|
|
73
|
+
- For each high-priority risk theme, propose architectural alternatives or
|
|
74
|
+
complementary tactics.
|
|
75
|
+
- Assess whether mitigations introduce new tradeoffs.
|
|
76
|
+
|
|
77
|
+
### After
|
|
78
|
+
|
|
79
|
+
11. **Document findings** — Produce an ATAM report with: architecture overview, quality
|
|
80
|
+
attribute tree, scenario table, sensitivity points, tradeoff points, risk themes,
|
|
81
|
+
and recommended actions.
|
|
82
|
+
12. **Prioritize with stakeholders** — Present tradeoff points to stakeholders for
|
|
83
|
+
explicit priority decisions. Record their choices.
|
|
84
|
+
13. **Feed into ADRs** — Convert key decisions into Architecture Decision Records with
|
|
85
|
+
tradeoff rationale preserved.
|
|
86
|
+
|
|
87
|
+
## Self-check before task completion
|
|
88
|
+
|
|
89
|
+
- [ ] Architecture presented with sufficient detail for analysis
|
|
90
|
+
- [ ] Quality attributes identified and prioritized by stakeholders
|
|
91
|
+
- [ ] At least 3 quality attribute scenarios generated per relevant attribute
|
|
92
|
+
- [ ] Sensitivity points identified and documented
|
|
93
|
+
- [ ] Tradeoff points identified with opposing quality attributes named
|
|
94
|
+
- [ ] Risk themes generated from clustered findings
|
|
95
|
+
- [ ] Stakeholder priorities recorded for tradeoff resolution
|
|
96
|
+
- [ ] Mitigations proposed for high-priority risk themes
|
|
97
|
+
- [ ] ATAM findings documented in a shareable format
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audit-logging
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 0.3.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: audit logging, immutable audit trail, audit event, who what when why, retention policy, compliance logging, tamper detection, audit query, audit archival, audit schema, change tracking, audit correlation
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill — Audit Logging
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
Any task involving audit trails, compliance logging, change tracking, tamper detection,
|
|
13
|
+
event recording for accountability, or data retention policies.
|
|
14
|
+
|
|
15
|
+
## Mandatory actions when this skill is active
|
|
16
|
+
|
|
17
|
+
### Before implementing audit logging
|
|
18
|
+
1. Identify what events must be audited (regulatory + business requirements).
|
|
19
|
+
2. Define the retention policy (how long, where stored, who can access).
|
|
20
|
+
3. Design the event schema before writing any code.
|
|
21
|
+
|
|
22
|
+
### Event schema (the 5 Ws)
|
|
23
|
+
|
|
24
|
+
Every audit event MUST capture:
|
|
25
|
+
|
|
26
|
+
| Field | Description | Example |
|
|
27
|
+
|-------|-------------|---------|
|
|
28
|
+
| **who** | user_id, IP address, session_id, service account | `{ userId: "u-123", ip: "10.0.1.5", sessionId: "sess-abc" }` |
|
|
29
|
+
| **what** | action performed, resource affected, changes made | `{ action: "update", resource: "user/u-456", changes: { email: { from: "old@x.com", to: "new@x.com" } } }` |
|
|
30
|
+
| **when** | UTC timestamp, monotonic sequence number | `{ timestamp: "2025-01-15T10:30:00Z", sequence: 1042 }` |
|
|
31
|
+
| **why** | correlation_id, request_id, triggering event | `{ correlationId: "req-789", trigger: "user_request" }` |
|
|
32
|
+
| **outcome** | success or failure, error details if failed | `{ status: "success" }` or `{ status: "failure", error: "permission_denied" }` |
|
|
33
|
+
|
|
34
|
+
### Immutability guarantees
|
|
35
|
+
|
|
36
|
+
**Append-only storage:**
|
|
37
|
+
- Audit table has NO UPDATE or DELETE permissions for application roles.
|
|
38
|
+
- Use a dedicated audit service account with INSERT-only grants.
|
|
39
|
+
- Application database user must not have ALTER TABLE on audit tables.
|
|
40
|
+
|
|
41
|
+
**Hash chain for tamper detection:**
|
|
42
|
+
```
|
|
43
|
+
event.hash = SHA-256(event.data + previous_event.hash)
|
|
44
|
+
```
|
|
45
|
+
- Each event references the hash of the previous event.
|
|
46
|
+
- Broken chain = tampering detected.
|
|
47
|
+
- Verify chain integrity on scheduled basis (daily audit job).
|
|
48
|
+
|
|
49
|
+
**Alternative: immutable storage backends:**
|
|
50
|
+
- AWS QLDB (purpose-built immutable ledger).
|
|
51
|
+
- Object storage with Object Lock (S3 with WORM).
|
|
52
|
+
- Append-only Kafka topic with compaction disabled.
|
|
53
|
+
|
|
54
|
+
### Retention policy
|
|
55
|
+
|
|
56
|
+
| Tier | Duration | Storage | Access |
|
|
57
|
+
|------|----------|---------|--------|
|
|
58
|
+
| Hot | 90 days | Primary database (indexed) | Real-time query |
|
|
59
|
+
| Warm | 1 year | Object storage (Parquet/JSON) | Query via data warehouse |
|
|
60
|
+
| Cold | 7+ years | Compressed archive (Glacier/equivalent) | Manual retrieval |
|
|
61
|
+
|
|
62
|
+
**Rules:**
|
|
63
|
+
- Define retention per event type (auth events may need longer than UI events).
|
|
64
|
+
- Automate tier transitions (cron job moves hot → warm → cold).
|
|
65
|
+
- Deletion must be cryptographic (delete encryption key, not data) for compliance.
|
|
66
|
+
- Document retention policy in compliance documentation.
|
|
67
|
+
|
|
68
|
+
### What to audit (mandatory events)
|
|
69
|
+
|
|
70
|
+
**Authentication:**
|
|
71
|
+
- Login success and failure (with failure reason).
|
|
72
|
+
- Logout.
|
|
73
|
+
- Password change / reset.
|
|
74
|
+
- MFA enrollment / removal.
|
|
75
|
+
- Session creation and termination.
|
|
76
|
+
|
|
77
|
+
**Authorization:**
|
|
78
|
+
- Permission grants and revocations.
|
|
79
|
+
- Role assignments and removals.
|
|
80
|
+
- Access denied events.
|
|
81
|
+
|
|
82
|
+
**Data mutations:**
|
|
83
|
+
- Create, update, delete of business entities.
|
|
84
|
+
- Bulk operations (with count and scope).
|
|
85
|
+
- Data exports and downloads.
|
|
86
|
+
|
|
87
|
+
**Admin actions:**
|
|
88
|
+
- Configuration changes.
|
|
89
|
+
- User account management (create, disable, delete).
|
|
90
|
+
- System setting modifications.
|
|
91
|
+
|
|
92
|
+
**Failed access attempts:**
|
|
93
|
+
- Rate limit violations.
|
|
94
|
+
- Invalid token usage.
|
|
95
|
+
- Attempts to access other tenants' data.
|
|
96
|
+
|
|
97
|
+
### Querying audit logs
|
|
98
|
+
|
|
99
|
+
**Required indexes:**
|
|
100
|
+
- `user_id` — "show me everything user X did."
|
|
101
|
+
- `resource_id` — "show me everything that happened to resource Y."
|
|
102
|
+
- `timestamp` — "show me events in time range."
|
|
103
|
+
- `action` — "show me all delete events."
|
|
104
|
+
- `correlation_id` — "show me the full request chain."
|
|
105
|
+
|
|
106
|
+
**Search capabilities:**
|
|
107
|
+
- Full-text search on action descriptions.
|
|
108
|
+
- Filter by outcome (success/failure).
|
|
109
|
+
- Aggregate by user, resource, or time window.
|
|
110
|
+
|
|
111
|
+
### Implementation patterns
|
|
112
|
+
|
|
113
|
+
**Middleware/interceptor approach:**
|
|
114
|
+
```
|
|
115
|
+
Request → [Auth] → [Audit: log attempt] → Handler → [Audit: log outcome] → Response
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
**Event-driven approach:**
|
|
119
|
+
- Domain events trigger audit entries asynchronously.
|
|
120
|
+
- Decouples audit from business logic.
|
|
121
|
+
- Risk: event loss if queue fails (use durable queue with DLQ).
|
|
122
|
+
|
|
123
|
+
**Database trigger approach:**
|
|
124
|
+
- PostgreSQL triggers capture all changes automatically.
|
|
125
|
+
- No application code needed — cannot be bypassed.
|
|
126
|
+
- Downside: less context (no user_id unless set in session).
|
|
127
|
+
|
|
128
|
+
### Anti-patterns
|
|
129
|
+
|
|
130
|
+
- Logging sensitive data in audit trail (passwords, full credit card numbers).
|
|
131
|
+
- Audit log in same table/database as business data (lifecycle coupling).
|
|
132
|
+
- Synchronous audit blocking the business transaction.
|
|
133
|
+
- No alerting on audit failures (silent data loss).
|
|
134
|
+
- Audit logs accessible to the application for modification.
|
|
135
|
+
|
|
136
|
+
## Self-check before task completion
|
|
137
|
+
- [ ] Did I follow the mandatory actions for this skill?
|
|
138
|
+
- [ ] Did I apply the patterns appropriate to the context?
|
|
139
|
+
- [ ] Did I verify the implementation meets the criteria above?
|
|
140
|
+
- [ ] Did I document decisions and trade-offs made?
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: auth-patterns
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 0.1.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: auth architecture design, oauth2 flow design, oidc implementation, session strategy design, jwt architecture pattern, token rotation strategy, mfa flow design, social login integration, rbac model design, abac policy engine, authorization architecture, identity provider pattern
|
|
7
|
+
compose: guardrails-and-safety
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Skill — Auth Patterns
|
|
11
|
+
|
|
12
|
+
## When this skill activates
|
|
13
|
+
Any task involving authentication flow design, authorization model selection,
|
|
14
|
+
token lifecycle management, MFA implementation, or identity provider integration.
|
|
15
|
+
|
|
16
|
+
## Mandatory actions when this skill is active
|
|
17
|
+
|
|
18
|
+
### Before writing any code
|
|
19
|
+
1. Identify the auth requirements: Who are the users? What are the trust boundaries?
|
|
20
|
+
2. Select the appropriate OAuth2 flow for the client type.
|
|
21
|
+
3. Decide between sessions and JWTs based on revocation requirements.
|
|
22
|
+
4. Map out the authorization model (RBAC vs ABAC vs hybrid).
|
|
23
|
+
|
|
24
|
+
### During implementation
|
|
25
|
+
- Never store plain-text credentials anywhere.
|
|
26
|
+
- Use short-lived access tokens (15 min max) with long-lived refresh tokens (7 days max).
|
|
27
|
+
- Implement token rotation on every refresh (detect reuse = compromised).
|
|
28
|
+
- Check permissions in code, never roles directly.
|
|
29
|
+
- Log every auth failure with context (IP, user agent, timestamp).
|
|
30
|
+
|
|
31
|
+
### After implementation
|
|
32
|
+
- Verify no auth bypass exists on any protected route.
|
|
33
|
+
- Test token expiration and refresh flows end-to-end.
|
|
34
|
+
- Confirm MFA cannot be bypassed via API directly.
|
|
35
|
+
- Run security scan on auth-related endpoints.
|
|
36
|
+
|
|
37
|
+
## OAuth2 Flows
|
|
38
|
+
|
|
39
|
+
### Authorization Code + PKCE (SPAs, Mobile)
|
|
40
|
+
```
|
|
41
|
+
1. Client generates code_verifier + code_challenge
|
|
42
|
+
2. Redirect to /authorize with code_challenge
|
|
43
|
+
3. User authenticates, IdP redirects with auth_code
|
|
44
|
+
4. Client exchanges auth_code + code_verifier for tokens
|
|
45
|
+
5. IdP verifies challenge, returns access + refresh tokens
|
|
46
|
+
```
|
|
47
|
+
Use for: Browser apps, mobile apps, any public client.
|
|
48
|
+
|
|
49
|
+
### Client Credentials (Machine-to-Machine)
|
|
50
|
+
```
|
|
51
|
+
1. Service sends client_id + client_secret to /token
|
|
52
|
+
2. IdP returns access token (no refresh token needed)
|
|
53
|
+
3. Service uses access token for API calls
|
|
54
|
+
```
|
|
55
|
+
Use for: Backend services, cron jobs, microservice-to-microservice.
|
|
56
|
+
|
|
57
|
+
### Device Authorization (CLI, TV)
|
|
58
|
+
```
|
|
59
|
+
1. Device requests device_code + user_code from /device/authorize
|
|
60
|
+
2. User visits verification URL, enters user_code
|
|
61
|
+
3. Device polls /token until user completes auth
|
|
62
|
+
```
|
|
63
|
+
Use for: CLI tools, IoT devices, smart TVs.
|
|
64
|
+
|
|
65
|
+
## Session vs JWT
|
|
66
|
+
|
|
67
|
+
### Sessions (Server-Side)
|
|
68
|
+
- **Pros**: Instantly revocable, smaller payload, server controls lifetime.
|
|
69
|
+
- **Cons**: Requires session store (Redis), sticky sessions or shared store in distributed systems.
|
|
70
|
+
- **Use when**: You need instant revocation, have a monolith or can share session store.
|
|
71
|
+
|
|
72
|
+
### JWT (Stateless)
|
|
73
|
+
- **Pros**: No server-side storage, works across services, self-contained claims.
|
|
74
|
+
- **Cons**: Cannot revoke until expiry (unless you add a blocklist, negating statelessness).
|
|
75
|
+
- **Use when**: Microservices, short-lived tokens acceptable, combined with refresh token rotation.
|
|
76
|
+
|
|
77
|
+
### Hybrid (Recommended)
|
|
78
|
+
- Short-lived JWT access token (15 min) — never stored server-side.
|
|
79
|
+
- Long-lived refresh token (7 days) — stored server-side, rotated on each use.
|
|
80
|
+
- Revoke by deleting refresh token and waiting for access token expiry.
|
|
81
|
+
|
|
82
|
+
## Token Rotation
|
|
83
|
+
```
|
|
84
|
+
1. Client sends refresh_token to /token
|
|
85
|
+
2. Server issues NEW access_token + NEW refresh_token
|
|
86
|
+
3. Server invalidates the OLD refresh_token
|
|
87
|
+
4. If old refresh_token is used again → COMPROMISED
|
|
88
|
+
5. Revoke entire token family (all refresh tokens for this session)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## MFA Implementation
|
|
92
|
+
|
|
93
|
+
### TOTP (Time-Based One-Time Password) — Preferred
|
|
94
|
+
- Generate shared secret, encode as QR code for authenticator apps.
|
|
95
|
+
- Verify with time-window tolerance (±1 step = 30 seconds).
|
|
96
|
+
- Store backup codes (hashed) for account recovery.
|
|
97
|
+
|
|
98
|
+
### WebAuthn / Passkeys — Most Secure
|
|
99
|
+
- Phishing-resistant (bound to origin).
|
|
100
|
+
- No shared secrets to steal.
|
|
101
|
+
- Use as primary or second factor.
|
|
102
|
+
|
|
103
|
+
### SMS — Last Resort
|
|
104
|
+
- Vulnerable to SIM swapping.
|
|
105
|
+
- Use only if no alternative and combine with other signals.
|
|
106
|
+
|
|
107
|
+
## Authorization Models
|
|
108
|
+
|
|
109
|
+
### RBAC (Role-Based Access Control)
|
|
110
|
+
```
|
|
111
|
+
User → Role → Permissions → Actions
|
|
112
|
+
|
|
113
|
+
// In code: check PERMISSION, not ROLE
|
|
114
|
+
if (user.hasPermission('posts:delete')) { ... }
|
|
115
|
+
// NOT: if (user.role === 'admin') { ... }
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### ABAC (Attribute-Based Access Control)
|
|
119
|
+
```
|
|
120
|
+
Policy: user.department === resource.department AND user.clearance >= resource.classification
|
|
121
|
+
|
|
122
|
+
// More flexible than RBAC, but harder to audit
|
|
123
|
+
const allowed = evaluatePolicy(user.attributes, resource.attributes, action);
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Hybrid (RBAC + ABAC)
|
|
127
|
+
- Use RBAC for coarse-grained access (can this user access this module?).
|
|
128
|
+
- Use ABAC for fine-grained rules (can this user edit THIS specific resource?).
|
|
129
|
+
|
|
130
|
+
## Anti-patterns to avoid
|
|
131
|
+
- Storing JWT in localStorage (XSS vulnerable — use httpOnly cookies or memory).
|
|
132
|
+
- Checking roles instead of permissions in application code.
|
|
133
|
+
- Long-lived access tokens without refresh rotation.
|
|
134
|
+
- MFA bypass via direct API calls (always enforce server-side).
|
|
135
|
+
- Shared secrets in client-side code.
|
|
136
|
+
- Missing auth on internal/admin routes ("it's internal" is not security).
|
|
137
|
+
|
|
138
|
+
## Self-check before task completion
|
|
139
|
+
|
|
140
|
+
Before marking a task done when this skill was active:
|
|
141
|
+
|
|
142
|
+
- [ ] No plain-text credentials stored anywhere?
|
|
143
|
+
- [ ] Access tokens are short-lived (≤15 min)?
|
|
144
|
+
- [ ] Refresh token rotation implemented and reuse detected?
|
|
145
|
+
- [ ] Permissions checked in code (not roles)?
|
|
146
|
+
- [ ] Every protected route has auth middleware?
|
|
147
|
+
- [ ] Auth failures logged with sufficient context?
|
|
148
|
+
- [ ] MFA cannot be bypassed via API?
|