Skip to content

inspect: add glob/path filters for targeted profiling #69

Description

@abegong

Problem

katalyst inspect can target a path (source layer) or a collection (collection layer), and can narrow by inspector, but it cannot directly narrow the inspected files/items within that target.

For ad-hoc analysis (for example, "inspect all README files"), users currently need a workaround: copy matching files into a temporary directory and run inspect there. That is awkward and easy to skip.

Proposal

Add file/item selection flags to inspect so users can focus analysis without reshaping the corpus.

Potential CLI shape:

katalyst inspect <target> --include "**/README*.md"
katalyst inspect <target> --include "docs/**/*.md" --exclude "**/testdata/**"

Desired behavior

  • Support repeatable include globs and optional exclude globs.
  • Apply selection before inspectors run.
  • Keep evidence denominators explicit (for example, total discovered vs selected).
  • Return a clear error/notice when selection matches nothing.

Why this helps

  • Removes friction for exploratory profiling.
  • Makes common workflows (README-only, docs-only, exclude fixtures) first-class.
  • Keeps users in a single command path instead of temporary file staging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions