PLC Structured Text Code Reformatter with Claude Agents SDK
Legacy IEC 61131-3 Structured Text code often lacks consistent formatting, variable scope annotations, and safe bounds comments. In this challenge, developers will use Anthropic's Claude Agents SDK to construct an automated PLC logic formatting and auditing utility.
What you are building
The core problem, expected build, and operating context for this challenge.
Build an automated PLC Structured Text reformatter and auditor using Claude Agents SDK.
How work is evaluated
Evaluates formatting cleanliness and unhandled branch detection on sample Structured Text logic.
Challenge datasets
Public datasets, plus the private datasets you have access to.
How submissions are scored
These dimensions define what the evaluator checks and which criteria separate a passable run from a strong one.
Missing Else Detection
Single IF block without ELSE must trigger missing_else_warning
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
Code Cleanliness Score
Formatting adherence check against IEC 61131-3 standards • target: 1 • range: 0-1
This dimension contributes its full weight only when the submission satisfies the requirement. Partial credit is not awarded.
What you should walk away with
Initialize a Claude Agents SDK client for code refactoring tasks
Format messy IEC 61131-3 Structured Text logic blocks
Add inline comments explaining state transition logic
Detect unhandled `ELSE` branches and variable overflow risks
Reference links and supporting material
Unformatted Structured Text logic snippets representing pump interlocks and valve controls.
Challenge setup
Evaluates formatting cleanliness and unhandled branch detection on sample Structured Text logic.
Challenge input
Unformatted ST code string
Claude Agents SDK
Assigned framework
Evaluated output
JSON with formatted_code, missing_else_warning (boolean)
- Single IF block without ELSE must trigger missing_else_warning
- Formatting adherence check against IEC 61131-3 standards • target: 1 • range: 0-1
- Benchmark: Code Refactoring Verification Benchmark
- Code Cleanliness Score target: 1
- 1 public reference case
- Python execution harness
- Python sandbox (unavailable on Versalist)
Summary shows the first task, up to three tools, and up to three evidence items. Open the technical recipe to view all configured items.
View technical recipe
Configured tools
- Claude Code · Required
- Anthropic · Optional
- Claude Code · Required
- Claude 4.1 Opus · Optional
Evaluation contract
- Missing Else Detection · Weight 1
- Code Cleanliness Score · Weight 1
Metrics
- Code Cleanliness Score · Target 1
Benchmarks
- Code Refactoring Verification Benchmark
- general
Reference cases
- 1 public reference case
Workflow tasks
- Task 1
Input: Unformatted ST code string
Output: JSON with formatted_code, missing_else_warning (boolean)
Execution harness: Python
Evaluation tools
- Claude Agents SDK · Code analysis SDK
Recipe freeze marker
No recipe freeze time is recorded.