Skip to content

fix(templates): replace @ path prefixes with {project-root}#1769

Merged
bmadcode merged 2 commits intobmad-code-org:mainfrom
dickymoore:fix/1767-skill-path-and-workflow-config-wording
Mar 1, 2026
Merged

fix(templates): replace @ path prefixes with {project-root}#1769
bmadcode merged 2 commits intobmad-code-org:mainfrom
dickymoore:fix/1767-skill-path-and-workflow-config-wording

Conversation

@dickymoore
Copy link
Copy Markdown
Contributor

@dickymoore dickymoore commented Feb 25, 2026

Summary

Narrowed scope per maintainer request:

  • Replace legacy @... path syntax with explicit {project-root}/... in installer templates.
  • Keep wording and logic unchanged (no yaml/workflow-config terminology refactor, no generator/handler behavior changes).

Scope (path syntax only)

  • tools/cli/installers/lib/ide/templates/agent-command-template.md
  • tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md
  • tools/cli/installers/lib/ide/templates/combined/default-workflow.md
  • tools/cli/installers/lib/ide/templates/workflow-command-template.md
  • tools/cli/installers/lib/ide/templates/workflow-commander.md

Out of Scope (intentionally removed)

  • workflow/yaml wording adjustments
  • handler wording changes
  • generator/path normalization code changes
  • unrelated template path-contract refinements

Validation

  • no @_bmad, @{project-root}, or @{{workflow_path}} remains in touched templates
  • npx --yes markdownlint-cli2 on the 5 touched template files passes

Fixes #1767 (path syntax portion)

@dickymoore dickymoore marked this pull request as ready for review February 25, 2026 16:22
@github-actions
Copy link
Copy Markdown
Contributor

@coderabbitai review

@augmentcode
Copy link
Copy Markdown

augmentcode bot commented Feb 25, 2026

🤖 Augment PR Summary

Summary: Normalizes BMAD installer command/workflow templates to use explicit {project-root}/_bmad/… paths instead of @_bmad/… variants.

Why: Aligns template wording and path syntax so generated instructions consistently reference the correct workflow-config file type/location (markdown or YAML).

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 25, 2026

📝 Walkthrough

Walkthrough

This PR normalizes path conventions across template files by converting @_bmad/... references to {project-root}/_bmad/... format and updates terminology from "yaml path" to "workflow-config path" for consistency and clarity in generated agent and workflow instructions.

Changes

Cohort / File(s) Summary
Handler and Agent Templates
src/utility/agent-components/handler-workflow.txt, tools/cli/installers/lib/ide/templates/agent-command-template.md
Updated path convention from @_bmad/... to {project-root}/_bmad/... and standardized "workflow-config path" terminology in agent activation instructions.
Workflow Yaml Templates
tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md, tools/cli/installers/lib/ide/templates/combined/kiro-workflow-yaml.md
Replaced @{project-root}/... placeholders with {project-root}/... and clarified step descriptions to use "workflow-config path" instead of "yaml path" when referencing configuration files.
Workflow Command Templates
tools/cli/installers/lib/ide/templates/combined/default-workflow.md, tools/cli/installers/lib/ide/templates/workflow-command-template.md, tools/cli/installers/lib/ide/templates/workflow-commander.md
Prefixed workflow path references with {project-root}/ to standardize path resolution conventions across command and loader instructions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • bmadcode
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR fully addresses all three coding objectives from issue #1767: normalizing path syntax from @_bmad/ to {project-root}/_bmad/ [#1767], replacing 'yaml path' wording with 'workflow-config path' [#1767], and ensuring consistency across installer templates [#1767].
Out of Scope Changes check ✅ Passed All changes are directly scoped to the objectives: template text normalization and wording clarification only, with no workflow logic, execution engine, or unrelated template changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title clearly and concisely describes the main change: replacing @ path prefixes with {project-root} in templates, which matches the primary objective of normalizing path syntax across installer templates.
Description check ✅ Passed The description is directly related to the changeset, providing clear context about the scope (path syntax replacement), files affected, and validation performed, though it notes intentional scope limitations.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/utility/agent-components/handler-workflow.txt (1)

