Skip to content

no-artifact with no hint when story specs live in a subfolder (non-recursive artifact glob) #780

Description

@Jakkapat-Chongsuwat

Description

When SessionSpec.expected_spec is not set, _capture_launch_auto_run_results (and the harvest that follows) finds result specs with a non-recursive glob:

# adapters/generic.py:1410 (0.11.1, unchanged on main)
for artifacts in self._artifact_dirs(spec.cwd):
    paths.extend(artifacts.glob("*.md"))

A project that keeps story specs one level down (e.g. _bmad-output/implementation-artifacts/stories/<key>.md) gets no-artifact on every Stop, with nothing in the message saying which directory was searched or that subfolders are not.

This is a different path from #224 (spec present but missing its ## Auto Run Result marker). Here the spec is complete; it is just not in the directory the glob looks at.

Steps to reproduce

  1. Put a story spec under implementation-artifacts/stories/ instead of directly in implementation-artifacts/.
  2. Run a story where expected_spec is not set.
  3. Every Stop reports no-artifact; the session rides to timeout.

Moving the spec directly under implementation-artifacts/ makes the same run succeed.

Suggested fix

Either of these would have saved a long debugging session:

  • search recursively (rglob("*.md")), or
  • keep the non-recursive glob but name the searched directory in the no-artifact breadcrumb, e.g. no-artifact: no *.md directly under <dir> (subfolders are not searched).

The second keeps current behaviour and only makes the failure self-explaining, if the flat layout is intentional.

Environment

Windows 11, bmad-loop 0.11.1 (uv tool), claude adapter, BMAD v6.12.0.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Robustness, enhancement, tests, or docs worth schedulingarea:adaptersCoding-CLI adapters and profilesenhancementNew feature or requestgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions