Skip to content

Follow-ups from #114: workflow-builder sibling copy unfixed, memlog still content-scanned, unanchored .analysis filter #115

Description

@bmadcode

Follow-ups from the review of #114 (merged). That PR fixed all three symptoms reported in #113; these are adjacent defects found during review that were deliberately left out of scope rather than holding a correct fix.

Listed in priority order.

1. bmad-workflow-builder carries the same bug, unfixed

skills/bmad-workflow-builder/scripts/scan-path-standards.py is a near-verbatim sibling of the agent-builder copy and still has both original defects:

  • :119md_file.name != 'SKILL.md', so the root .memlog.md is flagged as a structure violation
  • :207 — unfiltered rglob, so generated .analysis/ output is scanned

It has the same contract that makes those false positives: bmad-workflow-builder/SKILL.md:28 requires a root .memlog.md, and references/scan-orchestration.md:7 writes .analysis/<timestamp>/. The bug reproduces verbatim there.

#113's bug class is only half-closed. Applying #114's three changes to this copy should close it.

2. .memlog.md is exempt from the structure rule but still content-scanned

#114 removes .memlog.md from check_root_md_files but leaves it in md_files, so scan_file still runs all six path regexes over its contents.

An ordinary memlog entry such as:

- (decision) sanctum lives at _bmad/memory/bmad-agent-sentinel/

still produces two high findings (bare-bmad, memory-path) and keeps the scan at status: fail.

Worth being precise about severity: this is probabilistic, not deterministic. It fires only when memlog prose happens to contain trigger strings, unlike the structure finding #114 removed, which fired on 100% of runs because the file always exists. A spot check of 12 real .memlog.md files found 2 tripping bare_bmad — and those came from other skills, not agent-builder, whose vocabulary is consistently _bmad/memory/{skillName}/.

This is CodeRabbit's one unresolved inline comment on #114, and it is correct.

3. The .analysis filter is unanchored (latent)

scan_skill filters with '.analysis' not in path.parts, which tests the absolute path rather than the path relative to the skill root. If any ancestor directory is named .analysis, every file in the skill is filtered out and the scanner reports status: pass, 0 findings, exit 0 — on a skill it never read.

Demonstrated on a deliberately dirty agent placed at <tmp>/.analysis/myagent:

BASELINE: status fail, 7 findings, 17 files scanned
MERGED:   Warning: No .md or .json files found
          status pass, 0 findings, 0 files scanned, exit 0

Not reachable in practice — the scanner is always invoked as scan-path-standards.py {target-agent-path} against an agent skill directory, and .analysis/ is only ever created inside a target skill. Producing this nesting requires hand-placing an agent inside a prior analysis output. So it's a latent trap for the next refactorer, not a live hazard.

A false PASS on a lint gate is the dangerous failure direction, and the fix is one line:

if '.analysis' not in path.relative_to(skill_path).parts

That is exactly what #114's own other half already does at prepass.py:128 (path.relative_to(root).parts) — the two halves are currently inconsistent with each other.

4. prepass.py counts .memlog.md in its file inventory (documentation drift)

references/quality-analysis.md:49 states the pre-pass "never reads the builder's .memlog.md." It does — iter_files yields it into the files list the lenses reason about. Classification itself is unaffected (has_sanctum reads only SKILL.md text plus globs), so nothing is misclassified. Either the code or the doc should change.


Testing note

There is no test suite for bmad-agent-builder (scripts/tests does not exist), and nothing references scan-path-standards.py or prepass.py outside their own docstrings. #114 shipped without tests because there is nowhere to put them. Any of the above would benefit from being the first.

More broadly: package.json has no test script, and .github/workflows/quality.yaml runs only prettier, markdownlint and docs build — no Python test in this repo is executed by CI. Several suites also use hyphenated test-*.py filenames that default pytest discovery will not collect. See #88 for a test that has been red on main since May as a direct result.


🤖 Filed by BMad Bot following the review of #114.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions