bmad-method-quarkus 1.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/.claude-plugin/marketplace.json +53 -0
- package/AGENTS.md +12 -0
- package/LICENSE +30 -0
- package/README.md +94 -0
- package/README_CN.md +108 -0
- package/README_VN.md +109 -0
- package/bmad-modules.yaml +133 -0
- package/package.json +123 -0
- package/removals.txt +87 -0
- package/src/bmm-skills/agents/bmad-agent-analyst/SKILL.md +76 -0
- package/src/bmm-skills/agents/bmad-agent-analyst/customize.toml +105 -0
- package/src/bmm-skills/agents/bmad-agent-architect/SKILL.md +76 -0
- package/src/bmm-skills/agents/bmad-agent-architect/customize.toml +65 -0
- package/src/bmm-skills/agents/bmad-agent-dev/SKILL.md +76 -0
- package/src/bmm-skills/agents/bmad-agent-dev/customize.toml +83 -0
- package/src/bmm-skills/agents/bmad-agent-pm/SKILL.md +76 -0
- package/src/bmm-skills/agents/bmad-agent-pm/customize.toml +75 -0
- package/src/bmm-skills/agents/bmad-agent-ux-designer/SKILL.md +76 -0
- package/src/bmm-skills/agents/bmad-agent-ux-designer/customize.toml +60 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/.memlog.md +12 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/.memlog.md:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/SKILL.md +86 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/SKILL.md:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/customize.toml +37 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/customize.toml:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/references/enrich-stories.md +19 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/references/enrich-stories.md:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/references/prompt-quality-canon.md +79 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/references/prompt-quality-canon.md:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/bqa-setup/SKILL.md +80 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/bqa-setup/SKILL.md:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/bqa-setup/assets/module-help.csv +9 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/bqa-setup/assets/module-help.csv:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/bqa-setup/assets/module.yaml +16 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/bqa-setup/assets/module.yaml:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/bqa-setup/scripts/cleanup-legacy.py +287 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/bqa-setup/scripts/cleanup-legacy.py:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/bqa-setup/scripts/merge-config.py +441 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/bqa-setup/scripts/merge-config.py:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/bqa-setup/scripts/merge-help-csv.py +246 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/bqa-setup/scripts/merge-help-csv.py:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/quarkus-error-handling-i18n/SKILL.md +181 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/quarkus-error-handling-i18n/SKILL.md:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/quarkus-grpc-services/SKILL.md +141 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/quarkus-grpc-services/SKILL.md:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/quarkus-hexagonal-core/SKILL.md +392 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/quarkus-hexagonal-core/SKILL.md:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/quarkus-kafka-messaging/SKILL.md +148 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/quarkus-kafka-messaging/SKILL.md:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/quarkus-observability-otel/SKILL.md +180 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/quarkus-observability-otel/SKILL.md:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/quarkus-openapi-tmforum/SKILL.md +128 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/quarkus-openapi-tmforum/SKILL.md:Zone.Identifier +0 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/quarkus-sql-jdbc-agroal/SKILL.md +245 -0
- package/src/bmm-skills/agents/bmad-quarkus-architect/skills/quarkus-sql-jdbc-agroal/SKILL.md:Zone.Identifier +0 -0
- package/src/bmm-skills/module-help.csv +19 -0
- package/src/bmm-skills/module.yaml +92 -0
- package/src/bmm-skills/plan/bmad-architecture/SKILL.md +85 -0
- package/src/bmm-skills/plan/bmad-architecture/assets/spine-template.md +79 -0
- package/src/bmm-skills/plan/bmad-architecture/customize.toml +102 -0
- package/src/bmm-skills/plan/bmad-architecture/references/headless.md +26 -0
- package/src/bmm-skills/plan/bmad-architecture/references/reviewer-gate.md +13 -0
- package/src/bmm-skills/plan/bmad-architecture/scripts/lint_spine.py +257 -0
- package/src/bmm-skills/plan/bmad-architecture/scripts/tests/test_lint_spine.py +270 -0
- package/src/bmm-skills/plan/bmad-create-epics-and-stories/SKILL.md +93 -0
- package/src/bmm-skills/plan/bmad-create-epics-and-stories/customize.toml +41 -0
- package/src/bmm-skills/plan/bmad-create-epics-and-stories/steps/step-01-validate-prerequisites.md +263 -0
- package/src/bmm-skills/plan/bmad-create-epics-and-stories/steps/step-02-design-epics.md +242 -0
- package/src/bmm-skills/plan/bmad-create-epics-and-stories/steps/step-03-create-stories.md +255 -0
- package/src/bmm-skills/plan/bmad-create-epics-and-stories/steps/step-04-final-validation.md +143 -0
- package/src/bmm-skills/plan/bmad-create-epics-and-stories/templates/epics-template.md +61 -0
- package/src/bmm-skills/plan/bmad-generate-project-context/SKILL.md +10 -0
- package/src/bmm-skills/plan/bmad-prd/SKILL.md +94 -0
- package/src/bmm-skills/plan/bmad-prd/assets/headless-schemas.md +76 -0
- package/src/bmm-skills/plan/bmad-prd/assets/prd-template.md +165 -0
- package/src/bmm-skills/plan/bmad-prd/assets/prd-validation-checklist.md +135 -0
- package/src/bmm-skills/plan/bmad-prd/assets/validation-report-template.html +325 -0
- package/src/bmm-skills/plan/bmad-prd/customize.toml +149 -0
- package/src/bmm-skills/plan/bmad-prd/references/headless.md +39 -0
- package/src/bmm-skills/plan/bmad-prd/references/validate.md +97 -0
- package/src/bmm-skills/plan/bmad-prfaq/SKILL.md +135 -0
- package/src/bmm-skills/plan/bmad-prfaq/agents/artifact-analyzer.md +60 -0
- package/src/bmm-skills/plan/bmad-prfaq/agents/web-researcher.md +49 -0
- package/src/bmm-skills/plan/bmad-prfaq/assets/prfaq-template.md +62 -0
- package/src/bmm-skills/plan/bmad-prfaq/bmad-manifest.json +16 -0
- package/src/bmm-skills/plan/bmad-prfaq/customize.toml +41 -0
- package/src/bmm-skills/plan/bmad-prfaq/references/customer-faq.md +55 -0
- package/src/bmm-skills/plan/bmad-prfaq/references/internal-faq.md +51 -0
- package/src/bmm-skills/plan/bmad-prfaq/references/press-release.md +60 -0
- package/src/bmm-skills/plan/bmad-prfaq/references/verdict.md +83 -0
- package/src/bmm-skills/plan/bmad-product-brief/SKILL.md +91 -0
- package/src/bmm-skills/plan/bmad-product-brief/assets/brief-template.md +41 -0
- package/src/bmm-skills/plan/bmad-product-brief/customize.toml +101 -0
- package/src/bmm-skills/plan/bmad-project-context/SKILL.md +110 -0
- package/src/bmm-skills/plan/bmad-project-context/customize.toml +24 -0
- package/src/bmm-skills/plan/bmad-project-context/references/best-practices.md +65 -0
- package/src/bmm-skills/plan/bmad-project-context/references/template.md +55 -0
- package/src/bmm-skills/plan/bmad-spec/SKILL.md +160 -0
- package/src/bmm-skills/plan/bmad-spec/assets/headless-schemas.md +33 -0
- package/src/bmm-skills/plan/bmad-spec/assets/spec-template.md +49 -0
- package/src/bmm-skills/plan/bmad-spec/assets/stories-schema.md +44 -0
- package/src/bmm-skills/plan/bmad-spec/customize.toml +52 -0
- package/src/bmm-skills/plan/bmad-sprint-planning/SKILL.md +62 -0
- package/src/bmm-skills/plan/bmad-sprint-planning/customize.toml +41 -0
- package/src/bmm-skills/plan/bmad-sprint-planning/references/fix-sprint-status.md +30 -0
- package/src/bmm-skills/plan/bmad-sprint-planning/references/generate-tracking.md +25 -0
- package/src/bmm-skills/plan/bmad-sprint-planning/references/readiness-gate.md +20 -0
- package/src/bmm-skills/plan/bmad-sprint-planning/references/status-view.md +14 -0
- package/src/bmm-skills/plan/bmad-sprint-planning/references/validate.md +10 -0
- 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 +697 -0
- 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 +524 -0
- package/src/bmm-skills/plan/bmad-sprint-planning/sprint-status-template.yaml +71 -0
- package/src/bmm-skills/plan/bmad-ux/SKILL.md +90 -0
- package/src/bmm-skills/plan/bmad-ux/assets/color-themes.md +9 -0
- package/src/bmm-skills/plan/bmad-ux/assets/design-directions.md +9 -0
- package/src/bmm-skills/plan/bmad-ux/assets/design-example-editorial.md +158 -0
- package/src/bmm-skills/plan/bmad-ux/assets/design-example-mobile.md +93 -0
- package/src/bmm-skills/plan/bmad-ux/assets/design-example-shadcn.md +109 -0
- package/src/bmm-skills/plan/bmad-ux/assets/excalidraw-wireframe.md +19 -0
- package/src/bmm-skills/plan/bmad-ux/assets/experience-example-mobile.md +112 -0
- package/src/bmm-skills/plan/bmad-ux/assets/experience-example-shadcn.md +133 -0
- package/src/bmm-skills/plan/bmad-ux/assets/headless-schemas.md +84 -0
- package/src/bmm-skills/plan/bmad-ux/assets/key-screens.md +29 -0
- package/src/bmm-skills/plan/bmad-ux/assets/validation-report-template.html +319 -0
- package/src/bmm-skills/plan/bmad-ux/customize.toml +102 -0
- package/src/bmm-skills/plan/bmad-ux/references/creative-tools.md +19 -0
- package/src/bmm-skills/plan/bmad-ux/references/design-md-spec.md +50 -0
- package/src/bmm-skills/plan/bmad-ux/references/headless.md +37 -0
- package/src/bmm-skills/plan/bmad-ux/references/validate.md +115 -0
- package/src/bmm-skills/ship/bmad-build/SKILL.md +13 -0
- package/src/bmm-skills/ship/bmad-build/compile-epic-context.md +62 -0
- package/src/bmm-skills/ship/bmad-build/customize.toml +164 -0
- package/src/bmm-skills/ship/bmad-build/references/deletion-check.md +14 -0
- package/src/bmm-skills/ship/bmad-build/review-prompts/edge-case-hunter.md +88 -0
- package/src/bmm-skills/ship/bmad-build/review-prompts/verification-gap.md +113 -0
- package/src/bmm-skills/ship/bmad-build/spec-template.md +89 -0
- package/src/bmm-skills/ship/bmad-build/step-01-clarify-and-route.md +105 -0
- package/src/bmm-skills/ship/bmad-build/step-02-plan.md +47 -0
- package/src/bmm-skills/ship/bmad-build/step-03-implement.md +49 -0
- package/src/bmm-skills/ship/bmad-build/step-04-review.md +55 -0
- package/src/bmm-skills/ship/bmad-build/step-05-present.md +75 -0
- package/src/bmm-skills/ship/bmad-build/step-oneshot.md +77 -0
- package/src/bmm-skills/ship/bmad-build/sync-sprint-status.md +19 -0
- package/src/bmm-skills/ship/bmad-build/workflow.md +84 -0
- package/src/bmm-skills/ship/bmad-build-auto/SKILL.md +13 -0
- package/src/bmm-skills/ship/bmad-build-auto/compile-epic-context.md +62 -0
- package/src/bmm-skills/ship/bmad-build-auto/customize.toml +121 -0
- package/src/bmm-skills/ship/bmad-build-auto/references/deletion-check.md +14 -0
- package/src/bmm-skills/ship/bmad-build-auto/review-prompts/edge-case-hunter.md +88 -0
- package/src/bmm-skills/ship/bmad-build-auto/review-prompts/verification-gap.md +113 -0
- package/src/bmm-skills/ship/bmad-build-auto/spec-template.md +99 -0
- package/src/bmm-skills/ship/bmad-build-auto/step-01-clarify-and-route.md +83 -0
- package/src/bmm-skills/ship/bmad-build-auto/step-02-plan.md +27 -0
- package/src/bmm-skills/ship/bmad-build-auto/step-03-implement.md +44 -0
- package/src/bmm-skills/ship/bmad-build-auto/step-04-review.md +96 -0
- package/src/bmm-skills/ship/bmad-build-auto/workflow.md +104 -0
- package/src/bmm-skills/ship/bmad-checkpoint-preview/SKILL.md +68 -0
- package/src/bmm-skills/ship/bmad-checkpoint-preview/customize.toml +41 -0
- package/src/bmm-skills/ship/bmad-checkpoint-preview/generate-trail.md +38 -0
- package/src/bmm-skills/ship/bmad-checkpoint-preview/step-01-orientation.md +105 -0
- package/src/bmm-skills/ship/bmad-checkpoint-preview/step-02-walkthrough.md +89 -0
- package/src/bmm-skills/ship/bmad-checkpoint-preview/step-03-detail-pass.md +106 -0
- package/src/bmm-skills/ship/bmad-checkpoint-preview/step-04-testing.md +74 -0
- package/src/bmm-skills/ship/bmad-checkpoint-preview/step-05-wrapup.md +30 -0
- package/src/bmm-skills/ship/bmad-code-review/SKILL.md +90 -0
- package/src/bmm-skills/ship/bmad-code-review/customize.toml +113 -0
- package/src/bmm-skills/ship/bmad-code-review/references/deletion-check.md +14 -0
- package/src/bmm-skills/ship/bmad-code-review/review-prompts/edge-case-hunter.md +88 -0
- package/src/bmm-skills/ship/bmad-code-review/review-prompts/verification-gap.md +113 -0
- package/src/bmm-skills/ship/bmad-code-review/steps/step-01-gather-context.md +87 -0
- package/src/bmm-skills/ship/bmad-code-review/steps/step-02-review.md +32 -0
- package/src/bmm-skills/ship/bmad-code-review/steps/step-03-triage.md +50 -0
- package/src/bmm-skills/ship/bmad-code-review/steps/step-04-present.md +132 -0
- package/src/bmm-skills/ship/bmad-correct-course/SKILL.md +300 -0
- package/src/bmm-skills/ship/bmad-correct-course/checklist.md +288 -0
- package/src/bmm-skills/ship/bmad-correct-course/customize.toml +41 -0
- package/src/bmm-skills/ship/bmad-qa-generate-e2e-tests/SKILL.md +176 -0
- package/src/bmm-skills/ship/bmad-qa-generate-e2e-tests/checklist.md +33 -0
- package/src/bmm-skills/ship/bmad-qa-generate-e2e-tests/customize.toml +41 -0
- package/src/bmm-skills/ship/bmad-retrospective/SKILL.md +94 -0
- package/src/bmm-skills/ship/bmad-retrospective/customize.toml +41 -0
- package/src/bmm-skills/ship/bmad-retrospective/references/acceptance-verdict.md +55 -0
- package/src/bmm-skills/ship/bmad-retrospective/references/aggregate-views.md +17 -0
- package/src/bmm-skills/ship/bmad-retrospective/references/evidence-gathering.md +30 -0
- package/src/bmm-skills/ship/bmad-retrospective/references/retro-document.md +84 -0
- package/src/bmm-skills/ship/bmad-retrospective/references/team-discussion.md +22 -0
- 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 +304 -0
- package/src/bmm-skills/ship/bmad-retrospective/scripts/sprint_status.py +746 -0
- 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 +71 -0
- package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/test_git_evidence.py +750 -0
- package/src/bmm-skills/ship/bmad-retrospective/scripts/tests/test_sprint_status.py +1579 -0
- package/src/bmm-skills/v6-shims/README.md +28 -0
- package/src/bmm-skills/v6-shims/bmad-create-architecture/SKILL.md +30 -0
- package/src/bmm-skills/v6-shims/bmad-create-architecture/customize.toml +41 -0
- package/src/bmm-skills/v6-shims/bmad-create-prd/SKILL.md +30 -0
- package/src/bmm-skills/v6-shims/bmad-create-prd/customize.toml +41 -0
- package/src/bmm-skills/v6-shims/bmad-create-story/SKILL.md +434 -0
- package/src/bmm-skills/v6-shims/bmad-create-story/checklist.md +357 -0
- package/src/bmm-skills/v6-shims/bmad-create-story/customize.toml +41 -0
- package/src/bmm-skills/v6-shims/bmad-create-story/discover-inputs.md +88 -0
- package/src/bmm-skills/v6-shims/bmad-create-story/template.md +49 -0
- package/src/bmm-skills/v6-shims/bmad-dev-auto/SKILL.md +19 -0
- package/src/bmm-skills/v6-shims/bmad-dev-story/SKILL.md +502 -0
- package/src/bmm-skills/v6-shims/bmad-dev-story/checklist.md +80 -0
- package/src/bmm-skills/v6-shims/bmad-dev-story/customize.toml +44 -0
- package/src/bmm-skills/v6-shims/bmad-document-project/SKILL.md +14 -0
- package/src/bmm-skills/v6-shims/bmad-domain-research/SKILL.md +14 -0
- package/src/bmm-skills/v6-shims/bmad-edit-prd/SKILL.md +30 -0
- package/src/bmm-skills/v6-shims/bmad-edit-prd/customize.toml +42 -0
- package/src/bmm-skills/v6-shims/bmad-market-research/SKILL.md +14 -0
- package/src/bmm-skills/v6-shims/bmad-quick-dev/SKILL.md +19 -0
- package/src/bmm-skills/v6-shims/bmad-sprint-status/SKILL.md +26 -0
- package/src/bmm-skills/v6-shims/bmad-sprint-status/customize.toml +41 -0
- package/src/bmm-skills/v6-shims/bmad-technical-research/SKILL.md +14 -0
- package/src/bmm-skills/v6-shims/bmad-validate-prd/SKILL.md +30 -0
- package/src/bmm-skills/v6-shims/bmad-validate-prd/customize.toml +42 -0
- package/src/core-skills/bmad-advanced-elicitation/SKILL.md +65 -0
- package/src/core-skills/bmad-advanced-elicitation/assets/methods.csv +72 -0
- package/src/core-skills/bmad-advanced-elicitation/customize.toml +54 -0
- package/src/core-skills/bmad-advanced-elicitation/scripts/pick_methods.py +233 -0
- package/src/core-skills/bmad-advanced-elicitation/scripts/tests/test_pick_methods.py +228 -0
- package/src/core-skills/bmad-brainstorming/SKILL.md +80 -0
- package/src/core-skills/bmad-brainstorming/assets/brain-icons.json +166 -0
- package/src/core-skills/bmad-brainstorming/assets/brain-methods.csv +109 -0
- package/src/core-skills/bmad-brainstorming/assets/brain-selector.html +328 -0
- package/src/core-skills/bmad-brainstorming/customize.toml +84 -0
- package/src/core-skills/bmad-brainstorming/references/converge.md +24 -0
- package/src/core-skills/bmad-brainstorming/references/finalize.md +26 -0
- package/src/core-skills/bmad-brainstorming/references/headless.md +54 -0
- package/src/core-skills/bmad-brainstorming/references/in-chat-techniques.md +18 -0
- package/src/core-skills/bmad-brainstorming/references/mode-autonomous.md +10 -0
- package/src/core-skills/bmad-brainstorming/references/mode-facilitator.md +11 -0
- package/src/core-skills/bmad-brainstorming/references/mode-partner.md +16 -0
- package/src/core-skills/bmad-brainstorming/references/resume.md +5 -0
- package/src/core-skills/bmad-brainstorming/scripts/brain.py +770 -0
- package/src/core-skills/bmad-brainstorming/scripts/tests/test_brain.py +239 -0
- package/src/core-skills/bmad-customize/SKILL.md +111 -0
- package/src/core-skills/bmad-customize/scripts/list_customizable_skills.py +231 -0
- package/src/core-skills/bmad-customize/scripts/tests/test_list_customizable_skills.py +249 -0
- package/src/core-skills/bmad-deep-recon/SKILL.md +82 -0
- package/src/core-skills/bmad-deep-recon/assets/research.template.md +18 -0
- package/src/core-skills/bmad-deep-recon/customize.toml +212 -0
- package/src/core-skills/bmad-deep-recon/references/draft.md +8 -0
- package/src/core-skills/bmad-deep-recon/references/finalize.md +11 -0
- package/src/core-skills/bmad-deep-recon/references/html-briefing.md +16 -0
- package/src/core-skills/bmad-deep-recon/references/lifecycle.md +11 -0
- package/src/core-skills/bmad-deep-recon/references/process.md +10 -0
- package/src/core-skills/bmad-deep-recon/references/run.md +73 -0
- package/src/core-skills/bmad-deep-recon/references/selection.md +13 -0
- package/src/core-skills/bmad-deep-recon/references/synthesis.md +16 -0
- package/src/core-skills/bmad-deep-recon/references/verification.md +29 -0
- package/src/core-skills/bmad-deep-recon/scripts/recon_kit.py +322 -0
- package/src/core-skills/bmad-deep-recon/scripts/tests/test_recon_kit.py +144 -0
- package/src/core-skills/bmad-deep-recon/types/academic-lit.md +19 -0
- package/src/core-skills/bmad-deep-recon/types/competitive.md +19 -0
- package/src/core-skills/bmad-deep-recon/types/domain.md +19 -0
- package/src/core-skills/bmad-deep-recon/types/market.md +19 -0
- package/src/core-skills/bmad-deep-recon/types/technical.md +19 -0
- package/src/core-skills/bmad-deep-recon/types/user-voice.md +19 -0
- package/src/core-skills/bmad-forge-idea/SKILL.md +107 -0
- package/src/core-skills/bmad-forge-idea/customize.toml +42 -0
- package/src/core-skills/bmad-forge-idea/scripts/resolve_personas.py +275 -0
- package/src/core-skills/bmad-forge-idea/scripts/tests/test_resolve_personas.py +138 -0
- package/src/core-skills/bmad-help/SKILL.md +75 -0
- package/src/core-skills/bmad-party-mode/SKILL.md +60 -0
- package/src/core-skills/bmad-party-mode/customize.toml +211 -0
- package/src/core-skills/bmad-party-mode/references/create-party.md +70 -0
- package/src/core-skills/bmad-party-mode/references/mode-agent-team.md +13 -0
- package/src/core-skills/bmad-party-mode/references/mode-auto.md +13 -0
- package/src/core-skills/bmad-party-mode/references/mode-subagent.md +31 -0
- package/src/core-skills/bmad-party-mode/references/party-memory.md +51 -0
- package/src/core-skills/bmad-party-mode/scripts/resolve_party.py +282 -0
- package/src/core-skills/bmad-party-mode/scripts/tests/test_resolve_party.py +146 -0
- package/src/core-skills/bmad-review/SKILL.md +49 -0
- package/src/core-skills/bmad-review/customize.toml +141 -0
- package/src/core-skills/bmad-review/references/editorial-common.md +56 -0
- package/src/core-skills/bmad-review/references/lens-adversarial.md +19 -0
- package/src/core-skills/bmad-review/references/lens-edge-case-hunter.md +54 -0
- package/src/core-skills/bmad-review/references/lens-prose.md +7 -0
- package/src/core-skills/bmad-review/references/lens-structure.md +9 -0
- package/src/core-skills/bmad-review/references/lens-verification-gap.md +92 -0
- package/src/core-skills/bmad-review/references/structure-models.md +44 -0
- package/src/core-skills/bmad-review/scripts/tests/test_word_metrics.py +62 -0
- package/src/core-skills/bmad-review/scripts/word_metrics.py +102 -0
- package/src/core-skills/module-help.csv +10 -0
- package/src/core-skills/module.yaml +38 -0
- package/src/core-skills/v6-shims/README.md +25 -0
- package/src/core-skills/v6-shims/bmad-editorial-review/SKILL.md +6 -0
- package/src/core-skills/v6-shims/bmad-editorial-review/customize.toml +31 -0
- package/src/core-skills/v6-shims/bmad-editorial-review-prose/SKILL.md +6 -0
- package/src/core-skills/v6-shims/bmad-editorial-review-structure/SKILL.md +6 -0
- package/src/core-skills/v6-shims/bmad-review-adversarial-general/SKILL.md +6 -0
- package/src/core-skills/v6-shims/bmad-review-edge-case-hunter/SKILL.md +6 -0
- package/src/core-skills/v6-shims/bmad-review-verification-gap/SKILL.md +6 -0
- package/src/scripts/__pycache__/config_utils.cpython-311.pyc +0 -0
- package/src/scripts/config_utils.py +119 -0
- package/src/scripts/memlog.py +224 -0
- package/src/scripts/render_skill.py +401 -0
- package/src/scripts/resolve_config.py +74 -0
- package/src/scripts/resolve_customization.py +99 -0
- 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 +85 -0
- package/src/scripts/tests/test_memlog.py +306 -0
- package/src/scripts/tests/test_resolve_config.py +89 -0
- package/src/scripts/tests/test_resolve_customization.py +77 -0
- package/tools/bundle-web-bundles.js +117 -0
- package/tools/format-workflow-md.js +263 -0
- package/tools/installer/README.md +60 -0
- package/tools/installer/bmad-cli.js +105 -0
- package/tools/installer/cli-utils.js +57 -0
- package/tools/installer/commands/install.js +149 -0
- package/tools/installer/commands/status.js +65 -0
- package/tools/installer/commands/uninstall.js +167 -0
- package/tools/installer/core/config.js +73 -0
- package/tools/installer/core/existing-install.js +121 -0
- package/tools/installer/core/install-paths.js +132 -0
- package/tools/installer/core/installer.js +1767 -0
- package/tools/installer/core/legacy-warnings.js +151 -0
- package/tools/installer/core/manifest-generator.js +859 -0
- package/tools/installer/core/manifest.js +433 -0
- package/tools/installer/core/uv-check.js +195 -0
- package/tools/installer/core/wsl-node-check.js +109 -0
- package/tools/installer/file-ops.js +204 -0
- package/tools/installer/fs-native.js +116 -0
- package/tools/installer/ide/_config-driven.js +972 -0
- package/tools/installer/ide/manager.js +324 -0
- package/tools/installer/ide/platform-codes.js +80 -0
- package/tools/installer/ide/platform-codes.yaml +343 -0
- package/tools/installer/ide/shared/installed-skills.js +50 -0
- package/tools/installer/ide/shared/path-utils.js +219 -0
- package/tools/installer/ide/shared/skill-manifest.js +57 -0
- package/tools/installer/install-messages.yaml +37 -0
- package/tools/installer/list-options.js +210 -0
- package/tools/installer/message-loader.js +83 -0
- package/tools/installer/modules/channel-plan.js +203 -0
- package/tools/installer/modules/channel-resolver.js +241 -0
- package/tools/installer/modules/custom-module-manager.js +924 -0
- package/tools/installer/modules/external-manager.js +671 -0
- package/tools/installer/modules/git-env.js +47 -0
- package/tools/installer/modules/module-help-schema.js +13 -0
- package/tools/installer/modules/official-modules.js +2257 -0
- package/tools/installer/modules/plugin-resolver.js +398 -0
- package/tools/installer/modules/version-resolver.js +336 -0
- package/tools/installer/project-root.js +224 -0
- package/tools/installer/prompts.js +791 -0
- package/tools/installer/set-overrides.js +330 -0
- package/tools/installer/ui.js +2167 -0
- package/tools/installer/yaml-format.js +245 -0
- package/tools/javascript-conventions.md +5 -0
- package/tools/migrate-custom-module-paths.js +124 -0
- package/tools/skill-validator.md +378 -0
- package/tools/validate-published-implementation-model.mjs +68 -0
- package/tools/validate-sidebar-order.js +388 -0
- package/tools/validate-skills.js +735 -0
- package/tools/validate-svg-changes.sh +356 -0
- package/web-bundles/README.md +46 -0
- package/web-bundles/brainstorming-coach/INSTRUCTIONS.md +86 -0
- package/web-bundles/brainstorming-coach/SKILL.md +83 -0
- package/web-bundles/brainstorming-coach/brain-methods.csv +62 -0
- package/web-bundles/bundles.json +139 -0
- package/web-bundles/market-and-industry-research/INSTRUCTIONS.md +88 -0
- package/web-bundles/market-and-industry-research/SKILL.md +59 -0
- package/web-bundles/prd-coach/INSTRUCTIONS.md +86 -0
- package/web-bundles/prd-coach/SKILL.md +101 -0
- package/web-bundles/prd-coach/prd-template.md +165 -0
- package/web-bundles/prd-coach/prd-validation-checklist.md +135 -0
- package/web-bundles/prfaq-coach/INSTRUCTIONS.md +86 -0
- package/web-bundles/prfaq-coach/SKILL.md +139 -0
- package/web-bundles/product-brief-coach/INSTRUCTIONS.md +86 -0
- package/web-bundles/product-brief-coach/SKILL.md +113 -0
- package/web-bundles/ux-coach/INSTRUCTIONS.md +92 -0
- package/web-bundles/ux-coach/SKILL.md +187 -0
- package/web-bundles/ux-coach/ux-validation.md +100 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"""Shared strict TOML loading and structural merge support."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import tomllib
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from typing import Any, Iterable
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ConfigError(ValueError):
|
|
11
|
+
"""Raised when a present configuration layer cannot be used safely."""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
_KEYED_MERGE_FIELDS = ("code", "id")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def load_toml(path: Path, *, required: bool = False) -> dict[str, Any]:
|
|
18
|
+
"""Load a TOML table, allowing absence only for optional layers."""
|
|
19
|
+
if not path.exists():
|
|
20
|
+
if required:
|
|
21
|
+
raise ConfigError(f"required TOML file not found: {path}")
|
|
22
|
+
return {}
|
|
23
|
+
if not path.is_file():
|
|
24
|
+
raise ConfigError(f"TOML layer is not a file: {path}")
|
|
25
|
+
try:
|
|
26
|
+
with path.open("rb") as stream:
|
|
27
|
+
parsed = tomllib.load(stream)
|
|
28
|
+
except tomllib.TOMLDecodeError as error:
|
|
29
|
+
raise ConfigError(f"failed to parse {path}: {error}") from error
|
|
30
|
+
except OSError as error:
|
|
31
|
+
raise ConfigError(f"failed to read {path}: {error}") from error
|
|
32
|
+
if not isinstance(parsed, dict):
|
|
33
|
+
raise ConfigError(f"TOML layer did not parse to a table: {path}")
|
|
34
|
+
return parsed
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def _detect_keyed_merge_field(items: list[Any]) -> str | None:
|
|
38
|
+
if not items or not all(isinstance(item, dict) for item in items):
|
|
39
|
+
return None
|
|
40
|
+
for candidate in _KEYED_MERGE_FIELDS:
|
|
41
|
+
if all(candidate in item for item in items):
|
|
42
|
+
for item in items:
|
|
43
|
+
value = item[candidate]
|
|
44
|
+
if not isinstance(value, str):
|
|
45
|
+
raise ConfigError(
|
|
46
|
+
f"keyed array identifier `{candidate}` must be a string, "
|
|
47
|
+
f"got {type(value).__name__}"
|
|
48
|
+
)
|
|
49
|
+
if not value:
|
|
50
|
+
raise ConfigError(
|
|
51
|
+
f"keyed array identifier `{candidate}` must not be empty"
|
|
52
|
+
)
|
|
53
|
+
return candidate
|
|
54
|
+
return None
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _merge_arrays(base: list[Any], override: list[Any]) -> list[Any]:
|
|
58
|
+
keyed_field = _detect_keyed_merge_field(base + override)
|
|
59
|
+
if keyed_field is None:
|
|
60
|
+
return list(base) + list(override)
|
|
61
|
+
|
|
62
|
+
result: list[Any] = []
|
|
63
|
+
index_by_key: dict[str, int] = {}
|
|
64
|
+
for item in base:
|
|
65
|
+
copied = dict(item)
|
|
66
|
+
index_by_key[copied[keyed_field]] = len(result)
|
|
67
|
+
result.append(copied)
|
|
68
|
+
for item in override:
|
|
69
|
+
copied = dict(item)
|
|
70
|
+
key = copied[keyed_field]
|
|
71
|
+
if key in index_by_key:
|
|
72
|
+
result[index_by_key[key]] = copied
|
|
73
|
+
else:
|
|
74
|
+
index_by_key[key] = len(result)
|
|
75
|
+
result.append(copied)
|
|
76
|
+
return result
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def structural_merge(base: Any, override: Any) -> Any:
|
|
80
|
+
"""Merge tables recursively, keyed table arrays by identity, and append other arrays."""
|
|
81
|
+
if isinstance(base, dict) and isinstance(override, dict):
|
|
82
|
+
result = dict(base)
|
|
83
|
+
for key, value in override.items():
|
|
84
|
+
result[key] = structural_merge(result[key], value) if key in result else value
|
|
85
|
+
return result
|
|
86
|
+
if isinstance(base, list) and isinstance(override, list):
|
|
87
|
+
return _merge_arrays(base, override)
|
|
88
|
+
return override
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def merge_layers(layers: Iterable[dict[str, Any]]) -> dict[str, Any]:
|
|
92
|
+
merged: dict[str, Any] = {}
|
|
93
|
+
for layer in layers:
|
|
94
|
+
merged = structural_merge(merged, layer)
|
|
95
|
+
return merged
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
def load_central_config(project_root: Path) -> dict[str, Any]:
|
|
99
|
+
bmad_dir = project_root / "_bmad"
|
|
100
|
+
return merge_layers(
|
|
101
|
+
(
|
|
102
|
+
load_toml(bmad_dir / "config.toml", required=True),
|
|
103
|
+
load_toml(bmad_dir / "config.user.toml"),
|
|
104
|
+
load_toml(bmad_dir / "custom" / "config.toml"),
|
|
105
|
+
load_toml(bmad_dir / "custom" / "config.user.toml"),
|
|
106
|
+
)
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def load_customization(project_root: Path | None, skill_dir: Path) -> dict[str, Any]:
|
|
111
|
+
skill_name = skill_dir.name
|
|
112
|
+
custom_dir = project_root / "_bmad" / "custom" if project_root else None
|
|
113
|
+
return merge_layers(
|
|
114
|
+
(
|
|
115
|
+
load_toml(skill_dir / "customize.toml", required=True),
|
|
116
|
+
load_toml(custom_dir / f"{skill_name}.toml") if custom_dir else {},
|
|
117
|
+
load_toml(custom_dir / f"{skill_name}.user.toml") if custom_dir else {},
|
|
118
|
+
)
|
|
119
|
+
)
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
# /// script
|
|
3
|
+
# requires-python = ">=3.8"
|
|
4
|
+
# ///
|
|
5
|
+
"""memlog — an append-only memory log: LLM-optimal working memory for a skill.
|
|
6
|
+
|
|
7
|
+
A memlog is the dense, chronological record of everything that mattered in a piece of
|
|
8
|
+
work — every item the user generated or accepted — kept minimal like human memory: only
|
|
9
|
+
what's important, never bloated. It persists ACROSS sessions, so a fresh session can
|
|
10
|
+
load it and continue. It is NOT a deliverable; downstream artifacts (a brief, a PRD, a
|
|
11
|
+
deck, a report) are *derived* from it on demand. The host skill supplies the vocabulary
|
|
12
|
+
by how it calls `append` — the tool stays neutral.
|
|
13
|
+
|
|
14
|
+
It is a FLAT log: there are no sections or grouping. Every entry is one line, recorded
|
|
15
|
+
at the END in the order it happened. The chronology itself is the structure — an event
|
|
16
|
+
like "started technique X" is just another entry, same as an idea or an insight.
|
|
17
|
+
|
|
18
|
+
Three invariants make it trustworthy:
|
|
19
|
+
|
|
20
|
+
1. Append-only, chronological. Entries land at the end, in the order they happen.
|
|
21
|
+
Nothing is ever inserted backward, reordered, edited, or removed. There is no
|
|
22
|
+
edit or delete subcommand by design; history is never rewritten.
|
|
23
|
+
2. Write-only / blind. Every command is an atomic, context-free write and echoes the
|
|
24
|
+
new state as one line of JSON, so the caller never re-reads the file mid-session.
|
|
25
|
+
The one time the file is read is on resume — and the caller reads it itself, not
|
|
26
|
+
via this script.
|
|
27
|
+
3. No lifecycle status. A memory log has no "complete" flag. Whether the work is done,
|
|
28
|
+
blocked, or paused is itself a fact that happened, so it is recorded as an entry
|
|
29
|
+
(e.g. `append --type event --text "session complete"`), never as frontmatter the
|
|
30
|
+
log would have to mutate. The chronology stays the single source of truth, and a
|
|
31
|
+
resume learns the state by reading the last entries — the same way it learns
|
|
32
|
+
everything else.
|
|
33
|
+
|
|
34
|
+
Atomicity: every write goes to a temp file, is flushed and fsync'd, then atomically
|
|
35
|
+
renamed over the target, so a crash never leaves a half-written entry.
|
|
36
|
+
|
|
37
|
+
The file shape (.memlog.md):
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
topic: Onboarding flow for a budgeting app
|
|
41
|
+
goal: lift week-1 retention
|
|
42
|
+
updated: 2026-06-07T14:22
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
- (note) user picked techniques: SCAMPER, then Six Thinking Hats
|
|
46
|
+
- (technique) started SCAMPER
|
|
47
|
+
- (idea) skip the signup wall: let people try with sample data first
|
|
48
|
+
- (idea) auto-import one bank account so the first screen shows real numbers
|
|
49
|
+
- (question) is open-banking consent too heavy for step one?
|
|
50
|
+
- (insight) the "scary numbers" risk and the "real numbers" idea are one lever: show real data, pre-categorized
|
|
51
|
+
- (direction) optimize for the anxious first-timer, not the power user
|
|
52
|
+
- (decision) lead with one pre-categorized account; defer multi-account import
|
|
53
|
+
- (event) session complete
|
|
54
|
+
|
|
55
|
+
Each entry may carry an optional `--type` — what KIND it is (idea, insight, question,
|
|
56
|
+
decision, direction, assumption, gap, note, event, …) — and an optional `--by` naming
|
|
57
|
+
who it came from (e.g. `user`, `coach`), for sessions where authorship matters. Both
|
|
58
|
+
render into one short inline tag: `(idea)`, `(idea by user)`, `(by coach)`. Omit them
|
|
59
|
+
for a plain note. The host skill names the vocabulary; the script does not enforce one.
|
|
60
|
+
|
|
61
|
+
Commands:
|
|
62
|
+
init (--workspace DIR | --path FILE) [--field k=v ...] create the memlog (errors if it exists)
|
|
63
|
+
append (--workspace DIR | --path FILE) --text STR [--type T] [--by W] append one entry at the end
|
|
64
|
+
set (--workspace DIR | --path FILE) --key K --value V set/replace a descriptive frontmatter field
|
|
65
|
+
|
|
66
|
+
Addressing: `--workspace` is the run folder, and the memlog is always {workspace}/.memlog.md.
|
|
67
|
+
`--path` points straight at the memlog file instead, for callers that already hold the path.
|
|
68
|
+
"""
|
|
69
|
+
from __future__ import annotations # keep type-hint syntax lazy so the script runs on 3.8+
|
|
70
|
+
|
|
71
|
+
import argparse
|
|
72
|
+
import json
|
|
73
|
+
import os
|
|
74
|
+
import sys
|
|
75
|
+
from datetime import datetime
|
|
76
|
+
from pathlib import Path
|
|
77
|
+
|
|
78
|
+
MEMLOG = ".memlog.md"
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def now() -> str:
|
|
82
|
+
return datetime.now().strftime("%Y-%m-%dT%H:%M")
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def resolve(args) -> Path:
|
|
86
|
+
"""The memlog file, from either addressing mode: {workspace}/.memlog.md or an explicit --path."""
|
|
87
|
+
return Path(args.path) if args.path else Path(args.workspace) / MEMLOG
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def split(text: str) -> tuple[dict, str]:
|
|
91
|
+
"""Return (frontmatter dict in source order, body str). Frontmatter is plain key: value.
|
|
92
|
+
|
|
93
|
+
The closing fence is the first line that is *exactly* `---`, so a `---` inside a
|
|
94
|
+
field value (topic/goal are free user text) never truncates the frontmatter.
|
|
95
|
+
"""
|
|
96
|
+
lines = text.splitlines()
|
|
97
|
+
if not lines or lines[0] != "---":
|
|
98
|
+
raise ValueError(".memlog.md has no frontmatter")
|
|
99
|
+
end = next((i for i in range(1, len(lines)) if lines[i] == "---"), None)
|
|
100
|
+
if end is None:
|
|
101
|
+
raise ValueError(".memlog.md frontmatter is not terminated")
|
|
102
|
+
meta: dict[str, str] = {}
|
|
103
|
+
for line in lines[1:end]:
|
|
104
|
+
if ":" in line:
|
|
105
|
+
k, v = line.split(":", 1)
|
|
106
|
+
meta[k.strip()] = v.strip()
|
|
107
|
+
return meta, "\n".join(lines[end + 1:]).lstrip("\n")
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def render(meta: dict, body: str) -> str:
|
|
111
|
+
# Neutralize newlines in values so a multi-line field can't break the fence on re-read.
|
|
112
|
+
fm = "\n".join(f"{k}: {' '.join(str(v).splitlines())}" for k, v in meta.items())
|
|
113
|
+
return "---\n" + fm + "\n---\n\n" + body.rstrip("\n") + "\n"
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
def touch(meta: dict) -> None:
|
|
117
|
+
"""Stamp `updated` and keep it last so the field order stays predictable."""
|
|
118
|
+
meta.pop("updated", None)
|
|
119
|
+
meta["updated"] = now()
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def write_atomic(path: Path, text: str) -> None:
|
|
123
|
+
"""Temp + flush + fsync + atomic rename, so a crash never half-writes an entry."""
|
|
124
|
+
tmp = path.with_suffix(path.suffix + ".tmp")
|
|
125
|
+
with open(tmp, "w", encoding="utf-8") as f:
|
|
126
|
+
f.write(text)
|
|
127
|
+
f.flush()
|
|
128
|
+
os.fsync(f.fileno())
|
|
129
|
+
os.replace(tmp, path)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
def entry_count(body: str) -> int:
|
|
133
|
+
return sum(1 for ln in body.splitlines() if ln.startswith("- "))
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def ack(path: Path, body: str) -> None:
|
|
137
|
+
"""Echo new state so the caller never re-reads the file to know where it stands."""
|
|
138
|
+
print(json.dumps({
|
|
139
|
+
"ok": True,
|
|
140
|
+
"memlog": str(path),
|
|
141
|
+
"entries": entry_count(body),
|
|
142
|
+
}))
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
def cmd_init(args) -> int:
|
|
146
|
+
path = resolve(args)
|
|
147
|
+
if path.exists():
|
|
148
|
+
print(f"error: {path} already exists; use append/set to update it", file=sys.stderr)
|
|
149
|
+
return 2
|
|
150
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
151
|
+
meta: dict[str, str] = {}
|
|
152
|
+
for pair in args.field or []:
|
|
153
|
+
if "=" not in pair:
|
|
154
|
+
print(f"error: --field expects key=value, got {pair!r}", file=sys.stderr)
|
|
155
|
+
return 2
|
|
156
|
+
k, v = pair.split("=", 1)
|
|
157
|
+
meta[k.strip()] = v.strip()
|
|
158
|
+
touch(meta)
|
|
159
|
+
write_atomic(path, render(meta, ""))
|
|
160
|
+
ack(path, "")
|
|
161
|
+
return 0
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
def cmd_append(args) -> int:
|
|
165
|
+
path = resolve(args)
|
|
166
|
+
meta, body = split(path.read_text(encoding="utf-8"))
|
|
167
|
+
text = " ".join(args.text.split()) # collapse newlines/runs → one-line entry, no prose bloat
|
|
168
|
+
label = args.type or ""
|
|
169
|
+
if args.by:
|
|
170
|
+
label = f"{label} by {args.by}".strip() # attribution: "(idea by user)" / "(by coach)"
|
|
171
|
+
tag = f"({label}) " if label else ""
|
|
172
|
+
entry = f"- {tag}{text}"
|
|
173
|
+
body = (body.rstrip("\n") + "\n" + entry) if body.strip() else entry # always at the end
|
|
174
|
+
touch(meta)
|
|
175
|
+
write_atomic(path, render(meta, body))
|
|
176
|
+
ack(path, body)
|
|
177
|
+
return 0
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
def cmd_set(args) -> int:
|
|
181
|
+
path = resolve(args)
|
|
182
|
+
meta, body = split(path.read_text(encoding="utf-8"))
|
|
183
|
+
meta[args.key] = args.value
|
|
184
|
+
touch(meta)
|
|
185
|
+
write_atomic(path, render(meta, body))
|
|
186
|
+
ack(path, body)
|
|
187
|
+
return 0
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
def add_target(sp) -> None:
|
|
191
|
+
"""Every command addresses the memlog the same way: a run folder or an explicit path."""
|
|
192
|
+
g = sp.add_mutually_exclusive_group(required=True)
|
|
193
|
+
g.add_argument("--workspace", help="run folder; the memlog is {workspace}/.memlog.md")
|
|
194
|
+
g.add_argument("--path", help="explicit memlog file path (alternative to --workspace)")
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
def main(argv: list[str] | None = None) -> int:
|
|
198
|
+
p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
|
199
|
+
sub = p.add_subparsers(dest="cmd", required=True)
|
|
200
|
+
|
|
201
|
+
pi = sub.add_parser("init", help="create the memlog")
|
|
202
|
+
add_target(pi)
|
|
203
|
+
pi.add_argument("--field", action="append", metavar="KEY=VALUE", help="frontmatter field (repeatable)")
|
|
204
|
+
pi.set_defaults(func=cmd_init)
|
|
205
|
+
|
|
206
|
+
pa = sub.add_parser("append", help="append one entry at the end")
|
|
207
|
+
add_target(pa)
|
|
208
|
+
pa.add_argument("--text", required=True)
|
|
209
|
+
pa.add_argument("--type", help="entry kind, rendered as an inline tag")
|
|
210
|
+
pa.add_argument("--by", help="who the entry came from (e.g. user, coach); rendered into the tag")
|
|
211
|
+
pa.set_defaults(func=cmd_append)
|
|
212
|
+
|
|
213
|
+
pset = sub.add_parser("set", help="set a descriptive frontmatter field")
|
|
214
|
+
add_target(pset)
|
|
215
|
+
pset.add_argument("--key", required=True)
|
|
216
|
+
pset.add_argument("--value", required=True)
|
|
217
|
+
pset.set_defaults(func=cmd_set)
|
|
218
|
+
|
|
219
|
+
args = p.parse_args(argv)
|
|
220
|
+
return args.func(args)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
if __name__ == "__main__":
|
|
224
|
+
sys.exit(main())
|