/eou-foundry:eou-refactor EOU_ID_OR_AUDIT_PATHfrom eou-foundry
Generates candidate EOU refactor options (split, merge, scope-reduction, authority-downgrade, step-extraction, validator-addition, stop-condition-injection, responsibility-separation) from an audit finding or incident. Produces options only; applying any option requires an ECP through $ecp-propose.
Ships in eou-foundry. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Generate candidate refactor options for $target. Do not apply any change.
$target (required) — either an EOU ID (resolved to foundry/eous/{id}.yml or foundry/meta-eous/{id}.yml) or a path to an audit report or diagnosis file. When an audit path is given, the EOU ID is extracted from the report.${CLAUDE_PLUGIN_ROOT}/engine/refactoring-patterns.yml (plus the app's foundry/overrides/refactoring-patterns.yml, if present) — canonical refactor types (split, merge, scope-reduction, authority-downgrade, step-extraction, validator-addition, stop-condition-injection, responsibility-separation)foundry/constitution.yml — invariants that constrain any proposed change${CLAUDE_PLUGIN_ROOT}/engine/governance.yml (plus the app's foundry/overrides/governance.yml, if present) — authority boundaries and lifecycle-gate rules; required because refactor options can touch authority_level and blast_radius$target if an audit path is given)Halt and report before generating options if:
$target does not identify an EOU ID and one cannot be inferred.foundry/eous/ or foundry/meta-eous/.$target (EOU ID or audit report). If it is an audit report, extract the EOU ID and load the corresponding spec.${CLAUDE_PLUGIN_ROOT}/engine/refactoring-patterns.yml.requires_ecp: true.Write to foundry/self-evolution/refactor-options/{eou_id}-refactor-{YYYYMMDD}.yml.
Each option must include:
option_id:
target_failure: # the structural problem this addresses
proposed_change: # one specific modification (not a vague direction)
expected_benefit: # observable improvement
risk: # what can degrade
affected_files: # list of files that would change
tests_required: # regression cases to add or update
rollback_plan: # how to revert
arguments_against: # strongest case for not doing this
requires_ecp: # true | false
Mark requires_ecp: true when the option does any of the following:
authority_levelblast_radius.forbidden_scopeUpstream: receives an EOU id or audit-findings path. Typically invoked when $eou-audit flags a structural issue (overlap, conflated judgment, authority creep).
Downstream: produces refactor options (split, merge, scope-reduction, authority-downgrade, etc.) at foundry/self-evolution/refactor-options/. A chosen option then feeds $ecp-propose — refactor itself never applies changes.
Related: $eou-diagnose (sibling — F-code classification path); $ecp-propose (downstream consumer).
Pipeline: eou-audit (fail) → eou-refactor → ecp-propose → simulate → audit → human approval → implement
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub xiaolai/eou-foundry --plugin eou-foundry13 skills in this plugin
/audit-candidate-eou-setAudit a generated candidate EOU set for boundary quality, minimality, overlap, authority, operational value, and governance risk before any candidate advances to specification./audit-judgmentAudit value_invocations in run traces for EOUs with classification.judgment_authorized:true. Verifies invocations against the captured_workflow's declared priority (no F15), checks for drift over multiple runs (no F16), detects hallucinated value ids (no F17), catches silent decisions on contested cases (F14), and runs counterfactual-swap audit as the V1 anti-theater defense./ecp-proposeCreate a formal EOU Change Proposal from a diagnosed failure or refactor option, capturing simulation, regression case, audit, and approval requirements per rule 92./eou-auditAudit an EOU spec — classification, authority, validators, failure modes, trace, blast radius, responsibility./eou-diagnoseDiagnose an EOU failure using the F-code taxonomy and recommend the smallest-blast-radius repair, producing either a diagnosis (path to $ecp-propose) or a no-change record./eou-promoteEvaluate whether an EOU should be promoted, deprecated, or retired based on evidence, maturity model, audits, run traces, and owner approval. Produces a recommendation only — does not execute any lifecycle transition (that is the role of activate/retire execution, which requires human approval).Other plugins' skills for the same job