Help us improve
Share bugs, ideas, or general feedback.
From structured-english
Upgrades an existing specification file to LLM-optimized HSF v6 format, detecting version and migrating from SESF v4/v5 or HSF v5 as needed.
npx claudepluginhub reggiechan74/cc-plugins --plugin structured-englishHow this command is triggered — by the user, by Claude, or both
Slash command
/structured-english:update-LLM-spec <path to spec file>This command is limited to the following tools:
The summary Claude sees in its command listing — used to decide when to auto-load this command
# Upgrade a Specification to LLM-Facing HSF v6 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. ## Audience Context The upgraded spec will be consumed by an LLM agent. Optimize the migration for: - **Compliance** — clear, unambiguous instructions with RFC 2119 keywords - **Token efficiency** — remove boilerplate sections, strip rationale that doesn't prevent misapplication - **XML envelope** — use XML section tags...
/specGenerates or refines Choo Choo Ralph spec files (.choo-choo-ralph/*.spec.md) from plan files or conversation context, using parallel sub-agents for codebase and tech research.
/techspecInforms users this command is deprecated, directs to /humaninloop:plan for unified technical specification workflow, and stops execution.
/specBiases HarnessFlow workflow toward spec authoring or revision via hf-specify skill. Router validates upstream preconditions before producing spec artifact with EARS/BDD/MoSCoW/INVEST formats.
/meta-agentManages the full CRUD lifecycle of Claude Code artifacts — commands, skills, rules, agents — with 9-phase workflow, quality gates, and multiple modes (create, enhance, audit, delete, rollback, list, onboard).
Share bugs, ideas, or general feedback.
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.