1-3: ⚠️ Potential issue | 🟡 Minor

YAML-specific example still contradicts workflow-config wording update.

Line 2 still instructs workflow="path/to/workflow.yaml", which reintroduces the same ambiguity this PR is trying to remove. Use a neutral example like path/to/workflow-config.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/utility/agent-components/handler-workflow.txt` around lines 1 - 3, The
example in the handler block still uses workflow="path/to/workflow.yaml", which
conflicts with the updated wording; update the example under the <handler
type="workflow"> section to use a neutral identifier like
workflow="path/to/workflow-config" (or similar non-file-specific token) so it no
longer implies a file extension and matches the workflow-config wording change.
🧹 Nitpick comments (3)
tools/cli/installers/lib/ide/templates/workflow-commander.md (1)

5-5: Use a quoted path token in the critical command string.

Line 5 embeds an unquoted interpolated path. If a generated path contains spaces, parsing becomes brittle for downstream LLM/tool consumers.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tools/cli/installers/lib/ide/templates/workflow-commander.md` at line 5, The
interpolated path in the critical command string ("LOAD the FULL
{project-root}/{{workflow_path}}") is unquoted and can break if the generated
path contains spaces; update the template to wrap the interpolated token in
quotes (e.g., use "LOAD the FULL \"{project-root}/{{workflow_path}}\"" or
equivalent) so the {project-root}/{{workflow_path}} token is always treated as a
single quoted path token at runtime.
tools/cli/installers/lib/ide/templates/combined/default-workflow.md (1)

6-6: Quote and normalize the interpolated workflow path.

Line 6 assumes {{path}} is clean. If it starts with / or contains spaces, the generated instruction can produce ambiguous or malformed path text. Add an explicit normalization rule in template wording (e.g., “without leading slash”) and quote the final path token.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tools/cli/installers/lib/ide/templates/combined/default-workflow.md` at line
6, The template assumes {{path}} is already normalized; update the template
wording in combined/default-workflow.md to explicitly require/describe a
normalized, quoted path: instruct users to provide {{path}} without a leading
slash (or strip any leading slash) and to quote the final path token (e.g., wrap
{{path}} in quotes) so spaces are preserved and the full generated path
{project-root}/{{bmadFolderName}}/{{path}} is unambiguous; reference the
{{path}} and {{bmadFolderName}} tokens in the message so maintainers know which
variables to adjust.
src/utility/agent-components/handler-workflow.txt (1)

9-9: "todo" sentinel check is too brittle and case-sensitive.

Line 9 only catches exact lowercase "todo". Values like "TODO" or whitespace-padded placeholders will bypass the guard and fail later.

Proposed fix
-6. If workflow-config path is "todo", inform user the workflow hasn't been implemented yet
+6. If workflow-config path normalizes to "todo" (case-insensitive, trimmed), inform user the workflow hasn't been implemented yet
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/utility/agent-components/handler-workflow.txt` at line 9, The current
sentinel check only matches the exact lowercase "todo"; update the guard around
the workflow-config path (e.g., the variable workflowConfigPath used in the
workflow handling function such as handleWorkflow/processWorkflowRequest) to
robustly detect placeholder values by first ensuring the value is defined, then
normalizing it via trim() and toLowerCase() and comparing against "todo" (and
optionally other placeholders like "" or "n/a"); if matched, return the existing
"not implemented" response. This fixes case/whitespace brittleness and prevents
later failures.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tools/cli/installers/lib/ide/templates/agent-command-template.md`:
- Line 9: The template hardcodes the BMAD folder `_bmad` in the agent path
string causing mismatches with configurable setups; update the line that
currently reads "LOAD the FULL agent file from
{project-root}/_bmad/{{module}}/agents/{{path}}" to use the template variable
`{{bmadFolderName}}` instead of `_bmad` so it becomes "LOAD the FULL agent file
from {project-root}/{{bmadFolderName}}/{{module}}/agents/{{path}}", ensuring any
references in agent-command-template.md use `{{bmadFolderName}}` consistently.

In `@tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md`:
- Around line 10-11: The template currently concatenates
{project-root}/{{bmadFolderName}}/ with {{path}} which can produce malformed
rooted paths if {{path}} starts with a slash; update the template and any
generator logic that builds the workflow-config parameter (used when passing
'workflow-config' to workflow.xml) to normalize or enforce that {{path}} is
relative-only (strip any leading slashes or validate/reject leading separators)
so the final value is always "{project-root}/{{bmadFolderName}}/<relative-path>"
and cannot produce double or rooted slashes.

In `@tools/cli/installers/lib/ide/templates/combined/kiro-workflow-yaml.md`:
- Line 12: Add explicit documentation to the kiro-workflow-yaml.md template
explaining that Kiro intentionally uses relative workflow-config paths (e.g.,
passing {{bmadFolderName}}/{{path}} as the 'workflow-config' parameter) for
Org-mode compatibility, and contrast this with the other templates (claude-,
default-, opencode-workflow-yaml) which use
{project-root}/{{bmadFolderName}}/{{path}}; update the explanatory text near the
instruction that passes the 'workflow-config' parameter to state the rationale,
the expected runtime behavior, and guidance for maintainers on when to use
relative vs {project-root}/-rooted paths.

In `@tools/cli/installers/lib/ide/templates/workflow-command-template.md`:
- Line 8: Replace the hardcoded `_bmad` folder segment in the
workflow-command-template.md path with the template variable
`{{bmadFolderName}}` so the path always uses the configured BMAD folder name;
update the reference that currently reads
{project-root}/_bmad/core/tasks/workflow.xml to use
{project-root}/{{bmadFolderName}}/core/tasks/workflow.xml (ensure any
surrounding template syntax in workflow-command-template.md is preserved).
- Around line 9-10: The template currently prefixes "{project-root}/" to
{{workflow_path}} without ensuring the path is relative; update renderTemplate()
to validate and normalize pathToUse (and/or ensure workflowPath before
assignment in workflow-command-generator.js) so it cannot be absolute or already
contain "{project-root}" or a leading "/" — if pathToUse is absolute or contains
"{project-root}", strip the project-root prefix or convert to a safe relative
path and reject or normalize malformed inputs; ensure artifact.workflowPath is
set to the validated/normalized relative workflowPath before any concatenation
or template substitution.

In `@tools/cli/installers/lib/ide/templates/workflow-commander.md`:
- Line 5: The templates are inconsistent about whether {{workflow_path}} is
relative or absolute; decide on the relative-only convention (as used in
workflow-commander.md which uses "{project-root}/{{workflow_path}}") and update
all other templates that currently embed a hardcoded "_bmad" prefix (rovodev.md,
windsurf-workflow.md, trae.md, gemini-workflow.toml, and any similar files) to
remove the duplicated "_bmad" segment so they use
"{project-root}/{{workflow_path}}" instead; alternatively, if some templates
must keep the prefix, add a short documented note in those templates clarifying
they expect an absolute path, but preferably normalize all templates to the
relative-only contract for {{workflow_path}}.

---

Outside diff comments:
In `@src/utility/agent-components/handler-workflow.txt`:
- Around line 1-3: The example in the handler block still uses
workflow="path/to/workflow.yaml", which conflicts with the updated wording;
update the example under the <handler type="workflow"> section to use a neutral
identifier like workflow="path/to/workflow-config" (or similar non-file-specific
token) so it no longer implies a file extension and matches the workflow-config
wording change.

---

Nitpick comments:
In `@src/utility/agent-components/handler-workflow.txt`:
- Line 9: The current sentinel check only matches the exact lowercase "todo";
update the guard around the workflow-config path (e.g., the variable
workflowConfigPath used in the workflow handling function such as
handleWorkflow/processWorkflowRequest) to robustly detect placeholder values by
first ensuring the value is defined, then normalizing it via trim() and
toLowerCase() and comparing against "todo" (and optionally other placeholders
like "" or "n/a"); if matched, return the existing "not implemented" response.
This fixes case/whitespace brittleness and prevents later failures.

In `@tools/cli/installers/lib/ide/templates/combined/default-workflow.md`:
- Line 6: The template assumes {{path}} is already normalized; update the
template wording in combined/default-workflow.md to explicitly require/describe
a normalized, quoted path: instruct users to provide {{path}} without a leading
slash (or strip any leading slash) and to quote the final path token (e.g., wrap
{{path}} in quotes) so spaces are preserved and the full generated path
{project-root}/{{bmadFolderName}}/{{path}} is unambiguous; reference the
{{path}} and {{bmadFolderName}} tokens in the message so maintainers know which
variables to adjust.

In `@tools/cli/installers/lib/ide/templates/workflow-commander.md`:
- Line 5: The interpolated path in the critical command string ("LOAD the FULL
{project-root}/{{workflow_path}}") is unquoted and can break if the generated
path contains spaces; update the template to wrap the interpolated token in
quotes (e.g., use "LOAD the FULL \"{project-root}/{{workflow_path}}\"" or
equivalent) so the {project-root}/{{workflow_path}} token is always treated as a
single quoted path token at runtime.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 97a533e and 43c87ac.

📒 Files selected for processing (7)
  • src/utility/agent-components/handler-workflow.txt
  • tools/cli/installers/lib/ide/templates/agent-command-template.md
  • tools/cli/installers/lib/ide/templates/combined/default-workflow-yaml.md
  • tools/cli/installers/lib/ide/templates/combined/default-workflow.md
  • tools/cli/installers/lib/ide/templates/combined/kiro-workflow-yaml.md
  • tools/cli/installers/lib/ide/templates/workflow-command-template.md
  • tools/cli/installers/lib/ide/templates/workflow-commander.md

@dickymoore
Copy link
Copy Markdown
Contributor Author

dickymoore commented Feb 25, 2026

Follow-up updates from the review body (outside-diff + nitpicks) are also included in commit 50b1dfd2:

  • src/utility/agent-components/handler-workflow.txt now uses neutral workflow="path/to/workflow-config" example text, and the todo sentinel guidance now specifies trimmed/case-insensitive normalization.
  • workflow-commander.md, default-workflow.md, and workflow-command-template.md now quote the resolved workflow-config path token and explicitly state relative-path expectations.
  • Fresh-install verification run after this commit confirms no @_bmad output, no Pass the yaml path wording, and no _bmad/_bmad double-prefix output.

@bmadcode
Copy link
Copy Markdown
Collaborator

can this PR be simplified just to remove @bmad... and replace with {project-root}

as far as the yaml not yaml, the workflow.xml is only used with yaml workflow files which will all be gone within 2 weeks along with the workflow.xml. So I am not sure if all the changes in here are related to the title and what the reason is for renaming the workflow-configs.

@dickymoore dickymoore changed the title fix(templates): normalize _bmad path syntax and workflow-config wording fix(templates): replace @ path prefixes with {project-root} Feb 26, 2026
@dickymoore dickymoore force-pushed the fix/1767-skill-path-and-workflow-config-wording branch from d5aaa58 to 6232377 Compare February 26, 2026 08:21
@dickymoore
Copy link
Copy Markdown
Contributor Author

Really grateful for the steer @bmadcode 🙏

can this PR be simplified just to remove @bmad... and replace with {project-root}

I’ve now narrowed this PR to path syntax only. It only replaces legacy @... path prefixes with {project-root}/... in installer templates, with no wording/terminology refactors and no generator/handler logic changes.

as far as the yaml not yaml, the workflow.xml is only used with yaml workflow files which will all be gone within 2 weeks along with the workflow.xml. So I am not sure if all the changes in here are related to the title and what the reason is for renaming the workflow-configs.

Great point. The diff is now limited to 5 template files and keeps behaviour unchanged aside from the path token normalization.

Thanks

Dicky

@bmadcode
Copy link
Copy Markdown
Collaborator

bmadcode commented Mar 1, 2026

Thanks for fixing this @dickymoore !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stable-v6 skill template path convention + workflow-config wording inconsistencies

2 participants