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
| Property | Value |
|---|---|
| Agent ID | rule37-agent |
| Agent Type | rule_37 |
| Primary Model | gpt-4o |
| Fallback Model | gpt-4o-mini |
| YAML File | agents/rule37-agent.yaml |
Regulatory Context
Rule 37 (16 TAC 3.37) defines the minimum spacing distances for oil and gas wells in Texas:
| Spacing Requirement | Distance |
|---|---|
| Well-to-well minimum | 467 feet |
| Well-to-lease-line minimum | 1,200 feet |
| Default proration unit | 40 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 ID | Name | Purpose |
|---|---|---|
spacing-calculation | Spacing Calculation | Calculate 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-analysis | Offset Well Analysis | Query 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-assembly | Rule 37 Filing Assembly | Assemble the complete Form W-1 filing package with exception justification, plat references, and supporting documentation. |
good-cause-narrative | Good Cause Narrative | Generate 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:
- Identify the subject well — gather the well name, lease, field, target formation, and proposed surface and bottomhole locations
- Calculate spacing — call
spacing-calculationto compute distances to lease lines and nearest wells, determine which spacing rules apply (statewide or field-specific) - Analyze offset wells — call
offset-well-analysisto find all wells within regulatory distance, identify operators requiring notice, and assess potential objections - Draft good cause narrative — call
good-cause-narrativeto generate the legal justification for the exception - Assemble filing package — call
rule37-filing-assemblyto compile the Form W-1, plat, good cause statement, and supporting exhibits into a complete package - Present for review — present the draft to the user before HITL approval
HITL Checkpoints
The Rule 37 agent has two mandatory HITL checkpoints:
| Checkpoint | Required | Reviewer Strategy | Description |
|---|---|---|---|
pre_filing | Yes | named_individual | Review the assembled filing package before RRC submission. A specific named reviewer must approve. |
good_cause_review | Yes | role_based | Review 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
| Limit | Per Execution | Per Day |
|---|---|---|
| Tokens | 150,000 | 2,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 applicationRelated Forms
| Form | Full Name | Purpose |
|---|---|---|
| W-1 | Application for Permit to Drill, Recomplete, or Re-Enter | Primary drilling permit application filed with the RRC |
| W-1A | Amended W-1 | Filed 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:
- Recognize that 350 ft is below the 1,200 ft statewide lease-line minimum (and the 1,320 ft Spraberry field-specific rule)
- Call
spacing-calculationto quantify the variance - Call
offset-well-analysisto identify affected parties on adjacent leases - Draft a good cause narrative citing the specific distances, field rules, and technical justification
- Assemble the Form W-1 package
- Present the package for HITL review at both checkpoints