Standardize builders: runtime memlog + uv script invocations#98
Conversation
Reference {project-root}/_bmad/scripts/memlog.py (sourced from bmm core
src/scripts) instead of bundling a per-skill copy, in bmad-workflow-builder
and bmad-agent-builder. Remove the bundled memlog.py copies and the
workflow-builder memlog test; rewrite the working-state teaching so produced
skills reference the runtime CLI rather than copying it in.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (15)
✅ Files skipped from review due to trivial changes (4)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughUpdates all Python script invocations across skill documentation and templates to use ChangesScript invocation standardization and memlog consolidation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 Augment PR SummarySummary: This PR standardizes the two builder skills to use the runtime-installed Changes:
Why: 🤖 Was this summary useful? React with 👍 or 👎 |
|
|
||
| ```bash | ||
| python3 scripts/memlog.py append --path {target-agent-path}/.memlog.md --type event --text "analyze: grade <grade>, <c> critical / <h> high / <m> medium / <l> low, report .analysis/<timestamp>/agent-analysis-report.html" | ||
| python3 {project-root}/_bmad/scripts/memlog.py append --path {target-agent-path}/.memlog.md --type event --text "analyze: grade <grade>, <c> critical / <h> high / <m> medium / <l> low, report .analysis/<timestamp>/agent-analysis-report.html" |
There was a problem hiding this comment.
Because this is shown as a bash snippet, {project-root} will be a literal string if copy/pasted; unless something substitutes it before execution, the command will fail to locate memlog.py. Consider clarifying that the placeholder must be resolved (and safely handled if the resolved path can contain spaces) before running.
Severity: low
Other Locations
skills/bmad-workflow-builder/references/scan-orchestration.md:112skills/bmad-workflow-builder/assets/SKILL-template.md:49
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
| @@ -1,247 +0,0 @@ | |||
| # /// script | |||
There was a problem hiding this comment.
With these tests removed, this repo no longer exercises the memlog CLI invariants (append-only ordering, atomic writes, JSON ack), so regressions in the runtime-installed memlog could slip by unnoticed. Consider ensuring equivalent coverage exists wherever {project-root}/_bmad/scripts/memlog.py is sourced/shipped.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
Replace `python3 <script>` with `uv run <script>` across bmad-workflow-builder and bmad-agent-builder: prompt-facing invocations, script usage strings, and the emitted init-sanctum/wake template usage. Align workflow-builder's script-standards.md to mandate `uv run` for all scripts, matching agent-builder. Left as-is: `#!/usr/bin/env python3` shebangs (stdlib-script convention per script-standards), "runs under a bare python3" capability notes, and `python3 -m pytest` test-runner docstrings.
Two related standardizations for
bmad-workflow-builderandbmad-agent-builder.1. Runtime-installed memlog
Point both builders at the runtime memlog CLI at
{project-root}/_bmad/scripts/memlog.pyinstead of each skill bundling its own copy. Canonical source isbmad-bmm/src/scripts/memlog.py, which installs to{project-root}/_bmad/scripts/. One shared copy, no drift;{project-root}resolves at runtime so the call works from any skill root.scripts/memlog.pycopies (and workflow-builder'sscripts/tests/test_memlog.py).2.
uv runscript invocationsReplace
python3 <script>withuv run <script>across prompt-facing invocations, script usage strings, and the emitted init-sanctum/wake template usage. Alignbmad-workflow-builder/references/script-standards.mdto mandateuv runfor all scripts, matching agent-builder.Left as-is (not invocations):
#!/usr/bin/env python3shebangs (stdlib-script convention per script-standards), "runs under a bare python3" capability notes, andpython3 -m pytesttest-runner docstrings.Verification
scripts/memlog.pyreferences remain; nothing imports the deleted module.python3occurrences remain (shebangs / capability notes / pytest docstrings); edited scripts compile.bmm core skills are being standardized separately.
Summary by CodeRabbit
Refactor
Documentation
uv run, and to reference the centralized memlog and related tooling paths consistently.Tests