Pm refactor

From AMDResearch/omniprobe · View interactive version

Pm refactor is an AI agent skill from the GitHub repository AMDResearch/omniprobe. Create or manage a refactor workflow packet. Use when the user wants to restructure existing code without changing user-visible behavior. Emphasizes boundary preservation, regression risk identification, and verification gates at each step.

How to use this skill

Skill file

pm-refactor

Purpose

Create or manage a refactor workflow packet. Refactors restructure existing code without changing user-visible behavior. This skill emphasizes boundary preservation, regression risk identification, and verification gates at each step.

Required Reads

  1. .agents/workflows/INDEX.md -- understand lifecycle states and packet structure.
  2. .agents/workflows/dossier-template.md -- the dossier format to follow.
  3. .agents/pm/pm-current-state.md -- check for active workflows that might conflict.
  4. The PM units for the area being refactored (via pm-load).

Procedure

Creating a new refactor packet

  1. Choose the workflow ID. Use the prefix rf_ followed by a short descriptive slug. Example: rf_extract_auth_service.
  2. Create the packet directory. Path: .agents/workflows/draft/rf_<slug>/.
  3. Write dossier.md. Copy the structure from dossier-template.md and fill in:
  1. Write run-log.md. Initialize with the header from run-log-template.md. Leave the body empty.
  2. Write handoff.md. Initialize with the header from handoff-template.md. Set "Next Exact Step" to the first planned refactor action.
  3. Write artifacts.md. Initialize with the header from artifacts-template.md.
  4. Add a row to .agents/state/active-workflows.md. That file is the workflow tracking table, and it is preserved across upgrades. Do not open a second table in .agents/workflows/INDEX.md: that file is framework reference content, an upgrade refreshes it, and anything recorded there is lost.

Managing an existing refactor packet

  1. Before each step, verify that the previous step's tests still pass.
  2. After each step, append a run-log entry with: action taken, files touched, test results, and criteria impact.
  3. Update handoff.md after every step with the next exact action.
  4. Move the packet between lifecycle directories when state changes (draft to active requires user approval, active to done when acceptance criteria are met). Update the dossier metadata and active-workflows.md after every move.

Output

Completion Criteria

Error Handling

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.