/structured-english:update-LLM-spec <path to spec file>from structured-english
Upgrades an existing specification to HSF v6 format optimized for LLM execution. Detects current version, migrates structure, and preserves domain logic.
Ships in structured-english. Installing the plugin adds it to Claude Code.
Detect the format version of an existing specification and migrate it to HSF v6, optimized for LLM execution. Preserves all domain logic while upgrading notation and structure for maximum LLM compliance and token efficiency.
The upgraded spec will be consumed by an LLM agent. Optimize the migration for:
Use the hsf skill — it contains all the rules, formats, and validation requirements for HSF v6. Read it fully before proceeding. Also read the reference at ${CLAUDE_PLUGIN_ROOT}/skills/hsf/assets/reference.md.
If the user provided a file path in the arguments, read it. Otherwise, ask the user:
Read the full file content, then detect the format version:
| Signal | Inferred Format |
|---|---|
Has **BEHAVIOR**, **PROCEDURE**, **RULE**, **STEP** keywords | SESF v4 / v4.1 |
Has @route or @config or ## Instructions prose, no BEHAVIOR/PROCEDURE and no XML section tags | HSF v5 (needs v6 upgrade) |
Has XML section tags (<purpose>, <instructions>, <config>, <errors>) | Already HSF v6 |
No BEHAVIOR, PROCEDURE, ## Instructions, or XML section tags found | Not a spec |
If already HSF v6: Report that the specification is already at the latest LLM-facing format and stop.
If HSF v5: Proceed with migration to HSF v6. The main changes are: replace ## section headers with XML tags, convert @config to <config> with JSON body, convert @route to <route> with <case> elements, change $config.key references to config.key.
If not a spec: Suggest using /write-LLM-spec to create a new specification or /assess-LLM-doc to evaluate suitability, then stop.
Also detect the tier from context.
Detect whether the file is a self-contained executable (Claude Code command or skill) or a standalone specification.
Use AskUserQuestion to ask:
"How should this specification be structured after the upgrade?"
Options:
allowed-tools or argument-hint frontmatter)Store the user's choice as $output_mode.
Compare the specification against HSF v6 requirements. Build two lists:
Format migrations (auto-apply):
When upgrading from SESF v4/v4.1 → HSF v6:
**BEHAVIOR** block:
<rules> or inline in the relevant instruction phase@route tables to <route name="..." mode="..."> with <case> elements**PROCEDURE** block:
<instructions> with ### phase headers**STEP** keywords; convert to numbered lists or phase headers→ $variable syntax unless data flow is genuinely complex<errors>@config blocks to <config> with JSON body (reference as config.key, not $config.key)<purpose>, <scope>, <instructions>, <rules>, <errors>, <examples>)When upgrading from HSF v5 → HSF v6:
## Section headers with XML tags (<purpose>, <scope>, <instructions>, <rules>, <errors>, <examples>)@config blocks to <config> with JSON body@route name [mode] with → rows to <route name="..." mode="..."> with <case when="..."> and <default> elements$config.key references to config.key (drop $ prefix)<errors> tags<output-schema> blocks for phases producing structured outputLLM-specific optimizations (apply automatically):
v6 opportunity suggestions (require user approval):
<config> candidates: Repeated literal values (3+)<route> candidates: Conditional logic with 3+ branches<output-schema> candidates: Phases producing structured outputShow:
Use AskUserQuestion:
${CLAUDE_PLUGIN_ROOT}/skills/hsf/assets/template.md${CLAUDE_PLUGIN_ROOT}/skills/hsf/references/examples.mdApply output mode based on $output_mode:
CRITICAL: Preserve ALL domain logic exactly. Only change format and notation.
python3 ${CLAUDE_PLUGIN_ROOT}/skills/hsf/scripts/validate_sesf.py <output-file>
Fix failures and re-validate. Overwrite the original file.
Report: original format, changes applied, validation result.
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub reggiechan74/cc-plugins --plugin structured-english8 commands in this plugin
/assess-human-docAssess Document for Human-Facing SESF ConversionAssess whether a document would benefit from human-readable SESF conversion/assess-inferred-intentAssess Inferred IntentReview a markdown specification for ambiguity, contradiction, and inferred intent/assess-LLM-docAssess Document for LLM-Facing HSF ConversionAssess whether a document would benefit from LLM-optimized HSF conversion/convert-human-to-llmConvert SESF → HSF (Human Spec → LLM Spec)Convert a human-facing SESF spec to LLM-facing HSF v6 format/update-human-specUpgrade a Specification to SESF v4.1Upgrade an older SESF specification to the current SESF v4.1 format/write-human-specWrite a Human-Facing SpecificationWrite a human-readable specification using SESF v4.1 formal blocksOther plugins' commands for the same job