rf 0.0.4

rf — an agent-friendly search envelope that fuses ripgrep and fd, with cross-tool stage attribution for false-negative forensics. Early development; see the repository for status.
{
  "contract_version": 1,
  "engine": "in-process (ignore + grep crates); no subprocess",
  "env_vars": [
    "SOURCE_DATE_EPOCH",
    "NO_COLOR"
  ],
  "error_codes": {
    "BAD_PATTERN": "the search regex failed to compile",
    "CONFORMANCE_FAIL": "one or more conformance cases returned verdict:fail",
    "INTERNAL": "internal fault caught by the totality wrapper",
    "USAGE": "invalid arguments: unknown verb/flag, missing flag value, or --structural without --lang"
  },
  "exit_codes": {
    "0": {
      "meaning": "success (includes empty results: data:[]); a self-check with no failures",
      "retryable": false
    },
    "1": {
      "meaning": "user-input-error (bad flags / missing args), or a failing conformance self-check",
      "retryable": false
    },
    "3": {
      "meaning": "tool-environment-error / internal",
      "retryable": false
    }
  },
  "global_flags": [
    {
      "aliases": [
        "-h"
      ],
      "arity": 0,
      "name": "--help",
      "summary": "usage text; exit 0",
      "type": "bool"
    },
    {
      "aliases": [
        "-V"
      ],
      "arity": 0,
      "name": "--version",
      "summary": "version string; exit 0",
      "type": "bool"
    }
  ],
  "parser_manifest": {
    "source": "clap parse tree (CommandFactory)",
    "verbs": {
      "capabilities": {
        "flags": [
          {
            "arity": 0,
            "name": "--json"
          }
        ],
        "positionals": []
      },
      "conformance": {
        "flags": [
          {
            "arity": 0,
            "name": "--json"
          }
        ],
        "positionals": []
      },
      "content": {
        "flags": [
          {
            "arity": 0,
            "name": "--json"
          }
        ],
        "positionals": [
          "path",
          "pattern"
        ]
      },
      "doctor": {
        "flags": [
          {
            "arity": 0,
            "name": "--json"
          }
        ],
        "positionals": [
          "path"
        ]
      },
      "find": {
        "flags": [
          {
            "arity": 0,
            "name": "--json"
          },
          {
            "arity": 1,
            "name": "--lang"
          },
          {
            "arity": 1,
            "name": "--name"
          },
          {
            "arity": 1,
            "name": "--structural"
          }
        ],
        "positionals": [
          "path",
          "pattern"
        ]
      }
    }
  },
  "tool_version": "PINNED",
  "verbs": {
    "capabilities": {
      "flags": [
        "--json"
      ],
      "summary": "emit this machine contract"
    },
    "conformance": {
      "flags": [
        {
          "arity": 0,
          "name": "--json",
          "type": "bool"
        }
      ],
      "not_applicable": {
        "S-01": "release-build-fault-trigger-unavailable",
        "S-02": "release-build-fault-trigger-unavailable",
        "X-02": "release-build-fault-trigger-unavailable"
      },
      "output_schema": {
        "data[0]": {
          "cases": "array[{case_id,verdict,reason,request_id,target}]",
          "counts": {
            "fail": "int",
            "not_applicable": "int",
            "pass": "int"
          },
          "profile": "string"
        }
      },
      "profile": "release-self-check",
      "summary": "run the release self-check profile against this binary and emit the verdict set (probeability rule P-f)"
    },
    "content": {
      "args": [
        {
          "arity": 1,
          "name": "pattern",
          "type": "string"
        },
        {
          "arity": 1,
          "default": ".",
          "name": "path",
          "type": "path"
        }
      ],
      "flags": [
        {
          "arity": 0,
          "name": "--json",
          "type": "bool"
        }
      ],
      "output_schema": {
        "data[]": {
          "file": "string",
          "surfaced_by": "enum[default,vcs_ignore,hidden,binary,case,encoding_utf16]"
        }
      },
      "summary": "content search; attributes each match to the filter that would hide it"
    },
    "doctor": {
      "args": [
        {
          "arity": 1,
          "default": ".",
          "name": "path",
          "type": "path"
        }
      ],
      "flags": [
        {
          "arity": 0,
          "name": "--json",
          "type": "bool"
        }
      ],
      "summary": "environment DIAGNOSE: engine build, regex features, and the active ignore mode for a path"
    },
    "find": {
      "args": [
        {
          "arity": 1,
          "name": "pattern",
          "type": "string"
        },
        {
          "arity": 1,
          "default": ".",
          "name": "path",
          "type": "path"
        }
      ],
      "flags": [
        {
          "arity": 1,
          "domain": "file extension, no dot",
          "name": "--name",
          "required": true,
          "type": "string"
        },
        {
          "arity": 1,
          "domain": "ast-grep pattern; a construct with no fixed literal form",
          "name": "--structural",
          "type": "string"
        },
        {
          "arity": 1,
          "domain": "ast-grep language id; required with --structural",
          "name": "--lang",
          "type": "string"
        },
        {
          "arity": 0,
          "name": "--json",
          "type": "bool"
        }
      ],
      "output_schema": {
        "data[]": {
          "file": "string",
          "fix": "string|null",
          "stage": "enum[found,fd_name,fd_hidden,fd_ignore,fd_filter,rg_binary,git_deleted,ast_structural]"
        }
      },
      "summary": "staged fd|rg pipe (in-process) + git history + ast-grep structural; attributes each miss to fd_name/fd_hidden/fd_ignore/rg_binary/git_deleted/ast_structural"
    }
  },
  "warning_codes": [
    "IGNORE_VCS",
    "HIDDEN_SKIPPED",
    "BINARY_SKIPPED",
    "CASE_SENSITIVE",
    "ENCODING_MISS",
    "FD_NAME",
    "FD_HIDDEN",
    "FD_IGNORE",
    "RG_BINARY",
    "GIT_DELETED",
    "AST_STRUCTURAL",
    "STRUCTURAL_UNAVAILABLE",
    "IGNORE_MODE"
  ]
}