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.
Files changed (361) hide show
  1. package/.agent/mindforge/wf-orchestrate-review.md +35 -0
  2. package/.agent/mindforge/wf-verification-loop.md +45 -0
  3. package/.agent/mindforge/wf-workflow-optimizer.md +51 -0
  4. package/.agent/skills/article-illustrator/SKILL.md +7 -7
  5. package/.agent/skills/arxiv/SKILL.md +6 -6
  6. package/.agent/skills/code-wiki/SKILL.md +11 -11
  7. package/.agent/skills/concept-diagrams/SKILL.md +6 -6
  8. package/.agent/skills/concept-diagrams/examples/apartment-floor-plan-conversion.md +244 -0
  9. package/.agent/skills/concept-diagrams/examples/automated-password-reset-flow.md +276 -0
  10. package/.agent/skills/concept-diagrams/examples/autonomous-llm-research-agent-flow.md +240 -0
  11. package/.agent/skills/concept-diagrams/examples/banana-journey-tree-to-smoothie.md +161 -0
  12. package/.agent/skills/concept-diagrams/examples/commercial-aircraft-structure.md +209 -0
  13. package/.agent/skills/concept-diagrams/examples/cpu-ooo-microarchitecture.md +236 -0
  14. package/.agent/skills/concept-diagrams/examples/electricity-grid-flow.md +182 -0
  15. package/.agent/skills/concept-diagrams/examples/feature-film-production-pipeline.md +172 -0
  16. package/.agent/skills/concept-diagrams/examples/hospital-emergency-department-flow.md +165 -0
  17. package/.agent/skills/concept-diagrams/examples/ml-benchmark-grouped-bar-chart.md +114 -0
  18. package/.agent/skills/concept-diagrams/examples/place-order-uml-sequence.md +325 -0
  19. package/.agent/skills/concept-diagrams/examples/smart-city-infrastructure.md +173 -0
  20. package/.agent/skills/concept-diagrams/examples/smartphone-layer-anatomy.md +154 -0
  21. package/.agent/skills/concept-diagrams/examples/sn2-reaction-mechanism.md +247 -0
  22. package/.agent/skills/concept-diagrams/examples/wind-turbine-structure.md +338 -0
  23. package/.agent/skills/concept-diagrams/templates/template.html +174 -0
  24. package/.agent/skills/domain-intel/SKILL.md +7 -7
  25. package/.agent/skills/duckduckgo-search/SKILL.md +17 -17
  26. package/.agent/skills/github-auth/scripts/gh-env.sh +66 -0
  27. package/.agent/skills/github-code-review/SKILL.md +9 -9
  28. package/.agent/skills/github-pr-workflow/SKILL.md +3 -3
  29. package/.agent/skills/godmode/SKILL.md +8 -8
  30. package/.agent/skills/jupyter-live-kernel/SKILL.md +3 -3
  31. package/.agent/skills/kanban-orchestrator/SKILL.md +10 -10
  32. package/.agent/skills/kanban-worker/SKILL.md +6 -6
  33. package/.agent/skills/llm-wiki/SKILL.md +7 -7
  34. package/.agent/skills/mindforge-autonomous/SKILL.md +1 -1
  35. package/.agent/skills/mindforge-complete-milestone/SKILL.md +1 -1
  36. package/.agent/skills/mindforge-discuss-phase/SKILL.md +1 -1
  37. package/.agent/skills/mindforge-do/SKILL.md +1 -1
  38. package/.agent/skills/mindforge-execute-phase/SKILL.md +1 -1
  39. package/.agent/skills/mindforge-list-workspaces/SKILL.md +1 -1
  40. package/.agent/skills/mindforge-manager/SKILL.md +1 -1
  41. package/.agent/skills/mindforge-neural-orchestrator/SKILL.md +1 -1
  42. package/.agent/skills/mindforge-new-milestone/SKILL.md +4 -4
  43. package/.agent/skills/mindforge-new-project/SKILL.md +4 -4
  44. package/.agent/skills/mindforge-new-workspace/SKILL.md +1 -1
  45. package/.agent/skills/mindforge-note/SKILL.md +1 -1
  46. package/.agent/skills/mindforge-plan-phase/SKILL.md +1 -1
  47. package/.agent/skills/mindforge-profile-user/SKILL.md +1 -1
  48. package/.agent/skills/mindforge-remove-workspace/SKILL.md +1 -1
  49. package/.agent/skills/mindforge-research-phase/SKILL.md +1 -1
  50. package/.agent/skills/mindforge-ui-phase/SKILL.md +1 -1
  51. package/.agent/skills/mindforge-ui-review/SKILL.md +1 -1
  52. package/.agent/skills/mindforge-verify-work/SKILL.md +1 -1
  53. package/.agent/skills/mindforge-workspace-isolated/SKILL.md +1 -1
  54. package/.agent/skills/node-inspect-debugger/SKILL.md +1 -1
  55. package/.agent/skills/obsidian/SKILL.md +15 -15
  56. package/.agent/skills/osint-investigation/SKILL.md +3 -2
  57. package/.agent/skills/osint-investigation/references/sources/courtlistener.md +98 -0
  58. package/.agent/skills/osint-investigation/references/sources/gdelt.md +104 -0
  59. package/.agent/skills/osint-investigation/references/sources/icij-offshore.md +104 -0
  60. package/.agent/skills/osint-investigation/references/sources/nyc-acris.md +90 -0
  61. package/.agent/skills/osint-investigation/references/sources/ofac-sdn.md +92 -0
  62. package/.agent/skills/osint-investigation/references/sources/opencorporates.md +103 -0
  63. package/.agent/skills/osint-investigation/references/sources/sec-edgar.md +83 -0
  64. package/.agent/skills/osint-investigation/references/sources/senate-ld.md +89 -0
  65. package/.agent/skills/osint-investigation/references/sources/usaspending.md +97 -0
  66. package/.agent/skills/osint-investigation/references/sources/wayback.md +93 -0
  67. package/.agent/skills/osint-investigation/references/sources/wikipedia.md +107 -0
  68. package/.agent/skills/osint-investigation/scripts/_http.py +82 -0
  69. package/.agent/skills/osint-investigation/scripts/_normalize.py +67 -0
  70. package/.agent/skills/osint-investigation/scripts/build_findings.py +221 -0
  71. package/.agent/skills/osint-investigation/scripts/entity_resolution.py +228 -0
  72. package/.agent/skills/osint-investigation/scripts/fetch_courtlistener.py +149 -0
  73. package/.agent/skills/osint-investigation/scripts/fetch_gdelt.py +161 -0
  74. package/.agent/skills/osint-investigation/scripts/fetch_icij_offshore.py +234 -0
  75. package/.agent/skills/osint-investigation/scripts/fetch_nyc_acris.py +203 -0
  76. package/.agent/skills/osint-investigation/scripts/fetch_ofac_sdn.py +175 -0
  77. package/.agent/skills/osint-investigation/scripts/fetch_opencorporates.py +191 -0
  78. package/.agent/skills/osint-investigation/scripts/fetch_sec_edgar.py +184 -0
  79. package/.agent/skills/osint-investigation/scripts/fetch_senate_ld.py +146 -0
  80. package/.agent/skills/osint-investigation/scripts/fetch_usaspending.py +170 -0
  81. package/.agent/skills/osint-investigation/scripts/fetch_wayback.py +142 -0
  82. package/.agent/skills/osint-investigation/scripts/fetch_wikipedia.py +266 -0
  83. package/.agent/skills/osint-investigation/scripts/timing_analysis.py +252 -0
  84. package/.agent/skills/oss-forensics/SKILL.md +10 -9
  85. package/.agent/skills/oss-forensics/scripts/evidence-store.py +313 -0
  86. package/.agent/skills/parallel-cli/SKILL.md +2 -2
  87. package/.agent/skills/pinggy-tunnel/SKILL.md +3 -3
  88. package/.agent/skills/pixel-art/SKILL.md +2 -2
  89. package/.agent/skills/plan/SKILL.md +10 -10
  90. package/.agent/skills/requesting-code-review/SKILL.md +4 -6
  91. package/.agent/skills/research-paper-writing/SKILL.md +32 -32
  92. package/.agent/skills/rest-graphql-debug/SKILL.md +31 -32
  93. package/.agent/skills/s6-container-supervision/SKILL.md +1 -1
  94. package/.agent/skills/scrapling/SKILL.md +1 -1
  95. package/.agent/skills/sherlock/SKILL.md +1 -1
  96. package/.agent/skills/simplify-code/SKILL.md +5 -7
  97. package/.agent/skills/skill-authoring/SKILL.md +4 -4
  98. package/.agent/skills/spike/SKILL.md +11 -13
  99. package/.agent/skills/subagent-driven-development/SKILL.md +7 -11
  100. package/.agent/skills/systematic-debugging/SKILL.md +13 -14
  101. package/.agent/skills/test-driven-development/SKILL.md +6 -7
  102. package/.agent/skills/video-orchestrator/SKILL.md +1 -1
  103. package/.agent/skills/web-pentest/SKILL.md +7 -7
  104. package/.mindforge/config.json +3 -2
  105. package/.mindforge/dynamic-workflows/REGISTRY.md +4 -1
  106. package/.mindforge/dynamic-workflows/index.json +910 -840
  107. package/.mindforge/dynamic-workflows/scripts/accessibility-audit.js +88 -90
  108. package/.mindforge/dynamic-workflows/scripts/ai-model-eval.js +59 -61
  109. package/.mindforge/dynamic-workflows/scripts/api-contract-test.js +87 -85
  110. package/.mindforge/dynamic-workflows/scripts/api-migration.js +120 -122
  111. package/.mindforge/dynamic-workflows/scripts/architecture-modernization.js +84 -86
  112. package/.mindforge/dynamic-workflows/scripts/code-audit.js +75 -77
  113. package/.mindforge/dynamic-workflows/scripts/code-explainer.js +99 -101
  114. package/.mindforge/dynamic-workflows/scripts/competitive-analysis.js +62 -64
  115. package/.mindforge/dynamic-workflows/scripts/competitive-teardown.js +106 -108
  116. package/.mindforge/dynamic-workflows/scripts/cost-analysis.js +78 -80
  117. package/.mindforge/dynamic-workflows/scripts/data-pipeline-validate.js +47 -49
  118. package/.mindforge/dynamic-workflows/scripts/database-migration.js +85 -87
  119. package/.mindforge/dynamic-workflows/scripts/debug-detective.js +97 -99
  120. package/.mindforge/dynamic-workflows/scripts/dependency-health.js +81 -83
  121. package/.mindforge/dynamic-workflows/scripts/design-system-audit.js +84 -86
  122. package/.mindforge/dynamic-workflows/scripts/documentation-gen.js +65 -67
  123. package/.mindforge/dynamic-workflows/scripts/feature-planner.js +78 -80
  124. package/.mindforge/dynamic-workflows/scripts/incident-response.js +81 -83
  125. package/.mindforge/dynamic-workflows/scripts/multi-repo-sync.js +49 -51
  126. package/.mindforge/dynamic-workflows/scripts/mutation-testing.js +113 -115
  127. package/.mindforge/dynamic-workflows/scripts/onboard-codebase.js +79 -81
  128. package/.mindforge/dynamic-workflows/scripts/orchestrate-review.js +115 -0
  129. package/.mindforge/dynamic-workflows/scripts/perf-optimize.js +97 -99
  130. package/.mindforge/dynamic-workflows/scripts/pr-review.js +61 -63
  131. package/.mindforge/dynamic-workflows/scripts/refactor-plan.js +88 -90
  132. package/.mindforge/dynamic-workflows/scripts/release-prep.js +79 -81
  133. package/.mindforge/dynamic-workflows/scripts/security-hardening.js +117 -119
  134. package/.mindforge/dynamic-workflows/scripts/security-threat-model.js +119 -121
  135. package/.mindforge/dynamic-workflows/scripts/tdd-sprint.js +80 -82
  136. package/.mindforge/dynamic-workflows/scripts/tech-evaluation.js +50 -52
  137. package/.mindforge/dynamic-workflows/scripts/test-coverage-gap.js +68 -70
  138. package/.mindforge/dynamic-workflows/scripts/ux-heuristic-audit.js +89 -91
  139. package/.mindforge/dynamic-workflows/scripts/verification-loop.js +138 -0
  140. package/.mindforge/dynamic-workflows/scripts/workflow-optimizer.js +136 -0
  141. package/.mindforge/dynamic-workflows/scripts/writer-reviewer.js +63 -65
  142. package/.mindforge/memory/sync-manifest.json +1 -1
  143. package/.mindforge/personas/advisor-researcher.md +2 -2
  144. package/.mindforge/personas/api-load-tester.md +1 -1
  145. package/.mindforge/personas/authentication-architect.md +1 -1
  146. package/.mindforge/personas/backup-recovery-specialist.md +1 -1
  147. package/.mindforge/personas/build-optimizer.md +1 -1
  148. package/.mindforge/personas/caching-strategist.md +1 -1
  149. package/.mindforge/personas/chaos-engineer.md +1 -1
  150. package/.mindforge/personas/compliance-auditor.md +1 -1
  151. package/.mindforge/personas/config-management-expert.md +1 -1
  152. package/.mindforge/personas/coverage-specialist.md +1 -1
  153. package/.mindforge/personas/debug-specialist.md +2 -2
  154. package/.mindforge/personas/debugger.md +2 -2
  155. package/.mindforge/personas/dependency-auditor.md +1 -1
  156. package/.mindforge/personas/developer.md +1 -1
  157. package/.mindforge/personas/devops-engineer.md +1 -1
  158. package/.mindforge/personas/executor.md +1 -1
  159. package/.mindforge/personas/go-specialist.md +1 -1
  160. package/.mindforge/personas/incident-commander.md +1 -1
  161. package/.mindforge/personas/java-specialist.md +1 -1
  162. package/.mindforge/personas/kubernetes-debugger.md +1 -1
  163. package/.mindforge/personas/logging-architect.md +1 -1
  164. package/.mindforge/personas/mf-planner.md +1 -1
  165. package/.mindforge/personas/mf-researcher.md +1 -1
  166. package/.mindforge/personas/mf-reviewer.md +1 -1
  167. package/.mindforge/personas/nyquist-auditor.md +1 -1
  168. package/.mindforge/personas/observability-engineer.md +1 -1
  169. package/.mindforge/personas/performance-optimizer.md +1 -1
  170. package/.mindforge/personas/phase-researcher.md +5 -5
  171. package/.mindforge/personas/planner.md +1 -1
  172. package/.mindforge/personas/project-researcher.md +2 -2
  173. package/.mindforge/personas/python-specialist.md +1 -1
  174. package/.mindforge/personas/qa-engineer.md +1 -1
  175. package/.mindforge/personas/release-manager.md +1 -1
  176. package/.mindforge/personas/research-agent.md +4 -4
  177. package/.mindforge/personas/roadmapper-extend.md +1 -1
  178. package/.mindforge/personas/rust-specialist.md +1 -1
  179. package/.mindforge/personas/security-reviewer.md +1 -1
  180. package/.mindforge/personas/tech-writer.md +1 -1
  181. package/.mindforge/personas/typescript-wizard.md +1 -1
  182. package/.mindforge/personas/ui-researcher.md +1 -1
  183. package/.mindforge/skills/accessibility/SKILL.md +3 -3
  184. package/.mindforge/skills/agent-architecture-audit/SKILL.md +11 -0
  185. package/.mindforge/skills/agent-loops/SKILL.md +1 -1
  186. package/.mindforge/skills/arxiv/SKILL.md +6 -6
  187. package/.mindforge/skills/arxiv/scripts/search_arxiv.py +114 -0
  188. package/.mindforge/skills/code-tour/SKILL.md +2 -2
  189. package/.mindforge/skills/code-wiki/SKILL.md +11 -11
  190. package/.mindforge/skills/code-wiki/templates/README.md +31 -0
  191. package/.mindforge/skills/code-wiki/templates/architecture.md +30 -0
  192. package/.mindforge/skills/code-wiki/templates/getting-started.md +47 -0
  193. package/.mindforge/skills/code-wiki/templates/module.md +38 -0
  194. package/.mindforge/skills/concept-diagrams/SKILL.md +6 -6
  195. package/.mindforge/skills/concept-diagrams/examples/apartment-floor-plan-conversion.md +244 -0
  196. package/.mindforge/skills/concept-diagrams/examples/automated-password-reset-flow.md +276 -0
  197. package/.mindforge/skills/concept-diagrams/examples/autonomous-llm-research-agent-flow.md +240 -0
  198. package/.mindforge/skills/concept-diagrams/examples/banana-journey-tree-to-smoothie.md +161 -0
  199. package/.mindforge/skills/concept-diagrams/examples/commercial-aircraft-structure.md +209 -0
  200. package/.mindforge/skills/concept-diagrams/examples/cpu-ooo-microarchitecture.md +236 -0
  201. package/.mindforge/skills/concept-diagrams/examples/electricity-grid-flow.md +182 -0
  202. package/.mindforge/skills/concept-diagrams/examples/feature-film-production-pipeline.md +172 -0
  203. package/.mindforge/skills/concept-diagrams/examples/hospital-emergency-department-flow.md +165 -0
  204. package/.mindforge/skills/concept-diagrams/examples/ml-benchmark-grouped-bar-chart.md +114 -0
  205. package/.mindforge/skills/concept-diagrams/examples/place-order-uml-sequence.md +325 -0
  206. package/.mindforge/skills/concept-diagrams/examples/smart-city-infrastructure.md +173 -0
  207. package/.mindforge/skills/concept-diagrams/examples/smartphone-layer-anatomy.md +154 -0
  208. package/.mindforge/skills/concept-diagrams/examples/sn2-reaction-mechanism.md +247 -0
  209. package/.mindforge/skills/concept-diagrams/examples/wind-turbine-structure.md +338 -0
  210. package/.mindforge/skills/concept-diagrams/references/dashboard-patterns.md +43 -0
  211. package/.mindforge/skills/concept-diagrams/references/infrastructure-patterns.md +144 -0
  212. package/.mindforge/skills/concept-diagrams/references/physical-shape-cookbook.md +42 -0
  213. package/.mindforge/skills/concept-diagrams/templates/template.html +174 -0
  214. package/.mindforge/skills/creative-ideation/references/full-prompt-library.md +110 -0
  215. package/.mindforge/skills/documentation/SKILL.md +1 -1
  216. package/.mindforge/skills/domain-intel/SKILL.md +7 -7
  217. package/.mindforge/skills/domain-intel/scripts/domain_intel.py +397 -0
  218. package/.mindforge/skills/duckduckgo-search/SKILL.md +17 -17
  219. package/.mindforge/skills/duckduckgo-search/scripts/duckduckgo.sh +28 -0
  220. package/.mindforge/skills/environment-management/SKILL.md +1 -1
  221. package/.mindforge/skills/github-code-review/SKILL.md +9 -9
  222. package/.mindforge/skills/github-code-review/references/review-output-template.md +74 -0
  223. package/.mindforge/skills/github-issues/templates/bug-report.md +35 -0
  224. package/.mindforge/skills/github-issues/templates/feature-request.md +31 -0
  225. package/.mindforge/skills/github-pr-workflow/SKILL.md +3 -3
  226. package/.mindforge/skills/github-pr-workflow/references/ci-troubleshooting.md +183 -0
  227. package/.mindforge/skills/github-pr-workflow/references/conventional-commits.md +71 -0
  228. package/.mindforge/skills/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
  229. package/.mindforge/skills/github-pr-workflow/templates/pr-body-feature.md +33 -0
  230. package/.mindforge/skills/incident-response/SKILL.md +1 -1
  231. package/.mindforge/skills/jupyter-live-kernel/SKILL.md +3 -3
  232. package/.mindforge/skills/kanban-orchestrator/SKILL.md +10 -10
  233. package/.mindforge/skills/kanban-worker/SKILL.md +6 -6
  234. package/.mindforge/skills/meme-generation/SKILL.md +1 -1
  235. package/.mindforge/skills/meme-generation/scripts/generate_meme.py +470 -0
  236. package/.mindforge/skills/meme-generation/scripts/templates.json +97 -0
  237. package/.mindforge/skills/obsidian/SKILL.md +15 -15
  238. package/.mindforge/skills/orch-pipeline/SKILL.md +2 -2
  239. package/.mindforge/skills/osint-investigation/SKILL.md +3 -2
  240. package/.mindforge/skills/osint-investigation/references/sources/courtlistener.md +98 -0
  241. package/.mindforge/skills/osint-investigation/references/sources/gdelt.md +104 -0
  242. package/.mindforge/skills/osint-investigation/references/sources/icij-offshore.md +104 -0
  243. package/.mindforge/skills/osint-investigation/references/sources/nyc-acris.md +90 -0
  244. package/.mindforge/skills/osint-investigation/references/sources/ofac-sdn.md +92 -0
  245. package/.mindforge/skills/osint-investigation/references/sources/opencorporates.md +103 -0
  246. package/.mindforge/skills/osint-investigation/references/sources/sec-edgar.md +83 -0
  247. package/.mindforge/skills/osint-investigation/references/sources/senate-ld.md +89 -0
  248. package/.mindforge/skills/osint-investigation/references/sources/usaspending.md +97 -0
  249. package/.mindforge/skills/osint-investigation/references/sources/wayback.md +93 -0
  250. package/.mindforge/skills/osint-investigation/references/sources/wikipedia.md +107 -0
  251. package/.mindforge/skills/osint-investigation/scripts/_http.py +82 -0
  252. package/.mindforge/skills/osint-investigation/scripts/_normalize.py +67 -0
  253. package/.mindforge/skills/osint-investigation/scripts/build_findings.py +221 -0
  254. package/.mindforge/skills/osint-investigation/scripts/entity_resolution.py +228 -0
  255. package/.mindforge/skills/osint-investigation/scripts/fetch_courtlistener.py +149 -0
  256. package/.mindforge/skills/osint-investigation/scripts/fetch_gdelt.py +161 -0
  257. package/.mindforge/skills/osint-investigation/scripts/fetch_icij_offshore.py +234 -0
  258. package/.mindforge/skills/osint-investigation/scripts/fetch_nyc_acris.py +203 -0
  259. package/.mindforge/skills/osint-investigation/scripts/fetch_ofac_sdn.py +175 -0
  260. package/.mindforge/skills/osint-investigation/scripts/fetch_opencorporates.py +191 -0
  261. package/.mindforge/skills/osint-investigation/scripts/fetch_sec_edgar.py +184 -0
  262. package/.mindforge/skills/osint-investigation/scripts/fetch_senate_ld.py +146 -0
  263. package/.mindforge/skills/osint-investigation/scripts/fetch_usaspending.py +170 -0
  264. package/.mindforge/skills/osint-investigation/scripts/fetch_wayback.py +142 -0
  265. package/.mindforge/skills/osint-investigation/scripts/fetch_wikipedia.py +266 -0
  266. package/.mindforge/skills/osint-investigation/scripts/timing_analysis.py +252 -0
  267. package/.mindforge/skills/osint-investigation/templates/source-template.md +59 -0
  268. package/.mindforge/skills/oss-forensics/SKILL.md +6 -6
  269. package/.mindforge/skills/oss-forensics/references/evidence-types.md +89 -0
  270. package/.mindforge/skills/oss-forensics/references/github-archive-guide.md +184 -0
  271. package/.mindforge/skills/oss-forensics/references/investigation-templates.md +131 -0
  272. package/.mindforge/skills/oss-forensics/references/recovery-techniques.md +164 -0
  273. package/.mindforge/skills/oss-forensics/scripts/evidence-store.py +313 -0
  274. package/.mindforge/skills/oss-forensics/templates/forensic-report.md +151 -0
  275. package/.mindforge/skills/oss-forensics/templates/malicious-package-report.md +43 -0
  276. package/.mindforge/skills/pixel-art/SKILL.md +2 -2
  277. package/.mindforge/skills/pixel-art/references/palettes.md +49 -0
  278. package/.mindforge/skills/plan/SKILL.md +10 -10
  279. package/.mindforge/skills/requesting-code-review/SKILL.md +4 -6
  280. package/.mindforge/skills/research-paper-writing/SKILL.md +32 -32
  281. package/.mindforge/skills/research-paper-writing/references/autoreason-methodology.md +394 -0
  282. package/.mindforge/skills/research-paper-writing/references/checklists.md +434 -0
  283. package/.mindforge/skills/research-paper-writing/references/citation-workflow.md +563 -0
  284. package/.mindforge/skills/research-paper-writing/references/experiment-patterns.md +728 -0
  285. package/.mindforge/skills/research-paper-writing/references/human-evaluation.md +476 -0
  286. package/.mindforge/skills/research-paper-writing/references/paper-types.md +481 -0
  287. package/.mindforge/skills/research-paper-writing/references/reviewer-guidelines.md +433 -0
  288. package/.mindforge/skills/research-paper-writing/references/sources.md +191 -0
  289. package/.mindforge/skills/research-paper-writing/references/writing-guide.md +474 -0
  290. package/.mindforge/skills/research-paper-writing/templates/README.md +251 -0
  291. package/.mindforge/skills/scrapling/SKILL.md +1 -1
  292. package/.mindforge/skills/security-review/SKILL.md +1 -1
  293. package/.mindforge/skills/sherlock/SKILL.md +1 -1
  294. package/.mindforge/skills/simplify-code/SKILL.md +5 -7
  295. package/.mindforge/skills/spike/SKILL.md +11 -13
  296. package/.mindforge/skills/subagent-driven-development/SKILL.md +7 -11
  297. package/.mindforge/skills/subagent-driven-development/references/context-budget-discipline.md +53 -0
  298. package/.mindforge/skills/subagent-driven-development/references/gates-taxonomy.md +93 -0
  299. package/.mindforge/skills/systematic-debugging/SKILL.md +13 -14
  300. package/.mindforge/skills/test-driven-development/SKILL.md +7 -8
  301. package/.mindforge/skills/testing-standards/SKILL.md +1 -1
  302. package/.mindforge/skills/web-pentest/SKILL.md +2 -2
  303. package/.mindforge/skills/web-pentest/references/bypass-techniques.md +133 -0
  304. package/.mindforge/skills/web-pentest/references/exploitation-techniques.md +204 -0
  305. package/.mindforge/skills/web-pentest/references/scope-enforcement.md +110 -0
  306. package/.mindforge/skills/web-pentest/references/vuln-taxonomy.md +81 -0
  307. package/.mindforge/skills/web-pentest/templates/authorization.md +69 -0
  308. package/.mindforge/skills/web-pentest/templates/pentest-report.md +178 -0
  309. package/.mindforge/skills/writing-skills/SKILL.md +4 -3
  310. package/CHANGELOG.md +35 -0
  311. package/MINDFORGE.md +3 -3
  312. package/README.md +9 -7
  313. package/RELEASENOTES.md +65 -2
  314. package/SECURITY.md +5 -3
  315. package/bin/autonomous/auto-runner.js +5 -2
  316. package/bin/engine/skill-loader.js +4 -0
  317. package/bin/governance/rbac.js +4 -0
  318. package/bin/memory/eis-client.js +1 -0
  319. package/bin/mindforge-cli.js +5 -0
  320. package/bin/models/bedrock-provider.js +192 -0
  321. package/bin/models/model-client.js +19 -0
  322. package/bin/spawn-agent.js +9 -2
  323. package/docs/commands-reference.md +68 -6
  324. package/docs/faq.md +38 -1
  325. package/docs/getting-started.md +27 -12
  326. package/docs/sdk-reference.md +36 -3
  327. package/docs/troubleshooting.md +59 -1
  328. package/docs/user-guide.md +7 -4
  329. package/package.json +3 -3
  330. package/.claude/commands/mindforge/skill-tdd.md +0 -53
  331. package/.claude/commands/mindforge/skills-index.md +0 -118
  332. package/.claude/commands/mindforge/systematic-debug.md +0 -60
  333. package/.claude/commands/mindforge/wf-accessibility-audit.md +0 -31
  334. package/.claude/commands/mindforge/wf-ai-model-eval.md +0 -31
  335. package/.claude/commands/mindforge/wf-api-migration.md +0 -31
  336. package/.claude/commands/mindforge/wf-architecture-modernization.md +0 -32
  337. package/.claude/commands/mindforge/wf-catalog.md +0 -59
  338. package/.claude/commands/mindforge/wf-code-audit.md +0 -31
  339. package/.claude/commands/mindforge/wf-code-explainer.md +0 -31
  340. package/.claude/commands/mindforge/wf-competitive-analysis.md +0 -31
  341. package/.claude/commands/mindforge/wf-competitive-teardown.md +0 -31
  342. package/.claude/commands/mindforge/wf-cost-analysis.md +0 -31
  343. package/.claude/commands/mindforge/wf-data-pipeline-validate.md +0 -31
  344. package/.claude/commands/mindforge/wf-database-migration.md +0 -31
  345. package/.claude/commands/mindforge/wf-debug-detective.md +0 -32
  346. package/.claude/commands/mindforge/wf-design-system-audit.md +0 -31
  347. package/.claude/commands/mindforge/wf-documentation-gen.md +0 -31
  348. package/.claude/commands/mindforge/wf-feature-planner.md +0 -31
  349. package/.claude/commands/mindforge/wf-incident-response.md +0 -31
  350. package/.claude/commands/mindforge/wf-multi-repo-sync.md +0 -31
  351. package/.claude/commands/mindforge/wf-mutation-testing.md +0 -31
  352. package/.claude/commands/mindforge/wf-onboard-codebase.md +0 -31
  353. package/.claude/commands/mindforge/wf-perf-optimize.md +0 -31
  354. package/.claude/commands/mindforge/wf-pr-review.md +0 -31
  355. package/.claude/commands/mindforge/wf-refactor-plan.md +0 -31
  356. package/.claude/commands/mindforge/wf-release-prep.md +0 -31
  357. package/.claude/commands/mindforge/wf-security-threat-model.md +0 -31
  358. package/.claude/commands/mindforge/wf-tdd-sprint.md +0 -31
  359. package/.claude/commands/mindforge/wf-tech-evaluation.md +0 -31
  360. package/.claude/commands/mindforge/wf-ux-heuristic-audit.md +0 -31
  361. package/.claude/commands/mindforge/wf-writer-reviewer.md +0 -30
