{"record":{"id":"1f63a4c26617ad95","repo":"bmad-code-org/BMAD-METHOD","slug":"project-root-does-not-contain-bmad-project-roo","errorCode":null,"errorMessage":"project root does not contain _bmad/: {project_root}","messagePattern":"project root does not contain _bmad/: (.+?)","errorType":"exception","errorClass":"RenderError","httpStatus":null,"severity":"error","filePath":"src/scripts/render_skill.py","lineNumber":326,"sourceCode":"            + b\"\\n\"\n        )\n        try:\n            os.rename(staging, destination)\n        except OSError:\n            if destination.exists():\n                _verify_existing(destination, manifest)\n            else:\n                raise\n    finally:\n        if staging.exists():\n            shutil.rmtree(staging, ignore_errors=True)\n\n\ndef render(project_root: Path, skill_dir: Path) -> Path:\n    project_root = project_root.resolve(strict=True)\n    skill_dir = skill_dir.resolve(strict=True)\n    if not (project_root / \"_bmad\").is_dir():\n        raise RenderError(f\"project root does not contain _bmad/: {project_root}\")\n\n    sources = _load_sources(skill_dir)\n    central = load_central_config(project_root)\n    has_customization = any(\n        _CUSTOM_TOKEN.search(content) for content in sources.values()\n    )\n    defaults = (\n        load_toml(skill_dir / \"customize.toml\", required=True)\n        if has_customization\n        else None\n    )\n    customization = (\n        load_customization(project_root, skill_dir) if has_customization else {}\n    )\n    replacements, input_values = _resolve_replacements(\n        sources, central, customization, defaults, project_root\n    )\n    source_hashes = {","sourceCodeStart":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/bmad-code-org/BMAD-METHOD/blob/b70486b9bdcb0a404d329e2a763b57964e7f1360/src/scripts/render_skill.py#L308-L344","documentation":"render() requires the project root to contain a _bmad/ directory: it is where central config is loaded from and where the rendered snapshot is written (_bmad/render/...). Passing a project root without _bmad/ aborts immediately, before any source loading.","triggerScenarios":"Running the renderer with --project-root pointing at a directory that has not been initialised by BMAD (no _bmad/ folder), or a typo/wrong path such as a subdirectory instead of the repo root.","commonSituations":"Wrong current working directory; BMAD init not yet run; pointing at a subpackage instead of the repo root.","solutions":["Run BMAD initialisation so _bmad/ exists, or pass the correct repository root that already contains it.","Verify the path: ls \"$PROJECT_ROOT/_bmad\".","If _bmad was renamed/moved, restore it or update --project-root accordingly."],"exampleFix":"# before\npython src/scripts/render_skill.py --project-root ./src --skill skills/my-skill\n\n# after (repo root that contains _bmad/)\npython src/scripts/render_skill.py --project-root . --skill skills/my-skill","handlingStrategy":"validation","validationCode":"from pathlib import Path\n\ndef assert_bmad_root(project_root: Path) -> None:\n    if not (project_root / \"_bmad\").is_dir():\n        raise SystemExit(f\"not a BMAD project root (no _bmad/): {project_root}\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Confirm the path contains _bmad/ before invoking the renderer.","Run BMAD init first if _bmad/ is absent.","Pass the repository root, not a subdirectory."],"tags":["python","project-root","validation","bmad","init"],"backgroundTag":null,"analyzedSha":"b70486b9bdcb0a404d329e2a763b57964e7f1360","analyzedAt":"2026-08-13T01:21:12.247Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}