원클릭으로
speckit-architecture-guard-refactor-generator
Convert architecture violations into non-blocking, structured refactor tasks.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Convert architecture violations into non-blocking, structured refactor tasks.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Execute the implementation plan by processing and executing all tasks defined in tasks.md
Apply approved architecture refactors by updating plan and task artifacts directly.
Perform a framework-agnostic architecture review validating implementation against spec.md, plan.md, tasks.md, and the governance and architecture constitutions.
Perform an architecture-aware verification gate validating implementation against spec.md, plan.md, tasks.md, and the Architecture Constitution.
Run a single architecture workflow that prefers memory-first context and can incorporate security review when available.
Run implementation with memory context, then review the produced implementation against security and architecture constraints.
| name | speckit-architecture-guard-refactor-generator |
| description | Convert architecture violations into non-blocking, structured refactor tasks. |
| compatibility | Requires spec-kit project structure with .specify/ directory |
| metadata | {"author":"github-spec-kit","source":"architecture-guard:commands/refactor-generator.md"} |
You are generating non-blocking refactor tasks for architecture-guard.
Convert architecture violations into structured tasks that preserve delivery momentum while making architectural debt visible and actionable.
Use the same normalized command context as the review workflow. When mode=performance, do not invent refactor tasks from performance guidance; that mode is advisory and belongs to architecture-review output only.
Accept the same normalized command context as the review workflow:
mode=architecture by defaultmode=performance when the command includes performancefocus=general by defaultfocus=db when the command includes dbfocus=api when the command includes apifocus=async when the command includes asyncIf mode=performance, do not create refactor tasks from performance guidance. That mode is advisory and belongs to architecture-review output only.
If the input points to a Constitution Update Proposal, do not convert it into a normal refactor task. Leave it for architecture-review and architecture-apply.
Use any available:
Each task must:
Performance Insights into refactor tasks.P0: Must resolve before release because the Constitution makes it blocking.P1: Should resolve soon to prevent architectural spread.P2: Safe to schedule as technical debt.P3: Opportunistic cleanup.Good scopes:
Avoid scopes that are too broad:
Suggested fixes should be concrete:
When generating refactor tasks based on architecture drift, you MUST avoid proposing full system rewrites. Prefer incremental, boundary-by-boundary, or module-by-module migrations.
Output your phased migration strategy to specs/<feature>/architecture-migration-plan.md. Include coexistence strategies for old and new patterns.
When creating specs/<feature>/architecture-migration-plan.md, use this structure:
# [Violation Title] Migration Plan
## Current State
[Brief description or ASCII diagram of current architecture]
### Problems
- [Problem 1 from violation]
- [Problem 2 from violation]
## Target State
[Brief description or ASCII diagram of target architecture]
### Benefits
- [Benefit 1]
- [Benefit 2]
## Migration Phases
### Phase 1: [Name] (Estimated: X days)
**Goal**: [Outcome]
- **Task 1.1**: [Specific, actionable task]
- **Task 1.2**: [Specific, actionable task]
**Coexistence**: [How old and new patterns coexist in this phase]
### Phase 2: [Name] (Estimated: X days)
[Same structure]
## Coexistence Strategy
**Why coexistence?** Avoid big-bang rewrites; allow gradual migration.
**How**:
- New code uses new pattern immediately
- Old code continues on old pattern temporarily
- Boundary layer adapts between old and new
- Example: Run both repositories in parallel until all consumers migrate
## Rollback Plan
[If migration fails, how do we revert?]
## Success Criteria
- [ ] All new code uses target pattern
- [ ] Old pattern removed or marked deprecated
- [ ] Tests pass
- [ ] No performance regression
Return only:
Refactor Tasks:
[Refactor Task]
Title:
Reason:
Scope:
Priority:
Suggested Fix:
If no tasks are needed:
Refactor Tasks:
- None
Constitution Update Proposals are not refactor tasks.
Refactor Tasks:
[Refactor Task]
Title: Move pricing rule out of checkout route
Reason: The route currently owns a business decision that should live behind the checkout application boundary.
Scope: Checkout request handler and checkout application service.
Priority: P1
Suggested Fix: Extract pricing decision logic into the checkout service or domain policy, keep the route responsible for validation, mapping, and delegation only.