{
  "slug": "ast-grep-adds-outline-extraction-and-an-outline-cli-82ce3014c994",
  "title": "ast-grep adds outline extraction and an outline CLI",
  "tools": [
    "ast-grep"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-06-22T01:49:47.000Z",
  "announced_at": "2026-06-22T01:49:47.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "To inspect a file or directory’s structure, run `ast-grep outline` on the target path; bundled outline rules are used automatically. Choose `--items` and `--view` to narrow the output, and use `--outline-rules` only to add extractor definitions.",
    "examples": [
      "ast-grep outline <file>",
      "ast-grep outline <directory> --items exports",
      "ast-grep outline <path> --outline-rules <rules.yml>"
    ],
    "gotchas": [
      "Version: 0.44.0",
      "<file> / <directory> (PATHS): Path or paths to search; defaults to the current directory.",
      "--items <ITEMS>: Select top-level entries: `auto`, `structure`, `exports`, `imports`, or `all`. `auto` adapts to input; directory input defaults to exports.",
      "--view <VIEW>: Select output detail: `auto`, `names`, `signatures`, `digest`, or `expanded`. These values are alternatives; `auto` uses names for directories and digest for files or stdin.",
      "--outline-rules <FILE>: Load additional extractor definitions from a stream of YAML documents; rules supplement bundled rules and configured custom-language rules.",
      "--no-default-outline-rules: Disable bundled extractor definitions; combine with `--outline-rules` to replace the built-in catalog.",
      "Prerequisite: The outline command was introduced in ast-grep 0.44.0 as an alpha preview."
    ]
  },
  "why_it_matters": "Inspect source files in a repository using ast-grep's outline extraction.",
  "sources": [
    "https://github.com/ast-grep/ast-grep/releases/tag/0.44.0",
    "https://ast-grep.github.io/guide/outline-code",
    "https://ast-grep.github.io/reference/cli/outline"
  ],
  "rank": 0.97039,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3-rejudge+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2a-20261017",
    "verdict_id": "wave2a-20261017:wave2a-20261017-7925ff2885893674-0:rescue",
    "evidence_hash": "decf99f1d98d05903758d935a347767d748bda815ad90a8d230e702f91954840"
  },
  "review": {
    "draft_hash": "66d79ae47c2407387cb20f2fc3cabc47fddeaea023826fca369d6c93d5eb6365",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2a-20261017:rescue",
    "reason": "Rescue path: first rejected only because the extracted card lacked usage; judged again on the enriched card, 3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.97 >= 0.9; 2 needed) and Jev gave 0.78 (>= 0.6 needed)."
  }
}
