Skip to Content

Rule 37 Agent

The Rule 37 Spacing Exception Agent handles the full lifecycle of spacing exception filings under Texas Administrative Code 16 TAC 3.37. It helps operators prepare Form W-1 applications when a proposed well location falls within the standard spacing distances defined by the Railroad Commission of Texas (RRC).

Configuration

PropertyValue
Agent IDrule37-agent
Agent Typerule_37
Primary Modelgpt-4o
Fallback Modelgpt-4o-mini
YAML Fileagents/rule37-agent.yaml

Regulatory Context

Rule 37 (16 TAC 3.37) defines the minimum spacing distances for oil and gas wells in Texas:

Spacing RequirementDistance
Well-to-well minimum467 feet
Well-to-lease-line minimum1,200 feet
Default proration unit40 acres

Any well proposed closer than these distances to existing wells or lease lines requires a spacing exception. The operator must demonstrate “good cause” for the exception, notify affected offset operators, and file a Form W-1 or W-1A with the RRC.

Field-specific rules can override statewide spacing. For example, the Spraberry (Trend Area) field requires 1,320 feet between wells. The agent automatically checks for field-specific rules in the knowledge graph before applying statewide defaults.

Skills

The Rule 37 agent has access to four skills:

Skill IDNamePurpose
spacing-calculationSpacing CalculationCalculate distances from a proposed well location to lease lines and offset wells. Determines whether an exception is needed and by how much the proposed location violates standard spacing.
offset-well-analysisOffset Well AnalysisQuery the knowledge graph for all wells within regulatory distance. Identify operators who must be notified and wells that may be affected by the proposed drilling.
rule37-filing-assemblyRule 37 Filing AssemblyAssemble the complete Form W-1 filing package with exception justification, plat references, and supporting documentation.
good-cause-narrativeGood Cause NarrativeGenerate the “good cause” legal argument for the spacing exception, citing relevant precedent, technical justification, and compliance with field rules.

Workflow

When a user initiates a Rule 37 spacing exception filing, the agent follows this workflow:

  1. Identify the subject well — gather the well name, lease, field, target formation, and proposed surface and bottomhole locations
  2. Calculate spacing — call spacing-calculation to compute distances to lease lines and nearest wells, determine which spacing rules apply (statewide or field-specific)
  3. Analyze offset wells — call offset-well-analysis to find all wells within regulatory distance, identify operators requiring notice, and assess potential objections
  4. Draft good cause narrative — call good-cause-narrative to generate the legal justification for the exception
  5. Assemble filing package — call rule37-filing-assembly to compile the Form W-1, plat, good cause statement, and supporting exhibits into a complete package
  6. Present for review — present the draft to the user before HITL approval

HITL Checkpoints

The Rule 37 agent has two mandatory HITL checkpoints:

CheckpointRequiredReviewer StrategyDescription
pre_filingYesnamed_individualReview the assembled filing package before RRC submission. A specific named reviewer must approve.
good_cause_reviewYesrole_basedReview the good cause narrative for legal sufficiency. Any user with the appropriate compliance role can approve.

Both checkpoints are required — the agent cannot proceed to filing submission without explicit human approval at each stage.

The pre_filing checkpoint uses the named_individual strategy, meaning a specific person must be designated as the reviewer. This is typically the compliance manager or regulatory affairs lead who will sign the filing.

Budget

LimitPer ExecutionPer Day
Tokens150,0002,000,000
Cost (USD)$10.00$100.00

The per-execution budget accommodates the multi-step filing workflow, which typically requires several LLM calls for spacing calculations, offset analysis, narrative generation, and filing assembly. The daily budget allows for approximately 13 full filing workflows per day.

System Prompt

The agent’s system prompt establishes its identity and rules:

  • Expert in Texas RRC spacing regulations under 16 TAC 3.37
  • Describes available tools and their purposes
  • Defines the 6-step workflow for exception filing preparation
  • Enforces HITL approval requirements
  • Requires citation of specific RRC rules, forms, and TAC sections
  • Flags missing data that would prevent filing
  • Embeds the standard spacing distances as reference

Metadata

metadata: domain: oil_and_gas jurisdiction: texas regulator: rrc primary_rule: "16 TAC §3.37" primary_forms: - W-1 # Application for Permit to Drill, Recomplete, or Re-Enter - W-1A # Amended drilling permit application
FormFull NamePurpose
W-1Application for Permit to Drill, Recomplete, or Re-EnterPrimary drilling permit application filed with the RRC
W-1AAmended W-1Filed when modifications to an existing permit are needed

Example Interaction

A typical Rule 37 workflow begins with the user providing basic well information:

“I need to file a Rule 37 exception for Mitchell Ranch 1H. The proposed location is 350 feet from the south lease line on the Mitchell Ranch lease in the Spraberry (Trend Area) field.”

The agent would then:

  1. Recognize that 350 ft is below the 1,200 ft statewide lease-line minimum (and the 1,320 ft Spraberry field-specific rule)
  2. Call spacing-calculation to quantify the variance
  3. Call offset-well-analysis to identify affected parties on adjacent leases
  4. Draft a good cause narrative citing the specific distances, field rules, and technical justification
  5. Assemble the Form W-1 package
  6. Present the package for HITL review at both checkpoints
Last updated on