{
  "slug": "ast-grep-supports-files-with-matches-87f0c104f861",
  "title": "ast-grep supports --files-with-matches",
  "tools": [
    "ast-grep"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-01-05T01:22:05.000Z",
  "announced_at": "2026-01-05T01:22:05.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When you need matching file names for a structural search, run ast-grep with `--files-with-matches` and provide a pattern, language, and repository path.",
    "examples": [
      "ast-grep run --pattern '<AST pattern>' --lang <language> --files-with-matches <repository-path>"
    ],
    "gotchas": [
      "Version: 0.40.4",
      "--pattern <PATTERN> (required): AST pattern to match.",
      "--lang <LANG>: Language of the pattern.",
      "[PATHS]...: Paths to search; multiple paths are space-separated and default to `.`.",
      "--files-with-matches: Lists matching files, like ripgrep."
    ]
  },
  "why_it_matters": "List the files in a repository that match an ast-grep search.",
  "sources": [
    "https://github.com/ast-grep/ast-grep/releases/tag/0.40.4",
    "https://ast-grep.github.io/reference/cli/run"
  ],
  "rank": 0.95032,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-25d2ea05e124b8ea-0:gate",
    "evidence_hash": "05c2490685a6f4eaf5be3343e977bb29ae19daead67bdc6e77ad8d2f28c2e29e"
  },
  "review": {
    "draft_hash": "37935f9a406a9c791a16b7f47c2ff66cb39e32b169a608778ced7655b868051d",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.95 >= 0.9; 2 needed) and Jev gave 0.74 (>= 0.6 needed)."
  }
}
