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,218 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: autonomous-agent-harness
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.0.6
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: autonomous harness, persistent agent, background agent, scheduled execution, agent cron, task queue agent, self-monitoring agent, persistent memory agent, long-running agent, agent daemon, agent lifecycle, always-on agent
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill — Autonomous Agent Harness
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
When designing, implementing, or operating agents that persist beyond single
|
|
14
|
+
conversation sessions. Use when building infrastructure for agents that run on
|
|
15
|
+
schedules, maintain state across invocations, process task queues, self-monitor
|
|
16
|
+
their health, or operate as background daemons.
|
|
17
|
+
|
|
18
|
+
This skill covers the architecture layer between "single-shot agent conversation"
|
|
19
|
+
and "production autonomous system" — the harness that manages lifecycle, memory,
|
|
20
|
+
scheduling, and self-regulation.
|
|
21
|
+
|
|
22
|
+
## Mandatory actions when this skill is active
|
|
23
|
+
|
|
24
|
+
### Before designing the harness
|
|
25
|
+
|
|
26
|
+
1. **Define the autonomy level:**
|
|
27
|
+
|
|
28
|
+
| Level | Description | Human oversight | Example |
|
|
29
|
+
|-------|-------------|-----------------|---------|
|
|
30
|
+
| L1 — Scheduled | Runs on cron, reports results | Review output post-run | Daily code review bot |
|
|
31
|
+
| L2 — Reactive | Triggers on events, acts within bounds | Alert on anomaly | PR auto-labeler |
|
|
32
|
+
| L3 — Proactive | Identifies tasks, proposes actions | Approve before execute | Dependency updater |
|
|
33
|
+
| L4 — Autonomous | Full loop with self-correction | Exception-only review | Incident responder |
|
|
34
|
+
|
|
35
|
+
2. **Identify persistence requirements:**
|
|
36
|
+
- What state must survive between sessions? (task history, learned patterns, config)
|
|
37
|
+
- What is the acceptable data loss window? (none, last hour, last day)
|
|
38
|
+
- What is the memory format? (markdown files, SQLite, MCP server, JSON)
|
|
39
|
+
- How large will accumulated state grow over time?
|
|
40
|
+
|
|
41
|
+
3. **Define boundaries and kill switches:**
|
|
42
|
+
- Maximum actions per invocation (prevent runaway loops)
|
|
43
|
+
- Maximum cost per session (token budget ceiling)
|
|
44
|
+
- Forbidden actions list (no force-push, no production deploys without approval)
|
|
45
|
+
- Human escalation triggers (confidence < threshold, high-impact decisions)
|
|
46
|
+
- Emergency stop mechanism (file-based kill switch, API endpoint)
|
|
47
|
+
|
|
48
|
+
### During harness implementation
|
|
49
|
+
|
|
50
|
+
**Core architecture components:**
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
+------------------+ +------------------+ +------------------+
|
|
54
|
+
| Scheduler |---->| Task Queue |---->| Agent Core |
|
|
55
|
+
| (cron/events) | | (FIFO+priority) | | (LLM session) |
|
|
56
|
+
+------------------+ +------------------+ +------------------+
|
|
57
|
+
|
|
|
58
|
+
+------------------+ |
|
|
59
|
+
| Self-Monitor |<-----------+
|
|
60
|
+
| (health/budget) | |
|
|
61
|
+
+------------------+ v
|
|
62
|
+
+------------------+
|
|
63
|
+
+------------------+ | Persistent |
|
|
64
|
+
| Kill Switch | | Memory |
|
|
65
|
+
| (emergency stop)| | (MCP/markdown) |
|
|
66
|
+
+------------------+ +------------------+
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**1. Persistent Memory System:**
|
|
70
|
+
```
|
|
71
|
+
.agent-harness/
|
|
72
|
+
memory/
|
|
73
|
+
knowledge-base.md # Accumulated learnings and patterns
|
|
74
|
+
task-history.jsonl # Every task executed with outcome
|
|
75
|
+
config.json # Runtime configuration
|
|
76
|
+
state.json # Current operational state
|
|
77
|
+
queues/
|
|
78
|
+
pending.jsonl # Tasks awaiting execution
|
|
79
|
+
in-progress.jsonl # Currently executing tasks
|
|
80
|
+
completed.jsonl # Finished tasks (rotate after 30 days)
|
|
81
|
+
dead-letter.jsonl # Failed tasks after max retries
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
- Knowledge base uses markdown for human-readable, agent-writable state
|
|
85
|
+
- Task history is append-only JSONL for auditability
|
|
86
|
+
- State file tracks: last run time, current task, health metrics, budget remaining
|
|
87
|
+
- Integration with MindForge memory: read from `.mindforge/memory/`, write learnings back
|
|
88
|
+
|
|
89
|
+
**2. Scheduled Execution:**
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"schedules": [
|
|
93
|
+
{
|
|
94
|
+
"name": "daily-review",
|
|
95
|
+
"cron": "0 9 * * 1-5",
|
|
96
|
+
"task": "review-open-prs",
|
|
97
|
+
"timeout_minutes": 30,
|
|
98
|
+
"max_retries": 2
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"name": "continuous-monitor",
|
|
102
|
+
"interval_minutes": 15,
|
|
103
|
+
"task": "check-deployments",
|
|
104
|
+
"timeout_minutes": 5,
|
|
105
|
+
"max_retries": 1
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
- Cron expressions for periodic tasks
|
|
112
|
+
- Interval-based polling for monitoring
|
|
113
|
+
- Event-triggered execution (webhook, file watcher, git hook)
|
|
114
|
+
- Each schedule entry defines timeout and retry policy independently
|
|
115
|
+
|
|
116
|
+
**3. Task Queue:**
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"id": "task-uuid",
|
|
120
|
+
"created_at": "ISO-8601",
|
|
121
|
+
"priority": 1,
|
|
122
|
+
"type": "review-pr",
|
|
123
|
+
"payload": { "pr_number": 42, "repo": "org/project" },
|
|
124
|
+
"status": "pending",
|
|
125
|
+
"attempts": 0,
|
|
126
|
+
"max_attempts": 3,
|
|
127
|
+
"timeout_seconds": 1800,
|
|
128
|
+
"dead_letter_after": 3
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
- FIFO within same priority level; higher priority preempts
|
|
133
|
+
- Retry with exponential backoff: 1min, 5min, 25min
|
|
134
|
+
- Dead letter queue for tasks that exceed max attempts
|
|
135
|
+
- Idempotency keys prevent duplicate execution
|
|
136
|
+
|
|
137
|
+
**4. Self-Monitoring:**
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"health": {
|
|
141
|
+
"last_heartbeat": "ISO-8601",
|
|
142
|
+
"consecutive_failures": 0,
|
|
143
|
+
"token_budget_remaining": 45000,
|
|
144
|
+
"token_budget_period": "daily",
|
|
145
|
+
"drift_score": 0.12,
|
|
146
|
+
"uptime_minutes": 1440
|
|
147
|
+
},
|
|
148
|
+
"alerts": [
|
|
149
|
+
{
|
|
150
|
+
"condition": "consecutive_failures > 3",
|
|
151
|
+
"action": "pause_and_notify"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
"condition": "token_budget_remaining < 5000",
|
|
155
|
+
"action": "enter_low_power_mode"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"condition": "drift_score > 0.5",
|
|
159
|
+
"action": "request_human_review"
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
- Heartbeat every execution cycle (detect stalls)
|
|
166
|
+
- Token budget tracking with low-power mode (reduce scope, not stop)
|
|
167
|
+
- Drift detection: compare recent outputs to baseline patterns
|
|
168
|
+
- Alert escalation: log → notify → pause → kill
|
|
169
|
+
|
|
170
|
+
**5. Lifecycle Management:**
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
STARTUP → RUNNING → IDLE → WAKE → RUNNING → ... → SHUTDOWN
|
|
174
|
+
| | ^
|
|
175
|
+
| +------- ERROR -----> RECOVERING ---------+
|
|
176
|
+
| |
|
|
177
|
+
+--- BLOCKED (kill switch) ----------+
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
- **Startup:** Load config, validate memory integrity, check kill switch, announce ready
|
|
181
|
+
- **Running:** Process task queue, update heartbeat, track budget
|
|
182
|
+
- **Idle:** No pending tasks, reduce polling frequency, maintain heartbeat
|
|
183
|
+
- **Wake:** New task arrived or schedule triggered, resume full operation
|
|
184
|
+
- **Recovering:** After error, attempt self-repair, reload state, retry last task
|
|
185
|
+
- **Shutdown:** Graceful — complete current task, flush state, log final report
|
|
186
|
+
- **Blocked:** Kill switch active — cease all operations, preserve state, await unblock
|
|
187
|
+
|
|
188
|
+
### After harness deployment
|
|
189
|
+
|
|
190
|
+
1. **Operational verification:**
|
|
191
|
+
- Run a canary task through the full pipeline (schedule → queue → execute → report)
|
|
192
|
+
- Verify memory persistence across restarts
|
|
193
|
+
- Test kill switch responsiveness (must halt within 1 execution cycle)
|
|
194
|
+
- Confirm dead letter queue captures failed tasks correctly
|
|
195
|
+
- Validate budget tracking accuracy
|
|
196
|
+
|
|
197
|
+
2. **Monitoring setup:**
|
|
198
|
+
- Dashboard showing: queue depth, success rate, token spend, last heartbeat
|
|
199
|
+
- Alerts for: stall (no heartbeat in 2x interval), budget exhaustion, error spike
|
|
200
|
+
- Weekly summary: tasks completed, failures, cost, learnings accumulated
|
|
201
|
+
|
|
202
|
+
3. **Maintenance cadence:**
|
|
203
|
+
- Daily: review dead letter queue, check for stale tasks
|
|
204
|
+
- Weekly: rotate completed task log, prune knowledge base, verify budget projections
|
|
205
|
+
- Monthly: review drift trends, update boundaries, assess autonomy level appropriateness
|
|
206
|
+
|
|
207
|
+
## Self-check before task completion
|
|
208
|
+
|
|
209
|
+
Before marking an autonomous harness task done:
|
|
210
|
+
|
|
211
|
+
- [ ] Did I define the autonomy level and appropriate human oversight?
|
|
212
|
+
- [ ] Did I implement all 5 core components (memory, scheduler, queue, monitor, lifecycle)?
|
|
213
|
+
- [ ] Did I define explicit boundaries (max actions, budget ceiling, forbidden actions)?
|
|
214
|
+
- [ ] Did I implement a kill switch that halts within one execution cycle?
|
|
215
|
+
- [ ] Did I set up retry logic with dead letter queue for failed tasks?
|
|
216
|
+
- [ ] Did I configure self-monitoring with escalating alert thresholds?
|
|
217
|
+
- [ ] Did I test the full lifecycle (startup through shutdown)?
|
|
218
|
+
- [ ] Did I integrate with MindForge's existing memory and autonomous engine?
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: autonomous-agents
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.5.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: autonomous agent design, agent loop architecture, tool use orchestration, AI planning system, agent self-correction, agentic workflow, agent reasoning loop, multi-agent collaboration, agent task decomposition, agent goal pursuit, agent reflection pattern, autonomous decision making
|
|
7
|
+
compose:
|
|
8
|
+
- agent-orchestration-patterns
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Autonomous Agents & Reasoning Loops
|
|
12
|
+
|
|
13
|
+
## When this skill activates
|
|
14
|
+
|
|
15
|
+
This skill activates when building autonomous agents that pursue goals independently, implement planning and reasoning loops, use tools dynamically, self-correct errors, or coordinate across multiple agents. It applies to systems where AI must operate with minimal human intervention across multi-step tasks.
|
|
16
|
+
|
|
17
|
+
## Mandatory actions when this skill is active
|
|
18
|
+
|
|
19
|
+
### Before writing any code
|
|
20
|
+
|
|
21
|
+
1. **Define agent scope and boundaries** — Specify what the agent can do (available tools, permitted actions) and cannot do (restricted tools, human approval required). Define goal structure: explicit goals (user-provided task), implicit goals (system constraints, safety rules), and emergent goals (agent-discovered subgoals). Unbounded agents are dangerous.
|
|
22
|
+
2. **Design the reasoning loop** — Choose loop architecture: ReAct (Reasoning + Acting), Plan-Act-Reflect, or Chain-of-Thought with Tool Use. Define loop termination conditions: goal achieved, max iterations reached (prevent infinite loops), error threshold exceeded, or human intervention requested. Document loop explicitly.
|
|
23
|
+
3. **Select tool inventory** — Identify tools the agent can use: APIs (web search, database queries), code execution (sandboxed interpreters), file operations (read/write), external services (send email, create tickets). For each tool, define input schema, output schema, error modes, and safety constraints (rate limits, authorization).
|
|
24
|
+
4. **Establish self-correction mechanisms** — Agents make mistakes (hallucinations, tool errors, reasoning failures). Design self-correction: validation (check outputs against constraints), reflection (analyze failures and adjust strategy), and retry logic (re-attempt with modified approach). Define max retry count to prevent infinite loops.
|
|
25
|
+
|
|
26
|
+
### During implementation
|
|
27
|
+
|
|
28
|
+
- **Implement explicit planning phase** — Before acting, the agent should decompose the goal into subtasks (task decomposition), estimate feasibility, and select tools. Plan structure: {goal, subtasks: [{action, tool, expected_outcome}], constraints, success_criteria}. Plans must be inspectable and modifiable by humans.
|
|
29
|
+
- **Design tool calling with error handling** — Wrap every tool call in try-catch with explicit error handling: retry on transient errors (network failures, rate limits), escalate on permanent errors (invalid credentials, malformed inputs), and degrade gracefully (skip optional steps, use fallback tools). Log all tool calls with inputs, outputs, and errors.
|
|
30
|
+
- **Build reflection and self-critique loops** — After each action or subtask completion, the agent should reflect: "Did this action achieve the expected outcome? If not, why? What should I try next?" Use structured reflection prompts: {action_taken, expected_outcome, actual_outcome, error_analysis, next_action}. Reflection improves multi-step task success rates by 20-40%.
|
|
31
|
+
- **Implement goal-state tracking** — Maintain explicit state: current goal, progress toward goal (% complete, subtasks finished), blockers (errors, missing information), and next planned action. State must be serializable and resumable (agent can pause and resume later). Use structured state representations (JSON, database records).
|
|
32
|
+
- **Design safety constraints** — Prevent harmful actions via pre-execution checks: validate tool inputs against safety rules (no file deletion without confirmation, no email to external addresses without review), enforce rate limits (max N API calls per minute), and require human approval for high-risk actions (financial transactions, data deletion).
|
|
33
|
+
- **Implement multi-agent coordination** — When multiple agents collaborate, define communication protocols: message passing (agents send structured messages), shared state (agents read/write common store), or supervisor coordination (central agent dispatches tasks). Avoid race conditions and deadlocks: use locks, optimistic concurrency, or single-writer patterns.
|
|
34
|
+
|
|
35
|
+
### After implementation
|
|
36
|
+
|
|
37
|
+
- **Validate goal completion accuracy** — Test the agent on a suite of goals with known correct solutions. Measure success rate (% of goals fully achieved), partial success rate (% of goals partially achieved), and failure modes (why did the agent fail?). Target: >80% success rate for well-defined goals.
|
|
38
|
+
- **Measure loop efficiency** — Track iterations per goal (how many reasoning steps until completion). More iterations = higher cost and latency. Target: <10 iterations for most tasks. If higher, improve planning quality or provide better tools.
|
|
39
|
+
- **Test self-correction effectiveness** — Simulate tool errors (API returns invalid data, file not found, timeout) and validate that the agent recovers gracefully. Measure recovery rate (% of errors successfully handled without human intervention). Target: >70% recovery rate.
|
|
40
|
+
- **Audit for infinite loops and runaway costs** — Test with adversarial goals designed to trigger infinite loops (unsolvable tasks, circular dependencies). Validate that termination conditions activate (max iterations, timeout, error threshold). Monitor token usage and cost per goal in production.
|
|
41
|
+
|
|
42
|
+
## Self-check before task completion
|
|
43
|
+
|
|
44
|
+
- [ ] Agent scope is defined with explicit permitted and restricted tools
|
|
45
|
+
- [ ] Goal structure includes explicit (user-provided), implicit (system constraints), and emergent goals
|
|
46
|
+
- [ ] Reasoning loop architecture (ReAct/Plan-Act-Reflect/CoT+Tools) is selected and documented
|
|
47
|
+
- [ ] Loop termination conditions prevent infinite loops (max iterations, timeout, error threshold)
|
|
48
|
+
- [ ] Tool inventory is documented with input/output schemas and error modes per tool
|
|
49
|
+
- [ ] Self-correction mechanisms include validation, reflection, and retry logic with max retry limits
|
|
50
|
+
- [ ] Planning phase decomposes goals into subtasks with feasibility estimates
|
|
51
|
+
- [ ] Tool calls are wrapped with error handling (retry transient, escalate permanent, degrade gracefully)
|
|
52
|
+
- [ ] Reflection loops analyze action outcomes and adjust strategy ({action, expected, actual, error_analysis, next})
|
|
53
|
+
- [ ] Goal-state tracking maintains serializable, resumable state (progress, blockers, next action)
|
|
54
|
+
- [ ] Safety constraints validate tool inputs pre-execution and enforce rate limits
|
|
55
|
+
- [ ] Multi-agent coordination uses message passing, shared state, or supervisor patterns without race conditions
|
|
56
|
+
- [ ] Goal completion accuracy is validated at >80% success rate on test suite
|
|
57
|
+
- [ ] Loop efficiency is measured (target <10 iterations per task)
|
|
58
|
+
- [ ] Self-correction effectiveness is tested with simulated tool errors (target >70% recovery rate)
|
|
59
|
+
- [ ] Infinite loop prevention is validated with adversarial goals and termination condition testing
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: autonomous-loops
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.0.3
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: autonomous mode, headless, unattended, pipeline pattern, DAG execution, RFC-driven, infinite loop, agentic loop, auto mode, background execution
|
|
7
|
+
compose:
|
|
8
|
+
- agent-loops
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Skill — Autonomous Loops
|
|
12
|
+
|
|
13
|
+
## When this skill activates
|
|
14
|
+
When designing or executing autonomous agent workflows that run without
|
|
15
|
+
human intervention across multiple tasks. Covers pattern selection, safety
|
|
16
|
+
rails, and state management for headless operation.
|
|
17
|
+
|
|
18
|
+
## Mandatory actions when this skill is active
|
|
19
|
+
|
|
20
|
+
### Before starting autonomous execution
|
|
21
|
+
1. Define the **exit conditions** — when does the loop STOP?
|
|
22
|
+
2. Define the **escalation path** — what triggers a human interrupt?
|
|
23
|
+
3. Checkpoint the current state — autonomous mode must be resumable
|
|
24
|
+
4. Verify SHARED_TASK_NOTES.md exists and is readable
|
|
25
|
+
|
|
26
|
+
### Loop Pattern Selection
|
|
27
|
+
|
|
28
|
+
**Pattern 1 — Sequential Pipeline**
|
|
29
|
+
```
|
|
30
|
+
Plan → Task 1 → Verify → Task 2 → Verify → ... → Ship
|
|
31
|
+
```
|
|
32
|
+
- Use when: tasks have strict ordering, output of one feeds next
|
|
33
|
+
- Safety: verify after EACH task, halt pipeline on failure
|
|
34
|
+
- State: HANDOFF.json tracks position in pipeline
|
|
35
|
+
|
|
36
|
+
**Pattern 2 — Parallel Wave Execution**
|
|
37
|
+
```
|
|
38
|
+
Wave 1: [Task A, Task B, Task C] → all verify → Wave 2: [Task D, Task E] → ...
|
|
39
|
+
```
|
|
40
|
+
- Use when: multiple independent tasks can run simultaneously
|
|
41
|
+
- Safety: all tasks in a wave must pass before next wave starts
|
|
42
|
+
- State: wave-executor.md manages group completion
|
|
43
|
+
|
|
44
|
+
**Pattern 3 — RFC-Driven DAG**
|
|
45
|
+
```
|
|
46
|
+
Spec → Decompose into dependency graph → Execute respecting dependencies
|
|
47
|
+
↓
|
|
48
|
+
[A] → [B, C] → [D depends on B+C] → [E depends on D]
|
|
49
|
+
```
|
|
50
|
+
- Use when: complex feature with interdependent work units
|
|
51
|
+
- Safety: each node independently verifiable, DAG prevents circular deps
|
|
52
|
+
- State: DAG stored in HANDOFF.json with per-node status
|
|
53
|
+
|
|
54
|
+
**Pattern 4 — Infinite Agentic Loop (with stuck detection)**
|
|
55
|
+
```
|
|
56
|
+
while (work_exists):
|
|
57
|
+
pick_next_task()
|
|
58
|
+
execute()
|
|
59
|
+
verify()
|
|
60
|
+
if stuck_for(3_iterations): escalate()
|
|
61
|
+
```
|
|
62
|
+
- Use when: continuous improvement, ongoing maintenance
|
|
63
|
+
- Safety: stuck-detector.md monitors for non-progress
|
|
64
|
+
- CRITICAL: must have hard time limit OR task count limit
|
|
65
|
+
|
|
66
|
+
### Safety Rails (ALL patterns)
|
|
67
|
+
|
|
68
|
+
1. **Hard limits** — Set before starting, never removed during execution:
|
|
69
|
+
- Max iterations: configurable (default 20 tasks)
|
|
70
|
+
- Max duration: configurable (default 2 hours)
|
|
71
|
+
- Max cost: from config.json `[COST_HARD_LIMIT_USD]`
|
|
72
|
+
|
|
73
|
+
2. **Stuck detection** — If 3 consecutive iterations produce no meaningful progress:
|
|
74
|
+
- Write diagnostic to SHARED_TASK_NOTES.md
|
|
75
|
+
- Attempt self-repair (different approach) ONCE
|
|
76
|
+
- If self-repair fails: HALT and escalate to user
|
|
77
|
+
|
|
78
|
+
3. **Checkpoint protocol**:
|
|
79
|
+
- Write state to HANDOFF.json after EVERY task completion
|
|
80
|
+
- Write reasoning to SHARED_TASK_NOTES.md for cross-iteration context
|
|
81
|
+
- On interruption: state is always resumable from last checkpoint
|
|
82
|
+
|
|
83
|
+
4. **Escalation triggers** (always halt for human):
|
|
84
|
+
- Security-sensitive changes detected (auth/payment/PII)
|
|
85
|
+
- Merge conflict requiring judgment
|
|
86
|
+
- Test failures that resist 2 fix attempts
|
|
87
|
+
- Any change scoring difficulty > 8
|
|
88
|
+
|
|
89
|
+
### During autonomous execution
|
|
90
|
+
- Fresh context per task (no context accumulation)
|
|
91
|
+
- Load HANDOFF.json + SHARED_TASK_NOTES.md at each task start
|
|
92
|
+
- Run verification-loop (minimum Phase 4+5+6) after each task
|
|
93
|
+
- Log every task completion/failure in AUDIT
|
|
94
|
+
|
|
95
|
+
### After autonomous execution completes
|
|
96
|
+
- Produce execution summary (tasks completed, failed, time, cost)
|
|
97
|
+
- Archive SHARED_TASK_NOTES.md to `.planning/history/`
|
|
98
|
+
- Run full verification-loop (all 6 phases) on combined changes
|
|
99
|
+
- Report results to user for review before any merge/push
|
|
100
|
+
|
|
101
|
+
## Self-check before task completion
|
|
102
|
+
- [ ] Did I define exit conditions BEFORE starting the loop?
|
|
103
|
+
- [ ] Did I verify stuck detection fires after 3 iterations of no progress?
|
|
104
|
+
- [ ] Did I confirm SHARED_TASK_NOTES.md is being written after each task?
|
|
105
|
+
- [ ] Did I run verification-loop on the combined changes before reporting complete?
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-system-optimization
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.7.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: build system optimization, build cache architecture, incremental build design, remote build execution, dependency graph optimization, build farm design, Bazel Buck optimization, build time reduction, distributed build, build artifact caching, hermetic build, build reproducibility
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill — Build System Optimization
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
This skill activates when the user is optimizing build systems for speed and reliability. This includes build cache architecture, incremental builds, remote build execution, dependency graph optimization, build farm design, Bazel/Buck/Gradle optimization, build time reduction, distributed builds, artifact caching, hermetic builds, and build reproducibility.
|
|
14
|
+
|
|
15
|
+
## Mandatory actions when this skill is active
|
|
16
|
+
|
|
17
|
+
### Before writing any code
|
|
18
|
+
|
|
19
|
+
1. Establish baseline build times: clean build (no cache), incremental build (single file change), and CI build. Measure p50, p95, p99.
|
|
20
|
+
2. Profile the build to identify bottlenecks: dependency resolution, compilation, linking, testing, packaging. Use build system profiling tools (Gradle Build Scan, Bazel analyze-profile).
|
|
21
|
+
3. Audit dependency graph: identify unnecessary dependencies, circular dependencies, and overly-coupled modules.
|
|
22
|
+
4. Assess cache hit rates: local cache, remote cache, CI cache. Identify cache invalidation causes (non-deterministic inputs, timestamp dependencies).
|
|
23
|
+
5. Determine build reproducibility: same source + same toolchain = identical binary. Test by building twice and comparing checksums.
|
|
24
|
+
|
|
25
|
+
### During implementation
|
|
26
|
+
|
|
27
|
+
- **Incremental Builds:** Only rebuild changed modules and their dependents. Requires accurate dependency tracking. Bazel and Buck are incremental by design. Gradle requires careful task input/output declaration. Target: single-file change rebuild in under 30 seconds.
|
|
28
|
+
- **Build Caching:** Layer caching at multiple levels: local (developer machine), shared (team), remote (CI). Use content-addressable storage (hash inputs to determine cache key). Cache should serve 80%+ of CI builds from cache.
|
|
29
|
+
- **Remote Build Execution:** Offload compilation and tests to remote workers (Bazel Remote Execution, BuildBuddy, Gradle Enterprise). Provides massive parallelism (100+ workers). Requires hermetic builds.
|
|
30
|
+
- **Dependency Graph Optimization:** Reduce fan-out (modules with many dependents). Split large modules into smaller ones. Use interface modules to break circular dependencies. Visualize graph with Bazel query or Gradle's dependency graph plugin.
|
|
31
|
+
- **Hermetic Builds:** All inputs (source, toolchain, dependencies) must be explicit. No reliance on global state (env vars, system tools, internet access during build). Hermetic builds enable reproducibility and remote caching.
|
|
32
|
+
- **Build Artifact Caching:** Cache compiled binaries, test results, and packaged artifacts. Use content-addressable storage (Artifactory, Nexus, S3). Artifacts should be immutable (never overwrite).
|
|
33
|
+
- **Parallelization:** Build independent modules in parallel. Bazel parallelizes by default. Gradle requires `org.gradle.parallel=true`. Monitor CPU utilization (target: 80%+ during build).
|
|
34
|
+
- **Build Farm Design:** Centralized build cluster with auto-scaling workers. Use spot instances for cost savings. Workers should be stateless and ephemeral. Monitor queue depth and scale workers accordingly.
|
|
35
|
+
- **Build Time Reduction Targets:** Clean build under 10 minutes. Incremental build under 1 minute. CI build (with cache) under 5 minutes.
|
|
36
|
+
|
|
37
|
+
### After implementation
|
|
38
|
+
|
|
39
|
+
- Verify incremental builds only rebuild changed modules and dependents (use build system logs to confirm).
|
|
40
|
+
- Confirm cache hit rates exceed 80% in CI and 90% for developers (for incremental builds).
|
|
41
|
+
- Validate remote build execution distributes work across workers (monitor parallelism and CPU utilization).
|
|
42
|
+
- Ensure builds are hermetic by building in a clean container and comparing output checksums.
|
|
43
|
+
- Check that build artifact cache is content-addressable and serves artifacts in under 2 seconds.
|
|
44
|
+
|
|
45
|
+
## Self-check before task completion
|
|
46
|
+
|
|
47
|
+
- [ ] Baseline build times are measured (clean, incremental, CI) and tracked over time.
|
|
48
|
+
- [ ] Incremental builds only rebuild changed modules (verified via build logs).
|
|
49
|
+
- [ ] Build caching achieves 80%+ cache hit rate in CI.
|
|
50
|
+
- [ ] Remote build execution distributes work across workers with 80%+ CPU utilization.
|
|
51
|
+
- [ ] Dependency graph is optimized (reduced fan-out, no circular dependencies).
|
|
52
|
+
- [ ] Builds are hermetic (no reliance on global state or internet access).
|
|
53
|
+
- [ ] Build artifacts are cached in content-addressable storage and immutable.
|
|
54
|
+
- [ ] Build time targets are met: clean <10min, incremental <1min, CI <5min.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-vs-buy
|
|
3
|
+
version: 1.0.0
|
|
4
|
+
min_mindforge_version: 10.1.0
|
|
5
|
+
status: stable
|
|
6
|
+
triggers: build vs buy, make or buy, vendor evaluation, total cost ownership, buy decision, vendor lock-in assessment, outsource vs build, third-party evaluation, SaaS vs self-hosted, dependency vs custom, commercial vs open-source, build internally
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Build vs Buy Decision Framework
|
|
10
|
+
|
|
11
|
+
## When this skill activates
|
|
12
|
+
|
|
13
|
+
This skill activates when the team faces a decision about whether to build a capability
|
|
14
|
+
internally or acquire it from an external vendor, open-source project, or SaaS provider.
|
|
15
|
+
It provides a structured framework for evaluating total cost of ownership, strategic
|
|
16
|
+
alignment, and long-term maintainability of both paths.
|
|
17
|
+
|
|
18
|
+
## Mandatory actions when this skill is active
|
|
19
|
+
|
|
20
|
+
### Before
|
|
21
|
+
|
|
22
|
+
1. **Identify the capability boundary** — Define exactly what the system needs to do.
|
|
23
|
+
Separate the core problem from adjacent concerns.
|
|
24
|
+
2. **Gather constraints** — Timeline pressure, team capacity, budget ceiling, compliance
|
|
25
|
+
requirements, and existing technology stack compatibility.
|
|
26
|
+
3. **Catalog candidates** — List all viable buy options (commercial SaaS, open-source
|
|
27
|
+
libraries, managed services) alongside the build option.
|
|
28
|
+
|
|
29
|
+
### During
|
|
30
|
+
|
|
31
|
+
4. **Calculate Total Cost of Ownership (TCO) for BUY path:**
|
|
32
|
+
- License/subscription fees (year 1 + projected 3-year)
|
|
33
|
+
- Integration effort (API adapters, data transformation, auth hookup)
|
|
34
|
+
- Ongoing maintenance (version upgrades, breaking changes, support tickets)
|
|
35
|
+
- Opportunity cost of vendor limitations (features you cannot customize)
|
|
36
|
+
- Exit cost (data migration, API decoupling, replacement timeline)
|
|
37
|
+
|
|
38
|
+
5. **Calculate Total Cost of Ownership (TCO) for BUILD path:**
|
|
39
|
+
- Initial development effort (design + implementation + testing)
|
|
40
|
+
- Ongoing maintenance (bug fixes, feature requests, security patches)
|
|
41
|
+
- Ownership benefit (full control, no per-seat pricing, no vendor roadmap dependency)
|
|
42
|
+
- Knowledge investment (team learns the domain deeply)
|
|
43
|
+
|
|
44
|
+
6. **Assess vendor lock-in risk:**
|
|
45
|
+
- Data portability — Can you export all data in standard formats?
|
|
46
|
+
- API coupling — How deeply does the vendor API penetrate your codebase?
|
|
47
|
+
- Exit cost — What is the realistic effort to replace this vendor?
|
|
48
|
+
- Contractual traps — Auto-renewal, price escalation clauses, minimum commitments.
|
|
49
|
+
|
|
50
|
+
7. **Apply the decision matrix:**
|
|
51
|
+
- Strategic importance HIGH + Competitive advantage = **BUILD**
|
|
52
|
+
- Strategic importance LOW + Commodity capability = **BUY**
|
|
53
|
+
- Timeline pressure HIGH + Team capacity LOW = **BUY** (short-term), plan migration
|
|
54
|
+
- Timeline pressure LOW + Team capacity HIGH = **BUILD**
|
|
55
|
+
- Differentiating capability = **BUILD** (never outsource your moat)
|
|
56
|
+
- Undifferentiated heavy lifting = **BUY**
|
|
57
|
+
|
|
58
|
+
8. **Evaluate team capacity:**
|
|
59
|
+
- Does the team have domain expertise to build and maintain this?
|
|
60
|
+
- Will building this distract from higher-priority work?
|
|
61
|
+
- Is there a realistic staffing plan for long-term ownership?
|
|
62
|
+
|
|
63
|
+
### After
|
|
64
|
+
|
|
65
|
+
9. **Document the decision** — Record the rationale, TCO comparison, and risk assessment
|
|
66
|
+
as an Architecture Decision Record (ADR).
|
|
67
|
+
10. **Define review triggers** — Set conditions that would cause re-evaluation (e.g.,
|
|
68
|
+
vendor price increase >30%, team growth enabling build, vendor acquisition).
|
|
69
|
+
11. **Plan the exit path** — Even when buying, design integration layers that allow
|
|
70
|
+
future replacement without full rewrite.
|
|
71
|
+
|
|
72
|
+
## Self-check before task completion
|
|
73
|
+
|
|
74
|
+
- [ ] TCO calculated for both paths with 3-year projection
|
|
75
|
+
- [ ] Vendor lock-in risk explicitly assessed with exit cost estimate
|
|
76
|
+
- [ ] Decision matrix applied with clear justification
|
|
77
|
+
- [ ] Team capacity and opportunity cost considered
|
|
78
|
+
- [ ] ADR written with rationale and review triggers
|
|
79
|
+
- [ ] Integration designed with abstraction layer regardless of buy/build choice
|
|
80
|
+
- [ ] Stakeholders informed of trade-offs, not just the recommendation
|