fix(skills): stop activation from executing project resolvers - #2632
fix(skills): stop activation from executing project resolvers#2632rashidiff wants to merge 6 commits into
Conversation
📝 WalkthroughWalkthroughChangesThe activation documentation for BMM, core, and legacy shim skills now specifies direct TOML customization merging instead of runtime resolver scripts. Selected skills also define ordered config TOML merging, field extraction, and neutral defaults. Activation Resolution
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/bmm-skills/3-solutioning/bmad-agent-architect/SKILL.md (1)
23-31: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winReplace the impossible “If the script fails” branch.
The preceding sentence forbids executing scripts, so this fallback is contradictory and unreachable. Replace it with explicit TOML error handling: the base
customize.tomlis required and should fail activation if missing or invalid; optional team/user files may be skipped with a warning when absent or unreadable, matching the existing resolver behavior.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/bmm-skills/3-solutioning/bmad-agent-architect/SKILL.md` around lines 23 - 31, Replace the contradictory “If the script fails” fallback in the activation instructions with explicit TOML error handling: require the base customize.toml and fail activation when it is missing or invalid; skip absent or unreadable team and user override files with warnings, matching the existing resolver behavior. Apply this change in src/bmm-skills/3-solutioning/bmad-agent-architect/SKILL.md:23-31, src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/SKILL.md:52-60, src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/SKILL.md:54-62, src/bmm-skills/3-solutioning/bmad-generate-project-context/SKILL.md:33-41, src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md:23-31, src/bmm-skills/4-implementation/bmad-checkpoint-preview/SKILL.md:23-31, src/bmm-skills/4-implementation/bmad-code-review/SKILL.md:24-32, src/bmm-skills/4-implementation/bmad-correct-course/SKILL.md:23-31, src/bmm-skills/4-implementation/bmad-create-story/SKILL.md:33-41, src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md:81-89, and src/bmm-skills/4-implementation/bmad-dev-story/SKILL.md:30-38.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/bmm-skills/1-analysis/bmad-agent-analyst/SKILL.md`:
- Around line 23-25: Remove the obsolete “If the script fails” fallback from the
activation instructions in src/bmm-skills/1-analysis/bmad-agent-analyst/SKILL.md
lines 23-25, src/bmm-skills/1-analysis/bmad-agent-tech-writer/SKILL.md lines
23-25, src/bmm-skills/1-analysis/bmad-document-project/SKILL.md lines 23-25,
src/bmm-skills/1-analysis/bmad-prfaq/SKILL.md lines 33-35,
src/bmm-skills/4-implementation/bmad-qa-generate-e2e-tests/SKILL.md lines 23-25,
src/bmm-skills/4-implementation/bmad-retrospective/SKILL.md lines 39-41,
src/bmm-skills/4-implementation/bmad-sprint-planning/SKILL.md lines 23-25, and
src/bmm-skills/4-implementation/bmad-sprint-status/SKILL.md lines 23-25; if
retaining fallback behavior, rewrite each branch to handle only TOML read
failures while preserving data-only activation and never executing resolver
scripts.
- Line 23: Update the customization resolver documentation in the English,
French, and Vietnamese guides to describe direct TOML loading and merging during
activation instead of invoking resolve_customization.py. Revise examples and
fallback text to reflect the base customize.toml plus optional project and user
override files, without directing users to installer-owned scripts.
In `@src/bmm-skills/2-plan-workflows/bmad-agent-pm/SKILL.md`:
- Line 23: Remove the obsolete script-failure fallback blocks immediately
following the activation instructions in both
src/bmm-skills/2-plan-workflows/bmad-agent-pm/SKILL.md (Lines 25–31) and
src/bmm-skills/2-plan-workflows/bmad-agent-ux-designer/SKILL.md (Lines 25–31);
retain the direct-TOML resolution instructions and resolved agent values in each
activation section.
In `@src/bmm-skills/3-solutioning/bmad-agent-architect/SKILL.md`:
- Around line 21-23: Update the relevant activation documentation under docs/ to
describe the TOML-based customization contract: read skill-root customize.toml
first, then optionally merge the project and user override files in order, with
scalar overrides, deep table merges, and the specified array handling.
Explicitly document that project scripts are not executed during activation and
that resolved agent values drive activation.
In `@src/bmm-skills/3-solutioning/bmad-architecture/SKILL.md`:
- Around line 53-54: The activation flow in bmad-architecture must defer
`{workflow.activation_steps_append}` until after merged configuration is
resolved and the user is greeted. Update the instructions around the workflow
activation steps so prepend hooks run first, config resolution and greeting
follow, and append hooks run last, matching the ordering used by the other
activation flows.
In `@src/core-skills/bmad-advanced-elicitation/SKILL.md`:
- Line 17: Document the activation contract in all six affected files:
src/core-skills/bmad-advanced-elicitation/SKILL.md:17-17 must describe direct
customization TOML merging; src/core-skills/bmad-brainstorming/SKILL.md:21-23
and src/core-skills/bmad-forge-idea/SKILL.md:25-27 and
src/core-skills/bmad-party-mode/SKILL.md:19-20 must describe direct
customization and core-config TOML merging;
src/core-skills/bmad-deep-recon/SKILL.md:40-41 must describe direct
customization/config merging and hook ordering; and
src/core-skills/bmad-review/SKILL.md:27-27 must describe direct customization
merging and forwarded activation behavior. State that activation reads and
merges the relevant TOML layers directly rather than executing resolver scripts.
In `@src/core-skills/bmad-deep-recon/SKILL.md`:
- Around line 40-41: Reorder activation so central configuration is fully
resolved before executing {workflow.activation_steps_append}. In the activation
flow described by items 1–2, resolve user_name, project_name, output_folder, and
related values first, then run the append hooks while preserving the existing
prepend-hook ordering.
---
Outside diff comments:
In `@src/bmm-skills/3-solutioning/bmad-agent-architect/SKILL.md`:
- Around line 23-31: Replace the contradictory “If the script fails” fallback in
the activation instructions with explicit TOML error handling: require the base
customize.toml and fail activation when it is missing or invalid; skip absent or
unreadable team and user override files with warnings, matching the existing
resolver behavior. Apply this change in
src/bmm-skills/3-solutioning/bmad-agent-architect/SKILL.md:23-31,
src/bmm-skills/3-solutioning/bmad-check-implementation-readiness/SKILL.md:52-60,
src/bmm-skills/3-solutioning/bmad-create-epics-and-stories/SKILL.md:54-62,
src/bmm-skills/3-solutioning/bmad-generate-project-context/SKILL.md:33-41,
src/bmm-skills/4-implementation/bmad-agent-dev/SKILL.md:23-31,
src/bmm-skills/4-implementation/bmad-checkpoint-preview/SKILL.md:23-31,
src/bmm-skills/4-implementation/bmad-code-review/SKILL.md:24-32,
src/bmm-skills/4-implementation/bmad-correct-course/SKILL.md:23-31,
src/bmm-skills/4-implementation/bmad-create-story/SKILL.md:33-41,
src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md:81-89, and
src/bmm-skills/4-implementation/bmad-dev-story/SKILL.md:30-38.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 0e0a44d8-a2e1-4fb8-b29f-684a840f8482
📒 Files selected for processing (39)
src/bmm-skills/1-analysis/bmad-agent-analyst/SKILL.mdsrc/bmm-skills/1-analysis/bmad-agent-tech-writer/SKILL.mdsrc/bmm-skills/1-analysis/bmad-document-project/SKILL.mdsrc/bmm-skills/1-analysis/bmad-prfaq/SKILL.mdsrc/bmm-skills/1-analysis/bmad-product-brief/SKILL.mdsrc/bmm-skills/2-plan-workflows/bmad-agent-pm/SKILL.mdsrc/bmm-skills/2-plan-workflows/bmad-agent-ux-designer/SKILL.mdsrc/bmm-skills/2-plan-workflows/bmad-prd/SKILL.mdsrc/bmm-skills/2-plan-workflows/bmad-spec/SKILL.mdsrc/bmm-skills/2-plan-workflows/bmad-ux/SKILL.mdsrc/bmm-skills/3-solutioning/bmad-agent-architect/SKILL.mdsrc/bmm-skills/3-solutioning/bmad-architecture/SKILL.mdsrc/bmm-skills/3-solutioning/bmad-check-implementation-readiness/SKILL.mdsrc/bmm-skills/3-solutioning/bmad-create-epics-and-stories/SKILL.mdsrc/bmm-skills/3-solutioning/bmad-generate-project-context/SKILL.mdsrc/bmm-skills/4-implementation/bmad-agent-dev/SKILL.mdsrc/bmm-skills/4-implementation/bmad-checkpoint-preview/SKILL.mdsrc/bmm-skills/4-implementation/bmad-code-review/SKILL.mdsrc/bmm-skills/4-implementation/bmad-correct-course/SKILL.mdsrc/bmm-skills/4-implementation/bmad-create-story/SKILL.mdsrc/bmm-skills/4-implementation/bmad-dev-auto/SKILL.mdsrc/bmm-skills/4-implementation/bmad-dev-story/SKILL.mdsrc/bmm-skills/4-implementation/bmad-qa-generate-e2e-tests/SKILL.mdsrc/bmm-skills/4-implementation/bmad-retrospective/SKILL.mdsrc/bmm-skills/4-implementation/bmad-sprint-planning/SKILL.mdsrc/bmm-skills/4-implementation/bmad-sprint-status/SKILL.mdsrc/bmm-skills/v6-shims/bmad-create-architecture/SKILL.mdsrc/bmm-skills/v6-shims/bmad-create-prd/SKILL.mdsrc/bmm-skills/v6-shims/bmad-domain-research/SKILL.mdsrc/bmm-skills/v6-shims/bmad-edit-prd/SKILL.mdsrc/bmm-skills/v6-shims/bmad-market-research/SKILL.mdsrc/bmm-skills/v6-shims/bmad-technical-research/SKILL.mdsrc/bmm-skills/v6-shims/bmad-validate-prd/SKILL.mdsrc/core-skills/bmad-advanced-elicitation/SKILL.mdsrc/core-skills/bmad-brainstorming/SKILL.mdsrc/core-skills/bmad-deep-recon/SKILL.mdsrc/core-skills/bmad-forge-idea/SKILL.mdsrc/core-skills/bmad-party-mode/SKILL.mdsrc/core-skills/bmad-review/SKILL.md
Greptile SummaryThis PR replaces activation-time
Confidence Score: 3/5
|
| Filename | Overview |
|---|---|
| src/bmm-skills/agents/bmad-agent-analyst/SKILL.md | Step 1 updated to prohibit resolver-script execution during activation; orphaned "If the script fails" fallback block (lines 25–31) still implies a script was attempted, contradicting the new instruction (previously flagged). |
| src/bmm-skills/agents/bmad-agent-architect/SKILL.md | Same pattern as analyst: Step 1 correctly blocks resolver execution, but the "If the script fails" fallback (line 25) remains, creating an instruction-level contradiction. |
| src/bmm-skills/plan/bmad-project-context/SKILL.md | Not included in the PR changeset; line 21 still runs resolve_customization.py at activation, leaving the security boundary from issue #2624 unpatched for this skill. |
| src/bmm-skills/plan/bmad-sprint-planning/SKILL.md | Not included in the PR changeset; line 12 still executes resolve_customization.py during activation. |
| src/bmm-skills/ship/bmad-retrospective/SKILL.md | Not included in the PR changeset; line 28 runs resolve_customization.py (with --no-cache) during activation. |
| src/bmm-skills/v6-shims/bmad-sprint-status/SKILL.md | Not included in the PR changeset; line 12 still calls resolve_customization.py during activation for this deprecated shim. |
| src/core-skills/bmad-party-mode/SKILL.md | Activation steps patched correctly; Conventions section (line 13) still describes resolve_config.py and resolve_customization.py as the tools for config and workflow resolution without noting the activation-time restriction (previously flagged). |
| src/bmm-skills/plan/bmad-spec/SKILL.md | Config resolve step updated from script to four-layer merge description; the layer description omits specific file names (previously flagged inline thread). |
| src/core-skills/bmad-forge-idea/SKILL.md | Activation steps correctly updated; Conventions section (line 20) still mentions resolve_customization.py and resolve_config.py as shared scripts without noting they must not be invoked during activation. |
| docs/zh-cn/explanation/build.md | Whitespace-only change (trailing space removed); no logic impact. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Skill Activation] --> B{Resolve Customization}
B -->|Old path — REMOVED in this PR| C["Execute resolve_customization.py\nfrom {project-root}/_bmad/scripts/"]
B -->|New path — 31 of 35 SKILL.md files| D["Read {skill-root}/customize.toml\n+ merge custom/*.toml layers\ndirectly in-context"]
B -->|Still old path — 4 files NOT in PR| E["bmad-project-context\nbmad-sprint-planning\nbmad-retrospective\nbmad-sprint-status"]
C --> F["Arbitrary project-tree code\nexecuted at startup"]
D --> G["Config resolved safely\nfrom TOML only"]
E --> F
F --> H["Security boundary\nnot fully closed"]
G --> I[Activation complete]
Reviews (6): Last reviewed commit: "Merge branch 'main' into main" | Re-trigger Greptile
|
Conflict solved |
|
Ready to merge |
What
Updated BMAD skill activation instructions so they no longer execute
resolve_customization.pyorresolve_config.pyfrom{project-root}/_bmad/scriptsduring activation, and instead resolve customization/config by directly merging the documented TOML layers.Why
This removes the activation-time execution path for project-supplied resolver scripts, so
_bmad/stays data-only during activation and skill startup no longer trusts arbitrary code from the working tree. (#2624)How
resolve_customization.pycalls in affectedSKILL.mdfiles with explicit TOML merge instructions using base, team, and user customization layers.resolve_config.pycalls in affectedSKILL.mdfiles with direct four-layer config merge instructions.workflow.on_completeuntouched so the fix stays scoped to the reported issue.Testing
I did not add or run tests per your instruction. I did run
npm ci && npm run quality, but the repo’sdocs:buildstep fails on Windows by design because that pipeline explicitly does not support Windows.