bmad-method 6.12.4 → 7.1.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 +267 -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 +66 -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 +128 -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
|
@@ -1,439 +0,0 @@
|
|
|
1
|
-
const path = require('node:path');
|
|
2
|
-
const https = require('node:https');
|
|
3
|
-
const { execFile } = require('node:child_process');
|
|
4
|
-
const { promisify } = require('node:util');
|
|
5
|
-
const fs = require('../fs-native');
|
|
6
|
-
const crypto = require('node:crypto');
|
|
7
|
-
const { resolveModuleVersion } = require('../modules/version-resolver');
|
|
8
|
-
const prompts = require('../prompts');
|
|
9
|
-
|
|
10
|
-
const execFileAsync = promisify(execFile);
|
|
11
|
-
const NPM_LOOKUP_TIMEOUT_MS = 10_000;
|
|
12
|
-
const NPM_PACKAGE_NAME_PATTERN = /^(?:@[a-z0-9][a-z0-9._~-]*\/)?[a-z0-9][a-z0-9._~-]*$/;
|
|
13
|
-
|
|
14
|
-
function isValidNpmPackageName(packageName) {
|
|
15
|
-
return typeof packageName === 'string' && NPM_PACKAGE_NAME_PATTERN.test(packageName);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
class Manifest {
|
|
19
|
-
/**
|
|
20
|
-
* Create a new manifest
|
|
21
|
-
* @param {string} bmadDir - Path to bmad directory
|
|
22
|
-
* @param {Object} data - Manifest data
|
|
23
|
-
* @param {Array} installedFiles - List of installed files (no longer used, files tracked in files-manifest.csv)
|
|
24
|
-
*/
|
|
25
|
-
async create(bmadDir, data, installedFiles = []) {
|
|
26
|
-
const manifestPath = path.join(bmadDir, '_config', 'manifest.yaml');
|
|
27
|
-
const yaml = require('yaml');
|
|
28
|
-
|
|
29
|
-
// Ensure _config directory exists
|
|
30
|
-
await fs.ensureDir(path.dirname(manifestPath));
|
|
31
|
-
|
|
32
|
-
// Get the BMad version from package.json
|
|
33
|
-
const bmadVersion = data.version || require(path.join(process.cwd(), 'package.json')).version;
|
|
34
|
-
|
|
35
|
-
// Convert module list to new detailed format
|
|
36
|
-
const moduleDetails = [];
|
|
37
|
-
if (data.modules && Array.isArray(data.modules)) {
|
|
38
|
-
for (const moduleName of data.modules) {
|
|
39
|
-
// Core and BMM modules use the BMad version
|
|
40
|
-
const moduleVersion = moduleName === 'core' || moduleName === 'bmm' ? bmadVersion : null;
|
|
41
|
-
const now = data.installDate || new Date().toISOString();
|
|
42
|
-
|
|
43
|
-
moduleDetails.push({
|
|
44
|
-
name: moduleName,
|
|
45
|
-
version: moduleVersion,
|
|
46
|
-
installDate: now,
|
|
47
|
-
lastUpdated: now,
|
|
48
|
-
source: moduleName === 'core' || moduleName === 'bmm' ? 'built-in' : 'unknown',
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// Structure the manifest data
|
|
54
|
-
const manifestData = {
|
|
55
|
-
installation: {
|
|
56
|
-
version: bmadVersion,
|
|
57
|
-
installDate: data.installDate || new Date().toISOString(),
|
|
58
|
-
lastUpdated: data.lastUpdated || new Date().toISOString(),
|
|
59
|
-
},
|
|
60
|
-
modules: moduleDetails,
|
|
61
|
-
ides: data.ides || [],
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
if (typeof data.installShims === 'boolean') {
|
|
65
|
-
manifestData.installation.installShims = data.installShims;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Write YAML manifest
|
|
69
|
-
// Clean the manifest data to remove any non-serializable values
|
|
70
|
-
const cleanManifestData = structuredClone(manifestData);
|
|
71
|
-
|
|
72
|
-
const yamlContent = yaml.stringify(cleanManifestData, {
|
|
73
|
-
indent: 2,
|
|
74
|
-
lineWidth: 0,
|
|
75
|
-
sortKeys: false,
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
// Ensure POSIX-compliant final newline
|
|
79
|
-
const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n';
|
|
80
|
-
await fs.writeFile(manifestPath, content, 'utf8');
|
|
81
|
-
return { success: true, path: manifestPath, filesTracked: 0 };
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Read existing manifest
|
|
86
|
-
* @param {string} bmadDir - Path to bmad directory
|
|
87
|
-
* @returns {Object|null} Manifest data or null if not found
|
|
88
|
-
*/
|
|
89
|
-
async read(bmadDir) {
|
|
90
|
-
const yamlPath = path.join(bmadDir, '_config', 'manifest.yaml');
|
|
91
|
-
const yaml = require('yaml');
|
|
92
|
-
|
|
93
|
-
if (await fs.pathExists(yamlPath)) {
|
|
94
|
-
try {
|
|
95
|
-
const content = await fs.readFile(yamlPath, 'utf8');
|
|
96
|
-
const manifestData = yaml.parse(content);
|
|
97
|
-
|
|
98
|
-
// Handle new detailed module format
|
|
99
|
-
const modules = manifestData.modules || [];
|
|
100
|
-
|
|
101
|
-
// For backward compatibility: if modules is an array of strings (old format),
|
|
102
|
-
// the calling code may need the array of names
|
|
103
|
-
const moduleNames = modules.map((m) => (typeof m === 'string' ? m : m.name));
|
|
104
|
-
|
|
105
|
-
// Check if we have the new detailed format
|
|
106
|
-
const hasDetailedModules = modules.length > 0 && typeof modules[0] === 'object';
|
|
107
|
-
|
|
108
|
-
// Flatten the structure for compatibility with existing code
|
|
109
|
-
return {
|
|
110
|
-
version: manifestData.installation?.version,
|
|
111
|
-
installDate: manifestData.installation?.installDate,
|
|
112
|
-
lastUpdated: manifestData.installation?.lastUpdated,
|
|
113
|
-
installShims: manifestData.installation?.installShims,
|
|
114
|
-
modules: moduleNames, // Simple array of module names for backward compatibility
|
|
115
|
-
modulesDetailed: hasDetailedModules ? modules : null, // New detailed format
|
|
116
|
-
ides: manifestData.ides || [],
|
|
117
|
-
};
|
|
118
|
-
} catch (error) {
|
|
119
|
-
await prompts.log.error(`Failed to read YAML manifest: ${error.message}`);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
/**
|
|
127
|
-
* Read raw manifest data without flattening
|
|
128
|
-
* @param {string} bmadDir - Path to bmad directory
|
|
129
|
-
* @returns {Object|null} Raw manifest data or null if not found
|
|
130
|
-
*/
|
|
131
|
-
async _readRaw(bmadDir) {
|
|
132
|
-
const yamlPath = path.join(bmadDir, '_config', 'manifest.yaml');
|
|
133
|
-
const yaml = require('yaml');
|
|
134
|
-
|
|
135
|
-
if (await fs.pathExists(yamlPath)) {
|
|
136
|
-
try {
|
|
137
|
-
const content = await fs.readFile(yamlPath, 'utf8');
|
|
138
|
-
return yaml.parse(content);
|
|
139
|
-
} catch (error) {
|
|
140
|
-
await prompts.log.error(`Failed to read YAML manifest: ${error.message}`);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
return null;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Flatten manifest for backward compatibility
|
|
149
|
-
* @param {Object} manifest - Raw manifest data
|
|
150
|
-
* @returns {Object} Flattened manifest
|
|
151
|
-
*/
|
|
152
|
-
_flattenManifest(manifest) {
|
|
153
|
-
const modules = manifest.modules || [];
|
|
154
|
-
const moduleNames = modules.map((m) => (typeof m === 'string' ? m : m.name));
|
|
155
|
-
const hasDetailedModules = modules.length > 0 && typeof modules[0] === 'object';
|
|
156
|
-
|
|
157
|
-
return {
|
|
158
|
-
version: manifest.installation?.version,
|
|
159
|
-
installDate: manifest.installation?.installDate,
|
|
160
|
-
lastUpdated: manifest.installation?.lastUpdated,
|
|
161
|
-
installShims: manifest.installation?.installShims,
|
|
162
|
-
modules: moduleNames,
|
|
163
|
-
modulesDetailed: hasDetailedModules ? modules : null,
|
|
164
|
-
ides: manifest.ides || [],
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
/**
|
|
169
|
-
* Add a module to the manifest with optional version info
|
|
170
|
-
* If module already exists, update its version info
|
|
171
|
-
* @param {string} bmadDir - Path to bmad directory
|
|
172
|
-
* @param {string} moduleName - Module name to add
|
|
173
|
-
* @param {Object} options - Optional version info
|
|
174
|
-
*/
|
|
175
|
-
async addModule(bmadDir, moduleName, options = {}) {
|
|
176
|
-
let manifest = await this._readRaw(bmadDir);
|
|
177
|
-
if (!manifest) {
|
|
178
|
-
// Bootstrap a minimal manifest if it doesn't exist yet
|
|
179
|
-
// (e.g., skill-only modules with no agents to compile)
|
|
180
|
-
manifest = { modules: [] };
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
if (!manifest.modules) {
|
|
184
|
-
manifest.modules = [];
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
const existingIndex = manifest.modules.findIndex((m) => m.name === moduleName);
|
|
188
|
-
|
|
189
|
-
if (existingIndex === -1) {
|
|
190
|
-
// Module doesn't exist, add it
|
|
191
|
-
const entry = {
|
|
192
|
-
name: moduleName,
|
|
193
|
-
version: options.version || null,
|
|
194
|
-
installDate: new Date().toISOString(),
|
|
195
|
-
lastUpdated: new Date().toISOString(),
|
|
196
|
-
source: options.source || 'unknown',
|
|
197
|
-
npmPackage: options.npmPackage || null,
|
|
198
|
-
repoUrl: options.repoUrl || null,
|
|
199
|
-
};
|
|
200
|
-
if (options.channel) entry.channel = options.channel;
|
|
201
|
-
if (options.sha) entry.sha = options.sha;
|
|
202
|
-
if (options.localPath) entry.localPath = options.localPath;
|
|
203
|
-
if (options.rawSource) entry.rawSource = options.rawSource;
|
|
204
|
-
if (options.registryApprovedTag) entry.registryApprovedTag = options.registryApprovedTag;
|
|
205
|
-
if (options.registryApprovedSha) entry.registryApprovedSha = options.registryApprovedSha;
|
|
206
|
-
manifest.modules.push(entry);
|
|
207
|
-
} else {
|
|
208
|
-
// Module exists, update its version info
|
|
209
|
-
const existing = manifest.modules[existingIndex];
|
|
210
|
-
manifest.modules[existingIndex] = {
|
|
211
|
-
...existing,
|
|
212
|
-
version: options.version === undefined ? existing.version : options.version,
|
|
213
|
-
source: options.source || existing.source,
|
|
214
|
-
npmPackage: options.npmPackage === undefined ? existing.npmPackage : options.npmPackage,
|
|
215
|
-
repoUrl: options.repoUrl === undefined ? existing.repoUrl : options.repoUrl,
|
|
216
|
-
localPath: options.localPath === undefined ? existing.localPath : options.localPath,
|
|
217
|
-
channel: options.channel === undefined ? existing.channel : options.channel,
|
|
218
|
-
sha: options.sha === undefined ? existing.sha : options.sha,
|
|
219
|
-
rawSource: options.rawSource === undefined ? existing.rawSource : options.rawSource,
|
|
220
|
-
registryApprovedTag: options.registryApprovedTag === undefined ? existing.registryApprovedTag : options.registryApprovedTag,
|
|
221
|
-
registryApprovedSha: options.registryApprovedSha === undefined ? existing.registryApprovedSha : options.registryApprovedSha,
|
|
222
|
-
lastUpdated: new Date().toISOString(),
|
|
223
|
-
};
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
await this._writeRaw(bmadDir, manifest);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
/**
|
|
230
|
-
* Get all modules with their version info
|
|
231
|
-
* @param {string} bmadDir - Path to bmad directory
|
|
232
|
-
* @returns {Array} Array of module info objects
|
|
233
|
-
*/
|
|
234
|
-
async getAllModuleVersions(bmadDir) {
|
|
235
|
-
const manifest = await this._readRaw(bmadDir);
|
|
236
|
-
if (!manifest || !manifest.modules) {
|
|
237
|
-
return [];
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
return manifest.modules;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Write raw manifest data to file
|
|
245
|
-
* @param {string} bmadDir - Path to bmad directory
|
|
246
|
-
* @param {Object} manifestData - Raw manifest data to write
|
|
247
|
-
*/
|
|
248
|
-
async _writeRaw(bmadDir, manifestData) {
|
|
249
|
-
const yaml = require('yaml');
|
|
250
|
-
const manifestPath = path.join(bmadDir, '_config', 'manifest.yaml');
|
|
251
|
-
|
|
252
|
-
await fs.ensureDir(path.dirname(manifestPath));
|
|
253
|
-
|
|
254
|
-
const cleanManifestData = structuredClone(manifestData);
|
|
255
|
-
|
|
256
|
-
const yamlContent = yaml.stringify(cleanManifestData, {
|
|
257
|
-
indent: 2,
|
|
258
|
-
lineWidth: 0,
|
|
259
|
-
sortKeys: false,
|
|
260
|
-
});
|
|
261
|
-
|
|
262
|
-
const content = yamlContent.endsWith('\n') ? yamlContent : yamlContent + '\n';
|
|
263
|
-
await fs.writeFile(manifestPath, content, 'utf8');
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* Calculate SHA256 hash of a file
|
|
268
|
-
* @param {string} filePath - Path to file
|
|
269
|
-
* @returns {string} SHA256 hash
|
|
270
|
-
*/
|
|
271
|
-
async calculateFileHash(filePath) {
|
|
272
|
-
try {
|
|
273
|
-
const content = await fs.readFile(filePath);
|
|
274
|
-
return crypto.createHash('sha256').update(content).digest('hex');
|
|
275
|
-
} catch {
|
|
276
|
-
return null;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
* Get module version info from source
|
|
282
|
-
* @param {string} moduleName - Module name/code
|
|
283
|
-
* @param {string} bmadDir - Path to bmad directory
|
|
284
|
-
* @param {string} moduleSourcePath - Optional source path for custom modules
|
|
285
|
-
* @returns {Object} Version info object with version, source, npmPackage, repoUrl
|
|
286
|
-
*/
|
|
287
|
-
async getModuleVersionInfo(moduleName, bmadDir, moduleSourcePath = null) {
|
|
288
|
-
// Resolve source type first, then read version with the correct path context
|
|
289
|
-
if (['core', 'bmm'].includes(moduleName)) {
|
|
290
|
-
const versionInfo = await resolveModuleVersion(moduleName, { moduleSourcePath });
|
|
291
|
-
return {
|
|
292
|
-
version: versionInfo.version,
|
|
293
|
-
source: 'built-in',
|
|
294
|
-
npmPackage: null,
|
|
295
|
-
repoUrl: null,
|
|
296
|
-
};
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
// Check if this is an external official module
|
|
300
|
-
const { ExternalModuleManager } = require('../modules/external-manager');
|
|
301
|
-
const extMgr = new ExternalModuleManager();
|
|
302
|
-
const moduleInfo = await extMgr.getModuleByCode(moduleName);
|
|
303
|
-
|
|
304
|
-
if (moduleInfo) {
|
|
305
|
-
const externalResolution = extMgr.getResolution(moduleName);
|
|
306
|
-
const versionInfo = await resolveModuleVersion(moduleName, { moduleSourcePath });
|
|
307
|
-
return {
|
|
308
|
-
// Git tag recorded during install trumps the on-disk package.json
|
|
309
|
-
// version, so the manifest carries "v1.7.0" instead of "1.7.0".
|
|
310
|
-
version: externalResolution?.version || versionInfo.version,
|
|
311
|
-
source: 'external',
|
|
312
|
-
npmPackage: moduleInfo.npmPackage || null,
|
|
313
|
-
repoUrl: moduleInfo.url || null,
|
|
314
|
-
channel: externalResolution?.channel || null,
|
|
315
|
-
sha: externalResolution?.sha || null,
|
|
316
|
-
};
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
// Check if this is a custom module (from user-provided URL or local path)
|
|
320
|
-
const { CustomModuleManager } = require('../modules/custom-module-manager');
|
|
321
|
-
const customMgr = new CustomModuleManager();
|
|
322
|
-
const resolved = customMgr.getResolution(moduleName);
|
|
323
|
-
const customSource = await customMgr.findModuleSourceByCode(moduleName, { bmadDir });
|
|
324
|
-
if (customSource || resolved) {
|
|
325
|
-
const versionInfo = await resolveModuleVersion(moduleName, {
|
|
326
|
-
moduleSourcePath: moduleSourcePath || customSource,
|
|
327
|
-
fallbackVersion: resolved?.version,
|
|
328
|
-
marketplacePluginNames: resolved?.pluginName ? [resolved.pluginName] : [],
|
|
329
|
-
});
|
|
330
|
-
const hasGitClone = !!resolved?.repoUrl;
|
|
331
|
-
return {
|
|
332
|
-
// Prefer the git ref we actually cloned over the package.json version.
|
|
333
|
-
version: resolved?.cloneRef || (hasGitClone ? 'main' : versionInfo.version),
|
|
334
|
-
source: 'custom',
|
|
335
|
-
npmPackage: null,
|
|
336
|
-
repoUrl: resolved?.repoUrl || null,
|
|
337
|
-
localPath: resolved?.localPath || null,
|
|
338
|
-
channel: hasGitClone ? (resolved?.cloneRef ? 'pinned' : 'next') : null,
|
|
339
|
-
sha: resolved?.cloneSha || null,
|
|
340
|
-
rawSource: resolved?.rawInput || null,
|
|
341
|
-
};
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
// Unknown module
|
|
345
|
-
const versionInfo = await resolveModuleVersion(moduleName, { moduleSourcePath });
|
|
346
|
-
return {
|
|
347
|
-
version: versionInfo.version,
|
|
348
|
-
source: 'unknown',
|
|
349
|
-
npmPackage: null,
|
|
350
|
-
repoUrl: null,
|
|
351
|
-
};
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* Fetch latest version from npm for a package
|
|
356
|
-
* @param {string} packageName - npm package name
|
|
357
|
-
* @returns {string|null} Latest version or null
|
|
358
|
-
*/
|
|
359
|
-
async fetchNpmVersion(packageName) {
|
|
360
|
-
if (!isValidNpmPackageName(packageName)) {
|
|
361
|
-
return null;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
try {
|
|
365
|
-
// Try using npm view first (more reliable)
|
|
366
|
-
try {
|
|
367
|
-
const { stdout } = await execFileAsync('npm', ['view', packageName, 'version'], {
|
|
368
|
-
encoding: 'utf8',
|
|
369
|
-
timeout: NPM_LOOKUP_TIMEOUT_MS,
|
|
370
|
-
});
|
|
371
|
-
return stdout.trim();
|
|
372
|
-
} catch {
|
|
373
|
-
// Fallback to npm registry API
|
|
374
|
-
return new Promise((resolve) => {
|
|
375
|
-
const request = https.get(`https://registry.npmjs.org/${encodeURIComponent(packageName)}`, (res) => {
|
|
376
|
-
let data = '';
|
|
377
|
-
res.on('data', (chunk) => (data += chunk));
|
|
378
|
-
res.on('end', () => {
|
|
379
|
-
try {
|
|
380
|
-
const pkg = JSON.parse(data);
|
|
381
|
-
resolve(pkg['dist-tags']?.latest || pkg.version || null);
|
|
382
|
-
} catch {
|
|
383
|
-
resolve(null);
|
|
384
|
-
}
|
|
385
|
-
});
|
|
386
|
-
});
|
|
387
|
-
|
|
388
|
-
request.setTimeout(NPM_LOOKUP_TIMEOUT_MS, () => {
|
|
389
|
-
request.destroy();
|
|
390
|
-
resolve(null);
|
|
391
|
-
});
|
|
392
|
-
|
|
393
|
-
request.on('error', () => resolve(null));
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
|
-
} catch {
|
|
397
|
-
return null;
|
|
398
|
-
}
|
|
399
|
-
}
|
|
400
|
-
|
|
401
|
-
/**
|
|
402
|
-
* Check for available updates for installed modules
|
|
403
|
-
* @param {string} bmadDir - Path to bmad directory
|
|
404
|
-
* @returns {Array} Array of update info objects
|
|
405
|
-
*/
|
|
406
|
-
async checkForUpdates(bmadDir) {
|
|
407
|
-
const semver = require('semver');
|
|
408
|
-
const modules = await this.getAllModuleVersions(bmadDir);
|
|
409
|
-
const updates = [];
|
|
410
|
-
|
|
411
|
-
for (const module of modules) {
|
|
412
|
-
if (!module.npmPackage) {
|
|
413
|
-
continue; // Skip modules without npm package (built-in)
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
const latestVersion = await this.fetchNpmVersion(module.npmPackage);
|
|
417
|
-
if (!latestVersion) {
|
|
418
|
-
continue;
|
|
419
|
-
}
|
|
420
|
-
|
|
421
|
-
const installedVersion = semver.valid(module.version) || semver.valid(semver.coerce(module.version || ''));
|
|
422
|
-
const availableVersion = semver.valid(latestVersion) || semver.valid(semver.coerce(latestVersion));
|
|
423
|
-
|
|
424
|
-
if (installedVersion && availableVersion && semver.gt(availableVersion, installedVersion)) {
|
|
425
|
-
updates.push({
|
|
426
|
-
name: module.name,
|
|
427
|
-
installedVersion: module.version,
|
|
428
|
-
latestVersion: latestVersion,
|
|
429
|
-
npmPackage: module.npmPackage,
|
|
430
|
-
updateAvailable: true,
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
return updates;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
module.exports = { Manifest };
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
const path = require('node:path');
|
|
2
|
-
const fs = require('../fs-native');
|
|
3
|
-
const yaml = require('yaml');
|
|
4
|
-
const csv = require('csv-parse/sync');
|
|
5
|
-
|
|
6
|
-
function parseSkillMetadata(content) {
|
|
7
|
-
const normalized = content.replaceAll('\r\n', '\n').replaceAll('\r', '\n');
|
|
8
|
-
const match = normalized.match(/^---\n([\s\S]*?)\n---/);
|
|
9
|
-
if (!match) return null;
|
|
10
|
-
|
|
11
|
-
try {
|
|
12
|
-
const frontmatter = yaml.parse(match[1]);
|
|
13
|
-
return frontmatter && typeof frontmatter === 'object' ? frontmatter : null;
|
|
14
|
-
} catch {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function isShimSkill(metadata) {
|
|
20
|
-
return metadata?.metadata?.lifecycle === 'shim';
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async function discoverShims(modulePath) {
|
|
24
|
-
const shims = [];
|
|
25
|
-
|
|
26
|
-
const walk = async (dir) => {
|
|
27
|
-
let entries;
|
|
28
|
-
try {
|
|
29
|
-
entries = await fs.readdir(dir, { withFileTypes: true });
|
|
30
|
-
} catch {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const skillFile = path.join(dir, 'SKILL.md');
|
|
35
|
-
if (await fs.pathExists(skillFile)) {
|
|
36
|
-
const metadata = parseSkillMetadata(await fs.readFile(skillFile, 'utf8'));
|
|
37
|
-
if (isShimSkill(metadata)) {
|
|
38
|
-
shims.push({
|
|
39
|
-
id: metadata.name || path.basename(dir),
|
|
40
|
-
description: typeof metadata.description === 'string' ? metadata.description : '',
|
|
41
|
-
directory: dir,
|
|
42
|
-
relativeDirectory: path.relative(modulePath, dir),
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
for (const entry of entries) {
|
|
49
|
-
if (!entry.isDirectory() || entry.name.startsWith('.') || entry.name.startsWith('_')) continue;
|
|
50
|
-
await walk(path.join(dir, entry.name));
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
await walk(modulePath);
|
|
55
|
-
return shims;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
async function readSkillManifest(bmadDir) {
|
|
59
|
-
const manifestPath = path.join(bmadDir, '_config', 'skill-manifest.csv');
|
|
60
|
-
if (!(await fs.pathExists(manifestPath))) return [];
|
|
61
|
-
|
|
62
|
-
try {
|
|
63
|
-
const content = await fs.readFile(manifestPath, 'utf8');
|
|
64
|
-
return csv.parse(content, { columns: true, skip_empty_lines: true });
|
|
65
|
-
} catch {
|
|
66
|
-
// A missing or unreadable legacy manifest means there is no reliable
|
|
67
|
-
// evidence that compatibility shims were installed.
|
|
68
|
-
return [];
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
async function readInstalledSkillIds(bmadDir) {
|
|
73
|
-
const ids = new Set();
|
|
74
|
-
for (const record of await readSkillManifest(bmadDir)) {
|
|
75
|
-
if (record.canonicalId) ids.add(record.canonicalId);
|
|
76
|
-
}
|
|
77
|
-
return ids;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// The installed manifest carries no lifecycle column, so the description
|
|
81
|
-
// prefix every shim ships with is the only record of what was a shim. This
|
|
82
|
-
// is the same signal validate_skills.py uses to exempt them.
|
|
83
|
-
async function readInstalledShims(bmadDir) {
|
|
84
|
-
const shims = [];
|
|
85
|
-
for (const record of await readSkillManifest(bmadDir)) {
|
|
86
|
-
if (!record.canonicalId || !/^\s*deprecated\b/i.test(record.description || '')) continue;
|
|
87
|
-
shims.push({ id: record.canonicalId, description: record.description || '', module: record.module || '' });
|
|
88
|
-
}
|
|
89
|
-
return shims;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function inferShimPreference({ requested, persisted, availableShims = [], installedSkillIds = new Set(), existing = false }) {
|
|
93
|
-
if (availableShims.length === 0) return false;
|
|
94
|
-
if (typeof requested === 'boolean') return requested;
|
|
95
|
-
if (typeof persisted === 'boolean') return persisted;
|
|
96
|
-
if (!existing) return false;
|
|
97
|
-
|
|
98
|
-
return availableShims.some((shim) => installedSkillIds.has(shim.id));
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// Removal is driven by what is installed, not by what this release ships: a
|
|
102
|
-
// shim retired from source is still deleted by the update cleanup.
|
|
103
|
-
function selectShimOutcome({ installedShims = [], availableShims = [], install = false }) {
|
|
104
|
-
const availableShimIds = new Set(availableShims.map((shim) => shim.id));
|
|
105
|
-
return {
|
|
106
|
-
retained: install ? availableShims : [],
|
|
107
|
-
removed: installedShims.filter((shim) => !(install && availableShimIds.has(shim.id))),
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
// Shim descriptions all open with "Deprecated — "; the notice heading says it once.
|
|
112
|
-
function describeShim(shim) {
|
|
113
|
-
const cleaned = (shim.description || '').replace(/^\s*deprecated\s*[-–—:]*\s*/i, '').trim();
|
|
114
|
-
const source = shim.module ? ` (${shim.module})` : '';
|
|
115
|
-
return cleaned ? ` ${shim.id}${source}: ${cleaned}` : ` ${shim.id}${source}`;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function formatRetainedShimNotice(availableShims = []) {
|
|
119
|
-
const lines = availableShims.map((shim) => describeShim(shim)).sort();
|
|
120
|
-
|
|
121
|
-
return [
|
|
122
|
-
`${availableShims.length} deprecated shim skill(s) are still installed. Each one only forwards to the skill that replaced it:`,
|
|
123
|
-
'',
|
|
124
|
-
...lines,
|
|
125
|
-
'',
|
|
126
|
-
'Shims will be removed with v7, and anything still calling the old name stops working then.',
|
|
127
|
-
'Only keep a shim if you customized it and still need to move that customization to the replacement.',
|
|
128
|
-
'Once you have, re-run Quick Update and answer No to this question so the shims come off.',
|
|
129
|
-
].join('\n');
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function formatRemovedShimNotice(removedShims = [], { canReinstall = true } = {}) {
|
|
133
|
-
const lines = removedShims.map((shim) => describeShim(shim)).sort();
|
|
134
|
-
const recovery = canReinstall
|
|
135
|
-
? 'these shims, move it to the replacement, or re-run with --shims to put the shims back.'
|
|
136
|
-
: 'these shims, move it to the replacement. This release no longer ships them, so --shims cannot bring them back.';
|
|
137
|
-
|
|
138
|
-
return [
|
|
139
|
-
`${removedShims.length} deprecated shim skill(s) are being removed. Invoking these names will no longer work:`,
|
|
140
|
-
'',
|
|
141
|
-
...lines,
|
|
142
|
-
'',
|
|
143
|
-
'Each replacement named above is installed and ready. If you still had a customization on one of',
|
|
144
|
-
recovery,
|
|
145
|
-
].join('\n');
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
module.exports = {
|
|
149
|
-
describeShim,
|
|
150
|
-
formatRemovedShimNotice,
|
|
151
|
-
discoverShims,
|
|
152
|
-
formatRetainedShimNotice,
|
|
153
|
-
inferShimPreference,
|
|
154
|
-
isShimSkill,
|
|
155
|
-
parseSkillMetadata,
|
|
156
|
-
readInstalledShims,
|
|
157
|
-
readInstalledSkillIds,
|
|
158
|
-
selectShimOutcome,
|
|
159
|
-
};
|