
prompt-refactor
โ Officialโ 1,245by microsoft ยท part of microsoft/hve-core
Refactor existing prompt artifacts against explicit requirements through the full prompt-builder loop.
This is the playbook your agent receives when the skill activates โ you don't need to read it to use the skill, but it's here to audit before installing.
Prompt Refactor Compatibility Skill
Goal
Preserve legacy prompt-refactor activation while simplifying approved prompt-engineering artifacts through the hve-builder refactor route and its independent quality gates.
Flow
- Translate
promptFilesto existingtargetsand resolve the behavior that must remain unchanged. - When requirements are omitted, use the HVE Builder baseline review to derive evidence-backed cleanup objectives.
- Activate
hve-builderwithmode=refactor, the approved write boundary, requirements, and any caller-owned evidence root. - Return the HVE Builder static verdict, behavior-test fidelity and verdict, validation result, and overall outcome.
Inputs
promptFiles: existing prompt-engineering artifacts to refactorrequirements: optional cleanup objectives, constraints, and preserved behaviorevidenceRoot: optional caller-owned HVE Builder evidence path
Success Criteria
- The approved targets are simpler without unintended behavior change.
- Static review, behavior testing, and host validation pass.
- Source changes stay inside the approved write boundary.
- The returned overall outcome is unchanged from
hve-builder.
Constraints
- Do not dispatch retired named lifecycle workers.
- Do not create a second orchestration loop or sandbox contract.
- Route a requested type change, artifact split, or new support artifact back through HVE Builder scope approval.
Stop Rules
- Stop Pass only when the HVE Builder refactor route passes every required gate.
- Preserve Revise, Deferred, or Blocked and its rerun condition.
- Ask when preserved behavior or write scope cannot be inferred safely.
Handoff
Use prompt-analyze for read-only follow-up review and prompt-builder when the requested work intentionally changes behavior or creates artifacts.
Final Response Contract
Return targets, changed files, refactor rationale, static verdict, behavior-test fidelity and verdict, validation result, overall outcome, evidence links, and next action.
npx skills add microsoft/hve-core --skill "prompt-refactor" --full-depthRun this in your project โ your agent picks the skill up automatically.
No common issues documented yet. If you hit a problem, the repository's GitHub Issues page is the best place to look.
Licensed under MITโ you can use, modify, and redistribute it under that license's terms.
View the full license file on GitHub โ