Skip to content

feat: ADR directory detection should scan one level of subdirectories for .md files #423

@jwm4

Description

@jwm4

Problem

The current ADR assessor counts .md files directly inside the matched directory (e.g. docs/specs/*.md). Some repos organize their specs into numbered subdirectories within that directory, causing false negatives.

Example: liatrio-labs/spec-driven-workflow has:

docs/specs/
  01-spec-ai-techniques-deep-dive-page/
    01-spec-ai-techniques-deep-dive-page.md
    01-audit-ai-techniques-deep-dive-page.md
    01-tasks-ai-techniques-deep-dive-page.md
    01-validation-ai-techniques-deep-dive-page.md
    01-proofs/

The numbered subdirectory naming convention (01-, 02-, ...) is characteristic of ADR-style sequential organization. However, because the .md files are one level below the matched directory, the assessor finds zero files and scores this as a fail.

Proposed Fix

When the assessor finds a matched ADR directory, count .md files both directly in that directory AND in immediate subdirectories (one level deep). Do not recurse further to avoid pulling in unrelated nested docs.

Expected Outcome

  • liatrio-labs/spec-driven-workflow: docs/specs/ (currently fails with score 40) should pass, since it contains 4+ .md files one level down.
  • Repos with flat .md layouts (e.g. bdfinst/agentic-dev-team) continue to pass unchanged.
  • Repos with deeply nested or unrelated docs are not affected.

Context

Discovered while validating PR #415 against real-world repos. This is a separate limitation from the ADR directory name list and affects all directory name candidates, not just specs.

🤖 Generated with Claude Code under the supervision of Bill Murdock

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