github/spec-kit · error · BundlerError

No bundle.yml found in '{bundle_dir}'.

Error message

No bundle.yml found in '{bundle_dir}'.

What it means

build_bundle() requires the bundle source directory to contain a bundle.yml manifest; the check `(bundle_dir / "bundle.yml").exists()` failed. This fails fast before any validation or zip creation, so no artifact is produced.

Source

Thrown at src/specify_cli/bundler/services/packager.py:41

# Fixed member timestamp (zip epoch) for reproducible, byte-stable artifacts.
_FIXED_TIMESTAMP = (1980, 1, 1, 0, 0, 0)


@dataclass
class BuildResult:
    artifact_path: Path
    file_count: int


def build_bundle(
    bundle_dir: Path,
    output_dir: Path | None = None,
) -> BuildResult:
    bundle_dir = Path(bundle_dir).resolve()
    manifest_path = bundle_dir / "bundle.yml"
    if not manifest_path.exists():
        raise BundlerError(f"No bundle.yml found in '{bundle_dir}'.")

    # The artifact contract requires a human-facing README.md alongside the
    # manifest; refuse early rather than publish a bundle with no description.
    if not (bundle_dir / "README.md").exists():
        raise BundlerError(
            f"No README.md found in '{bundle_dir}'. Every bundle must ship a "
            "README.md describing it."
        )

    manifest = BundleManifest.from_file(manifest_path)
    report = validate_manifest(manifest)
    if not report.ok:
        raise BundlerError(
            "Refusing to build an invalid manifest. Run 'specify bundle validate' "
            "and fix:\n  - " + "\n  - ".join(report.errors)
        )

    out_dir = Path(output_dir).resolve() if output_dir else bundle_dir

View on GitHub (pinned to bf88c9f9a8)

Solutions

  1. Confirm the directory actually contains the manifest: `ls <bundle_dir>/bundle.yml`.
  2. If the file is named bundle.yaml or manifest.yml, rename it to bundle.yml.
  3. Point the build at the directory that directly contains bundle.yml, not a parent or sibling directory.
  4. If creating a new bundle, scaffold bundle.yml first (id, version, components) before building.

Example fix

// before
build_bundle(Path("bundles"))  # bundles/ contains my-bundle/bundle.yml

// after
build_bundle(Path("bundles/my-bundle"))
Defensive patterns

Strategy: validation

Validate before calling

from pathlib import Path

def buildable(bundle_dir: Path) -> bool:
    return (bundle_dir / "bundle.yml").is_file() and (bundle_dir / "README.md").is_file()

Try / catch

from specify_cli.bundler.core import BundlerError

try:
    result = build_bundle(bundle_dir)
except BundlerError as exc:
    print(f"build failed: {exc}"); raise

Prevention

When it happens

Trigger: Calling build_bundle(bundle_dir) or `specify bundle build <dir>` on a directory that lacks bundle.yml — wrong directory passed, manifest named differently (bundle.yaml, manifest.yml), or the bundle scaffolding step was skipped.

Common situations: Passing the parent of the actual bundle folder; misnamed manifest file; starting a new bundle by hand and forgetting the manifest; running the build from the wrong cwd with a relative path.

Related errors


AI-assisted analysis of github/spec-kit@bf88c9f9a8 (2026-08-14). Data as JSON: /api/errors/3e8b9e9380fdad7a. Report an issue: GitHub.