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,97 +10,95 @@ 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 CHARACTERIZE_SCHEMA = {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
incidentTitle: { type: 'string' },
|
|
17
|
+
severity: { type: 'string', enum: ['P0', 'P1', 'P2', 'P3'] },
|
|
18
|
+
impactDescription: { type: 'string' },
|
|
19
|
+
affectedSystems: { type: 'array', items: { type: 'string' } },
|
|
20
|
+
startTime: { type: 'string' },
|
|
21
|
+
symptoms: { type: 'array', items: { type: 'string' } },
|
|
22
|
+
hypothesis: { type: 'string' },
|
|
23
|
+
},
|
|
24
|
+
required: ['incidentTitle', 'severity', 'impactDescription', 'affectedSystems', 'symptoms', 'hypothesis'],
|
|
25
|
+
};
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
const INVESTIGATE_SCHEMA = {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
angle: { type: 'string' },
|
|
31
|
+
findings: { type: 'array', items: { type: 'string' } },
|
|
32
|
+
suspectedCause: { type: 'string' },
|
|
33
|
+
confidence: { type: 'string', enum: ['high', 'medium', 'low'] },
|
|
34
|
+
},
|
|
35
|
+
required: ['angle', 'findings', 'suspectedCause', 'confidence'],
|
|
36
|
+
};
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
38
|
+
const MITIGATE_SCHEMA = {
|
|
39
|
+
type: 'object',
|
|
40
|
+
properties: {
|
|
41
|
+
immediateActions: { type: 'array', items: { type: 'object', properties: { action: { type: 'string' }, command: { type: 'string' }, risk: { type: 'string' } }, required: ['action', 'risk'] } },
|
|
42
|
+
estimatedRecoveryTime: { type: 'string' },
|
|
43
|
+
rollbackSteps: { type: 'array', items: { type: 'string' } },
|
|
44
|
+
},
|
|
45
|
+
required: ['immediateActions', 'estimatedRecoveryTime', 'rollbackSteps'],
|
|
46
|
+
};
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
48
|
+
const POSTMORTEM_SCHEMA = {
|
|
49
|
+
type: 'object',
|
|
50
|
+
properties: {
|
|
51
|
+
rootCause: { type: 'string' },
|
|
52
|
+
timeline: { type: 'array', items: { type: 'object', properties: { time: { type: 'string' }, event: { type: 'string' } }, required: ['time', 'event'] } },
|
|
53
|
+
contributingFactors: { type: 'array', items: { type: 'string' } },
|
|
54
|
+
actionItems: { type: 'array', items: { type: 'object', properties: { action: { type: 'string' }, owner: { type: 'string' }, priority: { type: 'string' } }, required: ['action', 'owner', 'priority'] } },
|
|
55
|
+
lessonsLearned: { type: 'array', items: { type: 'string' } },
|
|
56
|
+
},
|
|
57
|
+
required: ['rootCause', 'timeline', 'contributingFactors', 'actionItems', 'lessonsLearned'],
|
|
58
|
+
};
|
|
60
59
|
|
|
61
|
-
|
|
60
|
+
const incident = args || 'No incident description provided — pass your incident description, symptoms, and affected systems as args.';
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
62
|
+
phase('Alert');
|
|
63
|
+
log(`Incident: ${incident.slice(0, 80)}`);
|
|
64
|
+
const characterization = await agent(
|
|
65
|
+
`Characterize this production incident: "${incident}"\n\nDetermine severity (P0=total outage, P1=major degradation, P2=partial impact, P3=minor), list affected systems, symptoms, and your initial hypothesis about the root cause.`,
|
|
66
|
+
{ schema: CHARACTERIZE_SCHEMA, label: 'characterize' }
|
|
67
|
+
);
|
|
68
|
+
log(`[${characterization.severity}] ${characterization.incidentTitle} — ${characterization.symptoms.length} symptoms identified`);
|
|
70
69
|
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
phase('Investigate');
|
|
71
|
+
const context = `Incident: ${characterization.incidentTitle}\nHypothesis: ${characterization.hypothesis}\nSystems: ${characterization.affectedSystems.join(', ')}`;
|
|
73
72
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
const INVESTIGATION_ANGLES = [
|
|
74
|
+
{ label: 'logs', prompt: `Investigate this incident from the LOGS angle: ${context}\n\nWhat log patterns, error messages, or anomalies would you look for? What do recent application/system logs likely show? What would confirm or refute the hypothesis?` },
|
|
75
|
+
{ label: 'metrics', prompt: `Investigate this incident from the METRICS angle: ${context}\n\nWhat metrics (CPU, memory, latency, error rates, throughput) would spike or drop? What dashboards to check? What thresholds were likely crossed?` },
|
|
76
|
+
{ label: 'traces', prompt: `Investigate this incident from the DISTRIBUTED TRACES angle: ${context}\n\nWhat trace patterns would reveal the failure point? Which service calls would show elevated latency or errors? What would a flame graph show?` },
|
|
77
|
+
{ label: 'code', prompt: `Investigate this incident from the RECENT CODE CHANGES angle: ${context}\n\nWhat types of recent deployments, config changes, or dependency updates could cause this? What specific code patterns are suspect? What git history to examine?` },
|
|
78
|
+
];
|
|
80
79
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
const investigations = await parallel(
|
|
81
|
+
INVESTIGATION_ANGLES.map(a => () => agent(a.prompt, { schema: INVESTIGATE_SCHEMA, label: `investigate:${a.label}`, phase: 'Investigate' }))
|
|
82
|
+
);
|
|
84
83
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
phase('Mitigate');
|
|
85
|
+
const investigationSummary = investigations.filter(Boolean).map(i => `[${i.angle}] ${i.suspectedCause} (${i.confidence} confidence): ${i.findings.slice(0, 2).join(', ')}`).join('\n');
|
|
86
|
+
const mitigation = await agent(
|
|
87
|
+
`Based on these investigation findings, identify IMMEDIATE mitigation actions:\n${investigationSummary}\n\nPrioritize actions that restore service quickly. Include rollback steps and estimate recovery time.`,
|
|
88
|
+
{ schema: MITIGATE_SCHEMA, label: 'mitigate' }
|
|
89
|
+
);
|
|
91
90
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
91
|
+
phase('RCA');
|
|
92
|
+
const allContext = `Incident: ${characterization.incidentTitle}\nInvestigations:\n${investigationSummary}\nMitigation: ${mitigation.immediateActions.map(a => a.action).join(', ')}`;
|
|
93
|
+
const postmortem = await agent(
|
|
94
|
+
`Write a blameless postmortem for this incident:\n${allContext}\n\nIdentify the root cause, create a timeline, list contributing factors, define concrete action items (with owners and priority), and extract lessons learned.`,
|
|
95
|
+
{ schema: POSTMORTEM_SCHEMA, label: 'postmortem' }
|
|
96
|
+
);
|
|
98
97
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
}
|
|
98
|
+
return {
|
|
99
|
+
incident,
|
|
100
|
+
characterization,
|
|
101
|
+
investigations: investigations.filter(Boolean),
|
|
102
|
+
mitigation,
|
|
103
|
+
postmortem,
|
|
104
|
+
};
|
|
@@ -10,54 +10,52 @@ export const meta = {
|
|
|
10
10
|
],
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
properties: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return { target, discovery, audits: audits.filter(Boolean), syncPlan };
|
|
63
|
-
}
|
|
13
|
+
const REPO_SCHEMA = {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
repos: { type: 'array', items: { type: 'object', properties: { name: { type: 'string' }, path: { type: 'string' }, role: { type: 'string' } }, required: ['name', 'path'] } },
|
|
17
|
+
referenceRepo: { type: 'string' },
|
|
18
|
+
syncDimensions: { type: 'array', items: { type: 'string' } },
|
|
19
|
+
},
|
|
20
|
+
required: ['repos', 'syncDimensions'],
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const AUDIT_SCHEMA = {
|
|
24
|
+
type: 'object',
|
|
25
|
+
properties: {
|
|
26
|
+
repo: { type: 'string' },
|
|
27
|
+
divergences: { type: 'array', items: { type: 'object', properties: { dimension: { type: 'string' }, severity: { type: 'string', enum: ['critical', 'high', 'medium', 'low'] }, description: { type: 'string' }, fix: { type: 'string' } }, required: ['dimension', 'severity', 'description', 'fix'] } },
|
|
28
|
+
},
|
|
29
|
+
required: ['repo', 'divergences'],
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const SYNC_SCHEMA = {
|
|
33
|
+
type: 'object',
|
|
34
|
+
properties: {
|
|
35
|
+
summary: { type: 'string' },
|
|
36
|
+
syncItems: { type: 'array', items: { type: 'object', properties: { repo: { type: 'string' }, dimension: { type: 'string' }, action: { type: 'string' }, priority: { type: 'string', enum: ['p0', 'p1', 'p2'] } }, required: ['repo', 'dimension', 'action', 'priority'] } },
|
|
37
|
+
},
|
|
38
|
+
required: ['summary', 'syncItems'],
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const target = args || 'current workspace (list repo paths in args, comma-separated)';
|
|
42
|
+
|
|
43
|
+
phase('Discover');
|
|
44
|
+
const discovery = await agent(`Discover all related repositories in: "${target}". List each repo's name, path, and role (primary/service/library/config). Identify the reference/canonical repo (if any) and what dimensions should be synchronized: dependencies, CI config, lint config, code conventions, shared utilities, test patterns.`, { schema: REPO_SCHEMA, label: 'discover' });
|
|
45
|
+
if (!discovery) { return { target, error: 'discovery-agent-null' }; }
|
|
46
|
+
log(`Found ${discovery.repos.length} repos, ${discovery.syncDimensions.length} sync dimensions`);
|
|
47
|
+
|
|
48
|
+
phase('Audit');
|
|
49
|
+
const audits = await parallel(
|
|
50
|
+
discovery.repos.map(r => () => agent(`Audit repo "${r.name}" at "${r.path}" against the reference "${discovery.referenceRepo || 'best practices'}". Check dimensions: ${discovery.syncDimensions.join(', ')}. For each divergence: dimension, severity, what differs, and exact fix.`, { schema: AUDIT_SCHEMA, label: `audit:${r.name}`, phase: 'Audit' }))
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
phase('DivergenceMap');
|
|
54
|
+
const allDivergences = audits.filter(Boolean).flatMap(a => a.divergences.map(d => ({ repo: a.repo, ...d })));
|
|
55
|
+
log(`${allDivergences.length} divergences across ${discovery.repos.length} repos`);
|
|
56
|
+
|
|
57
|
+
phase('SyncPlan');
|
|
58
|
+
const divergenceText = allDivergences.slice(0, 20).map(d => `[${d.severity}] ${d.repo}/${d.dimension}: ${d.description} → ${d.fix}`).join('\n');
|
|
59
|
+
const syncPlan = await agent(`Create a sync plan for: "${target}"\n\nDivergences:\n${divergenceText}\n\nPrioritize by severity and group by dimension for efficient batching. P0=critical/security, P1=high/consistency, P2=medium/nice-to-have.`, { schema: SYNC_SCHEMA, label: 'sync-plan' });
|
|
60
|
+
|
|
61
|
+
return { target, discovery, audits: audits.filter(Boolean), syncPlan };
|
|
@@ -10,139 +10,137 @@ export const meta = {
|
|
|
10
10
|
],
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
mutationType: { type: 'string', enum: ['condition', 'operator', 'return-value', 'boundary', 'negation', 'constant'] },
|
|
28
|
-
},
|
|
29
|
-
required: ['file', 'code', 'mutationType'],
|
|
13
|
+
const SOURCE_SCHEMA = {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
sourceFiles: { type: 'array', items: { type: 'string' } },
|
|
17
|
+
testFiles: { type: 'array', items: { type: 'string' } },
|
|
18
|
+
mutableLines: {
|
|
19
|
+
type: 'array',
|
|
20
|
+
items: {
|
|
21
|
+
type: 'object',
|
|
22
|
+
properties: {
|
|
23
|
+
file: { type: 'string' },
|
|
24
|
+
lineNumber: { type: 'number' },
|
|
25
|
+
code: { type: 'string' },
|
|
26
|
+
mutationType: { type: 'string', enum: ['condition', 'operator', 'return-value', 'boundary', 'negation', 'constant'] },
|
|
30
27
|
},
|
|
28
|
+
required: ['file', 'code', 'mutationType'],
|
|
31
29
|
},
|
|
32
30
|
},
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
},
|
|
32
|
+
required: ['sourceFiles', 'testFiles', 'mutableLines'],
|
|
33
|
+
};
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
required: ['id', 'file', 'original', 'mutated', 'mutationType', 'description'],
|
|
35
|
+
const MUTATIONS_SCHEMA = {
|
|
36
|
+
type: 'object',
|
|
37
|
+
properties: {
|
|
38
|
+
mutations: {
|
|
39
|
+
type: 'array',
|
|
40
|
+
items: {
|
|
41
|
+
type: 'object',
|
|
42
|
+
properties: {
|
|
43
|
+
id: { type: 'string' },
|
|
44
|
+
file: { type: 'string' },
|
|
45
|
+
original: { type: 'string' },
|
|
46
|
+
mutated: { type: 'string' },
|
|
47
|
+
mutationType: { type: 'string' },
|
|
48
|
+
description: { type: 'string' },
|
|
52
49
|
},
|
|
50
|
+
required: ['id', 'file', 'original', 'mutated', 'mutationType', 'description'],
|
|
53
51
|
},
|
|
54
52
|
},
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
},
|
|
54
|
+
required: ['mutations'],
|
|
55
|
+
};
|
|
57
56
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
const KILL_SCHEMA = {
|
|
58
|
+
type: 'object',
|
|
59
|
+
properties: {
|
|
60
|
+
mutationId: { type: 'string' },
|
|
61
|
+
status: { type: 'string', enum: ['killed', 'survived', 'timeout', 'equivalent'] },
|
|
62
|
+
killedBy: { type: 'string' },
|
|
63
|
+
reason: { type: 'string' },
|
|
64
|
+
suggestedTest: { type: 'string' },
|
|
65
|
+
},
|
|
66
|
+
required: ['mutationId', 'status', 'reason'],
|
|
67
|
+
};
|
|
69
68
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
},
|
|
87
|
-
required: ['mutation', 'suggestedTest'],
|
|
69
|
+
const REPORT_SCHEMA = {
|
|
70
|
+
type: 'object',
|
|
71
|
+
properties: {
|
|
72
|
+
mutationScore: { type: 'number' },
|
|
73
|
+
summary: { type: 'string' },
|
|
74
|
+
killed: { type: 'number' },
|
|
75
|
+
survived: { type: 'number' },
|
|
76
|
+
timeout: { type: 'number' },
|
|
77
|
+
equivalent: { type: 'number' },
|
|
78
|
+
survivorDetails: {
|
|
79
|
+
type: 'array',
|
|
80
|
+
items: {
|
|
81
|
+
type: 'object',
|
|
82
|
+
properties: {
|
|
83
|
+
mutation: { type: 'string' },
|
|
84
|
+
suggestedTest: { type: 'string' },
|
|
88
85
|
},
|
|
86
|
+
required: ['mutation', 'suggestedTest'],
|
|
89
87
|
},
|
|
90
|
-
topWeaknesses: { type: 'array', items: { type: 'string' } },
|
|
91
88
|
},
|
|
92
|
-
|
|
93
|
-
}
|
|
89
|
+
topWeaknesses: { type: 'array', items: { type: 'string' } },
|
|
90
|
+
},
|
|
91
|
+
required: ['mutationScore', 'summary', 'killed', 'survived', 'topWeaknesses'],
|
|
92
|
+
};
|
|
94
93
|
|
|
95
|
-
|
|
94
|
+
const target = args || 'current codebase (run from repo root)';
|
|
96
95
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
96
|
+
phase('Analyze');
|
|
97
|
+
log(`Analyzing source for mutable lines in: ${target}`);
|
|
98
|
+
const sourceAnalysis = await agent(
|
|
99
|
+
`Analyze the source code in: "${target}" to identify mutable lines for mutation testing. Find: (1) conditional expressions (if/else, ternary, switch), (2) arithmetic/comparison operators (+, -, *, /, >, <, ==, !=), (3) return values in key functions, (4) boundary values (0, -1, +1, null checks), (5) boolean negations. Also identify source files and their test files. List the 15 most testable mutable lines.`,
|
|
100
|
+
{ schema: SOURCE_SCHEMA, label: 'analyze' }
|
|
101
|
+
);
|
|
102
|
+
if (!sourceAnalysis) { return { target, error: 'sourceAnalysis-agent-null' }; }
|
|
103
|
+
log(`Found ${sourceAnalysis.mutableLines.length} mutable lines across ${sourceAnalysis.sourceFiles.length} source files`);
|
|
105
104
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
105
|
+
phase('Mutate');
|
|
106
|
+
const mutableContext = sourceAnalysis.mutableLines.slice(0, 15).map(l => `${l.file}:${l.lineNumber || '?'} [${l.mutationType}] \`${l.code}\``).join('\n');
|
|
107
|
+
const mutationSpec = await agent(
|
|
108
|
+
`Generate 10-15 specific mutations for testing the test suite quality of: "${target}"\n\nMutable lines:\n${mutableContext}\n\nFor each mutation: assign unique ID (M01, M02...), show original code, mutated code, mutation type, and plain-English description of what changed. Focus on mutations that SHOULD be caught by good tests — boundary off-by-ones, condition flips, operator swaps.`,
|
|
109
|
+
{ schema: MUTATIONS_SCHEMA, label: 'mutate' }
|
|
110
|
+
);
|
|
111
|
+
if (!mutationSpec) { return { target, sourceAnalysis, error: 'mutationSpec-agent-null' }; }
|
|
112
|
+
log(`Generated ${mutationSpec.mutations.length} mutations`);
|
|
114
113
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
114
|
+
phase('Kill');
|
|
115
|
+
const killResults = await parallel(
|
|
116
|
+
mutationSpec.mutations.map(m => () => agent(
|
|
117
|
+
`Assess if the existing test suite in: "${target}" would CATCH this mutation.\n\nMutation ${m.id}: In file ${m.file}, changed \`${m.original}\` to \`${m.mutated}\`.\nDescription: ${m.description}\n\nLook at the test files. Would any existing test fail if this mutation were applied? Answer: killed (test would fail), survived (no test catches it), equivalent (mutation doesn't change behavior), or timeout (unclear). If survived, suggest a specific test that would kill it.`,
|
|
118
|
+
{ schema: KILL_SCHEMA, label: `kill:${m.id}`, phase: 'Kill' }
|
|
119
|
+
))
|
|
120
|
+
);
|
|
122
121
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
122
|
+
phase('Report');
|
|
123
|
+
const killData = killResults.filter(Boolean);
|
|
124
|
+
const killed = killData.filter(r => r.status === 'killed').length;
|
|
125
|
+
const survived = killData.filter(r => r.status === 'survived').length;
|
|
126
|
+
const timeout = killData.filter(r => r.status === 'timeout').length;
|
|
127
|
+
const equivalent = killData.filter(r => r.status === 'equivalent').length;
|
|
128
|
+
const total = killed + survived + timeout;
|
|
129
|
+
const mutationScore = total > 0 ? Math.round((killed / total) * 100) : 0;
|
|
131
130
|
|
|
132
|
-
|
|
131
|
+
log(`Mutation score: ${mutationScore}% (${killed} killed, ${survived} survived, ${timeout} timeout)`);
|
|
133
132
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
133
|
+
const survivorSummary = killData
|
|
134
|
+
.filter(r => r.status === 'survived')
|
|
135
|
+
.map(r => {
|
|
136
|
+
const mutation = mutationSpec.mutations.find(m => m.id === r.mutationId);
|
|
137
|
+
return `${r.mutationId}: ${mutation ? mutation.description : r.mutationId} — suggested test: ${r.suggestedTest || 'none'}`;
|
|
138
|
+
})
|
|
139
|
+
.join('\n');
|
|
141
140
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
141
|
+
const report = await agent(
|
|
142
|
+
`Write a mutation testing report for: "${target}"\n\nMutation score: ${mutationScore}% (${killed}/${total} killed)\nKilled: ${killed}, Survived: ${survived}, Timeout: ${timeout}, Equivalent: ${equivalent}\n\nSurvivors:\n${survivorSummary || 'none'}\n\nDescribe: overall test suite quality, top weaknesses in test coverage exposed by survivors, specific suggested tests to add, and interpretation of the mutation score.`,
|
|
143
|
+
{ schema: REPORT_SCHEMA, label: 'report' }
|
|
144
|
+
);
|
|
146
145
|
|
|
147
|
-
|
|
148
|
-
}
|
|
146
|
+
return { target, sourceAnalysis, mutations: mutationSpec.mutations, killResults: killData, report };
|