mindforge-cc 11.3.1 → 11.5.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/.agent/CLAUDE.md +13 -0
- package/.agent/hooks/lib/hook-flags.js +78 -0
- package/.agent/hooks/lib/pretooluse-visible-output.js +46 -0
- package/.agent/hooks/mindforge-block-no-verify.js +552 -0
- package/.agent/hooks/mindforge-config-protection.js +144 -0
- package/.agent/hooks/run-with-flags.js +207 -0
- package/.agent/mindforge/checkpoint.md +76 -0
- package/.agent/mindforge/harness-audit.md +59 -0
- package/.agent/mindforge/instinct.md +46 -0
- package/.agent/mindforge/orch-add-feature.md +43 -0
- package/.agent/mindforge/orch-build-mvp.md +48 -0
- package/.agent/mindforge/orch-change-feature.md +45 -0
- package/.agent/mindforge/orch-fix-defect.md +43 -0
- package/.agent/mindforge/orch-refine-code.md +43 -0
- package/.agent/skills/mindforge-add-backlog/SKILL.md +2 -2
- package/.agent/skills/mindforge-add-phase/SKILL.md +2 -2
- package/.agent/skills/mindforge-add-tests/SKILL.md +2 -2
- package/.agent/skills/mindforge-add-todo/SKILL.md +2 -2
- package/.agent/skills/mindforge-audit-milestone/SKILL.md +2 -2
- package/.agent/skills/mindforge-audit-uat/SKILL.md +2 -2
- package/.agent/skills/mindforge-autonomous/SKILL.md +2 -2
- package/.agent/skills/mindforge-brainstorming/SKILL.md +1 -1
- package/.agent/skills/mindforge-check-todos/SKILL.md +2 -2
- package/.agent/skills/mindforge-cleanup/SKILL.md +2 -2
- package/.agent/skills/mindforge-complete-milestone/SKILL.md +2 -2
- package/.agent/skills/mindforge-debug/SKILL.md +2 -2
- package/.agent/skills/mindforge-debug_extended/SKILL.md +2 -2
- package/.agent/skills/mindforge-discuss-phase/SKILL.md +2 -2
- package/.agent/skills/mindforge-do/SKILL.md +2 -2
- package/.agent/skills/mindforge-execute-phase/SKILL.md +2 -2
- package/.agent/skills/mindforge-execute-phase_extended/SKILL.md +2 -2
- package/.agent/skills/mindforge-fast/SKILL.md +2 -2
- package/.agent/skills/mindforge-forensics/SKILL.md +2 -2
- package/.agent/skills/mindforge-health/SKILL.md +2 -2
- package/.agent/skills/mindforge-help/SKILL.md +2 -2
- package/.agent/skills/mindforge-insert-phase/SKILL.md +2 -2
- package/.agent/skills/mindforge-join-discord/SKILL.md +2 -2
- package/.agent/skills/mindforge-list-phase-assumptions/SKILL.md +2 -2
- package/.agent/skills/mindforge-list-workspaces/SKILL.md +2 -2
- package/.agent/skills/mindforge-manager/SKILL.md +2 -2
- package/.agent/skills/mindforge-map-codebase/SKILL.md +2 -2
- package/.agent/skills/mindforge-milestone-summary/SKILL.md +2 -2
- package/.agent/skills/mindforge-neural-orchestrator/SKILL.md +2 -2
- package/.agent/skills/mindforge-new-milestone/SKILL.md +2 -2
- package/.agent/skills/mindforge-new-project/SKILL.md +2 -2
- package/.agent/skills/mindforge-new-workspace/SKILL.md +2 -2
- package/.agent/skills/mindforge-next/SKILL.md +2 -2
- package/.agent/skills/mindforge-note/SKILL.md +2 -2
- package/.agent/skills/mindforge-parallel-mesh_extended/SKILL.md +2 -2
- package/.agent/skills/mindforge-pause-work/SKILL.md +2 -2
- package/.agent/skills/mindforge-plan-milestone-gaps/SKILL.md +2 -2
- package/.agent/skills/mindforge-plan-phase/SKILL.md +2 -2
- package/.agent/skills/mindforge-plan-phase_extended/SKILL.md +2 -2
- package/.agent/skills/mindforge-plant-seed/SKILL.md +2 -2
- package/.agent/skills/mindforge-pr-branch/SKILL.md +2 -2
- package/.agent/skills/mindforge-profile-user/SKILL.md +2 -2
- package/.agent/skills/mindforge-progress/SKILL.md +2 -2
- package/.agent/skills/mindforge-quick/SKILL.md +2 -2
- package/.agent/skills/mindforge-reapply-patches/SKILL.md +2 -2
- package/.agent/skills/mindforge-remove-phase/SKILL.md +2 -2
- package/.agent/skills/mindforge-remove-workspace/SKILL.md +2 -2
- package/.agent/skills/mindforge-research-phase/SKILL.md +2 -2
- package/.agent/skills/mindforge-resume-work/SKILL.md +2 -2
- package/.agent/skills/mindforge-review/SKILL.md +2 -2
- package/.agent/skills/mindforge-review-backlog/SKILL.md +2 -2
- package/.agent/skills/mindforge-review-inbound/SKILL.md +2 -2
- package/.agent/skills/mindforge-review-request/SKILL.md +2 -2
- package/.agent/skills/mindforge-session-report/SKILL.md +2 -2
- package/.agent/skills/mindforge-set-profile/SKILL.md +2 -2
- package/.agent/skills/mindforge-settings/SKILL.md +2 -2
- package/.agent/skills/mindforge-ship/SKILL.md +2 -2
- package/.agent/skills/mindforge-ship_extended/SKILL.md +2 -2
- package/.agent/skills/mindforge-skill-creation/SKILL.md +2 -2
- package/.agent/skills/mindforge-stats/SKILL.md +2 -2
- package/.agent/skills/mindforge-swarm-execution/SKILL.md +2 -2
- package/.agent/skills/mindforge-system-architecture/SKILL.md +2 -2
- package/.agent/skills/mindforge-tdd/SKILL.md +2 -2
- package/.agent/skills/mindforge-tdd_extended/SKILL.md +2 -2
- package/.agent/skills/mindforge-thread/SKILL.md +2 -2
- package/.agent/skills/mindforge-ui-phase/SKILL.md +2 -2
- package/.agent/skills/mindforge-ui-review/SKILL.md +2 -2
- package/.agent/skills/mindforge-update/SKILL.md +2 -2
- package/.agent/skills/mindforge-validate-phase/SKILL.md +2 -2
- package/.agent/skills/mindforge-verify-work/SKILL.md +2 -2
- package/.agent/skills/mindforge-verify-work_extended/SKILL.md +2 -2
- package/.agent/skills/mindforge-workspace-isolated/SKILL.md +2 -2
- package/.agent/skills/mindforge-workstreams/SKILL.md +2 -2
- package/.claude/CLAUDE.md +13 -0
- package/.claude/commands/mindforge/add-backlog.md +2 -2
- package/.claude/commands/mindforge/agent-deploy.md +1 -1
- package/.claude/commands/mindforge/agent-design.md +1 -1
- package/.claude/commands/mindforge/agent.md +2 -2
- package/.claude/commands/mindforge/ai-cost.md +1 -1
- package/.claude/commands/mindforge/ai-safety.md +1 -1
- package/.claude/commands/mindforge/approve.md +1 -1
- package/.claude/commands/mindforge/audit.md +1 -1
- package/.claude/commands/mindforge/auto.md +1 -1
- package/.claude/commands/mindforge/benchmark.md +1 -1
- package/.claude/commands/mindforge/browse.md +1 -1
- package/.claude/commands/mindforge/build-opt.md +1 -1
- package/.claude/commands/mindforge/cache.md +1 -1
- package/.claude/commands/mindforge/causal.md +1 -1
- package/.claude/commands/mindforge/cdn.md +1 -1
- package/.claude/commands/mindforge/change.md +1 -1
- package/.claude/commands/mindforge/checkpoint.md +76 -0
- package/.claude/commands/mindforge/cli.md +1 -1
- package/.claude/commands/mindforge/cluster-instincts.md +1 -1
- package/.claude/commands/mindforge/communicate.md +1 -1
- package/.claude/commands/mindforge/complete-milestone.md +1 -1
- package/.claude/commands/mindforge/compliance.md +1 -1
- package/.claude/commands/mindforge/consult.md +1 -1
- package/.claude/commands/mindforge/contract-test.md +1 -1
- package/.claude/commands/mindforge/cost-report.md +1 -1
- package/.claude/commands/mindforge/costs.md +1 -1
- package/.claude/commands/mindforge/council.md +1 -1
- package/.claude/commands/mindforge/create-skill.md +1 -1
- package/.claude/commands/mindforge/cross-review.md +1 -1
- package/.claude/commands/mindforge/dashboard.md +1 -1
- package/.claude/commands/mindforge/data-mesh.md +1 -1
- package/.claude/commands/mindforge/data-pipeline.md +1 -1
- package/.claude/commands/mindforge/de-slop.md +1 -1
- package/.claude/commands/mindforge/debug.md +1 -1
- package/.claude/commands/mindforge/degrade.md +1 -1
- package/.claude/commands/mindforge/delegate.md +1 -1
- package/.claude/commands/mindforge/deploy.md +1 -1
- package/.claude/commands/mindforge/discuss-phase.md +1 -1
- package/.claude/commands/mindforge/dmux.md +1 -1
- package/.claude/commands/mindforge/do.md +2 -2
- package/.claude/commands/mindforge/ecommerce.md +1 -1
- package/.claude/commands/mindforge/edge.md +1 -1
- package/.claude/commands/mindforge/edtech.md +1 -1
- package/.claude/commands/mindforge/embeddings.md +1 -1
- package/.claude/commands/mindforge/environments.md +1 -1
- package/.claude/commands/mindforge/eval.md +1 -1
- package/.claude/commands/mindforge/events.md +1 -1
- package/.claude/commands/mindforge/evolve-skills.md +1 -1
- package/.claude/commands/mindforge/execute-phase.md +48 -7
- package/.claude/commands/mindforge/feature-flags.md +1 -1
- package/.claude/commands/mindforge/feature-store.md +1 -1
- package/.claude/commands/mindforge/finops.md +1 -1
- package/.claude/commands/mindforge/fintech.md +1 -1
- package/.claude/commands/mindforge/flutter.md +1 -1
- package/.claude/commands/mindforge/gaming.md +1 -1
- package/.claude/commands/mindforge/graphql.md +1 -1
- package/.claude/commands/mindforge/harness-audit.md +59 -0
- package/.claude/commands/mindforge/health.md +1 -1
- package/.claude/commands/mindforge/healthcare.md +1 -1
- package/.claude/commands/mindforge/help.md +1 -1
- package/.claude/commands/mindforge/hire.md +1 -1
- package/.claude/commands/mindforge/i18n.md +1 -1
- package/.claude/commands/mindforge/idempotent.md +1 -1
- package/.claude/commands/mindforge/init-org.md +1 -1
- package/.claude/commands/mindforge/init-project.md +1 -1
- package/.claude/commands/mindforge/install-skill.md +1 -1
- package/.claude/commands/mindforge/instinct.md +46 -0
- package/.claude/commands/mindforge/introspect.md +1 -1
- package/.claude/commands/mindforge/iot.md +1 -1
- package/.claude/commands/mindforge/knowledge-graph.md +1 -1
- package/.claude/commands/mindforge/lakehouse.md +1 -1
- package/.claude/commands/mindforge/lead.md +1 -1
- package/.claude/commands/mindforge/learn-instinct.md +1 -1
- package/.claude/commands/mindforge/learn.md +1 -1
- package/.claude/commands/mindforge/learning.md +1 -1
- package/.claude/commands/mindforge/llm-route.md +1 -1
- package/.claude/commands/mindforge/load-test.md +1 -1
- package/.claude/commands/mindforge/logistics.md +1 -1
- package/.claude/commands/mindforge/map-codebase.md +1 -1
- package/.claude/commands/mindforge/marketplace.md +1 -1
- package/.claude/commands/mindforge/meeting-design.md +1 -1
- package/.claude/commands/mindforge/metrics.md +1 -1
- package/.claude/commands/mindforge/migrate.md +1 -1
- package/.claude/commands/mindforge/migration-mgmt.md +1 -1
- package/.claude/commands/mindforge/milestone.md +1 -1
- package/.claude/commands/mindforge/mobile.md +1 -1
- package/.claude/commands/mindforge/monorepo.md +1 -1
- package/.claude/commands/mindforge/multi-tenant.md +1 -1
- package/.claude/commands/mindforge/multimodal.md +1 -1
- package/.claude/commands/mindforge/new-runtime.md +1 -1
- package/.claude/commands/mindforge/next.md +1 -1
- package/.claude/commands/mindforge/note.md +2 -2
- package/.claude/commands/mindforge/observability-platform.md +1 -1
- package/.claude/commands/mindforge/offline.md +1 -1
- package/.claude/commands/mindforge/onboard.md +1 -1
- package/.claude/commands/mindforge/orch-add-feature.md +43 -0
- package/.claude/commands/mindforge/orch-build-mvp.md +48 -0
- package/.claude/commands/mindforge/orch-change-feature.md +45 -0
- package/.claude/commands/mindforge/orch-fix-defect.md +43 -0
- package/.claude/commands/mindforge/orch-refine-code.md +43 -0
- package/.claude/commands/mindforge/plan-phase.md +1 -1
- package/.claude/commands/mindforge/plan-write.md +11 -0
- package/.claude/commands/mindforge/plant-seed.md +2 -2
- package/.claude/commands/mindforge/platform.md +1 -1
- package/.claude/commands/mindforge/plugins.md +1 -1
- package/.claude/commands/mindforge/pr-review.md +1 -1
- package/.claude/commands/mindforge/privacy-eng.md +1 -1
- package/.claude/commands/mindforge/product-spec.md +76 -0
- package/.claude/commands/mindforge/profile-team.md +1 -1
- package/.claude/commands/mindforge/publish-skill.md +1 -1
- package/.claude/commands/mindforge/push-notify.md +1 -1
- package/.claude/commands/mindforge/pwa.md +1 -1
- package/.claude/commands/mindforge/qa.md +1 -1
- package/.claude/commands/mindforge/quality-audit.md +1 -1
- package/.claude/commands/mindforge/queue.md +1 -1
- package/.claude/commands/mindforge/quick.md +1 -1
- package/.claude/commands/mindforge/rag.md +1 -1
- package/.claude/commands/mindforge/rate-limit.md +1 -1
- package/.claude/commands/mindforge/react-native.md +1 -1
- package/.claude/commands/mindforge/realtime-analytics.md +1 -1
- package/.claude/commands/mindforge/record-learning.md +1 -1
- package/.claude/commands/mindforge/release.md +1 -1
- package/.claude/commands/mindforge/remember.md +1 -1
- package/.claude/commands/mindforge/research.md +1 -1
- package/.claude/commands/mindforge/retrospective.md +1 -1
- package/.claude/commands/mindforge/review-backlog.md +2 -2
- package/.claude/commands/mindforge/review.md +1 -1
- package/.claude/commands/mindforge/rfc.md +1 -1
- package/.claude/commands/mindforge/santa.md +1 -1
- package/.claude/commands/mindforge/secrets-mgmt.md +1 -1
- package/.claude/commands/mindforge/secrets.md +1 -1
- package/.claude/commands/mindforge/security-scan.md +1 -1
- package/.claude/commands/mindforge/serverless.md +1 -1
- package/.claude/commands/mindforge/session-report.md +2 -2
- package/.claude/commands/mindforge/ship.md +1 -1
- package/.claude/commands/mindforge/skills.md +1 -1
- package/.claude/commands/mindforge/status.md +1 -1
- package/.claude/commands/mindforge/steer.md +1 -1
- package/.claude/commands/mindforge/stream.md +1 -1
- package/.claude/commands/mindforge/sync-confluence.md +1 -1
- package/.claude/commands/mindforge/sync-jira.md +1 -1
- package/.claude/commands/mindforge/tech-debt.md +1 -1
- package/.claude/commands/mindforge/threat-model.md +1 -1
- package/.claude/commands/mindforge/tokens.md +1 -1
- package/.claude/commands/mindforge/ui-phase.md +2 -2
- package/.claude/commands/mindforge/ui-review.md +2 -2
- package/.claude/commands/mindforge/update.md +1 -1
- package/.claude/commands/mindforge/validate-phase.md +2 -2
- package/.claude/commands/mindforge/verify-loop.md +1 -1
- package/.claude/commands/mindforge/verify-phase.md +1 -1
- package/.claude/commands/mindforge/vibe-check.md +1 -1
- package/.claude/commands/mindforge/workspace.md +1 -1
- package/.claude/commands/mindforge/workstreams.md +2 -2
- package/.claude/commands/mindforge/zero-trust.md +1 -1
- package/.mindforge/config.json +2 -2
- package/.mindforge/engine/instincts/instinct-schema.md +17 -9
- package/.mindforge/imported-agents.jsonl +10 -0
- package/.mindforge/manifests/install-components.json +36 -0
- package/.mindforge/manifests/install-modules.json +193 -0
- package/.mindforge/manifests/install-profiles.json +57 -0
- package/.mindforge/memory/sync-manifest.json +1 -1
- package/.mindforge/personas/gan-evaluator.md +226 -0
- package/.mindforge/personas/gan-generator.md +151 -0
- package/.mindforge/personas/gan-planner.md +118 -0
- package/.mindforge/personas/harness-optimizer.md +55 -0
- package/.mindforge/personas/loop-operator.md +58 -0
- package/.mindforge/schemas/hooks.schema.json +199 -0
- package/.mindforge/schemas/install-modules.schema.json +44 -0
- package/.mindforge/schemas/install-state.schema.json +95 -0
- package/.mindforge/schemas/plugin.schema.json +75 -0
- package/.mindforge/schemas/provenance.schema.json +31 -0
- package/.mindforge/skills/agent-architecture-audit/SKILL.md +272 -0
- package/.mindforge/skills/continuous-learning/SKILL.md +16 -0
- package/.mindforge/skills/orch-pipeline/SKILL.md +284 -0
- package/.mindforge/skills/writing-plans/SKILL.md +76 -0
- package/CHANGELOG.md +111 -0
- package/MINDFORGE.md +3 -3
- package/README.md +25 -3
- package/RELEASENOTES.md +131 -1
- package/SECURITY.md +16 -0
- package/bin/autonomous/auto-runner.js +46 -5
- package/bin/autonomous/handoff-schema.js +114 -0
- package/bin/autonomous/session-guardian.sh +138 -0
- package/bin/autonomous/supervisor.js +98 -0
- package/bin/change-classifier.js +19 -5
- package/bin/governance/approve.js +61 -28
- package/bin/governance/config-manager.js +3 -1
- package/bin/governance/rbac-manager.js +14 -6
- package/bin/harness-audit.js +520 -0
- package/bin/hooks/instinct-capture-hook.js +16 -1
- package/bin/hooks/lib/detect-project.js +72 -0
- package/bin/installer/harness-adapter-compliance.js +321 -0
- package/bin/installer/install-manifests.js +200 -0
- package/bin/installer/install-state.js +243 -0
- package/bin/installer-core.js +1 -1
- package/bin/learning/instinct-cli.js +359 -0
- package/bin/learning/lib/ssrf-guard.js +252 -0
- package/bin/memory/eis-client.js +31 -10
- package/bin/models/llm-errors.js +79 -0
- package/bin/models/model-client.js +39 -4
- package/bin/models/ollama-provider.js +115 -0
- package/bin/models/openai-provider.js +40 -9
- package/bin/models/profiles-loader.js +147 -0
- package/bin/models/provider-registry.js +59 -0
- package/bin/revops/market-evaluator.js +23 -2
- package/bin/revops/router-steering-v2.js +17 -2
- package/bin/security/trust-boundaries.js +15 -3
- package/bin/utils/readiness-gate.js +169 -0
- package/bin/worktree/engine.js +497 -0
- package/docs/getting-started.md +1 -1
- package/docs/troubleshooting.md +1 -1
- package/docs/user-guide.md +1 -1
- package/package.json +8 -2
- package/subagents/categories/01-core-development/.claude-plugin/plugin.json +2 -2
- package/subagents/categories/01-core-development/api-designer-cc.md +1 -1
- package/subagents/categories/01-core-development/backend-developer.md +1 -1
- package/subagents/categories/01-core-development/design-bridge.md +1 -1
- package/subagents/categories/01-core-development/electron-pro.md +1 -1
- package/subagents/categories/01-core-development/frontend-developer.md +1 -1
- package/subagents/categories/01-core-development/fullstack-developer.md +1 -1
- package/subagents/categories/01-core-development/graphql-architect.md +1 -1
- package/subagents/categories/01-core-development/microservices-architect.md +1 -1
- package/subagents/categories/01-core-development/mobile-developer.md +1 -1
- package/subagents/categories/01-core-development/ui-designer.md +1 -1
- package/subagents/categories/01-core-development/websocket-engineer.md +1 -1
- package/subagents/categories/02-language-specialists/.claude-plugin/plugin.json +2 -2
- package/subagents/categories/02-language-specialists/angular-architect.md +1 -1
- package/subagents/categories/02-language-specialists/cpp-pro.md +1 -1
- package/subagents/categories/02-language-specialists/csharp-developer.md +1 -1
- package/subagents/categories/02-language-specialists/django-developer.md +1 -1
- package/subagents/categories/02-language-specialists/dotnet-core-expert.md +1 -1
- package/subagents/categories/02-language-specialists/dotnet-framework-48-expert.md +1 -1
- package/subagents/categories/02-language-specialists/elixir-expert.md +1 -1
- package/subagents/categories/02-language-specialists/expo-react-native-expert.md +1 -1
- package/subagents/categories/02-language-specialists/fastapi-developer.md +1 -1
- package/subagents/categories/02-language-specialists/flutter-expert.md +1 -1
- package/subagents/categories/02-language-specialists/golang-pro.md +1 -1
- package/subagents/categories/02-language-specialists/java-architect.md +1 -1
- package/subagents/categories/02-language-specialists/javascript-pro.md +1 -1
- package/subagents/categories/02-language-specialists/kotlin-specialist.md +1 -1
- package/subagents/categories/02-language-specialists/laravel-specialist.md +1 -1
- package/subagents/categories/02-language-specialists/nextjs-developer.md +1 -1
- package/subagents/categories/02-language-specialists/node-specialist.md +1 -1
- package/subagents/categories/02-language-specialists/php-pro.md +1 -1
- package/subagents/categories/02-language-specialists/powershell-51-expert.md +1 -1
- package/subagents/categories/02-language-specialists/powershell-7-expert.md +1 -1
- package/subagents/categories/02-language-specialists/python-pro.md +1 -1
- package/subagents/categories/02-language-specialists/rails-expert.md +1 -1
- package/subagents/categories/02-language-specialists/react-specialist-cc.md +1 -1
- package/subagents/categories/02-language-specialists/rust-engineer.md +1 -1
- package/subagents/categories/02-language-specialists/spring-boot-engineer.md +1 -1
- package/subagents/categories/02-language-specialists/sql-pro.md +1 -1
- package/subagents/categories/02-language-specialists/swift-expert.md +1 -1
- package/subagents/categories/02-language-specialists/symfony-specialist.md +1 -1
- package/subagents/categories/02-language-specialists/typescript-pro.md +1 -1
- package/subagents/categories/02-language-specialists/vue-expert.md +1 -1
- package/subagents/categories/03-infrastructure/.claude-plugin/plugin.json +5 -5
- package/subagents/categories/03-infrastructure/azure-infra-engineer.md +1 -1
- package/subagents/categories/03-infrastructure/cloud-architect-cc.md +1 -1
- package/subagents/categories/03-infrastructure/database-administrator.md +1 -1
- package/subagents/categories/03-infrastructure/deployment-engineer.md +1 -1
- package/subagents/categories/03-infrastructure/devops-engineer-cc.md +1 -1
- package/subagents/categories/03-infrastructure/devops-incident-responder.md +1 -1
- package/subagents/categories/03-infrastructure/docker-expert.md +1 -1
- package/subagents/categories/03-infrastructure/incident-responder.md +1 -1
- package/subagents/categories/03-infrastructure/kubernetes-specialist.md +1 -1
- package/subagents/categories/03-infrastructure/network-engineer.md +1 -1
- package/subagents/categories/03-infrastructure/platform-engineer-cc.md +1 -1
- package/subagents/categories/03-infrastructure/security-engineer.md +1 -1
- package/subagents/categories/03-infrastructure/sre-engineer.md +1 -1
- package/subagents/categories/03-infrastructure/terraform-engineer.md +1 -1
- package/subagents/categories/03-infrastructure/terragrunt-expert.md +2 -2
- package/subagents/categories/03-infrastructure/windows-infra-admin.md +1 -1
- package/subagents/categories/04-quality-security/.claude-plugin/plugin.json +15 -5
- package/subagents/categories/04-quality-security/accessibility-tester-cc.md +1 -1
- package/subagents/categories/04-quality-security/ad-security-reviewer.md +1 -1
- package/subagents/categories/04-quality-security/ai-writing-auditor.md +1 -1
- package/subagents/categories/04-quality-security/architect-reviewer.md +1 -1
- package/subagents/categories/04-quality-security/chaos-engineer-cc.md +1 -1
- package/subagents/categories/04-quality-security/code-reviewer.md +1 -1
- package/subagents/categories/04-quality-security/compliance-auditor-cc.md +1 -1
- package/subagents/categories/04-quality-security/debugger-cc.md +1 -1
- package/subagents/categories/04-quality-security/error-detective.md +1 -1
- package/subagents/categories/04-quality-security/gdpr-ccpa-compliance.md +2 -2
- package/subagents/categories/04-quality-security/go-build-resolver.md +105 -0
- package/subagents/categories/04-quality-security/go-reviewer.md +87 -0
- package/subagents/categories/04-quality-security/penetration-tester.md +1 -1
- package/subagents/categories/04-quality-security/performance-engineer.md +1 -1
- package/subagents/categories/04-quality-security/powershell-security-hardening.md +1 -1
- package/subagents/categories/04-quality-security/python-reviewer.md +109 -0
- package/subagents/categories/04-quality-security/qa-expert.md +1 -1
- package/subagents/categories/04-quality-security/react-build-resolver.md +215 -0
- package/subagents/categories/04-quality-security/react-reviewer.md +167 -0
- package/subagents/categories/04-quality-security/rust-build-resolver.md +159 -0
- package/subagents/categories/04-quality-security/rust-reviewer.md +105 -0
- package/subagents/categories/04-quality-security/security-auditor.md +1 -1
- package/subagents/categories/04-quality-security/silent-failure-hunter.md +67 -0
- package/subagents/categories/04-quality-security/test-automator.md +1 -1
- package/subagents/categories/04-quality-security/type-design-analyzer.md +58 -0
- package/subagents/categories/04-quality-security/typescript-reviewer.md +126 -0
- package/subagents/categories/04-quality-security/ui-ux-tester.md +1 -1
- package/subagents/categories/05-data-ai/.claude-plugin/plugin.json +4 -4
- package/subagents/categories/05-data-ai/ai-engineer.md +1 -1
- package/subagents/categories/05-data-ai/data-analyst.md +1 -1
- package/subagents/categories/05-data-ai/data-engineer-cc.md +1 -1
- package/subagents/categories/05-data-ai/data-scientist.md +1 -1
- package/subagents/categories/05-data-ai/database-optimizer.md +1 -1
- package/subagents/categories/05-data-ai/llm-architect.md +1 -1
- package/subagents/categories/05-data-ai/machine-learning-engineer.md +1 -1
- package/subagents/categories/05-data-ai/ml-engineer-cc.md +1 -1
- package/subagents/categories/05-data-ai/mlops-engineer.md +1 -1
- package/subagents/categories/05-data-ai/nlp-engineer.md +1 -1
- package/subagents/categories/05-data-ai/postgres-pro.md +1 -1
- package/subagents/categories/05-data-ai/prompt-engineer-cc.md +1 -1
- package/subagents/categories/05-data-ai/reinforcement-learning-engineer.md +1 -1
- package/subagents/categories/06-developer-experience/.claude-plugin/plugin.json +2 -2
- package/subagents/categories/06-developer-experience/build-engineer-cc.md +1 -1
- package/subagents/categories/06-developer-experience/cli-developer.md +1 -1
- package/subagents/categories/06-developer-experience/dependency-manager.md +1 -1
- package/subagents/categories/06-developer-experience/documentation-engineer.md +1 -1
- package/subagents/categories/06-developer-experience/dx-optimizer.md +1 -1
- package/subagents/categories/06-developer-experience/git-workflow-manager.md +1 -1
- package/subagents/categories/06-developer-experience/legacy-modernizer.md +1 -1
- package/subagents/categories/06-developer-experience/mcp-developer.md +1 -1
- package/subagents/categories/06-developer-experience/powershell-module-architect.md +1 -1
- package/subagents/categories/06-developer-experience/powershell-ui-architect.md +1 -1
- package/subagents/categories/06-developer-experience/readme-generator.md +1 -1
- package/subagents/categories/06-developer-experience/refactoring-specialist.md +1 -1
- package/subagents/categories/06-developer-experience/slack-expert.md +1 -1
- package/subagents/categories/06-developer-experience/tooling-engineer.md +1 -1
- package/subagents/categories/06-developer-experience/visual-asset-generator.md +1 -1
- package/subagents/categories/07-specialized-domains/.claude-plugin/plugin.json +2 -2
- package/subagents/categories/07-specialized-domains/api-documenter.md +1 -1
- package/subagents/categories/07-specialized-domains/blockchain-developer.md +1 -1
- package/subagents/categories/07-specialized-domains/embedded-systems.md +1 -1
- package/subagents/categories/07-specialized-domains/fintech-engineer.md +1 -1
- package/subagents/categories/07-specialized-domains/game-developer.md +1 -1
- package/subagents/categories/07-specialized-domains/healthcare-admin.md +1 -1
- package/subagents/categories/07-specialized-domains/hipaa-compliance.md +2 -2
- package/subagents/categories/07-specialized-domains/iot-engineer.md +1 -1
- package/subagents/categories/07-specialized-domains/m365-admin.md +1 -1
- package/subagents/categories/07-specialized-domains/mobile-app-developer.md +1 -1
- package/subagents/categories/07-specialized-domains/payment-integration.md +1 -1
- package/subagents/categories/07-specialized-domains/quant-analyst.md +1 -1
- package/subagents/categories/07-specialized-domains/risk-manager.md +1 -1
- package/subagents/categories/07-specialized-domains/seo-specialist-cc.md +1 -1
- package/subagents/categories/08-business-product/.claude-plugin/plugin.json +3 -3
- package/subagents/categories/08-business-product/assumption-mapping.md +2 -2
- package/subagents/categories/08-business-product/backlog-grooming.md +2 -2
- package/subagents/categories/08-business-product/business-analyst-cc.md +1 -1
- package/subagents/categories/08-business-product/content-marketer.md +1 -1
- package/subagents/categories/08-business-product/content-quality-editor.md +1 -1
- package/subagents/categories/08-business-product/customer-success-manager.md +1 -1
- package/subagents/categories/08-business-product/growth-loops.md +2 -2
- package/subagents/categories/08-business-product/legal-advisor.md +1 -1
- package/subagents/categories/08-business-product/license-engineer.md +1 -1
- package/subagents/categories/08-business-product/product-manager-cc.md +1 -1
- package/subagents/categories/08-business-product/project-manager.md +1 -1
- package/subagents/categories/08-business-product/sales-engineer.md +1 -1
- package/subagents/categories/08-business-product/scrum-master.md +1 -1
- package/subagents/categories/08-business-product/technical-writer.md +1 -1
- package/subagents/categories/08-business-product/ux-researcher.md +1 -1
- package/subagents/categories/08-business-product/wordpress-master.md +1 -1
- package/subagents/categories/09-meta-orchestration/.claude-plugin/plugin.json +1 -1
- package/subagents/categories/09-meta-orchestration/agent-installer.md +1 -1
- package/subagents/categories/09-meta-orchestration/agent-organizer.md +1 -1
- package/subagents/categories/09-meta-orchestration/codebase-orchestrator.md +1 -1
- package/subagents/categories/09-meta-orchestration/context-manager.md +1 -1
- package/subagents/categories/09-meta-orchestration/error-coordinator.md +1 -1
- package/subagents/categories/09-meta-orchestration/it-ops-orchestrator.md +1 -1
- package/subagents/categories/09-meta-orchestration/knowledge-synthesizer.md +1 -1
- package/subagents/categories/09-meta-orchestration/multi-agent-coordinator.md +1 -1
- package/subagents/categories/09-meta-orchestration/performance-monitor.md +1 -1
- package/subagents/categories/09-meta-orchestration/task-distributor.md +1 -1
- package/subagents/categories/09-meta-orchestration/workflow-orchestrator.md +1 -1
- package/subagents/categories/10-research-analysis/.claude-plugin/plugin.json +1 -1
- package/subagents/categories/10-research-analysis/ab-test-analysis.md +2 -2
- package/subagents/categories/10-research-analysis/cohort-analysis.md +2 -2
- package/subagents/categories/10-research-analysis/competitive-analyst.md +1 -1
- package/subagents/categories/10-research-analysis/data-researcher.md +1 -1
- package/subagents/categories/10-research-analysis/first-principles-thinking.md +2 -2
- package/subagents/categories/10-research-analysis/market-researcher.md +1 -1
- package/subagents/categories/10-research-analysis/project-idea-validator.md +1 -1
- package/subagents/categories/10-research-analysis/research-analyst.md +1 -1
- package/subagents/categories/10-research-analysis/scientific-literature-researcher.md +1 -1
- package/subagents/categories/10-research-analysis/search-specialist.md +1 -1
- package/subagents/categories/10-research-analysis/trend-analyst.md +1 -1
|
@@ -0,0 +1,497 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MindForge — Programmatic Git Worktree Engine
|
|
3
|
+
*
|
|
4
|
+
* Ported from ECC's Rust worktree module (ecc2/src/worktree/mod.rs) to Node via
|
|
5
|
+
* child_process git calls (the Rust impl is structured git CLI invocations — no
|
|
6
|
+
* git2 bindings needed). Turns MindForge's prose worktree instructions into a
|
|
7
|
+
* tested engine.
|
|
8
|
+
*
|
|
9
|
+
* Two Layer-3 ideas ported faithfully:
|
|
10
|
+
* 1. merge_readiness(): `git merge-tree --write-tree` + CONFLICT-line parsing —
|
|
11
|
+
* detects merge conflicts WITHOUT touching the working tree or creating a
|
|
12
|
+
* merge commit. Pure preview.
|
|
13
|
+
* 2. syncSharedDependencyDirs(): lockfile-fingerprint dependency-cache
|
|
14
|
+
* symlinking — links node_modules/target/.venv from the base checkout into a
|
|
15
|
+
* new worktree ONLY when the dependency fingerprint matches, so parallel
|
|
16
|
+
* agents share warm caches without re-installing.
|
|
17
|
+
*
|
|
18
|
+
* Plus: hunk-level stage/unstage/reset via `git apply`, rebase-with-auto-abort,
|
|
19
|
+
* draft-PR via gh, branch-name validation, status parsing.
|
|
20
|
+
*
|
|
21
|
+
* Used by /mindforge:worktrees and the mindforge-swarm-execution skill.
|
|
22
|
+
*/
|
|
23
|
+
'use strict';
|
|
24
|
+
|
|
25
|
+
const { spawnSync } = require('child_process');
|
|
26
|
+
const crypto = require('crypto');
|
|
27
|
+
const fs = require('fs');
|
|
28
|
+
const path = require('path');
|
|
29
|
+
|
|
30
|
+
// ── git invocation helper ─────────────────────────────────────────────────────
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Build a hermetic env for git subprocesses: strip the GIT_* context vars that a
|
|
34
|
+
* caller (notably a `git commit` pre-commit hook) exports, which would otherwise
|
|
35
|
+
* redirect `git -C <dir>` at the PARENT repo's gitdir/index/worktree instead of
|
|
36
|
+
* the target directory. Without this, worktree ops run inside a pre-commit hook
|
|
37
|
+
* silently operate on the wrong repo.
|
|
38
|
+
*/
|
|
39
|
+
function hermeticGitEnv() {
|
|
40
|
+
const env = { ...process.env };
|
|
41
|
+
for (const key of ['GIT_DIR', 'GIT_INDEX_FILE', 'GIT_WORK_TREE', 'GIT_PREFIX', 'GIT_COMMON_DIR', 'GIT_OBJECT_DIRECTORY']) {
|
|
42
|
+
delete env[key];
|
|
43
|
+
}
|
|
44
|
+
return env;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Run a git command in a given directory. Returns { ok, stdout, stderr, status }.
|
|
49
|
+
* Never throws on non-zero exit — callers decide how to handle failure.
|
|
50
|
+
*/
|
|
51
|
+
function git(cwd, args, opts = {}) {
|
|
52
|
+
const result = spawnSync('git', ['-C', cwd, ...args], {
|
|
53
|
+
encoding: 'utf8',
|
|
54
|
+
input: opts.input,
|
|
55
|
+
timeout: opts.timeout || 120_000,
|
|
56
|
+
maxBuffer: 32 * 1024 * 1024,
|
|
57
|
+
env: hermeticGitEnv(),
|
|
58
|
+
});
|
|
59
|
+
return {
|
|
60
|
+
ok: result.status === 0,
|
|
61
|
+
stdout: result.stdout || '',
|
|
62
|
+
stderr: result.stderr || '',
|
|
63
|
+
status: result.status,
|
|
64
|
+
error: result.error,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function gitOrThrow(cwd, args, context, opts) {
|
|
69
|
+
const r = git(cwd, args, opts);
|
|
70
|
+
if (!r.ok) {
|
|
71
|
+
throw new Error(`${context}: ${r.stderr.trim() || r.error?.message || 'git failed'}`);
|
|
72
|
+
}
|
|
73
|
+
return r.stdout;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// ── branch / status primitives ────────────────────────────────────────────────
|
|
77
|
+
|
|
78
|
+
function getCurrentBranch(repoRoot) {
|
|
79
|
+
return gitOrThrow(repoRoot, ['rev-parse', '--abbrev-ref', 'HEAD'], 'get current branch').trim();
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function validateBranchName(repoRoot, branch) {
|
|
83
|
+
const r = git(repoRoot, ['check-ref-format', '--branch', branch]);
|
|
84
|
+
if (!r.ok) {
|
|
85
|
+
const msg = r.stderr.trim() || 'branch name is not a valid git ref';
|
|
86
|
+
throw new Error(msg);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
function branchHeadOid(repoRoot, branch) {
|
|
91
|
+
return gitOrThrow(repoRoot, ['rev-parse', branch], 'git rev-parse').trim();
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function statusShort(cwd) {
|
|
95
|
+
const r = git(cwd, ['status', '--short']);
|
|
96
|
+
if (!r.ok) return [];
|
|
97
|
+
return r.stdout.split('\n').map(l => l.trim()).filter(Boolean);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function hasUncommittedChanges(worktreePath) {
|
|
101
|
+
return statusShort(worktreePath).length > 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Parse `git status --porcelain=v1` into structured entries.
|
|
106
|
+
*/
|
|
107
|
+
function statusEntries(worktreePath) {
|
|
108
|
+
const out = gitOrThrow(worktreePath, ['status', '--porcelain=v1', '--untracked-files=all'], 'git status');
|
|
109
|
+
return out.split('\n').map(parseStatusLine).filter(Boolean);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function parseStatusLine(line) {
|
|
113
|
+
if (line.length < 4) return null;
|
|
114
|
+
const indexStatus = line[0];
|
|
115
|
+
const worktreeStatus = line[1];
|
|
116
|
+
const rawPath = line.slice(3).trim();
|
|
117
|
+
if (!rawPath) return null;
|
|
118
|
+
const displayPath = rawPath;
|
|
119
|
+
const normalizedPath = rawPath.includes(' -> ') ? rawPath.split(' -> ').pop().trim() : rawPath;
|
|
120
|
+
const conflicted =
|
|
121
|
+
indexStatus === 'U' || worktreeStatus === 'U' ||
|
|
122
|
+
(indexStatus === 'A' && worktreeStatus === 'A') ||
|
|
123
|
+
(indexStatus === 'D' && worktreeStatus === 'D');
|
|
124
|
+
return {
|
|
125
|
+
path: normalizedPath,
|
|
126
|
+
displayPath,
|
|
127
|
+
indexStatus,
|
|
128
|
+
worktreeStatus,
|
|
129
|
+
staged: indexStatus !== ' ' && indexStatus !== '?',
|
|
130
|
+
unstaged: worktreeStatus !== ' ' && worktreeStatus !== '?',
|
|
131
|
+
untracked: indexStatus === '?' && worktreeStatus === '?',
|
|
132
|
+
conflicted,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// ── Layer-3 #1: non-mutating merge-readiness ──────────────────────────────────
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Detect whether `rightBranch` merges cleanly into `leftBranch` WITHOUT touching
|
|
140
|
+
* the working tree, using `git merge-tree --write-tree`. Returns
|
|
141
|
+
* { status: 'ready'|'conflicted', summary, conflicts: string[] }.
|
|
142
|
+
*/
|
|
143
|
+
function mergeReadinessForBranches(repoRoot, leftBranch, rightBranch) {
|
|
144
|
+
const r = git(repoRoot, ['merge-tree', '--write-tree', leftBranch, rightBranch]);
|
|
145
|
+
const merged = `${r.stdout}\n${r.stderr}`;
|
|
146
|
+
const conflicts = merged.split('\n').map(parseMergeConflictPath).filter(Boolean);
|
|
147
|
+
|
|
148
|
+
if (r.ok) {
|
|
149
|
+
return {
|
|
150
|
+
status: 'ready',
|
|
151
|
+
summary: `Merge ready: ${rightBranch} into ${leftBranch}`,
|
|
152
|
+
conflicts: [],
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
if (conflicts.length > 0) {
|
|
157
|
+
const head = conflicts.slice(0, 3).join(', ');
|
|
158
|
+
const overflow = conflicts.length - 3;
|
|
159
|
+
const detail = overflow > 0 ? `${head}, +${overflow} more` : head;
|
|
160
|
+
return {
|
|
161
|
+
status: 'conflicted',
|
|
162
|
+
summary: `Merge blocked between ${leftBranch} and ${rightBranch} by ${conflicts.length} conflict(s): ${detail}`,
|
|
163
|
+
conflicts,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
throw new Error(`git merge-tree failed: ${r.stderr.trim()}`);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function parseMergeConflictPath(line) {
|
|
171
|
+
if (!line.includes('CONFLICT')) return null;
|
|
172
|
+
const parts = line.split(' in ');
|
|
173
|
+
if (parts.length < 2) return null;
|
|
174
|
+
const p = parts[1].trim();
|
|
175
|
+
return p || null;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* merge-readiness for a worktree {path, branch, baseBranch} — convenience
|
|
180
|
+
* wrapper that runs the branch check from the base checkout.
|
|
181
|
+
*/
|
|
182
|
+
function mergeReadiness(worktree) {
|
|
183
|
+
const repoRoot = baseCheckoutPath(worktree);
|
|
184
|
+
const readiness = mergeReadinessForBranches(repoRoot, worktree.baseBranch, worktree.branch);
|
|
185
|
+
if (readiness.status === 'ready') {
|
|
186
|
+
readiness.summary = `Merge ready into ${worktree.baseBranch}`;
|
|
187
|
+
}
|
|
188
|
+
return readiness;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// ── worktree lifecycle ────────────────────────────────────────────────────────
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Create a worktree for a session id under worktreeRoot, on a new branch
|
|
195
|
+
* `<branchPrefix>/<sessionId>`. Returns { path, branch, baseBranch }.
|
|
196
|
+
* Also syncs shared dependency caches (Layer-3 #2).
|
|
197
|
+
*/
|
|
198
|
+
function createForSession(sessionId, opts = {}) {
|
|
199
|
+
const repoRoot = opts.repoRoot || process.cwd();
|
|
200
|
+
const worktreeRoot = opts.worktreeRoot || path.join(repoRoot, '.mindforge', 'worktrees');
|
|
201
|
+
const branchPrefix = (opts.branchPrefix || 'mindforge/agents').trim().replace(/^\/+|\/+$/g, '');
|
|
202
|
+
if (!branchPrefix) throw new Error('branchPrefix cannot be empty');
|
|
203
|
+
|
|
204
|
+
const branch = `${branchPrefix}/${sessionId}`;
|
|
205
|
+
validateBranchName(repoRoot, branch);
|
|
206
|
+
|
|
207
|
+
const base = getCurrentBranch(repoRoot);
|
|
208
|
+
const wtPath = path.join(worktreeRoot, sessionId);
|
|
209
|
+
fs.mkdirSync(worktreeRoot, { recursive: true });
|
|
210
|
+
|
|
211
|
+
gitOrThrow(repoRoot, ['worktree', 'add', '-b', branch, wtPath, 'HEAD'], 'git worktree add');
|
|
212
|
+
|
|
213
|
+
const info = { path: wtPath, branch, baseBranch: base };
|
|
214
|
+
try {
|
|
215
|
+
syncSharedDependencyDirs(info, repoRoot);
|
|
216
|
+
} catch (e) {
|
|
217
|
+
process.stderr.write(`[worktree] shared dependency cache sync warning: ${e.message}\n`);
|
|
218
|
+
}
|
|
219
|
+
return info;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function remove(worktree, repoRoot) {
|
|
223
|
+
const root = repoRoot || tryBaseCheckoutPath(worktree);
|
|
224
|
+
if (!root) {
|
|
225
|
+
if (fs.existsSync(worktree.path)) fs.rmSync(worktree.path, { recursive: true, force: true });
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
const r = git(root, ['worktree', 'remove', '--force', worktree.path]);
|
|
229
|
+
if (!r.ok && fs.existsSync(worktree.path)) {
|
|
230
|
+
fs.rmSync(worktree.path, { recursive: true, force: true });
|
|
231
|
+
}
|
|
232
|
+
git(root, ['branch', '-D', worktree.branch]); // best-effort
|
|
233
|
+
// Prune any stale registration so a removed worktree's path can be reused and
|
|
234
|
+
// never collides with a later `git worktree add` (the registry is repo-global).
|
|
235
|
+
git(root, ['worktree', 'prune']);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function list() {
|
|
239
|
+
const r = git(process.cwd(), ['worktree', 'list', '--porcelain']);
|
|
240
|
+
if (!r.ok) throw new Error(`git worktree list failed: ${r.stderr.trim()}`);
|
|
241
|
+
return r.stdout.split('\n').filter(l => l.startsWith('worktree ')).map(l => l.slice('worktree '.length).trim());
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Resolve the base checkout path for a worktree by parsing `git worktree list
|
|
246
|
+
* --porcelain` and matching the base branch (falls back to the first non-self
|
|
247
|
+
* worktree).
|
|
248
|
+
*/
|
|
249
|
+
function baseCheckoutPath(worktree) {
|
|
250
|
+
const p = tryBaseCheckoutPath(worktree);
|
|
251
|
+
if (!p) throw new Error(`Failed to locate base checkout for ${worktree.baseBranch}`);
|
|
252
|
+
return p;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function tryBaseCheckoutPath(worktree) {
|
|
256
|
+
const r = git(worktree.path, ['worktree', 'list', '--porcelain']);
|
|
257
|
+
if (!r.ok) return null;
|
|
258
|
+
|
|
259
|
+
const targetBranch = `refs/heads/${worktree.baseBranch}`;
|
|
260
|
+
let currentPath = null;
|
|
261
|
+
let currentBranch = null;
|
|
262
|
+
let fallback = null;
|
|
263
|
+
|
|
264
|
+
const finalize = () => {
|
|
265
|
+
if (currentPath) {
|
|
266
|
+
if (!fallback && currentPath !== worktree.path) fallback = currentPath;
|
|
267
|
+
if (currentBranch === targetBranch && currentPath !== worktree.path) return currentPath;
|
|
268
|
+
}
|
|
269
|
+
return null;
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
for (const line of r.stdout.split('\n')) {
|
|
273
|
+
if (line === '') {
|
|
274
|
+
const hit = finalize();
|
|
275
|
+
if (hit) return hit;
|
|
276
|
+
currentPath = null;
|
|
277
|
+
currentBranch = null;
|
|
278
|
+
continue;
|
|
279
|
+
}
|
|
280
|
+
if (line.startsWith('worktree ')) currentPath = line.slice('worktree '.length).trim();
|
|
281
|
+
else if (line.startsWith('branch ')) currentBranch = line.slice('branch '.length).trim();
|
|
282
|
+
}
|
|
283
|
+
const hit = finalize();
|
|
284
|
+
return hit || fallback;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// ── Layer-3 #2: lockfile-fingerprint dependency-cache symlinking ──────────────
|
|
288
|
+
|
|
289
|
+
function detectSharedDependencyStrategies(repoRoot) {
|
|
290
|
+
const strategies = [];
|
|
291
|
+
const has = f => fs.existsSync(path.join(repoRoot, f));
|
|
292
|
+
const isDir = d => { try { return fs.statSync(path.join(repoRoot, d)).isDirectory(); } catch { return false; } };
|
|
293
|
+
|
|
294
|
+
if (isDir('node_modules') && has('package.json')) {
|
|
295
|
+
if (has('pnpm-lock.yaml')) strategies.push({ label: 'node_modules (pnpm)', dir: 'node_modules', fingerprint: ['package.json', 'pnpm-lock.yaml'] });
|
|
296
|
+
else if (has('bun.lockb')) strategies.push({ label: 'node_modules (bun)', dir: 'node_modules', fingerprint: ['package.json', 'bun.lockb'] });
|
|
297
|
+
else if (has('yarn.lock')) strategies.push({ label: 'node_modules (yarn)', dir: 'node_modules', fingerprint: ['package.json', 'yarn.lock'] });
|
|
298
|
+
else if (has('package-lock.json')) strategies.push({ label: 'node_modules (npm)', dir: 'node_modules', fingerprint: ['package.json', 'package-lock.json'] });
|
|
299
|
+
}
|
|
300
|
+
if (isDir('target') && has('Cargo.toml')) {
|
|
301
|
+
const fp = ['Cargo.toml'];
|
|
302
|
+
if (has('Cargo.lock')) fp.push('Cargo.lock');
|
|
303
|
+
strategies.push({ label: 'target (cargo)', dir: 'target', fingerprint: fp });
|
|
304
|
+
}
|
|
305
|
+
if (isDir('.venv')) {
|
|
306
|
+
const pyFiles = ['uv.lock', 'poetry.lock', 'Pipfile.lock', 'requirements.txt', 'pyproject.toml', 'setup.py', 'setup.cfg'].filter(has);
|
|
307
|
+
if (pyFiles.length) strategies.push({ label: '.venv (python)', dir: '.venv', fingerprint: pyFiles });
|
|
308
|
+
}
|
|
309
|
+
return strategies;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
function dependencyFingerprint(root, files) {
|
|
313
|
+
const hasher = crypto.createHash('sha256');
|
|
314
|
+
for (const rel of files) {
|
|
315
|
+
const content = fs.readFileSync(path.join(root, rel));
|
|
316
|
+
hasher.update(rel);
|
|
317
|
+
hasher.update(Buffer.from([0]));
|
|
318
|
+
hasher.update(content);
|
|
319
|
+
hasher.update(Buffer.from([0xff]));
|
|
320
|
+
}
|
|
321
|
+
return hasher.digest('hex');
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
function syncSharedDependencyDirs(worktree, repoRoot) {
|
|
325
|
+
const root = repoRoot || baseCheckoutPath(worktree);
|
|
326
|
+
const applied = [];
|
|
327
|
+
for (const strategy of detectSharedDependencyStrategies(root)) {
|
|
328
|
+
if (syncOneDependencyDir(worktree, root, strategy)) applied.push(strategy.label);
|
|
329
|
+
}
|
|
330
|
+
return applied;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
function syncOneDependencyDir(worktree, repoRoot, strategy) {
|
|
334
|
+
const rootDir = path.join(repoRoot, strategy.dir);
|
|
335
|
+
if (!fs.existsSync(rootDir)) return false;
|
|
336
|
+
|
|
337
|
+
const wtDir = path.join(worktree.path, strategy.dir);
|
|
338
|
+
const rootFp = dependencyFingerprint(repoRoot, strategy.fingerprint);
|
|
339
|
+
let wtFp = null;
|
|
340
|
+
try { wtFp = dependencyFingerprint(worktree.path, strategy.fingerprint); } catch { wtFp = null; }
|
|
341
|
+
|
|
342
|
+
// Fingerprints diverge → do NOT share; ensure worktree has its own real dir.
|
|
343
|
+
if (wtFp !== rootFp) {
|
|
344
|
+
if (isSymlink(wtDir)) {
|
|
345
|
+
fs.rmSync(wtDir, { force: true });
|
|
346
|
+
fs.mkdirSync(wtDir, { recursive: true });
|
|
347
|
+
}
|
|
348
|
+
return false;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if (fs.existsSync(wtDir)) {
|
|
352
|
+
return isSymlinkTo(wtDir, rootDir);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
fs.symlinkSync(rootDir, wtDir, 'dir');
|
|
356
|
+
return true;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
function isSymlink(p) {
|
|
360
|
+
try { return fs.lstatSync(p).isSymbolicLink(); } catch { return false; }
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function isSymlinkTo(p, target) {
|
|
364
|
+
if (!isSymlink(p)) return false;
|
|
365
|
+
try { return fs.readlinkSync(p) === target; } catch { return false; }
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
// ── hunk-level staging via git apply ──────────────────────────────────────────
|
|
369
|
+
|
|
370
|
+
function diffPatchTextForPaths(cwd, extraArgs, paths) {
|
|
371
|
+
if (!paths.length) return '';
|
|
372
|
+
const r = git(cwd, ['diff', '--patch', '--find-renames', ...extraArgs, '--', ...paths]);
|
|
373
|
+
if (!r.ok) throw new Error(`git diff failed: ${r.stderr.trim()}`);
|
|
374
|
+
return r.stdout;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Extract per-hunk patches (each carrying the file header) so a single hunk can
|
|
379
|
+
* be applied independently via `git apply`.
|
|
380
|
+
*/
|
|
381
|
+
function extractPatchHunks(section, patchText) {
|
|
382
|
+
const lines = patchText.split('\n');
|
|
383
|
+
const diffStart = lines.findIndex(l => l.startsWith('diff --git '));
|
|
384
|
+
if (diffStart === -1) return [];
|
|
385
|
+
let firstHunk = -1;
|
|
386
|
+
for (let i = diffStart; i < lines.length; i++) {
|
|
387
|
+
if (lines[i].startsWith('@@')) { firstHunk = i; break; }
|
|
388
|
+
}
|
|
389
|
+
if (firstHunk === -1) return [];
|
|
390
|
+
|
|
391
|
+
const header = lines.slice(diffStart, firstHunk);
|
|
392
|
+
const hunkStarts = [];
|
|
393
|
+
for (let i = firstHunk; i < lines.length; i++) {
|
|
394
|
+
if (lines[i].startsWith('@@')) hunkStarts.push(i);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
return hunkStarts.map((start, idx) => {
|
|
398
|
+
const end = hunkStarts[idx + 1] ?? lines.length;
|
|
399
|
+
const patchLines = [...header, ...lines.slice(start, end)];
|
|
400
|
+
return { section, header: lines[start], patch: patchLines.join('\n') + '\n' };
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
function statusPatchView(worktree, entry) {
|
|
405
|
+
if (entry.untracked) return null;
|
|
406
|
+
const stagedPatch = diffPatchTextForPaths(worktree.path, ['--cached'], [entry.path]);
|
|
407
|
+
const unstagedPatch = diffPatchTextForPaths(worktree.path, [], [entry.path]);
|
|
408
|
+
const hunks = [];
|
|
409
|
+
if (stagedPatch.trim()) hunks.push(...extractPatchHunks('staged', stagedPatch));
|
|
410
|
+
if (unstagedPatch.trim()) hunks.push(...extractPatchHunks('unstaged', unstagedPatch));
|
|
411
|
+
if (!hunks.length) return null;
|
|
412
|
+
return { path: entry.path, displayPath: entry.displayPath, hunks };
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
function applyPatch(cwd, args, patch, action) {
|
|
416
|
+
const r = git(cwd, ['apply', ...args], { input: patch });
|
|
417
|
+
if (!r.ok) throw new Error(`git apply failed while trying to ${action}: ${r.stderr.trim()}`);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
function stageHunk(worktree, hunk) {
|
|
421
|
+
if (hunk.section !== 'unstaged') throw new Error('selected hunk is already staged');
|
|
422
|
+
applyPatch(worktree.path, ['--cached'], hunk.patch, 'stage selected hunk');
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
function unstageHunk(worktree, hunk) {
|
|
426
|
+
if (hunk.section !== 'staged') throw new Error('selected hunk is not staged');
|
|
427
|
+
applyPatch(worktree.path, ['-R', '--cached'], hunk.patch, 'unstage selected hunk');
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// ── rebase with auto-abort ────────────────────────────────────────────────────
|
|
431
|
+
|
|
432
|
+
function rebaseOntoBase(worktree) {
|
|
433
|
+
if (hasUncommittedChanges(worktree.path)) {
|
|
434
|
+
throw new Error(`Worktree ${worktree.branch} has uncommitted changes; commit or discard them before rebasing`);
|
|
435
|
+
}
|
|
436
|
+
const repoRoot = baseCheckoutPath(worktree);
|
|
437
|
+
const before = branchHeadOid(repoRoot, worktree.branch);
|
|
438
|
+
|
|
439
|
+
const r = git(worktree.path, ['rebase', worktree.baseBranch]);
|
|
440
|
+
if (!r.ok) {
|
|
441
|
+
git(worktree.path, ['rebase', '--abort']); // best-effort cleanup
|
|
442
|
+
throw new Error(`git rebase failed: ${(r.stdout + '\n' + r.stderr).trim()}`);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
const after = branchHeadOid(repoRoot, worktree.branch);
|
|
446
|
+
return {
|
|
447
|
+
branch: worktree.branch,
|
|
448
|
+
baseBranch: worktree.baseBranch,
|
|
449
|
+
alreadyUpToDate: before === after || (r.stdout + r.stderr).includes('up to date'),
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
// ── draft PR via gh ───────────────────────────────────────────────────────────
|
|
454
|
+
|
|
455
|
+
function createDraftPr(worktree, title, body, options = {}) {
|
|
456
|
+
if (!title || !title.trim()) throw new Error('PR title cannot be empty');
|
|
457
|
+
const baseBranch = (options.baseBranch || '').trim() || worktree.baseBranch;
|
|
458
|
+
|
|
459
|
+
const push = git(worktree.path, ['push', '-u', 'origin', worktree.branch]);
|
|
460
|
+
if (!push.ok) throw new Error(`git push failed: ${push.stderr.trim()}`);
|
|
461
|
+
|
|
462
|
+
const ghArgs = ['pr', 'create', '--draft', '--base', baseBranch, '--head', worktree.branch, '--title', title.trim(), '--body', body || ''];
|
|
463
|
+
for (const label of (options.labels || []).map(s => s.trim()).filter(Boolean)) ghArgs.push('--label', label);
|
|
464
|
+
for (const reviewer of (options.reviewers || []).map(s => s.trim()).filter(Boolean)) ghArgs.push('--reviewer', reviewer);
|
|
465
|
+
|
|
466
|
+
const result = spawnSync('gh', ghArgs, { cwd: worktree.path, encoding: 'utf8' });
|
|
467
|
+
if (result.status !== 0) throw new Error(`gh pr create failed: ${(result.stderr || '').trim()}`);
|
|
468
|
+
return (result.stdout || '').trim();
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
module.exports = {
|
|
472
|
+
// lifecycle
|
|
473
|
+
createForSession,
|
|
474
|
+
remove,
|
|
475
|
+
list,
|
|
476
|
+
baseCheckoutPath,
|
|
477
|
+
// merge readiness (Layer-3 #1)
|
|
478
|
+
mergeReadiness,
|
|
479
|
+
mergeReadinessForBranches,
|
|
480
|
+
// dependency cache (Layer-3 #2)
|
|
481
|
+
syncSharedDependencyDirs,
|
|
482
|
+
detectSharedDependencyStrategies,
|
|
483
|
+
dependencyFingerprint,
|
|
484
|
+
// status + hunks
|
|
485
|
+
statusEntries,
|
|
486
|
+
statusPatchView,
|
|
487
|
+
stageHunk,
|
|
488
|
+
unstageHunk,
|
|
489
|
+
hasUncommittedChanges,
|
|
490
|
+
// rebase / PR
|
|
491
|
+
rebaseOntoBase,
|
|
492
|
+
createDraftPr,
|
|
493
|
+
// primitives (exported for tests)
|
|
494
|
+
validateBranchName,
|
|
495
|
+
getCurrentBranch,
|
|
496
|
+
branchHeadOid,
|
|
497
|
+
};
|
package/docs/getting-started.md
CHANGED
package/docs/troubleshooting.md
CHANGED
package/docs/user-guide.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mindforge-cc",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.5.0",
|
|
4
4
|
"description": "MindForge \u2014 Sovereign Agentic Intelligence Framework. Sovereign Stability: Production-Hardened Agentic Intelligence (v11)",
|
|
5
5
|
"bin": {
|
|
6
6
|
"mindforge-cc": "bin/install.js",
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
".mindforge/config.json",
|
|
20
20
|
".mindforge/imported-agents.jsonl",
|
|
21
21
|
".mindforge/engine/",
|
|
22
|
+
".mindforge/manifests/",
|
|
23
|
+
".mindforge/schemas/",
|
|
22
24
|
".mindforge/personas/",
|
|
23
25
|
".mindforge/skills/",
|
|
24
26
|
".mindforge/governance/",
|
|
@@ -52,10 +54,14 @@
|
|
|
52
54
|
"SECURITY.md"
|
|
53
55
|
],
|
|
54
56
|
"scripts": {
|
|
55
|
-
"test": "node tests/run-all.js",
|
|
57
|
+
"test": "node scripts/ci/validate-assets.js && node tests/run-all.js",
|
|
56
58
|
"test:single": "node",
|
|
57
59
|
"coverage": "npx c8 node tests/run-all.js",
|
|
58
60
|
"lint": "eslint .",
|
|
61
|
+
"harness:audit": "node bin/harness-audit.js",
|
|
62
|
+
"harness:compliance": "node bin/installer/harness-adapter-compliance.js --check",
|
|
63
|
+
"release:ready": "node bin/utils/readiness-gate.js release",
|
|
64
|
+
"validate:assets": "node scripts/ci/validate-assets.js",
|
|
59
65
|
"commit": "cz",
|
|
60
66
|
"prepare": "husky"
|
|
61
67
|
},
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"description": "Essential development subagents for everyday coding tasks - backend, frontend, fullstack, mobile, and API design",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "MindForge Team",
|
|
7
|
-
"
|
|
7
|
+
"email": "uggesairam0000@gmail.com"
|
|
8
8
|
},
|
|
9
9
|
"repository": "https://github.com/sairam0424/MindForge",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"agents": [
|
|
12
|
-
"./api-designer.md",
|
|
12
|
+
"./api-designer-cc.md",
|
|
13
13
|
"./backend-developer.md",
|
|
14
14
|
"./design-bridge.md",
|
|
15
15
|
"./electron-pro.md",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: api-designer-cc
|
|
2
|
+
name: "api-designer-cc"
|
|
3
3
|
description: "Use this agent when designing new APIs, creating API specifications, or refactoring existing API architecture for scalability and developer experience. Invoke when you need REST/GraphQL endpoint design, OpenAPI documentation, authentication patterns, or API versioning strategies."
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
5
|
model: sonnet
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: backend-developer
|
|
2
|
+
name: "backend-developer"
|
|
3
3
|
description: "Use this agent when building server-side APIs, microservices, and backend systems that require robust architecture, scalability planning, and production-ready implementation."
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
5
|
model: sonnet
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: design-bridge
|
|
2
|
+
name: "design-bridge"
|
|
3
3
|
description: "Use this agent when you need to translate a DESIGN.md from the <DESIGN_MD_SOURCE> repository into polished Claude Code instructions for building user interfaces that faithfully match the chosen brand. Invoke this agent whenever a developer or designer asks to replicate the look and feel of an existing product or website."
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch
|
|
5
5
|
model: opus
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: electron-pro
|
|
2
|
+
name: "electron-pro"
|
|
3
3
|
description: "Use this agent when building Electron desktop applications that require native OS integration, cross-platform distribution, security hardening, and performance optimization. Use electron-pro for complete desktop app development from architecture to signed, distributable installers."
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
5
|
model: sonnet
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: frontend-developer
|
|
2
|
+
name: "frontend-developer"
|
|
3
3
|
description: "Use when building complete frontend applications across React, Vue, and Angular frameworks requiring multi-framework expertise and full-stack integration."
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
5
|
model: sonnet
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: graphql-architect
|
|
2
|
+
name: "graphql-architect"
|
|
3
3
|
description: "Use this agent when designing or evolving GraphQL schemas across microservices, implementing federation architectures, or optimizing query performance in distributed graphs."
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
5
|
model: opus
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: microservices-architect
|
|
2
|
+
name: "microservices-architect"
|
|
3
3
|
description: "Use when designing distributed system architecture, decomposing monolithic applications into independent microservices, or establishing communication patterns between services at scale."
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
5
|
model: opus
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: mobile-developer
|
|
2
|
+
name: "mobile-developer"
|
|
3
3
|
description: "Use this agent when building cross-platform mobile applications requiring native performance optimization, platform-specific features, and offline-first architecture. Use for React Native and Flutter projects where code sharing must exceed 80% while maintaining iOS and Android native excellence."
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
5
|
model: sonnet
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: ui-designer
|
|
2
|
+
name: "ui-designer"
|
|
3
3
|
description: "Use this agent when designing visual interfaces, creating design systems, building component libraries, or refining user-facing aesthetics requiring expert visual design, interaction patterns, and accessibility considerations."
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
5
|
model: sonnet
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: websocket-engineer
|
|
2
|
+
name: "websocket-engineer"
|
|
3
3
|
description: "Use this agent when implementing real-time bidirectional communication features using WebSockets, Socket.IO, or similar technologies at scale."
|
|
4
4
|
tools: Read, Write, Edit, Bash, Glob, Grep
|
|
5
5
|
model: sonnet
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"description": "Language-specific expert agents with deep framework knowledge - Python, TypeScript, Go, Rust, Java, and more",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "MindForge Team",
|
|
7
|
-
"
|
|
7
|
+
"email": "uggesairam0000@gmail.com"
|
|
8
8
|
},
|
|
9
9
|
"repository": "https://github.com/sairam0424/MindForge",
|
|
10
10
|
"license": "MIT",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"./powershell-7-expert.md",
|
|
32
32
|
"./python-pro.md",
|
|
33
33
|
"./rails-expert.md",
|
|
34
|
-
"./react-specialist.md",
|
|
34
|
+
"./react-specialist-cc.md",
|
|
35
35
|
"./rust-engineer.md",
|
|
36
36
|
"./spring-boot-engineer.md",
|
|
37
37
|
"./sql-pro.md",
|