スキル一覧に戻る
LerianStudio

ringdev-refactor

by LerianStudio

1🍴 0📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: "ring:dev-refactor" description: Analyzes codebase against standards and generates refactoring tasks for ring:dev-cycle. license: MIT compatibility: platforms: - opencode

metadata: version: "1.0.0" author: "Lerian Studio" category: workflow trigger: - User wants to refactor existing project to follow standards - Legacy codebase needs modernization - Project audit requested skip_when: - Greenfield project - Use /pre-dev-* instead - Single file fix - Use ring:dev-cycle directly

Dev Refactor Skill

Analyzes existing codebase against Ring/Lerian standards and generates refactoring tasks compatible with ring:dev-cycle.

Mandatory Gap Principle

ANY divergence from Ring standards = MANDATORY gap to implement.

PrincipleMeaning
ALL divergences are gapsEvery difference MUST be tracked as FINDING-XXX
Severity affects PRIORITY, not TRACKINGLow severity = lower priority, NOT optional
NO filtering allowedYou CANNOT decide which divergences "matter"

Workflow Steps

Step 0: Validate PROJECT_RULES.md

Check if docs/PROJECT_RULES.md exists:

If docs/PROJECT_RULES.md exists:
  - Load and continue to Step 1

If docs/PROJECT_RULES.md does NOT exist:
  - Check if {OPENCODE_CONFIG}/templates/PROJECT_RULES.md exists
  - Present option to user:
    "PROJECT_RULES.md not found. Would you like me to create one from the Ring template?"
    - YES: Copy {OPENCODE_CONFIG}/templates/PROJECT_RULES.md to docs/PROJECT_RULES.md
           Ask user to review and customize for their project
           Continue to Step 1
    - NO:  STOP with message:
           "Cannot proceed without PROJECT_RULES.md. Either:
           1. Create from template with /ring:dev-refactor --init
           2. Run /ring:pre-dev-full to generate project standards
           3. Create manually at docs/PROJECT_RULES.md"

Step 1: Detect Project Stack

File/PatternStackAgent
go.modGo Backendring:backend-engineer-golang
package.json + ReactFrontendring:frontend-engineer
package.json + ExpressTypeScript Backendring:backend-engineer-typescript

Step 2: Read PROJECT_RULES.md

Extract project-specific conventions for agent context.

Step 3: Generate Codebase Report

Task:
  subagent_type: "ring:codebase-explorer"
  description: "Generate codebase architecture report"
  prompt: |
    Generate comprehensive codebase report:
    - Project structure and directory layout
    - Architecture pattern (hexagonal, clean, etc.)
    - Technology stack from manifests
    - Code patterns: config, database, handlers, errors, telemetry, testing

Step 4: Dispatch Specialist Agents (Parallel)

For Go projects:

  • ring:backend-engineer-golang - Go standards analysis
  • ring:qa-analyst - Test coverage analysis
  • ring:devops-engineer - DevOps analysis
  • ring:sre - Observability analysis

Step 5: Generate findings.md

Every issue from agents becomes FINDING-XXX entry with:

  • Severity
  • Category
  • Current Code (file:line)
  • Ring Standard Reference
  • Required Changes

Step 6: Group Findings into Tasks

Create REFACTOR-XXX tasks grouping related findings.

Step 7: Generate tasks.md

## REFACTOR-001: [Task Name]
**Priority:** Critical | High | Medium | Low
**Effort:** [hours]h

### Findings Addressed
| Finding | Pattern | Severity |
|---------|---------|----------|

### Required Actions
1. [ ] [action from finding]

Step 8: User Approval

Present plan for approval before execution.

Step 9: Handoff to ring:dev-cycle

Skill tool:
  skill: "ring:dev-cycle"

Pass tasks file: docs/refactor/{timestamp}/tasks.md

Output Artifacts

docs/refactor/{timestamp}/
├── codebase-report.md  (Step 3)
├── reports/            (Step 4)
│   ├── ring:backend-engineer-golang-report.md
│   ├── ring:qa-analyst-report.md
│   ├── ring:devops-engineer-report.md
│   └── ring:sre-report.md
├── findings.md         (Step 5)
└── tasks.md            (Step 7)

Anti-Rationalization

RationalizationWhy WrongRequired Action
"Multiple similar issues can be one finding"Distinct file:line = distinct findingOne issue = One FINDING-XXX
"Some findings are duplicates across agents"Different perspectives matterCreate separate findings
"Team has approved this deviation"Approval ≠ complianceCreate FINDING-XXX, note decision

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です