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
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
import tempfile
|
|
3
|
-
import unittest
|
|
4
|
-
from pathlib import Path
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
|
8
|
-
|
|
9
|
-
from config_utils import ( # noqa: E402
|
|
10
|
-
ConfigError,
|
|
11
|
-
load_central_config,
|
|
12
|
-
load_customization,
|
|
13
|
-
load_toml,
|
|
14
|
-
structural_merge,
|
|
15
|
-
)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
class ConfigUtilsTests(unittest.TestCase):
|
|
19
|
-
def test_structural_merge_recurses_appends_and_replaces_keyed_tables(self):
|
|
20
|
-
base = {
|
|
21
|
-
"nested": {"keep": True, "replace": "old"},
|
|
22
|
-
"plain": ["base"],
|
|
23
|
-
"items": [{"id": "one", "value": "old"}],
|
|
24
|
-
}
|
|
25
|
-
override = {
|
|
26
|
-
"nested": {"replace": "new"},
|
|
27
|
-
"plain": ["override"],
|
|
28
|
-
"items": [
|
|
29
|
-
{"id": "one", "value": "new"},
|
|
30
|
-
{"id": "two", "value": "added"},
|
|
31
|
-
],
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
merged = structural_merge(base, override)
|
|
35
|
-
|
|
36
|
-
self.assertEqual(merged["nested"], {"keep": True, "replace": "new"})
|
|
37
|
-
self.assertEqual(merged["plain"], ["base", "override"])
|
|
38
|
-
self.assertEqual(
|
|
39
|
-
merged["items"],
|
|
40
|
-
[
|
|
41
|
-
{"id": "one", "value": "new"},
|
|
42
|
-
{"id": "two", "value": "added"},
|
|
43
|
-
],
|
|
44
|
-
)
|
|
45
|
-
|
|
46
|
-
def test_non_string_keyed_identifier_is_rejected(self):
|
|
47
|
-
with self.assertRaisesRegex(ConfigError, "identifier `id` must be a string"):
|
|
48
|
-
structural_merge([{"id": "valid"}], [{"id": 42}])
|
|
49
|
-
|
|
50
|
-
def test_present_malformed_optional_layer_is_rejected(self):
|
|
51
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
52
|
-
path = Path(temp_dir) / "optional.toml"
|
|
53
|
-
path.write_text("[broken\n", encoding="utf-8")
|
|
54
|
-
|
|
55
|
-
with self.assertRaisesRegex(ConfigError, "failed to parse"):
|
|
56
|
-
load_toml(path)
|
|
57
|
-
|
|
58
|
-
def test_missing_optional_layer_is_empty(self):
|
|
59
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
60
|
-
path = Path(temp_dir) / "optional.toml"
|
|
61
|
-
|
|
62
|
-
self.assertEqual(load_toml(path), {})
|
|
63
|
-
|
|
64
|
-
def test_filesystem_layer_precedence(self):
|
|
65
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
66
|
-
root = Path(temp_dir)
|
|
67
|
-
bmad = root / "_bmad"
|
|
68
|
-
custom = bmad / "custom"
|
|
69
|
-
skill = bmad / "bmm" / "sample-skill"
|
|
70
|
-
custom.mkdir(parents=True)
|
|
71
|
-
skill.mkdir(parents=True)
|
|
72
|
-
(bmad / "config.toml").write_text('[value]\norder = "base-team"\n', encoding="utf-8")
|
|
73
|
-
(bmad / "config.user.toml").write_text('[value]\norder = "base-user"\n', encoding="utf-8")
|
|
74
|
-
(custom / "config.toml").write_text('[value]\norder = "custom-team"\n', encoding="utf-8")
|
|
75
|
-
(custom / "config.user.toml").write_text('[value]\norder = "custom-user"\n', encoding="utf-8")
|
|
76
|
-
(skill / "customize.toml").write_text('[value]\norder = "default"\n', encoding="utf-8")
|
|
77
|
-
(custom / "sample-skill.toml").write_text('[value]\norder = "team"\n', encoding="utf-8")
|
|
78
|
-
(custom / "sample-skill.user.toml").write_text('[value]\norder = "user"\n', encoding="utf-8")
|
|
79
|
-
|
|
80
|
-
self.assertEqual(load_central_config(root)["value"]["order"], "custom-user")
|
|
81
|
-
self.assertEqual(load_customization(root, skill)["value"]["order"], "user")
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
if __name__ == "__main__":
|
|
85
|
-
unittest.main()
|
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
# /// script
|
|
2
|
-
# requires-python = ">=3.10"
|
|
3
|
-
# dependencies = ["pytest>=8.0"]
|
|
4
|
-
# ///
|
|
5
|
-
"""Tests for memlog.py. Run: uv run --with pytest pytest scripts/tests/test_memlog.py
|
|
6
|
-
|
|
7
|
-
The spine under test is the flat, append-only, chronological invariant: every entry is
|
|
8
|
-
one line recorded at the end in the order it happened — no sections, no grouping, and no
|
|
9
|
-
lifecycle status the log would have to mutate.
|
|
10
|
-
"""
|
|
11
|
-
import json
|
|
12
|
-
import sys
|
|
13
|
-
from pathlib import Path
|
|
14
|
-
|
|
15
|
-
import pytest
|
|
16
|
-
|
|
17
|
-
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
|
18
|
-
import memlog # noqa: E402
|
|
19
|
-
|
|
20
|
-
MEMLOG = ".memlog.md"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
@pytest.fixture
|
|
24
|
-
def ws(tmp_path):
|
|
25
|
-
return str(tmp_path)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
def read(ws):
|
|
29
|
-
return (Path(ws) / MEMLOG).read_text(encoding="utf-8")
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
def body_of(ws):
|
|
33
|
-
return memlog.split(read(ws))[1]
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
def entries(ws):
|
|
37
|
-
return [ln for ln in body_of(ws).splitlines() if ln.startswith("- ")]
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def init(ws, **fields):
|
|
41
|
-
fields = fields or {"topic": "Reinvent the lunchbox", "goal": "ideas for a pitch"}
|
|
42
|
-
argv = ["init", "--workspace", ws]
|
|
43
|
-
for k, v in fields.items():
|
|
44
|
-
argv += ["--field", f"{k}={v}"]
|
|
45
|
-
assert memlog.main(argv) == 0
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def append(ws, text, entry_type=None, by=None):
|
|
49
|
-
argv = ["append", "--workspace", ws, "--text", text]
|
|
50
|
-
if entry_type:
|
|
51
|
-
argv += ["--type", entry_type]
|
|
52
|
-
if by:
|
|
53
|
-
argv += ["--by", by]
|
|
54
|
-
assert memlog.main(argv) == 0
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
# --- init ---------------------------------------------------------------
|
|
58
|
-
|
|
59
|
-
def test_init_writes_frontmatter_fields(ws):
|
|
60
|
-
init(ws)
|
|
61
|
-
meta, body = memlog.split(read(ws))
|
|
62
|
-
assert meta["topic"] == "Reinvent the lunchbox"
|
|
63
|
-
assert meta["goal"] == "ideas for a pitch"
|
|
64
|
-
assert "updated" in meta
|
|
65
|
-
assert body.strip() == ""
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
def test_init_has_no_lifecycle_status(ws):
|
|
69
|
-
# A memory log carries no "status" flag; completion is an appended entry, not frontmatter.
|
|
70
|
-
init(ws)
|
|
71
|
-
meta, _ = memlog.split(read(ws))
|
|
72
|
-
assert "status" not in meta
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
def test_init_arbitrary_fields(ws):
|
|
76
|
-
init(ws, topic="T", audience="board")
|
|
77
|
-
meta, _ = memlog.split(read(ws))
|
|
78
|
-
assert meta["audience"] == "board"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
def test_init_refuses_overwrite(ws):
|
|
82
|
-
init(ws)
|
|
83
|
-
assert memlog.main(["init", "--workspace", ws, "--field", "topic=other"]) == 2
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
def test_init_creates_missing_workspace(tmp_path):
|
|
87
|
-
nested = str(tmp_path / "a" / "b")
|
|
88
|
-
assert memlog.main(["init", "--workspace", nested, "--field", "topic=T"]) == 0
|
|
89
|
-
assert (Path(nested) / MEMLOG).is_file()
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
def test_init_rejects_malformed_field(ws):
|
|
93
|
-
assert memlog.main(["init", "--workspace", ws, "--field", "noequals"]) == 2
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
# --- addressing: --workspace and --path are interchangeable --------------
|
|
97
|
-
|
|
98
|
-
def test_path_addressing_targets_the_file_directly(tmp_path):
|
|
99
|
-
target = tmp_path / "run" / ".memlog.md"
|
|
100
|
-
assert memlog.main(["init", "--path", str(target), "--field", "topic=T"]) == 0
|
|
101
|
-
assert target.is_file()
|
|
102
|
-
assert memlog.main(["append", "--path", str(target), "--text", "an idea", "--type", "idea"]) == 0
|
|
103
|
-
body = memlog.split(target.read_text(encoding="utf-8"))[1]
|
|
104
|
-
assert "- (idea) an idea" in body
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
def test_workspace_and_path_resolve_to_same_file(ws):
|
|
108
|
-
init(ws)
|
|
109
|
-
via_path = str(Path(ws) / MEMLOG)
|
|
110
|
-
assert memlog.main(["append", "--path", via_path, "--text", "from path"]) == 0
|
|
111
|
-
assert memlog.main(["append", "--workspace", ws, "--text", "from workspace"]) == 0
|
|
112
|
-
assert entries(ws) == ["- from path", "- from workspace"]
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
def test_target_is_required(ws):
|
|
116
|
-
with pytest.raises(SystemExit):
|
|
117
|
-
memlog.main(["append", "--text", "orphan"]) # neither --workspace nor --path
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
# --- append: flat chronological order is the whole point -----------------
|
|
121
|
-
|
|
122
|
-
def test_append_lands_at_end_in_order(ws):
|
|
123
|
-
init(ws)
|
|
124
|
-
append(ws, "first")
|
|
125
|
-
append(ws, "second")
|
|
126
|
-
append(ws, "third")
|
|
127
|
-
assert entries(ws) == ["- first", "- second", "- third"]
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
def test_no_sections_or_headings_ever(ws):
|
|
131
|
-
init(ws)
|
|
132
|
-
append(ws, "started foo", entry_type="technique")
|
|
133
|
-
append(ws, "an idea", entry_type="idea")
|
|
134
|
-
append(ws, "started bar", entry_type="technique")
|
|
135
|
-
assert "## " not in body_of(ws) # the flat log never grows headings
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
def test_type_renders_as_inline_tag(ws):
|
|
139
|
-
init(ws)
|
|
140
|
-
append(ws, "the earth revolves around the sun", entry_type="idea")
|
|
141
|
-
append(ws, "how do we handle stampede?", entry_type="question")
|
|
142
|
-
body = body_of(ws)
|
|
143
|
-
assert "- (idea) the earth revolves around the sun" in body
|
|
144
|
-
assert "- (question) how do we handle stampede?" in body
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
def test_append_without_type_is_plain_note(ws):
|
|
148
|
-
init(ws)
|
|
149
|
-
append(ws, "bare entry")
|
|
150
|
-
assert entries(ws) == ["- bare entry"]
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
def test_completion_is_an_entry_not_a_status(ws):
|
|
154
|
-
# The documented way to mark a session done: append it. Frontmatter never gains a status.
|
|
155
|
-
init(ws)
|
|
156
|
-
append(ws, "session complete", entry_type="event")
|
|
157
|
-
meta, _ = memlog.split(read(ws))
|
|
158
|
-
assert "status" not in meta
|
|
159
|
-
assert entries(ws)[-1] == "- (event) session complete"
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
def test_append_collapses_newlines_into_one_line(ws):
|
|
163
|
-
init(ws)
|
|
164
|
-
append(ws, "line one\nline two\n spaced out")
|
|
165
|
-
assert entries(ws) == ["- line one line two spaced out"]
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
def test_revisited_technique_is_just_a_later_entry(ws):
|
|
169
|
-
# the user's model: switching techniques is an entry, not a section to return to
|
|
170
|
-
init(ws)
|
|
171
|
-
append(ws, "started SCAMPER", entry_type="technique")
|
|
172
|
-
append(ws, "magnetic latch", entry_type="idea")
|
|
173
|
-
append(ws, "started Six Hats", entry_type="technique")
|
|
174
|
-
append(ws, "stale data risk", entry_type="idea")
|
|
175
|
-
append(ws, "started SCAMPER", entry_type="technique") # back to SCAMPER — just appended again
|
|
176
|
-
append(ws, "stackable tiers", entry_type="idea")
|
|
177
|
-
assert entries(ws) == [
|
|
178
|
-
"- (technique) started SCAMPER",
|
|
179
|
-
"- (idea) magnetic latch",
|
|
180
|
-
"- (technique) started Six Hats",
|
|
181
|
-
"- (idea) stale data risk",
|
|
182
|
-
"- (technique) started SCAMPER",
|
|
183
|
-
"- (idea) stackable tiers",
|
|
184
|
-
]
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
def test_by_renders_attribution_in_tag(ws):
|
|
188
|
-
# Creative Partner mode must record whose idea each one was
|
|
189
|
-
init(ws)
|
|
190
|
-
append(ws, "magnetic latch lid", entry_type="idea", by="user")
|
|
191
|
-
append(ws, "lid doubles as a plate", entry_type="idea", by="coach")
|
|
192
|
-
body = body_of(ws)
|
|
193
|
-
assert "- (idea by user) magnetic latch lid" in body
|
|
194
|
-
assert "- (idea by coach) lid doubles as a plate" in body
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
def test_by_without_type_renders_alone(ws):
|
|
198
|
-
init(ws)
|
|
199
|
-
append(ws, "off-the-cuff thought", by="coach")
|
|
200
|
-
assert entries(ws) == ["- (by coach) off-the-cuff thought"]
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
def test_heterogeneous_entry_types_coexist(ws):
|
|
204
|
-
init(ws)
|
|
205
|
-
append(ws, "an idea", entry_type="idea")
|
|
206
|
-
append(ws, "an open question", entry_type="question")
|
|
207
|
-
append(ws, "a decision we made", entry_type="decision")
|
|
208
|
-
append(ws, "user wants mobile-first", entry_type="direction")
|
|
209
|
-
body = body_of(ws)
|
|
210
|
-
for tag in ("(idea)", "(question)", "(decision)", "(direction)"):
|
|
211
|
-
assert tag in body
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
def test_free_vocabulary_is_not_enforced(ws):
|
|
215
|
-
# The tool is neutral: any --type the host skill names renders verbatim.
|
|
216
|
-
init(ws)
|
|
217
|
-
append(ws, "a custom kind", entry_type="crack")
|
|
218
|
-
append(ws, "another", entry_type="lock")
|
|
219
|
-
body = body_of(ws)
|
|
220
|
-
assert "- (crack) a custom kind" in body
|
|
221
|
-
assert "- (lock) another" in body
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
# --- set: generic descriptive frontmatter, no lifecycle semantics --------
|
|
225
|
-
|
|
226
|
-
def test_set_adds_field(ws):
|
|
227
|
-
init(ws)
|
|
228
|
-
memlog.main(["set", "--workspace", ws, "--key", "mode", "--value", "partner"])
|
|
229
|
-
assert memlog.split(read(ws))[0]["mode"] == "partner"
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
def test_set_replaces_field(ws):
|
|
233
|
-
init(ws, topic="T", mode="facilitator")
|
|
234
|
-
memlog.main(["set", "--workspace", ws, "--key", "mode", "--value", "partner"])
|
|
235
|
-
assert memlog.split(read(ws))[0]["mode"] == "partner"
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
def test_set_preserves_body(ws):
|
|
239
|
-
init(ws)
|
|
240
|
-
append(ws, "keep me", entry_type="idea")
|
|
241
|
-
memlog.main(["set", "--workspace", ws, "--key", "mode", "--value", "partner"])
|
|
242
|
-
meta, body = memlog.split(read(ws))
|
|
243
|
-
assert meta["mode"] == "partner"
|
|
244
|
-
assert "- (idea) keep me" in body
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
def test_updated_stays_last(ws):
|
|
248
|
-
init(ws)
|
|
249
|
-
memlog.main(["set", "--workspace", ws, "--key", "owner", "--value", "BMad"])
|
|
250
|
-
meta = memlog.split(read(ws))[0]
|
|
251
|
-
assert list(meta)[-1] == "updated"
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
# --- robustness ---------------------------------------------------------
|
|
255
|
-
|
|
256
|
-
def test_roundtrip_render_is_stable(ws):
|
|
257
|
-
init(ws)
|
|
258
|
-
append(ws, "one", entry_type="idea")
|
|
259
|
-
first = read(ws)
|
|
260
|
-
meta, body = memlog.split(first)
|
|
261
|
-
assert memlog.render(meta, body) == first
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
def test_commas_in_field_survive(ws):
|
|
265
|
-
init(ws, topic="cars, trains, and planes")
|
|
266
|
-
append(ws, "z", entry_type="idea")
|
|
267
|
-
meta, _ = memlog.split(read(ws))
|
|
268
|
-
assert meta["topic"] == "cars, trains, and planes"
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
def test_triple_dash_in_field_does_not_corrupt_frontmatter(ws):
|
|
272
|
-
# A `---` inside a value must NOT be read as the closing fence: topic stays intact
|
|
273
|
-
# and the body never leaks frontmatter text.
|
|
274
|
-
init(ws, topic="Pricing --- tiers --- and add-ons")
|
|
275
|
-
append(ws, "an idea", entry_type="idea")
|
|
276
|
-
meta, body = memlog.split(read(ws))
|
|
277
|
-
assert meta["topic"] == "Pricing --- tiers --- and add-ons"
|
|
278
|
-
assert entries(ws) == ["- (idea) an idea"]
|
|
279
|
-
assert "topic:" not in body # frontmatter never bled into the body
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
def test_newline_in_field_is_neutralized(ws):
|
|
283
|
-
# A value carrying a newline can't break the fence on the next round-trip.
|
|
284
|
-
memlog.main(["init", "--workspace", ws, "--field", "topic=line one\nline two"])
|
|
285
|
-
append(ws, "x", entry_type="idea")
|
|
286
|
-
meta, _ = memlog.split(read(ws))
|
|
287
|
-
assert "\n" not in meta["topic"]
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
def test_append_emits_json_ack(ws, capsys):
|
|
291
|
-
init(ws)
|
|
292
|
-
append(ws, "x", entry_type="idea")
|
|
293
|
-
out = json.loads(capsys.readouterr().out.strip().splitlines()[-1])
|
|
294
|
-
assert out["ok"] is True
|
|
295
|
-
assert out["entries"] == 1
|
|
296
|
-
assert out["memlog"].endswith(MEMLOG)
|
|
297
|
-
assert "status" not in out # no lifecycle status
|
|
298
|
-
assert "section" not in out # sections are gone
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
def test_ack_entry_count_climbs(ws, capsys):
|
|
302
|
-
init(ws)
|
|
303
|
-
append(ws, "a")
|
|
304
|
-
append(ws, "b")
|
|
305
|
-
out = json.loads(capsys.readouterr().out.strip().splitlines()[-1])
|
|
306
|
-
assert out["entries"] == 2
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
import os
|
|
3
|
-
import shutil
|
|
4
|
-
import subprocess
|
|
5
|
-
import sys
|
|
6
|
-
import tempfile
|
|
7
|
-
import unittest
|
|
8
|
-
from pathlib import Path
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
SCRIPT = Path(__file__).resolve().parents[1] / "resolve_config.py"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class ResolveConfigCliTests(unittest.TestCase):
|
|
15
|
-
def test_missing_tomllib_exits_with_actionable_version_error(self):
|
|
16
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
17
|
-
scripts = Path(temp_dir)
|
|
18
|
-
shutil.copy2(SCRIPT, scripts / SCRIPT.name)
|
|
19
|
-
shutil.copy2(SCRIPT.parent / "config_utils.py", scripts / "config_utils.py")
|
|
20
|
-
(scripts / "tomllib.py").write_text(
|
|
21
|
-
'raise ModuleNotFoundError("No module named tomllib", name="tomllib")\n',
|
|
22
|
-
encoding="utf-8",
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
result = subprocess.run(
|
|
26
|
-
[sys.executable, str(scripts / SCRIPT.name), "--help"],
|
|
27
|
-
text=True,
|
|
28
|
-
stdout=subprocess.PIPE,
|
|
29
|
-
stderr=subprocess.PIPE,
|
|
30
|
-
check=False,
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
self.assertEqual(result.returncode, 3)
|
|
34
|
-
self.assertEqual(
|
|
35
|
-
result.stderr,
|
|
36
|
-
"error: Python 3.11+ is required (stdlib `tomllib` not found).\n",
|
|
37
|
-
)
|
|
38
|
-
self.assertNotIn("Traceback", result.stderr)
|
|
39
|
-
|
|
40
|
-
def test_full_and_repeated_key_output_follow_layer_precedence(self):
|
|
41
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
42
|
-
root = Path(temp_dir)
|
|
43
|
-
custom = root / "_bmad" / "custom"
|
|
44
|
-
custom.mkdir(parents=True)
|
|
45
|
-
(root / "_bmad" / "config.toml").write_text(
|
|
46
|
-
'[core]\nname = "base"\nkeep = "yes"\n', encoding="utf-8"
|
|
47
|
-
)
|
|
48
|
-
(root / "_bmad" / "config.user.toml").write_text(
|
|
49
|
-
'[core]\nname = "base-user"\n', encoding="utf-8"
|
|
50
|
-
)
|
|
51
|
-
(custom / "config.toml").write_text(
|
|
52
|
-
'[core]\nname = "team"\n', encoding="utf-8"
|
|
53
|
-
)
|
|
54
|
-
(custom / "config.user.toml").write_text(
|
|
55
|
-
'[core]\nname = "user"\n', encoding="utf-8"
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
full = self._run(root)
|
|
59
|
-
self.assertEqual(full.returncode, 0, msg=full.stderr)
|
|
60
|
-
self.assertEqual(json.loads(full.stdout)["core"], {"name": "user", "keep": "yes"})
|
|
61
|
-
|
|
62
|
-
keyed = self._run(root, "--key", "core.name", "--key", "missing")
|
|
63
|
-
self.assertEqual(keyed.returncode, 0, msg=keyed.stderr)
|
|
64
|
-
self.assertEqual(json.loads(keyed.stdout), {"core.name": "user"})
|
|
65
|
-
|
|
66
|
-
def test_malformed_present_layer_fails(self):
|
|
67
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
68
|
-
root = Path(temp_dir)
|
|
69
|
-
custom = root / "_bmad" / "custom"
|
|
70
|
-
custom.mkdir(parents=True)
|
|
71
|
-
(root / "_bmad" / "config.toml").write_text("[core]\nvalid = true\n", encoding="utf-8")
|
|
72
|
-
(custom / "config.toml").write_text("[broken\n", encoding="utf-8")
|
|
73
|
-
|
|
74
|
-
result = self._run(root)
|
|
75
|
-
self.assertNotEqual(result.returncode, 0)
|
|
76
|
-
self.assertIn("failed to parse", result.stderr)
|
|
77
|
-
|
|
78
|
-
def test_writes_emoji_json_when_stdout_encoding_is_cp1252(self):
|
|
79
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
80
|
-
root = Path(temp_dir)
|
|
81
|
-
(root / "_bmad").mkdir(parents=True)
|
|
82
|
-
(root / "_bmad" / "config.toml").write_text(
|
|
83
|
-
'[agents]\nname = "Analyst"\nicon = "📊"\n',
|
|
84
|
-
encoding="utf-8",
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
env = os.environ.copy()
|
|
88
|
-
env["PYTHONIOENCODING"] = "cp1252"
|
|
89
|
-
result = subprocess.run(
|
|
90
|
-
[sys.executable, str(SCRIPT), "--project-root", str(root)],
|
|
91
|
-
stdout=subprocess.PIPE,
|
|
92
|
-
stderr=subprocess.PIPE,
|
|
93
|
-
env=env,
|
|
94
|
-
check=False,
|
|
95
|
-
)
|
|
96
|
-
|
|
97
|
-
stderr = result.stderr.decode("utf-8", errors="replace")
|
|
98
|
-
self.assertEqual(result.returncode, 0, msg=stderr)
|
|
99
|
-
|
|
100
|
-
output = result.stdout.decode("utf-8")
|
|
101
|
-
self.assertIn("📊", output)
|
|
102
|
-
resolved = json.loads(output)
|
|
103
|
-
self.assertEqual(resolved["agents"]["icon"], "📊")
|
|
104
|
-
|
|
105
|
-
@staticmethod
|
|
106
|
-
def _run(root: Path, *args: str) -> subprocess.CompletedProcess[str]:
|
|
107
|
-
return subprocess.run(
|
|
108
|
-
[sys.executable, str(SCRIPT), "--project-root", str(root), *args],
|
|
109
|
-
text=True,
|
|
110
|
-
stdout=subprocess.PIPE,
|
|
111
|
-
stderr=subprocess.PIPE,
|
|
112
|
-
check=False,
|
|
113
|
-
)
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if __name__ == "__main__":
|
|
117
|
-
unittest.main()
|
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
import os
|
|
3
|
-
import shutil
|
|
4
|
-
import subprocess
|
|
5
|
-
import sys
|
|
6
|
-
import tempfile
|
|
7
|
-
import unittest
|
|
8
|
-
from pathlib import Path
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
SCRIPT = Path(__file__).resolve().parents[1] / "resolve_customization.py"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class ResolveCustomizationStdoutTests(unittest.TestCase):
|
|
15
|
-
def test_missing_tomllib_exits_with_actionable_version_error(self):
|
|
16
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
17
|
-
scripts = Path(temp_dir)
|
|
18
|
-
shutil.copy2(SCRIPT, scripts / SCRIPT.name)
|
|
19
|
-
shutil.copy2(SCRIPT.parent / "config_utils.py", scripts / "config_utils.py")
|
|
20
|
-
(scripts / "tomllib.py").write_text(
|
|
21
|
-
'raise ModuleNotFoundError("No module named tomllib", name="tomllib")\n',
|
|
22
|
-
encoding="utf-8",
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
result = subprocess.run(
|
|
26
|
-
[sys.executable, str(scripts / SCRIPT.name), "--help"],
|
|
27
|
-
text=True,
|
|
28
|
-
stdout=subprocess.PIPE,
|
|
29
|
-
stderr=subprocess.PIPE,
|
|
30
|
-
check=False,
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
self.assertEqual(result.returncode, 3)
|
|
34
|
-
self.assertEqual(
|
|
35
|
-
result.stderr,
|
|
36
|
-
"error: Python 3.11+ is required (stdlib `tomllib` not found).\n",
|
|
37
|
-
)
|
|
38
|
-
self.assertNotIn("Traceback", result.stderr)
|
|
39
|
-
|
|
40
|
-
def test_writes_emoji_json_when_stdout_encoding_is_cp1252(self):
|
|
41
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
42
|
-
skill_dir = Path(temp_dir) / "emoji-agent"
|
|
43
|
-
skill_dir.mkdir()
|
|
44
|
-
(skill_dir / "customize.toml").write_text(
|
|
45
|
-
'[agent]\nname = "Emoji Agent"\nicon = "🧭"\n',
|
|
46
|
-
encoding="utf-8",
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
env = os.environ.copy()
|
|
50
|
-
env["PYTHONIOENCODING"] = "cp1252"
|
|
51
|
-
result = subprocess.run(
|
|
52
|
-
[
|
|
53
|
-
sys.executable,
|
|
54
|
-
str(SCRIPT),
|
|
55
|
-
"--skill",
|
|
56
|
-
str(skill_dir),
|
|
57
|
-
"--key",
|
|
58
|
-
"agent",
|
|
59
|
-
],
|
|
60
|
-
stdout=subprocess.PIPE,
|
|
61
|
-
stderr=subprocess.PIPE,
|
|
62
|
-
cwd=temp_dir,
|
|
63
|
-
env=env,
|
|
64
|
-
check=False,
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
stderr = result.stderr.decode("utf-8", errors="replace")
|
|
68
|
-
self.assertEqual(result.returncode, 0, msg=stderr)
|
|
69
|
-
|
|
70
|
-
output = result.stdout.decode("utf-8")
|
|
71
|
-
self.assertIn("🧭", output)
|
|
72
|
-
resolved = json.loads(output)
|
|
73
|
-
self.assertEqual(resolved["agent"]["icon"], "🧭")
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
def write(path: Path, body: str) -> None:
|
|
77
|
-
path.parent.mkdir(parents=True, exist_ok=True)
|
|
78
|
-
path.write_text(body, encoding="utf-8")
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
def facts(*entries: str) -> str:
|
|
82
|
-
listed = ", ".join(f'"{entry}"' for entry in entries)
|
|
83
|
-
return f"[workflow]\npersistent_facts = [{listed}]\n"
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
def resolve(skill_dir: Path, cwd: Path, *extra: str):
|
|
87
|
-
return subprocess.run(
|
|
88
|
-
[sys.executable, str(SCRIPT), "--skill", str(skill_dir), "--key", "workflow", *extra],
|
|
89
|
-
text=True,
|
|
90
|
-
stdout=subprocess.PIPE,
|
|
91
|
-
stderr=subprocess.PIPE,
|
|
92
|
-
cwd=str(cwd),
|
|
93
|
-
check=False,
|
|
94
|
-
)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
class ProjectRootResolutionTests(unittest.TestCase):
|
|
98
|
-
"""Regression cover for #2796 — the project is where the user works, not
|
|
99
|
-
where the skill is installed."""
|
|
100
|
-
|
|
101
|
-
def test_home_installed_skill_reads_project_override_not_home_bmad(self):
|
|
102
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
103
|
-
home = Path(temp_dir) / "home"
|
|
104
|
-
project = Path(temp_dir) / "project"
|
|
105
|
-
skill = home / ".claude" / "skills" / "demo-skill"
|
|
106
|
-
write(skill / "customize.toml", facts("shipped default"))
|
|
107
|
-
(home / "_bmad" / "custom").mkdir(parents=True)
|
|
108
|
-
write(project / "_bmad" / "custom" / "demo-skill.toml", facts("team override"))
|
|
109
|
-
|
|
110
|
-
result = resolve(skill, project)
|
|
111
|
-
|
|
112
|
-
self.assertEqual(result.returncode, 0, msg=result.stderr)
|
|
113
|
-
resolved = json.loads(result.stdout)["workflow"]["persistent_facts"]
|
|
114
|
-
self.assertEqual(resolved, ["shipped default", "team override"])
|
|
115
|
-
|
|
116
|
-
def test_project_installed_skill_still_resolves(self):
|
|
117
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
118
|
-
project = Path(temp_dir) / "project"
|
|
119
|
-
skill = project / ".claude" / "skills" / "demo-skill"
|
|
120
|
-
write(skill / "customize.toml", facts("shipped default"))
|
|
121
|
-
write(project / "_bmad" / "custom" / "demo-skill.toml", facts("team override"))
|
|
122
|
-
|
|
123
|
-
result = resolve(skill, project)
|
|
124
|
-
|
|
125
|
-
self.assertEqual(result.returncode, 0, msg=result.stderr)
|
|
126
|
-
resolved = json.loads(result.stdout)["workflow"]["persistent_facts"]
|
|
127
|
-
self.assertEqual(resolved, ["shipped default", "team override"])
|
|
128
|
-
|
|
129
|
-
def test_walk_prefers_bmad_over_a_nearer_git_directory(self):
|
|
130
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
131
|
-
project = Path(temp_dir) / "project"
|
|
132
|
-
submodule = project / "vendor" / "sub"
|
|
133
|
-
skill = Path(temp_dir) / "skills" / "demo-skill"
|
|
134
|
-
write(skill / "customize.toml", facts("shipped default"))
|
|
135
|
-
write(project / "_bmad" / "custom" / "demo-skill.toml", facts("team override"))
|
|
136
|
-
(submodule / ".git").mkdir(parents=True)
|
|
137
|
-
|
|
138
|
-
result = resolve(skill, submodule)
|
|
139
|
-
|
|
140
|
-
self.assertEqual(result.returncode, 0, msg=result.stderr)
|
|
141
|
-
resolved = json.loads(result.stdout)["workflow"]["persistent_facts"]
|
|
142
|
-
self.assertEqual(resolved, ["shipped default", "team override"])
|
|
143
|
-
|
|
144
|
-
def test_notes_when_a_rejected_root_holds_the_only_override(self):
|
|
145
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
146
|
-
home = Path(temp_dir) / "home"
|
|
147
|
-
project = Path(temp_dir) / "project"
|
|
148
|
-
skill = home / ".claude" / "skills" / "demo-skill"
|
|
149
|
-
write(skill / "customize.toml", facts("shipped default"))
|
|
150
|
-
write(home / "_bmad" / "custom" / "demo-skill.toml", facts("home override"))
|
|
151
|
-
(project / "_bmad" / "custom").mkdir(parents=True)
|
|
152
|
-
|
|
153
|
-
result = resolve(skill, project)
|
|
154
|
-
|
|
155
|
-
self.assertEqual(result.returncode, 0, msg=result.stderr)
|
|
156
|
-
resolved = json.loads(result.stdout)["workflow"]["persistent_facts"]
|
|
157
|
-
self.assertEqual(resolved, ["shipped default"])
|
|
158
|
-
self.assertIn("demo-skill", result.stderr)
|
|
159
|
-
self.assertIn("--project-root", result.stderr)
|
|
160
|
-
|
|
161
|
-
def test_explicit_project_root_wins_and_stays_quiet(self):
|
|
162
|
-
with tempfile.TemporaryDirectory() as temp_dir:
|
|
163
|
-
home = Path(temp_dir) / "home"
|
|
164
|
-
project = Path(temp_dir) / "project"
|
|
165
|
-
skill = home / ".claude" / "skills" / "demo-skill"
|
|
166
|
-
write(skill / "customize.toml", facts("shipped default"))
|
|
167
|
-
write(home / "_bmad" / "custom" / "demo-skill.toml", facts("home override"))
|
|
168
|
-
(project / "_bmad" / "custom").mkdir(parents=True)
|
|
169
|
-
|
|
170
|
-
result = resolve(skill, project, "--project-root", str(home))
|
|
171
|
-
|
|
172
|
-
self.assertEqual(result.returncode, 0, msg=result.stderr)
|
|
173
|
-
resolved = json.loads(result.stdout)["workflow"]["persistent_facts"]
|
|
174
|
-
self.assertEqual(resolved, ["shipped default", "home override"])
|
|
175
|
-
self.assertEqual(result.stderr, "")
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
if __name__ == "__main__":
|
|
179
|
-
unittest.main()
|