Skip to content

Agent Builder scans generated .analysis artifacts and required root .memlog.md as agent-source violations #113

Description

@hughdw

Clear description of the problem

bmad-agent-builder requires a builder process log at <agent>/.memlog.md for resume detection, and its Analyze workflow writes reports to <agent>/.analysis/<timestamp>/.

However:

  1. scan-path-standards.py flags the required root .memlog.md as a high-severity “Prompt file at skill root” violation.
  2. scan-path-standards.py scans generated .analysis/ Markdown/JSON files, including findings.json, where the Analyze schema requires absolute paths in standards. Those paths are then flagged as non-portable absolute paths.
  3. prepass.py counts generated .analysis/ artifacts as part of the agent tree, so prior HTML reports can inflate token/file metrics for later Analyze runs.

This makes a clean agent appear to fail lint and lets prior analysis output influence subsequent analysis.

Steps to reproduce

  1. Create an agent with Agent Builder, ensuring it has the required root-level .memlog.md.

  2. Run Analyze on the agent, which creates:

    <agent>/.analysis/<timestamp>/findings.json
    <agent>/.analysis/<timestamp>/agent-analysis-report.html
    <agent>/.analysis/<timestamp>/agent-analysis-report.md
    
  3. Run:

    uv run scripts/scan-path-standards.py <agent-path>
    uv run scripts/prepass.py <agent-path>

Expected vs actual behavior

Expected

  • Root .memlog.md is treated as Agent Builder operational metadata, not a capability/prompt file.
  • .analysis/ is treated as generated analysis output and excluded from path lint and pre-pass token/file counting.
  • Lint findings reflect only authored Agent files.

Actual

  • .memlog.md produces a high-severity structure finding.
  • .analysis/.../findings.json produces high-severity absolute-path findings.
  • .analysis/ HTML/Markdown/JSON files are included in pre-pass metrics.

Proposed fix

  • In scan-path-standards.py:
    • Exempt root .memlog.md from the “only SKILL.md at root” rule.
    • Exclude .analysis/ from scanned Markdown/JSON files.
  • In prepass.py:
    • Add .analysis to skipped directories.

Your environment

  • Model: GPT-5 / Codex
  • IDE: Codex Desktop
  • BMad version: 6.11.0
  • OS: macOS
  • Python runner: uv

Activity

  1. bmadcode commented on Aug 29, 2026

    @bmadcode
    Contributor

    Closed by #114. All three symptoms reported here are fixed and verified (8 findings → 5 on a sample agent; the .memlog.md structure finding and both .analysis/findings.json absolute-path findings are gone).

    Three adjacent defects found during review were kept out of scope and are tracked in #115 — most importantly, bmad-workflow-builder carries a near-verbatim copy of the same scanner with both original defects still present, so this bug class is only half-closed.


    🤖 Posted by BMad Bot on behalf of the maintainers.

  2. added a commit that references this issue on Aug 29, 2026
    35ddbfa
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions