LightSOPLang Worked Examples
Real scripts drawn from the Achilles Agents regression suites.
Minimal Placeholder Script
The regression suites include a compact LightSOPLang program that captures the incoming prompt and then attempts to run a placeholder skill. The line @prompt prompt copies the user request into a variable called prompt. The next line executes the nonexistent-placeholder command, passing the prompt as the first argument and a descriptive string as the second argument. The interpreter resolves the reference to $prompt before invoking the command registry. The intent tag investigation is supplied as a literal, allowing the orchestration layer to record why the step exists even when the command fails.
@prompt prompt
@attempt nonexistent-placeholder $prompt "Attempt non-existent skill" investigation
This example highlights how scripts encode business context even when a command is expected to fail, keeping the audit trail intact.
Inventory Planner Script
Modern orchestration skills rely on agentic sessions, but the SOP session still produces LightSOPLang internally. A typical plan stores the prompt, then schedules the reporting skill followed by the data skill. Each command receives the prompt plus a justification, and the interpreter tracks dependencies such as report and data so confirmations list both steps.
@prompt prompt
@report report $prompt "Primary summary" reporting
@data data $prompt "Collect supporting facts" data-fetch
Only skills declared in the descriptor's allow-list appear as commands, so the session cannot call unrelated skills even if the plan is regenerated.
Metric Scanner Script
The MCP skill at tests/recursiveAgent/recursiveAgentFixtures/.AchillesSkills/llmSuite/llmData/mskill.md shows how tool selection works. Although the descriptor relies on LLM planning in the regression tests, adding a LightSOPLang block would follow exactly the same pattern as the orchestration script. The identifier metricScanner would map to an MCP tool and the raw prompt would become its argument. The returned plan lists the tool name, the arguments, and the descriptive rationale string.
English Mode in Practice
Several tests, notably tests/lightSOPLang/englishScriptFixes.test.mjs, exercise the #!english directive. The script begins with the directive and then lists human language instructions. The interpreter asks the LLMAgent for LightSOPLang code, executes it, and, if any command fails, requests a revision. The new code replaces the previous script while retaining a history of attempts. This feature enables non-technical authors to describe desired behaviour in plain English while keeping the execution layer deterministic.