mindforge-cc 11.8.2 → 11.9.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/mindforge/wf-orchestrate-review.md +35 -0
- package/.agent/mindforge/wf-verification-loop.md +45 -0
- package/.agent/mindforge/wf-workflow-optimizer.md +51 -0
- package/.agent/skills/article-illustrator/SKILL.md +7 -7
- package/.agent/skills/arxiv/SKILL.md +6 -6
- package/.agent/skills/code-wiki/SKILL.md +11 -11
- package/.agent/skills/concept-diagrams/SKILL.md +6 -6
- package/.agent/skills/concept-diagrams/examples/apartment-floor-plan-conversion.md +244 -0
- package/.agent/skills/concept-diagrams/examples/automated-password-reset-flow.md +276 -0
- package/.agent/skills/concept-diagrams/examples/autonomous-llm-research-agent-flow.md +240 -0
- package/.agent/skills/concept-diagrams/examples/banana-journey-tree-to-smoothie.md +161 -0
- package/.agent/skills/concept-diagrams/examples/commercial-aircraft-structure.md +209 -0
- package/.agent/skills/concept-diagrams/examples/cpu-ooo-microarchitecture.md +236 -0
- package/.agent/skills/concept-diagrams/examples/electricity-grid-flow.md +182 -0
- package/.agent/skills/concept-diagrams/examples/feature-film-production-pipeline.md +172 -0
- package/.agent/skills/concept-diagrams/examples/hospital-emergency-department-flow.md +165 -0
- package/.agent/skills/concept-diagrams/examples/ml-benchmark-grouped-bar-chart.md +114 -0
- package/.agent/skills/concept-diagrams/examples/place-order-uml-sequence.md +325 -0
- package/.agent/skills/concept-diagrams/examples/smart-city-infrastructure.md +173 -0
- package/.agent/skills/concept-diagrams/examples/smartphone-layer-anatomy.md +154 -0
- package/.agent/skills/concept-diagrams/examples/sn2-reaction-mechanism.md +247 -0
- package/.agent/skills/concept-diagrams/examples/wind-turbine-structure.md +338 -0
- package/.agent/skills/concept-diagrams/templates/template.html +174 -0
- package/.agent/skills/domain-intel/SKILL.md +7 -7
- package/.agent/skills/duckduckgo-search/SKILL.md +17 -17
- package/.agent/skills/github-auth/scripts/gh-env.sh +66 -0
- package/.agent/skills/github-code-review/SKILL.md +9 -9
- package/.agent/skills/github-pr-workflow/SKILL.md +3 -3
- package/.agent/skills/godmode/SKILL.md +8 -8
- package/.agent/skills/jupyter-live-kernel/SKILL.md +3 -3
- package/.agent/skills/kanban-orchestrator/SKILL.md +10 -10
- package/.agent/skills/kanban-worker/SKILL.md +6 -6
- package/.agent/skills/llm-wiki/SKILL.md +7 -7
- package/.agent/skills/mindforge-autonomous/SKILL.md +1 -1
- package/.agent/skills/mindforge-complete-milestone/SKILL.md +1 -1
- package/.agent/skills/mindforge-discuss-phase/SKILL.md +1 -1
- package/.agent/skills/mindforge-do/SKILL.md +1 -1
- package/.agent/skills/mindforge-execute-phase/SKILL.md +1 -1
- package/.agent/skills/mindforge-list-workspaces/SKILL.md +1 -1
- package/.agent/skills/mindforge-manager/SKILL.md +1 -1
- package/.agent/skills/mindforge-neural-orchestrator/SKILL.md +1 -1
- package/.agent/skills/mindforge-new-milestone/SKILL.md +4 -4
- package/.agent/skills/mindforge-new-project/SKILL.md +4 -4
- package/.agent/skills/mindforge-new-workspace/SKILL.md +1 -1
- package/.agent/skills/mindforge-note/SKILL.md +1 -1
- package/.agent/skills/mindforge-plan-phase/SKILL.md +1 -1
- package/.agent/skills/mindforge-profile-user/SKILL.md +1 -1
- package/.agent/skills/mindforge-remove-workspace/SKILL.md +1 -1
- package/.agent/skills/mindforge-research-phase/SKILL.md +1 -1
- package/.agent/skills/mindforge-ui-phase/SKILL.md +1 -1
- package/.agent/skills/mindforge-ui-review/SKILL.md +1 -1
- package/.agent/skills/mindforge-verify-work/SKILL.md +1 -1
- package/.agent/skills/mindforge-workspace-isolated/SKILL.md +1 -1
- package/.agent/skills/node-inspect-debugger/SKILL.md +1 -1
- package/.agent/skills/obsidian/SKILL.md +15 -15
- package/.agent/skills/osint-investigation/SKILL.md +3 -2
- package/.agent/skills/osint-investigation/references/sources/courtlistener.md +98 -0
- package/.agent/skills/osint-investigation/references/sources/gdelt.md +104 -0
- package/.agent/skills/osint-investigation/references/sources/icij-offshore.md +104 -0
- package/.agent/skills/osint-investigation/references/sources/nyc-acris.md +90 -0
- package/.agent/skills/osint-investigation/references/sources/ofac-sdn.md +92 -0
- package/.agent/skills/osint-investigation/references/sources/opencorporates.md +103 -0
- package/.agent/skills/osint-investigation/references/sources/sec-edgar.md +83 -0
- package/.agent/skills/osint-investigation/references/sources/senate-ld.md +89 -0
- package/.agent/skills/osint-investigation/references/sources/usaspending.md +97 -0
- package/.agent/skills/osint-investigation/references/sources/wayback.md +93 -0
- package/.agent/skills/osint-investigation/references/sources/wikipedia.md +107 -0
- package/.agent/skills/osint-investigation/scripts/_http.py +82 -0
- package/.agent/skills/osint-investigation/scripts/_normalize.py +67 -0
- package/.agent/skills/osint-investigation/scripts/build_findings.py +221 -0
- package/.agent/skills/osint-investigation/scripts/entity_resolution.py +228 -0
- package/.agent/skills/osint-investigation/scripts/fetch_courtlistener.py +149 -0
- package/.agent/skills/osint-investigation/scripts/fetch_gdelt.py +161 -0
- package/.agent/skills/osint-investigation/scripts/fetch_icij_offshore.py +234 -0
- package/.agent/skills/osint-investigation/scripts/fetch_nyc_acris.py +203 -0
- package/.agent/skills/osint-investigation/scripts/fetch_ofac_sdn.py +175 -0
- package/.agent/skills/osint-investigation/scripts/fetch_opencorporates.py +191 -0
- package/.agent/skills/osint-investigation/scripts/fetch_sec_edgar.py +184 -0
- package/.agent/skills/osint-investigation/scripts/fetch_senate_ld.py +146 -0
- package/.agent/skills/osint-investigation/scripts/fetch_usaspending.py +170 -0
- package/.agent/skills/osint-investigation/scripts/fetch_wayback.py +142 -0
- package/.agent/skills/osint-investigation/scripts/fetch_wikipedia.py +266 -0
- package/.agent/skills/osint-investigation/scripts/timing_analysis.py +252 -0
- package/.agent/skills/oss-forensics/SKILL.md +10 -9
- package/.agent/skills/oss-forensics/scripts/evidence-store.py +313 -0
- package/.agent/skills/parallel-cli/SKILL.md +2 -2
- package/.agent/skills/pinggy-tunnel/SKILL.md +3 -3
- package/.agent/skills/pixel-art/SKILL.md +2 -2
- package/.agent/skills/plan/SKILL.md +10 -10
- package/.agent/skills/requesting-code-review/SKILL.md +4 -6
- package/.agent/skills/research-paper-writing/SKILL.md +32 -32
- package/.agent/skills/rest-graphql-debug/SKILL.md +31 -32
- package/.agent/skills/s6-container-supervision/SKILL.md +1 -1
- package/.agent/skills/scrapling/SKILL.md +1 -1
- package/.agent/skills/sherlock/SKILL.md +1 -1
- package/.agent/skills/simplify-code/SKILL.md +5 -7
- package/.agent/skills/skill-authoring/SKILL.md +4 -4
- package/.agent/skills/spike/SKILL.md +11 -13
- package/.agent/skills/subagent-driven-development/SKILL.md +7 -11
- package/.agent/skills/systematic-debugging/SKILL.md +13 -14
- package/.agent/skills/test-driven-development/SKILL.md +6 -7
- package/.agent/skills/video-orchestrator/SKILL.md +1 -1
- package/.agent/skills/web-pentest/SKILL.md +7 -7
- package/.mindforge/config.json +3 -2
- package/.mindforge/dynamic-workflows/REGISTRY.md +4 -1
- package/.mindforge/dynamic-workflows/index.json +910 -840
- package/.mindforge/dynamic-workflows/scripts/accessibility-audit.js +88 -90
- package/.mindforge/dynamic-workflows/scripts/ai-model-eval.js +59 -61
- package/.mindforge/dynamic-workflows/scripts/api-contract-test.js +87 -85
- package/.mindforge/dynamic-workflows/scripts/api-migration.js +120 -122
- package/.mindforge/dynamic-workflows/scripts/architecture-modernization.js +84 -86
- package/.mindforge/dynamic-workflows/scripts/code-audit.js +75 -77
- package/.mindforge/dynamic-workflows/scripts/code-explainer.js +99 -101
- package/.mindforge/dynamic-workflows/scripts/competitive-analysis.js +62 -64
- package/.mindforge/dynamic-workflows/scripts/competitive-teardown.js +106 -108
- package/.mindforge/dynamic-workflows/scripts/cost-analysis.js +78 -80
- package/.mindforge/dynamic-workflows/scripts/data-pipeline-validate.js +47 -49
- package/.mindforge/dynamic-workflows/scripts/database-migration.js +85 -87
- package/.mindforge/dynamic-workflows/scripts/debug-detective.js +97 -99
- package/.mindforge/dynamic-workflows/scripts/dependency-health.js +81 -83
- package/.mindforge/dynamic-workflows/scripts/design-system-audit.js +84 -86
- package/.mindforge/dynamic-workflows/scripts/documentation-gen.js +65 -67
- package/.mindforge/dynamic-workflows/scripts/feature-planner.js +78 -80
- package/.mindforge/dynamic-workflows/scripts/incident-response.js +81 -83
- package/.mindforge/dynamic-workflows/scripts/multi-repo-sync.js +49 -51
- package/.mindforge/dynamic-workflows/scripts/mutation-testing.js +113 -115
- package/.mindforge/dynamic-workflows/scripts/onboard-codebase.js +79 -81
- package/.mindforge/dynamic-workflows/scripts/orchestrate-review.js +115 -0
- package/.mindforge/dynamic-workflows/scripts/perf-optimize.js +97 -99
- package/.mindforge/dynamic-workflows/scripts/pr-review.js +61 -63
- package/.mindforge/dynamic-workflows/scripts/refactor-plan.js +88 -90
- package/.mindforge/dynamic-workflows/scripts/release-prep.js +79 -81
- package/.mindforge/dynamic-workflows/scripts/security-hardening.js +117 -119
- package/.mindforge/dynamic-workflows/scripts/security-threat-model.js +119 -121
- package/.mindforge/dynamic-workflows/scripts/tdd-sprint.js +80 -82
- package/.mindforge/dynamic-workflows/scripts/tech-evaluation.js +50 -52
- package/.mindforge/dynamic-workflows/scripts/test-coverage-gap.js +68 -70
- package/.mindforge/dynamic-workflows/scripts/ux-heuristic-audit.js +89 -91
- package/.mindforge/dynamic-workflows/scripts/verification-loop.js +138 -0
- package/.mindforge/dynamic-workflows/scripts/workflow-optimizer.js +136 -0
- package/.mindforge/dynamic-workflows/scripts/writer-reviewer.js +63 -65
- package/.mindforge/memory/sync-manifest.json +1 -1
- package/.mindforge/personas/advisor-researcher.md +2 -2
- package/.mindforge/personas/api-load-tester.md +1 -1
- package/.mindforge/personas/authentication-architect.md +1 -1
- package/.mindforge/personas/backup-recovery-specialist.md +1 -1
- package/.mindforge/personas/build-optimizer.md +1 -1
- package/.mindforge/personas/caching-strategist.md +1 -1
- package/.mindforge/personas/chaos-engineer.md +1 -1
- package/.mindforge/personas/compliance-auditor.md +1 -1
- package/.mindforge/personas/config-management-expert.md +1 -1
- package/.mindforge/personas/coverage-specialist.md +1 -1
- package/.mindforge/personas/debug-specialist.md +2 -2
- package/.mindforge/personas/debugger.md +2 -2
- package/.mindforge/personas/dependency-auditor.md +1 -1
- package/.mindforge/personas/developer.md +1 -1
- package/.mindforge/personas/devops-engineer.md +1 -1
- package/.mindforge/personas/executor.md +1 -1
- package/.mindforge/personas/go-specialist.md +1 -1
- package/.mindforge/personas/incident-commander.md +1 -1
- package/.mindforge/personas/java-specialist.md +1 -1
- package/.mindforge/personas/kubernetes-debugger.md +1 -1
- package/.mindforge/personas/logging-architect.md +1 -1
- package/.mindforge/personas/mf-planner.md +1 -1
- package/.mindforge/personas/mf-researcher.md +1 -1
- package/.mindforge/personas/mf-reviewer.md +1 -1
- package/.mindforge/personas/nyquist-auditor.md +1 -1
- package/.mindforge/personas/observability-engineer.md +1 -1
- package/.mindforge/personas/performance-optimizer.md +1 -1
- package/.mindforge/personas/phase-researcher.md +5 -5
- package/.mindforge/personas/planner.md +1 -1
- package/.mindforge/personas/project-researcher.md +2 -2
- package/.mindforge/personas/python-specialist.md +1 -1
- package/.mindforge/personas/qa-engineer.md +1 -1
- package/.mindforge/personas/release-manager.md +1 -1
- package/.mindforge/personas/research-agent.md +4 -4
- package/.mindforge/personas/roadmapper-extend.md +1 -1
- package/.mindforge/personas/rust-specialist.md +1 -1
- package/.mindforge/personas/security-reviewer.md +1 -1
- package/.mindforge/personas/tech-writer.md +1 -1
- package/.mindforge/personas/typescript-wizard.md +1 -1
- package/.mindforge/personas/ui-researcher.md +1 -1
- package/.mindforge/skills/accessibility/SKILL.md +3 -3
- package/.mindforge/skills/agent-architecture-audit/SKILL.md +11 -0
- package/.mindforge/skills/agent-loops/SKILL.md +1 -1
- package/.mindforge/skills/arxiv/SKILL.md +6 -6
- package/.mindforge/skills/arxiv/scripts/search_arxiv.py +114 -0
- package/.mindforge/skills/code-tour/SKILL.md +2 -2
- package/.mindforge/skills/code-wiki/SKILL.md +11 -11
- package/.mindforge/skills/code-wiki/templates/README.md +31 -0
- package/.mindforge/skills/code-wiki/templates/architecture.md +30 -0
- package/.mindforge/skills/code-wiki/templates/getting-started.md +47 -0
- package/.mindforge/skills/code-wiki/templates/module.md +38 -0
- package/.mindforge/skills/concept-diagrams/SKILL.md +6 -6
- package/.mindforge/skills/concept-diagrams/examples/apartment-floor-plan-conversion.md +244 -0
- package/.mindforge/skills/concept-diagrams/examples/automated-password-reset-flow.md +276 -0
- package/.mindforge/skills/concept-diagrams/examples/autonomous-llm-research-agent-flow.md +240 -0
- package/.mindforge/skills/concept-diagrams/examples/banana-journey-tree-to-smoothie.md +161 -0
- package/.mindforge/skills/concept-diagrams/examples/commercial-aircraft-structure.md +209 -0
- package/.mindforge/skills/concept-diagrams/examples/cpu-ooo-microarchitecture.md +236 -0
- package/.mindforge/skills/concept-diagrams/examples/electricity-grid-flow.md +182 -0
- package/.mindforge/skills/concept-diagrams/examples/feature-film-production-pipeline.md +172 -0
- package/.mindforge/skills/concept-diagrams/examples/hospital-emergency-department-flow.md +165 -0
- package/.mindforge/skills/concept-diagrams/examples/ml-benchmark-grouped-bar-chart.md +114 -0
- package/.mindforge/skills/concept-diagrams/examples/place-order-uml-sequence.md +325 -0
- package/.mindforge/skills/concept-diagrams/examples/smart-city-infrastructure.md +173 -0
- package/.mindforge/skills/concept-diagrams/examples/smartphone-layer-anatomy.md +154 -0
- package/.mindforge/skills/concept-diagrams/examples/sn2-reaction-mechanism.md +247 -0
- package/.mindforge/skills/concept-diagrams/examples/wind-turbine-structure.md +338 -0
- package/.mindforge/skills/concept-diagrams/references/dashboard-patterns.md +43 -0
- package/.mindforge/skills/concept-diagrams/references/infrastructure-patterns.md +144 -0
- package/.mindforge/skills/concept-diagrams/references/physical-shape-cookbook.md +42 -0
- package/.mindforge/skills/concept-diagrams/templates/template.html +174 -0
- package/.mindforge/skills/creative-ideation/references/full-prompt-library.md +110 -0
- package/.mindforge/skills/documentation/SKILL.md +1 -1
- package/.mindforge/skills/domain-intel/SKILL.md +7 -7
- package/.mindforge/skills/domain-intel/scripts/domain_intel.py +397 -0
- package/.mindforge/skills/duckduckgo-search/SKILL.md +17 -17
- package/.mindforge/skills/duckduckgo-search/scripts/duckduckgo.sh +28 -0
- package/.mindforge/skills/environment-management/SKILL.md +1 -1
- package/.mindforge/skills/github-code-review/SKILL.md +9 -9
- package/.mindforge/skills/github-code-review/references/review-output-template.md +74 -0
- package/.mindforge/skills/github-issues/templates/bug-report.md +35 -0
- package/.mindforge/skills/github-issues/templates/feature-request.md +31 -0
- package/.mindforge/skills/github-pr-workflow/SKILL.md +3 -3
- package/.mindforge/skills/github-pr-workflow/references/ci-troubleshooting.md +183 -0
- package/.mindforge/skills/github-pr-workflow/references/conventional-commits.md +71 -0
- package/.mindforge/skills/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
- package/.mindforge/skills/github-pr-workflow/templates/pr-body-feature.md +33 -0
- package/.mindforge/skills/incident-response/SKILL.md +1 -1
- package/.mindforge/skills/jupyter-live-kernel/SKILL.md +3 -3
- package/.mindforge/skills/kanban-orchestrator/SKILL.md +10 -10
- package/.mindforge/skills/kanban-worker/SKILL.md +6 -6
- package/.mindforge/skills/meme-generation/SKILL.md +1 -1
- package/.mindforge/skills/meme-generation/scripts/generate_meme.py +470 -0
- package/.mindforge/skills/meme-generation/scripts/templates.json +97 -0
- package/.mindforge/skills/obsidian/SKILL.md +15 -15
- package/.mindforge/skills/orch-pipeline/SKILL.md +2 -2
- package/.mindforge/skills/osint-investigation/SKILL.md +3 -2
- package/.mindforge/skills/osint-investigation/references/sources/courtlistener.md +98 -0
- package/.mindforge/skills/osint-investigation/references/sources/gdelt.md +104 -0
- package/.mindforge/skills/osint-investigation/references/sources/icij-offshore.md +104 -0
- package/.mindforge/skills/osint-investigation/references/sources/nyc-acris.md +90 -0
- package/.mindforge/skills/osint-investigation/references/sources/ofac-sdn.md +92 -0
- package/.mindforge/skills/osint-investigation/references/sources/opencorporates.md +103 -0
- package/.mindforge/skills/osint-investigation/references/sources/sec-edgar.md +83 -0
- package/.mindforge/skills/osint-investigation/references/sources/senate-ld.md +89 -0
- package/.mindforge/skills/osint-investigation/references/sources/usaspending.md +97 -0
- package/.mindforge/skills/osint-investigation/references/sources/wayback.md +93 -0
- package/.mindforge/skills/osint-investigation/references/sources/wikipedia.md +107 -0
- package/.mindforge/skills/osint-investigation/scripts/_http.py +82 -0
- package/.mindforge/skills/osint-investigation/scripts/_normalize.py +67 -0
- package/.mindforge/skills/osint-investigation/scripts/build_findings.py +221 -0
- package/.mindforge/skills/osint-investigation/scripts/entity_resolution.py +228 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_courtlistener.py +149 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_gdelt.py +161 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_icij_offshore.py +234 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_nyc_acris.py +203 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_ofac_sdn.py +175 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_opencorporates.py +191 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_sec_edgar.py +184 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_senate_ld.py +146 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_usaspending.py +170 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_wayback.py +142 -0
- package/.mindforge/skills/osint-investigation/scripts/fetch_wikipedia.py +266 -0
- package/.mindforge/skills/osint-investigation/scripts/timing_analysis.py +252 -0
- package/.mindforge/skills/osint-investigation/templates/source-template.md +59 -0
- package/.mindforge/skills/oss-forensics/SKILL.md +6 -6
- package/.mindforge/skills/oss-forensics/references/evidence-types.md +89 -0
- package/.mindforge/skills/oss-forensics/references/github-archive-guide.md +184 -0
- package/.mindforge/skills/oss-forensics/references/investigation-templates.md +131 -0
- package/.mindforge/skills/oss-forensics/references/recovery-techniques.md +164 -0
- package/.mindforge/skills/oss-forensics/scripts/evidence-store.py +313 -0
- package/.mindforge/skills/oss-forensics/templates/forensic-report.md +151 -0
- package/.mindforge/skills/oss-forensics/templates/malicious-package-report.md +43 -0
- package/.mindforge/skills/pixel-art/SKILL.md +2 -2
- package/.mindforge/skills/pixel-art/references/palettes.md +49 -0
- package/.mindforge/skills/plan/SKILL.md +10 -10
- package/.mindforge/skills/requesting-code-review/SKILL.md +4 -6
- package/.mindforge/skills/research-paper-writing/SKILL.md +32 -32
- package/.mindforge/skills/research-paper-writing/references/autoreason-methodology.md +394 -0
- package/.mindforge/skills/research-paper-writing/references/checklists.md +434 -0
- package/.mindforge/skills/research-paper-writing/references/citation-workflow.md +563 -0
- package/.mindforge/skills/research-paper-writing/references/experiment-patterns.md +728 -0
- package/.mindforge/skills/research-paper-writing/references/human-evaluation.md +476 -0
- package/.mindforge/skills/research-paper-writing/references/paper-types.md +481 -0
- package/.mindforge/skills/research-paper-writing/references/reviewer-guidelines.md +433 -0
- package/.mindforge/skills/research-paper-writing/references/sources.md +191 -0
- package/.mindforge/skills/research-paper-writing/references/writing-guide.md +474 -0
- package/.mindforge/skills/research-paper-writing/templates/README.md +251 -0
- package/.mindforge/skills/scrapling/SKILL.md +1 -1
- package/.mindforge/skills/security-review/SKILL.md +1 -1
- package/.mindforge/skills/sherlock/SKILL.md +1 -1
- package/.mindforge/skills/simplify-code/SKILL.md +5 -7
- package/.mindforge/skills/spike/SKILL.md +11 -13
- package/.mindforge/skills/subagent-driven-development/SKILL.md +7 -11
- package/.mindforge/skills/subagent-driven-development/references/context-budget-discipline.md +53 -0
- package/.mindforge/skills/subagent-driven-development/references/gates-taxonomy.md +93 -0
- package/.mindforge/skills/systematic-debugging/SKILL.md +13 -14
- package/.mindforge/skills/test-driven-development/SKILL.md +7 -8
- package/.mindforge/skills/testing-standards/SKILL.md +1 -1
- package/.mindforge/skills/web-pentest/SKILL.md +2 -2
- package/.mindforge/skills/web-pentest/references/bypass-techniques.md +133 -0
- package/.mindforge/skills/web-pentest/references/exploitation-techniques.md +204 -0
- package/.mindforge/skills/web-pentest/references/scope-enforcement.md +110 -0
- package/.mindforge/skills/web-pentest/references/vuln-taxonomy.md +81 -0
- package/.mindforge/skills/web-pentest/templates/authorization.md +69 -0
- package/.mindforge/skills/web-pentest/templates/pentest-report.md +178 -0
- package/.mindforge/skills/writing-skills/SKILL.md +4 -3
- package/CHANGELOG.md +35 -0
- package/MINDFORGE.md +3 -3
- package/README.md +9 -7
- package/RELEASENOTES.md +65 -2
- package/SECURITY.md +5 -3
- package/bin/autonomous/auto-runner.js +5 -2
- package/bin/engine/skill-loader.js +4 -0
- package/bin/governance/rbac.js +4 -0
- package/bin/memory/eis-client.js +1 -0
- package/bin/mindforge-cli.js +5 -0
- package/bin/models/bedrock-provider.js +192 -0
- package/bin/models/model-client.js +19 -0
- package/bin/spawn-agent.js +9 -2
- package/docs/commands-reference.md +68 -6
- package/docs/faq.md +38 -1
- package/docs/getting-started.md +27 -12
- package/docs/sdk-reference.md +36 -3
- package/docs/troubleshooting.md +59 -1
- package/docs/user-guide.md +7 -4
- package/package.json +3 -3
- package/.claude/commands/mindforge/skill-tdd.md +0 -53
- package/.claude/commands/mindforge/skills-index.md +0 -118
- package/.claude/commands/mindforge/systematic-debug.md +0 -60
- package/.claude/commands/mindforge/wf-accessibility-audit.md +0 -31
- package/.claude/commands/mindforge/wf-ai-model-eval.md +0 -31
- package/.claude/commands/mindforge/wf-api-migration.md +0 -31
- package/.claude/commands/mindforge/wf-architecture-modernization.md +0 -32
- package/.claude/commands/mindforge/wf-catalog.md +0 -59
- package/.claude/commands/mindforge/wf-code-audit.md +0 -31
- package/.claude/commands/mindforge/wf-code-explainer.md +0 -31
- package/.claude/commands/mindforge/wf-competitive-analysis.md +0 -31
- package/.claude/commands/mindforge/wf-competitive-teardown.md +0 -31
- package/.claude/commands/mindforge/wf-cost-analysis.md +0 -31
- package/.claude/commands/mindforge/wf-data-pipeline-validate.md +0 -31
- package/.claude/commands/mindforge/wf-database-migration.md +0 -31
- package/.claude/commands/mindforge/wf-debug-detective.md +0 -32
- package/.claude/commands/mindforge/wf-design-system-audit.md +0 -31
- package/.claude/commands/mindforge/wf-documentation-gen.md +0 -31
- package/.claude/commands/mindforge/wf-feature-planner.md +0 -31
- package/.claude/commands/mindforge/wf-incident-response.md +0 -31
- package/.claude/commands/mindforge/wf-multi-repo-sync.md +0 -31
- package/.claude/commands/mindforge/wf-mutation-testing.md +0 -31
- package/.claude/commands/mindforge/wf-onboard-codebase.md +0 -31
- package/.claude/commands/mindforge/wf-perf-optimize.md +0 -31
- package/.claude/commands/mindforge/wf-pr-review.md +0 -31
- package/.claude/commands/mindforge/wf-refactor-plan.md +0 -31
- package/.claude/commands/mindforge/wf-release-prep.md +0 -31
- package/.claude/commands/mindforge/wf-security-threat-model.md +0 -31
- package/.claude/commands/mindforge/wf-tdd-sprint.md +0 -31
- package/.claude/commands/mindforge/wf-tech-evaluation.md +0 -31
- package/.claude/commands/mindforge/wf-ux-heuristic-audit.md +0 -31
- package/.claude/commands/mindforge/wf-writer-reviewer.md +0 -30
|
@@ -10,93 +10,91 @@ export const meta = {
|
|
|
10
10
|
],
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
13
|
+
const MAP_SCHEMA = {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
primaryLanguage: { type: 'string' },
|
|
17
|
+
secondaryLanguages: { type: 'array', items: { type: 'string' } },
|
|
18
|
+
frameworks: { type: 'array', items: { type: 'string' } },
|
|
19
|
+
entryPoints: { type: 'array', items: { type: 'string' } },
|
|
20
|
+
testingFrameworks: { type: 'array', items: { type: 'string' } },
|
|
21
|
+
totalFiles: { type: 'string' },
|
|
22
|
+
keyDirectories: { type: 'array', items: { type: 'object', properties: { path: { type: 'string' }, purpose: { type: 'string' } }, required: ['path', 'purpose'] } },
|
|
23
|
+
},
|
|
24
|
+
required: ['primaryLanguage', 'frameworks', 'entryPoints', 'keyDirectories'],
|
|
25
|
+
};
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
const DOMAIN_SCHEMA = {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
domains: { type: 'array', items: { type: 'object', properties: { name: { type: 'string' }, description: { type: 'string' }, keyFiles: { type: 'array', items: { type: 'string' } } }, required: ['name', 'description', 'keyFiles'] } },
|
|
31
|
+
coreAbstractions: { type: 'array', items: { type: 'string' } },
|
|
32
|
+
businessPurpose: { type: 'string' },
|
|
33
|
+
},
|
|
34
|
+
required: ['domains', 'coreAbstractions', 'businessPurpose'],
|
|
35
|
+
};
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
37
|
+
const ARCH_SCHEMA = {
|
|
38
|
+
type: 'object',
|
|
39
|
+
properties: {
|
|
40
|
+
architectureStyle: { type: 'string' },
|
|
41
|
+
layers: { type: 'array', items: { type: 'object', properties: { name: { type: 'string' }, responsibility: { type: 'string' } }, required: ['name', 'responsibility'] } },
|
|
42
|
+
dataFlow: { type: 'string' },
|
|
43
|
+
keyPatterns: { type: 'array', items: { type: 'string' } },
|
|
44
|
+
externalDependencies: { type: 'array', items: { type: 'string' } },
|
|
45
|
+
gotchas: { type: 'array', items: { type: 'string' } },
|
|
46
|
+
},
|
|
47
|
+
required: ['architectureStyle', 'layers', 'dataFlow', 'keyPatterns', 'gotchas'],
|
|
48
|
+
};
|
|
50
49
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
const TOUR_SCHEMA = {
|
|
51
|
+
type: 'object',
|
|
52
|
+
properties: {
|
|
53
|
+
quickStart: { type: 'string' },
|
|
54
|
+
tourSteps: { type: 'array', items: { type: 'object', properties: { step: { type: 'number' }, title: { type: 'string' }, file: { type: 'string' }, explanation: { type: 'string' } }, required: ['step', 'title', 'explanation'] } },
|
|
55
|
+
keyConventions: { type: 'array', items: { type: 'string' } },
|
|
56
|
+
whereToStartCoding: { type: 'string' },
|
|
57
|
+
commonPitfalls: { type: 'array', items: { type: 'string' } },
|
|
58
|
+
},
|
|
59
|
+
required: ['quickStart', 'tourSteps', 'keyConventions', 'whereToStartCoding', 'commonPitfalls'],
|
|
60
|
+
};
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
const repo = args || 'current repository (run from repo root)';
|
|
64
63
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
64
|
+
phase('Map');
|
|
65
|
+
log(`Mapping: ${repo}`);
|
|
66
|
+
const map = await agent(
|
|
67
|
+
`Map the structure of this codebase: "${repo}"\n\nIdentify: primary language, frameworks, entry points (main files, index, CLI), test frameworks, and the purpose of each top-level directory. Be specific — list actual file paths.`,
|
|
68
|
+
{ schema: MAP_SCHEMA, label: 'map' }
|
|
69
|
+
);
|
|
70
|
+
log(`${map.primaryLanguage} codebase, ${map.frameworks.join('+')} — ${map.keyDirectories.length} key directories`);
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
72
|
+
phase('Domain');
|
|
73
|
+
const mapSummary = `Stack: ${map.primaryLanguage} + ${map.frameworks.join(', ')}\nDirs: ${map.keyDirectories.map(d => `${d.path} (${d.purpose})`).join(', ')}`;
|
|
74
|
+
const domain = await agent(
|
|
75
|
+
`Identify the business domains and core abstractions in: "${repo}"\n${mapSummary}\n\nWhat problem does this software solve? What are the main domain concepts? What are the key abstractions (models, services, controllers, etc.)?`,
|
|
76
|
+
{ schema: DOMAIN_SCHEMA, label: 'domain' }
|
|
77
|
+
);
|
|
78
|
+
log(`${domain.domains.length} domains: ${domain.domains.map(d => d.name).join(', ')}`);
|
|
80
79
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
80
|
+
phase('Architecture');
|
|
81
|
+
const domainSummary = `Purpose: ${domain.businessPurpose}\nDomains: ${domain.domains.map(d => d.name).join(', ')}\nAbstractions: ${domain.coreAbstractions.join(', ')}`;
|
|
82
|
+
const arch = await agent(
|
|
83
|
+
`Map the technical architecture of: "${repo}"\n${domainSummary}\n\nWhat architecture style (MVC, layered, event-driven, microservices)? What are the layers? How does data flow? What key patterns and gotchas should a new developer know?`,
|
|
84
|
+
{ schema: ARCH_SCHEMA, label: 'architecture' }
|
|
85
|
+
);
|
|
87
86
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
87
|
+
phase('Tour');
|
|
88
|
+
const archSummary = `Style: ${arch.architectureStyle}\nLayers: ${arch.layers.map(l => l.name).join(' → ')}\nPatterns: ${arch.keyPatterns.join(', ')}`;
|
|
89
|
+
const tour = await agent(
|
|
90
|
+
`Create an onboarding tour for: "${repo}"\n${mapSummary}\n${domainSummary}\n${archSummary}\n\nWrite a quick start, a 5-10 step guided tour through the most important files (in learning order), key conventions to follow, where to start making changes, and common pitfalls to avoid.`,
|
|
91
|
+
{ schema: TOUR_SCHEMA, label: 'tour' }
|
|
92
|
+
);
|
|
94
93
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
94
|
+
return {
|
|
95
|
+
repo,
|
|
96
|
+
map,
|
|
97
|
+
domain,
|
|
98
|
+
architecture: arch,
|
|
99
|
+
tour,
|
|
100
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
export const meta = {
|
|
2
|
+
name: 'orchestrate-review',
|
|
3
|
+
description: '4-lens parallel review — factual, domain, safety, style — coordinated as one panel and merged into a single verdict',
|
|
4
|
+
whenToUse: 'When reviewing content or a decision where correctness/security/performance is the wrong axis split — e.g. a document, a policy, a plan, an AI-generated artifact, anything where you want independent factual-accuracy, domain-expert, safety, and voice/style perspectives rather than code-review dimensions',
|
|
5
|
+
phases: [
|
|
6
|
+
{ title: 'Scope', detail: 'pin the target and any domain context' },
|
|
7
|
+
{ title: 'Panel', detail: '4 parallel lenses: factual / domain / safety / style' },
|
|
8
|
+
{ title: 'Consensus', detail: 'merge findings, deduplicate, score severity' },
|
|
9
|
+
{ title: 'Verdict', detail: 'single panel verdict with findings by lens' },
|
|
10
|
+
],
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const LENS_SCHEMA = {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
lens: { type: 'string' },
|
|
17
|
+
findings: {
|
|
18
|
+
type: 'array',
|
|
19
|
+
items: {
|
|
20
|
+
type: 'object',
|
|
21
|
+
properties: {
|
|
22
|
+
severity: { type: 'string', enum: ['blocking', 'major', 'minor', 'suggestion'] },
|
|
23
|
+
location: { type: 'string' },
|
|
24
|
+
issue: { type: 'string' },
|
|
25
|
+
suggestion: { type: 'string' },
|
|
26
|
+
},
|
|
27
|
+
required: ['severity', 'issue', 'suggestion'],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
summary: { type: 'string' },
|
|
31
|
+
},
|
|
32
|
+
required: ['lens', 'findings', 'summary'],
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const VERDICT_SCHEMA = {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: {
|
|
38
|
+
verdict: { type: 'string', enum: ['APPROVED', 'APPROVED_WITH_SUGGESTIONS', 'CHANGES_REQUIRED', 'BLOCKING'] },
|
|
39
|
+
summary: { type: 'string' },
|
|
40
|
+
blockingIssues: { type: 'array', items: { type: 'string' } },
|
|
41
|
+
majorIssues: { type: 'array', items: { type: 'string' } },
|
|
42
|
+
suggestions: { type: 'array', items: { type: 'string' } },
|
|
43
|
+
},
|
|
44
|
+
required: ['verdict', 'summary', 'blockingIssues', 'majorIssues', 'suggestions'],
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
function parseArgs(raw) {
|
|
48
|
+
if (raw && typeof raw === 'string') {
|
|
49
|
+
const trimmed = raw.trim();
|
|
50
|
+
if (trimmed.startsWith('{')) {
|
|
51
|
+
try {
|
|
52
|
+
return JSON.parse(trimmed);
|
|
53
|
+
} catch {
|
|
54
|
+
// Not valid JSON despite looking like it — fall through and treat as a plain target string.
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return trimmed;
|
|
58
|
+
}
|
|
59
|
+
return raw || {};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const input = parseArgs(args);
|
|
63
|
+
const target = (typeof input === 'string' ? input : input.target) || 'the artifact provided in this conversation';
|
|
64
|
+
const domainContext = typeof input === 'object' ? input.domainContext : null;
|
|
65
|
+
|
|
66
|
+
phase('Scope');
|
|
67
|
+
log(`Reviewing: ${target}`);
|
|
68
|
+
if (domainContext) log(`Domain context: ${domainContext}`);
|
|
69
|
+
|
|
70
|
+
const PANEL = [
|
|
71
|
+
{
|
|
72
|
+
label: 'factual',
|
|
73
|
+
prompt: `Review for FACTUAL ACCURACY: "${target}". Check every checkable claim: numbers, dates, names, quotes, causal claims, and anything stated as fact. Flag claims that are wrong, unverifiable, unsourced where a source is implied, or stated with more confidence than the evidence supports. Do not flag matters of opinion or style — only things that could be objectively wrong. Rate each as blocking/major/minor/suggestion.`,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
label: 'domain',
|
|
77
|
+
prompt: `Review for DOMAIN CORRECTNESS: "${target}". ${domainContext ? `Domain context: ${domainContext}. ` : ''}Check whether the content reflects genuine expertise in its subject area: correct terminology, sound reasoning within the field's own conventions, no naive mistakes an actual practitioner would catch, and no missing context a domain expert would consider essential. Rate each as blocking/major/minor/suggestion.`,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
label: 'safety',
|
|
81
|
+
prompt: `Review for SAFETY: "${target}". Check for: harmful, dangerous, or misleading instructions; content that could cause real-world harm if acted on; missing caveats on genuinely risky actions; privacy or security exposure; and anything that should carry a warning but doesn't. Do not flag mild edginess or strong opinions — only things with real potential for harm. Rate each as blocking/major/minor/suggestion.`,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
label: 'style',
|
|
85
|
+
prompt: `Review for STYLE and VOICE: "${target}". Check for: clarity, tone consistency, awkward phrasing, structure that buries the point, jargon that doesn't earn its place, and whether the writing matches its evident purpose and audience. Rate each as blocking/major/minor/suggestion — reserve "blocking" for style so broken it undermines comprehension, not mere preference.`,
|
|
86
|
+
},
|
|
87
|
+
];
|
|
88
|
+
|
|
89
|
+
phase('Panel');
|
|
90
|
+
const reviews = await parallel(
|
|
91
|
+
PANEL.map(p => () => agent(p.prompt, { schema: LENS_SCHEMA, label: `lens:${p.label}`, phase: 'Panel' }))
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
phase('Consensus');
|
|
95
|
+
const allFindings = reviews.filter(Boolean).flatMap(r => r.findings.map(f => ({ ...f, lens: r.lens })));
|
|
96
|
+
const blocking = allFindings.filter(f => f.severity === 'blocking');
|
|
97
|
+
const major = allFindings.filter(f => f.severity === 'major');
|
|
98
|
+
const minor = allFindings.filter(f => f.severity === 'minor');
|
|
99
|
+
const suggestions = allFindings.filter(f => f.severity === 'suggestion');
|
|
100
|
+
log(`${allFindings.length} total findings: ${blocking.length} blocking, ${major.length} major, ${minor.length} minor, ${suggestions.length} suggestions`);
|
|
101
|
+
|
|
102
|
+
const findingsSummary = allFindings.slice(0, 20).map(f => `[${f.severity.toUpperCase()}][${f.lens}] ${f.issue} → ${f.suggestion}`).join('\n');
|
|
103
|
+
|
|
104
|
+
phase('Verdict');
|
|
105
|
+
const verdict = await agent(
|
|
106
|
+
`Produce a final panel verdict for: "${target}"\n\nFindings:\n${findingsSummary}\n\nIf there are any blocking issues, verdict is BLOCKING. If major issues exist, CHANGES_REQUIRED. If only minor/suggestions, APPROVED_WITH_SUGGESTIONS. Otherwise APPROVED.`,
|
|
107
|
+
{ schema: VERDICT_SCHEMA, label: 'verdict' }
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
target,
|
|
112
|
+
reviews: reviews.filter(Boolean),
|
|
113
|
+
verdict,
|
|
114
|
+
stats: { total: allFindings.length, blocking: blocking.length, major: major.length, minor: minor.length, suggestions: suggestions.length },
|
|
115
|
+
};
|
|
@@ -10,119 +10,117 @@ export const meta = {
|
|
|
10
10
|
],
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
properties: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
13
|
+
const PROFILE_SCHEMA = {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
slowestPaths: { type: 'array', items: { type: 'object', properties: { path: { type: 'string' }, currentLatency: { type: 'string' }, target: { type: 'string' } }, required: ['path', 'currentLatency'] } },
|
|
17
|
+
bottleneckHypothesis: { type: 'string' },
|
|
18
|
+
profilingCommands: { type: 'array', items: { type: 'string' } },
|
|
19
|
+
},
|
|
20
|
+
required: ['slowestPaths', 'bottleneckHypothesis', 'profilingCommands'],
|
|
21
|
+
};
|
|
23
22
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
required: ['description', 'impact', 'fix', 'effort'],
|
|
23
|
+
const BOTTLENECK_SCHEMA = {
|
|
24
|
+
type: 'object',
|
|
25
|
+
properties: {
|
|
26
|
+
dimension: { type: 'string' },
|
|
27
|
+
issues: {
|
|
28
|
+
type: 'array',
|
|
29
|
+
items: {
|
|
30
|
+
type: 'object',
|
|
31
|
+
properties: {
|
|
32
|
+
description: { type: 'string' },
|
|
33
|
+
location: { type: 'string' },
|
|
34
|
+
impact: { type: 'string', enum: ['high', 'medium', 'low'] },
|
|
35
|
+
fix: { type: 'string' },
|
|
36
|
+
effort: { type: 'string', enum: ['low', 'medium', 'high'] },
|
|
40
37
|
},
|
|
38
|
+
required: ['description', 'impact', 'fix', 'effort'],
|
|
41
39
|
},
|
|
42
40
|
},
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
},
|
|
42
|
+
required: ['dimension', 'issues'],
|
|
43
|
+
};
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
required: ['rank', 'fix', 'expectedImprovement', 'effort', 'implementation'],
|
|
45
|
+
const FIX_PLAN_SCHEMA = {
|
|
46
|
+
type: 'object',
|
|
47
|
+
properties: {
|
|
48
|
+
prioritized: {
|
|
49
|
+
type: 'array',
|
|
50
|
+
items: {
|
|
51
|
+
type: 'object',
|
|
52
|
+
properties: {
|
|
53
|
+
rank: { type: 'number' },
|
|
54
|
+
fix: { type: 'string' },
|
|
55
|
+
dimension: { type: 'string' },
|
|
56
|
+
expectedImprovement: { type: 'string' },
|
|
57
|
+
effort: { type: 'string' },
|
|
58
|
+
implementation: { type: 'string' },
|
|
62
59
|
},
|
|
60
|
+
required: ['rank', 'fix', 'expectedImprovement', 'effort', 'implementation'],
|
|
63
61
|
},
|
|
64
|
-
totalEstimate: { type: 'string' },
|
|
65
|
-
quickWins: { type: 'array', items: { type: 'string' } },
|
|
66
62
|
},
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
totalEstimate: { type: 'string' },
|
|
64
|
+
quickWins: { type: 'array', items: { type: 'string' } },
|
|
65
|
+
},
|
|
66
|
+
required: ['prioritized', 'totalEstimate', 'quickWins'],
|
|
67
|
+
};
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
69
|
+
const BENCHMARK_SCHEMA = {
|
|
70
|
+
type: 'object',
|
|
71
|
+
properties: {
|
|
72
|
+
baselineTests: { type: 'array', items: { type: 'string' } },
|
|
73
|
+
successCriteria: { type: 'array', items: { type: 'object', properties: { fix: { type: 'string' }, metric: { type: 'string' }, target: { type: 'string' } }, required: ['fix', 'metric', 'target'] } },
|
|
74
|
+
monitoringSetup: { type: 'array', items: { type: 'string' } },
|
|
75
|
+
},
|
|
76
|
+
required: ['baselineTests', 'successCriteria', 'monitoringSetup'],
|
|
77
|
+
};
|
|
79
78
|
|
|
80
|
-
|
|
79
|
+
const target = args || 'current application (run from repo root)';
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
phase('Profile');
|
|
82
|
+
log(`Profiling: ${target}`);
|
|
83
|
+
const profile = await agent(
|
|
84
|
+
`Identify the slowest code paths and performance bottleneck hypothesis for: "${target}"\n\nWhat are the likely slow endpoints/functions? What profiling commands should be run? What is your initial bottleneck hypothesis?`,
|
|
85
|
+
{ schema: PROFILE_SCHEMA, label: 'profile' }
|
|
86
|
+
);
|
|
87
|
+
log(`${profile.slowestPaths.length} slow paths identified, hypothesis: ${profile.bottleneckHypothesis.slice(0, 80)}`);
|
|
89
88
|
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
phase('Identify');
|
|
90
|
+
const context = `Target: ${target}\nSlow paths: ${profile.slowestPaths.map(p => p.path).join(', ')}\nHypothesis: ${profile.bottleneckHypothesis}`;
|
|
92
91
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
92
|
+
const DIMENSIONS = [
|
|
93
|
+
{ label: 'db', prompt: `Hunt for DATABASE performance bottlenecks in: ${context}\n\nLook for: N+1 queries, missing indexes, full table scans, unoptimized JOINs, missing query caching, connection pool exhaustion, slow aggregate queries.` },
|
|
94
|
+
{ label: 'network', prompt: `Hunt for NETWORK performance bottlenecks in: ${context}\n\nLook for: missing HTTP caching, no CDN, uncompressed responses, chatty APIs (many small requests), missing connection pooling, DNS lookups in hot paths, synchronous external calls.` },
|
|
95
|
+
{ label: 'cpu', prompt: `Hunt for CPU/COMPUTE performance bottlenecks in: ${context}\n\nLook for: inefficient algorithms (O(n²) where O(n log n) exists), regex in hot paths, JSON serialization overhead, cryptographic operations in request path, missing memoization.` },
|
|
96
|
+
{ label: 'memory', prompt: `Hunt for MEMORY performance bottlenecks in: ${context}\n\nLook for: memory leaks, unbounded caches, large object retention, excessive GC pressure, buffer accumulation, object pool exhaustion, unnecessary data loading.` },
|
|
97
|
+
];
|
|
99
98
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
99
|
+
const bottlenecks = await parallel(
|
|
100
|
+
DIMENSIONS.map(d => () => agent(d.prompt, { schema: BOTTLENECK_SCHEMA, label: `identify:${d.label}`, phase: 'Identify' }))
|
|
101
|
+
);
|
|
103
102
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
103
|
+
phase('Plan');
|
|
104
|
+
const allIssues = bottlenecks.filter(Boolean).flatMap(b => b.issues.map(i => ({ ...i, dimension: b.dimension })));
|
|
105
|
+
log(`${allIssues.length} bottlenecks found across ${bottlenecks.filter(Boolean).length} dimensions`);
|
|
106
|
+
const issueList = allIssues.slice(0, 20).map(i => `[${i.dimension}][${i.impact}/${i.effort}] ${i.description} → ${i.fix}`).join('\n');
|
|
107
|
+
const fixPlan = await agent(
|
|
108
|
+
`Prioritize this performance fix backlog by impact-to-effort ratio:\n${issueList}\n\nRank by: high impact + low effort first. List quick wins (can implement in <1 hour) separately. Include implementation guidance for each.`,
|
|
109
|
+
{ schema: FIX_PLAN_SCHEMA, label: 'plan' }
|
|
110
|
+
);
|
|
112
111
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
112
|
+
phase('Benchmark');
|
|
113
|
+
const topFixes = fixPlan.prioritized.slice(0, 5).map(f => `${f.rank}. ${f.fix} (expected: ${f.expectedImprovement})`).join('\n');
|
|
114
|
+
const benchmarks = await agent(
|
|
115
|
+
`Define performance benchmarks for verifying these fixes:\n${topFixes}\n\nFor each fix, specify: the baseline test to run before, the success metric (P95 latency, throughput, memory), and the target value. Include monitoring setup recommendations.`,
|
|
116
|
+
{ schema: BENCHMARK_SCHEMA, label: 'benchmark' }
|
|
117
|
+
);
|
|
119
118
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
119
|
+
return {
|
|
120
|
+
target,
|
|
121
|
+
profile,
|
|
122
|
+
bottlenecks: bottlenecks.filter(Boolean),
|
|
123
|
+
fixPlan,
|
|
124
|
+
benchmarks,
|
|
125
|
+
stats: { totalIssues: allIssues.length, quickWins: fixPlan.quickWins.length },
|
|
126
|
+
};
|