Repository navigation
Description
Overview
Split out of #211 / #212, which fixed the broken discovery roots but deliberately left this behind as separate work.
When a conductor's selection mode finds nothing it prints a flat message — feature agent: no feature prompts found in PyAutoMind. and siblings. That is consistent with two very different situations: the backlog genuinely holds no prompts of that work-type, or discovery is pointed somewhere wrong (a bad PYAUTO_MIND, a non-Mind checkout, a layout the discoverer has not learned).
Case two is what #211 was. Three conductors reported an empty backlog for four weeks while sitting on 87 prompts, and nobody noticed — because the message a broken root produces is the message an empty backlog produces. That ambiguity, not the one-line wrong path, is why the bug survived. Diagnosing the empty case is the signal it lacked.
Plan
- Teach the sizing faculty to explain an empty discovery result against the Mind it was pointed at.
- Draw the three distinctions that matter: not a Mind checkout / no such work-type / genuinely empty backlog.
- Have the three conductors print that reason instead of the flat sentence, keeping their exit codes.
- Lock the three causes as mutually distinguishable in tests.
Detailed implementation plan
Affected Repositories
- PyAutoBrain (primary, and only)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoBrain | claude/automind-task-planning-tj0sdn (restarted from origin/main f4e9341) |
clean |
Suggested branch: claude/automind-task-planning-tj0sdn (session-designated)
Implementation Steps
-
agents/faculties/sizing/_sizing.py— addempty_discovery_reason(mind, work_type)besidediscover_prompts. Classifies an empty result:- path is not a directory → bad path
- directory has neither
draft/noractive.md→ not a Mind checkout, namePYAUTO_MIND - no
draft/<work-type>/and no legacy flat root → no such work-type, and list the work-types that do exist - roots exist but hold no prompts → genuinely empty backlog
Diagnosis only — callers keep their own exit codes, and
discover_promptskeeps its signature and result. -
The three conductors print the reason on their empty paths:
_feature.py,_bug.py,_refactor.py. -
tests/test_conductor_discovery.py— six new tests, including one asserting the three causes produce three distinct strings, and one covering a freshly-spawned Mind (hasactive.md, nodraft/yet) which must read as an empty backlog rather than a bad path.
Key Files
agents/faculties/sizing/_sizing.py— gainsempty_discovery_reasonagents/conductors/{feature,bug,refactor}/— call sitestests/test_conductor_discovery.py— extended
Scope
Message-and-diagnosis only. No change to discovery behaviour, ranking, or exit codes; the end-to-end non-empty assertions from #212 must keep passing unchanged.
Testing
pytest tests/ plus manual exercise of all three empty causes against fixture Minds, and confirmation the populated case is byte-identical.
Activity
fix: say which kind of empty a conductor's backlog is (#213)
prompt: file issue for empty-backlog-vs-broken-discovery (#213)