Source-linked AI summary
RAC: A Relational Agent Contract for Constraint-Governed Engineering Tasks
Kaiyuan Zheng, Fengqing Jiang, Yichen Feng, Zubin Aaron Assadian, Yuetai Li, Bhaskar Ramasubramanian, Basel Alomair, Luyao Niu, Radha Poovendran
TL;DR
Constraint-governed engineering tasks require artifacts to satisfy exact, coupled constraints, yet agents may have to make semantic decisions and derive their precise consequences. RAC keeps those decisions with the agent while tools realize them and independent checks provide feedback. It achieves the highest PCB clean-pass rate for all nine evaluated models and improves scheduling quality-pass rates for seven models, tying at 100% for two.
Problem
Constraint-governed engineering requires exact, coupled constraints, while agents may need to make semantic decisions and derive their metric- or hardware-specific consequences.
Source: §1 · p. 1Method
RAC is a harness-agnostic contract in which agents observe authoritative state and state semantic relations, while tools realize them and independent checks return repair evidence.
Source: §1 · p. 1Results
RAC achieves the highest PCB clean-pass rate for all nine models and improves scheduling quality-pass rates for seven models, tying at 100% for two.
Source: §1 · p. 1Takeaways & Limitations
The evaluation supports assigning semantic engineering judgment to agents and mechanically derivable consequences to tools in constrained-artifact tasks.
Source: §1 · p. 1, §7 · p. 8RAC requires an existing or buildable realizer and independent checker, and excludes requirements that cannot be expressed as checkable predicates.
Source: Limitations · p. 8
Abstract
from arXiv · showhide
Engineering agents must produce artifacts that satisfy exact, coupled constraints. Existing solutions often require agents to make semantic decisions and also derive consequences such as precise geometry or timing from those decisions, leading to failures in constraint-governed engineering tasks. In this paper, we introduce RAC, a harness-agnostic contract for the action and feedback layer of engineering agents. It specifies authoritative observations, semantic actions, tool-based realization, independent verification, and repair evidence. The agent decides which relations an artifact should satisfy; specialized tools derive their concrete consequences. On PCB placement, routing, and repair tasks, RAC achieves the highest clean-pass rate for all nine evaluated models, averaging 90.9%, compared with 74.0% for the strongest baseline, requirements-only delegation. In job-shop scheduling, direct relational actions achieve 96.3% quality pass versus 59.6% for code-mediated delivery with access to the same scheduling backend. Our evaluations on 141 embedded-code tasks across four microcontroller identify the action contract as a source of agent capability: preserving semantic control while delegating mechanically derivable outputs improves the reliability of constrained artifacts.
1 Introduction
Constraint-governed engineering tasks require exact, coupled constraints, but agents can fail when they must make semantic decisions and derive their precise consequences. RAC assigns those roles to agents and tools, and improves results across evaluated engineering tasks.
1 Introduction
- Constraint-governed engineering tasks require artifacts to satisfy exact, coupled, checkable constraints, including placement, clearance, connectivity, and task-specific relations.Examples include PCB placement and routing constraints and scheduling precedence and exclusive-machine-use constraints.Source: §1 · p. 1
- Agents struggle when they must both make semantic decisions and reproduce their metric- or hardware-specific consequences.Relations among named objects capture the judgment the agent must supply; their concrete consequences can be computed mechanically and checked independently.Source: §1 · p. 1
- RAC is a harness-agnostic contract for authoritative observations, semantic actions, tool-based realization, independent verification, and repair feedback, requiring no model retraining.Agents express relations such as “C1 close to U1”; tools realize them, checks evaluate rules and relations, and failures return evidence for revision.Source: §1 · p. 1
- With the harness fixed, RAC achieves the highest clean-pass rate for all nine models on PCB tasks and improves scheduling quality-pass rates for seven models, tying at 100% for two.RAC also uses fewer tokens and less wall-time latency for most evaluated models.Source: §1 · p. 1
2 Related Work
Prior work grounds agents in tools, semantic representations, or verification and repair, but these approaches do not uniformly specify which consequences remain agent-authored. RAC makes the semantic boundary, derivation, verification, and repair evidence explicit.
2 Related Work
- RAC complements tool and protocol systems by specifying domain action semantics, the derivation boundary, independent verification, and repair evidence.The overview shows the agent stating relations among named objects while tools realize them and checks return verification or repair evidence.Source: §2 · p. 2, Figure 1 · p. 2
- Agent protocols and wrappers improve capability access and can address interpretation mismatches, but do not determine the semantics or verifiability of the actions they carry.MCP standardizes tool discovery and invocation; MHS extends discoverable access to physical equipment.Source: §2 · p. 2
- Hardware-design systems use compiler-, simulator-, layout-, and design-rule feedback, while direct emission of placements, tracks, vias, and layers remains difficult.The cited work also identifies implicit platform and safety obligations in embedded-agent systems.Source: §2 · p. 2
- Verification and repair methods use execution results, critiques, or formal checkers, while RAC returns semantic repair evidence so revision operates on intent rather than geometry or register values.Prior work also reports that repair loops become less effective as rule complexity grows.Source: §2 · p. 2
- Semantic intermediates and deterministic tools appear across planning, spatial generation, geometry, and electronic design, with prior work showing representation affects outcomes.RAC makes the division between learned proposals and deterministic realization explicit and testable.Source: §2 · pp. 2–3
3 Constraint-Governed Engineering Tasks
A constraint-governed engineering task is defined by its context, requirement, artifact space, and checkable validity predicates. Construction and repair tasks share this formulation, while PCB and embedded tasks instantiate it with coupled, context-specific constraints.
3 Constraint-Governed Engineering Tasks
- A task instance comprises engineering context c, requirement r, artifact space Y, and checkable predicates Φ; an artifact is valid when every predicate holds.A repair task additionally supplies an initial artifact and a preservation requirement among Φ.Source: §3 · p. 3
- PCB validity combines geometric legality, clearance, connectivity, and task-specific relations over component positions and copper paths, making feasibility coupled.Moving one component can affect clearance, routability, and relation satisfaction simultaneously.Source: §3 · p. 3
- Embedded validity combines functional correctness with hardware-specific obligations, so the same source-level requirement can admit different artifacts on different hardware.A direct-memory-access buffer in cached memory can activate several obligations at once.Source: §3 · p. 3
4 RAC: A Relational Agent Contract
RAC assigns semantic decisions to the agent and mechanically derivable consequences to engineering tools. Its contract formalizes observation, commitments, realization, independent checking, and evidence for repair.
4 RAC: A Relational Agent Contract
- RAC leaves interpretation of the requirement to the agent and assigns context-dependent consequences of its decisions to engineering tools.The design principle preserves semantic judgment while delegating what follows mechanically from the context and current artifact.Source: §4 · p. 3
- The contract C = (O, A, E, V, F) connects typed authoritative observations and relational commitments to tool realization, independent predicate checks, and repair evidence.Realization is deterministic or seed-controlled and reports which relations were realized; feedback combines its report with the checker’s per-predicate verdicts.Source: §4 · p. 3
5 Evaluations of RAC with PCB Layout Synthesis
RAC is evaluated on PCB placement, routing, combined placement-and-routing, and repair tasks, with semantic responsibility assigned through different agent interfaces. It achieves the highest clean-pass rates across models and retains its gains across agent harnesses.
5.1 Experimental Setup
- The evaluation covers 98 tasks—routing, placement, combined placement-and-routing, and repair—using nine models and interfaces run in a shared harness.Baselines include direct coordinates, arithmetic-assisted coordinates, tool-generated candidates, sequential relations, and requirements-only delegation.Source: §5.1 · pp. 3–4
5.2 Experimental Results
- 90.9% average clean-pass rate for RAC exceeds 74.0% for requirements-only delegation across the nine models.Table 1 reports clean-pass rates on 98 tasks across six random seeds.Source: Table 1 · p. 5, §5.2 · p. 5
- RAC reaches 77.6–95.9% clean-pass rates across models; eight models score 89.8–95.9%, while Kimi-K2.7 improves 16.3 percentage points over its best baseline.The reported results also show that nominal model capability does not consistently predict clean-pass performance.Source: §5.2 · pp. 5–6
- 23.2% for direct coordinates, 21.0% with Python assistance, 37.4% for tool-generated candidates, and 62.4% for sequential relations trail RAC’s 90.9%.RAC jointly realizes the complete set of relations while preserving the agent’s semantic control; requirements-only delegation reaches 74.0%.Source: §5.2 · p. 5
- RAC reduces token use versus tool-generated candidate selection by 22.9–48.5% for all nine models, while mean clean-pass rate rises from 37.4% to 90.9%.It also reduces mean wall-clock time versus candidate selection by 13.6–61.1% and has the lowest latency for seven of nine models.Source: §5.2 · pp. 5–6
5.3 Robustness across Agent Harnesses
- Across four harnesses, RAC raises clean-pass rates from 22.7–32.7% to 91.8–95.9%; the Harbor harnesses use 2.2–5.4 times Native’s tokens per task.Within each harness, RAC also uses fewer tokens than Coord.Source: §5.3 · pp. 6–7, Table 3 · p. 7
6 Evaluations of RAC with Job Shop Scheduling
The evaluation compares relational actions with code-mediated delivery on the same scheduling backend. RAC achieves higher final quality-pass rates and more often produces a passing schedule on its first proposal.
6.1 Experimental Setup
- The study evaluates 30 public Lawrence job-shop instances, with each episode making three full proposals and scoring the final one.Instances span 10–20 jobs, five or ten machines, and 50–200 operations; a valid schedule preserves precedence and prevents machine overlap.Source: §6.1 · p. 7
- A quality-pass schedule must pass independent validity checks, including submitted hard relations, and have makespan at most 1.25 times the known optimum.Known optima and quality-pass labels are evaluation-only; first-proposal quality-pass rate measures whether a usable schedule is available before revision.Source: §6.1 · p. 7
- Code (C1T) returns Python that can deliver relations to the shared backend or compute operation start times directly.This compares code-mediated with direct relation delivery while preserving backend access; a model-free control submits job order without additional hard relations.Source: §6.1 · pp. 7–8
- The scheduling contract exposes jobs, durations, machine assignments, and relations; a bounded backend realizes timestamps and an independent verifier checks schedules and hard relations.Invalid or cyclic relations are rejected, and feedback returns validity, makespan, and violation evidence for revision.Source: §6.1 · p. 8
6.2 Experimental Results
- RAC reaches 260/270 quality passes (96.3%), compared with 161/270 (59.6%) for code-backed delivery.It improves the pass rate for seven models and ties for two, reaching 100.0% for seven models.Source: §6.2 · p. 8, Table 4 · p. 8
- RAC’s first proposal passes on 253/270 episodes (93.7%), compared with 113/270 (41.9%) with code-backed delivery.RAC’s first-proposal pass rate exceeds the baseline’s final rate after three proposals.Source: §6.2 · p. 8, Table 4 · p. 8
7 Conclusion
RAC makes the agent–tool boundary explicit: agents retain semantic engineering judgment, while specialized tools derive consequences, realize artifacts, and support independent verification. Across the reported evaluations, the contract achieves high pass rates and reduces token use and latency for most models.
- RAC assigns semantic engineering decisions to agents and mechanically determined consequences to specialized tools.The evaluation reports the highest clean-pass rate for most of nine models, lower token use for most models, and lower latency.Source: §7 · p. 8
Limitations
RAC’s applicability depends on domain tools that can realize decisions and independently check artifacts.
- RAC applies only where a realizer and independent checker exist or can be built; its results are bounded by their coverage and correctness.Success requires satisfying every predicate in Φ, so loosely specified preferences that cannot be expressed as checkable predicates fall outside the formulation.Source: Limitations · p. 8
Ethical Considerations
The paper reports no human participants or personal-data collection, and cautions that automatically generated artifacts may have physical consequences outside research settings. Its appendix tests whether model-authored relations remain useful after geometric changes.
Ethical Considerations
- The study reports no human participants or personal-data collection, and says generated artifacts may have physical consequences if used outside research settings.Such use requires appropriate engineering review and hardware validation.Source: Ethical Considerations · p. 8
A Additional PCB Analyses
- The appendix groups analyses on action delivery, embedded-code generation, recorded PCB examples, and deterministic protocol-reuse cases.Source: A Additional PCB Analyses · p. 12
A.1 Robustness to board and footprint changes
- The robustness test holds model-authored relations fixed while changing board or footprint geometry, isolating the value of retaining those decisions.It applies a 20% board shrink, 20% board expansion, and 25% footprint shrink to initially passing layouts.Source: §A.1 · p. 12, §A.1.1 · p. 12
A.1.1 Experimental Setup
- Reported adaptation rates cover 459 changes to initially successful layouts; overall rates cover 702 attempted changes, counting initial generation failures as failures under each change.Both rates include 24 board-shrink cases whose feasibility remains unestablished. RAC relational re-solving invokes the same placement solver with unchanged relations, while numeric best-of-three selects a passing outcome, if available, from three methods using the final checker.Source: §A.1.1 · p. 12
- All adaptation methods start from the same successful RAC-produced artifact, so comparisons concern responses to geometric change.Source: §A.1.1 · p. 12
A.1.2 Experimental Results
- Relational re-solving passes 411/459 adapted layouts (89.5%), versus 301/459 (65.6%) for numeric best-of-three; the paired difference is +24.0 percentage points.Across all attempted changes, including failed initial generations, the rates are 411/702 (58.5%) and 301/702 (42.9%).Source: §A.1.2 · p. 12
- The relational re-solving advantage holds across all three perturbations: board shrink, board expansion, and footprint shrink.Pass rates are 77.1%, 92.2%, and 99.3%, respectively; the largest gap over numeric best-of-three is for board shrink, 77.1% versus 47.7%.Source: §A.1.2 · p. 12
- Relational re-solving results change little across solver seeds: 411/459 layouts pass at seed 0, 410/459 at seed 1, and 408/459 at seed 2.Across models, adaptation success ranges from 18/24 (75.0%) to 58/60 (96.7%); the same relations remain reusable without another model decision.Source: §A.1.2 · p. 12
A.2 Example Tasks and Model Outputs
The examples show agents submitting named placement and routing relations while a backend derives geometry and routes connections. The experimental setup compares direct relational actions with code-mediated delivery using the same scheduling backend.
A.2 Example Tasks and Model Outputs
- Table 5 compares average token use per episode on PCB tasks and reports that RAC improves token efficiency.The supplied caption does not give token totals.Source: Table 5 · p. 13
- Both connectors are placed 1.00 mm from their requested board edges, and the completed routing has zero design-rule violations.The model specifies the connectors’ left and right edges without coordinates or routing directives.Source: §A.2 · pp. 12–13
- The backend routes the named nets to a 15.0 mm target length, with an independently measured 0.00 mm mismatch within the 1.00 mm tolerance.Numeric path lengths appear in execution evidence, not in the model’s submission.Source: §A.2 · p. 13
- The realized board satisfies placement requirements, complete connectivity, and zero design-rule violations; independent checks measure the requested edge, pin, and filter-group relations.For the combined example, J1 is 1.00 mm from the top edge; C1–C3 are 2.00, 1.50, and 1.58 mm from their respective pins, and filter-group spreads are 2.69 and 3.04 mm.Source: §A.2 · p. 14
B.1 Experimental Setup
- The scheduling comparison uses 270 direct comparisons across nine models and 30 instances, with quality pass requiring a valid schedule and makespan at most 1.25 times the known optimum.When either interface returns relations, both use the same bounded backend; RAC returns relations directly, while C1T returns Python source that may print relations or start times.Source: §B.1 · p. 14
B.2 Experimental Results
Across the supplied results, direct relational actions substantially improve scheduling quality pass, and RAC also improves embedded-code pass rates while using fewer tokens. The remaining passages describe an example schedule, embedded evaluation and examples, and a Boolean-logic instantiation study.
B.2 Experimental Results
- 96.3% of runs pass with direct relational actions, versus 59.6% with code-mediated delivery, a difference of +36.7 percentage points (95% interval [31.1, 41.9]).Both interfaces can access a capable shared backend; the reported gain reflects more reliable delivery of agent relations rather than backend capability.Source: §B.2 · p. 14
B.3 Example Task and Model Output
- For LA07, the final schedule satisfies the hard precedence relation and has makespan 890, matching the known optimum.The first proposal omitted the relation and had makespan 892.Source: §B.3 · p. 14
C.1 Experimental Setup
- The embedded evaluation covers 141 tasks across nRF52840, STM32H743, ESP32-S3, and STM32F407, with eight models and pass, fail, or unknown outcomes.The pass-rate range counts unknown outcomes as failures or passes at its two endpoints.Source: §C.1 · p. 14
C.2 Experimental Results
- RAC has a 73.3–74.0% pass-rate bound versus 46.7–53.1% for SourceLite, and uses 39.0% fewer tokens in 998 directly comparable cases.Across all four interfaces, 224 of 4,512 outcomes are unknown.Source: §C.2 · p. 15
C.3 Examples
- For ADC sampling, the semantic plan identifies the device binding, channel, interval, and conversion requirement; its lowered C artifact passes native-compilation and static checks.The PWM example specifies fade behavior without model-authored control-loop code, and its lowered artifact also passes those checks.Source: §C.3 · p. 15
D Cross-Domain RAC Instantiation Study
- The Boolean-logic study tests whether a small task binding can connect observations, actions, realization, verification, and feedback to RAC’s unchanged turn sequence.It uses a bounded logic task as an executable test of responsibility separation.Source: D Cross-Domain RAC Instantiation Study · p. 15
D.1 Experimental Setup
- The logic task supplies truth tables and requests combinational circuits; actions identify, for each output, the truth-table rows where it should equal one.The ten constructed designs have at most four inputs, allowing every input assignment to be checked.Source: §D.1 · p. 15
- The study compares RAC with a direct driver using the same five operations, actions, realizer, and verifier across 400 logic and 72 existing-domain paired executions.It also replays 128 outcomes from PCB, scheduling, and embedded-code tasks for compatibility.Source: §D.1 · p. 15
D.2 Experimental Results
The cross-domain study reports successful logic calibration, matching outputs between RAC and a direct driver, and reproduction of existing-domain outcomes. The logic-task runtime adds a small median overhead.
D.2 Experimental Results
- All 40 logic checks accept correct actions, reject one-row changes and forged success receipts, and show supplied repair traces changing from failure to success.Exhaustive verification covers 92 input assignments and 208 output bits per complete positive cohort.Source: §D.2 · p. 15, Table 11 · p. 16
- RAC and the direct driver produce identical artifacts, verdicts, callback counts, and serialized messages in all 400 logic and 72 existing-domain executions.On logic, RAC adds a median 0.398 ms to a native path of roughly 1.2 ms; runtime intervals for PCB, scheduling, and embedded code include zero.Source: §D.2 · pp. 15–16, Table 12 · p. 16
- The compatibility check reproduces all 52 PCB, 60 scheduling, and 16 embedded-code outcomes, including 15 recorded failures.The unchanged turn implementation accommodates the added artifact type while preserving the supplied interactions in existing domains.Source: §D.2 · p. 16
Related papers
This paper cites
- SWE-bench: Can Language Models Resolve Real-World GitHub Issues?2023
- Self-Refine: Iterative Refinement with Self-Feedback2023
- SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering2024
- GLM-5: from Vibe Coding to Agentic Engineering2026
- Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfaces2026
- LayoutGPT: Compositional Visual Planning and Generation with Large Language Models2023