BMAD-METHOD/docs
Akhilesh Tyagi 1040c3c306
fix: correctly resolve output_folder paths outside project root (#2132)
* fix(bmad-init): correctly resolve output_folder paths outside project root

  When output_folder was set to an absolute path (e.g. /Users/me/outputs),
  the {project-root}/{value} result template stored it as
  {project-root}//absolute/path. resolve_project_root_placeholder then did
  a naive string replace, producing /project//absolute/path — a broken path
  that workflows could not resolve.

  For relative paths outside the root (e.g. ../../sibling), the same naive
  replace left un-normalized paths like /project/../../sibling in the
  resolved config, which some tools mishandled.

  Fix resolve_project_root_placeholder to strip the {project-root} token,
  detect whether the remainder is absolute (returning it directly) or
  relative (joining with project root and normalizing via os.path.normpath).

  Fix apply_result_template to skip the template entirely when raw_value is
  already an absolute path, and to normalize the result for relative-but-
  outside paths. This covers the bmad-init SKILL write path, which bakes
  the resolved path directly into config.yaml.

  Add 7 tests covering all three path cases (absolute, relative-with-
  traversal, normal in-project) for both functions.

* Address review comments

---------

Co-authored-by: Akhilesh Tyagi <akhilesh.t@nextiva.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2026-03-26 21:46:14 -05:00
..
explanation refactor(quick-dev): rename tech-spec prefix to spec (#2109) 2026-03-23 00:09:05 -06:00
fr refactor(quick-dev): rename tech-spec prefix to spec (#2109) 2026-03-23 00:09:05 -06:00
how-to fix: correctly resolve output_folder paths outside project root (#2132) 2026-03-26 21:46:14 -05:00
reference refactor(quick-dev): rename tech-spec prefix to spec (#2109) 2026-03-23 00:09:05 -06:00
tutorials refactor(quick-dev): rename tech-spec prefix to spec (#2109) 2026-03-23 00:09:05 -06:00
zh-cn docs(zh-cn): close explanation gap relinks (#2102) 2026-03-24 04:07:07 -06:00
404.md fix(docs): comprehensive documentation site review fixes (#1578) 2026-02-08 11:58:22 -06:00
_STYLE_GUIDE.md refactor(quick-dev): rename tech-spec prefix to spec (#2109) 2026-03-23 00:09:05 -06:00
index.md docs: update terminology from commands to skills across all documentation (#1850) 2026-03-07 16:14:25 -07:00
roadmap.mdx feat(docs): add public roadmap and improve site navigation 2026-02-22 19:41:57 -06:00