@@ -10,113 +10,111 @@ export const meta = {
10
10
  ],
11
11
  };
12
12
 
13
- export default async function run({ agent, parallel, pipeline, phase, log, args, budget }) {
14
- const HEURISTIC_SCHEMA = {
15
- type: 'object',
16
- properties: {
17
- heuristic: { type: 'string' },
18
- violations: {
19
- type: 'array',
20
- items: {
21
- type: 'object',
22
- properties: {
23
- component: { type: 'string' },
24
- severity: { type: 'string', enum: ['critical', 'high', 'medium', 'low'] },
25
- description: { type: 'string' },
26
- recommendation: { type: 'string' },
27
- },
28
- required: ['severity', 'description', 'recommendation'],
13
+ const HEURISTIC_SCHEMA = {
14
+ type: 'object',
15
+ properties: {
16
+ heuristic: { type: 'string' },
17
+ violations: {
18
+ type: 'array',
19
+ items: {
20
+ type: 'object',
21
+ properties: {
22
+ component: { type: 'string' },
23
+ severity: { type: 'string', enum: ['critical', 'high', 'medium', 'low'] },
24
+ description: { type: 'string' },
25
+ recommendation: { type: 'string' },
29
26
  },
27
+ required: ['severity', 'description', 'recommendation'],
30
28
  },
31
- score: { type: 'number' },
32
29
  },
33
- required: ['heuristic', 'violations', 'score'],
34
- };
30
+ score: { type: 'number' },
31
+ },
32
+ required: ['heuristic', 'violations', 'score'],
33
+ };
35
34
 
36
- const RANK_SCHEMA = {
37
- type: 'object',
38
- properties: {
39
- rankedViolations: {
40
- type: 'array',
41
- items: {
42
- type: 'object',
43
- properties: {
44
- rank: { type: 'number' },
45
- heuristic: { type: 'string' },
46
- description: { type: 'string' },
47
- severity: { type: 'string', enum: ['critical', 'high', 'medium', 'low'] },
48
- impactScore: { type: 'number' },
49
- },
50
- required: ['rank', 'heuristic', 'description', 'severity', 'impactScore'],
35
+ const RANK_SCHEMA = {
36
+ type: 'object',
37
+ properties: {
38
+ rankedViolations: {
39
+ type: 'array',
40
+ items: {
41
+ type: 'object',
42
+ properties: {
43
+ rank: { type: 'number' },
44
+ heuristic: { type: 'string' },
45
+ description: { type: 'string' },
46
+ severity: { type: 'string', enum: ['critical', 'high', 'medium', 'low'] },
47
+ impactScore: { type: 'number' },
51
48
  },
49
+ required: ['rank', 'heuristic', 'description', 'severity', 'impactScore'],
52
50
  },
53
- overallUsabilityScore: { type: 'number' },
54
51
  },
55
- required: ['rankedViolations', 'overallUsabilityScore'],
56
- };
52
+ overallUsabilityScore: { type: 'number' },
53
+ },
54
+ required: ['rankedViolations', 'overallUsabilityScore'],
55
+ };
57
56
 
58
- const BRIEF_SCHEMA = {
59
- type: 'object',
60
- properties: {
61
- summary: { type: 'string' },
62
- criticalFixes: {
63
- type: 'array',
64
- items: {
65
- type: 'object',
66
- properties: {
67
- issue: { type: 'string' },
68
- heuristic: { type: 'string' },
69
- fix: { type: 'string' },
70
- effort: { type: 'string', enum: ['low', 'medium', 'high'] },
71
- },
72
- required: ['issue', 'heuristic', 'fix', 'effort'],
57
+ const BRIEF_SCHEMA = {
58
+ type: 'object',
59
+ properties: {
60
+ summary: { type: 'string' },
61
+ criticalFixes: {
62
+ type: 'array',
63
+ items: {
64
+ type: 'object',
65
+ properties: {
66
+ issue: { type: 'string' },
67
+ heuristic: { type: 'string' },
68
+ fix: { type: 'string' },
69
+ effort: { type: 'string', enum: ['low', 'medium', 'high'] },
73
70
  },
71
+ required: ['issue', 'heuristic', 'fix', 'effort'],
74
72
  },
75
- quickWins: { type: 'array', items: { type: 'string' } },
76
73
  },
77
- required: ['summary', 'criticalFixes', 'quickWins'],
78
- };
74
+ quickWins: { type: 'array', items: { type: 'string' } },
75
+ },
76
+ required: ['summary', 'criticalFixes', 'quickWins'],
77
+ };
79
78
 
80
- const target = args || 'current codebase (run from repo root)';
79
+ const target = args || 'current codebase (run from repo root)';
81
80
 
82
- phase('Scope');
83
- log(`UX heuristic audit target: ${target}`);
81
+ phase('Scope');
82
+ log(`UX heuristic audit target: ${target}`);
84
83
 
85
- const HEURISTICS = [
86
- { label: 'visibility-of-status', prompt: `Evaluate Nielsen Heuristic #1 "Visibility of System Status" for: "${target}". Check: Does the UI always keep users informed about what is going on? Are loading states shown? Is progress communicated? Are confirmations displayed after actions? Score 0-100 (100=perfect) and list all violations with severity.` },
87
- { label: 'match-real-world', prompt: `Evaluate Nielsen Heuristic #2 "Match Between System and the Real World" for: "${target}". Check: Does the UI use language and concepts familiar to users? Are metaphors and icons intuitive? Is information ordered naturally? Score 0-100 and list violations.` },
88
- { label: 'user-control', prompt: `Evaluate Nielsen Heuristic #3 "User Control and Freedom" for: "${target}". Check: Can users undo/redo actions? Is there a clear exit from every state? Are emergency exits clearly marked? Can users cancel ongoing operations? Score 0-100 and list violations.` },
89
- { label: 'consistency', prompt: `Evaluate Nielsen Heuristic #4 "Consistency and Standards" for: "${target}". Check: Do similar actions have similar appearance and behavior? Are platform conventions followed? Are labels consistent across screens? Score 0-100 and list violations.` },
90
- { label: 'error-prevention', prompt: `Evaluate Nielsen Heuristic #5 "Error Prevention" for: "${target}". Check: Are good error-prone conditions eliminated? Are confirmation dialogs shown for destructive actions? Is inline validation used? Are form constraints visible before submission? Score 0-100 and list violations.` },
91
- { label: 'recognition-over-recall', prompt: `Evaluate Nielsen Heuristic #6 "Recognition Rather Than Recall" for: "${target}". Check: Are options visible rather than remembered? Are instructions visible in context? Are recently used items surfaced? Are tooltips and help text available? Score 0-100 and list violations.` },
92
- { label: 'flexibility', prompt: `Evaluate Nielsen Heuristic #7 "Flexibility and Efficiency of Use" for: "${target}". Check: Are there keyboard shortcuts for expert users? Can users customize frequent actions? Are there accelerators for power users? Does the UI serve both novice and expert? Score 0-100 and list violations.` },
93
- { label: 'aesthetic-minimalism', prompt: `Evaluate Nielsen Heuristic #8 "Aesthetic and Minimalist Design" for: "${target}". Check: Does every element serve a purpose? Is irrelevant information removed? Are visual hierarchies clear? Is there excessive decoration or noise? Score 0-100 and list violations.` },
94
- { label: 'error-recognition', prompt: `Evaluate Nielsen Heuristic #9 "Help Users Recognize, Diagnose, and Recover from Errors" for: "${target}". Check: Are error messages in plain language (not error codes)? Do they precisely indicate the problem? Do they constructively suggest solutions? Score 0-100 and list violations.` },
95
- { label: 'help-docs', prompt: `Evaluate Nielsen Heuristic #10 "Help and Documentation" for: "${target}". Check: Is help easy to search? Is documentation focused on user tasks? Are concrete steps listed? Is context-sensitive help available? Score 0-100 and list violations.` },
96
- ];
84
+ const HEURISTICS = [
85
+ { label: 'visibility-of-status', prompt: `Evaluate Nielsen Heuristic #1 "Visibility of System Status" for: "${target}". Check: Does the UI always keep users informed about what is going on? Are loading states shown? Is progress communicated? Are confirmations displayed after actions? Score 0-100 (100=perfect) and list all violations with severity.` },
86
+ { label: 'match-real-world', prompt: `Evaluate Nielsen Heuristic #2 "Match Between System and the Real World" for: "${target}". Check: Does the UI use language and concepts familiar to users? Are metaphors and icons intuitive? Is information ordered naturally? Score 0-100 and list violations.` },
87
+ { label: 'user-control', prompt: `Evaluate Nielsen Heuristic #3 "User Control and Freedom" for: "${target}". Check: Can users undo/redo actions? Is there a clear exit from every state? Are emergency exits clearly marked? Can users cancel ongoing operations? Score 0-100 and list violations.` },
88
+ { label: 'consistency', prompt: `Evaluate Nielsen Heuristic #4 "Consistency and Standards" for: "${target}". Check: Do similar actions have similar appearance and behavior? Are platform conventions followed? Are labels consistent across screens? Score 0-100 and list violations.` },
89
+ { label: 'error-prevention', prompt: `Evaluate Nielsen Heuristic #5 "Error Prevention" for: "${target}". Check: Are good error-prone conditions eliminated? Are confirmation dialogs shown for destructive actions? Is inline validation used? Are form constraints visible before submission? Score 0-100 and list violations.` },
90
+ { label: 'recognition-over-recall', prompt: `Evaluate Nielsen Heuristic #6 "Recognition Rather Than Recall" for: "${target}". Check: Are options visible rather than remembered? Are instructions visible in context? Are recently used items surfaced? Are tooltips and help text available? Score 0-100 and list violations.` },
91
+ { label: 'flexibility', prompt: `Evaluate Nielsen Heuristic #7 "Flexibility and Efficiency of Use" for: "${target}". Check: Are there keyboard shortcuts for expert users? Can users customize frequent actions? Are there accelerators for power users? Does the UI serve both novice and expert? Score 0-100 and list violations.` },
92
+ { label: 'aesthetic-minimalism', prompt: `Evaluate Nielsen Heuristic #8 "Aesthetic and Minimalist Design" for: "${target}". Check: Does every element serve a purpose? Is irrelevant information removed? Are visual hierarchies clear? Is there excessive decoration or noise? Score 0-100 and list violations.` },
93
+ { label: 'error-recognition', prompt: `Evaluate Nielsen Heuristic #9 "Help Users Recognize, Diagnose, and Recover from Errors" for: "${target}". Check: Are error messages in plain language (not error codes)? Do they precisely indicate the problem? Do they constructively suggest solutions? Score 0-100 and list violations.` },
94
+ { label: 'help-docs', prompt: `Evaluate Nielsen Heuristic #10 "Help and Documentation" for: "${target}". Check: Is help easy to search? Is documentation focused on user tasks? Are concrete steps listed? Is context-sensitive help available? Score 0-100 and list violations.` },
95
+ ];
97
96
 
98
- phase('Audit');
99
- const auditResults = await parallel(
100
- HEURISTICS.map(h => () => agent(h.prompt, { schema: HEURISTIC_SCHEMA, label: `heuristic:${h.label}`, phase: 'Audit' }))
101
- );
97
+ phase('Audit');
98
+ const auditResults = await parallel(
99
+ HEURISTICS.map(h => () => agent(h.prompt, { schema: HEURISTIC_SCHEMA, label: `heuristic:${h.label}`, phase: 'Audit' }))
100
+ );
102
101
 
103
- phase('Rank');
104
- const allViolations = auditResults.filter(Boolean).flatMap(r => (r.violations || []).map(v => ({ heuristic: r.heuristic, ...v })));
105
- log(`${allViolations.length} violations found across 10 heuristics — ranking by severity`);
102
+ phase('Rank');
103
+ const allViolations = auditResults.filter(Boolean).flatMap(r => (r.violations || []).map(v => ({ heuristic: r.heuristic, ...v })));
104
+ log(`${allViolations.length} violations found across 10 heuristics — ranking by severity`);
106
105
 
107
- const violationSummary = allViolations.slice(0, 30).map(v => `[${v.severity}] ${v.heuristic || 'unknown'}: ${v.description}`).join('\n');
108
- const ranked = await agent(
109
- `Rank these UX violations by impact on user experience for: "${target}"\n\nViolations:\n${violationSummary}\n\nRank each by impact score (1-10), assign a rank number starting from 1 (most critical). Calculate an overall usability score (0-100) across all heuristics.`,
110
- { schema: RANK_SCHEMA, label: 'rank' }
111
- );
112
- if (!ranked) { log('Warning: agent returned null for ranked, skipping'); return { target, error: 'agent-null' }; }
106
+ const violationSummary = allViolations.slice(0, 30).map(v => `[${v.severity}] ${v.heuristic || 'unknown'}: ${v.description}`).join('\n');
107
+ const ranked = await agent(
108
+ `Rank these UX violations by impact on user experience for: "${target}"\n\nViolations:\n${violationSummary}\n\nRank each by impact score (1-10), assign a rank number starting from 1 (most critical). Calculate an overall usability score (0-100) across all heuristics.`,
109
+ { schema: RANK_SCHEMA, label: 'rank' }
110
+ );
111
+ if (!ranked) { log('Warning: agent returned null for ranked, skipping'); return { target, error: 'agent-null' }; }
113
112
 
114
- phase('Brief');
115
- const topViolations = (ranked.rankedViolations || []).slice(0, 10).map(v => `[Rank ${v.rank}/${v.severity}] ${v.heuristic}: ${v.description}`).join('\n');
116
- const brief = await agent(
117
- `Create a UX fix brief for: "${target}"\n\nOverall usability score: ${ranked.overallUsabilityScore}/100\n\nTop violations:\n${topViolations}\n\nFor each critical/high violation provide: specific fix with design recommendation, implementation effort (low/medium/high). Also list quick wins (low effort, high impact fixes). Write a 2-3 sentence executive summary.`,
118
- { schema: BRIEF_SCHEMA, label: 'brief' }
119
- );
113
+ phase('Brief');
114
+ const topViolations = (ranked.rankedViolations || []).slice(0, 10).map(v => `[Rank ${v.rank}/${v.severity}] ${v.heuristic}: ${v.description}`).join('\n');
115
+ const brief = await agent(
116
+ `Create a UX fix brief for: "${target}"\n\nOverall usability score: ${ranked.overallUsabilityScore}/100\n\nTop violations:\n${topViolations}\n\nFor each critical/high violation provide: specific fix with design recommendation, implementation effort (low/medium/high). Also list quick wins (low effort, high impact fixes). Write a 2-3 sentence executive summary.`,
117
+ { schema: BRIEF_SCHEMA, label: 'brief' }
118
+ );
120
119
 
121
- return { target, audits: auditResults.filter(Boolean), ranked, brief };
122
- }
120
+ return { target, audits: auditResults.filter(Boolean), ranked, brief };
@@ -0,0 +1,138 @@
1
+ export const meta = {
2
+ name: 'verification-loop',
3
+ description: 'Implementer vs. scorer loop: one agent revises an artifact each round, a separate agent scores it against a fixed metric, and the implementer keeps re-attempting until the score is maxed or a round cap is hit',
4
+ whenToUse: 'When a task has a single well-defined quality metric worth pushing as high as possible, rather than a single fixed-count review pass — e.g. tightening a prompt, hardening a config, polishing a spec, or any "keep improving this until the score stops moving" task',
5
+ phases: [
6
+ { title: 'Scope', detail: 'pin the artifact, the metric, and the target/max-round cap' },
7
+ { title: 'Round', detail: 'implementer revises, scorer grades — repeats until target hit, score plateaus, or cap reached' },
8
+ { title: 'Report', detail: 'round-by-round score history and the final artifact' },
9
+ ],
10
+ };
11
+
12
+ const SCORE_SCHEMA = {
13
+ type: 'object',
14
+ properties: {
15
+ score: { type: 'number', description: '0-100. Same metric every round — do not silently redefine what "good" means between rounds.' },
16
+ breakdown: {
17
+ type: 'array',
18
+ items: {
19
+ type: 'object',
20
+ properties: {
21
+ criterion: { type: 'string' },
22
+ points: { type: 'number' },
23
+ maxPoints: { type: 'number' },
24
+ note: { type: 'string' },
25
+ },
26
+ required: ['criterion', 'points', 'maxPoints', 'note'],
27
+ },
28
+ },
29
+ topFixes: {
30
+ type: 'array',
31
+ items: { type: 'string' },
32
+ description: 'the highest-leverage concrete changes that would raise the score next round, ordered by impact — not a full audit, just what to fix next',
33
+ },
34
+ },
35
+ required: ['score', 'breakdown', 'topFixes'],
36
+ };
37
+
38
+ const REVISE_SCHEMA = {
39
+ type: 'object',
40
+ properties: {
41
+ artifact: { type: 'string', description: 'the full revised artifact — not a diff, not a description of changes, the complete thing so the next scorer round has the real content' },
42
+ changesThisRound: { type: 'array', items: { type: 'string' } },
43
+ },
44
+ required: ['artifact', 'changesThisRound'],
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 task string.
55
+ }
56
+ }
57
+ return trimmed;
58
+ }
59
+ return raw || {};
60
+ }
61
+
62
+ const input = parseArgs(args);
63
+ const task = typeof input === 'string' ? input : input.task;
64
+ const metric = typeof input === 'string' ? null : input.metric;
65
+ const targetScore = (typeof input === 'object' && input.targetScore) || 95;
66
+ const maxRounds = (typeof input === 'object' && input.maxRounds) || 8;
67
+ const plateauRounds = (typeof input === 'object' && input.plateauRounds) || 2;
68
+
69
+ if (!task) {
70
+ throw new Error(
71
+ 'verification-loop requires args = { task, metric, targetScore?, maxRounds?, plateauRounds? } ' +
72
+ 'or args = "<task description that fully states the scoring metric>". ' +
73
+ 'task = what to build/revise. metric = the exact rubric the scorer must grade against (if omitted, the scorer infers one from task and reports it every round for consistency). ' +
74
+ 'targetScore default 95. maxRounds default 8. plateauRounds default 2 (stop early if score does not improve for this many consecutive rounds).'
75
+ );
76
+ }
77
+
78
+ phase('Scope');
79
+ log(`Task: ${task}`);
80
+ log(`Metric: ${metric || '(scorer will state and hold a fixed rubric)'}`);
81
+ log(`Target: ${targetScore}/100, max ${maxRounds} rounds, stop after ${plateauRounds} flat rounds`);
82
+
83
+ const scoreHistory = [];
84
+ let currentArtifact = null;
85
+ let roundsFlat = 0;
86
+
87
+ phase('Round');
88
+ for (let round = 1; round <= maxRounds; round++) {
89
+ if (budget.total && budget.remaining() < 20_000) {
90
+ log(`Stopping at round ${round - 1}: token budget nearly exhausted (${Math.round(budget.remaining() / 1000)}k left)`);
91
+ break;
92
+ }
93
+
94
+ const revisePrompt = currentArtifact
95
+ ? `Task: ${task}\n${metric ? `Metric the scorer grades against: ${metric}\n` : ''}\nCurrent artifact (round ${round - 1} score: ${scoreHistory.at(-1)?.score}):\n${currentArtifact}\n\nScorer feedback from last round, ordered by impact:\n${scoreHistory.at(-1)?.topFixes.map((f, i) => `${i + 1}. ${f}`).join('\n')}\n\nRevise the artifact to address as many of these as you genuinely can without breaking anything the scorer already gave points for. Return the complete revised artifact, not a diff.`
96
+ : `Task: ${task}\n${metric ? `Metric the scorer will grade against: ${metric}\n` : 'State the metric you are optimizing for, then '}Produce a first complete attempt at the artifact.`;
97
+
98
+ const revision = await agent(revisePrompt, { label: `implement:r${round}`, phase: 'Round', schema: REVISE_SCHEMA });
99
+ currentArtifact = revision.artifact;
100
+
101
+ const scorePrompt = `Score this artifact against the task's metric. Be strict and consistent with how you'd score any round of this same task — same rubric every time, do not grade on a curve relative to the previous round.\n\nTask: ${task}\n${metric ? `Metric: ${metric}\n` : ''}\nArtifact:\n${currentArtifact}`;
102
+ const scored = await agent(scorePrompt, { label: `score:r${round}`, phase: 'Round', schema: SCORE_SCHEMA });
103
+
104
+ scoreHistory.push(scored);
105
+ log(`Round ${round}: score ${scored.score}/100`);
106
+
107
+ if (scored.score >= targetScore) {
108
+ log(`Target ${targetScore} reached at round ${round} — stopping.`);
109
+ break;
110
+ }
111
+
112
+ const prevScore = scoreHistory.length > 1 ? scoreHistory[scoreHistory.length - 2].score : -Infinity;
113
+ if (scored.score <= prevScore) {
114
+ roundsFlat++;
115
+ if (roundsFlat >= plateauRounds) {
116
+ log(`Score has not improved for ${plateauRounds} consecutive rounds — stopping (diminishing returns, not a bug).`);
117
+ break;
118
+ }
119
+ } else {
120
+ roundsFlat = 0;
121
+ }
122
+ }
123
+
124
+ phase('Report');
125
+ const finalScore = scoreHistory.at(-1);
126
+ log(`Final score: ${finalScore.score}/100 across ${scoreHistory.length} round(s)`);
127
+
128
+ return {
129
+ task,
130
+ metric: metric || '(scorer-inferred, see round 1 breakdown for the rubric it held)',
131
+ finalArtifact: currentArtifact,
132
+ finalScore: finalScore.score,
133
+ scoreHistory: scoreHistory.map((s, i) => ({ round: i + 1, score: s.score, topFixes: s.topFixes })),
134
+ stoppedBecause:
135
+ finalScore.score >= targetScore ? 'target-reached' :
136
+ roundsFlat >= plateauRounds ? 'plateaued' :
137
+ 'max-rounds',
138
+ };
@@ -0,0 +1,136 @@
1
+ export const meta = {
2
+ name: 'workflow-optimizer',
3
+ description: 'Builder + scorer + a distinct process-optimizer role: each round scores the OUTPUT, but a separate optimizer agent reviews the round and proposes structural changes to the PROCESS itself (extra phases, different builder count, a corrected rubric) — the next round runs under the revised process, so the comparison is whether the workflow is getting better at producing good outputs, not just whether one artifact beat another',
4
+ whenToUse: 'When you want to improve a repeatable PROCESS across attempts, not just polish one output — e.g. "this review workflow keeps missing X, fix the workflow, not just this one review" or tuning how a builder+scorer pipeline should be structured before locking it in as a reusable workflow',
5
+ phases: [
6
+ { title: 'Scope', detail: 'pin the task family, the outcome metric, and any prior round history supplied by the caller' },
7
+ { title: 'Cycle', detail: 'builder runs under the current process -> scorer grades the output -> a separate process-optimizer proposes structural changes to the process for next round' },
8
+ { title: 'Report', detail: 'process-change history alongside the score trend, so a rising score can be attributed to real structural improvements' },
9
+ ],
10
+ };
11
+
12
+ const BUILD_SCHEMA = {
13
+ type: 'object',
14
+ properties: {
15
+ output: { type: 'string', description: 'the complete artifact produced this round' },
16
+ processFollowed: { type: 'string', description: 'plainly describe the steps you actually took to produce this — this is read by the process-optimizer, not the scorer, so be concrete about HOW you worked, not just what you made' },
17
+ },
18
+ required: ['output', 'processFollowed'],
19
+ };
20
+
21
+ const SCORE_SCHEMA = {
22
+ type: 'object',
23
+ properties: {
24
+ score: { type: 'number', description: '0-100 against the fixed outcome metric — same metric every round, this is what lets rounds be compared' },
25
+ gaps: { type: 'array', items: { type: 'string' }, description: 'specific shortfalls in THIS output, for context — not process suggestions, that is the optimizer\'s job' },
26
+ },
27
+ required: ['score', 'gaps'],
28
+ };
29
+
30
+ const OPTIMIZE_SCHEMA = {
31
+ type: 'object',
32
+ properties: {
33
+ expectFurtherGains: { type: 'boolean', description: 'false if you believe this process has converged and further optimization rounds would just be noise — this is the signal that ends the loop early, use it honestly' },
34
+ structuralChanges: {
35
+ type: 'array',
36
+ items: { type: 'string' },
37
+ description: 'concrete edits to the WORKFLOW\'s own steps/roles/gates for next round, each one sentence. Not edits to the artifact itself.',
38
+ },
39
+ diagnosis: { type: 'string', description: 'ONE sentence: why the process (not the artifact) produced this result.' },
40
+ revisedRubricNotes: { type: 'string', description: 'one sentence on anything the scorer should additionally weigh next round, or empty string if the rubric is fine as-is' },
41
+ revisedBuilderPrompt: { type: 'string', description: 'the complete next-round builder instructions, incorporating the structural changes above — self-contained, not a diff. Put this field LAST since it is the longest.' },
42
+ },
43
+ required: ['expectFurtherGains', 'structuralChanges', 'diagnosis', 'revisedRubricNotes', 'revisedBuilderPrompt'],
44
+ };
45
+
46
+ function parseArgs(raw) {
47
+ if (raw && typeof raw === 'string') {
48
+ const trimmed = raw.trim();
49
+ if (trimmed.startsWith('{')) {
50
+ try {
51
+ return JSON.parse(trimmed);
52
+ } catch {
53
+ // Not valid JSON despite looking like it — fall through and treat as a plain taskFamily string.
54
+ }
55
+ }
56
+ return trimmed;
57
+ }
58
+ return raw || {};
59
+ }
60
+
61
+ const input = parseArgs(args);
62
+ const taskFamily = typeof input === 'string' ? input : input.taskFamily;
63
+ const metric = typeof input === 'object' ? input.metric : null;
64
+ const maxRounds = (typeof input === 'object' && input.maxRounds) || 5;
65
+ const priorHistory = (typeof input === 'object' && Array.isArray(input.priorHistory)) ? input.priorHistory : [];
66
+
67
+ if (!taskFamily) {
68
+ throw new Error(
69
+ 'workflow-optimizer requires args = { taskFamily, metric, maxRounds?, priorHistory? } or a plain string taskFamily. ' +
70
+ 'taskFamily = the repeatable kind of task this process handles (not one single input — describe the CLASS of task, since the optimizer is improving a reusable process, not one artifact). ' +
71
+ 'metric = the fixed outcome rubric every round is scored against. maxRounds default 5. ' +
72
+ 'priorHistory = optional array of {round, structuralChanges, score} objects from a PREVIOUS invocation of this workflow, if you are resuming optimization across sessions — this script has no filesystem access, so true cross-session history must be passed back in by the caller from a prior run\'s returned processHistory.'
73
+ );
74
+ }
75
+
76
+ phase('Scope');
77
+ log(`Task family: ${taskFamily}`);
78
+ log(`Metric: ${metric || '(optimizer will state and hold a fixed metric)'}`);
79
+ if (priorHistory.length) log(`Resuming with ${priorHistory.length} prior round(s) of history supplied by caller`);
80
+
81
+ const processHistory = [...priorHistory];
82
+ let currentBuilderPrompt = `Task family: ${taskFamily}\n${metric ? `You will be scored against: ${metric}\n` : ''}\nProduce a complete attempt. Also describe the process you followed to produce it.`;
83
+ let currentRubricNotes = '';
84
+
85
+ phase('Cycle');
86
+ const startRound = processHistory.length + 1;
87
+ const lastRound = processHistory.length + maxRounds;
88
+ for (let round = startRound; round <= lastRound; round++) {
89
+ if (budget.total && budget.remaining() < 25_000) {
90
+ log(`Stopping at round ${round - 1}: token budget nearly exhausted (${Math.round(budget.remaining() / 1000)}k left)`);
91
+ break;
92
+ }
93
+
94
+ const build = await agent(currentBuilderPrompt, { label: `build:r${round}`, phase: 'Cycle', schema: BUILD_SCHEMA });
95
+
96
+ const scorePrompt = `Score this output against the task family's fixed metric — same rubric every round, do not adjust for effort or process, only the outcome.\n\nTask family: ${taskFamily}\n${metric ? `Metric: ${metric}\n` : ''}${currentRubricNotes ? `Additional weighting from process-optimizer review: ${currentRubricNotes}\n` : ''}\nOutput:\n${build.output}`;
97
+ const scored = await agent(scorePrompt, { label: `score:r${round}`, phase: 'Cycle', schema: SCORE_SCHEMA });
98
+
99
+ log(`Round ${round}: score ${scored.score}/100`);
100
+
101
+ const optimizePrompt = `You are the process-optimizer. Your job is NOT to improve this one output — a separate builder will do that next round using instructions you write. Your job is to diagnose WHY the current PROCESS produced this result, and propose structural changes to the process itself.\n\nTask family: ${taskFamily}\n${metric ? `Metric: ${metric}\n` : ''}\nCurrent builder instructions:\n${currentBuilderPrompt}\n\nThis round's process, as the builder described it:\n${build.processFollowed}\n\nThis round's score: ${scored.score}/100\nGaps identified: ${scored.gaps.join('; ')}\n\n${processHistory.length ? `Prior rounds' structural changes and scores:\n${processHistory.map(h => `Round ${h.round}: score ${h.score} — changed: ${h.structuralChanges.join('; ')}`).join('\n')}\n` : ''}\nPropose structural changes to the WORKFLOW (not the artifact) for the next round, and write the complete revised builder instructions that incorporate them.`;
102
+ const optimized = await agent(optimizePrompt, { label: `optimize:r${round}`, phase: 'Cycle', schema: OPTIMIZE_SCHEMA });
103
+
104
+ processHistory.push({
105
+ round,
106
+ score: scored.score,
107
+ gaps: scored.gaps,
108
+ diagnosis: optimized.diagnosis,
109
+ structuralChanges: optimized.structuralChanges,
110
+ });
111
+
112
+ log(`Round ${round} optimizer: ${optimized.structuralChanges.length} structural change(s) proposed for next round`);
113
+
114
+ if (!optimized.expectFurtherGains) {
115
+ log(`Optimizer judges the process has converged after round ${round} — stopping early rather than burning further rounds on noise.`);
116
+ break;
117
+ }
118
+
119
+ currentBuilderPrompt = optimized.revisedBuilderPrompt;
120
+ currentRubricNotes = optimized.revisedRubricNotes || currentRubricNotes;
121
+ }
122
+
123
+ phase('Report');
124
+ const scoreTrend = processHistory.map(h => h.score);
125
+ const improved = scoreTrend.length >= 2 && scoreTrend.at(-1) > scoreTrend[0];
126
+ log(`Score trend across ${processHistory.length} round(s): ${scoreTrend.join(' -> ')}`);
127
+
128
+ return {
129
+ taskFamily,
130
+ metric: metric || '(optimizer-held, see round 1 diagnosis for the rubric it used)',
131
+ processHistory,
132
+ finalBuilderPrompt: currentBuilderPrompt,
133
+ scoreTrend,
134
+ processImprovedOutcome: improved,
135
+ note: 'Pass this run\'s processHistory back in as args.priorHistory on a future invocation to continue optimizing the same process across sessions — this script holds no state of its own between runs.',
136
+ };
@@ -9,77 +9,75 @@ export const meta = {
9
9
  ],
10
10
  };
11
11
 
12
- export default async function run({ agent, parallel, pipeline, phase, log, args, budget }) {
13
- const IMPL_SCHEMA = {
14
- type: 'object',
15
- properties: {
16
- description: { type: 'string' },
17
- filesChanged: { type: 'array', items: { type: 'string' } },
18
- approach: { type: 'string' },
19
- diff: { type: 'string' },
20
- testingDone: { type: 'string' },
21
- },
22
- required: ['description', 'filesChanged', 'approach', 'diff'],
23
- };
12
+ const IMPL_SCHEMA = {
13
+ type: 'object',
14
+ properties: {
15
+ description: { type: 'string' },
16
+ filesChanged: { type: 'array', items: { type: 'string' } },
17
+ approach: { type: 'string' },
18
+ diff: { type: 'string' },
19
+ testingDone: { type: 'string' },
20
+ },
21
+ required: ['description', 'filesChanged', 'approach', 'diff'],
22
+ };
24
23
 
25
- const REVIEW_SCHEMA = {
26
- type: 'object',
27
- properties: {
28
- verdict: { type: 'string', enum: ['approve', 'request-changes', 'comment'] },
29
- summary: { type: 'string' },
30
- issues: {
31
- type: 'array',
32
- items: {
33
- type: 'object',
34
- properties: {
35
- severity: { type: 'string', enum: ['blocker', 'major', 'minor', 'nit'] },
36
- location: { type: 'string' },
37
- issue: { type: 'string' },
38
- suggestion: { type: 'string' },
39
- },
40
- required: ['severity', 'location', 'issue', 'suggestion'],
24
+ const REVIEW_SCHEMA = {
25
+ type: 'object',
26
+ properties: {
27
+ verdict: { type: 'string', enum: ['approve', 'request-changes', 'comment'] },
28
+ summary: { type: 'string' },
29
+ issues: {
30
+ type: 'array',
31
+ items: {
32
+ type: 'object',
33
+ properties: {
34
+ severity: { type: 'string', enum: ['blocker', 'major', 'minor', 'nit'] },
35
+ location: { type: 'string' },
36
+ issue: { type: 'string' },
37
+ suggestion: { type: 'string' },
41
38
  },
39
+ required: ['severity', 'location', 'issue', 'suggestion'],
42
40
  },
43
- positives: { type: 'array', items: { type: 'string' } },
44
- approvalConditions: { type: 'array', items: { type: 'string' } },
45
41
  },
46
- required: ['verdict', 'summary', 'issues'],
47
- };
42
+ positives: { type: 'array', items: { type: 'string' } },
43
+ approvalConditions: { type: 'array', items: { type: 'string' } },
44
+ },
45
+ required: ['verdict', 'summary', 'issues'],
46
+ };
48
47
 
49
- const task = args || 'No task specified — describe the implementation task in args.';
48
+ const task = args || 'No task specified — describe the implementation task in args.';
50
49
 
51
- phase('Implement');
52
- log(`Writer implementing: ${task.slice(0, 80)}`);
53
- const implementation = await agent(
54
- `Implement this task in the current codebase: "${task}"\n\nWrite the complete implementation. After implementing, provide: (1) description of what you built, (2) list of files changed, (3) your implementation approach and key decisions, (4) a diff-style summary of changes (show old → new for key parts), (5) testing done or test commands to run.`,
55
- { schema: IMPL_SCHEMA, label: 'writer' }
56
- );
57
- if (!implementation) { log('Warning: agent returned null for implementation, skipping'); return { task, error: 'agent-null' }; }
58
- log(`Writer: ${implementation.description} | Changed: ${implementation.filesChanged.join(', ')}`);
50
+ phase('Implement');
51
+ log(`Writer implementing: ${task.slice(0, 80)}`);
52
+ const implementation = await agent(
53
+ `Implement this task in the current codebase: "${task}"\n\nWrite the complete implementation. After implementing, provide: (1) description of what you built, (2) list of files changed, (3) your implementation approach and key decisions, (4) a diff-style summary of changes (show old → new for key parts), (5) testing done or test commands to run.`,
54
+ { schema: IMPL_SCHEMA, label: 'writer' }
55
+ );
56
+ if (!implementation) { log('Warning: agent returned null for implementation, skipping'); return { task, error: 'agent-null' }; }
57
+ log(`Writer: ${implementation.description} | Changed: ${implementation.filesChanged.join(', ')}`);
59
58
 
60
- phase('Review');
61
- const diffContext = `TASK: ${task}\n\nCHANGES MADE:\n${implementation.diff}\n\nFILES CHANGED: ${implementation.filesChanged.join(', ')}\n\nTESTING: ${implementation.testingDone || 'not specified'}`;
62
- const review = await agent(
63
- `You are a senior code reviewer. Review this code change with fresh eyes — you were NOT involved in the implementation.\n\n${diffContext}\n\nReview for: correctness (does it actually solve the task?), edge cases (null/empty/large inputs), security (injection, auth, secrets), performance (N+1, unbounded loops), maintainability (naming, complexity, DRY). Give a verdict: approve / request-changes / comment. For each issue: severity (blocker/major/minor/nit), exact location, what's wrong, specific suggestion.`,
64
- { schema: REVIEW_SCHEMA, label: 'reviewer' }
65
- );
66
- if (!review) { log('Warning: agent returned null for review, skipping'); return { task, implementation, error: 'agent-null' }; }
67
- log(`Reviewer verdict: ${review.verdict} | ${review.issues.length} issues (${review.issues.filter(i => i.severity === 'blocker').length} blockers)`);
59
+ phase('Review');
60
+ const diffContext = `TASK: ${task}\n\nCHANGES MADE:\n${implementation.diff}\n\nFILES CHANGED: ${implementation.filesChanged.join(', ')}\n\nTESTING: ${implementation.testingDone || 'not specified'}`;
61
+ const review = await agent(
62
+ `You are a senior code reviewer. Review this code change with fresh eyes — you were NOT involved in the implementation.\n\n${diffContext}\n\nReview for: correctness (does it actually solve the task?), edge cases (null/empty/large inputs), security (injection, auth, secrets), performance (N+1, unbounded loops), maintainability (naming, complexity, DRY). Give a verdict: approve / request-changes / comment. For each issue: severity (blocker/major/minor/nit), exact location, what's wrong, specific suggestion.`,
63
+ { schema: REVIEW_SCHEMA, label: 'reviewer' }
64
+ );
65
+ if (!review) { log('Warning: agent returned null for review, skipping'); return { task, implementation, error: 'agent-null' }; }
66
+ log(`Reviewer verdict: ${review.verdict} | ${review.issues.length} issues (${review.issues.filter(i => i.severity === 'blocker').length} blockers)`);
68
67
 
69
- phase('Verdict');
70
- const blockers = review.issues.filter(i => i.severity === 'blocker');
71
- const majors = review.issues.filter(i => i.severity === 'major');
68
+ phase('Verdict');
69
+ const blockers = review.issues.filter(i => i.severity === 'blocker');
70
+ const majors = review.issues.filter(i => i.severity === 'major');
72
71
 
73
- return {
74
- task,
75
- implementation,
76
- review,
77
- verdict: {
78
- decision: review.verdict,
79
- blockerCount: blockers.length,
80
- majorCount: majors.length,
81
- approved: review.verdict === 'approve',
82
- requiredFixes: blockers.concat(majors).map(i => `[${i.severity.toUpperCase()}] ${i.location}: ${i.suggestion}`),
83
- },
84
- };
85
- }
72
+ return {
73
+ task,
74
+ implementation,
75
+ review,
76
+ verdict: {
77
+ decision: review.verdict,
78
+ blockerCount: blockers.length,
79
+ majorCount: majors.length,
80
+ approved: review.verdict === 'approve',
81
+ requiredFixes: blockers.concat(majors).map(i => `[${i.severity.toUpperCase()}] ${i.location}: ${i.suggestion}`),
82
+ },
83
+ };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "pattern-library.jsonl": {
3
- "lastSync": "2026-07-01T06:53:59.643Z",
3
+ "lastSync": "2026-07-28T09:19:09.269Z",
4
4
  "localCount": 1
5
5
  }
6
6
  }