convoke-agents 2.0.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/CHANGELOG.md +920 -0
- package/INSTALLATION.md +230 -0
- package/LICENSE +21 -0
- package/README.md +330 -0
- package/UPDATE-GUIDE.md +220 -0
- package/_bmad/bme/_vortex/README.md +150 -0
- package/_bmad/bme/_vortex/agents/contextualization-expert.md +100 -0
- package/_bmad/bme/_vortex/agents/discovery-empathy-expert.md +117 -0
- package/_bmad/bme/_vortex/agents/hypothesis-engineer.md +117 -0
- package/_bmad/bme/_vortex/agents/lean-experiments-specialist.md +118 -0
- package/_bmad/bme/_vortex/agents/learning-decision-expert.md +117 -0
- package/_bmad/bme/_vortex/agents/production-intelligence-specialist.md +117 -0
- package/_bmad/bme/_vortex/agents/research-convergence-specialist.md +117 -0
- package/_bmad/bme/_vortex/compass-routing-reference.md +312 -0
- package/_bmad/bme/_vortex/config.yaml +46 -0
- package/_bmad/bme/_vortex/contracts/hc1-empathy-artifacts.md +152 -0
- package/_bmad/bme/_vortex/contracts/hc2-problem-definition.md +125 -0
- package/_bmad/bme/_vortex/contracts/hc3-hypothesis-contract.md +112 -0
- package/_bmad/bme/_vortex/contracts/hc4-experiment-context.md +140 -0
- package/_bmad/bme/_vortex/contracts/hc5-signal-report.md +130 -0
- package/_bmad/bme/_vortex/examples/hc2-example-problem-definition.md +85 -0
- package/_bmad/bme/_vortex/examples/hc3-example-hypothesis-contract.md +103 -0
- package/_bmad/bme/_vortex/examples/hc5-example-signal-report.md +76 -0
- package/_bmad/bme/_vortex/guides/EMMA-USER-GUIDE.md +232 -0
- package/_bmad/bme/_vortex/guides/ISLA-USER-GUIDE.md +208 -0
- package/_bmad/bme/_vortex/guides/LIAM-USER-GUIDE.md +255 -0
- package/_bmad/bme/_vortex/guides/MAX-USER-GUIDE.md +213 -0
- package/_bmad/bme/_vortex/guides/MILA-USER-GUIDE.md +235 -0
- package/_bmad/bme/_vortex/guides/NOAH-USER-GUIDE.md +258 -0
- package/_bmad/bme/_vortex/guides/WADE-USER-GUIDE.md +245 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/empathy-map.template.md +143 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/steps/step-01-define-user.md +60 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/steps/step-02-says-thinks.md +67 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/steps/step-03-does-feels.md +79 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/steps/step-04-pain-points.md +87 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/steps/step-05-gains.md +103 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/steps/step-06-synthesize.md +104 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/validate.md +117 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/empathy-map/workflow.md +44 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/steps/step-01-define-requirements.md +85 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/steps/step-02-user-flows.md +59 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/steps/step-03-information-architecture.md +68 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/steps/step-04-wireframe-sketch.md +97 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/steps/step-05-components.md +128 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/steps/step-06-synthesize.md +83 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/wireframe.template.md +287 -0
- package/_bmad/bme/_vortex/workflows/_deprecated/wireframe/workflow.md +44 -0
- package/_bmad/bme/_vortex/workflows/assumption-mapping/steps/step-01-setup.md +66 -0
- package/_bmad/bme/_vortex/workflows/assumption-mapping/steps/step-02-context.md +93 -0
- package/_bmad/bme/_vortex/workflows/assumption-mapping/steps/step-03-risk-mapping.md +103 -0
- package/_bmad/bme/_vortex/workflows/assumption-mapping/steps/step-04-synthesize.md +101 -0
- package/_bmad/bme/_vortex/workflows/assumption-mapping/workflow.md +49 -0
- package/_bmad/bme/_vortex/workflows/behavior-analysis/steps/step-01-setup.md +81 -0
- package/_bmad/bme/_vortex/workflows/behavior-analysis/steps/step-02-context.md +67 -0
- package/_bmad/bme/_vortex/workflows/behavior-analysis/steps/step-03-classification.md +98 -0
- package/_bmad/bme/_vortex/workflows/behavior-analysis/steps/step-04-evidence.md +100 -0
- package/_bmad/bme/_vortex/workflows/behavior-analysis/steps/step-05-synthesize.md +174 -0
- package/_bmad/bme/_vortex/workflows/behavior-analysis/workflow.md +52 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/contextualize-scope.template.md +67 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/steps/step-01-list-opportunities.md +47 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/steps/step-02-define-criteria.md +36 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/steps/step-03-evaluate-opportunities.md +30 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/steps/step-04-define-boundaries.md +32 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/steps/step-05-validate-fit.md +28 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/steps/step-06-synthesize.md +36 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/validate.md +30 -0
- package/_bmad/bme/_vortex/workflows/contextualize-scope/workflow.md +59 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/empathy-map.template.md +143 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/steps/step-01-define-user.md +60 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/steps/step-02-says-thinks.md +67 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/steps/step-03-does-feels.md +79 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/steps/step-04-pain-points.md +87 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/steps/step-05-gains.md +103 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/steps/step-06-synthesize.md +107 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/validate.md +117 -0
- package/_bmad/bme/_vortex/workflows/empathy-map/workflow.md +45 -0
- package/_bmad/bme/_vortex/workflows/experiment-design/steps/step-01-setup.md +66 -0
- package/_bmad/bme/_vortex/workflows/experiment-design/steps/step-02-context.md +77 -0
- package/_bmad/bme/_vortex/workflows/experiment-design/steps/step-03-design.md +114 -0
- package/_bmad/bme/_vortex/workflows/experiment-design/steps/step-04-synthesize.md +128 -0
- package/_bmad/bme/_vortex/workflows/experiment-design/workflow.md +51 -0
- package/_bmad/bme/_vortex/workflows/hypothesis-engineering/steps/step-01-setup.md +66 -0
- package/_bmad/bme/_vortex/workflows/hypothesis-engineering/steps/step-02-context.md +80 -0
- package/_bmad/bme/_vortex/workflows/hypothesis-engineering/steps/step-03-brainwriting.md +79 -0
- package/_bmad/bme/_vortex/workflows/hypothesis-engineering/steps/step-04-assumption-mapping.md +102 -0
- package/_bmad/bme/_vortex/workflows/hypothesis-engineering/steps/step-05-synthesize.md +130 -0
- package/_bmad/bme/_vortex/workflows/hypothesis-engineering/workflow.md +52 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/lean-experiment.template.md +29 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/steps/step-01-hypothesis.md +58 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/steps/step-02-design.md +68 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/steps/step-03-metrics.md +73 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/steps/step-04-run.md +75 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/steps/step-05-analyze.md +84 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/steps/step-06-decide.md +111 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/validate.md +30 -0
- package/_bmad/bme/_vortex/workflows/lean-experiment/workflow.md +26 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/lean-persona.template.md +163 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/steps/step-01-define-job.md +72 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/steps/step-02-current-solution.md +83 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/steps/step-03-problem-contexts.md +90 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/steps/step-04-forces-anxieties.md +98 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/steps/step-05-success-criteria.md +103 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/steps/step-06-synthesize.md +129 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/validate.md +30 -0
- package/_bmad/bme/_vortex/workflows/lean-persona/workflow.md +50 -0
- package/_bmad/bme/_vortex/workflows/learning-card/learning-card.template.md +179 -0
- package/_bmad/bme/_vortex/workflows/learning-card/steps/step-01-experiment-context.md +100 -0
- package/_bmad/bme/_vortex/workflows/learning-card/steps/step-02-raw-results.md +125 -0
- package/_bmad/bme/_vortex/workflows/learning-card/steps/step-03-analysis.md +125 -0
- package/_bmad/bme/_vortex/workflows/learning-card/steps/step-04-validated-learning.md +139 -0
- package/_bmad/bme/_vortex/workflows/learning-card/steps/step-05-implications.md +134 -0
- package/_bmad/bme/_vortex/workflows/learning-card/steps/step-06-synthesize.md +121 -0
- package/_bmad/bme/_vortex/workflows/learning-card/validate.md +134 -0
- package/_bmad/bme/_vortex/workflows/learning-card/workflow.md +51 -0
- package/_bmad/bme/_vortex/workflows/mvp/mvp.template.md +40 -0
- package/_bmad/bme/_vortex/workflows/mvp/steps/step-01-riskiest-assumption.md +17 -0
- package/_bmad/bme/_vortex/workflows/mvp/steps/step-02-success-criteria.md +13 -0
- package/_bmad/bme/_vortex/workflows/mvp/steps/step-03-smallest-test.md +13 -0
- package/_bmad/bme/_vortex/workflows/mvp/steps/step-04-scope-features.md +13 -0
- package/_bmad/bme/_vortex/workflows/mvp/steps/step-05-build-measure-learn.md +13 -0
- package/_bmad/bme/_vortex/workflows/mvp/steps/step-06-synthesize.md +28 -0
- package/_bmad/bme/_vortex/workflows/mvp/validate.md +30 -0
- package/_bmad/bme/_vortex/workflows/mvp/workflow.md +36 -0
- package/_bmad/bme/_vortex/workflows/pattern-mapping/steps/step-01-setup.md +102 -0
- package/_bmad/bme/_vortex/workflows/pattern-mapping/steps/step-02-context.md +81 -0
- package/_bmad/bme/_vortex/workflows/pattern-mapping/steps/step-03-pattern-identification.md +88 -0
- package/_bmad/bme/_vortex/workflows/pattern-mapping/steps/step-04-theme-clustering.md +100 -0
- package/_bmad/bme/_vortex/workflows/pattern-mapping/steps/step-05-synthesize.md +135 -0
- package/_bmad/bme/_vortex/workflows/pattern-mapping/workflow.md +58 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/pivot-patch-persevere.template.md +201 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/steps/step-01-evidence-review.md +125 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/steps/step-02-hypothesis-assessment.md +132 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/steps/step-03-option-analysis.md +167 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/steps/step-04-stakeholder-input.md +141 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/steps/step-05-decision.md +161 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/steps/step-06-action-plan.md +188 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/validate.md +159 -0
- package/_bmad/bme/_vortex/workflows/pivot-patch-persevere/workflow.md +51 -0
- package/_bmad/bme/_vortex/workflows/pivot-resynthesis/steps/step-01-setup.md +97 -0
- package/_bmad/bme/_vortex/workflows/pivot-resynthesis/steps/step-02-context.md +86 -0
- package/_bmad/bme/_vortex/workflows/pivot-resynthesis/steps/step-03-jtbd-reframing.md +88 -0
- package/_bmad/bme/_vortex/workflows/pivot-resynthesis/steps/step-04-pains-gains-revision.md +76 -0
- package/_bmad/bme/_vortex/workflows/pivot-resynthesis/steps/step-05-synthesize.md +158 -0
- package/_bmad/bme/_vortex/workflows/pivot-resynthesis/workflow.md +52 -0
- package/_bmad/bme/_vortex/workflows/product-vision/product-vision.template.md +147 -0
- package/_bmad/bme/_vortex/workflows/product-vision/steps/step-01-define-problem.md +89 -0
- package/_bmad/bme/_vortex/workflows/product-vision/steps/step-02-target-market.md +91 -0
- package/_bmad/bme/_vortex/workflows/product-vision/steps/step-03-unique-approach.md +87 -0
- package/_bmad/bme/_vortex/workflows/product-vision/steps/step-04-future-state.md +100 -0
- package/_bmad/bme/_vortex/workflows/product-vision/steps/step-05-principles.md +92 -0
- package/_bmad/bme/_vortex/workflows/product-vision/steps/step-06-synthesize.md +170 -0
- package/_bmad/bme/_vortex/workflows/product-vision/validate.md +30 -0
- package/_bmad/bme/_vortex/workflows/product-vision/workflow.md +55 -0
- package/_bmad/bme/_vortex/workflows/production-monitoring/steps/step-01-setup.md +84 -0
- package/_bmad/bme/_vortex/workflows/production-monitoring/steps/step-02-context.md +66 -0
- package/_bmad/bme/_vortex/workflows/production-monitoring/steps/step-03-monitoring.md +74 -0
- package/_bmad/bme/_vortex/workflows/production-monitoring/steps/step-04-prioritization.md +97 -0
- package/_bmad/bme/_vortex/workflows/production-monitoring/steps/step-05-synthesize.md +183 -0
- package/_bmad/bme/_vortex/workflows/production-monitoring/workflow.md +52 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/proof-of-concept.template.md +25 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/steps/step-01-risk.md +79 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/steps/step-02-scope.md +105 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/steps/step-03-build.md +92 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/steps/step-04-test.md +103 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/steps/step-05-evaluate.md +114 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/steps/step-06-document.md +125 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/validate.md +30 -0
- package/_bmad/bme/_vortex/workflows/proof-of-concept/workflow.md +26 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/proof-of-value.template.md +29 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/steps/step-01-value-hypothesis.md +75 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/steps/step-02-validation-design.md +94 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/steps/step-03-willingness.md +96 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/steps/step-04-test.md +107 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/steps/step-05-analyze.md +116 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/steps/step-06-document.md +147 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/validate.md +30 -0
- package/_bmad/bme/_vortex/workflows/proof-of-value/workflow.md +26 -0
- package/_bmad/bme/_vortex/workflows/research-convergence/steps/step-01-setup.md +69 -0
- package/_bmad/bme/_vortex/workflows/research-convergence/steps/step-02-context.md +70 -0
- package/_bmad/bme/_vortex/workflows/research-convergence/steps/step-03-jtbd-framing.md +81 -0
- package/_bmad/bme/_vortex/workflows/research-convergence/steps/step-04-pains-gains.md +77 -0
- package/_bmad/bme/_vortex/workflows/research-convergence/steps/step-05-synthesize.md +147 -0
- package/_bmad/bme/_vortex/workflows/research-convergence/workflow.md +50 -0
- package/_bmad/bme/_vortex/workflows/signal-interpretation/steps/step-01-setup.md +68 -0
- package/_bmad/bme/_vortex/workflows/signal-interpretation/steps/step-02-context.md +67 -0
- package/_bmad/bme/_vortex/workflows/signal-interpretation/steps/step-03-signal-analysis.md +85 -0
- package/_bmad/bme/_vortex/workflows/signal-interpretation/steps/step-04-anomaly-detection.md +93 -0
- package/_bmad/bme/_vortex/workflows/signal-interpretation/steps/step-05-synthesize.md +163 -0
- package/_bmad/bme/_vortex/workflows/signal-interpretation/workflow.md +52 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/steps/step-01-discovery-scope.md +77 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/steps/step-02-research-methods.md +152 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/steps/step-03-research-plan.md +159 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/steps/step-04-execute.md +169 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/steps/step-05-organize-data.md +149 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/steps/step-06-synthesize.md +159 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/user-discovery.template.md +231 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/validate.md +153 -0
- package/_bmad/bme/_vortex/workflows/user-discovery/workflow.md +45 -0
- package/_bmad/bme/_vortex/workflows/user-interview/steps/step-01-research-goals.md +100 -0
- package/_bmad/bme/_vortex/workflows/user-interview/steps/step-02-interview-script.md +123 -0
- package/_bmad/bme/_vortex/workflows/user-interview/steps/step-03-recruitment.md +144 -0
- package/_bmad/bme/_vortex/workflows/user-interview/steps/step-04-conduct.md +154 -0
- package/_bmad/bme/_vortex/workflows/user-interview/steps/step-05-findings.md +163 -0
- package/_bmad/bme/_vortex/workflows/user-interview/steps/step-06-synthesize.md +171 -0
- package/_bmad/bme/_vortex/workflows/user-interview/user-interview.template.md +250 -0
- package/_bmad/bme/_vortex/workflows/user-interview/validate.md +142 -0
- package/_bmad/bme/_vortex/workflows/user-interview/workflow.md +51 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/steps/step-01-current-state.md +56 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/steps/step-02-evidence-inventory.md +70 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/steps/step-03-gap-analysis.md +76 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/steps/step-04-stream-evaluation.md +57 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/steps/step-05-recommendation.md +65 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/steps/step-06-navigation-plan.md +72 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/validate.md +75 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/vortex-navigation.template.md +105 -0
- package/_bmad/bme/_vortex/workflows/vortex-navigation/workflow.md +54 -0
- package/index.js +56 -0
- package/package.json +77 -0
- package/scripts/README.md +226 -0
- package/scripts/convoke-doctor.js +322 -0
- package/scripts/docs-audit.js +584 -0
- package/scripts/install-all-agents.js +9 -0
- package/scripts/install-vortex-agents.js +208 -0
- package/scripts/postinstall.js +104 -0
- package/scripts/update/convoke-migrate.js +169 -0
- package/scripts/update/convoke-update.js +272 -0
- package/scripts/update/convoke-version.js +134 -0
- package/scripts/update/lib/agent-registry.js +144 -0
- package/scripts/update/lib/backup-manager.js +243 -0
- package/scripts/update/lib/config-merger.js +242 -0
- package/scripts/update/lib/migration-runner.js +367 -0
- package/scripts/update/lib/refresh-installation.js +171 -0
- package/scripts/update/lib/utils.js +96 -0
- package/scripts/update/lib/validator.js +360 -0
- package/scripts/update/lib/version-detector.js +241 -0
- package/scripts/update/migrations/1.0.x-to-1.3.0.js +128 -0
- package/scripts/update/migrations/1.1.x-to-1.3.0.js +29 -0
- package/scripts/update/migrations/1.2.x-to-1.3.0.js +29 -0
- package/scripts/update/migrations/1.3.x-to-1.5.0.js +29 -0
- package/scripts/update/migrations/1.4.x-to-1.5.0.js +29 -0
- package/scripts/update/migrations/1.5.x-to-1.6.0.js +95 -0
- package/scripts/update/migrations/1.6.x-to-1.7.0.js +29 -0
- package/scripts/update/migrations/1.7.x-to-2.0.0.js +31 -0
- package/scripts/update/migrations/registry.js +194 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs-extra');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Migration: 1.0.x → current version
|
|
8
|
+
* BREAKING CHANGES (delta only):
|
|
9
|
+
* - Archive empathy-map and wireframe workflows to _deprecated/
|
|
10
|
+
* - Remove legacy _designos directory
|
|
11
|
+
* - Update agent manifest (rename empathy-mapper/wireframe-designer entries)
|
|
12
|
+
*
|
|
13
|
+
* Note: Agent files, workflows, config, and guides are handled by refreshInstallation().
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
module.exports = {
|
|
17
|
+
name: '1.0.x-to-1.3.0',
|
|
18
|
+
fromVersion: '1.0.x',
|
|
19
|
+
breaking: true,
|
|
20
|
+
|
|
21
|
+
async preview() {
|
|
22
|
+
return {
|
|
23
|
+
actions: [
|
|
24
|
+
'BREAKING: Move empathy-map workflow to _deprecated/',
|
|
25
|
+
'BREAKING: Move wireframe workflow to _deprecated/',
|
|
26
|
+
'Remove legacy _designos directory (pre-Vortex structure)',
|
|
27
|
+
'Update agent-manifest.csv (rename empathy-mapper/wireframe-designer entries)'
|
|
28
|
+
]
|
|
29
|
+
};
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Apply delta-only migration logic.
|
|
34
|
+
* @param {string} projectRoot - Absolute path to project root
|
|
35
|
+
* @returns {Promise<Array<string>>} List of changes made
|
|
36
|
+
*/
|
|
37
|
+
async apply(projectRoot) {
|
|
38
|
+
const changes = [];
|
|
39
|
+
const targetDir = path.join(projectRoot, '_bmad/bme/_vortex');
|
|
40
|
+
|
|
41
|
+
// 1. Archive old empathy-map workflow
|
|
42
|
+
const archived1 = await moveToDeprecated(targetDir, 'empathy-map');
|
|
43
|
+
if (archived1) changes.push('Archived empathy-map workflow to _deprecated/');
|
|
44
|
+
|
|
45
|
+
// 2. Archive wireframe workflow
|
|
46
|
+
const archived2 = await moveToDeprecated(targetDir, 'wireframe');
|
|
47
|
+
if (archived2) changes.push('Archived wireframe workflow to _deprecated/');
|
|
48
|
+
|
|
49
|
+
// 3. Remove legacy _designos directories
|
|
50
|
+
await removeOldDesignosDirectory(projectRoot);
|
|
51
|
+
changes.push('Cleaned up legacy _designos directory');
|
|
52
|
+
|
|
53
|
+
// 4. Update agent manifest (rename old agent IDs)
|
|
54
|
+
await updateAgentManifest(projectRoot);
|
|
55
|
+
changes.push('Updated agent manifest');
|
|
56
|
+
|
|
57
|
+
return changes;
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Move workflow to _deprecated directory
|
|
63
|
+
* @param {string} targetDir - Target vortex directory
|
|
64
|
+
* @param {string} workflowName - Name of workflow to deprecate
|
|
65
|
+
* @returns {Promise<boolean>} True if moved, false if not found
|
|
66
|
+
*/
|
|
67
|
+
async function moveToDeprecated(targetDir, workflowName) {
|
|
68
|
+
const workflowsDir = path.join(targetDir, 'workflows');
|
|
69
|
+
const workflowPath = path.join(workflowsDir, workflowName);
|
|
70
|
+
const deprecatedPath = path.join(workflowsDir, '_deprecated', workflowName);
|
|
71
|
+
|
|
72
|
+
if (fs.existsSync(workflowPath)) {
|
|
73
|
+
await fs.ensureDir(path.join(workflowsDir, '_deprecated'));
|
|
74
|
+
await fs.move(workflowPath, deprecatedPath, { overwrite: true });
|
|
75
|
+
console.log(` Moved ${workflowName} → _deprecated/`);
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
console.log(` ${workflowName} not found (may already be deprecated)`);
|
|
80
|
+
return false;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Update agent manifest CSV - rename old agent IDs
|
|
85
|
+
* @param {string} projectRoot - Absolute path to project root
|
|
86
|
+
*/
|
|
87
|
+
async function updateAgentManifest(projectRoot) {
|
|
88
|
+
const manifestPath = path.join(projectRoot, '_bmad/_config/agent-manifest.csv');
|
|
89
|
+
|
|
90
|
+
if (!fs.existsSync(manifestPath)) {
|
|
91
|
+
console.log(' Agent manifest not found, skipping update');
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
let manifestContent = await fs.readFile(manifestPath, 'utf8');
|
|
96
|
+
|
|
97
|
+
manifestContent = manifestContent.replace(/empathy-mapper/g, 'contextualization-expert');
|
|
98
|
+
manifestContent = manifestContent.replace(/Empathy Mapping Specialist/g, 'Contextualization Expert');
|
|
99
|
+
manifestContent = manifestContent.replace(/wireframe-designer/g, 'lean-experiments-specialist');
|
|
100
|
+
manifestContent = manifestContent.replace(/Wireframe Designer/g, 'Lean Experiments Specialist');
|
|
101
|
+
|
|
102
|
+
await fs.writeFile(manifestPath, manifestContent, 'utf8');
|
|
103
|
+
console.log(' Updated agent manifest');
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Remove old _designos directory (pre-Vortex structure)
|
|
108
|
+
* @param {string} projectRoot - Absolute path to project root
|
|
109
|
+
*/
|
|
110
|
+
async function removeOldDesignosDirectory(projectRoot) {
|
|
111
|
+
const legacyPaths = [
|
|
112
|
+
path.join(projectRoot, '_bmad/bme/_designos'),
|
|
113
|
+
path.join(projectRoot, '_bmad/_designos'),
|
|
114
|
+
];
|
|
115
|
+
|
|
116
|
+
let removed = false;
|
|
117
|
+
for (const designosPath of legacyPaths) {
|
|
118
|
+
if (fs.existsSync(designosPath)) {
|
|
119
|
+
await fs.remove(designosPath);
|
|
120
|
+
console.log(` Removed legacy directory: ${path.relative(projectRoot, designosPath)}`);
|
|
121
|
+
removed = true;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (!removed) {
|
|
126
|
+
console.log(' No legacy _designos directory found (OK)');
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Migration: 1.1.x → current version
|
|
5
|
+
* No-op delta - all file updates handled by refreshInstallation().
|
|
6
|
+
* No version-specific changes needed for 1.1.x users.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
module.exports = {
|
|
10
|
+
name: '1.1.x-to-1.3.0',
|
|
11
|
+
fromVersion: '1.1.x',
|
|
12
|
+
breaking: false,
|
|
13
|
+
|
|
14
|
+
async preview() {
|
|
15
|
+
return {
|
|
16
|
+
actions: [
|
|
17
|
+
'No version-specific changes needed (refresh handles all updates)'
|
|
18
|
+
]
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @param {string} projectRoot - Absolute path to project root
|
|
24
|
+
* @returns {Promise<Array<string>>} List of changes made
|
|
25
|
+
*/
|
|
26
|
+
async apply(_projectRoot) {
|
|
27
|
+
return ['No version-specific delta needed'];
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Migration: 1.2.x → current version
|
|
5
|
+
* No-op delta - all file updates handled by refreshInstallation().
|
|
6
|
+
* No version-specific changes needed for 1.2.x users.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
module.exports = {
|
|
10
|
+
name: '1.2.x-to-1.3.0',
|
|
11
|
+
fromVersion: '1.2.x',
|
|
12
|
+
breaking: false,
|
|
13
|
+
|
|
14
|
+
async preview() {
|
|
15
|
+
return {
|
|
16
|
+
actions: [
|
|
17
|
+
'No version-specific changes needed (refresh handles all updates)'
|
|
18
|
+
]
|
|
19
|
+
};
|
|
20
|
+
},
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @param {string} projectRoot - Absolute path to project root
|
|
24
|
+
* @returns {Promise<Array<string>>} List of changes made
|
|
25
|
+
*/
|
|
26
|
+
async apply(_projectRoot) {
|
|
27
|
+
return ['No version-specific delta needed'];
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Migration: 1.3.x → current version (v1.5.0)
|
|
5
|
+
* No-op delta - all file updates handled by refreshInstallation().
|
|
6
|
+
* Wave 2 adds Isla, Max, and 6 new workflows via refresh.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
module.exports = {
|
|
10
|
+
name: '1.3.x-to-1.5.0',
|
|
11
|
+
fromVersion: '1.3.x',
|
|
12
|
+
breaking: false,
|
|
13
|
+
|
|
14
|
+
async preview() {
|
|
15
|
+
return {
|
|
16
|
+
actions: [
|
|
17
|
+
'No version-specific changes needed (refresh handles all updates)',
|
|
18
|
+
'Adds: Isla (discovery-empathy-expert) agent',
|
|
19
|
+
'Adds: Max (learning-decision-expert) agent',
|
|
20
|
+
'Adds: empathy-map, user-interview, user-discovery workflows (Isla)',
|
|
21
|
+
'Adds: learning-card, pivot-patch-persevere, vortex-navigation workflows (Max)'
|
|
22
|
+
]
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
async apply(_projectRoot) {
|
|
27
|
+
return ['No version-specific delta needed'];
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Migration: 1.4.x → current version (v1.5.0)
|
|
5
|
+
* No-op delta - all file updates handled by refreshInstallation().
|
|
6
|
+
* Wave 2 adds Isla, Max, and 6 new workflows via refresh.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
module.exports = {
|
|
10
|
+
name: '1.4.x-to-1.5.0',
|
|
11
|
+
fromVersion: '1.4.x',
|
|
12
|
+
breaking: false,
|
|
13
|
+
|
|
14
|
+
async preview() {
|
|
15
|
+
return {
|
|
16
|
+
actions: [
|
|
17
|
+
'No version-specific changes needed (refresh handles all updates)',
|
|
18
|
+
'Adds: Isla (discovery-empathy-expert) agent',
|
|
19
|
+
'Adds: Max (learning-decision-expert) agent',
|
|
20
|
+
'Adds: empathy-map, user-interview, user-discovery workflows (Isla)',
|
|
21
|
+
'Adds: learning-card, pivot-patch-persevere, vortex-navigation workflows (Max)'
|
|
22
|
+
]
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
async apply(_projectRoot) {
|
|
27
|
+
return ['No version-specific delta needed'];
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
const fs = require('fs-extra');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const yaml = require('js-yaml');
|
|
4
|
+
const { AGENTS, AGENT_IDS, WAVE3_WORKFLOW_NAMES } = require('../lib/agent-registry');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Migration: 1.5.x → current version (v1.6.0)
|
|
8
|
+
* Appends Wave 3 agents and workflows to existing config.
|
|
9
|
+
* refreshInstallation() handles file copying (agents, workflows, guides).
|
|
10
|
+
*
|
|
11
|
+
* Wave 3 agents: Mila (Synthesize), Liam (Hypothesize), Noah (Sensitize)
|
|
12
|
+
* Wave 3 workflows: 9 new workflows (3 per agent)
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
// Wave 1/2 agent IDs (pre-1.6.0)
|
|
16
|
+
const WAVE12_AGENT_IDS = new Set([
|
|
17
|
+
'contextualization-expert',
|
|
18
|
+
'discovery-empathy-expert',
|
|
19
|
+
'lean-experiments-specialist',
|
|
20
|
+
'learning-decision-expert'
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
// Wave 3 agent IDs derived from registry; workflow names from WAVE3_WORKFLOW_NAMES set
|
|
24
|
+
const WAVE3_AGENT_IDS = AGENT_IDS.filter(id => !WAVE12_AGENT_IDS.has(id));
|
|
25
|
+
const WAVE3_WORKFLOWS = [...WAVE3_WORKFLOW_NAMES];
|
|
26
|
+
|
|
27
|
+
module.exports = {
|
|
28
|
+
name: '1.5.x-to-1.6.0',
|
|
29
|
+
fromVersion: '1.5.x',
|
|
30
|
+
breaking: false,
|
|
31
|
+
|
|
32
|
+
async preview() {
|
|
33
|
+
const wave3Agents = AGENTS.filter(a => WAVE3_AGENT_IDS.includes(a.id));
|
|
34
|
+
const agentDesc = wave3Agents.map(a => `${a.name} (${a.id})`).join(', ');
|
|
35
|
+
return {
|
|
36
|
+
actions: [
|
|
37
|
+
`Append Wave 3 agents to config: ${agentDesc}`,
|
|
38
|
+
`Append ${WAVE3_WORKFLOWS.length} Wave 3 workflows to config: ${WAVE3_WORKFLOWS.join(', ')}`,
|
|
39
|
+
'File copying handled by refreshInstallation()'
|
|
40
|
+
]
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Apply migration: append Wave 3 agents and workflows to config.
|
|
46
|
+
* Idempotent — skips entries already present.
|
|
47
|
+
* @param {string} projectRoot - Absolute path to project root
|
|
48
|
+
* @returns {Promise<Array<string>>} List of changes made
|
|
49
|
+
*/
|
|
50
|
+
async apply(projectRoot) {
|
|
51
|
+
const changes = [];
|
|
52
|
+
const configPath = path.join(projectRoot, '_bmad', 'bme', '_vortex', 'config.yaml');
|
|
53
|
+
|
|
54
|
+
if (!await fs.pathExists(configPath)) {
|
|
55
|
+
changes.push('No config.yaml found — refreshInstallation will create it');
|
|
56
|
+
return changes;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const configContent = await fs.readFile(configPath, 'utf8');
|
|
60
|
+
const config = yaml.load(configContent) || {};
|
|
61
|
+
|
|
62
|
+
// Ensure arrays exist
|
|
63
|
+
if (!Array.isArray(config.agents)) {
|
|
64
|
+
config.agents = [];
|
|
65
|
+
}
|
|
66
|
+
if (!Array.isArray(config.workflows)) {
|
|
67
|
+
config.workflows = [];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Append missing Wave 3 agents (idempotent)
|
|
71
|
+
const newAgents = WAVE3_AGENT_IDS.filter(id => !config.agents.includes(id));
|
|
72
|
+
if (newAgents.length > 0) {
|
|
73
|
+
config.agents.push(...newAgents);
|
|
74
|
+
changes.push(`Appended ${newAgents.length} Wave 3 agent(s): ${newAgents.join(', ')}`);
|
|
75
|
+
} else {
|
|
76
|
+
changes.push('Wave 3 agents already present in config');
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Append missing Wave 3 workflows (idempotent)
|
|
80
|
+
const newWorkflows = WAVE3_WORKFLOWS.filter(name => !config.workflows.includes(name));
|
|
81
|
+
if (newWorkflows.length > 0) {
|
|
82
|
+
config.workflows.push(...newWorkflows);
|
|
83
|
+
changes.push(`Appended ${newWorkflows.length} Wave 3 workflow(s): ${newWorkflows.join(', ')}`);
|
|
84
|
+
} else {
|
|
85
|
+
changes.push('Wave 3 workflows already present in config');
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Write updated config back
|
|
89
|
+
if (newAgents.length > 0 || newWorkflows.length > 0) {
|
|
90
|
+
await fs.writeFile(configPath, yaml.dump(config, { indent: 2, lineWidth: -1, noRefs: true }), 'utf8');
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return changes;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Migration: 1.6.x → current version (v1.7.0)
|
|
5
|
+
* No-op delta - all file updates handled by refreshInstallation().
|
|
6
|
+
* Wave 4: production-quality workflow steps, updated guides, config-merger
|
|
7
|
+
* smart-merge, docs-audit tool. No schema or structural changes.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
module.exports = {
|
|
11
|
+
name: '1.6.x-to-1.7.0',
|
|
12
|
+
fromVersion: '1.6.x',
|
|
13
|
+
breaking: false,
|
|
14
|
+
|
|
15
|
+
async preview() {
|
|
16
|
+
return {
|
|
17
|
+
actions: [
|
|
18
|
+
'No version-specific changes needed (refresh handles all updates)',
|
|
19
|
+
'Updates: 18 workflow step files (lean-experiment, proof-of-concept, proof-of-value)',
|
|
20
|
+
'Updates: 7 user guides with reordered invocation methods',
|
|
21
|
+
'Updates: config-merger with smart-merge for user-added agents/workflows'
|
|
22
|
+
]
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
async apply(_projectRoot) {
|
|
27
|
+
return ['No version-specific delta needed'];
|
|
28
|
+
}
|
|
29
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Migration: 1.7.x -> current version (v2.0.0)
|
|
5
|
+
* No-op delta - all file updates handled by refreshInstallation().
|
|
6
|
+
* Product rename: BMAD-Enhanced -> Convoke.
|
|
7
|
+
* CLI commands renamed from bmad-* to convoke-*.
|
|
8
|
+
* Internal _bmad/ directory structure preserved.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
module.exports = {
|
|
12
|
+
name: '1.7.x-to-2.0.0',
|
|
13
|
+
fromVersion: '1.7.x',
|
|
14
|
+
breaking: true,
|
|
15
|
+
|
|
16
|
+
async preview() {
|
|
17
|
+
return {
|
|
18
|
+
actions: [
|
|
19
|
+
'Product renamed from BMAD-Enhanced to Convoke',
|
|
20
|
+
'npm package: bmad-enhanced -> convoke-agents',
|
|
21
|
+
'CLI commands renamed: bmad-install-vortex-agents -> convoke-install-vortex, bmad-install-agents -> convoke-install, bmad-update -> convoke-update, bmad-version -> convoke-version, bmad-migrate -> convoke-migrate, bmad-doctor -> convoke-doctor',
|
|
22
|
+
'Internal _bmad/ directory structure preserved (no data loss)',
|
|
23
|
+
'No version-specific changes needed (refresh handles all updates)'
|
|
24
|
+
]
|
|
25
|
+
};
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
async apply(_projectRoot) {
|
|
29
|
+
return ['No version-specific delta needed — refreshInstallation handles file updates'];
|
|
30
|
+
}
|
|
31
|
+
};
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs-extra');
|
|
4
|
+
const yaml = require('js-yaml');
|
|
5
|
+
const { compareVersions } = require('../lib/utils');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Migration Registry for Convoke
|
|
9
|
+
*
|
|
10
|
+
* APPEND-ONLY: Add new migrations at the bottom. Never edit old entries.
|
|
11
|
+
* No toVersion needed - target is always the current package version at runtime.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const MIGRATIONS = [
|
|
15
|
+
{
|
|
16
|
+
name: '1.0.x-to-1.3.0',
|
|
17
|
+
fromVersion: '1.0.x',
|
|
18
|
+
breaking: true,
|
|
19
|
+
description: 'Archive deprecated empathy-map/wireframe workflows, rename agents in manifest',
|
|
20
|
+
module: null
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: '1.1.x-to-1.3.0',
|
|
24
|
+
fromVersion: '1.1.x',
|
|
25
|
+
breaking: false,
|
|
26
|
+
description: 'No-op delta (refresh handles all file updates)',
|
|
27
|
+
module: null
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: '1.2.x-to-1.3.0',
|
|
31
|
+
fromVersion: '1.2.x',
|
|
32
|
+
breaking: false,
|
|
33
|
+
description: 'No-op delta (refresh handles all file updates)',
|
|
34
|
+
module: null
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: '1.3.x-to-1.5.0',
|
|
38
|
+
fromVersion: '1.3.x',
|
|
39
|
+
breaking: false,
|
|
40
|
+
description: 'No-op delta (refresh handles Wave 2 agents and workflows)',
|
|
41
|
+
module: null
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: '1.4.x-to-1.5.0',
|
|
45
|
+
fromVersion: '1.4.x',
|
|
46
|
+
breaking: false,
|
|
47
|
+
description: 'No-op delta (refresh handles Wave 2 agents and workflows)',
|
|
48
|
+
module: null
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: '1.5.x-to-1.6.0',
|
|
52
|
+
fromVersion: '1.5.x',
|
|
53
|
+
breaking: false,
|
|
54
|
+
description: 'Add Wave 3 agents (Mila, Liam, Noah) and 9 workflows to config',
|
|
55
|
+
module: null
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: '1.6.x-to-1.7.0',
|
|
59
|
+
fromVersion: '1.6.x',
|
|
60
|
+
breaking: false,
|
|
61
|
+
description: 'Quality & onboarding (production workflow steps, updated guides, smart-merge)',
|
|
62
|
+
module: null
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: '1.7.x-to-2.0.0',
|
|
66
|
+
fromVersion: '1.7.x',
|
|
67
|
+
breaking: true,
|
|
68
|
+
description: 'Product rename: BMAD-Enhanced -> Convoke. CLI commands renamed from bmad-* to convoke-*. _bmad/ directory preserved.',
|
|
69
|
+
module: null
|
|
70
|
+
}
|
|
71
|
+
// Future migrations: append here. Only add delta logic for version-specific changes.
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Get migrations applicable for upgrading from a given version.
|
|
76
|
+
* Target version is always the current package version (read at runtime).
|
|
77
|
+
*
|
|
78
|
+
* @param {string} fromVersion - Current installed version (e.g., "1.0.5")
|
|
79
|
+
* @returns {Array} List of applicable migrations with loaded modules
|
|
80
|
+
*/
|
|
81
|
+
function getMigrationsFor(fromVersion) {
|
|
82
|
+
const applicable = [];
|
|
83
|
+
|
|
84
|
+
for (const migration of MIGRATIONS) {
|
|
85
|
+
if (matchesVersionRange(fromVersion, migration.fromVersion)) {
|
|
86
|
+
// Lazy load the migration module
|
|
87
|
+
if (!migration.module) {
|
|
88
|
+
try {
|
|
89
|
+
migration.module = require(`./${migration.name}`);
|
|
90
|
+
} catch (error) {
|
|
91
|
+
console.error(`Failed to load migration ${migration.name}:`, error.message);
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
applicable.push(migration);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Sort by version order (oldest fromVersion first)
|
|
101
|
+
applicable.sort((a, b) => {
|
|
102
|
+
const aV = a.fromVersion.replace('.x', '.0');
|
|
103
|
+
const bV = b.fromVersion.replace('.x', '.0');
|
|
104
|
+
return compareVersions(aV, bV);
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
return applicable;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Check if migration has already been applied
|
|
112
|
+
* @param {string} migrationName - Name of migration
|
|
113
|
+
* @param {string} configPath - Path to config.yaml
|
|
114
|
+
* @returns {boolean} True if already applied
|
|
115
|
+
*/
|
|
116
|
+
function hasMigrationBeenApplied(migrationName, configPath) {
|
|
117
|
+
if (!fs.existsSync(configPath)) {
|
|
118
|
+
return false;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
try {
|
|
122
|
+
const configContent = fs.readFileSync(configPath, 'utf8');
|
|
123
|
+
const config = yaml.load(configContent);
|
|
124
|
+
|
|
125
|
+
if (!config.migration_history || !Array.isArray(config.migration_history)) {
|
|
126
|
+
return false;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
return config.migration_history.some(entry =>
|
|
130
|
+
entry.migrations_applied && entry.migrations_applied.includes(migrationName)
|
|
131
|
+
);
|
|
132
|
+
} catch (error) {
|
|
133
|
+
console.warn('Could not check migration history:', error.message);
|
|
134
|
+
return false;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Get breaking changes for upgrading from a given version.
|
|
140
|
+
* @param {string} fromVersion - Current installed version
|
|
141
|
+
* @returns {Array<string>} List of breaking change descriptions
|
|
142
|
+
*/
|
|
143
|
+
function getBreakingChanges(fromVersion) {
|
|
144
|
+
const migrations = getMigrationsFor(fromVersion);
|
|
145
|
+
const breakingChanges = [];
|
|
146
|
+
|
|
147
|
+
for (const migration of migrations) {
|
|
148
|
+
if (migration.breaking) {
|
|
149
|
+
breakingChanges.push(migration.description);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
return breakingChanges;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Match version against version range pattern
|
|
158
|
+
* @param {string} version - Version to check (e.g., "1.0.5")
|
|
159
|
+
* @param {string} pattern - Pattern to match (e.g., "1.0.x")
|
|
160
|
+
* @returns {boolean} True if matches
|
|
161
|
+
*/
|
|
162
|
+
function matchesVersionRange(version, pattern) {
|
|
163
|
+
if (pattern === version) {
|
|
164
|
+
return true;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Handle wildcard patterns (e.g., "1.0.x")
|
|
168
|
+
if (pattern.endsWith('.x')) {
|
|
169
|
+
const patternParts = pattern.split('.');
|
|
170
|
+
const versionParts = version.split('.');
|
|
171
|
+
|
|
172
|
+
return patternParts[0] === versionParts[0] &&
|
|
173
|
+
patternParts[1] === versionParts[1];
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Get all registered migrations
|
|
181
|
+
* @returns {Array} All migrations (shallow copy)
|
|
182
|
+
*/
|
|
183
|
+
function getAllMigrations() {
|
|
184
|
+
return [...MIGRATIONS];
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
module.exports = {
|
|
188
|
+
MIGRATIONS,
|
|
189
|
+
getMigrationsFor,
|
|
190
|
+
hasMigrationBeenApplied,
|
|
191
|
+
getBreakingChanges,
|
|
192
|
+
matchesVersionRange,
|
|
193
|
+
getAllMigrations
|
|
194
|
+
};
|