bmad-method 6.12.4 → 7.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/LICENSE +1 -1
- package/README.md +107 -54
- package/agents.json +640 -0
- package/bin/bmad-method.js +4 -0
- package/messages.yaml +260 -0
- package/modules.yaml +56 -0
- package/package.json +32 -110
- package/src/agent-picks.js +77 -0
- package/src/agents.js +141 -0
- package/src/bmad-scripts.js +167 -0
- package/src/cli.js +266 -0
- package/src/commands/agent-choice.js +67 -0
- package/src/commands/apply.js +38 -0
- package/src/commands/deps.js +25 -0
- package/src/commands/ending.js +54 -0
- package/src/commands/existing-install.js +50 -0
- package/src/commands/install-plan.js +130 -0
- package/src/commands/install-steps.js +66 -0
- package/src/commands/install.js +86 -0
- package/src/commands/status.js +39 -0
- package/src/commands/update.js +106 -0
- package/src/installed.js +48 -0
- package/src/messages.js +84 -0
- package/src/modules.js +221 -0
- package/src/preflight.js +124 -0
- package/src/project-lock.js +68 -0
- package/src/prompts.js +626 -0
- package/src/report.js +199 -0
- package/src/run.js +124 -0
- package/src/self-update.js +88 -0
- package/src/skills-cli.js +133 -0
- package/src/version.js +11 -0
- package/.claude-plugin/marketplace.json +0 -53
- package/AGENTS.md +0 -24
- package/CLAUDE.md +0 -1
- package/README_CN.md +0 -98
- package/README_KR.md +0 -90
- package/README_VN.md +0 -99
- package/bmad-modules.yaml +0 -140
- package/body.md +0 -17
- package/greptile.json +0 -52
- package/pr2.md +0 -11
- package/removals.txt +0 -87
- package/src/bmm-skills/agents/bmad-agent-analyst/SKILL.md +0 -76
- package/src/bmm-skills/agents/bmad-agent-analyst/customize.toml +0 -103
- package/src/bmm-skills/agents/bmad-agent-architect/SKILL.md +0 -76
- package/src/bmm-skills/agents/bmad-agent-architect/customize.toml +0 -63
- package/src/bmm-skills/agents/bmad-agent-dev/SKILL.md +0 -76
- package/src/bmm-skills/agents/bmad-agent-dev/customize.toml +0 -81
- package/src/bmm-skills/agents/bmad-agent-pm/SKILL.md +0 -76
- package/src/bmm-skills/agents/bmad-agent-pm/customize.toml +0 -73
- package/src/bmm-skills/agents/bmad-agent-ux-designer/SKILL.md +0 -76
- package/src/bmm-skills/agents/bmad-agent-ux-designer/customize.toml +0 -58
- package/src/bmm-skills/module-help.csv +0 -19
- package/src/bmm-skills/module.yaml +0 -85
- package/src/bmm-skills/plan/bmad-architecture/SKILL.md +0 -85
- package/src/bmm-skills/plan/bmad-architecture/assets/spine-template.md +0 -79
- package/src/bmm-skills/plan/bmad-architecture/customize.toml +0 -101
- package/src/bmm-skills/plan/bmad-architecture/references/headless.md +0 -26
- package/src/bmm-skills/plan/bmad-architecture/references/reviewer-gate.md +0 -13
- package/src/bmm-skills/plan/bmad-architecture/scripts/lint_spine.py +0 -261
- package/src/bmm-skills/plan/bmad-architecture/scripts/tests/test_lint_spine.py +0 -270
- package/src/bmm-skills/plan/bmad-create-epics-and-stories/SKILL.md +0 -93
- package/src/bmm-skills/plan/bmad-create-epics-and-stories/customize.toml +0 -39
- package/src/bmm-skills/plan/bmad-create-epics-and-stories/steps/step-01-validate-prerequisites.md +0 -263
- package/src/bmm-skills/plan/bmad-create-epics-and-stories/steps/step-02-design-epics.md +0 -242
- package/src/bmm-skills/plan/bmad-create-epics-and-stories/steps/step-03-create-stories.md +0 -255
- package/src/bmm-skills/plan/bmad-create-epics-and-stories/steps/step-04-final-validation.md +0 -141
- package/src/bmm-skills/plan/bmad-create-epics-and-stories/templates/epics-template.md +0 -62
- package/src/bmm-skills/plan/bmad-generate-project-context/SKILL.md +0 -12
- package/src/bmm-skills/plan/bmad-prd/SKILL.md +0 -94
- package/src/bmm-skills/plan/bmad-prd/assets/headless-schemas.md +0 -76
- package/src/bmm-skills/plan/bmad-prd/assets/prd-template.md +0 -165
- package/src/bmm-skills/plan/bmad-prd/assets/prd-validation-checklist.md +0 -135
- package/src/bmm-skills/plan/bmad-prd/assets/validation-report-template.html +0 -325
- package/src/bmm-skills/plan/bmad-prd/customize.toml +0 -148
- package/src/bmm-skills/plan/bmad-prd/references/headless.md +0 -39
- package/src/bmm-skills/plan/bmad-prd/references/validate.md +0 -97
- package/src/bmm-skills/plan/bmad-prfaq/SKILL.md +0 -135
- package/src/bmm-skills/plan/bmad-prfaq/agents/artifact-analyzer.md +0 -60
- package/src/bmm-skills/plan/bmad-prfaq/agents/web-researcher.md +0 -49
- package/src/bmm-skills/plan/bmad-prfaq/assets/prfaq-template.md +0 -62
- package/src/bmm-skills/plan/bmad-prfaq/bmad-manifest.json +0 -16
- package/src/bmm-skills/plan/bmad-prfaq/customize.toml +0 -39
- package/src/bmm-skills/plan/bmad-prfaq/references/customer-faq.md +0 -55
- package/src/bmm-skills/plan/bmad-prfaq/references/internal-faq.md +0 -51
- package/src/bmm-skills/plan/bmad-prfaq/references/press-release.md +0 -60
- package/src/bmm-skills/plan/bmad-prfaq/references/verdict.md +0 -83
- package/src/bmm-skills/plan/bmad-product-brief/SKILL.md +0 -91
- package/src/bmm-skills/plan/bmad-product-brief/assets/brief-template.md +0 -41
- package/src/bmm-skills/plan/bmad-product-brief/customize.toml +0 -100
- package/src/bmm-skills/plan/bmad-project-context/SKILL.md +0 -121
- package/src/bmm-skills/plan/bmad-project-context/customize.toml +0 -24
- package/src/bmm-skills/plan/bmad-project-context/references/best-practices.md +0 -84
- package/src/bmm-skills/plan/bmad-project-context/references/template.md +0 -55
- package/src/bmm-skills/plan/bmad-spec/SKILL.md +0 -160
- package/src/bmm-skills/plan/bmad-spec/assets/headless-schemas.md +0 -33
- package/src/bmm-skills/plan/bmad-spec/assets/spec-template.md +0 -49
- package/src/bmm-skills/plan/bmad-spec/assets/stories-schema.md +0 -44
- package/src/bmm-skills/plan/bmad-spec/customize.toml +0 -52
- package/src/bmm-skills/plan/bmad-sprint-planning/SKILL.md +0 -62
- package/src/bmm-skills/plan/bmad-sprint-planning/customize.toml +0 -39
- package/src/bmm-skills/plan/bmad-sprint-planning/references/fix-sprint-status.md +0 -30
- package/src/bmm-skills/plan/bmad-sprint-planning/references/generate-tracking.md +0 -25
- package/src/bmm-skills/plan/bmad-sprint-planning/references/readiness-gate.md +0 -20
- package/src/bmm-skills/plan/bmad-sprint-planning/references/status-view.md +0 -14
- package/src/bmm-skills/plan/bmad-sprint-planning/references/validate.md +0 -10
- package/src/bmm-skills/plan/bmad-sprint-planning/scripts/__pycache__/sprint_plan.cpython-311.pyc +0 -0
- package/src/bmm-skills/plan/bmad-sprint-planning/scripts/sprint_plan.py +0 -701
- package/src/bmm-skills/plan/bmad-sprint-planning/scripts/tests/__pycache__/test_sprint_plan.cpython-311-pytest-9.1.1.pyc +0 -0
- package/src/bmm-skills/plan/bmad-sprint-planning/scripts/tests/test_sprint_plan.py +0 -524
- package/src/bmm-skills/plan/bmad-sprint-planning/sprint-status-template.yaml +0 -71
- package/src/bmm-skills/plan/bmad-ux/SKILL.md +0 -90
- package/src/bmm-skills/plan/bmad-ux/assets/color-themes.md +0 -9
- package/src/bmm-skills/plan/bmad-ux/assets/design-directions.md +0 -9
- package/src/bmm-skills/plan/bmad-ux/assets/design-example-editorial.md +0 -158
- package/src/bmm-skills/plan/bmad-ux/assets/design-example-mobile.md +0 -93
- package/src/bmm-skills/plan/bmad-ux/assets/design-example-shadcn.md +0 -109
- package/src/bmm-skills/plan/bmad-ux/assets/excalidraw-wireframe.md +0 -19
- package/src/bmm-skills/plan/bmad-ux/assets/experience-example-mobile.md +0 -112
- package/src/bmm-skills/plan/bmad-ux/assets/experience-example-shadcn.md +0 -133
- package/src/bmm-skills/plan/bmad-ux/assets/headless-schemas.md +0 -84
- package/src/bmm-skills/plan/bmad-ux/assets/key-screens.md +0 -29
- package/src/bmm-skills/plan/bmad-ux/assets/validation-report-template.html +0 -319
- package/src/bmm-skills/plan/bmad-ux/customize.toml +0 -100
- package/src/bmm-skills/plan/bmad-ux/references/creative-tools.md +0 -19
- package/src/bmm-skills/plan/bmad-ux/references/design-md-spec.md +0 -50
- package/src/bmm-skills/plan/bmad-ux/references/headless.md +0 -37
- package/src/bmm-skills/plan/bmad-ux/references/validate.md +0 -115
- package/src/bmm-skills/ship/bmad-build/SKILL.md +0 -13
- package/src/bmm-skills/ship/bmad-build/compile-epic-context.md +0 -62
- package/src/bmm-skills/ship/bmad-build/customize.toml +0 -152
- package/src/bmm-skills/ship/bmad-build/references/claims-check.md +0 -14
- package/src/bmm-skills/ship/bmad-build/references/deletion-check.md +0 -14
- package/src/bmm-skills/ship/bmad-build/review-prompts/edge-case-hunter.md +0 -112
- package/src/bmm-skills/ship/bmad-build/review-prompts/verification-gap.md +0 -113
- package/src/bmm-skills/ship/bmad-build/spec-template.md +0 -111
- package/src/bmm-skills/ship/bmad-build/step-01-clarify-and-route.md +0 -100
- package/src/bmm-skills/ship/bmad-build/step-02-plan.md +0 -62
- package/src/bmm-skills/ship/bmad-build/step-03-implement.md +0 -51
- package/src/bmm-skills/ship/bmad-build/step-04-review.md +0 -85
- package/src/bmm-skills/ship/bmad-build/step-05-present.md +0 -43
- package/src/bmm-skills/ship/bmad-build/step-oneshot.md +0 -107
- package/src/bmm-skills/ship/bmad-build/sync-sprint-status.md +0 -5
- package/src/bmm-skills/ship/bmad-build/workflow.md +0 -84
- package/src/bmm-skills/ship/bmad-build-auto/SKILL.md +0 -13
- package/src/bmm-skills/ship/bmad-build-auto/compile-epic-context.md +0 -62
- package/src/bmm-skills/ship/bmad-build-auto/customize.toml +0 -119
- package/src/bmm-skills/ship/bmad-build-auto/references/claims-check.md +0 -14
- package/src/bmm-skills/ship/bmad-build-auto/references/deletion-check.md +0 -14
- package/src/bmm-skills/ship/bmad-build-auto/review-prompts/edge-case-hunter.md +0 -112
- package/src/bmm-skills/ship/bmad-build-auto/review-prompts/verification-gap.md +0 -113
- package/src/bmm-skills/ship/bmad-build-auto/spec-template.md +0 -96
- package/src/bmm-skills/ship/bmad-build-auto/step-01-clarify-and-route.md +0 -84
- package/src/bmm-skills/ship/bmad-build-auto/step-02-plan.md +0 -27
- package/src/bmm-skills/ship/bmad-build-auto/step-03-implement.md +0 -48
- package/src/bmm-skills/ship/bmad-build-auto/step-04-review.md +0 -116
- package/src/bmm-skills/ship/bmad-build-auto/workflow.md +0 -104
- package/src/bmm-skills/ship/bmad-code-review/SKILL.md +0 -90
- package/src/bmm-skills/ship/bmad-code-review/customize.toml +0 -110
- package/src/bmm-skills/ship/bmad-code-review/references/claims-check.md +0 -14
- package/src/bmm-skills/ship/bmad-code-review/references/deletion-check.md +0 -14
- package/src/bmm-skills/ship/bmad-code-review/review-prompts/edge-case-hunter.md +0 -112
- package/src/bmm-skills/ship/bmad-code-review/review-prompts/verification-gap.md +0 -113
- package/src/bmm-skills/ship/bmad-code-review/steps/step-01-gather-context.md +0 -94
- package/src/bmm-skills/ship/bmad-code-review/steps/step-02-review.md +0 -32
- package/src/bmm-skills/ship/bmad-code-review/steps/step-03-triage.md +0 -54
- package/src/bmm-skills/ship/bmad-code-review/steps/step-04-present.md +0 -134
- package/src/bmm-skills/ship/bmad-correct-course/SKILL.md +0 -308
- package/src/bmm-skills/ship/bmad-correct-course/checklist.md +0 -288
- package/src/bmm-skills/ship/bmad-correct-course/customize.toml +0 -39
- package/src/bmm-skills/ship/bmad-qa-generate-e2e-tests/SKILL.md +0 -176
- package/src/bmm-skills/ship/bmad-qa-generate-e2e-tests/checklist.md +0 -33
- package/src/bmm-skills/ship/bmad-qa-generate-e2e-tests/customize.toml +0 -39
- package/src/bmm-skills/ship/bmad-retrospective/SKILL.md +0 -94
- package/src/bmm-skills/ship/bmad-retrospective/customize.toml +0 -39
- package/src/bmm-skills/ship/bmad-retrospective/references/acceptance-verdict.md +0 -55
- package/src/bmm-skills/ship/bmad-retrospective/references/aggregate-views.md +0 -17
- package/src/bmm-skills/ship/bmad-retrospective/references/evidence-gathering.md +0 -30
- package/src/bmm-skills/ship/bmad-retrospective/references/retro-document.md +0 -84
- package/src/bmm-skills/ship/bmad-retrospective/references/team-discussion.md +0 -22
- package/src/bmm-skills/ship/bmad-retrospective/scripts/__pycache__/sprint_status.cpython-311.pyc +0 -0
- package/src/bmm-skills/ship/bmad-retrospective/scripts/git_evidence.py +0 -308
- package/src/bmm-skills/ship/bmad-retrospective/scripts/sprint_status.py +0 -750
- package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/__pycache__/test_git_evidence.cpython-311-pytest-9.1.1.pyc +0 -0
- package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/__pycache__/test_sprint_status.cpython-311-pytest-9.1.1.pyc +0 -0
- package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/fixtures/sprint-status-template.yaml +0 -71
- package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/test_git_evidence.py +0 -750
- package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/test_sprint_status.py +0 -1579
- package/src/bmm-skills/ship/bmad-walkthrough/SKILL.md +0 -68
- package/src/bmm-skills/ship/bmad-walkthrough/customize.toml +0 -39
- package/src/bmm-skills/ship/bmad-walkthrough/generate-trail.md +0 -38
- package/src/bmm-skills/ship/bmad-walkthrough/step-01-orientation.md +0 -105
- package/src/bmm-skills/ship/bmad-walkthrough/step-02-walkthrough.md +0 -89
- package/src/bmm-skills/ship/bmad-walkthrough/step-03-detail-pass.md +0 -106
- package/src/bmm-skills/ship/bmad-walkthrough/step-04-testing.md +0 -74
- package/src/bmm-skills/ship/bmad-walkthrough/step-05-wrapup.md +0 -30
- package/src/bmm-skills/v6-shims/README.md +0 -29
- package/src/bmm-skills/v6-shims/bmad-checkpoint-preview/SKILL.md +0 -21
- package/src/bmm-skills/v6-shims/bmad-create-architecture/SKILL.md +0 -32
- package/src/bmm-skills/v6-shims/bmad-create-architecture/customize.toml +0 -39
- package/src/bmm-skills/v6-shims/bmad-create-prd/SKILL.md +0 -32
- package/src/bmm-skills/v6-shims/bmad-create-prd/customize.toml +0 -39
- package/src/bmm-skills/v6-shims/bmad-create-story/SKILL.md +0 -436
- package/src/bmm-skills/v6-shims/bmad-create-story/checklist.md +0 -357
- package/src/bmm-skills/v6-shims/bmad-create-story/customize.toml +0 -39
- package/src/bmm-skills/v6-shims/bmad-create-story/discover-inputs.md +0 -88
- package/src/bmm-skills/v6-shims/bmad-create-story/template.md +0 -49
- package/src/bmm-skills/v6-shims/bmad-dev-auto/SKILL.md +0 -21
- package/src/bmm-skills/v6-shims/bmad-dev-story/SKILL.md +0 -504
- package/src/bmm-skills/v6-shims/bmad-dev-story/checklist.md +0 -80
- package/src/bmm-skills/v6-shims/bmad-dev-story/customize.toml +0 -39
- package/src/bmm-skills/v6-shims/bmad-document-project/SKILL.md +0 -16
- package/src/bmm-skills/v6-shims/bmad-domain-research/SKILL.md +0 -16
- package/src/bmm-skills/v6-shims/bmad-edit-prd/SKILL.md +0 -32
- package/src/bmm-skills/v6-shims/bmad-edit-prd/customize.toml +0 -40
- package/src/bmm-skills/v6-shims/bmad-market-research/SKILL.md +0 -16
- package/src/bmm-skills/v6-shims/bmad-quick-dev/SKILL.md +0 -21
- package/src/bmm-skills/v6-shims/bmad-sprint-status/SKILL.md +0 -28
- package/src/bmm-skills/v6-shims/bmad-sprint-status/customize.toml +0 -39
- package/src/bmm-skills/v6-shims/bmad-technical-research/SKILL.md +0 -16
- package/src/bmm-skills/v6-shims/bmad-validate-prd/SKILL.md +0 -32
- package/src/bmm-skills/v6-shims/bmad-validate-prd/customize.toml +0 -40
- package/src/core-skills/bmad-advanced-elicitation/SKILL.md +0 -64
- package/src/core-skills/bmad-advanced-elicitation/assets/methods.csv +0 -72
- package/src/core-skills/bmad-advanced-elicitation/customize.toml +0 -54
- package/src/core-skills/bmad-advanced-elicitation/scripts/pick_methods.py +0 -233
- package/src/core-skills/bmad-advanced-elicitation/scripts/tests/test_pick_methods.py +0 -228
- package/src/core-skills/bmad-brainstorming/SKILL.md +0 -80
- package/src/core-skills/bmad-brainstorming/assets/brain-icons.json +0 -166
- package/src/core-skills/bmad-brainstorming/assets/brain-methods.csv +0 -109
- package/src/core-skills/bmad-brainstorming/assets/brain-selector.html +0 -328
- package/src/core-skills/bmad-brainstorming/customize.toml +0 -83
- package/src/core-skills/bmad-brainstorming/references/converge.md +0 -24
- package/src/core-skills/bmad-brainstorming/references/finalize.md +0 -26
- package/src/core-skills/bmad-brainstorming/references/headless.md +0 -54
- package/src/core-skills/bmad-brainstorming/references/in-chat-techniques.md +0 -18
- package/src/core-skills/bmad-brainstorming/references/mode-autonomous.md +0 -10
- package/src/core-skills/bmad-brainstorming/references/mode-facilitator.md +0 -11
- package/src/core-skills/bmad-brainstorming/references/mode-partner.md +0 -16
- package/src/core-skills/bmad-brainstorming/references/resume.md +0 -5
- package/src/core-skills/bmad-brainstorming/scripts/brain.py +0 -789
- package/src/core-skills/bmad-brainstorming/scripts/tests/test_brain.py +0 -289
- package/src/core-skills/bmad-customize/SKILL.md +0 -111
- package/src/core-skills/bmad-customize/scripts/list_customizable_skills.py +0 -235
- package/src/core-skills/bmad-customize/scripts/tests/test_list_customizable_skills.py +0 -249
- package/src/core-skills/bmad-deep-recon/SKILL.md +0 -82
- package/src/core-skills/bmad-deep-recon/assets/research.template.md +0 -18
- package/src/core-skills/bmad-deep-recon/customize.toml +0 -212
- package/src/core-skills/bmad-deep-recon/references/draft.md +0 -8
- package/src/core-skills/bmad-deep-recon/references/finalize.md +0 -11
- package/src/core-skills/bmad-deep-recon/references/html-briefing.md +0 -16
- package/src/core-skills/bmad-deep-recon/references/lifecycle.md +0 -11
- package/src/core-skills/bmad-deep-recon/references/process.md +0 -10
- package/src/core-skills/bmad-deep-recon/references/run.md +0 -73
- package/src/core-skills/bmad-deep-recon/references/selection.md +0 -13
- package/src/core-skills/bmad-deep-recon/references/synthesis.md +0 -16
- package/src/core-skills/bmad-deep-recon/references/verification.md +0 -29
- package/src/core-skills/bmad-deep-recon/scripts/recon_kit.py +0 -326
- package/src/core-skills/bmad-deep-recon/scripts/tests/test_recon_kit.py +0 -144
- package/src/core-skills/bmad-deep-recon/types/academic-lit.md +0 -19
- package/src/core-skills/bmad-deep-recon/types/competitive.md +0 -19
- package/src/core-skills/bmad-deep-recon/types/domain.md +0 -19
- package/src/core-skills/bmad-deep-recon/types/market.md +0 -19
- package/src/core-skills/bmad-deep-recon/types/technical.md +0 -19
- package/src/core-skills/bmad-deep-recon/types/user-voice.md +0 -19
- package/src/core-skills/bmad-forge-idea/SKILL.md +0 -107
- package/src/core-skills/bmad-forge-idea/customize.toml +0 -41
- package/src/core-skills/bmad-forge-idea/scripts/resolve_personas.py +0 -277
- package/src/core-skills/bmad-forge-idea/scripts/tests/test_resolve_personas.py +0 -160
- package/src/core-skills/bmad-help/SKILL.md +0 -77
- package/src/core-skills/bmad-party-mode/SKILL.md +0 -60
- package/src/core-skills/bmad-party-mode/customize.toml +0 -211
- package/src/core-skills/bmad-party-mode/references/create-party.md +0 -70
- package/src/core-skills/bmad-party-mode/references/mode-agent-team.md +0 -13
- package/src/core-skills/bmad-party-mode/references/mode-auto.md +0 -13
- package/src/core-skills/bmad-party-mode/references/mode-subagent.md +0 -31
- package/src/core-skills/bmad-party-mode/references/party-memory.md +0 -51
- package/src/core-skills/bmad-party-mode/scripts/resolve_party.py +0 -300
- package/src/core-skills/bmad-party-mode/scripts/tests/test_resolve_party.py +0 -183
- package/src/core-skills/bmad-review/SKILL.md +0 -50
- package/src/core-skills/bmad-review/customize.toml +0 -141
- package/src/core-skills/bmad-review/references/editorial-common.md +0 -56
- package/src/core-skills/bmad-review/references/lens-adversarial.md +0 -19
- package/src/core-skills/bmad-review/references/lens-edge-case-hunter.md +0 -72
- package/src/core-skills/bmad-review/references/lens-prose.md +0 -7
- package/src/core-skills/bmad-review/references/lens-structure.md +0 -9
- package/src/core-skills/bmad-review/references/lens-verification-gap.md +0 -92
- package/src/core-skills/bmad-review/references/structure-models.md +0 -44
- package/src/core-skills/bmad-review/scripts/tests/test_word_metrics.py +0 -62
- package/src/core-skills/bmad-review/scripts/word_metrics.py +0 -102
- package/src/core-skills/module-help.csv +0 -10
- package/src/core-skills/module.yaml +0 -38
- package/src/core-skills/v6-shims/README.md +0 -25
- package/src/core-skills/v6-shims/bmad-editorial-review/SKILL.md +0 -8
- package/src/core-skills/v6-shims/bmad-editorial-review/customize.toml +0 -31
- package/src/core-skills/v6-shims/bmad-editorial-review-prose/SKILL.md +0 -8
- package/src/core-skills/v6-shims/bmad-editorial-review-structure/SKILL.md +0 -8
- package/src/core-skills/v6-shims/bmad-review-adversarial-general/SKILL.md +0 -8
- package/src/core-skills/v6-shims/bmad-review-edge-case-hunter/SKILL.md +0 -8
- package/src/core-skills/v6-shims/bmad-review-verification-gap/SKILL.md +0 -8
- package/src/scripts/__pycache__/config_utils.cpython-311.pyc +0 -0
- package/src/scripts/config_utils.py +0 -119
- package/src/scripts/memlog.py +0 -228
- package/src/scripts/render_skill.py +0 -401
- package/src/scripts/resolve_config.py +0 -82
- package/src/scripts/resolve_customization.py +0 -164
- package/src/scripts/tests/__pycache__/test_config_utils.cpython-311.pyc +0 -0
- package/src/scripts/tests/__pycache__/test_resolve_config.cpython-311.pyc +0 -0
- package/src/scripts/tests/__pycache__/test_resolve_customization.cpython-311.pyc +0 -0
- package/src/scripts/tests/test_config_utils.py +0 -85
- package/src/scripts/tests/test_memlog.py +0 -306
- package/src/scripts/tests/test_resolve_config.py +0 -117
- package/src/scripts/tests/test_resolve_customization.py +0 -179
- package/tools/bundle-web-bundles.js +0 -117
- package/tools/format-workflow-md.js +0 -263
- package/tools/installer/README.md +0 -60
- package/tools/installer/bmad-cli.js +0 -105
- package/tools/installer/cli-utils.js +0 -57
- package/tools/installer/commands/install.js +0 -151
- package/tools/installer/commands/status.js +0 -65
- package/tools/installer/commands/uninstall.js +0 -167
- package/tools/installer/core/config.js +0 -76
- package/tools/installer/core/existing-install.js +0 -121
- package/tools/installer/core/install-paths.js +0 -132
- package/tools/installer/core/installer.js +0 -1826
- package/tools/installer/core/legacy-warnings.js +0 -151
- package/tools/installer/core/manifest-generator.js +0 -883
- package/tools/installer/core/manifest.js +0 -439
- package/tools/installer/core/shim-policy.js +0 -159
- package/tools/installer/core/uv-check.js +0 -195
- package/tools/installer/core/wsl-node-check.js +0 -109
- package/tools/installer/file-ops.js +0 -204
- package/tools/installer/fs-native.js +0 -116
- package/tools/installer/ide/_config-driven.js +0 -972
- package/tools/installer/ide/manager.js +0 -324
- package/tools/installer/ide/platform-codes.js +0 -80
- package/tools/installer/ide/platform-codes.yaml +0 -363
- package/tools/installer/ide/shared/installed-skills.js +0 -50
- package/tools/installer/ide/shared/path-utils.js +0 -219
- package/tools/installer/ide/shared/skill-manifest.js +0 -57
- package/tools/installer/install-messages.yaml +0 -44
- package/tools/installer/list-options.js +0 -210
- package/tools/installer/message-loader.js +0 -83
- package/tools/installer/modules/channel-plan.js +0 -216
- package/tools/installer/modules/channel-resolver.js +0 -241
- package/tools/installer/modules/custom-module-manager.js +0 -924
- package/tools/installer/modules/external-manager.js +0 -673
- package/tools/installer/modules/git-env.js +0 -47
- package/tools/installer/modules/module-help-schema.js +0 -13
- package/tools/installer/modules/official-modules.js +0 -2289
- package/tools/installer/modules/plugin-resolver.js +0 -398
- package/tools/installer/modules/version-resolver.js +0 -336
- package/tools/installer/project-root.js +0 -224
- package/tools/installer/prompts.js +0 -804
- package/tools/installer/set-overrides.js +0 -330
- package/tools/installer/ui.js +0 -2262
- package/tools/installer/yaml-format.js +0 -245
- package/tools/javascript-conventions.md +0 -5
- package/tools/migrate-custom-module-paths.js +0 -124
- package/tools/skill-validator.md +0 -312
- package/tools/tests/__pycache__/test_validate_skills.cpython-311.pyc +0 -0
- package/tools/tests/fixtures/validate-skills/bmad/SKILL.md +0 -8
- package/tools/tests/fixtures/validate-skills/deprecated-shim/SKILL.md +0 -9
- package/tools/tests/fixtures/validate-skills/missing-trigger/SKILL.md +0 -9
- package/tools/tests/fixtures/validate-skills/with-trigger/SKILL.md +0 -8
- package/tools/tests/test_validate_skills.py +0 -476
- package/tools/validate-published-implementation-model.mjs +0 -59
- package/tools/validate-sidebar-order.js +0 -388
- package/tools/validate-svg-changes.sh +0 -356
- package/tools/validate_skills.py +0 -698
- package/web-bundles/README.md +0 -46
- package/web-bundles/brainstorming-coach/INSTRUCTIONS.md +0 -86
- package/web-bundles/brainstorming-coach/SKILL.md +0 -83
- package/web-bundles/brainstorming-coach/brain-methods.csv +0 -62
- package/web-bundles/bundles.json +0 -139
- package/web-bundles/market-and-industry-research/INSTRUCTIONS.md +0 -88
- package/web-bundles/market-and-industry-research/SKILL.md +0 -59
- package/web-bundles/prd-coach/INSTRUCTIONS.md +0 -86
- package/web-bundles/prd-coach/SKILL.md +0 -101
- package/web-bundles/prd-coach/prd-template.md +0 -165
- package/web-bundles/prd-coach/prd-validation-checklist.md +0 -135
- package/web-bundles/prfaq-coach/INSTRUCTIONS.md +0 -86
- package/web-bundles/prfaq-coach/SKILL.md +0 -139
- package/web-bundles/product-brief-coach/INSTRUCTIONS.md +0 -86
- package/web-bundles/product-brief-coach/SKILL.md +0 -113
- package/web-bundles/ux-coach/INSTRUCTIONS.md +0 -92
- package/web-bundles/ux-coach/SKILL.md +0 -187
- package/web-bundles/ux-coach/ux-validation.md +0 -100
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** @typedef {import('../modules.js').ModuleDefinition} ModuleDefinition */
|
|
2
|
+
/** @typedef {import('../run.js').Runner} Runner */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* What every command is handed. `terminal`, `agent`, `detect` and `node` stand in for the live
|
|
6
|
+
* TTY, coding-agent, file system and Node version checks in tests.
|
|
7
|
+
* @typedef {{
|
|
8
|
+
* runner: Runner,
|
|
9
|
+
* skillsCli: ReturnType<typeof import('../skills-cli.js').createSkillsCli>,
|
|
10
|
+
* bmadScripts: ReturnType<typeof import('../bmad-scripts.js').createBmadScripts>,
|
|
11
|
+
* messages: Record<string, any>,
|
|
12
|
+
* modules: ModuleDefinition[],
|
|
13
|
+
* agents: import('../agents.js').Agent[],
|
|
14
|
+
* detect?: (project: string) => import('../agents.js').DetectContext,
|
|
15
|
+
* prompts: typeof import('../prompts.js'),
|
|
16
|
+
* env: NodeJS.ProcessEnv,
|
|
17
|
+
* cwd: string,
|
|
18
|
+
* version: string,
|
|
19
|
+
* node?: string,
|
|
20
|
+
* terminal?: () => boolean,
|
|
21
|
+
* agent?: () => Promise<string | null>
|
|
22
|
+
* }} CommandDeps
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
export {}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { UNIVERSAL_AGENT } from '../agents.js'
|
|
2
|
+
import { message } from '../messages.js'
|
|
3
|
+
import { nodeFailureHint } from '../preflight.js'
|
|
4
|
+
import { problemLines, renderMigrations, renderSummary } from '../report.js'
|
|
5
|
+
import { selectMigrations, versionsByCode } from './install-plan.js'
|
|
6
|
+
|
|
7
|
+
/** @typedef {import('../bmad-scripts.js').StatusReport} StatusReport */
|
|
8
|
+
/** @typedef {import('../skills-cli.js').AddResult} AddResult */
|
|
9
|
+
/** @typedef {import('./deps.js').CommandDeps} CommandDeps */
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Ends an install or update: the migrations for a major version this run crossed, what went
|
|
13
|
+
* wrong if anything, the summary, the commands people reuse, and the links. `before` holds the
|
|
14
|
+
* module versions from before the run.
|
|
15
|
+
* @param {CommandDeps} deps
|
|
16
|
+
* @param {{ report: StatusReport | null, bmadSkillDir: string, before: Record<string, string>, failures: AddResult[], directory: string, agents?: string[], repeat?: string, updated?: boolean, fallbackModules?: string[] }} run
|
|
17
|
+
*/
|
|
18
|
+
export async function endRun(deps, run) {
|
|
19
|
+
const { bmadScripts, messages, modules, prompts } = deps
|
|
20
|
+
const migrations = run.report
|
|
21
|
+
? selectMigrations(await bmadScripts.migrations(run.bmadSkillDir), {
|
|
22
|
+
before: run.before,
|
|
23
|
+
after: versionsByCode(run.report),
|
|
24
|
+
})
|
|
25
|
+
: []
|
|
26
|
+
if (migrations.length > 0) prompts.showNote(renderMigrations(migrations, messages))
|
|
27
|
+
|
|
28
|
+
const problems = problemLines(run.report, run.failures, messages)
|
|
29
|
+
const hint = run.failures.length > 0 ? nodeFailureHint(messages, deps.node) : null
|
|
30
|
+
if (hint) problems.push(hint)
|
|
31
|
+
if (problems.length > 0) prompts.warn(problems.join('\n'))
|
|
32
|
+
|
|
33
|
+
const agents = run.agents?.map((id) => (id === UNIVERSAL_AGENT
|
|
34
|
+
? message(messages, 'universalAgentName')
|
|
35
|
+
: deps.agents.find((agent) => agent.id === id)?.name ?? id))
|
|
36
|
+
const summary = renderSummary(run.report, {
|
|
37
|
+
messages,
|
|
38
|
+
modules,
|
|
39
|
+
directory: run.directory,
|
|
40
|
+
agents,
|
|
41
|
+
problems: problems.length > 0,
|
|
42
|
+
updated: run.updated,
|
|
43
|
+
fallbackModules: run.fallbackModules,
|
|
44
|
+
})
|
|
45
|
+
prompts.showNote(summary.body, summary.title, { accentAfterBlank: true })
|
|
46
|
+
|
|
47
|
+
if (!run.updated) {
|
|
48
|
+
const commands = [message(messages, 'updateLater')]
|
|
49
|
+
if (run.repeat) commands.push(message(messages, 'repeatInstall', { command: run.repeat }))
|
|
50
|
+
prompts.plain(commands.join('\n'))
|
|
51
|
+
}
|
|
52
|
+
prompts.plain(message(messages, 'thanks'))
|
|
53
|
+
prompts.finish('')
|
|
54
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { inspectInstall, installedModuleCodes } from '../installed.js'
|
|
2
|
+
import { message } from '../messages.js'
|
|
3
|
+
import { findModule } from '../modules.js'
|
|
4
|
+
import { installedLabel } from '../report.js'
|
|
5
|
+
import { versionsByCode } from './install-plan.js'
|
|
6
|
+
|
|
7
|
+
/** @typedef {import('../bmad-scripts.js').StatusReport} StatusReport */
|
|
8
|
+
/** @typedef {import('../installed.js').InstalledState} InstalledState */
|
|
9
|
+
/** @typedef {import('./deps.js').CommandDeps} CommandDeps */
|
|
10
|
+
/** @typedef {{ state: InstalledState, report: StatusReport | null, codes: string[], versions: Record<string, string> }} Existing */
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param {CommandDeps} deps
|
|
14
|
+
* @param {string} bmadSkillDir
|
|
15
|
+
* @param {string} projectRoot
|
|
16
|
+
* @returns {Promise<StatusReport>}
|
|
17
|
+
*/
|
|
18
|
+
export async function statusWithSpinner(deps, bmadSkillDir, projectRoot) {
|
|
19
|
+
const spinner = deps.prompts.startSpinner(message(deps.messages, 'statusSpinner'))
|
|
20
|
+
try {
|
|
21
|
+
return await deps.bmadScripts.status(bmadSkillDir, projectRoot)
|
|
22
|
+
} finally {
|
|
23
|
+
spinner.stop()
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* What is already installed in the project, said out loud when there is something.
|
|
29
|
+
* @param {string} directory
|
|
30
|
+
* @param {CommandDeps} deps
|
|
31
|
+
* @param {{ hasUv?: boolean }} [options]
|
|
32
|
+
* @returns {Promise<Existing>}
|
|
33
|
+
*/
|
|
34
|
+
export async function readExisting(directory, deps, options = {}) {
|
|
35
|
+
const { hasUv = true } = options
|
|
36
|
+
const { messages, modules, prompts, skillsCli } = deps
|
|
37
|
+
const state = await inspectInstall(directory, skillsCli)
|
|
38
|
+
const report = state.bmadSkillDir && hasUv
|
|
39
|
+
? await statusWithSpinner(deps, state.bmadSkillDir, directory).catch(() => null)
|
|
40
|
+
: null
|
|
41
|
+
const codes = report ? report.modules.map((entry) => entry.module) : installedModuleCodes(state, modules)
|
|
42
|
+
const versions = versionsByCode(report)
|
|
43
|
+
|
|
44
|
+
if (state.legacyManifest) prompts.warn(message(messages, 'legacyManifest'))
|
|
45
|
+
if (codes.length > 0) {
|
|
46
|
+
const names = codes.map((code) => installedLabel(messages, findModule(modules, code)?.name ?? code, versions[code]))
|
|
47
|
+
prompts.say([message(messages, 'foundModules'), ...names].join('\n'))
|
|
48
|
+
}
|
|
49
|
+
return { state, report, codes, versions }
|
|
50
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { customModule, isModuleSource, sourceAtRef } from '../modules.js'
|
|
2
|
+
|
|
3
|
+
/** @typedef {import('../bmad-scripts.js').Migration} Migration */
|
|
4
|
+
/** @typedef {import('../bmad-scripts.js').StatusReport} StatusReport */
|
|
5
|
+
/** @typedef {import('../modules.js').ModuleDefinition} ModuleDefinition */
|
|
6
|
+
/** @typedef {{ source: string, skills: string[], label: string }} InstallCall */
|
|
7
|
+
|
|
8
|
+
const ALL_SKILLS = '*'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Resolves the picked codes in modules.yaml order and adds the `always` modules, which neither
|
|
12
|
+
* the flag nor the prompt has to name, and the modules the picked ones require. A code picked as
|
|
13
|
+
* `code#ref` comes from that branch or tag. Sources from `--modules` follow, in the order given.
|
|
14
|
+
* @param {string[]} codes
|
|
15
|
+
* @param {ModuleDefinition[]} modules
|
|
16
|
+
* @returns {ModuleDefinition[]}
|
|
17
|
+
*/
|
|
18
|
+
export function chosenModules(codes, modules) {
|
|
19
|
+
/** @type {Map<string, string | undefined>} */
|
|
20
|
+
const refs = new Map()
|
|
21
|
+
for (const picked of codes) {
|
|
22
|
+
if (isModuleSource(picked)) continue
|
|
23
|
+
const [code, ref] = picked.split('#')
|
|
24
|
+
refs.set(code, ref)
|
|
25
|
+
}
|
|
26
|
+
for (const code of requiredCodes([...refs.keys()], modules)) refs.set(code, undefined)
|
|
27
|
+
const listed = modules
|
|
28
|
+
.filter((module) => module.always || refs.has(module.code))
|
|
29
|
+
.map((module) => {
|
|
30
|
+
const ref = refs.get(module.code)
|
|
31
|
+
return ref ? { ...module, source: sourceAtRef(module.source, ref), ref } : module
|
|
32
|
+
})
|
|
33
|
+
return [...listed, ...codes.filter(isModuleSource).map(customModule)]
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The codes the picked modules require, directly or through another required module, that were
|
|
38
|
+
* not picked themselves.
|
|
39
|
+
* @param {string[]} picked
|
|
40
|
+
* @param {ModuleDefinition[]} modules
|
|
41
|
+
* @returns {string[]}
|
|
42
|
+
*/
|
|
43
|
+
export function requiredCodes(picked, modules) {
|
|
44
|
+
const wanted = new Set(picked.map((code) => code.split('#')[0]))
|
|
45
|
+
/** @type {string[]} */
|
|
46
|
+
const added = []
|
|
47
|
+
for (const code of wanted) {
|
|
48
|
+
for (const required of modules.find((module) => module.code === code)?.requires ?? []) {
|
|
49
|
+
if (wanted.has(required)) continue
|
|
50
|
+
wanted.add(required)
|
|
51
|
+
added.push(required)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return added
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* One skills add per module, for every skill in the module's folder. A module is left alone,
|
|
59
|
+
* since `update` is what refreshes it, only when it is installed with nothing missing and every
|
|
60
|
+
* picked agent's folder already holds its record; a ref asked for always re-adds it.
|
|
61
|
+
* @param {ModuleDefinition[]} chosen
|
|
62
|
+
* @param {StatusReport | null} installed
|
|
63
|
+
* @param {(record: string) => boolean} [heldByEveryAgent]
|
|
64
|
+
* @returns {InstallCall[]}
|
|
65
|
+
*/
|
|
66
|
+
export function moduleCalls(chosen, installed, heldByEveryAgent = () => true) {
|
|
67
|
+
const entries = new Map((installed?.modules ?? []).map((entry) => [entry.module, entry]))
|
|
68
|
+
return chosen
|
|
69
|
+
.filter((module) => {
|
|
70
|
+
const entry = entries.get(module.code)
|
|
71
|
+
return module.ref || !entry || entry.absent_skills.length > 0 || !heldByEveryAgent(module.record)
|
|
72
|
+
})
|
|
73
|
+
.map((module) => ({ source: module.source, skills: [ALL_SKILLS], label: module.name }))
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* The command that repeats this install without prompts.
|
|
78
|
+
* @param {ModuleDefinition[]} chosen
|
|
79
|
+
* @param {string[]} agents
|
|
80
|
+
* @returns {string}
|
|
81
|
+
*/
|
|
82
|
+
export function repeatCommand(chosen, agents) {
|
|
83
|
+
const picked = chosen.filter((module) => !module.always || module.ref)
|
|
84
|
+
const codes = (picked.length > 0 ? picked : chosen).map((module) => (module.ref ? `${module.code}#${module.ref}` : module.code))
|
|
85
|
+
return `npx bmad-method install -m ${shellWord(codes.join(','))} -t ${agents.join(',')} -y`
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Single-quotes a word for a POSIX shell when it holds anything but plain path characters.
|
|
90
|
+
* @param {string} word
|
|
91
|
+
* @returns {string}
|
|
92
|
+
*/
|
|
93
|
+
function shellWord(word) {
|
|
94
|
+
return /^[\w@%+=:,./#~-]+$/.test(word) ? word : `'${word.replaceAll("'", "'\\''")}'`
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* @param {StatusReport | null} report
|
|
99
|
+
* @returns {Record<string, string>}
|
|
100
|
+
*/
|
|
101
|
+
export function versionsByCode(report) {
|
|
102
|
+
/** @type {Record<string, string>} */
|
|
103
|
+
const versions = {}
|
|
104
|
+
for (const entry of report?.modules ?? []) versions[entry.module] = entry.version
|
|
105
|
+
return versions
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* @param {string} version
|
|
110
|
+
* @returns {string | null}
|
|
111
|
+
*/
|
|
112
|
+
export function versionMajor(version) {
|
|
113
|
+
const match = /^v?(\d+)(?=[.\-+]|$)/.exec(version.trim())
|
|
114
|
+
return match ? match[1] : null
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* The migrations for a major version a module crossed in this run. A module the run did not
|
|
119
|
+
* touch has the same version before and after, so it never matches.
|
|
120
|
+
* @param {Migration[]} migrations
|
|
121
|
+
* @param {{ before: Record<string, string>, after: Record<string, string> }} versions
|
|
122
|
+
* @returns {Migration[]}
|
|
123
|
+
*/
|
|
124
|
+
export function selectMigrations(migrations, versions) {
|
|
125
|
+
return migrations.filter((migration) => {
|
|
126
|
+
const from = versionMajor(versions.before[migration.module] ?? '')
|
|
127
|
+
const to = versionMajor(versions.after[migration.module] ?? '')
|
|
128
|
+
return from !== null && from === migration.from && to !== null && to === migration.to
|
|
129
|
+
})
|
|
130
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { mkdir, stat } from 'node:fs/promises'
|
|
2
|
+
import { resolve } from 'node:path'
|
|
3
|
+
import { message } from '../messages.js'
|
|
4
|
+
import { defaultCodes, parseModulesFlag } from '../modules.js'
|
|
5
|
+
import { Cancelled } from '../prompts.js'
|
|
6
|
+
import { distTag, newerVersion } from '../self-update.js'
|
|
7
|
+
|
|
8
|
+
/** @typedef {import('../cli.js').CliOptions} CliOptions */
|
|
9
|
+
/** @typedef {import('./deps.js').CommandDeps} CommandDeps */
|
|
10
|
+
/** @typedef {import('./existing-install.js').Existing} Existing */
|
|
11
|
+
|
|
12
|
+
/** @param {string} path */
|
|
13
|
+
async function isDirectory(path) {
|
|
14
|
+
try {
|
|
15
|
+
return (await stat(path)).isDirectory()
|
|
16
|
+
} catch {
|
|
17
|
+
return false
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @param {CommandDeps} deps
|
|
23
|
+
* @returns {Promise<void>}
|
|
24
|
+
*/
|
|
25
|
+
export async function announceUpdate(deps) {
|
|
26
|
+
const latest = await newerVersion({ runner: deps.runner, version: deps.version })
|
|
27
|
+
if (!latest) return
|
|
28
|
+
deps.prompts.showNote(
|
|
29
|
+
message(deps.messages, 'updateAvailable', { current: deps.version, latest, tag: distTag(deps.version) }),
|
|
30
|
+
)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @param {CliOptions} options
|
|
35
|
+
* @param {CommandDeps} deps
|
|
36
|
+
* @param {boolean} interactive
|
|
37
|
+
* @returns {Promise<string>}
|
|
38
|
+
*/
|
|
39
|
+
export async function resolveDirectory(options, deps, interactive) {
|
|
40
|
+
const { cwd, messages, prompts } = deps
|
|
41
|
+
const asked = options.directory ?? (interactive ? await prompts.askDirectory(messages, cwd) : cwd)
|
|
42
|
+
const directory = resolve(cwd, asked)
|
|
43
|
+
const exists = await isDirectory(directory)
|
|
44
|
+
|
|
45
|
+
const question = exists ? 'directoryConfirm' : 'directoryCreateConfirm'
|
|
46
|
+
if (interactive && !(await prompts.confirm(message(messages, question, { directory })))) throw new Cancelled()
|
|
47
|
+
if (!exists) await mkdir(directory, { recursive: true })
|
|
48
|
+
return directory
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* `--modules` wins, then `--yes` takes the defaults, then the picker asks.
|
|
53
|
+
* @param {CliOptions} options
|
|
54
|
+
* @param {CommandDeps} deps
|
|
55
|
+
* @param {Existing} existing
|
|
56
|
+
* @returns {Promise<string[]>}
|
|
57
|
+
*/
|
|
58
|
+
export async function pickModuleCodes(options, deps, existing) {
|
|
59
|
+
const { messages, modules, prompts } = deps
|
|
60
|
+
if (options.modules) return parseModulesFlag(options.modules, modules)
|
|
61
|
+
if (options.yes) return defaultCodes(modules)
|
|
62
|
+
return prompts.chooseModules(messages, modules, {
|
|
63
|
+
installedCodes: existing.codes,
|
|
64
|
+
installedVersions: existing.versions,
|
|
65
|
+
})
|
|
66
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { detectContext, everyAgentHolds } from '../agents.js'
|
|
2
|
+
import { SETUP_NEXT } from '../bmad-scripts.js'
|
|
3
|
+
import { installedModuleCodes } from '../installed.js'
|
|
4
|
+
import { message } from '../messages.js'
|
|
5
|
+
import { nodeFailureHint, runPreflight, uvInstallCommand } from '../preflight.js'
|
|
6
|
+
import { Cancelled } from '../prompts.js'
|
|
7
|
+
import { renderFailures } from '../report.js'
|
|
8
|
+
import { agentsToInstall } from './agent-choice.js'
|
|
9
|
+
import { applyCalls } from './apply.js'
|
|
10
|
+
import { endRun } from './ending.js'
|
|
11
|
+
import { readExisting } from './existing-install.js'
|
|
12
|
+
import { chosenModules, moduleCalls, repeatCommand, requiredCodes } from './install-plan.js'
|
|
13
|
+
import { announceUpdate, pickModuleCodes, resolveDirectory } from './install-steps.js'
|
|
14
|
+
import { update } from './update.js'
|
|
15
|
+
|
|
16
|
+
/** @typedef {import('../cli.js').CliOptions} CliOptions */
|
|
17
|
+
/** @typedef {import('./deps.js').CommandDeps} CommandDeps */
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @param {CliOptions} options
|
|
21
|
+
* @param {CommandDeps} deps
|
|
22
|
+
* @returns {Promise<number>}
|
|
23
|
+
*/
|
|
24
|
+
export async function install(options, deps) {
|
|
25
|
+
const { messages, modules, prompts, runner } = deps
|
|
26
|
+
const interactive = !options.yes
|
|
27
|
+
|
|
28
|
+
prompts.showIntro(messages)
|
|
29
|
+
await announceUpdate(deps)
|
|
30
|
+
const { uv } = await runPreflight({ interactive, runner, messages, terminal: deps.terminal, agent: deps.agent })
|
|
31
|
+
const hasUv = uv !== null
|
|
32
|
+
if (!hasUv) prompts.warn(message(messages, 'uvMissing', { installCommand: uvInstallCommand(messages) }))
|
|
33
|
+
|
|
34
|
+
const directory = await resolveDirectory(options, deps, interactive)
|
|
35
|
+
const existing = await readExisting(directory, deps, { hasUv })
|
|
36
|
+
if (existing.state.legacyManifest && existing.codes.length === 0 && interactive) {
|
|
37
|
+
if (!(await prompts.confirm(message(messages, 'legacyUpgradeConfirm'), false))) throw new Cancelled()
|
|
38
|
+
}
|
|
39
|
+
if (existing.codes.length > 0 && interactive && (await prompts.chooseExistingAction(messages)) === 'update') {
|
|
40
|
+
return update({ ...options, directory }, deps, { checked: true, hasUv })
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const picked = await pickModuleCodes(options, deps, existing)
|
|
44
|
+
const chosen = chosenModules(picked, modules)
|
|
45
|
+
const pulledIn = requiredCodes(picked, modules).filter((code) => !existing.codes.includes(code))
|
|
46
|
+
if (pulledIn.length > 0) {
|
|
47
|
+
const names = pulledIn.map((code) => modules.find((module) => module.code === code)?.name ?? code)
|
|
48
|
+
prompts.say(message(messages, 'modulesRequired', { modules: names.join(', ') }))
|
|
49
|
+
}
|
|
50
|
+
for (const module of chosen) {
|
|
51
|
+
if (module.deprecated) {
|
|
52
|
+
prompts.warn(message(messages, 'deprecatedModule', { module: module.name, reason: module.deprecated }))
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
const kept = modules.filter((module) => !module.always && existing.codes.includes(module.code) && !chosen.some((picked) => picked.code === module.code))
|
|
56
|
+
if (kept.length > 0) {
|
|
57
|
+
prompts.warn(message(messages, 'modulesKept', { modules: kept.map((module) => module.name).join(', ') }))
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const agents = await agentsToInstall(options, deps, directory, interactive)
|
|
61
|
+
const { failures, bmadSkillDir, report, skills } = await applyCalls(deps, {
|
|
62
|
+
directory,
|
|
63
|
+
agents,
|
|
64
|
+
spinner: 'installingSpinner',
|
|
65
|
+
hasUv,
|
|
66
|
+
plan: () => {
|
|
67
|
+
const context = (deps.detect ?? detectContext)(directory)
|
|
68
|
+
return moduleCalls(chosen, existing.report, (record) => everyAgentHolds(deps.agents, agents, record, context))
|
|
69
|
+
},
|
|
70
|
+
})
|
|
71
|
+
if (!bmadSkillDir || (hasUv && !report)) {
|
|
72
|
+
prompts.fail(failures.length > 0
|
|
73
|
+
? [renderFailures(failures, messages), nodeFailureHint(messages, deps.node)].filter(Boolean).join('\n')
|
|
74
|
+
: message(messages, 'firstInstallNotInProject', { directory }))
|
|
75
|
+
return 1
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const fallbackModules = report
|
|
79
|
+
? undefined
|
|
80
|
+
: [...new Set([
|
|
81
|
+
...installedModuleCodes({ skills, bmadSkillDir, legacyManifest: false }, modules),
|
|
82
|
+
...chosen.filter((module) => module.custom).map((module) => module.code),
|
|
83
|
+
])]
|
|
84
|
+
await endRun(deps, { report, bmadSkillDir, before: existing.versions, failures, directory, agents, repeat: repeatCommand(chosen, agents), fallbackModules })
|
|
85
|
+
return failures.length === 0 && (!report || report.current || report.next === SETUP_NEXT) ? 0 : 1
|
|
86
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { resolve } from 'node:path'
|
|
2
|
+
import { inspectInstall, installedModuleCodes } from '../installed.js'
|
|
3
|
+
import { message } from '../messages.js'
|
|
4
|
+
import { findModule } from '../modules.js'
|
|
5
|
+
import { uvInstallCommand, uvVersion } from '../preflight.js'
|
|
6
|
+
import { renderStatus } from '../report.js'
|
|
7
|
+
import { statusWithSpinner } from './existing-install.js'
|
|
8
|
+
|
|
9
|
+
/** @typedef {import('../cli.js').CliOptions} CliOptions */
|
|
10
|
+
/** @typedef {import('./deps.js').CommandDeps} CommandDeps */
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @param {CliOptions} options
|
|
14
|
+
* @param {CommandDeps} deps
|
|
15
|
+
* @returns {Promise<number>}
|
|
16
|
+
*/
|
|
17
|
+
export async function status(options, deps) {
|
|
18
|
+
const { messages, modules, prompts, skillsCli, cwd } = deps
|
|
19
|
+
const directory = resolve(cwd, options.directory ?? cwd)
|
|
20
|
+
const state = await inspectInstall(directory, skillsCli)
|
|
21
|
+
if (!state.bmadSkillDir) {
|
|
22
|
+
prompts.fail(message(messages, state.legacyManifest ? 'legacyNoV7' : 'nothingInstalled'))
|
|
23
|
+
return 1
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (await uvVersion(deps.runner) === null) {
|
|
27
|
+
prompts.warn(message(messages, 'uvMissing', { installCommand: uvInstallCommand(messages) }))
|
|
28
|
+
const names = installedModuleCodes(state, modules).map((code) => findModule(modules, code)?.name ?? code)
|
|
29
|
+
prompts.showNote(message(messages, 'statusNoUv', {
|
|
30
|
+
modules: names.length > 0 ? names.join(', ') : 'BMad',
|
|
31
|
+
count: state.skills.length,
|
|
32
|
+
}))
|
|
33
|
+
return 1
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const report = await statusWithSpinner(deps, state.bmadSkillDir, directory)
|
|
37
|
+
prompts.showNote(renderStatus(report, { failures: [], messages, modules }))
|
|
38
|
+
return report.current ? 0 : 1
|
|
39
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { resolve } from 'node:path'
|
|
2
|
+
import { inspectInstall, installedModuleCodes } from '../installed.js'
|
|
3
|
+
import { message } from '../messages.js'
|
|
4
|
+
import { findModule, sourceAtRef } from '../modules.js'
|
|
5
|
+
import { runPreflight, uvInstallCommand } from '../preflight.js'
|
|
6
|
+
import { lockedRef, moduleSourceFromLock, readProjectLock } from '../project-lock.js'
|
|
7
|
+
import { agentsToUpdate } from './agent-choice.js'
|
|
8
|
+
import { applyCalls } from './apply.js'
|
|
9
|
+
import { endRun } from './ending.js'
|
|
10
|
+
import { versionsByCode } from './install-plan.js'
|
|
11
|
+
|
|
12
|
+
/** @typedef {import('../bmad-scripts.js').StatusReport} StatusReport */
|
|
13
|
+
/** @typedef {import('../cli.js').CliOptions} CliOptions */
|
|
14
|
+
/** @typedef {import('./deps.js').CommandDeps} CommandDeps */
|
|
15
|
+
/** @typedef {import('./install-plan.js').InstallCall} InstallCall */
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* One call per installed module: a module in modules.yaml from its folder with `-s '*'`, on the
|
|
19
|
+
* branch or tag the project lock recorded for its record; any other from the source and ref the
|
|
20
|
+
* lock recorded, with its own skills named. `unplaced` names the modules with no source to
|
|
21
|
+
* re-add from.
|
|
22
|
+
* @param {CommandDeps} deps
|
|
23
|
+
* @param {string} directory
|
|
24
|
+
* @param {string[]} codes
|
|
25
|
+
* @param {StatusReport | null} installed
|
|
26
|
+
* @returns {Promise<{ calls: InstallCall[], unplaced: string[] }>}
|
|
27
|
+
*/
|
|
28
|
+
async function updateCalls(deps, directory, codes, installed) {
|
|
29
|
+
const { modules } = deps
|
|
30
|
+
const listed = modules.filter((module) => module.always || codes.some((code) => findModule(modules, code) === module))
|
|
31
|
+
const lock = await readProjectLock(directory)
|
|
32
|
+
/** @type {InstallCall[]} */
|
|
33
|
+
const calls = listed.map((module) => {
|
|
34
|
+
const ref = lockedRef(lock[module.record], module.source)
|
|
35
|
+
return { source: ref ? sourceAtRef(module.source, ref) : module.source, skills: ['*'], label: module.name }
|
|
36
|
+
})
|
|
37
|
+
/** @type {string[]} */
|
|
38
|
+
const unplaced = []
|
|
39
|
+
for (const entry of installed?.modules ?? []) {
|
|
40
|
+
if (findModule(modules, entry.module)) continue
|
|
41
|
+
const source = moduleSourceFromLock(lock[entry.folder], directory)
|
|
42
|
+
if (!source) unplaced.push(entry.module)
|
|
43
|
+
else calls.push({ source, skills: [...new Set([entry.folder, ...entry.skills, ...entry.absent_skills])], label: entry.module })
|
|
44
|
+
}
|
|
45
|
+
return { calls, unplaced }
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Re-adds every installed module, one `skills add` each, to the agents already holding BMad here.
|
|
50
|
+
* `npx skills update` re-adds one skill at a time, a fresh clone each, and picks agents from the
|
|
51
|
+
* folders in the project.
|
|
52
|
+
* `checked` is set when install already ran the preflight checks and hands over to update.
|
|
53
|
+
* @param {CliOptions} options
|
|
54
|
+
* @param {CommandDeps} deps
|
|
55
|
+
* @param {{ checked?: boolean, hasUv?: boolean }} [context]
|
|
56
|
+
* @returns {Promise<number>}
|
|
57
|
+
*/
|
|
58
|
+
export async function update(options, deps, context = {}) {
|
|
59
|
+
const { bmadScripts, messages, modules, prompts, runner, skillsCli, cwd } = deps
|
|
60
|
+
const hasUv = context.checked
|
|
61
|
+
? (context.hasUv ?? true)
|
|
62
|
+
: (await runPreflight({ interactive: false, runner, messages })).uv !== null
|
|
63
|
+
if (!context.checked && !hasUv) {
|
|
64
|
+
prompts.warn(message(messages, 'uvMissing', { installCommand: uvInstallCommand(messages) }))
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const directory = resolve(cwd, options.directory ?? cwd)
|
|
68
|
+
const before = await inspectInstall(directory, skillsCli)
|
|
69
|
+
const installedSkillDir = before.bmadSkillDir
|
|
70
|
+
if (!installedSkillDir) {
|
|
71
|
+
prompts.fail(message(messages, before.legacyManifest ? 'legacyNoV7' : 'nothingToUpdate'))
|
|
72
|
+
return 1
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** @type {StatusReport | null} */
|
|
76
|
+
let wasInstalled = null
|
|
77
|
+
/** @type {string[]} */
|
|
78
|
+
let unplaced = []
|
|
79
|
+
const { failures, bmadSkillDir, report, skills } = await applyCalls(deps, {
|
|
80
|
+
directory,
|
|
81
|
+
agents: agentsToUpdate(deps, directory),
|
|
82
|
+
spinner: 'updatingSpinner',
|
|
83
|
+
bmadSkillDir: installedSkillDir,
|
|
84
|
+
hasUv,
|
|
85
|
+
plan: async () => {
|
|
86
|
+
wasInstalled = hasUv ? await bmadScripts.status(installedSkillDir, directory).catch(() => null) : null
|
|
87
|
+
const codes = wasInstalled ? wasInstalled.modules.map((entry) => entry.module) : installedModuleCodes(before, modules)
|
|
88
|
+
const planned = await updateCalls(deps, directory, codes, wasInstalled)
|
|
89
|
+
unplaced = planned.unplaced
|
|
90
|
+
return planned.calls
|
|
91
|
+
},
|
|
92
|
+
})
|
|
93
|
+
if (!bmadSkillDir || (hasUv && !report)) {
|
|
94
|
+
prompts.fail(message(messages, 'nothingToUpdate'))
|
|
95
|
+
return 1
|
|
96
|
+
}
|
|
97
|
+
if (unplaced.length > 0) prompts.say(message(messages, 'updateNotListed', { modules: unplaced.join(', ') }))
|
|
98
|
+
// Without the first status there is no telling which modules beyond modules.yaml were installed.
|
|
99
|
+
if (hasUv && !wasInstalled) prompts.warn(message(messages, 'updateUnreadInstall'))
|
|
100
|
+
|
|
101
|
+
const fallbackModules = report
|
|
102
|
+
? undefined
|
|
103
|
+
: installedModuleCodes({ skills, bmadSkillDir, legacyManifest: false }, modules)
|
|
104
|
+
await endRun(deps, { report, bmadSkillDir, before: versionsByCode(wasInstalled), failures, directory, updated: true, fallbackModules })
|
|
105
|
+
return failures.length === 0 && (!hasUv || Boolean(wasInstalled)) ? 0 : 1
|
|
106
|
+
}
|
package/src/installed.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { access } from 'node:fs/promises'
|
|
2
|
+
import { join } from 'node:path'
|
|
3
|
+
import { isInstalledListedSkill } from './skills-cli.js'
|
|
4
|
+
|
|
5
|
+
/** @typedef {import('./skills-cli.js').ListedSkill} ListedSkill */
|
|
6
|
+
/** @typedef {import('./modules.js').ModuleDefinition} ModuleDefinition */
|
|
7
|
+
/** @typedef {{ skills: ListedSkill[], bmadSkillDir: string | null, legacyManifest: boolean }} InstalledState */
|
|
8
|
+
|
|
9
|
+
export const BMAD_SKILL = 'bmad'
|
|
10
|
+
|
|
11
|
+
const LEGACY_MANIFEST = ['_bmad', '_config', 'manifest.yaml']
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @param {string} dir
|
|
15
|
+
* @param {{ list(options: { cwd: string }): Promise<ListedSkill[]> }} skillsCli
|
|
16
|
+
* @returns {Promise<InstalledState>}
|
|
17
|
+
*/
|
|
18
|
+
export async function inspectInstall(dir, skillsCli) {
|
|
19
|
+
const skills = (await skillsCli.list({ cwd: dir })).filter(isInstalledListedSkill)
|
|
20
|
+
const bmad = skills.find((skill) => skill.name === BMAD_SKILL)
|
|
21
|
+
return {
|
|
22
|
+
skills,
|
|
23
|
+
bmadSkillDir: bmad ? bmad.path : null,
|
|
24
|
+
legacyManifest: await exists(join(dir, ...LEGACY_MANIFEST)),
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The modules whose record skill is installed. A record is a `bmod-*` skill or, for a
|
|
30
|
+
* module of one skill, that skill itself, so only modules.yaml can name it.
|
|
31
|
+
* @param {InstalledState} state
|
|
32
|
+
* @param {ModuleDefinition[]} modules
|
|
33
|
+
* @returns {string[]}
|
|
34
|
+
*/
|
|
35
|
+
export function installedModuleCodes(state, modules) {
|
|
36
|
+
const installed = new Set(state.skills.filter(isInstalledListedSkill).map((skill) => skill.name))
|
|
37
|
+
return modules.filter((module) => installed.has(module.record)).map((module) => module.code)
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** @param {string} path */
|
|
41
|
+
async function exists(path) {
|
|
42
|
+
try {
|
|
43
|
+
await access(path)
|
|
44
|
+
return true
|
|
45
|
+
} catch {
|
|
46
|
+
return false
|
|
47
|
+
}
|
|
48
|
+
}
|