refactor-design-report

Produce a professional, code-based refactor or implementation design report addressing identified technical issues, product gaps, code-review findings, architectural risks, or frontend-backend contract mismatches. Suited for converting defects, missing safeguards, design flaws, API/UI mismatches, or expected behavior changes into detailed backend/frontend/system refactor plans, persistence design documents, implementation plans, test matrices, release plans, or acceptance criteria.

Last repository push
GitHub Stars
136
Forks
20
Issues / PRs
1

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "refactor-design-report" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-b08fe1e8760c53ba6ea1171aaea8188f37fc4c6c28c3c9555079ffc45d776a2e. Verify the upstream source and version against https://github.com/penwyp/ClaudePreference before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Produce a professional, code-based refactor or implementation design report addressing identified technical issues, product gaps, code-review findings, architectural risks, or frontend-backend contract mismatches. Suited for converting defects, missing safeguards, design flaws, API/UI mismatches, or expected behavior changes into detailed backend/frontend/system refactor plans, persistence design documents, implementation plans, test matrices, release plans, or acceptance criteria.

0 Downloads

Introduction source: third_party · penwyp · 0.0.1 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Inputs and outputs
The report is complete when another engineer can implement from it without reconstructing the reasoning. It should include: The exact current problem. The exact target behavior. Backend enforcement points. Frontend user guidance and blocking behavior. Contract and persistence changes. Runtime race protections. Tests that prove the behavior. Clear acceptance criteria.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: refactor-design-report
description: Produce a professional, code-grounded refactor or implementation design report from identified technical problems, product gaps, review findings, architecture concerns, or frontend-backend contract issues. Use when Codex is asked to turn bugs, missing protections, design gaps, API/UI mismatches, or desired behavior changes into a detailed backend/frontend/系统改造方案, persistent design document, implementation plan, test matrix, rollout plan, or acceptance criteria.

Refactor Design Report

Purpose

Create a durable engineering report that turns concrete problems into an executable design. Ground the report in the current code and contracts first, then describe the target model, backend changes, frontend changes, validation strategy, implementation order, and acceptance criteria.

Workflow

  1. Normalize the request.

    • Extract the concrete issues, desired behavior, affected user flows, and any stated constraints.
    • Separate current defects from desired future capabilities.
    • If the user says to persist the result, write a focused design document in the appropriate docs location; otherwise provide the report in the reply.
  2. Locate the real implementation.

    • Find entry points before designing: API definitions, handlers, service methods, data models, workflow runners, frontend request builders, UI components, tests, and docs.
    • Prefer real call paths over keyword-level guesses.
    • Identify what is already implemented, what is only documented, and what is missing.
  3. Define the target semantics.

    • Name the core concepts and states precisely.
    • State invariant rules as hard requirements, not suggestions.
    • Resolve ambiguous user-facing terms into exact technical meanings.
    • Decide which behavior belongs in backend hard validation, frontend guidance, workflow preflight, and tests.
  4. Design the backend.

    • Cover API/proto/schema changes, storage changes, service validation, workflow/runtime changes, error types, idempotency, locking, and retry behavior.
    • Put hard safety rules in backend paths that cannot be bypassed by the UI.
    • Include both precheck-time and execution-time validation when state can change between submit and execution.
  5. Design the frontend.

    • Cover UI state, available actions, disabled states, warnings, confirmations, request shape, response handling, and stale precheck protection.
    • Ensure user wording matches the actual backend semantics.
    • Prevent users from selecting impossible or unsafe combinations; still rely on backend validation as final authority.
  6. Define verification.

    • Include unit tests for pure rules.
    • Include service/integration tests for API behavior.
    • Include frontend tests for UI gating and user guidance.
    • Include E2E matrix cases for the highest-risk flows.
  7. Provide implementation order.

    • Sequence changes from contracts and data model through backend, frontend, generation, tests, and rollout.
    • Call out generated code, migrations, docs, and compatibility choices explicitly.

Report Format

Use this structure unless the user asks for a different format:

# <Short Design Title>

## Scope

Briefly state the problems being solved and the explicit constraints.

## Current State

Describe the current implementation with concrete evidence. Include file references when working in a local repository.

## Target Semantics

Define terms, invariants, state transitions, and user-visible meanings.

## Data Model And Contracts

Describe API, schema, storage, event, or protocol changes. Include example payloads when helpful.

## Backend Design

Describe validation rules, service flow, workflow/runtime changes, errors, locking, retries, and persistence.

## Frontend Design

Describe UI controls, dynamic options, copy, warnings, confirmations, request building, and response handling.

## Workflow / Runtime

Describe job phases, command generation, preflight checks, async behavior, and failure handling.

## Compatibility And Rollout

State whether backward compatibility is required. If not, say what can be deleted or replaced.

## Test Plan

List backend unit tests, service/API tests, frontend tests, and E2E matrix.

## Implementation Order

Give numbered steps that an engineer can execute.

## Acceptance Criteria

List observable conditions that must be true when the work is complete.

## Open Questions

Only include questions that block implementation or materially change the design.

Review Rules

  • Lead with findings and decisions, not background.
  • Do not invent product-specific facts. If a fact must come from code, inspect the code.
  • Distinguish confirmed evidence from inference.
  • Prefer backend hard validation for safety, frontend guidance for ergonomics, and workflow preflight for race-prone runtime state.
  • Do not hide known gaps. Label them as current gaps, target behavior, or out of scope.
  • Use concrete error names, request fields, state names, and test names when designing implementation details.
  • Avoid vague advice such as "add checks" or "improve UI"; specify where the check lives, what it reads, what it rejects, and how the user sees it.

Output Quality Bar

The report is complete when another engineer can implement from it without reconstructing the reasoning. It should include:

  • The exact current problem.
  • The exact target behavior.
  • Backend enforcement points.
  • Frontend user guidance and blocking behavior.
  • Contract and persistence changes.
  • Runtime race protections.
  • Tests that prove the behavior.
  • Clear acceptance criteria.

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value95/100

Highlights

  • 直接解决工程团队在架构改造、前后端契约不一致等场景下的核心痛点
  • 提供从问题识别到实施落地的完整设计报告生成能力,显著提升技术方案设计效率
Trigger Precision90/100

Highlights

  • 触发场景描述精准完整,覆盖技术问题、产品缺口、代码审查、架构隐患等多种变体
  • 边界清晰,明确列举了 Codex 被要求转化的具体场景
Structure and Standards90/100

Highlights

  • 结构完整,包含 Purpose、Workflow、Report Format、Review Rules 和 Output Quality Bar
  • Workflow 提供 7 个清晰步骤,Report Format 给出完整设计报告模板
Execution Reliability90/100

Highlights

  • 设计流程覆盖从问题识别到实施顺序的完整闭环,可靠性高
  • Review Rules 强调基于代码证据、区分确认与推断,体现良好的执行规范
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.