Rtl p4s refactor

From babyworm/rtl-agent-team · View interactive version

Rtl p4s refactor is an AI agent skill from the GitHub repository babyworm/rtl-agent-team. P4 RTL refactor with no behavioral change: naming/style cleanup, module split/merge, equivalence verified. Trigger: 'refactor RTL'.

How to use this skill

Skill file

<Purpose>

Refactor existing RTL for improved readability, maintainability, or lint compliance

without changing functional behavior. Verifies equivalence after refactoring.

</Purpose>

<Use_When>

</Use_When>

<Do_Not_Use_When>

</Do_Not_Use_When>

<Why_This_Exists>

Refactoring RTL is risky without equivalence verification — a "cosmetic" rename can break

a signal connection. Combining rtl-architect analysis with lint-checker verification provides safety.

</Why_This_Exists>

<Delegation>

The orchestrator handles structural analysis, refactoring implementation,

lint verification, and equivalence checking.

All policies, checklists, naming convention rules, and escalation rules

are defined in the rtl-p4s-refactor-policy skill (loaded via the

orchestrator's skills: field).

Execution

Task(subagent_type="rtl-agent-team:p4s-refactor-orchestrator",

prompt="Execute RTL refactoring cycle. Target: $ARGUMENTS")

Do not perform any work directly.

The orchestrator agent manages the full analyze → refactor → lint → equivalence cycle.

Output

</Delegation>

<Examples>

<Good>

Split 800-line module into 3 focused modules; lint-checker confirms clean; smoke sim passes same vectors as before.

</Good>

<Bad>

Refactoring signal names without checking all instantiation sites — breaks hierarchical connections silently.

</Bad>

</Examples>

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.