Found while running my-coder for real against an external target repo (a flat-layout Python project: model.py, main.py at the root, no src/).
_style_anchor filters candidate exemplars to paths under src/ or tests/ (coder.py:225):
exemplars = sorted(
(p for p in listed if p.endswith(".py") and (p.startswith(("src/", "tests/")))),
...
)
Every fleet repo is scaffolded from my-template and so has src/, which is why this has never shown. Any other repo gets either the literal fallback
Existing code: (none yet — this is an early/greenfield repo).
on a repo full of code, or — as measured here — a single trivial file.
Measured, dumping the real prompt for an issue about model.py: the sole "representative existing file" was a 7-line tests/test_model.py. model.py — the file the issue is about, and the largest module in the repo — was not shown, while my-searcher had correctly ranked it first. The prompt then instructs the session to "match the conventions of the existing code shown above", so it matches a 7-line test.
Acceptance criteria
- Exemplar selection is layout-agnostic: a flat-layout repo yields its real modules.
- Directories that are noise rather than house style stay excluded (vendored code, generated files, the existing
.venv/__pycache__ exclusions).
- A test covering a flat-layout repo (no
src/) that asserts a root-level module is picked as an exemplar.
- The existing
src/-layout behaviour is unchanged.
Found while running my-coder for real against an external target repo (a flat-layout Python project:
model.py,main.pyat the root, nosrc/)._style_anchorfilters candidate exemplars to paths undersrc/ortests/(coder.py:225):Every fleet repo is scaffolded from
my-templateand so hassrc/, which is why this has never shown. Any other repo gets either the literal fallbackon a repo full of code, or — as measured here — a single trivial file.
Measured, dumping the real prompt for an issue about
model.py: the sole "representative existing file" was a 7-linetests/test_model.py.model.py— the file the issue is about, and the largest module in the repo — was not shown, whilemy-searcherhad correctly ranked it first. The prompt then instructs the session to "match the conventions of the existing code shown above", so it matches a 7-line test.Acceptance criteria
.venv/__pycache__exclusions).src/) that asserts a root-level module is picked as an exemplar.src/-layout behaviour is unchanged.