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

Open Beginner friendly
#780 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
cli

Research direction

Start in adapters/generic.py at _capture_launch_auto_run_results and the _artifact_dirs loop around line 1410; trace how the non-recursive *.md search produces the no-artifact breadcrumb. Reproduce with a story spec in implementation-artifacts/stories/ and verify the resulting Stop message or artifact discovery clearly handles that layout without regressing the flat layout.

Written by the indexing model from the issue text.

Description

area:adapters enhancement good first issue P3
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.

Dominant language
Python
Stars
137
Forks
60
Avg merge
2d 13h
Merged PRs (30d)
45

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from bmad-code-org/bmad-loop

All issues in bmad-code-org/bmad-loop

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.